Commit e92f4cc9 by 泽锋 李

fix

parent 57cf9af2
...@@ -83,6 +83,11 @@ namespace AutoTurnOver.Models ...@@ -83,6 +83,11 @@ namespace AutoTurnOver.Models
/// </summary> /// </summary>
public decimal quantity_safe_inventory { get; set; } public decimal quantity_safe_inventory { get; set; }
/// <summary>
/// 日均加权销量
/// </summary>
public decimal daily_weighted_sales { get; set; }
/// <summary> /// <summary>
/// 备注 /// 备注
......
...@@ -23,7 +23,7 @@ namespace AutoTurnOver.Purchase.AverageTarget ...@@ -23,7 +23,7 @@ namespace AutoTurnOver.Purchase.AverageTarget
Console.WriteLine("采购平均值计算任务启动..."); Console.WriteLine("采购平均值计算任务启动...");
try try
{ {
//report.ResetTransExpectArrivaltime(); report.ResetTransExpectArrivaltime();
//PurchaseAverageTargetServices.CalculationTransfer("LM-EO-007", days: (360 * 3)); //PurchaseAverageTargetServices.CalculationTransfer("LM-EO-007", days: (360 * 3));
} }
catch (Exception ex) catch (Exception ex)
......
...@@ -186,6 +186,30 @@ namespace AutoTurnOver.Services ...@@ -186,6 +186,30 @@ namespace AutoTurnOver.Services
{ {
dc_auto_purchase_advise_detailed_search_dto search_data = par_json.ToObject<dc_auto_purchase_advise_detailed_search_dto>(); dc_auto_purchase_advise_detailed_search_dto search_data = par_json.ToObject<dc_auto_purchase_advise_detailed_search_dto>();
if (search_data.is_delete != 0)
{
if(search_data.end_date==null || search_data.start_date==null)
{
throw new Exception("导已过期的数据务必带上时间范围");
}
double days = 31;
try
{
days = (search_data.end_date.Value - search_data.start_date.Value).TotalDays;
}
catch (Exception)
{
}
if (days >= 30)
{
throw new Exception("已经过期的数据时间范围不可超过30天");
}
}
Console.WriteLine("DownloadStock - 开始生成文件"); Console.WriteLine("DownloadStock - 开始生成文件");
var memory = new PurchaseAdviseServices().Export(search_data); var memory = new PurchaseAdviseServices().Export(search_data);
Console.WriteLine("DownloadStock - 开始生成上传文件"); Console.WriteLine("DownloadStock - 开始生成上传文件");
......
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