fix:
1.总需求计算,库存差计算
This commit is contained in:
parent
2b9893b8ac
commit
f5b8f31c50
@ -299,10 +299,21 @@ 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