pda生产任务单列表 产线主管可查看

This commit is contained in:
2024-09-14 17:10:18 +08:00
parent 2da4652a9c
commit e98078c36d

View File

@@ -460,7 +460,6 @@ namespace Tnb.ProductionMgr
.LeftJoin<PrdMo>((a, b, c, d, e, f, g, h, j) => a.mo_id == j.id)
.LeftJoin<BasMaterialUnit>((a, b, c, d, e, f, g, h, j, k) => a.material_id == k.material_id && k.auxiliary_unit_id == "KGM")
.LeftJoin<EqpDaq>((a, b, c, d, e, f, g, h, j, k, l) => a.eqp_id == l.equip_id && l.enabled == 1 && l.label_name.Contains("允许称重"))//注塑空满箱请求
.LeftJoin<OrganizeEntity>((a, b, c, d, e, f, g, h, j, k, l,m)=>a.workstation_id==m.Id)
// .Where((a, b) => a.workstation_id == input.stationId)
// .Where((a, b) => a.worker_id == _userManager.UserId && (a.schedule_type==1 || (a.schedule_type==2 && a.parent_id!=null)))
.Where((a, b) => a.schedule_type==1 || (a.schedule_type==2 && a.parent_id!=null))
@@ -470,7 +469,7 @@ namespace Tnb.ProductionMgr
.WhereIF(statusList.Count > 0, a => statusList.Contains(a.mo_task_status))
.WhereIF(status == "3" && start_time != null, a => a.act_end_date >= start_time)
.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,m)=>(m.ManagerId==userId)
.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)
|| (a.schedule_type==1 && a.mo_task_status==DictConst.ToBeStartedEnCode && moldUserIds.Contains(userId))
|| (a.scheduling_class_type=="1" && twoDayFlag && a.dayshift_worker_id==userId)