|
@@ -7,6 +7,8 @@ import com.alibaba.fastjson.JSONObject; |
|
|
import com.google.common.collect.Lists; |
|
|
import com.google.common.collect.Lists; |
|
|
import com.ningdatech.file.service.FileService; |
|
|
import com.ningdatech.file.service.FileService; |
|
|
import com.ningdatech.pmapi.common.constant.BizConst; |
|
|
import com.ningdatech.pmapi.common.constant.BizConst; |
|
|
|
|
|
import com.ningdatech.pmapi.projectlib.enumeration.ProjectTypeEnum; |
|
|
|
|
|
import com.ningdatech.pmapi.projectlib.enumeration.ProjectTypeNewEnum; |
|
|
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.provincial.model.dto.FileDTO; |
|
|
import com.ningdatech.pmapi.provincial.model.dto.FileDTO; |
|
@@ -39,7 +41,7 @@ public class ApplicationConverter { |
|
|
.regionName(projectInfo.getArea()) |
|
|
.regionName(projectInfo.getArea()) |
|
|
.projectName(projectInfo.getProjectName()) |
|
|
.projectName(projectInfo.getProjectName()) |
|
|
.projectId(projectInfo.getProjectCode()) |
|
|
.projectId(projectInfo.getProjectCode()) |
|
|
.projectType(projectInfo.getProjectType()) |
|
|
|
|
|
|
|
|
.projectType(convertProjectType(projectInfo.getProjectType())) |
|
|
.totalMoney(projectInfo.getDeclareAmount()) |
|
|
.totalMoney(projectInfo.getDeclareAmount()) |
|
|
.yearBudget(projectInfo.getAnnualPlanAmount()) |
|
|
.yearBudget(projectInfo.getAnnualPlanAmount()) |
|
|
.budgetFrom(checkAddBudget(projectInfo.getDeclareHaveAmount() |
|
|
.budgetFrom(checkAddBudget(projectInfo.getDeclareHaveAmount() |
|
@@ -77,6 +79,21 @@ public class ApplicationConverter { |
|
|
.build(); |
|
|
.build(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private static Integer convertProjectType(String projectType) { |
|
|
|
|
|
if(StringUtils.isBlank(projectType)){ |
|
|
|
|
|
return null; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(Lists.newArrayList(ProjectTypeNewEnum.FIRST_BUILD.getCode(), |
|
|
|
|
|
ProjectTypeNewEnum.SJ_BUILD.getCode(),ProjectTypeNewEnum.SZ_BUILD.getCode()).contains(projectType)){ |
|
|
|
|
|
return ProjectTypeEnum.BUILD.getCode(); |
|
|
|
|
|
}else if(Lists.newArrayList(ProjectTypeNewEnum.NEW_OPERA.getCode(), |
|
|
|
|
|
ProjectTypeNewEnum.XU_OPERA.getCode()).contains(projectType)){ |
|
|
|
|
|
return ProjectTypeEnum.DEV_OPS.getCode(); |
|
|
|
|
|
} |
|
|
|
|
|
return null; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
private static String checkAddBudget(BigDecimal declareHaveAmount, BigDecimal declareGovOwnFinanceAmount, |
|
|
private static String checkAddBudget(BigDecimal declareHaveAmount, BigDecimal declareGovOwnFinanceAmount, |
|
|
BigDecimal declareGovSuperiorFinanceAmount, BigDecimal declareBankLendingAmount, |
|
|
BigDecimal declareGovSuperiorFinanceAmount, BigDecimal declareBankLendingAmount, |
|
|
BigDecimal otherAmount) { |
|
|
BigDecimal otherAmount) { |
|
|