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