Commit d8c37074 by 泽锋 李

fix

parent 6f801a1d
......@@ -529,6 +529,7 @@ namespace AutoTurnOver.Services
err_datas.AddRange(result.objData);
}
page++;
}
......@@ -540,16 +541,25 @@ namespace AutoTurnOver.Services
/// </summary>
private static ShortagePush_ResponseDto ShortagePushApi(ShortagePush_RequestDto data)
{
//string url = ConfigHelper.GetValue("PPS_ShortagePush");
string url = ConfigHelper.GetValue("PPS_ShortagePush2");
//string resultStr1 = HttpHelper.Request(url2, RequestType.POST, data.ToJson(), timeout: 1000 * 60 * 60 * 24, entype: "application/json");
string resultStr = HttpHelper.Request(url, RequestType.POST, data.ToJson(), timeout: 1000 * 60 * 60 * 24, entype: "application/json");
var result = resultStr.ToObj<ShortagePush_ResponseDto>();
if (result == null)
try
{
throw new Exception("刊登系统异常: 推送失败");
//string url = ConfigHelper.GetValue("PPS_ShortagePush");
string url = ConfigHelper.GetValue("PPS_ShortagePush2");
//string resultStr1 = HttpHelper.Request(url2, RequestType.POST, data.ToJson(), timeout: 1000 * 60 * 60 * 24, entype: "application/json");
string resultStr = HttpHelper.Request(url, RequestType.POST, data.ToJson(), timeout: 1000 * 60 * 60 * 24, entype: "application/json");
var result = resultStr.ToObj<ShortagePush_ResponseDto>();
if (result == null)
{
throw new Exception("刊登系统异常: 推送失败");
}
return result;
}
return result;
catch (Exception ex)
{
throw;
}
}
/// <summary>
......
......@@ -327,6 +327,15 @@ namespace AutoTurnOver.Services
/// </summary>
public async Task<string> DownloadAuto(string par_json, dc_task_download download_data)
{
if (string.IsNullOrWhiteSpace(download_data.parameter_show))
{
var now = DateTime.Now;
if(now.Hour>8 && now.Hour < 20)
{
throw new Exception($" 8~20点之间导周转表数据,务必带参数 ");
}
}
Condition_AutoTurnOver search_data = par_json.ToObject<Condition_AutoTurnOver>();
Console.WriteLine("DownloadStock - 开始生成文件");
int rows = 0;
......
......@@ -24,6 +24,8 @@ namespace ShortagePush
//new ReportServices().ReturnGoodsPush();
//new ReportServices().ShortagePushEbay();
//new ReportServices().PPSReturnGoodsPush("walmart");
//new ReportServices().ShortagePushEbay(true);
}
catch (Exception ex)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment