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
d7412f6c
Commit
d7412f6c
authored
Aug 11, 2020
by
泽锋 李
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
f941ace3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
106 additions
and
11 deletions
+106
-11
report_cash_flow_dao.cs
AutoTurnOver.DB/report_cash_flow_dao.cs
+8
-6
dc_base_transfer_verify.cs
AutoTurnOver.Models/Report/dc_base_transfer_verify.cs
+94
-0
ResetOutofstockBackgrounService.cs
ResetOutofstock/ResetOutofstockBackgrounService.cs
+4
-5
No files found.
AutoTurnOver.DB/report_cash_flow_dao.cs
View file @
d7412f6c
...
...
@@ -668,7 +668,7 @@ namespace AutoTurnOver.DB
dc_report_cash_flow_log
item
=
new
dc_report_cash_flow_log
()
{
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
.
status
==
-
1
)
?
1
:
0
,
item
=
order_item
.
purchase_id
,
update_time
=
now
,
...
...
@@ -838,7 +838,7 @@ where t1.gmt_create>=@btime and t1.gmt_create<=@etime ";
{
var
now
=
DateTime
.
Now
;
var
sql
=
@" select t1.*,t2.create_time as 'complete_time',ifnull(t3.cost_first,0) as 'cost_first',t4.logisticscode from
dc_base_transfer_
verif
y as t1
dc_base_transfer_
deliver
y as t1
left join dc_base_transfer_complete as t2 on t1.bailun_sku = t2.bailun_sku and t1.transfer_order_id = t2.transfer_order_id
left join dc_mid_cost_first_order as t3 on t1.bailun_sku = t3.bailun_sku and t1.transfer_order_id = t3.transfer_order_id
left join dc_base_transfer_info as t4 on t1.transfer_order_id = t4.`code`
...
...
@@ -847,7 +847,7 @@ where t1.create_time>=@btime and t1.create_time<=@etime ";
parameters
.
Add
(
"btime"
,
btime
.
ToString
(
"yyyy-MM-dd 00:00:00"
));
parameters
.
Add
(
"etime"
,
etime
.
ToString
(
"yyyy-MM-dd 23:59:59"
));
sql
+=
$" limit
{(
page
-
1
)
*
rows
}
,
{
rows
}
"
;
var
order_list
=
conn
.
Query
<
dc_base_transfer_
verif
y_dto
>(
sql
,
parameters
,
commandTimeout
:
0
).
AsList
();
var
order_list
=
conn
.
Query
<
dc_base_transfer_
deliver
y_dto
>(
sql
,
parameters
,
commandTimeout
:
0
).
AsList
();
if
(
order_list
==
null
||
order_list
.
Count
<=
0
)
{
break
;
...
...
@@ -1481,7 +1481,9 @@ GROUP BY platform_type,website";
datas
.
Add
(
new
report_cash_flow_view_dto
{
date_type
=
new
List
<
int
>
{
1
},
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
},
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
>
{
3
},
date_type_str
=
"退款"
,
remarks
=
"crm 抓取的退款数据,未区分仓库"
,
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
},
date_type_str
=
"利润"
,
remarks
=
"oms 中的订单,分摊到sku的利润,不包含广告费,上架费,退款"
,
dates
=
new
List
<
report_cash_flow_view_dto
.
date_dto
>()
});
datas
.
Add
(
new
report_cash_flow_view_dto
{
date_type
=
new
List
<
int
>
{
15
},
date_type_str
=
"广告费"
,
remarks
=
"未区分 sku , 仓库"
,
dates
=
new
List
<
report_cash_flow_view_dto
.
date_dto
>()
});
datas
.
Add
(
new
report_cash_flow_view_dto
{
date_type
=
new
List
<
int
>
{
16
},
date_type_str
=
"上架费"
,
remarks
=
"未区分 sku , 仓库"
,
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 中的订单,分摊到sku的利润"
,
dates
=
new
List
<
report_cash_flow_view_dto
.
date_dto
>()
});
datas
.
Add
(
new
report_cash_flow_view_dto
{
date_type
=
new
List
<
int
>
{
5
},
date_type_str
=
"平台费用"
,
dates
=
new
List
<
report_cash_flow_view_dto
.
date_dto
>()
});
datas
.
Add
(
new
report_cash_flow_view_dto
{
date_type
=
new
List
<
int
>
{
6
},
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
>
{
7
},
date_type_str
=
"释放头程费用"
,
remarks
=
""
,
dates
=
new
List
<
report_cash_flow_view_dto
.
date_dto
>()
});
...
...
@@ -1492,8 +1494,8 @@ GROUP BY platform_type,website";
datas
.
Add
(
new
report_cash_flow_view_dto
{
date_type
=
new
List
<
int
>
{
14
},
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
>
{
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
>
{
4
,
3
},
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
},
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
>
{
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
>()
});
var
btime
=
DateTime
.
Now
.
AddDays
(-
8
).
ToDayHome
();
var
etime
=
DateTime
.
Now
.
AddDays
(-
1
).
ToDayEnd
();
if
(
search
.
btime
!=
null
)
...
...
AutoTurnOver.Models/Report/dc_base_transfer_verify.cs
View file @
d7412f6c
...
...
@@ -96,4 +96,98 @@ namespace AutoTurnOver.Models.Report
/// </summary>
public
string
logisticscode
{
get
;
set
;
}
}
public
class
dc_base_transfer_delivery_dto
:
dc_base_transfer_delivery
{
public
DateTime
?
complete_time
{
get
;
set
;
}
public
decimal
cost_first
{
get
;
set
;
}
/// <summary>
/// 渠道编码
/// </summary>
public
string
logisticscode
{
get
;
set
;
}
}
public
class
dc_base_transfer_delivery
{
/// <summary>
///
/// </summary>
public
int
id
{
get
;
set
;
}
/// <summary>
/// 数据中心创建时间
/// </summary>
public
DateTime
gmt_create
{
get
;
set
;
}
/// <summary>
/// 数据中心更新时间
/// </summary>
public
DateTime
gmt_modified
{
get
;
set
;
}
/// <summary>
/// 百伦SKU
/// </summary>
public
string
bailun_sku
{
get
;
set
;
}
/// <summary>
/// 调拨单号
/// </summary>
public
string
transfer_order_id
{
get
;
set
;
}
/// <summary>
/// 调拨目的仓库编码
/// </summary>
public
string
warehouse_code
{
get
;
set
;
}
/// <summary>
/// 调拨目的仓库名称
/// </summary>
public
string
warehouse_name
{
get
;
set
;
}
/// <summary>
/// 打包状态
/// </summary>
public
string
status
{
get
;
set
;
}
/// <summary>
/// 调拨系统创建时间
/// </summary>
public
DateTime
create_time
{
get
;
set
;
}
/// <summary>
/// 调拨数量
/// </summary>
public
int
count
{
get
;
set
;
}
/// <summary>
/// SKU标题
/// </summary>
public
string
sku_title
{
get
;
set
;
}
/// <summary>
/// 调拨系统主键
/// </summary>
public
int
transfer_key
{
get
;
set
;
}
/// <summary>
/// 是否被删除
/// </summary>
public
int
deleted
{
get
;
set
;
}
/// <summary>
/// 起始仓
/// </summary>
public
string
source_warehouse_code
{
get
;
set
;
}
/// <summary>
/// 公司Id,0和1是百伦
/// </summary>
public
int
company_id
{
get
;
set
;
}
/// <summary>
/// 是否异常
/// </summary>
public
int
?
isexception
{
get
;
set
;
}
}
}
ResetOutofstock/ResetOutofstockBackgrounService.cs
View file @
d7412f6c
...
...
@@ -16,12 +16,11 @@ namespace ResetOutofstock
{
Task
.
Factory
.
StartNew
(()
=>
{
Console
.
WriteLine
(
"开始初始化
广告
费用"
);
Console
.
WriteLine
(
"开始初始化
调拨费用+采购
费用"
);
var
now
=
DateTime
.
Now
;
report_cash_flow_dao
.
CalculationAdFeeEbay
(
now
.
AddMonths
(-
3
),
DateTime
.
Parse
(
now
.
AddDays
(-
1
).
ToString
(
"yyyy-MM-dd 23:59:59"
)));
report_cash_flow_dao
.
CalculationAdFeeAmazon
(
now
.
AddMonths
(-
3
),
DateTime
.
Parse
(
now
.
AddDays
(-
1
).
ToString
(
"yyyy-MM-dd 23:59:59"
)));
report_cash_flow_dao
.
CalculationPublishFeeEbay
(
now
.
AddMonths
(-
3
),
DateTime
.
Parse
(
now
.
AddDays
(-
1
).
ToString
(
"yyyy-MM-dd 23:59:59"
)));
Console
.
WriteLine
(
"结束初始化广告费用"
);
report_cash_flow_dao
.
CalculationPurchaseOrder
(
now
.
AddMonths
(-
3
),
DateTime
.
Parse
(
now
.
AddDays
(-
1
).
ToString
(
"yyyy-MM-dd 23:59:59"
)));
report_cash_flow_dao
.
CalculationTransferOrder
(
now
.
AddMonths
(-
3
),
DateTime
.
Parse
(
now
.
AddDays
(-
1
).
ToString
(
"yyyy-MM-dd 23:59:59"
)));
Console
.
WriteLine
(
"结束初始化调拨费用+采购费用"
);
});
//Task.Factory.StartNew(() =>
...
...
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