|
|
@ -635,4 +635,47 @@ public class ProjectServiceImpl extends BaseServiceImpl<ProjectDao, ProjectEntit |
|
|
|
return baseDao.selectClosedProjectList(formDTO); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void response(ProjectResponseFormDTO formDTO) { |
|
|
|
//公开回复内容审核
|
|
|
|
if (com.alibaba.nacos.client.utils.StringUtils.isNotBlank(formDTO.getPublicReply())) { |
|
|
|
TextScanParamDTO textScanParamDTO = new TextScanParamDTO(); |
|
|
|
TextTaskDTO taskDTO = new TextTaskDTO(); |
|
|
|
taskDTO.setDataId(UUID.randomUUID().toString().replace("-", "")); |
|
|
|
taskDTO.setContent(formDTO.getPublicReply()); |
|
|
|
textScanParamDTO.getTasks().add(taskDTO); |
|
|
|
Result<SyncScanResult> textSyncScanResult = ScanContentUtils.textSyncScan(scanApiUrl.concat(textSyncScanMethod), textScanParamDTO); |
|
|
|
if (!textSyncScanResult.success()) { |
|
|
|
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode()); |
|
|
|
} else { |
|
|
|
if (!textSyncScanResult.getData().isAllPass()) { |
|
|
|
throw new RenException(EpmetErrorCode.TEXT_SCAN_FAILED.getCode()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//获取项目相关信息
|
|
|
|
ProjectEntity projectEntity = baseDao.selectById(formDTO.getProjectId()); |
|
|
|
if (ProjectConstant.CLOSED.equals(projectEntity.getStatus())) { |
|
|
|
throw new RenException(EpmetErrorCode.PROJECT_IS_CLOSED.getCode()); |
|
|
|
} |
|
|
|
|
|
|
|
//更新项目关联表
|
|
|
|
ProjectStaffEntity projectStaffEntity = new ProjectStaffEntity(); |
|
|
|
projectStaffEntity.setId(formDTO.getProjectStaffId()); |
|
|
|
projectStaffEntity.setIsHandle(ProjectConstant.HANDLE); |
|
|
|
projectStaffService.updateById(projectStaffEntity); |
|
|
|
|
|
|
|
//处理响应记录加入项目进展表
|
|
|
|
ProjectProcessEntity projectProcessEntity = new ProjectProcessEntity(); |
|
|
|
projectProcessEntity.setProjectId(formDTO.getProjectId()); |
|
|
|
projectProcessEntity.setDepartmentName(formDTO.getDepartmentName()); |
|
|
|
projectProcessEntity.setOperation(ProjectConstant.OPERATION_RESPONSES); |
|
|
|
projectProcessEntity.setOperationName(ProjectConstant.OPERATION_RESPONSES_NAME); |
|
|
|
projectProcessEntity.setPublicReply(formDTO.getPublicReply()); |
|
|
|
projectProcessEntity.setInternalRemark(formDTO.getInternalRemark()); |
|
|
|
projectProcessEntity.setStaffId(formDTO.getUserId()); |
|
|
|
projectProcessService.insert(projectProcessEntity); |
|
|
|
} |
|
|
|
|
|
|
|
} |