|
|
|
@ -129,7 +129,7 @@ public class IfsApiServiceImpl implements IfsApiService { |
|
|
|
public List<IfsInventoryPartInStock> getInventoryPartInStock(String site,String partNo) throws JsonProcessingException { |
|
|
|
Map<String, Object> params = Map.of( |
|
|
|
"ifsDBName", ifsDBName, |
|
|
|
"domainUserID", domainUserID, |
|
|
|
"domainUserID", getCurrentDomainUserID(), |
|
|
|
"ifsSiteID", site, |
|
|
|
"ifsPartNo", partNo |
|
|
|
); |
|
|
|
@ -183,16 +183,16 @@ public class IfsApiServiceImpl implements IfsApiService { |
|
|
|
} |
|
|
|
|
|
|
|
private String getCurrentDomainUserID() { |
|
|
|
// if (ldapFlag) { |
|
|
|
// try { |
|
|
|
// SysUserEntity currentUser = (SysUserEntity) SecurityUtils.getSubject().getPrincipal(); |
|
|
|
// if (currentUser != null && StringUtils.isNotBlank(currentUser.getDomainAccount())) { |
|
|
|
// return currentUser.getDomainAccount(); |
|
|
|
// } |
|
|
|
// } catch (Exception e) { |
|
|
|
// // 如果获取当前用户失败,使用默认配置 |
|
|
|
// } |
|
|
|
// } |
|
|
|
if (ldapFlag) { |
|
|
|
try { |
|
|
|
SysUserEntity currentUser = (SysUserEntity) SecurityUtils.getSubject().getPrincipal(); |
|
|
|
if (currentUser != null && StringUtils.isNotBlank(currentUser.getDomainAccount())) { |
|
|
|
return currentUser.getDomainAccount(); |
|
|
|
} |
|
|
|
} catch (Exception e) { |
|
|
|
// 如果获取当前用户失败,使用默认配置 |
|
|
|
} |
|
|
|
} |
|
|
|
return domainUserID; |
|
|
|
} |
|
|
|
|
|
|
|
|