From 86e770d7870a80577cb3292539d7c4636173bc6b Mon Sep 17 00:00:00 2001 From: lichao <326994889@qq.com> Date: Tue, 18 Apr 2023 15:01:09 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=84=E7=BB=87=E5=BC=80=E9=80=9A=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/CustomerAgencyController.java | 6 ++--- .../java/com/epmet/dao/CustomerAgencyDao.java | 6 ++--- .../epmet/service/CustomerAgencyService.java | 4 ++-- .../impl/CustomerAgencyServiceImpl.java | 12 +++++----- .../resources/mapper/CustomerAgencyDao.xml | 22 +++++++++++++++++-- 5 files changed, 34 insertions(+), 16 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java index e0d4f9f644..1e0a66ddd8 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java @@ -535,9 +535,9 @@ public class CustomerAgencyController { * @Author: lichao * @Date: 2023/4/7 14:48 */ - @GetMapping("getAgencyCountList") - public Result> getAgencyCountList(@RequestParam String agencyId){ - return new Result>().ok(customerAgencyService.getAgencyCountList(agencyId)); + @PostMapping("getAgencyCountList") + public Result> getAgencyCountList(@RequestBody CommunityCountCensusFormDTO dto){ + return new Result>().ok(customerAgencyService.getAgencyCountList(dto)); } /** diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java index 5639d33894..1b21c0059c 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java @@ -434,11 +434,11 @@ public interface CustomerAgencyDao extends BaseDao { */ List getAllCommunity(String customerId); - List agencyCount(@Param("pids") String pids); + List agencyCount(@Param("pids") String pids,@Param("timeStart")Date timeStart,@Param("timeEnd")Date timeEnd); - Integer agencyGridCount(@Param("pids") String pids); + Integer agencyGridCount(@Param("pids") String pids,@Param("timeStart")Date timeStart,@Param("timeEnd")Date timeEnd); - Integer agencyStaffCount(@Param("pids") String pids); + Integer agencyStaffCount(@Param("pids") String pids,@Param("timeStart")Date timeStart,@Param("timeEnd")Date timeEnd); Integer getCommunityCount(@Param("pids")String pids,@Param("timeStart")Date timeStart,@Param("timeEnd")Date timeEnd); diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java index f43de77102..ceac3653a9 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java @@ -368,10 +368,10 @@ public interface CustomerAgencyService extends BaseService /** * 返回下级数量 - * @param agencyId + * @param dto * @return */ - List getAgencyCountList(String agencyId); + List getAgencyCountList(CommunityCountCensusFormDTO dto); /** * @Description: 获取下级组织的社区数量 diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java index 7a651ecc9a..cfb2dcda25 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java @@ -1662,29 +1662,29 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl * @Author: lichao * @Date: 2023/4/7 14:17 */ @Override - public List getAgencyCountList(String agencyId) { + public List getAgencyCountList(CommunityCountCensusFormDTO dto) { List agencyCountCensusResultDTOS = new ArrayList<>(); - CustomerAgencyEntity customerAgency = baseDao.selectById(agencyId); + CustomerAgencyEntity customerAgency = baseDao.selectById(dto.getAgencyId()); if (customerAgency != null){ String pids = PidUtils.convertPid2OrgIdPath(customerAgency.getId(),customerAgency.getPids()); - agencyCountCensusResultDTOS = baseDao.agencyCount(pids); + agencyCountCensusResultDTOS = baseDao.agencyCount(pids,dto.getTimeStart(),dto.getTimeEnd()); AgencyCountCensusResultDTO agencyCountCensusResultDTOGrid = new AgencyCountCensusResultDTO(); agencyCountCensusResultDTOGrid.setLevel("grid"); - agencyCountCensusResultDTOGrid.setCount(baseDao.agencyGridCount(pids)); + agencyCountCensusResultDTOGrid.setCount(baseDao.agencyGridCount(pids,dto.getTimeStart(),dto.getTimeEnd())); agencyCountCensusResultDTOS.add(agencyCountCensusResultDTOGrid); AgencyCountCensusResultDTO agencyCountCensusResultDTOStaff = new AgencyCountCensusResultDTO(); agencyCountCensusResultDTOStaff.setLevel("staff"); - agencyCountCensusResultDTOStaff.setCount(baseDao.agencyStaffCount(pids)); + agencyCountCensusResultDTOStaff.setCount(baseDao.agencyStaffCount(pids,dto.getTimeStart(),dto.getTimeEnd())); agencyCountCensusResultDTOS.add(agencyCountCensusResultDTOStaff); }else{ diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml index 7f3f76b2d0..08252c1b5c 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml @@ -889,6 +889,12 @@ from customer_agency where DEL_FLAG = 0 and PIDS like concat(#{pids},'%') + + and agency.UPDATED_TIME >= #{timeStart} + + + and agency.UPDATED_TIME <= #{timeEnd} + group by level @@ -899,6 +905,12 @@ from customer_grid where DEL_FLAG = 0 and PIDS like concat(#{pids},'%') + + and UPDATED_TIME >= #{timeStart} + + + and UPDATED_TIME <= #{timeEnd} + @@ -911,6 +923,12 @@ and staff.DEL_FLAG = 0 and agency.PIDS like concat(#{pids},'%') + + and agency.UPDATED_TIME >= #{timeStart} + + + and agency.UPDATED_TIME <= #{timeEnd} + @@ -1212,10 +1230,10 @@ and agency.LEVEL = 'community' and agency.PIDS like concat(#{pids},'%') - and agency.CREATED_TIME >= #{timeStart} + and agency.UPDATED_TIME >= #{timeStart} - and agency.CREATED_TIME <= #{timeEnd} + and agency.UPDATED_TIME <= #{timeEnd}