zss
2024-11-22 d589bf94e8f1863336d23fdd951049622b64db68
inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java
@@ -312,7 +312,7 @@
        String contentType = file.getContentType();
        InsOrderFile insOrderFile = new InsOrderFile();
        insOrderFile.setInsOrderId(orderId);
        insOrderFile.setFileName(filename);
        if (contentType != null && contentType.startsWith("image/")) {
            // 是图片
            path = imgUrl;
@@ -331,6 +331,7 @@
            urlString = realpath + "/" + pathName;
            file.transferTo(new File(urlString));
            insOrderFile.setFileUrl(pathName);
            insOrderFile.setFileName(pathName);
            if (ObjectUtils.isNotEmpty(sonLaboratory)) {
                insOrderFile.setSonLaboratory(sonLaboratory);
                //删除重复的数据
@@ -355,7 +356,7 @@
            if (ObjectUtils.isNotEmpty(sonLaboratory) && (sonLaboratory.equals("近场") || sonLaboratory.equals("远场")) &&
                    split[split.length - 1].equals("csv")) {
                //判断是哪种csv文件,是否有——
                if (!file.getOriginalFilename().contains("——")) {
                if (sonLaboratory.equals("近场")) {
                    fuSheUtils.getFuSheWord1(sonLaboratory, insOrderFile);
                } else {
                    fuSheUtils.getFuSheWord2(sonLaboratory, insOrderFile);
@@ -414,9 +415,7 @@
                orderState.setInsState(0);
                orderState.setNum(orderState.getNum() + 1);//递增
                insOrderStateMapper.updateById(orderState);
            } /*else {
                throw new ErrorException("该订单站点的任务已创建,无法再次创建!");
            }*/
            }
        } else {
            InsOrderState insOrderState = new InsOrderState();
            insOrderState.setInsOrderId(insSample.getInsOrderId());
@@ -751,8 +750,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; //不合格
@@ -886,7 +886,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) {
@@ -999,9 +999,9 @@
                            }
                        }
                        insOrder.setState(4);
                        insOrderMapper.updateById(insOrder);
                    }
                    insOrder.setState(4);
                    insOrderMapper.updateById(insOrder);
                    break;
            }
        }
@@ -1117,9 +1117,9 @@
        info.setViewStatus(false);
        info.setJumpPath("b1-inspect-order-plan");
        informationNotificationService.addInformationNotification(info);
        // todo 企业微信消息推送@zss
        //  todo 企业微信消息推送@zss
            HashMap<String, Object> map = new HashMap<>();
            String account = userMapper.selectById(userId).getAccount();
            String account = userMapper.selectById(submitPlanDto.getVerifyUser()).getAccount();
            map.put("touser", account);//接收消息成员的账号'ZT-031292'这种类型(如果有多个用'|'分隔)
            map.put("toparty", "");//接收部门id
            map.put("totag", "");//消息标签id
@@ -1198,7 +1198,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);
                }
            }