浏览代码

商城选项方案新增“仅显示可选”字段

hu 10 月之前
父节点
当前提交
7126dbf4a5

+ 2 - 1
src/custom/restcontroller/sale/itemgroup/itemgroup.java

@@ -479,7 +479,7 @@ public class itemgroup extends Controller {
             }
         }
         factory.addParameter_SQL("where1", where1);
-        Rows customschemeItems = dbConnect.runSqlQuery("select distinct value,description from sa_customscheme_items where  sa_customschemeid in(select t2.sa_customschemeid from sa_itemgroupmx t1 left join plm_item t2 on t1.itemid=t2.itemid and t1.siteid=t2.siteid where t1.siteid='" + siteid + "' and t1.sa_itemgroupid=" + content.getString("sa_itemgroupid") + ")");
+        Rows customschemeItems = dbConnect.runSqlQuery("select distinct value,description,isonlydisplay from sa_customscheme_items where  sa_customschemeid in(select t2.sa_customschemeid from sa_itemgroupmx t1 left join plm_item t2 on t1.itemid=t2.itemid and t1.siteid=t2.siteid where t1.siteid='" + siteid + "' and t1.sa_itemgroupid=" + content.getString("sa_itemgroupid") + ")");
         if (!customschemeItems.isEmpty()) {
             for (Row row : customschemeItems) {
 
@@ -971,6 +971,7 @@ public class itemgroup extends Controller {
         sqlFactory.addParameter("sys_enterpriseid", sys_enterpriseid);
         Rows itemrows = dbConnect.runSqlQuery(sqlFactory.getSQL());
         for (Row row : itemrows) {
+            row.put("customschemeItems",customschemeItems);
             ItemPrice itemPrice = ItemPrice.getItemPrice(this, sys_enterpriseid, row.getLong("itemid"));
             row.put("oldprice", itemPrice.getPrice());
             if (sys_enterpriseid > 0 || (usertype == 21 || usertype == 22)) {

+ 2 - 2
src/custom/restcontroller/webmanage/sale/customscheme/SQL/商品定制方案明细新增.sql

@@ -1,2 +1,2 @@
-insert into sa_customscheme_items (siteid, sa_customscheme_itemsid,sa_customschemeid,value,description)
-values ($siteid$, $sa_customscheme_itemsid$,$sa_customschemeid$,$value$,$description$);
+insert into sa_customscheme_items (siteid, sa_customscheme_itemsid,sa_customschemeid,value,description,isonlydisplay)
+values ($siteid$, $sa_customscheme_itemsid$,$sa_customschemeid$,$value$,$description$,$isonlydisplay$);

+ 2 - 1
src/custom/restcontroller/webmanage/sale/customscheme/SQL/商品定制方案明细更新.sql

@@ -1,7 +1,8 @@
 UPDATE sa_customscheme_items
 SET 
     value=$value$,
-    description=$description$
+    description=$description$,
+    isonlydisplay=$isonlydisplay$
 WHERE sa_customscheme_itemsid = $sa_customscheme_itemsid$
 
 

+ 2 - 0
src/custom/restcontroller/webmanage/sale/customscheme/customschemeItems.java

@@ -133,6 +133,7 @@ public class customschemeItems  extends Controller {
                 saleFactory.addParameter("sa_customschemeid", sa_customschemeid);
                 saleFactory.addParameter("value", iteminfo.getStringValue("value"));
                 saleFactory.addParameter("description", iteminfo.getStringValue("description"));
+                saleFactory.addParameter("isonlydisplay", iteminfo.getLongValue("isonlydisplay"));
                 sqlList.add(saleFactory.getSQL());
                 i++;
             } else {
@@ -142,6 +143,7 @@ public class customschemeItems  extends Controller {
                 saleFactory.addParameter("sa_customschemeid", sa_customschemeid);
                 saleFactory.addParameter("value", iteminfo.getStringValue("value"));
                 saleFactory.addParameter("description", iteminfo.getStringValue("description"));
+                saleFactory.addParameter("isonlydisplay", iteminfo.getLongValue("isonlydisplay"));
                 sqlList.add(saleFactory.getSQL());
             }