任务单操作记录列表修改
This commit is contained in:
@@ -59,7 +59,7 @@ namespace Tnb.ProductionMgr
|
|||||||
{
|
{
|
||||||
Dictionary<string, string>? queryJson = !string.IsNullOrEmpty(input.queryJson) ? Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<string, string>>(input.queryJson) : new Dictionary<string, string>();
|
Dictionary<string, string>? queryJson = !string.IsNullOrEmpty(input.queryJson) ? Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<string, string>>(input.queryJson) : new Dictionary<string, string>();
|
||||||
string moCode = queryJson.ContainsKey("mo_task_code") ? queryJson["mo_task_code"].ToString() : "";
|
string moCode = queryJson.ContainsKey("mo_task_code") ? queryJson["mo_task_code"].ToString() : "";
|
||||||
List<PrdMoTaskTreeOutput> list = await _repository.AsSugarClient().Queryable<PrdMoTask>()
|
var list = await _repository.AsSugarClient().Queryable<PrdMoTask>()
|
||||||
.LeftJoin<BasMaterial>((a, b) => a.material_id == b.id)
|
.LeftJoin<BasMaterial>((a, b) => a.material_id == b.id)
|
||||||
.LeftJoin<ToolMolds>((a, b, c) => a.mold_id == c.id)
|
.LeftJoin<ToolMolds>((a, b, c) => a.mold_id == c.id)
|
||||||
.LeftJoin<EqpEquipment>((a, b, c, d) => a.eqp_id == d.id)
|
.LeftJoin<EqpEquipment>((a, b, c, d) => a.eqp_id == d.id)
|
||||||
@@ -78,20 +78,20 @@ namespace Tnb.ProductionMgr
|
|||||||
estimated_start_date = a.estimated_start_date!.ToString(),
|
estimated_start_date = a.estimated_start_date!.ToString(),
|
||||||
estimated_end_date = a.estimated_end_date.ToString(),
|
estimated_end_date = a.estimated_end_date.ToString(),
|
||||||
create_time = a.create_time.ToString()
|
create_time = a.create_time.ToString()
|
||||||
}).ToListAsync();
|
}).ToPagedListAsync(input.currentPage, input.pageSize);
|
||||||
List<PrdMoTaskTreeOutput> treeList = list.ToTree();
|
// List<PrdMoTaskTreeOutput> treeList = list.ToTree();
|
||||||
treeList = treeList.Skip((input.currentPage - 1) * input.pageSize).Take(input.pageSize).ToList();
|
// treeList = treeList.Skip((input.currentPage - 1) * input.pageSize).Take(input.pageSize).ToList();
|
||||||
SqlSugarPagedList<PrdMoTaskTreeOutput> pagedList = new()
|
// SqlSugarPagedList<PrdMoTaskTreeOutput> pagedList = new()
|
||||||
{
|
// {
|
||||||
list = treeList,
|
// list = treeList,
|
||||||
pagination = new Pagination
|
// pagination = new Pagination
|
||||||
{
|
// {
|
||||||
CurrentPage = input.currentPage,
|
// CurrentPage = input.currentPage,
|
||||||
PageSize = input.pageSize,
|
// PageSize = input.pageSize,
|
||||||
Total = treeList.Count
|
// Total = treeList.Count
|
||||||
}
|
// }
|
||||||
};
|
// };
|
||||||
return PageResult<PrdMoTaskTreeOutput>.SqlSugarPageResult(pagedList);
|
return PageResult<PrdMoTaskTreeOutput>.SqlSugarPageResult(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
|
|||||||
Reference in New Issue
Block a user