Commit 9d0130e1 authored by suhuiguang's avatar suhuiguang

1.修改说明

parent 5af9b1ad
......@@ -1121,16 +1121,14 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
//1.1计算rpni
BigDecimal rpni = oidValue.multiply(sidValue).multiply(didValue).setScale(2, BigDecimal.ROUND_HALF_UP);
BigDecimal rpn;
//1.2计算rpn:为空则rpni = rpn;不为空则重新计算s*d*newo
//未评价过,计算绑定的巡检点项 设备点位故障率
//1.2未评价过,计算绑定的巡检点项 设备点位故障率
if (fmea.getNewEvaluationOid() == null) {
EvaluationModel evaluationModel = this.getEvaluationModel(fmeaId);
if(evaluationModel != null){//存在则更新为计算后的结果
if(evaluationModel != null){//已经绑定点位或者巡检点项且匹配到风险模型,则更新为计算后的结果
BigDecimal newOidValue = new BigDecimal(evaluationModel.getCoefficient());
rpn = newOidValue.multiply(sidValue).multiply(didValue).setScale(2, BigDecimal.ROUND_HALF_UP);
fmea.setNewEvaluationOid(evaluationModel.getId());
}else {//不存在则更新为rpn与rpni一致
}else {//未绑定点位或者巡检点项或者匹配不到风险模型,则更新为rpn与rpni一致
fmea.setNewEvaluationOid(fmea.getEvaluationOid());
rpn = rpni;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment