修改bug

This commit is contained in:
2024-11-07 17:35:24 +08:00
parent 38f484e1e3
commit 755fd97ef0
3 changed files with 12 additions and 4 deletions

View File

@@ -82,13 +82,14 @@ namespace Tnb.ProductionMgr
.LeftJoin<PrdMo>((a, b, c, d) => a.mo_id == d.id)
.LeftJoin<DictionaryDataEntity>((a, b, c, d, e) => e.DictionaryTypeId == DictConst.PrdTaskStatusTypeId && a.mo_task_status == e.EnCode)
.LeftJoin<OrganizeEntity>((a, b, c, d, e, f) => a.workline_id == f.Id)
.LeftJoin<EqpEquipment>((a,b,c,d,e,f,g)=>a.eqp_id==g.id)
.WhereIF(!string.IsNullOrEmpty(mo_task_code), a => a.mo_task_code.Contains(mo_task_code))
.WhereIF(!string.IsNullOrEmpty(mo_code), (a, b, c, d, e) => d.mo_code.Contains(mo_code))
.WhereIF(!string.IsNullOrEmpty(mo_type),(a,b,c,d,e)=>d.mo_type==mo_type)
.WhereIF(!string.IsNullOrEmpty(name),(a,b,c,d,e)=>b.name.Contains(name))
.Where(a => a.act_start_date != null)
.OrderBy($"{input.sidx} {input.sort}")
.Select((a, b, c, d, e, f) => new PrdInstockRecordUpListOutPut()
.Select((a, b, c, d, e, f,g) => new PrdInstockRecordUpListOutPut()
{
id = a.id,
mo_task_code = a.mo_task_code,
@@ -97,18 +98,21 @@ namespace Tnb.ProductionMgr
workstation_id = c.FullName,
mo_task_status = e.FullName,
workline_id = f.FullName,
eqp_code=g.code,
act_start_date = a.act_start_date == null ? "" : a.act_start_date.Value.ToString(DbTimeFormat.SS),
create_time = a.create_time.HasValue ? a.create_time.Value.ToString("yyyy-MM-dd HH:mm:ss") : "",
tablefield102 = SqlFunc.Subqueryable<PrdInstockH>()
.LeftJoin<UserEntity>((x, y) => x.create_id == y.Id)
.LeftJoin<DictionaryDataEntity>((x, y, z) => x.bill_type == z.Id)
.Where(x => x.mo_task_id == a.id).ToList((x, y, z) => new PrdInstockRecordUpListChildOutPut()
.LeftJoin<WmsCarryH>((x,y,z,j)=>x.carry_code==j.id)
.LeftJoin<BasLocation>((x,y,z,j,k)=>x.location_code==k.id)
.Where(x => x.mo_task_id == a.id).ToList((x, y, z,j,k) => new PrdInstockRecordUpListChildOutPut()
{
id = x.id,
code = x.code,
bill_type = z.FullName,
carry_code = x.carry_code,
location_code = x.location_code,
carry_code = j.carry_code,
location_code = k.location_code,
create_id = y.RealName,
bill_date = x.bill_date == null ? "" : x.bill_date.ToString(DbTimeFormat.SS),
}),