|
|
|
@ -53,7 +53,7 @@ public class DeviceInterfaceServiceImpl implements IDeviceInterfaceService {
|
|
|
|
|
/**
|
|
|
|
|
* 获取设备信息
|
|
|
|
|
* 故障停机率:(设备停机时间总和/一定时间内运行总时间(年))
|
|
|
|
|
* 设备有效利用率:(实际产量/理论产量)
|
|
|
|
|
* 设备有效利用率:(实际产量/理论产量)改为:一定天数内该设备的总开机时间/(天数*24小时)
|
|
|
|
|
*
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
@ -61,10 +61,10 @@ public class DeviceInterfaceServiceImpl implements IDeviceInterfaceService {
|
|
|
|
|
@DS("#header.poolName")
|
|
|
|
|
public AjaxResult getEquipmentInfo(EquOperation equOperation) {
|
|
|
|
|
if (equOperation.getTimeDimension() == null) {
|
|
|
|
|
equOperation.setTimeDimension("dd");
|
|
|
|
|
equOperation.setTimeDimension("yyyy");
|
|
|
|
|
}
|
|
|
|
|
// 获取所有设备信息
|
|
|
|
|
List<IEquipmentVO> equipmentVOList = deviceInterfaceMapper.selectEquipmentList(equOperation);
|
|
|
|
|
List<IEquipmentVO> equipmentVOList = deviceInterfaceMapper.selectEquipmentVOList(equOperation);
|
|
|
|
|
return success(equipmentVOList);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -107,7 +107,7 @@ public class DeviceInterfaceServiceImpl implements IDeviceInterfaceService {
|
|
|
|
|
// 按照raparQuantity字段进行排序,并使用subList获取前10个结果
|
|
|
|
|
List<IEquipmentVO> top10 = equipmentVOList.stream()
|
|
|
|
|
.sorted(Comparator.comparing(IEquipmentVO::getRapairQuantity).reversed())// 由正序改为 反转排序 倒序
|
|
|
|
|
// .limit(10) // 限制结果数量为10 改为不限制结果数量
|
|
|
|
|
.limit(10) // 限制结果数量为10 改为不限制结果数量
|
|
|
|
|
.collect(Collectors.toList()); //将结果收集到List中
|
|
|
|
|
return success(top10);
|
|
|
|
|
}
|
|
|
|
@ -138,7 +138,6 @@ public class DeviceInterfaceServiceImpl implements IDeviceInterfaceService {
|
|
|
|
|
@DS("#header.poolName")
|
|
|
|
|
public AjaxResult getEquipmentIntactRate(EquOperation equOperation) {
|
|
|
|
|
//查询所有设备(设备停用的除外)
|
|
|
|
|
// CAST(SUM(CASE WHEN equipment_status = '1' or equipment_status = '3' THEN 1 Else 0 END)*100.00/COUNT(*) as decimal(18,2)) AS intactRate
|
|
|
|
|
EquOperation equipmentIntactRate = deviceInterfaceMapper.getEquipmentIntactRate(equOperation);
|
|
|
|
|
Double totalEquipment = new Double(equipmentIntactRate.getTotalEquipment());
|
|
|
|
|
Double operationEquipment = new Double(equipmentIntactRate.getOperationEquipment());
|
|
|
|
|