fix:
1.随机资料及配件工具包,机型台数根据发运更新
This commit is contained in:
parent
091b36894e
commit
550a4463db
@ -702,18 +702,14 @@ public class ShippingDetailsFormPlugin extends AbstractBillPlugIn implements Bef
|
|||||||
}
|
}
|
||||||
Map<Long, BigDecimal> map = new HashMap<>();
|
Map<Long, BigDecimal> map = new HashMap<>();
|
||||||
DynamicObjectCollection yemEsMaterialinfo = this.getModel().getEntryEntity("yem_es_materialinfo");
|
DynamicObjectCollection yemEsMaterialinfo = this.getModel().getEntryEntity("yem_es_materialinfo");
|
||||||
if (yemEsMaterialinfo.size() > 0) {
|
if (!yemEsMaterialinfo.isEmpty()) {
|
||||||
for (DynamicObject dynamicObject : yemEsMaterialinfo) {
|
for (DynamicObject dynamicObject : yemEsMaterialinfo) {
|
||||||
DynamicObject yemProductmodel = dynamicObject.getDynamicObject("yem_productmodel");
|
DynamicObject yemProductmodel = dynamicObject.getDynamicObject("yem_productmodel");
|
||||||
if (yemProductmodel != null) {
|
if (yemProductmodel != null) {
|
||||||
long aLong = yemProductmodel.getDynamicObject("yem_products").getLong("id");
|
long aLong = yemProductmodel.getDynamicObject("yem_products").getLong("id");
|
||||||
// long aLong = yemProductmodel.getLong("id");
|
// long aLong = yemProductmodel.getLong("id");
|
||||||
BigDecimal yemQty = dynamicObject.getBigDecimal("yem_qty");
|
BigDecimal yemQty = dynamicObject.getBigDecimal("yem_qty");
|
||||||
if (map.get(aLong).compareTo(BigDecimal.ZERO) == 0) {
|
map.merge(aLong, yemQty, (a, b) -> b.add(a));
|
||||||
map.put(aLong, yemQty);
|
|
||||||
} else {
|
|
||||||
map.put(aLong, yemQty.add(map.get(aLong)));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DynamicObjectCollection yemEsSalesorderP = this.getModel().getEntryEntity("yem_es_salesorder_p");
|
DynamicObjectCollection yemEsSalesorderP = this.getModel().getEntryEntity("yem_es_salesorder_p");
|
||||||
@ -723,7 +719,7 @@ public class ShippingDetailsFormPlugin extends AbstractBillPlugIn implements Bef
|
|||||||
if (yemAccessorytype != null) {
|
if (yemAccessorytype != null) {
|
||||||
long aLong = yemAccessorytype.getLong("id");
|
long aLong = yemAccessorytype.getLong("id");
|
||||||
if (map.get(aLong).compareTo(BigDecimal.ZERO) != 0) {
|
if (map.get(aLong).compareTo(BigDecimal.ZERO) != 0) {
|
||||||
this.getModel().setValue("yem_pcstype",map.get(aLong) ,i);
|
this.getModel().setValue("yem_pcstype", map.get(aLong), i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user