调整获取方法
This commit is contained in:
parent
b605864b08
commit
7793636288
|
|
@ -141,14 +141,14 @@ public class PublishMaterialService {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
String data = materialService.addMaterial("", sendPack.getMaterialName(), OptionalBomConstant.PublishMaterialEnum.OTHER.getCategory());
|
String data = materialService.addMaterial("", sendPack.getMaterialName(), OptionalBomConstant.PublishMaterialEnum.OTHER.getCategory());
|
||||||
ResultVO<String> resultVO = JSON.parseObject(data, new com.alibaba.fastjson.TypeReference<ResultVO<String>>(){});
|
// ResultVO<String> resultVO = JSON.parseObject(data, new com.alibaba.fastjson.TypeReference<ResultVO<String>>(){});
|
||||||
if (resultVO == null) {
|
// if (resultVO == null) {
|
||||||
throw new NflgBusinessException(STATE.Error, "机型发货物料编码申请失败,联系管理员," + data);
|
// throw new NflgBusinessException(STATE.Error, "机型发货物料编码申请失败,联系管理员," + data);
|
||||||
}
|
// }
|
||||||
if (!Objects.equal(resultVO.getState(), STATE.Success.getState())) {
|
// if (!Objects.equal(resultVO.getState(), STATE.Success.getState())) {
|
||||||
throw new NflgBusinessException(STATE.Error, resultVO.getMsg());
|
// throw new NflgBusinessException(STATE.Error, resultVO.getMsg());
|
||||||
}
|
// }
|
||||||
sendPack.setMaterialNo(resultVO.getData());
|
sendPack.setMaterialNo(data);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new NflgBusinessException(STATE.Error, "机型发货物料编码申请失败," + e.getMessage());
|
throw new NflgBusinessException(STATE.Error, "机型发货物料编码申请失败," + e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
@ -172,14 +172,14 @@ public class PublishMaterialService {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
String data = materialService.addMaterial("", makePack.getMaterialName(), OptionalBomConstant.PublishMaterialEnum.OTHER.getCategory());
|
String data = materialService.addMaterial("", makePack.getMaterialName(), OptionalBomConstant.PublishMaterialEnum.OTHER.getCategory());
|
||||||
ResultVO<String> resultVO = JSON.parseObject(data, new com.alibaba.fastjson.TypeReference<ResultVO<String>>(){});
|
// ResultVO<String> resultVO = JSON.parseObject(data, new com.alibaba.fastjson.TypeReference<ResultVO<String>>(){});
|
||||||
if (resultVO == null) {
|
// if (resultVO == null) {
|
||||||
throw new NflgBusinessException(STATE.Error, "机型制作物料编码申请失败,联系管理员," + data);
|
// throw new NflgBusinessException(STATE.Error, "机型制作物料编码申请失败,联系管理员," + data);
|
||||||
}
|
// }
|
||||||
if (!Objects.equal(resultVO.getState(), STATE.Success.getState())) {
|
// if (!Objects.equal(resultVO.getState(), STATE.Success.getState())) {
|
||||||
throw new NflgBusinessException(STATE.Error, resultVO.getMsg());
|
// throw new NflgBusinessException(STATE.Error, resultVO.getMsg());
|
||||||
}
|
// }
|
||||||
makePack.setMaterialNo(resultVO.getData());
|
makePack.setMaterialNo(data);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new NflgBusinessException(STATE.Error, "机型制作物料编码申请失败," + e.getMessage());
|
throw new NflgBusinessException(STATE.Error, "机型制作物料编码申请失败," + e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
@ -241,14 +241,14 @@ public class PublishMaterialService {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
String data = materialService.addMaterial(material.getDrawingNo(), material.getMaterialName(), OptionalBomConstant.PublishMaterialEnum.MACHINE.getCategory());
|
String data = materialService.addMaterial(material.getDrawingNo(), material.getMaterialName(), OptionalBomConstant.PublishMaterialEnum.MACHINE.getCategory());
|
||||||
ResultVO<String> resultVO = JSON.parseObject(data, new com.alibaba.fastjson.TypeReference<ResultVO<String>>(){});
|
// ResultVO<String> resultVO = JSON.parseObject(data, new com.alibaba.fastjson.TypeReference<ResultVO<String>>(){});
|
||||||
if (resultVO == null) {
|
// if (resultVO == null) {
|
||||||
throw new NflgBusinessException(STATE.Error, "机械部分物料编码申请失败,联系管理员," + data);
|
// throw new NflgBusinessException(STATE.Error, "机械部分物料编码申请失败,联系管理员," + data);
|
||||||
}
|
// }
|
||||||
if (!Objects.equal(resultVO.getState(), STATE.Success.getState())) {
|
// if (!Objects.equal(resultVO.getState(), STATE.Success.getState())) {
|
||||||
throw new NflgBusinessException(STATE.Error, resultVO.getMsg());
|
// throw new NflgBusinessException(STATE.Error, resultVO.getMsg());
|
||||||
}
|
// }
|
||||||
material.setMaterialNo(resultVO.getData());
|
material.setMaterialNo(data);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new NflgBusinessException(STATE.Error, "机械部分物料编码申请失败," + e.getMessage());
|
throw new NflgBusinessException(STATE.Error, "机械部分物料编码申请失败," + e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
@ -331,14 +331,14 @@ public class PublishMaterialService {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
String data = materialService.addMaterial("", makePack.getMaterialName(), OptionalBomConstant.PublishMaterialEnum.OTHER.getCategory());
|
String data = materialService.addMaterial("", makePack.getMaterialName(), OptionalBomConstant.PublishMaterialEnum.OTHER.getCategory());
|
||||||
ResultVO<String> resultVO = JSON.parseObject(data, new com.alibaba.fastjson.TypeReference<ResultVO<String>>(){});
|
// ResultVO<String> resultVO = JSON.parseObject(data, new com.alibaba.fastjson.TypeReference<ResultVO<String>>(){});
|
||||||
if (resultVO == null) {
|
// if (resultVO == null) {
|
||||||
throw new NflgBusinessException(STATE.Error, "电控制作物料编码申请失败,联系管理员," + data);
|
// throw new NflgBusinessException(STATE.Error, "电控制作物料编码申请失败,联系管理员," + data);
|
||||||
}
|
// }
|
||||||
if (!Objects.equal(resultVO.getState(), STATE.Success.getState())) {
|
// if (!Objects.equal(resultVO.getState(), STATE.Success.getState())) {
|
||||||
throw new NflgBusinessException(STATE.Error, resultVO.getMsg());
|
// throw new NflgBusinessException(STATE.Error, resultVO.getMsg());
|
||||||
}
|
// }
|
||||||
makePack.setMaterialNo(resultVO.getData());
|
makePack.setMaterialNo(data);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new NflgBusinessException(STATE.Error, "电控制作物料编码申请失败," + e.getMessage());
|
throw new NflgBusinessException(STATE.Error, "电控制作物料编码申请失败," + e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
@ -361,14 +361,14 @@ public class PublishMaterialService {
|
||||||
sendPack.setMaterialNo("");//申请物料号
|
sendPack.setMaterialNo("");//申请物料号
|
||||||
try {
|
try {
|
||||||
String data = materialService.addMaterial("", sendPack.getMaterialName(), OptionalBomConstant.PublishMaterialEnum.OTHER.getCategory());
|
String data = materialService.addMaterial("", sendPack.getMaterialName(), OptionalBomConstant.PublishMaterialEnum.OTHER.getCategory());
|
||||||
ResultVO<String> resultVO = JSON.parseObject(data, new com.alibaba.fastjson.TypeReference<ResultVO<String>>(){});
|
// ResultVO<String> resultVO = JSON.parseObject(data, new com.alibaba.fastjson.TypeReference<ResultVO<String>>(){});
|
||||||
if (resultVO == null) {
|
// if (resultVO == null) {
|
||||||
throw new NflgBusinessException(STATE.Error, "电控发货物料编码申请失败,联系管理员," + data);
|
// throw new NflgBusinessException(STATE.Error, "电控发货物料编码申请失败,联系管理员," + data);
|
||||||
}
|
// }
|
||||||
if (!Objects.equal(resultVO.getState(), STATE.Success.getState())) {
|
// if (!Objects.equal(resultVO.getState(), STATE.Success.getState())) {
|
||||||
throw new NflgBusinessException(STATE.Error, resultVO.getMsg());
|
// throw new NflgBusinessException(STATE.Error, resultVO.getMsg());
|
||||||
}
|
// }
|
||||||
sendPack.setMaterialNo(resultVO.getData());
|
sendPack.setMaterialNo(data);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new NflgBusinessException(STATE.Error, "电控发货物料编码申请失败," + e.getMessage());
|
throw new NflgBusinessException(STATE.Error, "电控发货物料编码申请失败," + e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue