From 659ca2929cb42d44d9cfa541e728c8a6da7aa395 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 27 Jul 2021 11:14:12 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E5=B7=B2=E6=9C=89=E4=B8=93=E9=A2=98?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/dto/SpecialSubjectDTO.java | 5 +++++ .../dto/form/QuerySpecialSubFormDTO.java | 5 +++++ .../result/WorkSpecialSubjectResultDTO.java | 8 ++++++- .../controller/SpecialSubjectController.java | 3 ++- .../epmet/entity/SpecialSubjectEntity.java | 7 ++++++ .../impl/SpecialSubjectServiceImpl.java | 22 +++++++++++++++++-- .../db/migration/V0.0.6__add_del_staffid.sql | 1 + .../resources/mapper/SpecialSubjectDao.xml | 2 +- 8 files changed, 48 insertions(+), 5 deletions(-) create mode 100644 epmet-module/gov-voice/gov-voice-server/src/main/resources/db/migration/V0.0.6__add_del_staffid.sql diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/SpecialSubjectDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/SpecialSubjectDTO.java index a943ed22af..8c3a8332aa 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/SpecialSubjectDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/SpecialSubjectDTO.java @@ -112,4 +112,9 @@ public class SpecialSubjectDTO implements Serializable { * 扩展属性:标签颜色 */ private String tagColor; + + /** + * 删除人id + */ + private String delStaffId; } \ No newline at end of file diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/QuerySpecialSubFormDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/QuerySpecialSubFormDTO.java index 02ec4d2e6f..fb43db39e6 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/QuerySpecialSubFormDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/QuerySpecialSubFormDTO.java @@ -29,4 +29,9 @@ public class QuerySpecialSubFormDTO implements Serializable { */ @NotBlank(message = "pids不能为空", groups = AddUserInternalGroup.class) private String pids; + + /** + * 当前登录用户userId, + */ + private String userId; } diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/WorkSpecialSubjectResultDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/WorkSpecialSubjectResultDTO.java index 0ebfd26b58..8e0b2a2ba7 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/WorkSpecialSubjectResultDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/WorkSpecialSubjectResultDTO.java @@ -42,9 +42,15 @@ public class WorkSpecialSubjectResultDTO implements Serializable { private String addOrgId; private String orgLevel; + /** - * 创建时间 + * 创建时间-前端无用 */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date createdTime; + + /** + * 创建人-前端无用 + */ + private String createdBy; } diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/SpecialSubjectController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/SpecialSubjectController.java index d609b01016..a45d598709 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/SpecialSubjectController.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/SpecialSubjectController.java @@ -93,7 +93,8 @@ public class SpecialSubjectController { * @Date 2021/7/15 21:17 **/ @PostMapping("existedlist") - public Result> queryExistedList(@RequestBody QuerySpecialSubFormDTO formDTO) { + public Result> queryExistedList(@LoginUser TokenDto tokenDto, @RequestBody QuerySpecialSubFormDTO formDTO) { + formDTO.setUserId(tokenDto.getUserId()); ValidatorUtils.validateEntity(formDTO, QuerySpecialSubFormDTO.AddUserInternalGroup.class); return new Result>().ok(specialSubjectService.queryExistedList(formDTO)); } diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/SpecialSubjectEntity.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/SpecialSubjectEntity.java index 6f0f61ed9a..2b78ecd37a 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/SpecialSubjectEntity.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/entity/SpecialSubjectEntity.java @@ -52,6 +52,7 @@ public class SpecialSubjectEntity extends BaseEpmetEntity { /** * 新增此专题时用户所在的组织id或者网格id + * mean:给谁添加的??? */ private String addOrgId; @@ -76,7 +77,13 @@ public class SpecialSubjectEntity extends BaseEpmetEntity { /** * 新增此专题用户所属的组织id + * mean:当前人是谁? */ private String addUserAgencyId; + /** + * 删除人id + */ + private String delStaffId; + } diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/SpecialSubjectServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/SpecialSubjectServiceImpl.java index d73f0afc4e..c41e2a34c8 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/SpecialSubjectServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/SpecialSubjectServiceImpl.java @@ -197,6 +197,12 @@ public class SpecialSubjectServiceImpl extends BaseServiceImpl queryExistedList(QuerySpecialSubFormDTO formDTO) { + StaffInfoFromDTO staffInfoFromDTO = new StaffInfoFromDTO(); + staffInfoFromDTO.setStaffId(formDTO.getUserId()); + Result staffResult = govOrgOpenFeignClient.queryStaffProfile(staffInfoFromDTO); + if (staffResult.success() && null != staffResult.getData()) { + throw new RenException("查询当前工作人员信息异常"); + } List resultDTOList = new ArrayList<>(); List notList = new ArrayList<>(); //当前组织或者网格自己建立的 @@ -207,11 +213,17 @@ public class SpecialSubjectServiceImpl extends BaseServiceImpl - update special_subject set del_flag='1',UPDATED_BY=#{userId},UPDATED_TIME=Now() + update special_subject set del_flag='1',UPDATED_BY=#{userId},UPDATED_TIME=Now(),DEL_STAFF_ID=#{userId} where id=#{id} From deafa99082bd31a59f706e821464d67b111dbe16 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 27 Jul 2021 12:51:59 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E5=B7=B2=E6=9C=89=E4=B8=93=E9=A2=98?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/SpecialSubjectServiceImpl.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/SpecialSubjectServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/SpecialSubjectServiceImpl.java index c41e2a34c8..b796143513 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/SpecialSubjectServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/SpecialSubjectServiceImpl.java @@ -180,6 +180,7 @@ public class SpecialSubjectServiceImpl extends BaseServiceImpl Date: Tue, 27 Jul 2021 12:57:12 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E5=B7=B2=E6=9C=89=E4=B8=93=E9=A2=98?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/SpecialSubjectServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/SpecialSubjectServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/SpecialSubjectServiceImpl.java index b796143513..d5e76d5f84 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/SpecialSubjectServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/SpecialSubjectServiceImpl.java @@ -201,7 +201,7 @@ public class SpecialSubjectServiceImpl extends BaseServiceImpl staffResult = govOrgOpenFeignClient.queryStaffProfile(staffInfoFromDTO); - if (staffResult.success() && null != staffResult.getData()) { + if (!staffResult.success() && null == staffResult.getData()) { throw new RenException("查询当前工作人员信息异常"); } List resultDTOList = new ArrayList<>(); From 4aa82b78a8e3d3be6f76df0f428c7c285931f433 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 27 Jul 2021 13:09:10 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E5=B7=B2=E6=9C=89=E4=B8=93=E9=A2=98?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/dto/form/QuerySpecialSubFormDTO.java | 4 ++++ .../java/com/epmet/controller/SpecialSubjectController.java | 1 + .../com/epmet/service/impl/SpecialSubjectServiceImpl.java | 2 ++ 3 files changed, 7 insertions(+) diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/QuerySpecialSubFormDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/QuerySpecialSubFormDTO.java index fb43db39e6..2410d1fedd 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/QuerySpecialSubFormDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/form/QuerySpecialSubFormDTO.java @@ -34,4 +34,8 @@ public class QuerySpecialSubFormDTO implements Serializable { * 当前登录用户userId, */ private String userId; + /** + * 当前登录用户客户id + */ + private String customerId; } diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/SpecialSubjectController.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/SpecialSubjectController.java index a45d598709..017338b433 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/SpecialSubjectController.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/controller/SpecialSubjectController.java @@ -95,6 +95,7 @@ public class SpecialSubjectController { @PostMapping("existedlist") public Result> queryExistedList(@LoginUser TokenDto tokenDto, @RequestBody QuerySpecialSubFormDTO formDTO) { formDTO.setUserId(tokenDto.getUserId()); + formDTO.setCustomerId(tokenDto.getCustomerId()); ValidatorUtils.validateEntity(formDTO, QuerySpecialSubFormDTO.AddUserInternalGroup.class); return new Result>().ok(specialSubjectService.queryExistedList(formDTO)); } diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/SpecialSubjectServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/SpecialSubjectServiceImpl.java index d5e76d5f84..aa5e70b4bf 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/SpecialSubjectServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/SpecialSubjectServiceImpl.java @@ -156,6 +156,7 @@ public class SpecialSubjectServiceImpl extends BaseServiceImpl result = govOrgOpenFeignClient.queryStaffProfile(staffInfoFromDTO); if(result.success()&&null!=result.getData()){ insertEntity.setAddUserAgencyId(result.getData().getAgencyId()); @@ -200,6 +201,7 @@ public class SpecialSubjectServiceImpl extends BaseServiceImpl queryExistedList(QuerySpecialSubFormDTO formDTO) { StaffInfoFromDTO staffInfoFromDTO = new StaffInfoFromDTO(); staffInfoFromDTO.setStaffId(formDTO.getUserId()); + staffInfoFromDTO.setCustomerId(formDTO.getCustomerId()); Result staffResult = govOrgOpenFeignClient.queryStaffProfile(staffInfoFromDTO); if (!staffResult.success() && null == staffResult.getData()) { throw new RenException("查询当前工作人员信息异常"); From 0b65b61a65fe1f4d055e1e8591575cb91e3b02cb Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 27 Jul 2021 13:23:22 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E5=B7=B2=E6=9C=89=E4=B8=93=E9=A2=98?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/service/impl/SpecialSubjectServiceImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/SpecialSubjectServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/SpecialSubjectServiceImpl.java index aa5e70b4bf..f29d15d39e 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/SpecialSubjectServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/SpecialSubjectServiceImpl.java @@ -145,6 +145,8 @@ public class SpecialSubjectServiceImpl extends BaseServiceImpl havedList=this.queryExistedList(querySpecialSubFormDTO); List haveTagIds=havedList.stream().map(WorkSpecialSubjectResultDTO::getTagId).distinct().collect(Collectors.toList()); haveTagIds.forEach(tagId->{ From dd5e5b9c17e66998698fb26a6901407b99a2d789 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Tue, 27 Jul 2021 13:44:59 +0800 Subject: [PATCH 6/6] =?UTF-8?q?=E5=B7=B2=E6=9C=89=E4=B8=93=E9=A2=98?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/result/WorkSpecialSubjectResultDTO.java | 7 +++++++ .../com/epmet/service/impl/SpecialSubjectServiceImpl.java | 2 ++ 2 files changed, 9 insertions(+) diff --git a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/WorkSpecialSubjectResultDTO.java b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/WorkSpecialSubjectResultDTO.java index 8e0b2a2ba7..bd90c9c462 100644 --- a/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/WorkSpecialSubjectResultDTO.java +++ b/epmet-module/gov-voice/gov-voice-client/src/main/java/com/epmet/dto/result/WorkSpecialSubjectResultDTO.java @@ -53,4 +53,11 @@ public class WorkSpecialSubjectResultDTO implements Serializable { * 创建人-前端无用 */ private String createdBy; + + /** + * 新增此专题用户所属的组织id + * mean:当前人是谁? + * -前端无用 + */ + private String addUserAgencyId; } diff --git a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/SpecialSubjectServiceImpl.java b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/SpecialSubjectServiceImpl.java index f29d15d39e..2d53cfb350 100644 --- a/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/SpecialSubjectServiceImpl.java +++ b/epmet-module/gov-voice/gov-voice-server/src/main/java/com/epmet/service/impl/SpecialSubjectServiceImpl.java @@ -231,6 +231,7 @@ public class SpecialSubjectServiceImpl extends BaseServiceImpl