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
43b3e3d5
Commit
43b3e3d5
authored
Aug 20, 2020
by
泽锋 李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
刷新调拨订单数据
parent
0189eda4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
5 deletions
+23
-5
report_cash_flow_dao.cs
AutoTurnOver.DB/report_cash_flow_dao.cs
+20
-2
ResetOutofstockBackgrounService.cs
ResetOutofstock/ResetOutofstockBackgrounService.cs
+3
-3
No files found.
AutoTurnOver.DB/report_cash_flow_dao.cs
View file @
43b3e3d5
...
@@ -492,18 +492,36 @@ namespace AutoTurnOver.DB
...
@@ -492,18 +492,36 @@ namespace AutoTurnOver.DB
var
addList
=
new
List
<
dc_report_cash_flow_log
>();
var
addList
=
new
List
<
dc_report_cash_flow_log
>();
var
updateList
=
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
)
foreach
(
var
order_item
in
order_list
)
{
{
try
try
{
{
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
尾程费
#
region
尾程费
dc_report_cash_flow_log
item4
=
new
dc_report_cash_flow_log
()
dc_report_cash_flow_log
item4
=
new
dc_report_cash_flow_log
()
{
{
bailun_sku
=
order_item
.
bailun_sku
,
bailun_sku
=
order_item
.
bailun_sku
,
data_type
=
(
int
)
dc_report_cash_flow_log_data_type_enum
.
尾程费用
,
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
,
item
=
order_item
.
bailun_order_id
,
update_time
=
now
,
update_time
=
now
,
no
=
order_item
.
bailun_order_id
,
no
=
order_item
.
bailun_order_id
,
...
@@ -1512,7 +1530,7 @@ GROUP BY platform_type,website";
...
@@ -1512,7 +1530,7 @@ GROUP BY platform_type,website";
datas
.
Add
(
new
report_cash_flow_view_dto
{
date_type
=
new
List
<
int
>
{
11
},
date_type_str
=
"fba费"
,
remarks
=
" "
,
dates
=
new
List
<
report_cash_flow_view_dto
.
date_dto
>()
});
datas
.
Add
(
new
report_cash_flow_view_dto
{
date_type
=
new
List
<
int
>
{
11
},
date_type_str
=
"fba费"
,
remarks
=
" "
,
dates
=
new
List
<
report_cash_flow_view_dto
.
date_dto
>()
});
datas
.
Add
(
new
report_cash_flow_view_dto
{
date_type
=
new
List
<
int
>
{
12
},
date_type_str
=
"paypal费"
,
remarks
=
" "
,
dates
=
new
List
<
report_cash_flow_view_dto
.
date_dto
>()
});
datas
.
Add
(
new
report_cash_flow_view_dto
{
date_type
=
new
List
<
int
>
{
12
},
date_type_str
=
"paypal费"
,
remarks
=
" "
,
dates
=
new
List
<
report_cash_flow_view_dto
.
date_dto
>()
});
datas
.
Add
(
new
report_cash_flow_view_dto
{
date_type
=
new
List
<
int
>
{
4
,
3
,
15
,
16
},
date_type_str
=
"汇总利润"
,
remarks
=
" oms 中的订单,销售额 - 销售成本 - 尾程费 - 头程费 - 退款 - 平台费 - fba费 -paypal 费 "
,
dates
=
new
List
<
report_cash_flow_view_dto
.
date_dto
>()
});
datas
.
Add
(
new
report_cash_flow_view_dto
{
date_type
=
new
List
<
int
>
{
4
,
3
,
15
,
16
},
date_type_str
=
"汇总利润"
,
remarks
=
" oms 中的订单,销售额 - 销售成本 - 尾程费 - 头程费 - 退款 - 平台费 - fba费 -paypal 费 "
,
dates
=
new
List
<
report_cash_flow_view_dto
.
date_dto
>()
});
datas
.
Add
(
new
report_cash_flow_view_dto
{
date_type
=
new
List
<
int
>
{
2
,
3
,
5
,
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
,
16
},
date_type_str
=
"现金流结余"
,
remarks
=
" 销售金额 - 新增采购费用 - 新增头程费用 - 平台费用 - 尾程费用 "
,
dates
=
new
List
<
report_cash_flow_view_dto
.
date_dto
>()
});
datas
.
Add
(
new
report_cash_flow_view_dto
{
date_type
=
new
List
<
int
>
{
2
,
3
,
15
,
16
,
5
,
8
,
9
,
13
,
10
,
14
,
11
,
12
},
date_type_str
=
"现金流结余"
,
remarks
=
" 销售金额 - 新增采购费用 - 新增头程费用 - 平台费用 - 尾程费用 "
,
dates
=
new
List
<
report_cash_flow_view_dto
.
date_dto
>()
});
var
btime
=
DateTime
.
Now
.
AddDays
(-
8
).
ToDayHome
();
var
btime
=
DateTime
.
Now
.
AddDays
(-
8
).
ToDayHome
();
var
etime
=
DateTime
.
Now
.
AddDays
(-
1
).
ToDayEnd
();
var
etime
=
DateTime
.
Now
.
AddDays
(-
1
).
ToDayEnd
();
if
(
search
.
btime
!=
null
)
if
(
search
.
btime
!=
null
)
...
...
ResetOutofstock/ResetOutofstockBackgrounService.cs
View file @
43b3e3d5
...
@@ -16,11 +16,11 @@ namespace ResetOutofstock
...
@@ -16,11 +16,11 @@ namespace ResetOutofstock
{
{
Task
.
Factory
.
StartNew
(()
=>
Task
.
Factory
.
StartNew
(()
=>
{
{
Console
.
WriteLine
(
"开始刷新
oms
订单数据"
);
Console
.
WriteLine
(
"开始刷新
调拨
订单数据"
);
var
now
=
DateTime
.
Now
;
var
now
=
DateTime
.
Now
;
report_cash_flow_dao
.
Calculation
Order
(
now
.
AddMonths
(-
3
),
DateTime
.
Parse
(
now
.
AddDays
(-
1
).
ToString
(
"yyyy-MM-dd 23:59:59"
)));
report_cash_flow_dao
.
Calculation
TransferOrder
(
now
.
AddMonths
(-
3
),
DateTime
.
Parse
(
now
.
AddDays
(-
1
).
ToString
(
"yyyy-MM-dd 23:59:59"
)));
report
.
ResetCashFlowData
();
report
.
ResetCashFlowData
();
Console
.
WriteLine
(
"结束
oms
订单数据"
);
Console
.
WriteLine
(
"结束
调拨
订单数据"
);
});
});
...
...
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