| | |
| | | * 设备停用/启用 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author 芯导软件(江苏)有限公司 |
| | | * @author |
| | | * @since 2024-09-26 09:51:40 |
| | | */ |
| | | @RestController |
| | |
| | | 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); |