|
|
@ -2811,7 +2811,6 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe |
|
|
recipeDetail.setOfficialFlag("Y"); |
|
|
recipeDetail.setOfficialFlag("Y"); |
|
|
recipeManagementMapper.recipeDetailSave(recipeDetail); |
|
|
recipeManagementMapper.recipeDetailSave(recipeDetail); |
|
|
// 同步数据到 IFS |
|
|
// 同步数据到 IFS |
|
|
if (dataUrl) { |
|
|
|
|
|
RecipeIfsAlternative recipeIfsAlternative = new RecipeIfsAlternative(); |
|
|
RecipeIfsAlternative recipeIfsAlternative = new RecipeIfsAlternative(); |
|
|
recipeIfsAlternative.setContract(recipeDetail.getSite()); |
|
|
recipeIfsAlternative.setContract(recipeDetail.getSite()); |
|
|
recipeIfsAlternative.setPartNo(recipeDetail.getPartNo()); |
|
|
recipeIfsAlternative.setPartNo(recipeDetail.getPartNo()); |
|
|
@ -2823,6 +2822,7 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe |
|
|
recipeIfsAlternative.setDisplayWeightUom(recipeDetail.getDisplayWeightUom()); |
|
|
recipeIfsAlternative.setDisplayWeightUom(recipeDetail.getDisplayWeightUom()); |
|
|
recipeIfsAlternative.setDisplayVolumeUom(recipeDetail.getDisplayVolumeUom()); |
|
|
recipeIfsAlternative.setDisplayVolumeUom(recipeDetail.getDisplayVolumeUom()); |
|
|
recipeIfsAlternative.setRegUnit(recipeDetail.getRegUnit()); |
|
|
recipeIfsAlternative.setRegUnit(recipeDetail.getRegUnit()); |
|
|
|
|
|
if (dataUrl) { |
|
|
Map<String, String> getRecipeDetailResponse = recipeServiceBean.getRecipeAlternative(srv, recipeIfsAlternative); |
|
|
Map<String, String> getRecipeDetailResponse = recipeServiceBean.getRecipeAlternative(srv, recipeIfsAlternative); |
|
|
if (!"200".equals(getRecipeDetailResponse.get("resultCode"))) { // 新增 |
|
|
if (!"200".equals(getRecipeDetailResponse.get("resultCode"))) { // 新增 |
|
|
Map<String, String> addRecipeDetailResponse = recipeServiceBean.syncRecipeAlternative(srv, recipeIfsAlternative); |
|
|
Map<String, String> addRecipeDetailResponse = recipeServiceBean.syncRecipeAlternative(srv, recipeIfsAlternative); |
|
|
@ -2835,6 +2835,7 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe |
|
|
throw new RuntimeException("IFS RecipeAlternative修改异常:" + updateRecipeDetailResponse.get("resultMsg")); |
|
|
throw new RuntimeException("IFS RecipeAlternative修改异常:" + updateRecipeDetailResponse.get("resultMsg")); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
// 创建 IFS 物料 Recipe 的 子物料 |
|
|
// 创建 IFS 物料 Recipe 的 子物料 |
|
|
if (!componentDataList.isEmpty()) { |
|
|
if (!componentDataList.isEmpty()) { |
|
|
List<RecipeComponentVo> ifsRecipeComponentList = componentDataList.stream().map(c -> { |
|
|
List<RecipeComponentVo> ifsRecipeComponentList = componentDataList.stream().map(c -> { |
|
|
@ -2858,6 +2859,20 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (dataUrl) { |
|
|
|
|
|
// 2025-05-27 调用下状态的接口 |
|
|
|
|
|
if ("Buildable".equals(recipeDetail.getStatus())) { // 状态修改为buildable |
|
|
|
|
|
Map<String, String> buildRecipeDetailResponse = recipeServiceBean.buildRecipeAlternative(srv, recipeIfsAlternative); |
|
|
|
|
|
if (!"200".equals(buildRecipeDetailResponse.get("resultCode"))) { |
|
|
|
|
|
throw new RuntimeException("IFS RecipeAlternative Build异常:" + buildRecipeDetailResponse.get("resultMsg")); |
|
|
|
|
|
} |
|
|
|
|
|
} else if ("Obsolete".equals(recipeDetail.getStatus())) { // 状态修改为Obsolete |
|
|
|
|
|
Map<String, String> retireRecipeDetailResponse = recipeServiceBean.retireRecipeAlternative(srv, recipeIfsAlternative); |
|
|
|
|
|
if (!"200".equals(retireRecipeDetailResponse.get("resultCode"))) { |
|
|
|
|
|
throw new RuntimeException("IFS RecipeAlternative Retire异常:" + retireRecipeDetailResponse.get("resultMsg")); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
@ -2873,7 +2888,6 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe |
|
|
bomDetail.setOfficialFlag("Y"); |
|
|
bomDetail.setOfficialFlag("Y"); |
|
|
bomManagementMapper.bomDetailSave(bomDetail); |
|
|
bomManagementMapper.bomDetailSave(bomDetail); |
|
|
// 同步数据到 IFS |
|
|
// 同步数据到 IFS |
|
|
if (dataUrl) { |
|
|
|
|
|
BomIfsAlternative bomIfsAlternative = new BomIfsAlternative(); |
|
|
BomIfsAlternative bomIfsAlternative = new BomIfsAlternative(); |
|
|
bomIfsAlternative.setContract(bomDetail.getSite()); |
|
|
bomIfsAlternative.setContract(bomDetail.getSite()); |
|
|
bomIfsAlternative.setPartNo(bomDetail.getPartNo()); |
|
|
bomIfsAlternative.setPartNo(bomDetail.getPartNo()); |
|
|
@ -2882,6 +2896,7 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe |
|
|
bomIfsAlternative.setAlternativeNo(bomDetail.getAlternativeNo()); |
|
|
bomIfsAlternative.setAlternativeNo(bomDetail.getAlternativeNo()); |
|
|
bomIfsAlternative.setAlternativeDesc(bomDetail.getAlternativeDescription()); |
|
|
bomIfsAlternative.setAlternativeDesc(bomDetail.getAlternativeDescription()); |
|
|
bomIfsAlternative.setNoteText(bomDetail.getDetailNoteText()); |
|
|
bomIfsAlternative.setNoteText(bomDetail.getDetailNoteText()); |
|
|
|
|
|
if (dataUrl) { |
|
|
Map<String, String> getBomDetailResponse = bomServiceBean.getBomAlternative(srv, bomIfsAlternative); |
|
|
Map<String, String> getBomDetailResponse = bomServiceBean.getBomAlternative(srv, bomIfsAlternative); |
|
|
if (!"200".equals(getBomDetailResponse.get("resultCode"))) { // 新增 |
|
|
if (!"200".equals(getBomDetailResponse.get("resultCode"))) { // 新增 |
|
|
Map<String, String> addBomDetailResponse = bomServiceBean.syncBomAlternative(srv, bomIfsAlternative); |
|
|
Map<String, String> addBomDetailResponse = bomServiceBean.syncBomAlternative(srv, bomIfsAlternative); |
|
|
@ -2925,6 +2940,7 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe |
|
|
return b; |
|
|
return b; |
|
|
}).collect(Collectors.toList()); |
|
|
}).collect(Collectors.toList()); |
|
|
bomManagementMapper.saveBomManufStructCostDistrib(collect1); |
|
|
bomManagementMapper.saveBomManufStructCostDistrib(collect1); |
|
|
|
|
|
if (dataUrl) { |
|
|
// 更新ifs的副产品成本分配数据 |
|
|
// 更新ifs的副产品成本分配数据 |
|
|
List<BomIfsManufStructCostDistrib> bomIfsManufStructCostDistribs = new ArrayList<>(); |
|
|
List<BomIfsManufStructCostDistrib> bomIfsManufStructCostDistribs = new ArrayList<>(); |
|
|
for (BomManufStructCostDistribVo bomManufStructCostDistribVo : collect1) { |
|
|
for (BomManufStructCostDistribVo bomManufStructCostDistribVo : collect1) { |
|
|
@ -2947,6 +2963,22 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (dataUrl) { |
|
|
|
|
|
// 2025-05-12 调用下状态的接口 |
|
|
|
|
|
if ("Buildable".equals(bomDetail.getStatus())) { // 状态修改为buildable |
|
|
|
|
|
Map<String, String> buildBomDetailResponse = bomServiceBean.buildBomAlternative(srv, bomIfsAlternative); |
|
|
|
|
|
if (!"200".equals(buildBomDetailResponse.get("resultCode"))) { |
|
|
|
|
|
throw new RuntimeException("IFS BomAlternative Build异常:" + buildBomDetailResponse.get("resultMsg")); |
|
|
|
|
|
} |
|
|
|
|
|
} else if ("Obsolete".equals(bomDetail.getStatus())) { // 状态修改为Obsolete |
|
|
|
|
|
Map<String, String> retireBomDetailResponse = bomServiceBean.retireBomAlternative(srv, bomIfsAlternative); |
|
|
|
|
|
if (!"200".equals(retireBomDetailResponse.get("resultCode"))) { |
|
|
|
|
|
throw new RuntimeException("IFS BomAlternative Retire异常:" + retireBomDetailResponse.get("resultMsg")); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -2994,8 +3026,8 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe |
|
|
routingDetailEntity.setOfficialFlag("Y"); |
|
|
routingDetailEntity.setOfficialFlag("Y"); |
|
|
routingManagementMapper.routingDetailSave(routingDetailEntity); |
|
|
routingManagementMapper.routingDetailSave(routingDetailEntity); |
|
|
// 同步数据到 IFS |
|
|
// 同步数据到 IFS |
|
|
if (dataUrl) { |
|
|
|
|
|
RoutingIfsAlternative routingIfsAlternative = getIfsRoutingDetail(routingDetailEntity); |
|
|
RoutingIfsAlternative routingIfsAlternative = getIfsRoutingDetail(routingDetailEntity); |
|
|
|
|
|
if (dataUrl) { |
|
|
Map<String, String> getRoutingDetailResponse = routingServiceBean.getRoutingAlternative(srv, routingIfsAlternative); |
|
|
Map<String, String> getRoutingDetailResponse = routingServiceBean.getRoutingAlternative(srv, routingIfsAlternative); |
|
|
if (!"200".equals(getRoutingDetailResponse.get("resultCode"))) { // 新增 |
|
|
if (!"200".equals(getRoutingDetailResponse.get("resultCode"))) { // 新增 |
|
|
Map<String, String> addRoutingDetailResponse = routingServiceBean.syncRoutingAlternative(srv, routingIfsAlternative); |
|
|
Map<String, String> addRoutingDetailResponse = routingServiceBean.syncRoutingAlternative(srv, routingIfsAlternative); |
|
|
@ -3096,6 +3128,21 @@ public class PartInformationServiceImpl extends ServiceImpl<PartInformationMappe |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (dataUrl) { |
|
|
|
|
|
// 2025-05-27 调用下状态的接口 |
|
|
|
|
|
if ("Buildable".equals(routingDetailEntity.getStatus())) { // 状态修改为buildable |
|
|
|
|
|
Map<String, String> buildRoutingDetailResponse = routingServiceBean.buildRoutingAlternative(srv, routingIfsAlternative); |
|
|
|
|
|
if (!"200".equals(buildRoutingDetailResponse.get("resultCode"))) { |
|
|
|
|
|
throw new RuntimeException("IFS RoutingAlternative Build异常:" + buildRoutingDetailResponse.get("resultMsg")); |
|
|
|
|
|
} |
|
|
|
|
|
} else if ("Obsolete".equals(routingDetailEntity.getStatus())) { // 状态修改为Obsolete |
|
|
|
|
|
Map<String, String> retireRoutingDetailResponse = routingServiceBean.retireRoutingAlternative(srv, routingIfsAlternative); |
|
|
|
|
|
if (!"200".equals(retireRoutingDetailResponse.get("resultCode"))) { |
|
|
|
|
|
throw new RuntimeException("IFS RoutingAlternative Retire异常:" + retireRoutingDetailResponse.get("resultMsg")); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|