This commit is contained in:
qianhao.xu
2024-04-22 10:36:40 +08:00
parent f1507365ed
commit d688fd7f9b
5 changed files with 50 additions and 16 deletions

View File

@@ -101,18 +101,24 @@ namespace ZR.Service.mes.wms
{
Workorder = it.Workorder,
ProductionNum = SqlFunc.AggregateSum(it.ProductionNum ?? 0),
// Result= SqlFunc.AggregateSum(it.Result??0),
Partnumber = SqlFunc.AggregateMax(it.Partnumber)
})
Packnum = SqlFunc.AggregateCount(it.Workorder),
Partnumber = SqlFunc.AggregateMax(it.Partnumber),
CreatedTime= SqlFunc.AggregateMax(it.CreatedTime),
})
.LeftJoin<ProWorkorder_v2>((s, w) => s.Workorder==w.ClientWorkorder)
.Select((s,w)=>new WmFgentryInspect_parentDto
{
Workorder= s.Workorder,
ProductionNum=s.ProductionNum,
Partnumber=s.Partnumber,
ProductDescription=w.ProductDescription,
CreatedTime = s.CreatedTime,
Packnum = s.Packnum,
ProductDescription =w.ProductDescription,
Specifications=w.Specifications,
PreviousNumber = w.PreviousNumber,
Colour = w.Colour
})
.ToList();
@@ -126,7 +132,7 @@ namespace ZR.Service.mes.wms
}
int totalPages = (int)Math.Ceiling((double)inspects.Count / parm.PageSize);
//int totalPages = (int)Math.Ceiling((double)inspects.Count / parm.PageSize);
var pageProducts = inspects.Skip((parm.PageNum - 1) * parm.PageSize).Take(parm.PageSize).ToList();
@@ -134,7 +140,8 @@ namespace ZR.Service.mes.wms
{
PageSize = parm.PageSize,
PageIndex = parm.PageNum,
TotalPage = totalPages,
TotalNum= inspects.Count,
Result = pageProducts
};