Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
performance
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zry
performance
Commits
9fc7415a
Commit
9fc7415a
authored
Dec 25, 2020
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增报表实体
parent
d5de727e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
56 additions
and
7 deletions
+56
-7
performance/Performance.Api/GraphQLSchema/PerformanceQuery.cs
+3
-3
performance/Performance.DtoModels/ReportData.cs
+2
-2
performance/Performance.DtoModels/ReportTable.cs
+49
-0
performance/Performance.Services/GraphQLService.cs
+2
-2
No files found.
performance/Performance.Api/GraphQLSchema/PerformanceQuery.cs
View file @
9fc7415a
...
...
@@ -33,8 +33,8 @@ public PerformanceQuery(GraphQLService service)
}
);
Field
<
ListGraphType
<
ChartDataType
>>(
"chardata"
,
arguments
:
Arguments
(
new
QueryArgument
<
StringGraphType
>()
{
Name
=
QueryParams
.
itemName
}
),
Field
<
ListGraphType
<
ChartDataType
>>(
"char
t
data"
,
arguments
:
Arguments
(),
resolve
:
context
=>
{
int
reportId
=
context
.
Arguments
.
ContainsKey
(
QueryParams
.
reportId
)
...
...
@@ -46,7 +46,7 @@ public PerformanceQuery(GraphQLService service)
);
Field
<
ListGraphType
<
ReportPerformanceType
>>(
"performances"
,
arguments
:
Arguments
(),
arguments
:
Arguments
(
new
QueryArgument
<
StringGraphType
>()
{
Name
=
QueryParams
.
itemName
}
),
resolve
:
context
=>
{
int
reportId
=
context
.
Arguments
.
ContainsKey
(
QueryParams
.
reportId
)
...
...
performance/Performance.DtoModels/ReportData.cs
View file @
9fc7415a
...
...
@@ -129,12 +129,12 @@ public class ChartData
/// <summary>
/// 值
/// </summary>
public
Double
Value
{
get
;
set
;
}
public
decimal
Value
{
get
;
set
;
}
/// <summary>
/// 总量
/// </summary>
public
Double
Total
{
get
;
set
;
}
public
decimal
Total
{
get
;
set
;
}
/// <summary>
/// ChartData 类型标签
...
...
performance/Performance.DtoModels/ReportTable.cs
0 → 100644
View file @
9fc7415a
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.DtoModels
{
public
class
ReportTable
{
/// <summary>
/// 核算单元
/// </summary>
public
string
AccountingUnit
{
get
;
set
;
}
/// <summary>
/// 统计大分类
/// </summary>
public
string
Category
{
get
;
set
;
}
/// <summary>
/// 统计小分类
/// </summary>
public
string
ItemName
{
get
;
set
;
}
/// <summary>
/// 本期
/// </summary>
public
decimal
CurrentValue
{
get
;
set
;
}
/// <summary>
/// 上期
/// </summary>
public
decimal
LastIssueValue
{
get
;
set
;
}
/// <summary>
/// 同期
/// </summary>
public
decimal
SamePeriodValue
{
get
;
set
;
}
/// <summary>
/// 预算
/// </summary>
public
decimal
BudgetValue
{
get
;
set
;
}
/// <summary>
/// 比率
/// </summary>
public
decimal
RatioValue
{
get
;
set
;
}
}
}
performance/Performance.Services/GraphQLService.cs
View file @
9fc7415a
...
...
@@ -63,7 +63,7 @@ public List<ChartData> GetChartData(int reportId, DynamicParameters parameters)
var
sql
=
report
.
Content
.
ToLower
();
var
chartData
=
repreportRepository
.
DapperQuery
<
ChartData
>(
sql
,
parameters
);
var
chartData
=
repreportRepository
.
DapperQuery
<
ChartData
>(
sql
,
parameters
,
60
*
5
);
return
chartData
!=
null
&&
chartData
.
Any
()
?
chartData
.
ToList
()
:
new
List
<
ChartData
>();
}
...
...
@@ -85,7 +85,7 @@ public List<report_performance> GetReportPerformance(int reportId, DynamicParame
var
sql
=
report
.
Content
.
ToLower
();
var
chartData
=
repreportRepository
.
DapperQuery
<
report_performance
>(
sql
,
parameters
);
var
chartData
=
repreportRepository
.
DapperQuery
<
report_performance
>(
sql
,
parameters
,
60
*
5
);
return
chartData
!=
null
&&
chartData
.
Any
()
?
chartData
.
ToList
()
:
new
List
<
report_performance
>();
}
...
...
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