| | |
| | | private NumberGenerator<DeviceState> numberGenerator; |
| | | |
| | | @PostMapping("saveDeviceState") |
| | | @ValueAuth |
| | | public Result saveIncidentReportData(@RequestBody DeviceState deviceState) { |
| | | if (ObjectUtils.isEmpty(deviceState.getProcessNumber())) { |
| | | String year = new SimpleDateFormat("yy", Locale.CHINESE).format(new Date()); |
| | |
| | | } |
| | | |
| | | @GetMapping("/getDeviceStatePage") |
| | | @ValueAuth |
| | | public Result getDeviceStatePage(@RequestParam("deviceId") Integer deviceId, Page page, String processNumber){ |
| | | return Result.success(deviceStateService.getDeviceStatePage(deviceId, page, processNumber)); |
| | | } |
| | | |
| | | @DeleteMapping("/deleteDeviceState") |
| | | @ValueAuth |
| | | public Result deleteDeviceState(@RequestParam("stateId") Integer stateId){ |
| | | return Result.success(deviceStateService.removeById(stateId)); |
| | | } |
| | | |
| | | @PostMapping("/deviceStateExport") |
| | | @ValueAuth |
| | | public Result deviceStateExport(@RequestParam("deviceId") Integer deviceId, String processNumber, HttpServletResponse response) throws Exception { |
| | | IPage<DeviceStateDto> deviceBorrows = deviceStateService.getDeviceStatePage(deviceId, new Page<>(1, -1), processNumber); |
| | | List<DeviceStateExport> studentList = JSONObject.parseArray(JSON.toJSONString(deviceBorrows.getRecords()), DeviceStateExport.class); |