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
05a7ff0c
Commit
05a7ff0c
authored
Apr 19, 2021
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2020morge-graphql' into v2020morge-rename
parents
7c42fee2
01029872
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
88 additions
and
13 deletions
+88
-13
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+6
-1
performance/Performance.EntityModels/Entity/ag_secondallot.cs
+1
-1
performance/Performance.EntityModels/Entity/ag_workload_source.cs
+5
-0
performance/Performance.Services/AllotCompute/ResultComputeService.cs
+27
-0
performance/Performance.Services/SecondAllot/SecondAllotDetails.cs
+1
-1
performance/Performance.Services/SecondAllot/SecondAllotService.cs
+12
-7
performance/Performance.Services/SecondAllotService.cs
+36
-3
No files found.
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
05a7ff0c
...
...
@@ -1175,7 +1175,7 @@
</member>
<member
name=
"P:Performance.EntityModels.ag_secondallot.SubmitType"
>
<summary>
提交类型 1使用模板 2 其他类型数据
提交类型 1
使用模板 2 其他类型数据
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_secondallot.SubmitTime"
>
...
...
@@ -1423,6 +1423,11 @@
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ag_workload_source.WorkTypeId"
>
<summary>
1、单项奖励 2、工作量占比 ..(自定义占比)
</summary>
</member>
<member
name=
"T:Performance.EntityModels.ag_workload_type"
>
<summary>
...
...
performance/Performance.EntityModels/Entity/ag_secondallot.cs
View file @
05a7ff0c
...
...
@@ -82,7 +82,7 @@ public class ag_secondallot
public
Nullable
<
int
>
Status
{
get
;
set
;
}
/// <summary>
/// 提交类型 1使用模板 2 其他类型数据
/// 提交类型 1
使用模板 2 其他类型数据
/// </summary>
public
Nullable
<
int
>
SubmitType
{
get
;
set
;
}
...
...
performance/Performance.EntityModels/Entity/ag_workload_source.cs
View file @
05a7ff0c
...
...
@@ -55,5 +55,10 @@ public class ag_workload_source
///
/// </summary>
public
Nullable
<
decimal
>
Value
{
get
;
set
;
}
/// <summary>
/// 1、单项奖励 2、工作量占比 ..(自定义占比)
/// </summary>
public
Nullable
<
int
>
WorkTypeId
{
get
;
set
;
}
}
}
performance/Performance.Services/AllotCompute/ResultComputeService.cs
View file @
05a7ff0c
...
...
@@ -522,6 +522,7 @@ public void GenerateSecondAllot(per_allot allot)
List
<
ag_secondallot
>
tempSecond
=
new
List
<
ag_secondallot
>();
List
<
ag_secondallot
>
insSecond
=
new
List
<
ag_secondallot
>();
List
<
ag_secondallot
>
updSecond
=
new
List
<
ag_secondallot
>();
List
<
ag_secondallot
>
delSecond
=
new
List
<
ag_secondallot
>();
var
types
=
new
List
<
int
>
{
(
int
)
UnitType
.
行政高层
,
(
int
)
UnitType
.
行政中层
,
(
int
)
UnitType
.
行政后勤
};
//// 获取医院是否开启后勤二次分配
...
...
@@ -612,11 +613,37 @@ public void GenerateSecondAllot(per_allot allot)
}
}
if
(
secondList
!=
null
&&
secondList
.
Any
())
{
foreach
(
var
item
in
secondList
)
{
var
second
=
tempSecond
?.
FirstOrDefault
(
f
=>
f
.
UnitType
==
item
.
UnitType
&&
f
.
Department
==
item
.
Department
);
if
(
second
==
null
)
{
delSecond
.
Add
(
item
);
}
}
}
if
(
insSecond
.
Any
())
perforAgsecondallotRepository
.
AddRange
(
insSecond
.
ToArray
());
if
(
updSecond
.
Any
())
{
perforAgsecondallotRepository
.
UpdateRange
(
updSecond
.
ToArray
());
foreach
(
var
item
in
updSecond
.
Where
(
w
=>
w
.
Status
==
4
))
{
// 自动驳回,需要清空该科室历史数据
var
histories
=
perforAgcomputeRepository
.
GetEntities
(
w
=>
w
.
SecondId
==
item
.
Id
);
if
(
histories
!=
null
&&
histories
.
Any
())
perforAgcomputeRepository
.
RemoveRange
(
histories
.
ToArray
());
}
}
if
(
delSecond
.
Any
())
{
perforAgsecondallotRepository
.
RemoveRange
(
delSecond
.
ToArray
());
}
}
}
}
performance/Performance.Services/SecondAllot/SecondAllotDetails.cs
View file @
05a7ff0c
...
...
@@ -133,7 +133,7 @@ public List<HeadItem> GetHeadItems(int hospitalId, int tempId, ag_secondallot se
var
configHeaders
=
agworkloadRepository
.
GetEntities
(
w
=>
w
.
HospitalId
==
hospitalId
&&
w
.
Department
==
secondAllot
.
Department
&&
w
.
UnitType
==
secondAllot
.
UnitType
);
if
(
SecondAllotService
.
defaultValues
!=
null
&&
SecondAllotService
.
defaultValues
.
Any
())
configHeaders
=
configHeaders
.
Where
(
w
=>
!
SecondAllotService
.
defaultValues
.
Select
(
t
=>
t
.
Item1
).
Contains
(
w
.
ItemName
)).
ToList
();
configHeaders
=
configHeaders
?
.
Where
(
w
=>
!
SecondAllotService
.
defaultValues
.
Select
(
t
=>
t
.
Item1
).
Contains
(
w
.
ItemName
)).
ToList
();
// 初始化固定列
var
headItems
=
Mapper
.
Map
<
List
<
HeadItem
>>(
fixedHeaders
)
??
new
List
<
HeadItem
>();
...
...
performance/Performance.Services/SecondAllot/SecondAllotService.cs
View file @
05a7ff0c
...
...
@@ -420,15 +420,19 @@ public dynamic GetWorkloadDict(int secondId)
private
dynamic
GetWorkloadDictAfterAudit
(
int
secondId
)
{
var
bodysources
=
agbodysourceRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
secondId
);
if
(
bodysources
==
null
||
!
bodysources
.
Any
())
return
new
string
[]
{
};
var
workloadsources
=
agworkloadsourceRepository
.
GetEntities
(
t
=>
bodysources
.
Select
(
w
=>
w
.
Id
).
Contains
(
t
.
BodyId
));
if
(
workloadsources
==
null
||
!
workloadsources
.
Any
())
return
new
string
[]
{
};
var
dict
=
workloadsources
.
GroupBy
(
t
=>
new
{
t
.
ItemId
,
t
.
ItemName
,
t
.
FactorValue
}).
Select
(
t
=>
new
{
Title
=
t
.
Key
.
ItemId
,
Value
=
t
.
Key
.
ItemName
,
Factor
=
t
.
Key
.
FactorValue
});
var
dict
=
workloadsources
.
GroupBy
(
t
=>
new
{
t
.
ItemId
,
t
.
ItemName
,
t
.
FactorValue
,
t
.
Sort
,
t
.
WorkTypeId
,
t
.
WorkloadId
})
.
OrderBy
(
t
=>
t
.
Key
.
WorkTypeId
).
ThenBy
(
t
=>
t
.
Key
.
Sort
)
.
Select
(
t
=>
new
{
Title
=
t
.
Key
.
ItemId
,
Value
=
t
.
Key
.
ItemName
,
Factor
=
t
.
Key
.
FactorValue
});
return
dict
;
}
...
...
@@ -553,7 +557,8 @@ private void SaveSecondAllotBodyData(int hospitalId, ag_secondallot second, dyna
ItemName
=
workload
.
ItemName
,
FactorValue
=
workload
.
FactorValue
,
Sort
=
workload
.
Sort
,
Value
=
ConvertHelper
.
To
<
decimal
>(
dict
[
key
])
Value
=
ConvertHelper
.
To
<
decimal
>(
dict
[
key
]),
WorkTypeId
=
workload
.
WorkTypeId
});
}
}
...
...
performance/Performance.Services/SecondAllotService.cs
View file @
05a7ff0c
...
...
@@ -1471,7 +1471,13 @@ public List<ag_secondallot> AuditList(int allotId)
if
(
allot
==
null
)
throw
new
PerformanceException
(
"所选绩效不存在!"
);
var
accountUnit
=
resaccountRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
&&
!
new
int
[]
{
(
int
)
UnitType
.
行政高层
,
(
int
)
UnitType
.
行政中层
}.
Contains
(
t
.
UnitType
.
Value
));
var
types
=
new
List
<
int
>
{
(
int
)
UnitType
.
行政高层
,
(
int
)
UnitType
.
行政中层
,
(
int
)
UnitType
.
行政后勤
};
var
accountUnit
=
resaccountRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
&&
!
types
.
Contains
(
t
.
UnitType
.
Value
));
// 查询需要进行二次分配的行政后勤科室
var
xzAccountUnit
=
resaccountRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
&&
t
.
UnitType
.
Value
==
(
int
)
UnitType
.
行政后勤
&&
t
.
NeedSecondAllot
==
"是"
);
if
(
xzAccountUnit
!=
null
&&
xzAccountUnit
.
Count
>
0
)
(
accountUnit
??
new
List
<
res_account
>()).
AddRange
(
xzAccountUnit
);
var
specialunit
=
resspecialunitRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
return
SecondList
(
allot
,
accountUnit
,
specialunit
);
...
...
@@ -1656,7 +1662,10 @@ public bool ConfirmAudit(int userId, SecondAuditRequest request)
return
true
;
var
computes
=
new
List
<
ag_compute
>();
if
(
second
.
SubmitType
==
1
)
var
(
tempId
,
name
)
=
GetUsingTempId
(
hospital
.
ID
,
second
);
if
(
new
int
[]
{
(
int
)
Temp
.
crosswise
,
(
int
)
Temp
.
lengthways
}.
Contains
(
tempId
))
{
var
items
=
agfixatitemRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
request
.
SecondId
);
if
(
items
!=
null
&&
items
.
Any
())
...
...
@@ -1686,7 +1695,7 @@ public bool ConfirmAudit(int userId, SecondAuditRequest request)
}
}
}
else
if
(
second
.
SubmitType
==
2
)
else
if
(
tempId
==
(
int
)
Temp
.
other
)
{
var
others
=
agothersourceRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
request
.
SecondId
);
if
(
others
!=
null
&&
others
.
Any
())
...
...
@@ -1710,6 +1719,30 @@ public bool ConfirmAudit(int userId, SecondAuditRequest request)
}
}
}
else
{
var
bodys
=
agbodysourceRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
request
.
SecondId
);
if
(
bodys
!=
null
&&
bodys
.
Any
())
{
foreach
(
var
item
in
bodys
)
{
computes
.
Add
(
new
ag_compute
{
AllotId
=
second
.
AllotId
,
SecondId
=
second
.
Id
,
UnitType
=
second
.
UnitType
,
Department
=
second
.
Department
,
WorkPost
=
item
.
Post
,
JobNumber
=
item
.
WorkNumber
,
PersonName
=
item
.
Name
,
PerforSumFee
=
item
.
DistPerformance
,
OthePerfor
=
item
.
OtherPerformance
,
NightWorkPerfor
=
item
.
NightWorkPerformance
,
RealGiveFee
=
item
.
RealAmount
,
});
}
}
}
agcomputeRepository
.
AddRange
(
computes
.
ToArray
());
}
...
...
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