| | |
| | | package com.sinata.web.controller.backend; |
| | | |
| | | import com.sinata.common.core.domain.R; |
| | | import com.sinata.common.entity.PageDTO; |
| | | import com.sinata.system.domain.dto.MwMicroEquipmentDTO; |
| | | import com.sinata.system.domain.query.MwMicroEquipmentQuery; |
| | | import com.sinata.system.domain.query.StorageRecordQuery; |
| | | import com.sinata.system.domain.vo.MwMedicalWasteBoxVO; |
| | | import com.sinata.system.domain.vo.MwMicroEquipmentVO; |
| | | import com.sinata.system.service.MwMicroEquipmentService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | 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.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author mitao |
| | | * @since 2024-12-02 |
| | | */ |
| | | @Validated |
| | | @Api(tags = {"小型微波设备管理相关接口"}) |
| | | @RestController |
| | | @RequiredArgsConstructor |
| | | @RequestMapping("/backend/mwMicroEquipment") |
| | | public class MwMicroEquipmentController { |
| | | private final MwMicroEquipmentService mwMicroEquipmentService; |
| | | |
| | | /** |
| | | * 设备管理分页列表 |
| | | * |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @PostMapping("/page") |
| | | @ApiOperation("设备管理分页列表") |
| | | public R<PageDTO<MwMicroEquipmentVO>> pageList(@Valid @RequestBody MwMicroEquipmentQuery query) { |
| | | return R.ok(mwMicroEquipmentService.pageList(query)); |
| | | } |
| | | |
| | | /** |
| | | * 新增设备 |
| | | * |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | @PostMapping("/add") |
| | | @ApiOperation("新增设备") |
| | | public R<?> add(@Valid @RequestBody MwMicroEquipmentDTO dto) { |
| | | mwMicroEquipmentService.add(dto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 编辑设备 |
| | | * |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | @PostMapping("/edit") |
| | | @ApiOperation("编辑设备") |
| | | public R<?> edit(@Valid @RequestBody MwMicroEquipmentDTO dto) { |
| | | mwMicroEquipmentService.edit(dto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 删除 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @DeleteMapping("/{id}") |
| | | @ApiOperation("删除") |
| | | 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("待处理的医废列表") |
| | | public R<PageDTO<MwMedicalWasteBoxVO>> storedMedicalWastePage(@Valid @RequestBody StorageRecordQuery query) { |
| | | return R.ok(mwMicroEquipmentService.storedMedicalWastePage(query)); |
| | | } |
| | | |
| | | /** |
| | | * 微型设备列表 |
| | | * |
| | | * @return |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperation("微型设备列表") |
| | | public R<List<MwMicroEquipmentVO>> getList() { |
| | | return R.ok(mwMicroEquipmentService.getList()); |
| | | } |
| | | } |