@@ -6,7 +6,9 @@ import com.ningdatech.basic.model.PageVo; | |||
import com.ningdatech.pmapi.filemanage.model.param.ProjectFileListParam; | |||
import com.ningdatech.pmapi.filemanage.model.vo.ProjectFileListVO; | |||
import com.ningdatech.pmapi.filemanage.model.vo.ProjectFileVO; | |||
import com.ningdatech.pmapi.projectlib.manage.ProjectLibManage; | |||
import com.ningdatech.pmapi.projectlib.model.entity.Project; | |||
import com.ningdatech.pmapi.projectlib.model.vo.ProjectDetailVO; | |||
import com.ningdatech.pmapi.projectlib.service.IProjectService; | |||
import lombok.AllArgsConstructor; | |||
import lombok.extern.slf4j.Slf4j; | |||
@@ -29,6 +31,8 @@ public class ProjectFileManage { | |||
private final IProjectService projectService; | |||
private final ProjectLibManage projectLibManage; | |||
public PageVo<ProjectFileListVO> list(ProjectFileListParam param) { | |||
Page<Project> page = param.page(); | |||
projectService.page(page,Wrappers.lambdaQuery(Project.class) | |||
@@ -52,6 +56,9 @@ public class ProjectFileManage { | |||
} | |||
public ProjectFileVO file(Long projectId) { | |||
ProjectDetailVO projectDetailVo = projectLibManage.getProjectDetail(projectId); | |||
return null; | |||
} | |||
@@ -316,6 +316,11 @@ public class DeclaredProjectManage { | |||
} | |||
if (Objects.isNull(draft.getId())) { | |||
draft.setCreateOn(LocalDateTime.now()); | |||
}else{ | |||
ProjectDraft old = projectDraftService.getById(draft.getId()); | |||
if(Objects.isNull(old)){ | |||
draft.setCreateOn(LocalDateTime.now()); | |||
} | |||
} | |||
draft.setUpdateOn(LocalDateTime.now()); | |||
draft.setUserId(String.valueOf(userId)); | |||
@@ -91,6 +91,7 @@ public class DefaultDeclaredProjectManage { | |||
public void checkDuplication(ProjectDTO project){ | |||
VUtils.isTrue(projectService.count(Wrappers.lambdaQuery(Project.class) | |||
.eq(Project::getProjectName,project.getProjectName()) | |||
.eq(Project::getNewest,Boolean.TRUE) | |||
.ne(Objects.nonNull(project.getProjectCode()),Project::getProjectCode,project.getProjectCode())) > 0) | |||
.throwMessage(String.format("修改失败 此项目名 【%s】 已存在!",project.getProjectName())); | |||
} | |||
@@ -40,7 +40,6 @@ import com.ningdatech.pmapi.projectlib.model.vo.ProjectDetailVO; | |||
import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO; | |||
import com.ningdatech.pmapi.projectlib.service.*; | |||
import com.ningdatech.pmapi.user.security.auth.model.UserFullInfoDTO; | |||
import com.ningdatech.pmapi.user.util.LoginUserUtil; | |||
import com.wflow.exception.BusinessException; | |||
import com.wflow.workflow.bean.vo.ProcessDetailVO; | |||
import lombok.RequiredArgsConstructor; | |||
@@ -73,7 +72,6 @@ public class ProjectLibManage { | |||
private final ProcessExecuteChainHandle processExecuteHandle; | |||
private final RegionCacheHelper regionCacheHelper; | |||
private final FileService fileService; | |||
private final UserInfoHelper userInfoHelper; | |||
private final IProjectApplicationService projectApplicationService; | |||
private final GenerateProjectCodeUtil generateProjectCodeUtil; | |||
private final IProjectInstService projectInstService; | |||
@@ -52,10 +52,8 @@ public class TodoCenterController { | |||
* @param param | |||
* @return | |||
*/ | |||
@GetMapping("/todo-list/{isTemporaryAugment}") | |||
public PageVo<ResToBeProcessedVO> todoList(@Valid @ModelAttribute ToBeProcessedReq param, | |||
@PathVariable Integer isTemporaryAugment){ | |||
param.setIsTemporaryAugment(isTemporaryAugment); | |||
@GetMapping("/todo-list") | |||
public PageVo<ResToBeProcessedVO> todoList(@Valid @ModelAttribute ToBeProcessedReq param){ | |||
return todoCenterManage.todoProjectList(param); | |||
} | |||
@@ -66,10 +64,9 @@ public class TodoCenterController { | |||
* @param response | |||
* @return void | |||
*/ | |||
@PostMapping("/todo-list/export/{isTemporaryAugment}") | |||
@PostMapping("/todo-list/export") | |||
public void exportPendingProjectList(@Valid @RequestBody ToBeProcessedExportReq param, | |||
HttpServletResponse response,@PathVariable Integer isTemporaryAugment){ | |||
param.setIsTemporaryAugment(isTemporaryAugment); | |||
HttpServletResponse response){ | |||
todoCenterManage.exportTodoList(response,param); | |||
} | |||
@@ -99,10 +96,8 @@ public class TodoCenterController { | |||
* @param param | |||
* @return | |||
*/ | |||
@GetMapping("/ido-list/{isTemporaryAugment}") | |||
public PageVo<ResToBeProcessedVO> idoList(@ModelAttribute ToBeProcessedReq param, | |||
@PathVariable Integer isTemporaryAugment){ | |||
param.setIsTemporaryAugment(isTemporaryAugment); | |||
@GetMapping("/ido-list") | |||
public PageVo<ResToBeProcessedVO> idoList(@ModelAttribute ToBeProcessedReq param){ | |||
return todoCenterManage.idoList(param); | |||
} | |||
/** | |||
@@ -112,10 +107,9 @@ public class TodoCenterController { | |||
* @param response | |||
* @return void | |||
*/ | |||
@PostMapping("/ido-list/export/{isTemporaryAugment}") | |||
@PostMapping("/ido-list/export") | |||
public void exportHandledProjectList(@RequestBody ToBeProcessedExportReq param, | |||
HttpServletResponse response,@PathVariable Integer isTemporaryAugment){ | |||
param.setIsTemporaryAugment(isTemporaryAugment); | |||
HttpServletResponse response){ | |||
todoCenterManage.idoExport(response,param); | |||
} | |||
@@ -124,10 +118,8 @@ public class TodoCenterController { | |||
* @param param | |||
* @return | |||
*/ | |||
@GetMapping("/my-submitted-list/{isTemporaryAugment}") | |||
public PageVo<ResToBeProcessedVO> mySubmittedList(@ModelAttribute ToBeProcessedReq param, | |||
@PathVariable Integer isTemporaryAugment){ | |||
param.setIsTemporaryAugment(isTemporaryAugment); | |||
@GetMapping("/my-submitted-list") | |||
public PageVo<ResToBeProcessedVO> mySubmittedList(@ModelAttribute ToBeProcessedReq param){ | |||
return todoCenterManage.mySubmittedList(param); | |||
} | |||
@@ -138,10 +130,9 @@ public class TodoCenterController { | |||
* @param response | |||
* @return void | |||
*/ | |||
@PostMapping("/my-submitted-list/export/{isTemporaryAugment}") | |||
@PostMapping("/my-submitted-list/export") | |||
public void exportMySubmittedList(@RequestBody ToBeProcessedExportReq param, | |||
HttpServletResponse response,@PathVariable Integer isTemporaryAugment){ | |||
param.setIsTemporaryAugment(isTemporaryAugment); | |||
HttpServletResponse response){ | |||
todoCenterManage.exportMySubmittedList(response,param); | |||
} | |||
@@ -150,10 +141,8 @@ public class TodoCenterController { | |||
* @param param | |||
* @return | |||
*/ | |||
@GetMapping("/ccme-list/{isTemporaryAugment}") | |||
public PageVo<ResToBeProcessedVO> ccmeList(@Valid @ModelAttribute ToBeProcessedReq param, | |||
@PathVariable Integer isTemporaryAugment){ | |||
param.setIsTemporaryAugment(isTemporaryAugment); | |||
@GetMapping("/ccme-list") | |||
public PageVo<ResToBeProcessedVO> ccmeList(@Valid @ModelAttribute ToBeProcessedReq param){ | |||
return todoCenterManage.ccmeList(param); | |||
} | |||
@@ -164,10 +153,8 @@ public class TodoCenterController { | |||
* @param response | |||
* @return void | |||
*/ | |||
@PostMapping("/ccme-list/export/{isTemporaryAugment}") | |||
public void exportCcMeProjectList(@Valid @RequestBody ToBeProcessedExportReq param, HttpServletResponse response, | |||
@PathVariable Integer isTemporaryAugment){ | |||
param.setIsTemporaryAugment(isTemporaryAugment); | |||
@PostMapping("/ccme-list/export") | |||
public void exportCcMeProjectList(@Valid @RequestBody ToBeProcessedExportReq param, HttpServletResponse response){ | |||
todoCenterManage.exportCcMeProjectList(response,param); | |||
} | |||
@@ -15,6 +15,8 @@ import com.ningdatech.pmapi.todocenter.constant.TodoCenterContant; | |||
import com.ningdatech.pmapi.todocenter.handle.PassHandle; | |||
import com.ningdatech.pmapi.todocenter.handle.WithDrawHandle; | |||
import com.ningdatech.pmapi.todocenter.model.vo.TodoNumVO; | |||
import com.wflow.contants.HisProInsEndActId; | |||
import com.wflow.workflow.enums.ProcessStatusEnum; | |||
import com.wflow.workflow.utils.ProcessTaskUtils; | |||
import org.apache.commons.io.FileUtils; | |||
import org.apache.commons.lang3.StringUtils; | |||
@@ -353,6 +355,9 @@ public class TodoCenterManage { | |||
.processInstanceId(processInstanceId) | |||
.singleResult(); | |||
//提前判断下 是不是 已经被退回了 | |||
checkIsBack(instance); | |||
//进入处理逻辑 | |||
switch (param.getAction()) { | |||
// 通过 | |||
@@ -435,6 +440,12 @@ public class TodoCenterManage { | |||
return "操作成功"; | |||
} | |||
private void checkIsBack(HistoricProcessInstance instance) { | |||
VUtils.isTrue(Objects.nonNull(instance.getBusinessStatus()) && | |||
HisProInsEndActId.BACK.equals(instance.getBusinessStatus())) | |||
.throwMessage("该审核流程已被退回 暂时无法操作!"); | |||
} | |||
/** | |||
* 调用IRS接口,获取盖章后的pdf文件,上传到OSS,并保存文件ID到项目库中 | |||
* @param req | |||
@@ -40,7 +40,7 @@ public class ToBeProcessedReq extends PagePo implements Serializable { | |||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") | |||
private LocalDateTime createOnMax; | |||
@ApiModelProperty(value = "是否增补项目",allowableValues = "0,1") | |||
@ApiModelProperty(value = "是否增补项目") | |||
private Integer isTemporaryAugment; | |||
@ApiModelProperty("流程配置ID") | |||