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
e36e1e54
Commit
e36e1e54
authored
Aug 11, 2021
by
zhouminghui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
月利润明细
parent
93e7cb62
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
177 additions
and
3 deletions
+177
-3
FinanceDetailsDto.cs
Bailun.DC.Models/Dtos/Finance/FinanceDetailsDto.cs
+11
-2
GetMonthProfitPlatformDetailInput.cs
....Models/WebApiModels/GetMonthProfitPlatformDetailInput.cs
+14
-0
MonthPlatformProfitDto.cs
Bailun.DC.Models/WebApiModels/MonthPlatformProfitDto.cs
+26
-0
MonthReFundDto.cs
Bailun.DC.Models/WebApiModels/MonthReFundDto.cs
+24
-0
FinanceService.cs
Bailun.DC.Services/WebApiService/FinanceService.cs
+0
-0
FinanceController.cs
Bailun.DC.WebApi/Controllers/FinanceController.cs
+102
-1
No files found.
Bailun.DC.Models/Dtos/Finance/FinanceDetailsDto.cs
View file @
e36e1e54
...
...
@@ -9,11 +9,11 @@ namespace Bailun.DC.Models.Dtos.Finance
/// <summary>
/// 金额
/// </summary>
public
decimal
Amount
{
get
;
set
;
}
public
decimal
?
Amount
{
get
;
set
;
}
/// <summary>
/// 人民币
/// </summary>
public
decimal
AmountRmb
{
get
;
set
;
}
public
decimal
?
AmountRmb
{
get
;
set
;
}
/// <summary>
/// 公司
/// </summary>
...
...
@@ -42,6 +42,7 @@ namespace Bailun.DC.Models.Dtos.Finance
/// 付款时间
/// </summary>
public
string
PayTime
{
get
;
set
;
}
public
DateTime
?
pay_time
{
get
;
set
;
}
/// <summary>
/// 费用类型
/// </summary>
...
...
@@ -51,5 +52,13 @@ namespace Bailun.DC.Models.Dtos.Finance
/// </summary>
public
string
Accounting
{
get
;
set
;
}
public
string
CostReason
{
get
;
set
;
}
public
string
CostRemark
{
get
;
set
;
}
public
int
cost_form
{
get
;
set
;
}
public
int
?
is_lend
{
get
;
set
;
}
public
int
?
lend_balance
{
get
;
set
;
}
}
}
Bailun.DC.Models/WebApiModels/GetMonthProfitPlatformDetailInput.cs
0 → 100644
View file @
e36e1e54
using
Bailun.DC.Models.Common.Page
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Bailun.DC.Models.WebApiModels
{
public
class
GetMonthProfitPlatformDetailInput
:
PageRequest
{
public
string
Month
{
get
;
set
;
}
public
string
FeeName
{
get
;
set
;
}
public
string
PlatformType
{
get
;
set
;
}
}
}
Bailun.DC.Models/WebApiModels/MonthPlatformProfitDto.cs
0 → 100644
View file @
e36e1e54
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Bailun.DC.Models.WebApiModels
{
public
class
MonthPlatformProfitDto
{
public
string
PlatForm
{
get
;
set
;
}
public
string
WebSite
{
get
;
set
;
}
public
string
Orderno
{
get
;
set
;
}
public
string
DataTime
{
get
;
set
;
}
public
string
AmountVal
{
get
;
set
;
}
public
string
FeeType
{
get
;
set
;
}
public
string
Subjectcode
{
get
;
set
;
}
public
string
ProjectCode
{
get
;
set
;
}
public
string
FinanceCategory
{
get
;
set
;
}
public
string
DatacenterCol
{
get
;
set
;
}
public
string
Currency
{
get
;
set
;
}
public
string
ExchangeRate
{
get
;
set
;
}
public
string
AmountValRmb
{
get
;
set
;
}
public
string
Month
{
get
;
set
;
}
}
}
Bailun.DC.Models/WebApiModels/MonthReFundDto.cs
0 → 100644
View file @
e36e1e54
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Bailun.DC.Models.WebApiModels
{
public
class
MonthReFundDto
{
public
string
PlatformType
{
get
;
set
;
}
public
string
BailunAccount
{
get
;
set
;
}
public
string
WebSite
{
get
;
set
;
}
public
string
OriginOrderId
{
get
;
set
;
}
public
string
RefundRmb
{
get
;
set
;
}
public
string
RefundUsd
{
get
;
set
;
}
public
string
RefundTime
{
get
;
set
;
}
}
public
class
MonthReFundSummary
{
public
string
Platform
{
get
;
set
;
}
public
decimal
?
RefundRmb
{
get
;
set
;
}
public
decimal
?
RefundUsd
{
get
;
set
;
}
public
int
?
Totals
{
get
;
set
;
}
}
}
Bailun.DC.Services/WebApiService/FinanceService.cs
View file @
e36e1e54
This diff is collapsed.
Click to expand it.
Bailun.DC.WebApi/Controllers/FinanceController.cs
View file @
e36e1e54
using
Bailun.DC.Models.Common
;
using
Bailun.DC.Models
;
using
Bailun.DC.Models.Common
;
using
Bailun.DC.Models.Common.Page
;
using
Bailun.DC.Models.Dtos.Finance
;
using
Bailun.DC.Models.WebApiModels
;
using
Bailun.DC.Services.WebApiService
;
...
...
@@ -392,6 +394,105 @@ namespace Bailun.DC.WebApi.Controllers
return
new
CommonApiResponseDto
<
string
>()
{
IsSuccess
=
false
,
Data
=
e
.
Message
};
}
}
/// <summary>
/// 月销售利润表获取管理成本明细
/// </summary>
/// <param name="month"></param>
/// <param name="feeName"></param>
/// <returns></returns>
[
HttpGet
(
"getMonthProfitFeeManagementCostDetail"
)]
public
CommonApiResponseDto
<
List
<
FinanceDetailsDto
>>
GetMonthProfitFeeManagementCostDetail
(
string
month
,
string
feeName
)
=>
new
FinanceService
().
GetMonthProfitFeeManagementCostDetail
(
month
,
feeName
);
/// <summary>
/// 月销售利润平台费用明细
/// </summary>
/// <param name="month"></param>
/// <param name="feeName"></param>
/// <returns></returns>
[
HttpPost
(
"getMonthProfitFeePlatformFeeDetail"
)]
public
CommonApiResponseDto
<
PageResult
<
List
<
MonthPlatformProfitDto
>>>
GetMonthProfitFeePlatformFeeDetail
(
GetMonthProfitPlatformDetailInput
input
)
=>
new
FinanceService
().
GetMonthProfitFeePlatformFeeDetail
(
input
);
/// <summary>
/// 导出月销售利润平台费用明细
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[
HttpPost
(
"exportMonthProfitFeePlatformFeeDetail"
)]
public
ActionResult
ExportMonthProfitFeePlatformFeeDetail
(
GetMonthProfitPlatformDetailInput
input
)
{
var
dataList
=
new
FinanceService
().
ExportMonthProfitFeePlatformFeeDetail
(
input
);
var
colNames
=
new
List
<
string
>
{
"平台"
,
"站点"
,
"账单时间"
,
"单号"
,
"币种"
,
"原币金额"
,
"汇率"
,
"RMB金额"
,
"费用字段说明"
,
"财务分类归集说明"
,
"数据中心费用类型"
,
"会计科目编码"
,
"项目编码"
};
var
list
=
new
List
<
string
>();
foreach
(
var
item
in
dataList
)
{
list
.
Add
(
$@"
{
item
.
PlatForm
}
|
{
item
.
WebSite
}
|
{
item
.
DataTime
}
|
{
item
.
Orderno
}
|
{
item
.
Currency
}
|
{
item
.
AmountVal
}
|
{
item
.
ExchangeRate
}
|
{
item
.
AmountValRmb
}{
item
.
FeeType
}
|
{
item
.
FinanceCategory
}
|
{
item
.
DatacenterCol
}
|
{
item
.
Subjectcode
}
|
{
item
.
ProjectCode
}
"
);
}
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
}
_
{
input
.
FeeName
}
月销售利润表明细.csv"
);
}
/// <summary>
/// 退款明细
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[
HttpPost
(
"getMonthProfitFeeReFundDetail"
)]
public
CommonApiResponseDto
<
PageResult
<
List
<
MonthReFundDto
>>>
GetMonthProfitFeeReFundDetail
(
GetMonthProfitPlatformDetailInput
input
)
=>
new
FinanceService
().
GetMonthProfitFeeReFundDetail
(
input
);
/// <summary>
/// 按平台汇总退款信息
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[
HttpPost
(
"getMonthProfitPlatformPlatformSummary"
)]
public
CommonApiResponseDto
<
List
<
MonthReFundSummary
>>
GetMonthProfitPlatformPlatformSummary
(
GetMonthProfitPlatformDetailInput
input
)
=>
new
FinanceService
().
GetMonthProfitPlatformPlatformSummary
(
input
);
/// <summary>
/// 销售费用合计》销售利润
/// </summary>
/// <param name="month"></param>
/// <returns></returns>
[
HttpPost
(
"getMonthSalesProfitDetail"
)]
public
object
GetMonthSalesProfitDetail
(
MonthProfitOrderDetailPageInputDto
input
)
=>
new
FinanceService
().
GetMonthSalesProfitDetail
(
input
);
/// <summary>
/// 导出销售费用合计》销售利润
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[
HttpPost
(
"exportMonthSalesProfitDetail"
)]
public
ActionResult
ExportMonthSalesProfitDetail
(
MonthProfitOrderDetailPageInputDto
input
)
{
var
dataList
=
new
FinanceService
().
GetMonthSalesProfitDetail
(
input
,
false
);
var
colNames
=
new
List
<
string
>
{
"财务分类"
,
"平台类型"
,
"订单号"
,
"SKU"
,
"销售利润"
,
"发货量"
,
"发货时间"
,
"创建时间"
};
var
list
=
new
List
<
string
>();
foreach
(
var
item
in
dataList
.
Data
.
Data
)
{
list
.
Add
(
$@"
{
item
.
financecategoryname
}
|
{
item
.
platform_type
}
|
{
item
.
origin_order_id
}
|
{
item
.
bailun_sku
}
|
{
item
.
sale_profit
}
|
{
item
.
quantity_shipped
}
|
{
item
.
shipping_time
}
|
{
item
.
createtime
}
"
);
}
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"
);
}
#
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