fix 离职导致不显示问题
This commit is contained in:
@@ -161,6 +161,10 @@ public class WorkGridService : IWorkGridService
|
||||
.Where(p => p.Code == x.LeaderUserCode && p.Factory == factory)
|
||||
.Any()
|
||||
||
|
||||
SqlFunc.Subqueryable<GainfoLeaveEntity>()
|
||||
.Where(p => p.Code == x.LeaderUserCode && p.Factory == factory)
|
||||
.Any()
|
||||
||
|
||||
SqlFunc.Subqueryable<WorkGridUserEntity>()
|
||||
.LeftJoin<GainfoEntity>((p, pga) => p.UserCode == pga.Code)
|
||||
.Where(p => p.WorkGridCode == x.Code)
|
||||
@@ -198,7 +202,7 @@ public class WorkGridService : IWorkGridService
|
||||
workGrid.ThrowIfNull($"{from}管理的网格不存在");
|
||||
|
||||
var beforeGainfo = await _dbContext.Queryable<GainfoEntity>().Where(x => x.Code == from).SingleAsync();
|
||||
beforeGainfo??=await _dbContext.Queryable<GainfoLeaveEntity>().Where(x => x.Code == from).SingleAsync();
|
||||
beforeGainfo ??= await _dbContext.Queryable<GainfoLeaveEntity>().Where(x => x.Code == from).SingleAsync();
|
||||
beforeGainfo.ThrowIfNull($"{from}人员不存在");
|
||||
|
||||
var gainfo = await _dbContext.Queryable<GainfoEntity>().Where(x => x.Code == to).SingleAsync();
|
||||
|
||||
Reference in New Issue
Block a user