提交 ed1be42d authored 作者: 马晨俊's avatar 马晨俊

mcj:

新增报告返回替换建议字段
上级 0749a45e
......@@ -15,6 +15,7 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.ResponseEntity;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
......@@ -227,7 +228,7 @@ public class InspectController {
//架构
assessmentReport.setFramework(inspect.getFramework());
//语言
if ("".equals(reform.getDevelopLanguageSystem().getName())) {
if (StringUtils.isEmpty(reform.getDevelopLanguageSystem().getName())) {
assessmentReport.setLanguage(inspect.getLanguage());
} else {
LanguageEnum byName = LanguageEnum.getByName(reform.getDevelopLanguageSystem().getName());
......@@ -257,6 +258,8 @@ public class InspectController {
assessmentReport.setTime(inspect.getCreateDate());
//设置项目中有的所有语言
assessmentReport.setLanguages(reportVo.getLanguages());
assessmentReport.setRecastMethod(reportVo.getRecastMethod());
//样式调整
int css = 0;
//API数量
......
......@@ -15,7 +15,6 @@ import java.util.List;
*
* @author : czq
*
* @Date : 2020-03-05 18:16
*/
@Data
@AllArgsConstructor
......@@ -67,6 +66,10 @@ public class AssessmentReport {
@ApiModelProperty(value = "语言",example = "1")
private Integer language;
/**
* 评估完成
*/
private Integer recastMethod;
/**
* 项目中所有语言
*/
......
package com.zjty.inspect.enums;
import java.util.HashMap;
import java.util.Map;
public enum RecastMethod {
/**
* 架构
*/
RECONSITUTION("适配重构",1),
RECONSITUTION("代码重构",1),
MODIFICATION("代码修改",2),
NOMODIFICATION("无需代码修改",3);
......@@ -25,4 +25,29 @@ public enum RecastMethod {
public Integer getStatus() {
return status;
}
private static Map<String,RecastMethod> recastMethodEnumMap=new HashMap<>();
private static Map<Integer,RecastMethod> recastMethodCodeEnumMap=new HashMap<>();
static {
for (RecastMethod recastMethod : RecastMethod.values()) {
recastMethodEnumMap.put(recastMethod.getName(),recastMethod);
}
for (RecastMethod recastMethod : RecastMethod.values()) {
recastMethodCodeEnumMap.put(recastMethod.getStatus(),recastMethod);
}
}
public static RecastMethod getByName(String name){
RecastMethod recastMethod = recastMethodEnumMap.get(name);
if(recastMethod==null){
return NOMODIFICATION;
}
return recastMethod;
}
public static RecastMethod getByCode(Integer code){
RecastMethod recastMethod = recastMethodCodeEnumMap.get(code);
if(recastMethod==null){
return NOMODIFICATION;
}
return recastMethod;
}
}
......@@ -129,7 +129,7 @@ public class WpsUtil {
keyValue.put("databaseSeparate", flipYesOrNo(database1.getSeparate()));
keyValue.put("databasePerformance", flipYesOrNo(database1.getPerformance()));
keyValue.put("databaseOtherContent", database1.getOtherContent());
keyValue.put("recastMethod",RecastMethod.getByCode(assessmentReport.getRecastMethod()));
Apply apply = reform.getApply();
keyValue.put("applyCost", String.valueOf(apply.getCost()));
if(StringUtils.isEmpty(String.valueOf(apply.getCost()))||apply.getCost()==-1) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论