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
092702d5
Commit
092702d5
authored
Jun 28, 2022
by
1391696987
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
预留金额返回字段添加Source,修复bug
parent
26dc5992
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
5 deletions
+19
-5
performance/Performance.DtoModels/Response/EmployeeReservedDto.cs
+5
-0
performance/Performance.Repository/PerforReportRepository .cs
+3
-1
performance/Performance.Services/AllotService.cs
+9
-2
performance/Performance.Services/UnitTypeUtil.cs
+2
-2
No files found.
performance/Performance.DtoModels/Response/EmployeeReservedDto.cs
View file @
092702d5
...
...
@@ -19,6 +19,11 @@ public class EmployeeReservedDto
/// <summary>
///
/// </summary>
public
int
Source
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
string
UnitType
{
get
;
set
;
}
/// <summary>
...
...
performance/Performance.Repository/PerforReportRepository .cs
View file @
092702d5
...
...
@@ -390,7 +390,9 @@ public List<EmployeeReservedDto> GetEmployeeReserved(ReservedRequest request)
string
view
=
request
.
Source
==
1
?
"view_allot_result_report_emp"
:
request
.
Source
==
2
?
"view_allot_result_report_issue_source"
:
request
.
Source
==
3
?
"view_allot_result_report"
:
""
;
string
sql
=
$"SELECT * FROM
{
view
}
WHERE HospitalID=@HospitalID AND Year=@Year"
;
return
DapperQuery
<
EmployeeReservedDto
>(
sql
,
new
{
HospitalID
=
request
.
HospitalId
,
Year
=
request
.
Year
},
commandTimeout
:
60
*
60
)?.
ToList
();
var
reserveds
=
DapperQuery
<
EmployeeReservedDto
>(
sql
,
new
{
HospitalID
=
request
.
HospitalId
,
Year
=
request
.
Year
},
commandTimeout
:
60
*
60
)?.
ToList
();
reserveds
.
ForEach
(
t
=>
t
.
Source
=
request
.
Source
);
return
reserveds
;
}
...
...
performance/Performance.Services/AllotService.cs
View file @
092702d5
...
...
@@ -662,8 +662,15 @@ public List<EmployeeReservedDto> GetReserved(ReservedRequest request, int userid
var
role
=
roleService
.
GetUserRole
(
userid
)?.
FirstOrDefault
()?.
Type
;
if
(!
role
.
HasValue
)
throw
new
PerformanceException
(
"用户信息错误"
);
return
_reportRepository
.
GetEmployeeReserved
(
request
);
var
reserveds
=
_reportRepository
.
GetEmployeeReserved
(
request
);
if
(
reserveds
!=
null
&&
reserveds
.
Any
()
&&
userInfo
.
IsSecondAdmin
)
{
var
unitTpes
=
UnitTypeUtil
.
GetMaps
(
userInfo
?.
URole
.
Type
);
reserveds
=
reserveds
.
Where
(
w
=>
UnitTypeUtil
.
Is
(
w
.
UnitType
,
unitTpes
)
&&
w
.
AccountingUnit
==
userInfo
.
User
.
Department
)?.
ToList
();
}
return
reserveds
;
}
/// <summary>
/// 查询个人绩效
...
...
performance/Performance.Services/UnitTypeUtil.cs
View file @
092702d5
...
...
@@ -88,9 +88,9 @@ public static int GetUnitTypeValue(string unitType)
return
0
;
}
public
static
bool
Is
(
string
unit
,
params
UnitType
[]
types
)
public
static
bool
Is
(
string
unit
,
params
string
[]
types
)
{
return
!
string
.
IsNullOrEmpty
(
unit
)
&&
types
.
Any
(
w
=>
IsEqualsUnitType
(
w
.
ToString
()
,
unit
));
return
!
string
.
IsNullOrEmpty
(
unit
)
&&
types
.
Any
(
w
=>
IsEqualsUnitType
(
w
,
unit
));
}
}
...
...
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