From d09b16bb6c5ea9a075fd047bc314a1ffc475c282 Mon Sep 17 00:00:00 2001 From: laishajiang <12977614+laishajiang@user.noreply.gitee.com> Date: Wed, 3 Apr 2024 02:40:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=A1=E4=BB=B6=E7=B1=BB=E5=88=AB=E5=92=8C?= =?UTF-8?q?=E6=9D=A5=E6=BA=90=E7=9A=84=E5=88=86=E5=8E=BF=E5=B8=82=E5=B1=80?= =?UTF-8?q?=E5=92=8C=E9=83=A8=E5=A7=94=E6=94=AF=E9=98=9F=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/biutag/lan/service/DataService.java | 55 ++++++++++++++++++- 1 file changed, 54 insertions(+), 1 deletion(-) 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));