|
@@ -38,6 +38,7 @@ import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|
import org.assertj.core.util.Lists;
|
|
import org.assertj.core.util.Lists;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.util.CollectionUtils;
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
+import org.springframework.util.StringUtils;
|
|
import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
@@ -213,7 +214,7 @@ public class AlarmRecordController {
|
|
String treatState = EnumAlarmTreatState.DONE.getType();
|
|
String treatState = EnumAlarmTreatState.DONE.getType();
|
|
List<String> recordIds = closeAlarmRecordDTO.getIds();
|
|
List<String> recordIds = closeAlarmRecordDTO.getIds();
|
|
|
|
|
|
- return updateAlarmRecordTreatState(treatMode, treatState, recordIds);
|
|
|
|
|
|
+ return updateAlarmRecordTreatState(treatMode, treatState,null,null, recordIds);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -226,8 +227,8 @@ public class AlarmRecordController {
|
|
* @author lixing
|
|
* @author lixing
|
|
* @version V1.0 2021/9/20 7:25 下午
|
|
* @version V1.0 2021/9/20 7:25 下午
|
|
*/
|
|
*/
|
|
- private CommonResult<AlarmRecordIdsItem> updateAlarmRecordTreatState(
|
|
|
|
- String treatMode, String treatState, List<String> recordIds) throws Exception {
|
|
|
|
|
|
+ private CommonResult<AlarmRecordIdsItem> updateAlarmRecordTreatState(String treatMode, String treatState,
|
|
|
|
+ String orderId, String orderState, List<String> recordIds) throws Exception {
|
|
AlarmRecordIdsItem alarmRecordIdsItem = new AlarmRecordIdsItem();
|
|
AlarmRecordIdsItem alarmRecordIdsItem = new AlarmRecordIdsItem();
|
|
|
|
|
|
if (CollectionUtils.isEmpty(recordIds)) {
|
|
if (CollectionUtils.isEmpty(recordIds)) {
|
|
@@ -240,6 +241,12 @@ public class AlarmRecordController {
|
|
updateAlarmRecordDTO.setId(recordId);
|
|
updateAlarmRecordDTO.setId(recordId);
|
|
updateAlarmRecordDTO.setTreatMode(Integer.valueOf(treatMode));
|
|
updateAlarmRecordDTO.setTreatMode(Integer.valueOf(treatMode));
|
|
updateAlarmRecordDTO.setTreatState(Integer.valueOf(treatState));
|
|
updateAlarmRecordDTO.setTreatState(Integer.valueOf(treatState));
|
|
|
|
+ if (!StringUtils.isEmpty(orderId)){
|
|
|
|
+ updateAlarmRecordDTO.setOrderId(orderId);
|
|
|
|
+ }
|
|
|
|
+ if (!StringUtils.isEmpty(orderState)){
|
|
|
|
+ updateAlarmRecordDTO.setOrderState(orderState);
|
|
|
|
+ }
|
|
updateAlarmRecordDTOList.add(updateAlarmRecordDTO);
|
|
updateAlarmRecordDTOList.add(updateAlarmRecordDTO);
|
|
alarmRecordIdsItem.setIds(recordIds);
|
|
alarmRecordIdsItem.setIds(recordIds);
|
|
}
|
|
}
|
|
@@ -259,9 +266,10 @@ public class AlarmRecordController {
|
|
String treatState = EnumAlarmTreatState.HANDLING.getType();
|
|
String treatState = EnumAlarmTreatState.HANDLING.getType();
|
|
List<String> recordIds = alarmRecordConvertWorkOrderDTO.getIds();
|
|
List<String> recordIds = alarmRecordConvertWorkOrderDTO.getIds();
|
|
|
|
|
|
- return updateAlarmRecordTreatState(treatMode, treatState, recordIds);
|
|
|
|
|
|
+ return updateAlarmRecordTreatState(treatMode, treatState,null,null, recordIds);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
@ApiOperation(value = "忽略")
|
|
@ApiOperation(value = "忽略")
|
|
@PostMapping("/ignore")
|
|
@PostMapping("/ignore")
|
|
public CommonResult<AlarmRecordIdsItem> ignoreAlarmRecord(
|
|
public CommonResult<AlarmRecordIdsItem> ignoreAlarmRecord(
|
|
@@ -271,7 +279,7 @@ public class AlarmRecordController {
|
|
String treatState = EnumAlarmTreatState.IGNORE.getType();
|
|
String treatState = EnumAlarmTreatState.IGNORE.getType();
|
|
List<String> recordIds = ignoreAlarmRecordDTO.getIds();
|
|
List<String> recordIds = ignoreAlarmRecordDTO.getIds();
|
|
|
|
|
|
- return updateAlarmRecordTreatState(treatMode, treatState, recordIds);
|
|
|
|
|
|
+ return updateAlarmRecordTreatState(treatMode, treatState,null,null, recordIds);
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "报警详情")
|
|
@ApiOperation(value = "报警详情")
|