|
|
@ -39,14 +39,14 @@ public class CountJobDetailController { |
|
|
|
|
|
|
|
@PostMapping("/create") |
|
|
|
@Operation(summary = "创建备件盘点任务子") |
|
|
|
@PreAuthorize("@ss.hasPermission('countJobDetail::create')") |
|
|
|
//@PreAuthorize("@ss.hasPermission('countJobDetail::create')")
|
|
|
|
public CommonResult<Long> create(@Valid @RequestBody CountJobDetailCreateReqVO createReqVO) { |
|
|
|
return success(Service.create(createReqVO)); |
|
|
|
} |
|
|
|
|
|
|
|
@PutMapping("/update") |
|
|
|
@Operation(summary = "更新备件盘点任务子") |
|
|
|
@PreAuthorize("@ss.hasPermission('countJobDetail::update')") |
|
|
|
//@PreAuthorize("@ss.hasPermission('countJobDetail::update')")
|
|
|
|
public CommonResult<Boolean> update(@Valid @RequestBody CountJobDetailUpdateReqVO updateReqVO) { |
|
|
|
int result = Service.update(updateReqVO); |
|
|
|
return success(result > 0); |
|
|
@ -55,7 +55,7 @@ public class CountJobDetailController { |
|
|
|
@DeleteMapping("/delete") |
|
|
|
@Operation(summary = "删除备件盘点任务子") |
|
|
|
@Parameter(name = "id", description = "编号", required = true) |
|
|
|
@PreAuthorize("@ss.hasPermission('countJobDetail::delete')") |
|
|
|
//@PreAuthorize("@ss.hasPermission('countJobDetail::delete')")
|
|
|
|
public CommonResult<Boolean> delete(@RequestParam("id") Long id) { |
|
|
|
int result = Service.delete(id); |
|
|
|
return success(result > 0); |
|
|
@ -64,7 +64,7 @@ public class CountJobDetailController { |
|
|
|
@GetMapping("/get") |
|
|
|
@Operation(summary = "获得备件盘点任务子") |
|
|
|
@Parameter(name = "id", description = "编号", required = true, example = "1024") |
|
|
|
@PreAuthorize("@ss.hasPermission('countJobDetail::query')") |
|
|
|
//@PreAuthorize("@ss.hasPermission('countJobDetail::query')")
|
|
|
|
public CommonResult<CountJobDetailRespVO> get(@RequestParam("id") Long id) { |
|
|
|
CountJobDetailDO countJobDetailDO = Service.get(id); |
|
|
|
return success(CountJobDetailConvert.INSTANCE.convert(countJobDetailDO)); |
|
|
@ -73,7 +73,7 @@ public class CountJobDetailController { |
|
|
|
@GetMapping("/list") |
|
|
|
@Operation(summary = "获得备件盘点任务子列表") |
|
|
|
@Parameter(name = "ids", description = "编号列表", required = true, example = "1024,2048") |
|
|
|
@PreAuthorize("@ss.hasPermission('countJobDetail::query')") |
|
|
|
//@PreAuthorize("@ss.hasPermission('countJobDetail::query')")
|
|
|
|
public CommonResult<List<CountJobDetailRespVO>> getList(@RequestParam("ids") Collection<Long> ids) { |
|
|
|
List<CountJobDetailDO> list = Service.getList(ids); |
|
|
|
return success(CountJobDetailConvert.INSTANCE.convertList(list)); |
|
|
@ -81,7 +81,7 @@ public class CountJobDetailController { |
|
|
|
|
|
|
|
@GetMapping("/page") |
|
|
|
@Operation(summary = "获得备件盘点任务子分页") |
|
|
|
@PreAuthorize("@ss.hasPermission('countJobDetail::query')") |
|
|
|
//@PreAuthorize("@ss.hasPermission('countJobDetail::query')")
|
|
|
|
public CommonResult<PageResult<CountJobDetailRespVO>> getPage(@Valid CountJobDetailPageReqVO pageVO) { |
|
|
|
PageResult<CountJobDetailDO> pageResult = Service.getPage(pageVO); |
|
|
|
return success(CountJobDetailConvert.INSTANCE.convertPage(pageResult)); |
|
|
@ -89,7 +89,7 @@ public class CountJobDetailController { |
|
|
|
|
|
|
|
@GetMapping("/export-excel") |
|
|
|
@Operation(summary = "导出备件盘点任务子 Excel") |
|
|
|
@PreAuthorize("@ss.hasPermission('countJobDetail::export')") |
|
|
|
//@PreAuthorize("@ss.hasPermission('countJobDetail::export')")
|
|
|
|
@OperateLog(type = EXPORT) |
|
|
|
public void exportExcel(@Valid CountJobDetailExportReqVO exportReqVO, |
|
|
|
HttpServletResponse response) throws IOException { |
|
|
@ -114,7 +114,7 @@ public class CountJobDetailController { |
|
|
|
@Parameter(name = "mode", description = "导入模式1更新2追加3覆盖", example = "1"), |
|
|
|
@Parameter(name = "updatePart", description = "部分更新,默认为 true", example = "true") |
|
|
|
}) |
|
|
|
@PreAuthorize("@ss.hasPermission('countJobDetail::import')") |
|
|
|
//@PreAuthorize("@ss.hasPermission('countJobDetail::import')")
|
|
|
|
public CommonResult<Map<String, Object>> importExcel(HttpServletResponse response, |
|
|
|
@RequestParam("file") MultipartFile file, |
|
|
|
@RequestParam(value = "mode") Integer mode, |
|
|
|