zouyu
2025-03-19 3647aa5008055528f075ee73002542a1399575ae
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderServiceImpl.java
@@ -1029,6 +1029,7 @@
    public List<Map<String, Object>> viewDetails(Map<String, Object> map) {
        List<Map<String, Object>> list = new ArrayList<>();
        String inspectionItem = map.get("inspectionItem").toString(); // 检验项
        String inspectionItemSubclass = map.get("inspectionItemSubclass").toString(); // 检验子项
        if (inspectionItem.equals("单根垂直燃烧")) {
            ArrayList<Integer> numbers = new ArrayList<>();
            InsProduct insProduct = insProductMapper.selectById(Integer.parseInt(map.get("insProductId").toString()));
@@ -1144,10 +1145,9 @@
        } else {
            // 松套管 过滤出检验项名称一致的数据
            List<InsProduct> productList = insProductMapper.selectList(new LambdaQueryWrapper<InsProduct>()
                            .eq(InsProduct::getInsSampleId, Integer.parseInt(map.get("insSampleId").toString())))
                    .stream()
                    .filter(item -> item.getInspectionItem().equals(inspectionItem))
                    .collect(Collectors.toList());
                    .eq(InsProduct::getInspectionItem, inspectionItem)
                    .eq(StringUtils.isNotEmpty(inspectionItemSubclass),InsProduct::getInspectionItemSubclass, inspectionItemSubclass)
                    .eq(InsProduct::getInsSampleId, Integer.parseInt(map.get("insSampleId").toString())));
            for (InsProduct product : productList) {
                HashMap<String, Object> map2 = new HashMap<>();
                map2.put("entrustCode", map.get("entrustCode")); // 委托编号
@@ -1160,12 +1160,6 @@
                    color = insBushingMapper.selectById(product.getInsBushId()).getColor(); // 套管
                }
                map2.put("color", color); // 套管颜色
//                InsProductResult result = insProductResultMapper.selectOne(new LambdaQueryWrapper<InsProductResult>()
//                        .eq(InsProductResult::getInsProductId, product.getId()));
//                if(!Objects.isNull(result)) {
//                    List<Map> maps = JSONArray.parseArray(result.getInsValue(), Map.class);
//                    map2.put("insValue",maps.get(0).get("v").toString()); // 检验结果
//                }
                list.add(map2);
            }
        }
@@ -1864,16 +1858,12 @@
    @Override
    public Map<String, Object> costStatistics(IPage<CostStatisticsDto> page, CostStatisticsDto costStatisticsDto) {
    public IPage<CostStatisticsDto> costStatistics(IPage<CostStatisticsDto> page, CostStatisticsDto costStatisticsDto) {
        String dates = costStatisticsDto.getDates();
        String[] split = dates.replaceAll("\\[", "").replaceAll("]", "").replaceAll("\"", "").split(",");
        costStatisticsDto.setDates(null);
        Map<String, Object> map = new HashMap<>();
//        map.put("head", PrintChina.printChina(CostStatisticsDto.class));
        Map<String, Integer> map1 = new HashMap<>();
        if (map1.get("look") == 1) costStatisticsDto.setCreateUser(map1.get("userId"));
        // 获取当前人所在实验室
        Integer userId = 1;
        Integer userId = Integer.parseInt(SecurityUtils.getLoginUser().getUser().getUserId().toString());
        String departLimsId = userMapper.selectById(userId).getDepartLimsId();
        String laboratory = "";
        if (StringUtils.isNotBlank(departLimsId)) {
@@ -1900,8 +1890,7 @@
            return dto;
        }).collect(Collectors.toList());
        dtoIPage.setRecords(collect);
        map.put("body", dtoIPage);
        return map;
        return dtoIPage;
    }
    @Override