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
f6061aaf
Commit
f6061aaf
authored
Apr 14, 2021
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
兼容sheetname就诊
parent
bed6a05a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
10 deletions
+27
-10
performance/Performance.Services/ComputeService.cs
+21
-5
performance/Performance.Services/ExConfigService.cs
+5
-4
performance/Performance.Services/ExtractExcelService/ExtractHelper/ExtractHelper.cs
+1
-1
No files found.
performance/Performance.Services/ComputeService.cs
View file @
f6061aaf
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
using
System.Text.RegularExpressions
;
using
System.Text.RegularExpressions
;
using
Performance.DtoModels.Request
;
using
Performance.DtoModels.Request
;
using
Performance.DtoModels.Response
;
using
Performance.DtoModels.Response
;
using
Performance.Services.ExtractExcelService
;
namespace
Performance.Services
namespace
Performance.Services
{
{
...
@@ -1043,6 +1044,20 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
...
@@ -1043,6 +1044,20 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
var
headers
=
_perforImheaderRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
account
.
AllotID
);
var
headers
=
_perforImheaderRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
account
.
AllotID
);
var
basicData
=
_perforImDataRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
account
.
AllotID
&&
t
.
AccountingUnit
==
account
.
AccountingUnit
);
var
basicData
=
_perforImDataRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
account
.
AllotID
&&
t
.
AccountingUnit
==
account
.
AccountingUnit
);
Func
<
string
,
string
>
getShowKey
=
(
name
)
=>
{
string
_key
=
"开单"
;
if
(
string
.
IsNullOrEmpty
(
name
))
return
_key
;
if
(
name
.
IndexOf
(
"就诊"
)
>
-
1
)
_key
=
"就诊"
;
return
_key
;
};
string
key
=
getShowKey
.
Invoke
(
persheet
.
FirstOrDefault
(
t
=>
t
.
SheetName
.
NoBlank
().
StartsWith
(
"1.1.1"
))?.
SheetName
);
DeptDataDetails
deptDetails
=
new
DeptDataDetails
DeptDataDetails
deptDetails
=
new
DeptDataDetails
{
{
ShowFormula
=
allot
.
ShowFormula
,
ShowFormula
=
allot
.
ShowFormula
,
...
@@ -1050,7 +1065,7 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
...
@@ -1050,7 +1065,7 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
Detail
=
new
List
<
DetailDtos
>()
Detail
=
new
List
<
DetailDtos
>()
};
};
if
(
basicData
==
null
||
!
basicData
.
Any
())
return
MergeDetails
(
deptDetails
);
if
(
basicData
==
null
||
!
basicData
.
Any
())
return
MergeDetails
(
deptDetails
,
key
);
var
sheetType
=
new
List
<
int
>
var
sheetType
=
new
List
<
int
>
{
{
...
@@ -1118,7 +1133,7 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
...
@@ -1118,7 +1133,7 @@ public DeptDataDetails<DetailModuleExtend> DeptDetail(int accountId)
deptDetails
.
Pandect
.
MaterialsExtra
=
deptDetails
.
Detail
?.
FirstOrDefault
(
w
=>
w
.
OriginalType
==
(
int
)
SheetType
.
AccountMaterialsAssess
)?.
Amount
??
deptDetails
.
Pandect
.
MaterialsExtra
;
deptDetails
.
Pandect
.
MaterialsExtra
=
deptDetails
.
Detail
?.
FirstOrDefault
(
w
=>
w
.
OriginalType
==
(
int
)
SheetType
.
AccountMaterialsAssess
)?.
Amount
??
deptDetails
.
Pandect
.
MaterialsExtra
;
deptDetails
.
Pandect
.
MedicineExtra
=
deptDetails
.
Detail
?.
FirstOrDefault
(
w
=>
w
.
OriginalType
==
(
int
)
SheetType
.
AccountDrugAssess
)?.
Amount
??
deptDetails
.
Pandect
.
MedicineExtra
;
deptDetails
.
Pandect
.
MedicineExtra
=
deptDetails
.
Detail
?.
FirstOrDefault
(
w
=>
w
.
OriginalType
==
(
int
)
SheetType
.
AccountDrugAssess
)?.
Amount
??
deptDetails
.
Pandect
.
MedicineExtra
;
return
MergeDetails
(
deptDetails
);
return
MergeDetails
(
deptDetails
,
key
);
//return deptDetails;
//return deptDetails;
}
}
...
@@ -1243,7 +1258,7 @@ private List<DetailModule> CommonDetailItems(List<im_data> basicData, List<im_he
...
@@ -1243,7 +1258,7 @@ private List<DetailModule> CommonDetailItems(List<im_data> basicData, List<im_he
return
items
;
return
items
;
}
}
private
DeptDataDetails
<
DetailModuleExtend
>
MergeDetails
(
DeptDataDetails
details
)
private
DeptDataDetails
<
DetailModuleExtend
>
MergeDetails
(
DeptDataDetails
details
,
string
key
)
{
{
if
(
details
==
null
)
return
new
DeptDataDetails
<
DetailModuleExtend
>();
if
(
details
==
null
)
return
new
DeptDataDetails
<
DetailModuleExtend
>();
...
@@ -1256,6 +1271,7 @@ private DeptDataDetails<DetailModuleExtend> MergeDetails(DeptDataDetails details
...
@@ -1256,6 +1271,7 @@ private DeptDataDetails<DetailModuleExtend> MergeDetails(DeptDataDetails details
if
(
details
.
Detail
==
null
||
!
details
.
Detail
.
Any
(
t
=>
t
.
IncomeType
==
1
))
return
result
;
if
(
details
.
Detail
==
null
||
!
details
.
Detail
.
Any
(
t
=>
t
.
IncomeType
==
1
))
return
result
;
string
[]
sheetNameKeys
=
new
string
[]
{
"就诊"
,
"开单"
};
foreach
(
var
groupbasis
in
details
.
Detail
.
Select
(
t
=>
t
.
GroupBasis
).
Distinct
())
foreach
(
var
groupbasis
in
details
.
Detail
.
Select
(
t
=>
t
.
GroupBasis
).
Distinct
())
{
{
var
items
=
new
List
<
DetailModuleExtend
>();
var
items
=
new
List
<
DetailModuleExtend
>();
...
@@ -1267,7 +1283,7 @@ private DeptDataDetails<DetailModuleExtend> MergeDetails(DeptDataDetails details
...
@@ -1267,7 +1283,7 @@ private DeptDataDetails<DetailModuleExtend> MergeDetails(DeptDataDetails details
{
{
depts
.
AddRange
(
t
.
Items
.
Select
(
o
=>
o
.
ItemName
));
depts
.
AddRange
(
t
.
Items
.
Select
(
o
=>
o
.
ItemName
));
});
});
var
billing
=
data
.
FirstOrDefault
(
t
=>
t
.
ItemName
.
Replace
(
"就诊"
,
"开单"
).
IndexOf
(
"开单"
)
>
-
1
);
var
billing
=
data
.
FirstOrDefault
(
t
=>
t
.
ItemName
.
IndexOf
(
key
)
>
-
1
);
var
execute
=
data
.
FirstOrDefault
(
t
=>
t
.
ItemName
.
IndexOf
(
"执行"
)
>
-
1
);
var
execute
=
data
.
FirstOrDefault
(
t
=>
t
.
ItemName
.
IndexOf
(
"执行"
)
>
-
1
);
foreach
(
var
dept
in
depts
.
Distinct
().
OrderBy
(
t
=>
t
))
foreach
(
var
dept
in
depts
.
Distinct
().
OrderBy
(
t
=>
t
))
{
{
...
@@ -1316,7 +1332,7 @@ private DeptDataDetails<DetailModuleExtend> MergeDetails(DeptDataDetails details
...
@@ -1316,7 +1332,7 @@ private DeptDataDetails<DetailModuleExtend> MergeDetails(DeptDataDetails details
result
.
Detail
.
Add
(
new
DetailDtos
<
DetailModuleExtend
>
result
.
Detail
.
Add
(
new
DetailDtos
<
DetailModuleExtend
>
{
{
ItemName
=
data
.
FirstOrDefault
(
t
=>
t
.
ItemName
.
IndexOf
(
"执行"
)
>
-
1
)
is
null
?
data
.
First
().
ItemName
:
ItemName
=
data
.
FirstOrDefault
(
t
=>
t
.
ItemName
.
IndexOf
(
"执行"
)
>
-
1
)
is
null
?
data
.
First
().
ItemName
:
data
.
FirstOrDefault
(
t
=>
t
.
ItemName
.
IndexOf
(
"执行"
)
>
-
1
).
ItemName
?.
Replace
(
"执行"
,
"开单
/执行"
),
data
.
FirstOrDefault
(
t
=>
t
.
ItemName
.
IndexOf
(
"执行"
)
>
-
1
).
ItemName
?.
Replace
(
"执行"
,
$"
{
key
}
/执行"
),
IncomeType
=
data
.
First
()?.
IncomeType
??
0
,
IncomeType
=
data
.
First
()?.
IncomeType
??
0
,
OriginalType
=
data
.
First
()?.
OriginalType
??
0
,
OriginalType
=
data
.
First
()?.
OriginalType
??
0
,
Amount
=
data
.
Sum
(
w
=>
w
.
Amount
),
Amount
=
data
.
Sum
(
w
=>
w
.
Amount
),
...
...
performance/Performance.Services/ExConfigService.cs
View file @
f6061aaf
...
@@ -72,6 +72,7 @@ public List<ex_module> QueryModule(int hospitalId)
...
@@ -72,6 +72,7 @@ public List<ex_module> QueryModule(int hospitalId)
DefaultModules
(
hospitalId
);
DefaultModules
(
hospitalId
);
var
list
=
exmoduleRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
).
OrderBy
(
t
=>
t
.
ModuleName
).
ToList
();
var
list
=
exmoduleRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
).
OrderBy
(
t
=>
t
.
ModuleName
).
ToList
();
list
?.
ForEach
(
t
=>
t
.
ReadOnly
=
t
.
SheetType
==
(
int
)
SheetType
.
Income
?
0
:
1
);
return
list
;
return
list
;
}
}
...
@@ -90,7 +91,7 @@ private void DefaultModules(int hospitalId)
...
@@ -90,7 +91,7 @@ private void DefaultModules(int hospitalId)
};
};
var
data
=
exmoduleRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
);
var
data
=
exmoduleRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
);
var
inexistence
=
data
==
null
?
moduleList
:
moduleList
.
Where
(
t
=>
!
data
.
Select
(
p
=>
p
.
ModuleName
).
ToArray
().
Contains
(
t
.
ModuleName
));
var
inexistence
=
data
==
null
?
moduleList
:
moduleList
.
Where
(
t
=>
!
data
.
Any
(
w
=>
w
.
ModuleName
.
StartsWith
(
t
.
ModuleName
.
Split
(
' '
)[
0
])
));
if
(
inexistence
!=
null
&&
inexistence
.
Any
())
if
(
inexistence
!=
null
&&
inexistence
.
Any
())
{
{
...
@@ -102,7 +103,7 @@ private void DefaultModules(int hospitalId)
...
@@ -102,7 +103,7 @@ private void DefaultModules(int hospitalId)
HospitalId
=
hospitalId
,
HospitalId
=
hospitalId
,
ModuleName
=
item
.
ModuleName
,
ModuleName
=
item
.
ModuleName
,
SheetType
=
(
int
)
item
.
SheetType
,
SheetType
=
(
int
)
item
.
SheetType
,
ReadOnly
=
1
,
ReadOnly
=
item
.
SheetType
==
(
int
)
SheetType
.
Income
?
0
:
1
,
TypeId
=
null
,
TypeId
=
null
,
};
};
modules
.
Add
(
module
);
modules
.
Add
(
module
);
...
@@ -121,7 +122,7 @@ public ex_module AddModule(ModModuleRequest request)
...
@@ -121,7 +122,7 @@ public ex_module AddModule(ModModuleRequest request)
if
(
request
.
SheetType
==
(
int
)
SheetType
.
Income
)
if
(
request
.
SheetType
==
(
int
)
SheetType
.
Income
)
{
{
string
[]
array
=
new
string
[]
{
"开单收入"
,
"执行收入"
};
string
[]
array
=
new
string
[]
{
"开单收入"
,
"执行收入"
};
if
(
request
.
ModuleName
.
IndexOf
(
"开单收入"
)
==
-
1
&&
request
.
ModuleName
.
IndexOf
(
"执行收入"
)
==
-
1
)
if
(
request
.
ModuleName
.
IndexOf
(
"开单收入"
)
==
-
1
&&
request
.
ModuleName
.
IndexOf
(
"
就诊收入"
)
==
-
1
&&
request
.
ModuleName
.
IndexOf
(
"
执行收入"
)
==
-
1
)
throw
new
PerformanceException
(
"模块名称规则错误"
);
throw
new
PerformanceException
(
"模块名称规则错误"
);
//if (!Regex.IsMatch(request.ModuleName, @"^[\u4e00-\u9fa5]+$"))
//if (!Regex.IsMatch(request.ModuleName, @"^[\u4e00-\u9fa5]+$"))
// throw new PerformanceException("模块名称规则错误,请使用全中文命名");
// throw new PerformanceException("模块名称规则错误,请使用全中文命名");
...
@@ -132,7 +133,7 @@ public ex_module AddModule(ModModuleRequest request)
...
@@ -132,7 +133,7 @@ public ex_module AddModule(ModModuleRequest request)
throw
new
PerformanceException
(
"绩效模板已存在!"
);
throw
new
PerformanceException
(
"绩效模板已存在!"
);
var
moduleList
=
exmoduleRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
request
.
HospitalId
&&
t
.
ModuleName
.
IndexOf
(
"1."
)
!=
-
1
);
var
moduleList
=
exmoduleRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
request
.
HospitalId
&&
t
.
ModuleName
.
IndexOf
(
"1."
)
!=
-
1
);
string
name
=
request
.
ModuleName
.
Replace
(
"开单收入"
,
""
).
Replace
(
"执行收入"
,
""
);
string
name
=
request
.
ModuleName
.
Replace
(
"开单收入"
,
""
).
Replace
(
"
就诊收入"
,
""
).
Replace
(
"
执行收入"
,
""
);
var
exist
=
moduleList
.
Where
(
t
=>
t
.
ModuleName
.
Contains
(
name
));
var
exist
=
moduleList
.
Where
(
t
=>
t
.
ModuleName
.
Contains
(
name
));
if
(
exist
!=
null
&&
exist
.
Any
())
if
(
exist
!=
null
&&
exist
.
Any
())
{
{
...
...
performance/Performance.Services/ExtractExcelService/ExtractHelper/ExtractHelper.cs
View file @
f6061aaf
...
@@ -57,7 +57,7 @@ public static void CreateNotExistSheet(List<ex_module> modulesList, IWorkbook wo
...
@@ -57,7 +57,7 @@ public static void CreateNotExistSheet(List<ex_module> modulesList, IWorkbook wo
var
sheet
=
workbook
.
GetSheet
(
module
.
ModuleName
)
??
workbook
.
GetSheet
(
module
.
ModuleName
.
NoBlank
());
var
sheet
=
workbook
.
GetSheet
(
module
.
ModuleName
)
??
workbook
.
GetSheet
(
module
.
ModuleName
.
NoBlank
());
if
(
sheet
==
null
)
if
(
sheet
==
null
)
{
{
string
[]
keyArray
=
new
string
[]
{
"开单"
,
"执行"
};
string
[]
keyArray
=
new
string
[]
{
"开单"
,
"
就诊"
,
"
执行"
};
if
(
keyArray
.
Any
(
key
=>
module
.
ModuleName
.
Contains
(
key
)))
if
(
keyArray
.
Any
(
key
=>
module
.
ModuleName
.
Contains
(
key
)))
{
{
var
item
=
pairs
.
Where
(
t
=>
t
.
Key
.
StartsWith
(
"1."
)).
OrderByDescending
(
t
=>
t
.
Key
).
First
();
var
item
=
pairs
.
Where
(
t
=>
t
.
Key
.
StartsWith
(
"1."
)).
OrderByDescending
(
t
=>
t
.
Key
).
First
();
...
...
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