Commit 3567a1e4 by 泽锋 李

记录队列来源

parent 62a1b395
...@@ -1807,7 +1807,8 @@ and start_date<=@end_date and end_date>=@start_date ...@@ -1807,7 +1807,8 @@ and start_date<=@end_date and end_date>=@start_date
consume_date = null, consume_date = null,
error_stack_trace ="", error_stack_trace ="",
message = new { bailun_sku= data.bailun_sku, warehouse_code= data.warehouse_code }.ToJson(), message = new { bailun_sku= data.bailun_sku, warehouse_code= data.warehouse_code }.ToJson(),
type = "刷新周转表" type = "刷新周转表",
remarks = "配置预测销量"
}); });
} }
return ""; return "";
......
...@@ -205,7 +205,8 @@ and bailun_order_status !='Canceled' ...@@ -205,7 +205,8 @@ and bailun_order_status !='Canceled'
consume_date = null, consume_date = null,
error_stack_trace = "", error_stack_trace = "",
message = new { bailun_sku = logData.bailun_sku, warehouse_code = logData.to_warehouse_code }.ToJson(), message = new { bailun_sku = logData.bailun_sku, warehouse_code = logData.to_warehouse_code }.ToJson(),
type = "刷新周转表" type = "刷新周转表",
remarks = "转仓任务"
}); });
......
...@@ -507,7 +507,8 @@ from dc_auto_turnover as dat ...@@ -507,7 +507,8 @@ from dc_auto_turnover as dat
consume_date = null, consume_date = null,
error_stack_trace = "", error_stack_trace = "",
message = new { bailun_sku = item.bailun_sku, warehouse_code = item.warehouse_code }.ToJson(), message = new { bailun_sku = item.bailun_sku, warehouse_code = item.warehouse_code }.ToJson(),
type = "刷新周转表" type = "刷新周转表",
remarks = "刷新已停止监控的历史数据"
}); });
} }
} }
...@@ -1106,7 +1107,8 @@ from dc_auto_turnover where gmt_modified>=@btime and gmt_modified<=@etime ...@@ -1106,7 +1107,8 @@ from dc_auto_turnover where gmt_modified>=@btime and gmt_modified<=@etime
consume_date = null, consume_date = null,
error_stack_trace = "", error_stack_trace = "",
message = new { bailun_sku = bailun_sku, warehouse_code = warehouse_code }.ToJson(), message = new { bailun_sku = bailun_sku, warehouse_code = warehouse_code }.ToJson(),
type = "刷新周转表" type = "刷新周转表",
remarks = "采购单更新"
}); });
} }
......
...@@ -16,5 +16,6 @@ namespace AutoTurnOver.Models ...@@ -16,5 +16,6 @@ namespace AutoTurnOver.Models
public DateTime? consume_date { get; set; } public DateTime? consume_date { get; set; }
public string error_message { get; set; } public string error_message { get; set; }
public string error_stack_trace { get; set; } public string error_stack_trace { get; set; }
public string remarks { get; set; }
} }
} }
...@@ -22,7 +22,7 @@ namespace AutoTurnOver.Purchase.AverageTarget ...@@ -22,7 +22,7 @@ namespace AutoTurnOver.Purchase.AverageTarget
try try
{ {
Console.WriteLine($"开始 init ,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}"); Console.WriteLine($"开始 init ,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
PurchaseAverageTargetServices.CalculationTransfer(days:360); //PurchaseAverageTargetServices.CalculationTransfer(days:360);
Console.WriteLine($"结束 init,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}"); Console.WriteLine($"结束 init,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
} }
catch (Exception ex) catch (Exception ex)
......
...@@ -31,7 +31,7 @@ namespace AutoTurnOver.Purchase.AverageTarget ...@@ -31,7 +31,7 @@ namespace AutoTurnOver.Purchase.AverageTarget
//PurchaseAverageTargetServices.CalculationTransfer(); //PurchaseAverageTargetServices.CalculationTransfer();
//report.ResetTransExpectArrivaltime(); //report.ResetTransExpectArrivaltime();
//dc_auto_return_goods_config_dao.NewCalculation(); //dc_auto_return_goods_config_dao.NewCalculation();
//PurchaseAverageTargetServices.Calculation("950282301", days: 360); PurchaseAverageTargetServices.Calculation("950282301", days: 360);
//PurchaseAverageTargetServices.CalculationTransfer("942517901", 360); //PurchaseAverageTargetServices.CalculationTransfer("942517901", 360);
} }
catch (Exception ex) catch (Exception ex)
......
...@@ -802,7 +802,8 @@ namespace AutoTurnOver.Services ...@@ -802,7 +802,8 @@ namespace AutoTurnOver.Services
consume_date = null, consume_date = null,
error_stack_trace = "", error_stack_trace = "",
message = new { bailun_sku = bailun_sku, warehouse_code = warehouse_code }.ToJson(), message = new { bailun_sku = bailun_sku, warehouse_code = warehouse_code }.ToJson(),
type = "刷新周转表" type = "刷新周转表",
remarks = "配置预测销量"
}); });
......
...@@ -195,7 +195,15 @@ where t1.bailun_sku=@bailun_sku and t1.warehouse_code=@warehouse_code and t1.isp ...@@ -195,7 +195,15 @@ where t1.bailun_sku=@bailun_sku and t1.warehouse_code=@warehouse_code and t1.isp
// 平均采购交期 // 平均采购交期
var temp_delivery_days = delivery_days / purchaseList.Count; var temp_delivery_days = delivery_days / purchaseList.Count;
data.delivery_days = temp_delivery_days; data.delivery_days = temp_delivery_days;
data.payment_type = sum_pay_days / sum_pay_day_count; if(sum_pay_day_count>0 && sum_pay_days > 0)
{
data.payment_type = sum_pay_days / sum_pay_day_count;
}
else
{
data.payment_type = 0;
}
data.virtual_delivery_days = temp_delivery_days; data.virtual_delivery_days = temp_delivery_days;
data.payment_type = purchaseList.Any(s => s.pay_type == 1) ? 1 : 2; data.payment_type = purchaseList.Any(s => s.pay_type == 1) ? 1 : 2;
...@@ -215,7 +223,8 @@ where t1.bailun_sku=@bailun_sku and t1.warehouse_code=@warehouse_code and t1.isp ...@@ -215,7 +223,8 @@ where t1.bailun_sku=@bailun_sku and t1.warehouse_code=@warehouse_code and t1.isp
consume_date = null, consume_date = null,
error_stack_trace = "", error_stack_trace = "",
message = new { bailun_sku = data.bailun_sku, warehouse_code = data.warehouse_code }.ToJson(), message = new { bailun_sku = data.bailun_sku, warehouse_code = data.warehouse_code }.ToJson(),
type = "刷新周转表" type = "刷新周转表",
remarks = "重算采购平均交期"
}); });
task_log.Count++; task_log.Count++;
...@@ -528,7 +537,8 @@ where t1.bailun_sku=@bailun_sku and t1.warehouse_code=@warehouse_code and t1.isp ...@@ -528,7 +537,8 @@ where t1.bailun_sku=@bailun_sku and t1.warehouse_code=@warehouse_code and t1.isp
consume_date = null, consume_date = null,
error_stack_trace = "", error_stack_trace = "",
message = new { bailun_sku = dataWarehouse.bailun_sku, warehouse_code = dataWarehouse.warehouse_code }.ToJson(), message = new { bailun_sku = dataWarehouse.bailun_sku, warehouse_code = dataWarehouse.warehouse_code }.ToJson(),
type = "刷新周转表" type = "刷新周转表",
remarks = "重算调拨平均交期"
}); });
} }
......
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