package com.iailab.module.pms.coalquality.modules.detection.controller.admin; import com.iailab.framework.common.pojo.CommonResult; import com.iailab.framework.common.pojo.PageResult; import com.iailab.module.pms.coalquality.modules.detection.dto.QualityQuickDTO; import com.iailab.module.pms.coalquality.modules.detection.service.QualityQuickService; import com.iailab.module.pms.coalquality.modules.detection.vo.QuickPageReqVO; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import static com.iailab.framework.common.pojo.CommonResult.success; /** * @author DongYukun * @Description * @createTime 2023年12月27日 9:53:00 */ @Slf4j @RestController @RequestMapping("/coal-quality/quality/quick") @Tag(name = "生产快检") public class QualityQuickController { @Autowired private QualityQuickService qualityQuickService; @GetMapping("page") @Operation(summary = "分页") public CommonResult> page(QuickPageReqVO quickPageReqVO){ PageResult page = qualityQuickService.page(quickPageReqVO); return success(page); } @GetMapping("/get") @Operation(summary = "信息") public CommonResult get(String id){ QualityQuickDTO data = qualityQuickService.get(id); return success(data); } @PostMapping("/create") @Operation(summary = "保存") public CommonResult save(@RequestBody QualityQuickDTO dto){ qualityQuickService.save(dto); return success(true); } @PutMapping("/update") @Operation(summary = "修改") public CommonResult update(@RequestBody QualityQuickDTO dto){ qualityQuickService.update(dto); return success(true); } @DeleteMapping("/delete") @Operation(summary = "删除") public CommonResult delete(@RequestBody String[] ids){ qualityQuickService.delete(ids); return success(true); } }