Browse Source

Merge remote-tracking branch 'origin/master'

master
dimengzhe 1 year ago
parent
commit
bbefa11a63
  1. 2
      anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finuncollectedreceivablesdetailedjr/FinUncollectedReceivablesDetailedJR.java
  2. 1
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java
  3. 4
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailedjr/FinUncollectedReceivablesDetailedJRService.java
  4. 4
      anrui-riskcenter-ui/src/views/collectionmeasures/collectionmeasures.vue
  5. 7
      anrui-riskcenter-ui/src/views/collectionmeasures/collectionmeasuresAdd.vue
  6. 7
      anrui-riskcenter-ui/src/views/collectionmeasures/collectionmeasuresInfo.vue
  7. 2
      anrui-riskcenter-ui/src/views/overduevehicle/overduevehicle.vue
  8. 2
      anrui-riskcenter-ui/src/views/overduevehicle/overduevehicleByRisk.vue
  9. 6
      anrui-riskcenter-ui/src/views/workFlow/cuishoucuoshiFlow/collectionmeasuresDaiBan.vue
  10. 6
      anrui-riskcenter-ui/src/views/workFlow/cuishoucuoshiFlow/collectionmeasuresEdit.vue
  11. 6
      anrui-riskcenter-ui/src/views/workFlow/cuishoucuoshiFlow/collectionmeasuresYiBan.vue
  12. 77
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymenthistory/LoanRepaymentHistoryService.java
  13. 6
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsMapper.java
  14. 221
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsMapper.xml
  15. 12
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsService.java
  16. 99
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentschedule/LoanRepaymentScheduleService.java
  17. 12
      anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanwarrantinformation/LoanWarrantInformationService.java

2
anrui-fin/anrui-fin-api/src/main/java/com/yxt/anrui/fin/api/finuncollectedreceivablesdetailedjr/FinUncollectedReceivablesDetailedJR.java

