Commit 720f98c5 authored by chenzhao's avatar chenzhao

增加 批量修改alarmlog状态

parent 4859f9b7
...@@ -69,6 +69,19 @@ public class EquipmentSpecificAlarmLogController extends AbstractBaseController ...@@ -69,6 +69,19 @@ public class EquipmentSpecificAlarmLogController extends AbstractBaseController
return CommonResponseUtil.success(); return CommonResponseUtil.success();
} }
@RequestMapping(value = "/updateStatusByAlarm", method = RequestMethod.GET)
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "批量消除log表所有设备告警及归位", notes = "批量消除log表所有设备告警及归位")
public ResponseModel updateStatusByAlarm() {
equipmentSpecificAlarmLogService.updateStatusByAlarm();
return CommonResponseUtil.success();
}
} }
......
...@@ -44,4 +44,6 @@ public interface EquipmentSpecificAlarmLogMapper extends BaseMapper<EquipmentSpe ...@@ -44,4 +44,6 @@ public interface EquipmentSpecificAlarmLogMapper extends BaseMapper<EquipmentSpe
Map<String, Object> unCleanAlarmEquipLink(String date, String pattern, String cleanFlag); Map<String, Object> unCleanAlarmEquipLink(String date, String pattern, String cleanFlag);
List<EquipmentSpecificAlarmLog> getAlarmLogInfoList(String equipmentCode, String nameKeys, String value, String isCleanTime, String bizOrgCode); List<EquipmentSpecificAlarmLog> getAlarmLogInfoList(String equipmentCode, String nameKeys, String value, String isCleanTime, String bizOrgCode);
void updateStatusByAlarm(String confirmUserName, String resolveResult , String confirmTypeName);
} }
...@@ -67,4 +67,6 @@ public interface IEquipmentSpecificAlarmLogService extends IService<EquipmentSpe ...@@ -67,4 +67,6 @@ public interface IEquipmentSpecificAlarmLogService extends IService<EquipmentSpe
void pressurePumpDisposeAlarm(Long equipmentSpecificId, String body); void pressurePumpDisposeAlarm(Long equipmentSpecificId, String body);
void pressurePumpRestore(Long equipmentSpecificId); void pressurePumpRestore(Long equipmentSpecificId);
void updateStatusByAlarm();
} }
...@@ -142,10 +142,14 @@ public class EquipmentSpecificAlarmLogServiceImpl extends ServiceImpl<EquipmentS ...@@ -142,10 +142,14 @@ public class EquipmentSpecificAlarmLogServiceImpl extends ServiceImpl<EquipmentS
return pageBean; return pageBean;
} }
@Override
public void updateStatusByAlarm() {
String confirmUserName = "系统自动处理";
String resolveResult = DateUtils.getDateNowString()+"系统收到设备复归(已消除)信号,系统自动处理。";
String confirmTypeName = "故障";
equipmentSpecificAlarmLogMapper.updateStatusByAlarm(confirmUserName,resolveResult,confirmTypeName);
}
public void getEquiplistBySystemIdList(String id, Map<String, EquiplistSpecificBySystemVO> map, List<String> iotCodes) { public void getEquiplistBySystemIdList(String id, Map<String, EquiplistSpecificBySystemVO> map, List<String> iotCodes) {
......
...@@ -273,4 +273,17 @@ ...@@ -273,4 +273,17 @@
</where> </where>
ORDER BY wesal.create_date DESC ORDER BY wesal.create_date DESC
</select> </select>
<update id="updateStatusByAlarm">
update wl_equipment_specific_alarm_log
set confirm_type = 'BREAKDOWN',
clean_time = now() ,
confirm_date = IFNULL(wl_equipment_specific_alarm_log.confirm_date,now()),
resolve_result = #{resolveResult},
confirm_user_name = #{confirmUserName},
confirm_type_name = #{confirmTypeName},
alarm_reason = concat((select name from wl_equipment_specific WHERE id = wl_equipment_specific_alarm_log.equipment_specific_id) ,'故障引起设备报警')
WHERE
confirm_type is null or clean_time is null
</update>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment