diff --git a/src/main/java/com/spring/ifs/bean/BomServiceBean.java b/src/main/java/com/spring/ifs/bean/BomServiceBean.java index 487e3ca9..9a605081 100644 --- a/src/main/java/com/spring/ifs/bean/BomServiceBean.java +++ b/src/main/java/com/spring/ifs/bean/BomServiceBean.java @@ -54,7 +54,7 @@ public class BomServiceBean { Map bomMap = BomApi.getBomHeader(srv, contract, partNo, engChgLevel, bomType); //判断是否需要插入到ifs if(bomMap == null || bomMap.size() == 0) { - throw new RuntimeException("Bom不存在!"); + throw new APException("Bom不存在!"); } //设置ifs 信息 inData.setIfsRowId(bomMap.get("IFSROWID")); diff --git a/src/main/java/com/spring/ifs/bean/InventoryServiceBean.java b/src/main/java/com/spring/ifs/bean/InventoryServiceBean.java index 73a57376..6914edb9 100644 --- a/src/main/java/com/spring/ifs/bean/InventoryServiceBean.java +++ b/src/main/java/com/spring/ifs/bean/InventoryServiceBean.java @@ -742,18 +742,13 @@ public class InventoryServiceBean { searchData.setPartNo(partNo); Map masterPartMap = null; //调用api方法获取事件的编码 - try { - masterPartMap = MasterPartApi.getMasterPart(srv, partNo); - } catch (APException e) { - throw new RuntimeException(e.getMessage()); - } - if (masterPartMap == null || masterPartMap.size() == 0) { - masterPartFlag = true; - }else { - masterPartFlag = false; - - } try{ + masterPartMap = MasterPartApi.getMasterPart(srv, partNo); + if (masterPartMap == null || masterPartMap.size() == 0) { + masterPartFlag = true; + }else { + masterPartFlag = false; + } //调用api方法获取事件的编码 Map resultMap = InventoryPartApi.getCopyPartEventNo(srv); String eventNo = resultMap.get("EVENT_NO"); diff --git a/src/main/java/com/spring/ifs/bean/RecipeServiceBean.java b/src/main/java/com/spring/ifs/bean/RecipeServiceBean.java index cc6f241b..ed5e58d5 100644 --- a/src/main/java/com/spring/ifs/bean/RecipeServiceBean.java +++ b/src/main/java/com/spring/ifs/bean/RecipeServiceBean.java @@ -52,7 +52,7 @@ public class RecipeServiceBean { Map RecipeMap = RecipeApi.getRecipeHeader(srv, contract, partNo, engChgLevel, bomType); //判断是否需要插入到ifs if(RecipeMap == null || RecipeMap.isEmpty()) { - throw new RuntimeException("Recipe不存在!"); + throw new APException("Recipe不存在!"); } //设置ifs 信息 inData.setIfsRowId(RecipeMap.get("IFSROWID")); diff --git a/src/main/java/com/spring/ifs/bean/RecipeServiceBeanTest.java b/src/main/java/com/spring/ifs/bean/RecipeServiceBeanTest.java index 8d59e019..a2ac6f7f 100644 --- a/src/main/java/com/spring/ifs/bean/RecipeServiceBeanTest.java +++ b/src/main/java/com/spring/ifs/bean/RecipeServiceBeanTest.java @@ -57,7 +57,7 @@ public class RecipeServiceBeanTest { Map RecipeMap = RecipeApi.getRecipeHeader(srv, contract, partNo, engChgLevel, bomType); //判断是否需要插入到ifs if(RecipeMap == null || RecipeMap.size() == 0) { - throw new RuntimeException("Recipe不存在!"); + throw new APException("Recipe不存在!"); } //设置ifs 信息 inData.setIfsRowId(RecipeMap.get("IFSROWID"));