fix:订舱通知单是否信保合同功能完善
This commit is contained in:
parent
84b4d935fe
commit
d9ef332698
@ -23,18 +23,21 @@ public class StorageTransSubmitValid extends AbstractValidator {
|
||||
for (ExtendedDataEntity dataes : dataEntities) {
|
||||
DynamicObject dataEntitie = dataes.getDataEntity();
|
||||
dataEntitie = BusinessDataServiceHelper.loadSingle(dataEntitie.getPkValue(), dataEntitie.getDynamicObjectType().getName());
|
||||
DynamicObjectCollection creditDetails = dataEntitie.getDynamicObjectCollection("yem_creditdetail");
|
||||
DynamicObject customer = dataEntitie.getDynamicObject("yem_customer");
|
||||
DynamicObject method = TotalUtil.getSettlementMethod(dataEntitie);
|
||||
DynamicObject company = dataEntitie.getDynamicObject("yem_company.yem_erporg");
|
||||
String swiftCode = TotalUtil.getSwiftCode(dataEntitie);
|
||||
DynamicObject csrCreditLine = TotalUtil.getCsrCreditLine(customer, method, company, swiftCode);
|
||||
if (YEM.isNotEmpty(customer) && YEM.isNotEmpty(csrCreditLine)) {
|
||||
BigDecimal decimal = CreditBackFillUtils.calcRemainingAmount(csrCreditLine);
|
||||
if (decimal.compareTo(dataEntitie.getBigDecimal("yem_usacreditamt")) < 0) {
|
||||
this.addMessage(dataes, "当前客户对应的信保额度申请剩余额度小于0,请确认!");
|
||||
if (!creditDetails.isEmpty()) {
|
||||
if (YEM.isNotEmpty(customer) && YEM.isNotEmpty(csrCreditLine)) {
|
||||
BigDecimal decimal = CreditBackFillUtils.calcRemainingAmount(csrCreditLine);
|
||||
if (decimal.compareTo(dataEntitie.getBigDecimal("yem_usacreditamt")) < 0) {
|
||||
this.addMessage(dataes, "当前客户对应的信保额度申请剩余额度小于0,请确认!");
|
||||
}
|
||||
} else {
|
||||
this.addMessage(dataes, "找不到客户:" + customer.getString("name") + "的客户信保额度申请单");
|
||||
}
|
||||
} else {
|
||||
this.addMessage(dataes, "找不到客户:" + customer.getString("name") + "的客户信保额度申请单");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user