Переглянути джерело

审批处理

tags/24080901
WendyYang 8 місяці тому
джерело
коміт
7d3dcf09bb
7 змінених файлів з 34 додано та 14 видалено
  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 Переглянути файл

@@ -83,12 +83,6 @@ public class ConstructionController {
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")
@ApiOperation("待初验备案的项目列表导出")
@WebLog("待初验备案的项目列表导出")


+ 2
- 1
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/ConstructionManage.java Переглянути файл

@@ -345,7 +345,8 @@ public class ConstructionManage {
VUtils.isTrue(Objects.isNull(user)).throwMessage("获取登录用户失败!");
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::getNewest, Boolean.TRUE);
//只能看自己单位的


+ 9
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/service/IPurchaseInstService.java Переглянути файл

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

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

/**
* <p>
* IPurchaseInstService
@@ -22,4 +25,10 @@ public interface IPurchaseInstService extends IService<PurchaseInst> {
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 Переглянути файл

@@ -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.toolkit.Wrappers;
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.baomidou.mybatisplus.extension.service.IService;
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) {
LambdaQueryWrapper<Project> query = Wrappers.lambdaQuery(Project.class)
.select(Project::getProjectCode);
.select(Project::getProjectCode)
.last(BizConst.LIMIT_1);
return Optional.ofNullable(getOne(query))
.flatMap(w -> Optional.of(w.getProjectCode()));
}


+ 1
- 0
hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/HandlerManage.java Переглянути файл

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

}

+ 14
- 6
hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/TodoCenterManage.java Переглянути файл

@@ -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.irs.sign.IRSAPIRequest;
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.model.dto.ProjectApplicationDTO;
import com.hz.pm.api.projectlib.model.dto.ProjectDTO;
@@ -145,6 +147,7 @@ public class TodoCenterManage {
private final RepositoryService repositoryService;
private final IRegionService regionService;
private final ITodoService todoService;
private final IPurchaseInstService purchaseInstService;

/**
* 待办中心待我处理项目列表查询
@@ -212,7 +215,10 @@ public class TodoCenterManage {
.collect(Collectors.toList()).stream()
.filter(v -> processSet.add(v.getNodeId()))
.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 -> {
Project projectInfo = projectInfoMap.get(d.getInstanceId());
@@ -230,6 +236,7 @@ public class TodoCenterManage {
res.setTaskId(d.getTaskId());
res.setNodeName(findSubProcessName(d));
res.setPretrialFileId(projectInfo.getPretrialFileId());
res.setBidId(purchaseInstMap.get(d.getInstanceId()));
return res;
}).collect(Collectors.toList());
return PageVo.of(resVos, list.size());
@@ -340,9 +347,7 @@ public class TodoCenterManage {
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("获取项目失败!");

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

List<ProcessTaskVo> userIdoList = iDoList.stream()
.skip((long) (pageNumber - 1) * pageSize)
.limit(pageSize)
.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 -> {
ResToBeProcessedVO res = new ResToBeProcessedVO();
Project projectInfo = projectInfoMap.get(d.getInstanceId());
@@ -698,6 +705,7 @@ public class TodoCenterManage {
res.setProcessHandleTime(d.getTaskEndTime());
res.setTaskId(d.getTaskId());
res.setNodeName(findSubProcessName(d));
res.setBidId(purchaseInstMap.get(d.getInstanceId()));
return res;
}).collect(Collectors.toList());
return PageVo.of(resVos, iDoList.size());


+ 5
- 0
hz-pm-api/src/main/java/com/hz/pm/api/todocenter/model/vo/ResToBeProcessedVO.java Переглянути файл

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

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

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

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

}

Завантаження…
Відмінити
Зберегти