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