From 5064c9c10569584991d549b7ac3673c3f0611181 Mon Sep 17 00:00:00 2001
From: zyx <zyx123456>
Date: 星期二, 16 四月 2024 13:42:19 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java | 39 ++++++++++++++++++++++++++-------------
1 files changed, 26 insertions(+), 13 deletions(-)
diff --git a/src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java b/src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java
index 9ecfc10..e809dfa 100644
--- a/src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java
+++ b/src/main/java/com/zy/asrs/task/handler/AgvWrkMastHandler.java
@@ -4,10 +4,7 @@
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.core.common.Cools;
import com.core.exception.CoolException;
-import com.zy.asrs.entity.AgvLocDetl;
-import com.zy.asrs.entity.AgvWaitPakin;
-import com.zy.asrs.entity.AgvWrkDetl;
-import com.zy.asrs.entity.AgvWrkMast;
+import com.zy.asrs.entity.*;
import com.zy.asrs.service.*;
import com.zy.asrs.task.AbstractHandler;
import com.zy.asrs.task.core.ReturnT;
@@ -50,6 +47,8 @@
private OrderService orderService;
@Autowired
private AgvBasDevpService agvBasDevpService;
+ @Autowired
+ private AgvWorkService agvWorkService;
@Transactional
public ReturnT<String> completedPutWayWrk(AgvWrkMast agvWrkMast) {
@@ -60,13 +59,9 @@
//淇敼宸ヤ綔妗g姸鎬佷负207.搴撳瓨鏇存柊瀹屾垚
agvWrkMast.setWrkSts(207L);
agvWrkMastService.updateById(agvWrkMast);
- if(agvWrkMast.getIoType() == 10){
- // 绌烘澘鍏ュ簱 璁剧疆搴撲綅鐘舵�佷负D.绌烘《/绌烘爤鏉�
- agvLocMastService.updateLocStsByLocNo(agvWrkMast.getLocNo(),"D",agvWrkMast.getBarcode());
- }else{
- //淇敼鐩爣搴撲綅鐘舵�佷负F.鍦ㄥ簱
- agvLocMastService.updateLocStsByLocNo(agvWrkMast.getLocNo(),"F",agvWrkMast.getBarcode());
- }
+ // 绌烘澘鍏ュ簱 璁剧疆搴撲綅鐘舵�佷负D.绌烘《/绌烘爤鏉�
+ String locSts = agvWrkMast.getIoType() == 10 ? "D" : "F";
+ agvLocMastService.updateLocStsByLocNo(agvWrkMast.getLocNo(),locSts,agvWrkMast.getBarcode(),agvWrkMast.getWhsType().shortValue());
//鐢熸垚AGV宸ヤ綔鍘嗗彶妗�
agvWrkMastLogService.save(agvWrkMast);
//鐢熸垚AGV宸ヤ綔鏄庣粏鍘嗗彶妗�
@@ -87,7 +82,7 @@
//鏇存柊搴撳瓨鏄庣粏
agvLocDetlService.updateStock(agvWrkMast.getSourceLocNo(),agvWrkMast.getLocNo());
//淇敼婧愬簱浣嶇姸鎬佷负O
- agvLocMastService.updateLocStsByLocNo(agvWrkMast.getSourceLocNo(),"O","");
+ agvLocMastService.updateLocStsByLocNo(agvWrkMast.getSourceLocNo(),"O","",null);
}
//鍒犻櫎AGV宸ヤ綔妗�
@@ -118,10 +113,18 @@
agvWrkMast.setWrkSts(207L);
agvWrkMastService.updateById(agvWrkMast);
//淇敼婧愬簱浣嶇姸鎬佷负O
- agvLocMastService.updateLocStsByLocNo(agvWrkMast.getSourceLocNo(),"O","");
+ agvLocMastService.updateLocStsByLocNo(agvWrkMast.getSourceLocNo(),"O","",null);
if(agvWrkMast.getIoType() == 101){
//鏇存柊鐩爣搴撲綅鏄庣粏 101.鍑哄簱 鍒犻櫎婧愬簱浣嶅簱瀛樻槑缁�
agvLocDetlService.delete(new EntityWrapper<AgvLocDetl>().eq("loc_no",agvWrkMast.getSourceLocNo()));
+ //鐢熸垚绌烘澘鍏ュ簱浠诲姟
+ Short containerType = Short.valueOf(agvWrkMast.getBarcode().substring(0, 2));
+ try {
+ agvWorkService.emptyPlateIn(agvWrkMast.getLocNo(),agvWrkMast.getBarcode(),containerType,9527L,true);
+ }catch (Exception e){
+ e.printStackTrace();
+ log.error(e.getMessage());
+ }
}
//鐢熸垚AGV宸ヤ綔鍘嗗彶妗�
@@ -146,6 +149,7 @@
}
@Transactional
+ @Synchronized
public ReturnT<String> startPutWayWrk(AgvWrkMast agvWrkMast) throws IOException {
//涓嬪彂浠诲姟
@@ -207,6 +211,15 @@
return SUCCESS;
}
+ @Synchronized
+ @Transactional
+ public ReturnT<String> autoEmptyOut(AgvBasDevp agvBasDevp) {
+
+ agvWorkService.emptyPlateOut(agvBasDevp.getDevNo(),0,9527L);
+
+ return SUCCESS;
+ }
+
private String getOrderNoByWrkNo(int wrkNo){
AgvWrkDetl agvWrkDetl = agvWrkDetlService.selectOne(new EntityWrapper<AgvWrkDetl>().eq("wrk_no", wrkNo));
if(Cools.isEmpty(agvWrkDetl)){
--
Gitblit v1.9.1