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
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
75 additions
and
0 deletions
+75
-0
performance/Performance.Api/Controllers/ConfigController.cs
+0
-0
performance/Performance.Services/ConfigService.cs
+75
-0
No files found.
performance/Performance.Api/Controllers/ConfigController.cs
View file @
8c41b20b
This diff is collapsed.
Click to expand it.
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