| | |
| | | package com.fgkj.controller; |
| | | |
| | | import com.fgkj.util.*; |
| | | |
| | | import com.fgkj.dto.Alarm_param; |
| | | import com.fgkj.dto.ServiceModel; |
| | | import com.fgkj.dto.User_log; |
| | |
| | | import com.fgkj.services.Alarm_paramService; |
| | | import com.fgkj.services.User_logService; |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | @RequestMapping("alarmParam") |
| | | @RestController |
| | | @Api |
| | | public class Alarm_paramController { |
| | | |
| | | @Autowired |
| | | @Resource |
| | | private Alarm_paramService service; |
| | | |
| | | @Autowired |
| | | @Resource |
| | | private User_logService uservice; |
| | | |
| | | @PostMapping("/") |
| | | public ServiceModel add(@RequestBody Alarm_param param){ |
| | | // Alarm_param param = getGson().fromJson(json, Alarm_param.class); |
| | | ServiceModel model = service.add(param); |
| | | |
| | | return model; |
| | |
| | | //编辑参数 |
| | | @PutMapping("/") |
| | | public ServiceModel update(@RequestBody Alarm_param param){ |
| | | // Alarm_param param = getGson().fromJson(json, Alarm_param.class); |
| | | ServiceModel model = service.update(param); |
| | | { |
| | | String msg="修改"+param.getAlm_name()+"的参数"; |
| | |
| | | |
| | | @DeleteMapping("/") |
| | | public ServiceModel del(@RequestBody Alarm_param param){ |
| | | // Alarm_param param = getGson().fromJson(json, Alarm_param.class); |
| | | ServiceModel model = service.del(param); |
| | | |
| | | return model; |
| | |
| | | //7.1根据告警类型查告警参数 |
| | | @GetMapping("byCondition") |
| | | public ServiceModel serchByCondition(@RequestBody Alarm_param param){ |
| | | // Alarm_param param = getGson().fromJson(json, Alarm_param.class); |
| | | ServiceModel model = service.serchByCondition(param); |
| | | |
| | | return model; |