| | |
| | | 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 |
| | |
| | | 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)); |
| | | } |
| | | /** |
| | | * 导出设备使用记录 |
| | | * |
| | |
| | | */ |
| | | @ApiOperation("处置分析数据") |
| | | @PostMapping("/statics/data") |
| | | public R<List<List<String>>> staticsData(@Valid @RequestBody MwMicroEquipmentStaticsQuery query) { |
| | | public R<DepartmentReportVO> staticsData(@Valid @RequestBody MwMicroEquipmentStaticsQuery query) { |
| | | return R.ok(mwMicroEquipmentRecordService.getStaticsData(query)); |
| | | } |
| | | |
| | | /** |
| | | * 处置分析导出 |
| | | * |
| | |
| | | */ |
| | | @ApiOperation("处置分析导出") |
| | | @PostMapping("/statics/export") |
| | | public void export(@Valid @RequestBody MwMicroEquipmentStaticsQuery query, HttpServletResponse response) { |
| | | public void export(@RequestBody MwMicroEquipmentStaticsQuery query, HttpServletResponse response) { |
| | | try { |
| | | mwMicroEquipmentRecordService.staticsExport(query, response); |
| | | } catch (IOException e) { |