From 835bd18ad7f74192f96e83d85c358a7d9aa6b559 Mon Sep 17 00:00:00 2001
From: 野心家 <1051256694@qq.com>
Date: 星期二, 05 九月 2023 14:14:12 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/asrs/task/handler/FireOutHandler.java  |    7 +++
 src/main/java/com/zy/common/web/WcsController.java          |   20 +++++-----
 src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java |   81 +++++++++++++++++++++-------------------
 3 files changed, 59 insertions(+), 49 deletions(-)

diff --git a/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
index 1f5b686..19a4a40 100644
--- a/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
@@ -778,48 +778,53 @@
         return testMast;
     }
 
-
     @Override
-    @Transactional
     public Boolean testFinish(Review review) {
-        Boolean success=true;
-        Wrapper wrapper = new EntityWrapper<TestMast>()
-                .eq("loc_no", review.getLocNo())
-                .eq("barcode", review.getBarcode())
-                .eq("user_Id", review.getUserId());
-        LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", review.getLocNo()));
-        if (null == locMast ||locMast.getPackStatus()!=2){
-            throw new CoolException("浜у搧鐘舵�佷笉鏄� 2:娴嬭瘯涓�");
-        }else if (!review.getBarcode().equals(locMast.getBarcode())){
-            throw new CoolException("pack鐮佷笉鍚�");
-        }
-        TestMast testMast = testMastService.selectOne(wrapper);
-        if(null != testMast){
-            if (testMast.getStatus()==3){
-                Date date = new Date();
-                locMast.setPackStatus(3);
-                locMast.setModiTime(date);
-//                CombParam combParam = new CombParam();
-//                combParam.setPackNo(locMast.getBarcode());
-//                combParam.setLocNo(locMast.getLocNo());
-//                combParam.setPackSts(3);
-//                combParam.setRequestTime(DateUtils.convert(new Date()));
-//                new PostMesDataUtils().postMesData("MES绯荤粺",mesUrl,inpath,combParam);
-
-                if (!locMastService.update(locMast, new EntityWrapper<LocMast>().eq("loc_no", review.getLocNo()))){
-                    throw new CoolException("鏇存敼浜у搧鐘舵�佸け璐�");
-                }
-            }else if (Cools.isEmpty(testMast.getStatus())){
-                throw new CoolException("鐘舵�佸紓甯�");
-            }else {
-                throw new CoolException("娴嬭瘯鐘舵�佷笉鏄� 3:娴嬭瘯涓�");
-            }
-        } else {
-            throw new CoolException("鐘舵�佸紓甯�");
-        }
-        return success;
+        return null;
     }
 
