Browse Source

申报省局 字段匹配

master
PoffyZhang 1 year ago
parent
commit
5cd33d7067
6 changed files with 64 additions and 6 deletions
  1. +37
    -4
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/converter/ApplicationConverter.java
  2. +3
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDTO.java
  3. +4
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java
  4. +3
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java
  5. +4
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/provincial/enumeration/ProjectProvincialAuditStatusEnum.java
  6. +13
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CheckProvincialReviewResultTask.java

+ 37
- 4
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/converter/ApplicationConverter.java View File

@@ -6,8 +6,11 @@ import com.ningdatech.pmapi.projectlib.model.entity.ProjectApplication;
import com.ningdatech.pmapi.provincial.model.dto.ProvincialApplicationDTO; import com.ningdatech.pmapi.provincial.model.dto.ProvincialApplicationDTO;
import com.ningdatech.pmapi.provincial.model.dto.ProvincialProjectDTO; import com.ningdatech.pmapi.provincial.model.dto.ProvincialProjectDTO;
import org.assertj.core.util.Lists; import org.assertj.core.util.Lists;

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


/** /**
@@ -23,13 +26,15 @@ public class ApplicationConverter {
.regionCode(projectInfo.getAreaCode()) .regionCode(projectInfo.getAreaCode())
.regionName(projectInfo.getArea()) .regionName(projectInfo.getArea())
.projectName(projectInfo.getProjectName()) .projectName(projectInfo.getProjectName())
.projectId(String.valueOf(projectInfo.getId()))
.projectId(projectInfo.getProjectCode())
.projectType(projectInfo.getProjectType()) .projectType(projectInfo.getProjectType())
.totalMoney(projectInfo.getDeclareAmount()) .totalMoney(projectInfo.getDeclareAmount())
.yearBudget(projectInfo.getAnnualPlanAmount()) .yearBudget(projectInfo.getAnnualPlanAmount())
.budgetFrom(projectInfo.getDeclareHaveAmount() + "," +
projectInfo.getDeclareGovOwnFinanceAmount() + ","
+ projectInfo.getDeclareGovSuperiorFinanceAmount())
.budgetFrom(checkAddBudget(projectInfo.getDeclareHaveAmount()
,projectInfo.getDeclareGovOwnFinanceAmount(),
projectInfo.getDeclareGovSuperiorFinanceAmount(),
projectInfo.getDeclareBankLendingAmount(),
projectInfo.getDeclareOtherAmount()))
.year(String.valueOf(projectInfo.getProjectYear())) .year(String.valueOf(projectInfo.getProjectYear()))
.financialCode(projectInfo.getFinancialCode()) .financialCode(projectInfo.getFinancialCode())
.developCode(projectInfo.getDevelopCode()) .developCode(projectInfo.getDevelopCode())
@@ -52,10 +57,35 @@ public class ApplicationConverter {
.otherFile(projectInfo.getPreliminaryPlanFile()) .otherFile(projectInfo.getPreliminaryPlanFile())
.projectRemark(projectInfo.getProjectRemarks()) .projectRemark(projectInfo.getProjectRemarks())
.includeApplication(projectInfo.getIncludeApplication()) .includeApplication(projectInfo.getIncludeApplication())
.projectApplyFile(projectInfo.getProjectApplicationForm())
.researchReport(projectInfo.getPreliminaryPlanFile())
.applicationInfo(convertApplications(applications)) .applicationInfo(convertApplications(applications))
.build(); .build();
} }


private static String checkAddBudget(BigDecimal declareHaveAmount, BigDecimal declareGovOwnFinanceAmount,
BigDecimal declareGovSuperiorFinanceAmount,BigDecimal declareBankLendingAmount,
BigDecimal otherAmount) {
StringBuffer sb = new StringBuffer();

if(Objects.nonNull(declareHaveAmount) && declareHaveAmount.compareTo(BigDecimal.ZERO) > 0){
sb.append("自有资金,");
}
if(Objects.nonNull(declareGovOwnFinanceAmount) && declareGovOwnFinanceAmount.compareTo(BigDecimal.ZERO) > 0){
sb.append("政府投资-本级财政资金,");
}
if(Objects.nonNull(declareGovSuperiorFinanceAmount) && declareGovSuperiorFinanceAmount.compareTo(BigDecimal.ZERO) > 0){
sb.append("政府投资-上级财政资金,");
}
if(Objects.nonNull(declareGovSuperiorFinanceAmount) && declareGovSuperiorFinanceAmount.compareTo(BigDecimal.ZERO) > 0){
sb.append("银行贷款,");
}
if(Objects.nonNull(otherAmount) && otherAmount.compareTo(BigDecimal.ZERO) > 0){
sb.append("其他资金");
}
return sb.toString();
}

//放入项目 app //放入项目 app
private static List<ProvincialApplicationDTO> convertApplications(List<ProjectApplication> applications) { private static List<ProvincialApplicationDTO> convertApplications(List<ProjectApplication> applications) {
if(CollUtil.isEmpty(applications)){ if(CollUtil.isEmpty(applications)){
@@ -98,6 +128,9 @@ public class ApplicationConverter {
.isProduceCommonComponent(projectApplication.getProduceCommonComponent()) .isProduceCommonComponent(projectApplication.getProduceCommonComponent())
.produceCommonComponent(projectApplication.getProduceCommonComponents()) .produceCommonComponent(projectApplication.getProduceCommonComponents())
.publishSide(projectApplication.getPublishSide()) .publishSide(projectApplication.getPublishSide())
.isS2(projectApplication.getIsAccountAppName())
.accountAppName(projectApplication.getAccountAppName())
.applicationEstimateFile(projectApplication.getApplicationEstimateFile())
.build(); .build();
} }




+ 3
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/dto/ProjectDTO.java View File

@@ -285,6 +285,9 @@ public class ProjectDTO implements Serializable {
@ApiModelProperty("上级条线单位审核意见") @ApiModelProperty("上级条线单位审核意见")
private String higherLineSuperOrgReviewComments; private String higherLineSuperOrgReviewComments;


@ApiModelProperty("项目申报书")
private String projectApplicationForm;

private Map<String,Object> dynamicForm; private Map<String,Object> dynamicForm;


} }

+ 4
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/entity/Project.java View File

@@ -317,4 +317,8 @@ public class Project implements Serializable {


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

@ApiModelProperty("项目申报书")
private String projectApplicationForm;

} }

+ 3
- 0
pmapi/src/main/java/com/ningdatech/pmapi/projectlib/model/vo/ProjectDetailVO.java View File

@@ -316,6 +316,9 @@ public class ProjectDetailVO {
@ApiModelProperty("21位项目编号") @ApiModelProperty("21位项目编号")
private String projectCode; private String projectCode;


@ApiModelProperty("项目申报书")
private String projectApplicationForm;

private LocalDateTime createOn; private LocalDateTime createOn;
private LocalDateTime updateOn; private LocalDateTime updateOn;




+ 4
- 1
pmapi/src/main/java/com/ningdatech/pmapi/provincial/enumeration/ProjectProvincialAuditStatusEnum.java View File

@@ -18,9 +18,12 @@ public enum ProjectProvincialAuditStatusEnum {
/** /**
* 省级联审的状态 * 省级联审的状态
*/ */
NOT_AUDIT(0,"未审核"),
AUDITING(1,"审核中"), AUDITING(1,"审核中"),
SUCCESS(2,"审核通过"), SUCCESS(2,"审核通过"),
FAIL(3,"审核不通过");
FAIL(3,"审核不通过"),
WITHDRAW(4,"被撤回"),
BACK(5,"退回地市");


