| | |
| | | JSONObject jo = JSON.parseObject(JSON.toJSONString(v)); |
| | | InsProduct insProduct = new InsProduct(); |
| | | insProduct.setId(Integer.parseInt(k)); |
| | | InsProductResult result = insProductResultMapper.selectOne(Wrappers.<InsProductResult>lambdaQuery().eq(InsProductResult::getInsProductId, insProduct.getId())); |
| | | if (BeanUtil.isEmpty(result)) { |
| | | result = new InsProductResult(); |
| | | List<InsProductResult> results = insProductResultMapper.selectList(Wrappers.<InsProductResult>lambdaQuery().eq(InsProductResult::getInsProductId, insProduct.getId())); |
| | | InsProductResult result; |
| | | if (CollectionUtils.isEmpty(results)) { |
| | | result = new InsProductResult(); |
| | | } else { |
| | | result = results.get(0); |
| | | } |
| | | result.setInsProductId(Integer.parseInt(k)); |
| | | if (jo.get("insValue") != null) { |
| | |
| | | } |
| | | templateSet.add(JSON.toJSONString(b.getTemplate())); |
| | | } |
| | | AtomicInteger index = new AtomicInteger(); |
| | | Set<String> itemSet = new HashSet<>(); |
| | | templateSet.forEach(tem -> { |
| | | AtomicInteger index = new AtomicInteger(); |
| | | Set<Integer> set2 = new HashSet<>(); |
| | | List<RowRenderData> rows = new ArrayList<>(); |
| | | List<TextRenderData> text = new ArrayList<>(); |
| | |
| | | break; |
| | | } |
| | | } else if (value.equals("序号")) { |
| | | index.getAndIncrement(); |
| | | if(itemSet.add(p.getInspectionItem())){ |
| | | index.getAndIncrement(); |
| | | } |
| | | textRenderData.setText(index + ""); |
| | | } else if (value.equals("计算值")) { |
| | | JSONArray jsonArray = JSON.parseArray(p.getInsProductResult().getComValue()); |
| | |
| | | } else if (value.equals("试验方法")) { |
| | | textRenderData.setText(p.getMethodS()); |
| | | } else if (value.equals("检验项")) { |
| | | Console.log(p.getInspectionItem() + "\n" + p.getInspectionItemEn()); |
| | | textRenderData.setText(p.getInspectionItem() + "\n" + p.getInspectionItemEn()); |
| | | } else if (value.equals("检验子项")) { |
| | | Console.log(p.getInspectionItemSubclass() + "\n" + p.getInspectionItemSubclassEn()); |
| | | if (ObjectUtils.isEmpty(p.getInspectionItemSubclassEn())) { |
| | | textRenderData.setText(p.getInspectionItemSubclass()); |
| | | } else { |