#
luxiaotao1123
2022-11-01 68d36621b876c34036411967d652d23d87040156
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -2458,6 +2458,7 @@
    /**
     * 小车电量检测 ===>> 发起充电
     */
    @SuppressWarnings("serial")
    public synchronized void loopSteCharge() {
        SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, 1);
        for (SteSlave ste : slaveProperties.getSte()) {
@@ -2484,7 +2485,33 @@
                if (wrkCharge == null && steProtocol.getChargeStatus() == 0) {
                    // 寻找空闲充电桩
                    SteChargeType steCharge = devpThread.getIdleChargeLocNo();
                    SteChargeType steCharge = null;
                    do {
                        String locNo;
                        if (!devpThread.charge0) {
                            locNo = SteChargeType.FIRST.locNo;
                            if (basSteService.hasCarOfLocNo(locNo) == null) {
                                steCharge = SteChargeType.FIRST;
                                break;
                            }
                        }
                        if (!devpThread.charge1) {
                            locNo = SteChargeType.SECOND.locNo;
                            if (basSteService.hasCarOfLocNo(locNo) == null) {
                                steCharge = SteChargeType.SECOND;
                                break;
                            }
                        }
                        if (!devpThread.charge2) {
                            locNo = SteChargeType.THIRD.locNo;
                            if (basSteService.hasCarOfLocNo(locNo) == null) {
                                steCharge = SteChargeType.THIRD;
                                break;
                            }
                        }
                        break;
                    } while (false);
                    if (steCharge == null) {
                        log.warn("{}号小车【电量:{}】充电失败,原因:没有空闲充电桩。", ste.getId(), steProtocol.getCharge());
                        continue;
@@ -2644,6 +2671,13 @@
        }
    }
    /**
     * 小车从充电桩 至 待机库位
     */
    public synchronized void steFromChargeToIdleLoc() {
    }
    /**
     * 因双深库位阻塞,对浅库位进行移转(出库版)