自动化立体仓库 - WMS系统
1
zhang
2 天以前 25c7cdf3ea9c4e63f16bbb52ce40e28bc65dc87c
src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
@@ -48,12 +48,30 @@
    static {
        crnMapNo = new HashMap<>();
        crnMapNo.put(1,new ArrayList<Integer>(){{add(3001);add(3002);}});
        crnMapNo.put(2,new ArrayList<Integer>(){{add(3004);add(3003);}});
        crnMapNo.put(3,new ArrayList<Integer>(){{add(3005);add(3006);}});
        crnMapNo.put(4,new ArrayList<Integer>(){{add(3007);add(3008);}});
        crnMapNo.put(5,new ArrayList<Integer>(){{add(3010);add(3009);}});
        crnMapNo.put(6,new ArrayList<Integer>(){{add(3011);add(3012);}});
        crnMapNo.put(1, new ArrayList<Integer>() {{
            add(3001);
            add(3002);
        }});
        crnMapNo.put(2, new ArrayList<Integer>() {{
            add(3004);
            add(3003);
        }});
        crnMapNo.put(3, new ArrayList<Integer>() {{
            add(3005);
            add(3006);
        }});
        crnMapNo.put(4, new ArrayList<Integer>() {{
            add(3007);
            add(3008);
        }});
        crnMapNo.put(5, new ArrayList<Integer>() {{
            add(3010);
            add(3009);
        }});
        crnMapNo.put(6, new ArrayList<Integer>() {{
            add(3011);
            add(3012);
        }});
    }
    @Autowired
@@ -213,6 +231,7 @@
            throw new CoolException("库存不存在");
        }
    }
    @Override
    @Transactional
    public void startupFullTakeStoreOrder(StockOutParam param, Long userId) {
@@ -313,6 +332,7 @@
        }
    }
    @Transactional
    @Override
    public void stockOut(BasDevp staNo, List<LocDetlDto> locDetlDtos, IoWorkType ioWorkType, Long userId) {
@@ -388,7 +408,9 @@
            }
            // 生成工作档明细
            for (LocDetlDto detlDto : dto.getLocDetlDtos()) {
                if (detlDto.getCount()==null || detlDto.getCount() <= 0.0D) {continue;}
                if (detlDto.getCount() == null || detlDto.getCount() <= 0.0D) {
                    continue;
                }
                WrkDetl wrkDetl = new WrkDetl();
                List<OrderDetl> orderDetl = orderDetlService.selectByBrand(detlDto.getLocDetl().getBrand());
                wrkDetl.sync(detlDto.getLocDetl());
@@ -463,6 +485,8 @@
                ioType = dto.isAll() ? 101 : 103;
            } else if (ioWorkType.equals(IoWorkType.CHECK_OUT)) {
                ioType = 107;
            } else if (ioWorkType.equals(IoWorkType.ALL_OUT)) {
                ioType = 101;
            }
            assert ioType != null;
            // 获取库位
