Commit 63c28083 authored by 赵啸非's avatar 赵啸非

添加设备告警

parent 72fd3093
package com.mortals.xhx.module.device.web;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.AlarmLevelEnum;
import com.mortals.xhx.common.code.AlarmTypeEnum;
import com.mortals.xhx.common.code.DeviceTypeEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
......@@ -44,8 +47,9 @@ public class DeviceAlarmController extends BaseCRUDJsonMappingController<DeviceA
@Override
protected void init(HttpServletRequest request, HttpServletResponse response, DeviceAlarmForm form, Map<String, Object> model, Context context) {
this.addDict(model, "alarmType", paramService.getParamBySecondOrganize("DeviceAlarm","alarmType"));
this.addDict(model, "alarmLevel", paramService.getParamBySecondOrganize("DeviceAlarm","alarmLevel"));
this.addDict(model, "alarmType", AlarmTypeEnum.getEnumMap());
this.addDict(model, "alarmLevel", AlarmLevelEnum.getEnumMap());
this.addDict(model, "deviceType", DeviceTypeEnum.getEnumMap());
super.init(request, response, form, model, context);
}
......
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