| | |
| | | && this.taskNo == 0 |
| | | && this.protocolStatus == ShuttleProtocolStatusType.IDLE.id |
| | | ; |
| | | if (!res) { |
| | | return res; |
| | | } else { |
| | | // 电量 |
| | | try { |
| | | Integer chargeLine = SpringUtils.getBean(BasShuttleService.class).selectById(this.shuttleNo).getChargeLine(); |
| | | if (chargeLine == null) { |
| | | return false; |
| | | } |
| | | return this.getPowerPercent() >= chargeLine; |
| | | } catch (Exception e) { |
| | | News.error("fail", e); |
| | | return false; |
| | | } |
| | | } |
| | | return res; |
| | | // if (!res) { |
| | | // return res; |
| | | // } else { |
| | | // // 电量 |
| | | // try { |
| | | // Integer chargeLine = SpringUtils.getBean(BasShuttleService.class).selectById(this.shuttleNo).getChargeLine(); |
| | | // if (chargeLine == null) { |
| | | // return false; |
| | | // } |
| | | // return this.getPowerPercent() >= chargeLine; |
| | | // } catch (Exception e) { |
| | | // News.error("fail", e); |
| | | // return false; |
| | | // } |
| | | // } |
| | | } |
| | | |
| | | // 是否处于空闲待命状态,传入的taskNo和当前taskNo相同时允许放行 |
| | |
| | | && (this.taskNo == 0 || this.taskNo == taskNo) |
| | | && this.protocolStatus.intValue() == ShuttleProtocolStatusType.IDLE.id |
| | | ; |
| | | if (!res) { |
| | | return res; |
| | | } else { |
| | | // 电量 |
| | | try { |
| | | Integer chargeLine = SpringUtils.getBean(BasShuttleService.class).selectById(this.shuttleNo).getChargeLine(); |
| | | return this.getPowerPercent() > chargeLine; |
| | | } catch (Exception e) { |
| | | News.error("fail", e); |
| | | return false; |
| | | } |
| | | } |
| | | return res; |
| | | // if (!res) { |
| | | // return res; |
| | | // } else { |
| | | // // 电量 |
| | | // try { |
| | | // Integer chargeLine = SpringUtils.getBean(BasShuttleService.class).selectById(this.shuttleNo).getChargeLine(); |
| | | // return this.getPowerPercent() > chargeLine; |
| | | // } catch (Exception e) { |
| | | // News.error("fail", e); |
| | | // return false; |
| | | // } |
| | | // } |
| | | } |
| | | |
| | | // 是否处于空闲待命状态 |