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
ca1dbd70
Commit
ca1dbd70
authored
Aug 19, 2021
by
zhouminghui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
63179558
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
0 deletions
+32
-0
FinanceService.cs
Bailun.DC.Services/WebApiService/FinanceService.cs
+6
-0
FinanceController.cs
Bailun.DC.WebApi/Controllers/FinanceController.cs
+26
-0
No files found.
Bailun.DC.Services/WebApiService/FinanceService.cs
View file @
ca1dbd70
...
...
@@ -564,6 +564,7 @@ SUM(t1.amount_sales * t1.seller_order_exchange_rate * t1.quantity_shipped) AS to
return
sqlText
.
ToString
();
}
public
bool
UpdateMonthSalseProfit
(
UpdateMonthSalseProfitInput
input
,
int
userId
,
string
userName
)
{
using
(
var
cn
=
new
MySqlConnection
(
Common
.
GlobalConfig
.
ConnectionString
))
...
...
@@ -964,6 +965,11 @@ AND s2.datacenter_col like '%{input.FeeName}' ";
}
return
new
CommonApiResponseDto
<
PageResult
<
List
<
MonthReFundDto
>>>
{
Data
=
result
};
}
public
List
<
MonthReFundDto
>
ExportMonthProfitFeeReFundDetail
(
GetMonthProfitPlatformDetailInput
input
)
{
var
sql
=
BuildMonthProfitFeeReFundDetailSql
(
input
,
out
DynamicParameters
param
,
false
,
false
);
return
SimpleCRUD
.
Query
<
MonthReFundDto
>(
sql
,
param
,
GlobalConfig
.
ConnectionString
).
ToList
();
}
/// <summary>
/// 根据平台汇总
/// </summary>
...
...
Bailun.DC.WebApi/Controllers/FinanceController.cs
View file @
ca1dbd70
...
...
@@ -472,6 +472,32 @@ namespace Bailun.DC.WebApi.Controllers
[
HttpPost
(
"getMonthProfitFeeReFundDetail"
)]
public
CommonApiResponseDto
<
PageResult
<
List
<
MonthReFundDto
>>>
GetMonthProfitFeeReFundDetail
(
GetMonthProfitPlatformDetailInput
input
)
=>
new
FinanceService
().
GetMonthProfitFeeReFundDetail
(
input
);
/// <summary>
/// 导出退款明细
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[
HttpPost
(
"exportMonthProfitFeeReFundDetail"
)]
public
ActionResult
ExportMonthProfitFeeReFundDetail
(
GetMonthProfitPlatformDetailInput
input
)
{
var
dataList
=
new
FinanceService
().
ExportMonthProfitFeeReFundDetail
(
input
);
var
colNames
=
new
List
<
string
>
{
"平台"
,
"订单号"
,
"站点"
,
"卖家账号"
,
"退款金额"
,
"退款USD"
,
"退款时间"
};
var
list
=
new
List
<
string
>();
foreach
(
var
item
in
dataList
)
{
list
.
Add
(
$"
{
item
.
PlatformType
}
|
{
item
.
OriginOrderId
}
|
{
item
.
WebSite
}
|
{
item
.
BailunAccount
}
|
{
item
.
RefundRmb
}
|
{
item
.
RefundUsd
}
|
{
item
.
RefundTime
}
"
);
}
var
guid
=
Guid
.
NewGuid
().
ToString
();
var
filepath
=
_hostingEnvironment
.
WebRootPath
+
"\\Files\\Report\\"
+
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd"
)
+
"\\"
;
ToCSV
(
list
,
colNames
,
guid
,
filepath
);
var
ms
=
new
System
.
IO
.
MemoryStream
();
using
(
var
f
=
new
System
.
IO
.
FileStream
(
filepath
+
guid
+
".csv"
,
System
.
IO
.
FileMode
.
Open
))
{
f
.
CopyTo
(
ms
);
}
ms
.
Position
=
0
;
return
File
(
ms
,
"text/csv"
,
$"
{
input
.
Month
}
_退款明细.csv"
);
}
/// <summary>
/// 按平台汇总退款信息
...
...
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