diff --git a/src/main/java/com/cm/population/service/populationinfo/impl/PopulationInfoServiceImpl.java b/src/main/java/com/cm/population/service/populationinfo/impl/PopulationInfoServiceImpl.java index 3983576..eccb467 100644 --- a/src/main/java/com/cm/population/service/populationinfo/impl/PopulationInfoServiceImpl.java +++ b/src/main/java/com/cm/population/service/populationinfo/impl/PopulationInfoServiceImpl.java @@ -902,10 +902,11 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul } } List listList = populationInfoDao.list(params); - ArrayList arr = new ArrayList(); + LinkedHashSet arr1 = new LinkedHashSet<>(); for(PopulationInfoDTO dto : listList) { - arr.add(dto.getCreator()); + arr1.add(dto.getCreator()); } + ArrayList arr = new ArrayList<>(arr1); // 查询创建人用户集 List jsonArray = iUserService.listUserResourceByIds(arr); UserResourceBO bo1 = new UserResourceBO(); @@ -940,18 +941,39 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul public SuccessResultList> listSystem(ListPage page) { PageHelper.startPage(page.getPage(), page.getRows()); Map params = page.getParams(); + List tabLevelList = new ArrayList<>(); if(params.get("tabLevel") != null) { Object obj = params.get("tabLevel"); if (obj instanceof String) { List list = Arrays.asList(params.get("tabLevel").toString().split(",")); - params.put("tabLevelIds", list); + tabLevelList.addAll(list); + } } - List listList = populationInfoDao.listSystem(params); - ArrayList arr = new ArrayList(); - for(PopulationInfoDTO dto : listList) { - arr.add(dto.getCreator()); + if(params.get("tabLevelGroup") != null) { + Object obj = params.get("tabLevelGroup"); + if (obj instanceof String) { + List groupList = Arrays.asList(params.get("tabLevelGroup").toString().split(",")); + List list = iDataDictionaryService.listDictionaryByParentId("5ea50f00-3d76-492c-8680-9c30d50cce21"); + a:for(DataDictionaryDTO dto : list) { + if (groupList.contains(dto.getDictionarySummary())) { + for(String s : tabLevelList) { + if (dto.getDictionaryId().equals(s)) { + continue a; + } + } + tabLevelList.add(dto.getDictionaryId()); + } + } + } } + params.put("tabLevelIds", tabLevelList); + List listList = populationInfoDao.listSystem(params); + LinkedHashSet arr1 = new LinkedHashSet<>(); + for(PopulationInfoDTO dto : listList) { + arr1.add(dto.getCreator()); + } + ArrayList arr = new ArrayList<>(arr1); // 查询创建人用户集(用于认领页面的显示) List jsonArray = iUserService.listUserResourceByIds(arr); UserResourceBO bo1 = new UserResourceBO(); @@ -995,7 +1017,6 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul @Override public SuccessResultList> listPage(ListPage page) { - PageHelper.startPage(page.getPage(), page.getRows()); Map params = page.getParams(); if(params.get("populationInfoIds") != null) { Object obj = params.get("populationInfoIds"); @@ -1007,18 +1028,40 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul params.put("populationInfoIds", list); } } + List tabLevelList = new ArrayList<>(); if(params.get("tabLevel") != null) { Object obj = params.get("tabLevel"); if (obj instanceof String) { List list = Arrays.asList(params.get("tabLevel").toString().split(",")); - params.put("tabLevelIds", list); + tabLevelList.addAll(list); + } } - List listList = populationInfoDao.listPage(params); - ArrayList arr = new ArrayList(); - for(PopulationInfoDTO dto : listList) { - arr.add(dto.getCreator()); + if(params.get("tabLevelGroup") != null) { + Object obj = params.get("tabLevelGroup"); + if (obj instanceof String) { + List groupList = Arrays.asList(params.get("tabLevelGroup").toString().split(",")); + List list = iDataDictionaryService.listDictionaryByParentId("5ea50f00-3d76-492c-8680-9c30d50cce21"); + a:for(DataDictionaryDTO dto : list) { + if (groupList.contains(dto.getDictionarySummary())) { + for(String s : tabLevelList) { + if (dto.getDictionaryId().equals(s)) { + continue a; + } + } + tabLevelList.add(dto.getDictionaryId()); + } + } + } } + params.put("tabLevelIds", tabLevelList); + PageHelper.startPage(page.getPage(), page.getRows()); + List listList = populationInfoDao.listPage(params); + LinkedHashSet arr1 = new LinkedHashSet<>(); + for(PopulationInfoDTO dto : listList) { + arr1.add(dto.getCreator()); + } + ArrayList arr = new ArrayList<>(arr1); // 查询创建人用户集(用于认领页面的显示) List jsonArray = iUserService.listUserResourceByIds(arr); UserResourceBO bo1 = new UserResourceBO(); @@ -1064,13 +1107,33 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul params.put("populationInfoIds", list); } } + List tabLevelList = new ArrayList<>(); if(params.get("tabLevel") != null) { Object obj = params.get("tabLevel"); if (obj instanceof String) { List list = Arrays.asList(params.get("tabLevel").toString().split(",")); - params.put("tabLevelIds", list); + tabLevelList.addAll(list); + } } + if(params.get("tabLevelGroup") != null) { + Object obj = params.get("tabLevelGroup"); + if (obj instanceof String) { + List groupList = Arrays.asList(params.get("tabLevelGroup").toString().split(",")); + List list = iDataDictionaryService.listDictionaryByParentId("5ea50f00-3d76-492c-8680-9c30d50cce21"); + a:for(DataDictionaryDTO dto : list) { + if (groupList.contains(dto.getDictionarySummary())) { + for(String s : tabLevelList) { + if (dto.getDictionaryId().equals(s)) { + continue a; + } + } + tabLevelList.add(dto.getDictionaryId()); + } + } + } + } + params.put("tabLevelIds", tabLevelList); List listList = populationInfoDao.list(params); PageInfo pageInfo = new PageInfo<>(listList); return new SuccessResultList<>(listList, pageInfo.getPageNum(), pageInfo.getTotal()); @@ -1091,13 +1154,33 @@ public class PopulationInfoServiceImpl extends AbstractService implements IPopul @Override public List countSystem(Map params) { + List tabLevelList = new ArrayList<>(); if(params.get("tabLevel") != null) { Object obj = params.get("tabLevel"); if (obj instanceof String) { List list = Arrays.asList(params.get("tabLevel").toString().split(",")); - params.put("tabLevelIds", list); + tabLevelList.addAll(list); + } } + if(params.get("tabLevelGroup") != null) { + Object obj = params.get("tabLevelGroup"); + if (obj instanceof String) { + List groupList = Arrays.asList(params.get("tabLevelGroup").toString().split(",")); + List list = iDataDictionaryService.listDictionaryByParentId("5ea50f00-3d76-492c-8680-9c30d50cce21"); + a:for(DataDictionaryDTO dto : list) { + if (groupList.contains(dto.getDictionarySummary())) { + for(String s : tabLevelList) { + if (dto.getDictionaryId().equals(s)) { + continue a; + } + } + tabLevelList.add(dto.getDictionaryId()); + } + } + } + } + params.put("tabLevelIds", tabLevelList); List list = populationInfoDao.countSystem(params); return list; } diff --git a/src/main/resources/mybatis/mapper/populationinfo/population-info-mapper.xml b/src/main/resources/mybatis/mapper/populationinfo/population-info-mapper.xml index 33f9863..4b31c1f 100644 --- a/src/main/resources/mybatis/mapper/populationinfo/population-info-mapper.xml +++ b/src/main/resources/mybatis/mapper/populationinfo/population-info-mapper.xml @@ -1241,10 +1241,13 @@ AND ( t1.organization != '中国共产党党员' AND t1.organization != '中国共产主义青年团团员' AND t1.organization != '中国共产党预备党员') - AND (t1.flow_time = '' OR t1.flow_time IS NULL) + AND t1.domicile_address_type != '3' AND (t1.flow_time IS NOT NULL AND t1.flow_time != '' OR 6 > DATE_ADD(CURDATE(), INTERVAL 6 MONTH) ) - AND t1.flow_time != '' AND t1.flow_time IS NOT NULL + AND t1.domicile_address_type != '3' AND (t1.flow_time IS NULL OR t1.flow_time = '' OR t1.flow_time >= DATE_SUB(CURDATE(), INTERVAL 6 MONTH) ) + + + AND t1.domicile_address_type = '3' AND t1.religion = #{religion} @@ -1353,6 +1356,15 @@ t1.label LIKE CONCAT('%', #{tabLevelIds[${index}]}, '%') + + AND t1.domicile_address_type != '3' AND (t1.flow_time IS NOT NULL AND t1.flow_time != '' OR 6 > DATE_ADD(CURDATE(), INTERVAL 6 MONTH) ) + + + AND t1.domicile_address_type != '3' AND (t1.flow_time IS NULL OR t1.flow_time = '' OR t1.flow_time >= DATE_SUB(CURDATE(), INTERVAL 6 MONTH) ) + + + AND t1.domicile_address_type = '3' + AND t1.creator = #{creator} @@ -1487,6 +1499,15 @@ t1.label LIKE CONCAT('%', #{tabLevelIds[${index}]}, '%') + + AND t1.domicile_address_type != '3' AND (t1.flow_time IS NOT NULL AND t1.flow_time != '' OR 6 > DATE_ADD(CURDATE(), INTERVAL 6 MONTH) ) + + + AND t1.domicile_address_type != '3' AND (t1.flow_time IS NULL OR t1.flow_time = '' OR t1.flow_time >= DATE_SUB(CURDATE(), INTERVAL 6 MONTH) ) + + + AND t1.domicile_address_type = '3' + AND hh.residential_id = #{residentialId} diff --git a/src/main/resources/templates/populationinfo/list-bigdata.html b/src/main/resources/templates/populationinfo/list-bigdata.html index a023334..7382eed 100644 --- a/src/main/resources/templates/populationinfo/list-bigdata.html +++ b/src/main/resources/templates/populationinfo/list-bigdata.html @@ -37,6 +37,21 @@ .tabLevel5 > .layui-form-checkbox span { background-color: #08F422; } + .tabLevelGroup > .layui-form-checkbox:nth-of-type(1) span { + background-color: #db4343; + } + .tabLevelGroup > .layui-form-checkbox:nth-of-type(2) span { + background-color: #F48208; + } + .tabLevelGroup > .layui-form-checkbox:nth-of-type(3) span { + background-color: #F4CF08; + } + .tabLevelGroup > .layui-form-checkbox:nth-of-type(4) span { + background-color: #08A7F4; + } + .tabLevelGroup > .layui-form-checkbox:nth-of-type(5) span { + background-color: #08F422; + } .layui-form-checkbox { line-height: 20px !important; padding-right: 20px !important; @@ -138,6 +153,14 @@
+
+ +
@@ -145,6 +168,13 @@ 清空条件 +
+ + + + + +