自动化立体仓库 - WMS系统
zyx
2023-10-02 cda03cb23bc12f582029ac8d6df103d86e61fc8b
src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
@@ -124,9 +124,10 @@
        // 生成工作档明细
        List<DetlDto> detlDtos = new ArrayList<>();
        param.getList().forEach(elem -> {
            DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(), elem.getAnfme());
            DetlDto detlDto = new DetlDto(elem.getMatnr(), elem.getBatch(), elem.getAnfme(), elem.getCsocode(), elem.getIsoseq());
            detlDto.setContainerCode(elem.getContainerCode());
            if (DetlDto.has(detlDtos, detlDto)) {
                DetlDto detlDto1 = DetlDto.find(detlDtos, detlDto.getMatnr(), detlDto.getBatch());
                DetlDto detlDto1 = DetlDto.find(detlDtos, detlDto.getMatnr(), detlDto.getBatch(),detlDto.getCsocode(),detlDto.getIsoseq(),detlDto.getContainerCode());
                assert detlDto1 != null;
                detlDto1.setAnfme(detlDto1.getAnfme() + detlDto.getAnfme());
            } else {
@@ -190,9 +191,9 @@
                }
            }
            List<String> groupInsideLoc = Utils.getGroupInsideLoc(locNo);
            if (!Cools.isEmpty(groupInsideLoc)) {
                for (String insideLoc : groupInsideLoc) {
            List<String> groupInnerLoc = Utils.getGroupInnerLoc(locNo);
            if (!Cools.isEmpty(groupInnerLoc)) {
                for (String insideLoc : groupInnerLoc) {
                    if (locNos.contains(insideLoc)){
                        continue;
                    }
@@ -554,9 +555,9 @@
            if (sign){
                break;
            }
            List<String> groupInsideLoc = Utils.getGroupInsideLoc(locNo);
            if (!Cools.isEmpty(groupInsideLoc)) {
                for (String insideLoc : groupInsideLoc) {
            List<String> groupInnerLoc = Utils.getGroupInnerLoc(locNo);
            if (!Cools.isEmpty(groupInnerLoc)) {
                for (String insideLoc : groupInnerLoc) {
                    if (locNos.contains(insideLoc)){
                        continue;
                    }
@@ -597,8 +598,7 @@
            // 获取源站
            Wrapper<StaDesc> wrapper = new EntityWrapper<StaDesc>()
                    .eq("type_no", 110)
                    .eq("stn_no", param.getOutSite())
                    .eq("crn_no", outCrnNo);
                    .eq("stn_no", param.getOutSite());
            StaDesc staDesc = staDescService.selectOne(wrapper);
            if (Cools.isEmpty(staDesc)) {
                throw new CoolException("非法路径!");
@@ -821,6 +821,12 @@
                        adjDetl.setModiUser(userId);
                        adjDetl.setAppeTime(now);
                        adjDetl.setAppeUser(userId);
                        UUID uuid = UUID.randomUUID();
                        adjDetl.setOrderNo(uuid.toString());
                        adjDetl.setCsocode(locDetl.getThreeCode());
                        adjDetl.setIsoseq(locDetl.getDeadTime());
                        adjDetlService.save(adjDetl, userId);
                    }
                    iterator.remove();
@@ -846,6 +852,7 @@
            adjDetl.setModiUser(userId);
            adjDetl.setAppeTime(now);
            adjDetl.setAppeUser(userId);
            adjDetlService.save(adjDetl, userId);
        }
@@ -862,6 +869,8 @@
            locDetl.setModiTime(now);
            locDetl.setAppeUser(userId);
            locDetl.setAppeTime(now);
            locDetl.setThreeCode(adjust.getThreeCode());
            locDetl.setDeadTime(adjust.getDeadTime());
            if (!locDetlService.insert(locDetl)) {
                throw new CoolException("添加" + locDetl.getLocNo() + "库位," + locDetl.getMatnr() + "商品," + locDetl.getBatch() + "序列码库存明细失败");
            }
@@ -876,6 +885,12 @@
            adjDetl.setModiUser(userId);
            adjDetl.setAppeTime(now);
            adjDetl.setAppeUser(userId);
            UUID uuid = UUID.randomUUID();
            adjDetl.setOrderNo(uuid.toString());
            adjDetl.setCsocode(locDetl.getThreeCode());
            adjDetl.setIsoseq(locDetl.getDeadTime());
            adjDetlService.save(adjDetl, userId);
        }
        // 修改库位状态