设备运行记录逻辑变更

orign^2
wws 1 year ago
parent e2a7281396
commit c2caf2ed6e

@ -453,7 +453,6 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
/**
*
* TODO
*
* @param pdadto
* @return
@ -473,7 +472,7 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
String operationType;
// 停机保养
if (pdadto.getShutDown().equals("1")){
// 更改设备状态为停机
// 更改设备状态为保养中
equ.setStatus("0");
equOrderMapper.updateEquipmentStatus(equ);
operationType = "off";
@ -844,6 +843,13 @@ public class DevicePDAServiceImpl implements IDevicePDAService {
private void updateOperationRecord(String equipmentCode,String operationType,String type) {
// 设备最后一条运行记录
EquOperationRecord lastRecord = equOperationRecordMapper.selectLastOperationRecordByEquipmentCode(equipmentCode);
if (lastRecord.getMaintenanceType() != null) {
if (!lastRecord.getMaintenanceType().isEmpty()) {
if (lastRecord.getMaintenanceType().equals("repair")) {
return;
}
}
}
lastRecord.setEndTime(DateUtils.getNowDate());
lastRecord.setUpdateBy(SecurityContextHolder.getUserName());
// 更新运行记录

Loading…
Cancel
Save