From d55581ed00fd0a8ecce78a6ebe6f9e2ee86274b3 Mon Sep 17 00:00:00 2001
From: zyx <zyx123456>
Date: 星期五, 04 八月 2023 17:01:13 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/tzskasrs' into tzskasrs

---
 src/main/java/com/zy/asrs/service/impl/AgvBasDevpServiceImpl.java |   31 ++++++++++++++++++++++++-------
 1 files changed, 24 insertions(+), 7 deletions(-)

diff --git a/src/main/java/com/zy/asrs/service/impl/AgvBasDevpServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/AgvBasDevpServiceImpl.java
index 636dc93..069fae5 100644
--- a/src/main/java/com/zy/asrs/service/impl/AgvBasDevpServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/AgvBasDevpServiceImpl.java
@@ -5,6 +5,7 @@
 import com.core.common.Cools;
 import com.zy.asrs.entity.AgvBasDevp;
 import com.zy.asrs.entity.AgvWaitPakin;
+import com.zy.asrs.entity.AgvWrkDetl;
 import com.zy.asrs.entity.AgvWrkMast;
 import com.zy.asrs.mapper.AgvBasDevpMapper;
 import com.zy.asrs.service.AgvBasDevpService;
@@ -108,20 +109,36 @@
                 AgvBasDevpDto agvBasDevpDto = new AgvBasDevpDto();
                 BeanUtils.copyProperties(agvBasDevp, agvBasDevpDto);
 
-                if (Cools.isEmpty(agvBasDevpDto.getBarcode())) {
+//                if (Cools.isEmpty(agvBasDevpDto.getBarcode())) {
+//                    return agvBasDevpDto;
+//                }
+
+                if("O".equals(agvBasDevpDto.getLocSts())){
                     return agvBasDevpDto;
                 }
 
-                AgvWaitPakin agvWaitPakin = agvWaitPakinService.selectOne(new EntityWrapper<AgvWaitPakin>()
-                        .eq("zpallet", agvBasDevpDto.getBarcode()));
-
-                agvBasDevpDto.setAgvWaitPakin(agvWaitPakin);
-
+//              AgvWrkMast agvWrkMast = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>()
+//                        .eq("barcode", agvBasDevpDto.getBarcode()));
                 AgvWrkMast agvWrkMast = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>()
-                        .eq("barcode", agvBasDevpDto.getBarcode()));
+                        .eq("loc_no", agvBasDevpDto.getDevNo())
+                        .or().eq("source_loc_no",agvBasDevpDto.getDevNo()));
 
                 agvBasDevpDto.setAgvWrkMast(agvWrkMast);
 
+                if("F".equals(agvBasDevpDto.getLocSts()) || "R".equals(agvBasDevpDto.getLocSts())){
+                    AgvWaitPakin agvWaitPakin = agvWaitPakinService.selectOne(new EntityWrapper<AgvWaitPakin>()
+                            .eq("zpallet", agvBasDevpDto.getBarcode()));
+
+                    agvBasDevpDto.setAgvWaitPakin(agvWaitPakin);
+
+                    if(Cools.isEmpty(agvWaitPakin)){
+                        AgvWrkDetl agvWrkDetl = agvWrkDetlService.selectOne(new EntityWrapper<AgvWrkDetl>().
+                                eq("wrk_no",agvWrkMast.getWrkNo()));
+
+                        agvBasDevpDto.setAgvWrkDetl(agvWrkDetl);
+                    }
+                }
+
                 return agvBasDevpDto;
 
             }).collect(Collectors.toList());

--
Gitblit v1.9.1