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
3ec2cfa2
Commit
3ec2cfa2
authored
Aug 31, 2021
by
zhouminghui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
3c8a65d7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
8 deletions
+24
-8
GetMonthStockWeightingOutputDto.cs
...n.DC.Models/Dtos/Stock/GetMonthStockWeightingOutputDto.cs
+1
-0
FinanceService.cs
Bailun.DC.Services/WebApiService/FinanceService.cs
+19
-6
FinanceController.cs
Bailun.DC.WebApi/Controllers/FinanceController.cs
+4
-2
No files found.
Bailun.DC.Models/Dtos/Stock/GetMonthStockWeightingOutputDto.cs
View file @
3ec2cfa2
...
@@ -14,5 +14,6 @@
...
@@ -14,5 +14,6 @@
/// 前端Vue表头
/// 前端Vue表头
/// </summary>
/// </summary>
public
string
ColumnText
{
get
;
set
;
}
public
string
ColumnText
{
get
;
set
;
}
public
int
Total
{
get
;
set
;
}
}
}
}
}
Bailun.DC.Services/WebApiService/FinanceService.cs
View file @
3ec2cfa2
...
@@ -1954,7 +1954,7 @@ AND platform_type = '{item.platform_type}' AND financecategoryname = '{item.fina
...
@@ -1954,7 +1954,7 @@ AND platform_type = '{item.platform_type}' AND financecategoryname = '{item.fina
/// <param name="bailunSku"></param>
/// <param name="bailunSku"></param>
/// <param name="month"></param>
/// <param name="month"></param>
/// <returns></returns>
/// <returns></returns>
public
CommonApiResponseDto
<
GetMonthStockWeightingOutputDto
>
GetMonthStockWeightingList
(
string
bailunSku
,
string
month
)
public
CommonApiResponseDto
<
GetMonthStockWeightingOutputDto
>
GetMonthStockWeightingList
(
string
bailunSku
,
string
month
,
int
page
,
int
limit
)
{
{
var
result
=
new
CommonApiResponseDto
<
GetMonthStockWeightingOutputDto
>
{
Data
=
new
GetMonthStockWeightingOutputDto
()
};
var
result
=
new
CommonApiResponseDto
<
GetMonthStockWeightingOutputDto
>
{
Data
=
new
GetMonthStockWeightingOutputDto
()
};
if
(
string
.
IsNullOrWhiteSpace
(
month
))
return
result
;
if
(
string
.
IsNullOrWhiteSpace
(
month
))
return
result
;
...
@@ -1984,12 +1984,25 @@ AND platform_type = '{item.platform_type}' AND financecategoryname = '{item.fina
...
@@ -1984,12 +1984,25 @@ AND platform_type = '{item.platform_type}' AND financecategoryname = '{item.fina
sql
.
Append
(
" FROM dc_month_stock_weighting WHERE 1=1 "
);
sql
.
Append
(
" FROM dc_month_stock_weighting WHERE 1=1 "
);
if
(!
string
.
IsNullOrWhiteSpace
(
bailunSku
))
if
(!
string
.
IsNullOrWhiteSpace
(
bailunSku
))
{
{
sql
.
Append
(
" AND bailun_sku = @bailun_sku"
);
//sql.Append(" AND bailun_sku in @bailun_sku ");
param
.
Add
(
"bailun_sku"
,
bailunSku
);
//param.Add("bailun_sku", bailunSku);
sql
.
Append
(
$" AND bailun_sku like '%
{
bailunSku
}
%' "
);
}
sql
.
Append
(
" GROUP BY bailun_sku "
);
//sql.Append(" limit @limit offset @offset ");
//param.Add("limit", limit);
//param.Add("offset", (page - 1) * limit);
using
(
var
cn
=
new
MySqlConnection
(
GlobalConfig
.
ConnectionString
))
{
if
(
cn
.
State
==
ConnectionState
.
Closed
)
{
cn
.
Open
();
}
int
total
=
0
;
result
.
Data
.
Data
=
cn
.
Page
<
dynamic
>(
page
,
limit
,
sql
.
ToString
(),
ref
total
,
param
).
AsList
();
result
.
Data
.
Total
=
total
;
result
.
Data
.
ColumnText
=
vueColumn
.
ToString
();
}
}
sql
.
Append
(
" GROUP BY bailun_sku;"
);
result
.
Data
.
Data
=
SimpleCRUD
.
Query
<
dynamic
>(
sql
.
ToString
(),
param
,
GlobalConfig
.
ConnectionString
);
result
.
Data
.
ColumnText
=
vueColumn
.
ToString
();
return
result
;
return
result
;
}
}
#
endregion
#
endregion
...
...
Bailun.DC.WebApi/Controllers/FinanceController.cs
View file @
3ec2cfa2
...
@@ -620,11 +620,13 @@ namespace Bailun.DC.WebApi.Controllers
...
@@ -620,11 +620,13 @@ namespace Bailun.DC.WebApi.Controllers
/// </summary>
/// </summary>
/// <param name="bailunSku"></param>
/// <param name="bailunSku"></param>
/// <param name="month"></param>
/// <param name="month"></param>
/// <param name="page"></param>
/// <param name="limit"></param>
/// <returns></returns>
/// <returns></returns>
[
HttpPost
(
"getMonthStockWeightingList"
)]
[
HttpPost
(
"getMonthStockWeightingList"
)]
public
CommonApiResponseDto
<
GetMonthStockWeightingOutputDto
>
GetMonthStockWeightingList
(
string
bailunSku
,
string
month
)
public
CommonApiResponseDto
<
GetMonthStockWeightingOutputDto
>
GetMonthStockWeightingList
(
string
bailunSku
,
string
month
,
int
page
=
1
,
int
limit
=
20
)
{
{
return
new
FinanceService
().
GetMonthStockWeightingList
(
bailunSku
,
month
);
return
new
FinanceService
().
GetMonthStockWeightingList
(
bailunSku
,
month
,
page
,
limit
);
}
}
#
endregion
#
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