fix:
1.跟单任务控制台-配件,总需求现有逻辑是合同已审核数量减去调拨已审核数量,需要再减去其他领料审核的数量,再减去跟单任务控制台上的取消数量
This commit is contained in:
parent
23a7d964f3
commit
ab1bae4f12
@ -261,7 +261,7 @@ public class tracktaskconsoleFormPlugIn extends AbstractBillPlugIn implements Be
|
|||||||
yem_tolreqqty = yem_tolreqqty.subtract(yemCancelNum);
|
yem_tolreqqty = yem_tolreqqty.subtract(yemCancelNum);
|
||||||
model.setValue("yem_tolreqqty", yem_tolreqqty, i);
|
model.setValue("yem_tolreqqty", yem_tolreqqty, i);
|
||||||
//处理库存差
|
//处理库存差
|
||||||
BigDecimal yem_qtysub = easyem_gmpjqty.add(cmmpyem_gmpjqty).add(yem_buyfromcmmp).subtract(yem_tolreqqty);
|
BigDecimal yem_qtysub = easyem_gmpjqty.add(cmmpyem_gmpjqty).add(yem_buyfromcmmp).subtract(tolreqqty);
|
||||||
model.setValue("yem_qtysub", yem_qtysub, i);
|
model.setValue("yem_qtysub", yem_qtysub, i);
|
||||||
}
|
}
|
||||||
this.getView().showMessage("查询库存成功!");
|
this.getView().showMessage("查询库存成功!");
|
||||||
@ -299,21 +299,10 @@ public class tracktaskconsoleFormPlugIn extends AbstractBillPlugIn implements Be
|
|||||||
@NotNull
|
@NotNull
|
||||||
private static BigDecimal getDelivernoticeqty(DynamicObject yem_bd_products, long materialNumid) {
|
private static BigDecimal getDelivernoticeqty(DynamicObject yem_bd_products, long materialNumid) {
|
||||||
List<Long> productId = getProductId(yem_bd_products);
|
List<Long> productId = getProductId(yem_bd_products);
|
||||||
//获取仓库分类为(国贸各事业部仓库)id集合
|
|
||||||
DynamicObjectCollection whColl = QueryServiceHelper.query("yem_warehouse", "id",
|
|
||||||
new QFilter[]{new QFilter("yem_sort", QCP.equals, "D"),
|
|
||||||
new QFilter("enable", QCP.equals, "1")});
|
|
||||||
ArrayList<Long> whids = new ArrayList<>();
|
|
||||||
for (DynamicObject wh : whColl) {
|
|
||||||
whids.add(wh.getLong("id"));
|
|
||||||
}
|
|
||||||
QFilter qFilter = new QFilter("billstatus", QCP.equals, "C");
|
QFilter qFilter = new QFilter("billstatus", QCP.equals, "C");
|
||||||
qFilter.and("yem_billtype.number", QCP.equals, "yem_es_delivernotice_o");
|
qFilter.and("yem_billtype.number", QCP.equals, "yem_es_delivernotice_o");
|
||||||
qFilter.and("yem_es_materialinfo.yem_materiel.id", QCP.equals, materialNumid);
|
qFilter.and("yem_es_materialinfo.yem_materiel.id", QCP.equals, materialNumid);
|
||||||
qFilter.and("yem_bd_products.id", QCP.in, productId);
|
qFilter.and("yem_bd_products.id", QCP.in, productId);
|
||||||
qFilter.and("yem_es_materialinfo.yem_warehouse.yem_sort.id", QCP.in, whids);
|
|
||||||
//调出仓库的仓库分类为(国贸各事业部仓库)
|
|
||||||
|
|
||||||
DynamicObject[] yemEsDelivernotice = BusinessDataServiceHelper.load("yem_es_delivernotice", "id,billno" +
|
DynamicObject[] yemEsDelivernotice = BusinessDataServiceHelper.load("yem_es_delivernotice", "id,billno" +
|
||||||
",yem_es_materialinfo,yem_es_materialinfo.yem_qty,yem_es_materialinfo.yem_materiel,billstatus,yem_billtype,yem_bd_products"
|
",yem_es_materialinfo,yem_es_materialinfo.yem_qty,yem_es_materialinfo.yem_materiel,billstatus,yem_billtype,yem_bd_products"
|
||||||
, new QFilter[]{qFilter});
|
, new QFilter[]{qFilter});
|
||||||
|
Loading…
Reference in New Issue
Block a user