From 3c8343535bec2a53855956e25598e2271fc84c0d Mon Sep 17 00:00:00 2001
From: 野心家 <1051256694@qq.com>
Date: 星期日, 07 七月 2024 10:28:21 +0800
Subject: [PATCH] 更新测试管理搜索功能

---
 src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java |   57 ++++++++++++++-------------------------------------------
 1 files changed, 14 insertions(+), 43 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 19a4a40..aecb3c1 100644
--- a/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
@@ -20,6 +20,8 @@
 import com.zy.common.model.enums.WorkNoType;
 import com.zy.common.service.CommonService;
 import com.zy.common.utils.NodeUtils;
+import com.zy.system.entity.Config;
+import com.zy.system.service.ConfigService;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
@@ -64,6 +66,8 @@
     private CommonService commonService;
     @Autowired
     private WrkMastService wrkMastService;
+    @Autowired
+    private ConfigService configService;
 
     @Value("${mes.inPath}")
     private String inpath;
@@ -604,7 +608,16 @@
             matNew.setMatnr(param.getPackNo());
             matNew.setMaktx(param.getPackName());
             matNew.setManuDate(param.getRequestTime());
-            matNew.setDeadWarn(360);//6灏忔椂  360鍒嗛挓
+            matNew.setDeadWarn(1440);//6灏忔椂  360鍒嗛挓  24灏忔椂  1440鍒嗛挓
+            Config config = configService.selectOne(new EntityWrapper<Config>().eq("code", "JingZhiTime"));
+            if (!Cools.isEmpty(config)){
+                try{
+                    int time = Integer.parseInt(config.getValue());
+                    matNew.setDeadWarn(time);//6灏忔椂  360鍒嗛挓  24灏忔椂  1440鍒嗛挓
+                }catch (Exception e){
+
+                }
+            }
             matNew.setCreateBy(9999L);//9999琛ㄧずerp涓嬪彂
             matNew.setCreateTime(now);
             matNew.setUpdateBy(9999L);//9999琛ㄧずerp涓嬪彂
@@ -782,48 +795,6 @@
     public Boolean testFinish(Review review) {
         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

--
Gitblit v1.9.1