Explorar o código

经销商出入库可以不指定表体id直接新增序列号,代码自动判断生成表体明细

shenjingwei hai 1 semana
pai
achega
4ccde79bb6
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/custom/restcontroller/crm/agent/stock/stockbill.java

+ 1 - 1
src/custom/restcontroller/crm/agent/stock/stockbill.java

@@ -361,8 +361,8 @@ public class stockbill extends Controller {
 
         if (SQLFactory.createQuerySQL(this, "sys_enterprise_stockbill_skus").setWhere("sku", sku).setWhere("sys_enterprise_stockbillid", sys_enterprise_stockbillid).query().isEmpty()) {
             SQLList sqlList = new SQLList();
-            long sys_enterprise_itemid = 0;
             if (sys_enterprise_stockbill_itemsid == 0) {//如果没有指定货品明细ID,则自动生成
+                long sys_enterprise_itemid = 0;
                 long itemid = skuRows.get(0).getLong("itemid");
                 Enterprise.addSiteItems(dbConnect, siteid, sys_enterpriseid, itemid);//判断并生成商品档案
                 QuerySQL sys_enterprise_itemQuery = SQLFactory.createQuerySQL(dbConnect, "sys_enterprise_item", "sys_enterprise_itemid");