@ -63,7 +63,7 @@ public class FinUncollectedReceivablesDetailedJR extends BaseEntity {
@ApiModelProperty("款项名称value")
private String payCostTitleValue;
@ApiModelProperty("应收金额(不变)")
private String reveivableMoney;
private BigDecimal reveivableMoney;
@ApiModelProperty("当前应收金额")
private BigDecimal currentReceivableMoney; // 当前应收金额
@ApiModelProperty("认款状态")

1
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java

@ -3771,6 +3771,7 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl
jr.setCreateByName(userVo.getName());
jr.setBusSid(planSid);
jr.setCurrentReceivableMoney(new BigDecimal(v.getSubscriptionMoney()));
jr.setReveivableMoney(new BigDecimal(v.getSubscriptionMoney()));
jr.setPayCostTitleKey("007");
jr.setPayCostTitleValue("资方退还垫款");
jr.setOrgSidPath(planDetails.getOrgSidPath());

4
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/finuncollectedreceivablesdetailedjr/FinUncollectedReceivablesDetailedJRService.java

@ -135,8 +135,8 @@ public class FinUncollectedReceivablesDetailedJRService extends MybatisBaseServi
public ResultBean updateAll(String sid, String type, BigDecimal fundDay) {
ResultBean rb = ResultBean.fireFail();
FinUncollectedReceivablesDetailedJR finUncollectedReceivablesDetailedJR = baseMapper.selectByType(sid, type);
BigDecimal bigDecimal = new BigDecimal(finUncollectedReceivablesDetailedJR.getReveivableMoney()).add(fundDay);
finUncollectedReceivablesDetailedJR.setReveivableMoney(bigDecimal.toString());
BigDecimal bigDecimal =finUncollectedReceivablesDetailedJR.getReveivableMoney().add(fundDay);
finUncollectedReceivablesDetailedJR.setReveivableMoney(bigDecimal);
baseMapper.updateById(finUncollectedReceivablesDetailedJR);
return rb.success();
}

4
anrui-riskcenter-ui/src/views/collectionmeasures/collectionmeasures.vue

@ -103,9 +103,9 @@
<!--End查询列表部分-->
</div>
</div>
<!--款项结转新增及修改 -->
<!--新增及修改 -->
<collectionmeasuresAdd v-show="viewState == 2 || viewState == 3" ref="divAdd" @doback="resetState" @reloadlist="getList"/>
<!--款项结转申请详情-->
<!--详情-->
<collectionmeasuresInfo v-show="viewState == 4" ref="divInfo" @doback="resetState" />
<!-- 流程审批记录 -->
<el-dialog title="" :visible.sync="centerDialogVisible" width="78%" height="1%" :before-close="closeIt" center>

7
anrui-riskcenter-ui/src/views/collectionmeasures/collectionmeasuresAdd.vue

@ -90,6 +90,11 @@
</template>
</el-table-column>
</el-table>
<el-row v-if="formobj.lockCarRemarks !== '' && yckzVisible">
<el-col :span="24">
<span style="color: red;font-weight: bold">{{ formobj.lockCarRemarks }}</span>
</el-col>
</el-row>
</el-form>
</div>
</div>
@ -176,6 +181,7 @@ export default {
deptSid: '',
files: [],
loanBeCollectionVehDetails: [],
lockCarRemarks: '',
nodeSid: '',
nodeState: '',
orgPath: '',
@ -346,6 +352,7 @@ export default {
deptSid: '',
files: [],
loanBeCollectionVehDetails: [],
lockCarRemarks: '',
nodeSid: '',
nodeState: '',
orgPath: '',

7
anrui-riskcenter-ui/src/views/collectionmeasures/collectionmeasuresInfo.vue

@ -85,6 +85,11 @@
</template>
</el-table-column>
</el-table>
<el-row v-if="formobj.lockCarRemarks !== '' && yckzVisible">
<el-col :span="24">
<span style="color: red;font-weight: bold">{{ formobj.lockCarRemarks }}</span>
</el-col>
</el-row>
</el-form>
</div>
</div>
@ -156,6 +161,7 @@ export default {
deptSid: '',
files: [],
loanBeCollectionVehDetails: [],
lockCarRemarks: '',
nodeSid: '',
nodeState: '',
orgPath: '',
@ -286,6 +292,7 @@ export default {
deptSid: '',
files: [],
loanBeCollectionVehDetails: [],
lockCarRemarks: '',
nodeSid: '',
nodeState: '',
orgPath: '',

2
anrui-riskcenter-ui/src/views/overduevehicle/overduevehicle.vue

@ -48,7 +48,7 @@
<el-input v-model="listQuery.params.riskStaffName" placeholder="" clearable/>
</el-form-item>
<el-form-item label="远程控制状态">
<el-select v-model="istQuery.params.lockCarState" clearable placeholder="请选择" filterable>
<el-select v-model="listQuery.params.lockCarState" clearable placeholder="请选择" filterable>
<el-option v-for="item in lockCarState_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey">
</el-option>
</el-select>

2
anrui-riskcenter-ui/src/views/overduevehicle/overduevehicleByRisk.vue

@ -48,7 +48,7 @@
<el-input v-model="listQuery.params.riskStaffName" placeholder="" clearable/>
</el-form-item>
<el-form-item label="远程控制状态">
<el-select v-model="istQuery.params.lockCarState" clearable placeholder="请选择" filterable>
<el-select v-model="listQuery.params.lockCarState" clearable placeholder="请选择" filterable>
<el-option v-for="item in lockCarState_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey">
</el-option>
</el-select>

6
anrui-riskcenter-ui/src/views/workFlow/cuishoucuoshiFlow/collectionmeasuresDaiBan.vue

@ -83,6 +83,11 @@
</template>
</el-table-column>
</el-table>
<el-row v-if="formobj.lockCarRemarks !== '' && yckzVisible">
<el-col :span="24">
<span style="color: red;font-weight: bold">{{ formobj.lockCarRemarks }}</span>
</el-col>
</el-row>
</el-form>
</div>
</div>
@ -187,6 +192,7 @@ export default {
deptSid: '',
files: [],
loanBeCollectionVehDetails: [],
lockCarRemarks: '',
nodeSid: '',
nodeState: '',
orgPath: '',

6
anrui-riskcenter-ui/src/views/workFlow/cuishoucuoshiFlow/collectionmeasuresEdit.vue

@ -89,6 +89,11 @@
</template>
</el-table-column>
</el-table>
<el-row v-if="formobj.lockCarRemarks !== '' && yckzVisible">
<el-col :span="24">
<span style="color: red;font-weight: bold">{{ formobj.lockCarRemarks }}</span>
</el-col>
</el-row>
</el-form>
</div>
</div>
@ -175,6 +180,7 @@ export default {
deptSid: '',
files: [],
loanBeCollectionVehDetails: [],
lockCarRemarks: '',
nodeSid: '',
nodeState: '',
orgPath: '',

6
anrui-riskcenter-ui/src/views/workFlow/cuishoucuoshiFlow/collectionmeasuresYiBan.vue

@ -80,6 +80,11 @@
</template>
</el-table-column>
</el-table>
<el-row v-if="formobj.lockCarRemarks !== '' && yckzVisible">
<el-col :span="24">
<span style="color: red;font-weight: bold">{{ formobj.lockCarRemarks }}</span>
</el-col>
</el-row>
</el-form>
</div>
</div>
@ -147,6 +152,7 @@ export default {
deptSid: '',
files: [],
loanBeCollectionVehDetails: [],
lockCarRemarks: '',
nodeSid: '',
nodeState: '',
orgPath: '',

77
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymenthistory/LoanRepaymentHistoryService.java

@ -201,26 +201,14 @@ public class LoanRepaymentHistoryService extends MybatisBaseService<LoanRepaymen
}
}
} catch (Exception e) {
if (StringUtils.isBlank(trim)) {
String word = new String();
switch (i) {
case 0:
word = "资方合同号";
break;
case 1:
word = "期数";
break;
case 2:
word = "实还日期";
break;
case 3:
word = "实还金额";
break;
default:
break;
if (StringUtils.isNotBlank(trim)) {
if (i == 2) {
checkWord.add("请导入正确的日期格式,如:2024-01-01");
importVo.setRealReturnTime("error");
continue;
}
// String checkResult = "第" + (r + 1) + "行" + word + "为空";
// sb.append(checkResult).append(";");
}
if (StringUtils.isBlank(trim)) {
continue;
}
}
@ -241,7 +229,7 @@ public class LoanRepaymentHistoryService extends MybatisBaseService<LoanRepaymen
try {
sdf.parse(excelInfo.getRealReturnTime());
} catch (ParseException e) {
checkWord.add("请导入正确的日期格式,如:2023-01-01");
checkWord.add("请导入正确的日期格式,如:2024-01-01");
e.printStackTrace();
}
}
@ -648,34 +636,28 @@ public class LoanRepaymentHistoryService extends MybatisBaseService<LoanRepaymen
List<LoanRepaymentPlanDetails> planDetails = loanRepaymentPlanDetailsService.selPlanByNoAndPeriod(repaymentExcelInfo.getBankContractNo(), repaymentExcelInfo.getPeriod());
if (!planDetails.isEmpty()) {
for (LoanRepaymentPlanDetails planDetail : planDetails) {
LoanRepaymentHistory repaymentHistory = new LoanRepaymentHistory();
repaymentHistory.setBuckle("未申请");
repaymentHistory.setBuckleKey("001");
repaymentHistory.setScheduleSid(planDetail.getScheduleSid());
repaymentHistory.setPlanDetailSid(planDetail.getSid());
repaymentHistory.setReturnWay("直还");
repaymentHistory.setReturnWayKey("01");
try {
repaymentHistory.setActualDate(sdf.parse(repaymentExcelInfo.getRealReturnTime()));
} catch (ParseException e) {
e.printStackTrace();
String check = loanRepaymentPlanDetailsService.InsertForCheckPaymentAndBank(planDetail.getSid());
if (StringUtils.isNotBlank(check)) {
if (!check.equals("0")) {
LoanRepaymentHistory repaymentHistory = new LoanRepaymentHistory();
repaymentHistory.setBuckle("未申请");
repaymentHistory.setBuckleKey("001");
repaymentHistory.setScheduleSid(planDetail.getScheduleSid());
repaymentHistory.setPlanDetailSid(planDetail.getSid());
repaymentHistory.setReturnWay("直还");
repaymentHistory.setReturnWayKey("01");
try {
repaymentHistory.setActualDate(sdf.parse(repaymentExcelInfo.getRealReturnTime()));
} catch (ParseException e) {
e.printStackTrace();
}
BigDecimal realMoney = new BigDecimal(repaymentExcelInfo.getRealMoney());
BigDecimal divide = realMoney.divide(new BigDecimal(planDetails.size()), 2, BigDecimal.ROUND_HALF_UP);
repaymentHistory.setActualMoney(divide);
repaymentHistory.setDataTime(new DateTime());
baseMapper.insert(repaymentHistory);
}
}
BigDecimal realMoney = new BigDecimal(repaymentExcelInfo.getRealMoney());
BigDecimal divide = realMoney.divide(new BigDecimal(planDetails.size()), 2, BigDecimal.ROUND_HALF_UP);
repaymentHistory.setActualMoney(divide);
repaymentHistory.setDataTime(new DateTime());
// List<LoanRepaymentHistory> histories = baseMapper.selHistoryByPlanSid(planDetail.getSid());
// BigDecimal returned = new BigDecimal(0);
// if (!histories.isEmpty()) {
// for (LoanRepaymentHistory history : histories) {
// returned = history.getActualMoney().add(returned);
// }
// }
// BigDecimal decimal = returned.add(divide);
// BigDecimal dueMoney = planDetail.getDueMoney();
// BigDecimal subtract = dueMoney.subtract(decimal);
// repaymentHistory.setOutstandingMoney(subtract);
baseMapper.insert(repaymentHistory);
}
}
}
@ -800,6 +782,7 @@ public class LoanRepaymentHistoryService extends MybatisBaseService<LoanRepaymen
FinUncollectedReceivablesDetailedJR jr = new FinUncollectedReceivablesDetailedJR();
jr.setBusSid(planDetails.getSid());
jr.setCurrentReceivableMoney(amount);
jr.setReveivableMoney(amount);
jr.setPayCostTitleKey("007");
jr.setPayCostTitleValue("资方退还垫款");
jr.setOrgSidPath(planDetails.getOrgSidPath());

6
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsMapper.java

@ -50,4 +50,10 @@ public interface LoanRepaymentPlanDetailsMapper extends BaseMapper<LoanRepayment
String reAdvancesOrPaymentMoney(@Param("pSid") String pSid);
DifferenceVo selDifference(@Param("pSid") String pSid);
String InsertForCheckPaymentAndBank(@Param("sid") String sid);
int saveVehMark(@Param("busVinSid") String busVinSid,@Param("vehMark") String vehMark);
List<LoanRepaymentPlanDetails> getListByBusVinSid(@Param("busVinSid") String busVinSid);
}

221
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsMapper.xml

@ -15,6 +15,11 @@
#{planSid}
</foreach>
</update>
<update id="saveVehMark">
UPDATE loan_repayment_plan_details
SET vehMark = #{vehMark}
WHERE busVinSid = #{busVinSid}
</update>
<delete id="deletePlanDetails">
DELETE
FROM loan_repayment_plan_details
@ -117,129 +122,125 @@
where paymentMoney > 0
</select>
<select id="overDueVoList" resultType="com.yxt.anrui.riskcenter.api.loanrepaymenthistory.HistoryOverDueVo">
SELECT
b.sid as planSid,
CASE
WHEN ( b.outstandingMoney + b.bankBeInter + b.fund ) &gt; 0 THEN
'0'
WHEN ( b.outstandingMoney + b.bankBeInter + b.fund ) &lt;= 0 THEN
'1'
END AS overdueState
FROM
(
SELECT
a.*
FROM
(
SELECT
pd.dueDate,
pd.useOrgSid,
pd.sid,
IFNULL( pd.fund, 0 ) AS fund,
pd.dueMoney,
pd.overdue,
t.repaidMoney,
t.outstandingMoney,
IFNULL( v.bankBeInter, 0 ) AS bankBeInter,
pd.overdue AS dueOverdue,
pd.updateTime AS updateDate
FROM
loan_repayment_plan_details AS pd
LEFT JOIN anrui_buscenter.bus_sales_order AS s ON s.sid = pd.salesOrderSid
LEFT JOIN loan_be_padsincere_veh AS v ON v.saleVehSid = pd.busVinSid
LEFT JOIN (
SELECT
p.sid,
IFNULL((
SELECT
SUM(
IFNULL( h.actualMoney, 0 ))
FROM
loan_repayment_history AS h
WHERE
h.planDetailSid = p.sid
AND h.updateState = '1'
),
0
) AS repaidMoney,
IFNULL(
(
p.dueMoney - IFNULL((
SELECT
SUM(
IFNULL( h.actualMoney, 0 ))
FROM
loan_repayment_history AS h
WHERE
h.planDetailSid = p.sid
AND h.updateState = '1'
),
0
)),
0
) AS outstandingMoney
FROM
loan_repayment_plan_details AS p
) AS t ON pd.sid = t.sid
) AS a
WHERE
a.dueDate &lt;= a.updateDate
AND a.overdue = 1
and a.useOrgSid = #{useOrgSid}
) AS b
SELECT b.sid as planSid,
CASE
WHEN (b.outstandingMoney + b.bankBeInter + b.fund) &gt; 0 THEN
'0'
WHEN (b.outstandingMoney + b.bankBeInter + b.fund) &lt;= 0 THEN
'1'
END AS overdueState
FROM (
SELECT a.*
FROM (
SELECT pd.dueDate,
pd.useOrgSid,
pd.sid,
IFNULL(pd.fund, 0) AS fund,
pd.dueMoney,
pd.overdue,
t.repaidMoney,
t.outstandingMoney,
IFNULL(v.bankBeInter, 0) AS bankBeInter,
pd.overdue AS dueOverdue,
pd.updateTime AS updateDate
FROM loan_repayment_plan_details AS pd
LEFT JOIN anrui_buscenter.bus_sales_order AS s ON s.sid = pd.salesOrderSid
LEFT JOIN loan_be_padsincere_veh AS v ON v.saleVehSid = pd.busVinSid
LEFT JOIN (
SELECT p.sid,
IFNULL((
SELECT SUM(
IFNULL(h.actualMoney, 0))
FROM loan_repayment_history AS h
WHERE h.planDetailSid = p.sid
AND h.updateState = '1'
),
0
) AS repaidMoney,
IFNULL(
(
p.dueMoney - IFNULL((
SELECT SUM(
IFNULL(h.actualMoney, 0))
FROM loan_repayment_history AS h
WHERE h.planDetailSid = p.sid
AND h.updateState = '1'
),
0
)),
0
) AS outstandingMoney
FROM loan_repayment_plan_details AS p
) AS t ON pd.sid = t.sid
) AS a
WHERE a.dueDate &lt;= a.updateDate
AND a.overdue = 1
and a.useOrgSid = #{useOrgSid}
) AS b
</select>
<select id="reAdvancesOrPaymentMoney" resultType="java.lang.String">
SELECT
CASE
WHEN p.paymentMoney > 0
AND b.reAdvances = 1
THEN
'0'
ELSE '1'
END as h
FROM
loan_repayment_plan_details as p
LEFT JOIN loan_solutions as s ON p.salesOrderSid = s.salesOrderSid
LEFT JOIN loan_fin_policy as py ON s.policySid = py.sid
LEFT JOIN loan_fin_bank as b ON b.sid = py.bankSid
AND s.isDelete = 0
and p.sid =#{pSid}
SELECT CASE
WHEN p.paymentMoney > 0
AND b.reAdvances = 1
THEN
'0'
ELSE '1'
END as h
FROM loan_repayment_plan_details as p
LEFT JOIN loan_solutions as s ON p.salesOrderSid = s.salesOrderSid
LEFT JOIN loan_fin_policy as py ON s.policySid = py.sid
LEFT JOIN loan_fin_bank as b ON b.sid = py.bankSid
where
s.isDelete = 0
and p.sid = #{pSid}
</select>
<select id="selDifference" resultType="com.yxt.anrui.riskcenter.api.loanrepaymenthistory.DifferenceVo">
SELECT
a.*
FROM
(
SELECT
pd.sid,
t.difference
FROM
loan_repayment_plan_details AS pd
LEFT JOIN anrui_buscenter.bus_sales_order AS s ON s.sid = pd.salesOrderSid
LEFT JOIN loan_be_padsincere_veh AS v ON v.saleVehSid = pd.busVinSid
LEFT JOIN (
SELECT
p.sid,
SELECT a.*
FROM (
SELECT pd.sid,
t.difference
FROM loan_repayment_plan_details AS pd
LEFT JOIN anrui_buscenter.bus_sales_order AS s ON s.sid = pd.salesOrderSid
LEFT JOIN loan_be_padsincere_veh AS v ON v.saleVehSid = pd.busVinSid
LEFT JOIN (
SELECT p.sid,
IFNULL(
(
p.dueMoney - IFNULL((
SELECT
SUM(
IFNULL( h.actualMoney, 0 ))
FROM
loan_repayment_history AS h
WHERE
h.planDetailSid = p.sid
SELECT SUM(
IFNULL(h.actualMoney, 0))
FROM loan_repayment_history AS h
WHERE h.planDetailSid = p.sid
AND h.updateState = '1'
),
0
)),
0
) AS difference
FROM
loan_repayment_plan_details AS p
) AS t ON pd.sid = t.sid
) AS a
FROM loan_repayment_plan_details AS p
) AS t ON pd.sid = t.sid
) AS a
WHERE a.sid = #{pSid}
</select>
<select id="InsertForCheckPaymentAndBank" resultType="java.lang.String">
SELECT
CASE
WHEN
IFNULL(p.paymentMoney,0) > 0
AND b.reAdvances = 0 THEN
'0' ELSE '1'
END AS h
FROM
loan_repayment_plan_details AS p
LEFT JOIN loan_solutions AS s ON p.salesOrderSid = s.salesOrderSid
LEFT JOIN loan_fin_policy AS py ON s.policySid = py.sid
LEFT JOIN loan_fin_bank AS b ON b.sid = py.bankSid
WHERE
p.sid = #{sid}
AND s.isDelete = 0
</select>
<select id="getListByBusVinSid"
resultType="com.yxt.anrui.riskcenter.api.loanrepaymentplandetails.LoanRepaymentPlanDetails">
select * from loan_repayment_plan_details where busVinSid =#{busVinSid}
</select>
</mapper>

12
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentplandetails/LoanRepaymentPlanDetailsService.java

@ -133,4 +133,16 @@ public class LoanRepaymentPlanDetailsService extends MybatisBaseService<LoanRepa
public DifferenceVo selDifference(String pSid) {
return baseMapper.selDifference(pSid);
}
public String InsertForCheckPaymentAndBank(String sid) {
return baseMapper.InsertForCheckPaymentAndBank(sid);
}
public int saveVehMark(String busVinSid,String vehMark) {
return baseMapper.saveVehMark(busVinSid,vehMark);
}
public List<LoanRepaymentPlanDetails> getListByBusVinSid(String busVinSid) {
return baseMapper.getListByBusVinSid(busVinSid);
}
}

99
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanrepaymentschedule/LoanRepaymentScheduleService.java

@ -321,6 +321,17 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme
if (StringUtils.isNotBlank(dto.getOtherBankNo())) {
loanRepaymentSchedule.setOtherBankNo(dto.getOtherBankNo());
}
List<String> repayDate = returnRepayDate(dto.getMainRepayDate(), dto.getMainPeriod());
if (!repayDate.isEmpty()) {
String lastDate = repayDate.get(repayDate.size() - 1);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
try {
Date date = sdf.parse(lastDate);
loanRepaymentSchedule.setMainLastDate(date);
} catch (ParseException e) {
e.printStackTrace();
}
}
baseMapper.updateById(loanRepaymentSchedule);
loanRepaymentPlanDetailsService.deletePlanDetails(loanRepaymentSchedule.getSid());
BusSalesOrder busSalesOrder = busSalesOrderFeign.fetchBySid(orderSid).getData();
@ -620,7 +631,7 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme
} else if (i == Integer.parseInt(otherPeriod) - 1) {
otherRepay = new BigDecimal(otherLastPay);
} else if (i < Integer.parseInt(otherPeriod) - 1) {
otherRepay = new BigDecimal(otherLastPay);
otherRepay = new BigDecimal(otherMidPay);
}
if (i == 0) {
BigDecimal mainF = new BigDecimal(mainFirstRepay);
@ -1005,7 +1016,7 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme
} else if (i == Integer.parseInt(otherPeriod) - 1) {
otherRepay = new BigDecimal(otherLastPay);
} else if (i > 0 && i < Integer.parseInt(otherPeriod) - 1) {
otherRepay = new BigDecimal(otherLastPay);
otherRepay = new BigDecimal(otherMidPay);
}
if (i == 0) {
BigDecimal mainF = new BigDecimal(mainFirstRepay);
@ -1607,89 +1618,7 @@ public class LoanRepaymentScheduleService extends MybatisBaseService<LoanRepayme
return rb.success().setData(vo);
}
/**
* 还款计划表多台回显
*
* @param salesOrderSid
* @return
*/
// public ResultBean<LoanCreateScheduleVinsVo> viewVinsSchedule2(String salesOrderSid) {
// ResultBean<LoanCreateScheduleVinsVo> rb = ResultBean.fireFail();
// LoanCreateScheduleVinsVo vo = new LoanCreateScheduleVinsVo();
// BusSalesOrderLoancontractDetailsVo loancontract = busSalesOrderLoancontractFeign.fetchDetailsBySid(salesOrderSid).getData();
// if (null != loancontract) {
// if (StringUtils.isNotBlank(loancontract.getBankName())) {
// vo.setBankName(loancontract.getBankName());
// }
// if (null != loancontract.getVehCount()) {
// vo.setVehCount(String.valueOf(loancontract.getVehCount()));
// }
// if (StringUtils.isNotBlank(loancontract.getLoanContractNo())) {
// vo.setLoanContractNo(loancontract.getLoanContractNo());
// }
// if (StringUtils.isNotBlank(loancontract.getBorrowerName())) {
// vo.setBorrowerName(loancontract.getBorrowerName());
// }
// LoanRepaymentSchedule schedule = baseMapper.selByLoanContractSid(salesOrderSid);
// if (null != schedule) {
// if (StringUtils.isNotBlank(schedule.getIsOtherPolicy())) {
// vo.setIsOtherPolicy(schedule.getIsOtherPolicy());
// }
// if (null != schedule.getMainRepayDate()) {
// mainDate = sdf.format(schedule.getMainRepayDate());
// }
// if (null != schedule.getOtherRepayDate()) {
// otherDate = sdf.format(schedule.getOtherRepayDate());
// }
// //主产品月还日
// if (StringUtils.isNotBlank(mainDate)) {
// String[] splitMainDate = mainDate.split("-");
// String day = splitMainDate[2];
// if (day.length() == 2 && Integer.parseInt(day) >= 10) {
// vo.setMainRepayDate(day);
// } else {
// vo.setMainRepayDate(day.replace("0", ""));
// }
// }
// //其他融月还日
// if (StringUtils.isNotBlank(otherDate)) {
// String[] splitOtherDate = otherDate.split("-");
// String day = splitOtherDate[2];
// if (day.length() == 2 && Integer.parseInt(day) >= 10) {
// vo.setOtherRepayDate(day);
// } else {
// vo.setOtherRepayDate(day.replace("0", ""));
// }
// }
// }
// List<BusSalesOrderVehicle> busSalesOrderVehicles = busSalesOrderVehicleFeign.selbyContractSid(salesOrderSid).getData();
// busSalesOrderVehicles.removeAll(Collections.singleton(null));
// if (!busSalesOrderVehicles.isEmpty()) {
// List<String> stringVinNos = busSalesOrderVehicles.stream().map(c -> c.getLinkNo()).collect(Collectors.toList());
// if (!stringVinNos.isEmpty()) {
// List<String> vinList = new ArrayList<>();
// for (String linkNo : stringVinNos) {
// String vinNo = "";
// if (linkNo.length() > 8) {
// vinNo = linkNo.substring(linkNo.length() - 8);
//
// } else {
// vinNo = linkNo;
// }
// vinList.add(vinNo);
// }
// vo.setVinNo(String.join(",", vinList));
// }
// for (BusSalesOrderVehicle busSalesOrderVehicle : busSalesOrderVehicles) {
//
//
//
// }
// }
// }
// vo.setSalesOrderSid(salesOrderSid);
// return rb.success().setData(vo);
// }
/**
* 生成pdf
*

12
anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanwarrantinformation/LoanWarrantInformationService.java

@ -22,8 +22,10 @@ import com.yxt.anrui.riskcenter.api.loanmortgageinformationtransact.*;
import com.yxt.anrui.riskcenter.api.loanparameter.LoanParameter;
import com.yxt.anrui.riskcenter.api.loanparameter.LoanParameterQuery;
import com.yxt.anrui.riskcenter.api.loanparameter.LoanParameterVo;
import com.yxt.anrui.riskcenter.api.loanrepaymentplandetails.LoanRepaymentPlanDetails;
import com.yxt.anrui.riskcenter.api.loanwarrantinformation.*;
import com.yxt.anrui.riskcenter.biz.loanfile.LoanFileService;
import com.yxt.anrui.riskcenter.biz.loanrepaymentplandetails.LoanRepaymentPlanDetailsService;
import com.yxt.common.base.config.component.FileUploadComponent;
import com.yxt.common.base.service.MybatisBaseService;
import com.yxt.common.base.utils.PagerUtil;
@ -68,6 +70,8 @@ public class LoanWarrantInformationService extends MybatisBaseService<LoanWarran
private LoanFileService loanFileService;
@Autowired
private FileUploadComponent fileUploadComponent;
@Autowired
private LoanRepaymentPlanDetailsService loanRepaymentPlanDetailsService;
public LoanWarrantInformation fetchByBusVinSid(String busVinSid) {
return baseMapper.fetchByBusVinSid(busVinSid);
@ -270,6 +274,14 @@ public class LoanWarrantInformationService extends MybatisBaseService<LoanWarran
entity.setAuditStateKey("002");
entity.setAuditStateValue("已审核未移交");
baseMapper.updateById(entity);
//维护还款计划表中的车牌号
String busVinSid = entity.getBusVinSid();
if (StringUtils.isNotBlank(entity.getVehicleMark())) {
List<LoanRepaymentPlanDetails> planSids = loanRepaymentPlanDetailsService.getListByBusVinSid(busVinSid);
if (!planSids.isEmpty()) {
int i = loanRepaymentPlanDetailsService.saveVehMark(busVinSid, entity.getVehicleMark());
}
}
}
return rb.success().setData(dto.getSid());
}

Loading…
Cancel
Save