#
luxiaotao1123
2021-06-05 535f6c82435e868a360cc97b0f875874b41df7af
src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
@@ -185,6 +185,11 @@
    public void startupFullTakeStore(StockOutParam param, Long userId) {
        // 目标站点状态检测
        BasDevp staNo = basDevpService.checkSiteStatus(param.getOutSite());
        int agvSite = 0;
        if (!Cools.isEmpty(staNo.getFronting()) && staNo.getFronting().equals("Y")) {
            agvSite = staNo.getDevNo();
            staNo = basDevpService.checkSiteStatus(201);
        }
        // 获取库位明细
        List<LocDetlDto> locDetlDtos = new ArrayList<>();
        for (StockOutParam.LocDetl paramLocDetl : param.getLocDetls()) {
@@ -198,7 +203,7 @@
        }
        if (!locDetlDtos.isEmpty()) {
            // 启动出库开始 101.出库
            stockOut(staNo, locDetlDtos, null, userId);
            stockOut(staNo, locDetlDtos, null, userId, agvSite);
        } else {
            throw new CoolException("库位物料不存在");
        }
@@ -206,7 +211,7 @@
    @Override
    @Transactional
    public void stockOut(BasDevp staNo, List<LocDetlDto> locDetlDtos, Integer ioType, Long userId) {
    public void stockOut(BasDevp staNo, List<LocDetlDto> locDetlDtos, Integer ioType, Long userId, Integer agvSite) {
        // 合并同类项
        Set<String> locNos = new HashSet<>();
        locDetlDtos.forEach(dto -> locNos.add(dto.getLocDetl().getLocNo()));
@@ -259,6 +264,7 @@
            wrkMast.setExitMk("N"); // 退出
            wrkMast.setEmptyMk("N"); // 空板
            wrkMast.setLinkMis("N");
            wrkMast.setCtnKind(agvSite); // 出库下的小车工作区站好
            wrkMast.setAppeUser(userId); // 操作人员数据
            wrkMast.setAppeTime(new Date());
            wrkMast.setModiUser(userId);
@@ -427,6 +433,11 @@
    public void locCheckOut(StockOutParam param, Long userId) {
        // 目标站点状态检测
        BasDevp staNo = basDevpService.checkSiteStatus(param.getOutSite());
        int agvSite = 0;
        if (!Cools.isEmpty(staNo.getFronting()) && staNo.getFronting().equals("Y")) {
            agvSite = staNo.getDevNo();
            staNo = basDevpService.checkSiteStatus(201);
        }
        // 获取库位明细
        List<LocDetlDto> locDetlDtos = new ArrayList<>();
        for (StockOutParam.LocDetl paramLocDetl : param.getLocDetls()) {
@@ -445,7 +456,7 @@
        }
        if (!locDetlDtos.isEmpty()) {
            // 启动出库开始 107.盘点出库
            stockOut(staNo, locDetlDtos, 107, userId);
            stockOut(staNo, locDetlDtos, 107, userId, agvSite);
        } else {
            throw new CoolException("库位物料不存在");
        }