|
|
@ -47,10 +47,11 @@ namespace Myshipping.Application
|
|
|
|
private readonly SqlSugarRepository<TaskStatManageInfo> _taskStatManageInfoRepository;
|
|
|
|
private readonly SqlSugarRepository<TaskStatManageInfo> _taskStatManageInfoRepository;
|
|
|
|
private readonly SqlSugarRepository<TaskOriginalDownloadHisInfo> _taskOriginalDownloadHisInfoRepository;
|
|
|
|
private readonly SqlSugarRepository<TaskOriginalDownloadHisInfo> _taskOriginalDownloadHisInfoRepository;
|
|
|
|
private readonly IDjyWebsiteAccountConfigService _webAccountConfig;
|
|
|
|
private readonly IDjyWebsiteAccountConfigService _webAccountConfig;
|
|
|
|
|
|
|
|
private readonly ISysCacheService _cache;
|
|
|
|
private readonly ILogger<BookingOrderService> _logger;
|
|
|
|
private readonly ILogger<BookingOrderService> _logger;
|
|
|
|
|
|
|
|
|
|
|
|
const string CONST_WEB_ACCOUNT_TYPE = "CmaWeb";
|
|
|
|
const string CONST_WEB_ACCOUNT_TYPE = "CmaWeb";
|
|
|
|
|
|
|
|
const string CONST_BOOK_ORIGINAL_DOWN_URL_CODE = "bookOriginalDownUrl";
|
|
|
|
|
|
|
|
|
|
|
|
public TaskManageService(SqlSugarRepository<TaskBaseInfo> taskBaseInfoRepository,
|
|
|
|
public TaskManageService(SqlSugarRepository<TaskBaseInfo> taskBaseInfoRepository,
|
|
|
|
SqlSugarRepository<TaskSIFeedBackInfo> taskSIFeedBackInfoRepository,
|
|
|
|
SqlSugarRepository<TaskSIFeedBackInfo> taskSIFeedBackInfoRepository,
|
|
|
@ -63,6 +64,7 @@ namespace Myshipping.Application
|
|
|
|
SqlSugarRepository<TaskStatManageInfo> taskStatManageInfoRepository,
|
|
|
|
SqlSugarRepository<TaskStatManageInfo> taskStatManageInfoRepository,
|
|
|
|
SqlSugarRepository<TaskOriginalDownloadHisInfo> taskOriginalDownloadHisInfoRepository,
|
|
|
|
SqlSugarRepository<TaskOriginalDownloadHisInfo> taskOriginalDownloadHisInfoRepository,
|
|
|
|
IDjyWebsiteAccountConfigService webAccountConfig,
|
|
|
|
IDjyWebsiteAccountConfigService webAccountConfig,
|
|
|
|
|
|
|
|
ISysCacheService cache,
|
|
|
|
ILogger<BookingOrderService> logger)
|
|
|
|
ILogger<BookingOrderService> logger)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_taskBaseInfoRepository = taskBaseInfoRepository;
|
|
|
|
_taskBaseInfoRepository = taskBaseInfoRepository;
|
|
|
@ -76,6 +78,7 @@ namespace Myshipping.Application
|
|
|
|
_taskStatManageInfoRepository = taskStatManageInfoRepository;
|
|
|
|
_taskStatManageInfoRepository = taskStatManageInfoRepository;
|
|
|
|
_taskOriginalDownloadHisInfoRepository = taskOriginalDownloadHisInfoRepository;
|
|
|
|
_taskOriginalDownloadHisInfoRepository = taskOriginalDownloadHisInfoRepository;
|
|
|
|
_webAccountConfig = webAccountConfig;
|
|
|
|
_webAccountConfig = webAccountConfig;
|
|
|
|
|
|
|
|
_cache = cache;
|
|
|
|
|
|
|
|
|
|
|
|
_logger = logger;
|
|
|
|
_logger = logger;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -694,6 +697,12 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
|
|
DateTime startDate = DateTime.Now;
|
|
|
|
DateTime startDate = DateTime.Now;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var downloadUrl = _cache.GetAllDictData().GetAwaiter().GetResult()
|
|
|
|
|
|
|
|
.First(t => t.Code.Equals(CONST_BOOK_ORIGINAL_DOWN_URL_CODE, StringComparison.OrdinalIgnoreCase))?.Value;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(string.IsNullOrWhiteSpace(downloadUrl))
|
|
|
|
|
|
|
|
throw Oops.Bah($"正本下载URL不存在,请确认字典是否配置 code={CONST_BOOK_ORIGINAL_DOWN_URL_CODE}");
|
|
|
|
|
|
|
|
|
|
|
|
TaskOriginalDownloadHisInfo taskOriginalDownloadHisInfo = new TaskOriginalDownloadHisInfo
|
|
|
|
TaskOriginalDownloadHisInfo taskOriginalDownloadHisInfo = new TaskOriginalDownloadHisInfo
|
|
|
|
{
|
|
|
|
{
|
|
|
|
PK_ID = IDGen.NextID().ToString(),
|
|
|
|
PK_ID = IDGen.NextID().ToString(),
|
|
|
@ -710,6 +719,8 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
|
|
//写入记录
|
|
|
|
//写入记录
|
|
|
|
_taskOriginalDownloadHisInfoRepository.Insert(taskOriginalDownloadHisInfo);
|
|
|
|
_taskOriginalDownloadHisInfoRepository.Insert(taskOriginalDownloadHisInfo);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//请求远程链接
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (Exception ex)
|
|
|
|
catch (Exception ex)
|
|
|
|
{
|
|
|
|
{
|
|
|
|