inspect-server/src/main/java/com/yuanchu/mom/controller/InsOrderPlanController.java
@@ -9,9 +9,11 @@ import com.yuanchu.mom.dto.InsProductDto; import com.yuanchu.mom.dto.InsProductResultDto; import com.yuanchu.mom.dto.SubmitPlanDto; import com.yuanchu.mom.mapper.InsSampleUserMapper; import com.yuanchu.mom.pojo.InsOrderFile; import com.yuanchu.mom.pojo.InsOrderState; import com.yuanchu.mom.pojo.InsProductResult; import com.yuanchu.mom.pojo.InsSampleUser; import com.yuanchu.mom.service.*; import com.yuanchu.mom.utils.JackSonUtil; import com.yuanchu.mom.vo.InsProductResultVo; @@ -44,6 +46,8 @@ private InsProductService insProductService; private InsOrderStateService insOrderStateService; private InsSampleUserMapper insSampleUserMapper; @ValueClassify("检验任务") @ApiOperation(value = "获取检验任务列表") @@ -256,4 +260,16 @@ return Result.success(insOrderPlanService.preview(id)); } @ValueAuth @PostMapping("/getCheckUser") @ApiOperation("获取当前检验任务的所有检验员信息") //这里的传参是样品id,等检验任务那块全改了之后这里就没问题 public Result<?> getCheckUser(Integer id,String sonLaboratory) { List<InsSampleUser> insSampleUsers = insSampleUserMapper.selectList(Wrappers.<InsSampleUser>lambdaQuery() .eq(InsSampleUser::getState, 0) //检验人 .eq(InsSampleUser::getInsSampleId, id) .eq(InsSampleUser::getSonLaboratory, sonLaboratory)); return Result.success(insSampleUsers); } } inspect-server/src/main/java/com/yuanchu/mom/service/InsOrderPlanService.java
@@ -65,4 +65,5 @@ Object preview(Integer id) throws Exception; int saveInsContext3(InsProductResult insProductResult); } inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java
@@ -78,6 +78,8 @@ private ShiftTimeMapper shiftTimeMapper; @Resource private PerformanceShiftMapper performanceShiftMapper; @Resource private WarehouseHistoryMapper warehouseHistoryMapper; @Resource private WarehouseService warehouseService; @@ -87,6 +89,9 @@ @Resource WordUtils wordUtils; @Resource private InsReportMapper insReportMapper; @Resource private InsProductResultMapper insProductResultMapper; @@ -730,8 +735,9 @@ //结论 int ressult = 1; String valueStr = insProductResult2.getValue(); String regex ="[\u4e00-\u9fa5]"; if (!insProduct.getAsk().contains(",")) { if (insProduct.getAsk().equals("/")) { if (insProduct.getAsk().equals("/") || Pattern.compile(regex).matcher(insProduct.getAsk()).find()) { ressult = 3; //不判定 } else if (!isValueValid(valueStr, new String[]{insProduct.getAsk()})) { ressult = 0; //不合格 @@ -866,7 +872,7 @@ if (ObjectUtils.isEmpty(s)) { continue; } double numericValue = Double.parseDouble(s); double numericValue = Math.abs(Double.parseDouble(s)); boolean valid = Arrays.stream(valuesToCheck) .allMatch(v -> getResult(numericValue, v)); if (!valid) { @@ -1164,7 +1170,7 @@ DateTime parse = DateUtil.parse(localDateTime.format(formatter)); auxiliaryOutputWorkingHours.setWeekDay(getWeek(localDateTime.format(formatters)));//星期 auxiliaryOutputWorkingHours.setWeek(String.valueOf(DateUtil.weekOfYear(DateUtil.offsetDay(parse, 1))));//周次 auxiliaryOutputWorkingHours.setCheck(userId);//检测人 auxiliaryOutputWorkingHours.setCheck(userId);//todo 检测人(后面要去掉由前端传入) auxiliaryOutputWorkingHoursMapper.insert(auxiliaryOutputWorkingHours); } } inspect-server/src/main/java/com/yuanchu/mom/utils/FuSheUtils.java
@@ -59,6 +59,7 @@ Exceldata exceldata = new Exceldata(); Map<Integer, Object> project = new HashMap<>(); HashMap<String, Object> datas1 = new HashMap<>(); Boolean exitLoop=false; for (int i = 0; i < workbook.getNumberOfSheets(); i++) { String s = ""; Sheet sheet = workbook.getSheetAt(i); @@ -91,6 +92,10 @@ } else { switch (cell.getCellType()) { case STRING: if (cell.getColumnIndex()==1) { exitLoop=true; break; } if (StringUtils.isNotEmpty(s)) { datas.put(s, list); } @@ -115,6 +120,10 @@ System.out.print("NULL\t"); } } if (exitLoop){ exitLoop=false; break; } if (map.isEmpty()) { list.add(map); } @@ -137,15 +146,17 @@ for (Map<String, Object> number : hashMaps) { number.put("端口", s1); Double o = (Double) number.get("频率"); floatList.add(o); if (o!=null) { floatList.add(o); } } Double maxValue = Collections.max(floatList); Double minValue = Collections.min(floatList); if (map.get(minValue + "-" + maxValue + "-" + s) == null) { map.put(minValue + "-" + maxValue + "-" + s, s1); if (map.get(minValue + "," + maxValue + "," + s) == null) { map.put(minValue + "," + maxValue + "," + s, s1); } else { Object o = map.get(minValue + "-" + maxValue + "-" + s); map.put(minValue + "-" + maxValue + "-" + s, s1 + "," + o); Object o = map.get(minValue + "," + maxValue + "," + s); map.put(minValue + "," + maxValue + "," + s, s1 + "," + o); } } } @@ -341,8 +352,8 @@ runs.setText("辐射方向图参数"); for (String s : map.keySet()) { Map<String, Object> dataRow = exceldata.getDataRow(); String result = s.substring(s.lastIndexOf("-") + 1); String result1 = s.substring(0, s.lastIndexOf("-")); String result = s.substring(s.lastIndexOf(",") + 1); String result1 = s.substring(0, s.lastIndexOf(",")); String o = map.get(s).toString(); String[] split = o.split(","); Integer s1 = Integer.parseInt(split[split.length - 1]);