From 996c3fb89b185eedf2fd58a6c5bd5586e04cdccf Mon Sep 17 00:00:00 2001 From: zss <zss@example.com> Date: 星期四, 21 八月 2025 17:47:01 +0800 Subject: [PATCH] 电路试验,不同频段的要求值可以进行调整 --- inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java | 49 ++++++++++++++++++++++++++++++------------------- 1 files changed, 30 insertions(+), 19 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 bf5c26f..59a62f1 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 @@ -139,16 +139,21 @@ map.put("head", PrintChina.printChina(InsOrderPlanVO.class)); Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId(null); String laboratory = null; - String userName = null; + String myName = null; if (ObjectUtil.isNotEmpty(insOrderPlanDTO.getUserId())) { - userName = userMapper.selectById(map1.get("userId")).getName(); + myName = userMapper.selectById(map1.get("userId")).getName(); insOrderPlanDTO.setUserId(null); + } + //妫�楠屼汉 + if (ObjectUtil.isNotEmpty(insOrderPlanDTO.getUserName())){ + myName=(ObjectUtils.isNotNull(myName)?myName+",":"")+insOrderPlanDTO.getUserName(); + insOrderPlanDTO.setUserName(null); } String sonLaboratory = insOrderPlanDTO.getSonLaboratory();//璇曢獙瀹� insOrderPlanDTO.setSonLaboratory(null); String sampleCode = insOrderPlanDTO.getSampleCode(); insOrderPlanDTO.setSampleCode(null); - IPage<InsOrderPlanVO> insOrderPage = insSampleMapper.findInsSampleAndOrder(page, QueryWrappers.queryWrappers(insOrderPlanDTO), userName, sonLaboratory, laboratory,sampleCode); + IPage<InsOrderPlanVO> insOrderPage = insSampleMapper.findInsSampleAndOrder(page, QueryWrappers.queryWrappers(insOrderPlanDTO), myName, sonLaboratory, laboratory,sampleCode); map.put("body", insOrderPage); return map; } @@ -805,10 +810,12 @@ List<InsProductResult2> result2s = new ArrayList<>(); List<InsProductUser> insProductUsers = new ArrayList<>(); for (InsProductResult2 insProductResult2 : insProductResultDtos.getInsProductResult2s()) { - InsProduct insProduct = new InsProduct(); - insProduct.setId(insProductResult2.getInsProductId());//椤圭洰id InsProductResult2 result2 = new InsProductResult2(); + //瑕佹眰鍊� + result2.setAsk(insProductResult2.getAsk()); + //娆℃暟 result2.setNum(orderState.getNum()); + //鍏宠仈椤圭洰id result2.setInsProductId(insProductResult2.getInsProductId()); //棰戠巼 result2.setFrequency(insProductResultDtos.getFrequency()); @@ -832,7 +839,7 @@ if (insProductResult2.getEquipName() != null) { result2.setEquipName(insProductResult2.getEquipName()); } - insProduct = insProductMapper.selectById(insProduct.getId()); +// InsProduct insProduct = insProductMapper.selectById(insProductResult2.getInsProductId()); //鍊� if (insProductResult2.getValue() != null) { result2.setValue(insProductResult2.getValue()); @@ -840,15 +847,15 @@ int ressult = 1; String valueStr = insProductResult2.getValue(); String regex = "[\u4e00-\u9fa5]"; - if (!insProduct.getAsk().contains(",")) { - if (insProduct.getAsk().equals("/") || Pattern.compile(regex).matcher(insProduct.getAsk()).find()) { + if (!insProductResult2.getAsk().contains(",")) { + if (insProductResult2.getAsk().equals("/") || Pattern.compile(regex).matcher(insProductResult2.getAsk()).find()) { ressult = 3; //涓嶅垽瀹� - } else if (!isValueValid(valueStr, new String[]{insProduct.getAsk()})) { + } else if (!isValueValid(valueStr, new String[]{insProductResult2.getAsk()})) { ressult = 0; //涓嶅悎鏍� } } else { // 濡傛灉瑕佹眰鍊兼槸(2掳鈮�20,7掳鈮�25,12掳鈮�25)杩欑鎯呭喌 - String[] askParts = insProduct.getAsk().split(","); + String[] askParts = insProductResult2.getAsk().split(","); String[] angles = insProductResult2.getAngle().split(","); for (String s : askParts) { String[] askSplit = s.split("掳"); @@ -882,12 +889,7 @@ result2.setCreateUser(userId); result2.setUpdateUser(userId); result2s.add(result2); - //insProductResult2Mapper.insert(result2); - //insProduct.setUpdateUser(userId); - //insProducts.add(insProduct); - //insProductMapper.updateById(insProduct); - insProductUsers.add(new InsProductUser(null, userId, LocalDateTime.now(), insProduct.getId())); - //insProductUserMapper.insert(new InsProductUser(null, userId, LocalDateTime.now(), insProduct.getId())); + insProductUsers.add(new InsProductUser(null, userId, LocalDateTime.now(), insProductResult2.getInsProductId())); /*鏇存柊鏍峰搧鐨勬楠岀姸鎬�*/ insSample.setInsState(1); Long l = insProductMapper.selectCount(Wrappers.<InsProduct>lambdaQuery() @@ -926,6 +928,15 @@ saveInsContext2(insProductResultDto); } return 1; + } + + //鏍峰搧缂栧彿鏇存敼 + @Override + public int changeSampleCode(Integer sampleId, String sampleCode) { + InsSample insSample = new InsSample(); + insSample.setId(sampleId); + insSample.setSampleCode(sampleCode); + return insSampleMapper.updateById(insSample); } /** @@ -1106,7 +1117,7 @@ if (ObjectUtils.isEmpty(s)) { continue; } - double numericValue = Math.abs(Double.parseDouble(s)); + double numericValue = Double.parseDouble(s); boolean valid = Arrays.stream(valuesToCheck) .allMatch(v -> getResult(numericValue, v)); if (!valid) { @@ -1225,7 +1236,7 @@ .set(InsOrderState::getVerifyTell, tell) .set(InsOrderState::getVerifyUser, userId)); /*鐢熸垚瀵瑰簲鐨勬楠屾姤鍛�*/ - List<InsReportDto1> insReportDto1s=insOrderUserMapper.selectInsReportDto1(insOrder.getId()); + List<InsReportDto1> insReportDto1s=insOrderUserMapper.selectInsReportDto1(insOrder.getId(),null); createReport(insOrder.getId(),insReportDto1s); break; } @@ -1325,7 +1336,7 @@ .set(InsOrderState::getVerifyUser, userId)); } /*鐢熸垚瀵瑰簲鐨勬楠屾姤鍛�*/ - List<InsReportDto1> insReportDto1s=insOrderUserMapper.selectInsReportDto1(insOrder.getId()); + List<InsReportDto1> insReportDto1s=insOrderUserMapper.selectInsReportDto1(insOrder.getId(),sampleId); createReport(insOrder.getId(),insReportDto1s); break; } -- Gitblit v1.9.3