|
|
@@ -500,6 +500,7 @@ public class itemgroup extends Controller {
|
|
|
listAll.addAll(listParmNotBlank);
|
|
|
factory.addParameter_SQL("where", "1=1");
|
|
|
rows = dbConnect.runSqlQuery(factory.getSQL());
|
|
|
+ Rows rowsall=rows;
|
|
|
for (Row row : rows) {
|
|
|
for (String value : listAll) {
|
|
|
if (value.equals("color")) {
|
|
|
@@ -1420,6 +1421,41 @@ public class itemgroup extends Controller {
|
|
|
}
|
|
|
JSONObject oject = new JSONObject();
|
|
|
oject.put("customschemeItems", customschemeItems.toJsonArray());
|
|
|
+ if(customschemeItems.size()==1){
|
|
|
+ if(customschemeItems.get(0).getString("value").equals("color")){
|
|
|
+ RowsMap rowsMap = rowsall.toRowsMap("color");
|
|
|
+ for (parm parm : colorList) {
|
|
|
+ if(rowsMap.containsKey(parm.getParm())){
|
|
|
+ parm.setDelistingstatus(rowsMap.get(parm.getParm()).get(0).getString("delistingstatus"));
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(customschemeItems.get(0).getString("value").equals("spec")){
|
|
|
+ RowsMap rowsMap = rowsall.toRowsMap("spec");
|
|
|
+ for (parm parm : specList) {
|
|
|
+ if(rowsMap.containsKey(parm.getParm())) {
|
|
|
+ parm.setDelistingstatus(rowsMap.get(parm.getParm()).get(0).getString("delistingstatus"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(customschemeItems.get(0).getString("value").equals("material")){
|
|
|
+ RowsMap rowsMap = rowsall.toRowsMap("material");
|
|
|
+ for (parm parm : materialList) {
|
|
|
+ if(rowsMap.containsKey(parm.getParm())) {
|
|
|
+ parm.setDelistingstatus(rowsMap.get(parm.getParm()).get(0).getString("delistingstatus"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(customschemeItems.get(0).getString("value").equals("cheek")){
|
|
|
+ RowsMap rowsMap = rowsall.toRowsMap("cheek");
|
|
|
+ for (parm parm : cheekList) {
|
|
|
+ if(rowsMap.containsKey(parm.getParm())) {
|
|
|
+ parm.setDelistingstatus(rowsMap.get(parm.getParm()).get(0).getString("delistingstatus"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
oject.put("colorRows", colorList);
|
|
|
oject.put("specRows", specList);
|
|
|
oject.put("materialRows", materialList);
|