package com.iailab.module.pms.coalquality.modules.analysis.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.analysis.dto.CoalWashCurvesDTO; import com.iailab.module.pms.coalquality.modules.analysis.service.CoalWashCurvesService; import com.iailab.module.pms.coalquality.modules.analysis.vo.WashCurvesPageReqVO; 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 java.util.Map; import static com.iailab.framework.common.pojo.CommonResult.success; /** * @author PanZhibao * @Description * @createTime 2023年01月16日 16:25:00 */ @RestController @RequestMapping("/xmcpms/coal-quality/analysis/wash-curves") @Tag(name="可选性曲线台账") public class CoalWashCurvesController { @Autowired private CoalWashCurvesService coalWashCurvesService; @GetMapping("/page") @AutoDict public CommonResult> page(WashCurvesPageReqVO washCurvesPageReqVO){ PageResult page = coalWashCurvesService.page(washCurvesPageReqVO); return success(page); } @GetMapping("/info") @Operation(summary ="信息") @AutoDict public CommonResult getByMzAndRq(@RequestParam Map params){ String mz = (String)params.get("mz"); String syrq = (String)params.get("syrq"); CoalWashCurvesDTO data = coalWashCurvesService.getByMzAndRq(mz,syrq); return success(data); } @GetMapping("/last") @Operation(summary ="信息") @AutoDict public CommonResult last(@RequestParam Map params){ String mz = (String)params.get("mz"); CoalWashCurvesDTO data = coalWashCurvesService.getLastByMz(mz); return success(true); } @GetMapping("/get") @Operation(summary ="信息") @AutoDict public CommonResult get(String id){ CoalWashCurvesDTO data = coalWashCurvesService.get(id); return success(data); } @PostMapping("/create") @Operation(summary = "保存") public CommonResult create(@RequestBody CoalWashCurvesDTO dto){ coalWashCurvesService.save(dto); return success(true); } @PutMapping("/update") @Operation(summary ="修改") public CommonResult update(@RequestBody CoalWashCurvesDTO dto){ coalWashCurvesService.update(dto); return success(true); } @DeleteMapping("/delete") @Operation(summary = "删除") public CommonResult delete(@RequestBody String[] ids){ coalWashCurvesService.delete(ids); return success(true); } }