Browse Source

Merge remote-tracking branch 'origin/master'

tags/24080901
liuxinxin 1 year ago
parent
commit
84a8674d38
39 changed files with 562 additions and 230 deletions
  1. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/ding/task/OrganizationBatchGetTask.java
  2. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/organization/mapper/DingEmployeeInfoMapper.java
  3. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/organization/mapper/DingOrganizationMapper.java
  4. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/organization/model/entity/DingEmployeeInfo.java
  5. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/organization/model/entity/DingOrganization.java
  6. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/organization/service/IDingEmployeeInfoService.java
  7. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/organization/service/IDingOrganizationService.java
  8. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/organization/service/impl/DingEmployeeInfoServiceImpl.java
  9. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/organization/service/impl/DingOrganizationServiceImpl.java
  10. +3
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/contants/DeclaredProjectContant.java
  11. +8
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/ConstructionPlanController.java
  12. +5
    -5
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/DeclaredProjectController.java
  13. +8
    -3
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/PrequalificationDeclaredController.java
  14. +61
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/ProjectAdjustmentController.java
  15. +0
    -45
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ConstructionPlanDTO.java
  16. +0
    -42
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/PreDeclaredProjectDTO.java
  17. +24
    -8
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java
  18. +88
    -14
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java
  19. +49
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DefaultDeclaredProjectManage.java
  20. +53
    -18
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/PrequalificationDeclaredProjectManage.java
  21. +79
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ProjectAdjustmentManage.java
  22. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/mapper/ProjectDraftMapper.java
  23. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/dto/DeclaredProjectListParamDTO.java
  24. +5
    -7
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/dto/DefaultDeclaredDTO.java
  25. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/dto/ProjectConditionDTO.java
  26. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/dto/ProjectDraftSaveDTO.java
  27. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/entity/ProjectDraft.java
  28. +44
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/req/AdjustmentListReq.java
  29. +38
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/req/ConstrctionPlanListReq.java
  30. +38
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/req/PrequalificationDeclaredListReq.java
  31. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/vo/ProjectDeclaredDetailVO.java
  32. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/vo/ProjectDeclaredListItemVO.java
  33. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/vo/ProjectDraftVO.java
  34. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/service/IProjectDraftService.java
  35. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/service/impl/ProjectDraftServiceImpl.java
  36. +22
    -18
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/helper/ProjectHelper.java
  37. +11
    -47
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/ProjectInst.java
  38. +6
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectListReq.java
  39. +1
    -1
      pmapi/src/test/java/com/ningdatech/pmapi/sys/project/DraftTest.java

+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/ding/task/OrganizationBatchGetTask.java View File

@@ -7,7 +7,7 @@ import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.ningdatech.basic.model.GenericResult; import com.ningdatech.basic.model.GenericResult;
import com.ningdatech.pmapi.ding.model.DingOrgInfoTreeDTO; import com.ningdatech.pmapi.ding.model.DingOrgInfoTreeDTO;
import com.ningdatech.pmapi.organization.entity.DingOrganization;
import com.ningdatech.pmapi.organization.model.entity.DingOrganization;
import com.ningdatech.pmapi.organization.service.IDingOrganizationService; import com.ningdatech.pmapi.organization.service.IDingOrganizationService;
import com.ningdatech.zwdd.client.ZwddClient; import com.ningdatech.zwdd.client.ZwddClient;
import com.ningdatech.zwdd.model.dto.DingOrgInfoDTO; import com.ningdatech.zwdd.model.dto.DingOrgInfoDTO;


+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/organization/mapper/DingEmployeeInfoMapper.java View File

@@ -1,6 +1,6 @@
package com.ningdatech.pmapi.organization.mapper; package com.ningdatech.pmapi.organization.mapper;


import com.ningdatech.pmapi.organization.entity.DingEmployeeInfo;
import com.ningdatech.pmapi.organization.model.entity.DingEmployeeInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;