@@ -509,7 +533,9 @@
            }
            // 生成工作档明细
            for (LocDetlDto detlDto : dto.getLocDetlDtos()) {
                if (detlDto.getCount()==null || detlDto.getCount() <= 0.0D) {continue;}
                if (detlDto.getCount() == null || detlDto.getCount() <= 0.0D) {
                    continue;
                }
                WrkDetl wrkDetl = new WrkDetl();
                List<OrderDetl> orderDetl = orderDetlService.selectByBrand(detlDto.getLocDetl().getBrand());
                wrkDetl.sync(detlDto.getLocDetl());
@@ -574,34 +600,82 @@
        int souresStaNo = 0;
        if (taskDto.getStaNo() < 3000) { // 二楼
            switch (row) {
                case 1: case 2: case 3:
                case 4: souresStaNo = 2062; break;
                case 5: case 6: case 7:
                case 8: souresStaNo = 2065; break;
                case 9: case 10: case 11:
                case 12: souresStaNo = 2068; break;
                case 13: case 14: case 15:
                case 16: souresStaNo = 2070; break;
                case 17: case 18: case 19:
                case 20: souresStaNo = 2073; break;
                case 21: case 22: case 23:
                case 24: souresStaNo = 2076; break;
                case 1:
                case 2:
                case 3:
                case 4:
                    souresStaNo = 2062;
                    break;
                case 5:
                case 6:
                case 7:
                case 8:
                    souresStaNo = 2065;
                    break;
                case 9:
                case 10:
                case 11:
                case 12:
                    souresStaNo = 2068;
                    break;
                case 13:
                case 14:
                case 15:
                case 16:
                    souresStaNo = 2070;
                    break;
                case 17:
                case 18:
                case 19:
                case 20:
                    souresStaNo = 2073;
                    break;
                case 21:
                case 22:
                case 23:
                case 24:
                    souresStaNo = 2076;
                    break;
                default:
            }
        } else { // 一楼
            switch (row) {
                case 1: case 2: case 3:
                case 4: souresStaNo = 3002; break;
                case 5: case 6: case 7:
                case 8: souresStaNo = 3003; break;
                case 9: case 10: case 11:
                case 12: souresStaNo = 3006; break;
                case 13: case 14: case 15:
                case 16: souresStaNo = 3008; break;
                case 17: case 18: case 19:
                case 20: souresStaNo = 3009; break;
                case 21: case 22: case 23:
                case 24: souresStaNo = 3012; break;
                case 1:
                case 2:
                case 3:
                case 4:
                    souresStaNo = 3002;
                    break;
                case 5:
                case 6:
                case 7:
                case 8:
                    souresStaNo = 3003;
                    break;
                case 9:
                case 10:
                case 11:
                case 12:
                    souresStaNo = 3006;
                    break;
                case 13:
                case 14:
                case 15:
                case 16:
                    souresStaNo = 3008;
                    break;
                case 17:
                case 18:
                case 19:
                case 20:
                    souresStaNo = 3009;
                    break;
                case 21:
                case 22:
                case 23:
                case 24:
                    souresStaNo = 3012;
                    break;
                default:
            }
        }
@@ -638,7 +712,9 @@
        }
        // 生成工作档明细
        for (LocDto locDto : taskDto.getLocDtos()) {
            if (locDto.getAnfme()==null || locDto.getAnfme() <= 0.0D) { continue; }
            if (locDto.getAnfme() == null || locDto.getAnfme() <= 0.0D) {
                continue;
            }
            OrderDetl orderDetl = orderDetlService.selectItem(locDto.getOrderNo(), locDto.getMatnr(), locDto.getBatch());
            if (orderDetl == null) {
                orderDetl = orderDetlService.selectItem(locDto.getOrderNo(), locDto.getMatnr(), null);
@@ -1121,7 +1197,9 @@
            Iterator<LocDetlAdjustParam.LocDetlAdjust> iterator1 = list.iterator();
            while (iterator1.hasNext()) {
                LocDetlAdjustParam.LocDetlAdjust adjust = iterator1.next();
                if (adjust.getCount() == 0) { continue; }
                if (adjust.getCount() == 0) {
                    continue;
                }
                if (locDetl.getMatnr().equals(adjust.getMatnr()) && Cools.eq(locDetl.getBatch(), adjust.getBatch())) {
                    if (!locDetl.getAnfme().equals(adjust.getCount())) {
                        // todo 盘点记录
@@ -1170,7 +1248,9 @@
        // 添加库存
        for (LocDetlAdjustParam.LocDetlAdjust adjust : list) {
            if (adjust.getCount() == 0.0D) { continue; }
            if (adjust.getCount() == 0.0D) {
                continue;
            }
            Mat mat = matService.selectByMatnr(adjust.getMatnr());
            LocDetl locDetl = new LocDetl();
            locDetl.sync(mat);