+
+//    @Override
+//    @Transactional
+//    public Boolean testFinish(Review review) {
+//        Boolean success=true;
+//        Wrapper wrapper = new EntityWrapper<TestMast>()
+//                .eq("loc_no", review.getLocNo())
+//                .eq("barcode", review.getBarcode())
+//                .eq("user_Id", review.getUserId());
+//        LocMast locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", review.getLocNo()));
+//        if (null == locMast ||locMast.getPackStatus()!=2){
+//            throw new CoolException("浜у搧鐘舵�佷笉鏄� 2:娴嬭瘯涓�");
+//        }else if (!review.getBarcode().equals(locMast.getBarcode())){
+//            throw new CoolException("pack鐮佷笉鍚�");
+//        }
+//        TestMast testMast = testMastService.selectOne(wrapper);
+//        if(null != testMast){
+//            if (testMast.getStatus()==3){
+//                Date date = new Date();
+//                locMast.setPackStatus(3);
+//                locMast.setModiTime(date);
+////                CombParam combParam = new CombParam();
+////                combParam.setPackNo(locMast.getBarcode());
+////                combParam.setLocNo(locMast.getLocNo());
+////                combParam.setPackSts(3);
+////                combParam.setRequestTime(DateUtils.convert(new Date()));
+////                new PostMesDataUtils().postMesData("MES绯荤粺",mesUrl,inpath,combParam);
+//
+//                if (!locMastService.update(locMast, new EntityWrapper<LocMast>().eq("loc_no", review.getLocNo()))){
+//                    throw new CoolException("鏇存敼浜у搧鐘舵�佸け璐�");
+//                }
+//            }else if (Cools.isEmpty(testMast.getStatus())){
+//                throw new CoolException("鐘舵�佸紓甯�");
+//            }else {
+//                throw new CoolException("娴嬭瘯鐘舵�佷笉鏄� 3:娴嬭瘯涓�");
+//            }
+//        } else {
+//            throw new CoolException("鐘舵�佸紓甯�");
+//        }
+//        return success;
+//    }
+
     @Override
     @Transactional
     public Boolean testNG(Review review) {
diff --git a/src/main/java/com/zy/asrs/task/handler/FireOutHandler.java b/src/main/java/com/zy/asrs/task/handler/FireOutHandler.java
index 05efc88..04e0a88 100644
--- a/src/main/java/com/zy/asrs/task/handler/FireOutHandler.java
+++ b/src/main/java/com/zy/asrs/task/handler/FireOutHandler.java
@@ -43,7 +43,10 @@
         try {
             List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>()
                     .eq("fire_status", 1)
-                    .eq("loc_sts", "F"));
+                    .andNew()
+                    .eq("loc_sts", "F")
+                    .or()
+                    .eq("loc_sts", "R"));
             Integer ioType = 101;   //鍑哄簱
             Date now = new Date();
             //浼樺厛绾�99锛岀Щ搴撳埌0102501
@@ -107,6 +110,8 @@
                     if (!locMastService.updateById(locMast)) {
                         throw new CoolException("棰勭害搴撲綅鐘舵�佸け璐ワ紝搴撲綅鍙凤細"+locMast.getLocNo());
                     }
+                }else if(locMast.getLocSts().equals("R")){
+
                 } else {
                     throw new CoolException(locMast.getLocNo() + "搴撲綅涓嶆槸鍦ㄥ簱鐘舵��");
                 }
diff --git a/src/main/java/com/zy/common/web/WcsController.java b/src/main/java/com/zy/common/web/WcsController.java
index 55d8621..275e4fd 100644
--- a/src/main/java/com/zy/common/web/WcsController.java
+++ b/src/main/java/com/zy/common/web/WcsController.java
@@ -292,16 +292,16 @@
             if (!locMastService.updateById(locMast)){
                 throw new CoolException("鏀瑰彉搴撲綅鐘舵�佸け璐�");
             }else{
-//                if (locMast.getRow1()<3){
-//                    //1.鎵爜涓婃姤
-//                    CombParam combParam = new CombParam();
-//                    combParam.setPackNo(wrkMast.getBarcode());
-//                    combParam.setLocNo(wrkMast.getLocNo());
-//                    combParam.setPackSts(0);
-//                    combParam.setStepSts(1);
-//                    combParam.setRequestTime(DateUtils.convert(now));
-//                    new PostMesDataUtils().postMesData("MES绯荤粺",mesUrl,inpath,combParam);
-//                }
+                if (locMast.getRow1()<2){
+                    //1.鎵爜涓婃姤
+                    CombParam combParam = new CombParam();
+                    combParam.setPackNo(wrkMast.getBarcode());
+                    combParam.setLocNo(wrkMast.getLocNo());
+                    combParam.setPackSts(0);
+                    combParam.setStepSts(1);
+                    combParam.setRequestTime(DateUtils.convert(now));
+                    new PostMesDataUtils().postMesData("MES绯荤粺",mesUrl,inpath,combParam);
+                }
             }
         } else {
             throw new CoolException(dto.getLocNo()+"鐩爣搴撲綅宸茶鍗犵敤");

--
Gitblit v1.9.1