From 4fbe2431794ce4842a4a7d1a7242d53db86182ef Mon Sep 17 00:00:00 2001 From: Fancy <Fancy.fx@outlook.com> Date: 星期三, 03 七月 2024 15:06:54 +0800 Subject: [PATCH] add quality and test items Api --- pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/workOrder/WorkOrderCtrl.java | 77 +++++++++++++++++++++++++++++++++++++- 1 files changed, 74 insertions(+), 3 deletions(-) diff --git a/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/workOrder/WorkOrderCtrl.java b/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/workOrder/WorkOrderCtrl.java index faf9b6c..4cb4a24 100644 --- a/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/workOrder/WorkOrderCtrl.java +++ b/pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/workOrder/WorkOrderCtrl.java @@ -3,9 +3,10 @@ import com.dy.common.webUtil.BaseResponse; import com.dy.common.webUtil.BaseResponseUtils; import com.dy.pmsGlobal.pojoBa.BaUser; -import com.dy.pmsGlobal.pojoPlt.PltProductionLine; +import com.dy.pmsGlobal.pojoPlt.PltProduct; import com.dy.pmsGlobal.pojoPlt.PltStation; import com.dy.pmsGlobal.pojoPr.PrAssemblyPlan; +import com.dy.pmsGlobal.pojoPr.PrProductionNode; import com.dy.pmsGlobal.pojoSta.StaAssemblyWorkLast; import jakarta.validation.Valid; import lombok.extern.slf4j.Slf4j; @@ -52,8 +53,8 @@ * @return */ @GetMapping(path="checkStationUsed") - public BaseResponse<StaAssemblyWorkLast> checkStationUsed(QueryVo last){ - StaAssemblyWorkLast stationInfo = sv.checkStationUsed(last); + public BaseResponse<StaAssemblyWorkLast> checkStationUsed(String stationId){ + StaAssemblyWorkLast stationInfo = sv.checkStationUsed(stationId); return BaseResponseUtils.buildSuccess(stationInfo); } /** @@ -105,7 +106,77 @@ return BaseResponseUtils.buildSuccess(true); } } + /** + * 娣诲姞鍗曚釜杈呭姪浜哄憳 + * @param + * @return + */ + @PostMapping(path="addAssistant") + public BaseResponse<Boolean> addAssistant(String workId ,String assistant){ + log.info("WorkOrderCtrl.addAssistant()"); + int count = sv.addAssistant(workId,assistant); + if (count <= 0) { + return BaseResponseUtils.buildFail("鏁版嵁搴撳瓨鍌ㄥけ璐�"); + } else { + return BaseResponseUtils.buildSuccess(true); + } + } + /** + * 鍒犻櫎鍗曚釜杈呭姪浜哄憳 + * @param + * @return + */ + @PostMapping(path="removeAssistant") + public BaseResponse<Boolean> removeAssistant(String workId ,String assistant){ + log.info("WorkOrderCtrl.removeAssistant()"); + int count = sv.removeAssistant(workId,assistant); + if (count <= 0) { + return BaseResponseUtils.buildFail("鏁版嵁搴撳瓨鍌ㄥけ璐�"); + } else { + return BaseResponseUtils.buildSuccess(true); + } + } + /** + * 鏌ヨ杈呭姪浜哄憳淇℃伅琛� + * @param + * @return + */ + @GetMapping(path="getAssistantList") + public BaseResponse<List<BaUser>> getAssistantList(String workId){ + List<BaUser> result = sv.getAssistantList(workId); + return BaseResponseUtils.buildSuccess(result); + } + /** + * 淇濆瓨鐧诲綍淇℃伅 + * @param + * @return + */ + @PostMapping(path="updateAssistant") + public BaseResponse<List<BaUser>> updateAssistant(@RequestBody QueryVo vo){ + List<BaUser> result = sv.updateAssistant(vo); + return BaseResponseUtils.buildSuccess(result); + } + /** + * 鏍规嵁鑺傜偣鐨勬煡鍑鸿妭鐐逛綔涓氭寚瀵间功 + * @param + * @return + */ + @GetMapping(path="getSopByNodeId") + public BaseResponse<PrProductionNode> getSopByNodeId(String nodeId){ + PrProductionNode result = sv.getSopByNodeId(nodeId); + return BaseResponseUtils.buildSuccess(result); + } + /** + * 鏍规嵁浜у搧鏌ュ嚭浜у搧鏂囦欢 涓昏鎶�鏈弬鏁� + * @param + * @return + */ + @GetMapping(path="getFileByProId") + public BaseResponse<PltProduct> getFileByProId(String proId){ + PltProduct result = sv.getFileByProId(proId); + return BaseResponseUtils.buildSuccess(result); + } @GetMapping(path = "test") public BaseResponse test() { log.info("test"); -- Gitblit v1.8.0