using Quartz;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using XYY.Tool.TimingTask.jobs;
namespace XYY.Tool.QuotaReduction
{
public static class JobConfig
{
#region 链接配置
private static string host_9521 = "http://120.24.149.148:9521/api/";//120.24.149.148:9521
private static string host_9513 = "http://120.24.149.148:9513/api/";
private static string host_9518 = "http://120.24.149.148:9518/api/";
private static string host_9503 = "http://120.24.149.148:9503/api/";
private static string host_smp = "http://api.smp.xingyunyi.cn/";
private static string host_9520 = "http://120.24.149.148:9520/api/";//120.24.149.148
#if DEBUG
//host_9521= "http://localhost:9521/api/";
//host_9518 = "http://localhost:9518/api/";
#endif
#region QuotaReductionJob 取消授信
public static string QuotaReductionJobApi => $"{host_9521}CustomerAccount/QuotaReduction";
///
/// 重试次数,不含首次请求
///
public static int QuotaReductionJobTryTime => 3;
///
/// 时间间隔,毫秒
///
public static int QuotaReductionJobTryTimeInterval => 300000;
#endregion
#region 消息发送请求
public static string dingdingApi => "http://120.24.149.148:9505/WarningNotice/NoticeText";
public static string weChatApi => "http://120.24.149.148:9505/WarningNotice/NoticeTextToUser";
///
/// 重试次数,不含首次请求
///
public static int dingdingTryTime => 3;
///
/// 时间间隔,毫秒
///
public static int dingdingTryTimeInterval => 300000;
#endregion
#region GenerateFirstBillsJob 生成帐单
public static string GenerateFirstBillsJobApi => $"{host_9521}FiannceCustomerDeliveryBill/GenerateFirstBills";
public static string AlertFreezeCustomerJobApi => $"{host_9513}Customer/AlertFreezeCustomer?days=18";
public static string ReChargeJobApi => $"{host_9503}ExpressFee/Charges";
public static string ReloadExecuteAsEmptyApi => $"{host_smp}FinanceTask/ReloadExecuteAsEmpty";
///
/// 重试次数,不含首次请求
///
public static int GenerateFirstBillsJobTryTime => 3;
///
/// 时间间隔,毫秒
///
public static int GenerateFirstBillsJobTryTimeInterval => 300000;
#endregion
#region PB相关
public static string PBPostManifestAction => $"{host_9518}order/PostManifest";
#endregion
#region 燃油附加费同步
public static string FedexSurchargesSyncApi => $"{host_9521}ExpressageThirdPartyData/FedexSurchargesSync";
public static string DHLSurchargesSyncApi => $"{host_9521}ExpressageThirdPartyData/DHLSurchargesSync";
#endregion
#region 结算价自动生成客户报价文件
public static string GenerateQuotationApi => $"{host_9521}ExpressBulkAdjustmentQuote/GenerateQuotation";
//先按5个一批执行
public static string GenerateCustomerFileApi => $"{host_9521}ExpressBulkAdjustmentQuote/GenerateCustomerFile?fileCount=5";
public static string GenerateZipFileApi => $"{host_9521}ExpressBulkAdjustmentQuote/GenerateZipFile";
#endregion
#region 提单轨迹任务更新
public static string Lading51TrackApi => $"{host_9520}BatchTracking/Lading51Track";//Lading51Track
#endregion
#region 汇率同步任务
public static string ExchangeRateSyncApi => $"{host_9521}ExpressageThirdPartyData/ExchangeRateSync";
#endregion
#region 订单邮件发送服务
public static string OrderMailSendApi => $"{host_9520}TrackingMail/OrderMailSend?qty=300";
public static string OrderSingMailAddApi => $"{host_9520}TrackingMail/OrderSingMailAdd?day=7";
#endregion
#region ESB轨迹任务
public static string PushESBTrackMonitorApi => $"{host_9520}ESB/ESBTrackMonitor";
#endregion
#endregion
public static IJobDetail[] jobs
{
get
{
return new IJobDetail[]
{
JobBuilder.Create().Build(),
JobBuilder.Create().Build(),
JobBuilder.Create().Build(),
JobBuilder.Create().Build(),
JobBuilder.Create().Build(),
//JobBuilder.Create().Build(),//改到调度任务中执行
//报价文件任务 start
JobBuilder.Create().Build(),
JobBuilder.Create().Build(),
JobBuilder.Create().Build(),
//报价文件任务 end
JobBuilder.Create().Build(),
JobBuilder.Create().Build(),
//JobBuilder.Create().Build(),//停止服务,手动填写
JobBuilder.Create().Build(),
//JobBuilder.Create().Build(),//改到调度任务中执行
//订单邮件任务
JobBuilder.Create().Build(),
JobBuilder.Create().Build(),
//ESB轨迹监控通知
JobBuilder.Create().Build(),
};
}
}
public static string[] crons
{
get
{
return new string[]
{
//"0 0/2 * * * ?",//每1分钟执行,测试用
"0 0 0 */1 * ?",//每天零点执行
"0 0 0 */1 * ?",//每天零点执行
"0 0 9 * * ?",//每天9点执行
"0 0 0 */1 * ?",//每天零点执行
"0 0 2 * * ?",//每天2点执行
//"0 0 5 * * ?",//每天5点执行
"0 0/3 * * * ?",//每3分钟执行
"0 0/10 * * * ?",//每10分钟执行
"0 0/20 * * * ?",//每20分钟执行
"0 0 5 * * ?",//每天5点执行
"0 0 5 * * ?",//每天9点执行
//"0 0 */1 * * ?",//每1小时执行
//"0 0 */1 * * ?",//Lading51TrackJob 每1小时执行
"0 0 0/1 * * ?",
//"0 0 0/6 * * ?",//每六小时执行一次,汇率同步
"0 0/5 * * * ?",//每5分钟一次,邮件发送
"0 0 */10 * * ?",//每10小时执行,邮件签收添加
"0 0 10 * * ?"//异常轨迹推送接口
};
}
}
}
}