private Integer code; private Integer code;
private String desc; private String desc;


+ 13
- 1
pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CheckProvincialReviewResultTask.java View File

@@ -67,7 +67,9 @@ public class CheckProvincialReviewResultTask {
ProvincialProjectRes projectRes = JSON.parseObject(JSON.toJSONString(apiResponse.getData()), ProvincialProjectRes projectRes = JSON.parseObject(JSON.toJSONString(apiResponse.getData()),
ProvincialProjectRes.class); ProvincialProjectRes.class);


if(ProjectProvincialAuditStatusEnum.AUDITING.getCode().equals(projectRes.getProjectStatus())){
if(ProjectProvincialAuditStatusEnum.NOT_AUDIT.getCode().equals(projectRes.getProjectStatus())){
log.info("此项目 【{}】 还未审核",projectRes.getProjectId());
} else if(ProjectProvincialAuditStatusEnum.AUDITING.getCode().equals(projectRes.getProjectStatus())){
log.info("此项目 【{}】 还在审核中",projectRes.getProjectId()); log.info("此项目 【{}】 还在审核中",projectRes.getProjectId());
}else if(ProjectProvincialAuditStatusEnum.SUCCESS.getCode().equals(projectRes.getProjectStatus())){ }else if(ProjectProvincialAuditStatusEnum.SUCCESS.getCode().equals(projectRes.getProjectStatus())){
log.info("此项目 【{}】 审核通过",projectRes.getProjectId()); log.info("此项目 【{}】 审核通过",projectRes.getProjectId());
@@ -79,6 +81,16 @@ public class CheckProvincialReviewResultTask {
stateMachineUtils.reject(project); stateMachineUtils.reject(project);
project.setUpdateOn(LocalDateTime.now()); project.setUpdateOn(LocalDateTime.now());
projectService.updateById(project); projectService.updateById(project);
}else if(ProjectProvincialAuditStatusEnum.WITHDRAW.getCode().equals(projectRes.getProjectStatus())){
log.info("此项目 【{}】 审核被撤回",projectRes.getProjectId());
stateMachineUtils.reject(project);
project.setUpdateOn(LocalDateTime.now());
projectService.updateById(project);
}else if(ProjectProvincialAuditStatusEnum.BACK.getCode().equals(projectRes.getProjectStatus())){
log.info("此项目 【{}】 审核被退回",projectRes.getProjectId());
stateMachineUtils.reject(project);
project.setUpdateOn(LocalDateTime.now());
projectService.updateById(project);
}else{ }else{
log.info("此项目 【{}】 审核结果错误",projectRes.getProjectId()); log.info("此项目 【{}】 审核结果错误",projectRes.getProjectId());
} }


Loading…
Cancel
Save