From fe40c1cae33386984a98ae203de0bb45a16472eb Mon Sep 17 00:00:00 2001 From: dimengzhe Date: Mon, 19 May 2025 14:34:09 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FinCollectionConfirmationService.java | 138 +++++++++++++++++- 1 file changed, 135 insertions(+), 3 deletions(-) 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 06735cc141..25161788d2 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 @@ -4724,8 +4724,12 @@ public class FinCollectionConfirmationService extends MybatisBaseService list = new ArrayList<>(); List list2 = new ArrayList<>(); + List list3 = new ArrayList<>(); + List list4 = new ArrayList<>(); BigDecimal all = BigDecimal.ZERO;//赎回 BigDecimal all2 = BigDecimal.ZERO;//二次销售 + BigDecimal all3 = BigDecimal.ZERO;//亏损立案 + BigDecimal all4 = BigDecimal.ZERO;//亏损立案 BigDecimal otherMoney = BigDecimal.ZERO; String payType = ""; DictCommonVo dictCommonVo = dictCommonFeign.selectBykey(finalConfirmation.getCollectionTypeKey(), "payVoucherType").getData(); @@ -5243,7 +5247,7 @@ public class FinCollectionConfirmationService extends MybatisBaseService 0) { + Voucher.VoucherResultDetailDto voucherResultDetailDtoJf = new Voucher.VoucherResultDetailDto(); + if (StringUtils.isNotBlank(finalConfirmation.getCollectionBankNum())) { + voucherResultDetailDtoJf.setBankAccount(finalConfirmation.getCollectionBankNum()); + } + voucherResultDetailDtoJf.setSubjectNo(payType); + voucherResultDetailDtoJf.setSummary("收款" +finalConfirmation.getPayerName()+ "(" + collectionDate + ")"); + voucherResultDetailDtoJf.setDebit(String.valueOf(all3)); + list3.add(voucherResultDetailDtoJf); + } - if (!list.isEmpty()) { + if (all4.compareTo(BigDecimal.ZERO) > 0) { + Voucher.VoucherResultDetailDto voucherResultDetailDtoJf = new Voucher.VoucherResultDetailDto(); + if (StringUtils.isNotBlank(finalConfirmation.getCollectionBankNum())) { + voucherResultDetailDtoJf.setBankAccount(finalConfirmation.getCollectionBankNum()); + } + voucherResultDetailDtoJf.setSubjectNo(payType); + voucherResultDetailDtoJf.setSummary("收款" +finalConfirmation.getPayerName()+ "(" + collectionDate + ")"); + voucherResultDetailDtoJf.setDebit(String.valueOf(all3)); + list4.add(voucherResultDetailDtoJf); + } + + + if (!list.isEmpty()) {//赎回收款(风控状态赎回中以及交回推送) voucher.setResultDetails(list); finKingDeeFeignRest.saveVoucher(voucher); } - if (!list2.isEmpty()) { + if (!list2.isEmpty()) {//二次销售收款 voucher.setResultDetails(list2); finKingDeeFeignRest.saveVoucher(voucher); } + if(!list3.isEmpty()){//诉讼后法院认款 + voucher.setResultDetails(list3); + finKingDeeFeignRest.saveVoucher(voucher); + } + if(!list4.isEmpty()){//执行后法院认款 + voucher.setResultDetails(list4); + finKingDeeFeignRest.saveVoucher(voucher); + } } private List getAll(FinCollectionConfirmation finalConfirmation, FinSelectedReceivablesDetailedVo v, String collectionDate) { From bf0947da8596bd222dab2dfcf8af540ef7600bfa Mon Sep 17 00:00:00 2001 From: dimengzhe Date: Mon, 19 May 2025 15:28:06 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FinCollectionConfirmationService.java | 116 ------------------ 1 file changed, 116 deletions(-) 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 25161788d2..28a16f49ab 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 @@ -5452,122 +5452,6 @@ public class FinCollectionConfirmationService extends MybatisBaseService getAll(FinCollectionConfirmation finalConfirmation, FinSelectedReceivablesDetailedVo v, String collectionDate) { - List list = new ArrayList<>(); - FinUncollectedReceivablesDetailed finUncollectedReceivablesDetailed = finUncollectedReceivablesDetailedService.fetchBySid(v.getReceivablesSid()); - SysOrganizationVo deptVo = sysOrganizationFeign.fetchBySid(finalConfirmation.getCreateDeptSid()).getData(); - BusSalesOrderVehicle busSalesOrderVehicle = busSalesOrderVehicleFeign.details(finUncollectedReceivablesDetailed.getBusVinSid()).getData(); - String customerNumber = ""; - BusSalesOrder salesOrder = busSalesOrderFeign.fetchBySid(busSalesOrderVehicle.getSalesOrderSid()).getData(); - if (salesOrder != null && busSalesOrderVehicle != null) { - //判断财务系统是否有客户 - Boolean aBoolean = finKingDeeService.customerExistState(busSalesOrderVehicle.getTemporaryNo()).getData(); - String linkNo = ""; - BusSalesOrderBorrowerDetailsVo borrowerDetailsVo = busSalesOrderBorrowerFeign.fetchDetailsBySid(busSalesOrderVehicle.getBorrowerSid()).getData(); - if (!aBoolean) { - BdCustomer bdCustomer = new BdCustomer(); - bdCustomer.setFNumber(busSalesOrderVehicle.getTemporaryNo()); - bdCustomer.setFShortName(salesOrder.getContractNo()); - if (StringUtils.isNotBlank(salesOrder.getPurchaseSystemSid())) { - BasePurchaseSystemDetailsVo data = basePurchaseSystemFeign.fetchDetailsByDeptSid(salesOrder.getPurchaseSystemSid()).getData(); - bdCustomer.setTOrgIds(data.getOrgCode()); - } - bdCustomer.setTOrgIds(deptVo.getOrgCode()); - if (StringUtils.isNotBlank(busSalesOrderVehicle.getLinkNo())) { - String vinNo = busSalesOrderVehicle.getLinkNo(); - if (vinNo.length() > 8) { - linkNo = vinNo.substring(vinNo.length() - 8); - } else { - linkNo = busSalesOrderVehicle.getLinkNo(); - } - if (null != borrowerDetailsVo) { - bdCustomer.setFName(borrowerDetailsVo.getBorrowerName() + linkNo); - } - } else { - if (null != borrowerDetailsVo) { - bdCustomer.setFName(borrowerDetailsVo.getBorrowerName() + busSalesOrderVehicle.getTemporaryNo()); - } - } - ResultBean resultBean = finKingDeeFeignRest.draftBdCustomer(bdCustomer); - if (resultBean.getSuccess()) { - customerNumber = bdCustomer.getFNumber(); - } - } else { - customerNumber = busSalesOrderVehicle.getTemporaryNo(); - } - } - Voucher.VoucherResultDetailDto voucherResultDetailDtoJf = new Voucher.VoucherResultDetailDto(); - Voucher.VoucherResultDetailDto voucherResultDetailDtoJf2 = new Voucher.VoucherResultDetailDto(); - //贷方 - Voucher.VoucherResultDetailDto voucherResultDetailDtoDf = new Voucher.VoucherResultDetailDto(); - Voucher.VoucherResultDetailDto voucherResultDetailDtoDf2 = new Voucher.VoucherResultDetailDto(); - Voucher.VoucherResultDetailDto voucherResultDetailDtoDf3 = new Voucher.VoucherResultDetailDto(); - String payType = ""; - DictCommonVo dictCommonVo = dictCommonFeign.selectBykey(finalConfirmation.getCollectionTypeKey(), "payVoucherType").getData(); - if (null != dictCommonVo) { - SysMappingListInfoQuery query = new SysMappingListInfoQuery(); - query.setDictSid(dictCommonVo.getSid()); - List data = sysMappingFeign.selectMappingListInfo(query).getData(); - if (!data.isEmpty()) { - SysMappingInfoVo sysMappingInfoVo = data.get(0); - payType = sysMappingInfoVo.getMap_itemKey(); - } - } - //--收款-赎回款(yyyy-MM-dd) - BigDecimal all = new BigDecimal(v.getSubscriptionMoney()); - if (all.compareTo(BigDecimal.ZERO) != 0) { - voucherResultDetailDtoJf.setSummary("收款-赎回款" + "(" + collectionDate + ")"); - voucherResultDetailDtoJf.setSubjectNo(payType); - voucherResultDetailDtoJf.setBankAccount(finalConfirmation.getCollectionBankNum()); - voucherResultDetailDtoJf.setDebit(all.toString()); - list.add(voucherResultDetailDtoJf); - } - //-----出纳收款确认后-资金占用费 - AlrepaidAndArrVo alrepaidAndArrVo = loanRestoreReportApplyFeign.getAlrepaidAndArr2(finUncollectedReceivablesDetailed.getBusVinSid()).getData(); - BigDecimal zjzyfMoney = BigDecimal.ZERO; - String zjzyf = alrepaidAndArrVo.getWheFundOccMoney(); - zjzyfMoney = new BigDecimal(StringUtils.isBlank(zjzyf) ? "0" : zjzyf); - if (zjzyfMoney.compareTo(BigDecimal.ZERO) != 0) { - voucherResultDetailDtoDf.setSummary("收款-赎回款"); - voucherResultDetailDtoDf.setSubjectNo("1201.02.03"); - //核算部门 - voucherResultDetailDtoDf.setDimensionDept(deptVo.getOrgCode()); - //核算客户 - voucherResultDetailDtoDf.setDimensionCustom(customerNumber); - voucherResultDetailDtoDf.setCredit(zjzyfMoney.toString()); - list.add(voucherResultDetailDtoDf); - voucherResultDetailDtoJf2.setSummary("资金占用费转收入"); - voucherResultDetailDtoJf2.setSubjectNo("2191.05.00"); - //核算部门 - voucherResultDetailDtoJf2.setDimensionDept(deptVo.getOrgCode()); - //核算客户 - voucherResultDetailDtoJf2.setDimensionCustom(customerNumber); - voucherResultDetailDtoJf2.setCredit(zjzyfMoney.toString()); - list.add(voucherResultDetailDtoJf2); - voucherResultDetailDtoDf3.setSummary("资金占用费转收入"); - voucherResultDetailDtoDf3.setSubjectNo("6002.01.17"); - //核算部门 - voucherResultDetailDtoDf3.setDimensionDept(deptVo.getOrgCode()); - //核算客户 - voucherResultDetailDtoDf3.setDimensionCustom(customerNumber); - voucherResultDetailDtoDf3.setCredit(zjzyfMoney.toString()); - list.add(voucherResultDetailDtoDf3); - } - BigDecimal allM = BigDecimal.ZERO; - allM = all.subtract(zjzyfMoney); - if (allM.compareTo(BigDecimal.ZERO) > 0) { - voucherResultDetailDtoDf2.setSummary("收款-赎回款"); - voucherResultDetailDtoDf2.setSubjectNo("1201.03.01"); - //核算部门 - voucherResultDetailDtoDf2.setDimensionDept(deptVo.getOrgCode()); - //核算客户 - voucherResultDetailDtoDf2.setDimensionCustom(customerNumber); - voucherResultDetailDtoDf2.setCredit(allM.toString()); - list.add(voucherResultDetailDtoDf2); - } - return list; - } - //名义价其他费用推财务 private CollectionVoucher.CollectionVoucherDetail getBalanceMoneyVoucher(FinSelectedReceivablesDetailedVo v, String collectionDate) { String planSid = "";