package com.iailab.module.pms.coalquality.modules.wash.controller.admin; import com.iailab.framework.common.annotation.AutoDict; import com.iailab.framework.common.pojo.CommonResult; import com.iailab.framework.common.pojo.PageResult; import com.iailab.module.pms.coalquality.modules.wash.dto.QualityWashTargetDTO; import com.iailab.module.pms.coalquality.modules.wash.service.QualityWashTargetService; import com.iailab.module.pms.coalquality.modules.wash.vo.WashTargetPageReqVO; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import static com.iailab.framework.common.pojo.CommonResult.success; /** * @author PanZhibao * @Description * @createTime 2023年12月12日 13:34:00 */ @RestController @RequestMapping("/xmcpms/coal-quality/wash/target") @Tag(name = "入洗原煤指标") public class QualityWashTargetController { @Autowired private QualityWashTargetService qualityWashTargetService; @GetMapping("/page") @AutoDict public CommonResult> page(WashTargetPageReqVO washTargetPageReqVO) { PageResult page = qualityWashTargetService.page(washTargetPageReqVO); return success(page); } @GetMapping("/get") @Operation(summary = "信息") public CommonResult get(String id) { QualityWashTargetDTO data = qualityWashTargetService.get(id); return success(data); } @PostMapping @Operation(summary = "保存") public CommonResult save(@RequestBody QualityWashTargetDTO dto) { qualityWashTargetService.save(dto); return success(true); } @PutMapping @Operation(summary = "修改") public CommonResult update(@RequestBody QualityWashTargetDTO dto) { qualityWashTargetService.update(dto); return success(true); } @DeleteMapping @Operation(summary = "删除") public CommonResult delete(@RequestBody String[] ids) { qualityWashTargetService.delete(ids); return success(true); } }