From 1e62a6d467407addae8745d8c69454318af56a09 Mon Sep 17 00:00:00 2001 From: zyx <zyx123456> Date: 星期六, 18 五月 2024 08:04:09 +0800 Subject: [PATCH] ERP接口 --- src/main/java/com/zy/asrs/task/AgvWrkMastScheduler.java | 41 ++++++++++++++++++++++++++++++++++++++--- 1 files changed, 38 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/zy/asrs/task/AgvWrkMastScheduler.java b/src/main/java/com/zy/asrs/task/AgvWrkMastScheduler.java index a9789ce..79c41fc 100644 --- a/src/main/java/com/zy/asrs/task/AgvWrkMastScheduler.java +++ b/src/main/java/com/zy/asrs/task/AgvWrkMastScheduler.java @@ -41,7 +41,7 @@ /* - 瀹氭椂澶勭悊AGV宸ヤ綔妗d腑宸ヤ綔鐘舵�佷负205.宸ヤ綔瀹屾垚 涓� 锛�1.鍏ュ簱 || 53锛屾嫞鏂欏叆搴� || 57.鐩樼偣鍏ュ簱 || 10.绌烘澘鍏ュ簱 || 11.搴撴牸绉昏浇)鐨勬暟鎹� + 瀹氭椂澶勭悊AGV宸ヤ綔妗d腑宸ヤ綔鐘舵�佷负205.宸ヤ綔瀹屾垚 涓� 锛�1.鍏ュ簱 || 53锛屾嫞鏂欏叆搴� || 57.鐩樼偣鍏ュ簱 || 10.绌烘澘鍏ュ簱 || 11.鍗曞眰绉诲簱 || 12.璺ㄥ眰绉诲簱 || 108.鑷姩璋冩嫧 || 109.鎵嬪姩璋冩嫧)鐨勬暟鎹� */ @Scheduled(cron = "0/3 * * * * ? ") public void excutePutwayWrk(){ @@ -52,8 +52,10 @@ .or().eq("io_type",57) .or().eq("io_type",10) .or().eq("io_type",11) + .or().eq("io_type",12) .or().eq("io_type",108) - .or().eq("io_type",109)); + .or().eq("io_type",109) + .or().eq("io_type",112)); if(!Cools.isEmpty(agvWrkMastList)){ agvWrkMastList.stream().forEach(agvWrkMast -> { agvWrkMastHandler.completedPutWayWrk(agvWrkMast); @@ -107,13 +109,38 @@ .or().eq("io_type", 1) .or().eq("io_type", 10) .or().eq("io_type", 57) + .or().eq("io_type", 11) + .or().eq("io_type", 12) .or().eq("io_type", 109) - .or().eq("io_type", 108)).getRecords(); + .or().eq("io_type", 108) + .or().eq("io_type", 112)).getRecords(); if(!Cools.isEmpty(agvWrkMastList)){ agvWrkMastList.forEach(agvWrkMast -> { try { agvWrkMastHandler.startPutWayWrk(agvWrkMast); + } catch (IOException e) { + log.error(e.getMessage()); + } + }); + } + } + + /* + putaway锛氫笂鏋� + 瀹氭椂澶勭悊AGV宸ヤ綔妗d腑宸ヤ綔鐘舵�佷负201.鐢熸垚鍏ュ簱浠诲姟ID 涓�(鍑哄簱绫诲瀷涓� 53.鎷f枡鍐嶅叆搴� || 1.鍏ュ簱 || 10.绌烘澘鍏ュ簱鏍� || 57.鐩樼偣鍐嶅叆搴�)鐨勬暟鎹� + */ + @Scheduled(cron = "0/3 * * * * ? ") + public void startAllcationIn(){ + List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectPage(new Page<>(1, 50) + ,new EntityWrapper<AgvWrkMast>() + .eq("wrk_sts", 211) + .andNew().eq("io_type", 112)).getRecords(); + + if(!Cools.isEmpty(agvWrkMastList)){ + agvWrkMastList.forEach(agvWrkMast -> { + try { + agvWrkMastHandler.startAllcationIn(agvWrkMast); } catch (IOException e) { log.error(e.getMessage()); } @@ -156,6 +183,14 @@ if(!Cools.isEmpty(agvWrkMastWorking)){ return; } + + agvWrkMastWorking = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>() + .eq("source_loc_no",agvWrkMast.getLocNo()) + .lt("loc_sts",204L)); + + if(!Cools.isEmpty(agvWrkMastWorking)){ + return; + } agvWrkMastHandler.startPutWayWrk(agvWrkMast); } catch (IOException e) { -- Gitblit v1.9.1