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
2b497215
Commit
2b497215
authored
Apr 14, 2020
by
lcx
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/new_report' into v2020
parents
2aebe274
2a093e97
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
8 deletions
+37
-8
performance/Performance.Services/SecondAllotService.cs
+37
-8
No files found.
performance/Performance.Services/SecondAllotService.cs
View file @
2b497215
...
@@ -264,7 +264,7 @@ public SecondResponse GetSecondDetail(UseTempRequest request)
...
@@ -264,7 +264,7 @@ public SecondResponse GetSecondDetail(UseTempRequest request)
var
fixatList
=
perforAgfixatitemRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
request
.
SecondId
&&
t
.
RowNumber
.
HasValue
);
var
fixatList
=
perforAgfixatitemRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
request
.
SecondId
&&
t
.
RowNumber
.
HasValue
);
//归档 或 等待审核、审核通过时,headItems不会随选择模板改动,带出已填写数据中的headItems
//归档 或 等待审核、审核通过时,headItems不会随选择模板改动,带出已填写数据中的headItems
if
(
request
.
IsArchive
==
1
||
new
List
<
int
>
{
2
,
3
}.
Contains
(
second
.
Status
??
1
)
)
if
(
request
.
IsArchive
==
1
||
(
second
.
Status
??
1
)
==
3
)
{
{
if
(
fixatList
==
null
||
fixatList
.
Where
(
t
=>
t
.
RowNumber
!=
-
1
).
Count
()
==
0
)
if
(
fixatList
==
null
||
fixatList
.
Where
(
t
=>
t
.
RowNumber
!=
-
1
).
Count
()
==
0
)
throw
new
PerformanceException
(
"提交时未添加数据。"
);
throw
new
PerformanceException
(
"提交时未添加数据。"
);
...
@@ -556,14 +556,14 @@ public bool UseTemp(UseTempRequest request)
...
@@ -556,14 +556,14 @@ public bool UseTemp(UseTempRequest request)
var
fixatList
=
perforAgfixatitemRepository
.
GetEntities
(
t
=>
secondId
.
Contains
(
t
.
SecondId
.
Value
));
var
fixatList
=
perforAgfixatitemRepository
.
GetEntities
(
t
=>
secondId
.
Contains
(
t
.
SecondId
.
Value
));
#
region
获取需要添加的数据
和
无需操作的数据
#
region
获取需要添加的数据
和
无需操作的数据
var
update_second_usetemps
=
new
List
<
ag_secondallot
>();
//
var update_second_usetemps = new List<ag_secondallot>();
foreach
(
var
second
in
secondList
)
foreach
(
var
second
in
secondList
)
{
{
if
(
second
.
IsArchive
==
0
&&
new
List
<
int
>
{
1
,
4
}.
Contains
(
second
.
Status
??
1
))
if
(
second
.
IsArchive
==
0
&&
new
List
<
int
>
{
1
,
4
}.
Contains
(
second
.
Status
??
1
))
{
{
var
update_second_usetemp
=
seconds
.
FirstOrDefault
(
t
=>
t
.
Id
==
second
.
Id
);
//
var update_second_usetemp = seconds.FirstOrDefault(t => t.Id == second.Id);
update_second_usetemp
.
UseTempId
=
request
.
TempId
;
//
update_second_usetemp.UseTempId = request.TempId;
update_second_usetemps
.
Add
(
update_second_usetemp
);
//
update_second_usetemps.Add(update_second_usetemp);
foreach
(
var
head
in
headItems
)
foreach
(
var
head
in
headItems
)
{
{
...
@@ -593,7 +593,7 @@ public bool UseTemp(UseTempRequest request)
...
@@ -593,7 +593,7 @@ public bool UseTemp(UseTempRequest request)
}
}
}
}
#
endregion
#
endregion
perforAgsecondallotRepository
.
UpdateRange
(
update_second_usetemps
.
ToArray
());
//
perforAgsecondallotRepository.UpdateRange(update_second_usetemps.ToArray());
if
(
list
!=
null
&&
list
.
Count
>
0
)
if
(
list
!=
null
&&
list
.
Count
>
0
)
{
{
var
delList
=
fixatList
.
Except
(
list
);
var
delList
=
fixatList
.
Except
(
list
);
...
@@ -769,8 +769,28 @@ public List<ag_secondallot> AuditList(int userId, int allotId)
...
@@ -769,8 +769,28 @@ public List<ag_secondallot> AuditList(int userId, int allotId)
/// <returns></returns>
/// <returns></returns>
public
bool
AuditSubmit
(
ag_secondallot
second
,
int
submittype
)
public
bool
AuditSubmit
(
ag_secondallot
second
,
int
submittype
)
{
{
var
allot
=
perforPerallotRepository
.
GetEntity
(
t
=>
t
.
ID
==
second
.
AllotId
);
if
(
allot
==
null
)
throw
new
PerformanceException
(
"二次绩效无效!"
);
var
temp
=
perforAgusetempRepository
.
GetEntity
(
t
=>
t
.
HospitalId
==
allot
.
HospitalId
);
if
(
temp
==
null
)
throw
new
PerformanceException
(
"选择模板不可用,请确定模板及数据是否存在!"
);
if
(
temp
.
UseTempId
==
6
)
{
var
data
=
perforAgothersourceRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
second
.
Id
);
if
(
data
==
null
||
!
data
.
Any
())
throw
new
PerformanceException
(
"提交时未检测到数据!"
);
}
else
{
var
data
=
perforAgfixatitemRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
second
.
Id
);
if
(
data
==
null
||
!
data
.
Any
())
throw
new
PerformanceException
(
"提交时未检测到数据!"
);
}
second
.
UseTempId
=
temp
.
UseTempId
;
second
.
Status
=
2
;
second
.
Status
=
2
;
second
.
SubmitType
=
submittype
;
second
.
SubmitType
=
temp
.
UseTempId
==
6
?
2
:
1
;
second
.
SubmitTime
=
DateTime
.
Now
;
second
.
SubmitTime
=
DateTime
.
Now
;
second
.
Remark
=
"已提交审核,等待审核中"
;
second
.
Remark
=
"已提交审核,等待审核中"
;
return
perforAgsecondallotRepository
.
Update
(
second
);
return
perforAgsecondallotRepository
.
Update
(
second
);
...
@@ -789,7 +809,16 @@ public bool ConfirmAudit(int userId, SecondAuditRequest request)
...
@@ -789,7 +809,16 @@ public bool ConfirmAudit(int userId, SecondAuditRequest request)
if
(
second
.
Status
!=
2
)
if
(
second
.
Status
!=
2
)
throw
new
PerformanceException
(
"该绩效未提交至审核,请确认"
);
throw
new
PerformanceException
(
"该绩效未提交至审核,请确认"
);
second
.
Status
=
request
.
IsPass
==
1
?
3
:
4
;
if
(
request
.
IsPass
==
1
)
{
second
.
Status
=
3
;
}
else
{
second
.
UseTempId
=
null
;
second
.
Status
=
4
;
}
//second.Status = request.IsPass == 1 ? 3 : 4;
second
.
AuditUser
=
userId
;
second
.
AuditUser
=
userId
;
second
.
AuditTime
=
DateTime
.
Now
;
second
.
AuditTime
=
DateTime
.
Now
;
second
.
Remark
=
request
.
Remark
;
second
.
Remark
=
request
.
Remark
;
...
...
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