chenrui
2025-04-08 de0494d7a6f99f50fa33b9487dd2ffefca82e8b6
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderPlanServiceImpl.java
@@ -99,14 +99,9 @@
    private InsOrderStateMapper insOrderStateMapper;
    @Resource
    private InsProductMapper insProductMapper;
    @Resource
    private ShiftTimeMapper shiftTimeMapper;
    @Resource
    private PerformanceShiftMapper performanceShiftMapper;
    @Value("${wordUrl}")
    private String wordUrl;
    @Value("${twoCode}")
    private String twoCode;
    @Resource
    private InsReportMapper insReportMapper;
    @Resource
@@ -229,17 +224,19 @@
        // 查询厂家密度
        String supplierDensity = "";
        SampleProductDto sampleProductDto = list.get(0);
        if (CollectionUtils.isNotEmpty(list)) {
            SampleProductDto sampleProductDto = list.get(0);
        // 判断有没有绑定型号
        String modelValue = insSampleMapper.selectSupplierDensityModel(sampleProductDto.getSample(),
                order.getProduction(),
                sampleProductDto.getModel());
        if (StringUtils.isNotBlank(modelValue)) {
            supplierDensity = modelValue;
        } else {
            supplierDensity = insSampleMapper.selectSupplierDensity(sampleProductDto.getSample(),
                    order.getProduction());
            // 判断有没有绑定型号
            String modelValue = insSampleMapper.selectSupplierDensityModel(sampleProductDto.getSample(),
                    order.getProduction(),
                    sampleProductDto.getModel());
            if (StringUtils.isNotBlank(modelValue)) {
                supplierDensity = modelValue;
            } else {
                supplierDensity = insSampleMapper.selectSupplierDensity(sampleProductDto.getSample(),
                        order.getProduction());
            }
        }
        map.put("supplierDensity", supplierDensity);
        return map;
@@ -781,11 +778,13 @@
            int count = 0;
            for (InsProduct product : insProducts) {
                count++;
                str += "<br/>" + count + ":" + product.getInspectionItem() + " " + product.getInspectionItemSubclass() + "<br/>";
                str +=  (count != 0 ? "\n" : "") + count + ":" +
                        product.getInspectionItemClass() + " " +
                        product.getInspectionItem() + " " +
                        product.getInspectionItemSubclass();
            }
            if (ObjectUtils.isNotEmpty(str)) {
                throw new ErrorException("<strong>存在待检验的项目:</strong><br/>" + str);
                throw new ErrorException("存在待检验的项目:" + str);
            }
        }
@@ -1542,7 +1541,8 @@
        // 检测依据
        Set<String> standardMethod = new HashSet<>();
        StringBuilder standardMethod2 = new StringBuilder();
        standardMethod.add(baseMapper.getStandardMethodCode(insSample.getStandardMethodListId()));
        // TODO 检验的对象的检验标准由一个多个 数据类型由int变字符串 需要重写写这块逻辑
//        standardMethod.add(baseMapper.getStandardMethodCode(insSample.getStandardMethodListId()));
        for (String s : standardMethod) {
            standardMethod2.append("、").append(s);
        }
@@ -2086,7 +2086,9 @@
        samples.forEach(a -> {
            Map<Integer, String> map2 = new HashMap<>();
            models.add(a.getModel());
            String standardMethodCode = baseMapper.getStandardMethodCode(a.getStandardMethodListId());
            // TODO 检验的对象的检验标准由一个多个 数据类型由int变字符串 需要重写写这块逻辑
//            String standardMethodCode = baseMapper.getStandardMethodCode(a.getStandardMethodListId());
            String standardMethodCode = "";
            if (StrUtil.isNotBlank(a.getSpecialStandardMethod())) {
                standardMethodCode = standardMethodCode + "+" + a.getSpecialStandardMethod();
            }