From e487d886533bb60618864642b85f13957252f70d Mon Sep 17 00:00:00 2001 From: Fancy <Fancy.fx@outlook.com> Date: 星期三, 30 十月 2024 13:42:07 +0800 Subject: [PATCH] nologin add command list --- pms-parent/pms-web-station/src/main/java/com/dy/pmsStation/assemblyStep/AssemblyStepCtrl.java | 198 +++++++++++++++++++++++++++++++----------------- 1 files changed, 127 insertions(+), 71 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 3033db5..57032ee 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,15 +1,17 @@ package com.dy.pmsStation.assemblyStep; -import com.alibaba.excel.util.StringUtils; +import com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.dy.common.webUtil.BaseResponse; import com.dy.common.webUtil.BaseResponseUtils; import com.dy.pmsGlobal.pojoPlt.PltProductFile; import com.dy.pmsGlobal.pojoPlt.PltProductParams; import com.dy.pmsGlobal.pojoPlt.PltProductQualityInspectionItems; import com.dy.pmsGlobal.pojoPlt.PltProductTestInspectionItems; +import com.dy.pmsGlobal.pojoPr.PrAssemblyPlan; import com.dy.pmsGlobal.pojoPr.PrProductionNode; import com.dy.pmsGlobal.pojoSta.StaDeviceLife; import com.dy.pmsGlobal.pojoSta.StaDeviceProductionLog; +import com.dy.pmsGlobal.pojoTst.TstCommand; import jakarta.validation.Valid; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; @@ -19,21 +21,23 @@ import java.util.Map; /** - *璁板綍缁勮鍚勬楠� + * 璁板綍缁勮鍚勬楠� */ @Slf4j @RestController @RequestMapping(path = "assemblyStep") +@SuppressWarnings("unchecked") 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():"+vo); + public BaseResponse<Boolean> save(@RequestBody @Valid QueryVo vo) { + log.info("AssemblyStepCtrl.save():{}", vo); int count = sv.save(vo); if (count <= 0) { return BaseResponseUtils.buildFail("鏁版嵁搴撳瓨鍌ㄥけ璐�"); @@ -42,70 +46,14 @@ } } - @PostMapping(path = "repair") - public BaseResponse repair(@RequestBody @Valid QueryVo vo) { - log.info("AssemblyStepCtrl.repair():"+vo); - int count = sv.repair(vo); - if (count <= 0) { - return BaseResponseUtils.buildFail("鏁版嵁搴撳瓨鍌ㄥけ璐�"); - } else { - return BaseResponseUtils.buildSuccess(true); - } - } /** - * 鏍规嵁鑺傜偣鐨勬煡鍑鸿妭鐐逛綔涓氭寚瀵间功 - * @param - * @return - */ - @GetMapping(path="getSopByNodeId") - public BaseResponse<PrProductionNode> getSopByNodeId(String nodeId){ - log.info("AssemblyStepCtrl.getSopByNodeId():"+nodeId); - PrProductionNode result = sv.getSopByNodeId(nodeId); - return BaseResponseUtils.buildSuccess(result); - } - /** - * 鏍规嵁浜у搧鏌ュ嚭 涓昏鎶�鏈弬鏁� - * @param - * @return - */ - @GetMapping(path="getParamsByProId") - public BaseResponse<List<PltProductParams>> getParamsByProId(String proId){ - log.info("AssemblyStepCtrl.getParamsByProId():"+proId); - List<PltProductParams> result = sv.getParamsByProId(proId); - return BaseResponseUtils.buildSuccess(result); - } - /** - * 鏍规嵁浜у搧鏌ュ嚭浜у搧鏂囦欢 涓昏鎶�鏈弬鏁� - * @param - * @return - */ - @GetMapping(path="getFileByProId") - public BaseResponse<List<PltProductFile>> getFileByProId(String proId){ - log.info("AssemblyStepCtrl.getFileByProId():"+proId); - List<PltProductFile> result = sv.getFileByProId(proId); - return BaseResponseUtils.buildSuccess(result); - } - @GetMapping(path = "getQualityItems") - public BaseResponse<List<PltProductQualityInspectionItems>> getQualityItems(String proId) { - log.info("AssemblyStepCtrl.getQualityItems():"+proId); - List<PltProductQualityInspectionItems> result = sv.getQualityItems(proId); - return BaseResponseUtils.buildSuccess(result); - } - @GetMapping(path = "getTestItems") - public BaseResponse<List<PltProductTestInspectionItems>> getTestItems(String proId) { - log.info("AssemblyStepCtrl.getTestItems():"+proId); - List<PltProductTestInspectionItems> result = sv.getTestItems(proId); - return BaseResponseUtils.buildSuccess(result); - } - - /** - * 娴嬭瘯鎴栧搧妫�閮借皟鐢ㄨ繖涓帴鍙� + * 娴嬭瘯 * @param vo * @return */ @PostMapping(path = "testing") - public BaseResponse testing(@RequestBody @Valid QueryVo vo) { - log.info("AssemblyStepCtrl.testing():"+vo); + public BaseResponse<Boolean> testing(@RequestBody @Valid QueryVo vo) { + log.info("AssemblyStepCtrl.testing():{}", vo); int count = sv.testing(vo); if (count <= 0) { return BaseResponseUtils.buildFail("鏁版嵁搴撳瓨鍌ㄥけ璐�"); @@ -114,28 +62,136 @@ } } + /** + * 鍝佹 + * @param vo + * @return + */ + @PostMapping(path = "inspectQuality") + public BaseResponse<Boolean> inspectQuality(@RequestBody @Valid QueryVo vo) { + log.info("AssemblyStepCtrl.inspectQuality():{}", vo); + int count = sv.inspectQuality(vo); + if (count <= 0) { + return BaseResponseUtils.buildFail("鏁版嵁搴撳瓨鍌ㄥけ璐�"); + } else { + return BaseResponseUtils.buildSuccess(true); + } + } + /** + * 鏃犱换鍔″伐浣滀腑鐨勫叾浠栭〉闈� + * @param vo + * @return + */ + @PostMapping(path = "otherWork") + public BaseResponse<Boolean> otherWork(@RequestBody @Valid QueryVo vo) { + log.info("AssemblyStepCtrl.otherWork():{}", vo); + int count = sv.otherWork(vo); + if (count <= 0) { + return BaseResponseUtils.buildFail("鏁版嵁搴撳瓨鍌ㄥけ璐�"); + } else { + return BaseResponseUtils.buildSuccess(true); + } + } + + @PostMapping(path = "repair") + public BaseResponse<Boolean> repair(@RequestBody @Valid QueryVo vo) { + log.info("AssemblyStepCtrl.repair():{}" ,vo); + int count = sv.repair(vo); + if (count <= 0) { + return BaseResponseUtils.buildFail("鏁版嵁搴撳瓨鍌ㄥけ璐�"); + } else { + return BaseResponseUtils.buildSuccess(true); + } + } + + /** + * 鏍规嵁鑺傜偣鐨勬煡鍑鸿妭鐐逛綔涓氭寚瀵间功 + * + * @param + * @return + */ + @GetMapping(path = "getSopByNodeId") + public BaseResponse<PrProductionNode> getSopByNodeId(String nodeId) { + log.info("AssemblyStepCtrl.getSopByNodeId():{}", nodeId); + PrProductionNode result = sv.getSopByNodeId(nodeId); + return BaseResponseUtils.buildSuccess(result); + } + + /** + * 鏍规嵁浜у搧鏌ュ嚭 涓昏鎶�鏈弬鏁� + * + * @param + * @return + */ + @GetMapping(path = "getParamsByProId") + public BaseResponse<List<PltProductParams>> getParamsByProId(String proId) { + log.info("AssemblyStepCtrl.getParamsByProId():{}", proId); + List<PltProductParams> result = sv.getParamsByProId(proId); + return BaseResponseUtils.buildSuccess(result); + } + + /** + * 鏍规嵁浜у搧鏌ュ嚭浜у搧鏂囦欢 涓昏鎶�鏈弬鏁� + * + * @param + * @return + */ + @GetMapping(path = "getFileByProId") + public BaseResponse<List<PltProductFile>> getFileByProId(String proId) { + log.info("AssemblyStepCtrl.getFileByProId():{}", proId); + List<PltProductFile> result = sv.getFileByProId(proId); + return BaseResponseUtils.buildSuccess(result); + } + + @GetMapping(path = "getQualityItems") + public BaseResponse<List<PltProductQualityInspectionItems>> getQualityItems(String proId) { + log.info("AssemblyStepCtrl.getQualityItems():{}", proId); + List<PltProductQualityInspectionItems> result = sv.getQualityItems(proId); + return BaseResponseUtils.buildSuccess(result); + } + + @GetMapping(path = "getTestItems") + public BaseResponse<List<PltProductTestInspectionItems>> getTestItems(String proId) { + log.info("AssemblyStepCtrl.getTestItems():{}", proId); + List<PltProductTestInspectionItems> result = sv.getTestItems(proId); + return BaseResponseUtils.buildSuccess(result); + } + @GetMapping(path = "queryByDeviceNo") - public BaseResponse<Map<String,String>> queryByDeviceNo(String deviceNo) { - log.info("AssemblyStepCtrl.queryByDeviceNo():"+deviceNo); - Map<String,String> result = sv.queryByDeviceNo(deviceNo); - if(StringUtils.isBlank(result.get("proName"))){ - return BaseResponseUtils.buildFail("璇ョ紪鐮�("+deviceNo +")涓嶆槸涓昏鐗╂枡(绯荤粺涓鎺х殑鍏朵粬璁惧)"); - }else{ + public BaseResponse<Map<String, String>> queryByDeviceNo(String deviceNo) { + log.info("AssemblyStepCtrl.queryByDeviceNo():{}", deviceNo); + Map<String, String> result = sv.queryByDeviceNo(deviceNo, null); + if (StringUtils.isBlank(result.get("proName"))) { + return BaseResponseUtils.buildFail("璇ョ紪鐮�(" + deviceNo + ")涓嶆槸涓昏鐗╂枡(绯荤粺涓鎺х殑鍏朵粬璁惧)"); + } else { return BaseResponseUtils.buildSuccess(result); } } @GetMapping(path = "queryLifeByDeviceNo") public BaseResponse<?> queryLifeByDeviceNo(String deviceNo) { - log.info("AssemblyStepCtrl.queryLifeByDeviceNo():"+deviceNo); + log.info("AssemblyStepCtrl.queryLifeByDeviceNo():{}", deviceNo); List<StaDeviceLife> result = sv.queryLifeByDeviceNo(deviceNo); return BaseResponseUtils.buildSuccess(result); } @GetMapping(path = "queryLogByDeviceNo") public BaseResponse<?> queryLogByDeviceNo(String deviceNo) { - log.info("AssemblyStepCtrl.queryLogByDeviceNo():"+deviceNo); + log.info("AssemblyStepCtrl.queryLogByDeviceNo():{}", deviceNo); List<StaDeviceProductionLog> result = sv.queryLogByDeviceNo(deviceNo); return BaseResponseUtils.buildSuccess(result); } + @GetMapping(path = "queryPlanByDeviceNo") + public BaseResponse<PrAssemblyPlan> queryPlanByDeviceNo(String deviceNo) { + log.info("AssemblyStepCtrl.queryPlanByDeviceNo():{}", deviceNo); + PrAssemblyPlan result = sv.queryPlanByDeviceNo(deviceNo); + return BaseResponseUtils.buildSuccess(result); + } + //鑷姩鍖栨祴璇� 鏍规嵁浜у搧ID鏌ュ嚭鍏ㄩ儴鎸囦护 + @GetMapping(path = "getCommand") + public BaseResponse<TstCommand> getCommand(String proId) { + log.info("AssemblyStepCtrl.getCommand():{}", proId); + List<TstCommand> result = sv.getCommand(proId); + return BaseResponseUtils.buildSuccess(result); + } } -- Gitblit v1.8.0