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
0189eda4
Commit
0189eda4
authored
Aug 20, 2020
by
泽锋 李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
刷新订单数据
parent
d6395135
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
12 deletions
+28
-12
report_cash_flow_dao.cs
AutoTurnOver.DB/report_cash_flow_dao.cs
+25
-9
ResetOutofstockBackgrounService.cs
ResetOutofstock/ResetOutofstockBackgrounService.cs
+3
-3
No files found.
AutoTurnOver.DB/report_cash_flow_dao.cs
View file @
0189eda4
...
...
@@ -51,12 +51,28 @@ namespace AutoTurnOver.DB
var
addList
=
new
List
<
dc_report_cash_flow_log
>();
var
updateList
=
new
List
<
dc_report_cash_flow_log
>();
// 未拦截订单
var
bailun_interception_status
=
new
List
<
string
>()
{
"None"
,
"Failed"
};
foreach
(
var
order_item
in
order_list
)
{
try
{
var
item_no
=
order_item
.
bailun_order_id
;
var
is_delete
=
(
(!
bailun_interception_status
.
Any
(
v
=>
v
.
Equals
(
order_item
.
bailun_interception_status
,
StringComparison
.
OrdinalIgnoreCase
)))
// 拦截单
||
order_item
.
has_innersale
==
1
// 内购单
||
"Canceled"
.
Equals
(
order_item
.
bailun_order_status
,
StringComparison
.
OrdinalIgnoreCase
)
// 取消单
||
((!
"FBA"
.
Equals
(
order_item
.
platform_type
,
StringComparison
.
OrdinalIgnoreCase
))
&&
"CantHandle"
.
Equals
(
order_item
.
bailun_order_status
,
StringComparison
.
OrdinalIgnoreCase
))
// 非fba 的订单状态为取消
||
order_item
.
has_scalp
==
1
// 刷单
||
order_item
.
has_delete
==
1
||
order_item
.
company_id
!=
1
)
?
1
:
0
;
#
region
销售释放成本
...
...
@@ -64,7 +80,7 @@ namespace AutoTurnOver.DB
{
bailun_sku
=
order_item
.
bailun_sku
,
data_type
=
(
int
)
dc_report_cash_flow_log_data_type_enum
.
释放销售成本
,
is_delete
=
(
order_item
.
has_delete
==
1
||
order_item
.
has_scalp
==
1
)
?
1
:
0
,
is_delete
=
is_delete
,
item
=
order_item
.
bailun_order_id
,
update_time
=
now
,
no
=
order_item
.
bailun_order_id
,
...
...
@@ -105,7 +121,7 @@ namespace AutoTurnOver.DB
{
bailun_sku
=
order_item
.
bailun_sku
,
data_type
=
(
int
)
dc_report_cash_flow_log_data_type_enum
.
PayPal
费
,
is_delete
=
(
order_item
.
has_delete
==
1
||
order_item
.
has_scalp
==
1
)
?
1
:
0
,
is_delete
=
is_delete
,
item
=
order_item
.
bailun_order_id
,
update_time
=
now
,
no
=
order_item
.
bailun_order_id
,
...
...
@@ -146,7 +162,7 @@ namespace AutoTurnOver.DB
{
bailun_sku
=
order_item
.
bailun_sku
,
data_type
=
(
int
)
dc_report_cash_flow_log_data_type_enum
.
FBA
费
,
is_delete
=
(
order_item
.
has_delete
==
1
||
order_item
.
has_scalp
==
1
)
?
1
:
0
,
is_delete
=
is_delete
,
item
=
order_item
.
bailun_order_id
,
update_time
=
now
,
no
=
order_item
.
bailun_order_id
,
...
...
@@ -187,7 +203,7 @@ namespace AutoTurnOver.DB
{
bailun_sku
=
order_item
.
bailun_sku
,
data_type
=
(
int
)
dc_report_cash_flow_log_data_type_enum
.
释放头程费用
,
is_delete
=
(
order_item
.
has_delete
==
1
||
order_item
.
has_scalp
==
1
)
?
1
:
0
,
is_delete
=
is_delete
,
item
=
order_item
.
bailun_order_id
,
update_time
=
now
,
no
=
order_item
.
bailun_order_id
,
...
...
@@ -228,7 +244,7 @@ namespace AutoTurnOver.DB
{
bailun_sku
=
order_item
.
bailun_sku
,
data_type
=
(
int
)
dc_report_cash_flow_log_data_type_enum
.
平台费用
,
is_delete
=
(
order_item
.
has_delete
==
1
||
order_item
.
has_scalp
==
1
)
?
1
:
0
,
is_delete
=
is_delete
,
item
=
order_item
.
bailun_order_id
,
update_time
=
now
,
no
=
order_item
.
bailun_order_id
,
...
...
@@ -269,7 +285,7 @@ namespace AutoTurnOver.DB
{
bailun_sku
=
order_item
.
bailun_sku
,
data_type
=
(
int
)
dc_report_cash_flow_log_data_type_enum
.
利润
,
is_delete
=
(
order_item
.
has_delete
==
1
||
order_item
.
has_scalp
==
1
)
?
1
:
0
,
is_delete
=
is_delete
,
item
=
order_item
.
bailun_order_id
,
update_time
=
now
,
no
=
order_item
.
bailun_order_id
,
...
...
@@ -310,7 +326,7 @@ namespace AutoTurnOver.DB
{
bailun_sku
=
order_item
.
bailun_sku
,
data_type
=
(
int
)
dc_report_cash_flow_log_data_type_enum
.
销售数量
,
is_delete
=
(
order_item
.
has_delete
==
1
||
order_item
.
has_scalp
==
1
)
?
1
:
0
,
is_delete
=
is_delete
,
item
=
order_item
.
bailun_order_id
,
update_time
=
now
,
no
=
order_item
.
bailun_order_id
,
...
...
@@ -351,7 +367,7 @@ namespace AutoTurnOver.DB
{
bailun_sku
=
order_item
.
bailun_sku
,
data_type
=
(
int
)
dc_report_cash_flow_log_data_type_enum
.
销售金额
,
is_delete
=
(
order_item
.
has_delete
==
1
||
order_item
.
has_scalp
==
1
)
?
1
:
0
,
is_delete
=
is_delete
,
item
=
order_item
.
bailun_order_id
,
update_time
=
now
,
no
=
order_item
.
bailun_order_id
,
...
...
ResetOutofstock/ResetOutofstockBackgrounService.cs
View file @
0189eda4
...
...
@@ -16,11 +16,11 @@ namespace ResetOutofstock
{
Task
.
Factory
.
StartNew
(()
=>
{
Console
.
WriteLine
(
"开始刷新
广告费
数据"
);
Console
.
WriteLine
(
"开始刷新
oms订单
数据"
);
var
now
=
DateTime
.
Now
;
//report_cash_flow_dao.CalculationTransferOrder(now.AddMonths(-3),
DateTime.Parse(now.AddDays(-1).ToString("yyyy-MM-dd 23:59:59")));
report_cash_flow_dao
.
CalculationOrder
(
now
.
AddMonths
(-
3
),
DateTime
.
Parse
(
now
.
AddDays
(-
1
).
ToString
(
"yyyy-MM-dd 23:59:59"
)));
report
.
ResetCashFlowData
();
Console
.
WriteLine
(
"结束
刷新广告费
数据"
);
Console
.
WriteLine
(
"结束
oms订单
数据"
);
});
...
...
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