| | |
| | | import com.whyc.dto.Response; |
| | | import com.whyc.pojo.AlarmManualClear; |
| | | import com.whyc.service.AlarmManualClearService; |
| | | import com.whyc.util.ActionUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.swing.*; |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @Api(tags = "告警手动消除") |
| | | @RequestMapping("alarmManualClear") |
| | | public class AlarmManualClearController { |
| | | public class AlarmManualClearController extends BaseController{ |
| | | |
| | | @Autowired |
| | | private AlarmManualClearService service; |
| | | |
| | | @PostMapping("submit") |
| | | @ApiOperation("提交告警消除") |
| | | public Response addClearSubmission(@RequestBody AlarmManualClear clear){ |
| | | return service.submit(clear); |
| | | public Response addClearSubmission(@RequestPart(value = "file",required = false) List<MultipartFile> file, @RequestParam String clearJson){ |
| | | //将clearJson字符串内的"monNum":"-"替换为"monNum":0 |
| | | clearJson = clearJson.replace("monNum\":\"-\"","monNum\":0"); |
| | | AlarmManualClear clear = ActionUtil.getGson().fromJson(clearJson, AlarmManualClear.class); |
| | | return service.submit(file,clear); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询具体告警消除记录",notes = "必传 alarmType,[battGroupId,mon_num,alm_signal_id]/[deviceId]/[powerDeviceId],alm_start_time,alm_id") |
| | |
| | | |
| | | |
| | | @ApiOperation("查询所有告警手动消除记录分页") |
| | | @GetMapping("page") |
| | | public Response getPage(@RequestParam int pageNum, |
| | | @RequestParam int pageSize){ |
| | | return service.getPage(pageNum,pageSize); |
| | | @PostMapping("page") |
| | | public Response getPage(@RequestBody AlarmManualClear param){ |
| | | return service.getPage(param); |
| | | } |
| | | |
| | | } |