自动化立体仓库 - WMS系统
#
18516761980
2022-02-08 19c13db8d30d1c2aeb9250ed218c110e1290d05f
src/main/java/com/zy/asrs/service/impl/MatOutServiceImpl.java
@@ -71,25 +71,33 @@
                    // 判断入出库类型:101.全板出库 or 103.拣料出库
                    Double sumCount=locDetlService.getLocDetlSumQty(locDetl.getLocNo());
                    int ioType=0;
                    ioType=sumCount-outQty>0?103 : 101;
                    ioType = sumCount-locDetl.getQty()>0 ? 103 : 101;
                    if (outQty >= locDetl.getQty()){
                        //生成文档记录
                        stockOut(waitMatout.getBillNo(),waitMatout.getSeqNo(),staNo,new LocDetlDto(locDetl,locDetl.getQty()),ioType,userId);
                        waitMatout.setOutQty(waitMatout.getOutQty() + locDetl.getQty());
                        waitMatout.setIoStatus(1);
                        //修改记录
                        Integer update = waitMatoutMapper.update(waitMatout, new EntityWrapper<WaitMatout>().eq("bill_no", paramLocDetl.getBillNo())
                                                                .eq("seq_no",paramLocDetl.getSeqNo()));
                    }else {
                        //生成文档记录
                        stockOut(waitMatout.getBillNo(),waitMatout.getSeqNo(),staNo,new LocDetlDto(locDetl,outQty),ioType,userId);
                        waitMatout.setOutQty(waitMatout.getOutQty() + outQty);
                        waitMatout.setIoStatus(1);
                        //修改记录
                        Integer update = waitMatoutMapper.update(waitMatout, new EntityWrapper<WaitMatout>().eq("bill_no", paramLocDetl.getBillNo())
                                                                .eq("seq_no",paramLocDetl.getSeqNo()));
                    }
                    Double curOutQty = outQty >= locDetl.getQty() ? locDetl.getQty() : outQty;   //本次出库量
                    stockOut(waitMatout.getBillNo(),waitMatout.getSeqNo(),staNo,new LocDetlDto(locDetl,curOutQty),ioType,userId);
                    waitMatout.setOutQty(waitMatout.getOutQty() + curOutQty);
                    waitMatout.setIoStatus(1);
                    //修改记录
                    Integer update = waitMatoutMapper.update(waitMatout, new EntityWrapper<WaitMatout>().eq("bill_no", paramLocDetl.getBillNo())
                            .eq("seq_no",paramLocDetl.getSeqNo()));
//                    if (outQty >= locDetl.getQty()){
//                        //生成文档记录
//                        stockOut(waitMatout.getBillNo(),waitMatout.getSeqNo(),staNo,new LocDetlDto(locDetl,locDetl.getQty()),ioType,userId);
//                        waitMatout.setOutQty(waitMatout.getOutQty() + locDetl.getQty());
//                        waitMatout.setIoStatus(1);
//                        //修改记录
//                        Integer update = waitMatoutMapper.update(waitMatout, new EntityWrapper<WaitMatout>().eq("bill_no", paramLocDetl.getBillNo())
//                                                                .eq("seq_no",paramLocDetl.getSeqNo()));
//                    }else {
//                        //生成文档记录
//                        stockOut(waitMatout.getBillNo(),waitMatout.getSeqNo(),staNo,new LocDetlDto(locDetl,outQty),ioType,userId);
//                        waitMatout.setOutQty(waitMatout.getOutQty() + outQty);
//                        waitMatout.setIoStatus(1);
//                        //修改记录
//                        Integer update = waitMatoutMapper.update(waitMatout, new EntityWrapper<WaitMatout>().eq("bill_no", paramLocDetl.getBillNo())
//                                                                .eq("seq_no",paramLocDetl.getSeqNo()));
//                    }
                }
            }
        }
@@ -111,8 +119,14 @@
            if (Cools.isEmpty(staDesc)) {
                throw new CoolException("出库路径不存在");
            }
            int rok;
            if(ioType==103){
                rok=2;
            }else{
                rok=1;
            }
            // 生成工作号
            int workNo = commonService.getWorkNo(DEFAULT_WORK_NO_TYPE);
            int workNo = commonService.getWorkNo(rok);
            // 生成工作档
            WrkMast wrkMast = new WrkMast();
            wrkMast.setWrkNo(workNo);