diff --git a/src/main/java/com/zcloud/controller/check/ListManagerController.java b/src/main/java/com/zcloud/controller/check/ListManagerController.java index 5eec737..5c57df7 100644 --- a/src/main/java/com/zcloud/controller/check/ListManagerController.java +++ b/src/main/java/com/zcloud/controller/check/ListManagerController.java @@ -1531,6 +1531,55 @@ public class ListManagerController extends BaseController { return map; } + /**根据分类统计清单 + * @param page + * @throws Exception + */ + @RequestMapping(value="/mergeCheckPlan") + @ResponseBody + @LogAnno(menuType= "双重预防",menuServer= "隐患排查",instructionsOperate = "排查计划",instructionsType = "根据分类统计清单") + public Object mergeCheckPlan() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + pd.put("CORPINFO_ID",Jurisdiction.getCORPINFO_ID()); + List planList = listmanagerService.listAllPlan(null); + Map planMap = new HashMap(); + for (PageData pageData : planList) { + pageData.put("dept_str", ""); + planMap.put(pageData.getString("type_bianma") + "," + pageData.getString("level_bianma") + "," + pageData.getString("period_bianma"),pageData); + } + //企业所有应查数 + List staList = listStatisticsService.mergeListAllForPlan(pd); + for (PageData pageData : staList) { + String rowName = pageData.getString("TYPE") + "," + pageData.getString("level_bianma") + "," + pageData.getString("PERIOD"); + PageData row = planMap.get(rowName); + if(row!=null){ + row.put("check_count",Integer.parseInt(row.get("check_count").toString()) + Integer.parseInt(pageData.get("NOTEXAMINEDNUM").toString())); + } + } + //企业所有清单数 + List liList = listmanagerService.mergeListAllForPlan(pd); + for (PageData pageData : liList) { + String rowName = pageData.getString("TYPE") + "," + pageData.getString("level_bianma") + "," + pageData.getString("PERIOD"); + PageData row = planMap.get(rowName); + if(row!=null){ + row.put("list_count",Integer.parseInt(row.get("list_count").toString()) + 1 ); + row.put("dept_str",row.get("dept_str").toString() + pageData.getString("DEPARTMENT_ID") + ","); + } + } + + for (PageData pageData : planList) { + if(pageData.get("dept_str")!=null && pageData.get("dept_str").toString()!="") + pageData.put("dept_count", new HashSet(Arrays.asList(pageData.get("dept_str").toString().substring(0,pageData.get("dept_str").toString().length()-1).split(","))).size()); + } + + map.put("planList",planList); + map.put("result", errInfo); + return map; + } + /**根据分类统计清单 * @param page * @throws Exception @@ -1580,7 +1629,6 @@ public class ListManagerController extends BaseController { return map; } - // /**根据分类统计清单 // * @param page // * @throws Exception diff --git a/src/main/java/com/zcloud/controller/check/StopListManagerController.java b/src/main/java/com/zcloud/controller/check/StopListManagerController.java index aaabd7e..7cdfeae 100644 --- a/src/main/java/com/zcloud/controller/check/StopListManagerController.java +++ b/src/main/java/com/zcloud/controller/check/StopListManagerController.java @@ -381,7 +381,6 @@ public class StopListManagerController extends BaseController { pd = this.getPageData(); pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人 pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 - pd.put("LISTMANAGER_ID",pd.getString("ID")); listmanagerService.enable(pd); map.put("result", errInfo); //返回结果 return map; diff --git a/src/main/java/com/zcloud/controller/eightwork/LimitSpaceController.java b/src/main/java/com/zcloud/controller/eightwork/LimitSpaceController.java index aa9350e..345e007 100644 --- a/src/main/java/com/zcloud/controller/eightwork/LimitSpaceController.java +++ b/src/main/java/com/zcloud/controller/eightwork/LimitSpaceController.java @@ -45,7 +45,7 @@ public class LimitSpaceController extends BaseController { * @throws Exception */ @RequestMapping(value="/add") - @RequiresPermissions("limitspace:add") +// @RequiresPermissions("limitspace:add") @ResponseBody @LogAnno(menuType= "高危作业管理",menuServer= "有限空间作业管理",instructionsOperate = "有限空间台账",instructionsType = "新增") public Object add() throws Exception{ @@ -70,7 +70,7 @@ public class LimitSpaceController extends BaseController { * @throws Exception */ @RequestMapping(value="/delete") - @RequiresPermissions("limitspace:del") +// @RequiresPermissions("limitspace:del") @ResponseBody @LogAnno(menuType= "高危作业管理",menuServer= "有限空间作业管理",instructionsOperate = "有限空间台账",instructionsType = "删除") public Object delete() throws Exception{ @@ -90,7 +90,7 @@ public class LimitSpaceController extends BaseController { * @throws Exception */ @RequestMapping(value="/edit") - @RequiresPermissions("limitspace:edit") +// @RequiresPermissions("limitspace:edit") @ResponseBody @LogAnno(menuType= "高危作业管理",menuServer= "有限空间作业管理",instructionsOperate = "有限空间台账",instructionsType = "修改") public Object edit() throws Exception{ diff --git a/src/main/java/com/zcloud/controller/hiddenDangerCheckStandard/CustomStopController.java b/src/main/java/com/zcloud/controller/hiddenDangerCheckStandard/CustomStopController.java index a25f15c..52e0290 100644 --- a/src/main/java/com/zcloud/controller/hiddenDangerCheckStandard/CustomStopController.java +++ b/src/main/java/com/zcloud/controller/hiddenDangerCheckStandard/CustomStopController.java @@ -381,7 +381,6 @@ public class CustomStopController extends BaseController { pd = this.getPageData(); pd.put("OPERATOR", Jurisdiction.getUsername()); //修改人 pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 - pd.put("CUSTOM_ID",pd.getString("ID")); customService.enable(pd); map.put("result", errInfo); //返回结果 return map; diff --git a/src/main/java/com/zcloud/mapper/datasource/check/ListManagerMapper.java b/src/main/java/com/zcloud/mapper/datasource/check/ListManagerMapper.java index e92130e..e738145 100644 --- a/src/main/java/com/zcloud/mapper/datasource/check/ListManagerMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/check/ListManagerMapper.java @@ -222,6 +222,8 @@ public interface ListManagerMapper { List listAllForPlan(PageData pd); + List mergeListAllForPlan(PageData pd); + List getCountNumBi(PageData pd); List listForDocking(PageData pd); diff --git a/src/main/java/com/zcloud/mapper/datasource/statistics/ListStatisticsMapper.java b/src/main/java/com/zcloud/mapper/datasource/statistics/ListStatisticsMapper.java index cea1753..78a5e1c 100644 --- a/src/main/java/com/zcloud/mapper/datasource/statistics/ListStatisticsMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/statistics/ListStatisticsMapper.java @@ -104,5 +104,7 @@ public interface ListStatisticsMapper { List countByPeriodUser(PageData pd); List listAllForPlan(PageData pd); + + List mergeListAllForPlan(PageData pd); } diff --git a/src/main/java/com/zcloud/service/check/ListManagerService.java b/src/main/java/com/zcloud/service/check/ListManagerService.java index 4934fad..fc8e389 100644 --- a/src/main/java/com/zcloud/service/check/ListManagerService.java +++ b/src/main/java/com/zcloud/service/check/ListManagerService.java @@ -215,6 +215,8 @@ public interface ListManagerService { public List listAllPlan(PageData pd)throws Exception; public List listAllForPlan(PageData pd)throws Exception; + public List mergeListAllForPlan(PageData pd)throws Exception; + public List getCountNumBi(PageData pd)throws Exception; void saveBaoBaoType(PageData pd) throws Exception; diff --git a/src/main/java/com/zcloud/service/check/impl/ListManagerServiceImpl.java b/src/main/java/com/zcloud/service/check/impl/ListManagerServiceImpl.java index 831ff78..559b731 100644 --- a/src/main/java/com/zcloud/service/check/impl/ListManagerServiceImpl.java +++ b/src/main/java/com/zcloud/service/check/impl/ListManagerServiceImpl.java @@ -314,6 +314,10 @@ public class ListManagerServiceImpl implements ListManagerService { return listmanagerMapper.listAllForPlan(pd); } + public List mergeListAllForPlan(PageData pd)throws Exception{ + return listmanagerMapper.mergeListAllForPlan(pd); + } + public List getCountNumBi(PageData pd)throws Exception{ return listmanagerMapper.getCountNumBi(pd); } diff --git a/src/main/java/com/zcloud/service/statistics/ListStatisticsService.java b/src/main/java/com/zcloud/service/statistics/ListStatisticsService.java index 5b47549..37d8934 100644 --- a/src/main/java/com/zcloud/service/statistics/ListStatisticsService.java +++ b/src/main/java/com/zcloud/service/statistics/ListStatisticsService.java @@ -106,5 +106,7 @@ public interface ListStatisticsService{ public List countByPeriodUser(PageData pd)throws Exception; public List listAllForPlan(PageData pd)throws Exception; + + public List mergeListAllForPlan(PageData pd)throws Exception; } diff --git a/src/main/java/com/zcloud/service/statistics/impl/ListStatisticsServiceImpl.java b/src/main/java/com/zcloud/service/statistics/impl/ListStatisticsServiceImpl.java index a647859..f150779 100644 --- a/src/main/java/com/zcloud/service/statistics/impl/ListStatisticsServiceImpl.java +++ b/src/main/java/com/zcloud/service/statistics/impl/ListStatisticsServiceImpl.java @@ -153,5 +153,9 @@ public class ListStatisticsServiceImpl implements ListStatisticsService { public List listAllForPlan(PageData pd)throws Exception{ return listStatisticsMapper.listAllForPlan(pd); } + + public List mergeListAllForPlan(PageData pd)throws Exception{ + return listStatisticsMapper.mergeListAllForPlan(pd); + } } diff --git a/src/main/resources/mybatis/datasource/check/ListManagerMapper.xml b/src/main/resources/mybatis/datasource/check/ListManagerMapper.xml index 7270a6f..f032d90 100644 --- a/src/main/resources/mybatis/datasource/check/ListManagerMapper.xml +++ b/src/main/resources/mybatis/datasource/check/ListManagerMapper.xml @@ -2285,6 +2285,63 @@ + + + +