Explorar el Código

报表服务调整

xy hace 2 semanas
padre
commit
4ddda1b46a

+ 20 - 16
tz-module-pressure2/tz-module-pressure2-biz/src/main/java/cn/start/tz/module/pressure2/service/dynamicOFData/pipe/QC12171_202401RecordOFData.java

@@ -153,12 +153,16 @@ public class QC12171_202401RecordOFData implements IDynamicOFData {
                 result.put("zipCode", equipPipeDO.getPostalCode());
                 result.put("pipeAddress", equipPipeDO.getPipeAddress());
                 result.put("useNo", equipPipeDO.getCertificateNo());
-//                List<String> pipeCategory = equipPipeDOS.stream().map(EquipPipeDO::getPipeCategory).distinct().toList();
-//                List<DictDataRespDTO> pipeType = dictDataApi.getDictDataList("PIPE_TYPE").getCheckedData();
-                // 按/拼接
-//                String pipeCategoryStr = pipeType.stream().filter(dict -> pipeCategory.contains(dict.getValue())).map(DictDataRespDTO::getLabel).distinct().collect(Collectors.joining("/"));
-//                result.put("pipeCategory", pipeCategoryStr);
+                List<String> pipeCategoryList = equipPipeDOS.stream().map(EquipPipeDO::getPipeCategory).distinct().toList();
 
+                if (pipeCategoryList.size() == 1){
+                    DictDataRespDTO pipeType = dictDataApi.getDictData("PIPE_TYPE", pipeCategoryList.get(0)).getCheckedData();
+                    if (pipeType != null){
+                        result.put("pipeCategory", pipeType.getLabel());
+                    }
+                }else{
+                    result.put("pipeCategory", "见一览表");
+                }
 
                 result.put("securityMan", equipPipeDO.getSecurityMan());
                 result.put("contactPhone", equipPipeDO.getContactPhone());
@@ -211,17 +215,17 @@ public class QC12171_202401RecordOFData implements IDynamicOFData {
                             .sum();
                     result.put("pipeLengthTotal", String.valueOf(pipeLengthTotal));
 
-                    String pipeCategory = equipPipeDO.getPipeCategory();
-                    if (StrUtil.isNotBlank(pipeCategory)) {
-                        if ("industry_pipe".equals(pipeCategory)) {
-                            result.put("pipeCategory_1", "true");
-                            result.put("pipeCategory_2", "false");
-                        }
-                        if ("public_pipe".equals(pipeCategory)) {
-                            result.put("pipeCategory_2", "true");
-                            result.put("pipeCategory_1", "false");
-                        }
-                    }
+//                    String pipeCategory = equipPipeDO.getPipeCategory();
+//                    if (StrUtil.isNotBlank(pipeCategory)) {
+//                        if ("industry_pipe".equals(pipeCategory)) {
+//                            result.put("pipeCategory_1", "true");
+//                            result.put("pipeCategory_2", "false");
+//                        }
+//                        if ("public_pipe".equals(pipeCategory)) {
+//                            result.put("pipeCategory_2", "true");
+//                            result.put("pipeCategory_1", "false");
+//                        }
+//                    }
                 }
             }