提交 0c93a8cb authored 作者: wyl's avatar wyl

枚举加NONE

上级 593cd933
...@@ -348,7 +348,7 @@ public class InspectController { ...@@ -348,7 +348,7 @@ public class InspectController {
Budget budget = inspect.getBudgets().getBudget().get(0); Budget budget = inspect.getBudgets().getBudget().get(0);
double f = budget.getProportion()*budget.getSysFund()*budget.getMoneyRate()*budget.getCoefficient(); double f = budget.getProportion()*budget.getSysFund()*budget.getMoneyRate()*budget.getCoefficient();
System.out.println("F:"+f); System.out.println("F:"+f);
workLoadUtil.result(reform, assessmentReport, f, 120); workLoadUtil.result(reform, assessmentReport, f, 1.5);
Evaluation evaluation=new Evaluation(); Evaluation evaluation=new Evaluation();
//输入参数 //输入参数
String in = JSON.toJSONString(reform); String in = JSON.toJSONString(reform);
......
...@@ -19,7 +19,7 @@ public class Apply { ...@@ -19,7 +19,7 @@ public class Apply {
/** /**
* 费用 * 费用
*/ */
private double cost = 1.1; private double cost = -1;
/** /**
* 原因 * 原因
......
...@@ -26,7 +26,7 @@ public class Browser { ...@@ -26,7 +26,7 @@ public class Browser {
/** /**
* 插件安装情况int 1:是 2:否 * 插件安装情况int 1:是 2:否
*/ */
private Integer PlugInUnit; private Integer PlugInUnit = -1;
/** /**
* 其他兼容的浏览器 * 其他兼容的浏览器
...@@ -41,39 +41,39 @@ public class Browser { ...@@ -41,39 +41,39 @@ public class Browser {
/** /**
* 地理信息系统 int 1:是 2:否 * 地理信息系统 int 1:是 2:否
*/ */
private Integer geography; private Integer geography = -1;
/** /**
* 调用外设 * 调用外设
*/ */
private Integer peripheral; private Integer peripheral = -1;
/** /**
*动画 *动画
*/ */
private Integer animation; private Integer animation = -1;
/** /**
* 3d展示 * 3d展示
*/ */
private Integer threeD; private Integer threeD = -1;
/** /**
* 公文显现与编辑 * 公文显现与编辑
*/ */
private Integer document; private Integer document = -1;
/** /**
* 多媒体 * 多媒体
*/ */
private Integer media; private Integer media = -1;
/** /**
* Flash * Flash
*/ */
private Integer flash; private Integer flash = -1;
/** /**
* 其他 * 其他
*/ */
private Integer otherDemand; private Integer otherDemand = -1;
} }
...@@ -32,36 +32,36 @@ public class Database { ...@@ -32,36 +32,36 @@ public class Database {
/** /**
* 视图 int 1:是 2:否 * 视图 int 1:是 2:否
*/ */
private Integer view; private Integer view = -1;
/** /**
* 存储过程 1:是 2:否 * 存储过程 1:是 2:否
*/ */
private Integer storage; private Integer storage = -1;
/** /**
* 函数 1:是 2:否 * 函数 1:是 2:否
*/ */
private Integer function = 1; private Integer function = -1;
/** /**
* Dblink 1:是 2:否 * Dblink 1:是 2:否
*/ */
private Integer dbLink; private Integer dbLink = -1;
/** /**
* 定时任务 1:是 2:否 * 定时任务 1:是 2:否
*/ */
private Integer timeTask = 1; private Integer timeTask = -1;
/** /**
* 序列 1:是 2:否 * 序列 1:是 2:否
*/ */
private Integer sequence = 1; private Integer sequence = -1;
/** /**
* 触发器 1:是 2:否 * 触发器 1:是 2:否
*/ */
private Integer trigger; private Integer trigger = -1;
/* /*
更多内容 更多内容
...@@ -70,22 +70,22 @@ public class Database { ...@@ -70,22 +70,22 @@ public class Database {
/** /**
* 容灾 (1:否 2:主备 3:分布式) * 容灾 (1:否 2:主备 3:分布式)
*/ */
private Integer disasterTolerance; private Integer disasterTolerance = -1;
/** /**
* 安全 1:是 2:否 * 安全 1:是 2:否
*/ */
private Integer safe; private Integer safe = -1;
/** /**
* 读写分离 1:是 2:否 * 读写分离 1:是 2:否
*/ */
private Integer separate; private Integer separate = -1;
/** /**
* 更高性能 1:是 2:否 * 更高性能 1:是 2:否
*/ */
private Integer performance; private Integer performance = -1;
/** /**
* 其他内容 * 其他内容
......
...@@ -23,5 +23,5 @@ public class DependOnNum { ...@@ -23,5 +23,5 @@ public class DependOnNum {
/** /**
* 数量 * 数量
*/ */
private Integer num = 10; private Integer num = -1;
} }
...@@ -18,12 +18,12 @@ public class Details { ...@@ -18,12 +18,12 @@ public class Details {
/** /**
* 部署情况 1、本地 2:政务云 * 部署情况 1、本地 2:政务云
*/ */
private Integer deploy; private Integer deploy = -1;
/** /**
* 操作系统 枚举 * 操作系统 枚举
*/ */
private OperateSystem operateSystem; private OperateSystem operateSystem = OperateSystem.NONE;
/** /**
* 其他 * 其他
......
...@@ -36,20 +36,20 @@ public class Middleware { ...@@ -36,20 +36,20 @@ public class Middleware {
/** /**
*Web集群 1:是 2:否 *Web集群 1:是 2:否
*/ */
private Integer web; private Integer web = -1;
/** /**
* Jndi集群 1:是 2:否 * Jndi集群 1:是 2:否
*/ */
private Integer jndi; private Integer jndi = -1;
/** /**
* Jms集群 1:是 2:否 * Jms集群 1:是 2:否
*/ */
private Integer jms; private Integer jms = -1;
/** /**
* 消息路由 1:是 2:否 * 消息路由 1:是 2:否
*/ */
private Integer route; private Integer route = -1;
} }
...@@ -24,7 +24,7 @@ public class Reform { ...@@ -24,7 +24,7 @@ public class Reform {
/** /**
* admin 是否是管理员 * admin 是否是管理员
*/ */
private Integer admin; private Integer admin = -1;
/** /**
* username * username
...@@ -38,7 +38,7 @@ public class Reform { ...@@ -38,7 +38,7 @@ public class Reform {
/** /**
* 替换方式 int(1:改造 2:适配) * 替换方式 int(1:改造 2:适配)
*/ */
private Integer mode ; private Integer mode = -1;
/** /**
* 系统名称 * 系统名称
...@@ -64,28 +64,28 @@ public class Reform { ...@@ -64,28 +64,28 @@ public class Reform {
/** /**
* 模块数 * 模块数
*/ */
private Integer moduleNum; private Integer moduleNum = -1;
/** /**
* 原开发费用 * 原开发费用
*/ */
private Integer cost; private Integer cost = -1;
/** /**
* 开发单位是否在本地int 1:是 2:否 * 开发单位是否在本地int 1:是 2:否
*/ */
private Integer address; private Integer address = -1;
/** /**
* 是否为涉密信息系统 int 1:是 2:否 * 是否为涉密信息系统 int 1:是 2:否
*/ */
private Integer secret; private Integer secret = -1;
/** /**
* 容灾能力 int 1:是 2:否 * 容灾能力 int 1:是 2:否
*/ */
private Integer disasterTolerance; private Integer disasterTolerance = -1;
/** /**
* 安全能力 * 安全能力
...@@ -93,32 +93,32 @@ public class Reform { ...@@ -93,32 +93,32 @@ public class Reform {
* 2:弱 * 2:弱
* 3:强 * 3:强
*/ */
private Integer safe; private Integer safe = -1;
/** /**
* 架构 * 架构
*/ */
private Integer framework; private Integer framework = -1;
/** /**
* 该应用类型 * 该应用类型
*/ */
private Integer applicationType; private Integer applicationType = -1;
/** /**
* 运行时间 * 运行时间
*/ */
private Integer time; private Integer time = -1;
/** /**
* 数据库表数量 * 数据库表数量
*/ */
private Integer tableNum; private Integer tableNum = -1;
/** /**
* 数据库数据量 * 数据库数据量
*/ */
private Integer databaseNum; private Integer databaseNum = -1;
/* /*
详细填写 详细填写
*/ */
...@@ -126,30 +126,30 @@ public class Reform { ...@@ -126,30 +126,30 @@ public class Reform {
/** /**
* 系统部署架构 * 系统部署架构
*/ */
private SystemStructure systemStructure; private SystemStructure systemStructure = new SystemStructure();
/** /**
* 前端浏览器相关 * 前端浏览器相关
*/ */
private Browser browser; private Browser browser = new Browser();
/** /**
* 中间件/API * 中间件/API
*/ */
private Middleware middleware; private Middleware middleware = new Middleware();
/** /**
* 数据库相关 * 数据库相关
*/ */
private Database database; private Database database = new Database();
/** /**
* 迁移策略 1:休息日 2:晚间切换 3:短暂停止 * 迁移策略 1:休息日 2:晚间切换 3:短暂停止
*/ */
private Integer strategy; private Integer strategy = -1;
/** /**
* 额外申请 * 额外申请
*/ */
private Apply apply; private Apply apply = new Apply();
} }
...@@ -48,12 +48,12 @@ public class SystemStructure { ...@@ -48,12 +48,12 @@ public class SystemStructure {
/** /**
* 分布式 int 1:是 2:否 * 分布式 int 1:是 2:否
*/ */
private Integer distributed; private Integer distributed = -1;
/** /**
* 负载均衡 int 1:是 2:否 * 负载均衡 int 1:是 2:否
*/ */
private Integer loadBalance; private Integer loadBalance = -1;
/** /**
* 容灾 * 容灾
...@@ -61,7 +61,7 @@ public class SystemStructure { ...@@ -61,7 +61,7 @@ public class SystemStructure {
* 2:有0,无-0.05 * 2:有0,无-0.05
* 3:有0,无-0.1 * 3:有0,无-0.1
*/ */
private Integer disaster = 0; private Integer disaster = -1;
/** /**
* 其他需求 * 其他需求
......
...@@ -345,7 +345,15 @@ public class WorkLoadUtil { ...@@ -345,7 +345,15 @@ public class WorkLoadUtil {
//本地程序e (1+0.2)数量次幂 max=1.5 //本地程序e (1+0.2)数量次幂 max=1.5
ProgramDifficulty programDifficulty = report.getDifficultyAssessment().getProgramDifficulty(); ProgramDifficulty programDifficulty = report.getDifficultyAssessment().getProgramDifficulty();
double eProgram = Math.pow(1.2, programDifficulty.getDependOnNum().size()); int totalNum = 0;
for(DependOnNum dependOnNum:programDifficulty.getDependOnNum()){
System.out.println(dependOnNum.getName());
if(dependOnNum.getNum()!=-1){
totalNum += dependOnNum.getNum();
}
}
logger.info(totalNum+"");
double eProgram = Math.pow(1.2, totalNum);
eProgram = eProgram>1.5?1.5:eProgram; eProgram = eProgram>1.5?1.5:eProgram;
logger.info("本地程序难度:"+eProgram); logger.info("本地程序难度:"+eProgram);
programDifficulty.setDifficulty(eProgram); programDifficulty.setDifficulty(eProgram);
...@@ -398,12 +406,12 @@ public class WorkLoadUtil { ...@@ -398,12 +406,12 @@ public class WorkLoadUtil {
report.getManufacturingCost().getWorkLoad().setAdjustment(totalWorkload); report.getManufacturingCost().getWorkLoad().setAdjustment(totalWorkload);
report.getManufacturingCost().getDegreeOfDifficulty().setCalculation(multipleHardrage); report.getManufacturingCost().getDegreeOfDifficulty().setCalculation(multipleHardrage);
report.getManufacturingCost().getDegreeOfDifficulty().setAdjustment(multipleHardrage); report.getManufacturingCost().getDegreeOfDifficulty().setAdjustment(multipleHardrage);
report.getManufacturingCost().getApply().setCalculation(reform.getApply().getCost()); report.getManufacturingCost().getApply().setCalculation(reform.getApply().getCost()==-1?0:reform.getApply().getCost());
report.getManufacturingCost().getApply().setAdjustment(0); report.getManufacturingCost().getApply().setAdjustment(0);
report.getManufacturingCost().getBudgetaryCost().setCalculation(r*totalWorkload+reform.getApply().getCost()); report.getManufacturingCost().getBudgetaryCost().setCalculation(r*totalWorkload+reform.getApply().getCost());
report.getManufacturingCost().getBudgetaryCost().setAdjustment(r*totalWorkload); report.getManufacturingCost().getBudgetaryCost().setAdjustment(r*totalWorkload);
logger.info("人工费:"+r+"万元"); logger.info("人工费:"+r+"万元");
logger.info("额外申请"+reform.getApply().getCost()+"万元"); logger.info("额外申请"+(reform.getApply().getCost()==-1?0:reform.getApply().getCost())+"万元");
logger.info("费用总计"+(r*totalWorkload+reform.getApply().getCost())); logger.info("费用总计"+(r*totalWorkload+reform.getApply().getCost()));
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论