自动化立体仓库 - WMS系统
#
lsh
2023-05-20 4922157a14d005f4b86e79f3ade1abc38fc0f0ee
src/main/java/com/zy/asrs/task/handler/MoveLocHandler.java
@@ -68,9 +68,10 @@
            );
            if (!Cools.isEmpty(locMasts)){
                for (LocMast locMast:locMasts){
                    LocDetl locDetl = locDetlService.selectOne(new EntityWrapper<LocDetl>().eq("loc_no", locMast.getLocNo()));
                    TestMast testMast = testMastService.selectOne(new EntityWrapper<TestMast>()
                            .eq("loc_no",locMast.getLocNo())
                            .eq("barcode",locMast.getBarcode())
                            .eq("barcode",locDetl.getMatnr())
                            .eq("status",4)
                    );
                    if (!Cools.isEmpty(testMast)){
@@ -84,7 +85,7 @@
                                workService.locMove(locMast.getLocNo(),targetLocNo.getLocNo(),(long)Integer.parseInt(testMast.getUserId()));
                                //4.测试完成上报
                                CombParam combParam = new CombParam();
                                combParam.setPackNo(locMast.getBarcode());
                                combParam.setPackNo(locDetl.getMatnr());
                                combParam.setLocNo(locMast.getLocNo());
                                combParam.setPackSts(2);
                                combParam.setStepSts(4);
@@ -119,11 +120,13 @@
            );
            if (!Cools.isEmpty(locMasts2)){
                for (LocMast locMast:locMasts2){
                    LocDetl locDetl = locDetlService.selectOne(new EntityWrapper<LocDetl>().eq("loc_no", locMast.getLocNo()));
                    TestMast testMast = testMastService.selectOne(new EntityWrapper<TestMast>()
                            .eq("loc_no",locMast.getLocNo())
                            .eq("barcode",locMast.getBarcode())
                            .eq("barcode",locDetl.getMatnr())
                            .eq("status",4)
                    );
                    boolean sign=false;
                    if (!Cools.isEmpty(testMast)){
                        if (testMast.getStatus()==4){
                            //移库开始,查询目标库位
@@ -134,15 +137,7 @@
                            if (targetLocNo != null){
                                //生成出库任务
                                if (outLoc(locMast)){
                                    //4.测试完成上报
                                    CombParam combParam = new CombParam();
                                    combParam.setPackNo(locMast.getBarcode());
                                    combParam.setLocNo(locMast.getLocNo());
                                    combParam.setPackSts(1);
                                    combParam.setStepSts(4);
                                    combParam.setRequestTime(DateUtils.convert(new Date()));
                                    new PostMesDataUtils().postMesData("MES系统",mesUrl,inpath,combParam);
                                    return SUCCESS;
                                    sign=true;
                                }
                            }else {
                                //3\4排满  向2排移库,查询目标库位
@@ -152,15 +147,7 @@
                                }
                                if (targetLocNo != null){
                                    workService.locMove(locMast.getLocNo(),targetLocNo.getLocNo(),(long)Integer.parseInt(testMast.getUserId()));
                                    //4.测试完成上报
                                    CombParam combParam = new CombParam();
                                    combParam.setPackNo(locMast.getBarcode());
                                    combParam.setLocNo(locMast.getLocNo());
                                    combParam.setPackSts(1);
                                    combParam.setStepSts(4);
                                    combParam.setRequestTime(DateUtils.convert(new Date()));
                                    new PostMesDataUtils().postMesData("MES系统",mesUrl,inpath,combParam);
                                    return SUCCESS;
                                    sign=true;
                                }else {
                                    log.error("测试完成自动移库--->没有空库位!");
                                }
@@ -168,8 +155,20 @@
                        }else if (testMast.getStatus()!=4) {
                            log.error("测试状态异常,库位号为:" + testMast.getLocNo());
                        }
                    }else {
                        log.error("测试库位:"+locMast.getLocNo()+"所属测试档为空或者不状态为4");
                    }
                    if (sign){
                        //4.测试完成上报
                        CombParam combParam = new CombParam();
                        combParam.setPackNo(locDetl.getMatnr());
                        combParam.setLocNo(locMast.getLocNo());
                        combParam.setPackSts(1);
                        combParam.setStepSts(4);
                        combParam.setRequestTime(DateUtils.convert(new Date()));
                        new PostMesDataUtils().postMesData("MES系统",mesUrl,inpath,combParam);
                        return SUCCESS;
                    }
                }
            }
@@ -218,7 +217,7 @@
            } else if (Cools.isEmpty(locMast.getModiTime())){
                log.error("库位:"+locMast.getLocNo()+"modiTime为空");
            } else if (Cools.isEmpty(locMast.getBarcode())){
                log.error("库位:"+locMast.getLocNo()+"Pack码为空");
                log.error("库位:"+locMast.getLocNo()+"托盘码为空");
            } else {
                // 生成工作号
                int workNo = commonService.getWorkNo(WorkNoType.getWorkNoType(ioType));
@@ -264,7 +263,7 @@
//                    locMast.setPackStatus(5); //5:开始静置
                    CombParam combParam = new CombParam();
                    combParam.setPackNo(locMast.getBarcode());
                    combParam.setPackNo(wrkDetl.getMatnr());
                    combParam.setLocNo(locMast.getLocNo());
                    combParam.setPackSts(locMast.getPackStatus());
                    combParam.setRequestTime(DateUtils.convert(new Date()));