@@ -4,7 +4,9 @@ import lombok.AllArgsConstructor; | |||
import lombok.Getter; | |||
import org.apache.commons.lang3.StringUtils; | |||
import java.util.Arrays; | |||
import java.util.Objects; | |||
import java.util.Optional; | |||
/** | |||
* <p> | |||
@@ -25,11 +27,11 @@ public enum ProjectProcessStageEnum { | |||
PROJECT_PREQUALIFICATION_APPROVAL_PROCESS(2, "项目预审审批流程"), | |||
DEPARTMENT_JOINT_APPROVAL_PROCESS(3, "部门联合审批流程"), | |||
CONSTRUCTION_PROJECT_APPROVAL_PROCESS(4, "建设方案审批流程"), | |||
PROJECT_RECORD_APPROVAL_PROCESS(8, "立项备案审批流程"), | |||
XC_APPROVAL_PROCESS(9, "信创审批流程"), | |||
ACCEPTANCE_DECLARATION_APPROVAL_PROCESS(5, "验收申报审批流程"), | |||
APPLY_DELAY(6, "申请延期审批流程"), | |||
APPLY_BORROW(7, "申请借阅审批流程"); | |||
APPLY_BORROW(7, "申请借阅审批流程"), | |||
PROJECT_RECORD_APPROVAL_PROCESS(8, "立项备案审批流程"), | |||
XC_APPROVAL_PROCESS(9, "信创审批流程"); | |||
private final Integer code; | |||
private final String desc; | |||
@@ -46,4 +48,8 @@ public enum ProjectProcessStageEnum { | |||
return StringUtils.EMPTY; | |||
} | |||
public static Optional<ProjectProcessStageEnum> get(Integer code) { | |||
return Arrays.stream(values()).filter(w -> w.getCode().equals(code)).findFirst(); | |||
} | |||
} |
@@ -398,7 +398,7 @@ public class PerformanceAppraisalPlanManage { | |||
ProjectInst projectInst = projectInstService.getOne(Wrappers.lambdaQuery(ProjectInst.class) | |||
.in(ProjectInst::getProjectId, allVersionProjectIds) | |||
.eq(ProjectInst::getInstType, InstTypeEnum.PROJECT_FINAL_INSPECTION.getCode()) | |||
.orderByDesc(ProjectInst::getCreatOn) | |||
.orderByDesc(ProjectInst::getCreateOn) | |||
.last(BizConst.LIMIT_1)); | |||
if (Objects.isNull(projectInst)) { | |||
@@ -657,10 +657,8 @@ public class ConstructionManage { | |||
ProjectInst projectInst = new ProjectInst(); | |||
projectInst.setInstCode(instanceId); | |||
projectInst.setInstType(ProjectProcessStageEnum.XC_APPROVAL_PROCESS.getCode()); | |||
projectInst.setInstType(ProjectProcessStageEnum.XC_APPROVAL_PROCESS); | |||
projectInst.setProjectId(req.getProjectId()); | |||
projectInst.setUpdateOn(LocalDateTime.now()); | |||
projectInst.setCreatOn(projectInst.getUpdateOn()); | |||
projectInstService.save(projectInst); | |||
log.info("信创审查提交成功 【{}】", instanceId); | |||
@@ -184,9 +184,9 @@ public class ConstructionPlanManage { | |||
ProjectInst projectInst = new ProjectInst(); | |||
projectInst.setProjectId(project.getId()); | |||
projectInst.setInstCode(instanceId); | |||
projectInst.setCreatOn(LocalDateTime.now()); | |||
projectInst.setCreateOn(LocalDateTime.now()); | |||
projectInst.setUpdateOn(LocalDateTime.now()); | |||
projectInst.setInstType(ProjectProcessStageEnum.CONSTRUCTION_PROJECT_APPROVAL_PROCESS.getCode()); | |||
projectInst.setInstType(ProjectProcessStageEnum.CONSTRUCTION_PROJECT_APPROVAL_PROCESS); | |||
projectInstService.save(projectInst); | |||
return project; | |||
@@ -233,9 +233,7 @@ public class ConstructionPlanManage { | |||
ProjectInst projectInst = new ProjectInst(); | |||
projectInst.setProjectId(project.getId()); | |||
projectInst.setInstCode(instanceId); | |||
projectInst.setInstType(InstTypeEnum.CONSTRUCTION_PLAN_REVIEW.getCode()); | |||
projectInst.setCreatOn(LocalDateTime.now()); | |||
projectInst.setUpdateOn(LocalDateTime.now()); | |||
projectInst.setInstType(InstTypeEnum.CONSTRUCTION_PLAN_REVIEW); | |||
projectInstService.save(projectInst); | |||
} catch (Exception e) { | |||
log.error("提交建设方案 项目信息修改 错误 ", e); | |||
@@ -30,6 +30,7 @@ import com.hz.pm.api.projectlib.manage.ProjectLibManage; | |||
import com.hz.pm.api.projectlib.model.dto.ProjectDTO; | |||
import com.hz.pm.api.projectlib.model.entity.Project; | |||
import com.hz.pm.api.projectlib.model.entity.ProjectAnnualPaymentPlan; | |||
import com.hz.pm.api.projectlib.model.entity.ProjectInst; | |||
import com.hz.pm.api.projectlib.model.enumeration.InstTypeEnum; | |||
import com.hz.pm.api.projectlib.model.enumeration.ProjectStatusEnum; | |||
import com.hz.pm.api.projectlib.model.enumeration.ProjectTypeNewEnum; | |||
@@ -38,6 +39,7 @@ import com.hz.pm.api.projectlib.model.req.ProjectListReq; | |||
import com.hz.pm.api.projectlib.model.vo.ProjectLibListItemVO; | |||
import com.hz.pm.api.projectlib.model.vo.TenderListInfoVO; | |||
import com.hz.pm.api.projectlib.service.IProjectAnnualPaymentPlanService; | |||
import com.hz.pm.api.projectlib.service.IProjectInstService; | |||
import com.hz.pm.api.projectlib.service.IProjectService; | |||
import com.hz.pm.api.sys.manage.NoticeManage; | |||
import com.hz.pm.api.user.security.model.UserFullInfoDTO; | |||
@@ -93,6 +95,7 @@ public class FinalAcceptanceManage { | |||
private final IProjectAnnualPaymentPlanService projectAnnualPaymentPlanService; | |||
private final StateMachineUtil stateMachineUtil; | |||
private final TenderStateMachineUtil tenderStateMachineUtil; | |||
private final IProjectInstService projectInstService; | |||
/** | |||
* 待采购的-项目列表 | |||
@@ -259,6 +262,7 @@ public class FinalAcceptanceManage { | |||
ProcessStartParamsVo params = new ProcessStartParamsVo(); | |||
params.setUser(declaredProjectManage.buildUser(user.getUserId())); | |||
params.setProcessUsers(Collections.emptyMap()); | |||
params.setFormData(Collections.emptyMap()); | |||
// 获取发起单位、发起单位主管单位、发起单位上级条线主管单位信息 | |||
Map<String, OrgInfoDTO> orgMap = declaredProjectManage.buildOrgModelMap(user.getUserId(), project); | |||
String instanceId = processInstanceService.startProcessLs(model, params, orgMap); | |||
@@ -274,6 +278,11 @@ public class FinalAcceptanceManage { | |||
purchaseInst.setInstType(ProjectProcessStageEnum.ACCEPTANCE_DECLARATION_APPROVAL_PROCESS.getCode()); | |||
purchaseInstService.save(purchaseInst); | |||
boolean allFinalInspected = purchases.stream().noneMatch(w -> StrUtils.isBlank(w.getFinalInspectionMaterials())); | |||
ProjectInst projectInst = new ProjectInst(); | |||
projectInst.setInstType(ProjectProcessStageEnum.ACCEPTANCE_DECLARATION_APPROVAL_PROCESS.getCode()); | |||
projectInst.setInstCode(instanceId); | |||
projectInst.setProjectId(req.getProjectId()); | |||
projectInstService.save(projectInst); | |||
if (allFinalInspected) { | |||
stateMachineUtil.pass(project); | |||
projectService.updateById(project); | |||
@@ -226,8 +226,6 @@ public class PrequalificationDeclaredProjectManage { | |||
ProjectInst projectInst = new ProjectInst(); | |||
projectInst.setProjectId(project.getId()); | |||
projectInst.setInstCode(instanceId); | |||
projectInst.setCreatOn(LocalDateTime.now()); | |||
projectInst.setUpdateOn(LocalDateTime.now()); | |||
projectInst.setInstType(ProjectProcessStageEnum.PROJECT_PREQUALIFICATION_APPROVAL_PROCESS.getCode()); | |||
projectInstService.save(projectInst); | |||
} catch (Exception e) { | |||
@@ -1,6 +1,7 @@ | |||
package com.hz.pm.api.projectdeclared.model.entity; | |||
import com.baomidou.mybatisplus.annotation.*; | |||
import com.hz.pm.api.common.enumeration.ProjectProcessStageEnum; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Data; | |||
@@ -36,10 +37,18 @@ public class PurchaseInst { | |||
@ApiModelProperty("创建时间") | |||
@TableField(fill = FieldFill.INSERT) | |||
private LocalDateTime creatOn; | |||
private LocalDateTime createOn; | |||
@ApiModelProperty("创建人") | |||
@TableField(fill = FieldFill.INSERT) | |||
private Long createBy; | |||
public void setInstType(ProjectProcessStageEnum processStage) { | |||
this.instType = processStage.getCode(); | |||
} | |||
public void setInstType(Integer instType) { | |||
this.instType = instType; | |||
} | |||
} |
@@ -64,7 +64,7 @@ public class ConstructionPlanReviewHandle extends AbstractProcessBusinessHandle | |||
.in(ProjectInst::getProjectId, allVersionProjectIds) | |||
.eq(ProjectInst::getInstType, InstTypeEnum.CONSTRUCTION_PLAN_REVIEW.getCode()) | |||
.ne(ProjectInst::getInstCode, TodoCenterConst.Declared.NULL_INST_CODE) | |||
.orderByDesc(ProjectInst::getCreatOn) | |||
.orderByDesc(ProjectInst::getCreateOn) | |||
.last(BizConst.LIMIT_1)); | |||
ProcessProgressVo instanceDetail = null; | |||
// 未找到当前版本项目的建设方案审核流程且当前项目版本号大于1(是被驳回重新申报的项目) | |||
@@ -55,8 +55,7 @@ public class DeptUnitedReviewHandle extends AbstractProcessBusinessHandle { | |||
@Override | |||
void businessHandle(Long projectId, List<ProcessDetailVO> processSchedule) { | |||
ProcessDetailVO processDetailVO = new ProcessDetailVO(); | |||
ProcessDetailVO retProcessDetail = new ProcessDetailVO(); | |||
//查出历史版本的 所有项目ID | |||
List<Long> allVersionProjectIds = projectService.allVersionProjectIds(projectId); | |||
@@ -65,43 +64,43 @@ public class DeptUnitedReviewHandle extends AbstractProcessBusinessHandle { | |||
.in(ProjectInst::getProjectId, allVersionProjectIds) | |||
.eq(ProjectInst::getInstType, InstTypeEnum.DEPT_UNITED_REVIEW.getCode()) | |||
.ne(ProjectInst::getInstCode, TodoCenterConst.Declared.NULL_INST_CODE) | |||
.orderByDesc(ProjectInst::getCreatOn) | |||
.orderByDesc(ProjectInst::getCreateOn) | |||
.last(BizConst.LIMIT_1)); | |||
if (Objects.isNull(projectInst)) { | |||
processDetailVO.setStepStatus(StepStatusEnum.NOT_START); | |||
processDetailVO.setProcessName(CommonConst.DEPT_UNITED_REVIEW); | |||
processSchedule.add(processDetailVO); | |||
retProcessDetail.setStepStatus(StepStatusEnum.NOT_START); | |||
retProcessDetail.setProcessName(CommonConst.DEPT_UNITED_REVIEW); | |||
processSchedule.add(retProcessDetail); | |||
return; | |||
} | |||
String instCode = projectInst.getInstCode(); | |||
ProcessProgressVo instanceDetail = processInstanceService.getProgressInstanceDetail(null, instCode); | |||
String status = instanceDetail.getStatus(); | |||
if (ProcessStatusEnum.UNDER_REVIEW.getDesc().equals(status)) { | |||
processDetailVO.setStepStatus(StepStatusEnum.ON_GOING); | |||
retProcessDetail.setStepStatus(StepStatusEnum.ON_GOING); | |||
} else if (ProcessStatusEnum.BE_REJECTED.getDesc().equals(status)) { | |||
processDetailVO.setStepStatus(StepStatusEnum.REJECTED); | |||
retProcessDetail.setStepStatus(StepStatusEnum.REJECTED); | |||
} else if (ProcessStatusEnum.APPROVED.getDesc().equals(status)) { | |||
processDetailVO.setStepStatus(StepStatusEnum.COMPLETED); | |||
retProcessDetail.setStepStatus(StepStatusEnum.COMPLETED); | |||
} | |||
// 装配节点审核人员信息 | |||
List<ProgressNode> progressInfo = instanceDetail.getProgressInfo(); | |||
if (CollUtil.isNotEmpty(progressInfo)) { | |||
buildUserUtils.buildUserByProcessInfo(progressInfo); | |||
// 根据流程处理详情获取流程完成时间 | |||
if (StepStatusEnum.contains(processDetailVO.getStepStatus(), | |||
if (StepStatusEnum.contains(retProcessDetail.getStepStatus(), | |||
Lists.newArrayList(StepStatusEnum.REJECTED, | |||
StepStatusEnum.COMPLETED))) { | |||
ProgressNode progressNode = progressInfo.get(progressInfo.size() - 1); | |||
LocalDateTime finishTime = NdDateUtils.date2LocalDateTime(progressNode.getFinishTime()); | |||
processDetailVO.setFinishTime(finishTime); | |||
retProcessDetail.setFinishTime(finishTime); | |||
} | |||
} else { | |||
LocalDateTime finishTime = NdDateUtils.date2LocalDateTime(instanceDetail.getStartTime()); | |||
processDetailVO.setFinishTime(finishTime); | |||
retProcessDetail.setFinishTime(finishTime); | |||
} | |||
processDetailVO.setProcessProgressVo(instanceDetail); | |||
processDetailVO.setProcessName(CommonConst.DEPT_UNITED_REVIEW); | |||
processSchedule.add(processDetailVO); | |||
retProcessDetail.setProcessProgressVo(instanceDetail); | |||
retProcessDetail.setProcessName(CommonConst.DEPT_UNITED_REVIEW); | |||
processSchedule.add(retProcessDetail); | |||
} | |||
@Override | |||
@@ -68,7 +68,7 @@ public class PreliminaryPreviewHandle extends AbstractProcessBusinessHandle { | |||
.in(ProjectInst::getProjectId, allVersionProjectIds) | |||
.eq(ProjectInst::getInstType, InstTypeEnum.PRELIMINARY_PREVIEW.getCode()) | |||
.ne(ProjectInst::getInstCode, TodoCenterConst.Declared.NULL_INST_CODE) | |||
.orderByDesc(ProjectInst::getCreatOn) | |||
.orderByDesc(ProjectInst::getCreateOn) | |||
.last("limit 1")); | |||
ProcessProgressVo instanceDetail = null; | |||
// 未找到当前版本项目的预审审核流程且当前项目版本号大于1(是被驳回重新申报的项目或者建设方案申报的项目) | |||
@@ -62,7 +62,7 @@ public class ProjectFinalInspectionHandle extends AbstractProcessBusinessHandle | |||
.in(ProjectInst::getProjectId, allVersionProjectIds) | |||
.eq(ProjectInst::getInstType, InstTypeEnum.PROJECT_FINAL_INSPECTION.getCode()) | |||
.ne(ProjectInst::getInstCode, TodoCenterConst.Declared.NULL_INST_CODE) | |||
.orderByDesc(ProjectInst::getCreatOn) | |||
.orderByDesc(ProjectInst::getCreateOn) | |||
.last(BizConst.LIMIT_1)); | |||
if (Objects.isNull(projectInst)){ | |||
@@ -67,7 +67,7 @@ public class UnitInnerAuditHandle extends AbstractProcessBusinessHandle { | |||
.in(ProjectInst::getProjectId, allVersionProjectIds) | |||
.eq(ProjectInst::getInstType, InstTypeEnum.UNIT_INNER_AUDIT.getCode()) | |||
.ne(ProjectInst::getInstCode, TodoCenterConst.Declared.NULL_INST_CODE) | |||
.orderByDesc(ProjectInst::getCreatOn) | |||
.orderByDesc(ProjectInst::getCreateOn) | |||
.last(BizConst.LIMIT_1)); | |||
ProcessProgressVo instanceDetail = null; | |||
@@ -763,7 +763,7 @@ public class ProjectLibManage { | |||
ProjectInst projectInst = new ProjectInst(); | |||
projectInst.setProjectId(project.getId()); | |||
projectInst.setInstCode(instanceId); | |||
projectInst.setCreatOn(LocalDateTime.now()); | |||
projectInst.setCreateOn(LocalDateTime.now()); | |||
projectInst.setUpdateOn(LocalDateTime.now()); | |||
projectInst.setInstType(ProjectProcessStageEnum.ORG_INTERNAL_APPROVAL_PROCESS.getCode()); | |||
projectInstService.save(projectInst); | |||
@@ -785,8 +785,6 @@ public class ProjectLibManage { | |||
ProjectInst projectInst = new ProjectInst(); | |||
projectInst.setProjectId(project.getId()); | |||
projectInst.setInstCode(instanceId); | |||
projectInst.setCreatOn(LocalDateTime.now()); | |||
projectInst.setUpdateOn(LocalDateTime.now()); | |||
projectInst.setInstType(processStage.getCode()); | |||
projectInstService.save(projectInst); | |||
return project; | |||
@@ -816,9 +814,7 @@ public class ProjectLibManage { | |||
ProjectInst projectInst = new ProjectInst(); | |||
projectInst.setProjectId(project.getId()); | |||
projectInst.setInstCode(instanceId); | |||
projectInst.setCreatOn(LocalDateTime.now()); | |||
projectInst.setUpdateOn(LocalDateTime.now()); | |||
projectInst.setInstType(ProjectProcessStageEnum.CONSTRUCTION_PROJECT_APPROVAL_PROCESS.getCode()); | |||
projectInst.setInstType(ProjectProcessStageEnum.CONSTRUCTION_PROJECT_APPROVAL_PROCESS); | |||
projectInstService.save(projectInst); | |||
return project; | |||
} | |||
@@ -1046,8 +1042,6 @@ public class ProjectLibManage { | |||
ProjectInst projectInst = new ProjectInst(); | |||
projectInst.setProjectId(project.getId()); | |||
projectInst.setInstCode(instanceId); | |||
projectInst.setCreatOn(LocalDateTime.now()); | |||
projectInst.setUpdateOn(LocalDateTime.now()); | |||
projectInst.setInstType(instType); | |||
projectInstService.save(projectInst); | |||
@@ -1076,8 +1070,6 @@ public class ProjectLibManage { | |||
ProjectInst projectInst = new ProjectInst(); | |||
projectInst.setProjectId(project.getId()); | |||
projectInst.setInstCode(instanceId); | |||
projectInst.setCreatOn(LocalDateTime.now()); | |||
projectInst.setUpdateOn(LocalDateTime.now()); | |||
projectInst.setInstType(instType); | |||
projectInstService.save(projectInst); | |||
@@ -1115,8 +1107,6 @@ public class ProjectLibManage { | |||
ProjectInst projectInst = new ProjectInst(); | |||
projectInst.setProjectId(project.getId()); | |||
projectInst.setInstCode(instanceId); | |||
projectInst.setCreatOn(LocalDateTime.now()); | |||
projectInst.setUpdateOn(LocalDateTime.now()); | |||
projectInst.setInstType(instType); | |||
projectInstService.save(projectInst); | |||
@@ -1152,8 +1142,6 @@ public class ProjectLibManage { | |||
ProjectInst projectInst = new ProjectInst(); | |||
projectInst.setProjectId(project.getId()); | |||
projectInst.setInstCode(instanceId); | |||
projectInst.setCreatOn(LocalDateTime.now()); | |||
projectInst.setUpdateOn(LocalDateTime.now()); | |||
projectInst.setInstType(instType); | |||
projectInstService.save(projectInst); | |||
@@ -1337,9 +1325,7 @@ public class ProjectLibManage { | |||
ProjectInst projectInst = new ProjectInst(); | |||
projectInst.setProjectId(project.getId()); | |||
projectInst.setInstCode(instanceId); | |||
projectInst.setInstType(InstTypeEnum.APPLY_DELAY.getCode()); | |||
projectInst.setCreatOn(LocalDateTime.now()); | |||
projectInst.setUpdateOn(LocalDateTime.now()); | |||
projectInst.setInstType(InstTypeEnum.APPLY_DELAY); | |||
projectInstService.save(projectInst); | |||
} | |||
@@ -1367,9 +1353,7 @@ public class ProjectLibManage { | |||
ProjectInst projectInst = new ProjectInst(); | |||
projectInst.setProjectId(project.getId()); | |||
projectInst.setInstCode(instanceId); | |||
projectInst.setInstType(InstTypeEnum.APPLY_BORROW.getCode()); | |||
projectInst.setCreatOn(LocalDateTime.now()); | |||
projectInst.setUpdateOn(LocalDateTime.now()); | |||
projectInst.setInstType(InstTypeEnum.APPLY_BORROW); | |||
projectInstService.save(projectInst); | |||
} | |||
@@ -1,17 +1,19 @@ | |||
package com.hz.pm.api.projectlib.model.entity; | |||
import com.baomidou.mybatisplus.annotation.IdType; | |||
import com.baomidou.mybatisplus.annotation.TableId; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import com.baomidou.mybatisplus.annotation.*; | |||
import java.io.Serializable; | |||
import java.time.LocalDateTime; | |||
import com.hz.pm.api.common.enumeration.ProjectProcessStageEnum; | |||
import com.hz.pm.api.projectlib.model.enumeration.InstTypeEnum; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Data; | |||
/** | |||
* <p> | |||
* | |||
* | |||
* </p> | |||
* | |||
* @author Poffy | |||
@@ -38,8 +40,23 @@ public class ProjectInst implements Serializable { | |||
private Integer instType; | |||
@ApiModelProperty("创建时间") | |||
private LocalDateTime creatOn; | |||
@TableField(fill = FieldFill.INSERT) | |||
private LocalDateTime createOn; | |||
@ApiModelProperty("修改时间") | |||
@TableField(fill = FieldFill.INSERT_UPDATE) | |||
private LocalDateTime updateOn; | |||
public void setInstType(InstTypeEnum instType) { | |||
this.instType = instType.getCode(); | |||
} | |||
public void setInstType(ProjectProcessStageEnum processStage) { | |||
this.instType = processStage.getCode(); | |||
} | |||
public void setInstType(Integer instType) { | |||
this.instType = instType; | |||
} | |||
} |
@@ -190,11 +190,14 @@ public class HandlerManage { | |||
// 判断是否 保存建设建议信息 | |||
saveConstructionSuggestInfo(instance.getId(), project); | |||
break; | |||
case ON_PURCHASING: | |||
case TO_BE_FIRST_INSPECTED: | |||
case ON_FIRST_INSPECTED: | |||
purchasePassedCallback(project, instanceId, ProjectProcessStageEnum.XC_APPROVAL_PROCESS); | |||
break; | |||
case TO_BE_FINALLY_INSPECTED: | |||
case ON_FINALLY_INSPECTED: | |||
purchasePassedCallback(project, instanceId, ProjectProcessStageEnum.ACCEPTANCE_DECLARATION_APPROVAL_PROCESS); | |||
ProjectProcessStageEnum processStage = ProjectProcessStageEnum.get(instTypeEnum.getCode()) | |||
.orElseThrow(() -> BizException.wrap("不支持的流程类型")); | |||
purchasePassedCallback(project, instanceId, processStage); | |||
break; | |||
default: | |||
throw new BizException("传入项目状态错误: " + project.getStatus()); | |||
@@ -237,7 +240,8 @@ public class HandlerManage { | |||
tenderStateMachineUtil.pass(currPurchase); | |||
purchaseService.updateById(currPurchase); | |||
Collection<PurchaseInst> lastInstList = BizUtils.groupFirst(instList, PurchaseInst::getBidId, Comparator.comparing(PurchaseInst::getCreatOn).reversed()); | |||
Collection<PurchaseInst> lastInstList = BizUtils.groupFirst(instList, PurchaseInst::getBidId, | |||
Comparator.comparing(PurchaseInst::getCreateOn).reversed()); | |||
Set<String> instCodes = CollUtils.fieldSet(lastInstList, PurchaseInst::getInstCode); | |||
if (instCodes.size() != purchases.size()) { | |||
return; | |||
@@ -1136,8 +1136,6 @@ public class TodoCenterManage { | |||
newPi.setProjectId(project.getId()); | |||
newPi.setInstType(oldInst.getInstType()); | |||
newPi.setInstCode(instCode); | |||
newPi.setCreatOn(LocalDateTime.now()); | |||
newPi.setUpdateOn(LocalDateTime.now()); | |||
projectInstService.save(newPi); | |||
projectService.reverseNewest(project.getProjectCode(), project.getId()); | |||
@@ -1364,11 +1362,11 @@ public class TodoCenterManage { | |||
ProjectInst projectInst = projectInstService.getOne(Wrappers.lambdaQuery(ProjectInst.class) | |||
.eq(ProjectInst::getProjectId, projectId) | |||
.eq(ProjectInst::getInstType, InstTypeEnum.PRELIMINARY_PREVIEW.getCode()) | |||
.orderByDesc(ProjectInst::getCreatOn) | |||
.orderByDesc(ProjectInst::getCreateOn) | |||
.last("limit 1")); | |||
LocalDateTime time; | |||
if (Objects.nonNull(projectInst)) { | |||
time = projectInst.getCreatOn(); | |||
time = projectInst.getCreateOn(); | |||
paramsMap.put("time", NdDateUtils.format(time, "yyyy-MM-dd HH:mm")); | |||
} else { | |||
paramsMap.put("time", null); | |||