From 562c18ed0b3ac91589cf8d23511981675f59fabd Mon Sep 17 00:00:00 2001 From: zjj <3272660260@qq.com> Date: 星期一, 18 十二月 2023 16:08:08 +0800 Subject: [PATCH] # --- src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 28 +++++++++++++++++----------- 1 files changed, 17 insertions(+), 11 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 18d1323..3579cdc 100644 --- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java @@ -192,7 +192,10 @@ continue; } //StaDesc staDesc1 = staDescService.selectOne(new EntityWrapper<StaDesc>().eq("stn_no",inSta.getBackSta())); - if (taskWrk.getTargetPoint() != null && taskWrk.getStartPoint() != null && taskWrk.getWrkNo() != null && taskWrk.getWrkNo().shortValue() != workNo){ + if (taskWrk.getTargetPoint() != null && taskWrk.getStartPoint() != null){ + if ( taskWrk.getWrkNo() != null && taskWrk.getWrkNo().shortValue() == workNo ){ + continue; + } //鑾峰彇鍫嗗灈鏈虹珯鐐� StaDesc staDesc = new StaDesc(); if (devp.getId() <= 1){ @@ -740,11 +743,14 @@ commandInfo = commandInfoService.selectById(commandId); } + if (commandInfo == null) { //鎸囦护涓嶅瓨鍦� continue; } - + if (commandInfo.getCommandStatus() == 3){ + continue; + } commandInfo.setCommandStatus(CommandStatusType.COMPLETE.id);//鎸囦护瀹屾垚 commandInfo.setCompleteTime(new Date());//鎸囦护瀹屾垚鏃堕棿 if (commandInfoService.updateById(commandInfo)) {//淇敼鎴愬姛鍚庡浣嶅爢鍨涙満 @@ -812,20 +818,20 @@ if (crnProtocol == null) { continue; } - if (true) { + if (false) { // if (crnProtocol.getModeType() != CrnModeType.STOP) { // 鏈変换鍔� if (crnProtocol.getTaskNo() != 0) { BasErrLog latest = basErrLogService.findLatestByTaskNo(crn.getId(), crnProtocol.getTaskNo().intValue()); // 鏈夊紓甯� if (latest == null) { - if (crnProtocol.getAlarm1() != null && crnProtocol.getAlarm1() > 0) { + if (crnProtocol.getAlarm() != null && crnProtocol.getAlarm() > 0) { WrkMast wrkMast = wrkMastMapper.selectById(crnProtocol.getTaskNo()); if (wrkMast == null) { continue; } - BasCrnError crnError = basCrnErrorMapper.selectById(crnProtocol.getAlarm1()); - String errName = crnError==null? String.valueOf(crnProtocol.getAlarm1()):crnError.getErrName(); + BasCrnError crnError = basCrnErrorMapper.selectById(crnProtocol.getAlarm()); + String errName = crnError==null? String.valueOf(crnProtocol.getAlarm()):crnError.getErrName(); BasErrLog basErrLog = new BasErrLog( null, // 缂栧彿 wrkMast.getWrkNo(), // 宸ヤ綔鍙� @@ -868,11 +874,11 @@ } else { BasErrLog latest = basErrLogService.findLatest(crn.getId()); // 鏈夊紓甯� - if (crnProtocol.getAlarm1() != null && crnProtocol.getAlarm1() > 0) { + if (crnProtocol.getAlarm1() != null && crnProtocol.getAlarm() > 0) { // 璁板綍鏂板紓甯� - if (latest == null || (latest.getErrCode() != crnProtocol.getAlarm1().intValue())) { - BasCrnError crnError = basCrnErrorMapper.selectById(crnProtocol.getAlarm1()); - String errName = crnError==null? String.valueOf(crnProtocol.getAlarm1()):crnError.getErrName(); + if (latest == null || (latest.getErrCode() != crnProtocol.getAlarm().intValue())) { + BasCrnError crnError = basCrnErrorMapper.selectById(crnProtocol.getAlarm()); + String errName = crnError==null? String.valueOf(crnProtocol.getAlarm()):crnError.getErrName(); BasErrLog basErrLog = new BasErrLog( null, // 缂栧彿 null, // 宸ヤ綔鍙� @@ -944,7 +950,7 @@ for (TaskWrk taskWrk : taskWrks) { //鑾峰彇鍛戒护闆嗗悎 List<CommandInfo> commandInfos = commandInfoService.selectByTaskNo(taskWrk.getTaskNo()); - if (taskWrk.getCommandStep() != commandInfos.size()) { + if (taskWrk.getCommandStep() < commandInfos.size()) { continue;//褰撳墠姝ュ簭娌℃湁鍒拌揪鏈�鍚庝竴鏉″懡浠� } -- Gitblit v1.9.1