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
258012cb
Commit
258012cb
authored
Jan 13, 2023
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
月份天数判断
parent
e143c928
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
11 deletions
+12
-11
performance/Performance.Services/CopyService.cs
+2
-2
performance/Performance.Services/PersonService.cs
+4
-4
performance/Performance.Services/RedistributionService.cs
+3
-3
performance/Performance.Services/SecondAllot/SecondAllotDetails.cs
+2
-1
performance/Performance.Services/SecondAllot/SecondAllotService.cs
+1
-1
No files found.
performance/Performance.Services/CopyService.cs
View file @
258012cb
...
@@ -102,7 +102,7 @@ public void Copy_DrugTypeDisburses(per_allot allot, int prevAllotId, bool delHis
...
@@ -102,7 +102,7 @@ public void Copy_DrugTypeDisburses(per_allot allot, int prevAllotId, bool delHis
public
void
Copy_DrugTypeFactors
(
per_allot
allot
,
int
prevAllotId
,
bool
delHistotyData
=
false
)
public
void
Copy_DrugTypeFactors
(
per_allot
allot
,
int
prevAllotId
,
bool
delHistotyData
=
false
)
{
{
Copy_DrugTypes
(
allot
,
prevAllotId
,
delHistotyData
);
Copy_DrugTypes
(
allot
,
prevAllotId
,
delHistotyData
);
var
flag
=
delHistotyData
;
var
flag
=
delHistotyData
;
_logger
.
LogInformation
(
$"copy drugTypeFactors"
);
_logger
.
LogInformation
(
$"copy drugTypeFactors"
);
...
@@ -162,7 +162,7 @@ public void Copy_Agains(per_allot allot, int prevAllotId, bool delHistotyData =
...
@@ -162,7 +162,7 @@ public void Copy_Agains(per_allot allot, int prevAllotId, bool delHistotyData =
agains
=
_againRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
prevAllotId
)
??
_againRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
agains
=
_againRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
prevAllotId
)
??
_againRepository
.
GetEntities
(
t
=>
t
.
AllotID
==
-
1
);
if
(
agains
!=
null
&&
agains
.
Any
())
if
(
agains
!=
null
&&
agains
.
Any
())
{
{
var
days
=
DateTime
.
DaysInMonth
(
allot
.
Year
,
allot
.
Month
)
;
var
days
=
allot
.
Month
>=
1
&&
allot
.
Month
<=
12
?
DateTime
.
DaysInMonth
(
allot
.
Year
,
allot
.
Month
)
:
30
m
;
var
newAgains
=
agains
.
Select
(
t
=>
new
cof_again
var
newAgains
=
agains
.
Select
(
t
=>
new
cof_again
{
{
AllotID
=
allot
.
ID
,
AllotID
=
allot
.
ID
,
...
...
performance/Performance.Services/PersonService.cs
View file @
258012cb
...
@@ -105,7 +105,7 @@ public void CreateAllotPersons(int hospitalId, int allotId, int prevAllotId = -1
...
@@ -105,7 +105,7 @@ public void CreateAllotPersons(int hospitalId, int allotId, int prevAllotId = -1
if
(
persons
==
null
||
!
persons
.
Any
())
return
;
if
(
persons
==
null
||
!
persons
.
Any
())
return
;
int
day
=
DateTime
.
DaysInMonth
(
allot
.
Year
,
allot
.
Month
)
;
int
day
=
allot
.
Month
>=
1
&&
allot
.
Month
<=
12
?
DateTime
.
DaysInMonth
(
allot
.
Year
,
allot
.
Month
)
:
30
;
var
data
=
persons
.
Select
(
t
=>
var
data
=
persons
.
Select
(
t
=>
{
{
...
@@ -281,7 +281,7 @@ public ApiResponse CreatePerson(PerEmployeeResponse request)
...
@@ -281,7 +281,7 @@ public ApiResponse CreatePerson(PerEmployeeResponse request)
var
entity
=
_mapper
.
Map
<
per_employee
>(
request
);
var
entity
=
_mapper
.
Map
<
per_employee
>(
request
);
var
allot
=
perallotRepository
.
GetEntity
(
t
=>
t
.
ID
==
request
.
AllotId
);
var
allot
=
perallotRepository
.
GetEntity
(
t
=>
t
.
ID
==
request
.
AllotId
);
int
day
=
allot
.
Month
<=
12
?
DateTime
.
DaysInMonth
(
allot
.
Year
,
allot
.
Month
)
:
30
;
int
day
=
allot
.
Month
>=
1
&&
allot
.
Month
<=
12
?
DateTime
.
DaysInMonth
(
allot
.
Year
,
allot
.
Month
)
:
30
;
entity
.
Attendance
=
request
.
AttendanceDay
/
day
;
entity
.
Attendance
=
request
.
AttendanceDay
/
day
;
entity
.
CreateTime
=
DateTime
.
Now
;
entity
.
CreateTime
=
DateTime
.
Now
;
entity
.
IsVerify
=
1
;
entity
.
IsVerify
=
1
;
...
@@ -373,7 +373,7 @@ public ApiResponse UpdatePerson(PerEmployeeResponse request)
...
@@ -373,7 +373,7 @@ public ApiResponse UpdatePerson(PerEmployeeResponse request)
// 出勤率
// 出勤率
var
allot
=
perallotRepository
.
GetEntity
(
t
=>
t
.
ID
==
request
.
AllotId
);
var
allot
=
perallotRepository
.
GetEntity
(
t
=>
t
.
ID
==
request
.
AllotId
);
var
day
=
allot
.
Month
<=
12
?
(
decimal
)
DateTime
.
DaysInMonth
(
allot
.
Year
,
allot
.
Month
)
:
30
;
var
day
=
allot
.
Month
>=
1
&&
allot
.
Month
<=
12
?
DateTime
.
DaysInMonth
(
allot
.
Year
,
allot
.
Month
)
:
30
m
;
employee
.
Attendance
=
Math
.
Round
((
request
.
AttendanceDay
??
0
)
/
day
,
4
);
employee
.
Attendance
=
Math
.
Round
((
request
.
AttendanceDay
??
0
)
/
day
,
4
);
...
@@ -1277,7 +1277,7 @@ public bool ReloadPersonnel(int hospitalId, int allotId)
...
@@ -1277,7 +1277,7 @@ public bool ReloadPersonnel(int hospitalId, int allotId)
if
(
i
<=
0
)
if
(
i
<=
0
)
throw
new
PerformanceException
(
"加载失败,人员信息重置失败!"
);
throw
new
PerformanceException
(
"加载失败,人员信息重置失败!"
);
int
day
=
DateTime
.
DaysInMonth
(
allot
.
Year
,
allot
.
Month
)
;
int
day
=
allot
.
Month
>=
1
&&
allot
.
Month
<=
12
?
DateTime
.
DaysInMonth
(
allot
.
Year
,
allot
.
Month
)
:
30
;
var
data
=
persons
.
Select
(
t
=>
var
data
=
persons
.
Select
(
t
=>
{
{
var
entity
=
new
per_employee
var
entity
=
new
per_employee
...
...
performance/Performance.Services/RedistributionService.cs
View file @
258012cb
...
@@ -125,7 +125,7 @@ public SecondDetailDto Load(int secondId, ComputeMode computeMode, EmployeeSourc
...
@@ -125,7 +125,7 @@ public SecondDetailDto Load(int secondId, ComputeMode computeMode, EmployeeSourc
foreach
(
var
item
in
loadEmployees
)
foreach
(
var
item
in
loadEmployees
)
{
{
item
.
StaffCoefficient
=
item
.
StaffCoefficient
??
1
;
// 人员系数
item
.
StaffCoefficient
=
item
.
StaffCoefficient
??
1
;
// 人员系数
var
actualAttendance
=
(
allot
.
Month
>
0
&&
allot
.
Month
<
13
)
?
DateTime
.
DaysInMonth
(
allot
.
Year
,
allot
.
Month
)
:
30
;
var
actualAttendance
=
allot
.
Month
>=
1
&&
allot
.
Month
<=
12
?
DateTime
.
DaysInMonth
(
allot
.
Year
,
allot
.
Month
)
:
30
;
item
.
ActualAttendance
=
item
.
ActualAttendance
??
actualAttendance
;
// 出勤
item
.
ActualAttendance
=
item
.
ActualAttendance
??
actualAttendance
;
// 出勤
item
.
TitleCoefficient
=
item
.
TitleCoefficient
??
1
;
// 职称系数
item
.
TitleCoefficient
=
item
.
TitleCoefficient
??
1
;
// 职称系数
// 填报模板带出 行政工勤 绩效
// 填报模板带出 行政工勤 绩效
...
@@ -487,7 +487,7 @@ public void RowsExpand(per_allot allot, List<SecondColumnDictionary> dic, List<D
...
@@ -487,7 +487,7 @@ public void RowsExpand(per_allot allot, List<SecondColumnDictionary> dic, List<D
head
.
AddOrUpdate
(
nameof
(
ag_headsource
.
SeniorityTitlesAccountedPerformance
),
history
?.
SeniorityTitlesAccountedPerformance
??
titleRatio
);
head
.
AddOrUpdate
(
nameof
(
ag_headsource
.
SeniorityTitlesAccountedPerformance
),
history
?.
SeniorityTitlesAccountedPerformance
??
titleRatio
);
head
.
AddOrUpdate
(
nameof
(
ag_headsource
.
Workload_Ratio_Default
),
history
?.
Workload_Ratio_Default
??
workloadRatio
);
head
.
AddOrUpdate
(
nameof
(
ag_headsource
.
Workload_Ratio_Default
),
history
?.
Workload_Ratio_Default
??
workloadRatio
);
var
daysFullAttendance
=
(
allot
.
Month
>
0
&&
allot
.
Month
<
13
)
?
DateTime
.
DaysInMonth
(
allot
.
Year
,
allot
.
Month
)
:
30
;
var
daysFullAttendance
=
allot
.
Month
>=
1
&&
allot
.
Month
<=
12
?
DateTime
.
DaysInMonth
(
allot
.
Year
,
allot
.
Month
)
:
30
;
head
.
AddOrUpdate
(
nameof
(
ag_headsource
.
DaysFullAttendance
),
daysFullAttendance
);
head
.
AddOrUpdate
(
nameof
(
ag_headsource
.
DaysFullAttendance
),
daysFullAttendance
);
// 多工作量加载
// 多工作量加载
...
@@ -1681,7 +1681,7 @@ public object RedistributionEmployee(SecondEmployeeDto request)
...
@@ -1681,7 +1681,7 @@ public object RedistributionEmployee(SecondEmployeeDto request)
{
{
Func
<
per_employee
,
decimal
?>
getDistPerformance
=
(
emp
)
=>
0
;
Func
<
per_employee
,
decimal
?>
getDistPerformance
=
(
emp
)
=>
0
;
var
secondWorkload
=
GetSecondWorkloadByValue
(
second
.
AllotId
.
Value
,
second
.
UnitType
,
second
.
Department
);
var
secondWorkload
=
GetSecondWorkloadByValue
(
second
.
AllotId
.
Value
,
second
.
UnitType
,
second
.
Department
);
var
monthDays
=
(
allot
.
Month
>
0
&&
allot
.
Month
<
13
)
?
DateTime
.
DaysInMonth
(
allot
.
Year
,
allot
.
Month
)
:
30
;
var
monthDays
=
allot
.
Month
>=
1
&&
allot
.
Month
<=
12
?
DateTime
.
DaysInMonth
(
allot
.
Year
,
allot
.
Month
)
:
30
;
foreach
(
var
employee
in
employees
)
foreach
(
var
employee
in
employees
)
{
{
Dictionary
<
string
,
object
>
item
=
new
Dictionary
<
string
,
object
>();
Dictionary
<
string
,
object
>
item
=
new
Dictionary
<
string
,
object
>();
...
...
performance/Performance.Services/SecondAllot/SecondAllotDetails.cs
View file @
258012cb
...
@@ -484,7 +484,8 @@ private void SupplementFixedData(ag_secondallot secondAllot, List<BodyItem> body
...
@@ -484,7 +484,8 @@ private void SupplementFixedData(ag_secondallot secondAllot, List<BodyItem> body
var
days
=
bodyItems
.
FirstOrDefault
(
w
=>
w
.
RowNumber
==
-
1
&&
w
.
FiledName
==
"满勤天数"
);
var
days
=
bodyItems
.
FirstOrDefault
(
w
=>
w
.
RowNumber
==
-
1
&&
w
.
FiledName
==
"满勤天数"
);
if
(
days
!=
null
&&
string
.
IsNullOrEmpty
(
days
.
Value
))
if
(
days
!=
null
&&
string
.
IsNullOrEmpty
(
days
.
Value
))
days
.
Value
=
DateTime
.
DaysInMonth
(
secondAllot
.
Year
.
Value
,
secondAllot
.
Month
.
Value
).
ToString
();
days
.
Value
=
secondAllot
.
Year
.
Value
>=
1
&&
secondAllot
.
Month
.
Value
<=
12
?
DateTime
.
DaysInMonth
(
secondAllot
.
Year
.
Value
,
secondAllot
.
Month
.
Value
).
ToString
()
:
"30"
;
;
}
}
/// <summary>
/// <summary>
...
...
performance/Performance.Services/SecondAllot/SecondAllotService.cs
View file @
258012cb
...
@@ -54,7 +54,7 @@ public SecondAllotResponse GetSecondSavedData(int userId, int secondId, int empl
...
@@ -54,7 +54,7 @@ public SecondAllotResponse GetSecondSavedData(int userId, int secondId, int empl
PaymentOfTheMonth
=
$"
{
allot
.
Year
}
年
{
allot
.
Month
.
ToString
().
PadLeft
(
2
,
'0'
)}
月"
,
PaymentOfTheMonth
=
$"
{
allot
.
Year
}
年
{
allot
.
Month
.
ToString
().
PadLeft
(
2
,
'0'
)}
月"
,
SeniorityTitlesAccountedPerformance
=
0.2
m
,
SeniorityTitlesAccountedPerformance
=
0.2
m
,
Workload_Ratio_Default
=
0.8
m
,
Workload_Ratio_Default
=
0.8
m
,
DaysFullAttendance
=
DateTime
.
DaysInMonth
(
allot
.
Year
,
allot
.
Month
)
DaysFullAttendance
=
allot
.
Month
>=
1
&&
allot
.
Month
<=
12
?
DateTime
.
DaysInMonth
(
allot
.
Year
,
allot
.
Month
)
:
30
};
};
head
.
TotalDistPerformance
=
second
.
RealGiveFee
;
head
.
TotalDistPerformance
=
second
.
RealGiveFee
;
head
.
PaymentOfTheMonth
=
$"
{
allot
.
Year
}
年
{
allot
.
Month
.
ToString
().
PadLeft
(
2
,
'0'
)}
月"
;
head
.
PaymentOfTheMonth
=
$"
{
allot
.
Year
}
年
{
allot
.
Month
.
ToString
().
PadLeft
(
2
,
'0'
)}
月"
;
...
...
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