自动化立体仓库 - WMS系统
skyouc
2 天以前 1367d13c3e57d1ea15fb172be0f2089e41601cc5
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -656,6 +656,7 @@
                waitPakin.setAnfme(detlDto.getAnfme());
                waitPakin.setThreeCode(detlDto.getThreeCode());
                waitPakin.setStatus("Y");
                waitPakin.setSuppCode(detlDto.getStandby1());
                waitPakin.setStandby1(detlDto.getStandby1());
                waitPakin.setStandby2(detlDto.getStandby2());
                waitPakin.setStandby3(detlDto.getStandby3());
@@ -1331,23 +1332,13 @@
    @Override
    @Transactional(rollbackFor = Exception.class)
    public R OutCallAgv(AgvCallParams params, Long userId) {
        BasAreas basAreas = basAreasService.selectOne(new EntityWrapper<BasAreas>().eq("whs_type_id", LocAreaType.LOC_AREA_TYPE_IN_CACHE.type));
        BasStation station = basStationService.selectOne(new EntityWrapper<BasStation>()
                .eq("loc_sts", LocStsType.LOC_STS_TYPE_O.type)
                .eq("dev_no", params.getTarSite()));
        if (Objects.isNull(station)) {
            throw new CoolException("请检查站点信息!");
        }
        /** 获取入库最早的一条数据 **/
        /**获取入库最早的一条数据**/
        List<LocCache> locCaches = locCacheService.selectList(new EntityWrapper<LocCache>()
                .eq("loc_sts", LocStsType.LOC_STS_TYPE_F.type)
                .eq("area_id", basAreas.getId())
                .eq("frozen", 0)
                .in("loc_no", new EntityWrapper<LocDetl>()
                        .setSqlSelect("DISTINCT loc_no")
                        .in("matnr", new EntityWrapper<Mat>()
                                .setSqlSelect("matnr")
                                .eq("tag_id", station.getCtnType())))
                .orderDesc(Arrays.asList("sort", "first_time")));
        if (locCaches.isEmpty()) {
@@ -1355,9 +1346,8 @@
        }
        for (LocCache locCache : locCaches) {
            // 获取缓存区信息
            BasAreas basAreas = basAreasService.selectOne(
                    new EntityWrapper<BasAreas>().eq("whs_type_id", LocAreaType.LOC_AREA_TYPE_IN_CACHE.type));
            //获取缓存区信息
//            BasAreas basAreas = basAreasService.selectOne(new EntityWrapper<BasAreas>().eq("whs_type_id", LocAreaType.LOC_AREA_TYPE_IN_CACHE.type));
            if (Objects.isNull(basAreas)) {
                throw new CoolException("库区不存在!!");
            }
@@ -1381,19 +1371,18 @@
            Mat mat = matList.stream().findFirst().get();
//            BasStation station = basStationService.selectOne(new EntityWrapper<BasStation>()
//                    .eq("loc_sts", LocStsType.LOC_STS_TYPE_O.type)
//                    .eq("ctn_type", mat.getTagId())
//                    .eq("dev_no", params.getTarSite()));
            if (mat.getTagId() != station.getCtnType().longValue()){
            BasStation station = basStationService.selectOne(new EntityWrapper<BasStation>()
                    .eq("loc_sts", LocStsType.LOC_STS_TYPE_O.type)
                    .eq("ctn_type", mat.getTagId())
                    .eq("dev_no", params.getTarSite()));
            if (Objects.isNull(station)) {
                continue;
            }
            /** 生成缓存区出库任务 */
            /**生成缓存区出库任务*/
            generateCacheOutTask(station, locCache, userId);
            /** 生成立库出库任务 */
            /**生成立库出库任务*/
            generateCRNOutTask(station, locCache, userId);
            return R.ok();
@@ -1838,6 +1827,7 @@
                Mat mat = matService.selectByMatnr(combMat.getMatnr());
                BeanUtils.copyProperties(mat, basStationDetl);
                basStationDetl
                        .setId(null)
                        .setOrderNo(orderPakin.getOrderNo())
                        .setDevNo(basStation.getDevNo())
                        .setBarcode(params.getTarBarcode())