From 28268653a5ba08521ea8e73f86a77328204d9b3f Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 13 Jan 2022 11:54:08 +0800 Subject: [PATCH 01/27] .. --- .../com/epmet/service/impl/StatsProjectServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java index 1cf497d14e..b792eae06c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java @@ -185,7 +185,7 @@ public class StatsProjectServiceImpl implements StatsProjectService { projectEntity.setCustomerId(customerId); projectEntity.setCreatedTime(date); projectEntity.setStatus(ProjectConstant.CLOSED); - projectEntity.setPageSize(NumConstant.FIFTY); + projectEntity.setPageSize(NumConstant.ONE_THOUSAND); int pageNo = NumConstant.ONE; int size = NumConstant.ZERO; List processList = new ArrayList<>(); @@ -278,7 +278,7 @@ public class StatsProjectServiceImpl implements StatsProjectService { } mapList.put(agency.getId(), entity); } - } while (size == NumConstant.FIFTY); + } while (size == NumConstant.ONE_THOUSAND); //二、再分页查询项目表数据,封装每个组织的已结案已解决总数、已结案未解决总数;日增量中已结案已解决总数、已结案未解决总数 int num = NumConstant.ONE; @@ -374,7 +374,7 @@ public class StatsProjectServiceImpl implements StatsProjectService { } mapList.put(agency.getId(), entity); } - } while (size == NumConstant.FIFTY); + } while (size == NumConstant.ONE_THOUSAND); List projectDateEntityList = new ArrayList<>(mapList.values()); //三、批量保存数据,先删后增 From 32b1be10dc98029a39e44128170672c2dfff55a3 Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Thu, 13 Jan 2022 13:40:21 +0800 Subject: [PATCH 02/27] =?UTF-8?q?=E8=B0=81=E8=AF=AF=E5=88=A0=E4=BA=86.giti?= =?UTF-8?q?gnore=EF=BC=8C=E8=BF=99=E9=87=8C=E6=89=BE=E5=9B=9E=E6=9D=A5?= =?UTF-8?q?=E4=BA=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000..224e480e9c --- /dev/null +++ b/.gitignore @@ -0,0 +1,29 @@ +# Created by .ignore support plugin (hsz.mobi) +### Java template +# Compiled class file +*.class + +# Log file +*.log + +# BlueJ files +*.ctxt + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.nar +*.ear +*.zip +*.tar.gz +*.rar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* +.idea/ +*.iml +target/ + From 1a34993e41c806660d320f0aa4f5787f35b8a9b2 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Thu, 13 Jan 2022 14:24:53 +0800 Subject: [PATCH 03/27] =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...project_work_minutes.sql => V0.0.19__project_work_minutes.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/{V0.0.17__project_work_minutes.sql => V0.0.19__project_work_minutes.sql} (100%) diff --git a/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.17__project_work_minutes.sql b/epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.19__project_work_minutes.sql similarity index 100% rename from epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.17__project_work_minutes.sql rename to epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.19__project_work_minutes.sql From 062a1e5f8d937f0c80b0764bbed13205b82e40b7 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 13 Jan 2022 15:30:58 +0800 Subject: [PATCH 04/27] again --- .../java/com/epmet/service/impl/StatsProjectServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java index b792eae06c..75e030f55c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java @@ -247,7 +247,7 @@ public class StatsProjectServiceImpl implements StatsProjectService { if (mapList.containsKey(agency.getId())) { entity = mapList.get(agency.getId()); entity.setProjectTotal(entity.getProjectTotal() + projectTotal.intValue()); - entity.setPendingTotal(entity.getPendingTotal() + projectTotal.intValue() - closedTotal.intValue()); + entity.setPendingTotal(entity.getProjectTotal() - closedTotal.intValue()); entity.setClosedTotal(entity.getClosedTotal() + closedTotal.intValue()); if (projectTotal.intValue() > NumConstant.ZERO) { entity.setPendingRatio(new BigDecimal(numberFormat.format((float) entity.getPendingTotal() / (float) entity.getProjectTotal()))); From a023ee03eb1c329538184f8f63ef859d3761cafa Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Thu, 13 Jan 2022 17:20:45 +0800 Subject: [PATCH 05/27] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E5=88=86=E6=9E=90=E5=8F=B3=E4=BE=A7=E5=88=97=E8=A1=A8=E6=89=80?= =?UTF-8?q?=E5=B1=9E=E7=BD=91=E6=A0=BC=E8=B0=83=E6=95=B4=E4=B8=BA=E6=89=80?= =?UTF-8?q?=E5=B1=9E=E7=BB=84=E7=BB=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/govproject/ResiEventReportOrgDTO.java | 112 ++++++++++++++++++ .../result/CategoryProjectResultDTO.java | 12 +- .../controller/GovProjectController.java | 4 +- .../dataaggre/dao/govproject/ProjectDao.java | 6 + .../impl/GovProjectServiceImpl.java | 66 +++++++++-- .../mapper/govproject/ProjectDao.xml | 16 +++ 6 files changed, 200 insertions(+), 16 deletions(-) create mode 100644 epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ResiEventReportOrgDTO.java diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ResiEventReportOrgDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ResiEventReportOrgDTO.java new file mode 100644 index 0000000000..2576c3df7e --- /dev/null +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/ResiEventReportOrgDTO.java @@ -0,0 +1,112 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dataaggre.dto.govproject; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * 事件相关组织表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-08-03 + */ +@Data +public class ResiEventReportOrgDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 事件id + */ + private String resiEventId; + + /** + * 报给?: +网格:grid; +社区:community; +乡(镇、街道)级:street; +区县级: district; +市级: city; +省级:province。 + */ + private String orgType; + + /** + * 报给的组织或者网格id + */ + private String orgId; + + /** + * org_id的上级组织id,org_id是跟组织,此列为0 + */ + private String orgPid; + + /** + * org_id的所有上级组织id,org_id是跟组织,此列为0 + */ + private String orgPids; + + /** + * 含义:已读read,未读:un_read;组织下的工作人员从待处理=>处理中,点击查看详情前更新为已读; + */ + private String orgRead; + + /** + * (1)含义:1:展示红点;0:不展示;(2)注意:发布事件插入数据时为1,(3)何时更新?:人大代表回复or报事人回复or工作人员回复、立项、办结更新为1; + */ + private Boolean redDot; + + /** + * 删除标识:0.未删除 1.已删除 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/result/CategoryProjectResultDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/result/CategoryProjectResultDTO.java index 0d5b2f2707..5386febe19 100644 --- a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/result/CategoryProjectResultDTO.java +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/govproject/result/CategoryProjectResultDTO.java @@ -32,12 +32,14 @@ public class CategoryProjectResultDTO implements Serializable { private List categoryCodes = new ArrayList<>(); //一级分类名称集合 private List categoryNames = new ArrayList<>(); - //来源:议题issue 项目立项:agency 事件:resi_event【控制电机查看时里边三个按钮的显示】 + //网格Id + private String gridId; + //来源:议题issue 项目立项:agency 事件:resi_event【控制点击查看时里边三个按钮的显示】 private String origin; - //网格Id[上报给组织的事件、直接立项的项目此值为空] - private String gridId = ""; - //网格名[上报给组织的事件、直接立项的项目此值为空] - private String gridName = ""; + //来源Id + private String originId; + //所属组织名[来源楼院小组的项目所属组织显示来源的网格名,直接立项的显示立项的组织名,来源事件的显示上报给的网格或组织名] + private String orgName = ""; //状态:待处理 pending,已结案closed private String status; //标题 diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovProjectController.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovProjectController.java index 422aa74f4c..523386aacb 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovProjectController.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovProjectController.java @@ -102,9 +102,9 @@ public class GovProjectController { * @author sun */ @PostMapping("categoryprojectlist") - public Result categoryProjectList(@LoginUser TokenDto tokenDto, @RequestBody CategoryProjectFormDTO formDTO) { + public Result categoryProjectList(@RequestBody CategoryProjectFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO, CategoryProjectFormDTO.Category.class); - formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setCustomerId("45687aa479955f9d06204d415238f7cc"); return new Result().ok(govProjectService.categoryProjectList(formDTO)); } diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govproject/ProjectDao.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govproject/ProjectDao.java index ee44c3cee8..ecc9333edd 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govproject/ProjectDao.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/dao/govproject/ProjectDao.java @@ -22,6 +22,7 @@ import com.epmet.dataaggre.dto.govissue.result.IssueListResultDTO; import com.epmet.dataaggre.dto.govproject.ProjectDTO; import com.epmet.dataaggre.dto.govproject.ProjectRelatedPersonnelDTO; import com.epmet.dataaggre.dto.govproject.ResiEventDTO; +import com.epmet.dataaggre.dto.govproject.ResiEventReportOrgDTO; import com.epmet.dataaggre.dto.govproject.form.AllProjectFormDTO; import com.epmet.dataaggre.dto.govproject.form.CategoryProjectFormDTO; import com.epmet.dataaggre.dto.govproject.form.ProjectTotalFormDTO; @@ -115,4 +116,9 @@ public interface ProjectDao extends BaseDao { @Param("userIds") List userIds, @Param("origin") String origin); + /** + * @Description 事件项目上报组织信息 + * @author sun + */ + List getEventOrgList(@Param("eventIds") List eventIds); } \ No newline at end of file diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java index fb91510b88..77adb4e22a 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/govproject/impl/GovProjectServiceImpl.java @@ -6,7 +6,10 @@ import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.redis.common.CustomerOrgRedis; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; +import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; +import com.epmet.commons.tools.redis.common.bean.GridInfoCache; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.DateUtils; @@ -22,6 +25,7 @@ import com.epmet.dataaggre.dto.govorg.result.GridsInfoListResultDTO; import com.epmet.dataaggre.dto.govproject.ProjectDTO; import com.epmet.dataaggre.dto.govproject.ProjectRelatedPersonnelDTO; import com.epmet.dataaggre.dto.govproject.ResiEventDTO; +import com.epmet.dataaggre.dto.govproject.ResiEventReportOrgDTO; import com.epmet.dataaggre.dto.govproject.form.*; import com.epmet.dataaggre.dto.govproject.result.*; import com.epmet.dataaggre.dto.resigroup.ResiTopicDTO; @@ -46,6 +50,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.*; +import java.util.function.Function; import java.util.stream.Collectors; /** @@ -383,23 +388,66 @@ public class GovProjectServiceImpl implements GovProjectService { List projectIds = result.getList().stream().map(CategoryProjectResultDTO.Project::getProjectId).collect(Collectors.toList()); List list = projectDao.getCategoryList(projectIds); - //4.查询网格信息【楼院小组类项目、上报事件且上报给网格的项目才存在网格Id】 - List gridIds = result.getList().stream().map(CategoryProjectResultDTO.Project::getGridId).collect(Collectors.toList()); - gridIds = gridIds.stream().distinct().collect(Collectors.toList()); - List gridList = govOrgService.gridListByIds(gridIds); + //4.查询来源事件的项目上报的组织信息 + List eventIds = result.getList().stream().filter(re -> "resi_event".equals(re.getOrigin())).map(m -> m.getOriginId()).collect(Collectors.toList()); + List eventOrgList = projectDao.getEventOrgList(eventIds); + Map eventMap = eventOrgList.stream().collect(Collectors.toMap(ResiEventReportOrgDTO::getResiEventId, Function.identity())); //5.查询来源议题、事件的项目居民端创建人userId List eventUser = projectDao.getEventList(projectIds); List topicUser = projectDao.getTopicUser(projectIds); //5.封装数据 + //组织或网格id->组织或网格名称 + Map map = new HashMap<>(); result.getList().forEach(re -> { - //项目涉及网格信息 - gridList.forEach(g -> { - if (StringUtils.isNotBlank(re.getGridId()) && re.getGridId().equals(g.getGridId())) { - re.setGridName(g.getName()); + //所属组织 + if ("issue".equals(re.getOrigin())) { + if (map.containsKey(re.getGridId())) { + re.setOrgName(map.get(re.getGridId())); + } else { + GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(re.getGridId()); + if (gridInfo != null) { + re.setOrgName(gridInfo.getGridName()); + map.put(re.getGridId(), gridInfo.getGridName()); + } } - }); + } else if ("agency".equals(re.getOrigin())) { + if (map.containsKey(re.getAgencyId())) { + re.setOrgName(map.get(re.getAgencyId())); + } else { + AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(re.getAgencyId()); + if (agencyInfo != null) { + re.setOrgName(agencyInfo.getOrganizationName()); + map.put(re.getAgencyId(), agencyInfo.getOrganizationName()); + } + + } + } else if ("resi_event".equals(re.getOrigin())) { + if (eventMap.containsKey(re.getOriginId())) { + if ("grid".equals(eventMap.get(re.getOriginId()).getOrgType())) { + if (map.containsKey(re.getGridId())) { + re.setOrgName(map.get(re.getGridId())); + } else { + GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(re.getGridId()); + if (gridInfo != null) { + re.setOrgName(gridInfo.getGridName()); + map.put(re.getGridId(), gridInfo.getGridName()); + } + } + } else { + if (map.containsKey(re.getAgencyId())) { + re.setOrgName(map.get(re.getAgencyId())); + } else { + AgencyInfoCache agencyInfo = CustomerOrgRedis.getAgencyInfo(re.getAgencyId()); + if (agencyInfo != null) { + re.setOrgName(agencyInfo.getOrganizationName()); + map.put(re.getAgencyId(), agencyInfo.getOrganizationName()); + } + } + } + } + } //项目涉及分类信息【一个项目涉及多个一级分类】 //一级分类Id List caId = new ArrayList<>(); diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govproject/ProjectDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govproject/ProjectDao.xml index f7b74ccdb9..c8682a66dc 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govproject/ProjectDao.xml +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govproject/ProjectDao.xml @@ -267,6 +267,7 @@ p.agency_id agencyId, p.id projectId, p.origin origin, + p.origin_id originId, IFNULL(pc.grid_id, '') gridId, p.`status` status, p.title title, @@ -380,4 +381,19 @@ ORDER BY p.created_time DESC + + \ No newline at end of file From 3fc9b0b0772c48cbdfaf2ad336eb9c805320be4a Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 13 Jan 2022 21:13:08 +0800 Subject: [PATCH 06/27] =?UTF-8?q?=E5=8E=BB=E6=8E=89mock=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dataaggre/controller/GovProjectController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovProjectController.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovProjectController.java index 523386aacb..cb10b1c8df 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovProjectController.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovProjectController.java @@ -104,7 +104,7 @@ public class GovProjectController { @PostMapping("categoryprojectlist") public Result categoryProjectList(@RequestBody CategoryProjectFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO, CategoryProjectFormDTO.Category.class); - formDTO.setCustomerId("45687aa479955f9d06204d415238f7cc"); + //formDTO.setCustomerId("45687aa479955f9d06204d415238f7cc"); return new Result().ok(govProjectService.categoryProjectList(formDTO)); } From 64620db2ec020fd56d6792dbb256e518e542a76d Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 14 Jan 2022 08:58:08 +0800 Subject: [PATCH 07/27] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E8=A1=A8=E5=86=B3?= =?UTF-8?q?=E6=97=A5=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dao/IssueVoteDetailDao.java | 2 +- .../IssueVoteStatisticalDailyServiceImpl.java | 39 ++++++++++++------- .../resources/mapper/IssueVoteDetailDao.xml | 9 +++-- 3 files changed, 33 insertions(+), 17 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueVoteDetailDao.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueVoteDetailDao.java index a83bba6689..f79dfc1fc0 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueVoteDetailDao.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/dao/IssueVoteDetailDao.java @@ -140,7 +140,7 @@ public interface IssueVoteDetailDao extends BaseDao { * @author zxc * @date 2021/12/29 2:02 下午 */ - List statisticVote(@Param("customerId")String customerId,@Param("dateId")String dateId); + List statisticVote(@Param("customerId")String customerId,@Param("dateId")String dateId,@Param("status")Boolean status); /** * @Description 根据议题ID查询折线图一天的数据 diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalDailyServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalDailyServiceImpl.java index d42489fb48..16734cfe0f 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalDailyServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalDailyServiceImpl.java @@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; @@ -339,12 +340,12 @@ public class IssueVoteStatisticalDailyServiceImpl extends BaseServiceImpl daysBetween = DateUtils.getDaysBetween(form.getStartDate(), form.getEndDate()); customerIds.forEach(customerId -> { daysBetween.forEach(dateId -> { - statisticVote(customerId,dateId); + statisticVote(customerId,yyyyMMddToLine(dateId)); }); }); }else { if (StringUtils.isBlank(form.getDateId())){ - form.setDateId(LocalDate.now().minusDays(NumConstant.ONE).toString().replace("-", "")); + form.setDateId(LocalDate.now().minusDays(NumConstant.ONE).toString()); } customerIds.forEach(customerId -> { statisticVote(customerId, form.getDateId()); @@ -352,6 +353,14 @@ public class IssueVoteStatisticalDailyServiceImpl extends BaseServiceImpl dayAdd = issueVoteDetailDao.statisticVote(customerId, dateId); + List dayAdd = issueVoteDetailDao.statisticVote(customerId, dateId, true); if (CollectionUtils.isNotEmpty(dayAdd)){ //累计 - List allDayAdd = issueVoteDetailDao.statisticVote(customerId, null); + List allDayAdd = issueVoteDetailDao.statisticVote(customerId, dateId, false); dayAdd.forEach(d -> allDayAdd.stream().filter(a -> a.getIssueId().equals(d.getIssueId())).forEach(a -> { d.setOppositionCount(a.getOppositionCount()); d.setSupportCount(a.getSupportCount()); d.setTotalCount(a.getTotalCount()); })); List needInsert = ConvertUtils.sourceToTarget(dayAdd, IssueVoteStatisticalDailyEntity.class); - Integer delNum; - do { - delNum = baseDao.delHistoryData(customerId, dateId); - } while (delNum != null && delNum > NumConstant.ZERO); - List> partition = ListUtils.partition(needInsert, NumConstant.ONE_HUNDRED); - partition.forEach(p -> { - baseDao.insertBatch(p); - }); + delAndInsert(needInsert,customerId,dateId); } } + @Transactional(rollbackFor = Exception.class) + public void delAndInsert(List needInsert,String customerId,String dateId){ + Integer delNum; + do { + delNum = baseDao.delHistoryData(customerId, dateId); + } while (delNum != null && delNum > NumConstant.ZERO); + List> partition = ListUtils.partition(needInsert, NumConstant.ONE_HUNDRED); + partition.forEach(p -> { + baseDao.insertBatch(p); + }); + } + } \ No newline at end of file diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteDetailDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteDetailDao.xml index def42fc563..7e3512afcc 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteDetailDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteDetailDao.xml @@ -186,10 +186,10 @@ From 494f75aa27ef56ae21b1d7ca7bfccb83efa30d90 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 14 Jan 2022 09:38:00 +0800 Subject: [PATCH 08/27] =?UTF-8?q?=E5=88=86=E9=A1=B5=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E8=B0=83=E7=94=A8=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dataaggre/controller/GovProjectController.java | 4 ++-- .../com/epmet/service/impl/StatsProjectServiceImpl.java | 6 +++--- .../com/epmet/service/project/ProjectProcessService.java | 1 + .../main/java/com/epmet/service/project/ProjectService.java | 1 + .../service/project/impl/ProjectProcessServiceImpl.java | 4 ++++ .../com/epmet/service/project/impl/ProjectServiceImpl.java | 4 ++++ 6 files changed, 15 insertions(+), 5 deletions(-) diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovProjectController.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovProjectController.java index cb10b1c8df..422aa74f4c 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovProjectController.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/controller/GovProjectController.java @@ -102,9 +102,9 @@ public class GovProjectController { * @author sun */ @PostMapping("categoryprojectlist") - public Result categoryProjectList(@RequestBody CategoryProjectFormDTO formDTO) { + public Result categoryProjectList(@LoginUser TokenDto tokenDto, @RequestBody CategoryProjectFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO, CategoryProjectFormDTO.Category.class); - //formDTO.setCustomerId("45687aa479955f9d06204d415238f7cc"); + formDTO.setCustomerId(tokenDto.getCustomerId()); return new Result().ok(govProjectService.categoryProjectList(formDTO)); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java index 75e030f55c..bacc003c5c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsProjectServiceImpl.java @@ -192,7 +192,7 @@ public class StatsProjectServiceImpl implements StatsProjectService { do { //1.一千条一循环查询节点数据,封装每个组织对应数据 projectEntity.setPageNo(pageNo); - processList = projectProcessService.getProcessList(projectEntity); + processList = projectProcessService.getProcessAgencyList(projectEntity); size = processList.size(); pageNo++; //遍历删除项目节点表查询的无效数据 @@ -247,8 +247,8 @@ public class StatsProjectServiceImpl implements StatsProjectService { if (mapList.containsKey(agency.getId())) { entity = mapList.get(agency.getId()); entity.setProjectTotal(entity.getProjectTotal() + projectTotal.intValue()); - entity.setPendingTotal(entity.getProjectTotal() - closedTotal.intValue()); entity.setClosedTotal(entity.getClosedTotal() + closedTotal.intValue()); + entity.setPendingTotal(entity.getProjectTotal() - entity.getClosedTotal()); if (projectTotal.intValue() > NumConstant.ZERO) { entity.setPendingRatio(new BigDecimal(numberFormat.format((float) entity.getPendingTotal() / (float) entity.getProjectTotal()))); entity.setClosedRatio(new BigDecimal(numberFormat.format((float) entity.getClosedTotal() / (float) entity.getProjectTotal()))); @@ -286,7 +286,7 @@ public class StatsProjectServiceImpl implements StatsProjectService { do { //3.一千条一循环查询项目数据,封装每个组织对应数据 projectEntity.setPageNo(num); - projectList = projectService.getProjectList(projectEntity); + projectList = projectService.getProjectAgencyList(projectEntity); size = projectList.size(); num++; //遍历删除项目主表查询的无效数据 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectProcessService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectProcessService.java index 7dd28b1519..11e6f99e26 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectProcessService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectProcessService.java @@ -45,6 +45,7 @@ public interface ProjectProcessService extends BaseService * @Description 查询客户项目处理进展表中是创建项目和结案两种进展的有效数据(创建日期截取yyyy-mm-dd格式字段值) **/ List getProcessList(ProjectEntity projectEntity); + List getProcessAgencyList(ProjectEntity projectEntity); /** * 根据客户查询项目处理进展 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java index 87b377d39e..23367bfa06 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java @@ -47,6 +47,7 @@ public interface ProjectService extends BaseService { * @Description 根据客户Id查询客户项目业务表有效数据 **/ List getProjectList(ProjectEntity projectEntity); + List getProjectAgencyList(ProjectEntity projectEntity); /** * 已结案项目统计 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java index bb0925ca52..97df52fdbe 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java @@ -63,6 +63,10 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl getProcessList(ProjectEntity projectEntity) { + return baseDao.selectProcessList(projectEntity); + } + @Override + public List getProcessAgencyList(ProjectEntity projectEntity) { PageHelper.startPage(projectEntity.getPageNo(), projectEntity.getPageSize()); return baseDao.selectProcessList(projectEntity); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java index cf5da0feb9..9b409ce75f 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java @@ -55,6 +55,10 @@ public class ProjectServiceImpl extends BaseServiceImpl getProjectList(ProjectEntity projectEntity) { + return baseDao.selectProjectList(projectEntity); + } + @Override + public List getProjectAgencyList(ProjectEntity projectEntity) { PageHelper.startPage(projectEntity.getPageNo(), projectEntity.getPageSize()); return baseDao.selectProjectList(projectEntity); } From f4c9672e5b5938fc1f6ff3901220d399322a1189 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 14 Jan 2022 09:40:55 +0800 Subject: [PATCH 09/27] =?UTF-8?q?=E5=B0=8F=E7=BB=84=E6=9C=BA=E5=85=B3?= =?UTF-8?q?=E6=97=A5=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/service/impl/StatsGroupServiceImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsGroupServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsGroupServiceImpl.java index 084a3ed84c..fa7f1e3b42 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsGroupServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsGroupServiceImpl.java @@ -180,19 +180,19 @@ public class StatsGroupServiceImpl implements StatsGroupService { } /** - * @param customerAgencyInfos + * @param agencyList * @param timeDim * @param customerId * @Description 网格小组 【机关-日】 数据统计处理 * @author zxc */ - public List getAgencyGroupDaily(List customerAgencyInfos, DimIdGenerator.DimIdBean timeDim, String customerId) { - if (customerAgencyInfos.size() == NumConstant.ZERO) { + public List getAgencyGroupDaily(List agencyList, DimIdGenerator.DimIdBean timeDim, String customerId) { + if (CollectionUtils.isEmpty(agencyList)) { return new ArrayList<>(); } List result = new ArrayList<>(); String dateId = timeDim.getDateId(); - List agencyList = dimAgencyService.getAgencyListByCustomerId(customerId); +// List agencyList = dimAgencyService.getAgencyListByCustomerId(customerId); agencyList.forEach(agency -> { AgencyGroupDailyResultDTO agencyResult = new AgencyGroupDailyResultDTO(); String agencyId = agency.getId(); From d07189856073a751b881d1910fbb9e2900510cc8 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 14 Jan 2022 10:06:36 +0800 Subject: [PATCH 10/27] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E6=9A=82=E6=8F=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/result/DailyStatisticalVoteJobResultDTO.java | 1 + .../service/impl/IssueVoteStatisticalDailyServiceImpl.java | 2 +- .../src/main/resources/mapper/IssueVoteDetailDao.xml | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/DailyStatisticalVoteJobResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/DailyStatisticalVoteJobResultDTO.java index 7bb45f5a4e..581f97575e 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/DailyStatisticalVoteJobResultDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/DailyStatisticalVoteJobResultDTO.java @@ -17,6 +17,7 @@ public class DailyStatisticalVoteJobResultDTO implements Serializable { private static final long serialVersionUID = 5266996778036448163L; private String issueId; + private String customerId; /** * 统计日期 diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalDailyServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalDailyServiceImpl.java index 16734cfe0f..3cba3b10ff 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalDailyServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalDailyServiceImpl.java @@ -390,7 +390,7 @@ public class IssueVoteStatisticalDailyServiceImpl extends BaseServiceImpl NumConstant.ZERO); + } while (delNum == 1000 && delNum > NumConstant.ZERO); List> partition = ListUtils.partition(needInsert, NumConstant.ONE_HUNDRED); partition.forEach(p -> { baseDao.insertBatch(p); diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteDetailDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteDetailDao.xml index 7e3512afcc..4138ee635c 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteDetailDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteDetailDao.xml @@ -195,6 +195,7 @@ t.* FROM (SELECT vd.ISSUE_ID, + vd.CUSTOMER_ID AS customerId, COUNT(CASE WHEN vd.ATTITUDE = 'opposition' THEN 1 END) AS oppositionCount, COUNT(CASE WHEN vd.ATTITUDE = 'opposition' THEN 1 END) AS oppositionIncrement, COUNT(CASE WHEN vd.ATTITUDE = 'support' THEN 1 END) AS supportCount, From d2c2e5cf038051b047075c1f9f812c88647f8492 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 14 Jan 2022 10:17:18 +0800 Subject: [PATCH 11/27] =?UTF-8?q?=E8=AE=AE=E9=A2=98=E8=A1=A8=E5=86=B3?= =?UTF-8?q?=E6=97=A5=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/IssueVoteStatisticalDailyDao.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteStatisticalDailyDao.xml b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteStatisticalDailyDao.xml index bcbe6a5a4d..0340a7ea14 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteStatisticalDailyDao.xml +++ b/epmet-module/gov-issue/gov-issue-server/src/main/resources/mapper/IssueVoteStatisticalDailyDao.xml @@ -147,7 +147,7 @@ votable_count, - + customer_id, created_by, @@ -180,7 +180,7 @@ #{item.votableCount}, - + #{item.customerId}, #{item.createdBy}, From 3182879841e366ce6e13af2bd448d1844a6dba31 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 14 Jan 2022 10:27:41 +0800 Subject: [PATCH 12/27] =?UTF-8?q?=E5=B0=8F=E7=BB=84=E7=BB=84=E7=BB=87?= =?UTF-8?q?=E6=97=A5=E7=BB=9F=E8=AE=A1=E8=BF=98=E5=8E=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/impl/StatsGroupServiceImpl.java | 15 +++++---------- .../stats/FactGroupAgencyDailyService.java | 2 +- .../impl/FactGroupAgencyDailyServiceImpl.java | 13 +++++-------- 3 files changed, 11 insertions(+), 19 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsGroupServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsGroupServiceImpl.java index fa7f1e3b42..e1ae6dc1e2 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsGroupServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/StatsGroupServiceImpl.java @@ -135,15 +135,10 @@ public class StatsGroupServiceImpl implements StatsGroupService { if (customerIds.size() != NumConstant.ZERO) { DimIdGenerator.DimIdBean dimIdBean = this.getDimIdBean(formDTO); customerIds.forEach(customerId -> { - Boolean status = true; try { List customerAgencyInfos = dimAgencyService.getAgencyInfoByCustomerId(customerId); - List> partition = ListUtils.partition(customerAgencyInfos, NumConstant.ONE_HUNDRED); - for (List p : partition) { - List agencyGroupDaily = this.getAgencyGroupDaily(p, dimIdBean, customerId); - factGroupAgencyDailyService.insertGroupAgencyDaily(agencyGroupDaily, customerId,status); - status = false; - } + List agencyGroupDaily = this.getAgencyGroupDaily(customerAgencyInfos, dimIdBean, customerId); + factGroupAgencyDailyService.insertGroupAgencyDaily(agencyGroupDaily, customerId); } catch (Exception e) { log.error(String.format(GroupConstant.STATS_FAILED_AGENCY_DAILY, customerId, LocalDate.now(), e)); } @@ -186,13 +181,13 @@ public class StatsGroupServiceImpl implements StatsGroupService { * @Description 网格小组 【机关-日】 数据统计处理 * @author zxc */ - public List getAgencyGroupDaily(List agencyList, DimIdGenerator.DimIdBean timeDim, String customerId) { - if (CollectionUtils.isEmpty(agencyList)) { + public List getAgencyGroupDaily(List customerAgencyInfos, DimIdGenerator.DimIdBean timeDim, String customerId) { + if (customerAgencyInfos.size() == NumConstant.ZERO) { return new ArrayList<>(); } List result = new ArrayList<>(); String dateId = timeDim.getDateId(); -// List agencyList = dimAgencyService.getAgencyListByCustomerId(customerId); + List agencyList = dimAgencyService.getAgencyListByCustomerId(customerId); agencyList.forEach(agency -> { AgencyGroupDailyResultDTO agencyResult = new AgencyGroupDailyResultDTO(); String agencyId = agency.getId(); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactGroupAgencyDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactGroupAgencyDailyService.java index 23b34b22af..812c2c73da 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactGroupAgencyDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/FactGroupAgencyDailyService.java @@ -101,7 +101,7 @@ public interface FactGroupAgencyDailyService extends BaseService agencyList,String customerId,Boolean status); + void insertGroupAgencyDaily(List agencyList,String customerId); /** * @param diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGroupAgencyDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGroupAgencyDailyServiceImpl.java index b822dcaaa0..306849f76e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGroupAgencyDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/stats/impl/FactGroupAgencyDailyServiceImpl.java @@ -113,15 +113,12 @@ public class FactGroupAgencyDailyServiceImpl extends BaseServiceImpl agencyList,String customerId,Boolean status) { + public void insertGroupAgencyDaily(List agencyList,String customerId) { if (!CollectionUtils.isEmpty(agencyList)){ - // true 为当前客户第一回进入,需要删除历史数据 - if (status){ - Integer delNum; - do { - delNum = baseDao.deleteInsertAgencyDailyByDateId(agencyList.get(NumConstant.ZERO).getDateId(),customerId); - }while (delNum > NumConstant.ZERO && delNum == NumConstant.ONE_THOUSAND); - } + Integer delNum; + do { + delNum = baseDao.deleteInsertAgencyDailyByDateId(agencyList.get(NumConstant.ZERO).getDateId(),customerId); + }while (delNum > NumConstant.ZERO && delNum == NumConstant.ONE_THOUSAND); List> partition = ListUtils.partition(agencyList, NumConstant.ONE_HUNDRED); partition.forEach(p -> { baseDao.insertGroupAgencyDaily(p); From 8281ad1adbb16957853912249512f86adf8db335 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Fri, 14 Jan 2022 16:11:28 +0800 Subject: [PATCH 13/27] =?UTF-8?q?=E8=B0=83=E5=8A=A8=E3=80=81=E5=8F=98?= =?UTF-8?q?=E6=9B=B4=E8=AE=B0=E5=BD=95=E3=80=81=E5=8F=98=E6=9B=B4=E6=98=8E?= =?UTF-8?q?=E7=BB=86=E8=A1=A8=E4=BB=A3=E7=A0=81=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/dto/IcUserChangeDetailedDTO.java | 137 +++++++++++ .../com/epmet/dto/IcUserChangeRecordDTO.java | 131 ++++++++++ .../epmet/dto/IcUserTransferRecordDTO.java | 231 ++++++++++++++++++ .../IcUserChangeDetailedController.java | 41 ++++ .../IcUserChangeRecordController.java | 40 +++ .../IcUserTransferRecordController.java | 40 +++ .../epmet/dao/IcUserChangeDetailedDao.java | 34 +++ .../com/epmet/dao/IcUserChangeRecordDao.java | 33 +++ .../epmet/dao/IcUserTransferRecordDao.java | 33 +++ .../entity/IcUserChangeDetailedEntity.java | 104 ++++++++ .../entity/IcUserChangeRecordEntity.java | 100 ++++++++ .../entity/IcUserTransferRecordEntity.java | 200 +++++++++++++++ .../service/IcUserChangeDetailedService.java | 32 +++ .../service/IcUserChangeRecordService.java | 31 +++ .../service/IcUserTransferRecordService.java | 31 +++ .../impl/IcUserChangeDetailedServiceImpl.java | 37 +++ .../impl/IcUserChangeRecordServiceImpl.java | 36 +++ .../impl/IcUserTransferRecordServiceImpl.java | 36 +++ .../mapper/IcUserChangeDetailedDao.xml | 7 + .../mapper/IcUserChangeRecordDao.xml | 7 + .../mapper/IcUserTransferRecordDao.xml | 7 + 21 files changed, 1348 insertions(+) create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcUserChangeDetailedDTO.java create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcUserChangeRecordDTO.java create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcUserTransferRecordDTO.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcUserChangeDetailedController.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcUserChangeRecordController.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcUserTransferRecordController.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcUserChangeDetailedDao.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcUserChangeRecordDao.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcUserTransferRecordDao.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcUserChangeDetailedEntity.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcUserChangeRecordEntity.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcUserTransferRecordEntity.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcUserChangeDetailedService.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcUserChangeRecordService.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcUserTransferRecordService.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeDetailedServiceImpl.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java create mode 100644 epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserTransferRecordServiceImpl.java create mode 100644 epmet-user/epmet-user-server/src/main/resources/mapper/IcUserChangeDetailedDao.xml create mode 100644 epmet-user/epmet-user-server/src/main/resources/mapper/IcUserChangeRecordDao.xml create mode 100644 epmet-user/epmet-user-server/src/main/resources/mapper/IcUserTransferRecordDao.xml diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcUserChangeDetailedDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcUserChangeDetailedDTO.java new file mode 100644 index 0000000000..2c5203eddd --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcUserChangeDetailedDTO.java @@ -0,0 +1,137 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 变更明细表 +[一条变更记录对应多条人员类别数据] + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-14 + */ +@Data +public class IcUserChangeDetailedDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 唯一标识 + */ + private String id; + + /** + * 客户Id + */ + private String customerId; + + /** + * 字段名【18类对应的ic_resi_user表字段名】 + */ + private String icUserChangeRecordId; + + /** + * 组织Id + */ + private String agencyId; + + /** + * 网格Id + */ + private String gridId; + + /** + * 小区Id + */ + private String neighborHoodId; + + /** + * 楼栋Id + */ + private String buildingId; + + /** + * 单元Id + */ + private String buildingUnitId; + + /** + * 房屋Id + */ + private String houseId; + + /** + * 变更人Id + */ + private String icUserId; + + /** + * 操作类型【add:新增 category:类别变动 in:迁入 out:迁出】 + */ + private String type; + + /** + * 操作类型名称【add:新增 category:类别变动 in:迁入 out:迁出】 + */ + private String typeName; + + /** + * 字段名【18类对应的ic_resi_user表字段名】 + */ + private String fieldName; + + /** + * 当前类别的值 + */ + private Integer value; + + /** + * 删除标识 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcUserChangeRecordDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcUserChangeRecordDTO.java new file mode 100644 index 0000000000..e9f4e3ff91 --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcUserChangeRecordDTO.java @@ -0,0 +1,131 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 居民变更记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-14 + */ +@Data +public class IcUserChangeRecordDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 唯一标识 + */ + private String id; + + /** + * 调动表Id【只有调动记录此列才有值】 + */ + private String icUserTransferRecordId; + + /** + * 当前所属客户Id + */ + private String customerId; + + /** + * 操作人Id【customer_staff表userId】 + */ + private String operatorId; + + /** + * 被操作人Id【ic_resi_user表id】 + */ + private String icUserId; + + /** + * 操作人名称【customer_staff表real_name】 + */ + private String operatorName; + + /** + * 被操作人名称【ic_resi_user表name】 + */ + private String icUserName; + + /** + * 操作类型【add:新增 category:类别变动 transfer】 + */ + private String type; + + /** + * 操作类型名称【add:新增 category:类别变动 transfer:迁出】 + */ + private String typeName; + + /** + * 变更前文字描述 + */ + private String beforeChangeName; + + /** + * 变更后文字描述 + */ + private String afterChangeName; + + /** + * 调整时间 + */ + private Date changeTime; + + /** + * 备注说明 + */ + private String remark; + + /** + * 删除标识 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcUserTransferRecordDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcUserTransferRecordDTO.java new file mode 100644 index 0000000000..1b6992a53c --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/IcUserTransferRecordDTO.java @@ -0,0 +1,231 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 居民调动记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-14 + */ +@Data +public class IcUserTransferRecordDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 唯一标识 + */ + private String id; + + /** + * 被调动人Id【ic_resi_user表id】 + */ + private String icUserId; + + /** + * 调动(工作)人员Id【customer_staff表userId】 + */ + private String operatorId; + + /** + * 被调动人名称【ic_resi_user表name】 + */ + private String icUserName; + + /** + * 调动(工作)人员名称【customer_staff表real_name】 + */ + private String operatorName; + + /** + * 调动前客户Id + */ + private String oldCustomerId; + + /** + * 调动后客户Id + */ + private String newCustomerId; + + /** + * 调动前组织Id + */ + private String oldAgencyId; + + /** + * 调动后组织Id + */ + private String newAgencyId; + + /** + * 调动前组织名称 + */ + private String oldAgencyName; + + /** + * 调动后组织名称 + */ + private String newAgencyName; + + /** + * 调动前网格Id + */ + private String oldGridId; + + /** + * 调动后网格Id + */ + private String newGridId; + + /** + * 调动前网格名称 + */ + private String oldGridName; + + /** + * 调动后网格名称 + */ + private String newGridName; + + /** + * 调动前小区Id + */ + private String oldNeighborHoodId; + + /** + * 调动后小区Id + */ + private String newNeighborHoodId; + + /** + * 调动前小区名称 + */ + private String oldNeighborHoodName; + + /** + * 调动后小区名称 + */ + private String newNeighborHoodName; + + /** + * 调动前楼栋Id + */ + private String oldBuildingId; + + /** + * 调动后楼栋Id + */ + private String newBuildingId; + + /** + * 调动前楼栋名称 + */ + private String oldBuildingName; + + /** + * 调动后楼栋名称 + */ + private String newBuildingName; + + /** + * 调动前单元Id + */ + private String oldBuildingUnitId; + + /** + * 调动后单元Id + */ + private String newBuildingUnitId; + + /** + * 调动前单元名称 + */ + private String oldBuildingUnitName; + + /** + * 调动后单元名称 + */ + private String newBuildingUnitName; + + /** + * 调动前房屋Id + */ + private String oldHouseId; + + /** + * 调动后房屋Id + */ + private String newHouseId; + + /** + * 调动前房屋名称 + */ + private String oldHouseName; + + /** + * 调动后房屋名称 + */ + private String newHouseName; + + /** + * 调动时间 + */ + private Date transferTime; + + /** + * 备注说明 + */ + private String remark; + + /** + * 删除标识 + */ + private String delFlag; + + /** + * 乐观锁 + */ + private Integer revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcUserChangeDetailedController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcUserChangeDetailedController.java new file mode 100644 index 0000000000..66f3488eef --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcUserChangeDetailedController.java @@ -0,0 +1,41 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.controller; + +import com.epmet.service.IcUserChangeDetailedService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + + +/** + * 变更明细表 +[一条变更记录对应多条人员类别数据] + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-14 + */ +@RestController +@RequestMapping("icuserchangedetailed") +public class IcUserChangeDetailedController { + + @Autowired + private IcUserChangeDetailedService icUserChangeDetailedService; + + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcUserChangeRecordController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcUserChangeRecordController.java new file mode 100644 index 0000000000..6da9c5b6cf --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcUserChangeRecordController.java @@ -0,0 +1,40 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.controller; + +import com.epmet.service.IcUserChangeRecordService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + + +/** + * 居民变更记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-14 + */ +@RestController +@RequestMapping("icuserchangerecord") +public class IcUserChangeRecordController { + + @Autowired + private IcUserChangeRecordService icUserChangeRecordService; + + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcUserTransferRecordController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcUserTransferRecordController.java new file mode 100644 index 0000000000..ead153c8cf --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcUserTransferRecordController.java @@ -0,0 +1,40 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.controller; + +import com.epmet.service.IcUserTransferRecordService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + + +/** + * 居民调动记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-14 + */ +@RestController +@RequestMapping("icusertransferrecord") +public class IcUserTransferRecordController { + + @Autowired + private IcUserTransferRecordService icUserTransferRecordService; + + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcUserChangeDetailedDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcUserChangeDetailedDao.java new file mode 100644 index 0000000000..6ba4093056 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcUserChangeDetailedDao.java @@ -0,0 +1,34 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcUserChangeDetailedEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 变更明细表 +[一条变更记录对应多条人员类别数据] + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-14 + */ +@Mapper +public interface IcUserChangeDetailedDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcUserChangeRecordDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcUserChangeRecordDao.java new file mode 100644 index 0000000000..f552d6798a --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcUserChangeRecordDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcUserChangeRecordEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 居民变更记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-14 + */ +@Mapper +public interface IcUserChangeRecordDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcUserTransferRecordDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcUserTransferRecordDao.java new file mode 100644 index 0000000000..dacd67bd6c --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcUserTransferRecordDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcUserTransferRecordEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 居民调动记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-14 + */ +@Mapper +public interface IcUserTransferRecordDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcUserChangeDetailedEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcUserChangeDetailedEntity.java new file mode 100644 index 0000000000..e230fbfd2a --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcUserChangeDetailedEntity.java @@ -0,0 +1,104 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 变更明细表 +[一条变更记录对应多条人员类别数据] + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-14 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_user_change_detailed") +public class IcUserChangeDetailedEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 字段名【18类对应的ic_resi_user表字段名】 + */ + private String icUserChangeRecordId; + + /** + * 组织Id + */ + private String agencyId; + + /** + * 网格Id + */ + private String gridId; + + /** + * 小区Id + */ + private String neighborHoodId; + + /** + * 楼栋Id + */ + private String buildingId; + + /** + * 单元Id + */ + private String buildingUnitId; + + /** + * 房屋Id + */ + private String houseId; + + /** + * 变更人Id + */ + private String icUserId; + + /** + * 操作类型【add:新增 category:类别变动 in:迁入 out:迁出】 + */ + private String type; + + /** + * 操作类型名称【add:新增 category:类别变动 in:迁入 out:迁出】 + */ + private String typeName; + + /** + * 字段名【18类对应的ic_resi_user表字段名】 + */ + private String fieldName; + + /** + * 当前类别的值 + */ + private Integer value; + +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcUserChangeRecordEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcUserChangeRecordEntity.java new file mode 100644 index 0000000000..eaf7226588 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcUserChangeRecordEntity.java @@ -0,0 +1,100 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 居民变更记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-14 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_user_change_record") +public class IcUserChangeRecordEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 调动表Id【只有调动记录此列才有值】 + */ + private String icUserTransferRecordId; + + /** + * 当前所属客户Id + */ + private String customerId; + + /** + * 操作人Id【customer_staff表userId】 + */ + private String operatorId; + + /** + * 被操作人Id【ic_resi_user表id】 + */ + private String icUserId; + + /** + * 操作人名称【customer_staff表real_name】 + */ + private String operatorName; + + /** + * 被操作人名称【ic_resi_user表name】 + */ + private String icUserName; + + /** + * 操作类型【add:新增 category:类别变动 transfer】 + */ + private String type; + + /** + * 操作类型名称【add:新增 category:类别变动 transfer:迁出】 + */ + private String typeName; + + /** + * 变更前文字描述 + */ + private String beforeChangeName; + + /** + * 变更后文字描述 + */ + private String afterChangeName; + + /** + * 调整时间 + */ + private Date changeTime; + + /** + * 备注说明 + */ + private String remark; + +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcUserTransferRecordEntity.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcUserTransferRecordEntity.java new file mode 100644 index 0000000000..6c57607ff8 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/entity/IcUserTransferRecordEntity.java @@ -0,0 +1,200 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 居民调动记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-14 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_user_transfer_record") +public class IcUserTransferRecordEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 被调动人Id【ic_resi_user表id】 + */ + private String icUserId; + + /** + * 调动(工作)人员Id【customer_staff表userId】 + */ + private String operatorId; + + /** + * 被调动人名称【ic_resi_user表name】 + */ + private String icUserName; + + /** + * 调动(工作)人员名称【customer_staff表real_name】 + */ + private String operatorName; + + /** + * 调动前客户Id + */ + private String oldCustomerId; + + /** + * 调动后客户Id + */ + private String newCustomerId; + + /** + * 调动前组织Id + */ + private String oldAgencyId; + + /** + * 调动后组织Id + */ + private String newAgencyId; + + /** + * 调动前组织名称 + */ + private String oldAgencyName; + + /** + * 调动后组织名称 + */ + private String newAgencyName; + + /** + * 调动前网格Id + */ + private String oldGridId; + + /** + * 调动后网格Id + */ + private String newGridId; + + /** + * 调动前网格名称 + */ + private String oldGridName; + + /** + * 调动后网格名称 + */ + private String newGridName; + + /** + * 调动前小区Id + */ + private String oldNeighborHoodId; + + /** + * 调动后小区Id + */ + private String newNeighborHoodId; + + /** + * 调动前小区名称 + */ + private String oldNeighborHoodName; + + /** + * 调动后小区名称 + */ + private String newNeighborHoodName; + + /** + * 调动前楼栋Id + */ + private String oldBuildingId; + + /** + * 调动后楼栋Id + */ + private String newBuildingId; + + /** + * 调动前楼栋名称 + */ + private String oldBuildingName; + + /** + * 调动后楼栋名称 + */ + private String newBuildingName; + + /** + * 调动前单元Id + */ + private String oldBuildingUnitId; + + /** + * 调动后单元Id + */ + private String newBuildingUnitId; + + /** + * 调动前单元名称 + */ + private String oldBuildingUnitName; + + /** + * 调动后单元名称 + */ + private String newBuildingUnitName; + + /** + * 调动前房屋Id + */ + private String oldHouseId; + + /** + * 调动后房屋Id + */ + private String newHouseId; + + /** + * 调动前房屋名称 + */ + private String oldHouseName; + + /** + * 调动后房屋名称 + */ + private String newHouseName; + + /** + * 调动时间 + */ + private Date transferTime; + + /** + * 备注说明 + */ + private String remark; + +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcUserChangeDetailedService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcUserChangeDetailedService.java new file mode 100644 index 0000000000..859a324c82 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcUserChangeDetailedService.java @@ -0,0 +1,32 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.IcUserChangeDetailedEntity; + +/** + * 变更明细表 +[一条变更记录对应多条人员类别数据] + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-14 + */ +public interface IcUserChangeDetailedService extends BaseService { + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcUserChangeRecordService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcUserChangeRecordService.java new file mode 100644 index 0000000000..61ba776f9e --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcUserChangeRecordService.java @@ -0,0 +1,31 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.IcUserChangeRecordEntity; + +/** + * 居民变更记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-14 + */ +public interface IcUserChangeRecordService extends BaseService { + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcUserTransferRecordService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcUserTransferRecordService.java new file mode 100644 index 0000000000..5ce1565dcf --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/IcUserTransferRecordService.java @@ -0,0 +1,31 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.entity.IcUserTransferRecordEntity; + +/** + * 居民调动记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-14 + */ +public interface IcUserTransferRecordService extends BaseService { + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeDetailedServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeDetailedServiceImpl.java new file mode 100644 index 0000000000..6bff100276 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeDetailedServiceImpl.java @@ -0,0 +1,37 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.dao.IcUserChangeDetailedDao; +import com.epmet.entity.IcUserChangeDetailedEntity; +import com.epmet.service.IcUserChangeDetailedService; +import org.springframework.stereotype.Service; + +/** + * 变更明细表 +[一条变更记录对应多条人员类别数据] + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-14 + */ +@Service +public class IcUserChangeDetailedServiceImpl extends BaseServiceImpl implements IcUserChangeDetailedService { + + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java new file mode 100644 index 0000000000..92589c9bfc --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserChangeRecordServiceImpl.java @@ -0,0 +1,36 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.dao.IcUserChangeRecordDao; +import com.epmet.entity.IcUserChangeRecordEntity; +import com.epmet.service.IcUserChangeRecordService; +import org.springframework.stereotype.Service; + +/** + * 居民变更记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-14 + */ +@Service +public class IcUserChangeRecordServiceImpl extends BaseServiceImpl implements IcUserChangeRecordService { + + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserTransferRecordServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserTransferRecordServiceImpl.java new file mode 100644 index 0000000000..4e06314238 --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcUserTransferRecordServiceImpl.java @@ -0,0 +1,36 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.dao.IcUserTransferRecordDao; +import com.epmet.entity.IcUserTransferRecordEntity; +import com.epmet.service.IcUserTransferRecordService; +import org.springframework.stereotype.Service; + +/** + * 居民调动记录表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-14 + */ +@Service +public class IcUserTransferRecordServiceImpl extends BaseServiceImpl implements IcUserTransferRecordService { + + +} \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcUserChangeDetailedDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcUserChangeDetailedDao.xml new file mode 100644 index 0000000000..acb4aa197b --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcUserChangeDetailedDao.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcUserChangeRecordDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcUserChangeRecordDao.xml new file mode 100644 index 0000000000..6632dd653c --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcUserChangeRecordDao.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcUserTransferRecordDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcUserTransferRecordDao.xml new file mode 100644 index 0000000000..be24ced9be --- /dev/null +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcUserTransferRecordDao.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file From c21042acc89ae4aaf762f6c7a2da5308e281f7fa Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Fri, 14 Jan 2022 16:13:04 +0800 Subject: [PATCH 14/27] yitibiaojue --- .../service/impl/IssueVoteStatisticalDailyServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalDailyServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalDailyServiceImpl.java index 3cba3b10ff..bace75b3df 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalDailyServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalDailyServiceImpl.java @@ -390,7 +390,7 @@ public class IssueVoteStatisticalDailyServiceImpl extends BaseServiceImpl NumConstant.ZERO); + } while (delNum > NumConstant.ZERO); List> partition = ListUtils.partition(needInsert, NumConstant.ONE_HUNDRED); partition.forEach(p -> { baseDao.insertBatch(p); From 83ee95ed2409aca5745581cf6b760d7dbee88156 Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Fri, 14 Jan 2022 16:26:17 +0800 Subject: [PATCH 15/27] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=201.=E7=A4=BE?= =?UTF-8?q?=E5=8C=BA=E6=9F=A5=E8=AF=A2-=E6=90=9C=E7=B4=A2=E6=88=BF?= =?UTF-8?q?=E5=B1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/ListIcNeighborHoodFormDTO.java | 5 ++ .../com/epmet/controller/HouseController.java | 47 ++++++++++++++++++- .../main/java/com/epmet/dao/IcHouseDao.java | 7 ++- .../java/com/epmet/service/HouseService.java | 9 +++- .../epmet/service/impl/HouseServiceImpl.java | 42 ++++++++++++----- .../src/main/resources/mapper/IcHouseDao.xml | 36 ++++++++++---- 6 files changed, 122 insertions(+), 24 deletions(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/ListIcNeighborHoodFormDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/ListIcNeighborHoodFormDTO.java index 80b95263b6..402c86c868 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/ListIcNeighborHoodFormDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/ListIcNeighborHoodFormDTO.java @@ -76,5 +76,10 @@ public class ListIcNeighborHoodFormDTO implements Serializable{ */ private String neighborHoodId; + /** + * 搜索关键词,社区查询,搜索输入的关键词 + */ + private String keyword; + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java index 7b6c7e44c0..1edcfe206d 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java @@ -34,6 +34,7 @@ import com.epmet.excel.IcHouseExcel; import com.epmet.service.HouseService; import com.epmet.util.ExcelPoiUtils; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.CollectionUtils; import org.springframework.web.bind.annotation.*; @@ -64,11 +65,55 @@ public class HouseController { public Result houseList(@RequestBody ListIcNeighborHoodFormDTO formDTO){ //效验数据 ValidatorUtils.validateEntity(formDTO); - IcNeighborHoodResultDTO icNeighborHoodResultDTO = houseService.listNeighborhood(formDTO); + + String queryScene = "house_manage"; + + IcNeighborHoodResultDTO icNeighborHoodResultDTO = houseService.listNeighborhood(formDTO.getBuildingId(), formDTO.getOwnerName(), + formDTO.getOwnerPhone(), null, + null, queryScene, + formDTO.getPageNo(), formDTO.getPageSize()); return new Result().ok(icNeighborHoodResultDTO); } + /** + *@Description 社区查询-搜索房屋 + *@Author wangxianzhang + *@Date 2022/1/14 11:00 上午 + *@Param + *@return + */ + @PostMapping("search") + public Result searchHouse(@RequestBody ListIcNeighborHoodFormDTO formDTO) { + String keyword = formDTO.getKeyword(); + if (StringUtils.isBlank(keyword)) { + IcNeighborHoodResultDTO r = new IcNeighborHoodResultDTO(); + r.setTotal(0); + r.setList(new ArrayList<>()); + return new Result().ok(r); + } + + String neighborhoodName; + String buildingName; + + int commaIndex = keyword.indexOf(","); + if (commaIndex != -1) { + neighborhoodName = keyword.substring(0, commaIndex); + buildingName = keyword.substring(commaIndex + 1); + } else { + neighborhoodName = keyword; + buildingName = null; + } + + // 使用场景:社区查询 + String scene = "community_search"; + + IcNeighborHoodResultDTO icNeighborHoodResultDTO = houseService.listNeighborhood(null, null, null, + neighborhoodName, buildingName, scene, formDTO.getPageNo(), formDTO.getPageSize()); + + return new Result().ok(icNeighborHoodResultDTO); + } + @NoRepeatSubmit @PostMapping("houseadd") public Result houseAdd(@LoginUser TokenDto tokenDTO, @RequestBody IcHouseFormDTO formDTO){ diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java index 1553cccc9d..a974510a38 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java @@ -47,7 +47,12 @@ public interface IcHouseDao extends BaseDao { // @Param("building") IcBuildingEntity building, // @Param("house") IcHouseEntity house); IPage> searchHouseByPage(IPage page, - @Param("house") IcHouseEntity house); + @Param("buildingId") String buildingId, + @Param("ownerName") String ownerName, + @Param("ownerPhone") String ownerPhone, + @Param("neighborHoodName") String neighborHoodName, + @Param("buildingName") String buildingName, + @Param("queryScene") String queryScene); List searchAllHouse(@Param("house") IcHouseEntity house); diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java index 48ab8c7d1b..e92fbd0e57 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java @@ -49,7 +49,14 @@ public interface HouseService { List importExcel(String customerId, List list, String staffId, List numList); - IcNeighborHoodResultDTO listNeighborhood(ListIcNeighborHoodFormDTO formDTO); + IcNeighborHoodResultDTO listNeighborhood(String buildingId, + String ownerName, + String ownerPhone, + String neighborHoodName, + String buildingName, + String queryScene, + Integer pageNo, + Integer pageSize); void exportBuildinginfo(ListIcNeighborHoodFormDTO formDTO, HttpServletResponse response) throws Exception; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java index 69a2000d97..6f072441f9 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java @@ -207,12 +207,29 @@ public class HouseServiceImpl implements HouseService { } @Override - public IcNeighborHoodResultDTO listNeighborhood(ListIcNeighborHoodFormDTO formDTO) { + public IcNeighborHoodResultDTO listNeighborhood(String buildingId, + String ownerName, + String ownerPhone, + String neighborHoodName, + String buildingName, + String queryScene, + Integer pageNo, + Integer pageSize) { IcNeighborHoodResultDTO result = new IcNeighborHoodResultDTO(); //如果类型是house 查房屋 - IPage> resultMap = searchHouse(formDTO); - result.setTotal(Long.valueOf(resultMap.getTotal()).intValue()); - result.setList(resultMap.getRecords()); + //IPage> resultMap = searchHouse(buildingId, ownerName, ownerPhone, neighborHoodName, buildingName, pageNo, pageSize); + + IPage page = new Page(pageNo,pageSize); + + IPage> mapIPage = icHouseDao.searchHouseByPage(page, buildingId, ownerName, ownerPhone, neighborHoodName, buildingName, queryScene); + List> records = mapIPage.getRecords(); + records.forEach(item->{ + item.put("houseType", HouseTypeEnums.getTypeValue(item.get("houseTypeKey"))); + item.put("purpose", HousePurposeEnums.getTypeValue(item.get("purposeKey"))); + }); + + result.setTotal(Long.valueOf(mapIPage.getTotal()).intValue()); + result.setList(records); return result; } @@ -247,20 +264,23 @@ public class HouseServiceImpl implements HouseService { return icHouseExcels; } - private IPage> searchHouse(ListIcNeighborHoodFormDTO formDTO) { - IPage page = new Page(formDTO.getPageNo(),formDTO.getPageSize()); - - IcHouseEntity house = ConvertUtils.sourceToTarget(formDTO, IcHouseEntity.class); - house.setDelFlag("0"); + /*private IPage> searchHouse(String buildingId, + String ownerName, + String ownerPhone, + String neighborHoodName, + String buildingName, + Integer pageNo, + Integer pageSize) { + IPage page = new Page(pageNo,pageSize); - IPage> mapIPage = icHouseDao.searchHouseByPage(page, house); + IPage> mapIPage = icHouseDao.searchHouseByPage(page, buildingId, ownerName, ownerPhone, neighborHoodName, buildingName); List> records = mapIPage.getRecords(); records.forEach(item->{ item.put("houseType", HouseTypeEnums.getTypeValue(item.get("houseTypeKey"))); item.put("purpose", HousePurposeEnums.getTypeValue(item.get("purposeKey"))); }); return mapIPage; - } + }*/ @Override public List queryListHouseInfo(Set houseIdList) { diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml index f997a5cf3a..ab84f43e0f 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml @@ -130,21 +130,37 @@ LEFT JOIN ic_building_unit d on a.BUILDING_UNIT_ID = d.ID and d.DEL_FLAG = '0' - - AND a.BUILDING_ID = #{house.buildingId} + + AND a.BUILDING_ID = #{buildingId} - - AND a.OWNER_NAME like concat('%',#{house.ownerName},'%') + + AND a.OWNER_NAME like concat('%',#{ownerName},'%') - - AND a.OWNER_PHONE like concat('%',#{house.ownerPhone},'%') + + AND a.OWNER_PHONE like concat('%',#{ownerPhone},'%') - - AND a.DEL_FLAG = #{house.delFlag} + + AND c.NEIGHBOR_HOOD_NAME like CONCAT('%',#{neighborHoodName},'%') + + + AND b.BUILDING_NAME like CONCAT('%',#{buildingName},'%') - - ORDER BY CAST(d.UNIT_NUM AS SIGNED), a.DOOR_NAME + /*排序规则:如果是社区查询则根据小区、楼栋、单元、房屋名字分别升序排序*/ + + + ORDER BY CONVERT(c.NEIGHBOR_HOOD_NAME using gbk) ASC, + CONVERT(b.BUILDING_NAME USING gbk) ASC, + CONVERT(d.UNIT_NAME USING gbk) ASC, + CONVERT(a.HOUSE_NAME using gbk) ASC + + + ORDER BY CAST(d.UNIT_NUM AS SIGNED), a.DOOR_NAME + + + ORDER BY CAST(d.UNIT_NUM AS SIGNED), a.DOOR_NAME + + + SELECT + rankData.ORG_NAME AS NAME, + round(rankData.SCORE,1) score, + rankData.ORG_ID as orgId, + rankData.MONTH_ID + FROM + screen_org_rank_data_shibei rankData + LEFT JOIN screen_customer_agency agency + ON rankData.PARENT_ID = agency.AGENCY_ID AND agency.DEL_FLAG = 0 + WHERE + rankData.DEL_FLAG = '0' + AND rankData.ORG_TYPE = 'grid' + AND rankData.ALL_PARENT_IDS LIKE CONCAT('%',#{agencyId},'%') + AND rankData.MONTH_ID = #{monthId} + ORDER BY + rankData.SCORE DESC + LIMIT #{topNum} + + + + From c191724ce8119bda2814326e69beb6d36e4fd968 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Fri, 14 Jan 2022 18:01:14 +0800 Subject: [PATCH 17/27] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86-?= =?UTF-8?q?=E5=85=A8=E9=83=A8=E9=A1=B9=E7=9B=AE=E5=88=97=E8=A1=A8=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/govproject/ProjectDao.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govproject/ProjectDao.xml b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govproject/ProjectDao.xml index c8682a66dc..750610296a 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govproject/ProjectDao.xml +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/resources/mapper/govproject/ProjectDao.xml @@ -29,7 +29,6 @@ WHERE p.DEL_FLAG = '0' AND p.CUSTOMER_ID = #{customerId} - AND p.ORG_ID_PATH LIKE concat('%', #{agencyId}, '%') AND p.`STATUS` = #{projectStatus} From 46fbe3b38fbbddc324a168b2ad7261be3520ff71 Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 14 Jan 2022 18:11:15 +0800 Subject: [PATCH 18/27] =?UTF-8?q?=E5=8A=A8=E5=8A=9B=E7=BD=91=E6=A0=BC=20?= =?UTF-8?q?=E5=B8=82=E5=8C=97=E4=B8=93=E5=B1=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/datareport/controller/screen/IndexController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java index 9a024bf0f7..1e4a67a0b9 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/controller/screen/IndexController.java @@ -160,10 +160,10 @@ public class IndexController { * @author sun */ @PostMapping("advancedbranchrank-shibei") - Result> advancedBranchRankShibei(@RequestBody AdvancedBranchRankFormDTO formDTO, /*@LoginUser*/ TokenDto loginUser){ + Result> advancedBranchRankShibei(@RequestBody AdvancedBranchRankFormDTO formDTO, @LoginUser TokenDto loginUser){ ValidatorUtils.validateEntity(formDTO, AdvancedBranchRankFormDTO.AddUserInternalGroup.class); formDTO.setCustomerId(loginUser.getCustomerId()); - formDTO.setCustomerId("45687aa479955f9d06204d415238f7cc"); + //formDTO.setCustomerId("45687aa479955f9d06204d415238f7cc"); return new Result>().ok(indexService.advancedBranchRankShibei(formDTO)); } From a48f50b6b784f15718acab30112e802ac669f095 Mon Sep 17 00:00:00 2001 From: jianjun Date: Fri, 14 Jan 2022 18:11:50 +0800 Subject: [PATCH 19/27] =?UTF-8?q?=E5=8A=A8=E5=8A=9B=E7=BD=91=E6=A0=BC=20?= =?UTF-8?q?=E5=B8=82=E5=8C=97=E4=B8=93=E5=B1=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mapper/screen/ScreenOrgRankDataShibeiDao.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataShibeiDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataShibeiDao.xml index 391c56eec6..762d9c5eb9 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataShibeiDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenOrgRankDataShibeiDao.xml @@ -19,6 +19,7 @@ AND rankData.ORG_TYPE = 'grid' AND rankData.ALL_PARENT_IDS LIKE CONCAT('%',#{agencyId},'%') AND rankData.MONTH_ID = #{monthId} + AND rankData.CUSTOMER_ID = #{customerId} ORDER BY rankData.SCORE DESC LIMIT #{topNum} From d1b2889537565dc213e275f269fd25dde231c7f3 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 17 Jan 2022 09:12:55 +0800 Subject: [PATCH 20/27] =?UTF-8?q?=E6=96=87=E4=BB=B6=E7=94=9F=E6=88=90?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E8=B4=A6=E6=88=B7=E5=AF=86=E7=A0=81=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=88=90root?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- epmet-cloud-generator/src/main/resources/application.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/epmet-cloud-generator/src/main/resources/application.yml b/epmet-cloud-generator/src/main/resources/application.yml index cc5174da7b..0bd4a76f77 100644 --- a/epmet-cloud-generator/src/main/resources/application.yml +++ b/epmet-cloud-generator/src/main/resources/application.yml @@ -10,8 +10,8 @@ spring: #MySQL配置 driverClassName: com.mysql.jdbc.Driver url: jdbc:mysql://192.168.1.140:3306/epmet_data_statistical?useUnicode=true&characterEncoding=UTF-8&useSSL=false - username: epmet_dba - password: EpmEt-dbA-UsEr + username: root + password: root #oracle配置 # driverClassName: oracle.jdbc.OracleDriver # url: jdbc:oracle:thin:@192.168.10.10:1521:helowin From ebbb4539bc6386c91cc39e24235acbe2f53d30b3 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 17 Jan 2022 09:31:28 +0800 Subject: [PATCH 21/27] =?UTF-8?q?=E6=96=B0=E4=BB=A3=E7=A0=81=E7=94=9F?= =?UTF-8?q?=E6=88=90=20=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=E7=94=9F?= =?UTF-8?q?=E6=88=90=E9=A1=B6=E9=83=A8renren=E4=BB=8B=E7=BB=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/template/Controller.java.vm | 17 ---- .../src/main/resources/template/DTO.java.vm | 17 ---- .../src/main/resources/template/Dao.java.vm | 17 ---- .../main/resources/template/Entity.java.vm | 17 ---- .../src/main/resources/template/Excel.java.vm | 17 ---- .../src/main/resources/template/Redis.java.vm | 17 ---- .../main/resources/template/Service.java.vm | 17 ---- .../resources/template/ServiceImpl.java.vm | 17 ---- .../com/epmet/dto/IcOftenUseFunctionDTO.java | 91 +++++++++++++++++++ .../IcOftenUseFunctionController.java | 42 +++++++++ .../com/epmet/dao/IcOftenUseFunctionDao.java | 33 +++++++ .../entity/IcOftenUseFunctionEntity.java | 61 +++++++++++++ .../service/IcOftenUseFunctionService.java | 51 +++++++++++ .../impl/IcOftenUseFunctionServiceImpl.java | 52 +++++++++++ .../mapper/IcOftenUseFunctionDao.xml | 7 ++ .../dto/IcIndividualCategoryManageDTO.java | 74 +++++++++++++++ .../IcIndividualCategoryManageController.java | 42 +++++++++ .../dao/IcIndividualCategoryManageDao.java | 16 ++++ .../IcIndividualCategoryManageEntity.java | 44 +++++++++ .../IcIndividualCategoryManageService.java | 38 ++++++++ ...IcIndividualCategoryManageServiceImpl.java | 45 +++++++++ .../mapper/IcIndividualCategoryManageDao.xml | 7 ++ 22 files changed, 603 insertions(+), 136 deletions(-) create mode 100644 epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/IcOftenUseFunctionDTO.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/IcOftenUseFunctionController.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/IcOftenUseFunctionDao.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/IcOftenUseFunctionEntity.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/IcOftenUseFunctionService.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/IcOftenUseFunctionServiceImpl.java create mode 100644 epmet-module/gov-access/gov-access-server/src/main/resources/mapper/IcOftenUseFunctionDao.xml create mode 100644 epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/IcIndividualCategoryManageDTO.java create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcIndividualCategoryManageController.java create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/IcIndividualCategoryManageDao.java create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/IcIndividualCategoryManageEntity.java create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcIndividualCategoryManageService.java create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcIndividualCategoryManageServiceImpl.java create mode 100644 epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcIndividualCategoryManageDao.xml diff --git a/epmet-cloud-generator/src/main/resources/template/Controller.java.vm b/epmet-cloud-generator/src/main/resources/template/Controller.java.vm index 387cdc6961..e7d642a3ca 100644 --- a/epmet-cloud-generator/src/main/resources/template/Controller.java.vm +++ b/epmet-cloud-generator/src/main/resources/template/Controller.java.vm @@ -1,20 +1,3 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - package ${package}.controller; import ${main}.commons.tools.page.PageData; diff --git a/epmet-cloud-generator/src/main/resources/template/DTO.java.vm b/epmet-cloud-generator/src/main/resources/template/DTO.java.vm index 83d0e1db5a..f444c74181 100644 --- a/epmet-cloud-generator/src/main/resources/template/DTO.java.vm +++ b/epmet-cloud-generator/src/main/resources/template/DTO.java.vm @@ -1,20 +1,3 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - package ${package}.dto; import java.io.Serializable; diff --git a/epmet-cloud-generator/src/main/resources/template/Dao.java.vm b/epmet-cloud-generator/src/main/resources/template/Dao.java.vm index 43af398afa..a894ab59a7 100644 --- a/epmet-cloud-generator/src/main/resources/template/Dao.java.vm +++ b/epmet-cloud-generator/src/main/resources/template/Dao.java.vm @@ -1,20 +1,3 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - package ${package}.dao; import ${main}.commons.mybatis.dao.BaseDao; diff --git a/epmet-cloud-generator/src/main/resources/template/Entity.java.vm b/epmet-cloud-generator/src/main/resources/template/Entity.java.vm index 8822676ab2..5a8de66500 100644 --- a/epmet-cloud-generator/src/main/resources/template/Entity.java.vm +++ b/epmet-cloud-generator/src/main/resources/template/Entity.java.vm @@ -1,20 +1,3 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - package ${package}.entity; import com.baomidou.mybatisplus.annotation.TableName; diff --git a/epmet-cloud-generator/src/main/resources/template/Excel.java.vm b/epmet-cloud-generator/src/main/resources/template/Excel.java.vm index eee8847471..3590e88559 100644 --- a/epmet-cloud-generator/src/main/resources/template/Excel.java.vm +++ b/epmet-cloud-generator/src/main/resources/template/Excel.java.vm @@ -1,20 +1,3 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - package ${package}.excel; import cn.afterturn.easypoi.excel.annotation.Excel; diff --git a/epmet-cloud-generator/src/main/resources/template/Redis.java.vm b/epmet-cloud-generator/src/main/resources/template/Redis.java.vm index 22ab9f82f4..abe1ff0c2e 100644 --- a/epmet-cloud-generator/src/main/resources/template/Redis.java.vm +++ b/epmet-cloud-generator/src/main/resources/template/Redis.java.vm @@ -1,20 +1,3 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - package ${package}.redis; import ${main}.commons.tools.redis.RedisUtils; diff --git a/epmet-cloud-generator/src/main/resources/template/Service.java.vm b/epmet-cloud-generator/src/main/resources/template/Service.java.vm index 388dba62cf..59e490572d 100644 --- a/epmet-cloud-generator/src/main/resources/template/Service.java.vm +++ b/epmet-cloud-generator/src/main/resources/template/Service.java.vm @@ -1,20 +1,3 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - package ${package}.service; import ${main}.commons.mybatis.service.BaseService; diff --git a/epmet-cloud-generator/src/main/resources/template/ServiceImpl.java.vm b/epmet-cloud-generator/src/main/resources/template/ServiceImpl.java.vm index e0e34c5a3a..f0bcfe2a7e 100644 --- a/epmet-cloud-generator/src/main/resources/template/ServiceImpl.java.vm +++ b/epmet-cloud-generator/src/main/resources/template/ServiceImpl.java.vm @@ -1,20 +1,3 @@ -/** - * Copyright 2018 人人开源 https://www.renren.io - *

- * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - *

- * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - *

- * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - package ${package}.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; diff --git a/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/IcOftenUseFunctionDTO.java b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/IcOftenUseFunctionDTO.java new file mode 100644 index 0000000000..83e458ceb6 --- /dev/null +++ b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/IcOftenUseFunctionDTO.java @@ -0,0 +1,91 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 常用功能 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-17 + */ +@Data +public class IcOftenUseFunctionDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 用户ID + */ + private String userId; + + /** + * 菜单ID + */ + private String menuId; + + /** + * 排序 + */ + private Integer sort; + + /** + * 删除标记 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private String revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/IcOftenUseFunctionController.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/IcOftenUseFunctionController.java new file mode 100644 index 0000000000..b852a732f2 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/IcOftenUseFunctionController.java @@ -0,0 +1,42 @@ +package com.epmet.controller; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.IcOftenUseFunctionDTO; +import com.epmet.service.IcOftenUseFunctionService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * 常用功能 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-17 + */ +@RestController +@RequestMapping("icoftenusefunction") +public class IcOftenUseFunctionController { + + @Autowired + private IcOftenUseFunctionService icOftenUseFunctionService; + + @PostMapping + public Result save(@RequestBody IcOftenUseFunctionDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + icOftenUseFunctionService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody IcOftenUseFunctionDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + icOftenUseFunctionService.update(dto); + return new Result(); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/IcOftenUseFunctionDao.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/IcOftenUseFunctionDao.java new file mode 100644 index 0000000000..9c1a1e4a21 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/IcOftenUseFunctionDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcOftenUseFunctionEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 常用功能 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-17 + */ +@Mapper +public interface IcOftenUseFunctionDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/IcOftenUseFunctionEntity.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/IcOftenUseFunctionEntity.java new file mode 100644 index 0000000000..9c0e1cf9f0 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/entity/IcOftenUseFunctionEntity.java @@ -0,0 +1,61 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 常用功能 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-17 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_often_use_function") +public class IcOftenUseFunctionEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 用户ID + */ + private String userId; + + /** + * 菜单ID + */ + private String menuId; + + /** + * 排序 + */ + private Integer sort; + +} diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/IcOftenUseFunctionService.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/IcOftenUseFunctionService.java new file mode 100644 index 0000000000..440e229478 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/IcOftenUseFunctionService.java @@ -0,0 +1,51 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.dto.IcOftenUseFunctionDTO; +import com.epmet.entity.IcOftenUseFunctionEntity; + +/** + * 常用功能 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-17 + */ +public interface IcOftenUseFunctionService extends BaseService { + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-01-17 + */ + void save(IcOftenUseFunctionDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-01-17 + */ + void update(IcOftenUseFunctionDTO dto); +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/IcOftenUseFunctionServiceImpl.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/IcOftenUseFunctionServiceImpl.java new file mode 100644 index 0000000000..b695a925ff --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/IcOftenUseFunctionServiceImpl.java @@ -0,0 +1,52 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.impl; + +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.dao.IcOftenUseFunctionDao; +import com.epmet.dto.IcOftenUseFunctionDTO; +import com.epmet.entity.IcOftenUseFunctionEntity; +import com.epmet.service.IcOftenUseFunctionService; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +/** + * 常用功能 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-17 + */ +@Service +public class IcOftenUseFunctionServiceImpl extends BaseServiceImpl implements IcOftenUseFunctionService { + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcOftenUseFunctionDTO dto) { + IcOftenUseFunctionEntity entity = ConvertUtils.sourceToTarget(dto, IcOftenUseFunctionEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcOftenUseFunctionDTO dto) { + IcOftenUseFunctionEntity entity = ConvertUtils.sourceToTarget(dto, IcOftenUseFunctionEntity.class); + updateById(entity); + } + +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/IcOftenUseFunctionDao.xml b/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/IcOftenUseFunctionDao.xml new file mode 100644 index 0000000000..78574bd371 --- /dev/null +++ b/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/IcOftenUseFunctionDao.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/IcIndividualCategoryManageDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/IcIndividualCategoryManageDTO.java new file mode 100644 index 0000000000..372864b7f0 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/IcIndividualCategoryManageDTO.java @@ -0,0 +1,74 @@ +package com.epmet.dto; + +import java.io.Serializable; +import java.util.Date; +import lombok.Data; + + +/** + * 个人分类管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-17 + */ +@Data +public class IcIndividualCategoryManageDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * ID + */ + private String id; + + /** + * 客户ID + */ + private String customerId; + + /** + * 用户ID + */ + private String userId; + + /** + * + */ + private String columnId; + + /** + * 排序 + */ + private Integer sort; + + /** + * 删除标记 + */ + private Integer delFlag; + + /** + * 乐观锁 + */ + private String revision; + + /** + * 创建人 + */ + private String createdBy; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private String updatedBy; + + /** + * 更新时间 + */ + private Date updatedTime; + +} \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcIndividualCategoryManageController.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcIndividualCategoryManageController.java new file mode 100644 index 0000000000..44fe329111 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcIndividualCategoryManageController.java @@ -0,0 +1,42 @@ +package com.epmet.controller; + +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.commons.tools.validator.group.AddGroup; +import com.epmet.commons.tools.validator.group.UpdateGroup; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.dto.IcIndividualCategoryManageDTO; +import com.epmet.service.IcIndividualCategoryManageService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * 个人分类管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-17 + */ +@RestController +@RequestMapping("icindividualcategorymanage") +public class IcIndividualCategoryManageController { + + @Autowired + private IcIndividualCategoryManageService icIndividualCategoryManageService; + + @PostMapping + public Result save(@RequestBody IcIndividualCategoryManageDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + icIndividualCategoryManageService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody IcIndividualCategoryManageDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + icIndividualCategoryManageService.update(dto); + return new Result(); + } + +} \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/IcIndividualCategoryManageDao.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/IcIndividualCategoryManageDao.java new file mode 100644 index 0000000000..cdc466058b --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/IcIndividualCategoryManageDao.java @@ -0,0 +1,16 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.entity.IcIndividualCategoryManageEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 个人分类管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-17 + */ +@Mapper +public interface IcIndividualCategoryManageDao extends BaseDao { + +} \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/IcIndividualCategoryManageEntity.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/IcIndividualCategoryManageEntity.java new file mode 100644 index 0000000000..008cc40fd1 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/entity/IcIndividualCategoryManageEntity.java @@ -0,0 +1,44 @@ +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 个人分类管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-17 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_individual_category_manage") +public class IcIndividualCategoryManageEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户ID + */ + private String customerId; + + /** + * 用户ID + */ + private String userId; + + /** + * + */ + private String columnId; + + /** + * 排序 + */ + private Integer sort; + +} diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcIndividualCategoryManageService.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcIndividualCategoryManageService.java new file mode 100644 index 0000000000..e21285817c --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcIndividualCategoryManageService.java @@ -0,0 +1,38 @@ +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.IcIndividualCategoryManageDTO; +import com.epmet.entity.IcIndividualCategoryManageEntity; + +import java.util.List; +import java.util.Map; + +/** + * 个人分类管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-17 + */ +public interface IcIndividualCategoryManageService extends BaseService { + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2022-01-17 + */ + void save(IcIndividualCategoryManageDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2022-01-17 + */ + void update(IcIndividualCategoryManageDTO dto); +} \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcIndividualCategoryManageServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcIndividualCategoryManageServiceImpl.java new file mode 100644 index 0000000000..073cbc82b4 --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcIndividualCategoryManageServiceImpl.java @@ -0,0 +1,45 @@ +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.utils.ConvertUtils; +import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.dao.IcIndividualCategoryManageDao; +import com.epmet.dto.IcIndividualCategoryManageDTO; +import com.epmet.entity.IcIndividualCategoryManageEntity; +import com.epmet.service.IcIndividualCategoryManageService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 个人分类管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-17 + */ +@Service +public class IcIndividualCategoryManageServiceImpl extends BaseServiceImpl implements IcIndividualCategoryManageService { + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(IcIndividualCategoryManageDTO dto) { + IcIndividualCategoryManageEntity entity = ConvertUtils.sourceToTarget(dto, IcIndividualCategoryManageEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(IcIndividualCategoryManageDTO dto) { + IcIndividualCategoryManageEntity entity = ConvertUtils.sourceToTarget(dto, IcIndividualCategoryManageEntity.class); + updateById(entity); + } + +} \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcIndividualCategoryManageDao.xml b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcIndividualCategoryManageDao.xml new file mode 100644 index 0000000000..abb3d01e4a --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcIndividualCategoryManageDao.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file From 5846ce237a3529d08acf3d70130debc9f962af1a Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 17 Jan 2022 11:18:01 +0800 Subject: [PATCH 22/27] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E4=BA=8B=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../form/demand/ServiceItemAddFormDTO.java | 33 +++++ .../form/demand/ServiceItemPageFormDTO.java | 20 +++ .../epmet/dto/form/demand/StatusFormDTO.java | 3 + .../result/demand/ServiceItemResultDTO.java | 19 +++ .../IcResiDemandDictController.java | 3 +- .../IcServiceItemDictController.java | 71 ++++++++++ .../com/epmet/dao/IcServiceItemDictDao.java | 37 +++++ .../epmet/entity/IcServiceItemDictEntity.java | 83 ++++++++++++ .../service/IcServiceItemDictService.java | 55 ++++++++ .../impl/IcResiDemandDictServiceImpl.java | 1 + .../impl/IcServiceItemDictServiceImpl.java | 126 ++++++++++++++++++ .../resources/mapper/IcServiceItemDictDao.xml | 21 +++ 12 files changed, 471 insertions(+), 1 deletion(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceItemAddFormDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceItemPageFormDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/ServiceItemResultDTO.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceItemDictController.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceItemDictDao.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceItemDictEntity.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceItemDictService.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceItemDictServiceImpl.java create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceItemDictDao.xml diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceItemAddFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceItemAddFormDTO.java new file mode 100644 index 0000000000..6ac82ec0db --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceItemAddFormDTO.java @@ -0,0 +1,33 @@ +package com.epmet.dto.form.demand; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; +import org.hibernate.validator.constraints.Length; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +/** + * 新增或者修改服务事项分类 + */ +@Data +public class ServiceItemAddFormDTO implements Serializable { + public interface AddUserInternalGroup { + } + + public interface AddUserShowGroup extends CustomerClientShowGroup { + } + + @NotBlank(message = "customerId不能为空", groups = AddUserInternalGroup.class) + private String customerId; + + @NotBlank(message = "分类名称不能为空", groups = AddUserShowGroup.class) + @Length(max = 100, message = "分类名称至多输入100字", groups = AddUserShowGroup.class) + private String categoryName; + + @NotNull(message = "", groups = AddUserShowGroup.class) + private Integer awardPoint; + + private String categoryId; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceItemPageFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceItemPageFormDTO.java new file mode 100644 index 0000000000..cb1586d413 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceItemPageFormDTO.java @@ -0,0 +1,20 @@ +package com.epmet.dto.form.demand; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + + +/** + * 服务事项分类列表查询入参 + * 目前不分页 + */ +@Data +public class ServiceItemPageFormDTO extends PageFormDTO implements Serializable { + public interface AddUserInternalGroup {} + + @NotBlank(message = "客户id不能为空",groups = AddUserInternalGroup.class) + private String customerId; +} diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/StatusFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/StatusFormDTO.java index 879d632cc7..2e8e95db04 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/StatusFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/StatusFormDTO.java @@ -17,4 +17,7 @@ public class StatusFormDTO implements Serializable { @NotNull(message = "usableFlag不能为空", groups = AddUserInternalGroup.class) private Boolean usableFlag; + + @NotBlank(message = "userId不能为空", groups = AddUserInternalGroup.class) + private String userId; } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/ServiceItemResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/ServiceItemResultDTO.java new file mode 100644 index 0000000000..3408b5f724 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/ServiceItemResultDTO.java @@ -0,0 +1,19 @@ +package com.epmet.dto.result.demand; + +import lombok.Data; + +import java.io.Serializable; + + +/** + * 服务事项分类列表查询返参 + * 目前不分页 + */ +@Data +public class ServiceItemResultDTO implements Serializable { + private static final long serialVersionUID = -590440160577071133L; + private String categoryId; + private String categoryName; + private Integer awardPoint; + private Boolean usableFlag; +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcResiDemandDictController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcResiDemandDictController.java index 4bb3a8c969..2fb6ad864f 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcResiDemandDictController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcResiDemandDictController.java @@ -114,7 +114,8 @@ public class IcResiDemandDictController { * @return */ @PostMapping("updatestatus") - public Result updateStatus(@RequestBody StatusFormDTO formDTO){ + public Result updateStatus(@LoginUser TokenDto tokenDto,@RequestBody StatusFormDTO formDTO){ + formDTO.setUserId(tokenDto.getUserId()); ValidatorUtils.validateEntity(formDTO,StatusFormDTO.AddUserInternalGroup.class); icResiDemandDictService.updateStatus(formDTO); return new Result(); diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceItemDictController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceItemDictController.java new file mode 100644 index 0000000000..d2f9f6d412 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceItemDictController.java @@ -0,0 +1,71 @@ +package com.epmet.controller; + + +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; +import com.epmet.commons.tools.utils.Result; +import com.epmet.commons.tools.validator.ValidatorUtils; +import com.epmet.dto.form.demand.ServiceItemAddFormDTO; +import com.epmet.dto.form.demand.ServiceItemPageFormDTO; +import com.epmet.dto.form.demand.StatusFormDTO; +import com.epmet.dto.result.demand.ServiceItemResultDTO; +import com.epmet.service.IcServiceItemDictService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * 服务事项分类字典表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2021-10-27 + */ +@RestController +@RequestMapping("serviceitem") +public class IcServiceItemDictController { + + @Autowired + private IcServiceItemDictService icServiceItemDictService; + + + /** + * 01、分页列表查询 + * + * @param formDTO + * @return + */ + @PostMapping("list") + public Result> page(@RequestBody ServiceItemPageFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO,ServiceItemPageFormDTO.AddUserInternalGroup.class); + PageData page = icServiceItemDictService.page(formDTO); + return new Result>().ok(page); + } + + /** + * 02、新增分类 + * @param formDTO + * @return + */ + @PostMapping("saveorupdate") + public Result addOrUpdate(@RequestBody ServiceItemAddFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, ServiceItemAddFormDTO.AddUserShowGroup.class,ServiceItemAddFormDTO.AddUserInternalGroup.class); + icServiceItemDictService.addOrUpdate(formDTO); + return new Result(); + } + + /** + * 03、启用或者禁用分类 + * @param formDTO + * @return + */ + @PostMapping("updatestatus") + public Result updateStatus(@LoginUser TokenDto tokenDto, @RequestBody StatusFormDTO formDTO){ + formDTO.setUserId(tokenDto.getUserId()); + ValidatorUtils.validateEntity(formDTO,StatusFormDTO.AddUserInternalGroup.class); + icServiceItemDictService.updateStatus(formDTO); + return new Result(); + } +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceItemDictDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceItemDictDao.java new file mode 100644 index 0000000000..5837b45aea --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceItemDictDao.java @@ -0,0 +1,37 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.demand.ServiceItemResultDTO; +import com.epmet.entity.IcServiceItemDictEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 服务事项分类字典表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-14 + */ +@Mapper +public interface IcServiceItemDictDao extends BaseDao { + + List pageList(String customerId); +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceItemDictEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceItemDictEntity.java new file mode 100644 index 0000000000..c0b34489f5 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceItemDictEntity.java @@ -0,0 +1,83 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 服务事项分类字典表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-14 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_service_item_dict") +public class IcServiceItemDictEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户Id + */ + private String customerId; + + /** + * 父级,一级默认为0 + */ + private String parentCode; + + /** + * 分类编码 + */ + private String categoryCode; + + /** + * 分类名称 + */ + private String categoryName; + + /** + * 级别 + */ + private Integer level; + + /** + * 备注 + */ + private String remark; + + /** + * 排序 + */ + private Integer sort; + + /** + * 1可用,0不可用 + */ + private Boolean usableFlag; + + /** + * 奖励积分 + */ + private Integer awardPoint; + +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceItemDictService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceItemDictService.java new file mode 100644 index 0000000000..a93e50aaff --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceItemDictService.java @@ -0,0 +1,55 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service; + +import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dto.form.demand.ServiceItemAddFormDTO; +import com.epmet.dto.form.demand.ServiceItemPageFormDTO; +import com.epmet.dto.form.demand.StatusFormDTO; +import com.epmet.dto.result.demand.ServiceItemResultDTO; +import com.epmet.entity.IcServiceItemDictEntity; + +/** + * 服务事项分类字典表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-14 + */ +public interface IcServiceItemDictService extends BaseService { + + /** + * 01、列表查询 + * @param formDTO + * @return + */ + PageData page(ServiceItemPageFormDTO formDTO); + + /** + * 02、添加或者修改分类 + * @param formDTO + */ + void addOrUpdate(ServiceItemAddFormDTO formDTO); + + /** + * 03、启用或者禁用分类 + * @param formDTO + * @return + */ + void updateStatus(StatusFormDTO formDTO); +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java index 0e352910c6..493004ce71 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcResiDemandDictServiceImpl.java @@ -217,6 +217,7 @@ public class IcResiDemandDictServiceImpl extends BaseServiceImpl + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.EpmetException; +import com.epmet.commons.tools.page.PageData; +import com.epmet.dao.IcServiceItemDictDao; +import com.epmet.dto.form.demand.ServiceItemAddFormDTO; +import com.epmet.dto.form.demand.ServiceItemPageFormDTO; +import com.epmet.dto.form.demand.StatusFormDTO; +import com.epmet.dto.result.demand.ServiceItemResultDTO; +import com.epmet.entity.IcServiceItemDictEntity; +import com.epmet.service.IcServiceItemDictService; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Date; +import java.util.List; + +/** + * 服务事项分类字典表 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2022-01-14 + */ +@Slf4j +@Service +public class IcServiceItemDictServiceImpl extends BaseServiceImpl implements IcServiceItemDictService { + + + /** + * 列表查询 + * + * @param formDTO + * @return + */ + @Override + public PageData page(ServiceItemPageFormDTO formDTO) { + //目前不分页,只是接口支持分页 + List list = baseDao.pageList(formDTO.getCustomerId()); + return new PageData<>(list, CollectionUtils.isNotEmpty(list) ? list.size() : NumConstant.ZERO); + } + + /** + * 02、添加或者修改分类 + * + * @param formDTO + */ + @Transactional(rollbackFor = Exception.class) + @Override + public void addOrUpdate(ServiceItemAddFormDTO formDTO) { + //分类名称是否唯一 + LambdaQueryWrapper nameQuery = new LambdaQueryWrapper<>(); + nameQuery.eq(IcServiceItemDictEntity::getCustomerId, formDTO.getCustomerId()) + .eq(IcServiceItemDictEntity::getCategoryName, formDTO.getCategoryName()) + .ne(StringUtils.isNotBlank(formDTO.getCategoryId()), IcServiceItemDictEntity::getId, formDTO.getCategoryId()); + if (baseDao.selectCount(nameQuery) > 0) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "当前客户下,分类名称已存在", "分类名称已存在"); + } + if (StringUtils.isNotBlank(formDTO.getCategoryId())) { + LambdaUpdateWrapper update = new LambdaUpdateWrapper<>(); + update.eq(IcServiceItemDictEntity::getId, formDTO.getCategoryId()); + update.set(IcServiceItemDictEntity::getCategoryName, formDTO.getCategoryName()) + .set(IcServiceItemDictEntity::getAwardPoint, formDTO.getAwardPoint()); + baseDao.update(null, update); + return; + } + LambdaQueryWrapper maxQuery = new LambdaQueryWrapper<>(); + maxQuery.eq(IcServiceItemDictEntity::getCustomerId, formDTO.getCustomerId()) + .orderByDesc(IcServiceItemDictEntity::getCategoryCode).last("limit 1"); + IcServiceItemDictEntity max = baseDao.selectOne(maxQuery); + // 获取编码 + IcServiceItemDictEntity insert = new IcServiceItemDictEntity(); + insert.setCustomerId(formDTO.getCustomerId()); + insert.setAwardPoint(formDTO.getAwardPoint()); + insert.setCategoryName(formDTO.getCategoryName()); + insert.setUsableFlag(true); + insert.setParentCode(NumConstant.ZERO_STR); + insert.setLevel(NumConstant.ONE); + insert.setSort(null != max ? max.getSort() + 1 : NumConstant.ONE); + insert.setCategoryCode(null != max ? String.valueOf(Integer.valueOf(max.getCategoryCode()) + 1) : "1001"); + baseDao.insert(insert); + } + + /** + * 03、启用或者禁用分类 + * + * @param formDTO + * @return + */ + @Transactional(rollbackFor = Exception.class) + @Override + public void updateStatus(StatusFormDTO formDTO) { + LambdaUpdateWrapper update = new LambdaUpdateWrapper<>(); + update.eq(IcServiceItemDictEntity::getId, formDTO.getCategoryId()) + .set(IcServiceItemDictEntity::getUsableFlag, formDTO.getUsableFlag()) + .set(IcServiceItemDictEntity::getUpdatedTime, new Date()) + .set(IcServiceItemDictEntity::getUpdatedBy, formDTO.getUserId()); + baseDao.update(null, update); + } + + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceItemDictDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceItemDictDao.xml new file mode 100644 index 0000000000..f89b3c6a83 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceItemDictDao.xml @@ -0,0 +1,21 @@ + + + + + + + + \ No newline at end of file From e24d9db24de54dbb1740b7c83e28b6b0df2b7c7b Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Mon, 17 Jan 2022 12:50:41 +0800 Subject: [PATCH 23/27] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=201.=E7=A4=BE?= =?UTF-8?q?=E5=8C=BA=E6=9F=A5=E8=AF=A2-=E6=90=9C=E7=B4=A2=E9=9C=80?= =?UTF-8?q?=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复: 2.社区查询-搜索房屋 --- .../form/demand/PageListAnalysisFormDTO.java | 5 + .../form/demand/UserDemandPageFormDTO.java | 5 + .../controller/IcUserDemandRecController.java | 43 ++++- .../epmet/service/IcUserDemandRecService.java | 10 ++ .../impl/IcUserDemandRecServiceImpl.java | 151 +++++++++++------- .../resources/mapper/IcUserDemandRecDao.xml | 7 + .../com/epmet/controller/HouseController.java | 27 +++- .../main/java/com/epmet/dao/IcHouseDao.java | 1 + .../java/com/epmet/service/HouseService.java | 3 +- .../epmet/service/impl/HouseServiceImpl.java | 32 +++- .../src/main/resources/mapper/IcHouseDao.xml | 4 +- 11 files changed, 222 insertions(+), 66 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/PageListAnalysisFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/PageListAnalysisFormDTO.java index 2eb55979b1..dea90b14ad 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/PageListAnalysisFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/PageListAnalysisFormDTO.java @@ -53,4 +53,9 @@ public class PageListAnalysisFormDTO implements Serializable { * 数据分析-服务措施分析排除,已取消 */ private String excludeStatus; + + /** + * 搜索关键词 + */ + private String keyword; } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java index a574bb3100..bfeb9203e2 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/UserDemandPageFormDTO.java @@ -74,4 +74,9 @@ public class UserDemandPageFormDTO extends PageFormDTO implements Serializable { * 希望截止 */ private String wantServiceEndTime; + + /** + * 搜索关键词 + */ + private String keyword; } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java index 0eb686a401..019771d846 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java @@ -21,8 +21,12 @@ import com.epmet.commons.rocketmq.messages.ServerSatisfactionCalFormDTO; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.constant.MqConstant; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.dto.form.mq.eventmsg.BasePointEventMsg; import com.epmet.commons.tools.enums.EventEnum; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.EpmetException; +import com.epmet.commons.tools.feign.ResultDataResolver; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; @@ -30,12 +34,16 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.constant.SystemMessageType; import com.epmet.constant.UserDemandConstant; +import com.epmet.dto.form.LoginUserDetailsFormDTO; import com.epmet.dto.form.SystemMsgFormDTO; import com.epmet.dto.form.demand.*; +import com.epmet.dto.result.LoginUserDetailsResultDTO; import com.epmet.dto.result.demand.*; import com.epmet.feign.EpmetMessageOpenFeignClient; +import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.service.*; import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.util.CollectionUtils; import org.springframework.web.bind.annotation.PostMapping; @@ -57,7 +65,7 @@ import java.util.List; @Slf4j @RestController @RequestMapping("userdemand") -public class IcUserDemandRecController { +public class IcUserDemandRecController implements ResultDataResolver { @Autowired private IcUserDemandRecService icUserDemandRecService; @@ -71,6 +79,8 @@ public class IcUserDemandRecController { private IcPartyUnitService icPartyUnitService; @Autowired private EpmetMessageOpenFeignClient epmetMessageOpenFeignClient; + @Autowired + private EpmetUserOpenFeignClient userOpenFeignClient; /** * 根据服务方类型查询 下拉框 @@ -321,5 +331,36 @@ public class IcUserDemandRecController { return new Result().ok(icUserDemandRecService.categoryAnalysis(formDTO)); } + /** + * 搜索需求。根据需求人精确搜索;需求方、需求内容模糊搜索 + * @return + */ + @PostMapping("search") + public Result search(@RequestBody UserDemandPageFormDTO input, @LoginUser TokenDto loginUser) { + ValidatorUtils.validateEntity(input); + String keyword = input.getKeyword(); + Integer pageNo = input.getPageNo(); + Integer pageSize = input.getPageSize(); + + if (StringUtils.isBlank(keyword)) { + return new Result(); + } + + LoginUserDetailsFormDTO form = new LoginUserDetailsFormDTO(); + form.setApp(loginUser.getApp()); + form.setClient(loginUser.getClient()); + form.setUserId(loginUser.getUserId()); + + LoginUserDetailsResultDTO loginUserDetail = getResultDataOrThrowsException(userOpenFeignClient.getLoginUserDetails(form), + ServiceConstant.EPMET_USER_SERVER, + EpmetErrorCode.SERVER_ERROR.getCode(), + "【社区查询】查找当前人所属组织失败", + null); + + PageData page = icUserDemandRecService.search(loginUser.getCustomerId(), loginUserDetail.getAgencyId(), keyword, pageNo, pageSize); + + return new Result().ok(page); + } + } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java index da3fd68cdf..336cd21999 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java @@ -214,4 +214,14 @@ public interface IcUserDemandRecService extends BaseService search(String customerId, String agencyId, String keyword, Integer pageNo, Integer pageSize); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java index 34f7f2070f..f7034a63ee 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java @@ -22,12 +22,14 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.AppClientConstant; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.enums.DictTypeEnum; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.feign.ResultDataResolver; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.scan.param.TextScanParamDTO; @@ -77,7 +79,7 @@ import java.util.stream.Collectors; */ @Slf4j @Service -public class IcUserDemandRecServiceImpl extends BaseServiceImpl implements IcUserDemandRecService { +public class IcUserDemandRecServiceImpl extends BaseServiceImpl implements IcUserDemandRecService, ResultDataResolver { @Autowired private IcUserDemandOperateLogDao operateLogDao; @Autowired @@ -792,67 +794,76 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl gridIds=list.stream().map(DemandRecResultDTO::getGridId).collect(Collectors.toList()); - Result> gridInfoRes=govOrgOpenFeignClient.getGridListByGridIds(gridIds); - List gridInfoList = gridInfoRes.success() && !CollectionUtils.isEmpty(gridInfoRes.getData()) ? gridInfoRes.getData() : new ArrayList<>(); - Map gridInfoMap = gridInfoList.stream().collect(Collectors.toMap(AllGridsByUserIdResultDTO::getGridId, Function.identity())); - - //2、查询分类名称 - List categoryCodes=list.stream().map(DemandRecResultDTO::getCategoryCode).collect(Collectors.toList()); - List dictList=demandDictService.listByCodes(formDTO.getCustomerId(),categoryCodes); - Map dictMap = dictList.stream().collect(Collectors.toMap(IcResiDemandDictEntity::getCategoryCode, IcResiDemandDictEntity::getCategoryName)); + fillDemandsInfo(list, formDTO.getCustomerId()); + } + return new PageData<>(list, total); + } - //3、查询志愿者 - // 服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit; - Map userInfoMap=new HashMap<>(); - Set userIdList=list.stream().filter(item->null!=item.getServiceType()&&item.getServiceType().equals(UserDemandConstant.VOLUNTEER)).map(DemandRecResultDTO::getServerId).collect(Collectors.toSet()); - if(CollectionUtils.isNotEmpty(userIdList)){ - Result> userInfoRes = epmetUserOpenFeignClient.queryUserBaseInfo(new ArrayList<>(userIdList)); - if(!userInfoRes.success()||CollectionUtils.isEmpty(userInfoRes.getData())){ - throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(),"查询志愿者信息异常"); - } - userInfoMap=userInfoRes.getData().stream().collect(Collectors.toMap(UserBaseInfoResultDTO::getUserId, UserBaseInfoResultDTO::getRealName)); + /** + * 填充需求信息 + * @param demandList 需求列表 + * @param customerId 客户id + */ + public void fillDemandsInfo(List demandList, String customerId) { + //1、查询网格信息 + List gridIds=demandList.stream().map(DemandRecResultDTO::getGridId).collect(Collectors.toList()); + Result> gridInfoRes=govOrgOpenFeignClient.getGridListByGridIds(gridIds); + List gridInfoList = gridInfoRes.success() && !CollectionUtils.isEmpty(gridInfoRes.getData()) ? gridInfoRes.getData() : new ArrayList<>(); + Map gridInfoMap = gridInfoList.stream().collect(Collectors.toMap(AllGridsByUserIdResultDTO::getGridId, Function.identity())); + + //2、查询分类名称 + List categoryCodes=demandList.stream().map(DemandRecResultDTO::getCategoryCode).collect(Collectors.toList()); + List dictList=demandDictService.listByCodes(customerId,categoryCodes); + Map dictMap = dictList.stream().collect(Collectors.toMap(IcResiDemandDictEntity::getCategoryCode, IcResiDemandDictEntity::getCategoryName)); + + //3、查询志愿者 + // 服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit; + Map userInfoMap=new HashMap<>(); + Set userIdList=demandList.stream().filter(item->null!=item.getServiceType()&&item.getServiceType().equals(UserDemandConstant.VOLUNTEER)).map(DemandRecResultDTO::getServerId).collect(Collectors.toSet()); + if(CollectionUtils.isNotEmpty(userIdList)){ + Result> userInfoRes = epmetUserOpenFeignClient.queryUserBaseInfo(new ArrayList<>(userIdList)); + if(!userInfoRes.success()||CollectionUtils.isEmpty(userInfoRes.getData())){ + throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(),"查询志愿者信息异常"); } + userInfoMap=userInfoRes.getData().stream().collect(Collectors.toMap(UserBaseInfoResultDTO::getUserId, UserBaseInfoResultDTO::getRealName)); + } - for(DemandRecResultDTO res:list){ - if (null != gridInfoMap && gridInfoMap.containsKey(res.getGridId())) { - res.setGridName(gridInfoMap.get(res.getGridId()).getGridName()); - } + for(DemandRecResultDTO res:demandList){ + if (null != gridInfoMap && gridInfoMap.containsKey(res.getGridId())) { + res.setGridName(gridInfoMap.get(res.getGridId()).getGridName()); + } - if (null != dictMap && dictMap.containsKey(res.getCategoryCode())) { - res.setCategoryName(dictMap.get(res.getCategoryCode())); - } - res.setFirstCategoryName(demandDictService.getCategoryName(formDTO.getCustomerId(), res.getFirstCategoryCode())); - if (null != userInfoMap && userInfoMap.containsKey(res.getServerId())) { - res.setServiceName(userInfoMap.get(res.getServerId())); - } - //社区帮办:community;楼长帮办:building_caption;党员帮办:party;自身上报:self_help - //待处理:pending;已取消canceled;已派单:assigned;已接单:have_order;已完成:finished - //服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit; - switch (res.getServiceType()) - { - case UserDemandConstant.PARTY_UNIT: - res.setServiceShowName(res.getServiceName().concat("(区域化党建单位)")); - break; - case UserDemandConstant.SOCIAL_ORG: - res.setServiceShowName(res.getServiceName().concat("(社会组织)")); - break; - case UserDemandConstant.COMMUNITY_ORG: - res.setServiceShowName(res.getServiceName().concat("(社区自组织)")); - break; - case UserDemandConstant.VOLUNTEER: - res.setServiceShowName(res.getServiceName().concat("(志愿者)")); - break; - default: - res.setServiceShowName(res.getServiceName()); - log.warn("serviceType 错误"); - break; - } - res.setServiceShowFlag(StringUtils.isNotBlank(res.getServerId())); + if (null != dictMap && dictMap.containsKey(res.getCategoryCode())) { + res.setCategoryName(dictMap.get(res.getCategoryCode())); + } + res.setFirstCategoryName(demandDictService.getCategoryName(customerId, res.getFirstCategoryCode())); + if (null != userInfoMap && userInfoMap.containsKey(res.getServerId())) { + res.setServiceName(userInfoMap.get(res.getServerId())); } + //社区帮办:community;楼长帮办:building_caption;党员帮办:party;自身上报:self_help + //待处理:pending;已取消canceled;已派单:assigned;已接单:have_order;已完成:finished + //服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit; + switch (res.getServiceType()) + { + case UserDemandConstant.PARTY_UNIT: + res.setServiceShowName(res.getServiceName().concat("(区域化党建单位)")); + break; + case UserDemandConstant.SOCIAL_ORG: + res.setServiceShowName(res.getServiceName().concat("(社会组织)")); + break; + case UserDemandConstant.COMMUNITY_ORG: + res.setServiceShowName(res.getServiceName().concat("(社区自组织)")); + break; + case UserDemandConstant.VOLUNTEER: + res.setServiceShowName(res.getServiceName().concat("(志愿者)")); + break; + default: + res.setServiceShowName(res.getServiceName()); + log.warn("serviceType 错误"); + break; + } + res.setServiceShowFlag(StringUtils.isNotBlank(res.getServerId())); } - return new PageData<>(list, total); } /** @@ -1603,7 +1614,35 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl search(String customerId, String agencyId, String keyword, Integer pageNo, Integer pageSize) { + CustomerAgencyDTO agency = getResultDataOrThrowsException(govOrgOpenFeignClient.getAgencyById(agencyId), ServiceConstant.GOV_ORG_SERVER, + EpmetErrorCode.SERVER_ERROR.getCode(), "【社区查询-查询需求列表】查询当前staff所属组织信息失败", null); + + if (agency == null) { + throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "【社区查询-查询需求列表】查询当前staff所属组织信息失败"); + } + + String gridPids; + if(NumConstant.ZERO_STR.equals(agency.getPid())){ + gridPids = agencyId; + }else{ + gridPids = agency.getPids().concat(StrConstant.COLON).concat(agencyId); + } + PageListAnalysisFormDTO queryForm = new PageListAnalysisFormDTO(); + queryForm.setCustomerId(customerId); + queryForm.setGridPids(gridPids); + queryForm.setKeyword(keyword); + + PageHelper.startPage(pageNo, pageSize); + List list = baseDao.pageListAnalysis(queryForm); + + // 填充信息 + fillDemandsInfo(list, customerId); + + return new PageData<>(list, new PageInfo<>(list).getTotal()); + } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml index 4bb193f075..b59fa44be5 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml @@ -325,6 +325,13 @@ and r.STATUS !=#{excludeStatus} + + AND ( + r.DEMAND_USER_NAME = #{keyword} + OR match(r.CONTENT) against (#{keyword} in boolean mode ) + OR s.SERVER_NAME like CONCAT('%',#{keyword},'%') + ) + order by r.WANT_SERVICE_TIME desc,r.REPORT_TIME asc diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java index 1edcfe206d..44593788a9 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java @@ -22,15 +22,22 @@ import cn.afterturn.easypoi.excel.entity.result.ExcelImportResult; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.feign.ResultDataResolver; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.form.IcHouseFormDTO; import com.epmet.dto.form.IcNeighborHoodFormDTO; import com.epmet.dto.form.ListIcNeighborHoodFormDTO; +import com.epmet.dto.form.LoginUserDetailsFormDTO; import com.epmet.dto.result.HouseInfoDTO; import com.epmet.dto.result.IcNeighborHoodResultDTO; +import com.epmet.dto.result.LoginUserDetailsResultDTO; import com.epmet.excel.IcHouseExcel; +import com.epmet.feign.EpmetUserOpenFeignClient; +import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.service.HouseService; import com.epmet.util.ExcelPoiUtils; import lombok.extern.slf4j.Slf4j; @@ -55,11 +62,14 @@ import java.util.stream.Collectors; @Slf4j @RestController @RequestMapping("house") -public class HouseController { +public class HouseController implements ResultDataResolver { @Autowired private HouseService houseService; + @Autowired + private EpmetUserOpenFeignClient userOpenFeignClient; + @PostMapping("houselist") public Result houseList(@RequestBody ListIcNeighborHoodFormDTO formDTO){ @@ -68,7 +78,7 @@ public class HouseController { String queryScene = "house_manage"; - IcNeighborHoodResultDTO icNeighborHoodResultDTO = houseService.listNeighborhood(formDTO.getBuildingId(), formDTO.getOwnerName(), + IcNeighborHoodResultDTO icNeighborHoodResultDTO = houseService.listNeighborhood(null, formDTO.getBuildingId(), formDTO.getOwnerName(), formDTO.getOwnerPhone(), null, null, queryScene, formDTO.getPageNo(), formDTO.getPageSize()); @@ -84,7 +94,7 @@ public class HouseController { *@return */ @PostMapping("search") - public Result searchHouse(@RequestBody ListIcNeighborHoodFormDTO formDTO) { + public Result searchHouse(@RequestBody ListIcNeighborHoodFormDTO formDTO, @LoginUser TokenDto loginUser) { String keyword = formDTO.getKeyword(); if (StringUtils.isBlank(keyword)) { IcNeighborHoodResultDTO r = new IcNeighborHoodResultDTO(); @@ -108,7 +118,16 @@ public class HouseController { // 使用场景:社区查询 String scene = "community_search"; - IcNeighborHoodResultDTO icNeighborHoodResultDTO = houseService.listNeighborhood(null, null, null, + LoginUserDetailsFormDTO form = new LoginUserDetailsFormDTO(); + form.setUserId(loginUser.getUserId()); + form.setClient(loginUser.getClient()); + form.setApp(loginUser.getApp()); + LoginUserDetailsResultDTO loginUserDetail = getResultDataOrThrowsException(userOpenFeignClient.getLoginUserDetails(form), ServiceConstant.EPMET_USER_SERVER, + EpmetErrorCode.SERVER_ERROR.getCode(), + "【社区查询-查询房屋】查询当前staff所在组织信息失败", + null); + + IcNeighborHoodResultDTO icNeighborHoodResultDTO = houseService.listNeighborhood(loginUserDetail.getAgencyId(),null, null, null, neighborhoodName, buildingName, scene, formDTO.getPageNo(), formDTO.getPageSize()); return new Result().ok(icNeighborHoodResultDTO); diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java index a974510a38..93c5af18e5 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcHouseDao.java @@ -47,6 +47,7 @@ public interface IcHouseDao extends BaseDao { // @Param("building") IcBuildingEntity building, // @Param("house") IcHouseEntity house); IPage> searchHouseByPage(IPage page, + @Param("pids") String pids, @Param("buildingId") String buildingId, @Param("ownerName") String ownerName, @Param("ownerPhone") String ownerPhone, diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java index e92fbd0e57..ac7f28dbbc 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/HouseService.java @@ -49,7 +49,8 @@ public interface HouseService { List importExcel(String customerId, List list, String staffId, List numList); - IcNeighborHoodResultDTO listNeighborhood(String buildingId, + IcNeighborHoodResultDTO listNeighborhood(String ancestorAgencyId, + String buildingId, String ownerName, String ownerPhone, String neighborHoodName, diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java index 6f072441f9..90a46acfc0 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/HouseServiceImpl.java @@ -3,15 +3,21 @@ package com.epmet.service.impl; import cn.afterturn.easypoi.excel.entity.TemplateExportParams; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.RenException; +import com.epmet.commons.tools.feign.ResultDataResolver; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.dao.IcBuildingDao; import com.epmet.dao.IcBuildingUnitDao; import com.epmet.dao.IcHouseDao; import com.epmet.dao.IcNeighborHoodDao; +import com.epmet.dto.CustomerAgencyDTO; import com.epmet.dto.IcBuildingDTO; import com.epmet.dto.IcBuildingUnitDTO; import com.epmet.dto.IcHouseDTO; @@ -24,6 +30,7 @@ import com.epmet.enums.HousePurposeEnums; import com.epmet.enums.HouseRentFlagEnums; import com.epmet.enums.HouseTypeEnums; import com.epmet.excel.IcHouseExcel; +import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.service.HouseService; import com.epmet.service.IcBuildingService; import com.epmet.service.IcBuildingUnitService; @@ -42,7 +49,7 @@ import java.util.stream.Collectors; @Slf4j @Service -public class HouseServiceImpl implements HouseService { +public class HouseServiceImpl implements HouseService, ResultDataResolver { @@ -60,6 +67,8 @@ public class HouseServiceImpl implements HouseService { private IcBuildingUnitDao icBuildingUnitDao; @Resource private IcHouseDao icHouseDao; + @Autowired + private GovOrgOpenFeignClient govOrgOpenFeignClient; @Override @Transactional(rollbackFor = Exception.class) @@ -207,7 +216,8 @@ public class HouseServiceImpl implements HouseService { } @Override - public IcNeighborHoodResultDTO listNeighborhood(String buildingId, + public IcNeighborHoodResultDTO listNeighborhood(String ancestorAgencyId, + String buildingId, String ownerName, String ownerPhone, String neighborHoodName, @@ -219,9 +229,25 @@ public class HouseServiceImpl implements HouseService { //如果类型是house 查房屋 //IPage> resultMap = searchHouse(buildingId, ownerName, ownerPhone, neighborHoodName, buildingName, pageNo, pageSize); + // 查询pids + CustomerAgencyDTO agency = getResultDataOrThrowsException(govOrgOpenFeignClient.getAgencyById(ancestorAgencyId), ServiceConstant.GOV_ORG_SERVER, + EpmetErrorCode.SERVER_ERROR.getCode(), "【社区查询-查询需求列表】查询当前staff所属组织信息失败", null); + + if (agency == null) { + throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "【社区查询-查询需求列表】查询当前staff所属组织信息失败"); + } + + String pids; + + if(NumConstant.ZERO_STR.equals(agency.getPid())){ + pids = ancestorAgencyId; + }else{ + pids = agency.getPids().concat(StrConstant.COLON).concat(ancestorAgencyId); + } + IPage page = new Page(pageNo,pageSize); - IPage> mapIPage = icHouseDao.searchHouseByPage(page, buildingId, ownerName, ownerPhone, neighborHoodName, buildingName, queryScene); + IPage> mapIPage = icHouseDao.searchHouseByPage(page, pids, buildingId, ownerName, ownerPhone, neighborHoodName, buildingName, queryScene); List> records = mapIPage.getRecords(); records.forEach(item->{ item.put("houseType", HouseTypeEnums.getTypeValue(item.get("houseTypeKey"))); diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml index ab84f43e0f..b5a8b72a25 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcHouseDao.xml @@ -129,7 +129,9 @@ LEFT JOIN ic_neighbor_hood c on a.NEIGHBOR_HOOD_ID = c.ID and c.DEL_FLAG = '0' LEFT JOIN ic_building_unit d on a.BUILDING_UNIT_ID = d.ID and d.DEL_FLAG = '0' - + + AND c.AGENCY_PIDS like CONCAT(#{pids},'%') + AND a.BUILDING_ID = #{buildingId} From f7c717741df960e69a16e8593e69c11ed489dfa4 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 17 Jan 2022 13:36:04 +0800 Subject: [PATCH 24/27] =?UTF-8?q?=E6=96=B0=E5=BB=BAservice=5Fitem=5Fdict?= =?UTF-8?q?=E3=80=81=E9=9C=80=E6=B1=82=E5=88=86=E7=B1=BB=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E5=B1=85=E6=B0=91=E7=A7=AF=E5=88=86+=E5=85=B1=E5=BB=BA?= =?UTF-8?q?=E9=83=A8=E5=88=86=E3=80=82=E5=88=A0=E9=99=A4=E9=9C=80=E6=B1=82?= =?UTF-8?q?=E8=AE=B0=E5=BD=95sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../migration/V0.0.8__service_item_dict.sql | 117 ++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.8__service_item_dict.sql diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.8__service_item_dict.sql b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.8__service_item_dict.sql new file mode 100644 index 0000000000..098a4965fb --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/db/migration/V0.0.8__service_item_dict.sql @@ -0,0 +1,117 @@ +CREATE TABLE `ic_service_item_dict` ( + `ID` varchar(64) NOT NULL COMMENT '主键', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户Id', + `PARENT_CODE` varchar(32) NOT NULL COMMENT '父级,一级默认为0', + `CATEGORY_CODE` varchar(32) NOT NULL COMMENT '分类编码', + `CATEGORY_NAME` varchar(255) NOT NULL COMMENT '分类名称', + `LEVEL` int(11) NOT NULL COMMENT '级别', + `REMARK` varchar(255) DEFAULT NULL COMMENT '备注', + `SORT` int(10) unsigned NOT NULL COMMENT '排序', + `USABLE_FLAG` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1可用,0不可用', + `AWARD_POINT` int(11) NOT NULL COMMENT '奖励积分', + `DEL_FLAG` int(11) NOT NULL COMMENT '删除标识:0.未删除 1.已删除', + `REVISION` int(11) NOT NULL COMMENT '乐观锁', + `CREATED_BY` varchar(32) NOT NULL COMMENT '创建人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人', + `UPDATED_TIME` datetime NOT NULL COMMENT '更新时间', + PRIMARY KEY (`ID`) USING BTREE, + UNIQUE KEY `uk_dict_value` (`CATEGORY_CODE`,`CUSTOMER_ID`) USING BTREE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='服务事项分类字典表'; + + +INSERT INTO `epmet_heart`.`ic_service_item_dict` (`ID`, `CUSTOMER_ID`, `PARENT_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `LEVEL`, `REMARK`, `SORT`, `USABLE_FLAG`, `AWARD_POINT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1', 'default', '0', '1001', '积极配合社区安全巡查员进行场所消防、安全等方面的检查,并具备必须的安全意识及设备设施', 1, NULL, 1, 1, 10, 0, 0, 'APP_USER', '2022-01-13 14:37:12', 'APP_USER', '2022-01-13 14:37:12'); +INSERT INTO `epmet_heart`.`ic_service_item_dict` (`ID`, `CUSTOMER_ID`, `PARENT_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `LEVEL`, `REMARK`, `SORT`, `USABLE_FLAG`, `AWARD_POINT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('2', 'default', '0', '1002', '积极参与社区举办的各类生产生活安全培训讲座等', 1, NULL, 2, 1, 10, 0, 0, 'APP_USER', '2022-01-13 14:37:12', 'APP_USER', '2022-01-13 14:37:12'); +INSERT INTO `epmet_heart`.`ic_service_item_dict` (`ID`, `CUSTOMER_ID`, `PARENT_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `LEVEL`, `REMARK`, `SORT`, `USABLE_FLAG`, `AWARD_POINT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3', 'default', '0', '1003', '定期开展内部自检自查,安全培训及演练,紧绷安全生产生活弦', 1, NULL, 3, 1, 10, 0, 0, 'APP_USER', '2022-01-13 14:37:12', 'APP_USER', '2022-01-13 14:37:12'); +INSERT INTO `epmet_heart`.`ic_service_item_dict` (`ID`, `CUSTOMER_ID`, `PARENT_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `LEVEL`, `REMARK`, `SORT`, `USABLE_FLAG`, `AWARD_POINT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('4', 'default', '0', '1004', '社区困难群体生活帮扶', 1, NULL, 4, 1, 10, 0, 0, 'APP_USER', '2022-01-13 14:37:12', 'APP_USER', '2022-01-13 14:37:12'); +INSERT INTO `epmet_heart`.`ic_service_item_dict` (`ID`, `CUSTOMER_ID`, `PARENT_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `LEVEL`, `REMARK`, `SORT`, `USABLE_FLAG`, `AWARD_POINT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('5', 'default', '0', '1005', '社区低保、伤残等困难家庭子女学习辅导', 1, NULL, 5, 1, 10, 0, 0, 'APP_USER', '2022-01-13 14:37:12', 'APP_USER', '2022-01-13 14:37:12'); +INSERT INTO `epmet_heart`.`ic_service_item_dict` (`ID`, `CUSTOMER_ID`, `PARENT_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `LEVEL`, `REMARK`, `SORT`, `USABLE_FLAG`, `AWARD_POINT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('6', 'default', '0', '1006', '未成年人兴趣培养', 1, NULL, 6, 1, 10, 0, 0, 'APP_USER', '2022-01-13 14:37:12', 'APP_USER', '2022-01-13 14:37:12'); +INSERT INTO `epmet_heart`.`ic_service_item_dict` (`ID`, `CUSTOMER_ID`, `PARENT_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `LEVEL`, `REMARK`, `SORT`, `USABLE_FLAG`, `AWARD_POINT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('7', 'default', '0', '1007', '楼道基础设施维护', 1, NULL, 7, 1, 10, 0, 0, 'APP_USER', '2022-01-13 14:37:12', 'APP_USER', '2022-01-13 14:37:12'); +INSERT INTO `epmet_heart`.`ic_service_item_dict` (`ID`, `CUSTOMER_ID`, `PARENT_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `LEVEL`, `REMARK`, `SORT`, `USABLE_FLAG`, `AWARD_POINT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('8', 'default', '0', '1008', '健康知识专业讲座', 1, NULL, 8, 1, 10, 0, 0, 'APP_USER', '2022-01-13 14:37:12', 'APP_USER', '2022-01-13 14:37:12'); +INSERT INTO `epmet_heart`.`ic_service_item_dict` (`ID`, `CUSTOMER_ID`, `PARENT_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `LEVEL`, `REMARK`, `SORT`, `USABLE_FLAG`, `AWARD_POINT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('9', 'default', '0', '1009', '老年人现代智能设备培训', 1, NULL, 9, 1, 10, 0, 0, 'APP_USER', '2022-01-13 14:37:12', 'APP_USER', '2022-01-13 14:37:12'); +INSERT INTO `epmet_heart`.`ic_service_item_dict` (`ID`, `CUSTOMER_ID`, `PARENT_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `LEVEL`, `REMARK`, `SORT`, `USABLE_FLAG`, `AWARD_POINT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('10', 'default', '0', '1010', '空巢老人志愿帮扶', 1, NULL, 10, 1, 10, 0, 0, 'APP_USER', '2022-01-13 14:37:12', 'APP_USER', '2022-01-13 14:37:12'); +INSERT INTO `epmet_heart`.`ic_service_item_dict` (`ID`, `CUSTOMER_ID`, `PARENT_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `LEVEL`, `REMARK`, `SORT`, `USABLE_FLAG`, `AWARD_POINT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('11', 'default', '0', '1011', '法律专业问题咨询', 1, NULL, 11, 1, 10, 0, 0, 'APP_USER', '2022-01-13 14:37:12', 'APP_USER', '2022-01-13 14:37:12'); +INSERT INTO `epmet_heart`.`ic_service_item_dict` (`ID`, `CUSTOMER_ID`, `PARENT_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `LEVEL`, `REMARK`, `SORT`, `USABLE_FLAG`, `AWARD_POINT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('12', 'default', '0', '1012', '矛盾调解专业法律顾问', 1, NULL, 12, 1, 10, 0, 0, 'APP_USER', '2022-01-13 14:37:12', 'APP_USER', '2022-01-13 14:37:12'); +INSERT INTO `epmet_heart`.`ic_service_item_dict` (`ID`, `CUSTOMER_ID`, `PARENT_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `LEVEL`, `REMARK`, `SORT`, `USABLE_FLAG`, `AWARD_POINT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('13', 'default', '0', '1013', '居民紧急自救、他救技能', 1, NULL, 13, 1, 10, 0, 0, 'APP_USER', '2022-01-13 14:37:12', 'APP_USER', '2022-01-13 14:37:12'); +INSERT INTO `epmet_heart`.`ic_service_item_dict` (`ID`, `CUSTOMER_ID`, `PARENT_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `LEVEL`, `REMARK`, `SORT`, `USABLE_FLAG`, `AWARD_POINT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('14', 'default', '0', '1014', '少儿安全意识培养', 1, NULL, 14, 1, 10, 0, 0, 'APP_USER', '2022-01-13 14:37:12', 'APP_USER', '2022-01-13 14:37:12'); +INSERT INTO `epmet_heart`.`ic_service_item_dict` (`ID`, `CUSTOMER_ID`, `PARENT_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `LEVEL`, `REMARK`, `SORT`, `USABLE_FLAG`, `AWARD_POINT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('15', 'default', '0', '1015', '文化队伍的培育和提升', 1, NULL, 15, 1, 10, 0, 0, 'APP_USER', '2022-01-13 14:37:12', 'APP_USER', '2022-01-13 14:37:12'); +INSERT INTO `epmet_heart`.`ic_service_item_dict` (`ID`, `CUSTOMER_ID`, `PARENT_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `LEVEL`, `REMARK`, `SORT`, `USABLE_FLAG`, `AWARD_POINT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('16', 'default', '0', '1016', '老年群体的心理辅导', 1, NULL, 16, 1, 10, 0, 0, 'APP_USER', '2022-01-13 14:37:12', 'APP_USER', '2022-01-13 14:37:12'); +INSERT INTO `epmet_heart`.`ic_service_item_dict` (`ID`, `CUSTOMER_ID`, `PARENT_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `LEVEL`, `REMARK`, `SORT`, `USABLE_FLAG`, `AWARD_POINT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('17', 'default', '0', '1017', '丰富多样的文体活动', 1, NULL, 17, 1, 10, 0, 0, 'APP_USER', '2022-01-13 14:37:12', 'APP_USER', '2022-01-13 14:37:12'); +INSERT INTO `epmet_heart`.`ic_service_item_dict` (`ID`, `CUSTOMER_ID`, `PARENT_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `LEVEL`, `REMARK`, `SORT`, `USABLE_FLAG`, `AWARD_POINT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('18', 'default', '0', '1018', '失业人员技能培训', 1, NULL, 18, 1, 10, 0, 0, 'APP_USER', '2022-01-13 14:37:12', 'APP_USER', '2022-01-13 14:37:12'); +INSERT INTO `epmet_heart`.`ic_service_item_dict` (`ID`, `CUSTOMER_ID`, `PARENT_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `LEVEL`, `REMARK`, `SORT`, `USABLE_FLAG`, `AWARD_POINT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('19', 'default', '0', '1019', '青年人文化活动的开展', 1, NULL, 19, 1, 10, 0, 0, 'APP_USER', '2022-01-13 14:37:12', 'APP_USER', '2022-01-13 14:37:12'); +INSERT INTO `epmet_heart`.`ic_service_item_dict` (`ID`, `CUSTOMER_ID`, `PARENT_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `LEVEL`, `REMARK`, `SORT`, `USABLE_FLAG`, `AWARD_POINT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('20', 'default', '0', '1020', '亲子教育课堂', 1, NULL, 20, 1, 10, 0, 0, 'APP_USER', '2022-01-13 14:37:12', 'APP_USER', '2022-01-13 14:37:12'); +INSERT INTO `epmet_heart`.`ic_service_item_dict` (`ID`, `CUSTOMER_ID`, `PARENT_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `LEVEL`, `REMARK`, `SORT`, `USABLE_FLAG`, `AWARD_POINT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('21', 'default', '0', '1021', '未成年人“家风”培育', 1, NULL, 21, 1, 10, 0, 0, 'APP_USER', '2022-01-13 14:37:12', 'APP_USER', '2022-01-13 14:37:12'); +INSERT INTO `epmet_heart`.`ic_service_item_dict` (`ID`, `CUSTOMER_ID`, `PARENT_CODE`, `CATEGORY_CODE`, `CATEGORY_NAME`, `LEVEL`, `REMARK`, `SORT`, `USABLE_FLAG`, `AWARD_POINT`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('22', 'default', '0', '1022', '和谐邻里活动开展', 1, NULL, 22, 1, 10, 0, 0, 'APP_USER', '2022-01-13 14:37:12', 'APP_USER', '2022-01-13 14:37:12'); + + + +-- 共建单位及九小场所共建 统一删除 +update ic_resi_demand_dict set DEL_FLAG='1',UPDATED_TIME=NOW(),REMARK="当前分类归属于服务事项分类" +where CATEGORY_CODE='1010' or PARENT_CODE='1010'; + +-- 居民积分统一从需求分类中移除 +-- 1、民生服务 +update ic_resi_demand_dict set DEL_FLAG='1',UPDATED_TIME=NOW(),REMARK="当前分类归属于居民积分" +where CATEGORY_CODE='1002' or PARENT_CODE='1002'; +-- 2、便民服务 +-- 2.1便民服务-参与日常矛盾调解并取得一定成效 +update ic_resi_demand_dict set DEL_FLAG='1',UPDATED_TIME=NOW(),REMARK="当前分类归属于居民积分" +where CATEGORY_CODE='10030001' or PARENT_CODE='10030001'; +-- 2.2便民服务-爱心敲门,自愿与社区高龄、独居、孤寡、残障等人员结对子,参与日常探望、帮扶 +update ic_resi_demand_dict set DEL_FLAG='1',UPDATED_TIME=NOW(),REMARK="当前分类归属于居民积分" +where CATEGORY_CODE='10030004' or PARENT_CODE='10030004'; +-- 2.3便民服务-收集反馈社区特殊群体(高龄、残障、独居等)生活需求,并协助社区共同落实解决。 +update ic_resi_demand_dict set DEL_FLAG='1',UPDATED_TIME=NOW(),REMARK="当前分类归属于居民积分" +where CATEGORY_CODE='10030005' or PARENT_CODE='10030005'; +-- 3、城市建设 +update ic_resi_demand_dict set DEL_FLAG='1',UPDATED_TIME=NOW(),REMARK="当前分类归属于居民积分" +where CATEGORY_CODE='1004' or PARENT_CODE='1004'; +-- 4、社区建设 +update ic_resi_demand_dict set DEL_FLAG='1',UPDATED_TIME=NOW(),REMARK="当前分类归属于居民积分" +where CATEGORY_CODE='1005' or PARENT_CODE='1005'; +-- 5、社区自治 +update ic_resi_demand_dict set DEL_FLAG='1',UPDATED_TIME=NOW(),REMARK="当前分类归属于居民积分" +where CATEGORY_CODE='1006' or PARENT_CODE='1006'; +-- 6、思想建设 +update ic_resi_demand_dict set DEL_FLAG='1',UPDATED_TIME=NOW(),REMARK="当前分类归属于居民积分" +where CATEGORY_CODE='1008' or PARENT_CODE='1008'; +-- 7、文化娱乐 +update ic_resi_demand_dict set DEL_FLAG='1',UPDATED_TIME=NOW(),REMARK="当前分类归属于居民积分" +where CATEGORY_CODE='1009' or PARENT_CODE='1009'; +-- 8、社会治安 +update ic_resi_demand_dict set DEL_FLAG='1',UPDATED_TIME=NOW(),REMARK="当前分类归属于居民积分" +where CATEGORY_CODE='1013' or PARENT_CODE='1013'; +-- 9、消防安全 +update ic_resi_demand_dict set DEL_FLAG='1',UPDATED_TIME=NOW(),REMARK="当前分类归属于居民积分" +where CATEGORY_CODE='1014' or PARENT_CODE='1014'; +-- 10、文化体育 +update ic_resi_demand_dict set DEL_FLAG='1',UPDATED_TIME=NOW(),REMARK="当前分类归属于居民积分" +where CATEGORY_CODE='1015' or PARENT_CODE='1015'; +-- 11、慈善募捐 +update ic_resi_demand_dict set DEL_FLAG='1',UPDATED_TIME=NOW(),REMARK="当前分类归属于居民积分" +where CATEGORY_CODE='1020' or PARENT_CODE='1020'; +-- 12、其他 +update ic_resi_demand_dict set DEL_FLAG='1',UPDATED_TIME=NOW(),REMARK="当前分类归属于居民积分" +where CATEGORY_CODE='1022' or PARENT_CODE='1022'; + + + +-- 删除需求记录、服务记录、评价记录 +update ic_user_demand_rec +set DEL_FLAG='1',UPDATED_TIME=NOW(),UPDATED_BY='删除分类' +where CATEGORY_CODE in ( + select distinct m.CATEGORY_CODE + from ic_resi_demand_dict m where m.DEL_FLAG='1' + and m.CUSTOMER_ID!='default' +); +update ic_user_demand_service set DEL_FLAG='1',UPDATED_TIME=NOW() +where DEMAND_REC_ID in( + select m.id from ic_user_demand_rec m where m.DEL_FLAG='1' +); +update ic_user_demand_satisfaction set DEL_FLAG='1',UPDATED_TIME=NOW() +WHERE DEMAND_REC_ID IN( + select m.id from ic_user_demand_rec m where m.DEL_FLAG='1' +); + + + From 9fa6f058606be89ad735b404e01ac28d56012b44 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 17 Jan 2022 13:40:28 +0800 Subject: [PATCH 25/27] =?UTF-8?q?=E4=BA=BA=E5=91=98=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E7=AE=A1=E7=90=86=EF=BC=8C=E5=B8=B8=E7=94=A8=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/form/AddOftenUseFunctionFormDTO.java | 26 ++++++++++ .../result/OftenUseFunctionListResultDTO.java | 41 +++++++++++++++ .../IcOftenUseFunctionController.java | 36 +++++++++---- .../com/epmet/dao/IcOftenUseFunctionDao.java | 23 ++++++++- .../service/IcOftenUseFunctionService.java | 30 ++++++----- .../impl/IcOftenUseFunctionServiceImpl.java | 43 +++++++++++++--- .../mapper/IcOftenUseFunctionDao.xml | 20 ++++++++ .../form/EditIndividualCategoryFormDTO.java | 26 ++++++++++ .../IndividualCategoryListResultDTO.java | 36 +++++++++++++ .../IcIndividualCategoryManageController.java | 36 +++++++++---- .../dao/IcIndividualCategoryManageDao.java | 23 ++++++++- .../IcIndividualCategoryManageService.java | 29 ++++++----- ...IcIndividualCategoryManageServiceImpl.java | 51 ++++++++++++------- .../mapper/IcIndividualCategoryManageDao.xml | 16 ++++++ 14 files changed, 360 insertions(+), 76 deletions(-) create mode 100644 epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/form/AddOftenUseFunctionFormDTO.java create mode 100644 epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/result/OftenUseFunctionListResultDTO.java create mode 100644 epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/EditIndividualCategoryFormDTO.java create mode 100644 epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/IndividualCategoryListResultDTO.java diff --git a/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/form/AddOftenUseFunctionFormDTO.java b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/form/AddOftenUseFunctionFormDTO.java new file mode 100644 index 0000000000..f03b2a2cf0 --- /dev/null +++ b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/form/AddOftenUseFunctionFormDTO.java @@ -0,0 +1,26 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2022/1/17 10:09 上午 + * @DESC + */ +@Data +public class AddOftenUseFunctionFormDTO implements Serializable { + + private static final long serialVersionUID = -8044386389656626183L; + + public interface AddOftenUseFunctionForm{} + + @NotBlank(message = "menuId不能为空", groups = AddOftenUseFunctionForm.class) + private String menuId; + + @NotNull(message = "sort不能为空", groups = AddOftenUseFunctionForm.class) + private Integer sort; +} diff --git a/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/result/OftenUseFunctionListResultDTO.java b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/result/OftenUseFunctionListResultDTO.java new file mode 100644 index 0000000000..73ff018a10 --- /dev/null +++ b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/result/OftenUseFunctionListResultDTO.java @@ -0,0 +1,41 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2022/1/17 9:41 上午 + * @DESC + */ +@Data +public class OftenUseFunctionListResultDTO implements Serializable { + + private static final long serialVersionUID = 8561818114575776804L; + + /** + * 跳转url + */ + private String url; + + /** + * 菜单ID + */ + private String menuId; + + /** + * 菜单名字 + */ + private String menuName; + + /** + * 图标 + */ + private String icon; + + /** + * 排序 + */ + private String sort; +} diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/IcOftenUseFunctionController.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/IcOftenUseFunctionController.java index b852a732f2..07f036e90a 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/IcOftenUseFunctionController.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/IcOftenUseFunctionController.java @@ -1,15 +1,21 @@ package com.epmet.controller; +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.IcOftenUseFunctionDTO; +import com.epmet.dto.form.AddOftenUseFunctionFormDTO; +import com.epmet.dto.result.OftenUseFunctionListResultDTO; import com.epmet.service.IcOftenUseFunctionService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import java.util.List; + /** * 常用功能 * @@ -23,19 +29,27 @@ public class IcOftenUseFunctionController { @Autowired private IcOftenUseFunctionService icOftenUseFunctionService; - @PostMapping - public Result save(@RequestBody IcOftenUseFunctionDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - icOftenUseFunctionService.save(dto); - return new Result(); + /** + * @Description 【社区查询】常用功能查询 + * @param tokenDto + * @author zxc + * @date 2022/1/17 9:47 上午 + */ + @PostMapping("oftenusefunctionlist") + public Result> oftenUseFunctionList(@LoginUser TokenDto tokenDto){ + return new Result>().ok(icOftenUseFunctionService.oftenUseFunctionList(tokenDto)); } - @PutMapping - public Result update(@RequestBody IcOftenUseFunctionDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - icOftenUseFunctionService.update(dto); + /** + * @Description 【社区查询】常用功能添加(就是修改) + * @param formDTOS + * @param tokenDto + * @author zxc + * @date 2022/1/17 10:13 上午 + */ + @PostMapping("addoftenusefunction") + public Result addOftenUseFunction(@RequestBody List formDTOS, @LoginUser TokenDto tokenDto){ + icOftenUseFunctionService.addOftenUseFunction(formDTOS, tokenDto); return new Result(); } diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/IcOftenUseFunctionDao.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/IcOftenUseFunctionDao.java index 9c1a1e4a21..ee0cec00e9 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/IcOftenUseFunctionDao.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/IcOftenUseFunctionDao.java @@ -18,8 +18,12 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.OftenUseFunctionListResultDTO; import com.epmet.entity.IcOftenUseFunctionEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 常用功能 @@ -29,5 +33,22 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IcOftenUseFunctionDao extends BaseDao { - + + /** + * @Description 【社区查询】常用功能查询 + * @param userId + * @author zxc + * @date 2022/1/17 10:06 上午 + */ + List oftenUseFunctionList(@Param("userId")String userId); + + /** + * @Description 删除旧数据 + * @param userId + * @param customerId + * @author zxc + * @date 2022/1/17 10:25 上午 + */ + void deleteOldData(@Param("userId")String userId,@Param("customerId")String customerId); + } \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/IcOftenUseFunctionService.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/IcOftenUseFunctionService.java index 440e229478..8d0c15b59c 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/IcOftenUseFunctionService.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/IcOftenUseFunctionService.java @@ -18,9 +18,14 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.IcOftenUseFunctionDTO; +import com.epmet.dto.form.AddOftenUseFunctionFormDTO; +import com.epmet.dto.result.OftenUseFunctionListResultDTO; import com.epmet.entity.IcOftenUseFunctionEntity; +import java.util.List; + /** * 常用功能 * @@ -30,22 +35,19 @@ import com.epmet.entity.IcOftenUseFunctionEntity; public interface IcOftenUseFunctionService extends BaseService { /** - * 默认保存 - * - * @param dto - * @return void - * @author generator - * @date 2022-01-17 + * @Description 【社区查询】常用功能查询 + * @param tokenDto + * @author zxc + * @date 2022/1/17 9:47 上午 */ - void save(IcOftenUseFunctionDTO dto); + List oftenUseFunctionList(TokenDto tokenDto); /** - * 默认更新 - * - * @param dto - * @return void - * @author generator - * @date 2022-01-17 + * @Description 【社区查询】常用功能添加(就是修改) + * @param formDTOS + * @param tokenDto + * @author zxc + * @date 2022/1/17 10:13 上午 */ - void update(IcOftenUseFunctionDTO dto); + void addOftenUseFunction(List formDTOS, TokenDto tokenDto); } \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/IcOftenUseFunctionServiceImpl.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/IcOftenUseFunctionServiceImpl.java index b695a925ff..f12a56feef 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/IcOftenUseFunctionServiceImpl.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/IcOftenUseFunctionServiceImpl.java @@ -18,14 +18,21 @@ package com.epmet.service.impl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.dao.IcOftenUseFunctionDao; import com.epmet.dto.IcOftenUseFunctionDTO; +import com.epmet.dto.form.AddOftenUseFunctionFormDTO; +import com.epmet.dto.result.OftenUseFunctionListResultDTO; import com.epmet.entity.IcOftenUseFunctionEntity; import com.epmet.service.IcOftenUseFunctionService; +import org.apache.commons.collections4.CollectionUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.util.ArrayList; +import java.util.List; + /** * 常用功能 * @@ -35,18 +42,40 @@ import org.springframework.transaction.annotation.Transactional; @Service public class IcOftenUseFunctionServiceImpl extends BaseServiceImpl implements IcOftenUseFunctionService { + /** + * @Description 【社区查询】常用功能查询 + * @param tokenDto + * @author zxc + * @date 2022/1/17 9:47 上午 + */ @Override - @Transactional(rollbackFor = Exception.class) - public void save(IcOftenUseFunctionDTO dto) { - IcOftenUseFunctionEntity entity = ConvertUtils.sourceToTarget(dto, IcOftenUseFunctionEntity.class); - insert(entity); + public List oftenUseFunctionList(TokenDto tokenDto) { + List result = baseDao.oftenUseFunctionList(tokenDto.getUserId()); + if (CollectionUtils.isNotEmpty(result)){ + return result; + } + return new ArrayList<>(); } + /** + * @Description 【社区查询】常用功能添加(就是修改) + * @param formDTOS + * @param tokenDto + * @author zxc + * @date 2022/1/17 10:13 上午 + */ @Override @Transactional(rollbackFor = Exception.class) - public void update(IcOftenUseFunctionDTO dto) { - IcOftenUseFunctionEntity entity = ConvertUtils.sourceToTarget(dto, IcOftenUseFunctionEntity.class); - updateById(entity); + public void addOftenUseFunction(List formDTOS, TokenDto tokenDto) { + if (CollectionUtils.isNotEmpty(formDTOS)){ + baseDao.deleteOldData(tokenDto.getUserId(),tokenDto.getCustomerId()); + List entities = ConvertUtils.sourceToTarget(formDTOS, IcOftenUseFunctionEntity.class); + entities.forEach(e -> { + e.setCustomerId(tokenDto.getCustomerId()); + e.setUserId(tokenDto.getUserId()); + }); + insertBatch(entities); + } } } \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/IcOftenUseFunctionDao.xml b/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/IcOftenUseFunctionDao.xml index 78574bd371..5f25af85fc 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/IcOftenUseFunctionDao.xml +++ b/epmet-module/gov-access/gov-access-server/src/main/resources/mapper/IcOftenUseFunctionDao.xml @@ -3,5 +3,25 @@ + + + DELETE FROM ic_often_use_function WHERE USER_ID = #{userId} AND CUSTOMER_ID = #{customerId} + + + \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/EditIndividualCategoryFormDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/EditIndividualCategoryFormDTO.java new file mode 100644 index 0000000000..b41d1d04df --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/EditIndividualCategoryFormDTO.java @@ -0,0 +1,26 @@ +package com.epmet.dto.form; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2022/1/17 10:59 上午 + * @DESC + */ +@Data +public class EditIndividualCategoryFormDTO implements Serializable { + + private static final long serialVersionUID = -3492393795553841513L; + + public interface EditIndividualCategoryForm{} + + @NotBlank(message = "columnId不能为空",groups = EditIndividualCategoryForm.class) + private String columnId; + + @NotNull(message = "sort不能为空",groups = EditIndividualCategoryForm.class) + private Integer sort; +} diff --git a/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/IndividualCategoryListResultDTO.java b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/IndividualCategoryListResultDTO.java new file mode 100644 index 0000000000..4089a151df --- /dev/null +++ b/epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/result/IndividualCategoryListResultDTO.java @@ -0,0 +1,36 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Author zxc + * @DateTime 2022/1/17 10:52 上午 + * @DESC + */ +@Data +public class IndividualCategoryListResultDTO implements Serializable { + + private static final long serialVersionUID = -3294223041971531203L; + + /** + * 标签 + */ + private String label; + + /** + * 图片 + */ + private String managementIcon; + + /** + * 字段名 + */ + private String columnName; + + /** + * 排序 + */ + private Integer sort; +} diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcIndividualCategoryManageController.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcIndividualCategoryManageController.java index 44fe329111..cd3122cd47 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcIndividualCategoryManageController.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/IcIndividualCategoryManageController.java @@ -1,15 +1,21 @@ package com.epmet.controller; +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.dto.IcIndividualCategoryManageDTO; +import com.epmet.dto.form.EditIndividualCategoryFormDTO; +import com.epmet.dto.result.IndividualCategoryListResultDTO; import com.epmet.service.IcIndividualCategoryManageService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import java.util.List; + /** * 个人分类管理 * @@ -23,19 +29,27 @@ public class IcIndividualCategoryManageController { @Autowired private IcIndividualCategoryManageService icIndividualCategoryManageService; - @PostMapping - public Result save(@RequestBody IcIndividualCategoryManageDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - icIndividualCategoryManageService.save(dto); - return new Result(); + /** + * @Description 【人员分类管理】查询个人分类列表 + * @param tokenDto + * @author zxc + * @date 2022/1/17 10:55 上午 + */ + @PostMapping("individualcategorylist") + public Result> individualCategoryList(@LoginUser TokenDto tokenDto){ + return new Result>().ok(icIndividualCategoryManageService.individualCategoryList(tokenDto)); } - @PutMapping - public Result update(@RequestBody IcIndividualCategoryManageDTO dto){ - //效验数据 - ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - icIndividualCategoryManageService.update(dto); + /** + * @Description 【人员分类管理】个人分类修改(添加修改一个接口) + * @param formDTOS + * @param tokenDto + * @author zxc + * @date 2022/1/17 11:04 上午 + */ + @PostMapping("editindividualcategory") + public Result editIndividualCategory(@RequestBody List formDTOS,@LoginUser TokenDto tokenDto){ + icIndividualCategoryManageService.editIndividualCategory(formDTOS,tokenDto); return new Result(); } diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/IcIndividualCategoryManageDao.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/IcIndividualCategoryManageDao.java index cdc466058b..772cfc7e73 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/IcIndividualCategoryManageDao.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/IcIndividualCategoryManageDao.java @@ -1,8 +1,12 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.IndividualCategoryListResultDTO; import com.epmet.entity.IcIndividualCategoryManageEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 个人分类管理 @@ -12,5 +16,22 @@ import org.apache.ibatis.annotations.Mapper; */ @Mapper public interface IcIndividualCategoryManageDao extends BaseDao { - + + /** + * @Description 删除旧数据 + * @param userId + * @param customerId + * @author zxc + * @date 2022/1/17 11:10 上午 + */ + void deleteOldData(@Param("userId")String userId,@Param("customerId")String customerId); + + /** + * @Description 【人员分类管理】查询个人分类列表 + * @param userId + * @author zxc + * @date 2022/1/17 1:25 下午 + */ + List individualCategoryList(@Param("userId")String userId); + } \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcIndividualCategoryManageService.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcIndividualCategoryManageService.java index e21285817c..4b15339377 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcIndividualCategoryManageService.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/IcIndividualCategoryManageService.java @@ -2,7 +2,10 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.IcIndividualCategoryManageDTO; +import com.epmet.dto.form.EditIndividualCategoryFormDTO; +import com.epmet.dto.result.IndividualCategoryListResultDTO; import com.epmet.entity.IcIndividualCategoryManageEntity; import java.util.List; @@ -17,22 +20,20 @@ import java.util.Map; public interface IcIndividualCategoryManageService extends BaseService { /** - * 默认保存 - * - * @param dto - * @return void - * @author generator - * @date 2022-01-17 + * @Description 【人员分类管理】查询个人分类列表 + * @param tokenDto + * @author zxc + * @date 2022/1/17 10:55 上午 */ - void save(IcIndividualCategoryManageDTO dto); + List individualCategoryList(TokenDto tokenDto); /** - * 默认更新 - * - * @param dto - * @return void - * @author generator - * @date 2022-01-17 + * @Description 【人员分类管理】个人分类修改(添加修改一个接口) + * @param formDTOS + * @param tokenDto + * @author zxc + * @date 2022/1/17 11:04 上午 */ - void update(IcIndividualCategoryManageDTO dto); + void editIndividualCategory(List formDTOS, TokenDto tokenDto); + } \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcIndividualCategoryManageServiceImpl.java b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcIndividualCategoryManageServiceImpl.java index 073cbc82b4..c684c8c36e 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcIndividualCategoryManageServiceImpl.java +++ b/epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/IcIndividualCategoryManageServiceImpl.java @@ -1,23 +1,19 @@ package com.epmet.service.impl; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; -import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ConvertUtils; -import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.dao.IcIndividualCategoryManageDao; -import com.epmet.dto.IcIndividualCategoryManageDTO; +import com.epmet.dto.form.EditIndividualCategoryFormDTO; +import com.epmet.dto.result.IndividualCategoryListResultDTO; import com.epmet.entity.IcIndividualCategoryManageEntity; import com.epmet.service.IcIndividualCategoryManageService; -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; +import org.apache.commons.collections4.CollectionUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.util.Arrays; +import java.util.ArrayList; import java.util.List; -import java.util.Map; /** * 个人分类管理 @@ -28,18 +24,39 @@ import java.util.Map; @Service public class IcIndividualCategoryManageServiceImpl extends BaseServiceImpl implements IcIndividualCategoryManageService { + /** + * @Description 【人员分类管理】查询个人分类列表 + * @param tokenDto + * @author zxc + * @date 2022/1/17 10:55 上午 + */ @Override - @Transactional(rollbackFor = Exception.class) - public void save(IcIndividualCategoryManageDTO dto) { - IcIndividualCategoryManageEntity entity = ConvertUtils.sourceToTarget(dto, IcIndividualCategoryManageEntity.class); - insert(entity); + public List individualCategoryList(TokenDto tokenDto) { + List result = baseDao.individualCategoryList(tokenDto.getUserId()); + if (CollectionUtils.isNotEmpty(result)){ + return result; + } + return new ArrayList<>(); } + /** + * @Description 【人员分类管理】个人分类修改(添加修改一个接口) + * @param formDTOS + * @param tokenDto + * @author zxc + * @date 2022/1/17 11:04 上午 + */ @Override @Transactional(rollbackFor = Exception.class) - public void update(IcIndividualCategoryManageDTO dto) { - IcIndividualCategoryManageEntity entity = ConvertUtils.sourceToTarget(dto, IcIndividualCategoryManageEntity.class); - updateById(entity); + public void editIndividualCategory(List formDTOS, TokenDto tokenDto) { + if (CollectionUtils.isNotEmpty(formDTOS)){ + baseDao.deleteOldData(tokenDto.getUserId(),tokenDto.getCustomerId()); + List entities = ConvertUtils.sourceToTarget(formDTOS, IcIndividualCategoryManageEntity.class); + entities.forEach(e -> { + e.setCustomerId(tokenDto.getCustomerId()); + e.setUserId(tokenDto.getUserId()); + }); + insertBatch(entities); + } } - } \ No newline at end of file diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcIndividualCategoryManageDao.xml b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcIndividualCategoryManageDao.xml index abb3d01e4a..926e0a8baf 100644 --- a/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcIndividualCategoryManageDao.xml +++ b/epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/IcIndividualCategoryManageDao.xml @@ -3,5 +3,21 @@ + + + DELETE FROM ic_individual_category_manage WHERE USER_ID = #{userId} AND CUSTOMER_ID = #{customerId} + + + \ No newline at end of file From e895d2315c30d4cbed1d71fbbb3ec97756fc1e3f Mon Sep 17 00:00:00 2001 From: wangxianzhang Date: Mon, 17 Jan 2022 14:51:36 +0800 Subject: [PATCH 26/27] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=201.=E7=A4=BE?= =?UTF-8?q?=E5=8C=BA=E6=9F=A5=E8=AF=A2-=E6=90=9C=E7=B4=A2=E5=B1=85?= =?UTF-8?q?=E6=B0=91=20/icresiuser/search?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/IcUserDemandRecController.java | 4 ++- .../com/epmet/controller/HouseController.java | 1 + .../epmet/dto/form/IcResiUserPageFormDTO.java | 6 ++++ .../controller/IcResiUserController.java | 28 +++++++++++++++++++ .../java/com/epmet/dao/IcResiUserDao.java | 3 +- .../service/impl/IcResiUserServiceImpl.java | 5 ++-- .../main/resources/mapper/IcResiUserDao.xml | 7 +++++ 7 files changed, 49 insertions(+), 5 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java index 019771d846..e3e9cde3b8 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java @@ -66,7 +66,7 @@ import java.util.List; @RestController @RequestMapping("userdemand") public class IcUserDemandRecController implements ResultDataResolver { - + @Autowired private IcUserDemandRecService icUserDemandRecService; @Autowired @@ -346,6 +346,8 @@ public class IcUserDemandRecController implements ResultDataResolver { return new Result(); } + keyword = keyword.trim(); + LoginUserDetailsFormDTO form = new LoginUserDetailsFormDTO(); form.setApp(loginUser.getApp()); form.setClient(loginUser.getClient()); diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java index 44593788a9..f593287e77 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java @@ -103,6 +103,7 @@ public class HouseController implements ResultDataResolver { return new Result().ok(r); } + keyword = keyword.trim(); String neighborhoodName; String buildingName; diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiUserPageFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiUserPageFormDTO.java index bf75ed325f..462353b404 100644 --- a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiUserPageFormDTO.java +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/IcResiUserPageFormDTO.java @@ -37,5 +37,11 @@ public class IcResiUserPageFormDTO implements Serializable { @NotBlank(message = "当前用户id不能为空", groups = AddUserInternalGroup.class) private String staffId; + + /** + * 关键词 + */ + private String keyword; + } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java index 395a5d40b9..dd6cf7ef7e 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/IcResiUserController.java @@ -640,4 +640,32 @@ public class IcResiUserController { } return new Result<>(); } + + /** + * 【社区查询】搜索居民们 + * @param input + * @return + */ + @PostMapping("search") + public Result>> searchResi(@RequestBody IcResiUserPageFormDTO input, @LoginUser TokenDto loginUser) { + if (StringUtils.isBlank(input.getKeyword())) { + PageData> r = new PageData>(new ArrayList<>(), 0); + return new Result>>().ok(r); + } + + input.setKeyword(input.getKeyword().trim()); + input.setCustomerId(loginUser.getCustomerId()); + input.setStaffId(loginUser.getUserId()); + input.setFormCode("resi_base_info"); + if (input.getPageNo() == null) { + input.setPageNo(1); + } + + if (input.getPageSize() == null) { + input.setPageSize(20); + } + + PageData> r = icResiUserService.pageResiMap(input); + return new Result>>().ok(r); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java index f1822e93f2..3a9cffbf7e 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/IcResiUserDao.java @@ -59,7 +59,8 @@ public interface IcResiUserDao extends BaseDao { @Param("subTables") List subTables, @Param("currentStaffAgencyId")String currentStaffAgencyId, @Param("staffOrgPath") String staffOrgPath, - @Param("resultTableName")String resultTableName); + @Param("resultTableName")String resultTableName, + @Param("keyword") String keyword); /** * 查询主表 * diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java index 70f34f2849..cfa57f050e 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/IcResiUserServiceImpl.java @@ -348,15 +348,14 @@ public class IcResiUserServiceImpl extends BaseServiceImpl> list=baseDao.selectListResiMap(formDTO.getCustomerId(), formDTO.getFormCode(), formDTO.getConditions(), resultColumns, subTables,staffInfoCacheResult.getAgencyId(), - staffOrgPath,null); + staffOrgPath,null, formDTO.getKeyword()); pageInfo.setTotal(CollectionUtils.isEmpty(list)?NumConstant.ZERO:list.size()); pageInfo.setList(list); } diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml index 6b07136f1c..9d07548103 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/IcResiUserDao.xml @@ -51,6 +51,13 @@ AND ${resultTableName}.ID IS NOT NULL + + AND ( + NAME = #{keyword} + or MOBILE = #{keyword} + or ID_CARD = #{keyword} + ) + and ic_resi_user.customer_id=#{customerId} and (ic_resi_user.AGENCY_ID =#{currentStaffAgencyId} or ic_resi_user.pids like concat(#{staffOrgPath},'%')) From f6f2248e7e63147b5a2c2442b0b186dd0f9f7ce8 Mon Sep 17 00:00:00 2001 From: jianjun Date: Mon, 17 Jan 2022 18:35:48 +0800 Subject: [PATCH 27/27] =?UTF-8?q?=E6=9D=A1=E4=BB=B6=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E7=BD=91=E6=A0=BC=E5=B7=A5=E4=BD=9C=E4=BA=BA=E5=91=98=E5=AF=B9?= =?UTF-8?q?=E5=A4=96=E5=8F=8A=E5=AF=B9=E5=86=85=20=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../commons/tools/dto/form/PageFormDTO.java | 5 +- .../epmetuser/result/StaffInfoResultDTO.java | 47 ++++++++ .../result/CustomerGridStaffResultDTO.java | 32 +++++ .../result/CustomerStaffGridResultDTO.java | 32 +++++ .../epmet/feign/GovOrgOpenFeignClient.java | 9 +- .../GovOrgOpenFeignClientFallback.java | 5 + .../controller/CustomerGridController.java | 15 +++ .../java/com/epmet/dao/CustomerGridDao.java | 15 +-- .../epmet/service/CustomerGridService.java | 12 ++ .../service/impl/CustomerGridServiceImpl.java | 6 +- .../main/resources/mapper/CustomerGridDao.xml | 22 ++++ .../com/epmet/dto/form/GridStaffFormDTO.java | 52 ++++++++ .../epmet/controller/StaffRoleController.java | 18 +++ .../main/java/com/epmet/dao/StaffRoleDao.java | 11 ++ .../com/epmet/service/StaffRoleService.java | 76 ++---------- .../service/impl/StaffRoleServiceImpl.java | 113 ++++++++---------- .../main/resources/mapper/StaffRoleDao.xml | 29 +++++ 17 files changed, 362 insertions(+), 137 deletions(-) create mode 100644 epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/StaffInfoResultDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CustomerGridStaffResultDTO.java create mode 100644 epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CustomerStaffGridResultDTO.java create mode 100644 epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/GridStaffFormDTO.java diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/PageFormDTO.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/PageFormDTO.java index 9922a2fb6e..fe22284567 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/PageFormDTO.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/dto/form/PageFormDTO.java @@ -4,6 +4,7 @@ import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; import lombok.Data; import javax.validation.constraints.NotNull; +import java.io.Serializable; /** * 分页通用类 @@ -12,7 +13,9 @@ import javax.validation.constraints.NotNull; * @date 2020/11/20 17:02 */ @Data -public class PageFormDTO { +public class PageFormDTO implements Serializable { + private static final long serialVersionUID = -4145040961294503137L; + public interface AddUserInternalGroup { } diff --git a/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/StaffInfoResultDTO.java b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/StaffInfoResultDTO.java new file mode 100644 index 0000000000..c59ac45da9 --- /dev/null +++ b/epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/epmetuser/result/StaffInfoResultDTO.java @@ -0,0 +1,47 @@ +package com.epmet.dataaggre.dto.epmetuser.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @Description 工作人员信息结果 + * @Auth sun + */ +@Data +public class StaffInfoResultDTO implements Serializable { + + private static final long serialVersionUID = -746814280620822111L; + /** + * 用户Id + */ + private String userId; + + /** + * 用户名 + */ + private String userName; + + /** + * 手机号 + */ + private String mobile; + + /** + * 性别0.未知,1男,2.女 + */ + private Integer gender; + + /** + * 组织Id + */ + private String orgId; + + /** + * 组织名 + */ + private String orgName; + + + +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CustomerGridStaffResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CustomerGridStaffResultDTO.java new file mode 100644 index 0000000000..b325e80461 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CustomerGridStaffResultDTO.java @@ -0,0 +1,32 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * desc:客户下网格工作人员结果 + * @Author zxc + * @DateTime 2021/6/8 3:23 下午 + * @DESC + */ +@Data +public class CustomerGridStaffResultDTO implements Serializable { + + private static final long serialVersionUID = -5910427385795368242L; + + private String userId; + + private String userName; + + private String mobile; + + private Integer gender; + + private String gridId; + + private String gridName; + + private String agencyId; + +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CustomerStaffGridResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CustomerStaffGridResultDTO.java new file mode 100644 index 0000000000..ece0ebfc73 --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/CustomerStaffGridResultDTO.java @@ -0,0 +1,32 @@ +package com.epmet.dto.result; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @author 在网格中的工作人员 + * @dscription + * @date 2020/4/23 16:08 + */ +@Data +public class CustomerStaffGridResultDTO implements Serializable { + private static final long serialVersionUID = 1301415104939403933L; + /** + * 用户ID + */ + private String userId; + /** + * 网格Id + */ + private String gridId; + /** + * 网格名称 + */ + private String gridName; + /** + * 组织Id + */ + private String agencyId; + +} diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java index 9bd7bfb642..8bd74a2c52 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java @@ -462,8 +462,8 @@ public interface GovOrgOpenFeignClient { @PostMapping(value = "/gov/org/house/queryListHouseInfo",consumes = MediaType.APPLICATION_JSON_VALUE) Result> queryListHouseInfo(@RequestBody Set houseIds); - - + + /** * @Description 获取组织下网格选项 * @Param formDTO @@ -549,7 +549,7 @@ public interface GovOrgOpenFeignClient { */ @PostMapping("/gov/org/agency/getsonagencyid") Result> getSonAgencyId(@RequestParam("orgId")String orgId,@RequestParam("type")String type); - + // /icbuilding/{id}?id=demoData /** @@ -576,4 +576,7 @@ public interface GovOrgOpenFeignClient { */ @PostMapping("/gov/org/customeragency/configcustomerareacode") Result configCustomerAreaCode(@RequestBody CustomerAreaCodeFormDTO formDTO); + + @PostMapping("/gov/org/customergrid/getstaffgridlist") + Result> getStaffGridList(@RequestParam("orgId")String orgId, @RequestParam("orgType")String orgType); } diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java index c3ddd39202..9aeea0c92b 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java @@ -369,4 +369,9 @@ public class GovOrgOpenFeignClientFallback implements GovOrgOpenFeignClient { public Result configCustomerAreaCode(CustomerAreaCodeFormDTO formDTO) { return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "configCustomerAreaCode", formDTO); } + + @Override + public Result> getStaffGridList(String orgId, String orgType) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getStaffGridList", orgId, orgType); + } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerGridController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerGridController.java index 8843d646c5..ee4afd7bc8 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerGridController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerGridController.java @@ -17,8 +17,10 @@ package com.epmet.controller; +import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.dto.result.OptionResultDTO; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.AssertUtils; @@ -330,4 +332,17 @@ public class CustomerGridController { return new Result>().ok(customerGridService.gridListByAgencyId(agencyId)); } + /** + * @Description 【事件】社区服务热线 + * @author sun + **/ + @PostMapping("getstaffgridlist") + Result> getStaffGridList(@LoginUser TokenDto tokenDto, + @RequestParam("orgId")String orgId, + @RequestParam("orgType")String orgType) { + //tokenDto.setCustomerId("45687aa479955f9d06204d415238f7cc"); + List staffGridList = customerGridService.getStaffGridList(tokenDto.getCustomerId(), orgId, orgType); + return new Result>().ok(staffGridList); + } + } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java index 3b5e8c794a..7eef403d38 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerGridDao.java @@ -156,8 +156,8 @@ public interface CustomerGridDao extends BaseDao { List selectGridByIds(@Param("gridIdList") List gridIdList); /** - * @Description 查询网格名 不限制是否同步条件 SYNC_FLAG * @param gridIdList + * @Description 查询网格名 不限制是否同步条件 SYNC_FLAG * @author zxc * @date 2022/1/12 9:42 上午 */ @@ -279,15 +279,15 @@ public interface CustomerGridDao extends BaseDao { CustomerGridDTO getGridBaseInfoById(@Param("gridId") String gridId); /** - * @Description 根据网格ID查询pids + * @Description 根据网格ID查询pids * @Param gridId * @author zxc * @date 2021/7/16 9:52 上午 */ - String selectPidsByGridId(@Param("gridId")String gridId); + String selectPidsByGridId(@Param("gridId") String gridId); /** - * @Description 查询网格名字 + * @Description 查询网格名字 * @Param gridId * @author zxc * @date 2021/8/4 4:30 下午 @@ -295,7 +295,7 @@ public interface CustomerGridDao extends BaseDao { String gridName(String gridId); /** - * @Description 查询组织名字 + * @Description 查询组织名字 * @Param orgIds * @author zxc * @date 2021/8/4 6:25 下午 @@ -303,7 +303,7 @@ public interface CustomerGridDao extends BaseDao { List selectOrgNameByType(@Param("orgIds") List orgIds); /** - * @Description 根据人查询所在组织 + * @Description 根据人查询所在组织 * @Param userId * @author zxc * @date 2021/8/5 10:08 上午 @@ -361,7 +361,8 @@ public interface CustomerGridDao extends BaseDao { CustomerGridDTO gridAgencyByGrid(@Param("gridId") String gridId); int updateSubGridAreaCode(@Param("customerId") String customerId, - @Param("agencyId")String agencyId, + @Param("agencyId") String agencyId, @Param("operateUserId") String operateUserId); + List getStaffGridList(@Param("customerId") String customerId, @Param("orgId") String orgId, @Param("orgType") String orgType); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerGridService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerGridService.java index 1bc418d8fd..cac10ea123 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerGridService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerGridService.java @@ -362,4 +362,16 @@ public interface CustomerGridService extends BaseService { * @Description 查询组织直属网格列表 **/ List gridListByAgencyId(String agencyId); + + /** + * desc: 获取组织及网格下 工作人员网格关系列表 + * + * @param customerId + * @param orgId + * @param orgType + * @return java.util.List + * @author LiuJanJun + * @date 2022/1/17 3:50 下午 + */ + List getStaffGridList(String customerId, String orgId, String orgType); } 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 115a784406..57fc7340fb 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 @@ -42,7 +42,6 @@ import com.epmet.dao.CustomerStaffGridDao; import com.epmet.dto.*; import com.epmet.dto.form.*; import com.epmet.dto.result.*; -import com.epmet.entity.CustomerAgencyEntity; import com.epmet.entity.CustomerGridEntity; import com.epmet.feign.EpmetAdminOpenFeignClient; import com.epmet.feign.EpmetMessageOpenFeignClient; @@ -931,4 +930,9 @@ public class CustomerGridServiceImpl extends BaseServiceImpl getStaffGridList(String customerId, String orgId, String orgType) { + return baseDao.getStaffGridList(customerId,orgId,orgType); + } + } 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 ca2e81e89b..a70cf1d9b6 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 @@ -783,5 +783,27 @@ where customer_id=#{customerId} AND pids LIKE concat('%',#{agencyId}, '%' ) + diff --git a/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/GridStaffFormDTO.java b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/GridStaffFormDTO.java new file mode 100644 index 0000000000..43d5c8c49f --- /dev/null +++ b/epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/GridStaffFormDTO.java @@ -0,0 +1,52 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import com.epmet.commons.tools.validator.group.DefaultGroup; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.util.List; + +/** + * DESC:网格下的工作人员 查询 + * @author liujianjun + */ +@Data +public class GridStaffFormDTO extends PageFormDTO { + + /** + * 客户Id + */ + private String customerId; + + /** + * 工作人员Id + */ + private String userId; + + /** + * 工作人员姓名 + */ + private String userName; + + /** + * 手机号 + */ + private String mobile; + + /** + * 角色key + */ + @NotBlank(message = "角色Key不能为空", groups = {DefaultGroup.class}) + private List roleKeyList; + + /** + * 组织ID + */ + private String orgId; + + /** + * 组织类型 agency or grid + */ + private String orgType; +} diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StaffRoleController.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StaffRoleController.java index 998c3eba7e..a0bfcb4536 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StaffRoleController.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/controller/StaffRoleController.java @@ -2,6 +2,9 @@ package com.epmet.controller; import cn.hutool.core.collection.CollectionUtil; import com.epmet.commons.mybatis.entity.DataScope; +import com.epmet.commons.tools.annotation.LoginUser; +import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.GovStaffRoleDTO; @@ -195,4 +198,19 @@ public class StaffRoleController { ValidatorUtils.validateEntity(formDTO,RoleStaffIdFormDTO.AddUserInternalGroup.class); return new Result>().ok(staffRoleService.queryRoleStaffIds(formDTO)); } + + /** + * desc: 根据角色、用户名、手机号 组织获取网格下的工作人员 精确匹配 + * + * @param formDTO + * @return com.epmet.commons.tools.utils.Result> + * @author LiuJanJun + * @date 2022/1/17 2:26 下午 + */ + @PostMapping("getGridStaffList") + Result> getGridStaffList(@LoginUser TokenDto tokenDto, @RequestBody GridStaffFormDTO formDTO){ + //tokenDto.setCustomerId("45687aa479955f9d06204d415238f7cc"); + formDTO.setCustomerId(tokenDto.getCustomerId()); + return new Result>().ok(staffRoleService.getGridStaffList(formDTO)); + } } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffRoleDao.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffRoleDao.java index 31e6591d92..3cfb231881 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffRoleDao.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/dao/StaffRoleDao.java @@ -23,6 +23,7 @@ import com.epmet.dto.StaffRoleDTO; import com.epmet.dto.form.CommonUserFormDTO; import com.epmet.dto.form.CustomerStaffRoleListFormDTO; import com.epmet.dto.form.GetRoleKeyListFormDTO; +import com.epmet.dto.form.GridStaffFormDTO; import com.epmet.dto.result.*; import com.epmet.entity.StaffRoleEntity; import org.apache.ibatis.annotations.Mapper; @@ -169,4 +170,14 @@ public interface StaffRoleDao extends BaseDao { * @Description 【事件】网格员服务电话 **/ List staffRoleList(@Param("staffIds") List staffIds); + + /** + * desc: 条件获取工作人员list + * + * @param formDTO + * @return java.util.List + * @author LiuJanJun + * @date 2022/1/17 2:45 下午 + */ + List getStaffList(GridStaffFormDTO formDTO); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/StaffRoleService.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/StaffRoleService.java index e8737d7a0c..2458ba809d 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/StaffRoleService.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/StaffRoleService.java @@ -22,15 +22,11 @@ import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.StaffRoleDTO; -import com.epmet.dto.form.CommonUserFormDTO; -import com.epmet.dto.form.CustomerStaffRoleListFormDTO; -import com.epmet.dto.form.RoleStaffIdFormDTO; -import com.epmet.dto.form.RolesUsersListFormDTO; +import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.entity.StaffRoleEntity; import java.util.List; -import java.util.Map; import java.util.Set; /** @@ -41,66 +37,6 @@ import java.util.Set; */ public interface StaffRoleService extends BaseService { - /** - * 默认分页 - * - * @param params - * @return PageData - * @author generator - * @date 2020-04-22 - */ - PageData page(Map params); - - /** - * 默认查询 - * - * @param params - * @return java.util.List - * @author generator - * @date 2020-04-22 - */ - List list(Map params); - - /** - * 单条查询 - * - * @param id - * @return StaffRoleDTO - * @author generator - * @date 2020-04-22 - */ - StaffRoleDTO get(String id); - - /** - * 默认保存 - * - * @param dto - * @return void - * @author generator - * @date 2020-04-22 - */ - void save(StaffRoleDTO dto); - - /** - * 默认更新 - * - * @param dto - * @return void - * @author generator - * @date 2020-04-22 - */ - void update(StaffRoleDTO dto); - - /** - * 批量删除 - * - * @param ids - * @return void - * @author generator - * @date 2020-04-22 - */ - void delete(String[] ids); - /** * 查询具有某角色的staff列表 * @param roleKey @@ -176,4 +112,14 @@ public interface StaffRoleService extends BaseService { * @date 2021/8/19 11:14 上午 */ Set queryRoleStaffIds(RoleStaffIdFormDTO formDTO); + + /** + * desc: 条件获取 网格工作人员信息 + * + * @param formDTO + * @return com.epmet.commons.tools.page.PageData + * @author LiuJanJun + * @date 2022/1/17 2:37 下午 + */ + PageData getGridStaffList(GridStaffFormDTO formDTO); } diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffRoleServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffRoleServiceImpl.java index 181b788434..700a7733a9 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffRoleServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/StaffRoleServiceImpl.java @@ -17,30 +17,29 @@ package com.epmet.service.impl; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; +import com.alibaba.fastjson.JSON; import com.epmet.commons.mybatis.entity.DataScope; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; -import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.dao.StaffRoleDao; import com.epmet.dto.StaffRoleDTO; -import com.epmet.dto.form.CommonUserFormDTO; -import com.epmet.dto.form.CustomerStaffRoleListFormDTO; -import com.epmet.dto.form.RoleStaffIdFormDTO; -import com.epmet.dto.form.RolesUsersListFormDTO; +import com.epmet.dto.form.*; import com.epmet.dto.result.*; import com.epmet.entity.StaffRoleEntity; +import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.service.StaffRoleService; -import org.apache.commons.lang3.StringUtils; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import java.util.*; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.stream.Collectors; /** * 工作人员-角色关系表 @@ -48,61 +47,12 @@ import java.util.*; * @author generator generator@elink-cn.com * @since v1.0.0 2020-04-22 */ +@Slf4j @Service public class StaffRoleServiceImpl extends BaseServiceImpl implements StaffRoleService { - @Override - public PageData page(Map params) { - IPage page = baseDao.selectPage( - getPage(params, FieldConstant.CREATED_TIME, false), - getWrapper(params) - ); - return getPageData(page, StaffRoleDTO.class); - } - - @Override - public List list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); - - return ConvertUtils.sourceToTarget(entityList, StaffRoleDTO.class); - } - - private QueryWrapper getWrapper(Map params){ - String id = (String)params.get(FieldConstant.ID_HUMP); - - QueryWrapper wrapper = new QueryWrapper<>(); - wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); - - return wrapper; - } - - @Override - public StaffRoleDTO get(String id) { - StaffRoleEntity entity = baseDao.selectById(id); - return ConvertUtils.sourceToTarget(entity, StaffRoleDTO.class); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void save(StaffRoleDTO dto) { - StaffRoleEntity entity = ConvertUtils.sourceToTarget(dto, StaffRoleEntity.class); - insert(entity); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(StaffRoleDTO dto) { - StaffRoleEntity entity = ConvertUtils.sourceToTarget(dto, StaffRoleEntity.class); - updateById(entity); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void delete(String[] ids) { - // 逻辑删除(@TableLogic 注解) - baseDao.deleteBatchIds(Arrays.asList(ids)); - } - + @Autowired + private GovOrgOpenFeignClient govOrgOpenFeignClient; /** * 查询具有某角色的staff列表 * @param roleKey @@ -209,4 +159,47 @@ public class StaffRoleServiceImpl extends BaseServiceImpl getGridStaffList(GridStaffFormDTO formDTO) { + //有这些条件 优先查询用户信息 + List staffList = baseDao.getStaffList(formDTO); + + if (CollectionUtils.isEmpty(staffList)){ + log.warn("getGridStaffList getStaffList return empty,param:{}", JSON.toJSONString(formDTO)); + return new PageData<>(null,NumConstant.ZERO); + } + //继续查询 在网格里的人 + Result> staffGridResult = govOrgOpenFeignClient.getStaffGridList(formDTO.getOrgId(),formDTO.getOrgType()); + if (staffGridResult == null || !staffGridResult.success() || CollectionUtils.isEmpty(staffGridResult.getData())){ + log.warn("getGridStaffList getStaffGridList return empty,param orgId:{},orgType:{}",formDTO.getOrgId(),formDTO.getOrgType()); + return new PageData<>(null,NumConstant.ZERO); + } + Map> userGridListMap = staffGridResult.getData().stream() + .collect(Collectors.groupingBy(CustomerStaffGridResultDTO::getUserId)); + List result = new ArrayList<>(); + Integer offset = formDTO.getOffset(); + Integer pageSize = formDTO.getPageSize(); + + AtomicInteger count = new AtomicInteger(); + staffList.forEach(staff->{ + List dtoList = userGridListMap.get(staff.getUserId()); + if (dtoList == null){ + return; + } + + dtoList.forEach(grid-> { + CustomerGridStaffResultDTO staffNew = ConvertUtils.sourceToTarget(staff, CustomerGridStaffResultDTO.class); + staffNew.setGridId(grid.getGridId()); + staffNew.setGridName(grid.getGridName()); + staffNew.setAgencyId(grid.getAgencyId()); + if (count.intValue() >= offset && result.size() < pageSize) { + result.add(staffNew); + } + count.getAndIncrement(); + }); + + }); + return new PageData<>(result,result.size()); + } + } diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/StaffRoleDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/StaffRoleDao.xml index edb8b4e4a4..d1c5f61d94 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/StaffRoleDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/StaffRoleDao.xml @@ -271,5 +271,34 @@ ORDER BY sr.staff_id, gsr.role_key +