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
2a6523ec
Commit
2a6523ec
authored
Apr 19, 2023
by
ruyun.zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取所有员工记录
parent
07fb0ab9
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
82 additions
and
22 deletions
+82
-22
performance/Performance.Api/Controllers/AttendanceController.cs
+3
-4
performance/Performance.Api/Controllers/PersonController.cs
+35
-0
performance/Performance.Api/appsettings.Localhost.json
+1
-1
performance/Performance.Api/wwwroot/Performance.Api.xml
+16
-1
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+1
-1
performance/Performance.DtoModels/Request/AttendanceDept.cs
+1
-1
performance/Performance.Services/AttendanceService.cs
+2
-14
performance/Performance.Services/PersonService.cs
+23
-0
No files found.
performance/Performance.Api/Controllers/AttendanceController.cs
View file @
2a6523ec
...
@@ -679,11 +679,12 @@ public ApiResponse DeptRollback(int allotId, string unitType)
...
@@ -679,11 +679,12 @@ public ApiResponse DeptRollback(int allotId, string unitType)
/// </summary>
/// </summary>
/// <param name="allotId">绩效月ID</param>
/// <param name="allotId">绩效月ID</param>
/// <param name="unitType">核算组别</param>
/// <param name="unitType">核算组别</param>
/// <param name="accountingUnit">核算单元</param>
/// <param name="audit"></param>
/// <param name="audit"></param>
/// <returns></returns>
/// <returns></returns>
[
HttpPost
]
[
HttpPost
]
[
Route
(
"dept/audit"
)]
[
Route
(
"dept/audit"
)]
public
ApiResponse
DeptAudit
(
int
allotId
,
string
unitType
,
[
FromBody
]
AttendanceDeptAudit
audit
)
public
ApiResponse
DeptAudit
(
int
allotId
,
string
unitType
,
string
accountingUnit
,
[
FromBody
]
AttendanceDeptAudit
audit
)
{
{
if
(
audit
==
null
)
if
(
audit
==
null
)
throw
new
PerformanceException
(
"审核参数错误"
);
throw
new
PerformanceException
(
"审核参数错误"
);
...
@@ -692,10 +693,8 @@ public ApiResponse DeptAudit(int allotId, string unitType, [FromBody] Attendance
...
@@ -692,10 +693,8 @@ public ApiResponse DeptAudit(int allotId, string unitType, [FromBody] Attendance
if
(!
states
.
Contains
(
audit
.
State
))
if
(!
states
.
Contains
(
audit
.
State
))
throw
new
PerformanceException
(
"暂不支持当前审核模式"
);
throw
new
PerformanceException
(
"暂不支持当前审核模式"
);
var
userid
=
claim
.
GetUserId
();
var
realName
=
claim
.
GetUserClaim
(
JwtClaimTypes
.
RealName
);
var
realName
=
claim
.
GetUserClaim
(
JwtClaimTypes
.
RealName
);
return
_attendanceService
.
DeptAudit
(
allotId
,
unitType
,
accountingUnit
,
audit
.
State
,
audit
.
Remark
,
realName
);
return
_attendanceService
.
DeptAudit
(
allotId
,
unitType
,
audit
.
State
,
audit
.
Remark
,
userid
,
realName
);
}
}
/// <summary>
/// <summary>
...
...
performance/Performance.Api/Controllers/PersonController.cs
View file @
2a6523ec
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.ComponentModel
;
using
System.IO
;
using
System.IO
;
using
System.Linq
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
System.Threading.Tasks
;
...
@@ -52,6 +53,40 @@ public ApiResponse GetPersons([FromRoute] int allotId, [FromBody] PersonParamsRe
...
@@ -52,6 +53,40 @@ public ApiResponse GetPersons([FromRoute] int allotId, [FromBody] PersonParamsRe
}
}
/// <summary>
/// <summary>
/// 获取所有员工记录
/// </summary>
/// <param name="allotId">绩效月ID</param>
/// <param name="personnelNumber">工号</param>
/// <param name="personnelName">姓名</param>
/// <param name="unitType">核算组别</param>
/// <param name="accountingUnit">核算单元</param>
/// <param name="searchText">多字段查询;支持“工号/姓名/核算组别/核算单元”</param>
/// <param name="pageIndex">页码 默认1</param>
/// <param name="pageSize">行数 默认</param>
/// <returns></returns>
[
Route
(
"employee/list"
)]
[
HttpPost
]
public
ApiResponse
GetEmployee
([
FromQuery
]
int
allotId
,
[
FromQuery
,
DefaultValue
(
""
)]
string
personnelNumber
,
[
FromQuery
,
DefaultValue
(
""
)]
string
personnelName
,
[
FromQuery
,
DefaultValue
(
""
)]
string
unitType
,
[
FromQuery
,
DefaultValue
(
""
)]
string
accountingUnit
,
[
FromQuery
,
DefaultValue
(
""
)]
string
searchText
,
[
FromQuery
,
DefaultValue
(
1
)]
int
pageIndex
,
[
FromQuery
,
DefaultValue
(
20
)]
int
pageSize
)
{
var
list
=
personService
.
GetEmployee
(
allotId
,
personnelNumber
,
personnelName
,
unitType
,
accountingUnit
,
searchText
,
pageIndex
,
pageSize
);
return
new
ApiResponse
(
ResponseType
.
OK
,
new
{
list
.
CurrentPage
,
list
.
TotalPages
,
list
.
PageSize
,
list
.
TotalCount
,
list
});
}
/// <summary>
/// 新增员工信息
/// 新增员工信息
/// </summary>
/// </summary>
/// <param name="request"></param>
/// <param name="request"></param>
...
...
performance/Performance.Api/appsettings.Localhost.json
View file @
2a6523ec
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
"/api/account/updateuser"
"/api/account/updateuser"
],
],
//登录过期时间
//登录过期时间
"ExpirationMinutes"
:
"1200"
,
"ExpirationMinutes"
:
"1200
000
"
,
//验证码过期
//验证码过期
"SmsCodeMinutes"
:
"5"
,
"SmsCodeMinutes"
:
"5"
,
////护士长二次绩效管理员
////护士长二次绩效管理员
...
...
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
2a6523ec
...
@@ -553,12 +553,13 @@
...
@@ -553,12 +553,13 @@
<param
name=
"unitType"
>
核算组别
</param>
<param
name=
"unitType"
>
核算组别
</param>
<returns></returns>
<returns></returns>
</member>
</member>
<member
name=
"M:Performance.Api.Controllers.AttendanceController.DeptAudit(System.Int32,System.String,Performance.DtoModels.Request.AttendanceDeptAudit)"
>
<member
name=
"M:Performance.Api.Controllers.AttendanceController.DeptAudit(System.Int32,System.String,
System.String,
Performance.DtoModels.Request.AttendanceDeptAudit)"
>
<summary>
<summary>
科室考勤上报结果审核
科室考勤上报结果审核
</summary>
</summary>
<param
name=
"allotId"
>
绩效月ID
</param>
<param
name=
"allotId"
>
绩效月ID
</param>
<param
name=
"unitType"
>
核算组别
</param>
<param
name=
"unitType"
>
核算组别
</param>
<param
name=
"accountingUnit"
>
核算单元
</param>
<param
name=
"audit"
></param>
<param
name=
"audit"
></param>
<returns></returns>
<returns></returns>
</member>
</member>
...
@@ -2028,6 +2029,20 @@
...
@@ -2028,6 +2029,20 @@
<param
name=
"request"
></param>
<param
name=
"request"
></param>
<returns></returns>
<returns></returns>
</member>
</member>
<member
name=
"M:Performance.Api.Controllers.PersonController.GetEmployee(System.Int32,System.String,System.String,System.String,System.String,System.String,System.Int32,System.Int32)"
>
<summary>
获取所有员工记录
</summary>
<param
name=
"allotId"
>
绩效月ID
</param>
<param
name=
"personnelNumber"
>
工号
</param>
<param
name=
"personnelName"
>
姓名
</param>
<param
name=
"unitType"
>
核算组别
</param>
<param
name=
"accountingUnit"
>
核算单元
</param>
<param
name=
"searchText"
>
多字段查询;支持“工号/姓名/核算组别/核算单元”
</param>
<param
name=
"pageIndex"
>
页码 默认1
</param>
<param
name=
"pageSize"
>
行数 默认
</param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.PersonController.CreatePerson(Performance.DtoModels.PerEmployeeResponse)"
>
<member
name=
"M:Performance.Api.Controllers.PersonController.CreatePerson(Performance.DtoModels.PerEmployeeResponse)"
>
<summary>
<summary>
新增员工信息
新增员工信息
...
...
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
2a6523ec
...
@@ -2142,7 +2142,7 @@
...
@@ -2142,7 +2142,7 @@
</member>
</member>
<member
name=
"P:Performance.DtoModels.Request.AttendanceDeptMore.UnitType"
>
<member
name=
"P:Performance.DtoModels.Request.AttendanceDeptMore.UnitType"
>
<summary>
<summary>
人员类
别
核算组
别
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.DtoModels.Request.AttendanceDeptMore.AccountingUnit"
>
<member
name=
"P:Performance.DtoModels.Request.AttendanceDeptMore.AccountingUnit"
>
...
...
performance/Performance.DtoModels/Request/AttendanceDept.cs
View file @
2a6523ec
...
@@ -80,7 +80,7 @@ public class AttendanceDeptMore : AttendanceDept
...
@@ -80,7 +80,7 @@ public class AttendanceDeptMore : AttendanceDept
public
string
Code
{
get
;
set
;
}
public
string
Code
{
get
;
set
;
}
/// <summary>
/// <summary>
///
人员类
别
///
核算组
别
/// </summary>
/// </summary>
public
string
UnitType
{
get
;
set
;
}
public
string
UnitType
{
get
;
set
;
}
...
...
performance/Performance.Services/AttendanceService.cs
View file @
2a6523ec
...
@@ -1842,12 +1842,9 @@ public ApiResponse DeptRollback(int allotId, string unitType, int userid, string
...
@@ -1842,12 +1842,9 @@ public ApiResponse DeptRollback(int allotId, string unitType, int userid, string
/// <param name="unitType"></param>
/// <param name="unitType"></param>
/// <param name="state"></param>
/// <param name="state"></param>
/// <param name="remark"></param>
/// <param name="remark"></param>
/// <param name="userid"></param>
/// <param name="userName"></param>
/// <param name="userName"></param>
/// <returns></returns>
/// <returns></returns>
/// <exception cref="PerformanceException"></exception>
public
ApiResponse
DeptAudit
(
int
allotId
,
string
unitType
,
string
accountingUnit
,
int
state
,
string
remark
,
string
userName
)
/// <exception cref="NotImplementedException"></exception>
public
ApiResponse
DeptAudit
(
int
allotId
,
string
unitType
,
int
state
,
string
remark
,
int
userid
,
string
userName
)
{
{
var
allot
=
perforPerallotRepository
.
GetEntity
(
w
=>
w
.
ID
==
allotId
);
var
allot
=
perforPerallotRepository
.
GetEntity
(
w
=>
w
.
ID
==
allotId
);
if
(
allot
==
null
)
if
(
allot
==
null
)
...
@@ -1856,16 +1853,7 @@ public ApiResponse DeptAudit(int allotId, string unitType, int state, string rem
...
@@ -1856,16 +1853,7 @@ public ApiResponse DeptAudit(int allotId, string unitType, int state, string rem
var
begMonthDate
=
allot
.
Month
>=
1
&&
allot
.
Month
<=
12
?
new
DateTime
(
allot
.
Year
,
allot
.
Month
,
1
)
:
new
DateTime
(
allot
.
Year
,
12
,
1
);
var
begMonthDate
=
allot
.
Month
>=
1
&&
allot
.
Month
<=
12
?
new
DateTime
(
allot
.
Year
,
allot
.
Month
,
1
)
:
new
DateTime
(
allot
.
Year
,
12
,
1
);
var
endMonthDate
=
begMonthDate
.
AddMonths
(
1
).
AddDays
(-
1
);
var
endMonthDate
=
begMonthDate
.
AddMonths
(
1
).
AddDays
(-
1
);
//当角色对应时过滤
var
attendances
=
_attendanceDeptRepository
.
GetEntities
((
w
)
=>
w
.
AllotId
==
allotId
&&
unitType
.
Equals
(
w
.
UnitType
)
&&
accountingUnit
.
Equals
(
w
.
AccountingUnit
))
var
userInfo
=
_userRepository
.
GetUser
(
userid
);
if
(
userInfo
?.
User
==
null
)
throw
new
NotImplementedException
(
"当前用户不存在"
);
if
(
userInfo
?.
URole
==
null
)
throw
new
NotImplementedException
(
"当前用户暂未分配角色"
);
var
queryUnitTypes
=
UnitTypeUtil
.
GetMaps
(
userInfo
?.
URole
.
Type
??
0
);
string
queryAccountingUnit
=
userInfo
.
User
.
Department
;
if
(!
queryUnitTypes
.
Contains
(
unitType
))
throw
new
PerformanceException
(
"当前用户角色与“核算组别”不匹配"
);
var
attendances
=
_attendanceDeptRepository
.
GetEntities
((
w
)
=>
w
.
AllotId
==
allotId
&&
queryUnitTypes
.
Contains
(
w
.
UnitType
)
&&
queryAccountingUnit
.
Equals
(
w
.
AccountingUnit
))
??
new
List
<
per_attendance_dept
>();
??
new
List
<
per_attendance_dept
>();
if
(
attendances
.
Count
()
!=
attendances
.
Count
(
w
=>
w
.
State
==
(
int
)
Attendance
.
Report
.
提交
))
if
(
attendances
.
Count
()
!=
attendances
.
Count
(
w
=>
w
.
State
==
(
int
)
Attendance
.
Report
.
提交
))
...
...
performance/Performance.Services/PersonService.cs
View file @
2a6523ec
using
AutoMapper
;
using
AutoMapper
;
using
MassTransit.Internals.GraphValidation
;
using
Microsoft.AspNetCore.Hosting
;
using
Microsoft.AspNetCore.Hosting
;
using
Microsoft.Extensions.Logging
;
using
Microsoft.Extensions.Logging
;
using
Microsoft.Extensions.Options
;
using
Microsoft.Extensions.Options
;
...
@@ -255,6 +256,28 @@ public PageList<per_employee> GetPersons(int allotId, int userId, PersonParamsRe
...
@@ -255,6 +256,28 @@ public PageList<per_employee> GetPersons(int allotId, int userId, PersonParamsRe
}
}
/// <summary>
/// <summary>
/// 获取所有员工记录分页
/// </summary>
/// <param name="allotId"></param>
/// <returns></returns>
public
PageList
<
per_employee
>
GetEmployee
(
int
allotId
,
string
personnelNumber
,
string
personnelName
,
string
unitType
,
string
accountingUnit
,
string
searchText
,
int
pageIndex
,
int
pageSize
)
{
Expression
<
Func
<
per_employee
,
bool
>>
exp
=
t
=>
t
.
AllotId
==
allotId
;
if
(!
string
.
IsNullOrEmpty
(
personnelNumber
))
exp
=
exp
.
And
(
w
=>
w
.
PersonnelNumber
.
Contains
(
personnelNumber
));
if
(!
string
.
IsNullOrEmpty
(
personnelName
))
exp
=
exp
.
And
(
w
=>
w
.
DoctorName
.
Contains
(
personnelName
));
if
(!
string
.
IsNullOrEmpty
(
unitType
))
exp
=
exp
.
And
(
w
=>
w
.
UnitType
.
Equals
(
unitType
));
if
(!
string
.
IsNullOrEmpty
(
accountingUnit
))
exp
=
exp
.
And
(
w
=>
w
.
AccountingUnit
.
Contains
(
accountingUnit
));
if
(!
string
.
IsNullOrEmpty
(
searchText
))
exp
=
exp
.
And
(
w
=>
w
.
PersonnelNumber
.
Contains
(
searchText
)
||
w
.
DoctorName
.
Contains
(
searchText
)
||
w
.
UnitType
.
Contains
(
searchText
)
||
w
.
AccountingUnit
.
Contains
(
searchText
));
return
peremployeeRepository
.
GetEntitiesForPaging
(
pageIndex
,
pageSize
,
exp
);
}
/// <summary>
/// 新增员工信息
/// 新增员工信息
/// </summary>
/// </summary>
/// <param name="request"></param>
/// <param name="request"></param>
...
...
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