Commit 24df6369 by 泽锋 李

fix

parent 2974b094
......@@ -526,13 +526,16 @@ namespace AutoTurnOver.DB
t2.sku as 'bailun_sku',
sum(t2.deliverycount) as 'product_count',
count(DISTINCT t1.`code`) as 'order_count',
sum(case when t1.transporttype='海运' then t2.deliverycount else 0 end) as 'product_count_2',
count(DISTINCT case when t1.transporttype='海运' then t1.`code` else null end) as 'order_count_2',
sum(case when t1.transporttype='空运' then t2.deliverycount else 0 end) as 'product_count_3',
count(DISTINCT case when t1.transporttype='空运' then t1.`code` else null end) as 'order_count_3'
sum(case when t3.transport_type=2 then t2.deliverycount else 0 end) as 'product_count_2',
count(DISTINCT case when t3.transport_type=2 then t1.`code` else null end) as 'order_count_2',
sum(case when t3.transport_type=3 then t2.deliverycount else 0 end) as 'product_count_3',
count(DISTINCT case when t3.transport_type=3 then t1.`code` else null end) as 'order_count_3',
sum(case when t3.transport_type=1 then t2.deliverycount else 0 end) as 'product_count_1',
count(DISTINCT case when t3.transport_type=1 then t1.`code` else null end) as 'order_count_1'
from dc_base_transfer_info as t1
left join dc_base_transfer_info_skus as t2 on t1.dataid = t2.dataid
where t2.sku=@sku and t1.targetwareno=@targetwareno and t1.transporttype in ('空运','海运')
inner join dc_base_lms_channel as t3 on t1.channelname = t3.`name`
where t2.sku=@sku and t1.targetwareno=@targetwareno and t3.transport_type in (1,2,3)
", new {
sku= data.bailun_sku,
targetwareno = data.targetwareno
......
......@@ -26,10 +26,12 @@ namespace AutoTurnOver.Models.ApiDto
/// 产品数量 ( 空运 )
/// </summary>
public int product_count_3 { get; set; }
public int product_count_1 { get; set; }
/// <summary>
/// 订单数量 ( 空运 )
/// </summary>
public int order_count_3 { get; set; }
public int order_count_1 { get; set; }
}
public class api_transport_count_order_transfer_query_dto
......
......@@ -64,10 +64,12 @@ namespace AutoTurnOver.Models
/// 产品数量 ( 空运 )
/// </summary>
public int product_count_3 { get; set; }
public int product_count_1 { get; set; }
/// <summary>
/// 订单数量 ( 空运 )
/// </summary>
public int order_count_3 { get; set; }
public int order_count_1 { get; set; }
public decimal transfer_bale_delivery_ocean { get; set; }
public decimal abroad_inbound_delivery_ocean { get; set; }
public decimal transfer_delivery_ocean { get; set; }
......
......@@ -37,7 +37,7 @@ namespace AutoTurnOver.Purchase.AverageTarget
try
{
Console.WriteLine($"开始 init2 ,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
PurchaseAverageTargetServices.Calculation(days:(360*3));
//PurchaseAverageTargetServices.Calculation(days:(360*3));
Console.WriteLine($"结束 init2,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
}
catch (Exception ex)
......
......@@ -24,8 +24,8 @@ namespace AutoTurnOver.Purchase.AverageTarget
try
{
//report.ResetTransExpectArrivaltime();
//PurchaseAverageTargetServices.CalculationTransfer("LM-EO-007", days: (360 * 3));
//PurchaseAverageTargetServices.Calculation("243903601", days: (360 * 3));
//PurchaseAverageTargetServices.CalculationTransfer("942517901", days: (360 * 3));
//PurchaseAverageTargetServices.Calculation("942517901", days: (360 * 3));
}
catch (Exception ex)
{
......
......@@ -569,9 +569,11 @@ where t1.bailun_sku=@bailun_sku and t1.warehouse_code=@warehouse_code and t1.isp
dataWarehouse.product_count = lmsTransportCountData.product_count;
dataWarehouse.product_count_2 = lmsTransportCountData.product_count_2;
dataWarehouse.product_count_3 = lmsTransportCountData.product_count_3;
dataWarehouse.product_count_1 = lmsTransportCountData.product_count_1;
dataWarehouse.order_count = lmsTransportCountData.order_count;
dataWarehouse.order_count_2 = lmsTransportCountData.order_count_2;
dataWarehouse.order_count_3 = lmsTransportCountData.order_count_3;
dataWarehouse.order_count_1 = lmsTransportCountData.order_count_1;
}
AveragePurchase.Save(dataWarehouse, conn);
......
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