添加x2server设备关联的字段

This commit is contained in:
2023-11-03 10:27:58 +08:00
parent 5dbbe60682
commit f56c1d1120
3 changed files with 19 additions and 1 deletions

View File

@@ -401,13 +401,14 @@ namespace Tnb.ProductionMgr
.LeftJoin<BasStandardTime>((a,b,c,d,e,f,g,h,i)=>a.process_id==i.process_id && i.enabled==1)
.LeftJoin<PrdMo>((a,b,c,d,e,f,g,h,i,j)=>a.mo_id==j.id)
.LeftJoin<BasMaterialUnit>((a,b,c,d,e,f,g,h,i,j,k)=>a.material_id==k.material_id && k.auxiliary_unit_id=="kg")
.LeftJoin<EqpDaq>((a,b,c,d,e,f,g,h,i,j,k,l)=>a.eqp_id==l.equip_id && l.enabled==1 && l.label_point=="提报装箱称重点位")
.Where((a, b) => a.workstation_id == input.stationId && (a.mo_task_status == DictConst.ToBeStartedEnCode || a.mo_task_status == DictConst.MoStatusPauseCode || a.mo_task_status == DictConst.ComplatedEnCode || a.mo_task_status == DictConst.InProgressEnCode) )
.WhereIF(!string.IsNullOrEmpty(mo_task_code),a=>a.mo_task_code.Contains(mo_task_code))
//.WhereIF(!string.IsNullOrEmpty(mo_task_status),a=>a.mo_task_status==mo_task_status)
.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)
.Select((a, b, c, d, e,f,g,h,i,j,k) => new PADPackageTaskPageOutput
.Select((a, b, c, d, e,f,g,h,i,j,k,l) => new PADPackageTaskPageOutput
{
id = a.id,
mo_task_code = a.mo_task_code,
@@ -448,6 +449,8 @@ namespace Tnb.ProductionMgr
minpacking = b.minpacking,
main_num = k.number_of_primary_unit,
deputy_num = k.number_of_auxiliary_unit,
third_equip_code = f.third_equip_code,
weight_name = l.label_name
})
.MergeTable()
.OrderBy($"{input.sidx} {input.sort}")