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

评审清单

tags/24080901
PoffyZhang 1 рік тому
джерело
коміт
3d4ba6a240
10 змінених файлів з 700 додано та 0 видалено
  1. +16
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/contants/DeclaredProjectContant.java
  2. +60
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/ReviewChecklistController.java
  3. +246
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ReviewChecklistManage.java
  4. +57
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/dto/ReviewChecklistApproveDTO.java
  5. +67
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/entity/ReviewChecklistApprove.java
  6. +63
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/vo/ReviewChecklistApproveVO.java
  7. +16
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/service/IReviewChecklistApproveService.java
  8. +21
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/service/impl/ReviewChecklistApproveServiceImpl.java
  9. +16
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ReviewChecklistApproveMapper.java
  10. +138
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectReviewCheckListItemVO.java

+ 16
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/contants/DeclaredProjectContant.java Переглянути файл

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

import com.google.common.collect.Lists;
import com.ningdatech.pmapi.user.entity.UserInfo;

import java.util.List;

public interface DeclaredProjectContant {

class ProcessDef {
@@ -33,4 +38,15 @@ public interface DeclaredProjectContant {

public static final Long MIN_PROJECT_ID = 1L;
}

class ReviewChecklist {
public static final List<String> REVIEW_HUMANS_ZZD = Lists.newArrayList("GE_dce116d65ffe48a3aee6c14c1c5a3031",
"GE_573158a366554bdbb483f8f93d594bf7","GE_fe1cd568b453456ead00f471ecddf6a2","GE_fc1e28e29b5a4cf39c7b7c83278db6f4",
"GE_16580afcdf7d4d379fd3690ba47f3b58","GE_9c901c85eaeb42abbb485b7aa4d4358f","GE_a4c2c56ed3204600805e0f7b7dca9044");

public static final List<String> REVIEW_HUMANS_ZYD = Lists.newArrayList("GE_dce116d65ffe48a3aee6c14c1c5a3031",
"GE_573158a366554bdbb483f8f93d594bf7","GE_fe1cd568b453456ead00f471ecddf6a2","GE_fc1e28e29b5a4cf39c7b7c83278db6f4",
"GE_16580afcdf7d4d379fd3690ba47f3b58","GE_9c901c85eaeb42abbb485b7aa4d4358f","GE_a4c2c56ed3204600805e0f7b7dca9044");
public static final Integer INIT_NUM = 0;
}
}

+ 60
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/controller/ReviewChecklistController.java Переглянути файл

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

import com.ningdatech.basic.model.PageVo;
import com.ningdatech.log.annotation.WebLog;
import com.ningdatech.pmapi.projectdeclared.manage.ReviewChecklistManage;
import com.ningdatech.pmapi.projectdeclared.model.dto.ReviewChecklistApproveDTO;
import com.ningdatech.pmapi.projectdeclared.model.vo.ReviewChecklistApproveVO;
import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq;
import com.ningdatech.pmapi.projectlib.model.vo.ProjectReviewCheckListItemVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
* @Classname ReviewChecklistController
* @Description
* @Date 2023/11/7 17:00
* @Author PoffyZhang
*/
@Slf4j
@Validated
@RestController
@RequestMapping("/api/v1/review-checklist")
@Api(value = "Review-Checklist", tags = "审查清单")
@RequiredArgsConstructor
public class ReviewChecklistController {

private final ReviewChecklistManage reviewChecklistManage;

@ApiOperation(value = "建设方案后审查清单", notes = "建设方案后审查清单")
@GetMapping("/list")
public PageVo<ProjectReviewCheckListItemVO> list(@ModelAttribute ProjectListReq req) {
return reviewChecklistManage.projectLibList(req);
}

@ApiOperation(value = "审查清单审核", notes = "审查清单审核")
@PostMapping("/approve")
@WebLog("审查清单审核")
public String approve(@RequestBody List<ReviewChecklistApproveDTO> dtos) {
return reviewChecklistManage.approve(dtos);
}

@ApiOperation(value = "查看某个项目的意见汇总", notes = "查看某个项目的意见汇总")
@GetMapping("/summary-list/{projectCode}")
public List<ReviewChecklistApproveVO> summaryList(@PathVariable String projectCode) {
return reviewChecklistManage.summaryList(projectCode);
}

@ApiOperation(value = "意见汇总提交", notes = "意见汇总提交")
@PostMapping("/summary/{projectCode}")
@WebLog("意见汇总提交")
public String summary(@PathVariable String projectCode) {
return reviewChecklistManage.summary(projectCode);
}
}

+ 246
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/manage/ReviewChecklistManage.java Переглянути файл

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

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.google.common.collect.Lists;
import com.ningdatech.basic.exception.BizException;
import com.ningdatech.basic.function.VUtils;
import com.ningdatech.basic.model.PageVo;
import com.ningdatech.basic.util.CollUtils;
import com.ningdatech.basic.util.StrPool;
import com.ningdatech.pmapi.common.constant.BizConst;
import com.ningdatech.pmapi.common.constant.RegionConst;
import com.ningdatech.pmapi.common.helper.RegionCacheHelper;
import com.ningdatech.pmapi.datascope.model.DataScopeDTO;
import com.ningdatech.pmapi.datascope.utils.DataScopeUtil;
import com.ningdatech.pmapi.projectdeclared.contants.DeclaredProjectContant;
import com.ningdatech.pmapi.projectdeclared.model.dto.ReviewChecklistApproveDTO;
import com.ningdatech.pmapi.projectdeclared.model.entity.ReviewChecklistApprove;
import com.ningdatech.pmapi.projectdeclared.model.vo.ReviewChecklistApproveVO;
import com.ningdatech.pmapi.projectdeclared.service.IReviewChecklistApproveService;
import com.ningdatech.pmapi.projectlib.enumeration.ProjectStatusEnum;
import com.ningdatech.pmapi.projectlib.helper.ProjectHelper;
import com.ningdatech.pmapi.projectlib.model.entity.Project;
import com.ningdatech.pmapi.projectlib.model.req.ProjectListReq;
import com.ningdatech.pmapi.projectlib.model.vo.ProjectReviewCheckListItemVO;
import com.ningdatech.pmapi.projectlib.service.IProjectService;
import com.ningdatech.pmapi.user.security.auth.model.UserFullInfoDTO;
import com.ningdatech.pmapi.user.security.auth.model.UserInfoDetails;
import com.ningdatech.pmapi.user.util.LoginUserUtil;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.dom4j.dtd.Decl;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import java.util.*;
import java.util.stream.Collectors;

/**
* @Classname ReviewChecklistManage
* @Description
* @Date 2023/11/7 17:04
* @Author PoffyZhang
*/
@Component
@Slf4j
@RequiredArgsConstructor
public class ReviewChecklistManage {

@Value("${spring.profiles.active}")
private String active;

private final IProjectService projectService;

private final RegionCacheHelper regionCacheHelper;

private final IReviewChecklistApproveService reviewChecklistApproveService;

public PageVo<ProjectReviewCheckListItemVO> projectLibList(ProjectListReq req) {
LambdaQueryWrapper<Project> query = ProjectHelper.projectQuery(req);
//项目查最新
query.eq(Project::getNewest, Boolean.TRUE);
//建设方案提交后的状态
query.ge(Project::getStatus,ProjectStatusEnum.SCHEME_UNDER_REVIEW.getCode())
.ne(Project::getStatus,ProjectStatusEnum.PLAN_TO_BE_DECLARED.getCode());
UserInfoDetails user = LoginUserUtil.loginUserDetail();
buildProjectLibPermission(query, user);

Page<Project> page = projectService.page(req.page(), query);
long total;
if (CollUtil.isEmpty(page.getRecords())) {
return PageVo.empty();
}

List<String> projectCodes = page.getRecords().stream().map(Project::getProjectCode)
.collect(Collectors.toList());
//求出 审查了的 信息
List<ReviewChecklistApprove> approves = reviewChecklistApproveService.list(Wrappers.lambdaQuery(ReviewChecklistApprove.class)
.in(ReviewChecklistApprove::getProjectCode, projectCodes));
Map<String, List<ReviewChecklistApprove>> approveMap =
approves.stream().collect(Collectors.groupingBy(ReviewChecklistApprove::getProjectCode));

List<ProjectReviewCheckListItemVO> records = CollUtils.convert(page.getRecords(), w -> {
ProjectReviewCheckListItemVO item = new ProjectReviewCheckListItemVO();
item.setId(w.getId());
item.setProjectName(w.getProjectName());
item.setProjectCode(w.getProjectCode());
item.setArea(w.getArea());
item.setAreaCode(w.getAreaCode());
item.setCreateOn(w.getCreateOn());
item.setDeclaredAmount(w.getDeclareAmount());
item.setStage(w.getStage());
item.setStatus(w.getStatus());
item.setProjectType(w.getProjectType());
item.setProjectYear(w.getProjectYear());
item.setBuildOrg(w.getBuildOrgName());
item.setBizDomain(w.getBizDomain());
item.setProcessStatus(w.getProcessStatus());
item.setInstCode(w.getInstCode());
item.setApprovedAmount(w.getApprovalAmount());
item.setAnnualPlanAmount(w.getAnnualPlanAmount());
// 审查人员情况
item.setVerifiedHumans(computeVerify(approveMap.get(w.getProjectCode())));
return item;
});
return PageVo.of(records, page.getTotal());
}

private String computeVerify(List<ReviewChecklistApprove> reviewChecklistApproves) {
List<String> reviewHumans = Lists.newArrayList();;
if(BizConst.DEV.equals(active)){
reviewHumans = DeclaredProjectContant.ReviewChecklist.REVIEW_HUMANS_ZYD;
}else{
reviewHumans = DeclaredProjectContant.ReviewChecklist.REVIEW_HUMANS_ZZD;
}

Integer maxNums = reviewHumans.size();
final Integer[] finishNums = {DeclaredProjectContant.ReviewChecklist.INIT_NUM};
Set<String> computeHumanSet = reviewHumans.stream().collect(Collectors.toSet());
if(CollUtil.isEmpty(reviewChecklistApproves)){
return finishNums[0] + StrPool.SLASH + maxNums;
}
reviewChecklistApproves.forEach(r -> {
if(StringUtils.isNotBlank(r.getCreateByCode()) ||
computeHumanSet.contains(r.getCreateByCode())){
//说明 有指定人 审核过
finishNums[0]++;
computeHumanSet.remove(r.getCreateByCode());
}
});

return finishNums[0] + StrPool.SLASH + maxNums;
}

public UserFullInfoDTO buildProjectLibPermission(LambdaQueryWrapper<Project> query, UserInfoDetails user) {
UserFullInfoDTO userDto = BeanUtil.copyProperties(user,UserFullInfoDTO.class);
Optional<DataScopeDTO> currentUserDataScope = DataScopeUtil.getCurrentUserDataScope(userDto);
if (!currentUserDataScope.isPresent()) {
log.warn("没有取到权限信息 当前查询 没有权限条件");
return userDto;
}

switch (currentUserDataScope.get().getRole()) {
case NORMAL_MEMBER:
//普通用户 只能看到自己单位去申报的
query.eq(Project::getBuildOrgCode, user.getEmpPosUnitCode());
break;
case COMPANY_MANAGER:
//单位管理员 看
query.eq(Project::getBuildOrgCode, user.getEmpPosUnitCode());
break;
case SUPER_ADMIN:
//超级管理员 看到丽水全市的 并且也要判断他 同时是不是单位管理员
break;
case REGION_MANAGER:
//区域管理员 看到自己区域的项目 如果是市本级 就看全市的
if (RegionConst.RC_LS.equals(user.getRegionCode())) {
Collection<String> regionCodes = regionCacheHelper.listChildRegionCodeList(user.getRegionCode(),
RegionConst.RL_CITY);
query.in(Project::getAreaCode, regionCodes);
} else {
query.eq(Project::getAreaCode, user.getRegionCode());
}
break;
case VISITOR:
//访客可以看全市的
break;
case DASHBOARD:
break;
default:
//没有权限的话 就让它查不到
query.eq(Project::getId, 0L);
break;
}
return userDto;
}

/**
* 去审批
* @param dtos
* @return
*/
public String approve(List<ReviewChecklistApproveDTO> dtos) {
if(CollUtil.isEmpty(dtos)){
throw new BizException("传入数据不能为空!");
}
ReviewChecklistApproveDTO reviewChecklistApproveFirst = dtos.get(0);
String projectCode = reviewChecklistApproveFirst.getProjectCode();

UserInfoDetails user = LoginUserUtil.loginUserDetail();
Long userId = user.getUserId();
String employeeCode = user.getEmployeeCode();
String username = user.getUsername();
List<String> reviewHumans = Lists.newArrayList();;
if(BizConst.DEV.equals(active)){
reviewHumans = DeclaredProjectContant.ReviewChecklist.REVIEW_HUMANS_ZYD;
}else{
reviewHumans = DeclaredProjectContant.ReviewChecklist.REVIEW_HUMANS_ZZD;
}

if(StringUtils.isBlank(employeeCode) || !reviewHumans.contains(employeeCode)){
throw new BizException("当前操作员 不是七大审查人之一!");
}

VUtils.isTrue(reviewChecklistApproveService.count(Wrappers.lambdaQuery(ReviewChecklistApprove.class)
.eq(ReviewChecklistApprove::getProjectCode,projectCode)
.eq(ReviewChecklistApprove::getCreateByCode,employeeCode)) > 0)
.throwMessage("此项目 当前审查员 已经审批过 请不要重复审批");

for(ReviewChecklistApproveDTO dto : dtos){
ReviewChecklistApprove saveEntity = new ReviewChecklistApprove();
saveEntity.setCreateBy(username);
saveEntity.setCreateById(userId);
saveEntity.setCreateByCode(employeeCode);
saveEntity.setTitle(dto.getTitle());
saveEntity.setContent(dto.getContent());
saveEntity.setSubTitle(dto.getSubTitle());
saveEntity.setCorrPageNum(dto.getCorrPageNum());
saveEntity.setRejectionSituation(dto.getRejectionSituation());
saveEntity.setResponseSituation(dto.getResponseSituation());
saveEntity.setReviewComments(dto.getReviewComments());
saveEntity.setReviewResult(dto.getReviewResult());
reviewChecklistApproveService.save(saveEntity);
}

return BizConst.OP_SUCCESS;
}

/**
* 查看待意见汇总 列表
* @param projectCode
* @return
*/
public List<ReviewChecklistApproveVO> summaryList(String projectCode) {

return Collections.emptyList();
}

public String summary(String projectCode) {

return BizConst.OP_SUCCESS;
}
}

+ 57
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/dto/ReviewChecklistApproveDTO.java Переглянути файл

@@ -0,0 +1,57 @@
package com.ningdatech.pmapi.projectdeclared.model.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
* @Classname ReviewChecklistApproveDTO
* @Description
* @Date 2023/11/07 15:35
* @Author PoffyZhang
*/
@Data
@ApiModel(value = "ReviewChecklistApproveDTO", description = "")
public class ReviewChecklistApproveDTO {

private static final long serialVersionUID = 1L;

@ApiModelProperty("项目编号")
@NotBlank(message = "请传项目编号")
private String projectCode;

@ApiModelProperty("标题")
@NotBlank(message = "请传入标题")
private String title;

@ApiModelProperty("子标题")
@NotBlank(message = "请传入子标题")
private String subTitle;

@ApiModelProperty("内容")
@NotBlank(message = "请传入内容")
private String content;

@ApiModelProperty("对应页码")
@NotBlank(message = "请传入对应页码")
private String corrPageNum;

@ApiModelProperty("否决情形")
@NotBlank(message = "请传入否决情形")
private String rejectionSituation;

@ApiModelProperty("响应情况")
@NotBlank(message = "请传入响应情况")
private String responseSituation;

@ApiModelProperty("评审意见")
@NotBlank(message = "请传入评审意见")
private String reviewComments;

@ApiModelProperty("审核结果 1.通过 2不通过 3一票否决")
@NotNull(message = "请传入审核结果")
private Integer reviewResult;

}

+ 67
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/entity/ReviewChecklistApprove.java Переглянути файл

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

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.time.LocalDateTime;

/**
* @Classname ReviewChecklistApprove
* @Description
* @Date 2023/11/07 15:35
* @Author PoffyZhang
*/
@Data
@TableName("nd_project_review_checklist_approve")
@ApiModel(value = "审查清单审核信息", description = "")
public class ReviewChecklistApprove {

private static final long serialVersionUID = 1L;

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

@ApiModelProperty("项目编号")
private String projectCode;

@ApiModelProperty("审批人")
private String createBy;

@ApiModelProperty("审批时间")
private LocalDateTime createOn;

@ApiModelProperty("审批人ID")
private Long createById;

@ApiModelProperty("审批人code")
private String createByCode;

@ApiModelProperty("标题")
private String title;

@ApiModelProperty("子标题")
private String subTitle;

@ApiModelProperty("内容")
private String content;

@ApiModelProperty("对应页码")
private String corrPageNum;

@ApiModelProperty("否决情形")
private String rejectionSituation;

@ApiModelProperty("响应情况")
private String responseSituation;

@ApiModelProperty("评审意见")
private String reviewComments;

@ApiModelProperty("审核结果 1.通过 2不通过 3一票否决")
private Integer reviewResult;

}

+ 63
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/model/vo/ReviewChecklistApproveVO.java Переглянути файл

@@ -0,0 +1,63 @@
package com.ningdatech.pmapi.projectdeclared.model.vo;

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

import java.time.LocalDateTime;

/**
* @Classname ReviewChecklistApproveVO
* @Description
* @Date 2023/11/07 15:35
* @Author PoffyZhang
*/
@Data
@ApiModel(value = "ReviewChecklistApproveVO", description = "")
public class ReviewChecklistApproveVO {

private static final long serialVersionUID = 1L;

@ApiModelProperty("主键")
private Long id;

@ApiModelProperty("项目编号")
private String projectCode;

@ApiModelProperty("审批人")
private String createBy;

@ApiModelProperty("审批时间")
private LocalDateTime createOn;

@ApiModelProperty("审批人ID")
private Long createById;

@ApiModelProperty("审批人code")
private String createByCode;

@ApiModelProperty("标题")
private String title;

@ApiModelProperty("子标题")
private String subTitle;

@ApiModelProperty("内容")
private String content;

@ApiModelProperty("对应页码")
private String corrPageNum;

@ApiModelProperty("否决情形")
private String rejectionSituation;

@ApiModelProperty("响应情况")
private String responseSituation;

@ApiModelProperty("评审意见")
private String reviewComments;

@ApiModelProperty("审核结果 1.通过 2不通过 3一票否决")
private Integer reviewResult;

}

+ 16
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/service/IReviewChecklistApproveService.java Переглянути файл

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

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

/**
* <p>
* 服务类
* </p>
*
* @author Poffy
* @since 2023-02-13
*/
public interface IReviewChecklistApproveService extends IService<ReviewChecklistApprove> {

}

+ 21
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/service/impl/ReviewChecklistApproveServiceImpl.java Переглянути файл

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

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ningdatech.pmapi.projectdeclared.model.entity.ReviewChecklistApprove;
import com.ningdatech.pmapi.projectlib.mapper.ReviewChecklistApproveMapper;
import com.ningdatech.pmapi.projectdeclared.service.IReviewChecklistApproveService;
import org.springframework.stereotype.Service;

/**
* <p>
* 服务实现类
* </p>
*
* @author Poffy
* @since 2023-02-13
*/
@Service
public class ReviewChecklistApproveServiceImpl extends ServiceImpl<ReviewChecklistApproveMapper, ReviewChecklistApprove>
implements IReviewChecklistApproveService {

}

+ 16
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/mapper/ReviewChecklistApproveMapper.java Переглянути файл

@@ -0,0 +1,16 @@
package com.ningdatech.pmapi.projectlib.mapper;

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

/**
* <p>
* Mapper 接口
* </p>
*
* @author Poffy
* @since 2023-02-13
*/
public interface ReviewChecklistApproveMapper extends BaseMapper<ReviewChecklistApprove> {

}

+ 138
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectReviewCheckListItemVO.java Переглянути файл

@@ -0,0 +1,138 @@
package com.ningdatech.pmapi.projectlib.model.vo;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ningdatech.pmapi.common.compare.Compare;
import com.ningdatech.pmapi.projectlib.enumeration.ProjectTypeNewEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.experimental.Tolerate;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Objects;
import java.util.Optional;

/**
* <p>
* ProjectReviewCheckListItemVO
* </p>
*
* @author ZPF
* @since 15:13 2023/11/07
*/
@Data
@Builder
@ApiModel("项目库审查列表视图")
public class ProjectReviewCheckListItemVO {

@Tolerate
public ProjectReviewCheckListItemVO() {
}

@ApiModelProperty("来源 1申报项目 2项目归集")
private String fromType;

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

@ApiModelProperty("项目编号")
private String projectCode;

@ApiModelProperty("区域")
private String area;

@ApiModelProperty("区域Code")
private String areaCode;

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

@ApiModelProperty("申报金额")
private BigDecimal declaredAmount;

@ApiModelProperty("批复金额")
private BigDecimal approvedAmount;

@ApiModelProperty("立项批复时间")
@JSONField(format = "yyyy-MM-dd")
private LocalDateTime approvalDate;

@ApiModelProperty("项目类型 01:首次建设 02:迭代升级 03:结转建设 04新运维 05续运维")
@Compare("项目类型")
private String projectType;

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

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

@ApiModelProperty("申报年度")
private Integer projectYear;

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

@ApiModelProperty("业务领域")
private Integer bizDomain;

@ApiModelProperty("流程状态")
private Integer processStatus;

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

@ApiModelProperty("建设单位名称")
private String buildOrgName;

@ApiModelProperty("建设单位统一社会信用代码")
private String buildOrgCode;

private String projectTypeName;

@ApiModelProperty("成交金额")
private BigDecimal transactionAmount;

@ApiModelProperty("成交时间")
@JSONField(format = "yyyy-MM-dd")
private LocalDateTime transactionTime;

@ApiModelProperty("交货时间")
@JSONField(format = "yyyy-MM-dd")
private LocalDateTime deliveryTime;

@ApiModelProperty("合同总金额")
private BigDecimal contractAmount;

@ApiModelProperty("年度支付计划-年度支付计划(元)")
private BigDecimal annualPlanAmount;

@ApiModelProperty("建设周期 月")
private Integer buildCycle;

@ApiModelProperty("计划验收时间")
@JSONField(format = "yyyy-MM-dd")
private LocalDateTime planAcceptanceTime;

public String getProjectTypeName() {
if (Objects.nonNull(this.projectType)) {
Optional.ofNullable(ProjectTypeNewEnum.getDesc(this.projectType))
.ifPresent(desc -> this.projectTypeName = desc);
}
return this.projectTypeName;
}

@ApiModelProperty("已核查人数 7/7")
private String verifiedHumans;

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

@ApiModelProperty("修改时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
private LocalDateTime updateOn;

}

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