optimize
wet 2 years ago
parent cd34fa91fe
commit bcd0773865

@ -1285,18 +1285,20 @@ namespace Myshipping.Application
{
return _goodsStatusConfig.AsQueryable().LeftJoin(_goodsStatus.AsQueryable(), (config, goods) => config.Id == goods.ConfigId).Where((config, goods) => config.CreatedUserId == userid).
Select((config, goods) => new GoodsStatusQuery
{
ConfigId = config.Id,
StatusName = config.StatusName,
FinishTime = goods.FinishTime,
FinishUser = goods.FinishUser,
FinishUserId = goods.FinishUserId,
IsPublic = goods.IsPublic,
ExtData = goods.ExtData,
Remark = goods.Remark
OrderBy((config, goods) => config.Sort).
Select((config, goods) => new GoodsStatusQuery
{
ConfigId = config.Id,
SystemCode = config.SystemCode,
StatusName = config.StatusName,
FinishTime = goods.FinishTime,
FinishUser = goods.FinishUser,
FinishUserId = goods.FinishUserId,
IsPublic = goods.IsPublic,
ExtData = goods.ExtData,
Remark = goods.Remark
}).ToList();
})
@ -4952,25 +4954,27 @@ namespace Myshipping.Application
if (userid != null)
{
List<GoodsStatusQuery> Goodslist = new List<GoodsStatusQuery>();
Goodslist = await _goodsStatusConfig.AsQueryable().LeftJoin(_goodsStatus.AsQueryable(), (config, goods) => config.Id == goods.ConfigId).Where((config, goods) => config.CreatedUserId == userid).
Select((config, goods) => new GoodsStatusQuery
{
ConfigId = config.Id,
StatusName = config.StatusName,
FinishTime = goods.FinishTime,
FinishUser = goods.FinishUser,
FinishUserId = goods.FinishUserId,
IsPublic = goods.IsPublic,
ExtData = goods.ExtData,
Remark = goods.Remark
Goodslist = await _goodsStatusConfig.AsQueryable().LeftJoin(_goodsStatus.AsQueryable(), (config, goods) => config.Id == goods.ConfigId).Where((config, goods) => config.CreatedUserId == userid).
OrderBy((config, goods) => config.Sort).
Select((config, goods) => new GoodsStatusQuery
{
ConfigId = config.Id,
SystemCode = config.SystemCode,
StatusName = config.StatusName,
FinishTime = goods.FinishTime,
FinishUser = goods.FinishUser,
FinishUserId = goods.FinishUserId,
IsPublic = goods.IsPublic,
ExtData = goods.ExtData,
Remark = goods.Remark
}).ToListAsync();
}).ToListAsync();
allData.GoodsStatus = Goodslist;
}
return allData;
}

@ -66,6 +66,10 @@ namespace Myshipping.Application.Service.BookingOrder.Dto
/// 状态名称
/// </summary>
public string StatusName { get; set; }
/// <summary>
/// 系统编码
/// </summary>
public string SystemCode { get; set; }
/// <summary>
/// 完成时间

Loading…
Cancel
Save