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
0a2ec297
Commit
0a2ec297
authored
Jan 17, 2022
by
纪旭 韦
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
注释不必要的判断
parent
d0e6c66b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
performance/Performance.Services/PersonService.cs
+6
-6
No files found.
performance/Performance.Services/PersonService.cs
View file @
0a2ec297
...
@@ -748,12 +748,12 @@ public bool BathSavePerson(int AllotId, int HospitalId, SaveCollectData request)
...
@@ -748,12 +748,12 @@ public bool BathSavePerson(int AllotId, int HospitalId, SaveCollectData request)
var
json
=
JsonHelper
.
Serialize
(
item
);
var
json
=
JsonHelper
.
Serialize
(
item
);
var
data
=
JsonHelper
.
Deserialize
<
per_employee
>(
json
);
var
data
=
JsonHelper
.
Deserialize
<
per_employee
>(
json
);
if
(!
string
.
IsNullOrEmpty
(
item
[
"AttendanceDay"
])
&&
!
string
.
IsNullOrEmpty
(
item
[
"ReservedRatio"
]))
//
if (!string.IsNullOrEmpty(item["AttendanceDay"]) && !string.IsNullOrEmpty(item["ReservedRatio"]))
{
//
{
decimal
attendanceDay
=
ConvertHelper
.
To
<
decimal
>(
item
[
"AttendanceDay"
]),
reservedRatio
=
ConvertHelper
.
To
<
decimal
>(
item
[
"ReservedRatio"
]);
//
decimal attendanceDay = ConvertHelper.To<decimal>(item["AttendanceDay"]), reservedRatio = ConvertHelper.To<decimal>(item["ReservedRatio"]);
if
((!
Regex
.
IsMatch
(
item
[
"AttendanceDay"
],
"^(?:[0-2]*[0-9]?|30|31)$"
))
||
(!
Regex
.
IsMatch
(
item
[
"ReservedRatio"
],
@"^(0.\d{1,2}|0|1)?$"
)))
//
if ((!Regex.IsMatch(item["AttendanceDay"], "^(?:[0-2]*[0-9]?|30|31)$")) || (!Regex.IsMatch(item["ReservedRatio"], @"^(0.\d{1,2}|0|1)?$")))
return
false
;
//
return false;
}
//
}
var
any
=
employees
.
Any
(
w
=>
w
.
Department
?.
Trim
()
==
data
.
Department
?.
Trim
()
&&
w
.
DoctorName
?.
Trim
()
==
data
.
DoctorName
?.
Trim
());
var
any
=
employees
.
Any
(
w
=>
w
.
Department
?.
Trim
()
==
data
.
Department
?.
Trim
()
&&
w
.
DoctorName
?.
Trim
()
==
data
.
DoctorName
?.
Trim
());
...
...
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