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
d9ce261a
Commit
d9ce261a
authored
Aug 06, 2019
by
李承祥
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/extract' of
http://192.168.18.110:8880/zry/performance
into feature/extract
parents
f5b6c8d5
f74a4698
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
40 deletions
+20
-40
performance/Performance.Api/wwwroot/Performance.Api.xml
+7
-0
performance/Performance.DtoModels/AutoMapper/AutoMapperConfigs.cs
+1
-1
performance/Performance.Services/AllotCompute/CheckDataService.cs
+8
-34
performance/Performance.Services/ModExtractService.cs
+3
-4
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadIncome.cs
+1
-1
No files found.
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
d9ce261a
...
@@ -673,6 +673,13 @@
...
@@ -673,6 +673,13 @@
<param
name=
"request"
></param>
<param
name=
"request"
></param>
<returns></returns>
<returns></returns>
</member>
</member>
<member
name=
"M:Performance.Api.Controllers.TemplateController.NewExtractData(Performance.DtoModels.ExtractRequest)"
>
<summary>
提取绩效数据
</summary>
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.TemplateController.DownFile(Performance.DtoModels.AllotRequest)"
>
<member
name=
"M:Performance.Api.Controllers.TemplateController.DownFile(Performance.DtoModels.AllotRequest)"
>
<summary>
<summary>
从WebAPI下载文件
从WebAPI下载文件
...
...
performance/Performance.DtoModels/AutoMapper/AutoMapperConfigs.cs
View file @
d9ce261a
...
@@ -108,7 +108,7 @@ public AutoMapperConfigs()
...
@@ -108,7 +108,7 @@ public AutoMapperConfigs()
//CreateMap<PerDataAccountBaisc, im_accountbasic>();
//CreateMap<PerDataAccountBaisc, im_accountbasic>();
//CreateMap<im_accountbasic, PerDataAccountBaisc>();
//CreateMap<im_accountbasic, PerDataAccountBaisc>();
CreateMap
<
PerDataAccountBaisc
,
im_accountbasic
>()
CreateMap
<
PerDataAccountBaisc
,
im_accountbasic
>()
.
ForMember
(
dest
=>
dest
.
UnitType
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
UnitTyp
e
))
.
ForMember
(
dest
=>
dest
.
UnitType
,
opt
=>
opt
.
MapFrom
(
src
=>
EnumHelper
.
GetItems
<
UnitType
>().
First
(
t
=>
t
.
Name
==
src
.
UnitType
).
Valu
e
))
.
ForMember
(
dest
=>
dest
.
DoctorAccountingUnit
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
AccountingUnit
))
.
ForMember
(
dest
=>
dest
.
DoctorAccountingUnit
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
AccountingUnit
))
.
ForMember
(
dest
=>
dest
.
Department
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
Department
))
.
ForMember
(
dest
=>
dest
.
Department
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
Department
))
.
ForMember
(
dest
=>
dest
.
DoctorDirectorNumber
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
ManagerNumber
))
.
ForMember
(
dest
=>
dest
.
DoctorDirectorNumber
,
opt
=>
opt
.
MapFrom
(
src
=>
src
.
ManagerNumber
))
...
...
performance/Performance.Services/AllotCompute/CheckDataService.cs
View file @
d9ce261a
...
@@ -97,41 +97,15 @@ public bool Discern(PerExcel excel, per_allot allot)
...
@@ -97,41 +97,15 @@ public bool Discern(PerExcel excel, per_allot allot)
.
Select
(
t
=>
t
.
CellName
).
Distinct
().
ToList
();
.
Select
(
t
=>
t
.
CellName
).
Distinct
().
ToList
();
if
(
headerCheck
!=
null
)
if
(
headerCheck
!=
null
)
{
{
if
((
int
)
sheet
.
SheetType
==
4
)
var
list
=
cellValue
.
Intersect
(
headerCheck
).
ToList
();
//求交集,提交的列头和数据库中保存的列头
var
drugtype
=
perforCofdrugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
if
(
drugtype
!=
null
&&
drugtype
.
Count
>
0
)
list
=
list
.
Union
(
drugtype
.
Select
(
t
=>
t
.
Charge
)).
ToList
();
//药占比的类型
var
lack
=
headerCheck
.
Except
(
list
).
ToList
();
//求差集,数据库中列头与交集
if
(
lack
.
Count
>
0
)
{
{
string
str
=
sheet
.
SheetName
.
Contains
(
"医生组"
)
?
"医生组"
:
"护理组"
;
flag
=
false
;
var
filter
=
new
List
<
string
>()
{
$"核算单元(
{
str
}
)"
,
"科室名称"
};
message
=
$"
{
sheet
.
SheetName
}
-- 列头不规范,缺少列头或命名不规范:“
{
String
.
Join
(
"、"
,
lack
.
ToArray
())}
”不存在;"
;
var
list
=
cellValue
.
Intersect
(
filter
).
ToList
();
//求交集
if
(
list
==
null
)
{
message
=
$"
{
sheet
.
SheetName
}
-- 列头不规范,缺少列头或命名不规范:“核算单元(
{
str
}
)、科室名称”不存在;"
;
flag
=
false
;
}
else
if
(!
cellValue
.
Contains
(
$"核算单元(
{
str
}
)"
))
{
message
=
$"
{
sheet
.
SheetName
}
-- 列头不规范,缺少列头或命名不规范:“核算单元(
{
str
}
)”不存在;"
;
flag
=
false
;
}
else
if
(!
cellValue
.
Contains
(
"科室名称"
))
{
message
=
$"
{
sheet
.
SheetName
}
-- 列头不规范,缺少列头或命名不规范:“科室名称”不存在;"
;
flag
=
false
;
}
}
else
{
var
list
=
cellValue
.
Intersect
(
headerCheck
).
ToList
();
//求交集,提交的列头和数据库中保存的列头
var
drugtype
=
perforCofdrugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
if
(
drugtype
!=
null
&&
drugtype
.
Count
>
0
)
list
=
list
.
Union
(
drugtype
.
Select
(
t
=>
t
.
Charge
)).
ToList
();
//药占比的类型
var
lack
=
headerCheck
.
Except
(
list
).
ToList
();
//求差集,数据库中列头与交集
if
(
lack
.
Count
>
0
)
{
flag
=
false
;
message
=
$"
{
sheet
.
SheetName
}
-- 列头不规范,缺少列头或命名不规范:“
{
String
.
Join
(
"、"
,
lack
.
ToArray
())}
”不存在;"
;
}
}
}
if
(!
flag
)
if
(!
flag
)
result
=
false
;
result
=
false
;
...
...
performance/Performance.Services/ModExtractService.cs
View file @
d9ce261a
...
@@ -43,7 +43,7 @@ public List<TitleValue> ExtractScheme(int hospitalId, List<int> executeType)
...
@@ -43,7 +43,7 @@ public List<TitleValue> ExtractScheme(int hospitalId, List<int> executeType)
var
titlevalue
=
new
List
<
TitleValue
>();
var
titlevalue
=
new
List
<
TitleValue
>();
var
list
=
perforModextractRepository
.
GetEntities
(
t
=>
(
t
.
HospitalId
==
hospitalId
||
t
.
HospitalId
==
null
)
&&
executeType
.
Contains
(
t
.
ExecuteType
.
Value
));
var
list
=
perforModextractRepository
.
GetEntities
(
t
=>
(
t
.
HospitalId
==
hospitalId
||
t
.
HospitalId
==
null
)
&&
executeType
.
Contains
(
t
.
ExecuteType
.
Value
));
if
(
list
!=
null
&&
list
.
Any
())
if
(
list
!=
null
&&
list
.
Any
())
titlevalue
=
list
.
Select
(
t
=>
new
TitleValue
{
Title
=
string
.
IsNullOrEmpty
(
t
.
Description
)
?
t
.
EName
:
$"
{
t
.
EName
}
(
{
t
.
Description
}
)"
,
Value
=
t
.
Id
.
ToString
()
}).
OrderBy
(
t
=>
t
.
Title
).
ToList
();
titlevalue
=
list
.
OrderBy
(
t
=>
t
.
EName
).
Select
(
t
=>
new
TitleValue
{
Title
=
string
.
IsNullOrEmpty
(
t
.
Description
)
?
t
.
EName
:
$"
{
t
.
EName
}
(
{
t
.
Description
}
)"
,
Value
=
t
.
Id
.
ToString
()
}).
OrderBy
(
t
=>
t
.
Title
).
ToList
();
return
titlevalue
;
return
titlevalue
;
}
}
...
@@ -140,7 +140,6 @@ public List<mod_module> Module(int hospitalId)
...
@@ -140,7 +140,6 @@ public List<mod_module> Module(int hospitalId)
/// <param name="hospitalId"></param>
/// <param name="hospitalId"></param>
private
void
AddModule
(
int
hospitalId
)
private
void
AddModule
(
int
hospitalId
)
{
{
var
extractList
=
perforModextractRepository
.
GetEntities
(
t
=>
t
.
IsEnable
==
1
&&
t
.
ExecuteType
==
1
);
var
moduleList
=
new
mod_module
[]
var
moduleList
=
new
mod_module
[]
{
{
new
mod_module
{
ModuleName
=
"1.0.1 额外收入"
,
SheetType
=
(
int
)
SheetType
.
OtherIncome
},
new
mod_module
{
ModuleName
=
"1.0.1 额外收入"
,
SheetType
=
(
int
)
SheetType
.
OtherIncome
},
...
@@ -236,7 +235,7 @@ public void DelModule(int moduleId)
...
@@ -236,7 +235,7 @@ public void DelModule(int moduleId)
public
List
<
mod_item
>
Items
(
int
moduleId
)
public
List
<
mod_item
>
Items
(
int
moduleId
)
{
{
var
list
=
perforModitemRepository
.
GetEntities
(
t
=>
t
.
ModuleId
==
moduleId
);
var
list
=
perforModitemRepository
.
GetEntities
(
t
=>
t
.
ModuleId
==
moduleId
);
return
list
?.
OrderBy
(
t
=>
t
.
I
temName
).
ToList
();
return
list
?.
OrderBy
(
t
=>
t
.
I
d
).
ToList
();
}
}
/// <summary>
/// <summary>
...
@@ -427,7 +426,7 @@ public void AddItems(int moduleId)
...
@@ -427,7 +426,7 @@ public void AddItems(int moduleId)
{
{
var
hospitalConfig
=
configList
.
First
();
var
hospitalConfig
=
configList
.
First
();
var
connection
=
ConnectionBuilder
.
Create
(
DatabaseType
.
SqlServer
,
hospitalConfig
.
DbSource
,
hospitalConfig
.
DbName
,
hospitalConfig
.
DbUser
,
hospitalConfig
.
DbPassword
);
var
connection
=
ConnectionBuilder
.
Create
(
DatabaseType
.
SqlServer
,
hospitalConfig
.
DbSource
,
hospitalConfig
.
DbName
,
hospitalConfig
.
DbUser
,
hospitalConfig
.
DbPassword
);
string
sql
=
"SELECT ITEM_TYPE FROM dbo.DIC_FEE GROUP BY ITEM_TYPE;"
;
string
sql
=
"SELECT ITEM_TYPE FROM dbo.DIC_FEE GROUP BY ITEM_TYPE
ORDER BY ITEM_TYPE
;"
;
var
dataList
=
perforExtractRepository
.
ExecuteScript
(
connection
,
sql
,
null
);
var
dataList
=
perforExtractRepository
.
ExecuteScript
(
connection
,
sql
,
null
);
if
(
dataList
!=
null
&&
dataList
.
Any
())
if
(
dataList
!=
null
&&
dataList
.
Any
())
{
{
...
...
performance/Performance.Services/PerExcelService/SheetDataRead/PerSheetDataReadIncome.cs
View file @
d9ce261a
...
@@ -15,7 +15,7 @@ public class PerSheetDataReadIncome : IPerSheetDataRead
...
@@ -15,7 +15,7 @@ public class PerSheetDataReadIncome : IPerSheetDataRead
{
{
public
PerSheetPoint
Point
=>
new
PerSheetPoint
public
PerSheetPoint
Point
=>
new
PerSheetPoint
{
{
HeaderFirstRowNum
=
1
,
HeaderFirstRowNum
=
4
,
HeaderLastRowNum
=
4
,
HeaderLastRowNum
=
4
,
HeaderFirstCellNum
=
0
,
HeaderFirstCellNum
=
0
,
DataFirstRowNum
=
5
,
DataFirstRowNum
=
5
,
...
...
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