diff --git a/ds-wms-service/DS.Module.SqlSugar/SqlsugarHelper.cs b/ds-wms-service/DS.Module.SqlSugar/SqlsugarHelper.cs index 871fb6d0..99505751 100644 --- a/ds-wms-service/DS.Module.SqlSugar/SqlsugarHelper.cs +++ b/ds-wms-service/DS.Module.SqlSugar/SqlsugarHelper.cs @@ -48,12 +48,14 @@ namespace DS.Module.SqlSugar { var tenantId = ((dynamic)entityInfo.EntityValue).TenantId; if (tenantId == null || tenantId == 0) - entityInfo.SetValue(user.GetTenantId()); + entityInfo.SetValue(user.TenantName); } if (entityInfo.PropertyName == "OrgId") - { - entityInfo.SetValue(user.TenantName); + { + var orgId = ((dynamic)entityInfo.EntityValue).OrgId; + if (orgId == null || orgId == 0) + entityInfo.SetValue(user.GetOrgId()); } if (entityInfo.PropertyName == "CreateBy") diff --git a/ds-wms-service/DS.WMS.Core/TaskPlat/Method/TaskManageService.cs b/ds-wms-service/DS.WMS.Core/TaskPlat/Method/TaskManageService.cs index 8e2b2b14..9dc879cd 100644 --- a/ds-wms-service/DS.WMS.Core/TaskPlat/Method/TaskManageService.cs +++ b/ds-wms-service/DS.WMS.Core/TaskPlat/Method/TaskManageService.cs @@ -317,7 +317,10 @@ namespace DS.WMS.Core.TaskPlat.Method { TaskId = taskInfo.Id, UserId = x.RecvUserId, - UserName = x.RecvUserName + UserName = x.RecvUserName, + Status = TaskStatusEnum.Create.ToString(), + StatusName = TaskStatusEnum.Create.EnumDescription(), + StatusTime = DateTime.Now }).ToList(); await tenantDb.Insertable(allocationList).ExecuteCommandAsync(); }