|
|
@@ -2494,7 +2494,19 @@ namespace BPA.SAAS.Manage.Application.DataBase.Services |
|
|
|
var stopInfo = JsonConvert.DeserializeObject<ResultSAASManageDto<StoreDto>>(HttpHelper.HttpGet(url, null, dic, "application/json")); |
|
|
|
if (stopInfo?.data == null) |
|
|
|
throw Oops.Oh("店铺不存在!"); |
|
|
|
var goodInfoList = exportDto.GoodId != null ? await _db.Queryable<BPA_GoodsInfo>().Where(t => t.Id == exportDto.GoodId).ToListAsync() : await _db.Queryable<BPA_GoodsInfo>().Where(t => exportDto.GoodsId.Contains(t.Id)).ToListAsync(); |
|
|
|
var goodInfoList = new List<BPA_GoodsInfo>(); |
|
|
|
if (exportDto.GoodsId.Any()) |
|
|
|
goodInfoList = await _db.Queryable<BPA_GoodsInfo>().Where(t => exportDto.GoodsId.Contains(t.Id)).ToListAsync(); |
|
|
|
else |
|
|
|
{ |
|
|
|
if (exportDto.GoodId != null) |
|
|
|
goodInfoList = await _db.Queryable<BPA_GoodsInfo>().Where(t => t.Id == exportDto.GoodId).ToListAsync(); |
|
|
|
else |
|
|
|
{ |
|
|
|
var goodIds = await _db.Queryable<BPA_GoodsTechnologyAction>().Where(t => t.DeviceId == exportDto.DeviceId).Select(q => q.GoodsId).Distinct().ToListAsync(); |
|
|
|
goodInfoList = await _db.Queryable<BPA_GoodsInfo>().Where(t => goodIds.Contains(t.Id)).ToListAsync(); |
|
|
|
} |
|
|
|
} |
|
|
|
if (goodInfoList.Count == 0) |
|
|
|
{ |
|
|
|
var templateUrl = "https://bpa.oss-cn-chengdu.aliyuncs.com/hkerp/test/goods//商品模版.xlsx"; |
|
|
|