diff --git a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/aggreg/PublishMaterialService.java b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/aggreg/PublishMaterialService.java index 35a2240d..3a7f707b 100644 --- a/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/aggreg/PublishMaterialService.java +++ b/nflg_project_dev/nflg-bom-new/src/main/java/com/nflg/product/bomnew/service/aggreg/PublishMaterialService.java @@ -141,14 +141,14 @@ public class PublishMaterialService { try { String data = materialService.addMaterial("", sendPack.getMaterialName(), OptionalBomConstant.PublishMaterialEnum.OTHER.getCategory()); - ResultVO resultVO = JSON.parseObject(data, new com.alibaba.fastjson.TypeReference>(){}); - if (resultVO == null) { - throw new NflgBusinessException(STATE.Error, "机型发货物料编码申请失败,联系管理员," + data); - } - if (!Objects.equal(resultVO.getState(), STATE.Success.getState())) { - throw new NflgBusinessException(STATE.Error, resultVO.getMsg()); - } - sendPack.setMaterialNo(resultVO.getData()); +// ResultVO resultVO = JSON.parseObject(data, new com.alibaba.fastjson.TypeReference>(){}); +// if (resultVO == null) { +// throw new NflgBusinessException(STATE.Error, "机型发货物料编码申请失败,联系管理员," + data); +// } +// if (!Objects.equal(resultVO.getState(), STATE.Success.getState())) { +// throw new NflgBusinessException(STATE.Error, resultVO.getMsg()); +// } + sendPack.setMaterialNo(data); } catch (Exception e) { throw new NflgBusinessException(STATE.Error, "机型发货物料编码申请失败," + e.getMessage()); } @@ -172,14 +172,14 @@ public class PublishMaterialService { try { String data = materialService.addMaterial("", makePack.getMaterialName(), OptionalBomConstant.PublishMaterialEnum.OTHER.getCategory()); - ResultVO resultVO = JSON.parseObject(data, new com.alibaba.fastjson.TypeReference>(){}); - if (resultVO == null) { - throw new NflgBusinessException(STATE.Error, "机型制作物料编码申请失败,联系管理员," + data); - } - if (!Objects.equal(resultVO.getState(), STATE.Success.getState())) { - throw new NflgBusinessException(STATE.Error, resultVO.getMsg()); - } - makePack.setMaterialNo(resultVO.getData()); +// ResultVO resultVO = JSON.parseObject(data, new com.alibaba.fastjson.TypeReference>(){}); +// if (resultVO == null) { +// throw new NflgBusinessException(STATE.Error, "机型制作物料编码申请失败,联系管理员," + data); +// } +// if (!Objects.equal(resultVO.getState(), STATE.Success.getState())) { +// throw new NflgBusinessException(STATE.Error, resultVO.getMsg()); +// } + makePack.setMaterialNo(data); } catch (Exception e) { throw new NflgBusinessException(STATE.Error, "机型制作物料编码申请失败," + e.getMessage()); } @@ -241,14 +241,14 @@ public class PublishMaterialService { try { String data = materialService.addMaterial(material.getDrawingNo(), material.getMaterialName(), OptionalBomConstant.PublishMaterialEnum.MACHINE.getCategory()); - ResultVO resultVO = JSON.parseObject(data, new com.alibaba.fastjson.TypeReference>(){}); - if (resultVO == null) { - throw new NflgBusinessException(STATE.Error, "机械部分物料编码申请失败,联系管理员," + data); - } - if (!Objects.equal(resultVO.getState(), STATE.Success.getState())) { - throw new NflgBusinessException(STATE.Error, resultVO.getMsg()); - } - material.setMaterialNo(resultVO.getData()); +// ResultVO resultVO = JSON.parseObject(data, new com.alibaba.fastjson.TypeReference>(){}); +// if (resultVO == null) { +// throw new NflgBusinessException(STATE.Error, "机械部分物料编码申请失败,联系管理员," + data); +// } +// if (!Objects.equal(resultVO.getState(), STATE.Success.getState())) { +// throw new NflgBusinessException(STATE.Error, resultVO.getMsg()); +// } + material.setMaterialNo(data); } catch (Exception e) { throw new NflgBusinessException(STATE.Error, "机械部分物料编码申请失败," + e.getMessage()); } @@ -331,14 +331,14 @@ public class PublishMaterialService { try { String data = materialService.addMaterial("", makePack.getMaterialName(), OptionalBomConstant.PublishMaterialEnum.OTHER.getCategory()); - ResultVO resultVO = JSON.parseObject(data, new com.alibaba.fastjson.TypeReference>(){}); - if (resultVO == null) { - throw new NflgBusinessException(STATE.Error, "电控制作物料编码申请失败,联系管理员," + data); - } - if (!Objects.equal(resultVO.getState(), STATE.Success.getState())) { - throw new NflgBusinessException(STATE.Error, resultVO.getMsg()); - } - makePack.setMaterialNo(resultVO.getData()); +// ResultVO resultVO = JSON.parseObject(data, new com.alibaba.fastjson.TypeReference>(){}); +// if (resultVO == null) { +// throw new NflgBusinessException(STATE.Error, "电控制作物料编码申请失败,联系管理员," + data); +// } +// if (!Objects.equal(resultVO.getState(), STATE.Success.getState())) { +// throw new NflgBusinessException(STATE.Error, resultVO.getMsg()); +// } + makePack.setMaterialNo(data); } catch (Exception e) { throw new NflgBusinessException(STATE.Error, "电控制作物料编码申请失败," + e.getMessage()); } @@ -361,14 +361,14 @@ public class PublishMaterialService { sendPack.setMaterialNo("");//申请物料号 try { String data = materialService.addMaterial("", sendPack.getMaterialName(), OptionalBomConstant.PublishMaterialEnum.OTHER.getCategory()); - ResultVO resultVO = JSON.parseObject(data, new com.alibaba.fastjson.TypeReference>(){}); - if (resultVO == null) { - throw new NflgBusinessException(STATE.Error, "电控发货物料编码申请失败,联系管理员," + data); - } - if (!Objects.equal(resultVO.getState(), STATE.Success.getState())) { - throw new NflgBusinessException(STATE.Error, resultVO.getMsg()); - } - sendPack.setMaterialNo(resultVO.getData()); +// ResultVO resultVO = JSON.parseObject(data, new com.alibaba.fastjson.TypeReference>(){}); +// if (resultVO == null) { +// throw new NflgBusinessException(STATE.Error, "电控发货物料编码申请失败,联系管理员," + data); +// } +// if (!Objects.equal(resultVO.getState(), STATE.Success.getState())) { +// throw new NflgBusinessException(STATE.Error, resultVO.getMsg()); +// } + sendPack.setMaterialNo(data); } catch (Exception e) { throw new NflgBusinessException(STATE.Error, "电控发货物料编码申请失败," + e.getMessage()); }