|
|
@@ -115,6 +115,7 @@ public class item extends Controller {
|
|
|
sqlFactory.addParameter("itemid",itemid);
|
|
|
sqlFactory.addParameter("sa_customschemeid", 0);
|
|
|
// 货品档案扩展属性字段表
|
|
|
+
|
|
|
SQLFactory sqlFactory1 = new SQLFactory(this, "货品档案-扩展新增");
|
|
|
sqlFactory1.addParameter("siteid", "lsa");
|
|
|
sqlFactory1.addParameter("userid", 1);
|
|
|
@@ -150,6 +151,21 @@ public class item extends Controller {
|
|
|
long itemid = itemRows.get(0).getLong("itemid");
|
|
|
sqlFactory = new SQLFactory(this,"货品档案更新");
|
|
|
sqlFactory.addParameter("itemid",itemid);
|
|
|
+ Rows customitemRows = dbConnect.runSqlQuery("select spec,color,material,cheek,t1.status,t1.isonsale,t1.sa_customschemeid from plm_item t1 left join plm_itemextend t2 on t1.itemid=t2.itemid and t1.siteid=t2.siteid where t1.itemid="+itemid);
|
|
|
+ if(!customitemRows.isEmpty()){
|
|
|
+ if(customitemRows.get(0).getString("spec").equals(flong) && customitemRows.get(0).getString("color").equals(fcolour)
|
|
|
+ && customitemRows.get(0).getString("material").equals(fbx) && customitemRows.get(0).getString("cheek").equals(fbk)){
|
|
|
+ sqlFactory.addParameter("status",customitemRows.get(0).getString("status"));
|
|
|
+ sqlFactory.addParameter("isonsale",customitemRows.get(0).getString("isonsale"));
|
|
|
+ }else {
|
|
|
+ sqlFactory.addParameter("status","新建");
|
|
|
+ sqlFactory.addParameter("isonsale",0);
|
|
|
+ if(customitemRows.get(0).getLong("sa_customschemeid")==0){
|
|
|
+ sqllist.add("delete from sa_itemgroup where sa_itemgroupid in(select sa_itemgroupid from sa_itemgroupmx where itemid=" + itemid + " and siteid='lsa')");
|
|
|
+ sqllist.add("delete from sa_itemgroupmx where itemid=" + itemid + " and siteid='lsa'");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
sqlFactory.addParameter("sa_customschemeid", itemRows.get(0).getLong("sa_customschemeid"));
|
|
|
Rows itemextendRows= dbConnect.runSqlQuery("select * from plm_itemextend where siteid='lsa' and itemid="+itemid);
|
|
|
SQLFactory sqlFactory1;
|