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
be833ad9
Commit
be833ad9
authored
Apr 12, 2019
by
李承祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
人员新增修改时的工作时间修改
parent
41accef4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
performance/Performance.DtoModels/Request/EmployeeRequest.cs
+1
-1
performance/Performance.Services/EmployeeService.cs
+4
-1
No files found.
performance/Performance.DtoModels/Request/EmployeeRequest.cs
View file @
be833ad9
...
...
@@ -60,7 +60,7 @@ public class EmployeeRequest
/// <summary>
/// 参加工作时间
/// </summary>
public
Nullable
<
DateTime
>
WorkTime
{
get
;
set
;
}
public
string
WorkTime
{
get
;
set
;
}
/// <summary>
/// 考核得分率
...
...
performance/Performance.Services/EmployeeService.cs
View file @
be833ad9
...
...
@@ -53,6 +53,8 @@ public List<im_employee> GetEmployeeList(int allotId)
public
im_employee
Insert
(
EmployeeRequest
request
)
{
var
employee
=
Mapper
.
Map
<
im_employee
>(
request
);
if
(
string
.
IsNullOrEmpty
(
request
.
WorkTime
))
employee
.
WorkTime
=
null
;
perforImemployeeRepository
.
Add
(
employee
);
return
employee
;
}
...
...
@@ -64,6 +66,7 @@ public im_employee Insert(EmployeeRequest request)
/// <returns></returns>
public
im_employee
Update
(
EmployeeRequest
request
)
{
Nullable
<
DateTime
>
time
=
null
;
var
employee
=
perforImemployeeRepository
.
GetEntity
(
t
=>
t
.
ID
==
request
.
ID
);
if
(
employee
==
null
)
throw
new
PerformanceException
(
"该人员不存在"
);
...
...
@@ -75,7 +78,7 @@ public im_employee Update(EmployeeRequest request)
employee
.
FitPeople
=
request
.
FitPeople
;
employee
.
JobTitle
=
request
.
JobTitle
;
employee
.
PostCoefficient
=
request
.
PostCoefficient
;
employee
.
WorkTime
=
request
.
WorkTime
;
employee
.
WorkTime
=
string
.
IsNullOrEmpty
(
request
.
WorkTime
)
?
time
:
Convert
.
ToDateTime
(
request
.
WorkTime
)
;
employee
.
ScoreAverageRate
=
request
.
ScoreAverageRate
;
employee
.
Attendance
=
request
.
Attendance
;
employee
.
PeopleNumber
=
request
.
PeopleNumber
;
...
...
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