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
c9cd04b3
Commit
c9cd04b3
authored
Oct 29, 2019
by
李承祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二次绩效添加归档、 取消内五科除以医生的计算方式
parent
f0f76924
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
70 additions
and
29 deletions
+70
-29
performance/Performance.DtoModels/Request/UseTempRequest.cs
+3
-0
performance/Performance.DtoModels/Response/SecondListResponse.cs
+13
-0
performance/Performance.Services/AllotService.cs
+14
-10
performance/Performance.Services/PerExcelService/ComputeEmpolyee/ComputeDirector.cs
+16
-16
performance/Performance.Services/SecondAllotService.cs
+24
-3
No files found.
performance/Performance.DtoModels/Request/UseTempRequest.cs
View file @
c9cd04b3
...
...
@@ -16,6 +16,9 @@ public class UseTempRequest
public
string
UnitType
{
get
;
set
;
}
public
int
SecondId
{
get
;
set
;
}
/// <summary> 是否归档 </summary>
public
int
IsArchive
{
get
;
set
;
}
}
public
class
UseTempRequestValidator
:
AbstractValidator
<
UseTempRequest
>
{
...
...
performance/Performance.DtoModels/Response/SecondListResponse.cs
0 → 100644
View file @
c9cd04b3
using
Performance.EntityModels
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Performance.DtoModels
{
public
class
SecondListResponse
:
ag_secondallot
{
/// <summary> 是否归档 </summary>
public
int
IsArchive
{
get
;
set
;
}
}
}
performance/Performance.Services/AllotService.cs
View file @
c9cd04b3
...
...
@@ -353,16 +353,20 @@ public void Pigeonhole(per_allot allot)
{
allot
.
States
=
8
;
allot
.
Remark
=
"归档"
;
if
(
_allotRepository
.
Update
(
allot
))
{
var
again
=
_againallotRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
foreach
(
var
item
in
again
)
{
item
.
Remark
=
$"原状态:
{
item
.
States
}
,归档更改状态"
;
item
.
States
=
5
;
_againallotRepository
.
Update
(
item
);
}
}
_allotRepository
.
Update
(
allot
);
//if (_allotRepository.Update(allot))
//{
// var again = _againallotRepository.GetEntities(t => t.AllotID == allot.ID);
// if (again != null && again.Count > 0)
// {
// foreach (var item in again)
// {
// item.Remark = $"原状态:{item.States},归档更改状态";
// item.States = 5;
// _againallotRepository.Update(item);
// }
// }
//}
}
/// <summary>
...
...
performance/Performance.Services/PerExcelService/ComputeEmpolyee/ComputeDirector.cs
View file @
c9cd04b3
...
...
@@ -179,26 +179,26 @@ public List<ComputeResult> Compute(List<ComputeEmployee> empolyeeList, List<im_a
//var realAvg = resAccount.Sum(t => t.Number + t.ManagerNumber) == 0 ? 0 : resAccount.Sum(t => t.RealGiveFee) / resAccount.Sum(t => t.Number + t.ManagerNumber);
decimal
?
realAvg
=
0
;
bool
isAvg
=
true
;
if
(
"内五科"
==
accountbasic
.
DoctorAccountingUnit
&&
isShare
)
realAvg
=
resAccount
.
Sum
(
r
=>
r
.
Number
+
r
.
ManagerNumber
)
==
0
?
0
:
resAccount
.
Sum
(
r
=>
r
.
RealGiveFee
)
/
resAccount
.
Sum
(
r
=>
r
.
Number
);
else
//if ("内五科" == accountbasic.DoctorAccountingUnit && isShare)
// realAvg = resAccount.Sum(r => r.Number + r.ManagerNumber) == 0 ? 0 : resAccount.Sum(r => r.RealGiveFee) / resAccount.Sum(r => r.Number);
//else
//{
foreach
(
var
item
in
resAccount
)
{
foreach
(
var
item
in
resAccount
)
if
((
item
.
ManagerNumber
+
item
.
Number
)
==
0
)
{
if
((
item
.
ManagerNumber
+
item
.
Number
)
==
0
)
{
isAvg
=
false
;
realAvg
=
resAccount
.
Sum
(
r
=>
r
.
Number
+
r
.
ManagerNumber
)
==
0
?
0
:
resAccount
.
Sum
(
r
=>
r
.
RealGiveFee
)
/
resAccount
.
Sum
(
r
=>
r
.
Number
+
r
.
ManagerNumber
);
break
;
}
else
{
realAvg
+=
item
.
RealGiveFee
/
(
item
.
ManagerNumber
+
item
.
Number
);
}
isAvg
=
false
;
realAvg
=
resAccount
.
Sum
(
r
=>
r
.
Number
+
r
.
ManagerNumber
)
==
0
?
0
:
resAccount
.
Sum
(
r
=>
r
.
RealGiveFee
)
/
resAccount
.
Sum
(
r
=>
r
.
Number
+
r
.
ManagerNumber
);
break
;
}
else
{
realAvg
+=
item
.
RealGiveFee
/
(
item
.
ManagerNumber
+
item
.
Number
);
}
if
(
isAvg
)
realAvg
=
realAvg
/
resAccount
.
Count
();
}
if
(
isAvg
)
realAvg
=
realAvg
/
resAccount
.
Count
();
//}
var
realGiveFee
=
resAccount
.
Sum
(
t
=>
t
.
RealGiveFee
);
...
...
performance/Performance.Services/SecondAllotService.cs
View file @
c9cd04b3
...
...
@@ -64,7 +64,7 @@ public class SecondAllotService : IAutoInjection
/// </summary>
/// <param name="userId"></param>
/// <returns></returns>
public
List
<
ag_secondallot
>
GetSecondList
(
int
userId
)
public
List
<
SecondListResponse
>
GetSecondList
(
int
userId
)
{
var
user
=
perforUserRepository
.
GetEntity
(
t
=>
t
.
ID
==
userId
);
if
(
user
==
null
)
...
...
@@ -73,7 +73,7 @@ public List<ag_secondallot> GetSecondList(int userId)
var
hospital
=
perforUserhospitalRepository
.
GetEntity
(
t
=>
t
.
UserID
==
userId
);
if
(
hospital
==
null
)
throw
new
NotImplementedException
(
"人员未选择医院"
);
var
allotList
=
perforPerallotRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospital
.
HospitalID
&&
t
.
States
==
6
);
var
allotList
=
perforPerallotRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospital
.
HospitalID
&&
new
List
<
int
>
{
6
,
8
}.
Contains
(
t
.
States
)
);
if
(
allotList
==
null
||
allotList
.
Count
==
0
)
throw
new
NotImplementedException
(
"该医院未生成绩效"
);
...
...
@@ -120,8 +120,10 @@ public List<ag_secondallot> GetSecondList(int userId)
else
secondList
.
AddRange
(
newSecond
);
}
var
list
=
Mapper
.
Map
<
List
<
SecondListResponse
>>(
secondList
);
return
secondList
;
list
?.
ForEach
(
t
=>
t
.
IsArchive
=
allotList
.
FirstOrDefault
(
a
=>
a
.
ID
==
t
.
AllotId
).
States
==
8
?
1
:
0
);
return
list
;
}
/// <summary>
...
...
@@ -382,6 +384,25 @@ public SecondResponse GetSecondDetail(UseTempRequest request)
var
result
=
new
SecondResponse
{
HeadItems
=
headItems
,
BodyItems
=
new
List
<
BodyItem
>()
};
//获取数据
var
fixatList
=
perforAgfixatitemRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
request
.
SecondId
&&
t
.
RowNumber
.
HasValue
);
if
(
request
.
IsArchive
==
1
)
{
if
(
fixatList
==
null
||
fixatList
.
Count
==
0
)
throw
new
PerformanceException
(
"绩效归档时,尚未添加数据。"
);
else
{
var
existHead
=
fixatList
.
Select
(
t
=>
new
{
FiledName
=
t
.
ItemName
,
Sort
=
t
.
Sort
.
Value
,
SourceType
=
t
.
SourceType
.
Value
,
Type
=
t
.
Type
.
Value
,
FactorValue
=
t
.
FactorValue
.
Value
}).
Distinct
().
ToList
();
headItems
=
existHead
.
Select
(
t
=>
new
HeadItem
{
FiledId
=
headItems
.
FirstOrDefault
(
h
=>
h
.
FiledName
==
t
.
FiledName
&&
h
.
Type
==
t
.
Type
)?.
FiledId
??
"无FiledId"
,
FiledName
=
t
.
FiledName
,
Sort
=
t
.
Sort
,
SourceType
=
t
.
SourceType
,
Type
=
t
.
Type
,
FactorValue
=
t
.
FactorValue
}).
ToList
();
}
}
if
(
fixatList
!=
null
&&
fixatList
.
Count
>
0
)
{
//补充数据
...
...
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