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
e7ee7bcb
Commit
e7ee7bcb
authored
Dec 26, 2022
by
纪旭 韦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
getCheckBase接口
parent
97ba3478
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
0 deletions
+46
-0
performance/Performance.Api/Controllers/AllotController.cs
+13
-0
performance/Performance.Api/wwwroot/Performance.Api.xml
+6
-0
performance/Performance.Services/AllotService.cs
+17
-0
performance/Performance.Services/DapperService.cs
+10
-0
No files found.
performance/Performance.Api/Controllers/AllotController.cs
View file @
e7ee7bcb
...
...
@@ -503,6 +503,19 @@ public ApiResponse Issued([FromBody] AllotRequest request)
}
/// <summary>
/// 查询CheckBase
/// </summary>
/// <param name="allotId"></param>
/// <returns></returns>
[
Route
(
"getCheckBase"
)]
[
HttpGet
]
public
ApiResponse
GetCheckBase
([
FromQuery
]
int
allotId
)
{
var
res
=
_allotService
.
GetCheckBase
(
allotId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
res
);
}
/// <summary>
/// 绩效详情计算公式显示/隐藏
/// </summary>
/// <param name="request"></param>
...
...
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
e7ee7bcb
...
...
@@ -240,6 +240,12 @@
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.AllotController.GetCheckBase(System.Int32)"
>
<summary>
查询CheckBase
</summary>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.AllotController.UpdateAllotShowFormula(Performance.DtoModels.AllotRequest)"
>
<summary>
绩效详情计算公式显示/隐藏
...
...
performance/Performance.Services/AllotService.cs
View file @
e7ee7bcb
...
...
@@ -484,6 +484,23 @@ public void Generate(per_allot allot)
}
}
public
Dictionary
<
string
,
object
>
GetCheckBase
(
int
allotid
)
{
var
views
=
new
[]
{
"view_check_base_emp"
,
"view_check_base_dept"
};
var
names
=
new
[]
{
"CheckEmp"
,
"CheckDept"
};
var
dics
=
new
Dictionary
<
string
,
object
>();
for
(
int
i
=
0
;
i
<
views
.
Length
;
i
++)
{
var
dic
=
new
Dictionary
<
string
,
object
>()
{
{
"body"
,
_service
.
QueryView
(
views
[
i
],
allotid
)},
{
"columns"
,
_service
.
QueryTableStructure
(
views
[
i
])}
};
dics
.
Add
(
names
[
i
],
dic
);
}
return
dics
;
}
/// <summary>
/// 绩效生成报表
/// </summary>
...
...
performance/Performance.Services/DapperService.cs
View file @
e7ee7bcb
...
...
@@ -302,5 +302,15 @@ public IEnumerable<dynamic> QueryTableStructure(string tableName)
return
connection
.
Query
(
sql
,
new
{
tableName
},
commandTimeout
:
60
*
60
);
}
}
public
IEnumerable
<
dynamic
>
QueryView
(
string
viewName
,
int
allotID
)
{
using
(
var
connection
=
new
MySqlConnection
(
_options
.
Value
.
PerformanceConnectionString
))
{
if
(
connection
.
State
!=
ConnectionState
.
Open
)
connection
.
Open
();
string
sql
=
$@"select * from
{
viewName
}
where allotID = @allotID"
;
return
connection
.
Query
(
sql
,
new
{
allotID
},
commandTimeout
:
60
*
60
);
}
}
}
}
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