Browse Source

事件转项目

feature/syp_points
songyunpeng 5 years ago
parent
commit
779ecccd79
  1. 57
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiWorkIssueController.java
  2. 17
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/WorkIssueFeignClient.java
  3. 13
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/WorkIssueFeignClientFallback.java
  4. 11
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/WorkIssueService.java
  5. 17
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/WorkIssueServiceImpl.java
  6. 4
      esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/constant/EventIssueItemState.java
  7. 15
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/controller/EpdcAppWorkEventsController.java
  8. 2
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/controller/EpdcEventsController.java
  9. 2
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/EpdcEventsService.java
  10. 8
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/impl/EpdcEventsServiceImpl.java
  11. 18
      esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/controller/EpdcAppWorkIssueController.java

57
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiWorkIssueController.java

@ -9,7 +9,6 @@ import com.elink.esua.epdc.dto.comment.form.WorkCommentReplyFormDTO;
import com.elink.esua.epdc.dto.comment.result.WorkEventsCommentsDTO;
import com.elink.esua.epdc.dto.events.EpdcEventsDetailDTO;
import com.elink.esua.epdc.dto.events.form.EpdcEventsReviewFormDTO;
import com.elink.esua.epdc.dto.events.result.EventAppDetailResultDTO;
import com.elink.esua.epdc.dto.issue.form.*;
import com.elink.esua.epdc.dto.issue.result.*;
import com.elink.esua.epdc.pointcommons.tools.annotation.RecordUserBehavior;
@ -31,7 +30,8 @@ public class ApiWorkIssueController {
/**
*议题数据统计
* 议题数据统计
*
* @param formDto
* @return
*/
@ -42,6 +42,7 @@ public class ApiWorkIssueController {
/**
* 事件列表接口待回应/已驳回
*
* @param formDto
* @return
*/
@ -51,7 +52,8 @@ public class ApiWorkIssueController {
}
/**
*事件详情
* 事件详情
*
* @param id
* @return
*/
@ -61,48 +63,62 @@ public class ApiWorkIssueController {
}
/**
*事件分类
* 事件分类
*
* @return
*/
@GetMapping("event/categoryList")
public Result<List<EventCategoryDTO>> categoryList() {
return workIssueService.categoryList();
}
/**
*事件审核
* 事件审核
*
* @return
*/
@PostMapping("event/review")
public Result review(@RequestBody EpdcEventsReviewFormDTO dto) {
return workIssueService.review(dto);
}
/**
*事件审核 - 通过
* 事件审核 - 通过
*
* @return
*/
@PostMapping("event/reviewPass")
@RecordUserBehavior(behavior = BehaviorEnum.ISSUE_AUDIT_PASS,referenceId = "#{dto.getId}",userId = "#{dto.getUserId}")
@RecordUserBehavior(behavior = BehaviorEnum.ISSUE_AUDIT_PASS, referenceId = "#{dto.getId}", userId = "#{dto.getUserId}")
public Result reviewPass(@RequestBody EpdcEventsReviewFormDTO dto) {
return workIssueService.review(dto);
}
/**
*事件审核 -不通过
* 事件审核 -不通过
*
* @return
*/
@PostMapping("event/reviewNopass")
@RecordUserBehavior(behavior = BehaviorEnum.ISSUE_AUDIT_FAILED,referenceId = "#{dto.getId}",userId = "#{dto.getUserId}")
@RecordUserBehavior(behavior = BehaviorEnum.ISSUE_AUDIT_FAILED, referenceId = "#{dto.getId}", userId = "#{dto.getUserId}")
public Result reviewNopass(@RequestBody EpdcEventsReviewFormDTO dto) {
return workIssueService.review(dto);
}
/**
* 事件审核 - 通过
*
* @return
*/
@PostMapping("event/reviewToItem")
public Result reviewToItem(@RequestBody EpdcEventsReviewFormDTO dto) {
return workIssueService.reviewToItem(dto);
}
/**
* 工作端-议题待处理或者已关闭的最新最热列表
*
* @param formDto
* @return
*/
@ -116,37 +132,37 @@ public class ApiWorkIssueController {
* 工作端-议题详情
*/
@GetMapping("issue/detail/{issueId}")
public Result<WorkIssueDetailResultDTO> issueDetail(@PathVariable("issueId") String issueId){
public Result<WorkIssueDetailResultDTO> issueDetail(@PathVariable("issueId") String issueId) {
return workIssueService.selectOneWorkIssueDetail(issueId);
}
/**
* 工作端-事件评论列表
*
* @param formDTO
* @return
*/
@GetMapping("event/commentList")
public Result<List<WorkEventCommentResultDTO>> commentList(WorkEventCommentListFormDTO formDTO){
public Result<List<WorkEventCommentResultDTO>> commentList(WorkEventCommentListFormDTO formDTO) {
return workIssueService.selectWorkHotOrNewEventComment(formDTO);
}
/**
*
* 事件评论回复列表接口
*/
@GetMapping("event/commentReplyList")
public Result<WorkEventsCommentsDTO> commentReplyList(WorkCommentReplyFormDTO workCommentReplyFormDTO){
public Result<WorkEventsCommentsDTO> commentReplyList(WorkCommentReplyFormDTO workCommentReplyFormDTO) {
return workIssueService.commentReplyList(workCommentReplyFormDTO);
}
/**
*
* 议题处理进度(后台/工作端用)
*/
@GetMapping("issue/processList")
public Result<List<IssueProgressResultDTO>> processList(WorkProcessListFormDTO workProcessListFormDTO){
public Result<List<IssueProgressResultDTO>> processList(WorkProcessListFormDTO workProcessListFormDTO) {
return workIssueService.processList(workProcessListFormDTO);
}
/**
* 议题待处理
*/
@ -160,7 +176,7 @@ public class ApiWorkIssueController {
* 议题待处理 - 回应
*/
@PostMapping("issue/response")
@RecordUserBehavior(behavior = BehaviorEnum.ISSUE_RESPONSE,referenceId = "#{dto.getId}",userId = "#{dto.getUserId}")
@RecordUserBehavior(behavior = BehaviorEnum.ISSUE_RESPONSE, referenceId = "#{dto.getId}", userId = "#{dto.getUserId}")
public Result response(@RequestBody IssueWaitHandleSubmitFormDTO dto) {
ValidatorUtils.validateEntity(dto);
return workIssueService.handleSubmit(dto);
@ -170,7 +186,7 @@ public class ApiWorkIssueController {
* 议题待处理 - 关闭
*/
@PostMapping("issue/close")
@RecordUserBehavior(behavior = BehaviorEnum.ISSUE_CLOSE,referenceId = "#{dto.getId}",userId = "#{dto.getUserId}")
@RecordUserBehavior(behavior = BehaviorEnum.ISSUE_CLOSE, referenceId = "#{dto.getId}", userId = "#{dto.getUserId}")
public Result close(@RequestBody IssueWaitHandleSubmitFormDTO dto) {
ValidatorUtils.validateEntity(dto);
return workIssueService.handleSubmit(dto);
@ -180,12 +196,11 @@ public class ApiWorkIssueController {
* 议题待处理 -- 转项目
*/
@PostMapping("issue/toItem")
@RecordUserBehavior(behavior = BehaviorEnum.ISSUE_TO_PROJECT,referenceId = "#{dto.getId}",userId = "#{dto.getUserId}")
@RecordUserBehavior(behavior = BehaviorEnum.ISSUE_TO_PROJECT, referenceId = "#{dto.getId}", userId = "#{dto.getUserId}")
public Result toItem(@RequestBody IssueWaitHandleSubmitFormDTO dto) {
ValidatorUtils.validateEntity(dto);
return workIssueService.handleSubmit(dto);
}
}

17
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/WorkIssueFeignClient.java

@ -8,7 +8,6 @@ import com.elink.esua.epdc.dto.comment.form.WorkCommentReplyFormDTO;
import com.elink.esua.epdc.dto.comment.result.WorkEventsCommentsDTO;
import com.elink.esua.epdc.dto.events.EpdcEventsDetailDTO;
import com.elink.esua.epdc.dto.events.form.EpdcEventsReviewFormDTO;
import com.elink.esua.epdc.dto.events.result.EventAppDetailResultDTO;
import com.elink.esua.epdc.dto.issue.form.*;
import com.elink.esua.epdc.dto.issue.result.*;
import com.elink.esua.epdc.feign.fallback.WorkIssueFeignClientFallback;
@ -61,7 +60,13 @@ public interface WorkIssueFeignClient {
*/
@PostMapping(value = "events/epdc-app/work/event/review", consumes = MediaType.APPLICATION_JSON_VALUE)
Result review(EpdcEventsReviewFormDTO dto);
/**
* 事件审核 - 通过
* @param dto
* @return
*/
@PostMapping(value = "events/epdc-app/work/event/reviewPass", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<String> reviewPass(EpdcEventsReviewFormDTO dto);
/**
* 工作端-议题待处理或者已关闭的最新最热列表
@ -108,6 +113,14 @@ public interface WorkIssueFeignClient {
@PostMapping(value = "events/epdc-app/work/issue/handleSubmit", consumes = MediaType.APPLICATION_JSON_VALUE)
Result handleSubmit(IssueWaitHandleSubmitFormDTO dto);
/**
*议题处理 -- 转项目
* @param dto
* @return
*/
@PostMapping(value = "events/epdc-app/work/issue/handleSubmitToItem", consumes = MediaType.APPLICATION_JSON_VALUE)
Result handleSubmitToItem(IssueWaitHandleSubmitFormDTO dto);
/**
* 工作端-事件评论回复列表接口
* @param workCommentReplyFormDTO

13
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/WorkIssueFeignClientFallback.java

@ -7,12 +7,9 @@ import com.elink.esua.epdc.dto.category.EventCategoryDTO;
import com.elink.esua.epdc.dto.comment.form.WorkCommentReplyFormDTO;
import com.elink.esua.epdc.dto.comment.result.WorkEventsCommentsDTO;
import com.elink.esua.epdc.dto.events.EpdcEventsDetailDTO;
import com.elink.esua.epdc.dto.events.form.EpdcEventSubmitFormDTO;
import com.elink.esua.epdc.dto.events.form.EpdcEventsReviewFormDTO;
import com.elink.esua.epdc.dto.events.result.EventAppDetailResultDTO;
import com.elink.esua.epdc.dto.issue.form.*;
import com.elink.esua.epdc.dto.issue.result.*;
import com.elink.esua.epdc.feign.IssueFeignClient;
import com.elink.esua.epdc.feign.WorkIssueFeignClient;
import org.springframework.stereotype.Component;
@ -50,6 +47,11 @@ public class WorkIssueFeignClientFallback implements WorkIssueFeignClient {
return ModuleUtils.feignConError(ServiceConstant.EPDC_EVENTS_SERVER, "review", dto);
}
@Override
public Result<String> reviewPass(EpdcEventsReviewFormDTO dto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_EVENTS_SERVER, "reviewPass", dto);
}
@Override
public Result<List<WorkIssueListResultDTO>> selectWorkIssueListOfNewOrHot(WorkIssueListFormDTO formDto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_EVENTS_SERVER, "selectWorkIssueListOfNewOrHot", formDto);
@ -75,6 +77,11 @@ public class WorkIssueFeignClientFallback implements WorkIssueFeignClient {
return ModuleUtils.feignConError(ServiceConstant.EPDC_EVENTS_SERVER, "handleSubmit", dto);
}
@Override
public Result handleSubmitToItem(IssueWaitHandleSubmitFormDTO dto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_EVENTS_SERVER, "handleSubmitToItem", dto);
}
@Override
public Result<WorkEventsCommentsDTO> commentReplyList(WorkCommentReplyFormDTO workCommentReplyFormDTO) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_EVENTS_SERVER, "commentReplyList", workCommentReplyFormDTO);

11
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/WorkIssueService.java

@ -24,10 +24,8 @@ import com.elink.esua.epdc.dto.comment.form.WorkCommentReplyFormDTO;
import com.elink.esua.epdc.dto.comment.result.WorkEventsCommentsDTO;
import com.elink.esua.epdc.dto.events.EpdcEventsDetailDTO;
import com.elink.esua.epdc.dto.events.form.EpdcEventsReviewFormDTO;
import com.elink.esua.epdc.dto.events.result.EventAppDetailResultDTO;
import com.elink.esua.epdc.dto.issue.form.*;
import com.elink.esua.epdc.dto.issue.result.*;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
@ -111,5 +109,12 @@ public interface WorkIssueService {
*/
Result<WorkEventsCommentsDTO> commentReplyList(WorkCommentReplyFormDTO workCommentReplyFormDTO);
/**
* @Description 事件转项目
* @Author songyunpeng
* @Date 2020/7/2
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result
**/
Result reviewToItem(EpdcEventsReviewFormDTO dto);
}

17
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/WorkIssueServiceImpl.java

@ -23,11 +23,11 @@ import com.elink.esua.epdc.dto.comment.form.WorkCommentReplyFormDTO;
import com.elink.esua.epdc.dto.comment.result.WorkEventsCommentsDTO;
import com.elink.esua.epdc.dto.events.EpdcEventsDetailDTO;
import com.elink.esua.epdc.dto.events.form.EpdcEventsReviewFormDTO;
import com.elink.esua.epdc.dto.events.result.EventAppDetailResultDTO;
import com.elink.esua.epdc.dto.issue.form.*;
import com.elink.esua.epdc.dto.issue.result.*;
import com.elink.esua.epdc.feign.WorkIssueFeignClient;
import com.elink.esua.epdc.service.WorkIssueService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -150,4 +150,19 @@ public class WorkIssueServiceImpl implements WorkIssueService {
public Result<WorkEventsCommentsDTO> commentReplyList(WorkCommentReplyFormDTO workCommentReplyFormDTO) {
return workIssueFeignClient.commentReplyList(workCommentReplyFormDTO);
}
@Override
public Result reviewToItem(EpdcEventsReviewFormDTO dto) {
Result<String> stringResult = workIssueFeignClient.reviewPass(dto);
if(!stringResult.success() || StringUtils.isBlank(stringResult.getData())){
return new Result().error("获取议题ID失败");
}
String issueId = stringResult.getData();
IssueWaitHandleSubmitFormDTO issueWaitHandleSubmitFormDTO = new IssueWaitHandleSubmitFormDTO();
issueWaitHandleSubmitFormDTO.setId(issueId);
issueWaitHandleSubmitFormDTO.setAdvice(dto.getAdvice());
issueWaitHandleSubmitFormDTO.setUserId(dto.getUserId());
issueWaitHandleSubmitFormDTO.setState(4);
return workIssueFeignClient.handleSubmitToItem(issueWaitHandleSubmitFormDTO);
}
}

4
esua-epdc/epdc-module/epdc-events/epdc-events-client/src/main/java/com/elink/esua/epdc/constant/EventIssueItemState.java

@ -18,6 +18,10 @@ public interface EventIssueItemState {
* 事件-审核通过
*/
int EVENT_REVIEW_PASS = 4;
/**
* 事件-转项目
*/
int EVENT_REVIEW_TO_ITEM = 6;
/**
* 议题-审核通过

15
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/controller/EpdcAppWorkEventsController.java

@ -1,11 +1,13 @@
package com.elink.esua.epdc.modules.events.controller;
import com.elink.esua.epdc.commons.tools.constant.Constant;
import com.elink.esua.epdc.commons.tools.enums.BehaviorEnum;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.dto.events.EpdcEventsDetailDTO;
import com.elink.esua.epdc.dto.events.form.EpdcEventsReviewFormDTO;
import com.elink.esua.epdc.modules.events.service.EpdcEventsService;
import com.elink.esua.epdc.pointcommons.tools.annotation.RecordUserBehavior;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -37,4 +39,17 @@ public class EpdcAppWorkEventsController {
ValidatorUtils.validateEntity(dto);
return epdcEventsService.eventReview(dto);
}
/**
* 事件通过
* @param dto
* @return
*/
@PostMapping("reviewPass")
@RecordUserBehavior(behavior = BehaviorEnum.ISSUE_AUDIT_PASS,referenceId = "#{dto.getId}",userId = "#{dto.getUserId}")
public Result<String> reviewPass(@RequestBody EpdcEventsReviewFormDTO dto) {
ValidatorUtils.validateEntity(dto);
return epdcEventsService.eventReview(dto);
}
}

2
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/controller/EpdcEventsController.java

@ -128,7 +128,7 @@ public class EpdcEventsController {
*/
@PostMapping("reviewPass")
@RecordUserBehavior(behavior = BehaviorEnum.ISSUE_AUDIT_PASS,referenceId = "#{dto.getId}",userId = "#{dto.getUserId}")
public Result reviewPass(@RequestBody EpdcEventsReviewFormDTO dto) {
public Result<String> reviewPass(@RequestBody EpdcEventsReviewFormDTO dto) {
ValidatorUtils.validateEntity(dto);
return epdcEventsService.eventReview(dto);
}

2
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/EpdcEventsService.java

@ -86,7 +86,7 @@ public interface EpdcEventsService extends BaseService<EpdcEventsEntity> {
* @Author: liuchuang
* @Date: 2019/9/5 9:35
*/
Result eventReview(EpdcEventsReviewFormDTO dto);
Result<String> eventReview(EpdcEventsReviewFormDTO dto);
/**
* 已驳回事件列表

8
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/events/service/impl/EpdcEventsServiceImpl.java

@ -184,7 +184,7 @@ public class EpdcEventsServiceImpl extends BaseServiceImpl<EpdcEventsDao, EpdcEv
@Override
@Transactional(rollbackFor = Exception.class)
public Result eventReview(EpdcEventsReviewFormDTO dto) {
public Result<String> eventReview(EpdcEventsReviewFormDTO dto) {
if(EventIssueItemState.EVENT_REVIEW_PASS == dto.getEventState()
&& (dto.getCategoryId() == null
|| "".equals(dto.getCategoryId()))) {
@ -220,10 +220,12 @@ public class EpdcEventsServiceImpl extends BaseServiceImpl<EpdcEventsDao, EpdcEv
informationFormDTO.setBusinessId(eventsEntity.getId());
// 审核通过
if (EventIssueItemState.EVENT_REVIEW_PASS == dto.getEventState()) {
String issueId = "";
if (EventIssueItemState.EVENT_REVIEW_PASS == dto.getEventState() || EventIssueItemState.EVENT_REVIEW_TO_ITEM == dto.getEventState()) {
// 事件插入议题表
IssueEntity issueEntity = initIssueEntity(selectById(dto.getId()));
issueService.insert(issueEntity);
issueId = issueEntity.getId();
// 插入议题处理表一条审核通过记录
IssueHandleEntity issueHandleEntity = new IssueHandleEntity();
issueHandleEntity.setIssueId(issueEntity.getId());
@ -258,7 +260,7 @@ public class EpdcEventsServiceImpl extends BaseServiceImpl<EpdcEventsDao, EpdcEv
List<String> list = new ArrayList<>();
list.add(eventsEntity.getMobile());
this.issueSmsNotification(dto, list);
return new Result();
return new Result().ok(issueId);
}
/**

18
esua-epdc/epdc-module/epdc-events/epdc-events-server/src/main/java/com/elink/esua/epdc/modules/issue/controller/EpdcAppWorkIssueController.java

@ -1,6 +1,7 @@
package com.elink.esua.epdc.modules.issue.controller;
import com.elink.esua.epdc.commons.tools.constant.Constant;
import com.elink.esua.epdc.commons.tools.enums.BehaviorEnum;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils;
import com.elink.esua.epdc.dto.category.EventCategoryDTO;
@ -8,6 +9,7 @@ import com.elink.esua.epdc.dto.issue.form.*;
import com.elink.esua.epdc.dto.issue.result.*;
import com.elink.esua.epdc.modules.category.service.EventCategoryService;
import com.elink.esua.epdc.modules.issue.service.IssueService;
import com.elink.esua.epdc.pointcommons.tools.annotation.RecordUserBehavior;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -106,4 +108,20 @@ public class EpdcAppWorkIssueController {
return issueService.saveIssueHandleResult(dto);
}
/**
* 议题待处理提交
* @Params: [dto]
* @Return: com.elink.esua.epdc.commons.tools.utils.Result
* @Author: liuchuang
* @Date: 2019/9/6 11:26
*/
@PostMapping("handleSubmitToItem")
@RecordUserBehavior(behavior = BehaviorEnum.ISSUE_TO_PROJECT,referenceId = "#{dto.getId}",userId = "#{dto.getUserId}")
public Result handleSubmitToItem(@RequestBody IssueWaitHandleSubmitFormDTO dto) {
ValidatorUtils.validateEntity(dto);
return issueService.saveIssueHandleResult(dto);
}
}

Loading…
Cancel
Save