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
ff53294f
Commit
ff53294f
authored
Mar 05, 2021
by
钟博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HRP人员科室hands
parent
59ce6d53
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
140 additions
and
0 deletions
+140
-0
performance/Performance.Api/Controllers/ConfigController.cs
+40
-0
performance/Performance.EntityModels/Context/PerformanceDbContext.cs
+2
-0
performance/Performance.EntityModels/Entity/cof_hrp_department.cs
+44
-0
performance/Performance.Repository/Repository/PerforCofHrpDeptRepository.cs
+15
-0
performance/Performance.Services/ConfigService.cs
+39
-0
No files found.
performance/Performance.Api/Controllers/ConfigController.cs
View file @
ff53294f
...
...
@@ -535,5 +535,44 @@ public ApiResponse WorkHeader([CustomizeValidator(RuleSet = "Select"), FromBody]
var
list
=
_configService
.
WorkHeader
(
request
.
AllotID
);
return
new
ApiResponse
(
ResponseType
.
OK
,
"ok"
,
list
);
}
#
region
HRP
人员科室
/// <summary>
/// 获取HRP人员科室
/// </summary>
/// <param name="hospitalId"></param>
/// <param name="allotId"></param>
/// <returns></returns>
[
Route
(
"hrpdepthands/{hospitalId}/allot/{allotId}"
)]
[
HttpPost
]
public
ApiResponse
GetHrpDeptHands
([
FromRoute
]
int
hospitalId
,
int
allotId
)
{
if
(
hospitalId
<=
0
)
return
new
ApiResponse
(
ResponseType
.
Fail
,
"参数错误"
,
"HospitalId无效"
);
if
(
allotId
<=
0
)
return
new
ApiResponse
(
ResponseType
.
Fail
,
"参数错误"
,
"allotid无效"
);
var
relust
=
_configService
.
GetHrpDeptHands
(
hospitalId
,
allotId
);
return
new
ApiResponse
(
ResponseType
.
OK
,
relust
);
}
/// <summary>
/// 保存HRP人员科室
/// </summary>
/// <param name=""></param>
/// <returns></returns>
[
Route
(
"savehrpdept/{hospitalId}/allot/{allotId}"
)]
[
HttpPost
]
public
ApiResponse
SaveHrpDept
(
int
hospitalId
,
int
allotId
,
[
FromBody
]
SaveCollectData
request
)
{
if
(
hospitalId
<=
0
)
return
new
ApiResponse
(
ResponseType
.
Fail
,
"参数错误"
,
"HospitalId无效"
);
if
(
allotId
<=
0
)
return
new
ApiResponse
(
ResponseType
.
Fail
,
"参数错误"
,
"allotid无效"
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
#
endregion
}
}
\ No newline at end of file
performance/Performance.EntityModels/Context/PerformanceDbContext.cs
View file @
ff53294f
...
...
@@ -103,6 +103,8 @@ public PerformanceDbContext(DbContextOptions<PerformanceDbContext> options)
/// <summary> 工龄对应绩效系数配置 </summary>
public
virtual
DbSet
<
cof_workyear
>
cof_workyear
{
get
;
set
;
}
/// <summary> HRP人员科室 </summary>
public
virtual
DbSet
<
cof_hrp_department
>
cof_hrp_department
{
get
;
set
;
}
/// <summary> </summary>
public
virtual
DbSet
<
collect_data
>
collect_data
{
get
;
set
;
}
...
...
performance/Performance.EntityModels/Entity/cof_hrp_department.cs
0 → 100644
View file @
ff53294f
//-----------------------------------------------------------------------
// <copyright file=" cof_hrp_department.cs">
// * FileName: .cs
// </copyright>
//-----------------------------------------------------------------------
using
System
;
using
System.ComponentModel.DataAnnotations
;
using
System.ComponentModel.DataAnnotations.Schema
;
namespace
Performance.EntityModels
{
/// <summary>
///
/// </summary>
[
Table
(
"cof_hrp_department"
)]
public
class
cof_hrp_department
{
/// <summary>
///
/// </summary>
[
Key
]
public
int
Id
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
int
HospitalId
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
int
AllotId
{
get
;
set
;
}
/// <summary>
/// HRP人员科室
/// </summary>
public
string
HRPDepartment
{
get
;
set
;
}
/// <summary>
/// 核算单元
/// </summary>
public
string
AccountingUnit
{
get
;
set
;
}
}
}
performance/Performance.Repository/Repository/PerforCofHrpDeptRepository.cs
0 → 100644
View file @
ff53294f
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Performance.EntityModels
;
namespace
Performance.Repository.Repository
{
public
partial
class
PerforCofHrpDeptRepository
:
PerforRepository
<
cof_hrp_department
>
{
public
PerforCofHrpDeptRepository
(
PerformanceDbContext
context
)
:
base
(
context
)
{
}
}
}
performance/Performance.Services/ConfigService.cs
View file @
ff53294f
...
...
@@ -9,6 +9,7 @@
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
Performance.Repository.Repository
;
namespace
Performance.Services
{
...
...
@@ -27,6 +28,7 @@ public class ConfigService : IAutoInjection
private
PerforCofdepttypeRepository
perforCofdepttypeRepository
;
private
PerforPerapramountRepository
perapramountRepository
;
//private PerforCofcmiRepository perforCofcmiRepository;
private
PerforCofHrpDeptRepository
perforCofHrpDeptRepository
;
private
PersonService
personService
;
private
LogManageService
logManageService
;
private
ILogger
<
ConfigService
>
logger
;
...
...
@@ -43,6 +45,7 @@ public class ConfigService : IAutoInjection
PerforCofdepttypeRepository
perforCofdepttypeRepository
,
PerforPerapramountRepository
perapramountRepository
,
//PerforCofcmiRepository perforCofcmiRepository,
PerforCofHrpDeptRepository
perforCofHrpDeptRepository
,
PersonService
personService
,
LogManageService
logManageService
,
ILogger
<
ConfigService
>
logger
)
...
...
@@ -59,6 +62,7 @@ public class ConfigService : IAutoInjection
this
.
perforCofdepttypeRepository
=
perforCofdepttypeRepository
;
this
.
perapramountRepository
=
perapramountRepository
;
//this.perforCofcmiRepository = perforCofcmiRepository;
this
.
perforCofHrpDeptRepository
=
perforCofHrpDeptRepository
;
this
.
personService
=
personService
;
this
.
logManageService
=
logManageService
;
this
.
logger
=
logger
;
...
...
@@ -834,6 +838,41 @@ private void CopyAprData(int prevAllotId, 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
{
HeadName
=
t
.
Value
,
Visible
=
1
}).
ToList
());
var
data
=
perforCofHrpDeptRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
HospitalId
&&
t
.
AllotId
==
AllotId
);
if
(
data
==
null
)
return
result
;
List
<
HandsonRowData
>
rowDatas
=
new
List
<
HandsonRowData
>();
int
i
=
1
;
foreach
(
var
item
in
data
)
{
var
json
=
JsonHelper
.
Serialize
(
item
);
var
firstDic
=
JsonHelper
.
Deserialize
<
Dictionary
<
string
,
string
>>(
json
);
var
cells
=
(
from
conf
in
HrpDept
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
static
Dictionary
<
string
,
string
>
HrpDept
{
get
;
}
=
new
Dictionary
<
string
,
string
>
{
{
nameof
(
cof_hrp_department
.
HRPDepartment
),
"HRP人员科室"
},
{
nameof
(
cof_hrp_department
.
AccountingUnit
),
"核算单元"
},
};
///// <summary>
///// CMI值
///// </summary>
...
...
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