| | |
| | | d.setId(param.getId()); |
| | | d.setEditDate(new Date()); |
| | | d.setIsEntrance(Constants.formatIntegerNum(param.getIsEntrance())); |
| | | d.setLoginUserInfo(this.getLoginUser(token)); |
| | | deviceService.updateById(d); |
| | | return ApiResponse.success(null); |
| | | } |
| | | @ApiOperation("修改是否系统使用") |
| | | @PostMapping("/updateUsedById") |
| | | @CloudRequiredPermission("business:company:update") |
| | | public ApiResponse updateUsedById(@RequestBody Device param,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | Device d = new Device(); |
| | | d.setId(param.getId()); |
| | | d.setEditDate(new Date()); |
| | | d.setLoginUserInfo(this.getLoginUser(token)); |
| | | d.setIsUsed(Constants.formatIntegerNum(param.getIsUsed())); |
| | | deviceService.updateUsedById(d); |
| | | return ApiResponse.success(null); |
| | | } |
| | | @ApiOperation("执行断路器开关闸操作") |
| | | @PostMapping("/duanluqiCmd") |
| | | @CloudRequiredPermission("business:company:update") |
| | | public ApiResponse duanluqiCmd(@RequestBody Device param,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | param.setLoginUserInfo(this.getLoginUser(token)); |
| | | deviceService.duanluqiCmd(param); |
| | | return ApiResponse.success(null); |
| | | } |
| | | |
| | |
| | | public ApiResponse<PageData<Device>> findPage (@RequestBody PageWrap<Device> pageWrap,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | return ApiResponse.success(deviceService.findPage(pageWrap)); |
| | | } |
| | | @ApiOperation("查询全部") |
| | | @PostMapping("/list") |
| | | @CloudRequiredPermission("business:device:query") |
| | | public ApiResponse<List<Device>> findPage (@RequestBody Device model,@RequestHeader(Constants.HEADER_USER_TOKEN) String token){ |
| | | return ApiResponse.success(deviceService.findList(model)); |
| | | } |
| | | |
| | | @ApiOperation("导出Excel") |
| | | @PostMapping("/exportExcel") |