From 2559fd781a2f627e8c769bae69bc0840f9f7bc3b Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期三, 21 九月 2022 10:47:06 +0800 Subject: [PATCH] # --- src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 27 ++++++++++++++++++++++++--- 1 files changed, 24 insertions(+), 3 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 6cad39d..41f0586 100644 --- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java @@ -499,7 +499,7 @@ // 褰撳墠鍏ュ簱搴撲綅缁勬病鏈夊皬杞� 鍫嗗灈鏈哄垯鍘荤珯鐐瑰彇璐у叆搴� // case 1锛氫粠濮嬭嚦缁堝簱浣嶇粍閮芥病鏈夊皬杞︼紝娌℃湁杩佸嚭灏忚溅鍔ㄤ綔锛屾墍浠ュ伐浣滅姸鎬� = 2 // case 2锛氬爢鍨涙満宸茬粡鎼嚭灏忚溅锛屾湁杩佸嚭灏忚溅鍔ㄤ綔锛屾墍浠ュ伐浣滅姸鎬� = 6 - if (wrkMast.getWrkSts() == 2L || wrkMast.getWrkSts() == 6L) { + if ((wrkMast.getWrkSts() == 2L && wrkMast.getSteNo() == null) || wrkMast.getWrkSts() == 6L) { // 宸茬粡瀛樺湪鍚婅溅鎵ц浠诲姟鏃讹紝鍒欒繃婊� if (wrkMastMapper.selectWorking(slave.getId()) != null) { @@ -1256,8 +1256,8 @@ crnCommand.setCrnNo(crnProtocol.getCrnNo()); // 鍫嗗灈鏈虹紪鍙� crnCommand.setTaskNo(wrkMast.getWrkNo().shortValue()); // 宸ヤ綔鍙� crnCommand.setAckFinish((short) 0); // 浠诲姟瀹屾垚纭浣� - crnCommand.setTaskMode(CrnTaskModeType.LOC_MOVE); // 浠诲姟妯″紡: 搴撲綅绉昏浆 - crnCommand.setSourcePosX(steProtocol.getRow()); // 婧愬簱浣嶆帓 + crnCommand.setTaskMode(CrnTaskModeType.STE_MOVE); // 浠诲姟妯″紡: 搴撲綅绉昏浆 + crnCommand.setSourcePosX(Utils.getGroupRow(steProtocol.getRow().intValue()).shortValue()); // 婧愬簱浣嶆帓 crnCommand.setSourcePosY(steProtocol.getBay()); // 婧愬簱浣嶅垪 crnCommand.setSourcePosZ(steProtocol.getLev()); // 婧愬簱浣嶅眰 crnCommand.setDestinationPosX(Utils.getGroupRow(idleLocNo).shortValue()); // 鐩爣搴撲綅鎺� @@ -1942,4 +1942,25 @@ } } + /** + * 灏忚溅鐢甸噺妫�娴� + */ + public void loopSteCharge() { + for (SteSlave ste : slaveProperties.getSte()) { + SteThread steThread = (SteThread) SlaveConnection.get(SlaveType.Ste, ste.getId()); + SteProtocol steProtocol = steThread.getSteProtocol(); + BasSte basSte = basSteService.selectById(ste.getId()); + if (Cools.isEmpty(steProtocol, basSte)) { continue; } + try { + if (steProtocol.getCharge() > Float.parseFloat(basSte.getChargeLine())) { + continue; + } + + + } catch (Exception e) { + log.error("fail", e); + } + } + } + } -- Gitblit v1.9.1