bug
This commit is contained in:
@@ -14,6 +14,7 @@ using Tnb.BasicData.Entities;
|
||||
using Tnb.EquipMgr.Entities;
|
||||
using Tnb.ProductionMgr.Entities;
|
||||
using Tnb.QcMgr.Entities;
|
||||
using Tnb.BasicData;
|
||||
|
||||
namespace Tnb.QcMgr
|
||||
{ /// <summary>
|
||||
@@ -99,6 +100,8 @@ namespace Tnb.QcMgr
|
||||
{ "await", "待检" },
|
||||
{ "temporarily", "暂控" }
|
||||
};
|
||||
|
||||
PositionEntity positionEntity = await db.Queryable<PositionEntity>().Where(x=>x.Id==_userManager.User.PositionId).FirstAsync();
|
||||
Dictionary<string, string>? queryJson = !string.IsNullOrEmpty(input.queryJson) ? JsonConvert.DeserializeObject<Dictionary<string, string>>(input.queryJson) : new Dictionary<string, string>();
|
||||
string materialid = queryJson.ContainsKey("materialid") ? queryJson["materialid"].ToString() : "";
|
||||
string checktype = queryJson.ContainsKey("checktype") ? queryJson["checktype"].ToString() : "";
|
||||
@@ -117,6 +120,9 @@ namespace Tnb.QcMgr
|
||||
.LeftJoin<UserEntity>((a, b, c, d, e) => a.execuser == e.Id)
|
||||
.LeftJoin<PrdMoTask>((a,b,c,d,e,f)=>a.mo_task_code==f.mo_task_code)
|
||||
.LeftJoin<EqpEquipment>((a,b,c,d,e,f,g)=>f.eqp_id==g.id)
|
||||
.LeftJoin<OrganizeEntity>((a,b,c,d,e,f,g,h)=>d.OrganizeIdTree.Contains(h.Id) && h.Category == DictConst.RegionCategoryWorklineCode)
|
||||
.LeftJoin<PositionEntity>((a,b,c,d,e,f,g,h,i)=>h.Id==i.OrganizeId)
|
||||
.WhereIF(_userManager.LoginType=="app" && !_userManager.IsAdministrator,(a,b,c,d,e,f,g,h,i)=>i.EnCode==positionEntity.EnCode)
|
||||
.WhereIF(!string.IsNullOrEmpty(materialid), (a, b, c, d, e) => a.materialid == materialid)
|
||||
.WhereIF(!string.IsNullOrEmpty(checktype), (a, b, c, d, e) => a.checktype == checktype)
|
||||
.WhereIF(!string.IsNullOrEmpty(status), (a, b, c, d, e) => a.status == status)
|
||||
|
||||
Reference in New Issue
Block a user