|
|
|
@ -5,18 +5,14 @@ import com.op.common.core.utils.DateUtils;
|
|
|
|
|
import com.op.common.core.web.domain.AjaxResult;
|
|
|
|
|
import com.op.device.domain.*;
|
|
|
|
|
import com.op.device.mapper.*;
|
|
|
|
|
import com.op.device.domain.EquOperationRecord;
|
|
|
|
|
import com.op.device.domain.EquRepairWorkOrder;
|
|
|
|
|
import com.op.device.domain.MesReportWork;
|
|
|
|
|
import com.op.device.domain.vo.IEquFaultVO;
|
|
|
|
|
import com.op.device.mapper.EquEquipmentMapper;
|
|
|
|
|
import com.op.device.domain.vo.IEquipmentVO;
|
|
|
|
|
import com.op.device.domain.vo.IRepairWorkOrderVO;
|
|
|
|
|
import com.op.device.service.IDeviceInterfaceService;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
import java.math.BigDecimal;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
@ -40,11 +36,15 @@ public class DeviceInterfaceServiceImpl implements IDeviceInterfaceService {
|
|
|
|
|
@DS("#header.poolName")
|
|
|
|
|
public AjaxResult getRepairWorkOrder() {
|
|
|
|
|
List<IRepairWorkOrderVO> workOrderVOList = deviceInterfaceMapper.selectEquRepairWorkOrderList();
|
|
|
|
|
for (IRepairWorkOrderVO orderVO : workOrderVOList) {
|
|
|
|
|
if (orderVO.getWorkHandle().equals("0")) {
|
|
|
|
|
orderVO.setWorkHandle("立即");
|
|
|
|
|
} else {
|
|
|
|
|
orderVO.setWorkHandle("计划");
|
|
|
|
|
if(workOrderVOList != null){
|
|
|
|
|
for (IRepairWorkOrderVO orderVO : workOrderVOList) {
|
|
|
|
|
if(orderVO.getWorkHandle() != null){
|
|
|
|
|
if (orderVO.getWorkHandle().equals("0")) {
|
|
|
|
|
orderVO.setWorkHandle("立即");
|
|
|
|
|
}
|
|
|
|
|
}else {
|
|
|
|
|
orderVO.setWorkHandle("计划");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return success(workOrderVOList);
|
|
|
|
@ -140,6 +140,11 @@ public class DeviceInterfaceServiceImpl implements IDeviceInterfaceService {
|
|
|
|
|
//查询所有设备(设备停用的除外)
|
|
|
|
|
// 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());
|
|
|
|
|
Double intactRate = operationEquipment*100/totalEquipment;
|
|
|
|
|
String douStr = String.format("%.2f", intactRate);
|
|
|
|
|
equipmentIntactRate.setIntactRate(douStr);
|
|
|
|
|
return success(equipmentIntactRate);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|