Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
data-center-auto
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bltdc
data-center-auto
Commits
b916fb65
Commit
b916fb65
authored
May 23, 2020
by
泽锋 李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增各种运输方式在途数据
parent
6c0c9aae
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
59 additions
and
22 deletions
+59
-22
GeneratePurchaseAdviseBackgroundService.cs
...PurchaseAdvise/GeneratePurchaseAdviseBackgroundService.cs
+26
-22
Program.cs
AutoGeneratePurchaseAdvise/Program.cs
+1
-0
dc_auto_turnover.cs
AutoTurnOver.DB/dc_auto_turnover.cs
+11
-0
dc_auto_turnover.cs
AutoTurnOver.Models/dc_auto_turnover.cs
+10
-0
SkuAutoTurnServices.cs
AutoTurnOver.Services/SkuAutoTurnServices.cs
+11
-0
No files found.
AutoGeneratePurchaseAdvise/GeneratePurchaseAdviseBackgroundService.cs
View file @
b916fb65
...
...
@@ -34,20 +34,7 @@ namespace AutoGeneratePurchaseAdvise
// Console.WriteLine($"结束推送 jit甲油采购建议 任务,线程Id:{Thread.CurrentThread.ManagedThreadId},{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}");
//}
if
(
now
.
Hour
==
10
&&
now
.
Minute
==
01
)
{
Console
.
WriteLine
(
$"开始推送 jit精油采购建议 任务,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
PurchaseAdviseServices
.
AutoPushBuySys
(
4
);
Console
.
WriteLine
(
$"结束推送 jit精油采购建议 任务,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
}
if
(
now
.
Hour
==
17
&&
now
.
Minute
==
29
)
{
Console
.
WriteLine
(
$"开始推送 jit甲油采购建议 任务,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
PurchaseAdviseServices
.
AutoPushBuySys
(
1
);
Console
.
WriteLine
(
$"结束推送 jit甲油采购建议 任务,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
}
if
(
now
.
Hour
==
08
&&
now
.
Minute
==
59
)
{
...
...
@@ -73,6 +60,30 @@ namespace AutoGeneratePurchaseAdvise
}
// 判断是不是指定的时间
if
(
now
.
Hour
==
9
&&
now
.
Minute
==
1
)
{
Console
.
WriteLine
(
$"开始 推送采购建议 任务,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
PurchaseAdviseServices
.
Generate
();
Console
.
WriteLine
(
$"结束 推送采购建议 任务,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
}
if
(
now
.
Hour
==
10
&&
now
.
Minute
==
01
)
{
Console
.
WriteLine
(
$"开始推送 jit精油采购建议 任务,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
PurchaseAdviseServices
.
AutoPushBuySys
(
4
);
Console
.
WriteLine
(
$"结束推送 jit精油采购建议 任务,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
}
if
(
now
.
Hour
==
17
&&
now
.
Minute
==
29
)
{
Console
.
WriteLine
(
$"开始推送 jit甲油采购建议 任务,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
PurchaseAdviseServices
.
AutoPushBuySys
(
1
);
Console
.
WriteLine
(
$"结束推送 jit甲油采购建议 任务,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
}
if
(
now
.
Hour
==
13
&&
now
.
Minute
==
01
)
{
// 要上班才推
...
...
@@ -96,14 +107,7 @@ namespace AutoGeneratePurchaseAdvise
}
// 判断是不是指定的时间
if
(
now
.
Hour
==
9
&&
now
.
Minute
==
1
)
{
Console
.
WriteLine
(
$"开始 推送采购建议 任务,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
PurchaseAdviseServices
.
Generate
();
Console
.
WriteLine
(
$"结束 推送采购建议 任务,线程Id:
{
Thread
.
CurrentThread
.
ManagedThreadId
}
,
{
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
}
//if (now.Hour == 7 && now.Minute == 29)
//{
...
...
AutoGeneratePurchaseAdvise/Program.cs
View file @
b916fb65
...
...
@@ -19,6 +19,7 @@ namespace AutoGeneratePurchaseAdvise
//PurchaseAdviseServices.AutoPushBuySys(4);
//PurchaseAdviseServices.AutoPushBuySys(2);
//dc_auto_first_order_sku_dao.GeneratePurchaseAdvise();
//PurchaseAdviseServices.AutoPushBuySys(4);
var
builder
=
new
HostBuilder
().
ConfigureServices
((
hostContext
,
services
)
=>
{
services
.
AddHostedService
<
GeneratePurchaseAdviseBackgroundService
>();
...
...
AutoTurnOver.DB/dc_auto_turnover.cs
View file @
b916fb65
...
...
@@ -60,6 +60,16 @@ t4.develop_time,(case when t8.id is null then '未侵权' else '侵权' end) as
( case when t5.`status`=0 or t5.`status` is null then null else t5.gmt_create end ) as 'stop_monitor_create',
t4.category_simple_name,
t4.brand as 'brand',
t13.quantity_land_purchase as 'quantity_land_purchase',
t13.quantity_ocean_purchase as 'quantity_ocean_purchase',
t13.quantity_air_purchase as 'quantity_air_purchase',
t13.quantity_railway_purchase as 'quantity_railway_purchase',
t13.quantity_land_transfer as 'quantity_land_transfer',
t13.quantity_ocean_transfer as 'quantity_ocean_transfer',
t13.quantity_ocean_transfer as 'quantity_ocean_transfer',
t13.quantity_railway_transfer as 'quantity_railway_transfer',
t4.`status` as 'sku_status'-- ,
-- t11.label as 'sku_label'
-- ,t10.`name` as 'group_name'
...
...
@@ -75,6 +85,7 @@ left join dc_base_tort as t8 on dat.bailun_sku = t8.bailun_sku
-- left join dc_auto_jit_tag_group as t10 on t9.group_id = t10.id
-- left join dc_auto_config_sku_label as t11 on dat.bailun_sku = t11.bailun_sku
left join dc_return_goods_not_push as t12 on dat.bailun_sku = t12.bailun_sku and dat.warehouse_code = t12.warehouse_code
left join dc_mid_transit as t13 on dat.bailun_sku = t13.bailun_sku and dat.warehouse_code = t13.warehouse_code
where 1=1 "
;
}
...
...
AutoTurnOver.Models/dc_auto_turnover.cs
View file @
b916fb65
...
...
@@ -411,6 +411,16 @@ namespace AutoTurnOver.Models
public
class
dc_auto_turnover_list_dto
{
public
int
quantity_land_purchase
{
get
;
set
;
}
public
int
quantity_ocean_purchase
{
get
;
set
;
}
public
int
quantity_air_purchase
{
get
;
set
;
}
public
int
quantity_railway_purchase
{
get
;
set
;
}
public
int
quantity_land_transfer
{
get
;
set
;
}
public
int
quantity_ocean_transfer
{
get
;
set
;
}
public
int
quantity_air_transfer
{
get
;
set
;
}
public
int
quantity_railway_transfer
{
get
;
set
;
}
public
int
returngoodspush_state
{
get
;
set
;
}
public
string
category_simple_name
{
get
;
set
;
}
public
string
brand
{
get
;
set
;
}
...
...
AutoTurnOver.Services/SkuAutoTurnServices.cs
View file @
b916fb65
...
...
@@ -302,6 +302,8 @@ namespace AutoTurnOver.Services
"过去7天日均"
,
"过去14天日均"
,
"过去30天日均"
,
"重量"
,
"单价"
,
"实时库存"
,
"ebay最近7天日均销量"
,
"ebay最近14天日均销量"
,
"ebay最近30天日均销量"
,
"速卖通最近7天日均销量"
,
"速卖通最近14天日均销量"
,
"速卖通最近30天日均销量"
,
"已发货库存"
,
"开发时间"
,
"是否侵权"
,
"停止监控时间"
,
"标签"
,
"停售"
,
"最近7天+预测销量"
,
"amazon最近7天日均销量"
,
"amazon最近14天日均销量"
,
"amazon最近30天日均销量"
,
"品牌"
,
"简易分类"
,
"采购陆运在途数量"
,
"采购海运在途数量"
,
"采购空运在途数量"
,
"采购铁路在途数量"
,
"调拨陆运在途数量"
,
"调拨海运在途数量"
,
"调拨空运在途数量"
,
"调拨铁路在途数量"
};
foreach
(
var
item
in
cols
)
{
...
...
@@ -311,6 +313,15 @@ namespace AutoTurnOver.Services
foreach
(
var
itemData
in
list
)
{
DataRow
row
=
table
.
NewRow
();
row
[
"采购陆运在途数量"
]
=
itemData
.
quantity_land_purchase
;
row
[
"采购海运在途数量"
]
=
itemData
.
quantity_ocean_purchase
;
row
[
"采购空运在途数量"
]
=
itemData
.
quantity_air_purchase
;
row
[
"采购铁路在途数量"
]
=
itemData
.
quantity_railway_purchase
;
row
[
"调拨陆运在途数量"
]
=
itemData
.
quantity_land_transfer
;
row
[
"调拨海运在途数量"
]
=
itemData
.
quantity_ocean_transfer
;
row
[
"调拨空运在途数量"
]
=
itemData
.
quantity_air_transfer
;
row
[
"调拨铁路在途数量"
]
=
itemData
.
quantity_railway_transfer
;
row
[
"Sku"
]
=
itemData
.
bailun_sku
;
row
[
"商品编码"
]
=
itemData
.
product_code
;
row
[
"内部编码"
]
=
itemData
.
product_inner_code
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment