diff --git a/mailbox-lan/src/main/java/com/biutag/lan/controller/DataController.java b/mailbox-lan/src/main/java/com/biutag/lan/controller/DataController.java index 5a7109b..a5bfb4f 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/controller/DataController.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/controller/DataController.java @@ -37,7 +37,7 @@ public class DataController { @NotPower @GetMapping("list") - public AjaxResult>> list(Page page, @Validated DataSearchValidate searchValidate) { + public AjaxResult>> list(Page page,DataSearchValidate searchValidate) { Page> list = dataService.list(page, searchValidate); return AjaxResult.success(list); } diff --git a/mailbox-lan/src/main/java/com/biutag/lan/controller/system/DeptController.java b/mailbox-lan/src/main/java/com/biutag/lan/controller/system/DeptController.java index a4139b2..2ab0afe 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/controller/system/DeptController.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/controller/system/DeptController.java @@ -145,6 +145,14 @@ public class DeptController { easyDeptVO2.setId(2); easyDeptVO2.setLabelName("二级机构"); list.add(easyDeptVO2); + EasyDeptVO easyDeptVO3 = new EasyDeptVO(); + easyDeptVO3.setId(3); + easyDeptVO3.setLabelName("分县市局"); + list.add(easyDeptVO3); + EasyDeptVO easyDeptVO4 = new EasyDeptVO(); + easyDeptVO4.setId(4); + easyDeptVO4.setLabelName("部委支队"); + list.add(easyDeptVO4); return AjaxResult.success(list); } diff --git a/mailbox-lan/src/main/java/com/biutag/lan/mapper/DataMapper.java b/mailbox-lan/src/main/java/com/biutag/lan/mapper/DataMapper.java index 24c44f5..c13c631 100644 --- a/mailbox-lan/src/main/java/com/biutag/lan/mapper/DataMapper.java +++ b/mailbox-lan/src/main/java/com/biutag/lan/mapper/DataMapper.java @@ -16,7 +16,7 @@ public interface DataMapper extends BaseMapper { List> getFirstAllList(@Param("searchStartTime") String searchStartTime,@Param("searchEndTime") String searchEndTime); - List> getSecondList(Page page,@Param("searchStartTime") String searchStartTime,@Param("searchEndTime") String searchEndTime,@Param("deptId") String deptId); + List> getSecondList(Page page,@Param("searchStartTime") String searchStartTime,@Param("searchEndTime") String searchEndTime,@Param("deptId") String deptId,@Param("FJdept") String FJdept); List> getThirdList(Page page,@Param("searchStartTime") String searchStartTime,@Param("searchEndTime") String searchEndTime,@Param("deptId") String deptId); 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 2dd48fe..119efb8 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 @@ -28,35 +28,32 @@ public class DataService extends ServiceImpl { private DataMapper dataMapper; @Resource private DeptMapper deptMapper; - public Page> list(Page page, @Validated DataSearchValidate searchValidate){ + public Page> list(Page page, DataSearchValidate searchValidate){ List> combinedList = null; List> mapfirst = null; List> mapSecond = null; List> mapThird = null; - if (searchValidate.getEasydept()==null||!searchValidate.getEasydept().equals("2")){ - + if (searchValidate.getEasydept()==null||searchValidate.getEasydept().equals("1")){ mapfirst = dataMapper.getFirstAllList(searchValidate.getSearchStartTime(),searchValidate.getSearchEndTime()); - mapSecond = dataMapper.getSecondList(page,searchValidate.getSearchStartTime(),searchValidate.getSearchEndTime(),null); - + mapSecond = dataMapper.getSecondList(page,searchValidate.getSearchStartTime(),searchValidate.getSearchEndTime(),null,null); combinedList = Stream.concat(mapfirst.stream(), mapSecond.stream()) .collect(Collectors.toList()); }else if (searchValidate.getEasydept()!=null&&searchValidate.getEasydept().equals("2")){ if (searchValidate.getSdept()!=null){ - mapThird = dataMapper.getThirdList(page,searchValidate.getSearchStartTime(),searchValidate.getSearchEndTime(),searchValidate.getSdept()); - mapSecond = dataMapper.getSecondList(null,searchValidate.getSearchStartTime(),searchValidate.getSearchEndTime(),searchValidate.getSdept()); - - + mapSecond = dataMapper.getSecondList(null,searchValidate.getSearchStartTime(),searchValidate.getSearchEndTime(),searchValidate.getSdept(),null); combinedList = Stream.concat(mapSecond.stream(), mapThird.stream()) .collect(Collectors.toList()); }else{ - mapfirst = dataMapper.getFirstAllList(searchValidate.getSearchStartTime(),searchValidate.getSearchEndTime()); - mapSecond = dataMapper.getSecondList(page,searchValidate.getSearchStartTime(),searchValidate.getSearchEndTime(),null); - + mapSecond = dataMapper.getSecondList(page,searchValidate.getSearchStartTime(),searchValidate.getSearchEndTime(),null,null); combinedList = Stream.concat(mapfirst.stream(), mapSecond.stream()) .collect(Collectors.toList()); } + }else if (searchValidate.getEasydept()!=null&&searchValidate.getEasydept().equals("3")){ + combinedList = dataMapper.getSecondList(page,searchValidate.getSearchStartTime(),searchValidate.getSearchEndTime(),null,searchValidate.getEasydept()); + }else if (searchValidate.getEasydept()!=null&&searchValidate.getEasydept().equals("4")){ + combinedList = dataMapper.getSecondList(page,searchValidate.getSearchStartTime(),searchValidate.getSearchEndTime(),null,searchValidate.getEasydept()); } Page> dataVoPage = new Page<>(); dataVoPage.setRecords(combinedList); diff --git a/mailbox-lan/src/main/resources/mapper/DataMapper.xml b/mailbox-lan/src/main/resources/mapper/DataMapper.xml index dbb1cdc..d0cffbc 100644 --- a/mailbox-lan/src/main/resources/mapper/DataMapper.xml +++ b/mailbox-lan/src/main/resources/mapper/DataMapper.xml @@ -24,6 +24,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and a.id = #{deptId} + + and ((a.category = '2' and a.name like '%局') or a.name='交警支队')and a.name != '公交分局' and a.name != '森林公安局' and a.name != '经开区分局' + + + and + a.level = '2' and (((a.category = '3' or a.category = '4')and a.name != '交警支队') + or a.name = '公交分局' + or a.name = '森林公安局' + or a.name = '经开区分局') + + + group by a.name,a.sort order by crateNumber desc @@ -45,6 +57,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where a.level = '2' and a.id = #{deptId} + + + and ((a.category = '2' and a.name like '%局') or a.name='交警支队')and a.name != '公交分局' and a.name != '森林公安局' and a.name != '经开区分局' + + + and + a.level = '2' and (((a.category = '3' or a.category = '4')and a.name != '交警支队') + or a.name = '公交分局' + or a.name = '森林公安局' + or a.name = '经开区分局') group by a.name) t order by rateNumber desc @@ -69,6 +91,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where a.level = '2' and a.id = #{deptId} + + + and ((a.category = '2' and a.name like '%局') or a.name='交警支队')and a.name != '公交分局' and a.name != '森林公安局' and a.name != '经开区分局' + + + and + a.level = '2' and (((a.category = '3' or a.category = '4')and a.name != '交警支队') + or a.name = '公交分局' + or a.name = '森林公安局' + or a.name = '经开区分局') group by a.name order by srateNumber desc