Compare commits
No commits in common. "ba2c0e3a74434ca069b4509a6ca3030cf47ef8d3" and "1e4cff9b2cfac9abfa93380e8da7a797793e2c77" have entirely different histories.
ba2c0e3a74
...
1e4cff9b2c
|
|
@ -44,7 +44,6 @@ public class MaterialPlmDownloadAction implements ICommonAction {
|
||||||
private String plmBaseUrl = "";
|
private String plmBaseUrl = "";
|
||||||
private String plmUser = "";
|
private String plmUser = "";
|
||||||
private String token = "";
|
private String token = "";
|
||||||
private String passwd = "";
|
|
||||||
private static final String tokenUrl = "/sipmweb/api/oauth";
|
private static final String tokenUrl = "/sipmweb/api/oauth";
|
||||||
// 根据物料编码获取零部件ID
|
// 根据物料编码获取零部件ID
|
||||||
private String materialIdUrl = "/sipmweb/api/{rid}/search/{t}";
|
private String materialIdUrl = "/sipmweb/api/{rid}/search/{t}";
|
||||||
|
|
@ -95,7 +94,6 @@ public class MaterialPlmDownloadAction implements ICommonAction {
|
||||||
}
|
}
|
||||||
plmBaseUrl = configParams.get("plmBaseUrl");
|
plmBaseUrl = configParams.get("plmBaseUrl");
|
||||||
plmUser = configParams.get("plmUser");
|
plmUser = configParams.get("plmUser");
|
||||||
passwd = configParams.getOrDefault("passwd", "");
|
|
||||||
token = getToken();
|
token = getToken();
|
||||||
|
|
||||||
// 无论单个还是多个物料,均打包为ZIP(原单个物料返回单文件,无法同时返回两类文件)
|
// 无论单个还是多个物料,均打包为ZIP(原单个物料返回单文件,无法同时返回两类文件)
|
||||||
|
|
@ -200,9 +198,6 @@ public class MaterialPlmDownloadAction implements ICommonAction {
|
||||||
private String getToken() throws IOException, BusinessException {
|
private String getToken() throws IOException, BusinessException {
|
||||||
Map<String, String> tokenMap = new HashMap<>();
|
Map<String, String> tokenMap = new HashMap<>();
|
||||||
tokenMap.put("uname", plmUser);
|
tokenMap.put("uname", plmUser);
|
||||||
if (!"passwd".equals(passwd) && !"null".equals(passwd) && !"~".equals(passwd)) {
|
|
||||||
tokenMap.put("passwd", passwd);
|
|
||||||
}
|
|
||||||
tokenMap.put("f", "true");
|
tokenMap.put("f", "true");
|
||||||
String tokenStr = doGet(plmBaseUrl + tokenUrl, tokenMap);
|
String tokenStr = doGet(plmBaseUrl + tokenUrl, tokenMap);
|
||||||
JSONObject jsonObject = JSONObject.parseObject(tokenStr);
|
JSONObject jsonObject = JSONObject.parseObject(tokenStr);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue