From 962fea3a5b0bae61ea7ddb7c3c1b0b831cc9509c Mon Sep 17 00:00:00 2001 From: Jackwang Date: Thu, 6 Aug 2020 19:36:29 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=86=85=E5=AE=B9=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E3=80=91-=E3=80=90events=E3=80=81group=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E5=8F=96=E5=80=BC=E6=96=B9=E5=BC=8F=E8=B0=83=E6=95=B4=E3=80=91?= =?UTF-8?q?-=EF=BC=88=E7=8E=8B=E7=AB=A5=EF=BC=89-2020/8/6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../esua/epdc/service/impl/CommentServiceImpl.java | 1 + .../esua/epdc/service/impl/ItemServiceImpl.java | 2 ++ .../epdc/service/impl/TopicCommentServiceImpl.java | 1 + .../esua/epdc/dto/comment/form/CommentFormDTO.java | 5 +++++ .../epdc/dto/comment/form/SubmitCommentFormDTO.java | 5 +++++ .../esua/epdc/dto/item/form/EvaluationFormDTO.java | 10 ++++++++++ .../service/impl/EventCommentServiceImpl.java | 3 +-- .../events/service/impl/EpdcEventsServiceImpl.java | 2 +- .../modules/item/service/impl/ItemServiceImpl.java | 12 ++++-------- .../dto/comment/TopicCommentFormDTO.java | 5 +++++ .../service/impl/TopicCommentServiceImpl.java | 3 +-- .../modules/topic/service/impl/TopicServiceImpl.java | 2 +- 12 files changed, 37 insertions(+), 14 deletions(-) diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/CommentServiceImpl.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/CommentServiceImpl.java index d9163414b..8edab3246 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/CommentServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/CommentServiceImpl.java @@ -42,6 +42,7 @@ public class CommentServiceImpl implements CommentService { commentFormDTO.setUserId(userDetail.getUserId()); commentFormDTO.setUserName(userDetail.getNickname()); commentFormDTO.setUserFace(userDetail.getFaceImg()); + commentFormDTO.setDeptId(userDetail.getGridId()); SubmitCommentFormDTO submitCommentFormDTO = ConvertUtils.sourceToTarget(commentFormDTO, SubmitCommentFormDTO.class); if (UserTagUtils.containIdentity(userDetail.getUserTagInfos(), UserTagEnum.PARTY_MEMBER)) { submitCommentFormDTO.setPartyFlag(YesOrNoEnum.YES.value()); diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/ItemServiceImpl.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/ItemServiceImpl.java index e7e2f72fa..e453ffa98 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/ItemServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/ItemServiceImpl.java @@ -52,6 +52,8 @@ public class ItemServiceImpl implements ItemService { return new Result().error("获取用户信息失败"); } evaluationFormDTO.setUserId(userDetail.getUserId()); + evaluationFormDTO.setUserName(userDetail.getNickname()); + evaluationFormDTO.setDeptId(userDetail.getGridId()); return itemFeignClient.evaluation(evaluationFormDTO); } diff --git a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/TopicCommentServiceImpl.java b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/TopicCommentServiceImpl.java index e3eededb8..6c9290caa 100644 --- a/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/TopicCommentServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/TopicCommentServiceImpl.java @@ -40,6 +40,7 @@ public class TopicCommentServiceImpl implements TopicCommentService { topicCommentFormDTO.setUserId(userDetail.getUserId()); topicCommentFormDTO.setUserName(userDetail.getNickname()); topicCommentFormDTO.setUserFace(userDetail.getFaceImg()); + topicCommentFormDTO.setDeptId(userDetail.getGridId()); if (UserTagUtils.containIdentity(userDetail.getUserTagInfos(), UserTagEnum.PARTY_MEMBER)) { topicCommentFormDTO.setPartyFlag(YesOrNoEnum.YES.value()); } else { diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/comment/form/CommentFormDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/comment/form/CommentFormDTO.java index d611048b4..356bea170 100644 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/comment/form/CommentFormDTO.java +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/comment/form/CommentFormDTO.java @@ -53,4 +53,9 @@ public class CommentFormDTO { */ private Boolean isConReview = false; + + /** + * 部门id + */ + private Long deptId; } diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/comment/form/SubmitCommentFormDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/comment/form/SubmitCommentFormDTO.java index 66c3811e3..b5ca09130 100644 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/comment/form/SubmitCommentFormDTO.java +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/comment/form/SubmitCommentFormDTO.java @@ -52,4 +52,9 @@ public class SubmitCommentFormDTO implements Serializable { *是否提交为内容待审核状态 */ private Boolean isConReview = false; + + /** + * 部门id + */ + private Long deptId; } diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/form/EvaluationFormDTO.java b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/form/EvaluationFormDTO.java index 377765308..438c6ce3b 100644 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/form/EvaluationFormDTO.java +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/dto/item/form/EvaluationFormDTO.java @@ -31,4 +31,14 @@ public class EvaluationFormDTO implements Serializable { */ private Boolean isConReview = false; + /** + * 昵称 + */ + private String userName; + + /** + * 部门id + */ + private Long deptId; + } diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/comment/service/impl/EventCommentServiceImpl.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/comment/service/impl/EventCommentServiceImpl.java index 09af73e1e..a60b10b92 100755 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/comment/service/impl/EventCommentServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/comment/service/impl/EventCommentServiceImpl.java @@ -29,7 +29,6 @@ import com.elink.esua.epdc.commons.tools.security.content.dto.form.ParentAndAllD import com.elink.esua.epdc.commons.tools.security.content.dto.form.SaveCheckRecordsDTO; import com.elink.esua.epdc.commons.tools.security.content.dto.result.CheckResultDTO; import com.elink.esua.epdc.commons.tools.security.content.dto.result.CheckResultMessageDTO; -import com.elink.esua.epdc.commons.tools.security.user.SecurityUser; import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; import com.elink.esua.epdc.commons.tools.utils.Result; import com.elink.esua.epdc.constant.EventsNoticeConstant; @@ -171,7 +170,7 @@ public class EventCommentServiceImpl extends BaseServiceImpl textList = new ArrayList<>(); textList.add(dto.getEventContent()); // 获取所有上级机构名称和ID拼接 - ParentAndAllDeptDTO deptDto = adminFeignClient.getParentAndAllDept(SecurityUser.getDeptId()).getData(); + ParentAndAllDeptDTO deptDto = adminFeignClient.getParentAndAllDept(dto.getGridId()).getData(); CheckResultDTO contentResult = CheckDataUtils.checkContent(textList); CheckResultDTO imgResult = CheckDataUtils.checkImgs(dto.getImages()); if(!isConReview && diff --git a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java index bf9e3d215..281593c04 100755 --- a/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/item/service/impl/ItemServiceImpl.java @@ -318,24 +318,20 @@ public class ItemServiceImpl extends BaseServiceImpl implem //内容审核 Boolean isConReview = evaluationFormDTO.getIsConReview(); - String userName = null; - if(null != SecurityUser.getUser()){ - userName = SecurityUser.getUser().getUsername(); - } String mobile = null; Result user = userInfoFeignClient.getUserInfoById(evaluationFormDTO.getUserId()); if(null != user.getData()){ mobile = user.getData().getMobile(); } // 获取所有上级机构名称和ID拼接 - ParentAndAllDeptDTO deptDto = adminFeignClient.getParentAndAllDept(SecurityUser.getDeptId()).getData(); + ParentAndAllDeptDTO deptDto = adminFeignClient.getParentAndAllDept(evaluationFormDTO.getDeptId()).getData(); List textList = new ArrayList<>(); textList.add(evaluationFormDTO.getEvaluationContent()); CheckResultDTO contentResult = CheckDataUtils.checkContent(textList); if (!isConReview && (contentResult != null && !contentResult.getAllPass())) { //组装要保存的信息 SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(evaluationFormDTO.getUserId(), - userName,CheckDataUtils.cate_two , CheckDataUtils.decision_one, + evaluationFormDTO.getUserName(),CheckDataUtils.cate_two , CheckDataUtils.decision_one, ModuleName.ITEM_SATISFACTION.getCode(), textList,null, null,contentResult, null,null,mobile,"0",deptDto); contentSecurityFeign.insertViolationsRecord(record); @@ -352,7 +348,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem //接口异常,保存至待审核信息 if(contentResult == null && !isConReview) { SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(evaluationFormDTO.getUserId(), - userName, CheckDataUtils.cate_two, null,ModuleName.ITEM_SATISFACTION.getCode(), textList, + evaluationFormDTO.getUserName(), CheckDataUtils.cate_two, null,ModuleName.ITEM_SATISFACTION.getCode(), textList, null, itemEntity.getId(),null,null, null,mobile,"1",deptDto); contentSecurityFeign.insertRecords(record); } @@ -368,7 +364,7 @@ public class ItemServiceImpl extends BaseServiceImpl implem if (CheckDataUtils.review.equals(twoTypes.getSuggestion())) { //组装要保存的信息 SaveCheckRecordsDTO record = CheckDataUtils.getPackageRecords(evaluationFormDTO.getUserId(), - userName, CheckDataUtils.cate_two, null, ModuleName.ITEM_SATISFACTION.getCode(), textList, + evaluationFormDTO.getUserName(), CheckDataUtils.cate_two, null, ModuleName.ITEM_SATISFACTION.getCode(), textList, null,itemEntity.getId(), null,null,twoTypes,mobile,"0",deptDto); contentSecurityFeign.insertRecords(record); } diff --git a/esua-epdc/epdc-module/epdc-group/epdc-group-client/src/main/java/com.elink.esua.epdc/dto/comment/TopicCommentFormDTO.java b/esua-epdc/epdc-module/epdc-group/epdc-group-client/src/main/java/com.elink.esua.epdc/dto/comment/TopicCommentFormDTO.java index 2b282249b..136dc5e10 100644 --- a/esua-epdc/epdc-module/epdc-group/epdc-group-client/src/main/java/com.elink.esua.epdc/dto/comment/TopicCommentFormDTO.java +++ b/esua-epdc/epdc-module/epdc-group/epdc-group-client/src/main/java/com.elink.esua.epdc/dto/comment/TopicCommentFormDTO.java @@ -55,4 +55,9 @@ public class TopicCommentFormDTO { */ private Boolean isConReview = false; + /** + * 部门id + */ + private Long deptId; + } diff --git a/esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/java/com.elink.esua.epdc/modules/comment/service/impl/TopicCommentServiceImpl.java b/esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/java/com.elink.esua.epdc/modules/comment/service/impl/TopicCommentServiceImpl.java index be6542786..5e799a5e8 100755 --- a/esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/java/com.elink.esua.epdc/modules/comment/service/impl/TopicCommentServiceImpl.java +++ b/esua-epdc/epdc-module/epdc-group/epdc-group-server/src/main/java/com.elink.esua.epdc/modules/comment/service/impl/TopicCommentServiceImpl.java @@ -29,7 +29,6 @@ import com.elink.esua.epdc.commons.tools.security.content.dto.form.ParentAndAllD import com.elink.esua.epdc.commons.tools.security.content.dto.form.SaveCheckRecordsDTO; import com.elink.esua.epdc.commons.tools.security.content.dto.result.CheckResultDTO; import com.elink.esua.epdc.commons.tools.security.content.dto.result.CheckResultMessageDTO; -import com.elink.esua.epdc.commons.tools.security.user.SecurityUser; import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; import com.elink.esua.epdc.commons.tools.utils.Result; import com.elink.esua.epdc.dto.UserDTO; @@ -152,7 +151,7 @@ public class TopicCommentServiceImpl extends BaseServiceImpl imp List textList = new ArrayList<>(); textList.add(formDto.getTopicContent()); // 获取所有上级机构名称和ID拼接 - ParentAndAllDeptDTO deptDto = adminFeignClient.getParentAndAllDept(SecurityUser.getDeptId()).getData(); + ParentAndAllDeptDTO deptDto = adminFeignClient.getParentAndAllDept(formDto.getGridId()).getData(); CheckResultDTO contentResult = CheckDataUtils.checkContent(textList); CheckResultDTO imgResult = CheckDataUtils.checkImgs(formDto.getImages()); if(!isConReview &&