1
1 天以前 f049bb4a433b3fba1859b78e097689628f72af45
rsf-server/src/main/java/com/vincent/rsf/server/api/service/impl/PdaOutStockServiceImpl.java
@@ -5,10 +5,12 @@
import com.vincent.rsf.framework.common.R;
import com.vincent.rsf.framework.exception.CoolException;
import com.vincent.rsf.server.api.entity.dto.ContainerWaveDto;
import com.vincent.rsf.server.api.entity.params.CallForEmptyContainersParam;
import com.vincent.rsf.server.api.entity.params.ContainerWaveParam;
import com.vincent.rsf.server.api.service.PdaOutStockService;
import com.vincent.rsf.server.manager.entity.*;
import com.vincent.rsf.server.manager.enums.AsnExceStatus;
import com.vincent.rsf.server.manager.enums.StationTypeEnum;
import com.vincent.rsf.server.manager.enums.TaskStsType;
import com.vincent.rsf.server.manager.service.*;
import lombok.Synchronized;
@@ -37,6 +39,8 @@
    private AsnOrderItemService asnOrderItemService;
    @Autowired
    private WaveOrderRelaService waveOrderRelaService;
    @Autowired
    private BasStationService basStationService;
    @Override
    public R getOutStockTaskItem(String barcode) {
@@ -215,6 +219,46 @@
        return R.ok();
    }
    @Override
    @Transactional(rollbackFor = Exception.class)
    @Synchronized
    public R callForEmptyContainers(CallForEmptyContainersParam containerWaveParam, Long loginUserId) {
        // 参数校验
        if (Objects.isNull(containerWaveParam) || StringUtils.isEmpty(containerWaveParam.getStaNo())) {
            throw new CoolException("参数错误,站点号不能为空");
        }
        // 1. 站点信息判断 - 终点
        BasStation basStation = basStationService.getOne(new LambdaQueryWrapper<BasStation>()
                .eq(BasStation::getStationName, containerWaveParam.getStaNo())
                .orderByDesc(BasStation::getId)
                .last("LIMIT 1"), false);
        if (Objects.isNull(basStation)) {
            throw new CoolException(containerWaveParam.getStaNo() + "站点不存在!!");
        }
        if (!basStation.getUseStatus().equals("O")) {
            throw new CoolException("站点状态不为空闲");
        }
        //容器类型查询  起点
        if (basStation.getType().equals(StationTypeEnum.STATION_TYPE_MUTI.type)) {
            //光电站点:
            Long area = basStation.getArea();
            //是否需要转非光电站点
            //立库出库==》结束
            //AGV==》立库==》结束
        } else {
            //非光电站点
            //是否需要转光电站点
            //AGV==》结束
            //立库出库==》AGV==》结束
        }
        return R.ok();
    }
    private Boolean checkWaveComplete(TaskItem taskItem) {
        Wave wave = waveService.getById(taskItem.getSourceId());