From aa9ea15ddd351e1c2a6b13d6db3f6c21f5c622e9 Mon Sep 17 00:00:00 2001 From: Junjie <xjj@123> Date: 星期一, 31 三月 2025 10:44:49 +0800 Subject: [PATCH] # --- src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 7 +++++++ src/main/java/com/zy/common/utils/ForkLiftUtils.java | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ src/main/resources/sql/20250331102933.nb3 | 0 src/main/resources/docs/四向车货叉式提升机WCS接口V1.2.docx | 0 4 files changed, 56 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java index 2713265..8e967d5 100644 --- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java @@ -739,6 +739,13 @@ return false; } + //璇锋眰涓婄骇绯荤粺锛屾槸鍚﹀厑璁稿叆搴� + boolean inMission = ForkLiftUtils.queryInMission(wrkMast.getSourceStaNo(), liftSta.getLiftNo(), wrkMast.getWmsWrkNo()); + if (!inMission) { + News.taskInfo(wrkMast.getWrkNo(), "{}浠诲姟锛屼笂绾х郴缁熶笉鍏佽鍏ュ簱", wrkMast.getWrkNo()); + return false; + } + //鑾峰彇鎻愬崌鏈哄懡浠� List<ForkLiftCommand> liftCommands = forkLiftThread.getPickAndPutCommand(wrkMast.getWrkNo(), wrkMast.getSourceStaNo(), liftSta.getLev()); ArrayList<ForkLiftCommand> commands = new ArrayList<>(); diff --git a/src/main/java/com/zy/common/utils/ForkLiftUtils.java b/src/main/java/com/zy/common/utils/ForkLiftUtils.java index 6ec5ac6..045054a 100644 --- a/src/main/java/com/zy/common/utils/ForkLiftUtils.java +++ b/src/main/java/com/zy/common/utils/ForkLiftUtils.java @@ -149,4 +149,53 @@ return false; } + //璇锋眰涓婄骇绯荤粺锛屾槸鍚﹀厑璁稿叆搴� + //鏌ヨ鏄惁鏈夊叆搴撴潈闄� + public static boolean queryInMission(Integer sourceStaNo, Integer liftNo, String superTaskNo) { + ConfigService configService = SpringUtils.getBean(ConfigService.class); + if (configService == null) { + return false; + } + + Config queryInMissionPathEnableConfig = configService.selectOne(new EntityWrapper<Config>().eq("code", "queryInMissionPathEnable")); + if (queryInMissionPathEnableConfig != null) { + String queryInMissionPathEnable = queryInMissionPathEnableConfig.getValue(); + if (!queryInMissionPathEnable.equals("Y")) { + return true;//鍏抽棴鏌ヨ鍏ュ簱鏉冮檺鍔熻兘 + } + } + + Config superSystemUriConfig = configService.selectOne(new EntityWrapper<Config>().eq("code", "superSystemUri")); + if (superSystemUriConfig == null) { + return false; + } + String superSystemUri = superSystemUriConfig.getValue(); + + Config queryInMissionPathConfig = configService.selectOne(new EntityWrapper<Config>().eq("code", "queryInMissionPath")); + if (queryInMissionPathConfig == null) { + return false; + } + String missionPath = queryInMissionPathConfig.getValue(); + + try { + HashMap<String, Object> data = new HashMap<>(); + data.put("staNo", sourceStaNo); + data.put("liftNo", liftNo); + data.put("superTaskNo", superTaskNo); + + String response = new HttpHandler.Builder() + .setUri(superSystemUri) + .setPath(missionPath) + .setJson(JSON.toJSONString(data)) + .build() + .doPost(); + if (response.equals("ok")) { + return true;//鏈夊叆搴撴潈闄� + } + } catch (Exception e) { + e.printStackTrace(); + } + return false; + } + } diff --git "a/src/main/resources/docs/\345\233\233\345\220\221\350\275\246\350\264\247\345\217\211\345\274\217\346\217\220\345\215\207\346\234\272WCS\346\216\245\345\217\243V1.2.docx" "b/src/main/resources/docs/\345\233\233\345\220\221\350\275\246\350\264\247\345\217\211\345\274\217\346\217\220\345\215\207\346\234\272WCS\346\216\245\345\217\243V1.2.docx" new file mode 100644 index 0000000..bc46470 --- /dev/null +++ "b/src/main/resources/docs/\345\233\233\345\220\221\350\275\246\350\264\247\345\217\211\345\274\217\346\217\220\345\215\207\346\234\272WCS\346\216\245\345\217\243V1.2.docx" Binary files differ diff --git a/src/main/resources/sql/20250331102933.nb3 b/src/main/resources/sql/20250331102933.nb3 new file mode 100644 index 0000000..be73caa --- /dev/null +++ b/src/main/resources/sql/20250331102933.nb3 Binary files differ -- Gitblit v1.9.1