Browse Source

议题处理进展调整;事件处理进展未完待续

master
yinzuomei 3 years ago
parent
commit
5b2ffda7e6
  1. 8
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java
  2. 11
      epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java
  3. 1
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueManageController.java
  4. 8
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProcessServiceImpl.java
  5. 27
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java

8
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/GovIssueOpenFeignClient.java

@ -411,4 +411,12 @@ public interface GovIssueOpenFeignClient {
*/ */
@PostMapping("/gov/issue/issue/publishIssue") @PostMapping("/gov/issue/issue/publishIssue")
Result<IssueDTO> publishIssue(@RequestBody PublishIssueFormDTO issueFormDTO); Result<IssueDTO> publishIssue(@RequestBody PublishIssueFormDTO issueFormDTO);
/**
* 议题处理进展这个接口小程序也在用服务之间也在用
* @param issueId
* @return
*/
@PostMapping("/gov/issue/manage/progress")
Result<List<ProcessListResultDTO>> queryIssueProcess(@RequestBody IssueIdFormDTO issueId);
} }

11
epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/feign/fallback/GovIssueOpenFeignClientFallBack.java

@ -353,4 +353,15 @@ public class GovIssueOpenFeignClientFallBack implements GovIssueOpenFeignClient
public Result<IssueDTO> publishIssue(PublishIssueFormDTO issueFormDTO) { public Result<IssueDTO> publishIssue(PublishIssueFormDTO issueFormDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "publishIssue", issueFormDTO); return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "publishIssue", issueFormDTO);
} }
/**
* 议题处理进展这个接口小程序也在用服务之间也在用
*
* @param formDTO
* @return
*/
@Override
public Result<List<ProcessListResultDTO>> queryIssueProcess(IssueIdFormDTO formDTO) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ISSUE_SERVER, "processList", formDTO);
}
} }

1
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/controller/IssueManageController.java

@ -201,6 +201,7 @@ public class IssueManageController {
@PostMapping("progress") @PostMapping("progress")
@RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL) @RequirePermission(requirePermission = RequirePermissionEnum.WORK_GRASSROOTS_ISSUE_DETAIL)
public Result<List<ProcessListResultDTO>> processList(@RequestBody IssueIdFormDTO issueId){ public Result<List<ProcessListResultDTO>> processList(@RequestBody IssueIdFormDTO issueId){
ValidatorUtils.validateEntity(issueId);
return new Result<List<ProcessListResultDTO>>().ok(issueProcessService.processList(issueId)); return new Result<List<ProcessListResultDTO>>().ok(issueProcessService.processList(issueId));
} }

8
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueProcessServiceImpl.java

@ -155,17 +155,15 @@ public class IssueProcessServiceImpl extends BaseServiceImpl<IssueProcessDao, Is
throw new RenException(IssueConstant.PROJECT_PROCESS_LIST_FAILURE); throw new RenException(IssueConstant.PROJECT_PROCESS_LIST_FAILURE);
} }
if (!CollectionUtils.isEmpty(resultDTO.getData())){ if (!CollectionUtils.isEmpty(resultDTO.getData())){
listResult = resultDTO.getData(); listResult.addAll(resultDTO.getData());
}
}
} }
//转议题信息 //转议题信息
ProcessListResultDTO issueProcessResultDTO = issueProcessDao.issueBeginInfo(issueId); ProcessListResultDTO issueProcessResultDTO = issueProcessDao.issueBeginInfo(issueId);
if (null != issueProcessResultDTO) { if (null != issueProcessResultDTO) {
listResult.add(issueProcessResultDTO); listResult.add(issueProcessResultDTO);
} }
}
}else {
return new ArrayList<>();
}
return listResult; return listResult;
} }

27
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/IcEventServiceImpl.java

@ -1202,29 +1202,38 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit
//1.查询事件基础信息 //1.查询事件基础信息
IcEventEntity entity = baseDao.selectById(formDTO.getIcEventId()); IcEventEntity entity = baseDao.selectById(formDTO.getIcEventId());
if (null == entity) { if (null == entity) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "事件不存在"); throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "事件不存在","事件不存在");
} }
// operationType 0:已回复 1:已转项目 2:已转需求3:转议题
//2.查询事件回复信息
LinkedList<IcEventProcessListResultDTO> event = icEventReplyService.getByEventId(formDTO.getIcEventId());
//3.判断查询事件项目进展或需求进展信息 //3.判断查询事件项目进展或需求进展信息
//项目进展
if ("1".equals(entity.getOperationType())) { if ("1".equals(entity.getOperationType())) {
// 项目进展
ProcessListV2FormDTO processListV2FormDTO = new ProcessListV2FormDTO(); ProcessListV2FormDTO processListV2FormDTO = new ProcessListV2FormDTO();
processListV2FormDTO.setProjectId(entity.getOperationId()); processListV2FormDTO.setProjectId(entity.getOperationId());
List<ProcessListV2ResultDTO> project = projectTraceService.processListV2(processListV2FormDTO); List<ProcessListV2ResultDTO> project = projectTraceService.processListV2(processListV2FormDTO);
List<IcEventProcessListResultDTO> projectList = ConvertUtils.sourceToTarget(project, IcEventProcessListResultDTO.class); List<IcEventProcessListResultDTO> projectList = ConvertUtils.sourceToTarget(project, IcEventProcessListResultDTO.class);
projectList.forEach(p -> p.setType("project")); projectList.forEach(p -> p.setType("project"));
resultList.addAll(projectList); resultList.addAll(projectList);
} } else if ("2".equals(entity.getOperationType())) {
// 需求进展 // 需求进展
if ("2".equals(entity.getOperationType())) {
LinkedList<IcEventProcessListResultDTO> demand = icEventOperationLogService.getByEventId(formDTO.getIcEventId()); LinkedList<IcEventProcessListResultDTO> demand = icEventOperationLogService.getByEventId(formDTO.getIcEventId());
resultList.addAll(demand); resultList.addAll(demand);
} else if ("3".equals(entity.getOperationType())) {
// 议题处理进展
IssueIdFormDTO issueIdFormDTO = new IssueIdFormDTO();
issueIdFormDTO.setIssueId(entity.getOperationId());
Result<List<ProcessListResultDTO>> issueProcessRes = govIssueOpenFeignClient.queryIssueProcess(issueIdFormDTO);
if(!issueProcessRes.success()||CollectionUtils.isEmpty(issueProcessRes.getData())){
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "事件已转议题,议题处理进展查询异常", "事件已转议题,议题处理进展查询异常");
} }
resultList.addAll(event); // todo
}
//最后拼上回复的
//2.查询事件回复信息
LinkedList<IcEventProcessListResultDTO> event = icEventReplyService.getByEventId(formDTO.getIcEventId());
resultList.addAll(event);
return resultList; return resultList;
} }

Loading…
Cancel
Save