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
a925574f
Commit
a925574f
authored
Aug 05, 2019
by
李承祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
抽取方案修改
parent
960c5538
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
19 deletions
+36
-19
performance/Performance.Services/ModExtractService.cs
+36
-19
No files found.
performance/Performance.Services/ModExtractService.cs
View file @
a925574f
...
...
@@ -43,7 +43,7 @@ public List<TitleValue> ExtractScheme(int hospitalId, List<int> executeType)
var
titlevalue
=
new
List
<
TitleValue
>();
var
list
=
perforModextractRepository
.
GetEntities
(
t
=>
(
t
.
HospitalId
==
hospitalId
||
t
.
HospitalId
==
null
)
&&
executeType
.
Contains
(
t
.
ExecuteType
.
Value
));
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
()
}).
ToList
();
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
();
return
titlevalue
;
}
...
...
@@ -77,27 +77,38 @@ public mod_module AddModule(ModModuleRequest request)
throw
new
PerformanceException
(
"模块类型错误,只支持收入模板配置"
);
string
[]
array
=
new
string
[]
{
"就诊收入"
,
"执行收入"
};
if
(
array
.
Any
(
t
=>
!
request
.
ModuleName
.
Contains
(
t
))
)
if
(
request
.
ModuleName
.
IndexOf
(
"就诊收入"
)
==
-
1
&&
request
.
ModuleName
.
IndexOf
(
"执行收入"
)
==
-
1
)
throw
new
PerformanceException
(
"模块名称规则错误"
);
if
(
Regex
.
IsMatch
(
request
.
ModuleName
,
@"^[\u4e00-\u9fa5]+$"
))
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
(
"绩效模板已存在!"
);
var
moduleList
=
perforModmoduleRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
request
.
HospitalId
&&
t
.
ModuleName
.
IndexOf
(
"1."
)
!=
-
1
);
string
addname
=
""
;
var
moduleList
=
perforModmoduleRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
request
.
HospitalId
&&
t
.
ModuleName
.
IndexOf
(
"1."
)
!=
-
1
);
string
name
=
request
.
ModuleName
.
Replace
(
"就诊收入"
,
""
).
Replace
(
"执行收入"
,
""
);
var
exist
=
moduleList
.
Where
(
t
=>
t
.
ModuleName
.
Contains
(
name
));
if
(
exist
!=
null
&&
exist
.
Any
())
{
string
modulename
=
exist
.
OrderByDescending
(
t
=>
t
.
ModuleName
).
First
().
ModuleName
;
int
[]
sort
=
Array
.
ConvertAll
(
modulename
.
Split
(
' '
)[
0
].
Split
(
new
string
[]
{
"."
},
StringSplitOptions
.
RemoveEmptyEntries
),
t
=>
ConvertHelper
.
TryInt
(
t
));
sort
[
2
]
+=
1
;
addname
=
string
.
Join
(
"."
,
sort
)
+
" "
+
request
.
ModuleName
;
}
else
{
string
modulename
=
moduleList
.
OrderByDescending
(
t
=>
t
.
ModuleName
).
First
().
ModuleName
;
int
[]
sort
=
Array
.
ConvertAll
(
modulename
.
Split
(
' '
)[
0
].
Split
(
new
string
[]
{
"."
},
StringSplitOptions
.
RemoveEmptyEntries
),
t
=>
ConvertHelper
.
TryInt
(
t
));
sort
[
1
]
+=
1
;
addname
=
$"
{
sort
[
0
]}
.
{
sort
[
1
]}
.1 "
+
request
.
ModuleName
;
}
mod_module
entity
=
new
mod_module
{
ModuleName
=
request
.
ModuleN
ame
,
ModuleName
=
addn
ame
,
HospitalId
=
request
.
HospitalId
,
Description
=
request
.
Description
,
SheetType
=
request
.
SheetType
,
...
...
@@ -132,18 +143,18 @@ private void AddModule(int hospitalId)
var
extractList
=
perforModextractRepository
.
GetEntities
(
t
=>
t
.
IsEnable
==
1
&&
t
.
ExecuteType
==
1
);
var
moduleList
=
new
mod_module
[]
{
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
},
new
mod_module
{
ModuleName
=
"1.0.1 额外收入"
,
SheetType
=
(
int
)
SheetType
.
OtherIncome
},
new
mod_module
{
ModuleName
=
"1.1.1 门诊就诊收入"
,
SheetType
=
(
int
)
SheetType
.
Income
},
new
mod_module
{
ModuleName
=
"1.1.2 门诊执行收入"
,
SheetType
=
(
int
)
SheetType
.
Income
},
new
mod_module
{
ModuleName
=
"1.2.1 住院就诊收入"
,
SheetType
=
(
int
)
SheetType
.
Income
},
new
mod_module
{
ModuleName
=
"1.2.2 住院执行收入"
,
SheetType
=
(
int
)
SheetType
.
Income
},
new
mod_module
{
ModuleName
=
"2.1 成本支出统计表"
,
SheetType
=
(
int
)
SheetType
.
Expend
},
new
mod_module
{
ModuleName
=
"3.1 医生组工作量绩效测算表"
,
SheetType
=
(
int
)
SheetType
.
Workload
},
new
mod_module
{
ModuleName
=
"3.2 护理组工作量绩效测算表"
,
SheetType
=
(
int
)
SheetType
.
Workload
},
};
var
data
=
perforModmoduleRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
);
var
inexistence
=
moduleList
.
Where
(
t
=>
!
data
.
Select
(
p
=>
p
.
ModuleName
).
ToArray
().
Contains
(
t
.
ModuleName
));
var
inexistence
=
data
==
null
?
moduleList
:
moduleList
.
Where
(
t
=>
!
data
.
Select
(
p
=>
p
.
ModuleName
).
ToArray
().
Contains
(
t
.
ModuleName
));
if
(
inexistence
!=
null
&&
inexistence
.
Any
())
{
...
...
@@ -156,7 +167,7 @@ private void AddModule(int hospitalId)
ModuleName
=
item
.
ModuleName
,
SheetType
=
(
int
)
item
.
SheetType
,
ReadOnly
=
1
,
ExtractId
=
item
.
ExtractId
,
ExtractId
=
null
,
IsGenerated
=
0
};
modules
.
Add
(
module
);
...
...
@@ -175,8 +186,8 @@ public mod_module EditModule(ModModuleRequest request)
var
entity
=
perforModmoduleRepository
.
GetEntity
(
t
=>
t
.
Id
==
request
.
ModuleId
);
if
(
entity
==
null
)
throw
new
PerformanceException
(
"该绩效抽取方案不存在!"
);
if
(
entity
.
ReadOnly
==
1
)
throw
new
PerformanceException
(
"该绩效抽取方案不可编辑!"
);
//
if (entity.ReadOnly == 1)
//
throw new PerformanceException("该绩效抽取方案不可编辑!");
var
list
=
perforModmoduleRepository
.
GetEntities
(
t
=>
t
.
Id
!=
entity
.
Id
&&
t
.
HospitalId
==
entity
.
HospitalId
&&
t
.
ModuleName
==
request
.
ModuleName
);
if
(
list
!=
null
&&
list
.
Any
())
...
...
@@ -225,7 +236,7 @@ public void DelModule(int moduleId)
public
List
<
mod_item
>
Items
(
int
moduleId
)
{
var
list
=
perforModitemRepository
.
GetEntities
(
t
=>
t
.
ModuleId
==
moduleId
);
return
list
;
return
list
?.
OrderBy
(
t
=>
t
.
ItemName
).
ToList
()
;
}
/// <summary>
...
...
@@ -405,6 +416,12 @@ public void AddItems(int moduleId)
if
((
int
)
SheetType
.
Income
==
module
.
SheetType
&&
module
.
IsGenerated
==
0
)
{
var
configList
=
perforHospitalconfigRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
module
.
HospitalId
);
if
(
configList
==
null
||
!
configList
.
Any
())
{
LogHelper
.
Information
(
"医院配置信息未设置"
,
"添加默认收费项"
);
throw
new
PerformanceException
(
$"医院配置信息未设置"
);
}
if
(
configList
!=
null
&&
configList
.
Any
())
{
var
hospitalConfig
=
configList
.
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