/** /**


+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/organization/mapper/DingOrganizationMapper.java View File

@@ -1,6 +1,6 @@
package com.ningdatech.pmapi.organization.mapper; package com.ningdatech.pmapi.organization.mapper;


import com.ningdatech.pmapi.organization.entity.DingOrganization;
import com.ningdatech.pmapi.organization.model.entity.DingOrganization;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;


/** /**


pmapi/src/main/java/com/ningdatech/pmapi/organization/entity/DingEmployeeInfo.java → pmapi/src/main/java/com/ningdatech/pmapi/organization/model/entity/DingEmployeeInfo.java View File

@@ -1,4 +1,4 @@
package com.ningdatech.pmapi.organization.entity;
package com.ningdatech.pmapi.organization.model.entity;


import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable; import java.io.Serializable;

pmapi/src/main/java/com/ningdatech/pmapi/organization/entity/DingOrganization.java → pmapi/src/main/java/com/ningdatech/pmapi/organization/model/entity/DingOrganization.java View File

@@ -1,4 +1,4 @@
package com.ningdatech.pmapi.organization.entity;
package com.ningdatech.pmapi.organization.model.entity;


import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;

+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/organization/service/IDingEmployeeInfoService.java View File

@@ -1,6 +1,6 @@
package com.ningdatech.pmapi.organization.service; package com.ningdatech.pmapi.organization.service;


import com.ningdatech.pmapi.organization.entity.DingEmployeeInfo;
import com.ningdatech.pmapi.organization.model.entity.DingEmployeeInfo;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;


/** /**


+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/organization/service/IDingOrganizationService.java View File

@@ -1,6 +1,6 @@
package com.ningdatech.pmapi.organization.service; package com.ningdatech.pmapi.organization.service;


import com.ningdatech.pmapi.organization.entity.DingOrganization;
import com.ningdatech.pmapi.organization.model.entity.DingOrganization;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;


/** /**


+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/organization/service/impl/DingEmployeeInfoServiceImpl.java View File

@@ -1,6 +1,6 @@
package com.ningdatech.pmapi.organization.service.impl; package com.ningdatech.pmapi.organization.service.impl;


import com.ningdatech.pmapi.organization.entity.DingEmployeeInfo;
import com.ningdatech.pmapi.organization.model.entity.DingEmployeeInfo;
import com.ningdatech.pmapi.organization.mapper.DingEmployeeInfoMapper; import com.ningdatech.pmapi.organization.mapper.DingEmployeeInfoMapper;
import com.ningdatech.pmapi.organization.service.IDingEmployeeInfoService; import com.ningdatech.pmapi.organization.service.IDingEmployeeInfoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;


+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/organization/service/impl/DingOrganizationServiceImpl.java View File

@@ -1,6 +1,6 @@
package com.ningdatech.pmapi.organization.service.impl; package com.ningdatech.pmapi.organization.service.impl;


import com.ningdatech.pmapi.organization.entity.DingOrganization;
import com.ningdatech.pmapi.organization.model.entity.DingOrganization;
import com.ningdatech.pmapi.organization.mapper.DingOrganizationMapper; import com.ningdatech.pmapi.organization.mapper.DingOrganizationMapper;
import com.ningdatech.pmapi.organization.service.IDingOrganizationService; import com.ningdatech.pmapi.organization.service.IDingOrganizationService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;


+ 3
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/contants/DeclaredProjectContant.java View File

@@ -14,4 +14,7 @@ public interface DeclaredProjectContant {
public static final String PROJECT_STAGE_5 = "验收申报审批流程"; public static final String PROJECT_STAGE_5 = "验收申报审批流程";
} }


class Instance {
public static final String PROVINCE_INSTANCE_ID = "PROVINCE_AUDIT";
}
} }

+ 8
- 3
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/ConstructionPlanController.java View File

@@ -1,7 +1,8 @@
package com.ningdatech.pmapi.projectdeclared.controller; package com.ningdatech.pmapi.projectdeclared.controller;


import com.ningdatech.basic.model.PageVo; import com.ningdatech.basic.model.PageVo;
import com.ningdatech.pmapi.projectdeclared.entity.dto.ConstructionPlanDTO;
import com.ningdatech.pmapi.projectdeclared.model.dto.DefaultDeclaredDTO;
import com.ningdatech.pmapi.projectdeclared.model.req.ConstrctionPlanListReq;
import com.ningdatech.pmapi.projectdeclared.manage.ConstructionPlanManage; import com.ningdatech.pmapi.projectdeclared.manage.ConstructionPlanManage;
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum;
import com.ningdatech.pmapi.projectlib.manage.ProjectLibManage; import com.ningdatech.pmapi.projectlib.manage.ProjectLibManage;
@@ -11,6 +12,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;


@@ -34,7 +36,10 @@ public class ConstructionPlanController {


@ApiOperation(value = "可申报建设方案项目列表", notes = "可申报建设方案项目列表") @ApiOperation(value = "可申报建设方案项目列表", notes = "可申报建设方案项目列表")
@GetMapping("/list") @GetMapping("/list")
public PageVo<ProjectLibListItemVO> list(@Validated @ModelAttribute ProjectListReq req) {
public PageVo<ProjectLibListItemVO> list(@Validated @ModelAttribute ConstrctionPlanListReq planReq) {
//限定参数 复制bean
ProjectListReq req = new ProjectListReq();
BeanUtils.copyProperties(planReq,req);
//项目阶段 状态 已定 方案待申报 //项目阶段 状态 已定 方案待申报
req.setStage(ProjectStatusEnum.NOT_APPROVED.getCode()); req.setStage(ProjectStatusEnum.NOT_APPROVED.getCode());
req.setStatus(ProjectStatusEnum.PLAN_TO_BE_DECLARED.getCode()); req.setStatus(ProjectStatusEnum.PLAN_TO_BE_DECLARED.getCode());
@@ -43,7 +48,7 @@ public class ConstructionPlanController {


@ApiOperation(value = "建设方案申报", notes = "建设方案申报") @ApiOperation(value = "建设方案申报", notes = "建设方案申报")
@PostMapping("/start") @PostMapping("/start")
public String startTheProcess(@Validated @RequestBody ConstructionPlanDTO dto) {
public String startTheProcess(@Validated @RequestBody DefaultDeclaredDTO dto) {
String instanceId = constructionPlanManage.startTheProcess(dto); String instanceId = constructionPlanManage.startTheProcess(dto);
return "建设方案申报 【" + instanceId + "】 成功"; return "建设方案申报 【" + instanceId + "】 成功";
} }


+ 5
- 5
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/DeclaredProjectController.java View File

@@ -1,10 +1,10 @@
package com.ningdatech.pmapi.projectdeclared.controller; package com.ningdatech.pmapi.projectdeclared.controller;


import com.ningdatech.basic.model.PageVo; import com.ningdatech.basic.model.PageVo;
import com.ningdatech.pmapi.projectdeclared.entity.dto.DeclaredProjectDTO;
import com.ningdatech.pmapi.projectdeclared.entity.dto.DeclaredProjectListParamDTO;
import com.ningdatech.pmapi.projectdeclared.entity.dto.ProjectDraftSaveDTO;
import com.ningdatech.pmapi.projectdeclared.entity.vo.ProjectDraftVO;
import com.ningdatech.pmapi.projectdeclared.model.dto.DeclaredProjectListParamDTO;
import com.ningdatech.pmapi.projectdeclared.model.dto.DefaultDeclaredDTO;
import com.ningdatech.pmapi.projectdeclared.model.dto.ProjectDraftSaveDTO;
import com.ningdatech.pmapi.projectdeclared.model.vo.ProjectDraftVO;
import com.ningdatech.pmapi.projectdeclared.manage.DeclaredProjectManage; import com.ningdatech.pmapi.projectdeclared.manage.DeclaredProjectManage;
import com.ningdatech.pmapi.projectlib.manage.ProjectLibManage; import com.ningdatech.pmapi.projectlib.manage.ProjectLibManage;
import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq;
@@ -59,7 +59,7 @@ public class DeclaredProjectController {


@ApiOperation(value = "申报项目", notes = "申报项目") @ApiOperation(value = "申报项目", notes = "申报项目")
@PostMapping("/start") @PostMapping("/start")
public String startTheProcess(@Validated @RequestBody DeclaredProjectDTO dto) {
public String startTheProcess(@Validated @RequestBody DefaultDeclaredDTO dto) {
String instanceId = declaredProjectManage.startTheProcess(dto); String instanceId = declaredProjectManage.startTheProcess(dto);
return "启动流程实例 【" + instanceId + "】 成功"; return "启动流程实例 【" + instanceId + "】 成功";
} }


+ 8
- 3
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/PrequalificationDeclaredController.java View File

@@ -1,7 +1,8 @@
package com.ningdatech.pmapi.projectdeclared.controller; package com.ningdatech.pmapi.projectdeclared.controller;


import com.ningdatech.basic.model.PageVo; import com.ningdatech.basic.model.PageVo;
import com.ningdatech.pmapi.projectdeclared.entity.dto.PreDeclaredProjectDTO;
import com.ningdatech.pmapi.projectdeclared.model.dto.DefaultDeclaredDTO;
import com.ningdatech.pmapi.projectdeclared.model.req.PrequalificationDeclaredListReq;
import com.ningdatech.pmapi.projectdeclared.manage.PrequalificationDeclaredProjectManage; import com.ningdatech.pmapi.projectdeclared.manage.PrequalificationDeclaredProjectManage;
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum;
import com.ningdatech.pmapi.projectlib.manage.ProjectLibManage; import com.ningdatech.pmapi.projectlib.manage.ProjectLibManage;
@@ -11,6 +12,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;


@@ -34,7 +36,10 @@ public class PrequalificationDeclaredController {


@ApiOperation(value = "可预审申报项目列表", notes = "可预审申报项目列表") @ApiOperation(value = "可预审申报项目列表", notes = "可预审申报项目列表")
@GetMapping("/list") @GetMapping("/list")
public PageVo<ProjectLibListItemVO> list(@Validated @ModelAttribute ProjectListReq req) {
public PageVo<ProjectLibListItemVO> list(@Validated @ModelAttribute PrequalificationDeclaredListReq preReq) {
//限定参数 复制bean
ProjectListReq req = new ProjectListReq();
BeanUtils.copyProperties(preReq,req);
//项目阶段 状态 已定 待预审 //项目阶段 状态 已定 待预审
req.setStage(ProjectStatusEnum.NOT_APPROVED.getCode()); req.setStage(ProjectStatusEnum.NOT_APPROVED.getCode());
req.setStatus(ProjectStatusEnum.PENDING_PREQUALIFICATION.getCode()); req.setStatus(ProjectStatusEnum.PENDING_PREQUALIFICATION.getCode());
@@ -43,7 +48,7 @@ public class PrequalificationDeclaredController {


@ApiOperation(value = "申报预审", notes = "申报预审") @ApiOperation(value = "申报预审", notes = "申报预审")
@PostMapping("/start") @PostMapping("/start")
public String startTheProcess(@Validated @RequestBody PreDeclaredProjectDTO dto) {
public String startTheProcess(@Validated @RequestBody DefaultDeclaredDTO dto) {
String instanceId = prequalificationDeclaredProjectManage.startTheProcess(dto); String instanceId = prequalificationDeclaredProjectManage.startTheProcess(dto);
return "提交预审 【" + instanceId + "】 成功"; return "提交预审 【" + instanceId + "】 成功";
} }


+ 61
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/ProjectAdjustmentController.java View File

@@ -0,0 +1,61 @@
package com.ningdatech.pmapi.projectdeclared.controller;

import com.ningdatech.basic.model.PageVo;
import com.ningdatech.pmapi.projectdeclared.model.dto.DefaultDeclaredDTO;
import com.ningdatech.pmapi.projectdeclared.model.req.AdjustmentListReq;
import com.ningdatech.pmapi.projectdeclared.manage.ProjectAdjustmentManage;
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum;
import com.ningdatech.pmapi.projectlib.manage.ProjectLibManage;
import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq;
import com.ningdatech.pmapi.projectlib.model.vo.ProjectLibListItemVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.Arrays;

/**
* @Classname ConstructionPlanController
* @Description 建设方案申报
* @Date 2023/2/13 9:53
* @Author PoffyZhang
*/
@Slf4j
@Validated
@RestController
@RequestMapping("/api/v1/project/adjustment")
@Api(value = "ProjectAdjustment", tags = "申报管理-项目内容调整")
@RequiredArgsConstructor
public class ProjectAdjustmentController {

private final ProjectAdjustmentManage projectAdjustmentManage;

private final ProjectLibManage projectLibManage;

@ApiOperation(value = "可做项目内容调整的列表", notes = "可做项目内容调整的列表")
@GetMapping("/list")
public PageVo<ProjectLibListItemVO> list(@Validated @ModelAttribute AdjustmentListReq preReq) {
//限定参数 复制bean
ProjectListReq req = new ProjectListReq();
BeanUtils.copyProperties(preReq,req);
//项目阶段 状态 已定 方案待申报
req.setStageList(Arrays.asList(ProjectStatusEnum.NOT_APPROVED.getCode()));
//只有 单位内部审核不通过 省级联审不通过 预审不通过 建设方案不通过 4种状态
req.setStatusList(Arrays.asList(ProjectStatusEnum.UNDER_INTERNAL_AUDIT_NOT_PASS.getCode(),
ProjectStatusEnum.PREQUALIFICATION_FAILED.getCode(),
ProjectStatusEnum.THE_JOINT_REVIEW_OF_PROVINCIAL_DEPARTMENTS_FAILED.getCode(),
ProjectStatusEnum.SCHEME_REVIEW_FAILED.getCode()));
return projectLibManage.projectLibList(req);
}

@ApiOperation(value = "项目内容调整", notes = "项目内容调整")
@PostMapping
public String startTheProcess(@Validated @RequestBody DefaultDeclaredDTO dto) {
String instanceId = projectAdjustmentManage.adjustment(dto);
return "建设方案申报 【" + instanceId + "】 成功";
}
}

