Browse Source

modify:

1. 待办和已办增加流程类型;
master
WendyYang 3 weeks ago
parent
commit
ac7d8c61ce
9 changed files with 42 additions and 15 deletions
  1. +1
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/common/enumeration/ProjectProcessType.java
  2. +2
    -3
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/PurchaseManage.java
  3. +0
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectManageTodoCountManage.java
  4. +1
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/InstTypeEnum.java
  5. +3
    -3
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/status/TenderMainStatus.java
  6. +25
    -4
      hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/TodoCenterManage.java
  7. +5
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/vo/ProcessProgressDetailVO.java
  8. +3
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/vo/ResToBeProcessedVO.java
  9. +2
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/workbench/manage/WorkbenchManage.java

+ 1
- 1
hz-pm-api/src/main/java/com/hz/pm/api/common/enumeration/ProjectProcessType.java View File

@@ -33,7 +33,7 @@ public enum ProjectProcessType {
PROJECT_REVIEW(14, "项目复核审批流程"),
PROJECT_STOPPED(15, "项目终止审批流程"),
PROJECT_CHANGE(16, "项目变更审批流程"),
PURCHASE_NOTICE(17, "采购公告审批流程");
PURCHASE_NOTICE(17, "增加标项复核流程");

private final Integer code;
private final String desc;


+ 2
- 3
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/PurchaseManage.java View File

@@ -501,11 +501,11 @@ public class PurchaseManage {
stagingManage.delete(StagingType.PURCHASE_NOTICE, project.getProjectCode());
}

private static List<Purchase> convertPurchase(List<PurchaseNoticeTenderDTO> reqTenders,
private static List<Purchase> convertPurchase(List<PurchaseNoticeTenderDTO> purchases,
Long projectId,
UserInfoDetails user,
TenderMainStatus status) {
List<Purchase> purchases = reqTenders.stream().map(w -> {
return purchases.stream().map(w -> {
Purchase purchase = new Purchase();
purchase.setPurchaseMethod(w.getPurchaseMethod());
purchase.setBidAddress(w.getBidAddress());
@@ -532,7 +532,6 @@ public class PurchaseManage {
purchase.setStatus(status.getCode());
return purchase;
}).collect(Collectors.toList());
return purchases;
}

private void saveSystemInfoBidRelation(SubmitPurchaseNoticeReq req, List<Purchase> purchases) {


+ 0
- 1
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/manage/ProjectManageTodoCountManage.java View File

@@ -90,7 +90,6 @@ public class ProjectManageTodoCountManage {
FinalAcceptProgressStatisticsVO finalAcceptStat = finalAcceptanceManage.finalAcceptProgressStatistics(new ProjectListReq());
todoCount.setFinalAccept(sum(finalAcceptStat, FinalAcceptProgressStatisticsVO::getTodoCount,
FinalAcceptProgressStatisticsVO::getFailedCount));
log.error("登录用户为:{}", LoginUserUtil.getRealName());
}, ThreadPoolUtil.REQUEST));
CompletableFuture.allOf(futures.toArray(new CompletableFuture[0])).join();
return todoCount;


+ 1
- 2
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/InstTypeEnum.java View File

@@ -7,7 +7,6 @@ import lombok.NoArgsConstructor;
import org.apache.commons.lang3.StringUtils;

import java.util.Arrays;
import java.util.Objects;
import java.util.Optional;

/**
@@ -35,7 +34,7 @@ public enum InstTypeEnum {
PROJECT_REVIEW(14, "项目复核审批流程"),
PROJECT_STOPPED(15, "项目终止审批流程"),
PROJECT_CHANGE(16, "项目变更审批流程"),
PURCHASE_NOTICE(17, "采购公告审批流程");
PURCHASE_NOTICE(17, "增加标项复核流程");

private Integer code;
private String desc;


+ 3
- 3
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/enumeration/status/TenderMainStatus.java View File

@@ -24,9 +24,9 @@ import java.util.stream.Stream;
@AllArgsConstructor
public enum TenderMainStatus implements ITenderStatus {

TO_BE_SUBMIT_PURCHASE_NOTICE(ProjectStatus.ON_PURCHASING, 100, "待发布采购公告"),
ON_PURCHASE_NOTICE_APPLY(ProjectStatus.ON_PURCHASING, 107, "采购公告审核中"),
PURCHASE_NOTICE_FAILED(ProjectStatus.ON_PURCHASING, 108, "采购公告审核不通过"),
TO_BE_SUBMIT_PURCHASE_NOTICE(ProjectStatus.ON_PURCHASING, 100, "待增加标项"),
ON_PURCHASE_NOTICE_APPLY(ProjectStatus.ON_PURCHASING, 107, "增加标项复核中"),
PURCHASE_NOTICE_FAILED(ProjectStatus.ON_PURCHASING, 108, "增加标项复核不通过"),
//
TO_BE_SUBMIT_PURCHASE_CONSTRUCTION_INFO(ProjectStatus.ON_PURCHASING, 101, "待填写采购&合同信息"),
PURCHASE_FINISHED(ProjectStatus.ON_PURCHASING, 106, "采购完成"),


+ 25
- 4
hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/TodoCenterManage.java View File

@@ -41,7 +41,6 @@ import com.hz.pm.api.projectlib.service.IProjectInstService;
import com.hz.pm.api.projectlib.service.IProjectService;
import com.hz.pm.api.signature.entity.CompanySignature;
import com.hz.pm.api.signature.service.ICompanySignatureService;
import com.hz.pm.api.sys.service.IRegionService;
import com.hz.pm.api.todocenter.constant.TodoCenterConst;
import com.hz.pm.api.todocenter.constant.TodoCenterConst.Declared;
import com.hz.pm.api.todocenter.constant.TodoCenterConst.SealTemplate;
@@ -74,6 +73,7 @@ import com.ningdatech.basic.util.StrPool;
import com.ningdatech.file.entity.File;
import com.ningdatech.file.entity.vo.result.FileResultVO;
import com.ningdatech.file.service.FileService;
import com.wflow.bean.entity.WflowModelHistorys;
import com.wflow.contants.HisProInsEndActId;
import com.wflow.contants.ProcessConstant;
import com.wflow.exception.BusinessException;
@@ -86,6 +86,7 @@ import com.wflow.workflow.bean.vo.ProcessInstanceVo;
import com.wflow.workflow.bean.vo.ProcessProgressVo;
import com.wflow.workflow.bean.vo.ProcessTaskVo;
import com.wflow.workflow.service.ProcessInstanceService;
import com.wflow.workflow.service.ProcessModelHistorysService;
import com.wflow.workflow.service.ProcessTaskService;
import com.wflow.workflow.utils.ProcessTaskUtils;
import lombok.RequiredArgsConstructor;
@@ -147,11 +148,11 @@ public class TodoCenterManage {
private final WithDrawHandle withDrawHandle;
private final PassHandle passHandle;
private final RepositoryService repositoryService;
private final IRegionService regionService;
private final ITodoService todoService;
private final IPurchaseInstService purchaseInstService;
private final IXinchuangService xinchuangService;
private final IXinchuangInstService xinchuangInstService;
private final ProcessModelHistorysService processModelHistorysService;

/**
* 待办中心待我处理项目列表查询
@@ -229,7 +230,10 @@ public class TodoCenterManage {
.collect(Collectors.toMap(ProcessTaskVo::getNodeId, v -> v));
List<String> instCodes = CollUtils.fieldList(userTodoList, ProcessTaskVo::getInstanceId);
Map<String, Long> purchaseInstMap = listInstCodeBidIdMap(instCodes);

List<String> processDefIds = CollUtils.fieldList(userTodoList, ProcessTaskVo::getProcessDefId);
List<WflowModelHistorys> wflowModels = processModelHistorysService.list(Wrappers.lambdaQuery(WflowModelHistorys.class)
.in(WflowModelHistorys::getProcessDefId, processDefIds));
Map<String, WflowModelHistorys> modelsMap = CollUtils.listToMap(wflowModels, WflowModelHistorys::getProcessDefId);
List<ResToBeProcessedVO> resVos = userTodoList.stream().map(d -> {
Project projectInfo = projectInfoMap.get(d.getInstanceId());
ResToBeProcessedVO res = new ResToBeProcessedVO();
@@ -243,6 +247,8 @@ public class TodoCenterManage {
res.setProcessStatusName(taskVo.getStatus());
res.setProcessLaunchTime(d.getTaskCreateTime());
res.setProcessDefName(d.getProcessDefName());
WflowModelHistorys models = modelsMap.get(d.getProcessDefId());
res.setProcessDefType(models == null ? null : models.getProcessType());
res.setTaskId(d.getTaskId());
res.setNodeName(findSubProcessName(d));
res.setPretrialFileId(projectInfo.getPretrialFileId());
@@ -769,7 +775,6 @@ public class TodoCenterManage {
if (Objects.isNull(progressInstanceDetail)) {
return null;
}

List<ProgressNode> progressInfo = progressInstanceDetail.getProgressInfo();
Boolean isHighLine = Boolean.FALSE;
if (CollUtil.isNotEmpty(progressInfo)) {
@@ -785,6 +790,15 @@ public class TodoCenterManage {
} else {
res.setProjectId(request.getProjectId());
}
String processDefId = progressInstanceDetail.getProcessDefId();
if (StrUtil.isNotBlank(processDefId)) {
WflowModelHistorys wflowModels = processModelHistorysService.getOne(Wrappers.lambdaQuery(WflowModelHistorys.class)
.eq(WflowModelHistorys::getProcessDefId, processDefId)
.last(BizConst.LIMIT_1));
if (Objects.nonNull(wflowModels)) {
res.setProcessDefType(wflowModels.getProcessType());
}
}
res.setProcessProgressVo(progressInstanceDetail);
res.setStatus(progressInstanceDetail.getStatus());
res.setCanWithdraw(withDrawHandle.checkCanWithdraw(instanceId, progressInstanceDetail, request.getTaskId()));
@@ -932,7 +946,13 @@ public class TodoCenterManage {
List<ProcessTaskVo> userIdoList = CollUtils.page(iDoList, pageNumber, pageSize);
List<String> currPageInstCodes = CollUtils.fieldList(userIdoList, ProcessTaskVo::getInstanceId);
Map<String, Long> purchaseInstMap = listInstCodeBidIdMap(currPageInstCodes);

List<String> processDefIds = CollUtils.fieldList(userIdoList, ProcessTaskVo::getProcessDefId);
List<WflowModelHistorys> wflowModels = processModelHistorysService.list(Wrappers.lambdaQuery(WflowModelHistorys.class)
.in(WflowModelHistorys::getProcessDefId, processDefIds));
Map<String, WflowModelHistorys> modelsMap = CollUtils.listToMap(wflowModels, WflowModelHistorys::getProcessDefId);
List<ResToBeProcessedVO> resVos = userIdoList.stream().map(d -> {
WflowModelHistorys models = modelsMap.get(d.getProcessDefId());
ResToBeProcessedVO res = new ResToBeProcessedVO();
Project projectInfo = projectInfoMap.get(d.getInstanceId());
BeanUtils.copyProperties(projectInfo, res);
@@ -943,6 +963,7 @@ public class TodoCenterManage {
res.setProcessStatusName(d.getStatus());
res.setProcessLaunchTime(d.getCreateTime());
res.setProcessHandleTime(d.getTaskEndTime());
res.setProcessDefType(models == null ? null : models.getProcessType());
res.setTaskId(d.getTaskId());
res.setNodeName(findSubProcessName(d));
res.setBidId(purchaseInstMap.get(d.getInstanceId()));


+ 5
- 0
hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/vo/ProcessProgressDetailVO.java View File

@@ -18,6 +18,11 @@ import lombok.NoArgsConstructor;
public class ProcessProgressDetailVO {

/**
* 流程定义类型
*/
private Integer processDefType;

/**
* 流程处理详情
*/
private ProcessProgressVo processProgressVo;


+ 3
- 0
hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/vo/ResToBeProcessedVO.java View File

@@ -74,6 +74,9 @@ public class ResToBeProcessedVO implements Serializable {
@ApiModelProperty("流程定义名称")
private String processDefName;

@ApiModelProperty("流程定义类型")
private Integer processDefType;

@ApiModelProperty("项目预审申请单文件ID")
private Long pretrialFileId;



+ 2
- 1
hz-pm-api/src/main/java/com/hz/pm/api/workbench/manage/WorkbenchManage.java View File

@@ -716,7 +716,8 @@ public class WorkbenchManage {
if (query == null) {
return null;
}
query.ne(Project::getStatus, ProjectStatus.CHANGE_APPLY_PASSED.getCode())
query.notIn(Project::getStatus, ProjectStatus.CHANGE_APPLY_PASSED.getCode()
, ProjectStatus.STOPPED_PASSED.getCode())
.select(Project::getProjectCode, Project::getProjectName,
Project::getBuildOrgCode, Project::getBuildOrgName);
projectQueryByProjectStatusChange(query, ProjectStateChangeEvent.PROJECT_APPLICATION_SUBMIT);


Loading…
Cancel
Save