| | |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @PostMapping("/page") |
| | | @ApiOperation("设备管理分页列表") |
| | | @PostMapping("/page") |
| | | public R<PageDTO<MwMicroEquipmentVO>> pageList(@Valid @RequestBody MwMicroEquipmentQuery query) { |
| | | return R.ok(mwMicroEquipmentService.pageList(query)); |
| | | } |
| | |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | @PostMapping("/add") |
| | | @ApiOperation("新增设备") |
| | | @PostMapping("/add") |
| | | public R<?> add(@Valid @RequestBody MwMicroEquipmentDTO dto) { |
| | | mwMicroEquipmentService.add(dto); |
| | | return R.ok(); |
| | |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | @PostMapping("/edit") |
| | | @ApiOperation("编辑设备") |
| | | @PostMapping("/edit") |
| | | public R<?> edit(@Valid @RequestBody MwMicroEquipmentDTO dto) { |
| | | mwMicroEquipmentService.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) { |
| | | mwMicroEquipmentService.removeById(id); |
| | | return R.ok(); |
| | |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @PostMapping("/storedMedicalWastePage") |
| | | @ApiOperation("待处理的医废列表") |
| | | @PostMapping("/storedMedicalWastePage") |
| | | public R<PageDTO<MwMedicalWasteBoxVO>> storedMedicalWastePage(@Valid @RequestBody StorageRecordQuery query) { |
| | | return R.ok(mwMicroEquipmentService.storedMedicalWastePage(query)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 微型设备列表 |
| | | * |
| | | * @return |
| | | */ |
| | | @ApiOperation("微型设备列表") |
| | | @GetMapping("/list") |
| | | public R<List<MwMicroEquipmentVO>> getList() { |
| | | return R.ok(mwMicroEquipmentService.getList()); |
| | | } |
| | | } |