no message
							parent
							
								
									e36e551c3a
								
							
						
					
					
						commit
						9cdf21b4d8
					
				| 
						 | 
				
			
			@ -12,7 +12,7 @@ public interface MesService {
 | 
			
		|||
    void materialBl(Yclbl yclbl) ;
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 单品叫料
 | 
			
		||||
     * 单品叫料-大件
 | 
			
		||||
     *
 | 
			
		||||
     * @param gdNo->订单号
 | 
			
		||||
     * @param itemCode->物料代码
 | 
			
		||||
| 
						 | 
				
			
			@ -22,7 +22,7 @@ public interface MesService {
 | 
			
		|||
    void itemCall(String gdNo, String itemCode, String station, String pointCode);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * 成品叫料
 | 
			
		||||
     * 成品叫料-小件
 | 
			
		||||
     *
 | 
			
		||||
     * @param gdNo->订单号
 | 
			
		||||
     * @param completeCode->成套代码
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -12,10 +12,12 @@ import com.youchain.basicdata.service.StockService;
 | 
			
		|||
import com.youchain.businessdata.domain.AgvTask;
 | 
			
		||||
import com.youchain.businessdata.domain.Pick;
 | 
			
		||||
import com.youchain.businessdata.domain.PickDetail;
 | 
			
		||||
import com.youchain.businessdata.domain.Task;
 | 
			
		||||
import com.youchain.businessdata.repository.PickDetailRepository;
 | 
			
		||||
import com.youchain.businessdata.repository.PickRepository;
 | 
			
		||||
import com.youchain.businessdata.service.AgvTaskService;
 | 
			
		||||
import com.youchain.businessdata.service.MesService;
 | 
			
		||||
import com.youchain.businessdata.service.TaskService;
 | 
			
		||||
import com.youchain.exception.BadRequestException;
 | 
			
		||||
import com.youchain.modules.system.service.DeptService;
 | 
			
		||||
import com.youchain.utils.*;
 | 
			
		||||
| 
						 | 
				
			
			@ -41,6 +43,7 @@ public class MesServiceImpl implements MesService {
 | 
			
		|||
    private final ItemRepository itemRepository;
 | 
			
		||||
    private final StockService stockService;
 | 
			
		||||
    private final PointService pointService;
 | 
			
		||||
    private final TaskService taskService;
 | 
			
		||||
    private final AgvTaskService agvTaskService;
 | 
			
		||||
    private final KMReServiceImpl kmReService;
 | 
			
		||||
    private final DeptService deptService;
 | 
			
		||||
| 
						 | 
				
			
			@ -109,11 +112,6 @@ public class MesServiceImpl implements MesService {
 | 
			
		|||
            throw new BadRequestException(pointCode + "点位不存在或已失效!");
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (BaseStatus.USED.equals(point.getStatus())) {
 | 
			
		||||
            throw new BadRequestException(pointCode + "点位被占用,请更换点位叫料!");
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        if (pick.getIsCall()) {
 | 
			
		||||
            throw new BadRequestException(gdNo + "工单已叫料,请勿重复叫料!");
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			@ -121,6 +119,8 @@ public class MesServiceImpl implements MesService {
 | 
			
		|||
        pick.setIsCall(true);
 | 
			
		||||
        pick.setCallPoint(point);
 | 
			
		||||
        pickRepository.save(pick);
 | 
			
		||||
 | 
			
		||||
        taskService.callEmptyStock(BaseStatus.GD_TYPE_DP);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
| 
						 | 
				
			
			@ -136,16 +136,13 @@ public class MesServiceImpl implements MesService {
 | 
			
		|||
            throw new BadRequestException(pointCode + "点位不存在或已失效!");
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (BaseStatus.USED.equals(point.getStatus())) {
 | 
			
		||||
            throw new BadRequestException(pointCode + "点位被占用,请更换点位叫料!");
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        if (pick.getIsCall()) {
 | 
			
		||||
            throw new IllegalArgumentException(gdNo + "工单已叫料,请勿重复叫料!");
 | 
			
		||||
            throw new BadRequestException(gdNo + "工单已叫料,请勿重复叫料!");
 | 
			
		||||
        }
 | 
			
		||||
        pick.setIsCall(true);
 | 
			
		||||
        pick.setCallPoint(point);
 | 
			
		||||
        pickRepository.save(pick);
 | 
			
		||||
        taskService.callEmptyStock(BaseStatus.GD_TYPE_CT);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    @Override
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -230,8 +230,8 @@ public class TaskServiceImpl implements TaskService {
 | 
			
		|||
            taskRepository.save(task);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            //叫料区是否有空车,呼叫到备料缓存区
 | 
			
		||||
            this.callEmptyStock(task.getPickDetail().getItem().getGoodType());
 | 
			
		||||
           /* //叫料区是否有空车,呼叫到备料缓存区
 | 
			
		||||
            this.callEmptyStock(task.getPickDetail().getItem().getGoodType());*/
 | 
			
		||||
        }
 | 
			
		||||
        /*更新出库单状态*/
 | 
			
		||||
        pick.setStatus(BizStatus.PICKUP);
 | 
			
		||||
| 
						 | 
				
			
			@ -263,17 +263,16 @@ public class TaskServiceImpl implements TaskService {
 | 
			
		|||
        Point endPoint = pointList.get(0);
 | 
			
		||||
 | 
			
		||||
        //有任务则直接返回
 | 
			
		||||
        List<AgvTask> agvTaskList = agvTaskService.findRepeat(stock.getCode(), srcPoint.getCode(), endPoint.getCode());
 | 
			
		||||
        if (!agvTaskList.isEmpty()) {
 | 
			
		||||
        if(!agvTaskService.findByEndSlotCode(endPoint.getCode(),BizStatus.CALL_RETURN,"RACK_MOVE")){
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        //终点占用
 | 
			
		||||
        pointService.usedPoint(endPoint);
 | 
			
		||||
        //创建任务
 | 
			
		||||
        agvTaskService.createAgvTask(BizStatus.CALL_RETURN, stock, srcPoint.getCode(), endPoint.getCode(), "RACK_MOVE");
 | 
			
		||||
 | 
			
		||||
        //终点占用
 | 
			
		||||
        pointService.usedPoint(endPoint);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue