1.算法占比调整,修改监测点稳态合格率算法,原因int/int小数点会省略
2.页面显示占比调整
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.njcn.device.pms.pojo.vo;
|
||||
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@@ -85,4 +86,16 @@ public class ROperatingIndexCommonVO {
|
||||
*/
|
||||
@ApiModelProperty(name = " isUnusual", value = "数据是否异常(0:正常 1:异常)")
|
||||
private Integer isUnusual;
|
||||
|
||||
public void setDataIntegrityRate(Double dataIntegrityRate) {
|
||||
this.dataIntegrityRate = NumberUtil.round(dataIntegrityRate*100,2).doubleValue();
|
||||
}
|
||||
|
||||
public void setDataRightRate(Double dataRightRate) {
|
||||
this.dataRightRate = NumberUtil.round(dataRightRate*100,2).doubleValue();;
|
||||
}
|
||||
|
||||
public void setIndexIntegrityRate(Double indexIntegrityRate) {
|
||||
this.indexIntegrityRate = NumberUtil.round(indexIntegrityRate*100,2).doubleValue();;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.njcn.device.pms.pojo.vo;
|
||||
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -66,6 +67,14 @@ public class ROperatingIndexVO implements Serializable {
|
||||
*/
|
||||
@ApiModelProperty(name = " isUnusual", value = "数据是否异常(0:正常 1:异常)")
|
||||
private Integer isUnusual;
|
||||
|
||||
public void setDataIntegrityRate(Double dataIntegrityRate) {
|
||||
this.dataIntegrityRate = NumberUtil.round(dataIntegrityRate*100,2).doubleValue();;
|
||||
}
|
||||
|
||||
public void setIndexIntegrityRate(Double indexIntegrityRate) {
|
||||
this.indexIntegrityRate = NumberUtil.round(indexIntegrityRate*100,2).doubleValue();;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.njcn.device.pms.service.majornetwork.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||
@@ -59,9 +60,7 @@ public class RMpDevSolveDetailServiceImpl extends ServiceImpl<RMpDevSolveDetailM
|
||||
String endTime = rMpDevAbnormalManageParam.getEndTime(); //结束时间
|
||||
|
||||
//获取所有子部门信息
|
||||
List<DeptDTO> deptDTOList = deptFeignClient.getDepSonDetailByDeptId(id).getData();
|
||||
/*获取下一级子部门信息*/
|
||||
// List<DeptDTO> deptDTOList = deptFeignClient.getDepSonDetailByDeptId (id).getData ( );
|
||||
List<DeptDTO> deptDTOList = deptFeignClient.getDeptDescendantIndexes(id, WebUtil.filterDeptType()).getData();
|
||||
if (CollUtil.isEmpty(deptDTOList)) {
|
||||
throw new BusinessException(CommonResponseEnum.NO_DATA, "部门不存在");
|
||||
}
|
||||
@@ -95,10 +94,11 @@ public class RMpDevSolveDetailServiceImpl extends ServiceImpl<RMpDevSolveDetailM
|
||||
//封装返回数据
|
||||
List<RMpDevSolveVO> resultList = new ArrayList<>();
|
||||
DecimalFormat df = new DecimalFormat("###.00");
|
||||
String time = time(startTime, rMpDevAbnormalManageParam.getType());
|
||||
terminalListMapByOrgId.forEach((key, terminalListByOrg) -> {
|
||||
RMpDevSolveVO rMpDevSolveVO = new RMpDevSolveVO();
|
||||
|
||||
rMpDevSolveVO.setDataDate(startTime);
|
||||
rMpDevSolveVO.setDataDate(time);
|
||||
rMpDevSolveVO.setOrgId(key); //单位id
|
||||
rMpDevSolveVO.setOrgName(terminalListByOrg.get(0).getOrgName()); //单位名称
|
||||
|
||||
@@ -177,10 +177,11 @@ public class RMpDevSolveDetailServiceImpl extends ServiceImpl<RMpDevSolveDetailM
|
||||
//封装返回数据
|
||||
List<RMpDevSolveVO> resultList = new ArrayList<>();
|
||||
DecimalFormat df = new DecimalFormat("###.00");
|
||||
String time = time(startTime, rMpDevAbnormalManageParam.getType());
|
||||
terminalListMapByManufacture.forEach((key, terminalListByOrg) -> {
|
||||
RMpDevSolveVO rMpDevSolveVO = new RMpDevSolveVO();
|
||||
|
||||
rMpDevSolveVO.setDataDate(startTime);
|
||||
rMpDevSolveVO.setDataDate(time);
|
||||
rMpDevSolveVO.setManufactureId(key); //厂商id
|
||||
|
||||
rMpDevSolveVO.setTerminalCount(terminalListByOrg.size()); //终端数量
|
||||
@@ -247,10 +248,11 @@ public class RMpDevSolveDetailServiceImpl extends ServiceImpl<RMpDevSolveDetailM
|
||||
//封装返回数据
|
||||
List<RMpDevSolveVO> resultList = new ArrayList<>();
|
||||
DecimalFormat df = new DecimalFormat("###.00");
|
||||
String time = time(startTime, rMpDevAbnormalManageParam.getType());
|
||||
solveMap.forEach((key, RMpDevSolveDetailList) -> {
|
||||
RMpDevSolveVO rMpDevSolveVO = new RMpDevSolveVO();
|
||||
|
||||
rMpDevSolveVO.setDataDate(startTime);
|
||||
rMpDevSolveVO.setDataDate(time);
|
||||
rMpDevSolveVO.setBreakDownType(key); //故障类型
|
||||
|
||||
rMpDevSolveVO.setTerminalCount(null); //终端数量(故障类型的终端数量前端展示'/')
|
||||
@@ -344,6 +346,18 @@ public class RMpDevSolveDetailServiceImpl extends ServiceImpl<RMpDevSolveDetailM
|
||||
}).collect(Collectors.toList());
|
||||
return resultList;
|
||||
}
|
||||
|
||||
private String time(String starTime,Integer type){
|
||||
if(ObjectUtil.isNull(type)){
|
||||
return starTime;
|
||||
}else{
|
||||
if(type==1){
|
||||
return starTime.substring(0,4);
|
||||
}else {
|
||||
return starTime.substring(0,7);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -411,7 +411,7 @@ public class RMpPassRateDServiceImpl extends MppServiceImpl<RMpPassRateDMapper,
|
||||
if(sumEffectiveTime==0||sumEffectiveTime<=sumFreqTime){
|
||||
return result;
|
||||
}
|
||||
result = (double) ((sumEffectiveTime-sumFreqTime)/sumEffectiveTime);
|
||||
result = ((sumEffectiveTime-sumFreqTime)*100.0/sumEffectiveTime);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ public class ROperatingMonitorDServiceImpl extends MppServiceImpl<ROperatingMoni
|
||||
rOperatingMonitorDPO.setDataDate (localDate);
|
||||
rOperatingMonitorDPO.setIsUnusual (rStatAbnormalDPO.getValueAlarm ());
|
||||
rOperatingMonitorDPO.setEffectiveMinuteCount (rMpMonitorEvaluateDPO.getEffectiveMinuteCount ());
|
||||
rOperatingMonitorDPO.setDataIntegrityRate (BigDecimal.valueOf (Double.valueOf(rMpMonitorEvaluateDPO.getEffectiveMinuteCount ()*statisticalInterval)/1440).setScale(2, BigDecimal.ROUND_HALF_UP));
|
||||
rOperatingMonitorDPO.setDataIntegrityRate (BigDecimal.valueOf (Double.valueOf(rMpMonitorEvaluateDPO.getEffectiveMinuteCount ()*statisticalInterval)/1440).setScale(5, BigDecimal.ROUND_HALF_UP));
|
||||
if(rMpMonitorEvaluateDPO.getEffectiveMinuteCount ()==0){
|
||||
rOperatingMonitorDPO.setDataRightRate(BigDecimal.valueOf(0.00));
|
||||
}else{
|
||||
|
||||
Reference in New Issue
Block a user