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
34cc48db
Commit
34cc48db
authored
Apr 07, 2023
by
wyc
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/考勤下发' of
https://gitlab.suvalue.com/zry/performance
into feature/考勤下发
parents
275434d9
f0eef106
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
24 deletions
+61
-24
performance/Performance.Api/Controllers/EmployeeController.cs
+19
-7
performance/Performance.DtoModels/Response/AutocomplateEmployeeResponse.cs
+36
-0
performance/Performance.Services/EmployeeService.cs
+6
-17
No files found.
performance/Performance.Api/Controllers/EmployeeController.cs
View file @
34cc48db
...
@@ -612,10 +612,22 @@ public ApiResponse<List<TitleValue>> ClearAprData([FromBody] AprAmountAuditReque
...
@@ -612,10 +612,22 @@ public ApiResponse<List<TitleValue>> ClearAprData([FromBody] AprAmountAuditReque
/// <param name="request"></param>
/// <param name="request"></param>
/// <returns></returns>
/// <returns></returns>
[
HttpPost
(
"autocomplate"
)]
[
HttpPost
(
"autocomplate"
)]
public
ApiResponse
<
List
<
view_per_apr_amount
>>
GetEmployeeMessage
([
FromBody
]
per_apr_amount
request
)
public
ApiResponse
<
List
<
AutocomplateEmployeeResponse
>>
GetEmployeeMessage
([
FromBody
]
per_apr_amount
request
)
{
{
var
result
=
employeeService
.
GetEmployeeMessage
(
request
.
AllotId
,
request
.
PersonnelNumber
,
request
.
DoctorName
,
claim
.
GetUserId
());
var
userId
=
claim
.
GetUserId
();
return
new
ApiResponse
<
List
<
view_per_apr_amount
>>(
ResponseType
.
OK
,
"人员信息"
,
result
);
var
user
=
userService
.
GetUserIdentity
(
userId
);
var
result
=
employeeService
.
GetEmployeeMessage
(
request
.
AllotId
,
request
.
PersonnelNumber
,
request
.
DoctorName
,
userId
);
var
res
=
result
.
Select
(
t
=>
new
AutocomplateEmployeeResponse
{
AllotId
=
request
.
AllotId
,
PersonnelNumber
=
t
.
PersonnelNumber
,
DoctorName
=
t
.
DoctorName
,
TypeInDepartment
=
user
.
Department
,
AccountingUnit
=
t
.
AccountingUnit
,
PermanentStaff
=
t
.
PermanentStaff
,
}).
ToList
();
return
new
ApiResponse
<
List
<
AutocomplateEmployeeResponse
>>(
ResponseType
.
OK
,
"人员信息"
,
res
);
}
}
/// <summary>
/// <summary>
...
@@ -1193,10 +1205,10 @@ public ApiResponse<List<per_apr_amount_type>> GetAprTypeList([FromRoute] int all
...
@@ -1193,10 +1205,10 @@ public ApiResponse<List<per_apr_amount_type>> GetAprTypeList([FromRoute] int all
[
HttpPost
]
[
HttpPost
]
public
ApiResponse
<
AprTypeRequest
>
InsertAprType
([
FromBody
]
AprTypeRequest
request
)
public
ApiResponse
<
AprTypeRequest
>
InsertAprType
([
FromBody
]
AprTypeRequest
request
)
{
{
var
createUser
=
claim
.
GetUserId
();
var
createUser
=
claim
.
GetUserId
();
return
employeeService
.
InsertAprType
(
createUser
,
request
);
return
employeeService
.
InsertAprType
(
createUser
,
request
);
}
}
/// <summary>
/// <summary>
...
...
performance/Performance.DtoModels/Response/AutocomplateEmployeeResponse.cs
0 → 100644
View file @
34cc48db
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
Performance.DtoModels.Response
{
public
class
AutocomplateEmployeeResponse
{
/// <summary>
///
/// </summary>
public
int
AllotId
{
get
;
set
;
}
/// <summary>
/// 人员工号
/// </summary>
public
string
PersonnelNumber
{
get
;
set
;
}
/// <summary>
/// 医生姓名
/// </summary>
public
string
DoctorName
{
get
;
set
;
}
/// <summary>
/// 录入科室
/// </summary>
public
string
TypeInDepartment
{
get
;
set
;
}
/// <summary>
/// 核算单元
/// </summary>
public
string
AccountingUnit
{
get
;
set
;
}
/// <summary>
/// 人员系数
/// </summary>
public
decimal
?
PermanentStaff
{
get
;
set
;
}
}
}
performance/Performance.Services/EmployeeService.cs
View file @
34cc48db
...
@@ -959,7 +959,7 @@ public ApiResponse<AprTypeRequest> UpdateAprType(int typeId, AprTypeRequest requ
...
@@ -959,7 +959,7 @@ public ApiResponse<AprTypeRequest> UpdateAprType(int typeId, AprTypeRequest requ
{
{
if
(
string
.
IsNullOrEmpty
(
request
.
PerforType
.
Trim
())
||
request
.
AllotId
<=
0
)
if
(
string
.
IsNullOrEmpty
(
request
.
PerforType
.
Trim
())
||
request
.
AllotId
<=
0
)
return
new
ApiResponse
<
AprTypeRequest
>(
ResponseType
.
ParameterError
,
"输入参数不能为空!"
);
return
new
ApiResponse
<
AprTypeRequest
>(
ResponseType
.
ParameterError
,
"输入参数不能为空!"
);
var
tepm
=
perAprAmountTypeRepository
.
GetEntity
(
t
=>
t
.
Id
!=
t
.
Id
&&
t
.
AllotId
==
request
.
AllotId
&&
t
.
PerforType
==
request
.
PerforType
);
var
tepm
=
perAprAmountTypeRepository
.
GetEntity
(
t
=>
t
.
Id
!=
t
.
Id
&&
t
.
AllotId
==
request
.
AllotId
&&
t
.
PerforType
==
request
.
PerforType
);
if
(
tepm
!=
null
)
if
(
tepm
!=
null
)
return
new
ApiResponse
<
AprTypeRequest
>(
ResponseType
.
ParameterError
,
"已存在该类型"
);
return
new
ApiResponse
<
AprTypeRequest
>(
ResponseType
.
ParameterError
,
"已存在该类型"
);
var
res
=
perAprAmountTypeRepository
.
GetEntity
(
t
=>
t
.
Id
==
typeId
);
var
res
=
perAprAmountTypeRepository
.
GetEntity
(
t
=>
t
.
Id
==
typeId
);
...
@@ -996,9 +996,9 @@ public ApiResponse DeleteAprType(int typeId)
...
@@ -996,9 +996,9 @@ public ApiResponse DeleteAprType(int typeId)
/// <param name="doctorName"></param>
/// <param name="doctorName"></param>
/// <param name="userId"></param>
/// <param name="userId"></param>
/// <returns></returns>
/// <returns></returns>
public
List
<
view_per_apr_amount
>
GetEmployeeMessage
(
int
allotId
,
string
personnelNumber
,
string
doctorName
,
int
userId
)
public
List
<
per_employee
>
GetEmployeeMessage
(
int
allotId
,
string
personnelNumber
,
string
doctorName
,
int
userId
)
{
{
if
(
string
.
IsNullOrEmpty
(
personnelNumber
)
&&
string
.
IsNullOrEmpty
(
doctorName
))
return
new
List
<
view_per_apr_amount
>();
if
(
string
.
IsNullOrEmpty
(
personnelNumber
)
&&
string
.
IsNullOrEmpty
(
doctorName
))
return
new
List
<
per_employee
>();
var
user
=
userRepository
.
GetEntity
(
w
=>
w
.
ID
==
userId
&&
w
.
IsDelete
==
1
);
var
user
=
userRepository
.
GetEntity
(
w
=>
w
.
ID
==
userId
&&
w
.
IsDelete
==
1
);
if
(
user
==
null
)
throw
new
PerformanceException
(
"操作用户不存在或用户信息错误!"
);
if
(
user
==
null
)
throw
new
PerformanceException
(
"操作用户不存在或用户信息错误!"
);
...
@@ -1007,8 +1007,7 @@ public List<view_per_apr_amount> GetEmployeeMessage(int allotId, string personne
...
@@ -1007,8 +1007,7 @@ public List<view_per_apr_amount> GetEmployeeMessage(int allotId, string personne
var
employeeId
=
0
;
var
employeeId
=
0
;
if
(!
string
.
IsNullOrEmpty
(
personnelNumber
))
if
(!
string
.
IsNullOrEmpty
(
personnelNumber
))
{
{
var
employee
=
peremployeeRepository
.
GetEntity
(
w
=>
w
.
AllotId
==
allotId
&&
w
.
PersonnelNumber
!=
null
var
employee
=
peremployeeRepository
.
GetEntity
(
w
=>
w
.
AllotId
==
allotId
&&
w
.
PersonnelNumber
!=
null
&&
w
.
PersonnelNumber
.
Trim
()
==
personnelNumber
.
Trim
());
&&
w
.
PersonnelNumber
.
Trim
()
==
personnelNumber
.
Trim
());
if
(
employee
!=
null
)
if
(
employee
!=
null
)
{
{
employees
.
Add
(
employee
);
employees
.
Add
(
employee
);
...
@@ -1022,18 +1021,8 @@ public List<view_per_apr_amount> GetEmployeeMessage(int allotId, string personne
...
@@ -1022,18 +1021,8 @@ public List<view_per_apr_amount> GetEmployeeMessage(int allotId, string personne
&&
w
.
DoctorName
.
Trim
().
Contains
(
doctorName
.
Trim
())
&&
w
.
Id
!=
employeeId
);
&&
w
.
DoctorName
.
Trim
().
Contains
(
doctorName
.
Trim
())
&&
w
.
Id
!=
employeeId
);
if
(
filterEmployees
!=
null
&&
filterEmployees
.
Any
())
employees
.
AddRange
(
filterEmployees
);
if
(
filterEmployees
!=
null
&&
filterEmployees
.
Any
())
employees
.
AddRange
(
filterEmployees
);
}
}
if
(
employees
==
null
||
!
employees
.
Any
())
return
employees
??
new
List
<
per_employee
>();
return
new
List
<
view_per_apr_amount
>();
return
employees
.
Select
(
t
=>
new
view_per_apr_amount
{
AllotId
=
allotId
,
PersonnelNumber
=
t
.
PersonnelNumber
,
DoctorName
=
t
.
DoctorName
,
TypeInDepartment
=
user
.
Department
,
AccountingUnit
=
t
.
AccountingUnit
}).
ToList
();
}
}
/// <summary>
/// <summary>
...
...
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