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
fb5ddc2c
Commit
fb5ddc2c
authored
Feb 01, 2021
by
钟博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改收入费用、科室类别,工作量、科室字典的显示和保存完整
parent
907c2da6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
395 additions
and
3 deletions
+395
-3
performance/Performance.Api/Controllers/ConfigController.cs
+90
-0
performance/Performance.Api/Controllers/PersonController.cs
+30
-0
performance/Performance.DtoModels/Response/DeptdicResponse.cs
+16
-0
performance/Performance.DtoModels/SaveCollectData.cs
+6
-0
performance/Performance.Services/ConfigService.cs
+10
-3
performance/Performance.Services/PersonService.cs
+243
-0
No files found.
performance/Performance.Api/Controllers/ConfigController.cs
View file @
fb5ddc2c
...
...
@@ -301,6 +301,36 @@ public ApiResponse DrugtypeDelete([CustomizeValidator(RuleSet = "Delete"), FromB
return
new
ApiResponse
(
ResponseType
.
Fail
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
/// <summary>
/// 获取收入费用类别
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"GetDrugtypeHands"
)]
[
HttpPost
]
public
ApiResponse
GetDrugtypeHands
([
CustomizeValidator
(
RuleSet
=
"Select"
),
FromBody
]
DrugpropRequest
request
)
{
var
list
=
_configService
.
GetDrugtypeHands
(
request
.
AllotID
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
list
);
}
/// <summary>
/// 保存收入费用类别
/// </summary>
/// <param name="allotId"></param>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"SaveDrugtypeHands/{allotId}"
)]
[
HttpPost
]
public
ApiResponse
SaveDrugtypeHands
(
int
allotId
,
[
FromBody
]
SaveConfigData
request
)
{
if
(
allotId
<=
0
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数无效"
);
_configService
.
SaveDrugtypeHands
(
allotId
,
request
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
#
endregion
#
region
cofagain
...
...
@@ -411,6 +441,36 @@ public ApiResponse WorkItemDelete([CustomizeValidator(RuleSet = "Delete"), FromB
return
new
ApiResponse
(
ResponseType
.
Fail
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
/// <summary>
///获取工作量绩效配置(hands)
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"GetWorkItemHands"
)]
[
HttpPost
]
public
ApiResponse
GetWorkItemHands
([
CustomizeValidator
(
RuleSet
=
"Select"
),
FromBody
]
WorkItemRequest
request
)
{
var
list
=
_configService
.
GetWorkItemHands
(
request
.
AllotID
,
request
.
Type
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
list
);
}
/// <summary>
/// 保存工作量绩效配置(hands)
/// </summary>
/// <param name="allotId"></param>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"SaveWorkItemHands/{allotId}"
)]
[
HttpPost
]
public
ApiResponse
SaveWorkItemHands
(
int
allotId
,
[
FromBody
]
SaveConfigData
request
)
{
if
(
allotId
<=
0
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数无效"
);
_configService
.
SaveWorkItemHands
(
allotId
,
request
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
#
endregion
#
region
depttype
...
...
@@ -466,6 +526,36 @@ public ApiResponse DepttypeDelete([CustomizeValidator(RuleSet = "Delete"), FromB
return
new
ApiResponse
(
ResponseType
.
Fail
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
/// <summary>
/// 获取科室类别配置
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"GetDepttypeHands"
)]
[
HttpPost
]
public
ApiResponse
GetDepttypeHands
([
CustomizeValidator
(
RuleSet
=
"Select"
),
FromBody
]
DrugpropRequest
request
)
{
var
list
=
_configService
.
GetDepttypeHands
(
request
.
AllotID
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
list
);
}
/// <summary>
/// 保存科室类别配置
/// </summary>
/// <param name="allotId"></param>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"SaveDepttypeHands/{allotId}"
)]
[
HttpPost
]
public
ApiResponse
SaveDepttypeHands
(
int
allotId
,
[
FromBody
]
SaveConfigData
request
)
{
if
(
allotId
<=
0
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数无效"
);
_configService
.
SaveDepttypeHands
(
allotId
,
request
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
#
endregion
#
region
cmi
...
...
performance/Performance.Api/Controllers/PersonController.cs
View file @
fb5ddc2c
...
...
@@ -93,6 +93,19 @@ public ApiResponse GetDepartments(int hospitalId)
}
/// <summary>
/// 获取科室记录
/// </summary>
/// <param name="hospitalId"></param>
/// <returns></returns>
[
Route
(
"GetDepartmentHands/{hospitalId}"
)]
[
HttpPost
]
public
ApiResponse
GetDepartmentHands
(
int
hospitalId
)
{
var
list
=
personService
.
GetDepartmentHands
(
hospitalId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
list
);
}
/// <summary>
/// 新增科室信息
/// </summary>
/// <param name="request"></param>
...
...
@@ -181,5 +194,22 @@ public ApiResponse DeptIncomeDetail([CustomizeValidator(RuleSet = "Select"), Fro
var
data
=
personService
.
DeptIncomeDetail
(
request
,
claimService
.
GetUserId
());
return
new
ApiResponse
(
ResponseType
.
OK
,
data
);
}
/// <summary>
/// 保存科室字典(hands)
/// </summary>
/// <param name="HospitalId"></param>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"SaveDepartmentHands/{HospitalId}"
)]
[
HttpPost
]
public
ApiResponse
SaveDeptDicHands
(
int
HospitalId
,
[
FromBody
]
SaveConfigData
request
)
{
if
(
HospitalId
<=
0
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数无效"
);
personService
.
SaveDeptDicHands
(
HospitalId
,
request
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
}
}
performance/Performance.DtoModels/Response/DeptdicResponse.cs
View file @
fb5ddc2c
...
...
@@ -25,4 +25,20 @@ public class Deptdic
public
int
Id
{
get
;
set
;
}
public
string
AccountingUnit
{
get
;
set
;
}
}
public
class
DeptdicHands
{
public
int
HospitalId
{
get
;
set
;
}
public
string
HISDeptName
{
get
;
set
;
}
public
string
Department
{
get
;
set
;
}
public
string
OutDoctorAccounting
{
get
;
set
;
}
public
string
OutNurseAccounting
{
get
;
set
;
}
public
string
OutTechnicAccounting
{
get
;
set
;
}
public
string
InpatDoctorAccounting
{
get
;
set
;
}
public
string
InpatNurseAccounting
{
get
;
set
;
}
public
string
InpatTechnicAccounting
{
get
;
set
;
}
public
string
LogisticsAccounting
{
get
;
set
;
}
public
string
SpecialAccounting
{
get
;
set
;
}
public
DateTime
?
CreateTime
{
get
;
set
;
}
}
}
performance/Performance.DtoModels/SaveCollectData.cs
View file @
fb5ddc2c
...
...
@@ -11,4 +11,10 @@ public class SaveCollectData
public
string
[]
ColHeaders
{
get
;
set
;
}
public
string
[][]
Data
{
get
;
set
;
}
}
public
class
SaveConfigData
{
public
string
[]
ColHeaders
{
get
;
set
;
}
public
string
[][]
Data
{
get
;
set
;
}
}
}
performance/Performance.Services/ConfigService.cs
View file @
fb5ddc2c
...
...
@@ -416,7 +416,11 @@ public void SaveDrugtypeHands(int allotId, SaveConfigData request)
{
var
json
=
JsonHelper
.
Serialize
(
item
);
var
data
=
JsonHelper
.
Deserialize
<
cof_drugtype
>(
json
);
drugs
.
Add
(
data
);
if
(!
string
.
IsNullOrEmpty
(
data
.
Charge
)||
!
string
.
IsNullOrEmpty
(
data
.
ChargeType
))
{
drugs
.
Add
(
data
);
}
}
_drugtypeRepository
.
Execute
(
"delete from cof_drugtype where allotid = @allotid"
,
new
{
allotId
});
...
...
@@ -546,7 +550,10 @@ public void SaveWorkItemHands(int allotId, SaveConfigData request)
{
var
json
=
JsonHelper
.
Serialize
(
item
);
var
data
=
JsonHelper
.
Deserialize
<
cof_workitem
>(
json
);
works
.
Add
(
data
);
if
(!
string
.
IsNullOrEmpty
(
data
.
Item
))
{
works
.
Add
(
data
);
}
}
_workitemRepository
.
Execute
(
"delete from cof_workitem where allotid = @allotid"
,
new
{
allotId
});
...
...
@@ -668,7 +675,7 @@ public void SaveDepttypeHands(int allotId, SaveConfigData request)
{
var
json
=
JsonHelper
.
Serialize
(
item
);
var
data
=
JsonHelper
.
Deserialize
<
cof_depttype
>(
json
);
if
(
data
.
Charge
!=
null
&&
data
.
ChargeType
!=
null
)
if
(
!
string
.
IsNullOrEmpty
(
data
.
Charge
)
||
!
string
.
IsNullOrEmpty
(
data
.
ChargeType
)
)
{
depts
.
Add
(
data
);
}
...
...
performance/Performance.Services/PersonService.cs
View file @
fb5ddc2c
...
...
@@ -568,5 +568,248 @@ public object DeptIncomeDetail(WorkDetailRequest request, int userId)
return
new
string
[]
{
};
}
public
HandsonTable
GetDepartmentHands
(
int
hospitalId
)
{
HandsonTable
handson
=
new
HandsonTable
((
int
)
SheetType
.
Unidentifiable
,
DeptDic
.
Select
(
c
=>
c
.
Value
).
ToArray
(),
DeptDic
.
Select
(
t
=>
new
collect_permission
{
HeadName
=
t
.
Value
,
Visible
=
1
,
Readnoly
=
0
}).
ToList
());
if
(
handson
.
Columns
!=
null
&&
handson
.
Columns
.
Any
())
{
foreach
(
var
column
in
handson
.
Columns
)
{
if
(
column
.
Data
==
"标准科室"
)
{
column
.
Type
=
"autocomplete"
;
column
.
Source
=
DeptDics
(
hospitalId
,
2
).
Select
(
c
=>
c
.
Value
).
ToArray
();
column
.
Strict
=
true
;
}
if
(
column
.
Data
==
"系统科室"
)
{
column
.
Type
=
"autocomplete"
;
column
.
Source
=
DeptDics
(
hospitalId
,
1
).
Select
(
c
=>
c
.
Value
).
ToArray
();
column
.
Strict
=
true
;
}
if
(
new
[]
{
"住院·核算单元医生组"
,
"住院·核算单元医生组"
,
"住院·核算单元医技组"
,
"门诊·核算单元医生组"
,
"门诊·核算单元护理组"
,
"门诊·核算单元医技组"
}.
Contains
(
column
.
Data
))
{
column
.
Type
=
"autocomplete"
;
column
.
Source
=
DeptDics
(
hospitalId
,
3
).
Select
(
c
=>
c
.
Value
).
ToArray
();
column
.
Strict
=
true
;
}
if
(
column
.
Data
==
"行政后勤"
)
{
column
.
Type
=
"autocomplete"
;
column
.
Source
=
DeptDics
(
hospitalId
,
4
).
Select
(
c
=>
c
.
Value
).
ToArray
();
column
.
Strict
=
true
;
}
if
(
column
.
Data
==
"特殊核算组"
)
{
column
.
Type
=
"autocomplete"
;
column
.
Source
=
DeptDics
(
hospitalId
,
5
).
Select
(
c
=>
c
.
Value
).
ToArray
();
column
.
Strict
=
true
;
}
}
}
var
getDept
=
GetDepartments
(
hospitalId
);
var
rowDatas
=
DeptHandsonRowData
(
getDept
);
handson
.
SetRowData
(
rowDatas
,
rowDatas
!=
null
);
return
handson
;
}
private
List
<
HandsonRowData
>
DeptHandsonRowData
(
IEnumerable
<
DeptdicResponse
>
getDept
)
{
if
(
getDept
==
null
)
return
null
;
List
<
HandsonRowData
>
rowDatas
=
new
List
<
HandsonRowData
>();
int
i
=
0
;
foreach
(
var
item
in
getDept
)
{
DeptdicResponse
tempDept
=
new
DeptdicResponse
()
{
Department
=
item
.
Department
,
HISDeptName
=
item
.
HISDeptName
,
HospitalId
=
item
.
HospitalId
};
var
temp
=
JsonHelper
.
Serialize
(
tempDept
);
var
tempDic
=
JsonHelper
.
Deserialize
<
Dictionary
<
string
,
Object
>>(
temp
);
tempDic
.
Add
(
nameof
(
item
.
InpatNurseAccounting
),
item
.
InpatNurseAccounting
.
AccountingUnit
);
tempDic
.
Add
(
nameof
(
item
.
InpatDoctorAccounting
),
item
.
InpatDoctorAccounting
.
AccountingUnit
);
tempDic
.
Add
(
nameof
(
item
.
InpatTechnicAccounting
),
item
.
InpatTechnicAccounting
.
AccountingUnit
);
tempDic
.
Add
(
nameof
(
item
.
OutNurseAccounting
),
item
.
OutNurseAccounting
.
AccountingUnit
);
tempDic
.
Add
(
nameof
(
item
.
OutTechnicAccounting
),
item
.
OutTechnicAccounting
.
AccountingUnit
);
tempDic
.
Add
(
nameof
(
item
.
OutDoctorAccounting
),
item
.
OutDoctorAccounting
.
AccountingUnit
);
tempDic
.
Add
(
nameof
(
item
.
LogisticsAccounting
),
item
.
LogisticsAccounting
.
AccountingUnit
);
;
tempDic
.
Add
(
nameof
(
item
.
SpecialAccounting
),
item
.
SpecialAccounting
.
AccountingUnit
);
var
cells
=
(
from
conf
in
DeptDic
join
fst
in
tempDic
on
conf
.
Key
.
ToUpper
()
equals
fst
.
Key
.
ToUpper
()
select
new
HandsonCellData
(
conf
.
Value
,
fst
.
Value
)).
ToList
();
rowDatas
.
Add
(
new
HandsonRowData
(
i
,
cells
));
}
return
rowDatas
;
}
public
void
SaveDeptDicHands
(
int
HospitalId
,
SaveConfigData
request
)
{
var
dicData
=
CreateDataRow
(
HospitalId
,
request
,
DeptDic
);
List
<
per_dept_dic
>
deptDics
=
new
List
<
per_dept_dic
>();
foreach
(
var
dic
in
dicData
)
{
var
json
=
JsonHelper
.
Serialize
(
dic
);
var
data
=
JsonHelper
.
Deserialize
<
DeptdicHands
>(
json
);
var
ss
=
""
;
if
(!
string
.
IsNullOrEmpty
(
data
.
Department
)||
!
string
.
IsNullOrEmpty
(
data
.
HISDeptName
))
{
DeptDicList
(
HospitalId
,
deptDics
,
data
);
}
perdeptdicRepository
.
Execute
(
"delete from per_dept_dic where HospitalId = @HospitalId"
,
new
{
HospitalId
});
perdeptdicRepository
.
AddRange
(
deptDics
.
ToArray
());
}
}
private
List
<
Dictionary
<
string
,
string
>>
CreateDataRow
(
int
HospitalId
,
SaveConfigData
request
,
Dictionary
<
string
,
string
>
config
)
{
List
<
Dictionary
<
string
,
string
>>
allData
=
new
List
<
Dictionary
<
string
,
string
>>();
for
(
int
r
=
0
;
r
<
request
.
Data
.
Length
;
r
++)
{
// 创建固定数据列
Dictionary
<
string
,
string
>
baseData
=
CreateBaseData
(
request
,
config
,
r
);
//baseData.Add(nameof(collect_data), HospitalId.ToString());
allData
.
Add
(
baseData
);
}
return
allData
;
}
private
Dictionary
<
string
,
string
>
CreateBaseData
(
SaveConfigData
request
,
Dictionary
<
string
,
string
>
config
,
int
rownumber
)
{
Dictionary
<
string
,
string
>
result
=
new
Dictionary
<
string
,
string
>();
for
(
int
c
=
0
;
c
<
request
.
ColHeaders
.
Length
;
c
++)
{
var
header
=
request
.
ColHeaders
[
c
];
var
first
=
config
.
FirstOrDefault
(
w
=>
w
.
Value
==
header
);
if
(!
default
(
KeyValuePair
<
string
,
string
>).
Equals
(
first
)
&&
!
result
.
ContainsKey
(
header
)
&&
request
.
Data
[
rownumber
].
Length
>
c
)
{
result
.
Add
(
first
.
Key
,
request
.
Data
[
rownumber
][
c
]);
}
}
return
result
;
}
private
void
DeptDicList
(
int
HospitalId
,
List
<
per_dept_dic
>
deptDics
,
DeptdicHands
data
)
{
var
nowTime
=
Convert
.
ToDateTime
(
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd hh:mm:ss"
));
#
region
住院
if
(
data
.
InpatDoctorAccounting
!=
""
||
data
.
InpatNurseAccounting
!=
""
||
data
.
InpatTechnicAccounting
!=
""
)
{
per_dept_dic
deptDic
=
new
per_dept_dic
()
{
Source
=
"住院"
,
HospitalId
=
HospitalId
,
Department
=
data
.
Department
,
HISDeptName
=
data
.
HISDeptName
,
CreateTime
=
nowTime
};
if
(
data
.
InpatDoctorAccounting
!=
""
)
{
deptDic
.
AccountingUnit
=
data
.
InpatDoctorAccounting
;
deptDic
.
UnitType
=
"医生组"
;
deptDics
.
Add
(
deptDic
);
}
if
(
data
.
InpatNurseAccounting
!=
""
)
{
deptDic
.
AccountingUnit
=
data
.
InpatNurseAccounting
;
deptDic
.
UnitType
=
"护理组"
;
deptDics
.
Add
(
deptDic
);
}
if
(
data
.
InpatTechnicAccounting
!=
""
)
{
deptDic
.
AccountingUnit
=
data
.
InpatTechnicAccounting
;
deptDic
.
UnitType
=
"医技组"
;
deptDics
.
Add
(
deptDic
);
}
}
#
endregion
#
region
门诊
if
(
data
.
OutDoctorAccounting
!=
""
||
data
.
OutNurseAccounting
!=
""
||
data
.
OutTechnicAccounting
!=
""
)
{
per_dept_dic
deptDic
=
new
per_dept_dic
()
{
Source
=
"门诊"
,
HospitalId
=
HospitalId
,
Department
=
data
.
Department
,
HISDeptName
=
data
.
HISDeptName
,
CreateTime
=
nowTime
};
if
(
data
.
OutDoctorAccounting
!=
""
)
{
deptDic
.
AccountingUnit
=
data
.
OutDoctorAccounting
;
deptDic
.
UnitType
=
"医生组"
;
deptDics
.
Add
(
deptDic
);
}
if
(
data
.
OutNurseAccounting
!=
""
)
{
deptDic
.
AccountingUnit
=
data
.
OutNurseAccounting
;
deptDic
.
UnitType
=
"护理组"
;
deptDics
.
Add
(
deptDic
);
}
if
(
data
.
OutTechnicAccounting
!=
""
)
{
deptDic
.
AccountingUnit
=
data
.
OutTechnicAccounting
;
deptDic
.
UnitType
=
"医技组"
;
deptDics
.
Add
(
deptDic
);
}
}
#
endregion
if
(
data
.
LogisticsAccounting
!=
""
)
{
per_dept_dic
deptDic
=
new
per_dept_dic
()
{
HospitalId
=
HospitalId
,
Department
=
data
.
Department
,
HISDeptName
=
data
.
HISDeptName
,
CreateTime
=
nowTime
,
AccountingUnit
=
data
.
LogisticsAccounting
,
UnitType
=
"行政后勤"
};
deptDics
.
Add
(
deptDic
);
}
if
(
data
.
SpecialAccounting
!=
""
)
{
per_dept_dic
deptDic
=
new
per_dept_dic
()
{
HospitalId
=
HospitalId
,
Department
=
data
.
Department
,
HISDeptName
=
data
.
HISDeptName
,
CreateTime
=
nowTime
,
AccountingUnit
=
data
.
LogisticsAccounting
,
UnitType
=
"特殊核算组"
};
deptDics
.
Add
(
deptDic
);
}
}
public
static
Dictionary
<
string
,
string
>
DeptDic
{
get
;
}
=
new
Dictionary
<
string
,
string
>
{
{
nameof
(
DeptdicResponse
.
Department
),
"标准科室"
},
{
nameof
(
DeptdicResponse
.
HISDeptName
),
"系统科室"
},
{
nameof
(
DeptdicResponse
.
InpatDoctorAccounting
),
"住院·核算单元医生组"
},
{
nameof
(
DeptdicResponse
.
InpatNurseAccounting
),
"住院·核算单元护理组"
},
{
nameof
(
DeptdicResponse
.
InpatTechnicAccounting
),
"住院·核算单元医技组"
},
{
nameof
(
DeptdicResponse
.
LogisticsAccounting
),
"行政后勤"
},
{
nameof
(
DeptdicResponse
.
OutDoctorAccounting
),
"门诊·核算单元医生组"
},
{
nameof
(
DeptdicResponse
.
OutNurseAccounting
),
"门诊·核算单元护理组"
},
{
nameof
(
DeptdicResponse
.
OutTechnicAccounting
),
"门诊·核算单元医技组"
},
{
nameof
(
DeptdicResponse
.
SpecialAccounting
),
"特殊核算组"
}
};
}
}
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