Ver código fonte

点检任务管理,添加点检记录导出功能,子表处置添加数据字典处理

huangpeng 8 meses atrás
pai
commit
d8ba95c7d5

+ 7 - 0
bs-common/src/main/java/com/rongwei/safecommon/utils/SaveConstans.java

@@ -971,5 +971,12 @@ public class SaveConstans {
         //设备子系统ID,NAME
         public static final String DEVICESUBSYSTEMID = "b6ab1e33b3464fdd996145f8715c605e";
         public static final String DEVICESUBSYSTEMNAME = "设备子系统";
+
+        public static final Map<String, String> CHECKIETM_MANAGEMENT_MAP = new HashMap<String, String>() {{
+            put("10", "正常");
+            put("20", "禁用");
+            put("30", "报修关注");
+            put("50", "/");
+        }};
     }
 }

+ 6 - 2
cx-safe-check/cx-save-check-common/src/main/java/com/rongwei/sfcommon/sys/service/impl/PointCheckServiceImpl.java

@@ -19,6 +19,7 @@ import com.rongwei.rwadmincommon.system.service.SysConfigFeignService;
 import com.rongwei.rwadmincommon.system.service.SysUserOrgService;
 import com.rongwei.rwadmincommon.system.service.SysUserService;
 import com.rongwei.rwcommon.base.QueryPar;
+import com.rongwei.rwcommon.base.R;
 import com.rongwei.rwcommon.base.exception.CustomException;
 import com.rongwei.rwcommon.utils.SecurityUtil;
 import com.rongwei.rwcommon.utils.StringUtils;
@@ -46,6 +47,7 @@ import java.util.*;
 import java.util.stream.Collectors;
 
 import static com.rongwei.safecommon.utils.SaveConstans.COMPANY_MAP;
+import static com.rongwei.safecommon.utils.SaveConstans.SysUser.CHECKIETM_MANAGEMENT_MAP;
 import static com.rongwei.sfcommon.utils.CommonUtil.streamCodeGeneration;
 
 @Service("pointCheckService")
@@ -479,8 +481,9 @@ public class PointCheckServiceImpl extends ServiceImpl<PointCheckDao, PointCheck
     }
 
     @Override
-    public void excelExport(PointCheckExcelData excelData, HttpServletResponse response) {
+    public void excelExport(PointCheckExcelData excelData, HttpServletResponse response)  {
         logger.info("Excel导出开始...");
+
         //1. 整理主子表数据
         List<PointCheckVo> mains =pointCheckDao.getExcelDataByids(excelData.getIds());
         //2.子表数据
@@ -535,6 +538,7 @@ public class PointCheckServiceImpl extends ServiceImpl<PointCheckDao, PointCheck
             throw new CustomException("导出失败");
         }
         logger.info("Excel导出结束...");
+
     }
 
     /**
@@ -612,7 +616,7 @@ public class PointCheckServiceImpl extends ServiceImpl<PointCheckDao, PointCheck
             row.getCell(1).setCellValue(pointCheckItemDos.get(i).getCheckcontent());
             row.getCell(2).setCellValue(pointCheckItemDos.get(i).getChecktype());
             row.getCell(3).setCellValue(pointCheckItemDos.get(i).getCheckstandard());
-            row.getCell(4).setCellValue(pointCheckItemDos.get(i).getManagement());
+            row.getCell(4).setCellValue(CHECKIETM_MANAGEMENT_MAP.get(pointCheckItemDos.get(i).getManagement()));
             row.getCell(5).setCellValue(pointCheckItemDos.get(i).getQuotavalue()==null?null:pointCheckItemDos.get(i).getQuotavalue().toPlainString());
             row.getCell(6).setCellValue(pointCheckItemDos.get(i).getRemark());
         }