自动化立体仓库 - WMS系统
野心家
3 天以前 9ac70efe81c1909d63b89f9b18c4f367c0584ceb
src/main/java/com/zy/asrs/task/handler/WorkMastHandler.java
@@ -208,7 +208,7 @@
                        }
                        combParam.setRequestTime(DateUtils.convert(now));
                        new PostMesDataUtils().postMesData("MES系统",mesUrl,inpath,combParam);
//                        new PostMesDataUtils().postMesData("MES系统",mesUrl,inpath,combParam);
                        if (!locMastService.updateById(locMast)) {
//                            exceptionHandle("全板入库 ===>> 修改库位状态失败;[workNo={0}],[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo());
                            TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
@@ -369,8 +369,6 @@
                    locMast.setModiTime(now);
                    LocDetl locDetl = locDetlService.selectOne(new EntityWrapper<LocDetl>().eq("loc_no", locMast.getLocNo()));
                    boolean sign =false;
                    if (locMast.getLocType1().equals(sourceLoc.getLocType1())){
                        locMast.setPackStatus(packStatus);
@@ -400,67 +398,33 @@
                        //测试库位转静置库位和NG库位
                        if (locMast.getLocType1().equals((short)4)){
                            locMast.setPackStatus(4); //4:NG
                            //入库标记
                            packQualifiedService.insertPackQualified(true,new Date(),locDetl.getMatnr());
                            //出库标记
                            packQualifiedService.insertPackQualified(false,new Date(),locDetl.getMatnr());
//                            //入库标记
//                            packQualifiedService.insertPackQualified(true,new Date(),locDetl.getMatnr());
//                            //出库标记
//                            packQualifiedService.insertPackQualified(false,new Date(),locDetl.getMatnr());
                        }else {
                            locMast.setPackStatus(5); //5:静置中
                            //入库标记
                            packQualifiedService.insertPackQualified(true,new Date(),locDetl.getMatnr());
                            //出库标记
                            packQualifiedService.insertPackQualified(false,new Date(),locDetl.getMatnr());
//                            //入库标记
//                            packQualifiedService.insertPackQualified(true,new Date(),locDetl.getMatnr());
//                            //出库标记
//                            packQualifiedService.insertPackQualified(false,new Date(),locDetl.getMatnr());
                        }
                        sign=true;
                            TestMast testMast = testMastService.selectOne(new EntityWrapper<TestMast>()
                                    .eq("loc_no",sourceLoc.getLocNo())
                                    .eq("barcode",locDetl.getMatnr())
                                    .eq("status",4)
                                    .in("status",3,4)
                            );
                            testMast.setStatus(5);
                            testMast.setLocNo(locMast.getLocNo());
                            testMast.setModiTime(new Date());
                            if (!testMastService.update(testMast,new EntityWrapper<TestMast>()
                                    .eq("loc_no",sourceLoc.getLocNo())
                                    .eq("barcode",locDetl.getMatnr())
                                    .eq("status",4))){
                            if (!testMastService.updateById(testMast)){
                                throw new CoolException("更改测试状态失败");
                            }
                    }
                    if (!locMastService.updateById(locMast)) {
//                        exceptionHandle("库位移转 ===>> 修改目标库位状态失败;[workNo={0}],[locNo={1}]", wrkMast.getWrkNo(), wrkMast.getLocNo());
                        TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
                        return FAIL.setMsg("库位移转 ===>> 修改目标库位状态失败; [workNo=" + wrkMast.getWrkNo() + "],[locNo=" + wrkMast.getLocNo() + "]");
                    }
                    if (locMast.getCrnNo()==1 && sign){
                        //7.测试库位转静置库位出库完成上报
                        CombParam combParam = new CombParam();
                        combParam.setPackNo(locDetl.getMatnr());
                        combParam.setLocNo(wrkMast.getSourceLocNo());
                        combParam.setStepSts(7);
                        if (locMast.getPackStatus()==4){
                            combParam.setPackSts(2);
                        }else if (locMast.getPackStatus()==5){
                            combParam.setPackSts(1);
                        }
                        combParam.setRequestTime(DateUtils.convert(now));
                        new PostMesDataUtils().postMesData("MES系统",mesUrl,inpath,combParam);
                        //5.测试库位转静置库位入库完成上报
                        combParam.setPackNo(locDetl.getMatnr());
                        combParam.setLocNo(wrkMast.getLocNo());
                        if (locMast.getPackStatus()==4){
                            combParam.setPackSts(2);
                            combParam.setStepSts(5);
                        }else if (locMast.getPackStatus()==5){
                            combParam.setPackSts(1);
                            combParam.setStepSts(8);
                        }else {
                            combParam.setPackSts(0);
                        }
                        combParam.setRequestTime(DateUtils.convert(now));
                        new PostMesDataUtils().postMesData("MES系统",mesUrl,inpath,combParam);
                    }
                    break;
                default:
@@ -570,7 +534,7 @@
                                combParam.setStepSts(6);//静置库出库完成
                            }
                            combParam.setRequestTime(DateUtils.convert(now));
                            new PostMesDataUtils().postMesData("MES系统",mesUrl,inpath,combParam);
//                            new PostMesDataUtils().postMesData("MES系统",mesUrl,inpath,combParam);
                        }
                    }
                    break;