PDA 注塑领班 车间主任 注塑主管 车间统计员 计划专员 岗位的也可以看到任务单
This commit is contained in:
@@ -448,6 +448,23 @@ namespace Tnb.ProductionMgr
|
||||
|
||||
//模具部门的人
|
||||
List<string> moldUserIds = await _db.Queryable<UserRelationEntity>().Where(x=>x.ObjectId=="35792898276629").Select(x=>x.UserId).ToListAsync();
|
||||
//是否 注塑领班 车间主任 注塑主管 车间统计员 计划专员 岗位
|
||||
bool isPosition = false;
|
||||
List<string> positionIds = await _db.Queryable<UserRelationEntity>().Where(x=>x.ObjectType=="Position" && x.UserId==userId).Select(x=>x.ObjectId).ToListAsync();
|
||||
List<string> position = new List<string>() { "36384895704085", "33530523354645", "36384903950101", "36384884923925", "36384877722901" };
|
||||
if (positionIds != null && !positionIds.IsEmpty())
|
||||
{
|
||||
foreach (var item in positionIds)
|
||||
{
|
||||
if (position.Contains(item))
|
||||
{
|
||||
isPosition = true;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
SqlSugarPagedList<PADPackageTaskPageOutput> result = await _db.Queryable<PrdMoTask>()
|
||||
.LeftJoin<BasMaterial>((a, b) => a.material_id == b.id)
|
||||
.LeftJoin<BasProcess>((a, b, c) => a.process_id == c.id)
|
||||
@@ -471,6 +488,7 @@ namespace Tnb.ProductionMgr
|
||||
.WhereIF(status == "3" && end_time != null, a => a.act_end_date <= end_time)
|
||||
.WhereIF(!_userManager.IsAdministrator,(a, b, c, d, e, f, g, h, j, k, l)=>(d.ManagerId==userId)
|
||||
|| (j.mo_type==DictConst.PrdMoTypeBZ && !SqlFunc.IsNullOrEmpty(userWorklineId) && a.workline_id==userWorklineId)
|
||||
|| (j.mo_type==DictConst.PrdMoTypeZS && isPosition)
|
||||
|| (a.schedule_type==1 && a.mo_task_status==DictConst.ToBeStartedEnCode && moldUserIds.Contains(userId))
|
||||
|| (a.scheduling_class_type=="1" && twoDayFlag && a.dayshift_worker_id==userId)
|
||||
|| (a.scheduling_class_type=="1" && twoNightFlag && a.nightshift_worker_id==userId)
|
||||
|
||||
Reference in New Issue
Block a user