From 4dfc306f910a8b1ae1a2869bc8ffd38b2faf8f2e Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期五, 24 五月 2024 09:02:27 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/task/AgvWrkMastScheduler.java | 64 +++++++++++++++++++++++++++-----
1 files changed, 54 insertions(+), 10 deletions(-)
diff --git a/src/main/java/com/zy/asrs/task/AgvWrkMastScheduler.java b/src/main/java/com/zy/asrs/task/AgvWrkMastScheduler.java
index 4eb2f8d..31608f0 100644
--- a/src/main/java/com/zy/asrs/task/AgvWrkMastScheduler.java
+++ b/src/main/java/com/zy/asrs/task/AgvWrkMastScheduler.java
@@ -41,17 +41,22 @@
/*
- 瀹氭椂澶勭悊AGV宸ヤ綔妗d腑宸ヤ綔鐘舵�佷负205.宸ヤ綔瀹屾垚 涓� 锛�1.鍏ュ簱 || 53锛屾嫞鏂欏叆搴� || 57.鐩樼偣鍏ュ簱 || 10.绌烘澘鍏ュ簱 || 11.搴撴牸绉昏浇)鐨勬暟鎹�
+ 瀹氭椂澶勭悊AGV宸ヤ綔妗d腑宸ヤ綔鐘舵�佷负205.宸ヤ綔瀹屾垚 涓� 锛�1.鍏ュ簱 || 53锛屾嫞鏂欏叆搴� || 57.鐩樼偣鍏ュ簱 || 10.绌烘澘鍏ュ簱 || 11.鍗曞眰绉诲簱 || 12.璺ㄥ眰绉诲簱 || 108.鑷姩璋冩嫧 || 109.鎵嬪姩璋冩嫧)鐨勬暟鎹�
*/
- @Scheduled(cron = "0/10 * * * * ? ")
+ @Scheduled(cron = "0/3 * * * * ? ")
public void excutePutwayWrk(){
List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectList(new EntityWrapper<AgvWrkMast>()
.eq("wrk_sts", 205)
.andNew().eq("io_type",53)
.or().eq("io_type",1)
.or().eq("io_type",57)
+ .or().eq("io_type",58)
.or().eq("io_type",10)
- .or().eq("io_type",11));
+ .or().eq("io_type",11)
+ .or().eq("io_type",12)
+ .or().eq("io_type",108)
+ .or().eq("io_type",109)
+ .or().eq("io_type",112));
if(!Cools.isEmpty(agvWrkMastList)){
agvWrkMastList.stream().forEach(agvWrkMast -> {
agvWrkMastHandler.completedPutWayWrk(agvWrkMast);
@@ -62,7 +67,7 @@
/*
瀹氭椂澶勭悊AGV宸ヤ綔妗d腑宸ヤ綔鐘舵�佷负206.鍑哄簱瀹屾垚 涓� (101.鍑哄簱 || 110.绌烘澘鍑哄簱)
*/
- @Scheduled(cron = "0/10 * * * * ? ")
+ @Scheduled(cron = "0/3 * * * * ? ")
public void excuteCarryWrk(){
List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectList(new EntityWrapper<AgvWrkMast>()
.eq("wrk_sts", 206)
@@ -75,10 +80,11 @@
}
}
+
/*
瀹氭椂澶勭悊AGV宸ヤ綔妗d腑宸ヤ綔鐘舵�佷负206.鍑哄簱瀹屾垚 涓� (101.鍑哄簱 || 110.绌烘澘鍑哄簱)
*/
- @Scheduled(cron = "0/10 * * * * ? ")
+ @Scheduled(cron = "0/3 * * * * ? ")
public void excuteCarryWrk2(){
List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectList(new EntityWrapper<AgvWrkMast>()
.eq("wrk_sts", 208)
@@ -96,7 +102,7 @@
putaway锛氫笂鏋�
瀹氭椂澶勭悊AGV宸ヤ綔妗d腑宸ヤ綔鐘舵�佷负201.鐢熸垚鍏ュ簱浠诲姟ID 涓�(鍑哄簱绫诲瀷涓� 53.鎷f枡鍐嶅叆搴� || 1.鍏ュ簱 || 10.绌烘澘鍏ュ簱鏍� || 57.鐩樼偣鍐嶅叆搴�)鐨勬暟鎹�
*/
- @Scheduled(cron = "0/10 * * * * ? ")
+ @Scheduled(cron = "0/3 * * * * ? ")
public void startPutwayWrk(){
List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectPage(new Page<>(1, 50)
,new EntityWrapper<AgvWrkMast>()
@@ -104,7 +110,13 @@
.andNew().eq("io_type", 53)
.or().eq("io_type", 1)
.or().eq("io_type", 10)
- .or().eq("io_type", 57)).getRecords();
+ .or().eq("io_type", 57)
+ .or().eq("io_type", 58)
+ .or().eq("io_type", 11)
+ .or().eq("io_type", 12)
+ .or().eq("io_type", 109)
+ .or().eq("io_type", 108)
+ .or().eq("io_type", 112)).getRecords();
if(!Cools.isEmpty(agvWrkMastList)){
agvWrkMastList.forEach(agvWrkMast -> {
@@ -118,10 +130,32 @@
}
/*
+ 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());
+ }
+ });
+ }
+ }
+
+ /*
carry锛氭惉杩愶紝缁熸寚鍑哄簱銆佺Щ搴撱�佺偣鍒扮偣鎼繍绛�
瀹氭椂澶勭悊AGV宸ヤ綔妗d腑宸ヤ綔鐘舵�佷负21.鐢熸垚鍑哄簱浠诲姟 涓�(鍑哄簱绫诲瀷涓� 101.鍑哄簱 || 103.鎷f枡鍑哄簱 || 11.搴撴牸绉绘牻 || 110.绌烘澘鍑哄簱 || 107.鐩樼偣鍑哄簱)鐨勬暟鎹�
*/
- @Scheduled(cron = "0/10 * * * * ? ")
+ @Scheduled(cron = "0/3 * * * * ? ")
public void startCarryWrk(){
List<AgvWrkMast> agvWrkMastList = agvWrkMastService.selectPage(new Page<>(1, 50)
,new EntityWrapper<AgvWrkMast>()
@@ -131,7 +165,9 @@
.or().eq("io_type", 103)
.or().eq("io_type", 11)
.or().eq("io_type", 110)
- .or().eq("io_type", 107)).getRecords();
+ .or().eq("io_type", 107)
+ .or().eq("io_type", 109)
+ .or().eq("io_type", 108)).getRecords();
if(!Cools.isEmpty(agvWrkMastList)){
List<String> devNos = new ArrayList<>();
@@ -148,6 +184,14 @@
AgvWrkMast agvWrkMastWorking = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>()
.eq("loc_no", agvWrkMast.getLocNo())
.ge("wrk_sts", 202L));
+
+ if(!Cools.isEmpty(agvWrkMastWorking)){
+ return;
+ }
+
+ agvWrkMastWorking = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>()
+ .eq("source_loc_no",agvWrkMast.getLocNo())
+ .le("wrk_sts",204L));
if(!Cools.isEmpty(agvWrkMastWorking)){
return;
@@ -179,7 +223,7 @@
/*
鑷姩鐢熸垚绌烘澘鍑哄簱浠诲姟
*/
- @Scheduled(cron = "0/10 * * * * ? ")
+ @Scheduled(cron = "0/3 * * * * ? ")
public void autoEmptyOut(){
boolean packageEmptyAutoOUt = Cools.eq("Y",Parameter.get().getPackageEmptyAutoOUt());
boolean mateEmptyAutoOut = Cools.eq("Y",Parameter.get().getMateEmptyAutoOut());
--
Gitblit v1.9.1