公司赋值

This commit is contained in:
何美荣 2025-11-21 10:01:16 +08:00
parent ab40fdc893
commit 511f4a7374
2 changed files with 8 additions and 0 deletions

View File

@ -71,6 +71,10 @@ namespace APT.FO.WebApi.Controllers
var departmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID; var departmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID;
entity.APPLY_USER_ID = loginUserId; entity.APPLY_USER_ID = loginUserId;
entity.APPLY_DEPARTMENT_ID = departmentId; entity.APPLY_DEPARTMENT_ID = departmentId;
if (entity.COMPANY_ID == null)
{
entity.COMPANY_ID = this.GetEntity<T_FM_DEPARTMENT>(t => t.PARENT_ID == null)?.ID;
}
var details = entity.Nav_Details; var details = entity.Nav_Details;
if (details != null && details.Any()) if (details != null && details.Any())
{ {

View File

@ -71,6 +71,10 @@ namespace APT.FO.WebApi.Controllers
var departmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID; var departmentId = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID;
entity.APPLY_USER_ID = loginUserId; entity.APPLY_USER_ID = loginUserId;
entity.APPLY_DEPARTMENT_ID = departmentId; entity.APPLY_DEPARTMENT_ID = departmentId;
if (entity.COMPANY_ID == null)
{
entity.COMPANY_ID = this.GetEntity<T_FM_DEPARTMENT>(t => t.PARENT_ID == null)?.ID;
}
var details = entity.Nav_Details; var details = entity.Nav_Details;
if (details != null && details.Any()) if (details != null && details.Any())
{ {