##
luxiaotao1123
2020-12-30 cf4bfb93544dc7d33a891257e05cc0ae937a5610
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -728,6 +728,9 @@
                    if (latest == null) {
                        if (crnProtocol.getAlarm1() != null && crnProtocol.getAlarm1() > 0) {
                            WrkMast wrkMast = wrkMastMapper.selectById(crnProtocol.getTaskNo());
                            if (wrkMast == null) {
                                continue;
                            }
                            BasCrnError crnError = basCrnErrorMapper.selectById(crnProtocol.getAlarm1());
                            BasErrLog basErrLog = new BasErrLog(
                                    null,    // 编号
@@ -775,6 +778,7 @@
                        // 记录新异常
                        if (latest == null || (latest.getErrCode() != crnProtocol.getAlarm1().intValue())) {
                            BasCrnError crnError = basCrnErrorMapper.selectById(crnProtocol.getAlarm1());
                            String errName = crnError==null? String.valueOf(crnProtocol.getAlarm1()):crnError.getErrName();
                            BasErrLog basErrLog = new BasErrLog(
                                    null,    // 编号
                                    null,    // 工作号
@@ -790,7 +794,7 @@
                                    null,    // 源库位
                                    null,    // 条码
                                    crnProtocol.getAlarm1().intValue(),    // 异常码
                                    crnError.getErrName(),    // 异常
                                    errName,    // 异常
                                    1,    // 异常情况
                                    now,    // 添加时间
                                    null,    // 添加人员
@@ -799,7 +803,7 @@
                                    "无任务异常"    // 备注
                            );
                            if (!basErrLogService.insert(basErrLog)) {
                                log.error("堆垛机plc异常记录失败 ===>> [id:{}] [error:{}]", crn.getId(), crnError.getErrName());
                                log.error("堆垛机plc异常记录失败 ===>> [id:{}] [error:{}]", crn.getId(), errName);
                            }
                        }
                    // 无异常