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

modify:

1. 合同信息保存修改;
tags/24082201
WendyYang 2 місяці тому
джерело
коміт
7ac66a915a
5 змінених файлів з 91 додано та 33 видалено
  1. +0
    -2
      hz-pm-api/src/main/java/com/hz/pm/api/projectdeclared/manage/OperationManage.java
  2. +61
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/dto/MhSystemUpgradeInfoDTO.java
  3. +3
    -0
      hz-pm-api/src/main/java/com/hz/pm/api/todocenter/enumeration/IsAppendProjectEnum.java
  4. +26
    -30
      hz-pm-api/src/main/java/com/hz/pm/api/todocenter/manage/TodoCenterManage.java
  5. +1
    -1
      hz-pm-api/src/main/java/com/hz/pm/api/workbench/manage/WorkbenchManage.java

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

@@ -3,7 +3,6 @@ package com.hz.pm.api.projectdeclared.manage;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.hz.pm.api.common.statemachine.util.ProjectStateMachineUtil;
import com.hz.pm.api.common.statemachine.util.TenderStateMachineUtil;
import com.hz.pm.api.projectdeclared.model.dto.OperationReq;
import com.hz.pm.api.projectdeclared.model.entity.Operation;
@@ -42,7 +41,6 @@ public class OperationManage {
private final IPurchaseService purchaseService;
private final IProjectService projectService;
private final TenderStateMachineUtil tenderStateMachineUtil;
private final ProjectStateMachineUtil projectStateMachineUtil;

/**
* 获取实施详情


+ 61
- 0
hz-pm-api/src/main/java/com/hz/pm/api/projectlib/model/dto/MhSystemUpgradeInfoDTO.java Переглянути файл

@@ -0,0 +1,61 @@
package com.hz.pm.api.projectlib.model.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
* <p>
* MhSystemUpgradeInfoDTO
* </p>
*
* @author WendyYang
* @since 10:06 2024/8/20
*/
@Data
@ApiModel("系统升级信息")
public class MhSystemUpgradeInfoDTO {

@ApiModelProperty("主键ID")
private String id;

@ApiModelProperty("系统名称")
private String systemName;

@ApiModelProperty("替代后系统名称")
private String alternativeName;

@ApiModelProperty("替代方式")
private String alternativeType;

@ApiModelProperty("建设单位")
private String buildUnit;

@ApiModelProperty("建设单位ID")
private Integer createUnit;

@ApiModelProperty("改造费用")
private BigDecimal expectCost;

@ApiModelProperty("计划完成时间(时间戳)")
private Integer expectDate;

@ApiModelProperty("计划改造开始时间(时间戳)")
private Integer expectStart;

@ApiModelProperty("完成时间")
private LocalDateTime finalTime;

@ApiModelProperty("host")
private String host;

@ApiModelProperty("是否涉密")
private String isSecret;

@ApiModelProperty("pid")
private String pid;

}

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

@@ -67,4 +67,7 @@ public enum IsAppendProjectEnum {
public boolean eq(String val) {
return this.name().equals(val);
}
public boolean eq(Integer val) {
return this.getCode().equals(val);
}
}

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

@@ -8,6 +8,7 @@ import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Assert;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.google.common.collect.Lists;
@@ -78,7 +79,6 @@ 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.sun.org.apache.xpath.internal.operations.Bool;
import com.wflow.contants.HisProInsEndActId;
import com.wflow.contants.ProcessConstant;
import com.wflow.exception.BusinessException;
@@ -152,9 +152,7 @@ public class TodoCenterManage {
private final IRegionService regionService;
private final ITodoService todoService;
private final IPurchaseInstService purchaseInstService;

private final IXinchuangService xinchuangService;

private final IXinchuangInstService xinchuangInstService;

/**
@@ -224,21 +222,15 @@ public class TodoCenterManage {
return PageVo.empty();
}

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

List<ProcessTaskVo> userTodoList = CollUtils.page(list, pageNumber, pageSize);
Set<String> processSet = Sets.newHashSet();
Map<String, ProcessTaskVo> taskMap = userTodoList.stream()
.sorted((t1, t2) -> t2.getTaskCreateTime().compareTo(t1.getTaskCreateTime()))
.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<String> instCodes = CollUtils.fieldList(userTodoList, ProcessTaskVo::getInstanceId);
Map<String, Long> purchaseInstMap = listInstCodeBidIdMap(instCodes);

List<ResToBeProcessedVO> resVos = userTodoList.stream().map(d -> {
Project projectInfo = projectInfoMap.get(d.getInstanceId());
@@ -262,6 +254,14 @@ public class TodoCenterManage {
return PageVo.of(resVos, list.size());
}

private Map<String, Long> listInstCodeBidIdMap(List<String> instanceIds) {
Wrapper<PurchaseInst> query = Wrappers.lambdaQuery(PurchaseInst.class)
.select(PurchaseInst::getInstCode, PurchaseInst::getBidId)
.in(PurchaseInst::getInstCode, instanceIds);
List<PurchaseInst> instList = purchaseInstService.list(query);
return CollUtils.listToMap(instList, PurchaseInst::getInstCode, PurchaseInst::getBidId);
}

public PageVo<ResToBeProcessedVO> todoXinchuangList(ToBeProcessedReq param) {
Long userId = Optional.ofNullable(param.getUserId()).orElseGet(LoginUserUtil::getUserId);
String userIdStr = String.valueOf(userId);
@@ -324,7 +324,6 @@ 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<ResToBeProcessedVO> resVos = userTodoList.stream().map(d -> {
XinchuangInst xinchuangInst = xinchuangInstMap.get(d.getInstanceId());
@@ -413,20 +412,22 @@ public class TodoCenterManage {
.forEach(userTodoList::add);
}
ExcelExportWriter excelExportWriter = new ExcelExportWriter();
String fileName = null;
if (IsAppendProjectEnum.APPEND_PROJECT.getCode().equals(param.getIsTemporaryAugment())) {
String fileName;
if (IsAppendProjectEnum.APPEND_PROJECT.eq(param.getIsTemporaryAugment())) {
fileName = "待办中心_待我处理_增补项目列表";
} else if (IsAppendProjectEnum.NOT_APPEND_PROJECT.getCode().equals(param.getIsTemporaryAugment())) {
} else if (IsAppendProjectEnum.NOT_APPEND_PROJECT.eq(param.getIsTemporaryAugment())) {
fileName = "待办中心_待我处理_非增补项目列表";
} else {
fileName = "待办中心_待我处理_全部项目列表";
}
excelExportWriter.setFileName(fileName);
List<String> sheetsNames = Lists.newArrayList(fileName);
List<List<String>> exportDatas = ExcelDownUtil.getTaskExportDatas(param.getExportOptionList(), userTodoList, projectInfoMap);
List<List<String>> exportDataList = ExcelDownUtil.getTaskExportDatas(param.getExportOptionList(), userTodoList, projectInfoMap);
// sheet列表集合
List<List<List<String>>> sheets = Lists.newArrayList();
sheets.add(exportDatas);
sheets.add(exportDataList);
excelExportWriter.setHeads(sheets);
excelExportWriter.setDatas(exportDatas);
excelExportWriter.setDatas(exportDataList);
excelExportWriter.setSheets(sheetsNames);
excelExportWriter.setHeadPropertyClass(List.class);
excelExportWriter.setHeadPropertyFlag(Boolean.FALSE);
@@ -714,7 +715,8 @@ public class TodoCenterManage {
//转码
byte[] b = Base64Decoder.decode(signPdf);
for (int i = 0; i < b.length; ++i) {
if (b[i] < 0) {//调整异常数据
if (b[i] < 0) {
//调整异常数据
b[i] += 256;
}
}
@@ -916,8 +918,7 @@ public class TodoCenterManage {
.filter(p -> StringUtils.isNotBlank(p.getInstCode()) &&
!Declared.NULL_INST_CODE.equals(p.getInstCode()))
.collect(Collectors.toMap(ProjectInst::getInstCode, p -> projectsMap.get(p.getProjectId())));
List<String> instCodes = projectInstList.stream().map(ProjectInst::getInstCode).collect(Collectors.toList());

List<String> instCodes = CollUtils.fieldList(projectInstList, ProjectInst::getInstCode);
// 查出用户工作流
TodoCenterListReqDTO req = new TodoCenterListReqDTO();
Integer pageNumber = param.getPageNumber();
@@ -930,14 +931,9 @@ 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<ProcessTaskVo> userIdoList = CollUtils.page(iDoList, pageNumber, pageSize);
List<String> currPageInstCodes = CollUtils.fieldList(userIdoList, ProcessTaskVo::getInstanceId);
Map<String, Long> purchaseInstMap = listInstCodeBidIdMap(currPageInstCodes);
List<ResToBeProcessedVO> resVos = userIdoList.stream().map(d -> {
ResToBeProcessedVO res = new ResToBeProcessedVO();
Project projectInfo = projectInfoMap.get(d.getInstanceId());


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

@@ -300,7 +300,7 @@ public class WorkbenchManage {
for (WorkbenchProcessNode node : WorkbenchProcessNode.ALL) {
if (!projects.isEmpty()) {
ProjectProcessStatVO currStat = ProjectProcessStatVO.builder()
.stageName(node.name())
.stageName(node.getName())
.stage(node)
.build();
switch (node) {


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