提交 2777a7e9 authored 作者: czq's avatar czq

合并分支 'czq' 到 'master'

Czq 查看合并请求 !15
......@@ -209,7 +209,7 @@ public class InspectController {
//评估时间
assessmentReport.setTime(inspect.getCreateDate());
//适配预算
assessmentReport.setBudget(inspect.getBudgets().getBudget().get(0).getFund());
// assessmentReport.setBudget(inspect.getBudgets().getBudget().get(0).getFund());
//原系统规模,马晨俊没放进去
//技术详情,马晨俊的警告点,同时统计技术的数量
//样式调整
......@@ -220,6 +220,8 @@ public class InspectController {
int plugIn = 0;
//jni数量
int jni = 0;
//中间件依赖数量
int dependOnNum = 0;
HashMap<String, List<Warn>> warnDetails = inspect.getWarnDetails();
Set<String> keySet = warnDetails.keySet();
List<TechnologyReport> technologyReports = new ArrayList<>();
......@@ -236,6 +238,10 @@ public class InspectController {
technologyContent.setFile(warn.getFilePath());
technologyContent.setKeyWord(warn.getRule());
technologyContent.setPosition(warn.getLineNum().toString());
String categoryId = warn.getCategoryId();
if(!Objects.equals(categoryId, "0") &&categoryId!=null&& Objects.equals(categoryId, "1")){
dependOnNum += 1;
}
technologyContents.add(technologyContent);
}
if(Objects.equals(key, "Microsoft CSS extensions(不支持)")){
......@@ -294,27 +300,27 @@ public class InspectController {
dependencies.addAll(projectPom.getDependencies());
}
HashMap<String,Integer> num = new HashMap<>();
for (PomDependency pomDependency:dependencies) {
String groupId = pomDependency.getGroupId();
Integer integer = num.get(groupId);
if(integer == null){
num.put(groupId,1);
}else{
integer = integer+1;
num.put(groupId,integer);
}
}
System.out.println("所有依赖:"+JSON.toJSONString(num));
Set<String> strings = num.keySet();
List<DependOnNum> dependOnNums = new ArrayList<>();
for (String s:strings) {
DependOnNum dependOnNum = new DependOnNum();
dependOnNum.setName(s);
dependOnNum.setNum(num.get(s));
dependOnNums.add(dependOnNum);
}
middlewareDifficulty.setDependOnNum(dependOnNums);
// HashMap<String,Integer> num = new HashMap<>();
// for (PomDependency pomDependency:dependencies) {
// String groupId = pomDependency.getGroupId();
// Integer integer = num.get(groupId);
// if(integer == null){
// num.put(groupId,1);
// }else{
// integer = integer+1;
// num.put(groupId,integer);
// }
// }
// System.out.println("所有依赖:"+JSON.toJSONString(num));
// Set<String> strings = num.keySet();
// List<DependOnNum> dependOnNums = new ArrayList<>();
// for (String s:strings) {
// DependOnNum dependOnNum = new DependOnNum();
// dependOnNum.setName(s);
// dependOnNum.setNum(num.get(s));
// dependOnNums.add(dependOnNum);
// }
middlewareDifficulty.setDependOnNum(dependOnNum);
Middleware middleware = reform.getMiddleware();
middlewareDifficulty.setWeb(middleware.getWeb());
middlewareDifficulty.setJms(middleware.getJms());
......@@ -334,8 +340,8 @@ public class InspectController {
//本地程序难度
ProgramDifficulty programDifficulty = new ProgramDifficulty();
List<DependOnNum> dependOns = new ArrayList<>();
DependOnNum dependOnNum = new DependOnNum("jni",jni);
dependOns.add(dependOnNum);
DependOnNum dependOnNum2 = new DependOnNum("jni",jni);
dependOns.add(dependOnNum2);
programDifficulty.setDependOnNum(dependOns);
difficultyAssessment.setProgramDifficulty(programDifficulty);
System.out.println("programDifficulty+:"+JSON.toJSONString(programDifficulty));
......
......@@ -22,12 +22,12 @@ public class AssessmentReport {
/**
* 单位名称
*/
private String orgName = "****";
private String orgName;
/**
* 系统名称
*/
private String sysName = "****";
private String sysName;
/**
* 评估时间
......@@ -37,47 +37,47 @@ public class AssessmentReport {
/**
* 难度系数
*/
private double difficulty = 1.1;
private double difficulty;
/**
* 类型预算 1:适配、2:改造
*/
private Integer type = 1;
private Integer type;
/**
* 预算金额 double
*/
private String budget = "53.973348451903085--129.498761216";
private String budget;
/**
* 原系统规模
*/
private SysScale sysScale = new SysScale();
private SysScale sysScale;
/**
* 关键技术及替换策略建议
*/
private TechnologyList technologyList = new TechnologyList();
private TechnologyList technologyList;
/**
* 基础工作量评估
*/
private Workload workload = new Workload();
private Workload workload;
/**
* 额外依赖申请
*/
private Apply apply = new Apply();
private Apply apply;
/**
* 适配难度评估
*/
private DifficultyAssessment difficultyAssessment = new DifficultyAssessment();
private DifficultyAssessment difficultyAssessment;
/**
* 造价估算
*/
private ManufacturingCost manufacturingCost = new ManufacturingCost();
private ManufacturingCost manufacturingCost;
}
......@@ -18,10 +18,10 @@ public class Basis {
/**
* 开发量
*/
private double developmentVolume = 1.1;
private double developmentVolume;
/**
* 修正系数
*/
private double correctionFactor = 1.1;
private double correctionFactor;
}
......@@ -17,37 +17,37 @@ public class BrowserDifficulty {
/**
* 系统评估
*/
private double systemEvaluation = 1.1;
private double systemEvaluation;
/**
* 额外信息
*/
private double message = 1.1;
private double message;
/**
* 综合难度
*/
private double difficulty = 1.1;
private double difficulty;
/**
* 工作量
*/
private double load = 0.0;
private double load;
/**
* 样式
*/
private Integer style = 10;
private Integer style;
/**
* api
*/
private Integer api = 10;
private Integer api;
/**
* 插件
*/
private Integer plugInUnit = 10;
private Integer plugInUnit;
/**
* 用户额外需求
......
......@@ -30,7 +30,7 @@ public class DatabaseDifficulty {
/**
* 综合难度
*/
private double difficulty = 1.1;
private double difficulty;
/**
* 工作量
......@@ -45,25 +45,25 @@ public class DatabaseDifficulty {
/**
* 容灾 (1:否 2:主备 3:分布式)
*/
private Integer disasterTolerance = 1;
private Integer disasterTolerance;
/**
* 安全 1:是 2:否
*/
private Integer safe = 1;
private Integer safe;
/**
* 读写分离 1:是 2:否
*/
private Integer separate = 1;
private Integer separate;
/**
* 更高性能 1:是 2:否
*/
private Integer performance = 1;
private Integer performance;
/**
* 其他内容
*/
private String otherContent = "其他内容";
private String otherContent;
}
......@@ -18,10 +18,10 @@ public class DependOnNum {
/**
* 依赖/jni名称
*/
private String name = "******";
private String name;
/**
* 数量
*/
private Integer num = -1;
private Integer num;
}
......@@ -19,30 +19,30 @@ public class DifficultyAssessment {
6.数据库
7.本地程序
*/
private String des = "*************************";
private String des;
/**
* 系统部署架构难度
*/
private FrameDifficulty frameDifficulty = new FrameDifficulty();
private FrameDifficulty frameDifficulty;
/**
* 浏览器难度
*/
private BrowserDifficulty browserDifficulty = new BrowserDifficulty();
private BrowserDifficulty browserDifficulty;
/**
* 中间件难度
*/
private MiddlewareDifficulty middlewareDifficulty = new MiddlewareDifficulty();
private MiddlewareDifficulty middlewareDifficulty;
/**
* 数据库难度
*/
private DatabaseDifficulty databaseDifficulty = new DatabaseDifficulty();
private DatabaseDifficulty databaseDifficulty;
/**
* 本地程序难度
*/
private ProgramDifficulty programDifficulty = new ProgramDifficulty();
private ProgramDifficulty programDifficulty;
}
......@@ -18,16 +18,16 @@ public class Estimate {
/**
* 计算值
*/
private double Calculation = 1.1;
private double Calculation;
/**
* 操作
*/
private String operation = "*****";
private String operation;
/**
* 调整后
*/
private double adjustment = 1.1;
private double adjustment;
}
......@@ -18,45 +18,45 @@ public class FrameDifficulty {
/**
* 系统评估
*/
private double systemEvaluation = 1.1;
private double systemEvaluation;
/**
* 额外信息
*/
private double message = 1.1;
private double message;
/**
* 综合难度
*/
private double difficulty = 1.1;
private double difficulty;
/**
* 工作量
*/
private double load = 0.0;
private double load;
/**
* 详情 1:混合 2:前后端分离
*/
private Integer details = 1;
private Integer details;
/**
* 分布式 int 1:是 2:否
*/
private Integer distributed = 1;
private Integer distributed;
/**
* 负载均衡 int 1:是 2:否
*/
private Integer loadBalance = 1;
private Integer loadBalance;
/**
* 容灾 int 1:是 2:否
*/
private Integer disaster = 1;
private Integer disaster;
/**
* 其他需求
*/
private String otherDemand = "***********";
private String otherDemand;
}
......@@ -18,26 +18,26 @@ public class ManufacturingCost {
/**
* 人工单价
*/
private Estimate artificial = new Estimate();
private Estimate artificial;
/**
* 基础工作量
*/
private Estimate workLoad = new Estimate();
private Estimate workLoad;
/**
* 难度系数
*/
private Estimate degreeOfDifficulty = new Estimate();
private Estimate degreeOfDifficulty;
/**
* 额外依赖服务申请
*/
private Estimate apply = new Estimate();
private Estimate apply;
/**
* 预算费用
*/
private Estimate budgetaryCost = new Estimate();
private Estimate budgetaryCost;
}
......@@ -20,27 +20,27 @@ public class MiddlewareDifficulty {
/**
* 系统评估
*/
private double systemEvaluation = 1.1;
private double systemEvaluation;
/**
* 额外信息
*/
private double message = 1.1;
private double message;
/**
* 综合难度
*/
private double difficulty = 1.1;
private double difficulty;
/**
* 工作量
*/
private double load = 0.0;
private double load;
/**
* 依赖详情
*/
private List<DependOnNum> dependOnNum = new ArrayList<>();
private Integer dependOnNum;
/*
*用户额外信息详情
......@@ -48,21 +48,21 @@ public class MiddlewareDifficulty {
/**
*Web集群 1:是 2:否
*/
private Integer web = 1;
private Integer web;
/**
* Jndi集群 1:是 2:否
*/
private Integer jndi = 1;
private Integer jndi;
/**
* Jms集群 1:是 2:否
*/
private Integer jms = 1;
private Integer jms;
/**
* 消息路由 1:是 2:否
*/
private Integer route = 1;
private Integer route;
}
......@@ -30,12 +30,12 @@ public class ProgramDifficulty {
/**
* 综合难度
*/
private double difficulty = 1.1;
private double difficulty;
/**
* 工作量
*/
private double load = 0.0;
private double load;
/**
* 依赖详情
......
......@@ -18,15 +18,15 @@ public class SysScale {
/**
* 代码
*/
private Scale code = new Scale();
private Scale code;
/**
* 文件
*/
private Scale file = new Scale();
private Scale file;
/**
* 模块
*/
private Scale mode = new Scale();
private Scale mode;
}
......@@ -18,25 +18,25 @@ public class TechnologyContent {
/**
* 本地程序开发
*/
private String local = "*****";
private String local;
/**
* 关键字
*/
private String keyWord= "********";
private String keyWord;
/**
* 所在文件
*/
private String file = "*****";
private String file;
/**
* 位置
*/
private String position = "*******";
private String position;
/**
* 替换策略
*/
private Integer strategy = 1;
private Integer strategy;
}
......@@ -21,7 +21,7 @@ public class TechnologyList {
/**
* 建议
*/
private String des = "***************************************************";
private String des;
/**
* 技术列表
......
......@@ -21,7 +21,7 @@ public class TechnologyReport {
/**
* 关键技术
*/
private String technology = "*******";
private String technology;
/**
......
......@@ -17,17 +17,17 @@ public class Workload {
/**
* 描述
*/
private String des = "***************";
private String des;
/**
* 开发费用
*/
private double cost = 1.2;
private double cost;
/**
*模块数
*/
private Integer mode = 19;
private Integer mode;
/*
* 依据
......@@ -36,20 +36,20 @@ public class Workload {
/**
* 开发
*/
private Basis development = new Basis();
private Basis development;
/**
* 测试
*/
private Basis test = new Basis();
private Basis test;
/**
* 部署
*/
private Basis deploy = new Basis();
private Basis deploy;
/**
* 合计
*/
private Basis total = new Basis();
private Basis total;
}
......@@ -301,9 +301,10 @@ public class WorkLoadUtil {
MiddlewareDifficulty middlewareDifficulty = report.getDifficultyAssessment().getMiddlewareDifficulty();
//中间件系统评估P (1+0.001*依赖数量)*(1+0.001*依赖数量)
double pMiddle = 1;
for(DependOnNum dependOnNum:middlewareDifficulty.getDependOnNum()){
pMiddle*=(1.0+0.001*dependOnNum.getNum());
}
// for(DependOnNum dependOnNum:middlewareDifficulty.getDependOnNum()){
// pMiddle*=(1.0+0.001*dependOnNum.getNum());
// }
pMiddle*=(1.0+0.001*middlewareDifficulty.getDependOnNum());
pMiddle = pMiddle>1.3?1.3:pMiddle;
logger.info("中间件难度-评估:"+pMiddle);
middlewareDifficulty.setSystemEvaluation(Double.valueOf(nf.format(pMiddle)));
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论