ソースを参照

省局 字段 未更新

tags/24080901
PoffyZhang 1年前
コミット
70fdf99e36
3個のファイルの変更30行の追加13行の削除
  1. +18
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/converter/ApplicationConverter.java
  2. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/provincial/model/dto/ProvincialProjectDTO.java
  3. +11
    -11
      pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/CpuController.java

+ 18
- 1
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/converter/ApplicationConverter.java ファイルの表示

@@ -7,6 +7,8 @@ import com.alibaba.fastjson.JSONObject;
import com.google.common.collect.Lists;
import com.ningdatech.file.service.FileService;
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.ProjectApplication;
import com.ningdatech.pmapi.provincial.model.dto.FileDTO;
@@ -39,7 +41,7 @@ public class ApplicationConverter {
.regionName(projectInfo.getArea())
.projectName(projectInfo.getProjectName())
.projectId(projectInfo.getProjectCode())
.projectType(projectInfo.getProjectType())
.projectType(convertProjectType(projectInfo.getProjectType()))
.totalMoney(projectInfo.getDeclareAmount())
.yearBudget(projectInfo.getAnnualPlanAmount())
.budgetFrom(checkAddBudget(projectInfo.getDeclareHaveAmount()
@@ -77,6 +79,21 @@ public class ApplicationConverter {
.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,
BigDecimal declareGovSuperiorFinanceAmount, BigDecimal declareBankLendingAmount,
BigDecimal otherAmount) {


+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/provincial/model/dto/ProvincialProjectDTO.java ファイルの表示

@@ -43,7 +43,7 @@ public class ProvincialProjectDTO implements Serializable {
private String projectId;

@ApiModelProperty("项目类型 1新建 2续建")
private String projectType;
private Integer projectType;

@ApiModelProperty("项目总投资(万元)")
private BigDecimal totalMoney;


+ 11
- 11
pmapi/src/main/java/com/ningdatech/pmapi/sys/controller/CpuController.java ファイルの表示

@@ -25,25 +25,25 @@ public class CpuController {

private final CpuManage cpuManage;

@ApiOperation(value = "CPU初始化任务", notes = "CPU初始化任务")
@PostMapping("/start")
@ApiOperation(value = "内存初始化任务", notes = "内存初始化任务")
@PostMapping("/m-start")
@WebLog("CPU初始化任务")
public String start() {
public String mStart() {
cpuManage.whileTrueTask();
return "初始化成功";
}

@ApiOperation(value = "提升CPU", notes = "提升CPU")
@PostMapping("/high/{cpu}")
@WebLog("提升CPU")
public String high(@PathVariable Integer cpu) {
cpuManage.open(cpu);
@ApiOperation(value = "提升内存", notes = "提升内存")
@PostMapping("/m-high/{num}")
@WebLog("提升内存")
public String high(@PathVariable Integer num) {
cpuManage.open(num);
return "提高成功";
}

@ApiOperation(value = "关闭CPU任务", notes = "关闭CPU任务")
@PostMapping("/close")
@WebLog("关闭CPU任务")
@ApiOperation(value = "关闭提升内存", notes = "关闭提升内存")
@PostMapping("/m-close")
@WebLog("关闭提升内存")
public String close() {
cpuManage.close();
return "关闭成功";


読み込み中…
キャンセル
保存