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
e61d2e75
Commit
e61d2e75
authored
Feb 24, 2020
by
zry
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/dongfang' of
http://192.168.18.110:8880/zry/performance
into feature/dongfang
parents
e4f4af82
d34e5db6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
30 deletions
+36
-30
performance/Performance.Services/DFExtractService.cs
+16
-10
performance/Performance.Services/NewExtractService.cs
+20
-20
No files found.
performance/Performance.Services/DFExtractService.cs
View file @
e61d2e75
...
...
@@ -248,7 +248,7 @@ public string AlllotExecute(string email, per_allot lastAllot, sys_hospital hosp
break
;
case
SheetType
.
SpecialUnit
:
ClearData
(
sheet
,
2
);
WriteSpecialUnit
(
sheet
,
sheetRead
,
configs
,
specials
,
extracts
,
false
);
WriteSpecialUnit
(
sheet
,
sheetRead
,
configs
,
specials
,
extracts
,
false
,
lastAllot
);
break
;
}
}
...
...
@@ -596,20 +596,24 @@ private void WriteWorkload(ISheet sheet, IPerSheetDataRead sheetRead, List<Accou
#
endregion
private
void
WriteSpecialUnit
(
ISheet
sheet
,
IPerSheetDataRead
sheetRead
,
List
<
sys_hospitalconfig
>
configs
,
List
<
mod_special
>
specials
,
List
<
mod_extract
>
extracts
,
bool
IsWriteHead
=
true
)
private
void
WriteSpecialUnit
(
ISheet
sheet
,
IPerSheetDataRead
sheetRead
,
List
<
sys_hospitalconfig
>
configs
,
List
<
mod_special
>
specials
,
List
<
mod_extract
>
extracts
,
bool
IsWriteHead
=
true
,
per_allot
lastAllot
=
null
)
{
var
dictionary
=
new
Dictionary
<
string
,
Func
<
mod_special
,
List
<
ExtractDto
>,
object
>>
var
dictionary
=
new
Dictionary
<
string
,
Func
<
mod_special
,
List
<
im_specialunit
>,
object
>>
{
{
"科室"
,
(
special
,
last
A
llot
)
=>
special
.
Department
},
{
"人数"
,
(
special
,
last
Allot
)
=>
lastAllot
.
Where
(
t
=>
special
.
Department
==
t
.
Department
).
Sum
(
t
=>
t
.
Value
)
},
{
"量化指标"
,
(
special
,
last
A
llot
)
=>
special
.
Target
},
{
"量化指标绩效分值"
,(
special
,
last
A
llot
)
=>
special
.
TargetFactor
},
{
"调节系数"
,
(
special
,
last
A
llot
)
=>
special
.
AdjustFactor
},
{
"科室"
,
(
special
,
last
a
llot
)
=>
special
.
Department
},
{
"人数"
,
(
special
,
last
allot
)
=>
lastallot
.
Where
(
t
=>
special
.
Department
==
t
.
Department
).
Sum
(
t
=>
t
.
Number
)
},
{
"量化指标"
,
(
special
,
last
a
llot
)
=>
special
.
Target
},
{
"量化指标绩效分值"
,(
special
,
last
a
llot
)
=>
special
.
TargetFactor
},
{
"调节系数"
,
(
special
,
last
a
llot
)
=>
special
.
AdjustFactor
},
};
var
speaialList
=
specials
?.
OrderBy
(
t
=>
t
.
Department
).
ToList
();
if
(
speaialList
==
null
||
!
speaialList
.
Any
())
return
;
List
<
im_specialunit
>
allotDataList
=
new
List
<
im_specialunit
>();
if
(
lastAllot
!=
null
)
allotDataList
=
perforImspecialunitRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
lastAllot
.
ID
);
//查询数据
var
extractIdList
=
speaialList
.
Select
(
t
=>
t
.
ExtractId
).
Distinct
().
ToList
();
var
extractList
=
extracts
.
Where
(
t
=>
extractIdList
.
Contains
(
t
.
Id
)).
ToList
();
...
...
@@ -668,7 +672,7 @@ private void WriteSpecialUnit(ISheet sheet, IPerSheetDataRead sheetRead, List<sy
if
(
dictionary
.
ContainsKey
(
cell
.
StringCellValue
))
{
var
item
=
dictionary
.
First
(
t
=>
t
.
Key
==
cell
.
StringCellValue
);
value
=
item
.
Value
.
Invoke
(
speaialList
[
i
],
all
Extrac
t
)
??
""
;
value
=
item
.
Value
.
Invoke
(
speaialList
[
i
],
all
otDataLis
t
)
??
""
;
if
(
item
.
Key
==
"科室"
&&
rowIndex
==
mergedBegin
)
{
...
...
@@ -676,6 +680,8 @@ private void WriteSpecialUnit(ISheet sheet, IPerSheetDataRead sheetRead, List<sy
mergedEnd
=
mergedBegin
+
count
-
1
;
}
}
if
(
cell
.
StringCellValue
==
"数量"
)
value
=
allExtract
.
FirstOrDefault
(
t
=>
t
.
Category
==
speaialList
[
i
].
Target
&&
t
.
Department
==
speaialList
[
i
].
Department
)?.
Value
;
if
(!
new
List
<
string
>
{
"量化指标"
,
"数量"
,
"量化指标绩效分值"
}.
Contains
(
cell
.
StringCellValue
)
&&
rowIndex
==
mergedBegin
)
{
...
...
@@ -686,7 +692,7 @@ private void WriteSpecialUnit(ISheet sheet, IPerSheetDataRead sheetRead, List<sy
var
newCell
=
importRow
.
CreateCell
(
cellIndex
);
//newCell.SetCellValue(Verify(value));
OutToExcelCell
(
newCell
,
value
);
if
(
dictionary
.
ContainsKey
(
cell
.
StringCellValue
))
if
(
dictionary
.
ContainsKey
(
cell
.
StringCellValue
)
||
cell
.
StringCellValue
==
"数量"
)
newCell
.
CellStyle
=
style
;
cellIndex
++;
...
...
performance/Performance.Services/NewExtractService.cs
View file @
e61d2e75
...
...
@@ -135,29 +135,29 @@ public string ExtractData(int allotId, string email, int hospitalId)
var
sheetRead
=
PerSheetDataFactory
.
GetDataRead
(
sheetType
);
switch
(
sheetType
)
{
//
case SheetType.Employee:
//
if (allotLast != null)
//
WriteEmployee(sheet, allotLast.ID, sheetRead);
//
break;
//
case SheetType.AccountBasic:
//
if (allotLast != null)
//
WriteAccountBasic(sheet, allotLast.ID, sheetRead);
//
break;
case
SheetType
.
Employee
:
if
(
allotLast
!=
null
)
WriteEmployee
(
sheet
,
allotLast
.
ID
,
sheetRead
);
break
;
case
SheetType
.
AccountBasic
:
if
(
allotLast
!=
null
)
WriteAccountBasic
(
sheet
,
allotLast
.
ID
,
sheetRead
);
break
;
case
SheetType
.
SpecialUnit
:
WriteSpecialUnit
(
sheet
,
hospital
.
ID
,
allot
,
sheetRead
,
hospitalConfigList
);
break
;
//
case SheetType.Income:
//
WriteIncome(sheet, hospital.ID, unitList, sheetRead, allot, modulesList, hospitalConfigList);
//
break;
//
case SheetType.OtherIncome:
//
WriteOtherIncome(sheet, hospital.ID, unitList, sheetRead, allot, modulesList, hospitalConfigList);
//
break;
//
case SheetType.Expend:
//
WriteExpend(sheet, hospital.ID, sheetRead);
//
break;
//
case SheetType.Workload:
//
WriteWorkload(sheet, hospital.ID, unitList, sheetRead, allot, modulesList, hospitalConfigList);
//
break;
case
SheetType
.
Income
:
WriteIncome
(
sheet
,
hospital
.
ID
,
unitList
,
sheetRead
,
allot
,
modulesList
,
hospitalConfigList
);
break
;
case
SheetType
.
OtherIncome
:
WriteOtherIncome
(
sheet
,
hospital
.
ID
,
unitList
,
sheetRead
,
allot
,
modulesList
,
hospitalConfigList
);
break
;
case
SheetType
.
Expend
:
WriteExpend
(
sheet
,
hospital
.
ID
,
sheetRead
);
break
;
case
SheetType
.
Workload
:
WriteWorkload
(
sheet
,
hospital
.
ID
,
unitList
,
sheetRead
,
allot
,
modulesList
,
hospitalConfigList
);
break
;
}
}
using
(
FileStream
file
=
new
FileStream
(
newPath
,
FileMode
.
OpenOrCreate
))
...
...
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