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
40d85047
Commit
40d85047
authored
May 11, 2021
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二次绩效保存工作量类型时,获取unittype错误
parent
1757a005
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
31 deletions
+38
-31
performance/Performance.Api/Controllers/SecondAllotController.cs
+6
-6
performance/Performance.Services/SecondAllotService.cs
+32
-25
No files found.
performance/Performance.Api/Controllers/SecondAllotController.cs
View file @
40d85047
...
...
@@ -276,11 +276,11 @@ public ApiResponse SingleAwards([FromBody] WorkloadRequest request)
/// 二次绩效工作量类型列表
/// </summary>
/// <returns></returns>
[
Route
(
"api/second/worktype/list"
)]
[
Route
(
"api/second/worktype/list
/{secondId}
"
)]
[
HttpPost
]
public
ApiResponse
WorkTypeList
([
FromBody
]
WorkloadRequest
request
)
public
ApiResponse
WorkTypeList
([
FromBody
]
WorkloadRequest
request
,
int
secondId
)
{
var
result
=
secondAllotService
.
WorkTypeList
(
request
,
claimService
.
GetUserId
()
);
var
result
=
secondAllotService
.
WorkTypeList
(
request
,
secondId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
...
...
@@ -288,16 +288,16 @@ public ApiResponse WorkTypeList([FromBody] WorkloadRequest request)
/// 保存二次绩效工作量类型
/// </summary>
/// <returns></returns>
[
Route
(
"api/second/worktype/save"
)]
[
Route
(
"api/second/worktype/save
/{secondId}
"
)]
[
HttpPost
]
public
ApiResponse
SingleSave
([
FromBody
]
ag_workload_type
request
)
public
ApiResponse
SingleSave
([
FromBody
]
ag_workload_type
request
,
int
secondId
)
{
if
(
request
.
HospitalId
==
0
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"医院信息无效"
);
if
(
string
.
IsNullOrEmpty
(
request
.
TypeName
))
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"填写参数无效"
);
var
result
=
secondAllotService
.
SaveWorkType
(
request
,
claimService
.
GetUserId
()
);
var
result
=
secondAllotService
.
SaveWorkType
(
request
,
secondId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
...
...
performance/Performance.Services/SecondAllotService.cs
View file @
40d85047
...
...
@@ -1034,10 +1034,12 @@ public void RefreshTemp(UseTempRequest request)
/// </summary>
/// <param name="secondId"></param>
/// <returns></returns>
public
List
<
TitleValue
<
int
>>
WorkTypeList
(
WorkloadRequest
request
,
int
user
Id
)
public
List
<
TitleValue
<
int
>>
WorkTypeList
(
WorkloadRequest
request
,
int
second
Id
)
{
var
(
unit
,
dept
)
=
GetDeptAndUnit
(
userId
);
var
worktypes
=
agworkloadtypeRepository
.
GetEntities
(
t
=>
request
.
HospitalId
.
Value
==
t
.
HospitalId
&&
t
.
Department
==
dept
&&
t
.
UnitType
==
unit
);
var
second
=
agsecondallotRepository
.
GetEntity
(
t
=>
t
.
Id
==
secondId
);
if
(
second
==
null
)
throw
new
PerformanceException
(
"参数错误"
);
var
worktypes
=
agworkloadtypeRepository
.
GetEntities
(
t
=>
request
.
HospitalId
.
Value
==
t
.
HospitalId
&&
t
.
Department
==
second
.
Department
&&
t
.
UnitType
==
second
.
UnitType
);
if
(
worktypes
!=
null
&&
worktypes
.
Any
())
{
return
worktypes
.
Select
(
t
=>
new
TitleValue
<
int
>
...
...
@@ -1054,10 +1056,13 @@ public List<TitleValue<int>> WorkTypeList(WorkloadRequest request, int userId)
/// </summary>
/// <param name="secondId"></param>
/// <returns></returns>
public
ag_workload_type
SaveWorkType
(
ag_workload_type
request
,
int
user
Id
)
public
ag_workload_type
SaveWorkType
(
ag_workload_type
request
,
int
second
Id
)
{
var
(
unit
,
dept
)
=
GetDeptAndUnit
(
userId
);
var
entity
=
agworkloadtypeRepository
.
GetEntity
(
t
=>
request
.
HospitalId
==
t
.
HospitalId
&&
t
.
Department
==
dept
&&
t
.
UnitType
==
unit
&&
t
.
TypeName
==
request
.
TypeName
);
var
second
=
agsecondallotRepository
.
GetEntity
(
t
=>
t
.
Id
==
secondId
);
if
(
second
==
null
)
throw
new
PerformanceException
(
"参数错误"
);
var
entity
=
agworkloadtypeRepository
.
GetEntity
(
t
=>
request
.
HospitalId
==
t
.
HospitalId
&&
t
.
Department
==
second
.
Department
&&
t
.
UnitType
==
second
.
UnitType
&&
t
.
TypeName
==
request
.
TypeName
);
if
(
entity
==
null
)
{
if
(
request
.
Id
>
0
)
...
...
@@ -1074,8 +1079,8 @@ public ag_workload_type SaveWorkType(ag_workload_type request, int userId)
{
HospitalId
=
request
.
HospitalId
,
TypeName
=
request
.
TypeName
,
Department
=
dep
t
,
UnitType
=
unit
,
Department
=
second
.
Departmen
t
,
UnitType
=
second
.
UnitType
,
};
agworkloadtypeRepository
.
Add
(
entity
);
}
...
...
@@ -1438,23 +1443,25 @@ public List<ag_workload> GetSingleList(WorkloadRequest request)
&&
t
.
UnitType
==
request
.
UnitType
&&
t
.
ItemId
.
StartsWith
(
AgWorkloadType
.
SingleAwards
.
ToString
()));
}
public
(
string
,
string
)
GetDeptAndUnit
(
int
userId
)
{
var
user
=
userRepository
.
GetEntity
(
t
=>
t
.
ID
==
userId
);
var
userrole
=
userroleRepository
.
GetEntity
(
t
=>
t
.
UserID
==
userId
);
var
role
=
roleRepository
.
GetEntity
(
t
=>
t
.
ID
==
userrole
.
RoleID
);
//
public (string, string) GetDeptAndUnit(int userId)
//
{
//
var user = userRepository.GetEntity(t => t.ID == userId);
//
var userrole = userroleRepository.GetEntity(t => t.UserID == userId);
//
var role = roleRepository.GetEntity(t => t.ID == userrole.RoleID);
if
(
role
.
Type
==
application
.
DirectorRole
)
return
(
UnitType
.
医生组
.
ToString
(),
user
.
Department
);
else
if
(
role
.
Type
==
application
.
NurseRole
)
return
(
UnitType
.
护理组
.
ToString
(),
user
.
Department
);
if
(
role
.
Type
==
application
.
SpecialRole
)
return
(
UnitType
.
特殊核算组
.
ToString
(),
user
.
Department
);
if
(
role
.
Type
==
application
.
OfficeRole
)
return
(
UnitType
.
行政后勤
.
ToString
(),
user
.
Department
);
else
return
(
""
,
user
.
Department
);
}
// if (role.Type == application.DirectorRole)
// {
// return (UnitType.医生组.ToString(), user.Department);
// }
// else if (role.Type == application.NurseRole)
// return (UnitType.护理组.ToString(), user.Department);
// if (role.Type == application.SpecialRole)
// return (UnitType.特殊核算组.ToString(), user.Department);
// if (role.Type == application.OfficeRole)
// return (UnitType.行政后勤.ToString(), user.Department);
// else
// return ("", user.Department);
//}
#
endregion
工作量绩效配置
...
...
@@ -2194,7 +2201,7 @@ public List<DeptDataDetails> DeptComputeDetailList(int userId, int allotId, out
if
(
computes
==
null
||
!
computes
.
Any
())
return
new
List
<
DeptDataDetails
>();
foreach
(
var
item
in
computes
)
{
if
(
item
.
AccountType
==
AccountUnitType
.
行政中层
.
ToString
())
if
(
item
.
AccountType
==
AccountUnitType
.
行政中层
.
ToString
())
deptDatas
.
Add
(
computeService
.
GetAdministration
(
item
.
ID
));
else
deptDatas
.
Add
(
computeService
.
GetDoctorDetail
(
item
.
ID
));
...
...
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