diff --git a/Src/Dlhis.Basic/Organization/Services/Implements/GainfoOutsourceService.cs b/Src/Dlhis.Basic/Organization/Services/Implements/GainfoOutsourceService.cs index caf17fd3..984ba015 100644 --- a/Src/Dlhis.Basic/Organization/Services/Implements/GainfoOutsourceService.cs +++ b/Src/Dlhis.Basic/Organization/Services/Implements/GainfoOutsourceService.cs @@ -135,6 +135,7 @@ public class GainfoOutsourceService : IGainfoOutsourceService { var raiseDateTime = await _dbContext.Queryable() .Where(x => x.UserUniqueNo == outsource.Code) + .Where(x => x.TenantId == grp.Key)//本厂区的 .GroupBy(x => x.UserUniqueNo) .Select(x => SqlFunc.IsNull(SqlFunc.AggregateMax(x.RaiseDateTime), outsource.CreateTime)) .SingleAsync(); @@ -189,8 +190,8 @@ public class GainfoOutsourceService : IGainfoOutsourceService // } // // return "EXT" + code.ToString().PadLeft(6, '0'); - - + + int code; var entity = await _dbContext.Queryable().Where(x => x.Code.StartsWith("LS")).OrderBy(x => x.Id, OrderByType.Desc).FirstAsync(); if (entity == null)