Commit bee3b13d by 泽锋 李

fix

parent 665dbe13
...@@ -729,7 +729,7 @@ where t1.bailun_sku=@bailun_sku and t1.warehouse_code=@warehouse_code and t1.isp ...@@ -729,7 +729,7 @@ where t1.bailun_sku=@bailun_sku and t1.warehouse_code=@warehouse_code and t1.isp
/// </summary> /// </summary>
public static void SynchroTransferTransportType() public static void SynchroTransferTransportType()
{ {
var task_name = $"SynchroTransferTransportType_v1"; var task_name = $"SynchroTransferTransportType_v2";
var conn = MyMySqlConnection._connection; ; var conn = MyMySqlConnection._connection; ;
// 查询最后一次成功抓取的记录 // 查询最后一次成功抓取的记录
var last_task_synchro_log = conn.QuerySingleOrDefault<task_synchro_log>(" select * from task_synchro_log where task_name=@task_name and status=1 order by end_time desc limit 1 ", new { task_name = task_name }); var last_task_synchro_log = conn.QuerySingleOrDefault<task_synchro_log>(" select * from task_synchro_log where task_name=@task_name and status=1 order by end_time desc limit 1 ", new { task_name = task_name });
...@@ -766,7 +766,37 @@ order by t1.gmt_modified asc ...@@ -766,7 +766,37 @@ order by t1.gmt_modified asc
{ {
try try
{ {
ApiUtility.GetLmsTransportCountList(new Models.ApiDto.api_transport_count_order_transfer_query_dto { bailun_sku = orderItem.bailun_sku, targetwareno = orderItem .warehouse_code}); var lmsTransportCountDatas = ApiUtility.GetLmsTransportCountList(new Models.ApiDto.api_transport_count_order_transfer_query_dto { bailun_sku = orderItem.bailun_sku, targetwareno = orderItem .warehouse_code});
if (lmsTransportCountDatas != null && lmsTransportCountDatas.Count >= 1)
{
var lmsTransportCountData = lmsTransportCountDatas.FirstOrDefault();
conn.Execute(@" update dc_average_warehouse set
product_count=@product_count,
product_count_2=@product_count_2,
product_count_3=@product_count_3,
product_count_1=@product_count_1,
order_count=@order_count,
order_count_2=@order_count_2,
order_count_3=@order_count_3,
order_count_1=@order_count_1
where bailun_sku=@bailun_sku and warehouse_code=@warehouse_code
", new
{
bailun_sku = orderItem.bailun_sku,
warehouse_code = orderItem.warehouse_code,
product_count = lmsTransportCountData.product_count,
product_count_2 = lmsTransportCountData.product_count_2,
product_count_3 = lmsTransportCountData.product_count_3,
product_count_1 = lmsTransportCountData.product_count_1,
order_count = lmsTransportCountData.order_count,
order_count_2 = lmsTransportCountData.order_count_2,
order_count_3 = lmsTransportCountData.order_count_3,
order_count_1 = lmsTransportCountData.order_count_1
});
}
} }
catch (Exception ex) 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