zss
2024-07-31 0e2e829f10a5e5b239d6583d6be3afbcaed0dcc0
inspect-server/src/main/java/com/yuanchu/mom/service/impl/InsOrderPlanServiceImpl.java
@@ -227,7 +227,7 @@
        // 防止回环地址变为IPv6
        String ip =  ipAddress.equals("0:0:0:0:0:0:0:1") ? "127.0.0.1" : ipAddress;
        insProducts.forEach(i -> {
            Map<String, Object> devices = baseMapper.getDeviceMessage(ip, i.getInspectionItem(), i.getInspectionItemSubclass());
            Map<String, Object> devices = baseMapper.getDeviceMessage(ip, i.getInspectionItem(), i.getInspectionItemSubclass(), i.getSampleType());
            if (ObjectUtils.isNotEmpty(devices) && ObjectUtils.isNotEmpty(devices.get("file_type")) && ObjectUtils.isNotEmpty(devices.get("collect_url"))) {
                InsProductResult insProductResult = i.getInsProductResult();
                if (ObjectUtils.isEmpty(insProductResult)) {
@@ -399,7 +399,7 @@
                                ProductVo productVo = new ProductVo();
                                productVo.setCode(insFiber.getCode());
                                productVo.setColor(fiber.getColor());
                                productVo.setBushColor(fiber.getBushColor());
                                productVo.setBushColor(insBushing.getColor());
                                if (ObjectUtils.isNotEmpty(insProductResult)) {
                                    insProduct.setInsProductResult(insProductResult);
                                }
@@ -432,7 +432,7 @@
                        for (InsProduct insProduct : insProducts) {
                            InsProductResult insProductResult = insProductResultMapper.selectOne(Wrappers.<InsProductResult>lambdaQuery().eq(InsProductResult::getInsProductId, insProduct.getId()));
                            ProductVo productVo = new ProductVo();
                            productVo.setCode("/");
                            productVo.setCode("-");
                            productVo.setColor(fiber.getColor());
                            productVo.setBushColor(fiber.getBushColor());
                            insProduct.setInsProductResult(insProductResult);
@@ -1756,7 +1756,7 @@
            } catch (Exception e) {
                throw new ErrorException("找不到检验人的签名");
            }
            if (signatureUrl.equals("")) {
            if (ObjectUtils.isEmpty(signatureUrl)  || signatureUrl.equals("")) {
                throw new ErrorException("找不到检验人的签名");
            }
            //Custom custom = customMapper.selectById(user.get("company"));
@@ -3447,6 +3447,11 @@
                throw new RuntimeException(e);
            }
        }
        else {
            //复核不通过将把复核的负责人去掉
            Integer id = insSampleUserMapper.selectOne(Wrappers.<InsSampleUser>lambdaQuery().eq(InsSampleUser::getInsSampleId, orderId).orderByDesc(InsSampleUser::getId).last("limit 1")).getId();
            insSampleUserMapper.deleteById(id);
        }
        return 1;
    }
@@ -3477,7 +3482,7 @@
    }
    @Override
    public int submitPlan(Integer orderId, String laboratory, Integer verifyUser, String entrustCode, String sampleCode) {
    public int submitPlan(Integer orderId, String laboratory, Integer verifyUser, String entrustCode) {
        List<InsSample> insSamples = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery().eq(InsSample::getInsOrderId, orderId).select(InsSample::getId));
        List<Integer> ids = insSamples.stream().map(a -> a.getId()).collect(Collectors.toList());
        List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery()
@@ -3567,8 +3572,8 @@
            return null;
        });
        // 删除数采采集次数
        String key = "frequency" + ":" + entrustCode + ":" + sampleCode;
        RedisUtil.del(key);
        String key = "frequency" + ":" + entrustCode + ":*";
        RedisUtil.delsLike(key);
        return 1;
    }