From 700293eea6ed60a0a108de6a63cfda70c2c095a0 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期三, 09 十一月 2022 15:16:25 +0800 Subject: [PATCH] # --- src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 73 +++++++++--------------------------- 1 files changed, 19 insertions(+), 54 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 965343f..027de02 100644 --- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java @@ -472,12 +472,12 @@ } LocMast locMast = null; // 淇敼婧愬簱浣嶇姸鎬� O.绌哄簱浣� - locMast = locMastService.selectById(sourceLocNo); - locMast.setLocSts("O"); - locMast.setModiTime(new Date()); - if (!locMastService.updateById(locMast)) { - throw new CoolException(wrkMast.getWrkNo() + "淇敼婧愬簱浣嶇姸鎬� O.绌哄簱浣�"); - } +// locMast = locMastService.selectById(sourceLocNo); +// locMast.setLocSts("O"); +// locMast.setModiTime(new Date()); +// if (!locMastService.updateById(locMast)) { +// throw new CoolException(wrkMast.getWrkNo() + "淇敼婧愬簱浣嶇姸鎬� O.绌哄簱浣�"); +// } // 淇敼鐩爣搴撲綅鐘舵�� Q.鎷f枡/鐩樼偣/骞舵澘鍐嶅叆搴� locMast = locMastService.selectById(wrkMast.getLocNo()); locMast.setLocSts("Q"); @@ -486,9 +486,9 @@ throw new CoolException(wrkMast.getWrkNo() + "淇敼鐩爣搴撲綅鐘舵�� Q.鎷f枡/鐩樼偣/骞舵澘鍐嶅叆搴�"); } // 搴撳瓨鏄庣粏杞Щ - if (!locDetlService.updateLocNo(wrkMast.getLocNo(), sourceLocNo)) { - throw new CoolException(wrkMast.getWrkNo() + "浠诲姟搴撳瓨鏄庣粏杞Щ澶辫触锛侊紒锛�"); - } +// if (!locDetlService.updateLocNo(wrkMast.getLocNo(), sourceLocNo)) { +// throw new CoolException(wrkMast.getWrkNo() + "浠诲姟搴撳瓨鏄庣粏杞Щ澶辫触锛侊紒锛�"); +// } // 鏉$爜璁惧澶勭悊 barcodeThread.setBarcode(""); @@ -541,47 +541,6 @@ /** * 鐩樼偣璐х墿鎶佃揪鐩樼偣鐩爣绔� wrkMast.sourceLoc P ===>> O */ - public void pickWrkCompleteStaNo0() { - for (DevpSlave devp : slaveProperties.getDevp()) { - // 閬嶅巻鎷f枡鍏ュ簱鍙� - for (DevpSlave.Sta pickSta : devp.getPickOutSta()) { - // 鑾峰彇鎷f枡鍏ュ簱绔欎俊鎭� - DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId()); - StaProtocol staProtocol = devpThread.getStation().get(pickSta.getStaNo()); - if (staProtocol == null) { - continue; - } else { - staProtocol = staProtocol.clone(); - } - if (staProtocol.getWorkNo() > 0) { -// WrkMast wrkMast = wrkMastMapper.selectPick17(pickSta.getStaNo(), staProtocol.getWorkNo().intValue()); -// if (Cools.isEmpty(wrkMast)) { -// log.error("{}绔欐嫞鏂欍�佸苟鏉裤�佺洏鐐规绱换鍔″け璐ワ紒浠诲姟鍙凤細{}", pickSta.getStaNo(), staProtocol.getWorkNo()); -// } else { -// // 淇敼婧愬簱浣嶇姸鎬� O.绌哄簱浣� -// LocMast locMast = locMastService.selectById(wrkMast.getSourceLocNo()); -// if (locMast.getLocSts().equals("P")) { -// locMast.setLocSts("O"); -// locMast.setModiTime(new Date()); -// if (!locMastService.updateById(locMast)) { -// throw new CoolException(wrkMast.getWrkNo() + "淇敼婧愬簱浣嶇姸鎬� O.绌哄簱浣�"); -// } -// } -// // 淇敼宸ヤ綔妗� -// wrkMast.setIoPri(13D); -// if (wrkMastMapper.updateById(wrkMast) == 0) { -// log.error("鏇存柊宸ヤ綔妗g殑浼樺厛绾уけ璐ワ紒锛侊紒 [宸ヤ綔鍙�:{}]", wrkMast.getWrkNo()); -// } -// } - } - - } - } - } - - /** - * 鐩樼偣璐х墿鎶佃揪鐩樼偣鐩爣绔� wrkMast.sourceLoc P ===>> O - */ public void pickWrkCompleteStaNo() { List<WrkMast> wrkMasts = wrkMastMapper.selectPick17(null, null); for (WrkMast wrkMast : wrkMasts) { @@ -593,9 +552,11 @@ if (!locMastService.updateById(locMast)) { throw new CoolException(wrkMast.getWrkNo() + "淇敼婧愬簱浣嶇姸鎬� O.绌哄簱浣�"); } + locDetlService.delete(new EntityWrapper<LocDetl>().eq("loc_no", wrkMast.getSourceLocNo())); } // 淇敼宸ヤ綔妗� wrkMast.setIoPri(13D); + wrkMast.setModiTime(new Date()); if (wrkMastMapper.updateById(wrkMast) == 0) { log.error("鏇存柊宸ヤ綔妗g殑浼樺厛绾уけ璐ワ紒锛侊紒 [宸ヤ綔鍙�:{}]", wrkMast.getWrkNo()); } @@ -1250,8 +1211,6 @@ } } - } else { - // todo } // 涓嶆槸鏈�澶栧眰搴撲綅锛岄渶瑕佷娇鐢ㄧ┛姊溅鎼繍鍚庯紝鍐嶅爢鍨涙満绉诲簱 } else { @@ -1392,13 +1351,13 @@ } } LocMast sourceLoc = locMastService.selectById(wrkMast.getSourceLocNo()); - if(sourceLoc.getLocSts().equals("F")){ +// if(sourceLoc.getLocSts().equals("F")){ sourceLoc.setLocSts("R"); // R.鍑哄簱棰勭害 sourceLoc.setModiTime(new Date()); if (!locMastService.updateById(sourceLoc)) { throw new CoolException("鏇存柊绉诲簱鍥炲簱鐩爣搴撲綅鐘舵�佸け璐�"); } - } +// } break; } } @@ -2424,6 +2383,12 @@ // } if (locMastService.isOutMost(wrkMast.getLocNo())) { wrkMast.setWrkSts(17L); +// LocMast locMast = locMastService.selectById(wrkMast.getLocNo()); +// locMast.setLocSts("F"); +// locMast.setModiTime(new Date()); +// if (!locMastService.updateById(locMast)) { +// log.error(""); +// } } wrkMast.setModiTime(now); // 淇敼鎴愬姛鍚庡浣嶅爢鍨涙満 -- Gitblit v1.9.1