From bfc5f67af0bd2d28e2db352987a7b4c535058d8d Mon Sep 17 00:00:00 2001 From: Fancy <Fancy.fx@outlook.com> Date: 星期一, 01 七月 2024 14:00:03 +0800 Subject: [PATCH] some AIP change --- pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepCtrl.java | 33 +++++++++++++++++++++++++++++++++ 1 files changed, 33 insertions(+), 0 deletions(-) diff --git a/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepCtrl.java b/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepCtrl.java index 353bbd1..754eaac 100644 --- a/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepCtrl.java +++ b/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepCtrl.java @@ -1,6 +1,12 @@ package com.dy.pmsStation.assemblyStep; +import com.dy.common.webUtil.BaseResponse; +import com.dy.common.webUtil.BaseResponseUtils; +import jakarta.validation.Valid; import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -11,4 +17,31 @@ @RestController @RequestMapping(path = "assemblyStep") public class AssemblyStepCtrl { + private AssemblyStepSv sv; + @Autowired + public void setSv(AssemblyStepSv sv) { + this.sv = sv; + } + + @PostMapping(path = "save") + public BaseResponse save(@RequestBody @Valid QueryVo vo) { + log.info("AssemblyStepCtrl.save()"); + int count = sv.save(vo); + if (count <= 0) { + return BaseResponseUtils.buildFail("鏁版嵁搴撳瓨鍌ㄥけ璐�"); + } else { + return BaseResponseUtils.buildSuccess(true); + } + } + + @PostMapping(path = "repair") + public BaseResponse repair(@RequestBody @Valid QueryVo vo) { + log.info("AssemblyStepCtrl.repair()"); + int count = sv.repair(vo); + if (count <= 0) { + return BaseResponseUtils.buildFail("鏁版嵁搴撳瓨鍌ㄥけ璐�"); + } else { + return BaseResponseUtils.buildSuccess(true); + } + } } -- Gitblit v1.8.0