diff --git a/APT.MicroApi/APT.FO.WebApi/Controllers/CrucialLicenseJobController.cs b/APT.MicroApi/APT.FO.WebApi/Controllers/CrucialLicenseJobController.cs index d78f815..48b2243 100644 --- a/APT.MicroApi/APT.FO.WebApi/Controllers/CrucialLicenseJobController.cs +++ b/APT.MicroApi/APT.FO.WebApi/Controllers/CrucialLicenseJobController.cs @@ -968,14 +968,17 @@ namespace APT.FO.WebApi.Controllers } else { - var dep = GetEntity(user.DEPARTMENT_ID.Value); - if (dep != null) + if (user.Nav_Department != null && user.Nav_Department.DEPARTMENT_TYPE == 0) { - if (dep.USER_ID.HasValue) - { approveId = dep.USER_ID.Value; } - else if (dep.CHARGEUSER_ID.HasValue) - { approveId = dep.CHARGEUSER_ID.Value; } - break; + var dep = GetEntity(user.DEPARTMENT_ID.Value); + if (dep != null) + { + if (dep.USER_ID.HasValue) + { approveId = dep.USER_ID.Value; } + else if (dep.CHARGEUSER_ID.HasValue) + { approveId = dep.CHARGEUSER_ID.Value; } + break; + } } } } diff --git a/APT.MicroApi/APT.FO.WebApi/Controllers/CrucialLicenseJobOutsourceController.cs b/APT.MicroApi/APT.FO.WebApi/Controllers/CrucialLicenseJobOutsourceController.cs index 0626dc8..f6677f0 100644 --- a/APT.MicroApi/APT.FO.WebApi/Controllers/CrucialLicenseJobOutsourceController.cs +++ b/APT.MicroApi/APT.FO.WebApi/Controllers/CrucialLicenseJobOutsourceController.cs @@ -456,14 +456,17 @@ namespace APT.FO.WebApi.Controllers } else { - var dep = GetEntity(user.DEPARTMENT_ID.Value); - if (dep != null) + if (user.Nav_Department != null && user.Nav_Department.DEPARTMENT_TYPE == 0) { - if (dep.USER_ID.HasValue) - { approveId = dep.USER_ID.Value; } - else if (dep.CHARGEUSER_ID.HasValue) - { approveId = dep.CHARGEUSER_ID.Value; } - break; + var dep = GetEntity(user.DEPARTMENT_ID.Value); + if (dep != null) + { + if (dep.USER_ID.HasValue) + { approveId = dep.USER_ID.Value; } + else if (dep.CHARGEUSER_ID.HasValue) + { approveId = dep.CHARGEUSER_ID.Value; } + break; + } } } }