1.总需求计算,库存差计算
This commit is contained in:
25655 2025-03-22 14:37:03 +08:00
parent 2b9893b8ac
commit f5b8f31c50

View File

@ -299,10 +299,21 @@ public class tracktaskconsoleFormPlugIn extends AbstractBillPlugIn implements Be
@NotNull
private static BigDecimal getDelivernoticeqty(DynamicObject yem_bd_products, long materialNumid) {
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.and("yem_billtype.number", QCP.equals, "yem_es_delivernotice_o");
qFilter.and("yem_es_materialinfo.yem_materiel.id", QCP.equals, materialNumid);
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" +
",yem_es_materialinfo,yem_es_materialinfo.yem_qty,yem_es_materialinfo.yem_materiel,billstatus,yem_billtype,yem_bd_products"
, new QFilter[]{qFilter});