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/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 @@ + + + +