fix:获取不为空的利息天数

This commit is contained in:
ljw 2024-09-27 20:37:15 +08:00
parent 039b02891e
commit 94676df392

View File

@ -33,6 +33,7 @@ public class SalesOrderToIntAuditBusaConvert extends AbstractConvertPlugIn {
DynamicObject salesorder = BusinessDataServiceHelper.loadSingle(sourcebilltype, qFilter.toArray());
if (salesorder == null) continue;
fillWithCreditRate(salesorder, dataEntity);
interestdays(salesorder, dataEntity);
DynamicObjectCollection collection = salesorder.getDynamicObjectCollection("yem_es_materialinfo");
for (DynamicObject dynamicObject : collection) {
@ -57,6 +58,7 @@ public class SalesOrderToIntAuditBusaConvert extends AbstractConvertPlugIn {
}
}
/**
* 计算信保费
* 3信保费等于当前行的销售金额*收款计划中的是否信保为是的收汇百分比%*信保费率的累计值
@ -149,4 +151,20 @@ public class SalesOrderToIntAuditBusaConvert extends AbstractConvertPlugIn {
}
dataEntity.set("yem_creditratetext", sb.toString());
}
/**
* 获取不为空的利息天数
* @param salesorder
* @param dataEntity
*/
private void interestdays(DynamicObject salesorder, DynamicObject dataEntity) {
DynamicObjectCollection collection = salesorder.getDynamicObjectCollection("yem_es_salescontrac_s");
BigDecimal yemInterestdays = BigDecimal.ZERO;
for (DynamicObject dynamicObject : collection) {
if (yemInterestdays.compareTo(BigDecimal.ZERO)==0){
yemInterestdays = dynamicObject.getBigDecimal("yem_interestdays");
}
}
dataEntity.set("yem_interestdays",yemInterestdays );
}
}