Commit 69d67d67 authored by 周毅's avatar 周毅

修复bug

parent 91ae5cbf
......@@ -157,14 +157,12 @@ public class AgvServiceImpl extends BaseEditServiceImpl implements AgvService {
//是否启用充电阈值设置
String isEnable = commonService.getStringOptionValue(JcsjParamEnum.AgvBatteryEnable.id());
//充电状态,阈值比较
if(StringUtils.equals(isEnable,"Y")){
if(StringUtils.equals("7",agvStatus.getStatus())) {
Integer yz = commonService.getIntOptionValue(JcsjParamEnum.AgvBatterySetting.id());//设置值
Integer curValue = Integer.valueOf(agvStatus.getBattery());//获取小车值
if(NumberUtils.less(curValue , yz)){
logger.error("小车{}正在充电,且当前电量{}低于设定阈值{}!", agvStatus.getRobotCode(), curValue, yz);
continue;
}
if(StringUtils.equals("7",agvStatus.getStatus()) && StringUtils.equals(isEnable,"Y")){
Integer yz = commonService.getIntOptionValue(JcsjParamEnum.AgvBatterySetting.id());//设置值
Integer curValue = Integer.valueOf(agvStatus.getBattery());//获取小车值
if(NumberUtils.less(curValue , yz)){
logger.error("小车{}正在充电,且当前电量{}低于设定阈值{}!", agvStatus.getRobotCode(), curValue, yz);
continue;
}
}
//查询Eptask中是否已存在小车,如果存在,返回空,生成任务失败
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment