|
|
|
@ -1290,9 +1290,10 @@ namespace Myshipping.Application
|
|
|
|
|
if (userid != null)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
var list= 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
|
|
|
|
|
var list= await _goodsStatus.AsQueryable().LeftJoin(_goodsStatusConfig.AsQueryable(),
|
|
|
|
|
( goods,config) => config.Id == goods.ConfigId).Where((goods,config ) => config.CreatedUserId == userid&& goods.bookingId==bookingId).
|
|
|
|
|
OrderBy((goods, config) => config.Sort).
|
|
|
|
|
Select((goods, config) => new GoodsStatusQuery
|
|
|
|
|
{
|
|
|
|
|
ConfigId = config.Id,
|
|
|
|
|
SystemCode = config.SystemCode,
|
|
|
|
@ -1306,7 +1307,27 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
}).ToListAsync();
|
|
|
|
|
|
|
|
|
|
return list.DistinctBy(x => x.ConfigId);
|
|
|
|
|
var config = _goodsStatusConfig.AsQueryable().Where(config => config.CreatedUserId == userid).ToList().Select(config => new GoodsStatusQuery
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
ConfigId = config.Id,
|
|
|
|
|
SystemCode = config.SystemCode,
|
|
|
|
|
StatusName = config.StatusName,
|
|
|
|
|
FinishTime = null,
|
|
|
|
|
FinishUser = null,
|
|
|
|
|
FinishUserId = null,
|
|
|
|
|
IsPublic = false,
|
|
|
|
|
ExtData = null,
|
|
|
|
|
Remark = null
|
|
|
|
|
}).ToList();
|
|
|
|
|
|
|
|
|
|
foreach (var item in list)
|
|
|
|
|
{
|
|
|
|
|
config.RemoveAll(x => x.ConfigId==item.ConfigId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return list.Union<dynamic>(config);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return null;
|
|
|
|
@ -4963,10 +4984,12 @@ namespace Myshipping.Application
|
|
|
|
|
if (userid != null)
|
|
|
|
|
{
|
|
|
|
|
_GoodsConfig.InitGoodsStatusConfig();
|
|
|
|
|
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).
|
|
|
|
|
OrderBy((config, goods) => config.Sort).
|
|
|
|
|
Select((config, goods) => new GoodsStatusQuery
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var GoodsStatus = await _goodsStatus.AsQueryable().LeftJoin(_goodsStatusConfig.AsQueryable(),
|
|
|
|
|
(goods, config) => config.Id == goods.ConfigId).Where((goods, config) => config.CreatedUserId == userid && goods.bookingId == bookingId).
|
|
|
|
|
OrderBy((goods, config) => config.Sort).
|
|
|
|
|
Select((goods, config) => new GoodsStatusQuery
|
|
|
|
|
{
|
|
|
|
|
ConfigId = config.Id,
|
|
|
|
|
SystemCode = config.SystemCode,
|
|
|
|
@ -4980,8 +5003,29 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
}).ToListAsync();
|
|
|
|
|
|
|
|
|
|
var config = _goodsStatusConfig.AsQueryable().Where(config => config.CreatedUserId == userid).ToList().Select(config => new GoodsStatusQuery
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
ConfigId = config.Id,
|
|
|
|
|
SystemCode = config.SystemCode,
|
|
|
|
|
StatusName = config.StatusName,
|
|
|
|
|
FinishTime = null,
|
|
|
|
|
FinishUser = null,
|
|
|
|
|
FinishUserId = null,
|
|
|
|
|
IsPublic = false,
|
|
|
|
|
ExtData = null,
|
|
|
|
|
Remark = null
|
|
|
|
|
}).ToList();
|
|
|
|
|
|
|
|
|
|
foreach (var item in GoodsStatus)
|
|
|
|
|
{
|
|
|
|
|
config.RemoveAll(x => x.ConfigId == item.ConfigId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
allData.GoodsStatus = Goodslist;
|
|
|
|
|
allData.GoodsStatus= GoodsStatus.Union<GoodsStatusQuery>(config).ToList();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|