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..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 @@ -29,4 +29,13 @@ public class QuerySpecialSubFormDTO implements Serializable { */ @NotBlank(message = "pids不能为空", groups = AddUserInternalGroup.class) private String pids; + + /** + * 当前登录用户userId, + */ + private String userId; + /** + * 当前登录用户客户id + */ + private String customerId; } 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..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 @@ -42,9 +42,22 @@ 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; + + /** + * 新增此专题用户所属的组织id + * mean:当前人是谁? + * -前端无用 + */ + private String addUserAgencyId; } 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..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 @@ -93,7 +93,9 @@ 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()); + 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/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..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 @@ -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->{ @@ -156,6 +158,7 @@ public class SpecialSubjectServiceImpl extends BaseServiceImpl result = govOrgOpenFeignClient.queryStaffProfile(staffInfoFromDTO); if(result.success()&&null!=result.getData()){ insertEntity.setAddUserAgencyId(result.getData().getAgencyId()); @@ -180,6 +183,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("查询当前工作人员信息异常"); + } List resultDTOList = new ArrayList<>(); List notList = new ArrayList<>(); //当前组织或者网格自己建立的 @@ -207,11 +218,20 @@ 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}