diff --git a/mailbox-lan/src/main/java/com/biutag/lan/service/DataService.java b/mailbox-lan/src/main/java/com/biutag/lan/service/DataService.java index 68bcb85..2e173a7 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/service/DataService.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/service/DataService.java @@ -100,6 +100,33 @@ public class DataService extends ServiceImpl { datalist.add(getCategoryDataMap(categorylist_three)); } } + }else if (searchValidate.getEasydept().equals("3")){ + Wrapper wrapper2 = new QueryWrapper<>().eq("level",2) .and(wrapper -> wrapper + .eq("category", "2") + .like("name", "%局") + ) + .or() + .eq("name", "交警支队") + .ne("name", "公交分局") + .ne("name", "森林公安局") + .ne("name", "经开区分局"); + deptslist = deptMapper.selectPage(page,wrapper2).getRecords(); + for(Dept deptItem :deptslist){ + List> categorylist_second = baseMapper.selectMailCategoryWithCount(deptItem.getId().toString(),deptItem.getName(), searchValidate.getSearchStartTime(), searchValidate.getSearchEndTime(),null); + datalist.add(getCategoryDataMap(categorylist_second)); + } + }else if (searchValidate.getEasydept().equals("4")){ + Wrapper wrapper2 = new QueryWrapper<>().eq("level",2).and(wrapper -> wrapper + .in("category", Arrays.asList("3", "4")) + .ne("name", "交警支队") + ) + .or() + .in("name", Arrays.asList("公交分局", "森林公安局", "经开区分局")); + deptslist = deptMapper.selectPage(page,wrapper2).getRecords(); + for(Dept deptItem :deptslist){ + List> categorylist_second = baseMapper.selectMailCategoryWithCount(deptItem.getId().toString(),deptItem.getName(), searchValidate.getSearchStartTime(), searchValidate.getSearchEndTime(),null); + datalist.add(getCategoryDataMap(categorylist_second)); + } } Page> dataVoPage = new Page<>(); @@ -161,7 +188,6 @@ public class DataService extends ServiceImpl { List> categorylistforsecond = baseMapper.selectSecondMailSourceWithCount(deptItem.getId().toString(),deptItem.getName(),searchValidate.getSearchStartTime(), searchValidate.getSearchEndTime()); list.add(getSourceCountMap(categorylistforsecond)); } - }else if (searchValidate.getEasydept().equals("2")){ if (searchValidate.getSdept()==null){ Wrapper wrapper2 = new QueryWrapper<>().eq("level",2); @@ -186,6 +212,33 @@ public class DataService extends ServiceImpl { list.add(getSourceCountMap(categorylist)); } } + }else if (searchValidate.getEasydept().equals("3")){ + Wrapper wrapper2 = new QueryWrapper<>().eq("level",2) .and(wrapper -> wrapper + .eq("category", "2") + .like("name", "%局") + ) + .or() + .eq("name", "交警支队") + .ne("name", "公交分局") + .ne("name", "森林公安局") + .ne("name", "经开区分局"); + deptslist = deptMapper.selectPage(page,wrapper2).getRecords(); + for(Dept deptItem :deptslist){ + List> categorylistforsecond = baseMapper.selectSecondMailSourceWithCount(deptItem.getId().toString(),deptItem.getName(),searchValidate.getSearchStartTime(), searchValidate.getSearchEndTime()); + list.add(getSourceCountMap(categorylistforsecond)); + } + }else if (searchValidate.getEasydept().equals("4")){ + Wrapper wrapper2 = new QueryWrapper<>().eq("level",2).and(wrapper -> wrapper + .in("category", Arrays.asList("3", "4")) + .ne("name", "交警支队") + ) + .or() + .in("name", Arrays.asList("公交分局", "森林公安局", "经开区分局")); + deptslist = deptMapper.selectPage(page,wrapper2).getRecords(); + for(Dept deptItem :deptslist){ + List> categorylistforsecond = baseMapper.selectSecondMailSourceWithCount(deptItem.getId().toString(),deptItem.getName(),searchValidate.getSearchStartTime(), searchValidate.getSearchEndTime()); + list.add(getSourceCountMap(categorylistforsecond)); + } } Page> dataVoPage = new Page<>(); dataVoPage.setRecords(getSourceSortList(list));