Browse Source

批复金额和时间

tags/24080901
PoffyZhang 1 year ago
parent
commit
e1ab44265d
7 changed files with 31 additions and 6 deletions
  1. +3
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java
  2. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java
  3. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PurchaseManage.java
  4. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ReviewByDeptJointManage.java
  5. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ReviewByProvincialDeptManage.java
  6. +2
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/IProjectService.java
  7. +22
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/impl/ProjectServiceImpl.java

+ 3
- 2
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java View File

@@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ningdatech.basic.function.VUtils;
import com.ningdatech.basic.model.PageVo;
import com.ningdatech.basic.util.NdDateUtils;
import com.ningdatech.pmapi.common.constant.BizConst;
import com.ningdatech.pmapi.common.constant.CommonConst;
import com.ningdatech.pmapi.common.enumeration.ProjectProcessStageEnum;
import com.ningdatech.pmapi.common.helper.UserInfoHelper;
@@ -100,7 +101,7 @@ public class ConstructionPlanManage {

ProjectDTO projectDto = dto.getProjectInfo();
VUtils.isTrue(Objects.isNull(projectDto.getId())).throwMessage("提交失败 缺少项目ID!");
Project projectInfo = projectService.getById(projectDto.getId());
Project projectInfo = projectService.getNewProject(projectDto.getId());
VUtils.isTrue(Objects.isNull(projectInfo)).throwMessage("提交失败 此项目不存在!");
VUtils.isTrue(StringUtils.isBlank(projectDto.getConstructionPlanFile())).throwMessage("提交失败 请提交建设方案!");

@@ -112,7 +113,7 @@ public class ConstructionPlanManage {
WflowModels model = processModelService.getOne(Wrappers.lambdaQuery(WflowModels.class)
.eq(WflowModels::getRegionCode, regionCode)
.eq(WflowModels::getProcessType, ProjectProcessStageEnum.CONSTRUCTION_PROJECT_APPROVAL_PROCESS.getCode())
.last("limit 1"));
.last(BizConst.LIMIT_1));

if (Objects.isNull(model)) {
log.error("此 【{}】区域找不到 建设申报流程配置", regionCode);


+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java View File

@@ -98,7 +98,7 @@ public class PrequalificationDeclaredProjectManage {

ProjectDTO projectDto = dto.getProjectInfo();
VUtils.isTrue(Objects.isNull(projectDto.getId())).throwMessage("提交失败 缺少项目ID!");
Project projectInfo = projectService.getById(projectDto.getId());
Project projectInfo = projectService.getNewProject(projectDto.getId());
VUtils.isTrue(Objects.isNull(projectInfo)).throwMessage("提交失败 此项目不存在!");

//要判断 当前操作人 是不是项目主管单位的人


+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PurchaseManage.java View File

@@ -158,7 +158,7 @@ public class PurchaseManage {

Long projectId = dto.getProjectId();
VUtils.isTrue(Objects.isNull(projectId)).throwMessage("提交失败 缺少项目ID!");
Project project = projectService.getById(projectId);
Project project = projectService.getNewProject(dto.getProjectId());
VUtils.isTrue(Objects.isNull(project)).throwMessage("提交失败 此项目不存在!");

//首先要判断 项目当前状态 是不是 采购结果备案


+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ReviewByDeptJointManage.java View File

@@ -63,7 +63,7 @@ public class ReviewByDeptJointManage {
String startUserCode = project.getSponsor();

VUtils.isTrue(Objects.isNull(project.getId())).throwMessage("提交失败 缺少项目ID!");
Project projectInfo = projectService.getById(project.getId());
Project projectInfo = projectService.getNewProject(project.getId());
VUtils.isTrue(Objects.isNull(projectInfo)).throwMessage("提交失败 此项目不存在!");
String regionCode = projectInfo.getAreaCode();



+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ReviewByProvincialDeptManage.java View File

@@ -85,7 +85,7 @@ public class ReviewByProvincialDeptManage {
public String restartTheProcess(DefaultDeclaredDTO declaringDTO) {
ProjectDTO project = declaringDTO.getProjectInfo();
VUtils.isTrue(Objects.isNull(project.getId())).throwMessage("提交失败 缺少项目ID!");
Project projectInfo = projectService.getById(project.getId());
Project projectInfo = projectService.getNewProject(project.getId());
VUtils.isTrue(Objects.isNull(projectInfo)).throwMessage("提交失败 此项目不存在!");
String regionCode = projectInfo.getAreaCode();



+ 2
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/IProjectService.java View File

@@ -16,4 +16,6 @@ import java.util.List;
public interface IProjectService extends IService<Project> {

public List<Long> getAllVersionProjectId(Project project);

Project getNewProject(Long projectId);
}

+ 22
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/service/impl/ProjectServiceImpl.java View File

@@ -1,7 +1,9 @@
package com.ningdatech.pmapi.projectlib.service.impl;

import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ningdatech.pmapi.common.constant.BizConst;
import com.ningdatech.pmapi.projectlib.model.entity.Project;
import com.ningdatech.pmapi.projectlib.mapper.ProjectMapper;
import com.ningdatech.pmapi.projectlib.service.IProjectService;
@@ -10,6 +12,7 @@ import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;

/**
@@ -37,4 +40,23 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl

return projects.stream().map(Project::getId).collect(Collectors.toList());
}

@Override
public Project getNewProject(Long projectId) {
Project project = getById(projectId);

if(Objects.isNull(project)){
return null;
}

String projectCode = project.getProjectCode();

LambdaQueryWrapper<Project> last = Wrappers.lambdaQuery(Project.class)
.eq(Project::getNewest, Boolean.TRUE)
.eq(Project::getProjectCode, projectCode)
.last(BizConst.LIMIT_1);
Project newest = getOne(last);

return newest;
}
}

Loading…
Cancel
Save