From 7793636288061290237d59d1db0897bddf6ef469 Mon Sep 17 00:00:00 2001 From: "BF-202309241046\\Administrator" Date: Sun, 10 Dec 2023 08:48:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=8E=B7=E5=8F=96=E6=96=B9?= =?UTF-8?q?=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../aggreg/PublishMaterialService.java | 80 +++++++++---------- 1 file changed, 40 insertions(+), 40 deletions(-) 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()); }