| | |
| | | package com.zy.core.model.protocol; |
| | | |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.entity.BasShuttleErr; |
| | | import com.zy.asrs.entity.LocMast; |
| | | import com.zy.asrs.service.BasShuttleErrService; |
| | | import com.zy.asrs.service.BasShuttleService; |
| | | import com.zy.asrs.service.LocMastService; |
| | | import com.zy.core.News; |
| | |
| | | if (!res) { |
| | | return res; |
| | | } else { |
| | | // 电量 |
| | | // 电量小于阈值或电压小于48V,需要进行充电 |
| | | try { |
| | | Integer chargeLine = SpringUtils.getBean(BasShuttleService.class).selectById(this.shuttleNo).getChargeLine(); |
| | | return this.getBatteryPower$() < chargeLine; |
| | | return this.getBatteryPower$() < chargeLine || this.currentVoltage < 480; |
| | | } catch (Exception e) { |
| | | News.error("fail", e); |
| | | return false; |
| | |
| | | return currentLocMast.getLocNo(); |
| | | } |
| | | |
| | | public String getStatusErrorCode$() { |
| | | BasShuttleErrService basShuttleErrService = SpringUtils.getBean(BasShuttleErrService.class); |
| | | BasShuttleErr basShuttleErr = basShuttleErrService.queryByCode(this.statusErrorCode.intValue()); |
| | | if (basShuttleErr == null) { |
| | | return null; |
| | | } |
| | | return basShuttleErr.getErrName(); |
| | | } |
| | | |
| | | } |