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
e1f5161f
Commit
e1f5161f
authored
Jan 20, 2021
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二次绩效其他模板数据保存
parent
934df22c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
12 deletions
+25
-12
performance/Performance.Services/Details/SecondAllotDetails.cs
+14
-12
performance/Performance.Services/SecondAllotService.cs
+11
-0
No files found.
performance/Performance.Services/Details/SecondAllotDetails.cs
View file @
e1f5161f
...
...
@@ -570,7 +570,8 @@ public HandsonTable GetOtherTempData(int userId, int secondId, int isArchive, in
var
result
=
new
HandsonTable
((
int
)
SheetType
.
Unidentifiable
,
OtherTemp
.
Select
(
t
=>
t
.
Value
).
ToArray
(),
OtherTemp
.
Select
(
t
=>
new
collect_permission
{
HeadName
=
t
.
Value
,
Visible
=
1
Visible
=
1
,
Readnoly
=
new
string
[]
{
"可分配绩效"
,
"医院其他绩效"
,
"预留比例"
,
"预留金额"
,
"实发绩效工资金额"
}.
Contains
(
t
.
Value
)
?
1
:
0
}).
ToList
());
var
details
=
GetOtherTempDetails
(
userId
,
secondId
,
isArchive
,
employeeSource
);
...
...
@@ -587,6 +588,7 @@ public HandsonTable GetOtherTempData(int userId, int secondId, int isArchive, in
var
cells
=
(
from
conf
in
OtherTemp
join
fst
in
firstDic
on
conf
.
Key
.
ToUpper
()
equals
fst
.
Key
.
ToUpper
()
select
new
HandsonCellData
(
conf
.
Value
,
fst
.
Value
)).
ToList
();
cells
.
Add
(
new
HandsonCellData
(
nameof
(
ag_othersource
.
Id
),
item
.
Id
));
rowDatas
.
Add
(
new
HandsonRowData
(
i
,
cells
));
i
++;
...
...
@@ -636,14 +638,14 @@ public List<ag_othersource> GetOtherTempDetails(int userId, int secondId, int is
var
types
=
new
string
[]
{
"行政后勤"
,
"行政工勤"
};
var
logistics
=
_imemployeelogisticsRepository
.
GetEntities
(
w
=>
w
.
AllotID
==
secondAllot
.
AllotId
&&
types
.
Contains
(
w
.
AccountType
)
&&
w
.
AccountingUnit
==
secondAllot
.
Department
);
result
=
(
logistics
??
new
List
<
im_employee_logistics
>())
.
OrderBy
(
t
=>
Convert
.
ToInt32
(
t
.
PersonnelNumber
)).
Select
(
w
=>
new
ag_othersource
{
SecondId
=
secondId
,
WorkNumber
=
w
.
PersonnelNumber
,
Name
=
w
.
DoctorName
,
Department
=
w
.
AccountingUnit
,
WorkPost
=
w
.
JobTitle
,
}).
ToDistinct
().
ToList
();
.
OrderBy
(
t
=>
Convert
.
ToInt32
(
t
.
PersonnelNumber
)).
Select
(
w
=>
new
ag_othersource
{
SecondId
=
secondId
,
WorkNumber
=
w
.
PersonnelNumber
,
Name
=
w
.
DoctorName
,
Department
=
w
.
AccountingUnit
,
WorkPost
=
w
.
JobTitle
,
}).
ToDistinct
().
ToList
();
}
}
//非行政科室 有三种逻辑,或从保存中加载,或从人员字典加载,或从上次绩效中加载
...
...
@@ -652,12 +654,12 @@ public List<ag_othersource> GetOtherTempDetails(int userId, int secondId, int is
switch
(
employeeSource
)
{
case
(
int
)
EmployeeSource
.
Initial
:
result
=
savedDataList
.
OrderBy
(
t
=>
Convert
.
ToInt32
(
t
.
WorkNumber
)
).
ToList
();
result
=
savedDataList
.
OrderBy
(
t
=>
t
.
WorkNumber
).
ToList
();
break
;
case
(
int
)
EmployeeSource
.
EmployeeDict
:
if
(
employees
==
null
||
!
employees
.
Any
())
return
new
List
<
ag_othersource
>();
result
=
employees
.
OrderBy
(
t
=>
Convert
.
ToInt32
(
t
.
PersonnelNumber
)
).
Select
(
t
=>
new
ag_othersource
result
=
employees
.
OrderBy
(
t
=>
t
.
PersonnelNumber
).
Select
(
t
=>
new
ag_othersource
{
SecondId
=
secondId
,
WorkNumber
=
t
.
PersonnelNumber
,
...
...
@@ -672,7 +674,7 @@ public List<ag_othersource> GetOtherTempDetails(int userId, int secondId, int is
isSupplementTitlePerformance
=
prevSavedDataList
==
null
||
!
prevSavedDataList
.
Any
();
if
(
prevSavedDataList
!=
null
&&
prevSavedDataList
.
Any
())
{
result
=
prevSavedDataList
.
OrderBy
(
t
=>
Convert
.
ToInt32
(
t
.
WorkNumber
)
)
result
=
prevSavedDataList
.
OrderBy
(
t
=>
t
.
WorkNumber
)
.
Select
(
t
=>
new
ag_othersource
{
SecondId
=
secondId
,
...
...
performance/Performance.Services/SecondAllotService.cs
View file @
e1f5161f
...
...
@@ -1708,6 +1708,17 @@ public void OtherSave(int secondId, SaveCollectData collectData)
josn
.
Add
(
$"
{{{
string
.
Join
(
","
,
itemList
)}}}
"
);
}
var
data
=
JsonHelper
.
Deserialize
<
List
<
ag_othersource
>>(
$"[
{
string
.
Join
(
","
,
josn
)}
]"
);
data
=
data
.
Where
(
t
=>
!
string
.
IsNullOrEmpty
(
t
.
WorkNumber
)
||
!
string
.
IsNullOrEmpty
(
t
.
Name
))?.
ToList
();
if
(
data
==
null
||
!
data
.
Any
())
return
;
var
existEntities
=
perforAgothersourceRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
secondId
);
if
(
existEntities
!=
null
&&
existEntities
.
Any
())
{
perforAgothersourceRepository
.
RemoveRange
(
existEntities
.
ToArray
());
}
data
.
ForEach
(
t
=>
t
.
SecondId
=
secondId
);
perforAgothersourceRepository
.
AddRange
(
data
.
ToArray
());
}
#
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