Commit 9ef30b34 by 泽锋 李

无库服装采购加上 甄杰靖

parent 7012c94d
......@@ -20,24 +20,7 @@ namespace AutoGeneratePurchaseAdvise
//purchase_advise.ReplaceLogistics(DateTime.Now);
//purchase_advise.WaitReplaceLogisticsTask();
PurchaseAdviseServices.AutoPushBuySys(1);
Console.WriteLine($"开始推送 手机采购建议任务,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
PurchaseAdviseServices.AutoPushBuySys(3);
Console.WriteLine($"结束推送 手机采购建议任务,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
Console.WriteLine($"开始推送 服装采购建议任务,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
PurchaseAdviseServices.AutoPushBuySys(2);
Console.WriteLine($"结束推送 服装采购建议任务,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
Console.WriteLine($"开始推送 义乌无库仓采购建议任务,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
PurchaseAdviseServices.AutoPushBuySys(6);
Console.WriteLine($"结束推送 义乌无库仓采购建议任务,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
Console.WriteLine($"开始推送 独立站采购建议任务,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
PurchaseAdviseServices.AutoPushBuySys(7);
Console.WriteLine($"结束推送 独立站采购建议任务,线程Id:{Thread.CurrentThread.ManagedThreadId}{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
//PurchaseAdviseServices.Generate(DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd 00:00:00")));
}
catch (Exception ex)
{
......
......@@ -233,7 +233,7 @@ tr_task.transport_type as 'task_transport_type'
where t1.gmt_modified>=@btime
and t6.`status`=2 and (t1.history_fourteenday_sales>0 or t1.quantity_out_stock>0 ) and ( t5.`status`=0 or t5.`status` is null ) and t7.sum_quantity_init_advise>0
and (
( ( t6.buyer_name not in ('赵美聪','张莹霞','张莹霞1','冯兆欣') or t1.warehouse_code not in ('GZBLWH','GZBLYS') ) and t1.warehouse_code!='BLGZ03' )
( ( t6.buyer_name not in ('赵美聪','甄杰靖','张莹霞','张莹霞1','冯兆欣') or t1.warehouse_code not in ('GZBLWH','GZBLYS') ) and t1.warehouse_code!='BLGZ03' )
or
( t1.tag_id > 0 and t8.is_eliminate = 0 )
) -- 非jit 或者 jit 备货
......@@ -247,13 +247,13 @@ tr_task.transport_type as 'task_transport_type'
_connection.Execute(@" update dc_auto_purchase_advise_detailed as t1,
dc_base_sku as t2
set t1.quantity_final_advise=2
where t2.`status`=2 and t1.bailun_sku = t2.bailun_sku and t1.quantity_final_advise=1 and t1.quantity_init_advise<=0 and ( t2.buyer_name not in ('赵美聪','张莹霞','张莹霞1') or t1.warehouse_code!='GZBLWH' ) and t1.main_id=@main_id ", new { main_id = mainID }, commandTimeout: 0);
where t2.`status`=2 and t1.bailun_sku = t2.bailun_sku and t1.quantity_final_advise=1 and t1.quantity_init_advise<=0 and ( t2.buyer_name not in ('赵美聪','甄杰靖','张莹霞','张莹霞1') or t1.warehouse_code!='GZBLWH' ) and t1.main_id=@main_id ", new { main_id = mainID }, commandTimeout: 0);
// 初始建议数为1,,系统建议数为1时 改为3 ( 只补缺货的不管 )
_connection.Execute(@" update dc_auto_purchase_advise_detailed as t1,
dc_base_sku as t2
set quantity_final_advise=3
where t2.`status`=2 and t1.bailun_sku = t2.bailun_sku and quantity_final_advise=1 and quantity_init_advise=1 and ( t2.buyer_name not in ('赵美聪','张莹霞','张莹霞1') or t1.warehouse_code!='GZBLWH' ) and main_id=@main_id ", new { main_id = mainID }, commandTimeout: 0);
where t2.`status`=2 and t1.bailun_sku = t2.bailun_sku and quantity_final_advise=1 and quantity_init_advise=1 and ( t2.buyer_name not in ('赵美聪','甄杰靖','张莹霞','张莹霞1') or t1.warehouse_code!='GZBLWH' ) and main_id=@main_id ", new { main_id = mainID }, commandTimeout: 0);
//张莹霞1 and 广州01 去掉缺货数
_connection.Execute(@" update dc_auto_purchase_advise_detailed as t1,
......@@ -533,7 +533,7 @@ t7.bailun_order_ids
left join dc_auto_config_sku_warehouse as t5 on t1.bailun_sku = t5.bailun_sku and t1.warehouse_code = t5.warehouse_code
left join dc_base_sku as t6 on t1.bailun_sku = t6.bailun_sku
left join dc_mid_transit as t7 on t1.bailun_sku = t7.bailun_sku and t1.warehouse_code = t7.warehouse_code
where t6.`status`=2 and ( t6.buyer_name in ('赵美聪','赵美聪1','秦振荣','李华娟') and t1.warehouse_code in ('BLGZ03','GZBLWH') )
where t6.`status`=2 and ( t6.buyer_name in ('赵美聪','甄杰靖','赵美聪1','秦振荣','李华娟') and t1.warehouse_code in ('BLGZ03','GZBLWH') )
and ( t5.`status`=0 or t5.`status` is null )
and ((case when t7.quantity_out_stock>0 then 0 else (t1.usable_stock+t1.occupy_order) end ) + t7.quantity_transfer + t7.quantity_purchase < t7.quantity_out_stock)
......@@ -789,7 +789,7 @@ t8.bailun_order_ids
left join dc_mid_transit as t7 on t1.bailun_sku = t7.bailun_sku and t1.warehouse_code = t7.warehouse_code
left join ( select bailun_sku,sum(bailun_sku_quantity_ordered) as 'quantity',GROUP_CONCAT(bailun_order_id) as 'bailun_order_ids' from dc_base_oms_sku where warehouse_code in ('BLGZ03') and website='us' and gmt_create>@time and has_scalp=0 and has_buyer_remark = 0
and has_platsku_remark = 0 GROUP BY bailun_sku ) as t8 on t1.bailun_sku =t8.bailun_sku
where t6.`status`=2 and ( t6.buyer_name in ('赵美聪','赵美聪1','秦振荣','李华娟') and t1.warehouse_code in ('BLGZ03') )
where t6.`status`=2 and ( t6.buyer_name in ('赵美聪','甄杰靖','赵美聪1','秦振荣','李华娟') and t1.warehouse_code in ('BLGZ03') )
-- and t6.suppliers_name not in ('深圳市龙岗区平湖欧妮菲制衣厂','深圳市福田区曼戈制衣厂')
and ( t5.`status`=0 or t5.`status` is null ) and t8.quantity>0
......@@ -851,7 +851,7 @@ t8.bailun_order_ids
left join dc_mid_transit as t7 on t1.bailun_sku = t7.bailun_sku and t1.warehouse_code = t7.warehouse_code
left join ( select bailun_sku,sum(bailun_sku_quantity_ordered) as 'quantity',GROUP_CONCAT(bailun_order_id) as 'bailun_order_ids' from dc_base_oms_sku where warehouse_code in ('BLGZ03') and gmt_create>@time and has_scalp=0 and has_buyer_remark = 0
and has_platsku_remark = 0 GROUP BY bailun_sku ) as t8 on t1.bailun_sku =t8.bailun_sku
where t6.`status`=2 and ( t6.buyer_name in ('赵美聪','赵美聪1','秦振荣','李华娟') and t1.warehouse_code in ('BLGZ03') )
where t6.`status`=2 and ( t6.buyer_name in ('赵美聪','甄杰靖','赵美聪1','秦振荣','李华娟') and t1.warehouse_code in ('BLGZ03') )
-- and t6.suppliers_name not in ('深圳市龙岗区平湖欧妮菲制衣厂','深圳市福田区曼戈制衣厂')
and ( t5.`status`=0 or t5.`status` is null ) and t8.quantity>0
......@@ -913,7 +913,7 @@ t8.bailun_order_ids
left join dc_mid_transit as t7 on t1.bailun_sku = t7.bailun_sku and t1.warehouse_code = t7.warehouse_code
left join ( select bailun_sku,sum(bailun_sku_quantity_ordered) as 'quantity',GROUP_CONCAT(bailun_order_id) as 'bailun_order_ids' from dc_base_oms_sku where warehouse_code in ('BLGZ03') and gmt_create>@time and has_scalp=0 and has_buyer_remark = 0
and has_platsku_remark = 0 GROUP BY bailun_sku ) as t8 on t1.bailun_sku =t8.bailun_sku
where t6.`status`=2 and ( t6.buyer_name in ('赵美聪','赵美聪1','秦振荣','李华娟') and t1.warehouse_code in ('BLGZ03') )
where t6.`status`=2 and ( t6.buyer_name in ('赵美聪','甄杰靖','赵美聪1','秦振荣','李华娟') and t1.warehouse_code in ('BLGZ03') )
-- and t6.suppliers_name not in ('深圳市龙岗区平湖欧妮菲制衣厂','深圳市福田区曼戈制衣厂')
and ( t5.`status`=0 or t5.`status` is null ) and t8.quantity>0
......
......@@ -21,10 +21,10 @@ namespace AutoTurnOver.Services
try
{
// 检查是否有可以切换渠道的sku
purchase_advise.ReplaceLogistics(date);
//purchase_advise.ReplaceLogistics(date);
//等待后台重算任务
purchase_advise.WaitReplaceLogisticsTask();
//purchase_advise.WaitReplaceLogisticsTask();
// 创建一个采购计划
var mainID = purchase_advise.Add(new dc_auto_purchase_advise { create_time = DateTime.Now, no = purchase_advise.GenerateOrderNo() ,buy_sys_plan_no = "Generate" });
......
......@@ -19,21 +19,8 @@ namespace ResetOutofstock
var now = DateTime.Now;
//dc_base_supplier_dao.SynchroBailunSupplier();
//dc_auto_pick_up_goods_order_dao.GenerateOrder(DateTime.Now.AddDays(-3), DateTime.Now);
//base_supplier_holiday_time_dao.SynchroData();
//report.ResetCashFlowData();
//report.StockWeekBackUp();
//report.PurchaseWeekBackUp();
//report.CalculationSalesTrend();
//report.PurchaseWeekBackUp();
//report_cash_flow_dao.CalculationTransferOrder(now.AddMonths(-3), DateTime.Parse(now.AddDays(-1).ToString("yyyy-MM-dd 23:59:59")));
//report_cash_flow_dao.SynchroTransferCost();
//dc_auto_pick_up_goods_order_dao.GenerateOrder(DateTime.Now.AddDays(-3), DateTime.Now);
//dc_auto_pick_up_goods_order_dao.GenerateOrder(DateTime.Now.AddDays(-1), DateTime.Now);
//dc_report_finance_dao.CalculationRefund(DateTime.Now.AddYears(-1));
//dc_report_finance_dao.CalculationRaise(DateTime.Now.AddYears(-1));
//dc_report_finance_dao.CalculationAccounts(DateTime.Now.AddYears(-1));
}
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