parent
							
								
									5571bfd3bb
								
							
						
					
					
						commit
						948b6a0372
					
				| 
						 | 
				
			
			@ -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<Long, BigDecimal> letterCreditMap = GuaranteeContractHelper.getLetterCreditMap(gcUseBills);
 | 
			
		||||
                Map<Long, BigDecimal> 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);
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue