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
464215c5
Commit
464215c5
authored
Mar 13, 2020
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
角色添加type,替换roleId; 二次绩效替换模板,修改usetempid
parent
58138c57
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
75 additions
and
16 deletions
+75
-16
performance/Performance.Api/Controllers/AccountController.cs
+2
-2
performance/Performance.Api/Controllers/AgainAllotController.cs
+2
-2
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+10
-0
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+25
-0
performance/Performance.DtoModels/Response/RoleResponse.cs
+10
-0
performance/Performance.EntityModels/Entity/sys_role.cs
+10
-0
performance/Performance.Services/AgainAllotService.cs
+2
-2
performance/Performance.Services/SecondAllotService.cs
+14
-10
No files found.
performance/Performance.Api/Controllers/AccountController.cs
View file @
464215c5
...
@@ -111,7 +111,7 @@ public ApiResponse SelfInfo()
...
@@ -111,7 +111,7 @@ public ApiResponse SelfInfo()
user
.
Hospital
=
_hospitalService
.
GetUserHopital
(
user
.
UserID
);
user
.
Hospital
=
_hospitalService
.
GetUserHopital
(
user
.
UserID
);
int
[]
roleArray
=
new
int
[]
{
_options
.
NurseRole
,
_options
.
DirectorRole
};
int
[]
roleArray
=
new
int
[]
{
_options
.
NurseRole
,
_options
.
DirectorRole
};
user
.
IsAgainAdmin
=
user
.
Role
!=
null
?
roleArray
.
Contains
(
user
.
Role
.
First
().
RoleID
)
:
false
;
user
.
IsAgainAdmin
=
user
.
Role
!=
null
?
roleArray
.
Contains
(
user
.
Role
.
First
().
Type
??
0
)
:
false
;
return
new
ApiResponse
(
ResponseType
.
OK
,
user
);
return
new
ApiResponse
(
ResponseType
.
OK
,
user
);
}
}
...
@@ -181,7 +181,7 @@ public ApiResponse<UserResponse> Update([CustomizeValidator(RuleSet = "Update"),
...
@@ -181,7 +181,7 @@ public ApiResponse<UserResponse> Update([CustomizeValidator(RuleSet = "Update"),
int
[]
roleArray
=
new
int
[]
{
_options
.
NurseRole
,
_options
.
DirectorRole
};
int
[]
roleArray
=
new
int
[]
{
_options
.
NurseRole
,
_options
.
DirectorRole
};
var
roles
=
_roleService
.
GetUserRole
(
userId
);
var
roles
=
_roleService
.
GetUserRole
(
userId
);
var
isAgainAdmin
=
roles
!=
null
?
roleArray
.
Contains
(
roles
.
First
().
RoleID
)
:
false
;
var
isAgainAdmin
=
roles
!=
null
?
roleArray
.
Contains
(
roles
.
First
().
Type
??
0
)
:
false
;
var
user
=
_userService
.
Update
(
request
,
isAgainAdmin
);
var
user
=
_userService
.
Update
(
request
,
isAgainAdmin
);
user
.
Role
=
request
.
Role
;
user
.
Role
=
request
.
Role
;
...
...
performance/Performance.Api/Controllers/AgainAllotController.cs
View file @
464215c5
...
@@ -132,12 +132,12 @@ public ApiResponse DepartmentDetail([CustomizeValidator(RuleSet = "Generate"), F
...
@@ -132,12 +132,12 @@ public ApiResponse DepartmentDetail([CustomizeValidator(RuleSet = "Generate"), F
var
again
=
againAllotService
.
GetAgainallot
(
request
.
AgainAllotID
);
var
again
=
againAllotService
.
GetAgainallot
(
request
.
AgainAllotID
);
if
(
again
==
null
)
if
(
again
==
null
)
return
new
ApiResponse
(
ResponseType
.
Fail
,
"当前二次绩效ID无效"
);
return
new
ApiResponse
(
ResponseType
.
Fail
,
"当前二次绩效ID无效"
);
if
(
roles
.
First
().
RoleID
==
application
.
DirectorRole
)
if
(
roles
.
First
().
Type
==
application
.
DirectorRole
)
{
{
var
detail
=
computeService
.
GetDepartmentDetail
(
again
.
AllotID
.
Value
,
department
,
1
);
var
detail
=
computeService
.
GetDepartmentDetail
(
again
.
AllotID
.
Value
,
department
,
1
);
return
new
ApiResponse
(
ResponseType
.
OK
,
detail
);
return
new
ApiResponse
(
ResponseType
.
OK
,
detail
);
}
}
else
if
(
roles
.
First
().
RoleID
==
application
.
NurseRole
)
else
if
(
roles
.
First
().
Type
==
application
.
NurseRole
)
{
{
var
detail
=
computeService
.
GetDepartmentDetail
(
again
.
AllotID
.
Value
,
department
,
2
);
var
detail
=
computeService
.
GetDepartmentDetail
(
again
.
AllotID
.
Value
,
department
,
2
);
return
new
ApiResponse
(
ResponseType
.
OK
,
detail
);
return
new
ApiResponse
(
ResponseType
.
OK
,
detail
);
...
...
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
464215c5
...
@@ -2313,6 +2313,16 @@
...
@@ -2313,6 +2313,16 @@
菜单状态 1 启用 2禁用
菜单状态 1 启用 2禁用
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.DtoModels.RoleResponse.Type"
>
<summary>
角色类型
</summary>
</member>
<member
name=
"P:Performance.DtoModels.RoleResponse.IndexUrl"
>
<summary>
首页地址
</summary>
</member>
<member
name=
"P:Performance.DtoModels.SecondListResponse.IsArchive"
>
<member
name=
"P:Performance.DtoModels.SecondListResponse.IsArchive"
>
<summary>
是否归档
</summary>
<summary>
是否归档
</summary>
</member>
</member>
...
...
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
464215c5
...
@@ -683,6 +683,11 @@
...
@@ -683,6 +683,11 @@
绩效ID
绩效ID
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.EntityModels.ag_secondallot.UseTempId"
>
<summary>
使用模板
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_secondallot.UnitType"
>
<member
name=
"P:Performance.EntityModels.ag_secondallot.UnitType"
>
<summary>
<summary>
科室类型
科室类型
...
@@ -1393,6 +1398,11 @@
...
@@ -1393,6 +1398,11 @@
科室
科室
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.EntityModels.im_accountbasic.IncludeAvgCalculate"
>
<summary>
是否带入平均计算 是 否
</summary>
</member>
<member
name=
"P:Performance.EntityModels.im_accountbasic.PermanentStaff"
>
<member
name=
"P:Performance.EntityModels.im_accountbasic.PermanentStaff"
>
<summary>
<summary>
定科人数
定科人数
...
@@ -2518,6 +2528,11 @@
...
@@ -2518,6 +2528,11 @@
科室
科室
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.EntityModels.res_account.IncludeAvgCalculate"
>
<summary>
是否带入平均计算 是 否
</summary>
</member>
<member
name=
"P:Performance.EntityModels.res_account.PermanentStaff"
>
<member
name=
"P:Performance.EntityModels.res_account.PermanentStaff"
>
<summary>
<summary>
定科人数
定科人数
...
@@ -3338,6 +3353,16 @@
...
@@ -3338,6 +3353,16 @@
角色名称
角色名称
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.EntityModels.sys_role.Type"
>
<summary>
角色类型
</summary>
</member>
<member
name=
"P:Performance.EntityModels.sys_role.IndexUrl"
>
<summary>
首页地址
</summary>
</member>
<member
name=
"P:Performance.EntityModels.sys_role.Remark"
>
<member
name=
"P:Performance.EntityModels.sys_role.Remark"
>
<summary>
<summary>
...
...
performance/Performance.DtoModels/Response/RoleResponse.cs
View file @
464215c5
...
@@ -22,5 +22,15 @@ public class RoleResponse
...
@@ -22,5 +22,15 @@ public class RoleResponse
/// 菜单状态 1 启用 2禁用
/// 菜单状态 1 启用 2禁用
/// </summary>
/// </summary>
public
int
States
{
get
;
set
;
}
public
int
States
{
get
;
set
;
}
/// <summary>
/// 角色类型
/// </summary>
public
Nullable
<
int
>
Type
{
get
;
set
;
}
/// <summary>
/// 首页地址
/// </summary>
public
string
IndexUrl
{
get
;
set
;
}
}
}
}
}
performance/Performance.EntityModels/Entity/sys_role.cs
View file @
464215c5
...
@@ -27,6 +27,16 @@ public class sys_role
...
@@ -27,6 +27,16 @@ public class sys_role
public
string
RoleName
{
get
;
set
;
}
public
string
RoleName
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 角色类型
/// </summary>
public
Nullable
<
int
>
Type
{
get
;
set
;
}
/// <summary>
/// 首页地址
/// </summary>
public
string
IndexUrl
{
get
;
set
;
}
/// <summary>
///
///
/// </summary>
/// </summary>
public
string
Remark
{
get
;
set
;
}
public
string
Remark
{
get
;
set
;
}
...
...
performance/Performance.Services/AgainAllotService.cs
View file @
464215c5
...
@@ -96,9 +96,9 @@ public bool Generate(AgainAllotRequest request, int userId, string department)
...
@@ -96,9 +96,9 @@ public bool Generate(AgainAllotRequest request, int userId, string department)
var
role
=
roles
.
FirstOrDefault
();
var
role
=
roles
.
FirstOrDefault
();
if
(
role
!=
null
)
if
(
role
!=
null
)
{
{
if
(
application
.
NurseRole
==
role
.
ID
)
if
(
application
.
NurseRole
==
role
.
Type
)
basicnumber
=
perforResaccountRepository
.
GetEntity
(
t
=>
t
.
UnitType
==
(
int
)
UnitType
.
护理组
&&
t
.
AllotID
==
againAllot
.
AllotID
&&
t
.
AccountingUnit
==
department
)?.
RealGiveFee
;
basicnumber
=
perforResaccountRepository
.
GetEntity
(
t
=>
t
.
UnitType
==
(
int
)
UnitType
.
护理组
&&
t
.
AllotID
==
againAllot
.
AllotID
&&
t
.
AccountingUnit
==
department
)?.
RealGiveFee
;
else
if
(
application
.
DirectorRole
==
role
.
ID
)
else
if
(
application
.
DirectorRole
==
role
.
Type
)
basicnumber
=
perforResaccountRepository
.
GetEntity
(
t
=>
t
.
UnitType
!=
(
int
)
UnitType
.
护理组
&&
t
.
AllotID
==
againAllot
.
AllotID
&&
t
.
AccountingUnit
==
department
)?.
RealGiveFee
;
basicnumber
=
perforResaccountRepository
.
GetEntity
(
t
=>
t
.
UnitType
!=
(
int
)
UnitType
.
护理组
&&
t
.
AllotID
==
againAllot
.
AllotID
&&
t
.
AccountingUnit
==
department
)?.
RealGiveFee
;
}
}
}
}
...
...
performance/Performance.Services/SecondAllotService.cs
View file @
464215c5
...
@@ -30,6 +30,7 @@ public class SecondAllotService : IAutoInjection
...
@@ -30,6 +30,7 @@ public class SecondAllotService : IAutoInjection
private
readonly
PerforAgcomputeRepository
perforAgcomputeRepository
;
private
readonly
PerforAgcomputeRepository
perforAgcomputeRepository
;
private
readonly
PerforCofagainRepository
perforCofagainRepository
;
private
readonly
PerforCofagainRepository
perforCofagainRepository
;
private
readonly
PerforAgothersourceRepository
perforAgothersourceRepository
;
private
readonly
PerforAgothersourceRepository
perforAgothersourceRepository
;
private
readonly
PerforRoleRepository
roleRepository
;
public
SecondAllotService
(
IOptions
<
Application
>
application
,
public
SecondAllotService
(
IOptions
<
Application
>
application
,
PerforUserRepository
perforUserRepository
,
PerforUserRepository
perforUserRepository
,
...
@@ -45,7 +46,8 @@ public class SecondAllotService : IAutoInjection
...
@@ -45,7 +46,8 @@ public class SecondAllotService : IAutoInjection
PerforAgusetempRepository
perforAgusetempRepository
,
PerforAgusetempRepository
perforAgusetempRepository
,
PerforAgcomputeRepository
perforAgcomputeRepository
,
PerforAgcomputeRepository
perforAgcomputeRepository
,
PerforCofagainRepository
perforCofagainRepository
,
PerforCofagainRepository
perforCofagainRepository
,
PerforAgothersourceRepository
perforAgothersourceRepository
)
PerforAgothersourceRepository
perforAgothersourceRepository
,
PerforRoleRepository
roleRepository
)
{
{
this
.
application
=
application
.
Value
;
this
.
application
=
application
.
Value
;
this
.
perforUserRepository
=
perforUserRepository
;
this
.
perforUserRepository
=
perforUserRepository
;
...
@@ -62,6 +64,7 @@ public class SecondAllotService : IAutoInjection
...
@@ -62,6 +64,7 @@ public class SecondAllotService : IAutoInjection
this
.
perforAgcomputeRepository
=
perforAgcomputeRepository
;
this
.
perforAgcomputeRepository
=
perforAgcomputeRepository
;
this
.
perforCofagainRepository
=
perforCofagainRepository
;
this
.
perforCofagainRepository
=
perforCofagainRepository
;
this
.
perforAgothersourceRepository
=
perforAgothersourceRepository
;
this
.
perforAgothersourceRepository
=
perforAgothersourceRepository
;
this
.
roleRepository
=
roleRepository
;
}
}
#
region
二次绩效列表与数据保存
#
region
二次绩效列表与数据保存
...
@@ -75,7 +78,8 @@ public List<SecondListResponse> GetSecondList(int userId)
...
@@ -75,7 +78,8 @@ public List<SecondListResponse> GetSecondList(int userId)
var
user
=
perforUserRepository
.
GetEntity
(
t
=>
t
.
ID
==
userId
);
var
user
=
perforUserRepository
.
GetEntity
(
t
=>
t
.
ID
==
userId
);
if
(
user
==
null
)
if
(
user
==
null
)
throw
new
NotImplementedException
(
"人员ID无效"
);
throw
new
NotImplementedException
(
"人员ID无效"
);
var
role
=
userroleRepository
.
GetEntity
(
t
=>
t
.
UserID
==
userId
);
var
userrole
=
userroleRepository
.
GetEntity
(
t
=>
t
.
UserID
==
userId
);
var
role
=
roleRepository
.
GetEntity
(
t
=>
t
.
ID
==
userrole
.
RoleID
);
var
hospital
=
perforUserhospitalRepository
.
GetEntity
(
t
=>
t
.
UserID
==
userId
);
var
hospital
=
perforUserhospitalRepository
.
GetEntity
(
t
=>
t
.
UserID
==
userId
);
if
(
hospital
==
null
)
if
(
hospital
==
null
)
throw
new
NotImplementedException
(
"人员未选择医院"
);
throw
new
NotImplementedException
(
"人员未选择医院"
);
...
@@ -98,9 +102,9 @@ public List<SecondListResponse> GetSecondList(int userId)
...
@@ -98,9 +102,9 @@ public List<SecondListResponse> GetSecondList(int userId)
if
(
allot
==
null
)
continue
;
if
(
allot
==
null
)
continue
;
res_account
account
=
null
;
res_account
account
=
null
;
if
(
role
.
RoleID
==
application
.
DirectorRole
)
if
(
role
.
Type
==
application
.
DirectorRole
)
account
=
accountList
.
FirstOrDefault
(
t
=>
t
.
AllotID
==
item
&&
(
t
.
UnitType
==
(
int
)
UnitType
.
医生组
||
t
.
UnitType
==
(
int
)
UnitType
.
医技组
));
account
=
accountList
.
FirstOrDefault
(
t
=>
t
.
AllotID
==
item
&&
(
t
.
UnitType
==
(
int
)
UnitType
.
医生组
||
t
.
UnitType
==
(
int
)
UnitType
.
医技组
));
else
if
(
role
.
RoleID
==
application
.
NurseRole
)
else
if
(
role
.
Type
==
application
.
NurseRole
)
account
=
accountList
.
FirstOrDefault
(
t
=>
t
.
AllotID
==
item
&&
t
.
UnitType
==
(
int
)
UnitType
.
护理组
);
account
=
accountList
.
FirstOrDefault
(
t
=>
t
.
AllotID
==
item
&&
t
.
UnitType
==
(
int
)
UnitType
.
护理组
);
if
(
account
==
null
)
continue
;
if
(
account
==
null
)
continue
;
...
@@ -555,14 +559,14 @@ public bool UseTemp(UseTempRequest request)
...
@@ -555,14 +559,14 @@ public bool UseTemp(UseTempRequest request)
var
update_second_usetemps
=
new
List
<
ag_secondallot
>();
var
update_second_usetemps
=
new
List
<
ag_secondallot
>();
foreach
(
var
second
in
secondList
)
foreach
(
var
second
in
secondList
)
{
{
foreach
(
var
head
in
headItems
)
if
(
second
.
IsArchive
==
0
&&
new
List
<
int
>
{
1
,
4
}.
Contains
(
second
.
Status
??
1
)
)
{
{
if
(
second
.
IsArchive
==
0
&&
new
List
<
int
>
{
1
,
4
}.
Contains
(
second
.
Status
??
1
))
var
update_second_usetemp
=
seconds
.
FirstOrDefault
(
t
=>
t
.
Id
==
second
.
Id
);
{
update_second_usetemp
.
UseTempId
=
request
.
TempId
;
var
update_second_usetemp
=
seconds
.
FirstOrDefault
(
t
=>
t
.
Id
==
second
.
Id
);
update_second_usetemps
.
Add
(
update_second_usetemp
);
update_second_usetemp
.
UseTempId
=
request
.
TempId
;
update_second_usetemps
.
Add
(
update_second_usetemp
);
foreach
(
var
head
in
headItems
)
{
var
exist
=
fixatList
?.
Where
(
t
=>
t
.
ItemName
==
head
.
FiledName
&&
t
.
Type
==
head
.
Type
&&
t
.
SecondId
==
second
.
Id
);
var
exist
=
fixatList
?.
Where
(
t
=>
t
.
ItemName
==
head
.
FiledName
&&
t
.
Type
==
head
.
Type
&&
t
.
SecondId
==
second
.
Id
);
if
(
exist
!=
null
&&
exist
.
Count
()
>
0
)
if
(
exist
!=
null
&&
exist
.
Count
()
>
0
)
list
.
AddRange
(
exist
);
list
.
AddRange
(
exist
);
...
...
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