提交 5aa7d6c9 authored 作者: 孙洁清's avatar 孙洁清

修正系数

上级 c8227236
...@@ -146,6 +146,21 @@ public class InspectController { ...@@ -146,6 +146,21 @@ public class InspectController {
reform.setApply(new Apply()); reform.setApply(new Apply());
reform.setStrategy(-1); reform.setStrategy(-1);
} }
Integer cost = reform.getCost();
int x=cost;
if(cost<100){
int sub = BigDecimalUtil.sub(100, cost);
int divi = BigDecimalUtil.divi(sub, 10);
x = BigDecimalUtil.sub(100, divi);
}else if(cost>1000){
int sub = BigDecimalUtil.sub( cost,1000);
int divi = BigDecimalUtil.divi(sub, 10);
x = BigDecimalUtil.add(1000, divi);
}
reform.setCost(x);
log.info("修改后的价格:{}",reform.getCost());
//获取admin //获取admin
MasterConfig adminConfig = masterConfigParamDao.findByName("admin"); MasterConfig adminConfig = masterConfigParamDao.findByName("admin");
int admin; int admin;
...@@ -468,20 +483,6 @@ public class InspectController { ...@@ -468,20 +483,6 @@ public class InspectController {
@PostMapping("/importExcelToRapidAssessment") @PostMapping("/importExcelToRapidAssessment")
private ServerResponse<Reform> uploadFileToInspect(MultipartFile file, String username) throws IOException { private ServerResponse<Reform> uploadFileToInspect(MultipartFile file, String username) throws IOException {
Reform reform = ExcelUtil.parseExcel(file.getInputStream(),file.getOriginalFilename()); Reform reform = ExcelUtil.parseExcel(file.getInputStream(),file.getOriginalFilename());
Integer cost = reform.getCost();
int x=cost;
if(cost<100){
int sub = BigDecimalUtil.sub(100, cost);
int divi = BigDecimalUtil.divi(sub, 10);
x = BigDecimalUtil.sub(100, divi);
}else if(cost>500){
int sub = BigDecimalUtil.sub( cost,500);
int divi = BigDecimalUtil.divi(sub, 10);
x = BigDecimalUtil.add(500, divi);
}
reform.setCost(x);
reform.setUsername(username); reform.setUsername(username);
return ServerResponse.ok(reform); return ServerResponse.ok(reform);
} }
......
...@@ -24,7 +24,7 @@ public class BudegReport { ...@@ -24,7 +24,7 @@ public class BudegReport {
@Id @Id
@Column( length = 48) @Column( length = 48)
private String evaId; private String evaId;
@Column(columnDefinition = "TEXT") @Column(columnDefinition = "LONGTEXT")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
private String budReport; private String budReport;
} }
...@@ -457,15 +457,15 @@ public class WorkLoadUtil { ...@@ -457,15 +457,15 @@ public class WorkLoadUtil {
report.getWorkload().getDeploy().setCorrectionFactor(Double.valueOf(nf.format(1+deploymentCorrectionFactor))); report.getWorkload().getDeploy().setCorrectionFactor(Double.valueOf(nf.format(1+deploymentCorrectionFactor)));
//开发的开发量 J*(开发修正系数+1)*0.4 //开发的开发量 J*(开发修正系数+1)*0.4
double developmentWorkload = j*(developmentCorrectionFactor+1)*0.4; double developmentWorkload = j*(developmentCorrectionFactor+1)*0.4;
logger.info("开发的开发量 J*(开发修正系数+0.4):"+developmentWorkload); logger.info("开发的开发量 J*(开发修正系数+1)*0.4:"+developmentWorkload);
report.getWorkload().getDevelopment().setDevelopmentVolume(Double.valueOf(nf.format(developmentWorkload))); report.getWorkload().getDevelopment().setDevelopmentVolume(Double.valueOf(nf.format(developmentWorkload)));
//测试的开发量 J*(测试修正系数+1)*0.3 //测试的开发量 J*(测试修正系数+1)*0.3
double testWorkload = j*(testCorrectionFactor+1)*0.3; double testWorkload = j*(testCorrectionFactor+1)*0.3;
logger.info("测试的开发量 J*(测试修正系数+0.3):"+testWorkload); logger.info("测试的开发量 J*(测试修正系数+1)*0.3:"+testWorkload);
report.getWorkload().getTest().setDevelopmentVolume(Double.valueOf(nf.format(testWorkload))); report.getWorkload().getTest().setDevelopmentVolume(Double.valueOf(nf.format(testWorkload)));
//部署的开发量 J*(部署修正系数+1)*0.3 //部署的开发量 J*(部署修正系数+1)*0.3
double deploymentWorkload = j*(deploymentCorrectionFactor+1)*0.3; double deploymentWorkload = j*(deploymentCorrectionFactor+1)*0.3;
logger.info("部署的开发量 J*(部署修正系数+0.3):"+deploymentWorkload); logger.info("部署的开发量 J*(部署修正系数+1)*0.3:"+deploymentWorkload);
report.getWorkload().getDeploy().setDevelopmentVolume(Double.valueOf(nf.format(deploymentWorkload))); report.getWorkload().getDeploy().setDevelopmentVolume(Double.valueOf(nf.format(deploymentWorkload)));
//合计的开发量 总数 //合计的开发量 总数
double totalWorkload = developmentWorkload+testWorkload+deploymentWorkload; double totalWorkload = developmentWorkload+testWorkload+deploymentWorkload;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论