| | |
| | | package com.zy.common.utils; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.core.common.SpringUtils; |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.BasDevp; |
| | | import com.zy.asrs.entity.BasShuttle; |
| | | import com.zy.asrs.entity.WrkCharge; |
| | | import com.zy.asrs.entity.WrkMast; |
| | | import com.zy.asrs.mapper.WrkChargeMapper; |
| | | import com.zy.asrs.mapper.WrkMastMapper; |
| | | import com.zy.asrs.service.BasDevpService; |
| | | import com.zy.asrs.service.BasShuttleService; |
| | | import com.zy.asrs.service.WrkMastService; |
| | | import com.zy.asrs.utils.Utils; |
| | | import com.zy.common.model.NavigateNode; |
| | |
| | | * true: 小于最大数量 false: 大于或等于最大数量 |
| | | */ |
| | | public boolean checkDispatchMaxNum(Integer lev) { |
| | | BasShuttleService basShuttleService = SpringUtils.getBean(BasShuttleService.class); |
| | | ConfigService configService = SpringUtils.getBean(ConfigService.class); |
| | | EntityWrapper<Config> wrapper = new EntityWrapper<>(); |
| | | wrapper.eq("code", "dispatchShuttleMaxNum"); |
| | |
| | | continue; |
| | | } |
| | | |
| | | NyShuttleProtocol.NyShuttlePointClass point = null; |
| | | if (shuttleProtocol.getPoint() == null) { |
| | | BasShuttle basShuttle = basShuttleService.selectById(shuttle.getId());//小车如果没有数据,从数据库取数据 |
| | | if (basShuttle == null || basShuttle.getPoint() == null) { |
| | | continue; |
| | | } |
| | | point = JSON.parseObject(basShuttle.getPoint(), NyShuttleProtocol.NyShuttlePointClass.class); |
| | | }else { |
| | | point = shuttleProtocol.getPoint(); |
| | | } |
| | | |
| | | if (shuttleProtocol.getPoint().getZ().equals(lev)) { |
| | | if (point.getZ().equals(lev)) { |
| | | levCount++;//目标楼层有车,数量增加 |
| | | } |
| | | } |