no message
							parent
							
								
									714426db78
								
							
						
					
					
						commit
						2f0153c235
					
				| 
						 | 
					@ -450,7 +450,7 @@ public class BydAppServiceImpl implements BydAppService {
 | 
				
			||||||
            return task;
 | 
					            return task;
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
            //获取其他箱号的任务
 | 
					            //获取其他箱号的任务
 | 
				
			||||||
            return taskService.findByOrderNumber(orderNumber);
 | 
					            return taskService.findByOrderNumber(task,orderNumber);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -240,8 +240,9 @@ public interface TaskService {
 | 
				
			||||||
     * 根据箱号查询为拣货的任务
 | 
					     * 根据箱号查询为拣货的任务
 | 
				
			||||||
     *
 | 
					     *
 | 
				
			||||||
     * @param orderNumber 箱号
 | 
					     * @param orderNumber 箱号
 | 
				
			||||||
 | 
					     * @param task 当前任务
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    Task findByOrderNumber(String orderNumber);
 | 
					    Task findByOrderNumber(Task task,String orderNumber);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 移库
 | 
					     * 移库
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -311,9 +311,9 @@ public class TaskServiceImpl implements TaskService {
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                //一个托盘对应一个点位
 | 
					                //一个托盘对应一个点位
 | 
				
			||||||
                Long stockId= inv.getStock().getId();
 | 
					                Long stockId = inv.getStock().getId();
 | 
				
			||||||
                Point endPoint = getEndPoint(stockId,containerPointMap, boxAreaName);
 | 
					                Point endPoint = getEndPoint(stockId, containerPointMap, boxAreaName);
 | 
				
			||||||
                if(endPoint==null){
 | 
					                if (endPoint == null) {
 | 
				
			||||||
                    String logMessage = pick.getCode() + "明细分配失败," + (BaseStatus.GD_TYPE_CT.equals(pick.getOrderType()) ? "小件" : "大件") + "翻包区没有空闲点位!";
 | 
					                    String logMessage = pick.getCode() + "明细分配失败," + (BaseStatus.GD_TYPE_CT.equals(pick.getOrderType()) ? "小件" : "大件") + "翻包区没有空闲点位!";
 | 
				
			||||||
                    if (!lastPollLogMessages.containsKey(logMessage)) {
 | 
					                    if (!lastPollLogMessages.containsKey(logMessage)) {
 | 
				
			||||||
                        logService.saveLogInfo(pick.getCode(), pick.getCode(), "/pick/allocatePick", logMessage, "出库单分配", 200, "info");
 | 
					                        logService.saveLogInfo(pick.getCode(), pick.getCode(), "/pick/allocatePick", logMessage, "出库单分配", 200, "info");
 | 
				
			||||||
| 
						 | 
					@ -356,7 +356,7 @@ public class TaskServiceImpl implements TaskService {
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    //获取翻包区点位
 | 
					    //获取翻包区点位
 | 
				
			||||||
    private Point getEndPoint(Long stockId,Map<Long, Point> containerPointMap,String boxAreaName){
 | 
					    private Point getEndPoint(Long stockId, Map<Long, Point> containerPointMap, String boxAreaName) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        //查询翻包区是否有空闲点位
 | 
					        //查询翻包区是否有空闲点位
 | 
				
			||||||
        List<Point> pointList = pointService.queryPoints(null, BaseStatus.FREE, BaseStatus.BOX, boxAreaName);
 | 
					        List<Point> pointList = pointService.queryPoints(null, BaseStatus.FREE, BaseStatus.BOX, boxAreaName);
 | 
				
			||||||
| 
						 | 
					@ -534,12 +534,13 @@ public class TaskServiceImpl implements TaskService {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    public Task findByOrderNumber(String orderNumber) {
 | 
					    public Task findByOrderNumber(Task task, String orderNumber) {
 | 
				
			||||||
        Task task = taskRepository.findByOrderNumber(orderNumber);
 | 
					        Task newtask = taskRepository.findByOrderNumber(orderNumber);
 | 
				
			||||||
        if (task == null) {
 | 
					        if (newtask != null) {
 | 
				
			||||||
            throw new BadRequestException(orderNumber + "无拣货任务!");
 | 
					            return newtask;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
/*        Inventory dstinventory = inventoryService.findByOrderNumber(orderNumber, task.getSrcStockCode());
 | 
					
 | 
				
			||||||
 | 
					        Inventory dstinventory = inventoryService.findByOrderNumber(orderNumber, task.getSrcStockCode());
 | 
				
			||||||
        if (dstinventory == null) {
 | 
					        if (dstinventory == null) {
 | 
				
			||||||
            throw new BadRequestException(orderNumber + "箱号无库存,请更换箱号!");
 | 
					            throw new BadRequestException(orderNumber + "箱号无库存,请更换箱号!");
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					@ -554,9 +555,9 @@ public class TaskServiceImpl implements TaskService {
 | 
				
			||||||
        inventoryService.update(dstinventory);
 | 
					        inventoryService.update(dstinventory);
 | 
				
			||||||
        task.setInvId(dstinventory.getId());
 | 
					        task.setInvId(dstinventory.getId());
 | 
				
			||||||
        task.setItemKey(dstinventory.getItemKey());
 | 
					        task.setItemKey(dstinventory.getItemKey());
 | 
				
			||||||
        taskRepository.save(task);*/
 | 
					        taskRepository.save(task);
 | 
				
			||||||
 | 
					 | 
				
			||||||
        return task;
 | 
					        return task;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue