| | |
| | | import com.core.exception.CoolException; |
| | | import com.zy.asrs.entity.*; |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.utils.LocUtils; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | private LocRuleService locRuleService; |
| | | @Autowired |
| | | AgvBasDevpService agvBasDevpService; |
| | | |
| | | @Autowired |
| | | private LocUtils locUtils; |
| | | |
| | | public int getWorkNo(Integer wrkMk) { |
| | | AgvWrkLastno wrkLastno = agvWrkLastnoService.selectById(wrkMk); |
| | |
| | | * 检索库位号 |
| | | * @return locNo 检索到的库位号 |
| | | */ |
| | | public AgvLocMast getLocNo(int type, int floor,boolean isEmpty,boolean isCurrLev) { |
| | | public AgvLocMast getLocNo(int type, int floor, boolean isEmpty, boolean isCurrLev, String factory) { |
| | | // 目标库位 |
| | | AgvLocMast locMast = null; |
| | | // if(Cools.isEmpty(agvWaitPakinList)){ |
| | |
| | | |
| | | try{ |
| | | // 开始查找库位 ==============================>> |
| | | //如果是半成品箱壳 |
| | | if (type == 6) { |
| | | |
| | | // 四期项目:需要改查找库位逻辑 |
| | | // 箱壳入库 |
| | | if (type == 3) { |
| | | //优先入库吸塑1楼,在2楼 |
| | | locMast = locUtils.getLocNoRuleByFactory(type, factory); |
| | | } else if (type == 6) { |
| | | //半成品箱壳入库,入到吸塑2楼的370个库位里 |
| | | locMast = locUtils.getLocNoRuleByFloor(type, floor, 2); |
| | | }else { |
| | | //不动这个逻辑 |
| | | locMast = getLocNoRule(type,floor,isEmpty,isCurrLev); |
| | |
| | | throw new CoolException("搜索库位时,楼层出错。"); |
| | | } |
| | | |
| | | |
| | | //随机取一个货位 |
| | | private AgvLocMast getLocNoRule(int type,int floor,boolean isEmpty,boolean isCurrLev){ |
| | | Boolean orderBy = false; |
| | |
| | | throw new CoolException("搜索库位时,未找到可入库库位。"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 检索库位号 |
| | | * @return locNo 检索到的库位号 |