浏览代码

商品档案同步马桥立库中间表优化

shenjingwei 1 周之前
父节点
当前提交
fa2e921d5e
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/custom/service/UpdateBasicDataToWms.java

+ 2 - 2
src/custom/service/UpdateBasicDataToWms.java

@@ -55,12 +55,12 @@ public class UpdateBasicDataToWms extends ServiceController {
                 String Standard = model + ";" + spec;
 
                 if (tqitems.contains(itemno)) {
-                    TQSqlist.add("update TMaterialsInt set ModifyDate=getDate(),StoreNo='101',Status=0, MaterialCNName='" + itemname + "',Mode='" + Standard + "',Unit='" + unitname + "',Standard='" + Standard + "' where MaterialCode='" + itemno + "' and  (MaterialCNName!='" + itemname + "' or Mode!='" + Standard + "' or Unit!='" + unitname + "' or Standard!='" + Standard + "')");
+                    TQSqlist.add("update TMaterialsInt set ModifyDate=getDate(),StoreNo='101',Status=0, MaterialCNName='" + itemname + "',Mode='" + Standard + "',Unit='" + unitname + "',Standard='" + Standard + "' where MaterialCode='" + itemno + "' and  (isnull(MaterialCNName,'')!='" + itemname + "' or isnull(Mode,'')!='" + Standard + "' or isnull(Unit,'')!='" + unitname + "' or isnull(Standard,'')!='" + Standard + "')");
                 } else {
                     TQSqlist.add("insert into TMaterialsInt(MaterialCode,MaterialCNName,CreateDate,ModifyDate,IsDeleted,Mode,Unit,Standard,StoreNo,Status) values('" + itemno + "','" + itemname + "',getDate(),getDate(),0,'" + Standard + "','" + unitname + "','" + Standard + "','101',0 )");
                 }
 
-                MQSqlist.add("update inventory set fshapesize='" + shapesize + "' where cinvcode='" + itemno + "' and fshapesize!='" + shapesize + "'");
+                MQSqlist.add("update inventory set fshapesize='" + shapesize + "' where cinvcode='" + itemno + "' and isnull(fshapesize,'')!='" + shapesize + "'");
             }
 
             TQWMS.runSqlUpdate(TQSqlist);