Просмотр исходного кода

商品组选择选项bug优化

hu 3 лет назад
Родитель
Сommit
fc069cb5ac
1 измененных файлов с 35 добавлено и 33 удалено
  1. 35 33
      src/custom/restcontroller/sale/itemgroup/itemgroup.java

+ 35 - 33
src/custom/restcontroller/sale/itemgroup/itemgroup.java

@@ -629,58 +629,58 @@ public class itemgroup extends Controller {
                     jsonObject.put("parm", content.getString("color"));
                     jsonObject.put("parm", content.getString("color"));
                     jsonObject.put("flag", true);
                     jsonObject.put("flag", true);
                     colormap.add(jsonObject);
                     colormap.add(jsonObject);
-                    for (String firstcolor : firstcolorList) {
-                        JSONObject jsonObject1 =new JSONObject();
-                        if (!firstcolor.equals(content.getString("color"))) {
-                            jsonObject1.put("parm",firstcolor);
-                            jsonObject1.put("flag", true);
-                            colormap.add(jsonObject1);
-                        }
-                    }
+//                    for (String firstcolor : firstcolorList) {
+//                        JSONObject jsonObject1 =new JSONObject();
+//                        if (!firstcolor.equals(content.getString("color"))) {
+//                            jsonObject1.put("parm",firstcolor);
+//                            jsonObject1.put("flag", true);
+//                            colormap.add(jsonObject1);
+//                        }
+//                    }
                 } else if (value.equals("spec")) {
                 } else if (value.equals("spec")) {
                     JSONObject jsonObject =new JSONObject();
                     JSONObject jsonObject =new JSONObject();
                     jsonObject.put("parm", content.getString("spec"));
                     jsonObject.put("parm", content.getString("spec"));
                     jsonObject.put("flag", true);
                     jsonObject.put("flag", true);
                     specmap.add(jsonObject);
                     specmap.add(jsonObject);
-                    for (String firstspec : firstspecList) {
-                        JSONObject jsonObject1 =new JSONObject();
-                        if (!firstspec.equals(content.getString("spec"))) {
-                            jsonObject1.put("parm",firstspec);
-                            jsonObject1.put("flag", true);
-                            specmap.add(jsonObject1);
-                        }
-                    }
+//                    for (String firstspec : firstspecList) {
+//                        JSONObject jsonObject1 =new JSONObject();
+//                        if (!firstspec.equals(content.getString("spec"))) {
+//                            jsonObject1.put("parm",firstspec);
+//                            jsonObject1.put("flag", true);
+//                            specmap.add(jsonObject1);
+//                        }
+//                    }
                 } else if (value.equals("material")) {
                 } else if (value.equals("material")) {
                     JSONObject jsonObject =new JSONObject();
                     JSONObject jsonObject =new JSONObject();
                     jsonObject.put("parm", content.getString("material"));
                     jsonObject.put("parm", content.getString("material"));
                     jsonObject.put("flag", true);
                     jsonObject.put("flag", true);
                     materialmap.add(jsonObject);
                     materialmap.add(jsonObject);
-                    for (String firstmaterial : firstmaterialList) {
-                        JSONObject jsonObject1 =new JSONObject();
-                        if (!firstmaterial.equals(content.getString("material"))) {
-                            jsonObject1.put("parm",firstmaterial);
-                            jsonObject1.put("flag", true);
-                            materialmap.add(jsonObject1);
-                        }
-                    }
+//                    for (String firstmaterial : firstmaterialList) {
+//                        JSONObject jsonObject1 =new JSONObject();
+//                        if (!firstmaterial.equals(content.getString("material"))) {
+//                            jsonObject1.put("parm",firstmaterial);
+//                            jsonObject1.put("flag", true);
+//                            materialmap.add(jsonObject1);
+//                        }
+//                    }
                 } else if (value.equals("cheek")) {
                 } else if (value.equals("cheek")) {
                     JSONObject jsonObject =new JSONObject();
                     JSONObject jsonObject =new JSONObject();
                     jsonObject.put("parm", content.getString("cheek"));
                     jsonObject.put("parm", content.getString("cheek"));
                     jsonObject.put("flag", true);
                     jsonObject.put("flag", true);
                     cheekmap.add(jsonObject);
                     cheekmap.add(jsonObject);
-                    for (String firstcheek : firstcheekList) {
-                        JSONObject jsonObject1 =new JSONObject();
-                        if (!firstcheek.equals(content.getString("cheek"))) {
-                            jsonObject1.put("parm", firstcheek);
-                            jsonObject1.put("flag", true);
-                            cheekmap.add(jsonObject1);
-                        }
-                    }
+//                    for (String firstcheek : firstcheekList) {
+//                        JSONObject jsonObject1 =new JSONObject();
+//                        if (!firstcheek.equals(content.getString("cheek"))) {
+//                            jsonObject1.put("parm", firstcheek);
+//                            jsonObject1.put("flag", true);
+//                            cheekmap.add(jsonObject1);
+//                        }
+//                    }
                 }
                 }
                 where = where + " and " + value + "='" + content.getString(value) + "' ";
                 where = where + " and " + value + "='" + content.getString(value) + "' ";
             }
             }
             factory.addParameter_SQL("where", where);
             factory.addParameter_SQL("where", where);
-            for (String value : listParmBlank) {
+            for (String value : listAll) {
                 if (value.equals("color")) {
                 if (value.equals("color")) {
                     rows = dbConnect.runSqlQuery(factory.getSQL());
                     rows = dbConnect.runSqlQuery(factory.getSQL());
                     if (!rows.isEmpty()) {
                     if (!rows.isEmpty()) {
@@ -726,6 +726,8 @@ public class itemgroup extends Controller {
 
 
             }
             }
 
 
+
+
             for (String firstcolor : firstcolorList) {
             for (String firstcolor : firstcolorList) {
                 boolean isexistParm=false;
                 boolean isexistParm=false;
                 for (Object object:colormap) {
                 for (Object object:colormap) {