From 824167180dbb9f2de41ad20563937cfada5a49fe Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 31 Dec 2021 13:25:42 +0800 Subject: [PATCH 01/12] emm --- .../src/main/java/com/epmet/dao/ProjectDao.java | 2 +- .../main/java/com/epmet/service/impl/ProjectServiceImpl.java | 2 +- .../src/main/resources/mapper/ProjectDao.xml | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java index d0d71cab98..0f91019b54 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java @@ -265,6 +265,6 @@ public interface ProjectDao extends BaseDao { * @author zxc * @date 2021/12/10 10:31 上午 */ - List selectProjectCountByOrg(@Param("orgIds")List orgIds,@Param("startDate")String startDate,@Param("endDate")String endDate); + List selectProjectCountByOrg(List orgIds,@Param("startDate")String startDate,@Param("endDate")String endDate); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index e3a705b1a4..db10234c0b 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -2921,7 +2921,7 @@ public class ProjectServiceImpl extends BaseServiceImpl orgIds = sonOrgList.getData(); if (!agencyInfo.getLevel().equals(ProjectConstant.ORG_LEVEL_COMMUNITY)){ - orgList = baseDao.selectProjectCountByOrg(orgIds.stream().map(m -> m.getPids()).collect(Collectors.toList()), formDTO.getStartDate(),formDTO.getEndDate()); + orgList = baseDao.selectProjectCountByOrg(orgIds, formDTO.getStartDate(),formDTO.getEndDate()); }else { for (SonOrgResultDTO o : orgIds) { ProjectDistributionAnalysisRightDTO dto = new ProjectDistributionAnalysisRightDTO(); diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml index 676ff317c1..464bcf4db4 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml @@ -472,9 +472,9 @@ - - SELECT - #{o.orgId} AS orgId, - COUNT(ID) AS count - FROM project - WHERE DEL_FLAG = '0' - AND #{o.orgId} LIKE CONCAT(ORG_ID_PATH,'%') - AND DATE_FORMAT(CREATED_TIME,'%Y-%m-%d') >= #{startDate} - AND DATE_FORMAT(CREATED_TIME,'%Y-%m-%d') #{endDate} - + SELECT + AGENCY_ID AS orgId, + COUNT(ID) AS count + FROM project + WHERE DEL_FLAG = '0' + AND AGENCY_ID IN ( + + #{o} + ) + AND DATE_FORMAT(CREATED_TIME,'%Y-%m-%d') >= #{startDate} + AND DATE_FORMAT(CREATED_TIME,'%Y-%m-%d') #{endDate} + GROUP BY AGENCY_ID \ No newline at end of file From e8396c2f5d6d83b4efef3a77a354e33aad9efc6f Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 31 Dec 2021 16:23:08 +0800 Subject: [PATCH 08/12] =?UTF-8?q?=E7=BD=91=E6=A0=BC=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E5=AD=97=E5=85=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/migration/V0.0.9__add_data_type.sql | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.9__add_data_type.sql b/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.9__add_data_type.sql index a852a3bef7..d4aebf1828 100644 --- a/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.9__add_data_type.sql +++ b/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.9__add_data_type.sql @@ -1,10 +1,10 @@ -INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES ('1000000000000000012', 'grid_type', '网格类型', '', '12', '1067246875800000001', '2021-12-21 16:29:58', '1067246875800000001', '2021-12-21 16:29:58'); +INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000012', 'grid_type', '网格类型', '', 12, 0, 0, '', '2021-12-23 18:23:27', '', '2021-12-23 18:23:27'); -INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES ('1000000000000000300', '1000000000000000012', '党政机关', '0', '0', '', '0', '1', '2021-12-21 16:29:58', '1', '2021-12-21 16:29:58'); -INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES ('1000000000000000301', '1000000000000000012', '企业', '1', '0', '', '0', '1', '2021-12-21 16:29:58', '1', '2021-12-21 16:29:58'); -INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES ('1000000000000000302', '1000000000000000012', '园区', '2', '0', '', '4', '1', '2021-12-21 16:29:58', '1', '2021-12-21 16:29:58'); -INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES ('1000000000000000303', '1000000000000000012', '商圈', '3', '0', '', '4', '1', '2021-12-21 16:29:58', '1', '2021-12-21 16:29:58'); -INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES ('1000000000000000304', '1000000000000000012', '市场', '4', '0', '', '4', '1', '2021-12-21 16:29:58', '1', '2021-12-21 16:29:58'); -INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES ('1000000000000000305', '1000000000000000012', '景区', '5', '0', '', '4', '1', '2021-12-21 16:29:58', '1', '2021-12-21 16:29:58'); -INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES ('1000000000000000306', '1000000000000000012', '医院', '6', '0', '', '4', '1', '2021-12-21 16:29:58', '1', '2021-12-21 16:29:58'); -INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `creator`, `create_date`, `updater`, `update_date`) VALUES ('1000000000000000307', '1000000000000000012', '学校', '7', '0', '', '4', '1', '2021-12-21 16:29:58', '1', '2021-12-21 16:29:58'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000300', 1000000000000000012, '党政机关', '0', '0', '', 0, 0, 0, '', '2021-12-23 18:39:18', '', '2021-12-23 18:39:18'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000301', 1000000000000000012, '企业', '1', '0', '', 0, 0, 0, '', '2021-12-23 18:39:18', '', '2021-12-23 18:39:18'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000302', 1000000000000000012, '园区', '2', '0', '', 4, 0, 0, '', '2021-12-23 18:39:18', '', '2021-12-23 18:39:18'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000303', 1000000000000000012, '商圈', '3', '0', '', 4, 0, 0, '', '2021-12-23 18:39:18', '', '2021-12-23 18:39:18'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000304', 1000000000000000012, '市场', '4', '0', '', 4, 0, 0, '', '2021-12-23 18:39:18', '', '2021-12-23 18:39:18'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000305', 1000000000000000012, '景区', '5', '0', '', 4, 0, 0, '', '2021-12-23 18:39:18', '', '2021-12-23 18:39:18'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000306', 1000000000000000012, '医院', '6', '0', '', 4, 0, 0, '', '2021-12-23 18:39:18', '', '2021-12-23 18:39:18'); +INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000307', 1000000000000000012, '学校', '7', '0', '', 4, 0, 0, '', '2021-12-23 18:39:18', '', '2021-12-23 18:39:18'); From a9104ed36d002f5140dd7af5ecffa3d02b762034 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 31 Dec 2021 16:33:19 +0800 Subject: [PATCH 09/12] bug --- .../main/java/com/epmet/dao/ProjectDao.java | 2 +- .../service/impl/ProjectServiceImpl.java | 9 ++++---- .../src/main/resources/mapper/ProjectDao.xml | 22 +++++++++---------- 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java index 52fd49dcbb..0f91019b54 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/dao/ProjectDao.java @@ -265,6 +265,6 @@ public interface ProjectDao extends BaseDao { * @author zxc * @date 2021/12/10 10:31 上午 */ - List selectProjectCountByOrg(List orgIds,@Param("startDate")String startDate,@Param("endDate")String endDate); + List selectProjectCountByOrg(List orgIds,@Param("startDate")String startDate,@Param("endDate")String endDate); } \ No newline at end of file diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index b5ec695203..7c72732c7c 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -25,8 +25,8 @@ import com.epmet.commons.rocketmq.messages.ProjectChangedMQMsg; import com.epmet.commons.tools.constant.*; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.exception.EpmetErrorCode; -import com.epmet.commons.tools.exception.ExceptionUtils; import com.epmet.commons.tools.exception.EpmetException; +import com.epmet.commons.tools.exception.ExceptionUtils; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.redis.common.CustomerOrgRedis; @@ -58,11 +58,12 @@ import com.epmet.resi.mine.dto.from.MyPartProjectsFormDTO; import com.epmet.send.SendMqMsgUtil; import com.epmet.service.*; import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; import com.google.common.base.Joiner; import com.google.gson.Gson; import com.google.gson.GsonBuilder; -import org.apache.commons.collections4.CollectionUtils; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.ListUtils; import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; @@ -76,7 +77,6 @@ import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; import org.springframework.web.multipart.MultipartFile; - import javax.servlet.http.HttpServletRequest; import java.text.ParseException; import java.text.SimpleDateFormat; @@ -2922,6 +2922,7 @@ public class ProjectServiceImpl extends BaseServiceImpl orgIds = sonOrgList.getData(); for (SonOrgResultDTO o : orgIds) { ProjectDistributionAnalysisRightDTO dto = new ProjectDistributionAnalysisRightDTO(); @@ -2930,7 +2931,7 @@ public class ProjectServiceImpl extends BaseServiceImpl dtos; if (!agencyInfo.getLevel().equals(ProjectConstant.ORG_LEVEL_COMMUNITY)){ - dtos = baseDao.selectProjectCountByOrg(orgIds.stream().map(m -> m.getOrgId()).collect(Collectors.toList()), formDTO.getStartDate(), formDTO.getEndDate()); + dtos = baseDao.selectProjectCountByOrg(orgIds, formDTO.getStartDate(),formDTO.getEndDate()); }else { Result> projectCountByGrid = govIssueOpenFeignClient.getProjectCountByGrid(formDTO); if (!projectCountByGrid.success()){ diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml index ee1bfdf8f4..4d8743c676 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml @@ -472,17 +472,15 @@ \ No newline at end of file From ad84e1728493869003c7aa765d736fd11ca91894 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 31 Dec 2021 16:33:28 +0800 Subject: [PATCH 10/12] =?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 --- .../java/com/epmet/service/impl/CustomerGridServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java index f95eb8343a..03bb84ba0d 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerGridServiceImpl.java @@ -771,6 +771,9 @@ public class CustomerGridServiceImpl extends BaseServiceImpl Date: Fri, 31 Dec 2021 16:41:12 +0800 Subject: [PATCH 11/12] =?UTF-8?q?bug=E4=B9=8B:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-project-server/src/main/resources/mapper/ProjectDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml index 4d8743c676..c614292f92 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml @@ -478,7 +478,7 @@ COUNT(ID) AS count FROM project WHERE DEL_FLAG = '0' - AND ORG_ID_PATH LIKE CONCAT(#{o.pids},#{o.orgId},'%') + AND ORG_ID_PATH LIKE CONCAT(#{o.pids},':',#{o.orgId},'%') AND DATE_FORMAT(CREATED_TIME,'%Y-%m-%d') >= #{startDate} AND DATE_FORMAT(CREATED_TIME,'%Y-%m-%d') #{endDate} From b83d07bfb3d43551af05c483b5e82fb008bdf593 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 31 Dec 2021 16:46:42 +0800 Subject: [PATCH 12/12] =?UTF-8?q?bug=E4=B9=8B=E8=8B=B1=E6=96=87:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gov-project-server/src/main/resources/mapper/ProjectDao.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml index c614292f92..a43a05d0b8 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml +++ b/epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ProjectDao.xml @@ -478,7 +478,7 @@ COUNT(ID) AS count FROM project WHERE DEL_FLAG = '0' - AND ORG_ID_PATH LIKE CONCAT(#{o.pids},':',#{o.orgId},'%') + AND ORG_ID_PATH LIKE CONCAT(#{o.pids},':',#{o.orgId},'%') AND DATE_FORMAT(CREATED_TIME,'%Y-%m-%d') >= #{startDate} AND DATE_FORMAT(CREATED_TIME,'%Y-%m-%d') #{endDate}