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
e1d3a86d
Commit
e1d3a86d
authored
Sep 25, 2019
by
李承祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
保底绩效优先级
parent
baa36331
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
1 deletions
+38
-1
performance/Performance.Api/Template/医院绩效模板(无执行科室).xlsx
+0
-0
performance/Performance.Services/GuaranteeService.cs
+38
-1
No files found.
performance/Performance.Api/Template/医院绩效模板(无执行科室).xlsx
View file @
e1d3a86d
No preview for this file type
performance/Performance.Services/GuaranteeService.cs
View file @
e1d3a86d
...
@@ -43,6 +43,14 @@ public List<cof_guarantee> Guarantee(int allotId)
...
@@ -43,6 +43,14 @@ public List<cof_guarantee> Guarantee(int allotId)
/// <returns></returns>
/// <returns></returns>
public
cof_guarantee
GuarantInsert
(
GuaranteeRequest
request
)
public
cof_guarantee
GuarantInsert
(
GuaranteeRequest
request
)
{
{
var
list
=
perforCofguaranteeRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
request
.
AllotId
);
if
(
list
!=
null
)
{
var
config
=
list
.
FirstOrDefault
(
t
=>
t
.
Priority
==
request
.
Priority
&&
t
.
UnitType
==
request
.
UnitType
&&
t
.
Target
!=
request
.
Target
);
if
(
config
!=
null
)
throw
new
PerformanceException
(
"优先级无效,已存在"
);
}
var
guarantee
=
Mapper
.
Map
<
cof_guarantee
>(
request
);
var
guarantee
=
Mapper
.
Map
<
cof_guarantee
>(
request
);
perforCofguaranteeRepository
.
Add
(
guarantee
);
perforCofguaranteeRepository
.
Add
(
guarantee
);
return
guarantee
;
return
guarantee
;
...
@@ -59,8 +67,27 @@ public cof_guarantee GuarantUpdate(GuaranteeRequest request)
...
@@ -59,8 +67,27 @@ public cof_guarantee GuarantUpdate(GuaranteeRequest request)
if
(
guarantee
==
null
)
if
(
guarantee
==
null
)
throw
new
PerformanceException
(
"request.Id 参数错误"
);
throw
new
PerformanceException
(
"request.Id 参数错误"
);
guarantee
.
UnitType
=
request
.
UnitType
;
if
(
guarantee
.
Priority
>
request
.
Priority
)
{
var
list
=
perforCofguaranteeRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
guarantee
.
AllotId
&&
t
.
UnitType
==
request
.
UnitType
&&
t
.
Priority
>=
request
.
Priority
&&
t
.
Priority
<
guarantee
.
Priority
);
if
(
list
!=
null
&&
list
.
Any
())
{
list
?.
ForEach
(
t
=>
{
t
.
Priority
=
t
.
Priority
+
1
;
});
perforCofguaranteeRepository
.
UpdateRange
(
list
.
ToArray
());
}
}
else
if
(
guarantee
.
Priority
<
request
.
Priority
)
{
var
list
=
perforCofguaranteeRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
guarantee
.
AllotId
&&
t
.
UnitType
==
request
.
UnitType
&&
t
.
Priority
<=
request
.
Priority
&&
t
.
Priority
>
guarantee
.
Priority
);
if
(
list
!=
null
&&
list
.
Any
())
{
list
.
ForEach
(
t
=>
{
t
.
Priority
=
t
.
Priority
-
1
;
});
perforCofguaranteeRepository
.
UpdateRange
(
list
.
ToArray
());
}
}
guarantee
.
Priority
=
request
.
Priority
;
guarantee
.
Priority
=
request
.
Priority
;
guarantee
.
UnitType
=
request
.
UnitType
;
guarantee
.
Target
=
request
.
Target
;
guarantee
.
Target
=
request
.
Target
;
guarantee
.
Source
=
request
.
Source
;
guarantee
.
Source
=
request
.
Source
;
if
(!
perforCofguaranteeRepository
.
Update
(
guarantee
))
if
(!
perforCofguaranteeRepository
.
Update
(
guarantee
))
...
@@ -101,6 +128,16 @@ public List<TitleValue> Accounting(int allotId)
...
@@ -101,6 +128,16 @@ public List<TitleValue> Accounting(int allotId)
}
}
return
result
;
return
result
;
}
}
/// <summary>
/// 获取优先级
/// </summary>
/// <param name="allotId"></param>
/// <returns></returns>
public
int
Priority
(
int
allotId
,
int
unitType
,
string
target
)
{
return
perforCofguaranteeRepository
.
GetEntity
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
UnitType
==
unitType
&&
t
.
Target
==
target
)?.
Priority
??
0
;
}
#
endregion
#
endregion
}
}
}
}
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