| | |
| | | .eq("pack_status", 5) |
| | | .eq("freeze",0)); |
| | | Integer ioType = 101; //入出库类型 |
| | | //静置完成出库站104 |
| | | //静置完成出库站103 |
| | | for(LocMast locMast : locMasts){ |
| | | LocDetl locDetl=locDetlService.selectOne(new EntityWrapper<LocDetl>().eq("loc_no",locMast.getLocNo())); |
| | | Mat mat = matService.selectByMatnr(locDetl.getMatnr()); |
| | | if (Cools.isEmpty(locDetl)){ |
| | | if (Cools.isEmpty(locDetl) || Cools.isEmpty(locDetl.getMatnr())){ |
| | | log.error("库位:"+locMast.getLocNo()+"没有明细"); |
| | | } else if (Cools.isEmpty(locDetl.getDeadWarn())){ |
| | | log.error("库位:"+locMast.getLocNo()+"没有静置时间"); |
| | | continue; |
| | | } |
| | | Mat mat = matService.selectByMatnr(locDetl.getMatnr()); |
| | | if (Cools.isEmpty(mat)){ |
| | | log.error("库位:"+locMast.getLocNo()+"商品所属商品档案为空"); |
| | | }else if (Cools.isEmpty(mat.getDeadWarn())){ |
| | | log.error("pack:"+mat.getMatnr()+"没有静置时间"); |
| | | } else if (Cools.isEmpty(locMast.getModiTime())){ |
| | | log.error("库位:"+locMast.getLocNo()+"modiTime为空"); |
| | | } else if (Cools.isEmpty(locMast.getBarcode())){ |
| | | log.error("库位:"+locMast.getLocNo()+"Pack码为空"); |
| | | } else if (Cools.isEmpty(mat)){ |
| | | log.error("库位:"+locMast.getLocNo()+"商品所属商品档案为空"); |
| | | } else if (now.getTime()-locMast.getModiTime().getTime() >= mat.getDeadWarn()*60*1000){ |
| | | }else if (now.getTime()-locMast.getModiTime().getTime() >= mat.getDeadWarn()*60*1000){ |
| | | // 生成工作号 |
| | | int workNo = commonService.getWorkNo(WorkNoType.getWorkNoType(ioType)); |
| | | // 生成工作档 |
| | |
| | | }else { |
| | | wrkMast.setSourceStaNo(210); // 源站 |
| | | } |
| | | wrkMast.setStaNo(104); // 目标站 |
| | | wrkMast.setStaNo(103); // 目标站 |
| | | wrkMast.setSourceLocNo(locMast.getLocNo()); // 源库位 |
| | | wrkMast.setFullPlt("Y"); // 满板:Y |
| | | wrkMast.setPicking("N"); // 拣料 |
| | |
| | | locMast.setLocSts("R"); |
| | | locMast.setModiTime(now); |
| | | locMast.setPackStatus(6); //6:静置完成 |
| | | |
| | | CombParam combParam = new CombParam(); |
| | | combParam.setPackNo(locMast.getBarcode()); |
| | | combParam.setPackNo(mat.getMatnr()); |
| | | combParam.setLocNo(locMast.getLocNo()); |
| | | combParam.setPackSts(6); |
| | | combParam.setStepSts(1); |
| | | combParam.setPackSts(1); |
| | | combParam.setStepSts(6); |
| | | combParam.setRequestTime(DateUtils.convert(new Date())); |
| | | new PostMesDataUtils().postMesData("MES系统",mesUrl,inpath,combParam); |
| | | |