| | |
| | | import com.example.springboot.entity.alarmmg; |
| | | import com.example.springboot.mapper.AlarmMapper; |
| | | import com.example.springboot.service.AlarmService; |
| | | import com.microsoft.schemas.office.office.STInsetMode; |
| | | |
| | | @RestController |
| | | @RequestMapping("/alarm") |
| | |
| | | AlarmService alarmService; |
| | | |
| | | @GetMapping("/load") |
| | | public Result selectAll() { |
| | | public Result selectAll() {// 查询当天已结束的报警信息 |
| | | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | List<alarmmg> storageCagelist = alarmMapper.selectAll(); |
| | | map.put("list", storageCagelist); |
| | | return Result.success(map); |
| | | } |
| | | |
| | | @GetMapping("/stTime") |
| | | public Result selecttime(String shijian1, String shijian2) {// 根据日期查询报警信息 |
| | | // 将get方法传过来的参数中"#20"替换为" " |
| | | String sj1 = shijian1.replace("#20", " "); |
| | | String sj2 = shijian2.replace("#20", " "); |
| | | List<alarmmg> storageCagelist = alarmMapper.selecttime(sj1, sj2); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("list", storageCagelist); |
| | | return Result.success(map); |
| | | |
| | | } |
| | | |
| | | } |