Browse Source

申报省局 字段匹配

tags/24080901
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.ProvincialProjectDTO;
import org.assertj.core.util.Lists;

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

/**
@@ -23,13 +26,15 @@ public class ApplicationConverter {
.regionCode(projectInfo.getAreaCode())
.regionName(projectInfo.getArea())
.projectName(projectInfo.getProjectName())
.projectId(String.valueOf(projectInfo.getId()))
.projectId(projectInfo.getProjectCode())
.projectType(projectInfo.getProjectType())
.totalMoney(projectInfo.getDeclareAmount())
.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()))
.financialCode(projectInfo.getFinancialCode())
.developCode(projectInfo.getDevelopCode())
@@ -52,10 +57,35 @@ public class ApplicationConverter {
.otherFile(projectInfo.getPreliminaryPlanFile())
.projectRemark(projectInfo.getProjectRemarks())
.includeApplication(projectInfo.getIncludeApplication())
.projectApplyFile(projectInfo.getProjectApplicationForm())
.researchReport(projectInfo.getPreliminaryPlanFile())
.applicationInfo(convertApplications(applications))
.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
private static List<ProvincialApplicationDTO> convertApplications(List<ProjectApplication> applications) {
if(CollUtil.isEmpty(applications)){
@@ -98,6 +128,9 @@ public class ApplicationConverter {
.isProduceCommonComponent(projectApplication.getProduceCommonComponent())
.produceCommonComponent(projectApplication.getProduceCommonComponents())
.publishSide(projectApplication.getPublishSide())
.isS2(projectApplication.getIsAccountAppName())
.accountAppName(projectApplication.getAccountAppName())
.applicationEstimateFile(projectApplication.getApplicationEstimateFile())
.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("上级条线单位审核意见")
private String higherLineSuperOrgReviewComments;

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

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位项目编号")
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位项目编号")
private String projectCode;

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

private LocalDateTime createOn;
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,"审核中"),
SUCCESS(2,"审核通过"),
FAIL(3,"审核不通过");
FAIL(3,"审核不通过"),
WITHDRAW(4,"被撤回"),
BACK(5,"退回地市");

private Integer code;
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.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());
}else if(ProjectProvincialAuditStatusEnum.SUCCESS.getCode().equals(projectRes.getProjectStatus())){
log.info("此项目 【{}】 审核通过",projectRes.getProjectId());
@@ -79,6 +81,16 @@ public class CheckProvincialReviewResultTask {
stateMachineUtils.reject(project);
project.setUpdateOn(LocalDateTime.now());
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{
log.info("此项目 【{}】 审核结果错误",projectRes.getProjectId());
}


Loading…
Cancel
Save