订舱台账查询范围调整:首次查询台账时就显示航线管理为登陆人的台账(和航线操作保持一致)

optimize
zhangxiaofeng 12 months ago
parent ac93552870
commit abfed0149d

@ -270,7 +270,7 @@ namespace Myshipping.Application
var query = _rep.AsQueryable().Filter(null, true).Where(x => x.TenantId == UserManager.TENANT_ID)
.WhereIF(!input.ISDel, x => x.IsDeleted == false)
.WhereIF(input.ISDel, x => x.IsDeleted == true)
.WhereIF(input.firstFlag, x => (x.ETD <= etoday && x.ETD >= ftoday || x.ETD == null) && (x.CreatedUserId == UserManager.UserId || x.OPID == UserManager.UserId.ToString() || x.DOCID == UserManager.UserId.ToString() || x.ROUTEID == UserManager.UserId.ToString() || x.CUSTSERVICEID == UserManager.UserId.ToString() || x.SALEID == UserManager.UserId.ToString())) //首次加载数据ETD前后15天且创建人、操作是当前人
.WhereIF(input.firstFlag, x => (x.ETD <= etoday && x.ETD >= ftoday || x.ETD == null) && (x.CreatedUserId == UserManager.UserId || x.OPID == UserManager.UserId.ToString() || x.DOCID == UserManager.UserId.ToString() || x.ROUTEID == UserManager.UserId.ToString() || x.LineManageID == UserManager.UserId.ToString() || x.CUSTSERVICEID == UserManager.UserId.ToString() || x.SALEID == UserManager.UserId.ToString())) //首次加载数据ETD前后15天且创建人、操作是当前人
.Where(x => x.ParentId == 0 || x.ParentId == null) //台账只查询主单!!
.WhereIF(input.Id != 0, x => x.Id == input.Id)
.WhereIF(pidlist != null && pidlist.Count > 0, x => pidlist.Contains(x.Id))

Loading…
Cancel
Save