| | |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @PostMapping("/page") |
| | | @ApiOperation("防护器具分页列表") |
| | | @PostMapping("/page") |
| | | public R<PageDTO<MwProtectionEquipmentVO>> pageList(@Valid @RequestBody MwProtectionEquipmentQuery query) { |
| | | return R.ok(mwProtectionEquipmentService.pageList(query)); |
| | | } |
| | |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("/{id}") |
| | | @ApiOperation("详情") |
| | | @GetMapping("/{id}") |
| | | public R<MwProtectionEquipmentVO> detail(@ApiParam(name = "id", value = "防护器具id", required = true) @PathVariable("id") Long id) { |
| | | return R.ok(mwProtectionEquipmentService.detail(id)); |
| | | } |
| | |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | @PostMapping("/add") |
| | | @ApiOperation("新增防护器具") |
| | | @PostMapping("/add") |
| | | public R<?> add(@Valid @RequestBody MwProtectionEquipmentDTO dto) { |
| | | mwProtectionEquipmentService.add(dto); |
| | | return R.ok(); |
| | |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | @PostMapping("/edit") |
| | | @ApiOperation("编辑") |
| | | @PostMapping("/edit") |
| | | public R<?> edit(@Valid @RequestBody MwProtectionEquipmentDTO dto) { |
| | | mwProtectionEquipmentService.edit(dto); |
| | | return R.ok(); |
| | |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/{id}") |
| | | @ApiOperation("删除") |
| | | @DeleteMapping("/{id}") |
| | | public R<?> delete(@ApiParam(name = "id", value = "防护器具id", required = true) @PathVariable("id") Long id) { |
| | | mwProtectionEquipmentService.delete(id); |
| | | return R.ok(); |
| | |
| | | * |
| | | * @param dto |
| | | */ |
| | | @PostMapping("/addStock") |
| | | @ApiOperation("增加库存") |
| | | @PostMapping("/addStock") |
| | | public R<?> addStock(@Valid @RequestBody MwProtectionEquipmentRecordDTO dto) { |
| | | mwProtectionEquipmentService.addStock(dto); |
| | | return R.ok(); |
| | |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @PostMapping("/recordPage") |
| | | @ApiOperation("增减记录") |
| | | @PostMapping("/recordPage") |
| | | public R<PageDTO<MwProtectionEquipmentRecordVO>> recordPage(@Valid @RequestBody MwProtectionEquipmentRecordQuery query) { |
| | | return R.ok(mwProtectionEquipmentService.recordPage(query)); |
| | | } |