Browse Source

审批处理

tags/24080901
WendyYang 8 months ago
parent
commit
7d3dcf09bb
7 changed files with 34 additions and 14 deletions
  1. +0
    -6
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/controller/ConstructionController.java
  2. +2
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ConstructionManage.java
  3. +9
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/service/IPurchaseInstService.java
  4. +3
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/IProjectService.java
  5. +1
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/HandlerManage.java
  6. +14
    -6
      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/ResToBeProcessedVO.java

+ 0
- 6
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/controller/ConstructionController.java View File

@@ -83,12 +83,6 @@ public class ConstructionController {
return constructionManage.preProjectList(req); return constructionManage.preProjectList(req);
} }


@ApiOperation(value = "信创审查项目列表")
@GetMapping("/xcfhx/project-list")
public PageVo<ProjectLibListItemVO> xcfhxProjectList(@ModelAttribute ProjectListReq req) {
return constructionManage.xcfhxProjectList(req);
}

@GetMapping("/pre-ins/export") @GetMapping("/pre-ins/export")
@ApiOperation("待初验备案的项目列表导出") @ApiOperation("待初验备案的项目列表导出")
@WebLog("待初验备案的项目列表导出") @WebLog("待初验备案的项目列表导出")


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

@@ -345,7 +345,8 @@ public class ConstructionManage {
VUtils.isTrue(Objects.isNull(user)).throwMessage("获取登录用户失败!"); VUtils.isTrue(Objects.isNull(user)).throwMessage("获取登录用户失败!");
LambdaQueryWrapper<Project> query = ProjectHelper.projectQuery(req); LambdaQueryWrapper<Project> query = ProjectHelper.projectQuery(req);
//建设中状态 //建设中状态
query.eq(Project::getStatus, ProjectStatusEnum.TO_BE_FIRST_INSPECTED.getCode());
query.in(Project::getStatus, ProjectStatusEnum.TO_BE_FIRST_INSPECTED.getCode(),
ProjectStatusEnum.ON_FIRST_INSPECTED.getCode());
query.eq(Project::getStage, ProjectStatusEnum.PROJECT_APPROVED.getCode()); query.eq(Project::getStage, ProjectStatusEnum.PROJECT_APPROVED.getCode());
query.eq(Project::getNewest, Boolean.TRUE); query.eq(Project::getNewest, Boolean.TRUE);
//只能看自己单位的 //只能看自己单位的


+ 9
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/service/IPurchaseInstService.java View File

@@ -5,6 +5,9 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.hz.pm.api.projectdeclared.model.entity.PurchaseInst; import com.hz.pm.api.projectdeclared.model.entity.PurchaseInst;


import java.util.Collection;
import java.util.List;

/** /**
* <p> * <p>
* IPurchaseInstService * IPurchaseInstService
@@ -22,4 +25,10 @@ public interface IPurchaseInstService extends IService<PurchaseInst> {
return getOne(query); return getOne(query);
} }


default List<PurchaseInst> listByInstCodes(Collection<String> instCodes) {
Wrapper<PurchaseInst> query = Wrappers.lambdaQuery(PurchaseInst.class)
.in(PurchaseInst::getInstCode, instCodes);
return list(query);
}

} }

+ 3
- 1
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/service/IProjectService.java View File

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hz.pm.api.common.model.constant.BizConst;
import com.hz.pm.api.projectlib.model.entity.Project; import com.hz.pm.api.projectlib.model.entity.Project;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.hz.pm.api.projectlib.model.po.ProjectPO; import com.hz.pm.api.projectlib.model.po.ProjectPO;
@@ -26,7 +27,8 @@ public interface IProjectService extends IService<Project> {


default Optional<String> getProjectCode(Long projectId) { default Optional<String> getProjectCode(Long projectId) {
LambdaQueryWrapper<Project> query = Wrappers.lambdaQuery(Project.class) LambdaQueryWrapper<Project> query = Wrappers.lambdaQuery(Project.class)
.select(Project::getProjectCode);
.select(Project::getProjectCode)
.last(BizConst.LIMIT_1);
return Optional.ofNullable(getOne(query)) return Optional.ofNullable(getOne(query))
.flatMap(w -> Optional.of(w.getProjectCode())); .flatMap(w -> Optional.of(w.getProjectCode()));
} }


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

@@ -586,4 +586,5 @@ public class HandlerManage {
} }
return Boolean.FALSE; return Boolean.FALSE;
} }

} }

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

@@ -24,6 +24,8 @@ import com.hz.pm.api.common.util.BizUtils;
import com.hz.pm.api.common.util.ExcelDownUtil; import com.hz.pm.api.common.util.ExcelDownUtil;
import com.hz.pm.api.irs.sign.IRSAPIRequest; import com.hz.pm.api.irs.sign.IRSAPIRequest;
import com.hz.pm.api.projectdeclared.manage.DefaultDeclaredProjectManage; import com.hz.pm.api.projectdeclared.manage.DefaultDeclaredProjectManage;
import com.hz.pm.api.projectdeclared.model.entity.PurchaseInst;
import com.hz.pm.api.projectdeclared.service.IPurchaseInstService;
import com.hz.pm.api.projectlib.manage.ProjectLibManage; import com.hz.pm.api.projectlib.manage.ProjectLibManage;
import com.hz.pm.api.projectlib.model.dto.ProjectApplicationDTO; import com.hz.pm.api.projectlib.model.dto.ProjectApplicationDTO;
import com.hz.pm.api.projectlib.model.dto.ProjectDTO; import com.hz.pm.api.projectlib.model.dto.ProjectDTO;
@@ -145,6 +147,7 @@ public class TodoCenterManage {
private final RepositoryService repositoryService; private final RepositoryService repositoryService;
private final IRegionService regionService; private final IRegionService regionService;
private final ITodoService todoService; private final ITodoService todoService;
private final IPurchaseInstService purchaseInstService;


/** /**
* 待办中心待我处理项目列表查询 * 待办中心待我处理项目列表查询
@@ -212,7 +215,10 @@ public class TodoCenterManage {
.collect(Collectors.toList()).stream() .collect(Collectors.toList()).stream()
.filter(v -> processSet.add(v.getNodeId())) .filter(v -> processSet.add(v.getNodeId()))
.collect(Collectors.toMap(ProcessTaskVo::getNodeId, v -> v)); .collect(Collectors.toMap(ProcessTaskVo::getNodeId, v -> v));

List<String> instanceIds = CollUtils.fieldList(userTodoList, ProcessTaskVo::getInstanceId);
List<PurchaseInst> purchaseInstList = purchaseInstService.listByInstCodes(instanceIds);
Map<String, Long> purchaseInstMap = CollUtils.listToMap(purchaseInstList,
PurchaseInst::getInstCode, PurchaseInst::getBidId);


List<ResToBeProcessedVO> resVos = userTodoList.stream().map(d -> { List<ResToBeProcessedVO> resVos = userTodoList.stream().map(d -> {
Project projectInfo = projectInfoMap.get(d.getInstanceId()); Project projectInfo = projectInfoMap.get(d.getInstanceId());
@@ -230,6 +236,7 @@ public class TodoCenterManage {
res.setTaskId(d.getTaskId()); res.setTaskId(d.getTaskId());
res.setNodeName(findSubProcessName(d)); res.setNodeName(findSubProcessName(d));
res.setPretrialFileId(projectInfo.getPretrialFileId()); res.setPretrialFileId(projectInfo.getPretrialFileId());
res.setBidId(purchaseInstMap.get(d.getInstanceId()));
return res; return res;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
return PageVo.of(resVos, list.size()); return PageVo.of(resVos, list.size());
@@ -340,9 +347,7 @@ public class TodoCenterManage {
VUtils.isTrue(Objects.isNull(projectId)).throwMessage("获取项目ID失败!"); VUtils.isTrue(Objects.isNull(projectId)).throwMessage("获取项目ID失败!");


// 获取当前申报项目 // 获取当前申报项目
Project declaredProject = projectService.getOne(Wrappers.lambdaQuery(Project.class)
.eq(Project::getInstCode, processInstanceId)
.eq(Project::getId, projectId));
Project declaredProject = projectService.getById(projectId);
VUtils.isTrue(Objects.isNull(declaredProject)).throwMessage("获取项目失败!"); VUtils.isTrue(Objects.isNull(declaredProject)).throwMessage("获取项目失败!");


// 获取当前未处理流程详情 // 获取当前未处理流程详情
@@ -679,12 +684,14 @@ public class TodoCenterManage {
if (CollUtil.isEmpty(iDoList)) { if (CollUtil.isEmpty(iDoList)) {
return PageVo.empty(); return PageVo.empty();
} }

List<ProcessTaskVo> userIdoList = iDoList.stream() List<ProcessTaskVo> userIdoList = iDoList.stream()
.skip((long) (pageNumber - 1) * pageSize) .skip((long) (pageNumber - 1) * pageSize)
.limit(pageSize) .limit(pageSize)
.collect(Collectors.toList()); .collect(Collectors.toList());

List<String> instanceIds = CollUtils.fieldList(userIdoList, ProcessTaskVo::getInstanceId);
List<PurchaseInst> purchaseInstList = purchaseInstService.listByInstCodes(instanceIds);
Map<String, Long> purchaseInstMap = CollUtils.listToMap(purchaseInstList,
PurchaseInst::getInstCode, PurchaseInst::getBidId);
List<ResToBeProcessedVO> resVos = userIdoList.stream().map(d -> { List<ResToBeProcessedVO> resVos = userIdoList.stream().map(d -> {
ResToBeProcessedVO res = new ResToBeProcessedVO(); ResToBeProcessedVO res = new ResToBeProcessedVO();
Project projectInfo = projectInfoMap.get(d.getInstanceId()); Project projectInfo = projectInfoMap.get(d.getInstanceId());
@@ -698,6 +705,7 @@ public class TodoCenterManage {
res.setProcessHandleTime(d.getTaskEndTime()); res.setProcessHandleTime(d.getTaskEndTime());
res.setTaskId(d.getTaskId()); res.setTaskId(d.getTaskId());
res.setNodeName(findSubProcessName(d)); res.setNodeName(findSubProcessName(d));
res.setBidId(purchaseInstMap.get(d.getInstanceId()));
return res; return res;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
return PageVo.of(resVos, iDoList.size()); return PageVo.of(resVos, iDoList.size());


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

@@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;

import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
@@ -72,4 +73,8 @@ public class ResToBeProcessedVO implements Serializable {


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

@ApiModelProperty("标段ID")
private Long bidId;

} }

Loading…
Cancel
Save