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
a02ec5e0
Commit
a02ec5e0
authored
Nov 13, 2019
by
李承祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二次绩效带出上次绩效添加的绩效信息
parent
18c76996
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
46 deletions
+58
-46
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+3
-0
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+6
-1
performance/Performance.DtoModels/Request/UseTempRequest.cs
+3
-0
performance/Performance.Services/SecondAllotService.cs
+46
-45
No files found.
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
a02ec5e0
...
@@ -2121,6 +2121,9 @@
...
@@ -2121,6 +2121,9 @@
<member
name=
"P:Performance.DtoModels.SecondListResponse.IsArchive"
>
<member
name=
"P:Performance.DtoModels.SecondListResponse.IsArchive"
>
<summary>
是否归档
</summary>
<summary>
是否归档
</summary>
</member>
</member>
<member
name=
"P:Performance.DtoModels.HeadItem.IsBring"
>
<summary>
1 带出历史数据 2不带出
</summary>
</member>
<member
name=
"P:Performance.DtoModels.SecondTempResponse.TempName"
>
<member
name=
"P:Performance.DtoModels.SecondTempResponse.TempName"
>
<summary>
<summary>
模板名称
模板名称
...
...
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
a02ec5e0
...
@@ -459,7 +459,7 @@
...
@@ -459,7 +459,7 @@
二次绩效固定项
二次绩效固定项
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.EntityModels.ag_fixatitem.I
d
"
>
<member
name=
"P:Performance.EntityModels.ag_fixatitem.I
D
"
>
<summary>
<summary>
</summary>
</summary>
...
@@ -714,6 +714,11 @@
...
@@ -714,6 +714,11 @@
1 自动带出 2 计算得出
1 自动带出 2 计算得出
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.EntityModels.ag_tempitem.IsBring"
>
<summary>
1 带出历史数据 2不带出
</summary>
</member>
<member
name=
"T:Performance.EntityModels.ag_usetemp"
>
<member
name=
"T:Performance.EntityModels.ag_usetemp"
>
<summary>
<summary>
...
...
performance/Performance.DtoModels/Request/UseTempRequest.cs
View file @
a02ec5e0
...
@@ -27,6 +27,9 @@ public UseTempRequestValidator()
...
@@ -27,6 +27,9 @@ public UseTempRequestValidator()
RuleSet
(
"Use"
,
()
=>
RuleSet
(
"Use"
,
()
=>
{
{
RuleFor
(
x
=>
x
.
TempId
).
NotNull
().
GreaterThan
(
0
);
RuleFor
(
x
=>
x
.
TempId
).
NotNull
().
GreaterThan
(
0
);
RuleFor
(
x
=>
x
.
HospitalId
).
NotNull
().
GreaterThan
(
0
);
RuleFor
(
x
=>
x
.
Department
).
NotNull
().
NotEmpty
();
RuleFor
(
x
=>
x
.
UnitType
).
NotNull
().
NotEmpty
();
});
});
RuleSet
(
"Refresh"
,
()
=>
RuleSet
(
"Refresh"
,
()
=>
...
...
performance/Performance.Services/SecondAllotService.cs
View file @
a02ec5e0
...
@@ -153,12 +153,9 @@ public List<SecondTempResponse> GetTemp(int hospitalid)
...
@@ -153,12 +153,9 @@ public List<SecondTempResponse> GetTemp(int hospitalid)
/// <returns></returns>
/// <returns></returns>
public
bool
UseTemp
(
UseTempRequest
request
)
public
bool
UseTemp
(
UseTempRequest
request
)
{
{
var
temp
=
perforAgtempRepository
.
GetEntity
(
t
=>
t
.
Id
==
request
.
TempId
);
if
(
temp
==
null
)
throw
new
PerformanceException
(
"参数tempId 无效"
);
var
result
=
false
;
var
result
=
false
;
var
entity
=
perforAgusetempRepository
.
GetEntity
(
t
=>
t
.
HospitalId
==
request
.
HospitalId
&&
t
.
Department
==
request
.
Department
&&
t
.
UnitType
==
request
.
UnitType
);
var
entity
=
perforAgusetempRepository
.
GetEntity
(
t
=>
t
.
HospitalId
==
request
.
HospitalId
&&
t
.
Department
==
request
.
Department
&&
t
.
UnitType
==
request
.
UnitType
);
if
(
entity
==
null
)
if
(
entity
==
null
)
{
{
entity
=
Mapper
.
Map
<
ag_usetemp
>(
request
);
entity
=
Mapper
.
Map
<
ag_usetemp
>(
request
);
...
@@ -184,35 +181,36 @@ public bool UseTemp(UseTempRequest request)
...
@@ -184,35 +181,36 @@ public bool UseTemp(UseTempRequest request)
if
(
secondId
==
null
||
secondId
.
Count
()
<=
0
)
if
(
secondId
==
null
||
secondId
.
Count
()
<=
0
)
return
result
;
return
result
;
//获取数据
var
fixatList
=
perforAgfixatitemRepository
.
GetEntities
(
t
=>
secondId
.
Contains
(
t
.
SecondId
.
Value
));
var
fixatList
=
perforAgfixatitemRepository
.
GetEntities
(
t
=>
secondId
.
Contains
(
t
.
SecondId
.
Value
));
foreach
(
var
item
in
headItems
)
foreach
(
var
second
in
secondList
)
{
{
//符合条件的数据(未归档)
foreach
(
var
head
in
headItems
)
var
exist
=
fixatList
.
Where
(
t
=>
t
.
ItemName
==
item
.
FiledName
&&
t
.
Type
==
item
.
Type
);
if
(
exist
!=
null
&&
exist
.
Count
()
>
0
)
list
.
AddRange
(
exist
);
else
{
{
secondList
.
ForEach
(
t
=>
if
(
second
.
IsArchive
==
0
)
{
{
if
(
t
.
IsArchive
==
0
)
var
exist
=
fixatList
?.
Where
(
t
=>
t
.
ItemName
==
head
.
FiledName
&&
t
.
Type
==
head
.
Type
&&
t
.
SecondId
==
second
.
Id
);
if
(
exist
!=
null
&&
exist
.
Count
()
>
0
)
list
.
AddRange
(
exist
);
else
{
{
var
configs
=
perforCofagainRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
second
.
AllotId
&&
t
.
Department
==
request
.
Department
)
??
new
List
<
cof_again
>();
addList
.
Add
(
new
ag_fixatitem
addList
.
Add
(
new
ag_fixatitem
{
{
ItemName
=
item
.
FiledName
,
ItemName
=
head
.
FiledName
,
RowNumber
=
-
1
,
RowNumber
=
-
1
,
Type
=
item
.
Type
,
Type
=
head
.
Type
,
SourceType
=
item
.
SourceType
,
SourceType
=
head
.
SourceType
,
Sort
=
item
.
Sort
,
Sort
=
head
.
Sort
,
FactorValue
=
item
.
FactorValue
,
FactorValue
=
head
.
FactorValue
,
UnitType
=
t
.
UnitType
,
UnitType
=
second
.
UnitType
,
AllotId
=
t
.
AllotId
,
AllotId
=
second
.
AllotId
,
SecondId
=
t
.
Id
SecondId
=
second
.
Id
,
ItemValue
=
head
.
FiledName
==
"绩效合计(考核后)"
?
second
.
RealGiveFee
?.
ToString
()
:
head
.
FiledName
==
"发放月份"
?
$"
{
second
.
Year
}
年
{
second
.
Month
}
月"
:
configs
.
FirstOrDefault
(
t
=>
t
.
TypeName
==
head
.
FiledName
)?.
Value
.
ToString
()
});
});
}
}
}
);
}
}
}
}
}
if
(
list
!=
null
&&
list
.
Count
>
0
)
if
(
list
!=
null
&&
list
.
Count
>
0
)
...
@@ -430,11 +428,12 @@ public SecondResponse GetSecondDetail(UseTempRequest request)
...
@@ -430,11 +428,12 @@ public SecondResponse GetSecondDetail(UseTempRequest request)
var
headItems
=
GetHeadItems
(
usetemp
.
UseTempId
.
Value
,
usetemp
.
HospitalId
.
Value
,
usetemp
.
Department
,
usetemp
.
UnitType
);
var
headItems
=
GetHeadItems
(
usetemp
.
UseTempId
.
Value
,
usetemp
.
HospitalId
.
Value
,
usetemp
.
Department
,
usetemp
.
UnitType
);
var
result
=
new
SecondResponse
{
HeadItems
=
headItems
,
BodyItems
=
new
List
<
BodyItem
>()
};
var
result
=
new
SecondResponse
{
HeadItems
=
headItems
,
BodyItems
=
new
List
<
BodyItem
>()
};
//获取数据
//获取
已录入
数据
var
fixatList
=
perforAgfixatitemRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
request
.
SecondId
&&
t
.
RowNumber
.
HasValue
);
var
fixatList
=
perforAgfixatitemRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
request
.
SecondId
&&
t
.
RowNumber
.
HasValue
);
if
(
request
.
IsArchive
==
1
)
if
(
request
.
IsArchive
==
1
)
//归档
{
{
if
(
fixatList
==
null
||
fixatList
.
Count
==
0
)
#
region
已归档数据,根据数据获取
列
if
(
fixatList
==
null
||
fixatList
.
Where
(
t
=>
t
.
RowNumber
!=
-
1
).
Count
()
==
0
)
throw
new
PerformanceException
(
"绩效归档时,尚未添加数据。"
);
throw
new
PerformanceException
(
"绩效归档时,尚未添加数据。"
);
else
else
{
{
...
@@ -450,11 +449,11 @@ public SecondResponse GetSecondDetail(UseTempRequest request)
...
@@ -450,11 +449,11 @@ public SecondResponse GetSecondDetail(UseTempRequest request)
}).
Where
(
t
=>
t
.
FiledId
!=
"无FiledId"
).
ToList
();
}).
Where
(
t
=>
t
.
FiledId
!=
"无FiledId"
).
ToList
();
result
.
HeadItems
=
headItems
;
result
.
HeadItems
=
headItems
;
}
}
#
endregion
}
}
//未归档
if
(
fixatList
!=
null
&&
fixatList
.
Count
>
0
)
if
(
fixatList
!=
null
&&
fixatList
.
Where
(
t
=>
t
.
RowNumber
!=
-
1
).
Count
()
>
0
)
{
{
//补充数据
var
rows
=
fixatList
.
Select
(
t
=>
t
.
RowNumber
.
Value
).
Distinct
();
var
rows
=
fixatList
.
Select
(
t
=>
t
.
RowNumber
.
Value
).
Distinct
();
foreach
(
var
row
in
rows
)
foreach
(
var
row
in
rows
)
{
{
...
@@ -462,20 +461,11 @@ public SecondResponse GetSecondDetail(UseTempRequest request)
...
@@ -462,20 +461,11 @@ public SecondResponse GetSecondDetail(UseTempRequest request)
result
.
BodyItems
.
AddRange
(
GetBodyItems
(
header
,
2
,
fixatitems
:
fixatList
,
row
:
row
));
result
.
BodyItems
.
AddRange
(
GetBodyItems
(
header
,
2
,
fixatitems
:
fixatList
,
row
:
row
));
}
}
}
}
else
else
if
(
fixatList
==
null
||
(
fixatList
!=
null
&&
fixatList
.
Where
(
t
=>
t
.
RowNumber
!=
-
1
).
Count
()
==
0
))
{
{
var
second
=
perforAgsecondallotRepository
.
GetEntity
(
t
=>
t
.
Id
==
request
.
SecondId
);
#
region
补充历史绩效需要带出的数据
var
config
=
perforCofagainRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
second
.
AllotId
&&
t
.
Department
==
request
.
Department
)
??
new
List
<
cof_again
>();
var
bringhead
=
headItems
.
Where
(
t
=>
t
.
IsBring
==
1
).
ToList
();
if
(
bringhead
!=
null
&&
bringhead
.
Count
>
0
)
#
region
补充顶部数据
config
.
Add
(
new
cof_again
{
TypeName
=
"绩效合计(考核后)"
,
Value
=
second
.
RealGiveFee
});
result
.
BodyItems
.
AddRange
(
GetBodyItems
(
headItems
.
Where
(
t
=>
t
.
Type
==
1
).
ToList
(),
1
,
configs
:
config
));
result
.
BodyItems
.
FirstOrDefault
(
t
=>
t
.
FiledName
==
"发放月份"
).
Value
=
$"
{
second
.
Year
}
年
{
second
.
Month
}
月"
;
#
endregion
#
region
补充需要带出的数据
headItems
=
headItems
.
Where
(
t
=>
t
.
IsBring
==
1
).
ToList
();
if
(
headItems
!=
null
&&
headItems
.
Count
>
0
)
{
{
var
allotList
=
perforPerallotRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
request
.
HospitalId
);
var
allotList
=
perforPerallotRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
request
.
HospitalId
);
var
secondIdList
=
perforAgsecondallotRepository
.
GetEntities
(
t
=>
allotList
.
Select
(
a
=>
a
.
ID
).
Contains
(
t
.
AllotId
.
Value
)).
OrderBy
(
t
=>
t
.
Year
).
ThenBy
(
t
=>
t
.
Month
).
Select
(
t
=>
t
.
Id
).
ToList
();
var
secondIdList
=
perforAgsecondallotRepository
.
GetEntities
(
t
=>
allotList
.
Select
(
a
=>
a
.
ID
).
Contains
(
t
.
AllotId
.
Value
)).
OrderBy
(
t
=>
t
.
Year
).
ThenBy
(
t
=>
t
.
Month
).
Select
(
t
=>
t
.
Id
).
ToList
();
...
@@ -483,19 +473,30 @@ public SecondResponse GetSecondDetail(UseTempRequest request)
...
@@ -483,19 +473,30 @@ public SecondResponse GetSecondDetail(UseTempRequest request)
if
(
index
!=
0
)
if
(
index
!=
0
)
fixatList
=
perforAgfixatitemRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
secondIdList
.
ElementAt
(
index
-
1
)
&&
t
.
RowNumber
.
HasValue
);
fixatList
=
perforAgfixatitemRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
secondIdList
.
ElementAt
(
index
-
1
)
&&
t
.
RowNumber
.
HasValue
);
fixatList
=
fixatList
.
Where
(
t
=>
headItems
.
Select
(
h
=>
h
.
FiledName
).
Contains
(
t
.
ItemName
)).
ToList
();
fixatList
=
fixatList
?.
Where
(
t
=>
bringhead
.
Select
(
h
=>
h
.
FiledName
).
Contains
(
t
.
ItemName
)).
ToList
();
if
(
fixatList
!=
null
&&
fixatList
.
Count
>
0
)
if
(
fixatList
!=
null
&&
fixatList
.
Count
>
0
)
{
{
var
rows
=
fixatList
.
Select
(
t
=>
t
.
RowNumber
.
Value
).
Distinct
();
var
rows
=
fixatList
.
Select
(
t
=>
t
.
RowNumber
.
Value
).
Distinct
();
foreach
(
var
row
in
rows
)
foreach
(
var
row
in
rows
)
{
{
var
header
=
row
==
-
1
?
headItems
.
Where
(
t
=>
t
.
Type
==
1
).
ToList
()
:
headItems
.
Where
(
t
=>
t
.
Type
!=
1
).
ToList
();
var
header
=
row
==
-
1
?
bringhead
.
Where
(
t
=>
t
.
Type
==
1
).
ToList
()
:
bringhead
.
Where
(
t
=>
t
.
Type
!=
1
).
ToList
();
result
.
BodyItems
.
AddRange
(
GetBodyItems
(
header
,
2
,
fixatitems
:
fixatList
,
row
:
row
));
result
.
BodyItems
.
AddRange
(
GetBodyItems
(
header
,
2
,
fixatitems
:
fixatList
,
row
:
row
));
}
}
}
}
}
}
#
endregion
#
endregion
}
}
if
(
fixatList
==
null
||
(
fixatList
!=
null
&&
fixatList
.
Where
(
t
=>
t
.
RowNumber
==
-
1
).
Count
()
==
0
))
{
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
>();
#
region
补充顶部数据
config
.
Add
(
new
cof_again
{
TypeName
=
"绩效合计(考核后)"
,
Value
=
second
.
RealGiveFee
});
result
.
BodyItems
.
AddRange
(
GetBodyItems
(
headItems
.
Where
(
t
=>
t
.
Type
==
1
).
ToList
(),
1
,
configs
:
config
));
result
.
BodyItems
.
FirstOrDefault
(
t
=>
t
.
FiledName
==
"发放月份"
).
Value
=
$"
{
second
.
Year
}
年
{
second
.
Month
}
月"
;
#
endregion
}
return
new
SecondResponse
return
new
SecondResponse
{
{
HeadItems
=
result
.
HeadItems
.
OrderBy
(
t
=>
t
.
Type
).
ThenBy
(
t
=>
t
.
Sort
).
ThenBy
(
t
=>
t
.
FiledName
).
ToList
(),
HeadItems
=
result
.
HeadItems
.
OrderBy
(
t
=>
t
.
Type
).
ThenBy
(
t
=>
t
.
Sort
).
ThenBy
(
t
=>
t
.
FiledName
).
ToList
(),
...
...
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