|
|
|
@ -116,22 +116,39 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
|
|
|
|
|
|
var result = await query.ToQueryPageAsync(querySearch.PageCondition);
|
|
|
|
|
|
|
|
|
|
List<BLIssueManageBaseDto> resultList = new List<BLIssueManageBaseDto>();
|
|
|
|
|
|
|
|
|
|
if (result.Data.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
//var orgIds = result.Data.Select(x => x.SaleDeptId).Distinct();
|
|
|
|
|
//var orgs = await Db.Queryable<SysOrg>().Where(x => orgIds.Contains(x.Id)).Select(x => new { x.Id, x.OrgName }).ToListAsync();
|
|
|
|
|
int start = 1;
|
|
|
|
|
|
|
|
|
|
foreach(var data in result.Data)
|
|
|
|
|
{
|
|
|
|
|
if (data.bl != null && data.bl.Id > 0)
|
|
|
|
|
{
|
|
|
|
|
var currBl = data.Adapt<BLIssueManageBaseDto>();
|
|
|
|
|
|
|
|
|
|
resultList.Add(currBl);
|
|
|
|
|
|
|
|
|
|
//var userIds = result.Data.Select(x => x.CreateBy).Distinct();
|
|
|
|
|
//var users = await Db.Queryable<SysUser>().Where(x => userIds.Contains(x.Id)).Select(x => new { x.Id, x.UserName }).ToListAsync();
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//foreach (var item in result.Data)
|
|
|
|
|
//{
|
|
|
|
|
// item.SaleDeptName = orgs.Find(x => x.Id == item.SaleDeptId)?.OrgName;
|
|
|
|
|
// item.SaleDeptName = users.Find(x => x.Id == item.CreateBy)?.UserName;
|
|
|
|
|
//}
|
|
|
|
|
resultList.Add(new BLIssueManageBaseDto
|
|
|
|
|
{
|
|
|
|
|
Id = start,
|
|
|
|
|
BLNo = data.order.MBLNO,
|
|
|
|
|
CustomerId = data.order.CustomerId,
|
|
|
|
|
CustomerName = data.order.CustomerName,
|
|
|
|
|
SaleId = data.order.SaleId,
|
|
|
|
|
Sale = data.order.Sale,
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
start++;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
return DataResult<List<BLIssueManageBaseDto>>.Success(resultList);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|