| | |
| | | |
| | | import com.dy.common.webUtil.BaseResponse; |
| | | import com.dy.common.webUtil.BaseResponseUtils; |
| | | import com.dy.pmsGlobal.pojoPlt.PltProductQualityInspectionItems; |
| | | import com.dy.pmsGlobal.pojoPlt.PltProductTestInspectionItems; |
| | | 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; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | *记录组装各步骤 |
| | |
| | | |
| | | @PostMapping(path = "save") |
| | | public BaseResponse save(@RequestBody @Valid QueryVo vo) { |
| | | log.info("AssemblyStepCtrl.test()"); |
| | | log.info("AssemblyStepCtrl.save()"); |
| | | int count = sv.save(vo); |
| | | if (count <= 0) { |
| | | return BaseResponseUtils.buildFail("数据库存储失败"); |
| | |
| | | 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); |
| | | } |
| | | } |
| | | @GetMapping(path = "getQualityItems") |
| | | public BaseResponse<List<PltProductQualityInspectionItems>> getQualityItems(String proId) { |
| | | log.info("AssemblyStepCtrl.getQualityItems()"); |
| | | List<PltProductQualityInspectionItems> result = sv.getQualityItems(proId); |
| | | return BaseResponseUtils.buildSuccess(result); |
| | | } |
| | | @GetMapping(path = "getTestItems") |
| | | public BaseResponse<List<PltProductTestInspectionItems>> getTestItems(String proId) { |
| | | log.info("AssemblyStepCtrl.getTestItems()"); |
| | | List<PltProductTestInspectionItems> result = sv.getTestItems(proId); |
| | | return BaseResponseUtils.buildSuccess(result); |
| | | } |
| | | } |