소스 검색

后厨商品下载优化20241113

kitchenmanage
gwbvipvip 1 개월 전
부모
커밋
14726a34f9
1개의 변경된 파일13개의 추가작업 그리고 1개의 파일을 삭제
  1. +13
    -1
      BPA.SAAS.Manage.Application/DataBase/Services/GoodsService.cs

+ 13
- 1
BPA.SAAS.Manage.Application/DataBase/Services/GoodsService.cs 파일 보기

@@ -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";


불러오는 중...
취소
저장