| | |
| | | result = new InsProductResult(); |
| | | } |
| | | result.setInsProductId(Integer.parseInt(k)); |
| | | JSONArray jsonArray = JSON.parseArray(JSON.toJSONString(jo.get("insValue"))); |
| | | List<Map<String, Object>> iv = new ArrayList<>(); |
| | | for (Object o : jsonArray) { |
| | | JSONObject insValue = JSON.parseObject(JSON.toJSONString(o)); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("v", JSON.parseObject(JSON.toJSONString(insValue.get("v"))).get("v")); |
| | | if ((insValue.get("u") == null || insValue.get("u").equals("")) && StrUtil.isNotEmpty(JSON.parseObject(JSON.toJSONString(insValue.get("v"))).get("v").toString())) { |
| | | map.put("u", userId); |
| | | } else { |
| | | map.put("u", insValue.get("u")); |
| | | if(jo.get("insValue") != null){ |
| | | JSONArray jsonArray = JSON.parseArray(JSON.toJSONString(jo.get("insValue"))); |
| | | List<Map<String, Object>> iv = new ArrayList<>(); |
| | | for (Object o : jsonArray) { |
| | | JSONObject insValue = JSON.parseObject(JSON.toJSONString(o)); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("v", JSON.parseObject(JSON.toJSONString(insValue.get("v"))).get("v")); |
| | | try { |
| | | if ((insValue.get("u") == null || insValue.get("u").equals("")) && StrUtil.isNotEmpty(JSON.parseObject(JSON.toJSONString(insValue.get("v"))).get("v").toString())) { |
| | | map.put("u", userId); |
| | | } else { |
| | | map.put("u", insValue.get("u")); |
| | | } |
| | | iv.add(map); |
| | | }catch (Exception e){} |
| | | } |
| | | iv.add(map); |
| | | result.setInsValue(JSON.toJSONString(iv)); |
| | | } |
| | | result.setInsValue(JSON.toJSONString(iv)); |
| | | JSONArray jsonArray2 = JSON.parseArray(JSON.toJSONString(jo.get("comValue"))); |
| | | List<Map<String, Object>> cv = new ArrayList<>(); |
| | | for (Object o : jsonArray2) { |
| | | JSONObject comValue = JSON.parseObject(JSON.toJSONString(o)); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("v", JSON.parseObject(JSON.toJSONString(comValue.get("v"))).get("v")); |
| | | cv.add(map); |
| | | if(jo.get("comValue") != null){ |
| | | JSONArray jsonArray2 = JSON.parseArray(JSON.toJSONString(jo.get("comValue"))); |
| | | List<Map<String, Object>> cv = new ArrayList<>(); |
| | | for (Object o : jsonArray2) { |
| | | JSONObject comValue = JSON.parseObject(JSON.toJSONString(o)); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("v", JSON.parseObject(JSON.toJSONString(comValue.get("v"))).get("v")); |
| | | cv.add(map); |
| | | } |
| | | result.setComValue(JSON.toJSONString(cv)); |
| | | } |
| | | result.setComValue(JSON.toJSONString(cv)); |
| | | JSONObject resValue = JSON.parseObject(JSON.toJSONString(jo.get("resValue"))); |
| | | insProduct.setLastValue(JSON.parseObject(JSON.toJSONString(resValue.get("v"))).get("v") + ""); |
| | | if(resValue.get("v")!=null){ |
| | | insProduct.setLastValue(JSON.parseObject(JSON.toJSONString(resValue.get("v"))).get("v") + ""); |
| | | } |
| | | JSONObject equipValue = JSON.parseObject(JSON.toJSONString(jo.get("equipValue"))); |
| | | try { |
| | | result.setEquipValue(JSON.parseObject(JSON.toJSONString(equipValue.get("v"))).get("v") + ""); |
| | |
| | | Map<String, Object> style = new HashMap<>(); |
| | | style.put("rowlen", config.get("rowlen")); |
| | | style.put("columnlen", config.get("columnlen")); |
| | | int r = -1; |
| | | // int r = -1; |
| | | /*if (BeanUtil.isNotEmpty(cellData)) { |
| | | for (JSONObject o : cellData) { |
| | | JSONObject v = JSON.parseObject(JSON.toJSONString(o.get("v"))); |