|
|
@ -300,7 +300,7 @@ namespace Myshipping.Application
|
|
|
|
var query = _rep.AsQueryable().Filter(null, true).Where(x => x.TenantId == UserManager.TENANT_ID)
|
|
|
|
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 == false)
|
|
|
|
.WhereIF(input.ISDel, x => x.IsDeleted == true)
|
|
|
|
.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.LineManageID == 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.SubOpId == UserManager.UserId || 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) //台账只查询主单!!
|
|
|
|
.Where(x => x.ParentId == 0 || x.ParentId == null) //台账只查询主单!!
|
|
|
|
.WhereIF(input.Id != 0, x => x.Id == input.Id)
|
|
|
|
.WhereIF(input.Id != 0, x => x.Id == input.Id)
|
|
|
|
.WhereIF(pidlist != null && pidlist.Count > 0, x => pidlist.Contains(x.Id))
|
|
|
|
.WhereIF(pidlist != null && pidlist.Count > 0, x => pidlist.Contains(x.Id))
|
|
|
@ -407,8 +407,10 @@ namespace Myshipping.Application
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.NOTIFYPARTYTEL), u => u.NOTIFYPARTYTEL == input.NOTIFYPARTYTEL)
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.NOTIFYPARTYTEL), u => u.NOTIFYPARTYTEL == input.NOTIFYPARTYTEL)
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.PONO), u => u.PONO.Contains(input.PONO))
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.PONO), u => u.PONO.Contains(input.PONO))
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.OPID), u => u.OPID == input.OPID)
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.OPID), u => u.OPID == input.OPID)
|
|
|
|
|
|
|
|
.WhereIF(input.SubOpId.HasValue, u => u.SubOpId == input.SubOpId)
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.DOCID), u => u.DOCID == input.DOCID)
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.DOCID), u => u.DOCID == input.DOCID)
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.OP), u => u.OP == input.OP)
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.OP), u => u.OP == input.OP)
|
|
|
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.SubOp), u => u.SubOp == input.SubOp)
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.DOC), u => u.DOC == input.DOC)
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.DOC), u => u.DOC == input.DOC)
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.SALEID), u => u.SALEID == input.SALEID)
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.SALEID), u => u.SALEID == input.SALEID)
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.SALE), u => u.SALE.Contains(input.SALE))
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.SALE), u => u.SALE.Contains(input.SALE))
|
|
|
@ -455,7 +457,7 @@ namespace Myshipping.Application
|
|
|
|
UserManager.UserId.ToString() == u.ROUTEID || UserManager.Name.ToString() == u.ROUTE ||
|
|
|
|
UserManager.UserId.ToString() == u.ROUTEID || UserManager.Name.ToString() == u.ROUTE ||
|
|
|
|
UserManager.UserId.ToString() == u.LineManageID || UserManager.Name.ToString() == u.LineManage ||
|
|
|
|
UserManager.UserId.ToString() == u.LineManageID || UserManager.Name.ToString() == u.LineManage ||
|
|
|
|
UserManager.UserId.ToString() == u.SALEID || UserManager.Name.ToString() == u.SALE ||
|
|
|
|
UserManager.UserId.ToString() == u.SALEID || UserManager.Name.ToString() == u.SALE ||
|
|
|
|
userlistString.Contains(u.OPID) || UserManager.Name.ToString() == u.OP ||
|
|
|
|
userlistString.Contains(u.OPID) || (u.SubOpId.HasValue && userlistString.Contains(u.SubOpId.ToString())) || UserManager.Name.ToString() == u.OP || UserManager.Name.ToString() == u.SubOp ||
|
|
|
|
userlistString.Contains(u.DOCID) || UserManager.Name.ToString() == u.DOC ||
|
|
|
|
userlistString.Contains(u.DOCID) || UserManager.Name.ToString() == u.DOC ||
|
|
|
|
UserManager.UserId.ToString() == u.CUSTSERVICEID || UserManager.Name.ToString() == u.CUSTSERVICE);
|
|
|
|
UserManager.UserId.ToString() == u.CUSTSERVICEID || UserManager.Name.ToString() == u.CUSTSERVICE);
|
|
|
|
|
|
|
|
|
|
|
@ -890,7 +892,7 @@ namespace Myshipping.Application
|
|
|
|
var query = _rep.AsQueryable().Filter(null, true).Where(x => x.TenantId == UserManager.TENANT_ID)
|
|
|
|
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 == false)
|
|
|
|
.WhereIF(input.ISDel, x => x.IsDeleted == true)
|
|
|
|
.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.LineManageID == 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.SubOpId == UserManager.UserId || 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) //台账只查询主单!!
|
|
|
|
.Where(x => x.ParentId == 0 || x.ParentId == null) //台账只查询主单!!
|
|
|
|
.WhereIF(input.Id != 0, x => x.Id == input.Id)
|
|
|
|
.WhereIF(input.Id != 0, x => x.Id == input.Id)
|
|
|
|
.WhereIF(pidlist != null && pidlist.Count > 0, x => pidlist.Contains(x.Id))
|
|
|
|
.WhereIF(pidlist != null && pidlist.Count > 0, x => pidlist.Contains(x.Id))
|
|
|
@ -997,8 +999,10 @@ namespace Myshipping.Application
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.NOTIFYPARTYTEL), u => u.NOTIFYPARTYTEL == input.NOTIFYPARTYTEL)
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.NOTIFYPARTYTEL), u => u.NOTIFYPARTYTEL == input.NOTIFYPARTYTEL)
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.PONO), u => u.PONO.Contains(input.PONO))
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.PONO), u => u.PONO.Contains(input.PONO))
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.OPID), u => u.OPID == input.OPID)
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.OPID), u => u.OPID == input.OPID)
|
|
|
|
|
|
|
|
.WhereIF(input.SubOpId.HasValue, u => u.SubOpId == input.SubOpId)
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.DOCID), u => u.DOCID == input.DOCID)
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.DOCID), u => u.DOCID == input.DOCID)
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.OP), u => u.OP == input.OP)
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.OP), u => u.OP == input.OP)
|
|
|
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.SubOp), u => u.SubOp == input.SubOp)
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.DOC), u => u.DOC == input.DOC)
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.DOC), u => u.DOC == input.DOC)
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.SALEID), u => u.SALEID == input.SALEID)
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.SALEID), u => u.SALEID == input.SALEID)
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.SALE), u => u.SALE.Contains(input.SALE))
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.SALE), u => u.SALE.Contains(input.SALE))
|
|
|
@ -1045,7 +1049,7 @@ namespace Myshipping.Application
|
|
|
|
UserManager.UserId.ToString() == u.ROUTEID || UserManager.Name.ToString() == u.ROUTE ||
|
|
|
|
UserManager.UserId.ToString() == u.ROUTEID || UserManager.Name.ToString() == u.ROUTE ||
|
|
|
|
UserManager.UserId.ToString() == u.LineManageID || UserManager.Name.ToString() == u.LineManage ||
|
|
|
|
UserManager.UserId.ToString() == u.LineManageID || UserManager.Name.ToString() == u.LineManage ||
|
|
|
|
UserManager.UserId.ToString() == u.SALEID || UserManager.Name.ToString() == u.SALE ||
|
|
|
|
UserManager.UserId.ToString() == u.SALEID || UserManager.Name.ToString() == u.SALE ||
|
|
|
|
userlistString.Contains(u.OPID) || UserManager.Name.ToString() == u.OP ||
|
|
|
|
userlistString.Contains(u.OPID) || (u.SubOpId.HasValue && userlistString.Contains(u.SubOpId.ToString())) || UserManager.Name.ToString() == u.OP || UserManager.Name.ToString() == u.SubOp ||
|
|
|
|
userlistString.Contains(u.DOCID) || UserManager.Name.ToString() == u.DOC ||
|
|
|
|
userlistString.Contains(u.DOCID) || UserManager.Name.ToString() == u.DOC ||
|
|
|
|
UserManager.UserId.ToString() == u.CUSTSERVICEID || UserManager.Name.ToString() == u.CUSTSERVICE);
|
|
|
|
UserManager.UserId.ToString() == u.CUSTSERVICEID || UserManager.Name.ToString() == u.CUSTSERVICE);
|
|
|
|
|
|
|
|
|
|
|
@ -1817,6 +1821,7 @@ namespace Myshipping.Application
|
|
|
|
//除现有配置权限外 创建人本人、操作、单证、客服 具有编辑权限
|
|
|
|
//除现有配置权限外 创建人本人、操作、单证、客服 具有编辑权限
|
|
|
|
if (rightlist != null && !(
|
|
|
|
if (rightlist != null && !(
|
|
|
|
mlist.OPID == UserManager.UserId.ToString() || mlist.OP == UserManager.Name.ToString() ||
|
|
|
|
mlist.OPID == UserManager.UserId.ToString() || mlist.OP == UserManager.Name.ToString() ||
|
|
|
|
|
|
|
|
mlist.SubOpId == UserManager.UserId || mlist.SubOp == UserManager.Name.ToString() ||
|
|
|
|
mlist.DOCID == UserManager.UserId.ToString() || mlist.DOC == UserManager.Name.ToString() ||
|
|
|
|
mlist.DOCID == UserManager.UserId.ToString() || mlist.DOC == UserManager.Name.ToString() ||
|
|
|
|
mlist.CUSTSERVICEID == UserManager.UserId.ToString() || mlist.CUSTSERVICE == UserManager.Name.ToString() ||
|
|
|
|
mlist.CUSTSERVICEID == UserManager.UserId.ToString() || mlist.CUSTSERVICE == UserManager.Name.ToString() ||
|
|
|
|
UserManager.UserId == 400234750476357 ||
|
|
|
|
UserManager.UserId == 400234750476357 ||
|
|
|
|