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); } } }