diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java index 1976ca3337..5a261b93bf 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/exception/EpmetErrorCode.java @@ -41,7 +41,6 @@ public enum EpmetErrorCode { MOBILE_GET_CODE_ERROR(8104,"获取验证码失败"), MESSAGE_SMS_SEND_ERROR(8105, "短信发送失败"), NOT_DEL_GRID(8106,"该网格存在工作人员,不允许删除"), - GROUP_EDIT_ERROR(8107,"组信息编辑失败"), ORG_IS_NOT_NULL(8107,"党组织关系不能为空"), CANNOT_DELETE_PARTY_BRANCH(8108,"当前支部存在党员,不允许删除"), @@ -123,7 +122,12 @@ public enum EpmetErrorCode { SELECT_CUSTOMER_ERROR(8652,"未查询到注册客户信息"), SELECT_AGENCY_ERROR(8653,"根据客户信息未查询到注册客户组织信息"), SELECT_USER_ERROR(8654,"根据客户信息未查询到注册客户管理员信息"), - UPDATE_CUSTOMER_ERROR(8655,"更新注册客户信息为已完成初始化失败"); + UPDATE_CUSTOMER_ERROR(8655,"更新注册客户信息为已完成初始化失败"), + + GROUP_EDIT_ERROR(9000,"组信息编辑失败"), + GROUP_NOT_EXISTS(9001,"该组不存在"), + GROUP_IN_AUDITING(9002,"该组已提交编辑,处于待审核状态,完成审核前不可再次提交"), + GROUP_EDIT_NUM_LIMITED(9003,"已达编辑次数上限"); private int code; 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 b5c505adbb..03a5f0cd6f 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 @@ -1062,27 +1062,26 @@ public class ResiGroupServiceImpl extends BaseServiceImpl 0) { // 已存在组名,拒绝提交 - throw new RenException(EpmetErrorCode.GROUP_EDIT_ERROR.getCode(), "组名已存在"); + throw new RenException(EpmetErrorCode.GROUP_ALREADY_EXISTED.getCode(), EpmetErrorCode.GROUP_ALREADY_EXISTED.getMsg()); } Date now = new Date(); int usedEditNum = groupEditSubmitRecordDao.countEditNum(groupId, DateUtils.getMonthStart(now), DateUtils.getMonthEnd(now)); if (GroupLimitConstant.EDIT_NUM_LIMIT_MONTH <= usedEditNum) { // 达到最大编辑次数了 - throw new RenException(EpmetErrorCode.GROUP_EDIT_ERROR.getCode(), - String.format("本月可用修改次数为%s次,您已使用%s次", GroupLimitConstant.EDIT_NUM_LIMIT_MONTH, usedEditNum)); + throw new RenException(EpmetErrorCode.GROUP_EDIT_NUM_LIMITED.getCode(), EpmetErrorCode.GROUP_EDIT_NUM_LIMITED.getMsg()); } // 3.内容检查