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
bc0908d8
Commit
bc0908d8
authored
Oct 21, 2020
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工作量模板去除核算科室
parent
12b390cb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
6 deletions
+25
-6
performance/Performance.Services/HistoryService.cs
+24
-5
performance/Performance.Services/PersonService.cs
+1
-1
No files found.
performance/Performance.Services/HistoryService.cs
View file @
bc0908d8
...
@@ -20,17 +20,20 @@ public class HistoryService : IAutoInjection
...
@@ -20,17 +20,20 @@ public class HistoryService : IAutoInjection
private
readonly
PerforReportoriginalsurgeryRepository
reportoriginalsurgeryRepository
;
private
readonly
PerforReportoriginalsurgeryRepository
reportoriginalsurgeryRepository
;
private
readonly
PerforReportoriginalstaysRepository
reportoriginalstaysRepository
;
private
readonly
PerforReportoriginalstaysRepository
reportoriginalstaysRepository
;
private
readonly
PerforReportoriginalpersontimeRepository
reportoriginalpersontimeRepository
;
private
readonly
PerforReportoriginalpersontimeRepository
reportoriginalpersontimeRepository
;
private
readonly
PerforPerdeptdicRepository
perdeptdicRepository
;
public
HistoryService
(
public
HistoryService
(
ILogger
<
EmployeeService
>
logger
,
ILogger
<
EmployeeService
>
logger
,
PerforReportoriginalsurgeryRepository
reportoriginalsurgeryRepository
,
PerforReportoriginalsurgeryRepository
reportoriginalsurgeryRepository
,
PerforReportoriginalstaysRepository
reportoriginalstaysRepository
,
PerforReportoriginalstaysRepository
reportoriginalstaysRepository
,
PerforReportoriginalpersontimeRepository
reportoriginalpersontimeRepository
)
PerforReportoriginalpersontimeRepository
reportoriginalpersontimeRepository
,
PerforPerdeptdicRepository
perdeptdicRepository
)
{
{
this
.
logger
=
logger
;
this
.
logger
=
logger
;
this
.
reportoriginalsurgeryRepository
=
reportoriginalsurgeryRepository
;
this
.
reportoriginalsurgeryRepository
=
reportoriginalsurgeryRepository
;
this
.
reportoriginalstaysRepository
=
reportoriginalstaysRepository
;
this
.
reportoriginalstaysRepository
=
reportoriginalstaysRepository
;
this
.
reportoriginalpersontimeRepository
=
reportoriginalpersontimeRepository
;
this
.
reportoriginalpersontimeRepository
=
reportoriginalpersontimeRepository
;
this
.
perdeptdicRepository
=
perdeptdicRepository
;
}
}
public
void
ImportHistoryData
(
int
hospitalid
,
string
path
)
public
void
ImportHistoryData
(
int
hospitalid
,
string
path
)
{
{
...
@@ -80,9 +83,9 @@ private List<HistoryData> ReadExcelData(int hospitalid, string path)
...
@@ -80,9 +83,9 @@ private List<HistoryData> ReadExcelData(int hospitalid, string path)
var
entities
=
new
List
<
HistoryData
>();
var
entities
=
new
List
<
HistoryData
>();
var
config
=
new
[]
var
config
=
new
[]
{
{
new
{
sheetName
=
"工作量"
,
columnNames
=
new
string
[]
{
"年份"
,
"月份"
,
"来源"
,
"
核算单元"
,
"
科室"
,
"数量"
}
},
new
{
sheetName
=
"工作量"
,
columnNames
=
new
string
[]
{
"年份"
,
"月份"
,
"来源"
,
"科室"
,
"数量"
}
},
new
{
sheetName
=
"手术量"
,
columnNames
=
new
string
[]
{
"年份"
,
"月份"
,
"来源"
,
"
核算单元"
,
"
科室"
,
"数量"
}
},
new
{
sheetName
=
"手术量"
,
columnNames
=
new
string
[]
{
"年份"
,
"月份"
,
"来源"
,
"科室"
,
"数量"
}
},
new
{
sheetName
=
"住院天数"
,
columnNames
=
new
string
[]
{
"年份"
,
"月份"
,
"来源"
,
"
核算单元"
,
"
科室"
,
"数量"
}
},
new
{
sheetName
=
"住院天数"
,
columnNames
=
new
string
[]
{
"年份"
,
"月份"
,
"来源"
,
"科室"
,
"数量"
}
},
};
};
IWorkbook
workbook
=
null
;
IWorkbook
workbook
=
null
;
...
@@ -140,13 +143,29 @@ private List<HistoryData> ReadExcelData(int hospitalid, string path)
...
@@ -140,13 +143,29 @@ private List<HistoryData> ReadExcelData(int hospitalid, string path)
Year
=
ConvertHelper
.
To
<
int
>(
row
.
GetCell
(
dict
[
"年份"
]).
GetValue
()),
Year
=
ConvertHelper
.
To
<
int
>(
row
.
GetCell
(
dict
[
"年份"
]).
GetValue
()),
Month
=
ConvertHelper
.
To
<
int
>(
row
.
GetCell
(
dict
[
"月份"
]).
GetValue
()),
Month
=
ConvertHelper
.
To
<
int
>(
row
.
GetCell
(
dict
[
"月份"
]).
GetValue
()),
SourceType
=
row
.
GetCell
(
dict
[
"来源"
]).
GetValue
(),
SourceType
=
row
.
GetCell
(
dict
[
"来源"
]).
GetValue
(),
AccountingUnit
=
row
.
GetCell
(
dict
[
"核算单元"
]).
GetValue
(),
Department
=
row
.
GetCell
(
dict
[
"科室"
]).
GetValue
(),
Department
=
row
.
GetCell
(
dict
[
"科室"
]).
GetValue
(),
ResultData
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
dict
[
"数量"
]).
GetValue
()),
ResultData
=
ConvertHelper
.
To
<
decimal
>(
row
.
GetCell
(
dict
[
"数量"
]).
GetValue
()),
};
};
//if (dict.ContainsKey("核算单元"))
// entity.AccountingUnit = row.GetCell(dict["核算单元"]).GetValue();
entities
.
Add
(
entity
);
entities
.
Add
(
entity
);
}
}
}
}
var
departmentDict
=
perdeptdicRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalid
);
if
(
departmentDict
!=
null
&&
departmentDict
.
Any
())
{
var
unittype
=
EnumHelper
.
GetItems
<
UnitType
>();
entities
.
ForEach
(
t
=>
{
var
accountingUnits
=
departmentDict
.
Where
(
w
=>
w
.
Department
==
t
.
Department
);
if
(
accountingUnits
!=
null
&&
accountingUnits
.
Any
())
{
var
accountingUnit
=
accountingUnits
.
OrderBy
(
o
=>
(
unittype
.
FirstOrDefault
(
f
=>
f
.
Name
==
o
.
UnitType
)?.
Value
)
??
int
.
MaxValue
).
FirstOrDefault
(
f
=>
!
string
.
IsNullOrEmpty
(
f
.
AccountingUnit
))?.
AccountingUnit
;
t
.
AccountingUnit
=
accountingUnit
;
}
});
}
return
entities
;
return
entities
;
}
}
}
}
...
...
performance/Performance.Services/PersonService.cs
View file @
bc0908d8
...
@@ -74,7 +74,7 @@ public void CreateAllotPersons(int hospitalId, int allotId, int prevAllotId = -1
...
@@ -74,7 +74,7 @@ public void CreateAllotPersons(int hospitalId, int allotId, int prevAllotId = -1
if
(
isExist
)
return
;
if
(
isExist
)
return
;
List
<
per_employee
>
persons
=
new
List
<
per_employee
>();
List
<
per_employee
>
persons
=
new
List
<
per_employee
>();
if
(
new
int
[]
{
-
1
,
0
}.
Contains
(
prevAllotId
))
if
(
!
new
int
[]
{
-
1
,
0
}.
Contains
(
prevAllotId
))
{
{
persons
=
peremployeeRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
&&
t
.
AllotId
==
prevAllotId
);
persons
=
peremployeeRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
&&
t
.
AllotId
==
prevAllotId
);
if
(
persons
==
null
||
!
persons
.
Any
())
if
(
persons
==
null
||
!
persons
.
Any
())
...
...
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