李林
2024-06-27 da54d3fe5b3bd4ae92c43ac93e9619d2e15c8a7b
inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java
@@ -273,9 +273,12 @@
                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) {
@@ -511,8 +514,9 @@
                    }
                    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<>();
@@ -635,7 +639,9 @@
                                        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());
@@ -651,10 +657,8 @@
                            } 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 {