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
3604709a
Commit
3604709a
authored
Mar 16, 2021
by
钟博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cof_drugtype表中补全HospitalId字段内容
parent
4030fe47
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
9 deletions
+18
-9
performance/Performance.Api/Controllers/ConfigController.cs
+1
-1
performance/Performance.DtoModels/Request/DrugpropRequest.cs
+3
-0
performance/Performance.EntityModels/Entity/cof_drugtype.cs
+5
-0
performance/Performance.Services/ConfigService.cs
+9
-8
No files found.
performance/Performance.Api/Controllers/ConfigController.cs
View file @
3604709a
...
@@ -258,7 +258,7 @@ public ConfigController(ConfigService configService, AllotService allotService)
...
@@ -258,7 +258,7 @@ public ConfigController(ConfigService configService, AllotService allotService)
[
HttpPost
]
[
HttpPost
]
public
ApiResponse
GetDrugtypeList
([
CustomizeValidator
(
RuleSet
=
"Select"
),
FromBody
]
DrugpropRequest
request
)
public
ApiResponse
GetDrugtypeList
([
CustomizeValidator
(
RuleSet
=
"Select"
),
FromBody
]
DrugpropRequest
request
)
{
{
var
list
=
_configService
.
GetDrugtypeList
(
request
.
AllotID
);
var
list
=
_configService
.
GetDrugtypeList
(
request
.
HospitalId
,
request
.
AllotID
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
list
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
list
);
}
}
...
...
performance/Performance.DtoModels/Request/DrugpropRequest.cs
View file @
3604709a
...
@@ -9,6 +9,8 @@ public class DrugpropRequest
...
@@ -9,6 +9,8 @@ public class DrugpropRequest
{
{
public
int
ID
{
get
;
set
;
}
public
int
ID
{
get
;
set
;
}
public
int
HospitalId
{
get
;
set
;
}
public
int
AllotID
{
get
;
set
;
}
public
int
AllotID
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 药占比最大范围(小于)
/// 药占比最大范围(小于)
...
@@ -43,6 +45,7 @@ public DrugpropRequestValidator()
...
@@ -43,6 +45,7 @@ public DrugpropRequestValidator()
RuleSet
(
"Insert"
,
()
=>
RuleSet
(
"Insert"
,
()
=>
{
{
RuleFor
(
x
=>
x
.
HospitalId
).
NotNull
().
GreaterThan
(
0
);
RuleFor
(
x
=>
x
.
AllotID
).
NotNull
().
GreaterThan
(
0
);
RuleFor
(
x
=>
x
.
AllotID
).
NotNull
().
GreaterThan
(
0
);
});
});
...
...
performance/Performance.EntityModels/Entity/cof_drugtype.cs
View file @
3604709a
...
@@ -24,6 +24,11 @@ public class cof_drugtype
...
@@ -24,6 +24,11 @@ public class cof_drugtype
/// <summary>
/// <summary>
///
///
/// </summary>
/// </summary>
public
Nullable
<
int
>
HospitalId
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
Nullable
<
int
>
AllotID
{
get
;
set
;
}
public
Nullable
<
int
>
AllotID
{
get
;
set
;
}
/// <summary>
/// <summary>
...
...
performance/Performance.Services/ConfigService.cs
View file @
3604709a
...
@@ -318,9 +318,9 @@ public class ConfigService : IAutoInjection
...
@@ -318,9 +318,9 @@ public class ConfigService : IAutoInjection
/// 获取cof_drugprop列表
/// 获取cof_drugprop列表
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
public
List
<
cof_drugtype
>
GetDrugtypeList
(
int
allotId
)
public
List
<
cof_drugtype
>
GetDrugtypeList
(
int
HospitalId
,
int
allotId
)
{
{
var
list
=
_drugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
);
var
list
=
_drugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
&&
t
.
HospitalId
==
HospitalId
);
return
list
;
return
list
;
}
}
...
@@ -333,6 +333,7 @@ public cof_drugtype DrugtypeInsert(DrugpropRequest request)
...
@@ -333,6 +333,7 @@ public cof_drugtype DrugtypeInsert(DrugpropRequest request)
{
{
var
entity
=
new
cof_drugtype
var
entity
=
new
cof_drugtype
{
{
HospitalId
=
request
.
HospitalId
,
AllotID
=
request
.
AllotID
,
AllotID
=
request
.
AllotID
,
Charge
=
request
.
Charge
,
Charge
=
request
.
Charge
,
ChargeType
=
request
.
ChargeType
ChargeType
=
request
.
ChargeType
...
@@ -715,7 +716,7 @@ public void Copy(per_allot allot)
...
@@ -715,7 +716,7 @@ public void Copy(per_allot allot)
if
(
cofDrugtype
==
null
||
cofDrugtype
.
Count
==
0
)
if
(
cofDrugtype
==
null
||
cofDrugtype
.
Count
==
0
)
{
{
var
drugtype
=
_drugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
)
??
_drugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
var
drugtype
=
_drugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
allotId
)
??
_drugtypeRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
var
newAgains
=
drugtype
.
Select
(
t
=>
new
cof_drugtype
{
AllotID
=
allot
.
ID
,
Charge
=
t
.
Charge
,
ChargeType
=
t
.
ChargeType
});
var
newAgains
=
drugtype
.
Select
(
t
=>
new
cof_drugtype
{
HospitalId
=
allot
.
HospitalId
,
AllotID
=
allot
.
ID
,
Charge
=
t
.
Charge
,
ChargeType
=
t
.
ChargeType
});
_drugtypeRepository
.
AddRange
(
newAgains
.
ToArray
());
_drugtypeRepository
.
AddRange
(
newAgains
.
ToArray
());
}
}
...
@@ -838,7 +839,7 @@ private void CopyAprData(int prevAllotId, int allotId)
...
@@ -838,7 +839,7 @@ private void CopyAprData(int prevAllotId, int allotId)
}
}
}
}
public
HandsonTable
GetHrpDeptHands
(
int
HospitalId
,
int
AllotId
)
public
HandsonTable
GetHrpDeptHands
(
int
HospitalId
,
int
AllotId
)
{
{
var
result
=
new
HandsonTable
((
int
)
SheetType
.
Unidentifiable
,
HrpDept
.
Select
(
t
=>
t
.
Value
).
ToArray
(),
HrpDept
.
Select
(
t
=>
new
collect_permission
var
result
=
new
HandsonTable
((
int
)
SheetType
.
Unidentifiable
,
HrpDept
.
Select
(
t
=>
t
.
Value
).
ToArray
(),
HrpDept
.
Select
(
t
=>
new
collect_permission
{
{
...
@@ -866,9 +867,9 @@ public HandsonTable GetHrpDeptHands(int HospitalId,int AllotId)
...
@@ -866,9 +867,9 @@ public HandsonTable GetHrpDeptHands(int HospitalId,int AllotId)
return
result
;
return
result
;
}
}
public
void
SaveDepttypeHands
(
int
hospitalId
,
int
allotId
,
SaveCollectData
request
)
public
void
SaveDepttypeHands
(
int
hospitalId
,
int
allotId
,
SaveCollectData
request
)
{
{
var
dicData
=
CreateDataRow
(
hospitalId
,
allotId
,
request
,
HrpDept
);
var
dicData
=
CreateDataRow
(
hospitalId
,
allotId
,
request
,
HrpDept
);
List
<
cof_hrp_department
>
depts
=
new
List
<
cof_hrp_department
>();
List
<
cof_hrp_department
>
depts
=
new
List
<
cof_hrp_department
>();
foreach
(
var
item
in
dicData
)
foreach
(
var
item
in
dicData
)
...
@@ -884,7 +885,7 @@ public void SaveDepttypeHands(int hospitalId, int allotId,SaveCollectData reques
...
@@ -884,7 +885,7 @@ public void SaveDepttypeHands(int hospitalId, int allotId,SaveCollectData reques
}
}
perforCofHrpDeptRepository
.
Execute
(
"delete from cof_hrp_department where HospitalId=@hospitalId and allotid = @allotid"
perforCofHrpDeptRepository
.
Execute
(
"delete from cof_hrp_department where HospitalId=@hospitalId and allotid = @allotid"
,
new
{
hospitalId
,
allotId
});
,
new
{
hospitalId
,
allotId
});
perforCofHrpDeptRepository
.
AddRange
(
depts
.
ToArray
());
perforCofHrpDeptRepository
.
AddRange
(
depts
.
ToArray
());
}
}
...
@@ -897,7 +898,7 @@ public void SaveDepttypeHands(int hospitalId, int allotId,SaveCollectData reques
...
@@ -897,7 +898,7 @@ public void SaveDepttypeHands(int hospitalId, int allotId,SaveCollectData reques
// 创建固定数据列
// 创建固定数据列
Dictionary
<
string
,
string
>
baseData
=
CreateBaseData
(
request
,
config
,
r
);
Dictionary
<
string
,
string
>
baseData
=
CreateBaseData
(
request
,
config
,
r
);
baseData
.
Add
(
nameof
(
cof_hrp_department
.
AllotId
),
allotId
.
ToString
());
baseData
.
Add
(
nameof
(
cof_hrp_department
.
AllotId
),
allotId
.
ToString
());
baseData
.
Add
(
nameof
(
cof_hrp_department
.
HospitalId
),
hospitalId
.
ToString
());
baseData
.
Add
(
nameof
(
cof_hrp_department
.
HospitalId
),
hospitalId
.
ToString
());
allData
.
Add
(
baseData
);
allData
.
Add
(
baseData
);
}
}
...
...
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