fix:
1.生成随机资料时,只有业务分类为整机,且是否赠品为否的行生成
This commit is contained in:
parent
af59bf2dfd
commit
53be70e0db
@ -1000,16 +1000,18 @@ public class SalesOrderZJEdit extends AbstractBillPlugIn implements Plugin, Befo
|
||||
DynamicObject productModel = (DynamicObject) model.getValue("yem_productmodel", i);
|
||||
if (YEM.isNotEmpty(materialClass) && YEM.isNotEmpty(productModel)) {
|
||||
if ("Z".equals(materialClass)) {
|
||||
DynamicObject products = productModel.getDynamicObject("yem_products");
|
||||
if (YEM.isNotEmpty(products)) {
|
||||
Long id = products.getLong("id");
|
||||
if (map.containsKey(id)) {
|
||||
map.put(id, map.get(id).add((BigDecimal) model.getValue("yem_qty", i)));
|
||||
} else {
|
||||
map.put(id, (BigDecimal) model.getValue("yem_qty", i));
|
||||
boolean yemIfgift = (boolean) model.getValue("yem_ifgift");
|
||||
if (!yemIfgift) {
|
||||
DynamicObject products = productModel.getDynamicObject("yem_products");
|
||||
if (YEM.isNotEmpty(products)) {
|
||||
Long id = products.getLong("id");
|
||||
if (map.containsKey(id)) {
|
||||
map.put(id, map.get(id).add((BigDecimal) model.getValue("yem_qty", i)));
|
||||
} else {
|
||||
map.put(id, (BigDecimal) model.getValue("yem_qty", i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1271,7 +1273,7 @@ public class SalesOrderZJEdit extends AbstractBillPlugIn implements Plugin, Befo
|
||||
for (int i = 0; i < materialInfoRows; i++) {
|
||||
DynamicObject productModel = (DynamicObject) model.getValue("yem_productmodel", i);
|
||||
Boolean yemIfgift = (Boolean) model.getValue("yem_ifgift", i);
|
||||
if (YEM.isNotEmpty(productModel)&&!yemIfgift) {
|
||||
if (YEM.isNotEmpty(productModel) && !yemIfgift) {
|
||||
DynamicObject products = productModel.getDynamicObject("yem_products");
|
||||
if (YEM.isNotEmpty(products)) {
|
||||
Long productsId = products.getLong("id");
|
||||
|
Loading…
Reference in New Issue
Block a user