diff --git a/src/main/java/com/spring/modules/part/service/impl/BomManagementServiceImpl.java b/src/main/java/com/spring/modules/part/service/impl/BomManagementServiceImpl.java index 6c82c946..ee59c63e 100644 --- a/src/main/java/com/spring/modules/part/service/impl/BomManagementServiceImpl.java +++ b/src/main/java/com/spring/modules/part/service/impl/BomManagementServiceImpl.java @@ -121,11 +121,10 @@ public class BomManagementServiceImpl extends ServiceImpl().eq("site", data.getSite()).eq("part_no", data.getPartNo()).eq("eng_chg_level", data.getEngChgLevel()).eq("bom_type", data.getBomType())); // 判断是否为正式的bomHeader if ("Y".equals(bomHeader.getOfficialFlag())) { - // 同步ifs + Server srv = getIfsServer(data.getUpdateBy()); BomIfsHeader bomIfsHeader = new BomIfsHeader(); bomIfsHeader.setContract(data.getSite()); bomIfsHeader.setPartNo(data.getPartNo()); diff --git a/src/main/java/com/spring/modules/part/service/impl/RecipeManagementServiceImpl.java b/src/main/java/com/spring/modules/part/service/impl/RecipeManagementServiceImpl.java index 372ae375..0be87636 100644 --- a/src/main/java/com/spring/modules/part/service/impl/RecipeManagementServiceImpl.java +++ b/src/main/java/com/spring/modules/part/service/impl/RecipeManagementServiceImpl.java @@ -134,7 +134,7 @@ public class RecipeManagementServiceImpl extends ServiceImpl updateRecipeHeaderResponse = recipeServiceBean.modifyRecipeHeader(srv, recipeIfsHeader); + if (!"200".equals(updateRecipeHeaderResponse.get("resultCode"))) { + throw new RuntimeException("ifs RecipeHeader修改异常:" + updateRecipeHeaderResponse.get("resultMsg")); } } } @@ -166,12 +165,11 @@ public class RecipeManagementServiceImpl extends ServiceImpl().eq("site", data.getSite()).eq("part_no", data.getPartNo()).eq("eng_chg_level", data.getEngChgLevel()).eq("bom_type", data.getBomType())); // 判断是否为正式的recipeHeader if ("Y".equals(recipeHeader.getOfficialFlag())) { - // 同步ifs + Server srv = getIfsServer(data.getUpdateBy()); RecipeIfsHeader recipeIfsHeader = new RecipeIfsHeader(); recipeIfsHeader.setContract(data.getSite()); recipeIfsHeader.setPartNo(data.getPartNo()); @@ -180,10 +178,9 @@ public class RecipeManagementServiceImpl extends ServiceImpl updateRecipeHeaderResponse = recipeServiceBean.modifyRecipeHeader(srv, recipeIfsHeader); + if (!"200".equals(updateRecipeHeaderResponse.get("resultCode"))) { + throw new RuntimeException("ifs RecipeHeader修改异常:" + updateRecipeHeaderResponse.get("resultMsg")); } } } @@ -580,7 +577,7 @@ public class RecipeManagementServiceImpl extends ServiceImpl buildRecipeDetailResponse = recipeServiceBean.buildRecipeAlternative(srv, recipeIfsDetail); + if (!"200".equals(buildRecipeDetailResponse.get("resultCode"))) { + throw new RuntimeException("ifs RecipeAlternative Build异常:" + buildRecipeDetailResponse.get("resultMsg")); } } else if ("Obsolete".equals(data.getStatus())) { // 状态修改为Obsolete - String retireRecipeDetailURL = apiUrl + "/recipe/ifs/retireRecipeAlternativeToIfs"; - ResponseData retireRecipeDetailResponse = HttpClientUtil.doPostByRawWithPLM(retireRecipeDetailURL, recipeIfsDetail); - if (!"200".equals(retireRecipeDetailResponse.getCode())) { - throw new RuntimeException("ifs RecipeAlternative Retire异常:" + retireRecipeDetailResponse.getMsg()); + Map retireRecipeDetailResponse = recipeServiceBean.retireRecipeAlternative(srv, recipeIfsDetail); + if (!"200".equals(retireRecipeDetailResponse.get("resultCode"))) { + throw new RuntimeException("ifs RecipeAlternative Retire异常:" + retireRecipeDetailResponse.get("resultMsg")); } } }