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
95ae2e44
Commit
95ae2e44
authored
Feb 21, 2022
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
医院其他绩效备注
parent
34ffa4da
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
108 additions
and
26 deletions
+108
-26
performance/Performance.Api/Controllers/EmployeeController.cs
+85
-18
performance/Performance.Api/Template/医院人员绩效模板.xlsx
+0
-0
performance/Performance.DtoModels/Enum.cs
+1
-1
performance/Performance.Services/EmployeeService.cs
+22
-7
No files found.
performance/Performance.Api/Controllers/EmployeeController.cs
View file @
95ae2e44
...
@@ -319,18 +319,19 @@ public ApiResponse GetAprDetail([FromBody] per_apr_amount request)
...
@@ -319,18 +319,19 @@ public ApiResponse GetAprDetail([FromBody] per_apr_amount request)
if
(
employee
==
null
||
!
employee
.
Any
())
if
(
employee
==
null
||
!
employee
.
Any
())
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
employee
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
employee
);
var
result
=
employee
.
GroupBy
(
t
=>
new
{
t
.
AccountingUnit
,
t
.
PersonnelNumber
,
t
.
DoctorName
})
var
result
=
employee
.
GroupBy
(
t
=>
new
{
t
.
AccountingUnit
,
t
.
PersonnelNumber
,
t
.
DoctorName
})
.
Select
(
t
=>
new
.
Select
(
t
=>
new
{
{
PersonnelNumber
=
t
.
Key
.
PersonnelNumber
,
PersonnelNumber
=
t
.
Key
.
PersonnelNumber
,
DoctorName
=
t
.
Key
.
DoctorName
,
DoctorName
=
t
.
Key
.
DoctorName
,
AccountingUnit
=
t
.
Key
.
AccountingUnit
,
AccountingUnit
=
t
.
Key
.
AccountingUnit
,
Status
=
t
.
Any
(
s
=>
s
.
Status
==
2
)
?
2
:
t
.
Any
(
s
=>
s
.
Status
==
4
)
?
4
:
t
.
FirstOrDefault
().
Status
,
Status
=
t
.
Any
(
s
=>
s
.
Status
==
2
)
?
2
:
t
.
Any
(
s
=>
s
.
Status
==
4
)
?
4
:
t
.
FirstOrDefault
().
Status
,
Detail
=
t
.
GroupBy
(
group
=>
group
.
PerforType
).
Select
(
s
=>
new
TitleValue
<
decimal
>
Detail
=
t
.
GroupBy
(
group
=>
group
.
PerforType
).
Select
(
s
=>
new
{
{
Title
=
string
.
IsNullOrEmpty
(
s
.
Key
)
?
"未知"
:
s
.
Key
,
Title
=
string
.
IsNullOrEmpty
(
s
.
Key
)
?
"未知"
:
s
.
Key
,
Value
=
s
.
Sum
(
sum
=>
sum
.
Amount
??
0
)
Value
=
s
.
Sum
(
sum
=>
sum
.
Amount
??
0
),
Remark
=
s
.
FirstOrDefault
()?.
Remark
??
""
,
})
})
});
});
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
result
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
result
);
...
@@ -463,20 +464,51 @@ public ApiResponse<List<TitleValue>> GetPerforTypeDict([FromRoute] int allotId)
...
@@ -463,20 +464,51 @@ public ApiResponse<List<TitleValue>> GetPerforTypeDict([FromRoute] int allotId)
[
HttpPost
]
[
HttpPost
]
public
ApiResponse
AprOverview
(
int
allotId
)
public
ApiResponse
AprOverview
(
int
allotId
)
{
{
var
roleType
=
new
[]
{
3
,
4
,
9
,
10
};
//var roleType = new[] { 3, 4, 9, 10 };
//var userid = claim.GetUserId();
//var user = userService.GetUser(userid);
//var role = roleService.GetUserRole(user.UserID);
//var result = new List<Dictionary<string, string>>();
//if (role.Any(t => roleType.Contains(t.Type.Value)))
//result = employeeService.GetOtherPerStats(allotId, user.Department ?? "");
//else
// result = employeeService.GetOtherPerStats(allotId);
//return new ApiResponse(ResponseType.OK, result);
if
(
allotId
==
0
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数AllotId无效!"
);
var
employees
=
employeeService
.
GetAprList
(
allotId
,
""
,
3
);
if
(
employees
==
null
||
!
employees
.
Any
())
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
employees
);
var
roleType
=
new
[]
{
(
int
)
Role
.
护士长
,
(
int
)
Role
.
科主任
,
(
int
)
Role
.
特殊科室
,
(
int
)
Role
.
行政科室
,
};
var
userid
=
claim
.
GetUserId
();
var
userid
=
claim
.
GetUserId
();
var
user
=
userService
.
GetUser
(
userid
);
var
user
=
userService
.
GetUser
(
userid
);
var
role
=
roleService
.
GetUserRole
(
user
.
UserID
);
var
role
=
roleService
.
GetUserRole
(
user
.
UserID
);
var
result
=
new
List
<
Dictionary
<
string
,
string
>>();
if
(
role
.
Any
(
t
=>
roleType
.
Contains
(
t
.
Type
.
Value
)))
if
(
role
.
Any
(
t
=>
roleType
.
Contains
(
t
.
Type
.
Value
)))
result
=
employeeService
.
GetOtherPerStats
(
allotId
,
user
.
Department
??
""
);
employees
=
employees
.
Where
(
w
=>
w
.
AccountingUnit
==
user
.
Department
).
ToList
();
else
result
=
employeeService
.
GetOtherPerStats
(
allotId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
var
result
=
employees
.
GroupBy
(
t
=>
new
{
t
.
AccountingUnit
,
t
.
PersonnelNumber
,
t
.
DoctorName
})
.
Select
(
t
=>
new
{
PersonnelNumber
=
t
.
Key
.
PersonnelNumber
,
DoctorName
=
t
.
Key
.
DoctorName
,
AccountingUnit
=
t
.
Key
.
AccountingUnit
,
Status
=
t
.
Any
(
s
=>
s
.
Status
==
2
)
?
2
:
t
.
Any
(
s
=>
s
.
Status
==
4
)
?
4
:
t
.
FirstOrDefault
().
Status
,
Detail
=
t
.
GroupBy
(
group
=>
group
.
PerforType
).
Select
(
s
=>
new
{
Title
=
string
.
IsNullOrEmpty
(
s
.
Key
)
?
"未知"
:
s
.
Key
,
Remark
=
s
.
FirstOrDefault
()?.
Remark
??
""
,
Value
=
s
.
Sum
(
sum
=>
sum
.
Amount
??
0
)
})
});
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
result
);
}
}
#
endregion
#
endregion
...
@@ -576,16 +608,19 @@ public ApiResponse GetAprHideDetail([FromBody] per_apr_amount request)
...
@@ -576,16 +608,19 @@ public ApiResponse GetAprHideDetail([FromBody] per_apr_amount request)
if
(
employee
==
null
||
!
employee
.
Any
())
if
(
employee
==
null
||
!
employee
.
Any
())
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
employee
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
employee
);
var
result
=
employee
.
GroupBy
(
t
=>
new
{
t
.
AccountingUnit
,
t
.
PersonnelNumber
,
t
.
DoctorName
}).
Select
(
t
=>
new
var
result
=
employee
.
GroupBy
(
t
=>
new
{
t
.
AccountingUnit
,
t
.
PersonnelNumber
,
t
.
DoctorName
})
.
Select
(
t
=>
new
{
{
PersonnelNumber
=
t
.
Key
.
PersonnelNumber
,
PersonnelNumber
=
t
.
Key
.
PersonnelNumber
,
DoctorName
=
t
.
Key
.
DoctorName
,
DoctorName
=
t
.
Key
.
DoctorName
,
AccountingUnit
=
t
.
Key
.
AccountingUnit
,
AccountingUnit
=
t
.
Key
.
AccountingUnit
,
Status
=
t
.
Any
(
s
=>
s
.
Status
==
2
)
?
2
:
t
.
Any
(
s
=>
s
.
Status
==
4
)
?
4
:
t
.
FirstOrDefault
().
Status
,
Status
=
t
.
Any
(
s
=>
s
.
Status
==
2
)
?
2
:
t
.
Any
(
s
=>
s
.
Status
==
4
)
?
4
:
t
.
FirstOrDefault
().
Status
,
Detail
=
t
.
GroupBy
(
group
=>
group
.
PerforType
).
Select
(
s
=>
new
TitleValue
<
decimal
>
Detail
=
t
.
GroupBy
(
group
=>
group
.
PerforType
).
Select
(
s
=>
new
{
{
Title
=
string
.
IsNullOrEmpty
(
s
.
Key
)
?
"未知"
:
s
.
Key
,
Title
=
string
.
IsNullOrEmpty
(
s
.
Key
)
?
"未知"
:
s
.
Key
,
Value
=
s
.
Sum
(
sum
=>
sum
.
Amount
??
0
)
Value
=
s
.
Sum
(
sum
=>
sum
.
Amount
??
0
),
Remark
=
s
.
FirstOrDefault
()?.
Remark
??
""
,
})
})
});
});
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
result
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
result
);
...
@@ -717,8 +752,40 @@ public ApiResponse<List<TitleValue>> GetPerforTypeDictHide([FromRoute] int allot
...
@@ -717,8 +752,40 @@ public ApiResponse<List<TitleValue>> GetPerforTypeDictHide([FromRoute] int allot
[
HttpPost
]
[
HttpPost
]
public
ApiResponse
AprHideOverview
(
int
allotId
)
public
ApiResponse
AprHideOverview
(
int
allotId
)
{
{
var
relust
=
employeeService
.
GetOtherPerStatsHide
(
allotId
);
//var relust = employeeService.GetOtherPerStatsHide(allotId);
return
new
ApiResponse
(
ResponseType
.
OK
,
relust
);
//return new ApiResponse(ResponseType.OK, relust);
if
(
allotId
==
0
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数AllotId无效!"
);
var
employees
=
employeeService
.
GetAprHideList
(
allotId
,
""
,
3
);
if
(
employees
==
null
||
!
employees
.
Any
())
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
employees
);
var
roleType
=
new
[]
{
(
int
)
Role
.
护士长
,
(
int
)
Role
.
科主任
,
(
int
)
Role
.
特殊科室
,
(
int
)
Role
.
行政科室
,
};
var
userid
=
claim
.
GetUserId
();
var
user
=
userService
.
GetUser
(
userid
);
var
role
=
roleService
.
GetUserRole
(
user
.
UserID
);
if
(
role
.
Any
(
t
=>
roleType
.
Contains
(
t
.
Type
.
Value
)))
employees
=
employees
.
Where
(
w
=>
w
.
AccountingUnit
==
user
.
Department
).
ToList
();
var
result
=
employees
.
GroupBy
(
t
=>
new
{
t
.
AccountingUnit
,
t
.
PersonnelNumber
,
t
.
DoctorName
})
.
Select
(
t
=>
new
{
PersonnelNumber
=
t
.
Key
.
PersonnelNumber
,
DoctorName
=
t
.
Key
.
DoctorName
,
AccountingUnit
=
t
.
Key
.
AccountingUnit
,
Status
=
t
.
Any
(
s
=>
s
.
Status
==
2
)
?
2
:
t
.
Any
(
s
=>
s
.
Status
==
4
)
?
4
:
t
.
FirstOrDefault
().
Status
,
Detail
=
t
.
GroupBy
(
group
=>
group
.
PerforType
).
Select
(
s
=>
new
{
Title
=
string
.
IsNullOrEmpty
(
s
.
Key
)
?
"未知"
:
s
.
Key
,
Remark
=
s
.
FirstOrDefault
()?.
Remark
??
""
,
Value
=
s
.
Sum
(
sum
=>
sum
.
Amount
??
0
)
})
});
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
result
);
}
}
#
endregion
#
endregion
...
...
performance/Performance.Api/Template/医院人员绩效模板.xlsx
View file @
95ae2e44
No preview for this file type
performance/Performance.DtoModels/Enum.cs
View file @
95ae2e44
...
@@ -132,7 +132,7 @@ public enum Role
...
@@ -132,7 +132,7 @@ public enum Role
特殊科室
=
9
,
特殊科室
=
9
,
行政科室
=
10
,
行政科室
=
10
,
数据收集
=
11
,
数据收集
=
11
,
护理部审核
=
1
3
,
护理部审核
=
1
2
,
绩效查询
=
13
,
绩效查询
=
13
,
}
}
...
...
performance/Performance.Services/EmployeeService.cs
View file @
95ae2e44
...
@@ -449,9 +449,16 @@ public List<per_apr_amount> GetAprList(int allotId, int userId)
...
@@ -449,9 +449,16 @@ public List<per_apr_amount> GetAprList(int allotId, int userId)
/// <param name="allotId"></param>
/// <param name="allotId"></param>
/// <param name="department"></param>
/// <param name="department"></param>
/// <returns></returns>
/// <returns></returns>
public
List
<
view_per_apr_amount
>
GetAprList
(
int
allotId
,
string
department
)
public
List
<
view_per_apr_amount
>
GetAprList
(
int
allotId
,
string
department
,
int
?
status
=
null
)
{
{
var
list
=
perapramountRepository
.
GetFullAmount
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
Amount
.
HasValue
&&
t
.
Amount
!=
0
&&
(
t
.
TypeInDepartment
??
""
)
==
department
);
Expression
<
Func
<
per_apr_amount
,
bool
>>
predicate
=
w
=>
w
.
AllotId
==
allotId
&&
w
.
Amount
.
HasValue
&&
w
.
Amount
!=
0
;
if
(!
string
.
IsNullOrEmpty
(
department
))
predicate
=
predicate
.
And
(
w
=>
!
string
.
IsNullOrEmpty
(
w
.
TypeInDepartment
)
&&
w
.
TypeInDepartment
==
department
);
if
(
status
.
HasValue
)
predicate
=
predicate
.
And
(
w
=>
w
.
Status
==
status
);
var
list
=
perapramountRepository
.
GetFullAmount
(
predicate
);
if
(
list
!=
null
&&
list
.
Any
())
if
(
list
!=
null
&&
list
.
Any
())
list
=
list
.
OrderBy
(
t
=>
t
.
DoctorName
).
ToList
();
list
=
list
.
OrderBy
(
t
=>
t
.
DoctorName
).
ToList
();
...
@@ -612,7 +619,7 @@ public string ImpoerAprEmployees(int allotid, string path, int userid)
...
@@ -612,7 +619,7 @@ public string ImpoerAprEmployees(int allotid, string path, int userid)
Dictionary
<
string
,
int
>
dict
=
new
Dictionary
<
string
,
int
>
Dictionary
<
string
,
int
>
dict
=
new
Dictionary
<
string
,
int
>
{
{
{
"人员工号"
,
-
1
},
{
"姓名"
,
-
1
},
{
"绩效类型"
,
-
1
},
{
"金额"
,
-
1
},
{
"人员工号"
,
-
1
},
{
"姓名"
,
-
1
},
{
"绩效类型"
,
-
1
},
{
"金额"
,
-
1
},
{
"备注"
,
-
1
},
};
};
foreach
(
var
key
in
dict
.
Keys
.
ToList
())
foreach
(
var
key
in
dict
.
Keys
.
ToList
())
...
@@ -638,8 +645,8 @@ public string ImpoerAprEmployees(int allotid, string path, int userid)
...
@@ -638,8 +645,8 @@ public string ImpoerAprEmployees(int allotid, string path, int userid)
DoctorName
=
dict
[
"姓名"
]
<
0
?
""
:
row
.
GetCell
(
dict
[
"姓名"
]).
GetValue
(),
DoctorName
=
dict
[
"姓名"
]
<
0
?
""
:
row
.
GetCell
(
dict
[
"姓名"
]).
GetValue
(),
PerforType
=
dict
[
"绩效类型"
]
<
0
?
""
:
row
.
GetCell
(
dict
[
"绩效类型"
]).
GetValue
(),
PerforType
=
dict
[
"绩效类型"
]
<
0
?
""
:
row
.
GetCell
(
dict
[
"绩效类型"
]).
GetValue
(),
Amount
=
dict
[
"金额"
]
<
0
?
0
:
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
dict
[
"金额"
]).
GetValue
(),
0
),
Amount
=
dict
[
"金额"
]
<
0
?
0
:
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
dict
[
"金额"
]).
GetValue
(),
0
),
Remark
=
dict
[
"备注"
]
<
0
?
""
:
row
.
GetCell
(
dict
[
"金额"
]).
GetValue
(),
TypeInDepartment
=
typeIn
,
TypeInDepartment
=
typeIn
,
//AccountingUnit = dict["核算单元"] < 0 ? "" : row.GetCell(dict["核算单元"]).GetValue(),
AllotId
=
allotid
,
AllotId
=
allotid
,
CreateDate
=
createtime
,
CreateDate
=
createtime
,
CreateUser
=
userid
,
CreateUser
=
userid
,
...
@@ -859,9 +866,16 @@ public List<per_apr_amount_hide> GetAprHideList(int allotId, int userId)
...
@@ -859,9 +866,16 @@ public List<per_apr_amount_hide> GetAprHideList(int allotId, int userId)
/// <param name="allotId"></param>
/// <param name="allotId"></param>
/// <param name="department"></param>
/// <param name="department"></param>
/// <returns></returns>
/// <returns></returns>
public
List
<
view_per_apr_amount
>
GetAprHideList
(
int
allotId
,
string
department
)
public
List
<
view_per_apr_amount
>
GetAprHideList
(
int
allotId
,
string
department
,
int
?
status
=
null
)
{
{
var
list
=
_hideRepository
.
GetFullAmount
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
Amount
.
HasValue
&&
t
.
Amount
!=
0
&&
(
t
.
TypeInDepartment
??
""
)
==
department
);
Expression
<
Func
<
per_apr_amount_hide
,
bool
>>
predicate
=
w
=>
w
.
AllotId
==
allotId
&&
w
.
Amount
.
HasValue
&&
w
.
Amount
!=
0
;
if
(!
string
.
IsNullOrEmpty
(
department
))
predicate
=
predicate
.
And
(
w
=>
!
string
.
IsNullOrEmpty
(
w
.
TypeInDepartment
)
&&
w
.
TypeInDepartment
==
department
);
if
(
status
.
HasValue
)
predicate
=
predicate
.
And
(
w
=>
w
.
Status
==
status
);
var
list
=
_hideRepository
.
GetFullAmount
(
predicate
);
if
(
list
!=
null
&&
list
.
Any
())
if
(
list
!=
null
&&
list
.
Any
())
list
=
list
.
OrderBy
(
t
=>
t
.
DoctorName
).
ToList
();
list
=
list
.
OrderBy
(
t
=>
t
.
DoctorName
).
ToList
();
...
@@ -1016,7 +1030,7 @@ public void ImpoerAprHideEmployees(int allotid, string path, int userid)
...
@@ -1016,7 +1030,7 @@ public void ImpoerAprHideEmployees(int allotid, string path, int userid)
Dictionary
<
string
,
int
>
dict
=
new
Dictionary
<
string
,
int
>
Dictionary
<
string
,
int
>
dict
=
new
Dictionary
<
string
,
int
>
{
{
{
"人员工号"
,
-
1
},
{
"姓名"
,
-
1
},
{
"绩效类型"
,
-
1
},
{
"金额"
,
-
1
},
{
"人员工号"
,
-
1
},
{
"姓名"
,
-
1
},
{
"绩效类型"
,
-
1
},
{
"金额"
,
-
1
},
{
"备注"
,
-
1
},
};
};
foreach
(
var
key
in
dict
.
Keys
.
ToList
())
foreach
(
var
key
in
dict
.
Keys
.
ToList
())
...
@@ -1040,6 +1054,7 @@ public void ImpoerAprHideEmployees(int allotid, string path, int userid)
...
@@ -1040,6 +1054,7 @@ public void ImpoerAprHideEmployees(int allotid, string path, int userid)
DoctorName
=
dict
[
"姓名"
]
<
0
?
""
:
row
.
GetCell
(
dict
[
"姓名"
]).
GetValue
(),
DoctorName
=
dict
[
"姓名"
]
<
0
?
""
:
row
.
GetCell
(
dict
[
"姓名"
]).
GetValue
(),
PerforType
=
dict
[
"绩效类型"
]
<
0
?
""
:
row
.
GetCell
(
dict
[
"绩效类型"
]).
GetValue
(),
PerforType
=
dict
[
"绩效类型"
]
<
0
?
""
:
row
.
GetCell
(
dict
[
"绩效类型"
]).
GetValue
(),
Amount
=
dict
[
"金额"
]
<
0
?
0
:
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
dict
[
"金额"
]).
GetValue
(),
0
),
Amount
=
dict
[
"金额"
]
<
0
?
0
:
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
dict
[
"金额"
]).
GetValue
(),
0
),
Remark
=
dict
[
"备注"
]
<
0
?
""
:
row
.
GetCell
(
dict
[
"备注"
]).
GetValue
(),
TypeInDepartment
=
typeIn
,
TypeInDepartment
=
typeIn
,
AllotId
=
allotid
,
AllotId
=
allotid
,
CreateDate
=
createtime
,
CreateDate
=
createtime
,
...
...
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