Browse Source

更新bug 和 接口

master
PoffyZhang 1 year ago
parent
commit
528794092b
7 changed files with 41 additions and 32 deletions
  1. +7
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/filemanage/manage/ProjectFileManage.java
  2. +5
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java
  3. +1
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DefaultDeclaredProjectManage.java
  4. +0
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java
  5. +16
    -29
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/controller/TodoCenterController.java
  6. +11
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java
  7. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/req/ToBeProcessedReq.java

+ 7
- 0
pmapi/src/main/java/com/ningdatech/pmapi/filemanage/manage/ProjectFileManage.java View File

@@ -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;
}



+ 5
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java View File

@@ -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));


+ 1
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DefaultDeclaredProjectManage.java View File

@@ -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()));
}


+ 0
- 2
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/manage/ProjectLibManage.java View File

@@ -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;


+ 16
- 29
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/controller/TodoCenterController.java View File

@@ -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);
}



+ 11
- 0
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/manage/TodoCenterManage.java View File

@@ -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


+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/todocenter/model/req/ToBeProcessedReq.java View File

@@ -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")


Loading…
Cancel
Save