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
d77d6822
Commit
d77d6822
authored
Oct 21, 2019
by
李承祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二次绩效配置添加科室,二次绩效录入顶部数据补充
parent
c1e8bf54
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
52 additions
and
5 deletions
+52
-5
performance/Performance.Api/Controllers/SecondAllotController.cs
+1
-1
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+5
-0
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+5
-0
performance/Performance.DtoModels/Request/CofAgainRequest.cs
+5
-0
performance/Performance.EntityModels/Entity/cof_again.cs
+5
-0
performance/Performance.Services/ConfigService.cs
+2
-1
performance/Performance.Services/SecondAllotService.cs
+29
-3
No files found.
performance/Performance.Api/Controllers/SecondAllotController.cs
View file @
d77d6822
...
...
@@ -57,7 +57,7 @@ public ApiResponse SaveValue([FromBody]List<ag_fixatitem> request)
throw
new
PerformanceException
(
"二次绩效ID错误"
);
var
typeCount
=
request
.
Where
(
t
=>
t
.
Type
>
0
).
Select
(
t
=>
t
.
Type
).
Distinct
().
Count
();
if
(
typeCount
!=
1
||
request
.
Any
(
t
=>
t
.
Type
==
0
))
if
(
request
.
Any
(
t
=>
t
.
Type
==
0
))
//typeCount != 1 ||
throw
new
PerformanceException
(
"二次绩效项位置错误"
);
var
unitTypeCount
=
request
.
Where
(
t
=>
!
string
.
IsNullOrEmpty
(
t
.
UnitType
)).
Select
(
t
=>
t
.
UnitType
).
Distinct
().
Count
();
...
...
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
d77d6822
...
...
@@ -1038,6 +1038,11 @@
</summary>
</member>
<member
name=
"P:Performance.DtoModels.CofAgainRequest.Department"
>
<summary>
科室
</summary>
</member>
<member
name=
"P:Performance.DtoModels.CofAgainRequest.Type"
>
<summary>
1 职称绩效 2 工作量绩效 3 满勤天数
...
...
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
d77d6822
...
...
@@ -934,6 +934,11 @@
</summary>
</member>
<member
name=
"P:Performance.EntityModels.cof_again.Department"
>
<summary>
科室
</summary>
</member>
<member
name=
"P:Performance.EntityModels.cof_again.Type"
>
<summary>
1 职称绩效 2 工作量绩效 3 满勤天数
...
...
performance/Performance.DtoModels/Request/CofAgainRequest.cs
View file @
d77d6822
...
...
@@ -13,6 +13,11 @@ public class CofAgainRequest
public
int
AllotID
{
get
;
set
;
}
/// <summary>
/// 科室
/// </summary>
public
string
Department
{
get
;
set
;
}
/// <summary>
/// 1 职称绩效 2 工作量绩效 3 满勤天数
/// </summary>
public
int
Type
{
get
;
set
;
}
...
...
performance/Performance.EntityModels/Entity/cof_again.cs
View file @
d77d6822
...
...
@@ -27,6 +27,11 @@ public class cof_again
public
Nullable
<
int
>
AllotID
{
get
;
set
;
}
/// <summary>
/// 科室
/// </summary>
public
string
Department
{
get
;
set
;
}
/// <summary>
/// 1 职称绩效 2 工作量绩效 3 满勤天数
/// </summary>
public
Nullable
<
int
>
Type
{
get
;
set
;
}
...
...
performance/Performance.Services/ConfigService.cs
View file @
d77d6822
...
...
@@ -495,7 +495,7 @@ public void Copy(per_allot allot)
if
(
data
==
null
||
data
.
Count
==
0
)
{
var
again
=
_againRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
)
??
_againRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
var
newAgains
=
again
.
Select
(
t
=>
new
cof_again
{
AllotID
=
allot
.
ID
,
Type
=
t
.
Type
,
TypeName
=
t
.
TypeName
,
Value
=
t
.
Value
});
var
newAgains
=
again
.
Select
(
t
=>
new
cof_again
{
AllotID
=
allot
.
ID
,
Type
=
t
.
Type
,
Department
=
t
.
Department
,
TypeName
=
t
.
TypeName
,
Value
=
t
.
Value
});
_againRepository
.
AddRange
(
newAgains
.
ToArray
());
}
}
...
...
@@ -537,6 +537,7 @@ public cof_again AgainUpdate(CofAgainRequest request)
throw
new
PerformanceException
(
$"ID不存在 :
{
request
.
ID
}
"
);
again
.
Type
=
request
.
Type
;
again
.
Department
=
request
.
Department
;
again
.
TypeName
=
request
.
TypeName
;
again
.
Value
=
request
.
Value
;
...
...
performance/Performance.Services/SecondAllotService.cs
View file @
d77d6822
...
...
@@ -26,6 +26,7 @@ public class SecondAllotService : IAutoInjection
private
readonly
PerforAgfixatitemRepository
perforAgfixatitemRepository
;
private
readonly
PerforAgusetempRepository
perforAgusetempRepository
;
private
readonly
PerforAgcomputeRepository
perforAgcomputeRepository
;
private
readonly
PerforCofagainRepository
perforCofagainRepository
;
public
SecondAllotService
(
IOptions
<
Application
>
application
,
PerforUserRepository
perforUserRepository
,
...
...
@@ -39,7 +40,8 @@ public class SecondAllotService : IAutoInjection
PerforAgtempitemRepository
perforAgtempitemRepository
,
PerforAgfixatitemRepository
perforAgfixatitemRepository
,
PerforAgusetempRepository
perforAgusetempRepository
,
PerforAgcomputeRepository
perforAgcomputeRepository
)
PerforAgcomputeRepository
perforAgcomputeRepository
,
PerforCofagainRepository
perforCofagainRepository
)
{
this
.
application
=
application
.
Value
;
this
.
perforUserRepository
=
perforUserRepository
;
...
...
@@ -54,6 +56,7 @@ public class SecondAllotService : IAutoInjection
this
.
perforAgfixatitemRepository
=
perforAgfixatitemRepository
;
this
.
perforAgusetempRepository
=
perforAgusetempRepository
;
this
.
perforAgcomputeRepository
=
perforAgcomputeRepository
;
this
.
perforCofagainRepository
=
perforCofagainRepository
;
}
/// <summary>
...
...
@@ -368,13 +371,14 @@ 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
(
fixatList
!=
null
||
fixatList
.
Count
>
0
)
if
(
fixatList
!=
null
&&
fixatList
.
Count
>
0
)
{
//补充数据
var
rows
=
fixatList
.
Select
(
t
=>
t
.
RowNumber
.
Value
).
Distinct
();
foreach
(
var
row
in
rows
)
{
foreach
(
var
item
in
headItems
)
var
header
=
row
==
-
1
?
headItems
.
Where
(
t
=>
t
.
Type
==
1
).
ToList
()
:
headItems
.
Where
(
t
=>
t
.
Type
!=
1
).
ToList
();
foreach
(
var
item
in
header
)
{
var
bodyItem
=
new
BodyItem
{
...
...
@@ -391,6 +395,28 @@ public SecondResponse GetSecondDetail(UseTempRequest request)
}
}
}
else
{
var
second
=
perforAgsecondallotRepository
.
GetEntity
(
t
=>
t
.
Id
==
request
.
SecondId
);
var
config
=
perforCofagainRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
second
.
AllotId
&&
t
.
Department
==
request
.
Department
)
??
new
List
<
cof_again
>();
config
.
Add
(
new
cof_again
{
TypeName
=
"绩效合计(考核后)"
,
Value
=
second
.
RealGiveFee
});
foreach
(
var
item
in
headItems
.
Where
(
t
=>
t
.
Type
==
1
))
{
var
bodyItem
=
new
BodyItem
{
RowNumber
=
-
1
,
FiledId
=
item
.
FiledId
,
FiledName
=
item
.
FiledName
,
FactorValue
=
item
.
FactorValue
,
SourceType
=
item
.
SourceType
,
Type
=
item
.
Type
,
Sort
=
item
.
Sort
,
Value
=
config
.
FirstOrDefault
(
t
=>
t
.
TypeName
==
item
.
FiledName
)?.
Value
.
ToString
()
};
result
.
BodyItems
.
Add
(
bodyItem
);
}
result
.
BodyItems
.
FirstOrDefault
(
t
=>
t
.
FiledName
==
"发放月份"
).
Value
=
$"
{
second
.
Year
}
年
{
second
.
Month
}
月"
;
}
return
result
;
}
}
...
...
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