parent
b95ea8433b
commit
8bd2410f34
@ -1999,6 +1999,7 @@ public class SalesOrderEdit extends AbstractBillPlugIn implements Plugin, Before
|
||||
DynamicObjectCollection giftCollection = dataEntity.getDynamicObjectCollection("yem_es_salesorder_zp");
|
||||
DynamicObjectCollection materialinfo = dataEntity.getDynamicObjectCollection("yem_es_materialinfo");
|
||||
Map<Long, BigDecimal> map = new HashMap<>();
|
||||
Map<Long, BigDecimal> maps = new HashMap<>();
|
||||
for (DynamicObject dynamicObject : materialinfo) {
|
||||
String businesssort = dynamicObject.getString("yem_businesssort");
|
||||
boolean ifgift = dynamicObject.getBoolean("yem_ifgift");
|
||||
@ -2021,18 +2022,25 @@ public class SalesOrderEdit extends AbstractBillPlugIn implements Plugin, Before
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (DynamicObject dynamicObject : giftCollection) {
|
||||
int index = giftCollection.indexOf(dynamicObject);
|
||||
// int index = giftCollection.indexOf(dynamicObject);
|
||||
DynamicObject giveproactype = dynamicObject.getDynamicObject("yem_giveproactype");
|
||||
BigDecimal qtyint = dynamicObject.getBigDecimal("yem_qtyint");
|
||||
if (giveproactype == null) continue;
|
||||
long id = giveproactype.getLong("id");
|
||||
if (maps.containsKey(id)){
|
||||
maps.put(id,maps.get(id).add(qtyint));
|
||||
}else {
|
||||
maps.put(id,qtyint);
|
||||
}
|
||||
}
|
||||
for (Long id : maps.keySet()) {
|
||||
if (map.containsKey(id)) {
|
||||
BigDecimal qty = map.get(id);
|
||||
BigDecimal qtyint = dynamicObject.getBigDecimal("yem_qtyint");
|
||||
if (qtyint.compareTo(qty) != 0) {
|
||||
sb.append(String.format("配件赠送明细第 [ %s ] 行,赠送的数量和明细信息中相关机型数量不一致!\n", index + 1));
|
||||
if (maps.get(id).compareTo(qty) != 0) {
|
||||
sb.append("配件赠送明细赠送的数量和明细信息中相关机型数量不一致!\n");
|
||||
}
|
||||
} else {
|
||||
sb.append(String.format("配件赠送明细第 [ %s ] 行,赠送的数量和明细信息中相关机型数量不一致!\n", index + 1));
|
||||
sb.append("配件赠送明细赠送的数量和明细信息中相关机型数量不一致!\n");
|
||||
}
|
||||
}
|
||||
if (sb.length() > 0) {
|
||||
|
@ -14,20 +14,20 @@ public class Application {
|
||||
// cosmic.setServerIP("10.64.112.152");
|
||||
|
||||
cosmic.setAppName("cosmic-25655-N0OqzfBY");
|
||||
cosmic.setWebPath("D:/Cosine/Comics_Debug/Comics_YXZG/YXZG-server/webapp");
|
||||
cosmic.setWebPath("E:/Cosmic/Comics_YXZG/YXZG-server/webapp");
|
||||
|
||||
////152
|
||||
cosmic.setClusterNumber("yxzg-topview-dev");
|
||||
cosmic.setTenantNumber("yxzg-topview-dev");
|
||||
cosmic.setServerIP("10.64.112.152");
|
||||
cosmic.setFileServerPathIPAndPort("", "");
|
||||
cosmic.setConfigUrl("10.64.112.152:2181", "zookeeper", "Cosmic@5092");
|
||||
// cosmic.setClusterNumber("yxzg-topview-dev");
|
||||
// cosmic.setTenantNumber("yxzg-topview-dev");
|
||||
// cosmic.setServerIP("10.64.112.152");
|
||||
// cosmic.setFileServerPathIPAndPort("", "");
|
||||
// cosmic.setConfigUrl("10.64.112.152:2181", "zookeeper", "Cosmic@5092");
|
||||
System.setProperty("mq.debug.queue.tag", "wrxtest");
|
||||
////134
|
||||
// cosmic.setClusterNumber("yxzg-prod");
|
||||
// cosmic.setTenantNumber("yxzg-prod");
|
||||
// cosmic.setServerIP("10.64.111.134");
|
||||
// cosmic.setConfigUrl("10.64.111.134:2181","zookeeper","d@f*g:SGVsbG8==U4HRwjlqTOp0p9b60T+T8D2fQ8ThQgJLu/qgfLyLgknPa2RwYXNzd29yZA==");
|
||||
cosmic.setClusterNumber("yxzg-prod");
|
||||
cosmic.setTenantNumber("yxzg-prod");
|
||||
cosmic.setServerIP("10.64.111.134");
|
||||
cosmic.setConfigUrl("10.64.111.134:2181","zookeeper","d@f*g:SGVsbG8==U4HRwjlqTOp0p9b60T+T8D2fQ8ThQgJLu/qgfLyLgknPa2RwYXNzd29yZA==");
|
||||
|
||||
cosmic.setStartWithQing(false);
|
||||
cosmic.start();
|
||||
|
Loading…
Reference in New Issue
Block a user