pad注塑挤出组装包装任务单列表合二为一
This commit is contained in:
@@ -91,5 +91,6 @@ namespace Tnb.ProductionMgr.Entities.Dto.PrdManage
|
|||||||
public string mold_id { get; set; }
|
public string mold_id { get; set; }
|
||||||
public string mold_code { get; set; }
|
public string mold_code { get; set; }
|
||||||
public string mold_name { get; set; }
|
public string mold_name { get; set; }
|
||||||
|
public DateTime? create_time { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -343,7 +343,70 @@ namespace Tnb.ProductionMgr
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// pda端根据工位获取组装包装列表
|
/// pda端根据工位获取任务单列表
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<dynamic> GetPadPrdMoTaskList(PrdPackReportQueryInput input)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(input.stationId))
|
||||||
|
{
|
||||||
|
return new
|
||||||
|
{
|
||||||
|
pagination = new PageResult(),
|
||||||
|
list = Array.Empty<string>()
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
var result = await _db.Queryable<PrdMoTask>()
|
||||||
|
.LeftJoin<BasMaterial>((a, b) => a.material_id == b.id)
|
||||||
|
.LeftJoin<BasProcess>((a, b, c) => a.process_id == c.id)
|
||||||
|
.LeftJoin<OrganizeEntity>((a, b, c, d) => a.workline_id == d.Id)
|
||||||
|
.LeftJoin<DictionaryDataEntity>((a, b, c, d, e) => e.DictionaryTypeId == DictConst.PrdTaskStatusTypeId && a.mo_task_status == e.EnCode)
|
||||||
|
.LeftJoin<EqpEquipment>((a,b,c,d,e,f)=>a.eqp_id==f.id)
|
||||||
|
.LeftJoin<ToolMolds>((a,b,c,d,e,f,g)=>a.mold_id==g.id)
|
||||||
|
.Where((a, b) => a.workstation_id == input.stationId && a.mo_task_status != DictConst.ToBeScheduledEncode )
|
||||||
|
.Select((a, b, c, d, e,f,g) => new PADPackageTaskPageOutput
|
||||||
|
{
|
||||||
|
id = a.id,
|
||||||
|
mo_task_code = a.mo_task_code,
|
||||||
|
mo_id = a.mo_id,
|
||||||
|
material_id = a.material_id,
|
||||||
|
material_code = b.code,
|
||||||
|
material_name = b.name,
|
||||||
|
workline_id = a.workline_id,
|
||||||
|
workline_name = d.FullName,
|
||||||
|
bom_id = a.bom_id,
|
||||||
|
mo_task_status = e.FullName,
|
||||||
|
complete_qty = SqlFunc.IsNull(a.reported_work_qty,0) + SqlFunc.IsNull(a.scrap_qty,0),
|
||||||
|
scrap_qty = a.scrap_qty,
|
||||||
|
scheduled_qty = a.scheduled_qty,
|
||||||
|
reported_work_qty = a.reported_work_qty,
|
||||||
|
estimated_start_date = a.estimated_start_date==null ? "" : a.estimated_start_date.Value.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||||
|
estimated_end_date = a.estimated_end_date==null ? "" : a.estimated_end_date.Value.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||||
|
parent_id = a.parent_id,
|
||||||
|
process_id = a.process_id,
|
||||||
|
process_name = c.process_name,
|
||||||
|
mbom_process_id = a.mbom_process_id,
|
||||||
|
create_time = a.create_time,
|
||||||
|
equip_id = a.eqp_id,
|
||||||
|
equip_code = f.code,
|
||||||
|
equip_name = f.name,
|
||||||
|
mold_id = a.mold_id,
|
||||||
|
mold_code = g.mold_code,
|
||||||
|
mold_name = g.mold_name,
|
||||||
|
schedule_type = a.schedule_type,
|
||||||
|
})
|
||||||
|
.MergeTable()
|
||||||
|
.OrderByDescending((a) => a.create_time)
|
||||||
|
.ToPagedListAsync(input.currentPage, input.pageSize);
|
||||||
|
|
||||||
|
return PageResult<PADPackageTaskPageOutput>.SqlSugarPageResult(result);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 上模校验
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
|
|||||||
Reference in New Issue
Block a user