fix:配件合同費用分攤報錯處理

This commit is contained in:
ljw 2024-09-29 21:53:45 +08:00
parent 8d91b96515
commit f7c690b4f1
2 changed files with 18 additions and 15 deletions

View File

@ -407,8 +407,10 @@ public class SalesOrderPJEdit extends AbstractBillPlugIn implements Plugin, Befo
for (Integer i : seq) { for (Integer i : seq) {
BigDecimal safobamount = (BigDecimal) model.getValue("yem_safobamount", i); BigDecimal safobamount = (BigDecimal) model.getValue("yem_safobamount", i);
BigDecimal calc = BigDecimalUtils.div(safobamount, amount, 12).multiply(sumedamount).setScale(2, RoundingMode.HALF_UP); BigDecimal calc = BigDecimalUtils.div(safobamount, amount, 12).multiply(sumedamount).setScale(2, RoundingMode.HALF_UP);
String yemBilltype = (String) model.getValue("yem_billtype.billno"); DynamicObject yemBilltype = (DynamicObject) model.getValue("yem_billtype");
if (i == seq.size() - 1 && ("yem_es_salesorder_nmpj".equals(yemBilltype)||"yem_es_salesorder_PJ".equals(yemBilltype))) { String number = yemBilltype.getString("number");
if ( ("yem_es_salesorder_nmpj".equals(number)||"yem_es_salesorder_PJ".equals(number))) {
if (i == seq.size() - 1) {
model.setValue("yem_totalamount", sumedamount.subtract(excludeLastRow), i); model.setValue("yem_totalamount", sumedamount.subtract(excludeLastRow), i);
} else { } else {
model.setValue("yem_totalamount", calc, i); model.setValue("yem_totalamount", calc, i);
@ -416,6 +418,7 @@ public class SalesOrderPJEdit extends AbstractBillPlugIn implements Plugin, Befo
} }
} }
} }
}
/** /**
* @description 赋值海运保险费率 * @description 赋值海运保险费率

View File

@ -20,17 +20,17 @@ public class Application {
cosmic.setWebPath("D:/Cosine/Comics_Debug/Comics_YXZG/YXZG-server/webapp"); cosmic.setWebPath("D:/Cosine/Comics_Debug/Comics_YXZG/YXZG-server/webapp");
////152 ////152
cosmic.setClusterNumber("yxzg-topview-dev"); // cosmic.setClusterNumber("yxzg-topview-dev");
cosmic.setTenantNumber("yxzg-topview-dev"); // cosmic.setTenantNumber("yxzg-topview-dev");
cosmic.setServerIP("10.64.112.152"); // cosmic.setServerIP("10.64.112.152");
cosmic.setFileServerPathIPAndPort("", ""); // cosmic.setFileServerPathIPAndPort("", "");
cosmic.setConfigUrl("10.64.112.152:2181", "zookeeper", "Cosmic@5092"); // cosmic.setConfigUrl("10.64.112.152:2181", "zookeeper", "Cosmic@5092");
System.setProperty("mq.debug.queue.tag", "wrxtest"); System.setProperty("mq.debug.queue.tag", "wrxtest");
////134 ////134
// cosmic.setClusterNumber("yxzg-prod"); cosmic.setClusterNumber("yxzg-prod");
// cosmic.setTenantNumber("yxzg-prod"); cosmic.setTenantNumber("yxzg-prod");
// cosmic.setServerIP("10.64.111.134"); cosmic.setServerIP("10.64.111.134");
// cosmic.setConfigUrl("10.64.111.134:2181","zookeeper","d@f*g:SGVsbG8==U4HRwjlqTOp0p9b60T+T8D2fQ8ThQgJLu/qgfLyLgknPa2RwYXNzd29yZA=="); cosmic.setConfigUrl("10.64.111.134:2181","zookeeper","d@f*g:SGVsbG8==U4HRwjlqTOp0p9b60T+T8D2fQ8ThQgJLu/qgfLyLgknPa2RwYXNzd29yZA==");
cosmic.setStartWithQing(false); cosmic.setStartWithQing(false);
cosmic.start(); cosmic.start();