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
e54426c5
Commit
e54426c5
authored
Mar 16, 2021
by
钟博
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '新增基础配置菜单' into 大屏优化录入
# Conflicts: # performance/Performance.Services/ConfigService.cs
parents
a7bc1fc7
a06fc030
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
384 additions
and
5 deletions
+384
-5
performance/Performance.Api/Controllers/ConfigController.cs
+30
-0
performance/Performance.Api/Controllers/ReportGlobalController.cs
+73
-0
performance/Performance.EntityModels/Context/PerformanceDbContext.cs
+3
-0
performance/Performance.EntityModels/Entity/cof_alias.cs
+17
-0
performance/Performance.Repository/Repository/PerforCofaliasRepository.cs
+12
-0
performance/Performance.Services/ConfigService.cs
+95
-5
performance/Performance.Services/ReportGlobalService.cs
+154
-0
No files found.
performance/Performance.Api/Controllers/ConfigController.cs
View file @
e54426c5
...
@@ -664,5 +664,34 @@ public ApiResponse SaveHrpDept(int hospitalId, int allotId, [FromBody] SaveConfi
...
@@ -664,5 +664,34 @@ public ApiResponse SaveHrpDept(int hospitalId, int allotId, [FromBody] SaveConfi
return
new
ApiResponse
(
ResponseType
.
OK
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
}
#
endregion
#
endregion
#
region
二次分配别名配置
/// <summary>
/// 获取二次分配别名配置
/// </summary>
/// <returns></returns>
[
Route
(
"secondaryAlias"
)]
[
HttpPost
]
public
ApiResponse
GetSecondaryAlias
()
{
var
relust
=
_configService
.
GetSecondaryAlias
();
return
new
ApiResponse
(
ResponseType
.
OK
,
relust
);
}
/// <summary>
/// 保存二次分配别名配置
/// </summary>
/// <returns></returns>
[
Route
(
"saveSecondaryAlias"
)]
[
HttpPost
]
public
ApiResponse
SaveSecondaryAlias
([
FromBody
]
SaveConfigData
request
)
{
_configService
.
SaveSecondaryAlias
(
request
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
#
endregion
}
}
}
}
\ No newline at end of file
performance/Performance.Api/Controllers/ReportGlobalController.cs
View file @
e54426c5
...
@@ -124,5 +124,78 @@ public ApiResponse Import(int hospitalId, [FromForm] IFormCollection form)
...
@@ -124,5 +124,78 @@ public ApiResponse Import(int hospitalId, [FromForm] IFormCollection form)
reportGlobalService
.
ImportAllotData
(
hospitalId
,
path
);
reportGlobalService
.
ImportAllotData
(
hospitalId
,
path
);
return
new
ApiResponse
(
ResponseType
.
OK
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
}
#
region
人员、科室标签配置
/// <summary>
/// 获取人员标签配置
/// </summary>
/// <param name="hospitalId"></param>
/// <returns></returns>
[
Route
(
"ReportPersonTag"
)]
[
HttpPost
]
public
ApiResponse
ReportPersonTag
(
int
hospitalId
)
{
if
(
hospitalId
<=
0
)
{
return
new
ApiResponse
(
ResponseType
.
Fail
,
"参数错误"
,
"hospitalId无效"
);
}
var
relust
=
reportGlobalService
.
GetReportPersonTag
(
hospitalId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
relust
);
}
/// <summary>
/// 保存科室标签配置
/// </summary>
/// <param name="hospitalId"></param>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"saveReportPersonTag"
)]
[
HttpPost
]
public
ApiResponse
SaveReportPersonTag
(
int
hospitalId
,[
FromBody
]
SaveCollectData
request
)
{
if
(
hospitalId
<=
0
)
{
return
new
ApiResponse
(
ResponseType
.
Fail
,
"参数错误"
,
"hospitalId无效"
);
}
reportGlobalService
.
SaveReportPersonTag
(
hospitalId
,
request
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
/// <summary>
/// 获取人员标签配置
/// </summary>
/// <param name="hospitalId"></param>
/// <returns></returns>
[
Route
(
"ReportTag"
)]
[
HttpPost
]
public
ApiResponse
ReportTag
(
int
hospitalId
)
{
if
(
hospitalId
<=
0
)
{
return
new
ApiResponse
(
ResponseType
.
Fail
,
"参数错误"
,
"hospitalId无效"
);
}
var
relust
=
reportGlobalService
.
GetReportTag
(
hospitalId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
relust
);
}
/// <summary>
/// 保存科室标签配置
/// </summary>
/// <param name="hospitalId"></param>
/// <param name="request"></param>
/// <returns></returns>
[
Route
(
"saveReportTag"
)]
[
HttpPost
]
public
ApiResponse
SaveReportTag
(
int
hospitalId
,
[
FromBody
]
SaveCollectData
request
)
{
if
(
hospitalId
<=
0
)
{
return
new
ApiResponse
(
ResponseType
.
Fail
,
"参数错误"
,
"hospitalId无效"
);
}
reportGlobalService
.
SaveReportTag
(
hospitalId
,
request
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
#
endregion
}
}
}
}
performance/Performance.EntityModels/Context/PerformanceDbContext.cs
View file @
e54426c5
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
using
Microsoft.EntityFrameworkCore
;
using
Microsoft.EntityFrameworkCore
;
using
Microsoft.EntityFrameworkCore.Metadata
;
using
Microsoft.EntityFrameworkCore.Metadata
;
using
System
;
using
System
;
using
Performance.EntityModels.Entity
;
namespace
Performance.EntityModels
namespace
Performance.EntityModels
{
{
...
@@ -52,6 +53,8 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
...
@@ -52,6 +53,8 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
public
virtual
DbSet
<
as_tempcolumns
>
as_tempcolumns
{
get
;
set
;
}
public
virtual
DbSet
<
as_tempcolumns
>
as_tempcolumns
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
public
virtual
DbSet
<
cof_again
>
cof_again
{
get
;
set
;
}
public
virtual
DbSet
<
cof_again
>
cof_again
{
get
;
set
;
}
/// <summary> </summary>
public
virtual
DbSet
<
cof_alias
>
cof_alias
{
get
;
set
;
}
/// <summary> 上传excel文件校验配置 </summary>
/// <summary> 上传excel文件校验配置 </summary>
public
virtual
DbSet
<
cof_check
>
cof_check
{
get
;
set
;
}
public
virtual
DbSet
<
cof_check
>
cof_check
{
get
;
set
;
}
/// <summary> </summary>
/// <summary> </summary>
...
...
performance/Performance.EntityModels/Entity/cof_alias.cs
0 → 100644
View file @
e54426c5
using
System.ComponentModel.DataAnnotations
;
using
System.ComponentModel.DataAnnotations.Schema
;
namespace
Performance.EntityModels.Entity
{
[
Table
(
"cof_alias"
)]
public
class
cof_alias
{
[
Key
]
public
int
Id
{
get
;
set
;
}
public
string
Route
{
get
;
set
;
}
public
string
Name
{
get
;
set
;
}
public
string
OriginalName
{
get
;
set
;
}
public
string
Alias
{
get
;
set
;
}
public
int
States
{
get
;
set
;
}
}
}
performance/Performance.Repository/Repository/PerforCofaliasRepository.cs
0 → 100644
View file @
e54426c5
using
Performance.EntityModels
;
using
Performance.EntityModels.Entity
;
namespace
Performance.Repository.Repository
{
public
class
PerforCofaliasRepository
:
PerforRepository
<
cof_alias
>
{
public
PerforCofaliasRepository
(
PerformanceDbContext
context
)
:
base
(
context
)
{
}
}
}
performance/Performance.Services/ConfigService.cs
View file @
e54426c5
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
using
System.Collections.Generic
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Linq
;
using
System.Text
;
using
System.Text
;
using
Performance.EntityModels.Entity
;
using
Performance.Repository.Repository
;
using
Performance.Repository.Repository
;
namespace
Performance.Services
namespace
Performance.Services
...
@@ -29,6 +30,7 @@ public class ConfigService : IAutoInjection
...
@@ -29,6 +30,7 @@ public class ConfigService : IAutoInjection
private
PerforPerapramountRepository
perapramountRepository
;
private
PerforPerapramountRepository
perapramountRepository
;
//private PerforCofcmiRepository perforCofcmiRepository;
//private PerforCofcmiRepository perforCofcmiRepository;
private
PerforCofHrpDeptRepository
perforCofHrpDeptRepository
;
private
PerforCofHrpDeptRepository
perforCofHrpDeptRepository
;
private
PerforCofaliasRepository
perforCofaliasRepository
;
private
PersonService
personService
;
private
PersonService
personService
;
private
LogManageService
logManageService
;
private
LogManageService
logManageService
;
private
ILogger
<
ConfigService
>
logger
;
private
ILogger
<
ConfigService
>
logger
;
...
@@ -46,6 +48,7 @@ public class ConfigService : IAutoInjection
...
@@ -46,6 +48,7 @@ public class ConfigService : IAutoInjection
PerforPerapramountRepository
perapramountRepository
,
PerforPerapramountRepository
perapramountRepository
,
//PerforCofcmiRepository perforCofcmiRepository,
//PerforCofcmiRepository perforCofcmiRepository,
PerforCofHrpDeptRepository
perforCofHrpDeptRepository
,
PerforCofHrpDeptRepository
perforCofHrpDeptRepository
,
PerforCofaliasRepository
perforCofaliasRepository
,
PersonService
personService
,
PersonService
personService
,
LogManageService
logManageService
,
LogManageService
logManageService
,
ILogger
<
ConfigService
>
logger
)
ILogger
<
ConfigService
>
logger
)
...
@@ -63,6 +66,7 @@ public class ConfigService : IAutoInjection
...
@@ -63,6 +66,7 @@ public class ConfigService : IAutoInjection
this
.
perapramountRepository
=
perapramountRepository
;
this
.
perapramountRepository
=
perapramountRepository
;
//this.perforCofcmiRepository = perforCofcmiRepository;
//this.perforCofcmiRepository = perforCofcmiRepository;
this
.
perforCofHrpDeptRepository
=
perforCofHrpDeptRepository
;
this
.
perforCofHrpDeptRepository
=
perforCofHrpDeptRepository
;
this
.
perforCofaliasRepository
=
perforCofaliasRepository
;
this
.
personService
=
personService
;
this
.
personService
=
personService
;
this
.
logManageService
=
logManageService
;
this
.
logManageService
=
logManageService
;
this
.
logger
=
logger
;
this
.
logger
=
logger
;
...
@@ -1076,6 +1080,8 @@ private void CopyAprData(int prevAllotId, int allotId)
...
@@ -1076,6 +1080,8 @@ private void CopyAprData(int prevAllotId, int allotId)
}
}
}
}
#
region
HRP
人员科室
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
...
@@ -1126,6 +1132,93 @@ public void SaveDepttypeHands(int hospitalId, int allotId,SaveConfigData request
...
@@ -1126,6 +1132,93 @@ public void SaveDepttypeHands(int hospitalId, int allotId,SaveConfigData request
perforCofHrpDeptRepository
.
AddRange
(
depts
.
ToArray
());
perforCofHrpDeptRepository
.
AddRange
(
depts
.
ToArray
());
}
}
public
static
Dictionary
<
string
,
string
>
HrpDept
{
get
;
}
=
new
Dictionary
<
string
,
string
>
{
{
nameof
(
cof_hrp_department
.
HRPDepartment
),
"hrp人员科室"
},
{
nameof
(
cof_hrp_department
.
AccountingUnit
),
"核算单元"
},
};
#
endregion
#
region
二次分配别名配置
public
HandsonTable
GetSecondaryAlias
()
{
var
result
=
new
HandsonTable
((
int
)
SheetType
.
Unidentifiable
,
Alias
.
Select
(
t
=>
t
.
Value
).
ToArray
(),
Alias
.
Select
(
t
=>
new
collect_permission
{
HeadName
=
t
.
Value
,
Visible
=
1
}).
ToList
());
if
(
result
.
Columns
!=
null
&&
result
.
Columns
.
Any
())
{
foreach
(
var
column
in
result
.
Columns
)
{
if
(
column
.
Data
==
"状态"
)
{
column
.
Type
=
"autocomplete"
;
column
.
Source
=
new
[]
{
"可用"
,
"禁用"
};
column
.
Strict
=
true
;
}
}
}
var
data
=
perforCofaliasRepository
.
GetEntities
()?.
OrderBy
(
t
=>
t
.
Route
);
if
(
data
==
null
)
return
result
;
List
<
HandsonRowData
>
rowDatas
=
new
List
<
HandsonRowData
>();
int
i
=
0
;
foreach
(
var
item
in
data
)
{
var
json
=
JsonHelper
.
Serialize
(
item
);
var
firstDic
=
JsonHelper
.
Deserialize
<
Dictionary
<
string
,
string
>>(
json
);
firstDic
[
"states"
]=
firstDic
[
"states"
]
==
"1"
?
"可用"
:
"禁用"
;
var
cells
=
(
from
conf
in
Alias
join
fst
in
firstDic
on
conf
.
Key
.
ToUpper
()
equals
fst
.
Key
.
ToUpper
()
select
new
HandsonCellData
(
conf
.
Value
,
fst
.
Value
)).
ToList
();
rowDatas
.
Add
(
new
HandsonRowData
(
i
,
cells
));
i
++;
}
result
.
SetRowData
(
rowDatas
,
rowDatas
!=
null
);
return
result
;
}
public
void
SaveSecondaryAlias
(
SaveConfigData
request
)
{
var
dicData
=
CreateDataRow
(
0
,
0
,
request
,
Alias
);
List
<
cof_alias
>
aliases
=
new
List
<
cof_alias
>();
foreach
(
var
item
in
dicData
)
{
var
states
=
new
[]
{
"可用"
,
"禁用"
};
if
(
item
[
"States"
]!=
null
&&
states
.
Contains
(
item
[
"States"
]))
{
item
[
"States"
]
=
item
[
"States"
]
==
"可用"
?
"1"
:
"0"
;
}
else
continue
;
var
json
=
JsonHelper
.
Serialize
(
item
);
var
data
=
JsonHelper
.
Deserialize
<
cof_alias
>(
json
);
if
(!
string
.
IsNullOrEmpty
(
data
.
Name
)
&&
!
string
.
IsNullOrEmpty
(
data
.
OriginalName
)&&
!
string
.
IsNullOrEmpty
(
data
.
Route
)
&&
!
string
.
IsNullOrEmpty
(
data
.
Alias
))
{
aliases
.
Add
(
data
);
}
}
perforCofaliasRepository
.
Execute
(
"delete from cof_alias"
,
null
);
perforCofaliasRepository
.
AddRange
(
aliases
.
ToArray
());
}
public
static
Dictionary
<
string
,
string
>
Alias
{
get
;
}
=
new
Dictionary
<
string
,
string
>
{
{
nameof
(
cof_alias
.
Route
),
"前端路由地址"
},
{
nameof
(
cof_alias
.
Name
),
"描述名称"
},
{
nameof
(
cof_alias
.
OriginalName
),
"原始名"
},
{
nameof
(
cof_alias
.
Alias
),
"别名"
},
{
nameof
(
cof_alias
.
States
),
"状态"
},
};
#
endregion
private
List
<
Dictionary
<
string
,
string
>>
CreateDataRow
(
int
hospitalId
,
int
allotId
,
SaveConfigData
request
,
Dictionary
<
string
,
string
>
config
)
private
List
<
Dictionary
<
string
,
string
>>
CreateDataRow
(
int
hospitalId
,
int
allotId
,
SaveConfigData
request
,
Dictionary
<
string
,
string
>
config
)
{
{
List
<
Dictionary
<
string
,
string
>>
allData
=
new
List
<
Dictionary
<
string
,
string
>>();
List
<
Dictionary
<
string
,
string
>>
allData
=
new
List
<
Dictionary
<
string
,
string
>>();
...
@@ -1162,11 +1255,7 @@ public void SaveDepttypeHands(int hospitalId, int allotId,SaveConfigData request
...
@@ -1162,11 +1255,7 @@ public void SaveDepttypeHands(int hospitalId, int allotId,SaveConfigData request
return
result
;
return
result
;
}
}
public
static
Dictionary
<
string
,
string
>
HrpDept
{
get
;
}
=
new
Dictionary
<
string
,
string
>
{
{
nameof
(
cof_hrp_department
.
HRPDepartment
),
"hrp人员科室"
},
{
nameof
(
cof_hrp_department
.
AccountingUnit
),
"核算单元"
},
};
public
static
Dictionary
<
string
,
string
>
DrueType
{
get
;
}
=
new
Dictionary
<
string
,
string
>
public
static
Dictionary
<
string
,
string
>
DrueType
{
get
;
}
=
new
Dictionary
<
string
,
string
>
{
{
{
nameof
(
cof_drugtype
.
Charge
),
"费用名称"
},
{
nameof
(
cof_drugtype
.
Charge
),
"费用名称"
},
...
@@ -1186,6 +1275,7 @@ public void SaveDepttypeHands(int hospitalId, int allotId,SaveConfigData request
...
@@ -1186,6 +1275,7 @@ public void SaveDepttypeHands(int hospitalId, int allotId,SaveConfigData request
};
};
///// <summary>
///// <summary>
///// CMI值
///// CMI值
///// </summary>
///// </summary>
...
...
performance/Performance.Services/ReportGlobalService.cs
View file @
e54426c5
...
@@ -520,5 +520,159 @@ private T GetCellValue<T>(IRow row, List<string> columns, string key)
...
@@ -520,5 +520,159 @@ private T GetCellValue<T>(IRow row, List<string> columns, string key)
};
};
#
endregion
ImportFile
&&
SaveData
#
endregion
ImportFile
&&
SaveData
#
region
人员、科室标签配置
public
HandsonTable
GetReportPersonTag
(
int
hospitalId
)
{
var
result
=
new
HandsonTable
((
int
)
SheetType
.
Unidentifiable
,
PersonTag
.
Select
(
t
=>
t
.
Value
).
ToArray
(),
PersonTag
.
Select
(
t
=>
new
collect_permission
{
HeadName
=
t
.
Value
,
Visible
=
1
}).
ToList
());
var
data
=
reportperformancepersontagsRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
)?.
OrderBy
(
t
=>
Convert
.
ToInt32
(
t
.
PersonnelNumber
));
if
(
data
==
null
)
return
result
;
List
<
HandsonRowData
>
rowDatas
=
new
List
<
HandsonRowData
>();
int
i
=
0
;
foreach
(
var
item
in
data
)
{
var
json
=
JsonHelper
.
Serialize
(
item
);
var
firstDic
=
JsonHelper
.
Deserialize
<
Dictionary
<
string
,
string
>>(
json
);
var
cells
=
(
from
conf
in
PersonTag
join
fst
in
firstDic
on
conf
.
Key
.
ToUpper
()
equals
fst
.
Key
.
ToUpper
()
select
new
HandsonCellData
(
conf
.
Value
,
fst
.
Value
)).
ToList
();
rowDatas
.
Add
(
new
HandsonRowData
(
i
,
cells
));
i
++;
}
result
.
SetRowData
(
rowDatas
,
rowDatas
!=
null
);
return
result
;
}
public
void
SaveReportPersonTag
(
int
hospitalId
,
SaveCollectData
request
)
{
var
dicData
=
CreateDataRow
(
hospitalId
,
request
,
PersonTag
);
List
<
report_performance_person_tags
>
personTags
=
new
List
<
report_performance_person_tags
>();
foreach
(
var
item
in
dicData
)
{
var
json
=
JsonHelper
.
Serialize
(
item
);
var
data
=
JsonHelper
.
Deserialize
<
report_performance_person_tags
>(
json
);
if
(!
string
.
IsNullOrEmpty
(
data
.
UnitType
)
&&
!
string
.
IsNullOrEmpty
(
data
.
AccountingUnit
)
&&
!
string
.
IsNullOrEmpty
(
data
.
PersonnelName
)
&&
!
string
.
IsNullOrEmpty
(
data
.
PersonnelNumber
)
&&
!
string
.
IsNullOrEmpty
(
data
.
Tag1
)
&&
!
string
.
IsNullOrEmpty
(
data
.
Tag2
))
{
data
.
CreateTime
=
Convert
.
ToDateTime
(
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
));
personTags
.
Add
(
data
);
}
}
reportperformancepersontagsRepository
.
Execute
(
"delete from report_performance_person_tags where HospitalId=@hospitalId"
,
new
{
hospitalId
});
reportperformancepersontagsRepository
.
AddRange
(
personTags
.
ToArray
());
}
public
HandsonTable
GetReportTag
(
int
hospitalId
)
{
var
result
=
new
HandsonTable
((
int
)
SheetType
.
Unidentifiable
,
ReportTag
.
Select
(
t
=>
t
.
Value
).
ToArray
(),
ReportTag
.
Select
(
t
=>
new
collect_permission
{
HeadName
=
t
.
Value
,
Visible
=
1
}).
ToList
());
var
data
=
reportperformancetagsRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
)?.
OrderBy
(
t
=>
t
.
UnitType
);
if
(
data
==
null
)
return
result
;
List
<
HandsonRowData
>
rowDatas
=
new
List
<
HandsonRowData
>();
int
i
=
0
;
foreach
(
var
item
in
data
)
{
var
json
=
JsonHelper
.
Serialize
(
item
);
var
firstDic
=
JsonHelper
.
Deserialize
<
Dictionary
<
string
,
string
>>(
json
);
var
cells
=
(
from
conf
in
ReportTag
join
fst
in
firstDic
on
conf
.
Key
.
ToUpper
()
equals
fst
.
Key
.
ToUpper
()
select
new
HandsonCellData
(
conf
.
Value
,
fst
.
Value
)).
ToList
();
rowDatas
.
Add
(
new
HandsonRowData
(
i
,
cells
));
i
++;
}
result
.
SetRowData
(
rowDatas
,
rowDatas
!=
null
);
return
result
;
}
public
void
SaveReportTag
(
int
hospitalId
,
SaveCollectData
request
)
{
var
dicData
=
CreateDataRow
(
hospitalId
,
request
,
PersonTag
);
List
<
report_performance_tags
>
report
=
new
List
<
report_performance_tags
>();
foreach
(
var
item
in
dicData
)
{
var
json
=
JsonHelper
.
Serialize
(
item
);
var
data
=
JsonHelper
.
Deserialize
<
report_performance_tags
>(
json
);
if
(!
string
.
IsNullOrEmpty
(
data
.
UnitType
)
&&
!
string
.
IsNullOrEmpty
(
data
.
AccountingUnit
)
&&
!
string
.
IsNullOrEmpty
(
data
.
Tag1
)
&&
!
string
.
IsNullOrEmpty
(
data
.
Tag2
))
{
data
.
CreateTime
=
Convert
.
ToDateTime
(
DateTime
.
Now
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
));
report
.
Add
(
data
);
}
}
reportperformancetagsRepository
.
Execute
(
"delete from report_performance_tags where HospitalId=@hospitalId"
,
new
{
hospitalId
});
reportperformancetagsRepository
.
AddRange
(
report
.
ToArray
());
}
private
static
Dictionary
<
string
,
string
>
PersonTag
{
get
;
}
=
new
Dictionary
<
string
,
string
>
{
{
nameof
(
report_performance_person_tags
.
UnitType
),
"核算单元类型"
},
{
nameof
(
report_performance_person_tags
.
AccountingUnit
),
"科室"
},
{
nameof
(
report_performance_person_tags
.
PersonnelNumber
),
"工号"
},
{
nameof
(
report_performance_person_tags
.
PersonnelName
),
"姓名"
},
{
nameof
(
report_performance_person_tags
.
Tag1
),
"绩效发放情况"
},
{
nameof
(
report_performance_person_tags
.
Tag2
),
"当月绩效权重"
},
{
nameof
(
report_performance_person_tags
.
Tag3
),
"重点群体对比1"
},
{
nameof
(
report_performance_person_tags
.
Tag4
),
"重点群体对比2"
},
{
nameof
(
report_performance_person_tags
.
Tag5
),
"重点群体对比5"
},
};
public
static
Dictionary
<
string
,
string
>
ReportTag
{
get
;
}
=
new
Dictionary
<
string
,
string
>
{
{
nameof
(
report_performance_tags
.
UnitType
),
"核算单元类型"
},
{
nameof
(
report_performance_tags
.
AccountingUnit
),
"科室"
},
{
nameof
(
report_performance_tags
.
Tag1
),
"绩效发放情况"
},
{
nameof
(
report_performance_tags
.
Tag2
),
"当月绩效权重"
},
{
nameof
(
report_performance_tags
.
Tag3
),
"重点群体对比1"
},
{
nameof
(
report_performance_tags
.
Tag4
),
"重点群体对比2"
},
{
nameof
(
report_performance_tags
.
Tag5
),
"重点群体对比5"
},
};
private
List
<
Dictionary
<
string
,
string
>>
CreateDataRow
(
int
hospitalId
,
SaveCollectData
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
(
cof_hrp_department
.
HospitalId
),
hospitalId
.
ToString
());
allData
.
Add
(
baseData
);
}
return
allData
;
}
private
Dictionary
<
string
,
string
>
CreateBaseData
(
SaveCollectData
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
;
}
#
endregion
}
}
}
}
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