Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
DataCenter_Core2.1_20190520
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
DataCenter_Core2.1_20190520
Commits
c213659a
Commit
c213659a
authored
Aug 16, 2021
by
zhouminghui
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'webapi'
parents
49e82627
1642e8f9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
58 additions
and
6 deletions
+58
-6
PlatformTypeMonthlyStatisticsDto.cs
...C.Models/WebApiModels/PlatformTypeMonthlyStatisticsDto.cs
+6
-1
dc_month_sales_profit_order_summary.cs
Bailun.DC.Models/dc_month_sales_profit_order_summary.cs
+33
-0
dc_month_sales_profit_orderdetail.cs
Bailun.DC.Models/dc_month_sales_profit_orderdetail.cs
+10
-0
FinanceService.cs
Bailun.DC.Services/WebApiService/FinanceService.cs
+0
-0
FinanceController.cs
Bailun.DC.WebApi/Controllers/FinanceController.cs
+9
-5
No files found.
Bailun.DC.Models/WebApiModels/PlatformTypeMonthlyStatisticsDto.cs
View file @
c213659a
...
...
@@ -5,16 +5,21 @@
/// </summary>
public
class
PlatformTypeMonthlyStatisticsDto
{
public
string
month
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
string
platform_type
{
get
;
set
;
}
/// <summary>
/// 对应平台总销售额
/// 对应平台总销售额
(计算汇率的)
/// </summary>
public
decimal
total_amount_sales
{
get
;
set
;
}
/// <summary>
/// 原币
/// </summary>
public
decimal
original_amount
{
get
;
set
;
}
/// <summary>
/// 订单数
/// </summary>
...
...
Bailun.DC.Models/dc_month_sales_profit_order_summary.cs
0 → 100644
View file @
c213659a
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Bailun.DC.Models
{
public
class
dc_month_sales_profit_order_summary
{
public
int
id
{
get
;
set
;
}
public
string
month
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
string
platform_type
{
get
;
set
;
}
/// <summary>
/// 对应平台总销售额
/// </summary>
public
decimal
total_amount_sales
{
get
;
set
;
}
public
decimal
original_amount
{
get
;
set
;
}
/// <summary>
/// 订单数
/// </summary>
public
decimal
total_order
{
get
;
set
;
}
/// <summary>
/// 0销售额,1成本
/// </summary>
public
int
summary_type
{
get
;
set
;
}
public
string
financecategoryname
{
get
;
set
;
}
public
DateTime
createdate
{
get
;
set
;
}
}
}
Bailun.DC.Models/dc_month_sales_profit_orderdetail.cs
View file @
c213659a
...
...
@@ -43,6 +43,16 @@ namespace Bailun.DC.Models
/// 产品销售额 原币
/// </summary>
public
decimal
amount_sales
{
get
;
set
;
}
/// <summary>
/// 产品销售额 人民币
/// </summary>
public
decimal
amount_sales_rmb
{
get
{
return
amount_sales
*
seller_order_exchange_rate
*
quantity_shipped
;
}
}
/// <summary>
...
...
Bailun.DC.Services/WebApiService/FinanceService.cs
View file @
c213659a
This diff is collapsed.
Click to expand it.
Bailun.DC.WebApi/Controllers/FinanceController.cs
View file @
c213659a
...
...
@@ -336,10 +336,10 @@ namespace Bailun.DC.WebApi.Controllers
/// <param name="financecategory"></param>
/// <returns></returns>
[
HttpGet
(
"getPlatformTypeMonthlyStatistics"
)]
public
CommonApiResponseDto
<
List
<
PlatformTypeMonthlyStatisticsDto
>>
GetPlatformTypeMonthlyStatistics
(
string
month
,
string
financecategory
)
public
CommonApiResponseDto
<
List
<
PlatformTypeMonthlyStatisticsDto
>>
GetPlatformTypeMonthlyStatistics
(
string
month
,
string
financecategory
,
string
isCost
)
{
var
result
=
new
CommonApiResponseDto
<
List
<
PlatformTypeMonthlyStatisticsDto
>>
{
Data
=
new
List
<
PlatformTypeMonthlyStatisticsDto
>()};
result
.
Data
=
new
FinanceService
().
Get
PlatformTypeMonthlyStatistics
(
month
,
financecategory
);
result
.
Data
=
new
FinanceService
().
Get
MonthSalesProfiOrderSummary
(
month
,
financecategory
,
isCost
);
return
result
;
}
...
...
@@ -364,11 +364,11 @@ namespace Bailun.DC.WebApi.Controllers
{
input
.
IsPages
=
false
;
var
dataList
=
new
FinanceService
().
GetMonthProfitOrderDetailPage
(
input
).
Data
.
Items
;
var
colNames
=
new
List
<
string
>
{
"财务分类"
,
"平台类型"
,
"订单号"
,
"SKU"
,
"销售额
"
,
"发货量"
,
"发货时间"
,
"创建时间"
};
var
colNames
=
new
List
<
string
>
{
"财务分类"
,
"平台类型"
,
"订单号"
,
"SKU"
,
"销售额
(原币)"
,
"销售额RMB"
,
"汇率"
,
"发货量"
,
"发货时间"
,
"创建时间"
};
var
list
=
new
List
<
string
>();
foreach
(
var
item
in
dataList
)
{
list
.
Add
(
$"
{
item
.
financecategoryname
}
|
{
item
.
platform_type
}
|
{
item
.
origin_order_id
}
|
{
item
.
bailun_sku
}
|
{
item
.
amount_sales
}
|
{
item
.
quantity_shipped
}
|
{
item
.
shipping_time
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
|
{
item
.
createtime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
list
.
Add
(
$"
{
item
.
financecategoryname
}
|
{
item
.
platform_type
}
|
{
item
.
origin_order_id
}
|
{
item
.
bailun_sku
}
|
{
item
.
amount_sales
}
|
{
item
.
amount_sales_rmb
}
|
{
item
.
seller_order_exchange_rate
}
|
{
item
.
quantity_shipped
}
|
{
item
.
shipping_time
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
|
{
item
.
createtime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)}
"
);
}
var
guid
=
Guid
.
NewGuid
().
ToString
();
var
filepath
=
_hostingEnvironment
.
WebRootPath
+
"\\Files\\Report\\"
+
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
)
+
"\\"
;
...
...
@@ -508,7 +508,7 @@ namespace Bailun.DC.WebApi.Controllers
return
File
(
ms
,
"text/csv"
,
$"
{
input
.
Month
}
_月销售费用合计》费用利润表明细.csv"
);
}
[
HttpGet
(
"
getReFundTes
t"
)]
[
HttpGet
(
"
syncMonthSalesProfi
t"
)]
public
object
GetReFundTest
(
DateTime
time
)
{
return
new
FinanceService
().
SyncMonthSalesProfit
(
time
);
...
...
@@ -516,6 +516,10 @@ namespace Bailun.DC.WebApi.Controllers
//var data = Dapper.SimpleCRUD.Query<dc_month_sales_profit_orderdetail>(sql, null, Common.GlobalConfig.ConnectionString).FirstOrDefault();
//return data;
}
[
HttpGet
(
"syncMonthSalesProfiOrderDetail"
)]
public
object
SyncMonthSalesProfiOrderDetail
(
DateTime
date
)
=>
new
FinanceService
().
SyncMonthSalesProfiOrderDetail
(
date
);
#
endregion
}
}
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