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
e3eed673
Commit
e3eed673
authored
Sep 15, 2022
by
纪旭 韦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
医院其他绩效,不公示其他绩效
parent
e8c37b1d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
70 additions
and
51 deletions
+70
-51
performance/Performance.Api/Controllers/EmployeeController.cs
+4
-38
performance/Performance.DtoModels/Request/AprAmountAuditRequest.cs
+1
-1
performance/Performance.EntityModels/Entity/per_apr_amount.cs
+1
-1
performance/Performance.EntityModels/Entity/per_apr_amount_hide.cs
+1
-1
performance/Performance.Services/EmployeeService.cs
+63
-10
No files found.
performance/Performance.Api/Controllers/EmployeeController.cs
View file @
e3eed673
...
...
@@ -291,24 +291,7 @@ public ApiResponse GetAprGroupList([FromRoute] int isAudit, [FromBody] AllotIdRe
if
(
request
.
AllotId
==
0
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数AllotId无效!"
);
var
employee
=
employeeService
.
GetAprList
(
request
.
AllotId
,
claim
.
GetUserId
(),
isAudit
);
if
(
employee
==
null
||
!
employee
.
Any
())
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
employee
);
var
result
=
employee
.
GroupBy
(
t
=>
new
{
TypeInDepartment
=
t
.
TypeInDepartment
??
""
,
t
.
CreateDate
})
.
Select
(
t
=>
new
OhterAmountAuditResponse
{
TypeInDepartment
=
t
.
Key
.
TypeInDepartment
,
CreateDate
=
t
.
Key
.
CreateDate
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
Amount
=
t
.
Sum
(
s
=>
s
.
Amount
??
0
),
Status
=
t
.
OrderByDescending
(
w
=>
w
.
Id
).
FirstOrDefault
().
Status
,
PerforType
=
string
.
Join
(
"/"
,
t
.
Select
(
w
=>
w
.
PerforType
).
Distinct
()),
AuditTime
=
t
.
Any
(
s
=>
s
.
Status
==
2
)
?
""
:
t
.
Max
(
w
=>
w
.
AuditTime
)?.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
Remark
=
t
.
Any
(
s
=>
!
s
.
MarkStatus
.
HasValue
)
?
""
:
$"已审计
{
t
.
Max
(
w
=>
w
.
MarkTime
)?.
ToString
(
"(yyyy-MM-dd HH:mm:ss)"
)}
"
,
ShowCommit
=
t
.
FirstOrDefault
(
t
=>
t
.
CreateUser
.
HasValue
).
CreateUser
==
claim
.
GetUserId
(),
});
if
(
result
!=
null
&&
result
.
Any
())
result
=
result
.
OrderByDescending
(
o
=>
o
.
CreateDate
).
ToList
();
var
result
=
employeeService
.
GetAprList
(
request
.
AllotId
,
claim
.
GetUserId
(),
isAudit
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
result
);
}
...
...
@@ -322,9 +305,9 @@ public ApiResponse GetAprGroupList([FromRoute] int isAudit, [FromBody] AllotIdRe
public
ApiResponse
SubmitDeptList
([
FromBody
]
SubmitAmountRequest
request
)
{
if
(
employeeService
.
SubmitDeptList
(
request
))
return
new
ApiResponse
(
ResponseType
.
OK
,
"提交成功"
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"提交成功"
);
else
return
new
ApiResponse
(
ResponseType
.
Fail
,
"提交失败"
);
return
new
ApiResponse
(
ResponseType
.
Fail
,
"提交失败"
);
}
/// <summary>
/// 医院其他绩效审核详情
...
...
@@ -647,24 +630,7 @@ public ApiResponse GetAprHideGroupList([FromRoute] int isAudit, [FromBody] Allot
if
(
request
.
AllotId
==
0
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数AllotId无效!"
);
var
employee
=
employeeService
.
GetAprHideList
(
request
.
AllotId
,
claim
.
GetUserId
(),
isAudit
);
if
(
employee
==
null
||
!
employee
.
Any
())
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
employee
);
var
result
=
employee
.
GroupBy
(
t
=>
new
{
TypeInDepartment
=
t
.
TypeInDepartment
??
""
,
t
.
CreateDate
})
.
Select
(
t
=>
new
OhterAmountAuditResponse
{
TypeInDepartment
=
t
.
Key
.
TypeInDepartment
,
CreateDate
=
t
.
Key
.
CreateDate
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
Amount
=
t
.
Sum
(
s
=>
s
.
Amount
??
0
),
Status
=
t
.
OrderByDescending
(
w
=>
w
.
Id
).
FirstOrDefault
().
Status
,
PerforType
=
string
.
Join
(
"/"
,
t
.
Select
(
w
=>
w
.
PerforType
).
Distinct
()),
AuditTime
=
t
.
Any
(
s
=>
s
.
Status
==
2
)
?
""
:
t
.
Max
(
w
=>
w
.
AuditTime
)?.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
Remark
=
t
.
Any
(
s
=>
!
s
.
MarkStatus
.
HasValue
)
?
""
:
$"已审计
{
t
.
Max
(
w
=>
w
.
MarkTime
)?.
ToString
(
"(yyyy-MM-dd HH:mm:ss)"
)}
"
,
ShowCommit
=
t
.
FirstOrDefault
(
t
=>
t
.
CreateUser
.
HasValue
).
CreateUser
==
claim
.
GetUserId
(),
});
if
(
result
!=
null
&&
result
.
Any
())
result
=
result
.
OrderByDescending
(
o
=>
o
.
CreateDate
).
ToList
();
var
result
=
employeeService
.
GetAprHideList
(
request
.
AllotId
,
claim
.
GetUserId
(),
isAudit
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
result
);
}
...
...
performance/Performance.DtoModels/Request/AprAmountAuditRequest.cs
View file @
e3eed673
...
...
@@ -38,7 +38,7 @@ public class SubmitAmountRequest
{
public
int
AllotId
{
get
;
set
;
}
public
string
TypeInDepartment
{
get
;
set
;
}
public
string
PerforTyp
e
{
get
;
set
;
}
public
string
CreateDat
e
{
get
;
set
;
}
public
string
Remark
{
get
;
set
;
}
}
}
performance/Performance.EntityModels/Entity/per_apr_amount.cs
View file @
e3eed673
...
...
@@ -74,7 +74,7 @@ public class per_apr_amount
/// <summary>
///
/// </summary>
public
DateTime
CreateDate
{
get
;
set
;
}
public
DateTime
?
CreateDate
{
get
;
set
;
}
/// <summary>
///
...
...
performance/Performance.EntityModels/Entity/per_apr_amount_hide.cs
View file @
e3eed673
...
...
@@ -69,7 +69,7 @@ public class per_apr_amount_hide
/// <summary>
///
/// </summary>
public
DateTime
CreateDate
{
get
;
set
;
}
public
DateTime
?
CreateDate
{
get
;
set
;
}
/// <summary>
///
...
...
performance/Performance.Services/EmployeeService.cs
View file @
e3eed673
...
...
@@ -5,6 +5,7 @@
using
NPOI.SS.UserModel
;
using
NPOI.XSSF.UserModel
;
using
Performance.DtoModels
;
using
Performance.DtoModels.Response
;
using
Performance.EntityModels
;
using
Performance.Infrastructure
;
using
Performance.Repository
;
...
...
@@ -430,7 +431,7 @@ public bool Audit(int allotId)
/// <param name="allotId"></param>
/// <param name="userId"></param>
/// <returns></returns>
public
List
<
per_apr_amount
>
GetAprList
(
int
allotId
,
int
userId
,
int
isAudit
)
public
List
<
OhterAmountAuditResponse
>
GetAprList
(
int
allotId
,
int
userId
,
int
isAudit
)
{
var
userrole
=
userroleRepository
.
GetEntity
(
t
=>
t
.
UserID
==
userId
);
if
(
userrole
==
null
)
throw
new
PerformanceException
(
"用户未绑定角色"
);
...
...
@@ -443,12 +444,39 @@ public List<per_apr_amount> GetAprList(int allotId, int userId, int isAudit)
if
(
isAudit
==
1
)
expression
=
expression
.
And
(
t
=>
new
int
[]
{
2
,
3
}.
Contains
(
t
.
Status
??
1
));
var
list
=
perapramountRepository
.
GetEntities
(
expression
);
var
list
=
perapramountRepository
.
GetEntities
(
expression
)
??
new
List
<
per_apr_amount
>()
;
if
(
list
!=
null
&&
list
.
Any
())
list
=
list
.
OrderBy
(
w
=>
w
.
IsVerify
).
ThenBy
(
t
=>
t
.
DoctorName
).
ToList
();
return
list
;
var
result
=
list
.
GroupBy
(
t
=>
new
{
TypeInDepartment
=
t
.
TypeInDepartment
??
""
,
t
.
CreateDate
})
.
Select
(
t
=>
{
string
createDate
=
""
;
if
(
t
.
Key
.
CreateDate
!=
null
)
createDate
=
t
.
Key
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
);
var
status
=
t
.
OrderByDescending
(
w
=>
w
.
Id
).
FirstOrDefault
()?.
Status
??
0
;
var
perforTypes
=
string
.
Join
(
"/"
,
t
.
Select
(
w
=>
w
.
PerforType
).
Distinct
());
if
(
perforTypes
.
Length
>
10
)
perforTypes
=
perforTypes
.
Substring
(
0
,
10
)
+
"……"
;
return
new
OhterAmountAuditResponse
{
TypeInDepartment
=
t
.
Key
.
TypeInDepartment
,
CreateDate
=
createDate
,
Amount
=
t
.
Sum
(
s
=>
s
.
Amount
??
0
),
Status
=
status
,
PerforType
=
perforTypes
,
AuditTime
=
t
.
Any
(
s
=>
s
.
Status
==
2
)
?
""
:
t
.
Max
(
w
=>
w
.
AuditTime
)?.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
Remark
=
t
.
Any
(
s
=>
!
s
.
MarkStatus
.
HasValue
)
?
""
:
$"已审计
{
t
.
Max
(
w
=>
w
.
MarkTime
)?.
ToString
(
"(yyyy-MM-dd HH:mm:ss)"
)}
"
,
ShowCommit
=
(
new
int
[]
{
1
,
4
}).
Contains
(
status
)
&&
t
.
FirstOrDefault
(
t
=>
t
.
CreateUser
.
HasValue
).
CreateUser
==
userId
,
};
});
if
(
result
!=
null
&&
result
.
Any
())
result
=
result
.
OrderByDescending
(
o
=>
o
.
CreateDate
).
ToList
();
return
result
.
ToList
();
}
/// <summary>
/// 医院其他绩效提交
/// </summary>
...
...
@@ -456,8 +484,8 @@ public List<per_apr_amount> GetAprList(int allotId, int userId, int isAudit)
/// <returns></returns>
public
bool
SubmitDeptList
(
SubmitAmountRequest
request
)
{
string
[]
perforTypes
=
request
.
PerforType
.
Split
(
"/"
);
var
result
=
perapramountRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
request
.
AllotId
&&
w
.
TypeInDepartment
==
request
.
TypeInDepartment
&&
perforTypes
.
Contains
(
w
.
PerforType
)
);
var
createDate
=
DateTime
.
Parse
(
request
.
CreateDate
);
var
result
=
perapramountRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
request
.
AllotId
&&
w
.
TypeInDepartment
==
request
.
TypeInDepartment
&&
w
.
CreateDate
==
createDate
);
result
.
ForEach
(
w
=>
{
w
.
Status
=
2
;
...
...
@@ -921,7 +949,7 @@ public string GetTypeInDepartment(int userId)
/// <param name="allotId"></param>
/// <param name="userId"></param>
/// <returns></returns>
public
List
<
per_apr_amount_hid
e
>
GetAprHideList
(
int
allotId
,
int
userId
,
int
isAudit
)
public
List
<
OhterAmountAuditRespons
e
>
GetAprHideList
(
int
allotId
,
int
userId
,
int
isAudit
)
{
var
userrole
=
userroleRepository
.
GetEntity
(
t
=>
t
.
UserID
==
userId
);
if
(
userrole
==
null
)
throw
new
PerformanceException
(
"用户未绑定角色"
);
...
...
@@ -934,11 +962,36 @@ public List<per_apr_amount_hide> GetAprHideList(int allotId, int userId, int isA
if
(
isAudit
==
1
)
expression
=
expression
.
And
(
t
=>
new
int
[]
{
2
,
3
}.
Contains
(
t
.
Status
??
1
));
var
list
=
_hideRepository
.
GetEntities
(
expression
);
var
list
=
_hideRepository
.
GetEntities
(
expression
)
??
new
List
<
per_apr_amount_hide
>()
;
if
(
list
!=
null
&&
list
.
Any
())
list
=
list
.
OrderBy
(
w
=>
w
.
IsVerify
).
ThenBy
(
t
=>
t
.
DoctorName
).
ToList
();
return
list
;
var
result
=
list
.
GroupBy
(
t
=>
new
{
TypeInDepartment
=
t
.
TypeInDepartment
??
""
,
t
.
CreateDate
})
.
Select
(
t
=>
{
string
createDate
=
""
;
if
(
t
.
Key
.
CreateDate
!=
null
)
createDate
=
t
.
Key
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
);
var
status
=
t
.
OrderByDescending
(
w
=>
w
.
Id
).
FirstOrDefault
()?.
Status
??
0
;
var
perforTypes
=
string
.
Join
(
"/"
,
t
.
Select
(
w
=>
w
.
PerforType
).
Distinct
());
if
(
perforTypes
.
Length
>
10
)
perforTypes
=
perforTypes
.
Substring
(
0
,
10
)
+
"……"
;
return
new
OhterAmountAuditResponse
()
{
TypeInDepartment
=
t
.
Key
.
TypeInDepartment
,
CreateDate
=
createDate
,
Amount
=
t
.
Sum
(
s
=>
s
.
Amount
??
0
),
Status
=
status
,
PerforType
=
perforTypes
,
AuditTime
=
t
.
Any
(
s
=>
s
.
Status
==
2
)
?
""
:
t
.
Max
(
w
=>
w
.
AuditTime
)?.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
Remark
=
t
.
Any
(
s
=>
!
s
.
MarkStatus
.
HasValue
)
?
""
:
$"已审计
{
t
.
Max
(
w
=>
w
.
MarkTime
)?.
ToString
(
"(yyyy-MM-dd HH:mm:ss)"
)}
"
,
ShowCommit
=
(
new
int
[]
{
1
,
4
}).
Contains
(
status
)
&&
t
.
FirstOrDefault
(
t
=>
t
.
CreateUser
.
HasValue
).
CreateUser
==
userId
,
};
});
if
(
result
!=
null
&&
result
.
Any
())
result
=
result
.
OrderByDescending
(
o
=>
o
.
CreateDate
).
ToList
();
return
result
.
ToList
();
}
/// <summary>
/// 不公示其他绩效提交
...
...
@@ -946,8 +999,8 @@ public List<per_apr_amount_hide> GetAprHideList(int allotId, int userId, int isA
/// <returns></returns>
public
bool
SubmitHideDeptList
(
SubmitAmountRequest
request
)
{
string
[]
perforTypes
=
request
.
PerforType
.
Split
(
"/"
);
var
result
=
_hideRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
request
.
AllotId
&&
w
.
TypeInDepartment
==
request
.
TypeInDepartment
&&
perforTypes
.
Contains
(
w
.
PerforType
)
);
var
createDate
=
DateTime
.
Parse
(
request
.
CreateDate
);
var
result
=
_hideRepository
.
GetEntities
(
w
=>
w
.
AllotId
==
request
.
AllotId
&&
w
.
TypeInDepartment
==
request
.
TypeInDepartment
&&
w
.
CreateDate
==
createDate
);
result
.
ForEach
(
w
=>
{
w
.
Status
=
2
;
...
...
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