From 3f07ab2e03e501ae55d1d1b0d031daf50c8e13e5 Mon Sep 17 00:00:00 2001 From: dongyukun <1208714201@qq.com> Date: 星期二, 10 十二月 2024 17:27:44 +0800 Subject: [PATCH] common依赖排除父类 --- iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/controller/admin/QualityWashTargetController.java | 81 ++++++++++++++++++++++++++++++++++++++++ 1 files changed, 81 insertions(+), 0 deletions(-) diff --git a/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/controller/admin/QualityWashTargetController.java b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/controller/admin/QualityWashTargetController.java new file mode 100644 index 0000000..cbed4d0 --- /dev/null +++ b/iailab-xmc-pms-biz/src/main/java/com/iailab/module/pms/coalquality/modules/wash/controller/admin/QualityWashTargetController.java @@ -0,0 +1,81 @@ +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.iems.common.utils.Result; +import com.iailab.iems.common.validator.AssertUtils; +import com.iailab.iems.common.validator.ValidatorUtils; +import com.iailab.iems.common.validator.group.AddGroup; +import com.iailab.iems.common.validator.group.DefaultGroup; +import com.iailab.iems.common.validator.group.UpdateGroup; +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("/coal-quality/wash/target") +@Tag(name = "入洗原煤指标") +public class QualityWashTargetController { + @Autowired + private QualityWashTargetService qualityWashTargetService; + + @GetMapping("/page") + @AutoDict + public CommonResult<PageResult<QualityWashTargetDTO>> page(WashTargetPageReqVO washTargetPageReqVO) { + PageResult<QualityWashTargetDTO> page = qualityWashTargetService.page(washTargetPageReqVO); + + return success(page); + } + + @GetMapping("/get") + @Operation(summary = "信息") + public Result<QualityWashTargetDTO> get(String id) { + QualityWashTargetDTO data = qualityWashTargetService.get(id); + return new Result<QualityWashTargetDTO>().ok(data); + } + + @PostMapping + @Operation(summary = "保存") + public CommonResult<Boolean> save(@RequestBody QualityWashTargetDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + + qualityWashTargetService.save(dto); + + return success(true); + } + + @PutMapping + @Operation(summary = "修改") + public CommonResult<Boolean> update(@RequestBody QualityWashTargetDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + + qualityWashTargetService.update(dto); + + return success(true); + } + + @DeleteMapping + @Operation(summary = "删除") + public CommonResult<Boolean> delete(@RequestBody String[] ids) { + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + + qualityWashTargetService.delete(ids); + + return success(true); + } +} -- Gitblit v1.9.3