From 8941629b61157a606bd73ab04cd9fefd75ed6fc0 Mon Sep 17 00:00:00 2001 From: zjj <3272660260@qq.com> Date: 星期三, 31 七月 2024 15:46:39 +0800 Subject: [PATCH] # --- src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 19 ++++++++++++++----- 1 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java index 52ef0df..f0f9ec6 100644 --- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java @@ -296,9 +296,11 @@ if (rgvComplete){ rgvThread.setPakMk(true); } - WrkMastSta wrkMastSta = wrkMastStaMapper.selectById(rgvProtocol.getTaskNo1()); - if (!Cools.isEmpty(wrkMastSta)){ + List<WrkMastSta> wrkMastStas = wrkMastStaMapper.selectList(new EntityWrapper<WrkMastSta>().ne("wrk_sts",3).eq("wrk_no", rgvProtocol.getTaskNo1())); + if (!Cools.isEmpty(wrkMastStas) || wrkMastStas.size()<=0){ + WrkMastSta wrkMastSta = wrkMastStas.get(0); wrkMastSta.setWrkSts(3); + wrkMastSta.setBignTime(new Date()); wrkMastStaMapper.updateById(wrkMastSta); } } @@ -486,20 +488,27 @@ return; } // 鍙湁褰揜GV绌洪棽銆佽嚜鍔�,宸ヤ綅涓�鏃犵墿//rgv鍙敤 - if (rgvProtocol.getStatusType() == RgvStatusType.IDLE + if (rgvProtocol.getStatusType1() == RgvStatusType.IDLE && rgvProtocol.getModeType() == RgvModeType.AUTO && rgvProtocol.getLoaded1()==0 && rgvProtocol.getTaskNo1() == 0 && rgvThread.isPakMk() ) { - List<WrkMastSta> wrkMastStaList = wrkMastStaMapper.selectList(new EntityWrapper<WrkMastSta>()); + Integer selectCount = wrkMastStaMapper.selectCount(new EntityWrapper<WrkMastSta>().ne("wrk_sts", 3).ne("wrk_sts", 0)); + if (selectCount>0){ + log.error("瀛樺湪鎵цRGV涓换鍔★紝浣嗘槸灏忚溅鐘舵�佺┖闂诧紒锛侊紒"); + return; + } + + List<WrkMastSta> wrkMastStaList = wrkMastStaMapper.selectList(new EntityWrapper<WrkMastSta>().eq("wrk_sts",0)); for (WrkMastSta wrkMastSta : wrkMastStaList){ - if (wrkMastSta.getType()!=0 || wrkMastSta.getWrkType()!=3){//1:婊$増 3锛氬彇鏀� + if (wrkMastSta.getType()!=1 || wrkMastSta.getWrkType()!=3){//1:婊$増 3锛氬彇鏀� continue; } boolean sign = rgvTakeFullAll(1, wrkMastSta); //鍛戒护涓嬪彂 if (sign){ wrkMastSta.setWrkSts(1); + wrkMastSta.setUpdateTime(new Date()); wrkMastStaMapper.updateById(wrkMastSta); } else { log.error("宸ヤ綔鍙穥}鎵�灞炰换鍔′笅鍙戝け璐�",wrkMastSta.getWrkNo()); -- Gitblit v1.9.1