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
8c41b20b
Commit
8c41b20b
authored
Jun 02, 2020
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
科室分类
parent
34d80dd9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
251 additions
and
119 deletions
+251
-119
performance/Performance.Api/Controllers/ConfigController.cs
+176
-119
performance/Performance.Services/ConfigService.cs
+75
-0
No files found.
performance/Performance.Api/Controllers/ConfigController.cs
View file @
8c41b20b
...
@@ -25,6 +25,7 @@ public ConfigController(ConfigService configService, AllotService allotService)
...
@@ -25,6 +25,7 @@ public ConfigController(ConfigService configService, AllotService allotService)
_configService
=
configService
;
_configService
=
configService
;
_allotService
=
allotService
;
_allotService
=
allotService
;
}
}
#
region
弃用
//#region director
//#region director
///// <summary>
///// <summary>
...
@@ -81,116 +82,6 @@ public ConfigController(ConfigService configService, AllotService allotService)
...
@@ -81,116 +82,6 @@ public ConfigController(ConfigService configService, AllotService allotService)
//}
//}
//#endregion
//#endregion
#
region
drugprop
/// <summary>
/// 获取 药占比配置信息列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"drugproplist"
)]
[
HttpPost
]
public
ApiResponse
<
List
<
DrugpropResponse
>>
GetDrugList
([
CustomizeValidator
(
RuleSet
=
"Select"
),
FromBody
]
DrugpropRequest
request
)
{
var
list
=
_configService
.
GetDrugList
(
request
.
AllotID
);
return
new
ApiResponse
<
List
<
DrugpropResponse
>>(
ResponseType
.
OK
,
"ok"
,
list
);
}
/// <summary>
/// 新增药占比配置
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"druginsert"
)]
[
HttpPost
]
public
ApiResponse
<
DrugpropResponse
>
DrugInsert
([
CustomizeValidator
(
RuleSet
=
"Insert"
),
FromBody
]
DrugpropRequest
request
)
{
var
drugprop
=
_configService
.
DrugInsert
(
request
);
return
new
ApiResponse
<
DrugpropResponse
>(
ResponseType
.
OK
,
drugprop
);
}
/// <summary>
/// 修改药占比配置
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"drugupdate"
)]
[
HttpPost
]
public
ApiResponse
<
DrugpropResponse
>
Update
([
CustomizeValidator
(
RuleSet
=
"Update"
),
FromBody
]
DrugpropRequest
request
)
{
var
drugprop
=
_configService
.
DrugUpdate
(
request
);
return
new
ApiResponse
<
DrugpropResponse
>(
ResponseType
.
OK
,
drugprop
);
}
/// <summary>
/// 删除药占比配置
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"drugdelete"
)]
[
HttpPost
]
public
ApiResponse
Delete
([
CustomizeValidator
(
RuleSet
=
"Delete"
),
FromBody
]
DrugpropRequest
request
)
{
if
(!
_configService
.
DrugDelete
(
request
))
return
new
ApiResponse
(
ResponseType
.
Fail
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
#
endregion
#
region
drugtype
/// <summary>
/// 获取 药占比类型信息列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"dtypelist"
)]
[
HttpPost
]
public
ApiResponse
GetDrugtypeList
([
CustomizeValidator
(
RuleSet
=
"Select"
),
FromBody
]
DrugpropRequest
request
)
{
var
list
=
_configService
.
GetDrugtypeList
(
request
.
AllotID
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
list
);
}
/// <summary>
/// 新增药占比类型
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"dtypeinsert"
)]
[
HttpPost
]
public
ApiResponse
DrugtypeInsert
([
CustomizeValidator
(
RuleSet
=
"Insert"
),
FromBody
]
DrugpropRequest
request
)
{
var
drugprop
=
_configService
.
DrugtypeInsert
(
request
);
return
new
ApiResponse
(
ResponseType
.
OK
,
drugprop
);
}
/// <summary>
/// 修改药占比类型
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"dtypeupdate"
)]
[
HttpPost
]
public
ApiResponse
DrugtypeUpdate
([
CustomizeValidator
(
RuleSet
=
"Update"
),
FromBody
]
DrugpropRequest
request
)
{
var
drugprop
=
_configService
.
DrugtypeUpdate
(
request
);
return
new
ApiResponse
(
ResponseType
.
OK
,
drugprop
);
}
/// <summary>
/// 删除药占比类型
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"dtypedelete"
)]
[
HttpPost
]
public
ApiResponse
DrugtypeDelete
([
CustomizeValidator
(
RuleSet
=
"Delete"
),
FromBody
]
DrugpropRequest
request
)
{
if
(!
_configService
.
DrugtypeDelete
(
request
))
return
new
ApiResponse
(
ResponseType
.
Fail
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
#
endregion
//#region income
//#region income
///// <summary>
///// <summary>
///// 获取ICU有效收入配置列表
///// 获取ICU有效收入配置列表
...
@@ -300,6 +191,117 @@ public ApiResponse DrugtypeDelete([CustomizeValidator(RuleSet = "Delete"), FromB
...
@@ -300,6 +191,117 @@ public ApiResponse DrugtypeDelete([CustomizeValidator(RuleSet = "Delete"), FromB
// return new ApiResponse(ResponseType.OK);
// return new ApiResponse(ResponseType.OK);
//}
//}
//#endregion
//#endregion
#
endregion
#
region
drugprop
/// <summary>
/// 获取 药占比配置信息列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"drugproplist"
)]
[
HttpPost
]
public
ApiResponse
<
List
<
DrugpropResponse
>>
GetDrugList
([
CustomizeValidator
(
RuleSet
=
"Select"
),
FromBody
]
DrugpropRequest
request
)
{
var
list
=
_configService
.
GetDrugList
(
request
.
AllotID
);
return
new
ApiResponse
<
List
<
DrugpropResponse
>>(
ResponseType
.
OK
,
"ok"
,
list
);
}
/// <summary>
/// 新增药占比配置
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"druginsert"
)]
[
HttpPost
]
public
ApiResponse
<
DrugpropResponse
>
DrugInsert
([
CustomizeValidator
(
RuleSet
=
"Insert"
),
FromBody
]
DrugpropRequest
request
)
{
var
drugprop
=
_configService
.
DrugInsert
(
request
);
return
new
ApiResponse
<
DrugpropResponse
>(
ResponseType
.
OK
,
drugprop
);
}
/// <summary>
/// 修改药占比配置
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"drugupdate"
)]
[
HttpPost
]
public
ApiResponse
<
DrugpropResponse
>
Update
([
CustomizeValidator
(
RuleSet
=
"Update"
),
FromBody
]
DrugpropRequest
request
)
{
var
drugprop
=
_configService
.
DrugUpdate
(
request
);
return
new
ApiResponse
<
DrugpropResponse
>(
ResponseType
.
OK
,
drugprop
);
}
/// <summary>
/// 删除药占比配置
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"drugdelete"
)]
[
HttpPost
]
public
ApiResponse
Delete
([
CustomizeValidator
(
RuleSet
=
"Delete"
),
FromBody
]
DrugpropRequest
request
)
{
if
(!
_configService
.
DrugDelete
(
request
))
return
new
ApiResponse
(
ResponseType
.
Fail
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
#
endregion
#
region
drugtype
/// <summary>
/// 获取 药占比类型信息列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"dtypelist"
)]
[
HttpPost
]
public
ApiResponse
GetDrugtypeList
([
CustomizeValidator
(
RuleSet
=
"Select"
),
FromBody
]
DrugpropRequest
request
)
{
var
list
=
_configService
.
GetDrugtypeList
(
request
.
AllotID
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
list
);
}
/// <summary>
/// 新增药占比类型
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"dtypeinsert"
)]
[
HttpPost
]
public
ApiResponse
DrugtypeInsert
([
CustomizeValidator
(
RuleSet
=
"Insert"
),
FromBody
]
DrugpropRequest
request
)
{
var
drugprop
=
_configService
.
DrugtypeInsert
(
request
);
return
new
ApiResponse
(
ResponseType
.
OK
,
drugprop
);
}
/// <summary>
/// 修改药占比类型
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"dtypeupdate"
)]
[
HttpPost
]
public
ApiResponse
DrugtypeUpdate
([
CustomizeValidator
(
RuleSet
=
"Update"
),
FromBody
]
DrugpropRequest
request
)
{
var
drugprop
=
_configService
.
DrugtypeUpdate
(
request
);
return
new
ApiResponse
(
ResponseType
.
OK
,
drugprop
);
}
/// <summary>
/// 删除药占比类型
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"dtypedelete"
)]
[
HttpPost
]
public
ApiResponse
DrugtypeDelete
([
CustomizeValidator
(
RuleSet
=
"Delete"
),
FromBody
]
DrugpropRequest
request
)
{
if
(!
_configService
.
DrugtypeDelete
(
request
))
return
new
ApiResponse
(
ResponseType
.
Fail
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
#
endregion
#
region
cofagain
#
region
cofagain
/// <summary>
/// <summary>
...
@@ -309,7 +311,7 @@ public ApiResponse DrugtypeDelete([CustomizeValidator(RuleSet = "Delete"), FromB
...
@@ -309,7 +311,7 @@ public ApiResponse DrugtypeDelete([CustomizeValidator(RuleSet = "Delete"), FromB
/// <returns></returns>
/// <returns></returns>
[
Route
(
"cofagainlist"
)]
[
Route
(
"cofagainlist"
)]
[
HttpPost
]
[
HttpPost
]
public
ApiResponse
GetAgainList
([
CustomizeValidator
(
RuleSet
=
"Select"
),
FromBody
]
CofAgainRequest
request
)
public
ApiResponse
GetAgainList
([
CustomizeValidator
(
RuleSet
=
"Select"
),
FromBody
]
CofAgainRequest
request
)
{
{
var
list
=
_configService
.
GetAgainList
(
request
.
AllotID
);
var
list
=
_configService
.
GetAgainList
(
request
.
AllotID
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
list
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
list
);
...
@@ -322,7 +324,7 @@ public ApiResponse GetAgainList([CustomizeValidator(RuleSet = "Select"), FromBod
...
@@ -322,7 +324,7 @@ public ApiResponse GetAgainList([CustomizeValidator(RuleSet = "Select"), FromBod
/// <returns></returns>
/// <returns></returns>
[
Route
(
"cofagaininsert"
)]
[
Route
(
"cofagaininsert"
)]
[
HttpPost
]
[
HttpPost
]
public
ApiResponse
AgainInsert
([
CustomizeValidator
(
RuleSet
=
"Insert"
),
FromBody
]
CofAgainRequest
request
)
public
ApiResponse
AgainInsert
([
CustomizeValidator
(
RuleSet
=
"Insert"
),
FromBody
]
CofAgainRequest
request
)
{
{
var
workyear
=
_configService
.
AgainInsert
(
request
);
var
workyear
=
_configService
.
AgainInsert
(
request
);
return
new
ApiResponse
(
ResponseType
.
OK
,
workyear
);
return
new
ApiResponse
(
ResponseType
.
OK
,
workyear
);
...
@@ -335,7 +337,7 @@ public ApiResponse AgainInsert([CustomizeValidator(RuleSet = "Insert"), FromBody
...
@@ -335,7 +337,7 @@ public ApiResponse AgainInsert([CustomizeValidator(RuleSet = "Insert"), FromBody
/// <returns></returns>
/// <returns></returns>
[
Route
(
"cofagainupdate"
)]
[
Route
(
"cofagainupdate"
)]
[
HttpPost
]
[
HttpPost
]
public
ApiResponse
AgainUpdate
([
CustomizeValidator
(
RuleSet
=
"Update"
),
FromBody
]
CofAgainRequest
request
)
public
ApiResponse
AgainUpdate
([
CustomizeValidator
(
RuleSet
=
"Update"
),
FromBody
]
CofAgainRequest
request
)
{
{
var
workyear
=
_configService
.
AgainUpdate
(
request
);
var
workyear
=
_configService
.
AgainUpdate
(
request
);
return
new
ApiResponse
(
ResponseType
.
OK
,
workyear
);
return
new
ApiResponse
(
ResponseType
.
OK
,
workyear
);
...
@@ -348,7 +350,7 @@ public ApiResponse AgainUpdate([CustomizeValidator(RuleSet = "Update"), FromBody
...
@@ -348,7 +350,7 @@ public ApiResponse AgainUpdate([CustomizeValidator(RuleSet = "Update"), FromBody
/// <returns></returns>
/// <returns></returns>
[
Route
(
"cofagaindelete"
)]
[
Route
(
"cofagaindelete"
)]
[
HttpPost
]
[
HttpPost
]
public
ApiResponse
AgainDelete
([
CustomizeValidator
(
RuleSet
=
"Delete"
),
FromBody
]
CofAgainRequest
request
)
public
ApiResponse
AgainDelete
([
CustomizeValidator
(
RuleSet
=
"Delete"
),
FromBody
]
CofAgainRequest
request
)
{
{
if
(!
_configService
.
AgainDelete
(
request
))
if
(!
_configService
.
AgainDelete
(
request
))
return
new
ApiResponse
(
ResponseType
.
Fail
);
return
new
ApiResponse
(
ResponseType
.
Fail
);
...
@@ -364,7 +366,7 @@ public ApiResponse AgainDelete([CustomizeValidator(RuleSet = "Delete"), FromBody
...
@@ -364,7 +366,7 @@ public ApiResponse AgainDelete([CustomizeValidator(RuleSet = "Delete"), FromBody
/// <returns></returns>
/// <returns></returns>
[
Route
(
"workitemlist"
)]
[
Route
(
"workitemlist"
)]
[
HttpPost
]
[
HttpPost
]
public
ApiResponse
<
List
<
cof_workitem
>>
GetWorkItems
([
CustomizeValidator
(
RuleSet
=
"Select"
),
FromBody
]
WorkItemRequest
request
)
public
ApiResponse
<
List
<
cof_workitem
>>
GetWorkItems
([
CustomizeValidator
(
RuleSet
=
"Select"
),
FromBody
]
WorkItemRequest
request
)
{
{
var
list
=
_configService
.
GetWorkItems
(
request
.
AllotID
);
var
list
=
_configService
.
GetWorkItems
(
request
.
AllotID
);
return
new
ApiResponse
<
List
<
cof_workitem
>>(
ResponseType
.
OK
,
"ok"
,
list
);
return
new
ApiResponse
<
List
<
cof_workitem
>>(
ResponseType
.
OK
,
"ok"
,
list
);
...
@@ -377,7 +379,7 @@ public ApiResponse<List<cof_workitem>> GetWorkItems([CustomizeValidator(RuleSet
...
@@ -377,7 +379,7 @@ public ApiResponse<List<cof_workitem>> GetWorkItems([CustomizeValidator(RuleSet
/// <returns></returns>
/// <returns></returns>
[
Route
(
"workiteminsert"
)]
[
Route
(
"workiteminsert"
)]
[
HttpPost
]
[
HttpPost
]
public
ApiResponse
<
cof_workitem
>
WorkItemInsert
([
CustomizeValidator
(
RuleSet
=
"Insert"
),
FromBody
]
WorkItemRequest
request
)
public
ApiResponse
<
cof_workitem
>
WorkItemInsert
([
CustomizeValidator
(
RuleSet
=
"Insert"
),
FromBody
]
WorkItemRequest
request
)
{
{
var
workyear
=
_configService
.
WorkItemInsert
(
request
);
var
workyear
=
_configService
.
WorkItemInsert
(
request
);
return
new
ApiResponse
<
cof_workitem
>(
ResponseType
.
OK
,
workyear
);
return
new
ApiResponse
<
cof_workitem
>(
ResponseType
.
OK
,
workyear
);
...
@@ -390,7 +392,7 @@ public ApiResponse<cof_workitem> WorkItemInsert([CustomizeValidator(RuleSet = "I
...
@@ -390,7 +392,7 @@ public ApiResponse<cof_workitem> WorkItemInsert([CustomizeValidator(RuleSet = "I
/// <returns></returns>
/// <returns></returns>
[
Route
(
"workitemupdate"
)]
[
Route
(
"workitemupdate"
)]
[
HttpPost
]
[
HttpPost
]
public
ApiResponse
<
cof_workitem
>
WorkItemUpdate
([
CustomizeValidator
(
RuleSet
=
"Update"
),
FromBody
]
WorkItemRequest
request
)
public
ApiResponse
<
cof_workitem
>
WorkItemUpdate
([
CustomizeValidator
(
RuleSet
=
"Update"
),
FromBody
]
WorkItemRequest
request
)
{
{
var
workyear
=
_configService
.
WorkItemUpdate
(
request
);
var
workyear
=
_configService
.
WorkItemUpdate
(
request
);
return
new
ApiResponse
<
cof_workitem
>(
ResponseType
.
OK
,
workyear
);
return
new
ApiResponse
<
cof_workitem
>(
ResponseType
.
OK
,
workyear
);
...
@@ -403,7 +405,7 @@ public ApiResponse<cof_workitem> WorkItemUpdate([CustomizeValidator(RuleSet = "U
...
@@ -403,7 +405,7 @@ public ApiResponse<cof_workitem> WorkItemUpdate([CustomizeValidator(RuleSet = "U
/// <returns></returns>
/// <returns></returns>
[
Route
(
"workitemdelete"
)]
[
Route
(
"workitemdelete"
)]
[
HttpPost
]
[
HttpPost
]
public
ApiResponse
WorkItemDelete
([
CustomizeValidator
(
RuleSet
=
"Delete"
),
FromBody
]
WorkItemRequest
request
)
public
ApiResponse
WorkItemDelete
([
CustomizeValidator
(
RuleSet
=
"Delete"
),
FromBody
]
WorkItemRequest
request
)
{
{
if
(!
_configService
.
WorkItemkDelete
(
request
))
if
(!
_configService
.
WorkItemkDelete
(
request
))
return
new
ApiResponse
(
ResponseType
.
Fail
);
return
new
ApiResponse
(
ResponseType
.
Fail
);
...
@@ -411,6 +413,61 @@ public ApiResponse WorkItemDelete([CustomizeValidator(RuleSet = "Delete"), FromB
...
@@ -411,6 +413,61 @@ public ApiResponse WorkItemDelete([CustomizeValidator(RuleSet = "Delete"), FromB
}
}
#
endregion
#
endregion
#
region
depttype
/// <summary>
/// 获取 药占比类型信息列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"deptlist"
)]
[
HttpPost
]
public
ApiResponse
GetDepttypeList
([
CustomizeValidator
(
RuleSet
=
"Select"
),
FromBody
]
DrugpropRequest
request
)
{
var
list
=
_configService
.
GetDepttypeList
(
request
.
AllotID
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
list
);
}
/// <summary>
/// 新增药占比类型
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"deptinsert"
)]
[
HttpPost
]
public
ApiResponse
DepttypeInsert
([
CustomizeValidator
(
RuleSet
=
"Insert"
),
FromBody
]
DrugpropRequest
request
)
{
var
drugprop
=
_configService
.
DepttypeInsert
(
request
);
return
new
ApiResponse
(
ResponseType
.
OK
,
drugprop
);
}
/// <summary>
/// 修改药占比类型
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"deptupdate"
)]
[
HttpPost
]
public
ApiResponse
DepttypeUpdate
([
CustomizeValidator
(
RuleSet
=
"Update"
),
FromBody
]
DrugpropRequest
request
)
{
var
drugprop
=
_configService
.
DepttypeUpdate
(
request
);
return
new
ApiResponse
(
ResponseType
.
OK
,
drugprop
);
}
/// <summary>
/// 删除药占比类型
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"deptdelete"
)]
[
HttpPost
]
public
ApiResponse
DepttypeDelete
([
CustomizeValidator
(
RuleSet
=
"Delete"
),
FromBody
]
DrugpropRequest
request
)
{
if
(!
_configService
.
DepttypeDelete
(
request
))
return
new
ApiResponse
(
ResponseType
.
Fail
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
#
endregion
/// <summary>
/// <summary>
/// 获取工作量绩效列头
/// 获取工作量绩效列头
/// </summary>
/// </summary>
...
@@ -418,7 +475,7 @@ public ApiResponse WorkItemDelete([CustomizeValidator(RuleSet = "Delete"), FromB
...
@@ -418,7 +475,7 @@ public ApiResponse WorkItemDelete([CustomizeValidator(RuleSet = "Delete"), FromB
/// <returns></returns>
/// <returns></returns>
[
Route
(
"workheader"
)]
[
Route
(
"workheader"
)]
[
HttpPost
]
[
HttpPost
]
public
ApiResponse
WorkHeader
([
CustomizeValidator
(
RuleSet
=
"Select"
),
FromBody
]
WorkItemRequest
request
)
public
ApiResponse
WorkHeader
([
CustomizeValidator
(
RuleSet
=
"Select"
),
FromBody
]
WorkItemRequest
request
)
{
{
var
list
=
_configService
.
WorkHeader
(
request
.
AllotID
);
var
list
=
_configService
.
WorkHeader
(
request
.
AllotID
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
list
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
list
);
...
...
performance/Performance.Services/ConfigService.cs
View file @
8c41b20b
...
@@ -26,6 +26,7 @@ public class ConfigService : IAutoInjection
...
@@ -26,6 +26,7 @@ public class ConfigService : IAutoInjection
private
PerforHospitalRepository
perforHospitalRepository
;
private
PerforHospitalRepository
perforHospitalRepository
;
private
PerforPersheetRepository
perforPersheetRepository
;
private
PerforPersheetRepository
perforPersheetRepository
;
private
PerforImheaderRepository
perforImheaderRepository
;
private
PerforImheaderRepository
perforImheaderRepository
;
private
PerforCofdepttypeRepository
perforCofdepttypeRepository
;
//private PerforLogdbugRepository logdbug;
//private PerforLogdbugRepository logdbug;
private
readonly
LogManageService
logManageService
;
private
readonly
LogManageService
logManageService
;
public
ConfigService
(
PerforCofdirectorRepository
cofdirectorRepository
,
public
ConfigService
(
PerforCofdirectorRepository
cofdirectorRepository
,
...
@@ -40,6 +41,7 @@ public class ConfigService : IAutoInjection
...
@@ -40,6 +41,7 @@ public class ConfigService : IAutoInjection
PerforCofworkitemRepository
workitemRepository
,
PerforCofworkitemRepository
workitemRepository
,
PerforPersheetRepository
perforPersheetRepository
,
PerforPersheetRepository
perforPersheetRepository
,
PerforImheaderRepository
perforImheaderRepository
,
PerforImheaderRepository
perforImheaderRepository
,
PerforCofdepttypeRepository
perforCofdepttypeRepository
,
//PerforLogdbugRepository logdbug
//PerforLogdbugRepository logdbug
LogManageService
logManageService
)
LogManageService
logManageService
)
{
{
...
@@ -55,6 +57,7 @@ public class ConfigService : IAutoInjection
...
@@ -55,6 +57,7 @@ public class ConfigService : IAutoInjection
this
.
perforHospitalRepository
=
perforHospitalRepository
;
this
.
perforHospitalRepository
=
perforHospitalRepository
;
this
.
perforPersheetRepository
=
perforPersheetRepository
;
this
.
perforPersheetRepository
=
perforPersheetRepository
;
this
.
perforImheaderRepository
=
perforImheaderRepository
;
this
.
perforImheaderRepository
=
perforImheaderRepository
;
this
.
perforCofdepttypeRepository
=
perforCofdepttypeRepository
;
//this.logdbug = logdbug;
//this.logdbug = logdbug;
this
.
logManageService
=
logManageService
;
this
.
logManageService
=
logManageService
;
}
}
...
@@ -416,6 +419,69 @@ public bool WorkItemkDelete(WorkItemRequest request)
...
@@ -416,6 +419,69 @@ public bool WorkItemkDelete(WorkItemRequest request)
}
}
#
endregion
#
endregion
#
region
cof_depttype
科室别配置
/// <summary>
/// 获取cof_drugprop列表
/// </summary>
/// <returns></returns>
public
List
<
cof_depttype
>
GetDepttypeList
(
int
allotId
)
{
var
list
=
perforCofdepttypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
);
return
list
;
}
/// <summary>
/// 添加数据
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public
cof_depttype
DepttypeInsert
(
DrugpropRequest
request
)
{
var
entity
=
new
cof_depttype
{
AllotID
=
request
.
AllotID
,
Charge
=
request
.
Charge
,
ChargeType
=
request
.
ChargeType
};
if
(!
perforCofdepttypeRepository
.
Add
(
entity
))
throw
new
PerformanceException
(
"保存失败"
);
return
entity
;
}
/// <summary>
/// 更新数据
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public
cof_depttype
DepttypeUpdate
(
DrugpropRequest
request
)
{
var
entity
=
perforCofdepttypeRepository
.
GetEntity
(
t
=>
t
.
ID
==
request
.
ID
);
if
(
null
==
entity
)
throw
new
PerformanceException
(
$"ID不存在 :
{
request
.
ID
}
"
);
entity
.
Charge
=
request
.
Charge
;
entity
.
ChargeType
=
request
.
ChargeType
;
if
(!
perforCofdepttypeRepository
.
Update
(
entity
))
throw
new
PerformanceException
(
"保存失败"
);
return
entity
;
}
/// <summary>
/// 删除数据
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public
bool
DepttypeDelete
(
DrugpropRequest
request
)
{
var
entity
=
perforCofdepttypeRepository
.
GetEntity
(
t
=>
t
.
ID
==
request
.
ID
);
if
(
null
==
entity
)
throw
new
PerformanceException
(
$"ID不存在 :
{
request
.
ID
}
"
);
return
perforCofdepttypeRepository
.
Remove
(
entity
);
}
#
endregion
#
region
Copy
#
region
Copy
/// <summary>
/// <summary>
/// 复制报表基础配置
/// 复制报表基础配置
...
@@ -480,6 +546,15 @@ public void Copy(per_allot allot)
...
@@ -480,6 +546,15 @@ public void Copy(per_allot allot)
_drugtypeRepository
.
AddRange
(
newAgains
.
ToArray
());
_drugtypeRepository
.
AddRange
(
newAgains
.
ToArray
());
}
}
var
cofDepttype
=
perforCofdepttypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
if
(
cofDepttype
==
null
||
cofDepttype
.
Count
==
0
)
{
var
depttype
=
perforCofdepttypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
)
??
perforCofdepttypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
var
newAgains
=
depttype
.
Select
(
t
=>
new
cof_depttype
{
AllotID
=
allot
.
ID
,
Charge
=
t
.
Charge
,
ChargeType
=
t
.
ChargeType
});
perforCofdepttypeRepository
.
AddRange
(
newAgains
.
ToArray
());
}
var
workItem
=
_workitemRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
var
workItem
=
_workitemRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allot
.
ID
);
if
(
hospital
!=
null
&&
hospital
?.
IsOpenDrugprop
==
1
&&
(
workItem
==
null
||
workItem
.
Count
==
0
))
if
(
hospital
!=
null
&&
hospital
?.
IsOpenDrugprop
==
1
&&
(
workItem
==
null
||
workItem
.
Count
==
0
))
{
{
...
...
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