|
|
|
@ -115,17 +115,21 @@ public class ToolServiceImpl implements ToolService { |
|
|
|
String resultMsg = String.valueOf(resultMap.get("result_msg")); |
|
|
|
throw new RuntimeException(resultMsg); |
|
|
|
} |
|
|
|
|
|
|
|
inData.setState("Active"); |
|
|
|
inData.setCreateDate(new Date()); |
|
|
|
//对象拷贝 |
|
|
|
IfsToolData ifsToolData = new IfsToolData(); |
|
|
|
//属性拷贝 |
|
|
|
BeanUtils.copyProperties(inData, ifsToolData); |
|
|
|
//2.校验存在调用接口 |
|
|
|
/* String toolURL = apiUrl + "/tool/ifs/syncToolDataToIfs"; |
|
|
|
ResponseData toolResponse = HttpClientUtil.doPostByRawWithPLM(toolURL, inData); |
|
|
|
String toolURL = apiUrl + "/tool/ifs/syncToolDataToIfs"; |
|
|
|
ResponseData toolResponse = HttpClientUtil.doPostByRawWithPLM(toolURL, ifsToolData); |
|
|
|
if (!"200".equals(toolResponse.getCode())) { |
|
|
|
throw new RuntimeException("IFS Tool新增异常:" + toolResponse.getMsg()); |
|
|
|
} |
|
|
|
// 更新 ifs_row_id ifs_row_version |
|
|
|
String objStr = String.valueOf(toolResponse.getObj()); |
|
|
|
IfsToolData ifsTool = JSON.parseObject(objStr, IfsToolData.class); |
|
|
|
inData.setCreateDate(new Date()); |
|
|
|
inData.setIfsRowId(ifsTool.getIfsRowId()); |
|
|
|
inData.setIfsRowVersion(ifsTool.getIfsRowVersion()); |
|
|
|
//删除工具信息默认的工具实例信息 |
|
|
|
@ -137,8 +141,8 @@ public class ToolServiceImpl implements ToolService { |
|
|
|
toolResponse = HttpClientUtil.doPostByRawWithPLM(toolURL, toolInstance); |
|
|
|
if (!"200".equals(toolResponse.getCode())) { |
|
|
|
throw new RuntimeException("IFS ToolInstance新增异常:" + toolResponse.getMsg()); |
|
|
|
}*/ |
|
|
|
inData.setState("Active"); |
|
|
|
} |
|
|
|
|
|
|
|
//2.调用方法保存当前的数据 |
|
|
|
toolDao.insertToolInfo(inData); |
|
|
|
} |
|
|
|
|