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
9d36c3ff
Commit
9d36c3ff
authored
Aug 02, 2019
by
799284587@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
fb1d4b62
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
26 deletions
+45
-26
performance/Performance.Services/ModExtractService.cs
+45
-26
No files found.
performance/Performance.Services/ModExtractService.cs
View file @
9d36c3ff
...
...
@@ -6,6 +6,7 @@
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Text.RegularExpressions
;
namespace
Performance.Services
{
...
...
@@ -72,10 +73,23 @@ public List<TitleValue> FeeType()
/// <returns></returns>
public
mod_module
AddModule
(
ModModuleRequest
request
)
{
var
data
=
perforModmoduleRepository
.
GetEntity
(
t
=>
t
.
ModuleName
==
request
.
ModuleName
&&
t
.
HospitalId
==
request
.
HospitalId
);
if
(
data
!=
null
)
if
(
request
.
SheetType
!=
(
int
)
SheetType
.
Income
)
throw
new
PerformanceException
(
"模块类型错误,只支持收入模板配置"
);
string
[]
array
=
new
string
[]
{
"就诊收入"
,
"执行收入"
};
if
(
array
.
Any
(
t
=>
!
request
.
ModuleName
.
Contains
(
t
)))
throw
new
PerformanceException
(
"模块名称规则错误"
);
if
(
Regex
.
IsMatch
(
request
.
ModuleName
,
@"^[\u4e00-\u9fa5]+$"
))
throw
new
PerformanceException
(
"模块名称规则错误,请使用全中文命名"
);
var
incomeList
=
perforModmoduleRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
request
.
HospitalId
&&
t
.
SheetType
==
(
int
)
SheetType
.
Income
);
if
(
incomeList
.
Any
(
t
=>
Regex
.
Replace
(
t
.
ModuleName
,
@"\d"
,
""
).
Replace
(
"."
,
""
).
Replace
(
" "
,
""
)
==
request
.
ModuleName
))
throw
new
PerformanceException
(
"绩效模板已存在!"
);
mod_module
entity
=
new
mod_module
{
ModuleName
=
request
.
ModuleName
,
...
...
@@ -100,7 +114,7 @@ public List<mod_module> Module(int hospitalId)
//首次添加费用字典默认值
AddModule
(
hospitalId
);
var
list
=
perforModmoduleRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
);
var
list
=
perforModmoduleRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
)
.
OrderBy
(
t
=>
t
.
ModuleName
).
ToList
()
;
return
list
;
}
...
...
@@ -110,36 +124,41 @@ public List<mod_module> Module(int hospitalId)
/// <param name="hospitalId"></param>
private
void
AddModule
(
int
hospitalId
)
{
var
moduleList
=
new
[]
var
extractList
=
perforModextractRepository
.
GetEntities
(
t
=>
t
.
IsEnable
==
1
&&
t
.
ExecuteType
==
1
);
var
moduleList
=
new
mod_module
[]
{
new
{
ModuleName
=
"额外收入"
,
SheetType
=
SheetType
.
OtherIncome
},
new
{
ModuleName
=
"门诊就诊收入"
,
SheetType
=
SheetType
.
Income
},
new
{
ModuleName
=
"门诊执行收入"
,
SheetType
=
SheetType
.
Income
},
new
{
ModuleName
=
"住院就诊收入"
,
SheetType
=
SheetType
.
Income
},
new
{
ModuleName
=
"住院执行收入"
,
SheetType
=
SheetType
.
Income
},
new
{
ModuleName
=
"成本支出统计表"
,
SheetType
=
SheetType
.
Expend
},
new
{
ModuleName
=
"医生组工作量绩效测算表"
,
SheetType
=
SheetType
.
Workload
},
new
{
ModuleName
=
"护理组工作量绩效测算表"
,
SheetType
=
SheetType
.
Workload
},
new
mod_module
{
ModuleName
=
"1.0.1 额外收入"
,
SheetType
=
(
int
)
SheetType
.
OtherIncome
,
ExtractId
=
null
},
new
mod_module
{
ModuleName
=
"1.1.1 门诊就诊收入"
,
SheetType
=
(
int
)
SheetType
.
Income
,
ExtractId
=
extractList
.
FirstOrDefault
(
t
=>
t
.
EName
==
"门诊就诊收入"
)?.
Id
},
new
mod_module
{
ModuleName
=
"1.1.2 门诊执行收入"
,
SheetType
=
(
int
)
SheetType
.
Income
,
ExtractId
=
extractList
.
FirstOrDefault
(
t
=>
t
.
EName
==
"门诊执行收入"
)?.
Id
},
new
mod_module
{
ModuleName
=
"1.2.1 住院就诊收入"
,
SheetType
=
(
int
)
SheetType
.
Income
,
ExtractId
=
extractList
.
FirstOrDefault
(
t
=>
t
.
EName
==
"住院就诊收入"
)?.
Id
},
new
mod_module
{
ModuleName
=
"1.2.2 住院执行收入"
,
SheetType
=
(
int
)
SheetType
.
Income
,
ExtractId
=
extractList
.
FirstOrDefault
(
t
=>
t
.
EName
==
"住院执行收入"
)?.
Id
},
new
mod_module
{
ModuleName
=
"2.1 成本支出统计表"
,
SheetType
=
(
int
)
SheetType
.
Expend
,
ExtractId
=
null
},
new
mod_module
{
ModuleName
=
"3.1 医生组工作量绩效测算表"
,
SheetType
=
(
int
)
SheetType
.
Workload
,
ExtractId
=
null
},
new
mod_module
{
ModuleName
=
"3.2 护理组工作量绩效测算表"
,
SheetType
=
(
int
)
SheetType
.
Workload
,
ExtractId
=
null
},
};
var
data
=
perforModmoduleRepository
.
GetEntities
(
t
=>
moduleList
.
Select
(
p
=>
p
.
ModuleName
).
Contains
(
t
.
ModuleName
)
&&
t
.
HospitalId
==
hospitalId
);
if
(
data
!=
null
&&
data
.
Any
())
return
;
var
data
=
perforModmoduleRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
);
var
inexistence
=
moduleList
.
Where
(
t
=>
!
data
.
Select
(
p
=>
p
.
ModuleName
).
ToArray
().
Contains
(
t
.
ModuleName
));
List
<
mod_module
>
modules
=
new
List
<
mod_module
>();
foreach
(
var
item
in
moduleList
)
if
(
inexistence
!=
null
&&
inexistence
.
Any
())
{
var
module
=
new
mod_module
List
<
mod_module
>
modules
=
new
List
<
mod_module
>();
foreach
(
var
item
in
inexistence
)
{
HospitalId
=
hospitalId
,
ModuleName
=
item
.
ModuleName
,
SheetType
=
(
int
)
item
.
SheetType
,
ReadOnly
=
1
,
IsGenerated
=
0
};
modules
.
Add
(
module
);
var
module
=
new
mod_module
{
HospitalId
=
hospitalId
,
ModuleName
=
item
.
ModuleName
,
SheetType
=
(
int
)
item
.
SheetType
,
ReadOnly
=
1
,
ExtractId
=
item
.
ExtractId
,
IsGenerated
=
0
};
modules
.
Add
(
module
);
}
if
(
modules
.
Any
())
perforModmoduleRepository
.
AddRange
(
modules
.
ToArray
());
}
perforModmoduleRepository
.
AddRange
(
modules
.
ToArray
());
}
/// <summary>
...
...
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