|
|
|
@ -17,6 +17,7 @@ import com.gaotao.modules.trans.service.TransHeaderService; |
|
|
|
import com.gaotao.modules.trans.service.TransNoControlService; |
|
|
|
import com.gaotao.modules.warehouse.service.InventoryStockService; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.commons.lang.StringUtils; |
|
|
|
import org.apache.shiro.SecurityUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
@ -79,6 +80,24 @@ public class ProductionWithdrawalServiceImpl implements ProductionWithdrawalServ |
|
|
|
@Value("${custom.ifs-domainUserID}") |
|
|
|
private String domainUserID; |
|
|
|
|
|
|
|
@Value("${ldap-control.control-flag:false}") |
|
|
|
private Boolean ldapFlag; |
|
|
|
/** |
|
|
|
* 获取当前用户的域控账号,如果开启了域控账号则获取用户的域控账号,否则使用配置的默认值 |
|
|
|
*/ |
|
|
|
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) { |
|
|
|
// 如果获取当前用户失败,使用默认配置 |
|
|
|
} |
|
|
|
} |
|
|
|
return domainUserID; |
|
|
|
} |
|
|
|
/** |
|
|
|
* @Author System |
|
|
|
* @Description 从IFS获取工单接收历史记录 |
|
|
|
@ -96,7 +115,7 @@ public class ProductionWithdrawalServiceImpl implements ProductionWithdrawalServ |
|
|
|
// 构建IFS接口参数 |
|
|
|
Map<String, Object> params = new HashMap<>(); |
|
|
|
params.put("ifsDBName", queryDto.getIfsDBName() != null ? queryDto.getIfsDBName() : ifsDBName); |
|
|
|
params.put("domainUserID", queryDto.getDomainUserID() != null ? queryDto.getDomainUserID() : domainUserID); |
|
|
|
params.put("domainUserID", getCurrentDomainUserID()); |
|
|
|
params.put("ifsSiteID", queryDto.getIfsSiteID()); |
|
|
|
params.put("ifsOrderNo", queryDto.getIfsOrderNo()); |
|
|
|
params.put("ifsReleaseNo", queryDto.getIfsReleaseNo()); |
|
|
|
@ -406,7 +425,7 @@ public class ProductionWithdrawalServiceImpl implements ProductionWithdrawalServ |
|
|
|
// 构建IFS接口参数 |
|
|
|
Map<String, Object> params = new HashMap<>(); |
|
|
|
params.put("ifsDBName", ifsDBName); |
|
|
|
params.put("domainUserID", domainUserID); |
|
|
|
params.put("domainUserID", getCurrentDomainUserID()); |
|
|
|
params.put("ifsContract", dto.getSite()); |
|
|
|
params.put("ifsOrderNo", dto.getOrderNo()); |
|
|
|
params.put("ifsReleaseNo", dto.getReleaseNo()); |
|
|
|
|