From 948b6a0372290b2a13c191b157dde7f14fe5be2e Mon Sep 17 00:00:00 2001 From: chenshaoxin <1981897232@qq.com> Date: Wed, 4 Jun 2025 15:48:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BA=BA=EF=BC=9A=E9=99=88?= =?UTF-8?q?=E7=BB=8D=E9=91=AB=20=E6=97=A5=E6=9C=9F=EF=BC=9A2025/6/4=2012?= =?UTF-8?q?=EF=BC=9A30=20=E5=86=85=E5=AE=B9:=E6=8B=85=E4=BF=9D=E5=90=88?= =?UTF-8?q?=E5=90=8C=E5=88=97=E8=A1=A8=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sys/sys/plugin/list/guaranteecontListPlugin.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/list/guaranteecontListPlugin.java b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/list/guaranteecontListPlugin.java index 3446da7..7cae6ae 100644 --- a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/list/guaranteecontListPlugin.java +++ b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/list/guaranteecontListPlugin.java @@ -10,6 +10,7 @@ import kd.bos.orm.query.QFilter; import kd.bos.servicehelper.BusinessDataServiceHelper; import kd.bos.servicehelper.QueryServiceHelper; import kd.tmc.fbp.common.constant.Constants; +import kd.tmc.fbp.common.enums.BillStatusEnum; import kd.tmc.fbp.common.helper.GuaranteeUseHelper; import kd.tmc.fbp.common.helper.TmcBusinessBaseHelper; import kd.tmc.fbp.common.helper.TmcDataServiceHelper; @@ -18,6 +19,7 @@ import kd.tmc.gm.common.helper.GuaranteeContractHelper; import java.math.BigDecimal; import java.math.RoundingMode; +import java.text.DecimalFormat; import java.util.Arrays; import java.util.HashMap; import java.util.Map; @@ -35,6 +37,7 @@ public class guaranteecontListPlugin extends AbstractListPlugin { DynamicObject gContractCcy = e.getRowData().getDynamicObject("currency"); Long gContractCcyId = (Long)gContractCcy.getPkValue(); QFilter gQF = new QFilter("gcontract.id", "=", id); + gQF.and("billstatus", "=", BillStatusEnum.AUDIT.getValue()); DynamicObjectCollection gcUseBills = QueryServiceHelper.query("gm_guaranteeuse", String.join(",", gcProps), gQF.toArray()); Map letterCreditMap = GuaranteeContractHelper.getLetterCreditMap(gcUseBills); Map loanBillMap = GuaranteeContractHelper.getLoanBillMap(gcUseBills); @@ -46,7 +49,8 @@ public class guaranteecontListPlugin extends AbstractListPlugin { BigDecimal debtBalance = gcBIll.getBigDecimal("gdebtbalance"); if ("lc_lettercredit".equals(gcBIll.get("gsrcbilltype")) && EmptyUtil.isNoEmpty((BigDecimal)letterCreditMap.get(gcBIll.getLong("gsrcbillid")))) { debtBalance = ((BigDecimal)letterCreditMap.get(gcBIll.getLong("gsrcbillid"))).multiply(gcBIll.getBigDecimal("gratio")).divide(Constants.ONE_HUNDRED, 4, RoundingMode.HALF_UP); - } else if (Arrays.asList("cfm_loanbill_b_l", "cfm_loanbill_e_l", "cfm_loanbill", "cim_invest_loanbill").contains(gcBIll.get("gsrcbilltype")) && EmptyUtil.isNoEmpty((BigDecimal)loanBillMap.get(gcBIll.getLong("gsrcbillid")))) { + } + else if (Arrays.asList("cfm_loanbill_b_l", "cfm_loanbill_e_l", "cfm_loanbill", "cim_invest_loanbill").contains(gcBIll.get("gsrcbilltype")) && EmptyUtil.isNoEmpty((BigDecimal)loanBillMap.get(gcBIll.getLong("gsrcbillid")))) { debtBalance = ((BigDecimal)loanBillMap.get(gcBIll.getLong("gsrcbillid"))).multiply(gcBIll.getBigDecimal("gratio")).divide(Constants.ONE_HUNDRED, 4, RoundingMode.HALF_UP); } Long debtBillCcy = gcBIll.getLong("gdebtcurrency"); @@ -58,7 +62,9 @@ public class guaranteecontListPlugin extends AbstractListPlugin { } } } - e.setFormatValue(sumOfBal); + DecimalFormat df = new DecimalFormat("¥#,##0.00"); + String formattedAmount = df.format(sumOfBal); + e.setFormatValue(formattedAmount); } } }