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
aa195381
Commit
aa195381
authored
Jul 27, 2021
by
钟博
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/重新加载人员字典' into develop
parents
adeefe39
55a85fed
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
99 additions
and
7 deletions
+99
-7
performance/Performance.Api/Controllers/PersonController.cs
+17
-0
performance/Performance.DtoModels/Response/ComputeResponse.cs
+0
-3
performance/Performance.EntityModels/Other/view_per_apr_amount.cs
+5
-1
performance/Performance.Services/ComputeService.cs
+1
-0
performance/Performance.Services/ConfigService.cs
+6
-3
performance/Performance.Services/PersonService.cs
+70
-0
No files found.
performance/Performance.Api/Controllers/PersonController.cs
View file @
aa195381
...
@@ -269,5 +269,22 @@ public ApiResponse SaveDeptHands(int hospitalId, SaveCollectData request)
...
@@ -269,5 +269,22 @@ public ApiResponse SaveDeptHands(int hospitalId, SaveCollectData request)
personService
.
SaveDeptDicHands
(
hospitalId
,
request
);
personService
.
SaveDeptDicHands
(
hospitalId
,
request
);
return
new
ApiResponse
(
ResponseType
.
OK
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
}
/// <summary>
/// 重新加载人员字典
/// </summary>
/// <param name="hospitalId"></param>
/// <param name="allotId"></param>
/// <returns></returns>
[
HttpPost
]
[
Route
(
"peson/{hospitalId}/reloadPersonnel/{allotId}"
)]
public
ApiResponse
ReloadPersonnel
(
int
hospitalId
,
int
allotId
)
{
var
result
=
personService
.
ReloadPersonnel
(
hospitalId
,
allotId
);
if
(
result
)
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
else
return
new
ApiResponse
(
ResponseType
.
Error
,
result
);
}
}
}
}
}
performance/Performance.DtoModels/Response/ComputeResponse.cs
View file @
aa195381
...
@@ -126,8 +126,5 @@ public ComputeResponse(string source, string accountingUnit, string employeeName
...
@@ -126,8 +126,5 @@ public ComputeResponse(string source, string accountingUnit, string employeeName
/// </summary>
/// </summary>
public
string
TitlePosition
{
get
;
set
;
}
public
string
TitlePosition
{
get
;
set
;
}
}
}
}
}
performance/Performance.EntityModels/Other/view_per_apr_amount.cs
View file @
aa195381
namespace
Performance.EntityModels
using
System
;
namespace
Performance.EntityModels
{
{
public
class
view_per_apr_amount
:
per_apr_amount
public
class
view_per_apr_amount
:
per_apr_amount
{
{
...
@@ -44,5 +46,7 @@ public view_per_total_amount(string unitType, string accountingUnit, string pers
...
@@ -44,5 +46,7 @@ public view_per_total_amount(string unitType, string accountingUnit, string pers
/// 是否被使用 默认false
/// 是否被使用 默认false
/// </summary>
/// </summary>
public
bool
Use
{
get
;
set
;
}
public
bool
Use
{
get
;
set
;
}
public
DateTime
AuditTime
{
get
;
set
;
}
}
}
}
}
performance/Performance.Services/ComputeService.cs
View file @
aa195381
...
@@ -902,6 +902,7 @@ public List<ComputeResponse> AllCompute(int allotId, int hospitalId, int isShowM
...
@@ -902,6 +902,7 @@ public List<ComputeResponse> AllCompute(int allotId, int hospitalId, int isShowM
item
.
JobCategory
=
emps
?.
JobCategory
??
""
;
item
.
JobCategory
=
emps
?.
JobCategory
??
""
;
item
.
Duty
=
emps
?.
Duty
??
""
;
item
.
Duty
=
emps
?.
Duty
??
""
;
item
.
TitlePosition
=
emps
?.
JobTitle
??
""
;
item
.
TitlePosition
=
emps
?.
JobTitle
??
""
;
// 人员信息使用人员字典中数据
// 人员信息使用人员字典中数据
if
(
isEmpDic
)
if
(
isEmpDic
)
{
{
...
...
performance/Performance.Services/ConfigService.cs
View file @
aa195381
...
@@ -1357,11 +1357,13 @@ public SheetExportResponse GetDrugtypeFactor(AllotDeptRequest request)
...
@@ -1357,11 +1357,13 @@ public SheetExportResponse GetDrugtypeFactor(AllotDeptRequest request)
{
{
new
Cell
{
CellType
=
"header"
,
CellValue
=
""
,
PointCell
=
0
,
MergeRow
=
1
,
MergeCell
=
1
},
new
Cell
{
CellType
=
"header"
,
CellValue
=
""
,
PointCell
=
0
,
MergeRow
=
1
,
MergeCell
=
1
},
new
Cell
{
CellType
=
"header"
,
CellValue
=
""
,
PointCell
=
1
,
MergeRow
=
1
,
MergeCell
=
1
},
new
Cell
{
CellType
=
"header"
,
CellValue
=
""
,
PointCell
=
1
,
MergeRow
=
1
,
MergeCell
=
1
},
new
Cell
{
CellType
=
"header"
,
CellValue
=
""
,
PointCell
=
2
,
MergeRow
=
1
,
MergeCell
=
1
},
};
};
var
cells
=
new
List
<
Cell
>
var
cells
=
new
List
<
Cell
>
{
{
new
Cell
{
CellType
=
"header"
,
CellValue
=
"项目小类(测算表)"
,
PointCell
=
0
,
MergeRow
=
1
,
MergeCell
=
1
},
new
Cell
{
CellType
=
"header"
,
CellValue
=
"序号"
,
PointCell
=
0
,
MergeRow
=
1
,
MergeCell
=
1
},
new
Cell
{
CellType
=
"header"
,
CellValue
=
"费用大类(大屏展示)"
,
PointCell
=
1
,
MergeRow
=
1
,
MergeCell
=
1
}
new
Cell
{
CellType
=
"header"
,
CellValue
=
"项目小类(测算表)"
,
PointCell
=
1
,
MergeRow
=
1
,
MergeCell
=
1
},
new
Cell
{
CellType
=
"header"
,
CellValue
=
"费用大类(大屏展示)"
,
PointCell
=
2
,
MergeRow
=
1
,
MergeCell
=
1
}
};
};
var
defaultColumns
=
new
Dictionary
<
string
,
string
>
var
defaultColumns
=
new
Dictionary
<
string
,
string
>
...
@@ -1374,7 +1376,7 @@ public SheetExportResponse GetDrugtypeFactor(AllotDeptRequest request)
...
@@ -1374,7 +1376,7 @@ public SheetExportResponse GetDrugtypeFactor(AllotDeptRequest request)
int
index
=
0
;
int
index
=
0
;
foreach
(
var
model
in
models
)
foreach
(
var
model
in
models
)
{
{
mergeCells
.
Add
(
new
Cell
{
CellType
=
"header"
,
CellValue
=
model
.
ModuleName
,
PointCell
=
2
+
index
*
3
,
MergeRow
=
1
,
MergeCell
=
defaultColumns
.
Count
});
mergeCells
.
Add
(
new
Cell
{
CellType
=
"header"
,
CellValue
=
model
.
ModuleName
,
PointCell
=
3
+
index
*
3
,
MergeRow
=
1
,
MergeCell
=
defaultColumns
.
Count
});
int
i
=
0
;
int
i
=
0
;
cells
.
AddRange
(
defaultColumns
.
Select
(
t
=>
cells
.
AddRange
(
defaultColumns
.
Select
(
t
=>
...
@@ -1419,6 +1421,7 @@ public SheetExportResponse GetDrugtypeFactor(AllotDeptRequest request)
...
@@ -1419,6 +1421,7 @@ public SheetExportResponse GetDrugtypeFactor(AllotDeptRequest request)
{
{
var
rowcells
=
new
List
<
Cell
>
var
rowcells
=
new
List
<
Cell
>
{
{
new
Cell
{
CellType
=
"body"
,
CellValue
=
index
+
1
,
PointCell
=
0
,
MergeRow
=
1
,
MergeCell
=
1
},
new
Cell
{
CellType
=
"body"
,
CellValue
=
charge
.
Charge
,
PointCell
=
0
,
MergeRow
=
1
,
MergeCell
=
1
},
new
Cell
{
CellType
=
"body"
,
CellValue
=
charge
.
Charge
,
PointCell
=
0
,
MergeRow
=
1
,
MergeCell
=
1
},
new
Cell
{
CellType
=
"body"
,
CellValue
=
charge
.
ChargeType
,
PointCell
=
1
,
MergeRow
=
1
,
MergeCell
=
1
},
new
Cell
{
CellType
=
"body"
,
CellValue
=
charge
.
ChargeType
,
PointCell
=
1
,
MergeRow
=
1
,
MergeCell
=
1
},
};
};
...
...
performance/Performance.Services/PersonService.cs
View file @
aa195381
...
@@ -1000,5 +1000,75 @@ public string GetPersonDictFile(int allotId, int userId)
...
@@ -1000,5 +1000,75 @@ public string GetPersonDictFile(int allotId, int userId)
}
}
return
filepath
;
return
filepath
;
}
}
public
bool
ReloadPersonnel
(
int
hospitalId
,
int
allotId
)
{
var
allotList
=
perallotRepository
.
GetEntities
(
w
=>
w
.
HospitalId
==
hospitalId
)?.
OrderBy
(
s
=>
s
.
Year
).
ThenBy
(
s
=>
s
.
Month
).
ToList
();
if
(
allotList
==
null
||
!
allotList
.
Any
())
throw
new
PerformanceException
(
"加载失败,绩效记录不存在!"
);
var
allot
=
allotList
.
FirstOrDefault
(
w
=>
w
.
ID
==
allotId
);
if
(
allot
==
null
)
throw
new
PerformanceException
(
"加载失败,绩效记录不存在!"
);
var
index
=
allotList
.
IndexOf
(
allot
);
if
(
index
==
0
)
throw
new
PerformanceException
(
"加载失败,绩效记录不存在!"
);
var
prevAllot
=
allotList
[
index
-
1
];
if
(
prevAllot
==
null
)
prevAllot
.
ID
=
-
1
;
var
persons
=
peremployeeRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
&&
t
.
AllotId
==
prevAllot
.
ID
);
if
(
persons
==
null
||
!
persons
.
Any
())
throw
new
PerformanceException
(
"加载失败,未查询到上月人员信息!"
);
var
i
=
peremployeeRepository
.
Execute
(
$@"DELETE FROM per_employee WHERE HospitalId=@HospitalId and AllotId=@AllotId;"
,
new
{
hospitalId
,
allotId
});
if
(
i
<=
0
)
throw
new
PerformanceException
(
"加载失败,人员信息重置失败!"
);
int
day
=
DateTime
.
DaysInMonth
(
allot
.
Year
,
allot
.
Month
);
var
data
=
persons
.
Select
(
t
=>
{
var
entity
=
new
per_employee
{
HospitalId
=
t
.
HospitalId
,
AllotId
=
allotId
,
AccountingUnit
=
t
.
AccountingUnit
,
Department
=
t
.
Department
,
DoctorName
=
t
.
DoctorName
,
JobCategory
=
t
.
JobCategory
,
Duty
=
t
.
Duty
,
JobTitle
=
t
.
JobTitle
,
UnitType
=
t
.
UnitType
,
AttendanceDay
=
day
,
Attendance
=
1
,
PermanentStaff
=
t
.
PermanentStaff
,
EfficiencyNumber
=
t
.
EfficiencyNumber
,
WorkTime
=
t
.
WorkTime
,
BirthDate
=
t
.
BirthDate
,
Age
=
t
.
Age
,
ReservedRatio
=
t
.
ReservedRatio
,
BankCard
=
t
.
BankCard
,
Remark
=
t
.
Remark
,
CreateTime
=
DateTime
.
Now
,
};
if
(!
string
.
IsNullOrEmpty
(
t
.
PersonnelNumber
)
&&
!
string
.
IsNullOrEmpty
(
t
.
JobNumber
))
{
entity
.
PersonnelNumber
=
t
.
PersonnelNumber
;
entity
.
JobNumber
=
t
.
JobNumber
;
}
else
{
string
number
=
!
string
.
IsNullOrEmpty
(
t
.
PersonnelNumber
)
?
t
.
PersonnelNumber
:
t
.
JobNumber
;
entity
.
PersonnelNumber
=
number
;
entity
.
JobNumber
=
number
;
}
return
entity
;
}).
ToList
();
SaveAllotPersons
(
data
);
return
true
;
}
}
}
}
}
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