| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.zy.asrs.framework.exception.CoolException; |
| | | import com.zy.asrs.wms.asrs.entity.*; |
| | | import com.zy.asrs.wms.asrs.entity.enums.LocStsType; |
| | | import com.zy.asrs.wms.asrs.entity.enums.OrderSettleType; |
| | | import com.zy.asrs.wms.asrs.entity.enums.ShelvesRuleDetlType; |
| | | import com.zy.asrs.wms.asrs.entity.enums.*; |
| | | import com.zy.asrs.wms.asrs.entity.param.GeneratePakInParam; |
| | | import com.zy.asrs.wms.asrs.service.*; |
| | | import com.zy.asrs.wms.utils.LocUtils; |
| | |
| | | private ShelvesRuleService shelvesRuleService; |
| | | @Autowired |
| | | private LanewayRuleService lanewayRuleService; |
| | | @Autowired |
| | | private CircleRuleService circleRuleService; |
| | | |
| | | @Override |
| | | public String generateTaskNo(Long taskType) { |
| | |
| | | } |
| | | } |
| | | |
| | | Integer currentLev = null; |
| | | if (shelvesRule.getRuleType().equals(ShelvesRuleType.HIGH.id)) { |
| | | //优先立体层 |
| | | currentLev = circleRuleService.getCurrentValueByFlag(CircleRuleType.LEV.flag); |
| | | } |
| | | |
| | | List<ShelvesRuleDetl> ruleDetls = shelvesRule.getRuleDetl$(); |
| | | if(ruleDetls.isEmpty()) { |
| | | throw new CoolException("未配置上架规则明细"); |
| | |
| | | |
| | | if (ruleDetl.getDetlType().equals(ShelvesRuleDetlType.SUGGEST.id)) { |
| | | //获取推荐库位 |
| | | List<Loc> suggestLoc = locUtils.getSuggestEmptyLoc(taskType, locTypeHeight, laneRowList); |
| | | List<Loc> suggestLoc = locUtils.getSuggestEmptyLoc(taskType, locTypeHeight, laneRowList, currentLev); |
| | | //获取库位 |
| | | if (!suggestLoc.isEmpty()) { |
| | | defaultLoc = locUtils.filterLoc(taskType, suggestLoc); |
| | |
| | | |
| | | if (ruleDetl.getDetlType().equals(ShelvesRuleDetlType.COMPLETE.id)) { |
| | | //从全局库位中获取(完整巷道) |
| | | List<Loc> globalLoc = locUtils.getGlobalEmptyLoc(taskType, locTypeHeight, laneRowList); |
| | | List<Loc> globalLoc = locUtils.getGlobalEmptyLoc(taskType, locTypeHeight, laneRowList, currentLev); |
| | | //获取库位 |
| | | if (!globalLoc.isEmpty()) { |
| | | defaultLoc = locUtils.filterAllLoc(globalLoc); |
| | |
| | | } |
| | | } |
| | | |
| | | Integer currentLev = null; |
| | | if (shelvesRule.getRuleType().equals(ShelvesRuleType.HIGH.id)) { |
| | | //优先立体层 |
| | | currentLev = circleRuleService.getCurrentValueByFlag(CircleRuleType.LEV.flag); |
| | | } |
| | | |
| | | List<ShelvesRuleDetl> ruleDetls = shelvesRule.getRuleDetl$(); |
| | | if(ruleDetls.isEmpty()) { |
| | | throw new CoolException("未配置上架规则明细"); |
| | |
| | | |
| | | if (ruleDetl.getDetlType().equals(ShelvesRuleDetlType.SUGGEST.id)) { |
| | | //获取推荐库位 |
| | | List<Loc> suggestLoc = locUtils.getSuggestLoc(taskType, mat.getId(), detl.getBatch(), locTypeHeight, laneRowList); |
| | | List<Loc> suggestLoc = locUtils.getSuggestLoc(taskType, mat.getId(), detl.getBatch(), locTypeHeight, laneRowList, currentLev); |
| | | //获取库位 |
| | | if (!suggestLoc.isEmpty()) { |
| | | defaultLoc = locUtils.filterLoc(taskType, suggestLoc); |
| | |
| | | |
| | | if (ruleDetl.getDetlType().equals(ShelvesRuleDetlType.COMPLETE.id)) { |
| | | //从全局库位中获取(完整巷道) |
| | | List<Loc> globalLoc = locUtils.getGlobalLoc(taskType, locTypeHeight, laneRowList); |
| | | List<Loc> globalLoc = locUtils.getGlobalLoc(taskType, locTypeHeight, laneRowList, currentLev); |
| | | //获取库位 |
| | | if (!globalLoc.isEmpty()) { |
| | | defaultLoc = locUtils.filterAllLoc(globalLoc); |