From 104e48b6878fc6e493578968e742f0e1fee917c5 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Tue, 19 May 2020 11:57:18 +0800 Subject: [PATCH] =?UTF-8?q?Bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/CustomerAgencyServiceImpl.java | 6 +++--- .../src/main/resources/mapper/CustomerAgencyDao.xml | 3 +-- .../src/main/resources/mapper/CustomerDepartmentDao.xml | 3 +-- .../src/main/resources/mapper/CustomerGridDao.xml | 3 +-- 4 files changed, 6 insertions(+), 9 deletions(-) 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 142a3d05aa..fe339b23bb 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 @@ -340,17 +340,17 @@ public class CustomerAgencyServiceImpl extends BaseServiceImpl agencyList = new ArrayList<>(); - if (null != formDTO.getAgencyIdList()) { + if (null != formDTO.getAgencyIdList() && formDTO.getAgencyIdList().size() > NumConstant.ZERO) { agencyList = baseDao.selectAgencyListByIds(formDTO.getAgencyIdList()); } //2:根据部门Id批量查询部门信息 List deptList = new ArrayList<>(); - if (null != formDTO.getDeptIdList()) { + if (null != formDTO.getDeptIdList() && formDTO.getDeptIdList().size() > NumConstant.ZERO) { deptList = customerDepartmentDao.selectDeptListByIds(formDTO.getDeptIdList()); } //3:根据网格Id批量查询网格信息 List gridList = new ArrayList<>(); - if (null != formDTO.getGridIdList()) { + if (null != formDTO.getGridIdList() && formDTO.getGridIdList().size() > NumConstant.ZERO) { gridList = customerGridDao.selectGridListByIds(formDTO.getGridIdList()); } agencyDeptGrid.setAgencyList(agencyList); 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 11c5693e43..d0c7b4dcf0 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 @@ -114,8 +114,7 @@ FROM customer_agency ca WHERE ca.del_flag = '0' - AND - + ca.id = #{agencyId} ORDER BY field( diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerDepartmentDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerDepartmentDao.xml index 54a12139ad..47273d910c 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerDepartmentDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerDepartmentDao.xml @@ -50,8 +50,7 @@ * FROM customer_department WHERE del_flag = '0' - AND - + id = #{departmentId} diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml index ccf5779b89..c82576b64b 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerGridDao.xml @@ -300,8 +300,7 @@ * FROM customer_grid WHERE del_flag = '0' - AND - + id = #{gridId}