| | |
| | | JSONObject sheet = JSON.parseObject(JSON.toJSONString(JSON.parseArray(JSON.toJSONString(JSON.parseObject(thing).get("data"))).get(0))); |
| | | JSONObject config = JSON.parseObject(JSON.toJSONString(sheet.get("config"))); |
| | | List<JSONObject> cellData = JSON.parseArray(JSON.toJSONString(sheet.get("celldata")), JSONObject.class); |
| | | List<JSONObject> tableData = new ArrayList<>(); |
| | | // List<JSONObject> tableData = new ArrayList<>(); |
| | | Map<String, Object> style = new HashMap<>(); |
| | | style.put("rowlen", config.get("rowlen")); |
| | | style.put("columnlen", config.get("columnlen")); |
| | | int r = -1; |
| | | if (BeanUtil.isNotEmpty(cellData)) { |
| | | /*if (BeanUtil.isNotEmpty(cellData)) { |
| | | for (JSONObject o : cellData) { |
| | | JSONObject v = JSON.parseObject(JSON.toJSONString(o.get("v"))); |
| | | tableData.add(o); |
| | | if (BeanUtil.isNotEmpty(v.get("ps"))) { |
| | | JSONObject ps = JSON.parseObject(JSON.toJSONString(v.get("ps"))); |
| | | if (ps.get("value").equals("检验项") && v.get("v").equals(product.getInspectionItem())) { |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | product.setTemplate(tableData); |
| | | }*/ |
| | | product.setTemplate(cellData); |
| | | product.setStyle(style); |
| | | } |
| | | } |