瀏覽代碼

立体仓库更新标志更新及商品档案新增字段

hu 4 月之前
父節點
當前提交
cc131ce545

+ 14 - 0
src/custom/restcontroller/webmanage/sale/item/Item.java

@@ -62,6 +62,19 @@ public class Item extends Controller {
             }
             Rows itemRows = dbConnect.runSqlQuery("SELECT t1.*,t2.material from plm_item t1 left join plm_itemextend t2 on t1.itemid=t2.itemid and t1.siteid=t2.siteid WHERE t1.itemid=" + itemid + " and t1.siteid ='" + siteid + "'");
 
+            if(itemRows.get(0).getLong("wmsuploadflag")==2){
+                if(!itemRows.get(0).getString("itemname").equals(content.getString("itemname")) ||
+                        !itemRows.get(0).getString("model").equals(content.getString("model")) ||
+                        !itemRows.get(0).getString("shapsize").equals(content.getString("shapsize")) ||
+                        !itemRows.get(0).getString("spec").equals(content.getString("spec")) ||
+                        !itemRows.get(0).getString("unitid").equals(content.getString("unitid")) ||
+                        !itemRows.get(0).getString("remarks").equals(content.getString("remarks")) ||
+                        !itemRows.get(0).getString("stockno").equals(content.getString("stockno"))){
+                    sqlList.add("update plm_item set wmsuploadflag=1 where itemid="+itemid+" and siteid='"+siteid+"'");
+                }
+            }
+
+
             sqlFactory = new SQLFactory(this, "货品档案更新");
             sqlList.add(DataContrlLog.createLog(this, "plm_item", itemid, "编辑", "编辑商品" + content.getString("itemname")).getSQL());
             if (content.getLongValue("sa_customschemeid") > 0) {
@@ -221,6 +234,7 @@ public class Item extends Controller {
         sqlFactory.addParameter("itemclsnum", content.getStringValue("itemclsnum"));
         sqlFactory.addParameter("outplace", content.getStringValue("outplace"));
         sqlFactory.addParameter("repairattribute", content.getStringValue("repairattribute"));
+        sqlFactory.addParameter("shapesize", content.getStringValue("shapesize"));
 
 
         sqlList.add(sqlFactory.getSQL());

+ 1 - 0
src/custom/restcontroller/webmanage/sale/item/SQL/货品档案列表.sql

@@ -61,6 +61,7 @@ SELECT t1.itemid,
        t1.executionstandards,
        t1.itemclsnum,
        t1.outplace,
+       t1.shapesize,
        t6.auxunitid,
        t6.unitgroupname,
        t7.unitname axunitname,

+ 2 - 2
src/custom/restcontroller/webmanage/sale/item/SQL/货品档案新增.sql

@@ -6,7 +6,7 @@ insert into plm_item (siteid, itemid, createby, createdate, changeuserid, change
                       sa_customschemeid, cheek, delistingstatus, financeclasstype, stockno, volume, marketingcategory,
                       pricingmetod,cheekschemeid,colorschemeid,materialschemeid,cost,grossprofit,grossprofitmargin,saleprice,
                       rate,grade,custamount,safeqty,icaddqty,icminqty,iswriteoff,isnegative,ispartorderautocheck,islimitemparts,itemname_print,
-                      applicablegassource,hygienelicensenum,departmentid,executionstandards,itemclsnum,outplace,repairattribute)
+                      applicablegassource,hygienelicensenum,departmentid,executionstandards,itemclsnum,outplace,repairattribute,shapesize)
 values ($siteid$, $itemid$, $username$, CURRENT_TIME, $userid$, $username$, CURRENT_TIME, $itemno$, $unitid$,
         $isauxunit$, $unitgroupid$, $itemname$, $isonsale$, '新建', $model$, $spec$, $orderminqty$, $orderaddqty$,
         $orderminqty_auxunit$, $orderaddqty_auxunit$, $remarks$, $barcode$, $skucontrol$, $batchcontrol$, $grossweight$,
@@ -15,4 +15,4 @@ values ($siteid$, $itemid$, $username$, CURRENT_TIME, $userid$, $username$, CURR
         $iswoodproducts$, $sa_customschemeid$, $cheek$, $delistingstatus$, $financeclasstype$, $stockno$, $volume$,
         $marketingcategory$, $pricingmetod$,$cheekschemeid$,$colorschemeid$,$materialschemeid$,$cost$,$grossprofit$,$grossprofitmargin$,$saleprice$,
         $rate$,$grade$,$custamount$,$safeqty$,$icaddqty$,$icminqty$,$iswriteoff$,$isnegative$,$ispartorderautocheck$,$islimitemparts$,$itemname_print$,
-        $applicablegassource$,$hygienelicensenum$,$departmentid$,$executionstandards$,$itemclsnum$,$outplace$,$repairattribute$)
+        $applicablegassource$,$hygienelicensenum$,$departmentid$,$executionstandards$,$itemclsnum$,$outplace$,$repairattribute$,$shapesize$)

+ 2 - 1
src/custom/restcontroller/webmanage/sale/item/SQL/货品档案更新.sql

@@ -71,7 +71,8 @@ SET changeuserid=$userid$,
     executionstandards=$executionstandards$,
     itemclsnum=$itemclsnum$,
     outplace=$outplace$,
-    repairattribute=$repairattribute$
+    repairattribute=$repairattribute$,
+    shapesize=$shapesize$
 WHERE itemid = $itemid$
   and siteid = $siteid$
 

+ 3 - 0
src/custom/restcontroller/webmanage/sale/toolscode/toolscode.java

@@ -236,6 +236,9 @@ public class toolscode extends Controller {
                     if (itemid != rows.get(0).getLong("itemid")) {
                         newitemid = itemid;
                         olditemid = rows.get(0).getLong("itemid");
+                        if(rows.get(0).getLong("wmsuploadflag")==2){
+                            sqlList.add("update sa_itemsku set wmsuploadflag=1 where sa_itemskuid="+sa_itemskuid+" and siteid='"+siteid+"'");
+                        }
                         if (StringUtils.isBlank(content.getStringValue("changenotes"))) {
                             return getErrReturnObject().setErrMsg("变更商品信息时,需填写变更原因").toString();
                         }