diff --git a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java index 0a76720b64..cd93978036 100644 --- a/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java +++ b/anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fincollectionconfirmation/FinCollectionConfirmationService.java @@ -4418,260 +4418,258 @@ public class FinCollectionConfirmationService extends MybatisBaseService bankResultBean = loanFinBankFeign.fetchEntityBySid(bankSid); - if (bankResultBean.getData() != null) { - LoanFinBank loanFinBank = bankResultBean.getData(); - if (null != loanFinBank.getReAdvances()) { - if (loanFinBank.getReAdvances() == 1) { - try { - Date collDate = sdf.parse(finalConfirmation.getCollectionDate()); - historyEntity.setActualDate(collDate); - if (planDetails.getDueDate().compareTo(collDate) > 0) { - //未逾期 - Calendar cal_1 = Calendar.getInstance();// 使用默认时区和语言环境获得一个日历 - cal_1.setTime(planDetails.getDueDate()); - cal_1.add(Calendar.DAY_OF_MONTH, -1); - historyEntity.setPrepareDate(cal_1.getTime()); - } else { - //已逾期 - historyEntity.setPrepareDate(new DateTime()); - } - } catch (ParseException e) { - e.printStackTrace(); - } - historyEntity.setPaymentState("待转付"); - historyEntity.setPaymentStateKey("001"); - FinUncollectedReceivablesDetailedJR jr = new FinUncollectedReceivablesDetailedJR(); - jr.setCreateBySid(userSid); - SysUserVo userVo = sysUserFeign.fetchBySid(userSid).getData(); - 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()); - jr.setUseOrgName(planDetails.getUseOrgName()); - jr.setUseOrgSid(planDetails.getUseOrgSid()); - jr.setStaffDeptName(planDetails.getDept()); - jr.setStaffName(planDetails.getStaffName()); - jr.setStaffDeptSid(planDetails.getDeptSid()); - jr.setStaffUserSid(planDetails.getSalesUserSid()); - finUncollectedReceivablesDetailedJRService.insert(jr); - } - } - } - } else if (planDetails.getPaymentMoney().compareTo(BigDecimal.ZERO) == 0) { - try { - Date collDate = sdf.parse(finalConfirmation.getCollectionDate()); - historyEntity.setActualDate(collDate); - if (planDetails.getDueDate().compareTo(collDate) > 0) { - //未逾期 - Calendar cal_1 = Calendar.getInstance();// 使用默认时区和语言环境获得一个日历 - cal_1.setTime(planDetails.getDueDate()); - cal_1.add(Calendar.DAY_OF_MONTH, -1); - historyEntity.setPrepareDate(cal_1.getTime()); - } else { - //已逾期 - historyEntity.setPrepareDate(new DateTime()); - } - } catch (ParseException e) { - e.printStackTrace(); - } - historyEntity.setPaymentState("待转付"); - historyEntity.setPaymentStateKey("001"); - } - } else { - try { - Date collDate = sdf.parse(finalConfirmation.getCollectionDate()); - historyEntity.setActualDate(collDate); - if (planDetails.getDueDate().compareTo(collDate) > 0) { - //未逾期 - Calendar cal_1 = Calendar.getInstance();// 使用默认时区和语言环境获得一个日历 - cal_1.setTime(planDetails.getDueDate()); - cal_1.add(Calendar.DAY_OF_MONTH, -1); - historyEntity.setPrepareDate(cal_1.getTime()); - } else { - //已逾期 - historyEntity.setPrepareDate(new DateTime()); - } - } catch (ParseException e) { - e.printStackTrace(); - } - historyEntity.setPaymentState("待转付"); - historyEntity.setPaymentStateKey("001"); - } - loanRepaymentHistoryFeign.saveHistoryByEntity(historyEntity); - } - if (v.getReceivablesName().equals("资方逾期利息")) { - if (null != planDetails.getPaymentInterest()) { - if (planDetails.getPaymentInterest().compareTo(BigDecimal.ZERO) == 1) { - BigDecimal paymentInterest = planDetails.getPaymentInterest(); - String subscriptionMoney = v.getSubscriptionMoney(); - BigDecimal subtract = paymentInterest.subtract(new BigDecimal(subscriptionMoney)); - planDetails.setPaymentInterest(subtract); - BigDecimal paymentMoney = planDetails.getPaymentMoney(); - BigDecimal subtract2 = paymentMoney.subtract(new BigDecimal(subscriptionMoney)); - planDetails.setPaymentMoney(subtract2); - loanRepaymentPlanDetailsFeign.updateByEntity(planDetails); - String orderSid = planDetails.getSalesOrderSid(); - String isOther = loanRepaymentScheduleFeign.returnBankOrOtherBankByPlanSid(planSid).getData(); - String bankSid = ""; - String scheduleSid = planDetails.getScheduleSid(); - LoanRepaymentSchedule schedule = loanRepaymentScheduleFeign.fetchBySid(scheduleSid).getData(); - if (isOther.equals("0")) { - if (StringUtils.isNotBlank(schedule.getBankSid())) { - bankSid = schedule.getBankSid(); - } - } else if (isOther.equals("1")) { - if (StringUtils.isNotBlank(schedule.getOtherBankSid())) { - bankSid = schedule.getOtherBankSid(); - } - } - ResultBean bankResultBean = loanFinBankFeign.fetchEntityBySid(bankSid); - if (bankResultBean.getData() != null) { - LoanFinBank loanFinBank = bankResultBean.getData(); - if (null != loanFinBank.getReAdvances()) { - if (loanFinBank.getReAdvances() == 1) { - FinUncollectedReceivablesDetailedJR jr = new FinUncollectedReceivablesDetailedJR(); - jr.setCreateBySid(userSid); - SysUserVo userVo = sysUserFeign.fetchBySid(userSid).getData(); - 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()); - jr.setUseOrgName(planDetails.getUseOrgName()); - jr.setUseOrgSid(planDetails.getUseOrgSid()); - jr.setStaffDeptName(planDetails.getDept()); - jr.setStaffName(planDetails.getStaffName()); - jr.setStaffDeptSid(planDetails.getDeptSid()); - jr.setStaffUserSid(planDetails.getSalesUserSid()); - finUncollectedReceivablesDetailedJRService.insert(jr); - } - } - } - } - } - } - } - //推送间还月还收款凭证 - CollectionVoucher.CollectionVoucherDetail d = getDueMoneyAndOverDueMoneyVoucher(v, collectionDate); - voucherDetails.add(d); - } - //认资金占用费消减平台资金占用费 - if (v.getReceivablesName().equals("资金占用费")) { - String planSid = ""; + String planSid = ""; + if (v.getReceivablesName().equals("月还")) { + planSid = v.getReceivablesSid(); + } else { FinUncollectedReceivablesDetailedJR jr = finUncollectedReceivablesDetailedJRService.fetchBySid(v.getReceivablesSid()); if (jr != null) { planSid = jr.getBusSid(); } - LoanRepaymentPlanDetails planDetails = loanRepaymentPlanDetailsFeign.fetchDetails(planSid).getData(); - if (null != planDetails) { - LoanPlanDetailsVoForFundVoucher f = loanRepaymentPlanDetailsFeign.getLoanPlanDetailsVoForFundVoucher(planDetails.getBusVinSid()); - if (null != f) { - List g = getFundGenralVoucher(planDetails, f); - if (!g.isEmpty()) { - g.stream().forEach(gv -> { - generalVoucherDetails.add(gv); - }); - } - LoanPushFundHistory loanPushFundHistory = new LoanPushFundHistory(); - if (null != f.getDuePushMoney()) { - loanPushFundHistory.setFund(f.getDuePushMoney()); - } - loanPushFundHistory.setBusVinSid(planDetails.getBusVinSid()); - loanPushFundHistory.setUseOrgName(planDetails.getUseOrgName()); - loanPushFundHistory.setUseOrgSid(planDetails.getUseOrgSid()); - String lastTimes = loanPushFundHistoryFeign.getLastDateByBusVinSid(planDetails.getBusVinSid()).getData(); - if (StringUtils.isNotBlank(lastTimes)) { - try { - loanPushFundHistory.setLastAccrualDate(sdfTimes.parse(lastTimes)); - } catch (ParseException e) { - e.printStackTrace(); - } - } - loanPushFundHistoryFeign.saveHistoryByEntity(loanPushFundHistory); -// fundHistoryList.add(loanPushFundHistory); - } - //推送资金占用费出纳确认后 - CollectionVoucher.CollectionVoucherDetail d = getFundVoucher(v, collectionDate, planDetails); - if (null != d) { - CollectionVoucher.CollectionVoucherDetail v1 = new CollectionVoucher.CollectionVoucherDetail(); - BeanUtil.copyProperties(d, v1); - v1.setSceneCode(SceneCodeEnum.FUND_VOUCHER1.getCode()); - voucherDetails.add(v1); - CollectionVoucher.CollectionVoucherDetail v2 = new CollectionVoucher.CollectionVoucherDetail(); - BeanUtil.copyProperties(d, v2); - v2.setSceneCode(SceneCodeEnum.FUND_VOUCHER2.getCode()); - collectionAfterVoucherDetails.add(v2); - } - } - } - //认名义价、合同违约金、其他费用收款 - if (v.getReceivablesName().equals("名义价") || - v.getReceivablesName().equals("合同违约金") || - v.getReceivablesName().equals("其他费用") || - v.getReceivablesName().equals("结清时资方逾期利息") - ) { - CollectionVoucher.CollectionVoucherDetail d = getBalanceMoneyVoucher(v, collectionDate); - voucherDetails.add(d); } + LoanRepaymentPlanDetails planDetails = loanRepaymentPlanDetailsFeign.fetchDetails(planSid).getData(); + BusSalesOrderVehicle busSalesOrderVehicle = busSalesOrderVehicleFeign.details(planDetails.getBusVinSid()).getData(); + if("0".equals(busSalesOrderVehicle.getRiskState().toString())){ + //认资方退还垫款或者结清时资方逾期利息 + if (v.getReceivablesName().equals("资方退还垫款") || v.getReceivablesName().equals("贷款保证金扣罚")) { + CollectionVoucher.CollectionVoucherDetail d = getReturnBackMoneyVoucher(v, collectionDate); + voucherDetails.add(d); + } + //推送间还待转付列表 + if (v.getReceivablesName().equals("月还") || v.getReceivablesName().equals("资方逾期利息")) { + if (null != planDetails) { + if (v.getReceivablesName().equals("月还")) { + //推送间还认款记录 + LoanRepaymentHistory historyEntity = new LoanRepaymentHistory(); + historyEntity.setPlanDetailSid(planSid); + historyEntity.setScheduleSid(planDetails.getScheduleSid()); + historyEntity.setSkdBillNo(finalConfirmation.getBillNo()); + historyEntity.setUpdateTime(new DateTime()); + historyEntity.setUpdateState("1"); + historyEntity.setDataTime(new DateTime()); + historyEntity.setBuckle("审核通过"); + historyEntity.setBuckleKey("003"); + historyEntity.setActualMoney(new BigDecimal(v.getSubscriptionMoney())); + historyEntity.setReturnWay("间还"); + historyEntity.setReturnWayKey("02"); + if (null != planDetails.getPaymentMoney()) { + if (planDetails.getPaymentMoney().compareTo(BigDecimal.ZERO) == 1) { + BigDecimal paymentMoney = planDetails.getPaymentMoney(); + String subscriptionMoney = v.getSubscriptionMoney(); + BigDecimal subtract = paymentMoney.subtract(new BigDecimal(subscriptionMoney)); + planDetails.setPaymentMoney(subtract); + loanRepaymentPlanDetailsFeign.updateByEntity(planDetails); + String orderSid = planDetails.getSalesOrderSid(); + String isOther = loanRepaymentScheduleFeign.returnBankOrOtherBankByPlanSid(planSid).getData(); + String bankSid = ""; + String scheduleSid = planDetails.getScheduleSid(); + LoanRepaymentSchedule schedule = loanRepaymentScheduleFeign.fetchBySid(scheduleSid).getData(); + if (isOther.equals("0")) { + if (StringUtils.isNotBlank(schedule.getBankSid())) { + bankSid = schedule.getBankSid(); + } + } else if (isOther.equals("1")) { + if (StringUtils.isNotBlank(schedule.getOtherBankSid())) { + bankSid = schedule.getOtherBankSid(); + } + } + ResultBean bankResultBean = loanFinBankFeign.fetchEntityBySid(bankSid); + if (bankResultBean.getData() != null) { + LoanFinBank loanFinBank = bankResultBean.getData(); + if (null != loanFinBank.getReAdvances()) { + if (loanFinBank.getReAdvances() == 1) { + try { + Date collDate = sdf.parse(finalConfirmation.getCollectionDate()); + historyEntity.setActualDate(collDate); + if (planDetails.getDueDate().compareTo(collDate) > 0) { + //未逾期 + Calendar cal_1 = Calendar.getInstance();// 使用默认时区和语言环境获得一个日历 + cal_1.setTime(planDetails.getDueDate()); + cal_1.add(Calendar.DAY_OF_MONTH, -1); + historyEntity.setPrepareDate(cal_1.getTime()); + } else { + //已逾期 + historyEntity.setPrepareDate(new DateTime()); + } + } catch (ParseException e) { + e.printStackTrace(); + } + historyEntity.setPaymentState("待转付"); + historyEntity.setPaymentStateKey("001"); + FinUncollectedReceivablesDetailedJR jr = new FinUncollectedReceivablesDetailedJR(); + jr.setCreateBySid(userSid); + SysUserVo userVo = sysUserFeign.fetchBySid(userSid).getData(); + 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()); + jr.setUseOrgName(planDetails.getUseOrgName()); + jr.setUseOrgSid(planDetails.getUseOrgSid()); + jr.setStaffDeptName(planDetails.getDept()); + jr.setStaffName(planDetails.getStaffName()); + jr.setStaffDeptSid(planDetails.getDeptSid()); + jr.setStaffUserSid(planDetails.getSalesUserSid()); + finUncollectedReceivablesDetailedJRService.insert(jr); + } + } + } + } else if (planDetails.getPaymentMoney().compareTo(BigDecimal.ZERO) == 0) { + try { + Date collDate = sdf.parse(finalConfirmation.getCollectionDate()); + historyEntity.setActualDate(collDate); + if (planDetails.getDueDate().compareTo(collDate) > 0) { + //未逾期 + Calendar cal_1 = Calendar.getInstance();// 使用默认时区和语言环境获得一个日历 + cal_1.setTime(planDetails.getDueDate()); + cal_1.add(Calendar.DAY_OF_MONTH, -1); + historyEntity.setPrepareDate(cal_1.getTime()); + } else { + //已逾期 + historyEntity.setPrepareDate(new DateTime()); + } + } catch (ParseException e) { + e.printStackTrace(); + } + historyEntity.setPaymentState("待转付"); + historyEntity.setPaymentStateKey("001"); + } + } else { + try { + Date collDate = sdf.parse(finalConfirmation.getCollectionDate()); + historyEntity.setActualDate(collDate); + if (planDetails.getDueDate().compareTo(collDate) > 0) { + //未逾期 + Calendar cal_1 = Calendar.getInstance();// 使用默认时区和语言环境获得一个日历 + cal_1.setTime(planDetails.getDueDate()); + cal_1.add(Calendar.DAY_OF_MONTH, -1); + historyEntity.setPrepareDate(cal_1.getTime()); + } else { + //已逾期 + historyEntity.setPrepareDate(new DateTime()); + } + } catch (ParseException e) { + e.printStackTrace(); + } + historyEntity.setPaymentState("待转付"); + historyEntity.setPaymentStateKey("001"); + } + loanRepaymentHistoryFeign.saveHistoryByEntity(historyEntity); + } + if (v.getReceivablesName().equals("资方逾期利息")) { + if (null != planDetails.getPaymentInterest()) { + if (planDetails.getPaymentInterest().compareTo(BigDecimal.ZERO) == 1) { + BigDecimal paymentInterest = planDetails.getPaymentInterest(); + String subscriptionMoney = v.getSubscriptionMoney(); + BigDecimal subtract = paymentInterest.subtract(new BigDecimal(subscriptionMoney)); + planDetails.setPaymentInterest(subtract); + BigDecimal paymentMoney = planDetails.getPaymentMoney(); + BigDecimal subtract2 = paymentMoney.subtract(new BigDecimal(subscriptionMoney)); + planDetails.setPaymentMoney(subtract2); + loanRepaymentPlanDetailsFeign.updateByEntity(planDetails); + String orderSid = planDetails.getSalesOrderSid(); + String isOther = loanRepaymentScheduleFeign.returnBankOrOtherBankByPlanSid(planSid).getData(); + String bankSid = ""; + String scheduleSid = planDetails.getScheduleSid(); + LoanRepaymentSchedule schedule = loanRepaymentScheduleFeign.fetchBySid(scheduleSid).getData(); + if (isOther.equals("0")) { + if (StringUtils.isNotBlank(schedule.getBankSid())) { + bankSid = schedule.getBankSid(); + } + } else if (isOther.equals("1")) { + if (StringUtils.isNotBlank(schedule.getOtherBankSid())) { + bankSid = schedule.getOtherBankSid(); + } + } + ResultBean bankResultBean = loanFinBankFeign.fetchEntityBySid(bankSid); + if (bankResultBean.getData() != null) { + LoanFinBank loanFinBank = bankResultBean.getData(); + if (null != loanFinBank.getReAdvances()) { + if (loanFinBank.getReAdvances() == 1) { + FinUncollectedReceivablesDetailedJR jr = new FinUncollectedReceivablesDetailedJR(); + jr.setCreateBySid(userSid); + SysUserVo userVo = sysUserFeign.fetchBySid(userSid).getData(); + 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()); + jr.setUseOrgName(planDetails.getUseOrgName()); + jr.setUseOrgSid(planDetails.getUseOrgSid()); + jr.setStaffDeptName(planDetails.getDept()); + jr.setStaffName(planDetails.getStaffName()); + jr.setStaffDeptSid(planDetails.getDeptSid()); + jr.setStaffUserSid(planDetails.getSalesUserSid()); + finUncollectedReceivablesDetailedJRService.insert(jr); + } + } + } + } + } + } + } + //推送间还月还收款凭证 + CollectionVoucher.CollectionVoucherDetail d = getDueMoneyAndOverDueMoneyVoucher(v, collectionDate); + voucherDetails.add(d); + } + //认资金占用费消减平台资金占用费 + if (v.getReceivablesName().equals("资金占用费")) { + if (null != planDetails) { + LoanPlanDetailsVoForFundVoucher f = loanRepaymentPlanDetailsFeign.getLoanPlanDetailsVoForFundVoucher(planDetails.getBusVinSid()); + if (null != f) { + List g = getFundGenralVoucher(planDetails, f); + if (!g.isEmpty()) { + g.stream().forEach(gv -> { + generalVoucherDetails.add(gv); + }); + } + LoanPushFundHistory loanPushFundHistory = new LoanPushFundHistory(); + if (null != f.getDuePushMoney()) { + loanPushFundHistory.setFund(f.getDuePushMoney()); + } + loanPushFundHistory.setBusVinSid(planDetails.getBusVinSid()); + loanPushFundHistory.setUseOrgName(planDetails.getUseOrgName()); + loanPushFundHistory.setUseOrgSid(planDetails.getUseOrgSid()); + String lastTimes = loanPushFundHistoryFeign.getLastDateByBusVinSid(planDetails.getBusVinSid()).getData(); + if (StringUtils.isNotBlank(lastTimes)) { + try { + loanPushFundHistory.setLastAccrualDate(sdfTimes.parse(lastTimes)); + } catch (ParseException e) { + e.printStackTrace(); + } + } + loanPushFundHistoryFeign.saveHistoryByEntity(loanPushFundHistory); +// fundHistoryList.add(loanPushFundHistory); + } + //推送资金占用费出纳确认后 + CollectionVoucher.CollectionVoucherDetail d = getFundVoucher(v, collectionDate, planDetails); + if (null != d) { + CollectionVoucher.CollectionVoucherDetail v1 = new CollectionVoucher.CollectionVoucherDetail(); + BeanUtil.copyProperties(d, v1); + v1.setSceneCode(SceneCodeEnum.FUND_VOUCHER1.getCode()); + voucherDetails.add(v1); + CollectionVoucher.CollectionVoucherDetail v2 = new CollectionVoucher.CollectionVoucherDetail(); + BeanUtil.copyProperties(d, v2); + v2.setSceneCode(SceneCodeEnum.FUND_VOUCHER2.getCode()); + collectionAfterVoucherDetails.add(v2); + } + } + } + //认名义价、合同违约金、其他费用收款 + if (v.getReceivablesName().equals("名义价") || + v.getReceivablesName().equals("合同违约金") || + v.getReceivablesName().equals("其他费用") || + v.getReceivablesName().equals("结清时资方逾期利息") + ) { + CollectionVoucher.CollectionVoucherDetail d = getBalanceMoneyVoucher(v, collectionDate); + voucherDetails.add(d); + } + } + }); //查询该申请已认款金额总数 subscriptionMoneyAll = finSelectedReceivablesDetailedVos.stream().map(FinSelectedReceivablesDetailedVo::getSubscriptionMoney).map(BigDecimal::new).reduce(BigDecimal.ZERO, BigDecimal::add); @@ -4688,7 +4686,20 @@ public class FinCollectionConfirmationService extends MybatisBaseService(1024), namedThreadFactory, new java.util.concurrent.ThreadPoolExecutor.AbortPolicy()); + FinCollectionConfirmation finalConfirmation1 = confirmation; + Future future1 = pool.submit(() -> { + pushToRiskToFin(finalConfirmation1, finSelectedReceivablesDetailedVos, collectionDate, voucher); + }); + } catch (Exception e) { + e.printStackTrace(); + } + //推送凭证业务 if (!generalVoucherDetails.isEmpty()) { generalVoucher.setVoucherDetails(generalVoucherDetails); @@ -4729,8 +4740,17 @@ public class FinCollectionConfirmationService extends MybatisBaseService
- +
diff --git a/anrui-riskcenter-ui/src/views/secondarysublet/secondarysublet.vue b/anrui-riskcenter-ui/src/views/secondarysublet/secondarysublet.vue index b257f35543..e84dd90c3e 100644 --- a/anrui-riskcenter-ui/src/views/secondarysublet/secondarysublet.vue +++ b/anrui-riskcenter-ui/src/views/secondarysublet/secondarysublet.vue @@ -200,7 +200,7 @@
- +
diff --git a/anrui-riskcenter-ui/src/views/surrenderforredemption/surrenderforredemption.vue b/anrui-riskcenter-ui/src/views/surrenderforredemption/surrenderforredemption.vue index 9264de8bca..39bd18cac2 100644 --- a/anrui-riskcenter-ui/src/views/surrenderforredemption/surrenderforredemption.vue +++ b/anrui-riskcenter-ui/src/views/surrenderforredemption/surrenderforredemption.vue @@ -192,7 +192,7 @@
- +
diff --git a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansecondarysalesapply/LoanSecondarySalesApplyFeign.java b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansecondarysalesapply/LoanSecondarySalesApplyFeign.java index 6bc44536be..049ac05727 100644 --- a/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansecondarysalesapply/LoanSecondarySalesApplyFeign.java +++ b/anrui-riskcenter/anrui-riskcenter-api/src/main/java/com/yxt/anrui/riskcenter/api/loansecondarysalesapply/LoanSecondarySalesApplyFeign.java @@ -56,6 +56,10 @@ public interface LoanSecondarySalesApplyFeign { @GetMapping(value = "/getNextNodesForSubmit") ResultBean> getNextNodesForSubmit(@Valid @SpringQueryMap LoanSecondarySalesApplyNodeQuery query); + @ApiOperation(value = "获取下一个环节") + @GetMapping(value = "/getAppNextNodesForSubmit") + ResultBean> getAppNextNodesForSubmit(@Valid @SpringQueryMap LoanSecondarySalesApplyNodeQuery query); + @ApiOperation(value = "驳回任务") @PostMapping(value = "/reject") public ResultBean taskReject(@Valid @RequestBody LoanSecondarySalesApplyTaskQuery query); diff --git a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanredemptionapply/LoanRedemptionApplyService.java b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanredemptionapply/LoanRedemptionApplyService.java index 3e9aea7fac..e4cc74efb5 100644 --- a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanredemptionapply/LoanRedemptionApplyService.java +++ b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loanredemptionapply/LoanRedemptionApplyService.java @@ -899,8 +899,8 @@ public class LoanRedemptionApplyService extends MybatisBaseService> getAppNextNodesForSubmit(LoanSecondarySalesApplyNodeQuery query) { + return loanSecondarySalesApplyService.getAppNextNodesForSubmit(query); + } + @Override public ResultBean taskReject(LoanSecondarySalesApplyTaskQuery query) { return loanSecondarySalesApplyService.taskReject(query); diff --git a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalesapply/LoanSecondarySalesApplyService.java b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalesapply/LoanSecondarySalesApplyService.java index eb4da94ce9..a239c24489 100644 --- a/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalesapply/LoanSecondarySalesApplyService.java +++ b/anrui-riskcenter/anrui-riskcenter-biz/src/main/java/com/yxt/anrui/riskcenter/biz/loansecondarysalesapply/LoanSecondarySalesApplyService.java @@ -307,6 +307,23 @@ public class LoanSecondarySalesApplyService extends MybatisBaseService> getAppNextNodesForSubmit(LoanSecondarySalesApplyNodeQuery query) { + ResultBean> rb = ResultBean.fireFail(); + BusinessVariables bv = new BusinessVariables(); + BeanUtil.copyProperties(query, bv); + LoanSecondarySalesApply loanSecondarySalesApply = fetchBySid(query.getBusinessSid()); + bv.setModelId(loanSecondarySalesApply.getProcDefId()); + Map variables = new HashMap<>(); + Map appMap = new HashMap<>(); + appMap.put("sid", query.getBusinessSid()); + variables.put("app", appMap); + bv.setFormVariables(variables); + ResultBean>> resultBean = flowTaskFeign.getNextNodesForSubmit(bv); + //判断数组是否为空,若为空则赋值,若不为空,则遍历循环将map中的数据赋值给TemplateApplyNodeVo + List voList = Optional.ofNullable(resultBean.getData()).orElse(new ArrayList<>()).stream().map(m -> JSON.parseObject(JSON.toJSONString(m), LoanSecondarySalesApplyNodeVo.class)).collect(Collectors.toList()); + return rb.success().setData(voList); + } + public ResultBean taskReject(LoanSecondarySalesApplyTaskQuery query) { ResultBean rb = ResultBean.fireFail(); String businessSid = query.getBusinessSid(); @@ -586,69 +603,107 @@ public class LoanSecondarySalesApplyService extends MybatisBaseService stringResultBean = messageFeign.pushMessage(messageFlowableQuery); + try { + ThreadFactory namedThreadFactory = new ThreadFactoryBuilder() + .setNameFormat("demo-pool-%d").build(); + ExecutorService pool = new ThreadPoolExecutor(2, 100, + 0L, TimeUnit.MILLISECONDS, + new LinkedBlockingQueue(1024), namedThreadFactory, new ThreadPoolExecutor.AbortPolicy()); + LoanSecondarySalesApply finalLoanSecondarySalesApply = loanSecondarySalesApply; + Future future1 = pool.submit(() -> { + //极光推送 + MessageFlowableQuery messageFlowableQuery = new MessageFlowableQuery(); + MessageFlowVo messageFlowVo = new MessageFlowVo(); + BeanUtil.copyProperties(ufVo, messageFlowVo); + messageFlowVo.setProcDefId(finalLoanSecondarySalesApply.getProcDefId()); + messageFlowVo.setProcInsId(finalLoanSecondarySalesApply.getProcInstId()); + messageFlowableQuery.setUfVo(messageFlowVo); + messageFlowableQuery.setAppMap(appMap); + messageFlowableQuery.setBusinessSid(businessSid); + messageFlowableQuery.setModuleName("交回车辆二次销售申请"); + messageFlowableQuery.setMsgContent(finalLoanSecondarySalesApply.getCreateByName() + "提交的" + messageFlowableQuery.getModuleName() + ",请审批"); + messageFlowableQuery.setMsgTitle("交回车辆二次销售申请"); + ResultBean stringResultBean = messageFeign.pushMessage(messageFlowableQuery); + }); + } catch (Exception e) { + e.printStackTrace(); + } } return rb.success().setData(resultBean.getData()); } else { diff --git a/anrui-scm/anrui-scm-ui/src/api/statement/rebateType.js b/anrui-scm/anrui-scm-ui/src/api/statement/rebateType.js new file mode 100644 index 0000000000..fa3823c0e3 --- /dev/null +++ b/anrui-scm/anrui-scm-ui/src/api/statement/rebateType.js @@ -0,0 +1,20 @@ +import request from '@/utils/request' + +export default { + // 查询分页列表 + listPage: function(data) { + return request({ + url: '/scm/v1/scmvehrebate/typeStatistics', + method: 'post', + data: data, + headers: { 'Content-Type': 'application/json' } + }) + }, + getTypeDetail: function(data) { + return request({ + url: '/scm/v1/scmvehrebate/getTypeDetail', + method: 'post', + params: data + }) + } +} diff --git a/anrui-scm/anrui-scm-ui/src/router/modules/codemenu.js b/anrui-scm/anrui-scm-ui/src/router/modules/codemenu.js index 4498cb421c..fb87fcf0eb 100644 --- a/anrui-scm/anrui-scm-ui/src/router/modules/codemenu.js +++ b/anrui-scm/anrui-scm-ui/src/router/modules/codemenu.js @@ -1100,6 +1100,15 @@ const codemenu = [{ title: '单车返利统计', noCache: true } + }, + { + path: '/statement/rebateType', + component: () => import('@/views/statement/rebateType/rebateTypeByDetail.vue'), + name: 'RebateTypeByDetail', + meta: { + title: '厂家返利类型', + noCache: true + } } // { // path: '/statement/rebateSummary', diff --git a/anrui-scm/anrui-scm-ui/src/views/statement/rebateSummary/rebateTypeDetails.vue b/anrui-scm/anrui-scm-ui/src/views/statement/rebateSummary/rebateTypeDetails.vue new file mode 100644 index 0000000000..01c6644d88 --- /dev/null +++ b/anrui-scm/anrui-scm-ui/src/views/statement/rebateSummary/rebateTypeDetails.vue @@ -0,0 +1,117 @@ + + + + diff --git a/anrui-scm/anrui-scm-ui/src/views/statement/rebateType/rebateNameByDetail.vue b/anrui-scm/anrui-scm-ui/src/views/statement/rebateType/rebateNameByDetail.vue new file mode 100644 index 0000000000..98e43ab59a --- /dev/null +++ b/anrui-scm/anrui-scm-ui/src/views/statement/rebateType/rebateNameByDetail.vue @@ -0,0 +1,103 @@ + + + + + diff --git a/anrui-scm/anrui-scm-ui/src/views/statement/rebateType/rebateTypeByDetail.vue b/anrui-scm/anrui-scm-ui/src/views/statement/rebateType/rebateTypeByDetail.vue new file mode 100644 index 0000000000..f5c0e86670 --- /dev/null +++ b/anrui-scm/anrui-scm-ui/src/views/statement/rebateType/rebateTypeByDetail.vue @@ -0,0 +1,246 @@ + + + + diff --git a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/arrearsTakeCar/AppBusArrearsCarryVehicleApplyService.java b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/arrearsTakeCar/AppBusArrearsCarryVehicleApplyService.java index 41612f594c..a4ad509e3a 100644 --- a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/arrearsTakeCar/AppBusArrearsCarryVehicleApplyService.java +++ b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/arrearsTakeCar/AppBusArrearsCarryVehicleApplyService.java @@ -279,24 +279,12 @@ public class AppBusArrearsCarryVehicleApplyService { GetNodeQuery getNodeQuery = new GetNodeQuery(); BeanUtil.copyProperties(query, getNodeQuery); String data = ""; - if (next == 0) { - ResultBean> getPreviousNodesForReject = busArrearsCarryVehicleApplyFeign.getPreviousNodesForReject(getNodeQuery); - if (getPreviousNodesForReject.getSuccess()) { - getPreviousNodesForReject.getData().removeAll(Collections.singleton(null)); - data = getPreviousNodesForReject.getData().get(0).getName(); - } else { - return rb.setMsg(getPreviousNodesForReject.getMsg()); - } - } else if (next == 1) { - ResultBean> getNextNodesForSubmit = busArrearsCarryVehicleApplyFeign.getNextNodesForSubmit(getNodeQuery); - if (getNextNodesForSubmit.getSuccess()) { - getNextNodesForSubmit.getData().removeAll(Collections.singleton(null)); - data = getNextNodesForSubmit.getData().get(0).getName(); - } else { - return rb.setMsg(getNextNodesForSubmit.getMsg()); - } + ResultBean> getNextNodesForSubmit = busArrearsCarryVehicleApplyFeign.getNextNodesForSubmit(getNodeQuery); + if (getNextNodesForSubmit.getSuccess()) { + getNextNodesForSubmit.getData().removeAll(Collections.singleton(null)); + data = getNextNodesForSubmit.getData().get(0).getName(); } else { - return rb.setMsg("参数错误:next"); + return rb.setMsg(getNextNodesForSubmit.getMsg()); } arrearsVo.setTitle(data); ResultBean details = details(query.getBusinessSid()); diff --git a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/secondarysales/SecondarySalesService.java b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/secondarysales/SecondarySalesService.java index e74c9f1e15..4540b1fdcb 100644 --- a/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/secondarysales/SecondarySalesService.java +++ b/anrui-terminal/anrui-terminal-biz/src/main/java/com/yxt/anrui/terminal/biz/risk/secondarysales/SecondarySalesService.java @@ -212,29 +212,16 @@ public class SecondarySalesService { public ResultBean getFlowOperateTitleBy(SecondarySalesQuery query) { ResultBean rb = ResultBean.fireFail(); SecondSalesInitVo secondSalesInitVo = new SecondSalesInitVo(); - int next = query.getNext(); LoanSecondarySalesApplyNodeQuery getNodeQuery = new LoanSecondarySalesApplyNodeQuery(); BeanUtil.copyProperties(query, getNodeQuery); - String data = ""; - if (next == 0) { - ResultBean> getPreviousNodesForReject = loanSecondarySalesApplyFeign.getPreviousNodesForReject(getNodeQuery); - if (getPreviousNodesForReject.getSuccess()) { - getPreviousNodesForReject.getData().removeAll(Collections.singleton(null)); - data = getPreviousNodesForReject.getData().get(0).getName(); - } else { - return rb.setMsg(getPreviousNodesForReject.getMsg()); - } - } else if (next == 1) { - ResultBean> getNextNodesForSubmit = loanSecondarySalesApplyFeign.getNextNodesForSubmit(getNodeQuery); - if (getNextNodesForSubmit.getSuccess()) { - getNextNodesForSubmit.getData().removeAll(Collections.singleton(null)); - data = getNextNodesForSubmit.getData().get(0).getName(); - } else { - return rb.setMsg(getNextNodesForSubmit.getMsg()); - } + String data = "风控中心风控部经理审批/结束"; + /*ResultBean> getNextNodesForSubmit = loanSecondarySalesApplyFeign.getAppNextNodesForSubmit(getNodeQuery); + if (getNextNodesForSubmit.getSuccess()) { + getNextNodesForSubmit.getData().removeAll(Collections.singleton(null)); + data = getNextNodesForSubmit.getData().get(0).getName(); } else { - return rb.setMsg("参数错误:next"); - } + return rb.setMsg(getNextNodesForSubmit.getMsg()); + }*/ secondSalesInitVo.setTitle(data); List itemEditTextInfos = new ArrayList<>(); ItemEditTextInfoCommon itemEditTextInfo = new ItemEditTextInfoCommon();