+ 0
- 45
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ConstructionPlanDTO.java View File

@@ -1,45 +0,0 @@
package com.ningdatech.pmapi.projectdeclared.entity.dto;

import cn.hutool.core.collection.CollUtil;
import com.google.common.collect.Maps;
import com.wflow.workflow.bean.dto.ProcessInstanceUserDto;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Map;

/**
* @Classname DeclaredProjectDto
* @Description 申报项目
* @Date 2023/2/1 14:52
* @Author PoffyZhang
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ConstructionPlanDTO implements Serializable {

@NotNull
private Long projectId;

//建设方案文件
private String constructionPlanFile;

private Map<String,Object> formData;

@NotNull
private ProcessInstanceUserDto user;

public Map<String,Object> getFormData(){
if(CollUtil.isEmpty(this.formData)){
this.formData = Maps.newHashMap();
return this.formData;
}
return this.formData;
}
}

+ 0
- 42
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/PreDeclaredProjectDTO.java View File

@@ -1,42 +0,0 @@
package com.ningdatech.pmapi.projectdeclared.entity.dto;

import cn.hutool.core.collection.CollUtil;
import com.google.common.collect.Maps;
import com.wflow.workflow.bean.dto.ProcessInstanceUserDto;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Map;

/**
* @Classname DeclaredProjectDto
* @Description 申报项目
* @Date 2023/2/1 14:52
* @Author PoffyZhang
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PreDeclaredProjectDTO implements Serializable {

@NotNull
private Long projectId;

private Map<String,Object> formData;

@NotNull
private ProcessInstanceUserDto user;

public Map<String,Object> getFormData(){
if(CollUtil.isEmpty(this.formData)){
this.formData = Maps.newHashMap();
return this.formData;
}
return this.formData;
}
}

+ 24
- 8
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ConstructionPlanManage.java View File

@@ -6,10 +6,13 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ningdatech.basic.function.VUtils; import com.ningdatech.basic.function.VUtils;
import com.ningdatech.pmapi.common.enumeration.ProjectProcessStageEnum; import com.ningdatech.pmapi.common.enumeration.ProjectProcessStageEnum;
import com.ningdatech.pmapi.common.statemachine.util.StateMachineUtils; import com.ningdatech.pmapi.common.statemachine.util.StateMachineUtils;
import com.ningdatech.pmapi.projectdeclared.entity.dto.ConstructionPlanDTO;
import com.ningdatech.pmapi.projectdeclared.entity.dto.ProjectConditionDTO;
import com.ningdatech.pmapi.projectdeclared.model.dto.DefaultDeclaredDTO;
import com.ningdatech.pmapi.projectdeclared.model.dto.ProjectConditionDTO;
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum;
import com.ningdatech.pmapi.projectlib.model.dto.ProjectDTO;
import com.ningdatech.pmapi.projectlib.model.entity.Project; import com.ningdatech.pmapi.projectlib.model.entity.Project;
import com.ningdatech.pmapi.projectlib.model.entity.ProjectInst;
import com.ningdatech.pmapi.projectlib.service.IProjectInstService;
import com.ningdatech.pmapi.projectlib.service.IProjectService; import com.ningdatech.pmapi.projectlib.service.IProjectService;
import com.wflow.bean.entity.WflowModels; import com.wflow.bean.entity.WflowModels;
import com.wflow.exception.BusinessException; import com.wflow.exception.BusinessException;
@@ -18,6 +21,7 @@ import com.wflow.workflow.service.ProcessInstanceService;
import com.wflow.workflow.service.ProcessModelService; import com.wflow.workflow.service.ProcessModelService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;


@@ -35,7 +39,7 @@ import java.util.Objects;
@Component @Component
@Slf4j @Slf4j
@RequiredArgsConstructor @RequiredArgsConstructor
public class ConstructionPlanManage {
public class ConstructionPlanManage {


private final IProjectService projectService; private final IProjectService projectService;


@@ -45,16 +49,20 @@ public class ConstructionPlanManage {


private final StateMachineUtils stateMachineUtils; private final StateMachineUtils stateMachineUtils;


private final IProjectInstService projectInstService;

/** /**
* 提交预审 * 提交预审
* *
* @param dto * @param dto
* @return * @return
*/ */
public String startTheProcess(ConstructionPlanDTO dto) {
Project projectInfo = projectService.getById(dto.getProjectId());

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


String regionCode = projectInfo.getAreaCode(); String regionCode = projectInfo.getAreaCode();


@@ -72,7 +80,7 @@ public class ConstructionPlanManage {
VUtils.isTrue(!ProjectStatusEnum.PLAN_TO_BE_DECLARED.getCode().equals(projectInfo.getStatus()) || VUtils.isTrue(!ProjectStatusEnum.PLAN_TO_BE_DECLARED.getCode().equals(projectInfo.getStatus()) ||
!ProjectStatusEnum.NOT_APPROVED.getCode().equals(projectInfo.getStage())) !ProjectStatusEnum.NOT_APPROVED.getCode().equals(projectInfo.getStage()))
.throwMessage("提交失败 该项目不是 待预审状态或者未立项阶段"); .throwMessage("提交失败 该项目不是 待预审状态或者未立项阶段");
//TODO 再判断 该项目是否 真实走完 单位内部审批
// TODO 再判断 该项目是否 真实走完 预审审批


ProcessStartParamsVo params = new ProcessStartParamsVo(); ProcessStartParamsVo params = new ProcessStartParamsVo();
params.setUser(dto.getUser()); params.setUser(dto.getUser());
@@ -89,7 +97,7 @@ public class ConstructionPlanManage {
log.info("建设方案项目申报成功 【{}】", instanceId); log.info("建设方案项目申报成功 【{}】", instanceId);


//保存建设项目 //保存建设项目
modifyProject(projectInfo, instanceId, dto.getConstructionPlanFile());
modifyProject(projectInfo, instanceId, projectInfo.getConstructionPlanFile());


return instanceId; return instanceId;
} }
@@ -109,6 +117,14 @@ public class ConstructionPlanManage {
//调用状态机 进入下一个通过状态 //调用状态机 进入下一个通过状态
stateMachineUtils.execute(project, stateMachineUtils.getProjectStatusPassEvent(project.getStatus())); stateMachineUtils.execute(project, stateMachineUtils.getProjectStatusPassEvent(project.getStatus()));
projectService.updateById(project); projectService.updateById(project);

//保存项目和实例的关系
ProjectInst projectInst = new ProjectInst();
projectInst.setProjectId(project.getId());
projectInst.setInstCode(instanceId);
projectInst.setCreatOn(LocalDateTime.now());
projectInst.setUpdateOn(LocalDateTime.now());
projectInstService.save(projectInst);
} catch (Exception e) { } catch (Exception e) {
log.error("提交建设方案 项目信息修改 错误 ", e); log.error("提交建设方案 项目信息修改 错误 ", e);
throw new BusinessException("提交建设方案 项目信息修改 错误 :" + e.getMessage()); throw new BusinessException("提交建设方案 项目信息修改 错误 :" + e.getMessage());


+ 88
- 14
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DeclaredProjectManage.java View File

@@ -6,20 +6,23 @@ import com.alibaba.fastjson.TypeReference;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
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.ningdatech.basic.function.VUtils;
import com.ningdatech.basic.model.PageVo; import com.ningdatech.basic.model.PageVo;
import com.ningdatech.pmapi.common.enumeration.ProjectProcessStageEnum; import com.ningdatech.pmapi.common.enumeration.ProjectProcessStageEnum;
import com.ningdatech.pmapi.projectdeclared.entity.ProjectDraft;
import com.ningdatech.pmapi.projectdeclared.entity.dto.DeclaredProjectDTO;
import com.ningdatech.pmapi.projectdeclared.entity.dto.DeclaredProjectListParamDTO;
import com.ningdatech.pmapi.projectdeclared.entity.dto.ProjectConditionDTO;
import com.ningdatech.pmapi.projectdeclared.entity.dto.ProjectDraftSaveDTO;
import com.ningdatech.pmapi.projectdeclared.entity.vo.ProjectDraftVO;
import com.ningdatech.pmapi.projectdeclared.model.entity.ProjectDraft;
import com.ningdatech.pmapi.projectdeclared.model.dto.DeclaredProjectListParamDTO;
import com.ningdatech.pmapi.projectdeclared.model.dto.DefaultDeclaredDTO;
import com.ningdatech.pmapi.projectdeclared.model.dto.ProjectConditionDTO;
import com.ningdatech.pmapi.projectdeclared.model.dto.ProjectDraftSaveDTO;
import com.ningdatech.pmapi.projectdeclared.model.vo.ProjectDraftVO;
import com.ningdatech.pmapi.projectdeclared.service.IProjectDraftService; import com.ningdatech.pmapi.projectdeclared.service.IProjectDraftService;
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum;
import com.ningdatech.pmapi.projectlib.model.dto.ProjectDTO; import com.ningdatech.pmapi.projectlib.model.dto.ProjectDTO;
import com.ningdatech.pmapi.projectlib.model.entity.Project; import com.ningdatech.pmapi.projectlib.model.entity.Project;
import com.ningdatech.pmapi.projectlib.model.entity.ProjectApplication; import com.ningdatech.pmapi.projectlib.model.entity.ProjectApplication;
import com.ningdatech.pmapi.projectlib.model.entity.ProjectInst;
import com.ningdatech.pmapi.projectlib.service.IProjectApplicationService; import com.ningdatech.pmapi.projectlib.service.IProjectApplicationService;
import com.ningdatech.pmapi.projectlib.service.IProjectInstService;
import com.ningdatech.pmapi.projectlib.service.IProjectService; import com.ningdatech.pmapi.projectlib.service.IProjectService;
import com.wflow.bean.entity.WflowModels; import com.wflow.bean.entity.WflowModels;
import com.wflow.exception.BusinessException; import com.wflow.exception.BusinessException;
@@ -60,6 +63,8 @@ public class DeclaredProjectManage {


private final ProcessModelService processModelService; private final ProcessModelService processModelService;


private final IProjectInstService projectInstService;

public PageVo<ProjectDraftVO> pageDraft(DeclaredProjectListParamDTO params) { public PageVo<ProjectDraftVO> pageDraft(DeclaredProjectListParamDTO params) {
Page<ProjectDraft> page = params.page(); Page<ProjectDraft> page = params.page();
LambdaQueryWrapper<ProjectDraft> wrapper = Wrappers.lambdaQuery(ProjectDraft.class) LambdaQueryWrapper<ProjectDraft> wrapper = Wrappers.lambdaQuery(ProjectDraft.class)
@@ -98,12 +103,12 @@ public class DeclaredProjectManage {
} }


/** /**
* 启动实例
* 新项目 启动实例
* *
* @param dto * @param dto
* @return * @return
*/ */
public String startTheProcess(DeclaredProjectDTO dto) {
public String startTheProcess(DefaultDeclaredDTO dto) {
ProjectDTO projectInfo = dto.getProjectInfo(); ProjectDTO projectInfo = dto.getProjectInfo();
String regionCode = projectInfo.getAreaCode(); String regionCode = projectInfo.getAreaCode();


@@ -123,12 +128,10 @@ public class DeclaredProjectManage {
//放入条件判断的项目字段 //放入条件判断的项目字段
ProjectConditionDTO conditionDto = new ProjectConditionDTO(); ProjectConditionDTO conditionDto = new ProjectConditionDTO();
BeanUtils.copyProperties(dto.getProjectInfo(), conditionDto); BeanUtils.copyProperties(dto.getProjectInfo(), conditionDto);
if (Objects.nonNull(conditionDto)) {
dto.getFormData().putAll(
JSON.parseObject(JSON.toJSONString(conditionDto), new TypeReference<Map<String, Object>>() {
})
);
}
dto.getFormData().putAll(
JSON.parseObject(JSON.toJSONString(conditionDto), new TypeReference<Map<String, Object>>() {
})
);
params.setFormData(dto.getFormData()); params.setFormData(dto.getFormData());
String instanceId = processService.startProcess(model.getProcessDefId(), params); String instanceId = processService.startProcess(model.getProcessDefId(), params);
log.info("申报项目成功 【{}】", instanceId); log.info("申报项目成功 【{}】", instanceId);
@@ -140,6 +143,70 @@ public class DeclaredProjectManage {
} }


/** /**
* 重新提交 启动实例
*
* @param dto
* @return
*/
public String reStartTheProcess(DefaultDeclaredDTO dto) {
ProjectDTO projectDto = dto.getProjectInfo();
VUtils.isTrue(Objects.isNull(projectDto.getId())).throwMessage("提交失败 缺少项目ID!");
Project projectInfo = projectService.getById(projectDto.getId());
VUtils.isTrue(Objects.isNull(projectInfo)).throwMessage("提交失败 此项目不存在!");

String regionCode = projectInfo.getAreaCode();
WflowModels model = processModelService.getOne(Wrappers.lambdaQuery(WflowModels.class)
.eq(WflowModels::getRegionCode, regionCode)
.eq(WflowModels::getProcessType, ProjectProcessStageEnum.ORG_INTERNAL_APPROVAL_PROCESS.getCode())
.last("limit 1"));

if (Objects.isNull(model)) {
log.error("此 【{}】区域找不到单位流程配置", regionCode);
throw new BusinessException(String.format("此 【%s】区域找不到单位流程配置", regionCode));
}

ProcessStartParamsVo params = new ProcessStartParamsVo();
params.setUser(dto.getUser());
params.setProcessUsers(Collections.emptyMap());
//放入条件判断的项目字段
ProjectConditionDTO conditionDto = new ProjectConditionDTO();
BeanUtils.copyProperties(dto.getProjectInfo(), conditionDto);
dto.getFormData().putAll(
JSON.parseObject(JSON.toJSONString(conditionDto), new TypeReference<Map<String, Object>>() {
})
);
params.setFormData(dto.getFormData());
String instanceId = processService.startProcess(model.getProcessDefId(), params);
log.info("重新申报项目成功 【{}】", instanceId);

//保存项目
modifyProject(projectInfo, instanceId);

return instanceId;
}

private void modifyProject(Project project, String instanceId) {
//流程启动之后 入库项目 重要业务信息 用于列表查询 展示
try {
project.setUpdateOn(LocalDateTime.now());
project.setInstCode(instanceId);
project.setStage(ProjectStatusEnum.NOT_APPROVED.getCode());
project.setStatus(ProjectStatusEnum.UNDER_INTERNAL_AUDIT.getCode());
projectService.updateById(project);
//保存项目和实例的关系
ProjectInst projectInst = new ProjectInst();
projectInst.setProjectId(project.getId());
projectInst.setInstCode(instanceId);
projectInst.setCreatOn(LocalDateTime.now());
projectInst.setUpdateOn(LocalDateTime.now());
projectInstService.save(projectInst);
} catch (Exception e) {
log.error("重新申报项目 项目信息修改 错误 ", e);
throw new BusinessException("重新申报项目 项目信息修改 错误 :" + e.getMessage());
}
}

/**
* 申报项目 时 新增项目到项目库 * 申报项目 时 新增项目到项目库
* *
* @param projectDto * @param projectDto
@@ -168,6 +235,13 @@ public class DeclaredProjectManage {
}).collect(Collectors.toList()); }).collect(Collectors.toList());
projectApplicationService.saveBatch(applications); projectApplicationService.saveBatch(applications);
} }
//保存项目和实例的关系
ProjectInst projectInst = new ProjectInst();
projectInst.setProjectId(project.getId());
projectInst.setInstCode(instanceId);
projectInst.setCreatOn(LocalDateTime.now());
projectInst.setUpdateOn(LocalDateTime.now());
projectInstService.save(projectInst);
} catch (Exception e) { } catch (Exception e) {
log.error("项目信息入库错误 ", e); log.error("项目信息入库错误 ", e);
throw new BusinessException("项目信息入库错误 :" + e.getMessage()); throw new BusinessException("项目信息入库错误 :" + e.getMessage());


+ 49
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/DefaultDeclaredProjectManage.java View File

@@ -0,0 +1,49 @@
package com.ningdatech.pmapi.projectdeclared.manage;

import com.google.common.collect.Maps;
import com.ningdatech.pmapi.projectdeclared.model.dto.DefaultDeclaredDTO;
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import java.util.Map;
import java.util.function.Function;

/**
* @Classname DefaultDeclaredProjectManage
*
* @Description
* @Date 2023/2/14 17:12
* @Author PoffyZhang
*/
@Component
@Slf4j
@RequiredArgsConstructor
public class DefaultDeclaredProjectManage {

private final DeclaredProjectManage declaredProjectManage;

private final ConstructionPlanManage constructionPlanManage;

private final PrequalificationDeclaredProjectManage prequalificationDeclaredProjectManage;
public Map<Integer, Function<DefaultDeclaredDTO,String>> startProcessMap = Maps.newHashMap();

/**
* 初始化业务分派逻辑,代替了if-else部分
* key: 枚举 状态值
* value: lambda表达式,最终会获取发起实例的函数
*/
@PostConstruct
public void startProcessInit(){
startProcessMap.put(ProjectStatusEnum.UNDER_INTERNAL_AUDIT_NOT_PASS.getCode(),
dto->declaredProjectManage.reStartTheProcess(dto));
startProcessMap.put(ProjectStatusEnum.SCHEME_REVIEW_FAILED.getCode(),
dto->constructionPlanManage.startTheProcess(dto));
startProcessMap.put(ProjectStatusEnum.PREQUALIFICATION_FAILED.getCode(),
dto->prequalificationDeclaredProjectManage.startTheProcess(dto));
startProcessMap.put(ProjectStatusEnum.THE_JOINT_REVIEW_OF_PROVINCIAL_DEPARTMENTS_FAILED.getCode(),
dto->null);
}

}

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

@@ -6,10 +6,14 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ningdatech.basic.function.VUtils; import com.ningdatech.basic.function.VUtils;
import com.ningdatech.pmapi.common.enumeration.ProjectProcessStageEnum; import com.ningdatech.pmapi.common.enumeration.ProjectProcessStageEnum;
import com.ningdatech.pmapi.common.statemachine.util.StateMachineUtils; import com.ningdatech.pmapi.common.statemachine.util.StateMachineUtils;
import com.ningdatech.pmapi.projectdeclared.entity.dto.PreDeclaredProjectDTO;
import com.ningdatech.pmapi.projectdeclared.entity.dto.ProjectConditionDTO;
import com.ningdatech.pmapi.projectdeclared.contants.DeclaredProjectContant;
import com.ningdatech.pmapi.projectdeclared.model.dto.DefaultDeclaredDTO;
import com.ningdatech.pmapi.projectdeclared.model.dto.ProjectConditionDTO;
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum; import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum;
import com.ningdatech.pmapi.projectlib.model.dto.ProjectDTO;
import com.ningdatech.pmapi.projectlib.model.entity.Project; import com.ningdatech.pmapi.projectlib.model.entity.Project;
import com.ningdatech.pmapi.projectlib.model.entity.ProjectInst;
import com.ningdatech.pmapi.projectlib.service.IProjectInstService;
import com.ningdatech.pmapi.projectlib.service.IProjectService; import com.ningdatech.pmapi.projectlib.service.IProjectService;
import com.wflow.bean.entity.WflowModels; import com.wflow.bean.entity.WflowModels;
import com.wflow.exception.BusinessException; import com.wflow.exception.BusinessException;
@@ -45,15 +49,18 @@ public class PrequalificationDeclaredProjectManage {


private final ProcessModelService processModelService; private final ProcessModelService processModelService;


private final IProjectInstService projectInstService;

/** /**
* 提交预审 * 提交预审
* *
* @param dto * @param dto
* @return * @return
*/ */
public String startTheProcess(PreDeclaredProjectDTO dto) {
Project projectInfo = projectService.getById(dto.getProjectId());

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


String regionCode = projectInfo.getAreaCode(); String regionCode = projectInfo.getAreaCode();
@@ -74,24 +81,44 @@ public class PrequalificationDeclaredProjectManage {
.throwMessage("提交失败 该项目不是 待预审状态或者未立项阶段"); .throwMessage("提交失败 该项目不是 待预审状态或者未立项阶段");
//TODO 再判断 该项目是否 真实走完 单位内部审批 //TODO 再判断 该项目是否 真实走完 单位内部审批


ProcessStartParamsVo params = new ProcessStartParamsVo();
params.setUser(dto.getUser());
params.setProcessUsers(Collections.emptyMap());
//放入条件判断的项目字段
ProjectConditionDTO conditionDto = new ProjectConditionDTO();
BeanUtils.copyProperties(projectInfo, conditionDto);
if (Objects.nonNull(conditionDto)) {
//使用状态机 进入下一步 看看需不需要走省级审批
try {
stateMachineUtils.execute(projectInfo,stateMachineUtils.getProjectStatusPassEvent(projectInfo.getStatus()));
} catch (Exception e) {
log.error("项目 调用状态机出错:",e);
throw new BusinessException(projectInfo.getId() + "项目 调用状态机出错 :" + e.getMessage());
}

String instanceId = null;
//如果是省级部门 需要联审的(申报金额大于1000万 并且是市级项目)
if(ProjectStatusEnum.JOINT_REVIEW_BY_PROVINCIAL_DEPARTMENTS
.getCode().equals(projectInfo.getStatus())){
//TODO 对接外部 省级
instanceId = DeclaredProjectContant.Instance.PROVINCE_INSTANCE_ID;
}else if(ProjectStatusEnum.PRE_APPLYING
.getCode().equals(projectInfo.getStatus())){
//如果是非省级联审的项目 直接提交 预审
ProcessStartParamsVo params = new ProcessStartParamsVo();
params.setUser(dto.getUser());
params.setProcessUsers(Collections.emptyMap());
//放入条件判断的项目字段
ProjectConditionDTO conditionDto = new ProjectConditionDTO();
BeanUtils.copyProperties(projectInfo, conditionDto);
dto.getFormData().putAll( dto.getFormData().putAll(
JSON.parseObject(JSON.toJSONString(conditionDto), new TypeReference<Map<String, Object>>() { JSON.parseObject(JSON.toJSONString(conditionDto), new TypeReference<Map<String, Object>>() {
}) })
); );
params.setFormData(dto.getFormData());
instanceId = processService.startProcess(model.getProcessDefId(), params);
log.info("提交预审项目成功 【{}】", instanceId);

//保存预审项目
if(Objects.nonNull(instanceId)){
modifyProject(projectInfo, instanceId);
}
}else{
throw new BusinessException("项目状态 错误 project :" + JSON.toJSONString(projectInfo));
} }
params.setFormData(dto.getFormData());
String instanceId = processService.startProcess(model.getProcessDefId(), params);
log.info("提交预审项目成功 【{}】", instanceId);

//保存预审项目
modifyProject(projectInfo, instanceId);


return instanceId; return instanceId;
} }
@@ -110,6 +137,14 @@ public class PrequalificationDeclaredProjectManage {
//调用状态机 进入下一个通过状态 //调用状态机 进入下一个通过状态
stateMachineUtils.execute(project, stateMachineUtils.getProjectStatusPassEvent(project.getStatus())); stateMachineUtils.execute(project, stateMachineUtils.getProjectStatusPassEvent(project.getStatus()));
projectService.updateById(project); projectService.updateById(project);

//保存项目和实例的关系
ProjectInst projectInst = new ProjectInst();
projectInst.setProjectId(project.getId());
projectInst.setInstCode(instanceId);
projectInst.setCreatOn(LocalDateTime.now());
projectInst.setUpdateOn(LocalDateTime.now());
projectInstService.save(projectInst);
} catch (Exception e) { } catch (Exception e) {
log.error("提交预审 项目信息修改 错误 ", e); log.error("提交预审 项目信息修改 错误 ", e);
throw new BusinessException("提交预审 项目信息修改 错误 :" + e.getMessage()); throw new BusinessException("提交预审 项目信息修改 错误 :" + e.getMessage());


+ 79
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ProjectAdjustmentManage.java View File

@@ -0,0 +1,79 @@
package com.ningdatech.pmapi.projectdeclared.manage;

import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.ningdatech.basic.function.VUtils;
import com.ningdatech.pmapi.projectdeclared.model.dto.DefaultDeclaredDTO;
import com.ningdatech.pmapi.projectlib.model.dto.ProjectDTO;
import com.ningdatech.pmapi.projectlib.model.entity.Project;
import com.ningdatech.pmapi.projectlib.model.entity.ProjectApplication;
import com.ningdatech.pmapi.projectlib.service.IProjectApplicationService;
import com.ningdatech.pmapi.projectlib.service.IProjectService;
import com.wflow.exception.BusinessException;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Objects;
import java.util.function.Function;
import java.util.stream.Collectors;

/**
* @Classname ProjectAdjustmentManage
* @Description 项目内容调整
* @Date 2023/2/1 14:48
* @Author PoffyZhang
*/
@Component
@Slf4j
@RequiredArgsConstructor
public class ProjectAdjustmentManage {

private final IProjectService projectService;

private final IProjectApplicationService projectApplicationService;

private final DefaultDeclaredProjectManage defaultDeclaredProjectManage;

/**
* 项目内容调整
* @param dto
* @return
*/
public String adjustment(DefaultDeclaredDTO dto) {
ProjectDTO projectDto = dto.getProjectInfo();
Project projectInfo = projectService.getById(projectDto.getId());

VUtils.isTrue(Objects.isNull(projectInfo)).throwMessage("调整失败 此项目不存在!");

//先修改项目信息
Project project = new Project();
BeanUtils.copyProperties(projectDto,project);
project.setUpdateOn(LocalDateTime.now());
if(!projectService.updateById(project)){
throw new BusinessException("项目调整失败");
}
//再修改应用信息
if(CollUtil.isNotEmpty(projectDto.getApplicationList())){
//采取批量删除 批量添加的方式
projectApplicationService.remove(Wrappers.lambdaQuery(ProjectApplication.class)
.eq(ProjectApplication::getProjectId,project.getId()));
//批量添加
List<ProjectApplication> applications = projectDto.getApplicationList().stream().map(application -> {
ProjectApplication projectApplication = new ProjectApplication();
BeanUtils.copyProperties(application, projectApplication);
projectApplication.setProjectId(project.getId());
return projectApplication;
}).collect(Collectors.toList());
projectApplicationService.saveBatch(applications);
}

//最后去重新 提交项目流程 不同的状态 提交到不同的工作流去
Function<DefaultDeclaredDTO, String> declaredFunction =
defaultDeclaredProjectManage.startProcessMap.get(project.getStatus());
VUtils.isTrue(Objects.isNull(declaredFunction)).throwMessage("状态不正常 没有找到对应申报函数!");
return declaredFunction.apply(dto);
}
}

+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/mapper/ProjectDraftMapper.java View File

@@ -1,7 +1,7 @@
package com.ningdatech.pmapi.projectdeclared.mapper; package com.ningdatech.pmapi.projectdeclared.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ningdatech.pmapi.projectdeclared.entity.ProjectDraft;
import com.ningdatech.pmapi.projectdeclared.model.entity.ProjectDraft;


/** /**
* <p> * <p>


pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectListParamDTO.java → pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/dto/DeclaredProjectListParamDTO.java View File

@@ -1,4 +1,4 @@
package com.ningdatech.pmapi.projectdeclared.entity.dto;
package com.ningdatech.pmapi.projectdeclared.model.dto;


import com.ningdatech.basic.model.PagePo; import com.ningdatech.basic.model.PagePo;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;

pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/DeclaredProjectDTO.java → pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/dto/DefaultDeclaredDTO.java View File

@@ -1,11 +1,10 @@
package com.ningdatech.pmapi.projectdeclared.entity.dto;
package com.ningdatech.pmapi.projectdeclared.model.dto;


import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.ningdatech.pmapi.projectlib.model.dto.ProjectDTO; import com.ningdatech.pmapi.projectlib.model.dto.ProjectDTO;
import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; import com.wflow.workflow.bean.dto.ProcessInstanceUserDto;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;


@@ -14,16 +13,15 @@ import java.io.Serializable;
import java.util.Map; import java.util.Map;


/** /**
* @Classname DeclaredProjectDto
* @Description 申报项目
* @Date 2023/2/1 14:52
* @Classname DefaultDeclaredDTO
* @Description
* @Date 2023/2/14 17:16
* @Author PoffyZhang * @Author PoffyZhang
*/ */
@Data @Data
@Builder
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
public class DeclaredProjectDTO implements Serializable {
public class DefaultDeclaredDTO implements Serializable {


@NotNull @NotNull
private ProjectDTO projectInfo; private ProjectDTO projectInfo;

pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ProjectConditionDTO.java → pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/dto/ProjectConditionDTO.java View File

@@ -1,4 +1,4 @@
package com.ningdatech.pmapi.projectdeclared.entity.dto;
package com.ningdatech.pmapi.projectdeclared.model.dto;


import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;

pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/dto/ProjectDraftSaveDTO.java → pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/dto/ProjectDraftSaveDTO.java View File

@@ -1,4 +1,4 @@
package com.ningdatech.pmapi.projectdeclared.entity.dto;
package com.ningdatech.pmapi.projectdeclared.model.dto;


import com.ningdatech.pmapi.projectlib.model.dto.ProjectDTO; import com.ningdatech.pmapi.projectlib.model.dto.ProjectDTO;
import com.wflow.workflow.bean.dto.ProcessInstanceUserDto; import com.wflow.workflow.bean.dto.ProcessInstanceUserDto;

pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/ProjectDraft.java → pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/entity/ProjectDraft.java View File

@@ -1,4 +1,4 @@
package com.ningdatech.pmapi.projectdeclared.entity;
package com.ningdatech.pmapi.projectdeclared.model.entity;


import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;

+ 44
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/req/AdjustmentListReq.java View File

@@ -0,0 +1,44 @@
package com.ningdatech.pmapi.projectdeclared.model.req;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
* @Classname AdjustmentListReq
* @Description
* @Date 2023/2/14 11:42
* @Author PoffyZhang
*/
@Data
public class AdjustmentListReq {

@ApiModelProperty("项目名称")
private String projectName;

@ApiModelProperty("申报单位")
private String buildOrg;

@ApiModelProperty("项目类型")
private Integer projectType;

@ApiModelProperty("预算年度")
private Integer projectYear;

@ApiModelProperty("创建时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createOnMin;

@ApiModelProperty("创建时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createOnMax;

@ApiModelProperty("项目阶段")
private Integer stage;

@ApiModelProperty("项目状态")
private Integer status;

}

+ 38
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/req/ConstrctionPlanListReq.java View File

@@ -0,0 +1,38 @@
package com.ningdatech.pmapi.projectdeclared.model.req;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
* @Classname PrequalificationDeclaredReq
* @Description
* @Date 2023/2/14 11:42
* @Author PoffyZhang
*/
@Data
public class ConstrctionPlanListReq {

@ApiModelProperty("项目名称")
private String projectName;

@ApiModelProperty("申报单位")
private String buildOrg;

@ApiModelProperty("项目类型")
private Integer projectType;

@ApiModelProperty("预算年度")
private Integer projectYear;

@ApiModelProperty("创建时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createOnMin;

@ApiModelProperty("创建时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createOnMax;

}

+ 38
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/req/PrequalificationDeclaredListReq.java View File

@@ -0,0 +1,38 @@
package com.ningdatech.pmapi.projectdeclared.model.req;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
* @Classname PrequalificationDeclaredReq
* @Description
* @Date 2023/2/14 11:42
* @Author PoffyZhang
*/
@Data
public class PrequalificationDeclaredListReq {

@ApiModelProperty("项目名称")
private String projectName;

@ApiModelProperty("申报单位")
private String buildOrg;

@ApiModelProperty("项目类型")
private Integer projectType;

@ApiModelProperty("预算年度")
private Integer projectYear;

@ApiModelProperty("创建时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createOnMin;

@ApiModelProperty("创建时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createOnMax;

}

pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/vo/ProjectDeclaredDetailVO.java → pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/vo/ProjectDeclaredDetailVO.java View File

@@ -1,4 +1,4 @@
package com.ningdatech.pmapi.projectdeclared.entity.vo;
package com.ningdatech.pmapi.projectdeclared.model.vo;


import com.ningdatech.pmapi.projectlib.model.entity.ProjectApplication; import com.ningdatech.pmapi.projectlib.model.entity.ProjectApplication;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;

pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/vo/ProjectDeclaredListItemVO.java → pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/vo/ProjectDeclaredListItemVO.java View File

@@ -1,4 +1,4 @@
package com.ningdatech.pmapi.projectdeclared.entity.vo;
package com.ningdatech.pmapi.projectdeclared.model.vo;


import com.ningdatech.pmapi.projectlib.enumeration.ProjectTypeEnum; import com.ningdatech.pmapi.projectlib.enumeration.ProjectTypeEnum;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;

pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/entity/vo/ProjectDraftVO.java → pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/vo/ProjectDraftVO.java View File

@@ -1,4 +1,4 @@
package com.ningdatech.pmapi.projectdeclared.entity.vo;
package com.ningdatech.pmapi.projectdeclared.model.vo;


import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;

+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/service/IProjectDraftService.java View File

@@ -1,7 +1,7 @@
package com.ningdatech.pmapi.projectdeclared.service; package com.ningdatech.pmapi.projectdeclared.service;


import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.ningdatech.pmapi.projectdeclared.entity.ProjectDraft;
import com.ningdatech.pmapi.projectdeclared.model.entity.ProjectDraft;


/** /**
* <p> * <p>


+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/service/impl/ProjectDraftServiceImpl.java View File

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


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ningdatech.pmapi.projectdeclared.entity.ProjectDraft;
import com.ningdatech.pmapi.projectdeclared.model.entity.ProjectDraft;
import com.ningdatech.pmapi.projectdeclared.mapper.ProjectDraftMapper; import com.ningdatech.pmapi.projectdeclared.mapper.ProjectDraftMapper;
import com.ningdatech.pmapi.projectdeclared.service.IProjectDraftService; import com.ningdatech.pmapi.projectdeclared.service.IProjectDraftService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;


+ 22
- 18
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/helper/ProjectHelper.java View File

@@ -1,5 +1,6 @@
package com.ningdatech.pmapi.projectlib.helper; package com.ningdatech.pmapi.projectlib.helper;


import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ningdatech.pmapi.projectlib.model.entity.Project; import com.ningdatech.pmapi.projectlib.model.entity.Project;
import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq; import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq;
@@ -22,25 +23,28 @@ public class ProjectHelper {
**/ **/
public static LambdaQueryWrapper<Project> projectQuery(ProjectListReq req) { public static LambdaQueryWrapper<Project> projectQuery(ProjectListReq req) {
LambdaQueryWrapper<Project> query = new LambdaQueryWrapper<>(); LambdaQueryWrapper<Project> query = new LambdaQueryWrapper<>();
query.eq(req.getRegionCode() != null, Project::getAreaCode, req.getRegionCode());
query.eq(req.getUserId() != null, Project::getCreateBy, req.getUserId());
query.like(req.getProjectName() != null, Project::getProjectName, req.getProjectName());
query.eq(req.getProjectType() != null, Project::getProjectType, req.getProjectType());
query.eq(req.getProjectYear() != null, Project::getProjectYear, req.getProjectYear());
query.eq(req.getStage() != null, Project::getStage, req.getStage());
query.eq(req.getStatus() != null, Project::getStatus, req.getStatus());
// 申报金额
query.ge(req.getDeclareAmountMin() != null, Project::getDeclareAmount, req.getDeclareAmountMin());
query.le(req.getDeclareAmountMax() != null, Project::getDeclareAmount, req.getDeclareAmountMax());
// 申报时间
query.ge(req.getCreateOnMin() != null, Project::getCreateOn, req.getCreateOnMin());
query.le(req.getCreateOnMax() != null, Project::getCreateOn, req.getCreateOnMax());
// 批复金额
query.ge(req.getApproveAmountMin() != null, Project::getApprovalAmount, req.getApproveAmountMin());
query.le(req.getApproveAmountMax() != null, Project::getApprovalAmount, req.getApproveAmountMax());
query.eq(req.getRegionCode() != null, Project::getAreaCode, req.getRegionCode())
.eq(req.getUserId() != null, Project::getCreateBy, req.getUserId())
.like(req.getProjectName() != null, Project::getProjectName, req.getProjectName())
.eq(req.getProjectType() != null, Project::getProjectType, req.getProjectType())
.eq(req.getProjectYear() != null, Project::getProjectYear, req.getProjectYear())
.eq(req.getStage() != null, Project::getStage, req.getStage())
.eq(req.getStatus() != null, Project::getStatus, req.getStatus())
// 申报金额
.ge(req.getDeclareAmountMin() != null, Project::getDeclareAmount, req.getDeclareAmountMin())
.le(req.getDeclareAmountMax() != null, Project::getDeclareAmount, req.getDeclareAmountMax())
// 申报时间
.ge(req.getCreateOnMin() != null, Project::getCreateOn, req.getCreateOnMin())
.le(req.getCreateOnMax() != null, Project::getCreateOn, req.getCreateOnMax())
// 批复金额
.ge(req.getApproveAmountMin() != null, Project::getApprovalAmount, req.getApproveAmountMin())
.le(req.getApproveAmountMax() != null, Project::getApprovalAmount, req.getApproveAmountMax())


query.like(req.getBuildOrg() != null, Project::getBuildOrgName, req.getBuildOrg());
query.eq(req.getIsTemporaryAugment() != null, Project::getIsTemporaryAugment, req.getIsTemporaryAugment());
.like(req.getBuildOrg() != null, Project::getBuildOrgName, req.getBuildOrg())
.eq(req.getIsTemporaryAugment() != null, Project::getIsTemporaryAugment, req.getIsTemporaryAugment())
//状态 阶段 list
.in(CollUtil.isNotEmpty(req.getStageList()),Project::getStage,req.getStageList())
.in(CollUtil.isNotEmpty(req.getStatusList()),Project::getStatus,req.getStatusList());
return query; return query;
} }




+ 11
- 47
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/ProjectInst.java View File

@@ -1,9 +1,13 @@
package com.ningdatech.pmapi.projectlib.model.entity; package com.ningdatech.pmapi.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.TableName;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;


/** /**
* <p> * <p>
@@ -14,65 +18,25 @@ import io.swagger.annotations.ApiModel;
* @since 2023-02-13 * @since 2023-02-13
*/ */
@TableName("nd_project_inst") @TableName("nd_project_inst")
@Data
@ApiModel(value = "NdProjectInst对象", description = "") @ApiModel(value = "NdProjectInst对象", description = "")
public class ProjectInst implements Serializable { public class ProjectInst implements Serializable {


private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;


@ApiModelProperty("主键")
@TableId(type = IdType.AUTO)
private Long id; private Long id;


@ApiModelProperty("项目ID")
private Long projectId; private Long projectId;


@ApiModelProperty("实例ID")
private String instCode; private String instCode;


@ApiModelProperty("创建时间")
private LocalDateTime creatOn; private LocalDateTime creatOn;


@ApiModelProperty("修改时间")
private LocalDateTime updateOn; private LocalDateTime updateOn;

public Long getId() {
return id;
}

public void setId(Long id) {
this.id = id;
}
public Long getProjectId() {
return projectId;
}

public void setProjectId(Long projectId) {
this.projectId = projectId;
}
public String getInstCode() {
return instCode;
}

public void setInstCode(String instCode) {
this.instCode = instCode;
}
public LocalDateTime getCreatOn() {
return creatOn;
}

public void setCreatOn(LocalDateTime creatOn) {
this.creatOn = creatOn;
}
public LocalDateTime getUpdateOn() {
return updateOn;
}

public void setUpdateOn(LocalDateTime updateOn) {
this.updateOn = updateOn;
}

@Override
public String toString() {
return "NdProjectInst{" +
"id=" + id +
", projectId=" + projectId +
", instCode=" + instCode +
", creatOn=" + creatOn +
", updateOn=" + updateOn +
"}";
}
} }

+ 6
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/req/ProjectListReq.java View File

@@ -9,6 +9,7 @@ import org.springframework.format.annotation.DateTimeFormat;


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


/** /**
* <p> * <p>
@@ -70,4 +71,9 @@ public class ProjectListReq extends PagePo {
@ApiModelProperty("是否临时增补 0:否 1:是") @ApiModelProperty("是否临时增补 0:否 1:是")
private Integer isTemporaryAugment; private Integer isTemporaryAugment;


@ApiModelProperty("项目阶段 多个")
private List<Integer> stageList;

@ApiModelProperty("项目状态 多个")
private List<Integer> statusList;
} }

+ 1
- 1
pmapi/src/test/java/com/ningdatech/pmapi/sys/project/DraftTest.java View File

@@ -2,7 +2,7 @@ package com.ningdatech.pmapi.sys.project;


import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.ningdatech.pmapi.AppTests; import com.ningdatech.pmapi.AppTests;
import com.ningdatech.pmapi.projectdeclared.entity.ProjectDraft;
import com.ningdatech.pmapi.projectdeclared.model.entity.ProjectDraft;
import com.ningdatech.pmapi.projectdeclared.service.IProjectDraftService; import com.ningdatech.pmapi.projectdeclared.service.IProjectDraftService;
import org.junit.Test; import org.junit.Test;




Loading…
Cancel
Save