From cda20cfc03352a1ce534fecef438806de2cc61a5 Mon Sep 17 00:00:00 2001 From: Crunchy <3114200645@qq.com> Date: 星期五, 09 八月 2024 18:44:43 +0800 Subject: [PATCH] 模板适配onoloffice --- inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java | 36 +++++++++++++++++++++++++++++------- 1 files changed, 29 insertions(+), 7 deletions(-) diff --git a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java index cc30704..02be8fc 100644 --- a/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java +++ b/inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java @@ -162,6 +162,7 @@ insOrderPlanDTO.setUserId(null); } String sonLaboratory = insOrderPlanDTO.getSonLaboratory();//璇曢獙瀹� + insOrderPlanDTO.setSonLaboratory(null); IPage<InsOrderPlanVO> insOrderPage = insSampleMapper.findInsSampleAndOrder(page, QueryWrappers.queryWrappers(insOrderPlanDTO), userName, sonLaboratory, laboratory); map.put("body", insOrderPage); return map; @@ -249,6 +250,12 @@ break; } + //濡傛灉鏄ぇ鏍峰搧涓嬬殑椤圭洰涓虹┖,閭d箞鏌ヨ绗竴涓厜绾ょ殑椤圭洰 + if (ObjectUtils.isEmpty(insProducts) && type==0){ + //鏌ヨ绗竴涓厜绾ょ殑id + List<InsFiber> insFibers = insFiberMapper.selectList(Wrappers.<InsFiber>lambdaQuery().eq(InsFiber::getInsBushingId, insBushingMapper.selectList(Wrappers.<InsBushing>lambdaQuery().eq(InsBushing::getInsSampleId, id)).get(0).getId())); + insProducts = insSampleMapper.getInsProduct3(insFibers.get(0).getId()); + } Set<Integer> set = new HashSet<>(); Map<Integer, String> map2 = new HashMap<>(); if (BeanUtil.isEmpty(insProducts)) return null; @@ -532,7 +539,7 @@ insProductResultMapper.deleteById(insProductResultss.get(i)); } } - InsProductResult insProductResult = insProductResultMapper.selectOne(Wrappers.<InsProductResult>lambdaQuery().eq(InsProductResult::getInsProductId, Integer.parseInt(k))); + //InsProductResult insProductResult = insProductResultMapper.selectOne(Wrappers.<InsProductResult>lambdaQuery().eq(InsProductResult::getInsProductId, Integer.parseInt(k))); //妫�楠屽�� if (jo.get("insValue") != null) { JSONArray jsonArray = JSON.parseArray(JSON.toJSONString(jo.get("insValue"))); @@ -761,8 +768,12 @@ auxiliaryOutputWorkingHours.setWeek(String.valueOf(DateUtil.weekOfYear(DateUtil.offsetDay(parse, 1))));//鍛ㄦ auxiliaryOutputWorkingHours.setCheck(userId);//妫�娴嬩汉 } - if (ObjectUtils.isEmpty(insProductResult) && !result.getInsValue().equals("[]") || (ObjectUtils.isNotEmpty(insProductResult) && !insProductResult.getInsValue().equals(result.getInsValue()) && !insProductResult.getInsValue().equals("[]"))) { - auxiliaryOutputWorkingHoursMapper.insert(auxiliaryOutputWorkingHours); + try { + if (CollectionUtils.isEmpty(insProductResultss) && !result.getInsValue().equals("[]") || (CollectionUtils.isNotEmpty(insProductResultss) && !insProductResultss.get(0).getInsValue().equals(result.getInsValue()) && !insProductResultss.get(0).getInsValue().equals("[]"))) { + auxiliaryOutputWorkingHoursMapper.insert(auxiliaryOutputWorkingHours); + } + }catch (Exception e){ + System.out.println("宸ユ椂鏂板涓嶆垚鍔�!!!"); } } } @@ -775,9 +786,9 @@ Long l1 = insProductMapper.selectCount(Wrappers.<InsProduct>lambdaQuery() .eq(InsProduct::getInsSampleId, insSample.getId()) .and(wrapper -> wrapper - .isNull(InsProduct::getInsResult) + .isNotNull(InsProduct::getInsResult) .or() - .eq(InsProduct::getInsResult, 2) + .ne(InsProduct::getInsResult, 2) )); if (l == l1) { insSample.setInsState(2); @@ -1128,8 +1139,19 @@ textRenderData.setText("鉁�"); break; case 0: - resultCh.set(resultCh.get() + "銆�" + p.getInspectionItem() + (p.getInspectionItemSubclass().equals("") ? "" : " " + p.getInspectionItemSubclass())); - resultEn.set(resultEn.get() + "銆�" + p.getInspectionItemEn() + ((Objects.equals(p.getInspectionItemSubclassEn(), "") || Objects.equals(p.getInspectionItemSubclassEn(), null)) ? "" : " " + p.getInspectionItemSubclassEn())); + Set<String> uniqueItems1 = new HashSet<>(); + Set<String> uniqueItems2 = new HashSet<>(); + + String item1 = p.getInspectionItem() + (p.getInspectionItemSubclass().equals("") ? "" : " " + p.getInspectionItemSubclass()); + if (uniqueItems1.add(item1)) { + resultCh.set(resultCh.get() + "銆�" + item1); + } + //resultCh.set(resultCh.get() + "銆�" + p.getInspectionItem() + (p.getInspectionItemSubclass().equals("") ? "" : " " + p.getInspectionItemSubclass())); + String item2 = p.getInspectionItemEn() + ((Objects.equals(p.getInspectionItemSubclassEn(), "") || Objects.equals(p.getInspectionItemSubclassEn(), null)) ? "" : " " + p.getInspectionItemSubclassEn()); + if (uniqueItems2.add(item2)) { + resultEn.set(resultEn.get() + "銆�" + item2); + } + //resultEn.set(resultEn.get() + "銆�" + ); textRenderData.setText("鉁�"); break; default: -- Gitblit v1.9.3