From 631844f980fa169b2dbf0284945dcd0c9d666331 Mon Sep 17 00:00:00 2001
From: zjj <3272660260@qq.com>
Date: 星期四, 31 十月 2024 10:13:33 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 867 ---------------------------------------------------------
1 files changed, 1 insertions(+), 866 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 8e03dbb..366427b 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -2082,68 +2082,7 @@
}
}
- /**
- * 鍏ュ嚭搴撴ā寮忓垏鎹㈠嚱鏁�
- */
-// public synchronized void ioConvert() {
-// try {
-// // 鏍规嵁杈撻�佺嚎plc閬嶅巻
-// for (DevpSlave devp : slaveProperties.getDevp()) {
-// SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId());
-//
-// for (DevpSlave.Sta inSta : devp.getInSta()) {
-// if (inSta.getStaNo() == 2) {
-// continue;
-// }
-// WrkMast pakout = wrkMastMapper.selectWorkingPakout(inSta.getStaNo());
-// switch (inSta.getStaNo()) {
-// case 203://1F
-// if (pakout != null) {
-// if (devpThread.ioModeOf2F != IoModeType.PAKOUT_MODE) {
-// // 鍑哄簱鍒囨崲涓�
-// devpThread.ioModeOf2F = IoModeType.PAKOUT_BOOTING;
-// WrkMast pakin = wrkMastMapper.selectWorkingPakin(inSta.getStaNo());
-// if (pakin == null && !devpThread.getStation().get(inSta.getStaNo()).isLoading()
-// && !devpThread.getStation().get(inSta.getStaNo() + 1).isLoading()
-// && devpThread.getStation().get(inSta.getStaNo() + 1).getWorkNo() == 0) {
-// // 鍑哄簱妯″紡
-// devpThread.ioModeOf2F = IoModeType.PAKOUT_MODE;
-// }
-// }
-// } else {
-// // 鍏ュ簱妯″紡
-// devpThread.ioModeOf2F = IoModeType.PAKIN_MODE;
-// }
-// break;
-// case 401://1F
-// if (pakout != null) {
-// if (devpThread.ioModeOf4F != IoModeType.PAKOUT_MODE) {
-// // 鍑哄簱鍒囨崲涓�
-// devpThread.ioModeOf4F = IoModeType.PAKOUT_BOOTING;
-// WrkMast pakin = wrkMastMapper.selectWorkingPakin(inSta.getStaNo());
-// if (pakin == null && !devpThread.getStation().get(inSta.getStaNo()).isLoading()
-// && !devpThread.getStation().get(inSta.getStaNo() + 1).isLoading()
-// && devpThread.getStation().get(inSta.getStaNo() + 1).getWorkNo() == 0) {
-// // 鍑哄簱妯″紡
-// devpThread.ioModeOf4F = IoModeType.PAKOUT_MODE;
-// }
-// }
-// } else {
-// // 鍏ュ簱妯″紡
-// devpThread.ioModeOf4F = IoModeType.PAKIN_MODE;
-// }
-// break;
-// }
-// }
-//
-// }
-//
-// } catch (Exception e) {
-// e.printStackTrace();
-// }
-//
-//
-// }
+
public synchronized void outOfDevp(Integer mark) {
@@ -2163,813 +2102,9 @@
}
-// public synchronized void autoEmptyOut() {
-// SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, 1);
-// List<Integer> list = new ArrayList<>();
-// list.add(101);list.add(112);
-// Map<Integer,Integer> map = new HashMap<>();
-// map.put(101,102);map.put(112,111);
-// for (Integer site:list){
-// WrkMast wrkMast = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("sta_no", map.get(site)));
-// if (!Cools.isEmpty(wrkMast)){
-// continue;
-// }
-// //濡傛灉绔欑偣鍙嚭绂佺敤锛屽垯涓嶇敓鎴愮┖鐩樺嚭搴撲换鍔�
-// StaProtocol staProtocol = devpThread.getStation().get(site);
-// if (staProtocol == null) {
-// return;
-// } else {
-// staProtocol = staProtocol.clone();
-// }
-// if (staProtocol.isAutoing() //鑷姩
-// && !staProtocol.isLoading() //鏃犵墿
-// && staProtocol.isOutEnable() //鍙嚭淇″彿
-// && staProtocol.getWorkNo() == 0
-// ) {
-// WrkMast pakoutEmpty = wrkMastMapper.selectPakoutEmpty(site);
-// if (null != pakoutEmpty) {
-// return;
-// }
-// Short loctype1 = 1;
-// if (site == 101){
-// loctype1 = 2;
-// }
-// LocTypeDto locTypeDto = new LocTypeDto(loctype1, (short) 1, (short) 1);
-// locTypeDto.setSiteId(site);
-// try {
-// String response = new HttpHandler.Builder()
-// .setUri(wmsUrl)
-// .setPath("/rpc/auto/emptyOut/v1")
-// .setJson(JSON.toJSONString(locTypeDto))
-// .build()
-// .doPost();
-// JSONObject jsonObject = JSON.parseObject(response);
-// if (jsonObject.getInteger("code").equals(200)) {
-// String data = jsonObject.get("data").toString();
-// News.info((String) jsonObject.get("msg")+","+data);
-// } else {
-// News.warnNoLog("璇锋眰鎺ュ彛澶辫触锛侊紒锛乽rl锛歿}锛況equest锛歿}锛況esponse锛歿}", wmsUrl + "/rpc/auto/emptyOut/v1","", response);
-// }
-// } catch (Exception e) {
-// e.printStackTrace();
-// TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-// }
-// }
-// }
-//
-// }
-
-// public synchronized void autoEmptyIn() {
-// SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, 1);
-// List<Integer> list = new ArrayList<>();
-// list.add(153);list.add(157);
-// for (Integer site:list){
-// StaProtocol staProtocol = devpThread.getStation().get(site);
-// if (staProtocol == null) {
-// return;
-// } else {
-// staProtocol = staProtocol.clone();
-// }
-// if (staProtocol.isAutoing() //鑷姩
-// && staProtocol.isLoading() //鏈夌墿
-// && staProtocol.isInEnable() //鍙叆淇″彿
-// && staProtocol.isPakMk()
-// && (staProtocol.getWorkNo() == 0 || staProtocol.getWorkNo() > 9990) //宸ヤ綔鍙蜂负0鎴栬�呭伐浣滃彿鏄�9991~9999锛堣緭閫佹満鐣欑敤锛�
-// ) {
-//
-// try {
-// Short loctype1 = 1;
-// if (site == 153){
-// loctype1 = 2;
-// }
-// LocTypeDto locTypeDto = new LocTypeDto(loctype1, (short) 1, (short) 1);
-// locTypeDto.setSiteId(site);
-//
-// String response = new HttpHandler.Builder()
-// .setUri(wmsUrl)
-// .setPath("/rpc/auto/emptyIn/v1")
-// .setJson(JSON.toJSONString(locTypeDto))
-// .build()
-// .doPost();
-// JSONObject jsonObject = JSON.parseObject(response);
-// if (jsonObject.getInteger("code").equals(200)) {
-// News.info((String) jsonObject.get("msg"));
-// staProtocol.setWorkNo(jsonObject.get("data").hashCode());
-// staProtocol.setStaNo(site.shortValue());
-// devpThread.setPakMk(site,false);
-// MessageQueue.offer(SlaveType.Devp, 1, new Task(2, staProtocol));
-// } else {
-// News.error("璇锋眰鎺ュ彛澶辫触锛侊紒锛乽rl锛歿}锛況equest锛歿}锛況esponse锛歿}", wmsUrl + "/rpc/auto/emptyIn/v1", JSON.toJSONString(locTypeDto), response);
-// }
-// } catch (Exception e) {
-// e.printStackTrace();
-// TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
-// }
-// }
-//
-// }
-//
-// }
-
- /*
- * 灏忚溅鍦板浘鏇存柊 鏇存柊閿�
- * */
-// public synchronized boolean rgvMapUpdate(BasRgvMap basRgvMapCurrent,Integer staStart,Integer staEnd,String sign){
-// log.info("灏忚溅鍦板浘鏇存柊锛乕鏍囪锛歿}];[BasRgvMap锛歿}];[staStart锛歿}];[staEnd锛歿}];",sign,JSON.toJSONString(basRgvMapCurrent),staStart,staEnd);
-//
-//// List<Integer> integers = RouteUtils.RouteMapCurrentFar(basRgvMapCurrent.getNowRoute(),staStart,staEnd, basRgvMapCurrent.getLockStartRoute());
-// //鏇存柊褰撳墠灏忚溅閿�
-// try{
-// Integer farCurrentStaNo = RouteUtils.RouteIndexFarMas(basRgvMapCurrent.getNowRoute(), staStart, staEnd, basRgvMapCurrent.getLockStartRoute());//鑾峰彇鏈�杩滅珯鐐�
-// log.info("灏忚溅鍦板浘鏇存柊锛佽幏鍙栨渶杩滅珯鐐�;[farCurrentStaNo锛歿}]",farCurrentStaNo);
-// Integer fallMerge = RouteUtils.RouteIndexFarMas(basRgvMapCurrent.getRgvNo(), farCurrentStaNo); //鑾峰彇鍚堝苟骞叉秹椤�
-// log.info("灏忚溅鍦板浘鏇存柊锛佽幏鍙栧悎骞跺共娑夐」;[fallMerge锛歿}]",fallMerge);
-// basRgvMapCurrent.setLockEndRoute(fallMerge);
-// Integer i = basRgvMapMapper.updateById(basRgvMapCurrent);
-//// if (i>0){
-//// log.error("{}:==>{}:{}鍙疯溅鏇存柊缁撴潫閿�,{}",sign,new Date(),basRgvMapCurrent.getRgvNo(),JSON.toJSONString(basRgvMapCurrent));
-//// }
-//
-// //鏇存柊鍙︿竴鍙板皬杞﹀湴鍥�
-// Integer rgvNoOther = basRgvMapCurrent.getRgvNoOther(basRgvMapCurrent.getRgvNo());
-// log.info("灏忚溅鍦板浘鏇存柊锛佸彟涓�鍙板皬杞﹀彿;[rgvNoOther锛歿}]",rgvNoOther);
-//
-// BasRgvMap basRgvMapOther = basRgvMapMapper.selectById(rgvNoOther);
-// log.info("灏忚溅鍦板浘鏇存柊锛佸彟涓�鍙板皬杞�;[basRgvMapOther锛歿}]",JSON.toJSONString(basRgvMapOther));
-//
-// List<Integer> integers = RouteUtils.RouteMapCurrentFar(fallMerge, basRgvMapCurrent.getLockStartRoute());
-// Integer lockEndRoute = RouteUtils.RouteMapOtherFarStnNo(integers, basRgvMapCurrent.getLockStartRoute());//鍙︿竴鍙板皬杞﹀彲娲诲姩鏈�杩滀綅缃�
-// log.info("灏忚溅鍦板浘鏇存柊锛佸彟涓�鍙板皬杞﹀彲娲诲姩鏈�杩滀綅缃�;[lockEndRoute锛歿}]",lockEndRoute);
-// basRgvMapOther.setEndRoute(lockEndRoute);
-// Integer i1 = basRgvMapMapper.updateById(basRgvMapOther);
-//// if (i1>0){
-//// log.error("{}:==>{}:{}鍙疯溅鏇存柊缁撴潫浣嶇疆,{}",sign,new Date(),basRgvMapOther.getRgvNo(),JSON.toJSONString(basRgvMapOther));
-//// }
-// return true;
-// }catch (Exception e){
-// log.error("灏忚溅鍦板浘鏇存柊鍑洪敊锛佸紓甯稿師鍥狅細"+e);
-// return false;
-// }
-// }
-
- /*
- * 鍒锋柊鍦板浘鏁版嵁
- * */
-// public synchronized void refreshRgvMap() {
-// try{
-// List<BasRgvMap> basRgvMaps = basRgvMapService.selectList(new EntityWrapper<>());
-// for (BasRgvMap rgvSlave:basRgvMaps) {
-// RgvThread rgvThread = (RgvThread) SlaveConnection.get(SlaveType.Rgv, rgvSlave.getRgvNo());
-// RgvProtocol rgvProtocol = rgvThread.getRgvProtocol();
-// if (rgvProtocol == null) {
-// continue;
-// }else {
-// rgvProtocol = rgvProtocol.clone();
-// }
-// BasRgv basRgv = basRgvService.selectById(rgvSlave.getRgvNo());
-// if (basRgv == null) {
-// log.error("{}鍙稲GV灏氭湭鍦ㄦ暟鎹簱杩涜缁存姢锛�2", rgvSlave.getRgvNo());
-// continue;
-// }
-//
-// // 鍙湁褰揜GV绌洪棽銆佽嚜鍔�,宸ヤ綅涓�鏃犵墿//rgv鍙敤
-// if (rgvProtocol.getStatusType() == RgvStatusType.IDLE &&
-// rgvProtocol.getModeType() == RgvModeType.AUTO
-// && rgvProtocol.getLoaded1()==0 //鐜板満淇敼锛氬彔鐩樻満锛屼笉婊¢兘绠楁棤鐗╋紝鎬庝箞鍒ゆ柇闇�瑕佽窡鐢垫帶瀵规帴
-// && (rgvProtocol.getTaskNo1()==0)
-// &&rgvThread.isPakMk()
-// ) {
-// BasRgvMap basRgvMap = basRgvMapMapper.selectById(rgvProtocol.getRgvNo());
-//
-// Integer rgvNoOther = basRgvMap.getRgvNoOther(rgvProtocol.getRgvNo());
-// RgvThread rgvThreadOther = (RgvThread) SlaveConnection.get(SlaveType.Rgv, rgvNoOther);
-// RgvProtocol rgvProtocolOther = rgvThreadOther.getRgvProtocol();
-// if (rgvProtocolOther == null) {
-// continue;
-// }else {
-// rgvProtocolOther = rgvProtocolOther.clone();
-// }
-// if (rgvProtocolOther.getStatusType() == RgvStatusType.IDLE
-// && rgvProtocolOther.getModeType() == RgvModeType.AUTO
-// && rgvProtocolOther.getLoaded1()==0
-// && (rgvProtocolOther.getTaskNo1()==0)
-// &&rgvThreadOther.isPakMk()
-// ){
-// //瀵瑰伐浣滄。杩涜鍒ゆ柇
-// basRgvMap.setNowRoute(rgvProtocol.getRgvPosI());
-// if (rgvProtocol.getTaskNo1() >0 && rgvProtocol.getTaskNo1()<=9000){
-// WrkMastSta wrkMastSta = wrkMastStaMapper.selectByWrkNo(rgvProtocol.getTaskNo1().intValue());
-// rgvMapUpdate(basRgvMap, wrkMastSta.getStaStart(), wrkMastSta.getStaEnd(),"2366");
-// }else if (rgvProtocol.getTaskNo1() == 0){
-// rgvMapUpdate(basRgvMap,basRgvMap.getStartRoute(),basRgvMap.getStartRoute(),"2366");
-// }
-//
-// }
-//
-//
-//
-// }
-// }
-// }catch (Exception e){
-// log.error("4109琛屾墽琛屽皬杞﹀垵濮嬪寲浠诲姟涓嬪彂澶辫触");
-// log.error("4109琛�"+e);
-// }
-// }
- /**
- * 瀹屾垚灏忚溅浠诲姟
- */
-// public synchronized void rgvCompleteWrkMastSta() {
-// try{
-// for (DevpSlave devp : slaveProperties.getDevp()) {
-// List<BasRgvMap> basRgvMaps = basRgvMapService.selectList(new EntityWrapper<>());
-// for (BasRgvMap rgvSlave:basRgvMaps) {
-// RgvThread rgvThread = (RgvThread) SlaveConnection.get(SlaveType.Rgv, rgvSlave.getRgvNo());
-// RgvProtocol rgvProtocol = rgvThread.getRgvProtocol();
-// if (rgvProtocol == null) {
-// continue;
-// }else {
-// rgvProtocol = rgvProtocol.clone();
-// }
-// BasRgv basRgv = basRgvService.selectById(rgvSlave.getRgvNo());
-// if (basRgv == null) {
-// log.error("{}鍙稲GV灏氭湭鍦ㄦ暟鎹簱杩涜缁存姢锛�3", rgvSlave.getRgvNo());
-// continue;
-// }
-//
-// // 鍙湁褰揜GV绛夊緟WCS纭銆佽嚜鍔�
-// if ((rgvProtocol.getStatusType1() == RgvStatusType.WAITING || rgvProtocol.getStatusType1()==RgvStatusType.FETCHWAITING)
-// && rgvProtocol.getModeType() == RgvModeType.AUTO
-// && (rgvProtocol.getStatusType() == RgvStatusType.WORKING1)
-// ){
-// log.info("{}鍙峰皬杞︾瓑寰厀cs纭锛岀姸鎬亄}锛屽弬鏁皗}",rgvProtocol.getRgvNo(),rgvProtocol.getStatusType(),rgvProtocol);
-// if (rgvProtocol.getTaskNo1()!=0){
-// if (rgvProtocol.getTaskNo1()==32222){
-// boolean rgvComplete = rgvComplete(rgvProtocol.getRgvNo());
-// if (!rgvComplete){
-// log.error("灏忚溅澶嶄綅澶辫触锛屽皬杞﹀彿{}锛�",rgvProtocol.getRgvNo());
-// }
-// BasRgvMap basRgvMap = basRgvMapMapper.selectById(rgvProtocol.getRgvNo());
-// basRgvMap.setNowRoute(rgvProtocol.getRgvPosI());
-// rgvMapUpdate(basRgvMap,basRgvMap.getStartRoute(),basRgvMap.getStartRoute(),"2415");
-// rgvThread.setPakMk(true);
-// break;
-// }
-// WrkMastSta wrkMastSta = wrkMastStaMapper.selectByWrkNo(rgvProtocol.getTaskNo1().intValue());
-// if (Cools.isEmpty(wrkMastSta) || wrkMastSta.getWrkSts()!=1){
-// log.error("鏈煡鍒板皬杞︽墽琛屼换鍔℃垨鑰呮墽琛屼换鍔$姸鎬佷笉绗﹀悎锛�"+wrkMastSta);
-// continue;
-// }
-//
-// SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId());
-// StaProtocol staProtocol = devpThread.getStation().get(wrkMastSta.getStaEnd());
-// if (staProtocol == null) {
-// continue;
-// } else {
-// staProtocol = staProtocol.clone();
-// }
-// if (!staProtocol.isAutoing() || !staProtocol.isLoading()){
-// continue;
-// }
-// WrkMast wrkMast = wrkMastMapper.selectPakInStep3(wrkMastSta.getWrkNo().intValue());
-// if (!Cools.isEmpty(wrkMast)){
-// if (!staProtocol.isPakMk()){
-// continue;
-// }
-// // 涓嬪彂绔欑偣淇℃伅
-// staProtocol.setWorkNo(wrkMast.getWrkNo());
-// staProtocol.setStaNo(wrkMast.getStaNo().shortValue());
-// devpThread.setPakMk(staProtocol.getSiteId(), false);
-// log.error("rgv浠诲姟瀹屾垚缁欒緭閫佺嚎涓嬪彂鍛戒护锛�"+wrkMast.getWrkNo()+","+wrkMast.getStaNo());
-// if (!MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol))) {
-// continue;
-// }
-// }else {
-// log.error("rgv浠诲姟瀹屾垚缁欒緭閫佺嚎涓嬪彂鍛戒护,浣嗘湭鏌ヨ鍒板伐浣滄。");
-// // 涓嬪彂绔欑偣淇℃伅
-// Map<Integer,Integer> map = new HashMap<>();
-// map.put(101,102);map.put(112,111);
-// map.put(100,100);
-// staProtocol.setWorkNo(rgvProtocol.getTaskNo1().intValue());
-// staProtocol.setStaNo(map.get(rgvProtocol.getRgvPosI()).shortValue());
-// devpThread.setPakMk(staProtocol.getSiteId(), false);
-//// log.error("rgv浠诲姟瀹屾垚缁欒緭閫佺嚎涓嬪彂鍛戒护锛�"+wrkMast.getWrkNo()+","+wrkMast.getStaNo());
-// if (!MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol))) {
-// continue;
-// }
-// }
-// boolean rgvComplete = rgvComplete(rgvProtocol.getRgvNo());
-//// boolean rgvComplete = true;
-// if (!rgvComplete){
-// log.error("灏忚溅澶嶄綅澶辫触锛屽皬杞﹀彿{}锛�",rgvProtocol.getRgvNo());
-// break;
-// }
-// WrkMast wrkMast1 = wrkMastService.selectByWrkNo(rgvProtocol.getTaskNo1().intValue());
-// wrkMast1.setPdcType("Y");
-//
-// wrkMastService.updateById(wrkMast1);
-//
-// wrkMastSta.setWrkSts(3);
-// wrkMastStaMapper.updateById(wrkMastSta);
-// BasRgvMap basRgvMap = basRgvMapMapper.selectById(rgvProtocol.getRgvNo());
-// basRgvMap.setNowRoute(rgvProtocol.getRgvPosI());
-// rgvMapUpdate(basRgvMap,basRgvMap.getStartRoute(),basRgvMap.getStartRoute(),"2471");
-// rgvThread.setPakMk(true);
-// }
-//
-// else {
-// log.error("灏忚溅澶嶄綅澶辫触锛屽皬杞﹀彿{},绛夊緟wcs纭浣嗘槸娌℃湁宸ヤ綔鍙凤紒",rgvProtocol.getRgvNo());
-// }
-// }
-// }
-// }
-// }catch (Exception e){
-// log.error("灏忚溅澶嶄綅绾跨▼鎶ラ敊锛�"+e);
-// }
-// }
-// /**
-// * 鎵ц灏忚溅鎼繍浠诲姟
-// */
-// public synchronized boolean rgvRunWrkMastFullSta() {
-// boolean wrkEnable = false;
-// try{
-// List<BasRgvMap> basRgvMaps = basRgvMapService.selectList(new EntityWrapper<>());
-// for (BasRgvMap rgvSlave:basRgvMaps) {
-// RgvThread rgvThread = (RgvThread) SlaveConnection.get(SlaveType.Rgv, rgvSlave.getRgvNo());
-// RgvProtocol rgvProtocol = rgvThread.getRgvProtocol();
-// if (rgvProtocol == null) {
-// continue;
-// }else {
-// rgvProtocol = rgvProtocol.clone();
-// }
-// BasRgv basRgv = basRgvService.selectById(rgvSlave.getRgvNo());
-// if (basRgv == null) {
-// log.error("{}鍙稲GV灏氭湭鍦ㄦ暟鎹簱杩涜缁存姢锛�4", rgvSlave.getRgvNo());
-// continue;
-// }
-//
-// // 鍙湁褰揜GV绌洪棽銆佽嚜鍔�,宸ヤ綅涓�鏃犵墿//rgv鍙敤
-// if (rgvProtocol.getStatusType() == RgvStatusType.IDLE
-// && rgvProtocol.getModeType() == RgvModeType.AUTO
-// && rgvProtocol.getLoaded1()==0
-// && rgvProtocol.getTaskNo1() == 0
-// && rgvThread.isPakMk()
-// ) {
-// BasRgvMap basRgvMap = basRgvMapMapper.selectById(rgvProtocol.getRgvNo());
-// if (basRgvMap == null) {
-// log.error("{}鍙稲GV灏氭湭鍦ㄦ暟鎹簱鍦板浘涓繘琛岀淮鎶わ紒", rgvProtocol.getRgvNo());
-// continue;
-// }
-// List<Integer> route = RouteUtils.getRoute(basRgvMap.getStartRoute(), basRgvMap.getEndRoute());
-// basRgvMap.setNowRoute(rgvProtocol.getRgvPosI()); //鏇存柊灏忚溅褰撳墠浣嶇疆绔欑偣鍙�
-// List<WrkMastSta> wrkMastStaList = wrkMastStaMapper.selectNoInterfereList(route, route);
-// for (WrkMastSta wrkMastSta : wrkMastStaList){
-// if (wrkMastSta.getType()!=0 || wrkMastSta.getWrkType()!=3 || wrkMastSta.getWrkSts()!=0){//1:婊$増 3锛氬彇鏀�
-// continue;
-// }
-// //鍒ゆ柇宸ヤ綔缁撴潫浣嶇疆鐘舵��
-// boolean signDev = false;
-// BasDevp devNo = basDevpService.selectOne(new EntityWrapper<BasDevp>().eq("dev_no", wrkMastSta.getStaEnd()));
-// if (devNo.getDevNo()==113){
-// BasDevp devNo114 = basDevpService.selectOne(new EntityWrapper<BasDevp>().eq("dev_no", 114));
-// if (!Cools.isEmpty(devNo114)){
-// if (devNo114.getOutEnable().equals("Y")){
-// signDev = true;
-// }
-// }
-// }
-// if (!Cools.isEmpty(devNo)){
-// if (devNo.getAutoing().equals("Y") && !devNo.getWrkNo().equals(0) && !devNo.getLoading().equals("N")){
-// continue;
-// }
-// if (!signDev && devNo.getDevNo()==113){
-// if (!devNo.getAutoing().equals("Y") || !devNo.getWrkNo().equals(0) || !devNo.getLoading().equals("N")){
-// wrkEnable = true;
-// continue;
-// }
-// if (!devNo.getOutEnable().equals("Y")){
-// wrkEnable = true;
-// continue;
-// }
-// }
-// }
-// boolean sign = rgvTakeFullAll(basRgvMap.getRgvNo(), wrkMastSta); //鍛戒护涓嬪彂
-// wrkEnable = true;
-// if (sign){
-// wrkMastSta.setWrkSts(1);
-// try{
-// wrkMastStaMapper.updateById(wrkMastSta);
-// log.error("鏇存柊灏忚溅浠诲姟鎴愬姛");
-// }catch (Exception e){
-// log.error("鏇存柊灏忚溅浠诲姟澶辫触");
-// }
-// rgvThread.setPakMk(false);
-// boolean signMap = rgvMapUpdate(basRgvMap, wrkMastSta.getStaStart(), wrkMastSta.getStaEnd(),"2526");
-// if (signMap){
-// return wrkEnable;
-//// break;
-// }else {
-// log.error("3864琛岋紝璐х墿鎼繍浠诲姟锛氬伐浣滃彿{}鎵�灞炰换鍔′笅鍙戝悗鍦板浘鍚屾澶辫触",wrkMastSta.getWrkNo());
-// Thread.sleep(500);
-// }
-// } else {
-// log.error("宸ヤ綔鍙穥}鎵�灞炰换鍔′笅鍙戝け璐�",wrkMastSta.getWrkNo());
-// Thread.sleep(500);
-// }
-// break;
-// }
-// }
-//
-// }
-//// if (!wrkEnable){
-//// rgvRunWrkMastEmptyStaAvoidance();
-//// }
-// }catch (Exception e){
-// log.error("3875琛屾墽琛屽皬杞︽惉杩愪换鍔′笅鍙戝け璐�");
-// log.error("3875琛�"+e);
-// }
-// return wrkEnable;
-// }
- /**
- * 鎵ц灏忚溅鎼繍浠诲姟
- */
-// public synchronized void rgvRunWrkMastEmptyStaPut() {//鏀�
-// try{
-// for (RgvSlave rgvSlave:slaveProperties.getRgv()) {
-// RgvThread rgvThread = (RgvThread) SlaveConnection.get(SlaveType.Rgv, rgvSlave.getId());
-// RgvProtocol rgvProtocol = rgvThread.getRgvProtocol();
-// if (rgvProtocol == null) {
-// continue;
-// }
-// BasRgv basRgv = basRgvService.selectById(rgvSlave.getId());
-// if (basRgv == null) {
-// log.error("{}鍙稲GV灏氭湭鍦ㄦ暟鎹簱杩涜缁存姢锛�5", rgvSlave.getId());
-// continue;
-// }
-//
-// // 鍙湁褰揜GV绌洪棽銆佽嚜鍔�,宸ヤ綅浜屾湁鐗�//rgv鍙敤
-// if (rgvProtocol.getStatusType() == RgvStatusType.IDLE
-// && rgvProtocol.getModeType() == RgvModeType.AUTO
-// && rgvProtocol.getLoaded1()==1 //鐜板満淇敼锛氬彔鐩樻満锛屼笉婊¢兘绠楁棤鐗╋紝鎬庝箞鍒ゆ柇闇�瑕佽窡鐢垫帶瀵规帴
-// ) {
-// BasRgvMap basRgvMap = basRgvMapMapper.selectById(rgvProtocol.getRgvNo());
-// if (basRgvMap == null) {
-// log.error("{}鍙稲GV灏氭湭鍦ㄦ暟鎹簱鍦板浘涓繘琛岀淮鎶わ紒", rgvProtocol.getRgvNo());
-// continue;
-// }
-// basRgvMap.setNowRoute(rgvProtocol.getRgvPosI()); //鏇存柊灏忚溅褰撳墠浣嶇疆绔欑偣鍙�
-// List<Integer> route = RouteUtils.getRoute(basRgvMap.getStartRoute(), basRgvMap.getEndRoute());//鑾峰彇娲诲姩鑼冨洿
-// List<WrkMastSta> wrkMastStaList = wrkMastStaMapper.selectNoInterfereList(route, route);//鏌ヨ鍙墽琛屼换鍔�
-// for (WrkMastSta wrkMastSta : wrkMastStaList){
-// if (wrkMastSta.getType()!=2 || (wrkMastSta.getWrkType()!=2 && wrkMastSta.getWrkType()!=4)){// 2:绌烘澘 2:鏀� 4锛氭媶鐩�
-// continue;
-// }
-// boolean sign = false;
-// if (wrkMastSta.getStaStart()==0 && wrkMastSta.getStaEnd()!=0){//鏀�
-// sign = rgvPutEmpty(rgvProtocol.getRgvNo(),wrkMastSta);
-// }else {
-// continue;
-// }
-// if (sign){
-// boolean signMap = rgvMapUpdate(basRgvMap, basRgvMap.getStartRoute(), wrkMastSta.getStaEnd());
-// if (signMap){
-// wrkMastSta.setWrkSts(2);
-// try{
-// wrkMastStaMapper.updateById(wrkMastSta);
-// }catch (Exception e){
-// log.error("鏇存柊灏忚溅浠诲姟澶辫触");
-// }
-// return;
-// }else {
-// log.error("3857琛岋紝璐х墿鎼繍浠诲姟锛氬伐浣滃彿{}鎵�灞炰换鍔′笅鍙戝悗鍦板浘鍚屾澶辫触",wrkMastSta.getWrkNo());
-// }
-// }else {
-// log.error("宸ヤ綔鍙穥}鎵�灞炰换鍔′笅鍙戝け璐�",wrkMastSta.getWrkNo());
-// }
-// break;
-// }
-// }
-// }
-// }catch (Exception e){
-// log.error("3933琛屾墽琛屽皬杞︽斁绌烘澘浠诲姟涓嬪彂澶辫触");
-// log.error("3933琛�"+e);
-// }
-// }
-// public synchronized void rgvRunWrkMastEmptyStaTake() {//鍙�
-// try{
-// for (RgvSlave rgvSlave:slaveProperties.getRgv()) {
-// RgvThread rgvThread = (RgvThread) SlaveConnection.get(SlaveType.Rgv, rgvSlave.getId());
-// RgvProtocol rgvProtocol = rgvThread.getRgvProtocol();
-// if (rgvProtocol == null) {
-// continue;
-// }
-// BasRgv basRgv = basRgvService.selectById(rgvSlave.getId());
-// if (basRgv == null) {
-// log.error("{}鍙稲GV灏氭湭鍦ㄦ暟鎹簱杩涜缁存姢锛�6", rgvSlave.getId());
-// continue;
-// }
-//
-// // 鍙湁褰揜GV绌洪棽銆佽嚜鍔�,宸ヤ綅浜屾棤鐗�//rgv鍙敤
-// if (rgvProtocol.getStatusType() == RgvStatusType.IDLE
-// && rgvProtocol.getModeType() == RgvModeType.AUTO
-// && rgvProtocol.getLoaded1()==0 //鐜板満淇敼锛氬彔鐩樻満锛屼笉婊¢兘绠楁棤鐗╋紝鎬庝箞鍒ゆ柇闇�瑕佽窡鐢垫帶瀵规帴
-// ) {
-// BasRgvMap basRgvMap = basRgvMapMapper.selectById(rgvProtocol.getRgvNo());
-// if (basRgvMap == null) {
-// log.error("{}鍙稲GV灏氭湭鍦ㄦ暟鎹簱鍦板浘涓繘琛岀淮鎶わ紒", rgvProtocol.getRgvNo());
-// continue;
-// }
-// List<Integer> route = RouteUtils.getRoute(basRgvMap.getStartRoute(), basRgvMap.getEndRoute());
-// basRgvMap.setNowRoute(rgvProtocol.getRgvPosI()); //鏇存柊灏忚溅褰撳墠浣嶇疆绔欑偣鍙�
-// List<WrkMastSta> wrkMastStaList = wrkMastStaMapper.selectNoInterfereList(route, route);
-// for (WrkMastSta wrkMastSta : wrkMastStaList){
-// if (wrkMastSta.getType()!=2 || wrkMastSta.getWrkType()!=1){// 2:绌烘澘 1:鍙�
-// continue;
-// }
-// boolean sign = false;
-// if (wrkMastSta.getStaEnd()==0 && wrkMastSta.getStaStart()!=0){//鍙�
-// sign = rgvTakeEmpty(rgvProtocol.getRgvNo(),wrkMastSta);
-// } else {
-// continue;
-// }
-// if (sign){
-// boolean signMap = rgvMapUpdate(basRgvMap, wrkMastSta.getStaStart(), basRgvMap.getStartRoute());
-// if (signMap){
-// wrkMastSta.setWrkSts(1);
-// try{
-// wrkMastStaMapper.updateById(wrkMastSta);
-// }catch (Exception e){
-// log.error("鏇存柊灏忚溅浠诲姟澶辫触");
-// }
-// return;
-// }else {
-// log.error("3879琛岋紝璐х墿鎼繍浠诲姟锛氬伐浣滃彿{}鎵�灞炰换鍔′笅鍙戝悗鍦板浘鍚屾澶辫触",wrkMastSta.getWrkNo());
-// }
-// }else {
-// log.error("宸ヤ綔鍙穥}鎵�灞炰换鍔′笅鍙戝け璐�",wrkMastSta.getWrkNo());
-// }
-// break;
-// }
-// }
-// }
-// }catch (Exception e){
-// log.error("3989琛屾墽琛屽皬杞﹀彇绌烘澘浠诲姟涓嬪彂澶辫触");
-// log.error("3989琛�"+e);
-// }
-// }
- /*
- * 鏈変换鍔′絾鏈墽琛� 姝ゆ椂闇�瑕佽皟鏁村皬杞︿綅缃�
- * */
-// public synchronized void rgvRunWrkMastEmptyStaAvoidance() {
-// try{
-// Integer integer = wrkMastStaMapper.selectAllWrkStsCount(null,0);//鏌ヨ鐘舵�佷负0鐨勪换鍔�
-// if (integer==0){
-// return;
-// }
-// List<BasRgvMap> basRgvMaps = basRgvMapService.selectList(new EntityWrapper<>());
-// for (BasRgvMap rgvSlave:basRgvMaps) {
-// RgvThread rgvThread = (RgvThread) SlaveConnection.get(SlaveType.Rgv, rgvSlave.getRgvNo());
-// RgvProtocol rgvProtocol = rgvThread.getRgvProtocol();
-// if (rgvProtocol == null) {
-// continue;
-// }else {
-// rgvProtocol = rgvProtocol.clone();
-// }
-// BasRgv basRgv = basRgvService.selectById(rgvSlave.getRgvNo());
-// if (basRgv == null) {
-// log.error("{}鍙稲GV灏氭湭鍦ㄦ暟鎹簱杩涜缁存姢锛�1", rgvSlave.getRgvNo());
-// continue;
-// }
-//
-// // 鍙湁褰揜GV绌洪棽銆佽嚜鍔�,宸ヤ綅涓�鏃犵墿//rgv鍙敤
-// if (rgvProtocol.getStatusType() == RgvStatusType.IDLE
-// && rgvProtocol.getModeType() == RgvModeType.AUTO
-// && rgvProtocol.getLoaded1()==0 //鐜板満淇敼锛氬彔鐩樻満锛屼笉婊¢兘绠楁棤鐗╋紝鎬庝箞鍒ゆ柇闇�瑕佽窡鐢垫帶瀵规帴
-// && rgvProtocol.getTaskNo1()==0
-// && rgvProtocol.getStatusType1() == RgvStatusType.IDLE
-// && rgvThread.isPakMk()
-//// && rgvProtocol.getTaskNo2()==0
-// ){
-// BasRgvMap basRgvMap = basRgvMapMapper.selectById(rgvProtocol.getRgvNo());
-// if (rgvProtocol.getRgvPosI().equals(basRgvMap.getStartRoute())){
-// continue;
-// }
-//// if (rgvProtocol.getRgvNo()==1 && rgvProtocol.getRgvPosI().equals(100)){
-//// continue;
-//// } else if (rgvProtocol.getRgvNo()==2 && rgvProtocol.getRgvPosI().equals(157) ){
-//// continue;
-//// }
-// rgvAvoidanceXY(rgvProtocol.getRgvNo());
-// rgvMapUpdate(basRgvMap,basRgvMap.getStartRoute(),basRgvMap.getStartRoute(),"2727");
-// }
-// }
-// }catch (Exception e){
-// log.error("4109琛屾墽琛屽皬杞﹀垵濮嬪寲浠诲姟涓嬪彂澶辫触");
-// log.error("4109琛�"+e);
-// }
-// }
-//
-// /*
-// * 灏忚溅XY绉诲姩 閬胯
-// * */
-// public synchronized boolean rgvAvoidanceXY(Integer rgvId){
-// BasRgvMap basRgvMap = basRgvMapService.selectByRgvNo(rgvId);
-// if (basRgvMap.getStartRoute() == 100 || basRgvMap.getStartRoute() == 101){
-// try{
-//
-// // 鍛戒护涓嬪彂鍖� --------------------------------------------------------------------------
-// RgvCommand rgvCommand = new RgvCommand();
-// rgvCommand.setRgvNo(rgvId); // RGV缂栧彿
-// rgvCommand.setAckFinish1((short) 0); // 宸ヤ綅1浠诲姟瀹屾垚纭浣�
-// rgvCommand.setTaskNo1((short)32222); // 宸ヤ綅1宸ヤ綔鍙�
-// rgvCommand.setTaskMode1(RgvTaskModeType.X_MOVE); // 宸ヤ綅1浠诲姟妯″紡: 鍥炲師鐐�
-// //basRgvMap.getLockStartRoute().shortValue()
-// rgvCommand.setSourceStaNo1(basRgvMap.getStartRoute().shortValue());
-// rgvCommand.setCommand((short) 1); //宸ヤ綅1浠诲姟纭
-// if (!MessageQueue.offer(SlaveType.Rgv, rgvId, new Task(4, rgvCommand))) {
-// //step=2,宸ヤ綅1銆�2鍐欎换鍔★紱 step=4锛屽伐浣�1鍐欎换鍔★紱 step=5锛屽伐浣�2鍐欎换鍔� step=9锛屽洖鍘熺偣 9999浠诲姟鍙�
-// log.error("RGV鍛戒护涓嬪彂澶辫触锛孯GV鍙�={}锛屼换鍔℃暟鎹�={}", rgvId, JSON.toJSON(rgvCommand));
-// return false;
-// } else {
-// return true;
-// }
-// }catch (Exception e){
-// return false;
-//
-// }
-// }else {
-// try{
-// // 鍛戒护涓嬪彂鍖� --------------------------------------------------------------------------
-// RgvCommand rgvCommand = new RgvCommand();
-// rgvCommand.setRgvNo(rgvId); // RGV缂栧彿
-// rgvCommand.setAckFinish1((short) 0); // 宸ヤ綅1浠诲姟瀹屾垚纭浣�
-// rgvCommand.setTaskNo1((short)32222); // 宸ヤ綅1宸ヤ綔鍙�
-// rgvCommand.setTaskMode1(RgvTaskModeType.X_MOVE); // 宸ヤ綅1浠诲姟妯″紡: 鍥炲師鐐�
-// //basRgvMap.getLockStartRoute().shortValue()
-// rgvCommand.setSourceStaNo1(basRgvMap.getStartRoute().shortValue());
-// rgvCommand.setCommand((short) 1); //宸ヤ綅1浠诲姟纭
-// if (!MessageQueue.offer(SlaveType.Rgv, rgvId, new Task(4, rgvCommand))) {
-// //step=2,宸ヤ綅1銆�2鍐欎换鍔★紱 step=4锛屽伐浣�1鍐欎换鍔★紱 step=5锛屽伐浣�2鍐欎换鍔� step=9锛屽洖鍘熺偣 9999浠诲姟鍙�
-// log.error("RGV鍛戒护涓嬪彂澶辫触锛孯GV鍙�={}锛屼换鍔℃暟鎹�={}", rgvId, JSON.toJSON(rgvCommand));
-// return false;
-// } else {
-// return true;
-// }
-// }catch (Exception e){
-// return false;
-//
-// }
-// }
-// }
-//
-//
-// /*
-// * 灏忚溅鍙栬揣鑷冲伐浣嶄换鍔�
-// * */
-// public synchronized boolean rgvTakeFullAll(Integer rgvId,WrkMastSta wrkMastSta){
-// try{
-// // 鍛戒护涓嬪彂鍖� --------------------------------------------------------------------------
-// RgvCommand rgvCommand = new RgvCommand();
-// rgvCommand.setRgvNo(rgvId); // RGV缂栧彿
-// rgvCommand.setAckFinish1((short) 0); // 宸ヤ綅1浠诲姟瀹屾垚纭浣�
-// rgvCommand.setTaskNo1(wrkMastSta.getWrkNo().shortValue()); // 宸ヤ綅1宸ヤ綔鍙�
-// rgvCommand.setTaskMode1(RgvTaskModeType.FETCH_PUT); // 宸ヤ綅1浠诲姟妯″紡: 鍙栨斁璐�
-// rgvCommand.setSourceStaNo1(wrkMastSta.getStaStart().shortValue()); //宸ヤ綅1璧风偣
-// rgvCommand.setDestinationStaNo1(wrkMastSta.getStaEnd().shortValue()); //宸ヤ綅1鐩爣绔欑偣
-// rgvCommand.setCommand((short) 1); //宸ヤ綅1浠诲姟纭
-// if (!MessageQueue.offer(SlaveType.Rgv, rgvId, new Task(4, rgvCommand))) {
-// //step=2,宸ヤ綅1銆�2鍐欎换鍔★紱 step=4锛屽伐浣�1鍐欎换鍔★紱 step=5锛屽伐浣�2鍐欎换鍔�
-// log.error("RGV鍛戒护涓嬪彂澶辫触锛孯GV鍙�={}锛屼换鍔℃暟鎹�={}", rgvId, JSON.toJSON(rgvCommand));
-// return false;
-// } else {
-// return true;
-// }
-// }catch (Exception e){
-// return false;
-// }
-// }
-
- /*
- * 灏忚溅鍙栬揣鑷冲伐浣嶄换鍔�
- * */
-// public synchronized boolean rgvTakeFull(Integer rgvId,WrkMastSta wrkMastSta){
-// try{
-// // 鍛戒护涓嬪彂鍖� --------------------------------------------------------------------------
-// RgvCommand rgvCommand = new RgvCommand();
-// rgvCommand.setRgvNo(rgvId); // RGV缂栧彿
-// rgvCommand.setAckFinish1((short) 0); // 宸ヤ綅1浠诲姟瀹屾垚纭浣�
-// rgvCommand.setTaskNo1(wrkMastSta.getWrkNo().shortValue()); // 宸ヤ綅1宸ヤ綔鍙�
-// rgvCommand.setTaskMode1(RgvTaskModeType.FETCH); // 宸ヤ綅1浠诲姟妯″紡: 鍙栬揣
-// rgvCommand.setSourceStaNo1(wrkMastSta.getStaStart().shortValue()); //宸ヤ綅1璧风偣
-// rgvCommand.setCommand((short) 1); //宸ヤ綅1浠诲姟纭
-// if (!MessageQueue.offer(SlaveType.Rgv, rgvId, new Task(4, rgvCommand))) {
-// //step=2,宸ヤ綅1銆�2鍐欎换鍔★紱 step=4锛屽伐浣�1鍐欎换鍔★紱 step=5锛屽伐浣�2鍐欎换鍔�
-// log.error("RGV鍛戒护涓嬪彂澶辫触锛孯GV鍙�={}锛屼换鍔℃暟鎹�={}", rgvId, JSON.toJSON(rgvCommand));
-// return false;
-// } else {
-// return true;
-// }
-// }catch (Exception e){
-// return false;
-// }
-// }
-
- /*
- * 灏忚溅鏀捐揣鑷宠緭閫佺嚎浠诲姟
- * */
-// public synchronized boolean rgvPutFull(Integer rgvId,WrkMastSta wrkMastSta){
-// try{
-// // 鍛戒护涓嬪彂鍖� --------------------------------------------------------------------------
-// RgvCommand rgvCommand = new RgvCommand();
-// rgvCommand.setRgvNo(rgvId); // RGV缂栧彿
-// rgvCommand.setAckFinish1((short) 0); // 宸ヤ綅1浠诲姟瀹屾垚纭浣�
-// rgvCommand.setTaskNo1(wrkMastSta.getWrkNo().shortValue()); // 宸ヤ綅1宸ヤ綔鍙�
-// rgvCommand.setTaskMode1(RgvTaskModeType.PUT); // 宸ヤ綅1浠诲姟妯″紡: 鏀捐揣
-// rgvCommand.setDestinationStaNo1(wrkMastSta.getStaEnd().shortValue()); //宸ヤ綅1鐩爣绔欑偣
-// rgvCommand.setCommand((short) 1); //宸ヤ綅1浠诲姟纭
-// if (!MessageQueue.offer(SlaveType.Rgv, rgvId, new Task(4, rgvCommand))) {
-// //step=2,宸ヤ綅1銆�2鍐欎换鍔★紱 step=4锛屽伐浣�1鍐欎换鍔★紱 step=5锛屽伐浣�2鍐欎换鍔�
-// log.error("RGV鍛戒护涓嬪彂澶辫触锛孯GV鍙�={}锛屼换鍔℃暟鎹�={}", rgvId, JSON.toJSON(rgvCommand));
-// return false;
-// } else {
-// return true;
-// }
-// }catch (Exception e){
-// return false;
-// }
-// }
-
- /*
- * 灏忚溅鍙栫┖鏉胯嚦宸ヤ綅浠诲姟
- * */
-// public synchronized boolean rgvTakeEmpty(Integer rgvId,WrkMastSta wrkMastSta){
-// try{
-// // 鍛戒护涓嬪彂鍖� --------------------------------------------------------------------------
-// RgvCommand rgvCommand = new RgvCommand();
-// rgvCommand.setRgvNo(rgvId); // RGV缂栧彿
-// rgvCommand.setAckFinish2((short) 0); // 宸ヤ綅2浠诲姟瀹屾垚纭浣�
-// rgvCommand.setTaskNo2(wrkMastSta.getWrkNo().shortValue()); // 宸ヤ綅2宸ヤ綔鍙�
-// rgvCommand.setTaskMode2(RgvTaskModeType.FETCH); // 宸ヤ綅2浠诲姟妯″紡: 鍙栬揣
-// rgvCommand.setSourceStaNo2(wrkMastSta.getStaStart().shortValue()); //宸ヤ綅2璧风偣
-// rgvCommand.setCommand((short) 2); //宸ヤ綅2浠诲姟纭
-// if (!MessageQueue.offer(SlaveType.Crn, rgvId, new Task(5, rgvCommand))) {
-// //step=2,宸ヤ綅1銆�2鍐欎换鍔★紱 step=4锛屽伐浣�1鍐欎换鍔★紱 step=5锛屽伐浣�2鍐欎换鍔�
-// log.error("RGV鍛戒护涓嬪彂澶辫触锛孯GV鍙�={}锛屼换鍔℃暟鎹�={}", rgvId, JSON.toJSON(rgvCommand));
-// return false;
-// } else {
-// return true;
-// }
-// }catch (Exception e){
-// return false;
-// }
-// }
-
- /*
- * 灏忚溅鏀剧┖鏉胯嚦杈撻�佺嚎浠诲姟
- * */
-// public synchronized boolean rgvPutEmpty(Integer rgvId,WrkMastSta wrkMastSta){
-// try{
-// // 鍛戒护涓嬪彂鍖� --------------------------------------------------------------------------
-// RgvCommand rgvCommand = new RgvCommand();
-// rgvCommand.setRgvNo(rgvId); // RGV缂栧彿
-// rgvCommand.setAckFinish2((short) 0); // 宸ヤ綅2浠诲姟瀹屾垚纭浣�
-// rgvCommand.setTaskNo2(wrkMastSta.getWrkNo().shortValue()); // 宸ヤ綅2宸ヤ綔鍙�
-// rgvCommand.setTaskMode2(RgvTaskModeType.PUT); // 宸ヤ綅2浠诲姟妯″紡: 鏀捐揣
-// rgvCommand.setDestinationStaNo2(wrkMastSta.getStaEnd().shortValue()); //宸ヤ綅2鐩爣绔欑偣
-// rgvCommand.setCommand((short) 2); //宸ヤ綅2浠诲姟纭
-// if (!MessageQueue.offer(SlaveType.Crn, rgvId, new Task(5, rgvCommand))) {
-// //step=2,宸ヤ綅1銆�2鍐欎换鍔★紱 step=4锛屽伐浣�1鍐欎换鍔★紱 step=5锛屽伐浣�2鍐欎换鍔�
-// log.error("RGV鍛戒护涓嬪彂澶辫触锛孯GV鍙�={}锛屼换鍔℃暟鎹�={}", rgvId, JSON.toJSON(rgvCommand));
-// return false;
-// } else {
-// return true;
-// }
-// }catch (Exception e){
-// return false;
-// }
-// }
-
- /*
- * 灏忚溅澶嶄綅
- * */
- public synchronized boolean rgvComplete(Integer rgvId){
- try{
- // 鍛戒护涓嬪彂鍖� --------------------------------------------------------------------------
- if (!MessageQueue.offer(SlaveType.Rgv, rgvId, new Task(3, new RgvCommand()))) {
- //step=2,宸ヤ綅1銆�2鍐欎换鍔★紱 step=4锛屽伐浣�1鍐欎换鍔★紱 step=5锛屽伐浣�2鍐欎换鍔�
- log.error("RGV鍛戒护涓嬪彂澶辫触锛孯GV鍙�={}",rgvId);
- return false;
- } else {
- log.info("RGV鍛戒护涓嬪彂鎴愬姛锛孯GV鍙�={}",rgvId);
- return true;
- }
- }catch (Exception e){
- log.error("RGV鍛戒护涓嬪彂澶辫触锛孯GV鍙�={}銆傚紓甯革細"+e,rgvId);
- return false;
- }
- }
}
--
Gitblit v1.9.1