| | |
| | | |
| | | @Value("${mes.inPath}") |
| | | private String inpath; |
| | | @Value("${mes.url}") |
| | | private String mesUrl; |
| | | |
| | | @Override |
| | | @Transactional |
| | |
| | | throw new CoolException("重复申请" + param.getPackNo()); |
| | | } |
| | | |
| | | // 生成入库通知档 |
| | | // Mat mat = matService.selectByMatnr(param.getPackName()); |
| | | // if (Cools.isEmpty(mat)) { |
| | | // 生成入库通知档 |
| | | Mat mat = matService.selectByMatnr(param.getPackName()); |
| | | if (Cools.isEmpty(mat)) { |
| | | Tag tag = tagService.selectByName("全部", 1); |
| | | Mat matNew = new Mat(); |
| | | matNew.setTagId(tag.getId()); |
| | | matNew.setMatnr(param.getPackName()); |
| | | matNew.setMaktx(param.getPackName()); |
| | | matNew.setDeadWarn(mat.getDeadWarn()); |
| | | matNew.setCreateBy(9999L);//9999表示erp下发 |
| | | matNew.setCreateTime(new Date()); |
| | | matNew.setUpdateBy(9999L);//9999表示erp下发 |
| | | matNew.setUpdateTime(new Date()); |
| | | if (!matService.insert(matNew)){ |
| | | throw new CoolException(param.getPackName() + "商品档案自动生成失败"); |
| | | } |
| | | // throw new CoolException(param.getPackName() + "商品档案不存在"); |
| | | // } |
| | | } |
| | | WaitPakin waitPakin = new WaitPakin(); |
| | | // waitPakin.sync(mat); |
| | | waitPakin.setMatnr(param.getPackName()); |
| | |
| | | combParam.setLocNo(locMast.getLocNo()); |
| | | combParam.setPackSts(7); |
| | | combParam.setRequestTime(DateUtils.convert(new Date())); |
| | | new PostMesDataUtils().postMesData(inpath,combParam); |
| | | new PostMesDataUtils().postMesData("MES系统",mesUrl,inpath,combParam); |
| | | |
| | | if (!locMastService.updateById(locMast)) { |
| | | throw new CoolException("预约库位状态失败,库位号:"+locMast.getLocNo()); |
| | |
| | | throw new CoolException("更新测试状态失败"); |
| | | } |
| | | locMast.setPackStatus(2); |
| | | CombParam combParam = new CombParam(); |
| | | combParam.setPackNo(locMast.getBarcode()); |
| | | combParam.setLocNo(locMast.getLocNo()); |
| | | combParam.setPackSts(2); |
| | | combParam.setRequestTime(DateUtils.convert(new Date())); |
| | | new PostMesDataUtils().postMesData(inpath,combParam); |
| | | |
| | | if (!locMastService.update(locMast,new EntityWrapper<LocMast>().eq("loc_no", review.getLocNo()))){ |
| | | |
| | | |
| | | throw new CoolException("更新产品状态失败"); |
| | | } |
| | | } else if (Cools.isEmpty(testMast.getStatus())){ |
| | |
| | | combParam.setLocNo(locMast.getLocNo()); |
| | | combParam.setPackSts(3); |
| | | combParam.setRequestTime(DateUtils.convert(new Date())); |
| | | new PostMesDataUtils().postMesData(inpath,combParam); |
| | | new PostMesDataUtils().postMesData("MES系统",mesUrl,inpath,combParam); |
| | | |
| | | if (!locMastService.update(locMast, new EntityWrapper<LocMast>().eq("loc_no", review.getLocNo()))){ |
| | | throw new CoolException("更改产品状态失败"); |
| | |
| | | combParam.setLocNo(locMast.getLocNo()); |
| | | combParam.setPackSts(4); |
| | | combParam.setRequestTime(DateUtils.convert(new Date())); |
| | | new PostMesDataUtils().postMesData(inpath,combParam); |
| | | new PostMesDataUtils().postMesData("MES系统",mesUrl,inpath,combParam); |
| | | |
| | | if (!locMastService.update(locMast, new EntityWrapper<LocMast>().eq("loc_no", review.getLocNo()))){ |
| | | throw new CoolException("更改产品状态失败"); |