Browse Source

出入库单表体新增skucontrol字段

shenjingwei 5 months ago
parent
commit
8d7856b264

+ 1 - 1
src/custom/beans/stockbill/bills/BasicBill.java

@@ -268,7 +268,7 @@ public abstract class BasicBill {
         this.rb = billRow.getInteger("rb");
         this.siteid = billRow.getString("siteid");
         this.status = billRow.getString("status");
-        itemRows = dbConnect.runSqlQuery("select t1.*,t2.skucontrol from st_stockbill_items t1 left join plm_item t2 on t1.itemid=t2.itemid and t1.siteid=t2.siteid where t1.st_stockbillid ='" + st_stockbillid + "'");
+        itemRows = dbConnect.runSqlQuery("select t1.* where t1.st_stockbillid ='" + st_stockbillid + "'");
         codeRows = dbConnect.runSqlQuery("select t1.* from st_stockbill_items_sku t1 where t1.st_stockbillid ='" + st_stockbillid + "'");
     }
 

+ 2 - 2
src/custom/beans/stockbill/bills/XSCK.java

@@ -89,7 +89,7 @@ public class XSCK extends BasicBill {
                     sqlList.add("update sa_orderitems set undeliqty=undeliqty-" + row.getDouble("qty") + ",deliedqty=deliedqty+" + row.getDouble("qty") + " where sa_orderitemsid=" + row.getLong("sa_orderitemsid"));
                 }
                 for (Row row : itemRows) {
-                    if (row.getRow("plm_item", "itemid=:itemid").getBoolean("skucontrol")) {
+                    if (row.getBoolean("skucontrol")) {
                         sqlList.add("update st_stockbill_items set wmsuploadflag2=1 where st_stockbill_itemsid=" + row.getLong("st_stockbill_itemsid"));
                     }
                 }
@@ -125,7 +125,7 @@ public class XSCK extends BasicBill {
                     sqlList.add("update sa_orderitems set undeliqty=" + rowsMap.get(row.getLong("sa_orderitemsid")).get(0).getBigDecimal("undeliqty").add(row.getBigDecimal("qty")) + ",deliedqty=" + (rowsMap.get(row.getLong("sa_orderitemsid")).get(0).getBigDecimal("deliedqty").subtract(row.getBigDecimal("qty"))) + " where sa_orderitemsid=" + row.getLong("sa_orderitemsid"));
                 }
                 for (Row row : itemRows) {
-                    if (row.getRow("plm_item", "itemid=:itemid").getBoolean("skucontrol")) {
+                    if (row.getBoolean("skucontrol")) {
                         sqlList.add("update st_stockbill_items set wmsuploadflag2=0 where st_stockbill_itemsid=" + row.getLong("st_stockbill_itemsid"));
                     }
                 }

+ 1 - 0
src/custom/service/GetStockBillFromMQWms.java

@@ -116,6 +116,7 @@ public class GetStockBillFromMQWms extends ServiceController {
                 stStockbillitems.setValue("rowno", 1);
                 stStockbillitems.setValue("createby", "u8");
                 stStockbillitems.setValue("itemid", coderow.getLong("itemid"));
+                stStockbillitems.setValue("skucontrol", true);
                 stStockbillitems.setValue("itemno", coderow.getString("itemno"));
                 stStockbillitems.setValue("itemname", coderow.getString("itemname"));
                 stStockbillitems.setValue("model", coderow.getString("model"));

+ 1 - 0
src/custom/service/GetStockBillFromTQWms.java

@@ -123,6 +123,7 @@ public class GetStockBillFromTQWms extends ServiceController {
                 stStockbillitems.setValue("rowno", 1);
                 stStockbillitems.setValue("createby", "wms");
                 stStockbillitems.setValue("itemid", coderow.getLong("itemid"));
+                stStockbillitems.setValue("skucontrol",true);
                 stStockbillitems.setValue("itemno", coderow.getString("itemno"));
                 stStockbillitems.setValue("itemname", coderow.getString("itemname"));
                 stStockbillitems.setValue("model", coderow.getString("model"));

+ 1 - 3
src/custom/service/GetStockBillFromU8.java

@@ -5,11 +5,8 @@ import common.ServiceController;
 import common.YosException;
 import common.data.*;
 import common.data.db.DBConnect;
-import common.data.db.QueryCallBack;
 
 import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Date;
 
 /**
  * 美大U8erp出入库单同步
@@ -132,6 +129,7 @@ public class GetStockBillFromU8 extends ServiceController {
                         stStockbillitems.setValue("siteid", "MD");
                         stStockbillitems.setValue("rowno", rowindex);
                         stStockbillitems.setValue("itemid", itemrow.getLong("itemid"));
+                        stStockbillitems.setValue("skucontrol", true);
                         stStockbillitems.setValue("itemno", itemrow.getString("itemno"));
                         stStockbillitems.setValue("itemname", itemrow.getString("itemname"));
                         stStockbillitems.setValue("model", itemrow.getString("model"));