| | |
| | | import com.sinata.system.domain.dto.MwMicroEquipmentRecordDTO; |
| | | import com.sinata.system.domain.query.MwMicroEquipmentRecordQuery; |
| | | import com.sinata.system.domain.query.MwMicroEquipmentStaticsQuery; |
| | | import com.sinata.system.domain.vo.DepartmentReportVO; |
| | | import com.sinata.system.domain.vo.MwMicroEquipmentRecordVO; |
| | | import com.sinata.system.domain.vo.MwMicroEquipmentStaticsTitleVO; |
| | | import com.sinata.system.service.MwMicroEquipmentRecordService; |
| | | 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.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; |
| | |
| | | * @author mitao |
| | | * @since 2024-12-02 |
| | | */ |
| | | @Api(tags = {"设备使用记录相关接口"}) |
| | | @Api(tags = {"小型微波设备使用记录相关接口"}) |
| | | @Validated |
| | | @RequiredArgsConstructor |
| | | @RestController |
| | |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @PostMapping("/page") |
| | | @ApiOperation("设备使用记录分页列表") |
| | | @PostMapping("/page") |
| | | public R<PageDTO<MwMicroEquipmentRecordVO>> pageList(@Valid @RequestBody MwMicroEquipmentRecordQuery query) { |
| | | return R.ok(mwMicroEquipmentRecordService.pageList(query)); |
| | | } |
| | | |
| | | /** |
| | | * 设备使用记录详情 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @ApiOperation("设备使用记录详情") |
| | | @GetMapping("/{id}") |
| | | public R<MwMicroEquipmentRecordVO> detail(@ApiParam(name = "id", value = "设备id", required = true) @PathVariable("id") Long id) { |
| | | return R.ok(mwMicroEquipmentRecordService.detail(id)); |
| | | } |
| | | /** |
| | | * 导出设备使用记录 |
| | | * |
| | | * @param query |
| | | */ |
| | | @PostMapping("/export") |
| | | @ApiOperation("导出设备使用记录") |
| | | @PostMapping("/export") |
| | | public void export(@RequestBody MwMicroEquipmentRecordQuery query, HttpServletResponse response) { |
| | | try { |
| | | mwMicroEquipmentRecordService.export(query, response); |
| | |
| | | * @param dto |
| | | * @return |
| | | */ |
| | | @PostMapping("/add") |
| | | @ApiOperation("新增使用记录") |
| | | @PostMapping("/add") |
| | | public R<?> add(@Valid @RequestBody MwMicroEquipmentRecordDTO dto) { |
| | | mwMicroEquipmentRecordService.add(dto); |
| | | return R.ok(); |
| | |
| | | * |
| | | * @return |
| | | */ |
| | | @GetMapping("/statics/title") |
| | | @ApiOperation("处置分析表头") |
| | | @GetMapping("/statics/title") |
| | | public R<List<MwMicroEquipmentStaticsTitleVO>> staticsTitle() { |
| | | return R.ok(mwMicroEquipmentRecordService.staticsTitle()); |
| | | } |
| | |
| | | * @param query |
| | | * @return |
| | | */ |
| | | @PostMapping("/statics/data") |
| | | @ApiOperation("处置分析数据") |
| | | public R<List<List<String>>> staticsData(@Valid @RequestBody MwMicroEquipmentStaticsQuery query) { |
| | | @PostMapping("/statics/data") |
| | | public R<DepartmentReportVO> staticsData(@Valid @RequestBody MwMicroEquipmentStaticsQuery query) { |
| | | return R.ok(mwMicroEquipmentRecordService.getStaticsData(query)); |
| | | } |
| | | |
| | | /** |
| | | * 处置分析导出 |
| | | * |
| | | * @param query |
| | | * @param response |
| | | */ |
| | | @PostMapping("/statics/export") |
| | | @ApiOperation("处置分析导出") |
| | | public void export(@Valid @RequestBody MwMicroEquipmentStaticsQuery query, HttpServletResponse response) { |
| | | @PostMapping("/statics/export") |
| | | public void export(@RequestBody MwMicroEquipmentStaticsQuery query, HttpServletResponse response) { |
| | | try { |
| | | mwMicroEquipmentRecordService.staticsExport(query, response); |
| | | } catch (IOException e) { |