From 7a6e48263978aeab69900b7bf195d32fe74d1b06 Mon Sep 17 00:00:00 2001 From: wxz Date: Tue, 3 Nov 2020 15:28:49 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=E7=BB=84?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E7=BC=96=E8=BE=91=E6=8F=90=E4=BA=A4=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=EF=BC=8C=E5=A2=9E=E5=8A=A0=E7=BD=91=E6=A0=BC=E5=86=85?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E5=AD=98=E5=9C=A8=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/modules/group/dao/ResiGroupDao.java | 13 ++++++++++++ .../service/impl/ResiGroupServiceImpl.java | 7 ++++++- .../resources/mapper/group/ResiGroupDao.xml | 21 +++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupDao.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupDao.java index 867a3d11ba..57fd94d9ab 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupDao.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/dao/ResiGroupDao.java @@ -188,4 +188,17 @@ public interface ResiGroupDao extends BaseDao { * @date 2020.05.22 09:54 **/ List selectGroupListByGridIds(@Param("gridIds") List gridIds); + + /** + * 编辑提交的时候,检查组名是否存在。网格内检查, + * 检查resi_group中已审核通过的和待审核的 + * 检查submit_record中待审核的。已审核的不用检查,因为已经更新到resi_group中了 + * @param groupId + * @param gridId + * @param groupName + * @return + */ + int countExistsGroupNameBeforeEdit(@Param("groupId") String groupId, + @Param("gridId") String gridId, + @Param("groupName") String groupName); } diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java index b3bb7d4a5e..624f0f73ef 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java @@ -1064,8 +1064,13 @@ public class ResiGroupServiceImpl extends BaseServiceImpl 0) { + // 已存在组名,拒绝提交 + throw new RenException(EpmetErrorCode.GROUP_EDIT_ERROR.getCode(), "组名已存在"); + } + // 2.内容检查 - scanGroupEditContent(groupName, groupIntroduction, groupHeadPhoto); + //scanGroupEditContent(groupName, groupIntroduction, groupHeadPhoto); String app = loginUserUtil.getLoginUserApp(); String userId = loginUserUtil.getLoginUserId(); diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml index 119db46b30..94c2422159 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml @@ -397,4 +397,25 @@ GRID_ID = #{gridId} + + From f7044af28bac95c6c1313bac5b28f8cf4e94d604 Mon Sep 17 00:00:00 2001 From: wxz Date: Tue, 3 Nov 2020 16:07:02 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=88=9B=E5=BB=BA=E5=B0=8F=E7=BB=84?= =?UTF-8?q?=E7=94=B3=E8=AF=B7=EF=BC=8C=E5=A2=9E=E5=8A=A0=E9=98=BF=E9=87=8C?= =?UTF-8?q?=E4=BA=91=E5=86=85=E5=AE=B9=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/ResiGroupServiceImpl.java | 67 ++++++++++--------- 1 file changed, 37 insertions(+), 30 deletions(-) diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java index 624f0f73ef..a36df9e93c 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java +++ b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/group/service/impl/ResiGroupServiceImpl.java @@ -359,38 +359,45 @@ public class ResiGroupServiceImpl extends BaseServiceImpl resiResult = - epmetUserFeignClient.getUserResiInfoDTO(resiParam); - String userName = ""; - if(resiResult.success() && null != resiResult.getData()){ - userName = (StringUtils.isBlank(resiResult.getData().getSurname()) ? "" : resiResult.getData().getSurname()) - + (StringUtils.isBlank(resiResult.getData().getName()) ? "" :resiResult.getData().getName()); - } + //4.获取居民注册信息 + UserResiInfoFormDTO resiParam = new UserResiInfoFormDTO(); + resiParam.setCustomerId(applyCreateGroupFormDTO.getCustomerId()); + resiParam.setUserId(applyCreateGroupFormDTO.getUserId()); + Result resiResult = + epmetUserFeignClient.getUserResiInfoDTO(resiParam); + String userName = ""; + if(resiResult.success() && null != resiResult.getData()){ + userName = (StringUtils.isBlank(resiResult.getData().getSurname()) ? "" : resiResult.getData().getSurname()) + + (StringUtils.isBlank(resiResult.getData().getName()) ? "" :resiResult.getData().getName()); + } userName = StringUtils.isBlank(userName) ? ModuleConstant.UNKNOWN : userName; - String msg = String.format(UserMessageConstant.CREATION_OF_GROUP_MESSAGE_TEMPLATE,roleName,userName,applyCreateGroupFormDTO.getGroupName()); - //3.2、插入一条待审核的操作记录 + String msg = String.format(UserMessageConstant.CREATION_OF_GROUP_MESSAGE_TEMPLATE,roleName,userName,applyCreateGroupFormDTO.getGroupName()); + //4.2、插入一条待审核的操作记录 ResiGroupOperationDTO resiGroupOperation = new ResiGroupOperationDTO(); resiGroupOperation.setResiGroupId(resiGroupEntity.getId()); resiGroupOperation.setState(GroupStateConstant.GROUP_UNDER_AUDITTING); @@ -398,7 +405,7 @@ public class ResiGroupServiceImpl extends BaseServiceImpl Date: Tue, 3 Nov 2020 16:39:40 +0800 Subject: [PATCH 3/3] =?UTF-8?q?1.=E5=B0=8F=E7=BB=84=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E5=A2=9E=E5=8A=A0flyway=E8=84=9A=E6=9C=AC=20?= =?UTF-8?q?2.=E5=A2=9E=E5=8A=A0=E5=B0=8F=E7=BB=84=E5=8F=98=E6=9B=B4?= =?UTF-8?q?=E5=AE=A1=E6=A0=B8=E5=88=97=E8=A1=A8=E6=9D=83=E9=99=90=E5=AD=97?= =?UTF-8?q?=E5=85=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tools/enums/RequirePermissionEnum.java | 1 + .../V0.0.4__createGroupSubmitRecord.sql | 24 +++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.4__createGroupSubmitRecord.sql diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java index 284ef67e74..288526433e 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/RequirePermissionEnum.java @@ -10,6 +10,7 @@ public enum RequirePermissionEnum { * 工作-基层治理-群组管理 */ WORK_GRASSROOTS_GROUP_AUDITINGLIST("work_grassroots_group_auditinglist", "基层治理:群组管理:待审核列表", "基层治理:群组管理:待审核列表查询"), + WORK_GRASSROOTS_GROUP_EDIT_AUDITINGLIST("work_grassroots_group_edit_auditinglist", "基层治理:群组管理:小组变更待审核列表", "基层治理:群组管理:小组变更待审核列表"), WORK_GRASSROOTS_GROUP_GROUPSINTHEGRID("work_grassroots_group_groupsinthegrid", "基层治理:群组管理:本网格小组列表", "基层治理:群组管理:本网格小组列表查询"), WORK_GRASSROOTS_GROUP_AUDIT("work_grassroots_group_audit", "基层治理:群组管理:审核建组", "基层治理:群组管理:审核建组(通过或驳回)"), WORK_GRASSROOTS_GROUP_AUDITED("work_grassroots_group_audited", "基层治理:群组管理:审核历史", "基层治理:群组管理:审核历史列表查询"), diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.4__createGroupSubmitRecord.sql b/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.4__createGroupSubmitRecord.sql new file mode 100644 index 0000000000..1e53a7d6f1 --- /dev/null +++ b/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.4__createGroupSubmitRecord.sql @@ -0,0 +1,24 @@ +CREATE TABLE `group_edit_submit_record` +( + `ID` varchar(64) NOT NULL, + `GROUP_ID` varchar(64) NOT NULL COMMENT '小组ID', + `CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID', + `GRID_ID` varchar(64) DEFAULT NULL COMMENT '网格ID', + `GROUP_HEAD_PHOTO` varchar(255) NOT NULL COMMENT '头像', + `GROUP_NAME` varchar(10) NOT NULL COMMENT '小组名称', + `GROUP_INTRODUCTION` varchar(500) NOT NULL COMMENT '小组介绍', + `AUDIT_STATUS` varchar(30) NOT NULL COMMENT '审核状态。under_auditting:审核中,approved:通过,rejected:驳回', + `STAFF_ID` varchar(64) DEFAULT NULL COMMENT '审核人ID', + `REMARK` varchar(255) DEFAULT NULL COMMENT '回复', + `AUDIT_TIME` datetime DEFAULT NULL COMMENT '审核时间', + `DEL_FLAG` char(1) NOT NULL DEFAULT '0' COMMENT '删除标识', + `REVISION` int(8) NOT NULL DEFAULT '0' COMMENT '乐观锁', + `CREATED_BY` varchar(64) NOT NULL COMMENT '创建人 提交人', + `CREATED_TIME` datetime NOT NULL COMMENT '创建时间', + `UPDATED_BY` varchar(64) NOT NULL COMMENT '修改人ID', + `UPDATED_TIME` datetime NOT NULL COMMENT '修改时间', + `READ_FLAG` varchar(8) NOT NULL COMMENT '已读read 未读unread', + `MESSAGE_TEXT` varchar(255) NOT NULL COMMENT '审核人员查看待审核列表时的文案,如:党员李华申请变更小组【原小组名】,请审核。', + PRIMARY KEY (`ID`) +) ENGINE = InnoDB + DEFAULT CHARSET = utf8mb4 COMMENT ='组编辑提交记录表' \ No newline at end of file