|
|
@ -570,6 +570,51 @@ public class RecipeServiceBeanTest { |
|
|
return returnMap; |
|
|
return returnMap; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* @description: 同步配方项目到IFS系统 |
|
|
|
|
|
* @author LR |
|
|
|
|
|
* @date 2024/12/30 15:12 |
|
|
|
|
|
* @version 1.0 |
|
|
|
|
|
*/ |
|
|
|
|
|
public Map<String, String> syncRecipeItem(RecipeIfsItem inData) { |
|
|
|
|
|
logger.info("Recipe替代明细新增开始:"+JSON.toJSONString(inData)); |
|
|
|
|
|
//公共参数 |
|
|
|
|
|
Map<String, String> returnMap = new HashMap<>(); |
|
|
|
|
|
String username = inData.getIfsUsername(); |
|
|
|
|
|
String password = inData.getIfsPassword(); |
|
|
|
|
|
String contract = inData.getContract(); |
|
|
|
|
|
String partNo = inData.getPartNo(); |
|
|
|
|
|
String engChgLevel = inData.getEngChgLevel(); |
|
|
|
|
|
String bomType = inData.getBomType(); |
|
|
|
|
|
String alternativeNo = inData.getAlternativeNo(); |
|
|
|
|
|
String lineItemNo = inData.getLineItemNo(); |
|
|
|
|
|
try{ |
|
|
|
|
|
//获取连接 |
|
|
|
|
|
Server srv = ifsServer.getIfsServer(username, password); |
|
|
|
|
|
//查询结果集 |
|
|
|
|
|
List<RecipeIfsItem> itemList = RecipeApi.getRecipeItems(srv, contract, partNo, engChgLevel, bomType, alternativeNo, lineItemNo); |
|
|
|
|
|
// |
|
|
|
|
|
if(itemList != null || itemList.size() > 0){ |
|
|
|
|
|
throw new APException("已存在此查Recipe组件信息!"); |
|
|
|
|
|
} |
|
|
|
|
|
//调用api |
|
|
|
|
|
Map<String, String> tempMap = RecipeApi.insertRecipeItem(srv, inData); |
|
|
|
|
|
//设置ifs 信息 |
|
|
|
|
|
inData.setIfsRowId(tempMap.get("OBJID")); |
|
|
|
|
|
inData.setIfsRowVersion(tempMap.get("OBJVERSION")); |
|
|
|
|
|
returnMap.put("resultCode", "200"); |
|
|
|
|
|
returnMap.put("obj", JSON.toJSONString(inData)); |
|
|
|
|
|
} catch(APException e){ |
|
|
|
|
|
returnMap.put("resultCode", "400"); |
|
|
|
|
|
returnMap.put("resultMsg", e.getMessage()); |
|
|
|
|
|
logger.info("异常信息:"+e.getMessage()); |
|
|
|
|
|
} |
|
|
|
|
|
//打印日志 |
|
|
|
|
|
logger.info("Recipe替代明细新增结束:"+JSON.toJSONString(inData)); |
|
|
|
|
|
//返回结果集 |
|
|
|
|
|
return returnMap; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @description: 修改查Recipe的明细 |
|
|
* @description: 修改查Recipe的明细 |
|
|
* @author LR |
|
|
* @author LR |
|
|
|