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
4fc34a3b
Commit
4fc34a3b
authored
Nov 12, 2020
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
其他考核绩效去除金额为0的录入项,抽取新增sheet为6.1,6.7类型的采集
parent
3ce206f8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
59 additions
and
6 deletions
+59
-6
performance/Performance.Api/Controllers/EmployeeController.cs
+3
-2
performance/Performance.Services/CollectService.cs
+1
-1
performance/Performance.Services/EmployeeService.cs
+3
-3
performance/Performance.Services/ExtractExcelService/SheetDataWrite/DepartmentDataWrite.cs
+45
-0
performance/Performance.Services/ExtractExcelService/WriteDataFactory.cs
+7
-0
No files found.
performance/Performance.Api/Controllers/EmployeeController.cs
View file @
4fc34a3b
...
...
@@ -287,7 +287,8 @@ public ApiResponse GetAprGroupList([FromBody] per_apr_amount request)
{
AccountingUnit
=
t
.
Key
.
AccountingUnit
,
TypeInDepartment
=
t
.
Key
.
TypeInDepartment
,
Amount
=
t
.
Sum
(
s
=>
s
.
Amount
??
0
)
Amount
=
t
.
Sum
(
s
=>
s
.
Amount
??
0
),
Status
=
t
.
Any
(
s
=>
s
.
Status
==
2
)
?
2
:
t
.
Any
(
s
=>
s
.
Status
==
4
)
?
4
:
t
.
FirstOrDefault
().
Status
,
});
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
result
);
}
...
...
@@ -315,7 +316,7 @@ public ApiResponse GetAprDetail([FromBody] per_apr_amount request)
Status
=
t
.
Any
(
s
=>
s
.
Status
==
2
)
?
2
:
t
.
Any
(
s
=>
s
.
Status
==
4
)
?
4
:
t
.
FirstOrDefault
().
Status
,
Detail
=
t
.
GroupBy
(
group
=>
group
.
PerforType
).
Select
(
s
=>
new
TitleValue
<
decimal
>
{
Title
=
s
.
Key
,
Title
=
s
tring
.
IsNullOrEmpty
(
s
.
Key
)
?
"未知"
:
s
.
Key
,
Value
=
s
.
Sum
(
sum
=>
sum
.
Amount
??
0
)
})
});
...
...
performance/Performance.Services/CollectService.cs
View file @
4fc34a3b
...
...
@@ -245,7 +245,7 @@ private IEnumerable<collect_permission> GetCollectSheetByAllot(int hospitalId, i
join
head
in
headers
on
sheet
.
ID
equals
head
.
SheetID
select
new
{
sheet
.
SheetName
,
sheet
.
SheetType
,
HeadName
=
head
.
CellValue
};
var
result
=
sheetHeads
.
Select
(
sh
=>
new
collect_permission
{
HospitalId
=
hospitalId
,
SheetName
=
sh
.
SheetName
,
SheetType
=
sh
.
SheetType
.
Value
,
HeadName
=
sh
.
HeadName
,
AttachLast
=
1
,
Visible
=
1
})?.
ToList
();
var
result
=
sheetHeads
.
Select
(
sh
=>
new
collect_permission
{
HospitalId
=
hospitalId
,
SheetName
=
sh
.
SheetName
,
SheetType
=
sh
.
SheetType
.
Value
,
HeadName
=
sh
.
HeadName
,
AttachLast
=
0
,
Visible
=
1
})?.
ToList
();
//if (result != null && result.Any())
//{
...
...
performance/Performance.Services/EmployeeService.cs
View file @
4fc34a3b
...
...
@@ -376,7 +376,7 @@ public bool Audit(int allotId)
public
List
<
per_apr_amount
>
GetAprList
(
int
allotId
)
{
var
list
=
perapramountRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
);
var
list
=
perapramountRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
Amount
!=
0
);
if
(
list
!=
null
&&
list
.
Any
())
list
=
list
.
OrderBy
(
t
=>
t
.
DoctorName
).
ToList
();
...
...
@@ -385,7 +385,7 @@ public List<per_apr_amount> GetAprList(int allotId)
public
List
<
per_apr_amount
>
GetAprList
(
int
allotId
,
string
accountingUnit
,
string
department
)
{
var
list
=
perapramountRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
&&
(
t
.
AccountingUnit
??
""
)
==
accountingUnit
&&
(
t
.
TypeInDepartment
??
""
)
==
department
);
var
list
=
perapramountRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotId
&&
t
.
Amount
!=
0
&&
(
t
.
AccountingUnit
??
""
)
==
accountingUnit
&&
(
t
.
TypeInDepartment
??
""
)
==
department
);
if
(
list
!=
null
&&
list
.
Any
())
list
=
list
.
OrderBy
(
t
=>
t
.
DoctorName
).
ToList
();
...
...
@@ -443,7 +443,7 @@ public bool DeleteApr(int id)
/// <returns></returns>
public
bool
ConfirmAudit
(
int
userid
,
AprAmountAuditRequest
request
)
{
if
(
request
.
Id
.
Length
==
0
)
if
(
string
.
IsNullOrEmpty
(
request
.
DoctorName
)
&&
string
.
IsNullOrEmpty
(
request
.
PersonnelNumber
)
)
throw
new
PerformanceException
(
"审核信息无效,请确认"
);
var
apramounts
=
perapramountRepository
.
GetEntities
(
t
=>
(
t
.
DoctorName
??
""
)
==
request
.
DoctorName
&&
(
t
.
PersonnelNumber
??
""
)
==
request
.
PersonnelNumber
);
...
...
performance/Performance.Services/ExtractExcelService/SheetDataWrite/DepartmentDataWrite.cs
0 → 100644
View file @
4fc34a3b
using
NPOI.SS.UserModel
;
using
Performance.DtoModels
;
using
Performance.EntityModels
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Performance.Services.ExtractExcelService.SheetDataWrite
{
public
class
DepartmentDataWrite
:
ISheetDataWrite
{
public
void
WriteCollectData
(
ISheet
sheet
,
PerSheetPoint
point
,
SheetType
sheetType
,
ExcelStyle
style
,
List
<
collect_data
>
collects
)
{
if
(
collects
==
null
||
!
collects
.
Any
(
t
=>
!
string
.
IsNullOrEmpty
(
t
.
TypeName
)))
return
;
var
columns
=
collects
.
Where
(
t
=>
!
string
.
IsNullOrEmpty
(
t
.
TypeName
)).
Select
(
t
=>
t
.
TypeName
).
Distinct
().
OrderBy
(
t
=>
t
).
ToList
();
var
headers
=
columns
.
Select
(
t
=>
new
ExcelHeader
{
ColumnName
=
t
.
Trim
(),
DoctorFactor
=
0
,
NurseFactor
=
0
,
TechnicianFactor
=
0
}).
ToList
();
point
=
new
PerSheetPoint
{
HeaderFirstRowNum
=
1
,
HeaderFirstCellNum
=
1
,
DataFirstRowNum
=
2
,
DataFirstCellNum
=
3
};
ExtractHelper
.
ClearSheetPartialData
(
sheet
,
point
,
sheetType
);
WriteDataHelper
.
WriteSheetHeader
(
sheet
,
point
,
sheetType
,
style
,
headers
);
WriteDataHelper
.
WriteCollectData
(
sheet
,
point
,
sheetType
,
style
,
columns
,
collects
);
}
public
void
WriteSheetData
(
ISheet
sheet
,
PerSheetPoint
point
,
SheetType
sheetType
,
ExcelStyle
style
,
object
data
,
Dictionary
<
ExDataDict
,
object
>
exdict
=
null
)
{
}
}
}
performance/Performance.Services/ExtractExcelService/WriteDataFactory.cs
View file @
4fc34a3b
...
...
@@ -35,6 +35,13 @@ public ISheetDataWrite GetWriteData(SheetType sheetType)
case
SheetType
.
SpecialUnit
:
factory
=
new
SpecialUnitDataWrite
();
break
;
case
SheetType
.
AccountExtra
:
case
SheetType
.
PersonExtra
:
case
SheetType
.
AccountScoreAverage
:
case
SheetType
.
BudgetRatio
:
case
SheetType
.
AssessBeforeOtherFee
:
factory
=
new
DepartmentDataWrite
();
break
;
default
:
return
null
;
}
...
...
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