Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
work_service
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
licc
work_service
Commits
a6e004f8
Commit
a6e004f8
authored
Jan 29, 2021
by
cq990612
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化代码结构
parent
5f6bbdd9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
WorkTimeOrderDto.java
...rc/main/java/cn/wisenergy/model/dto/WorkTimeOrderDto.java
+1
-3
WorkTimeOrderServiceImpl.java
...a/cn/wisenergy/service/impl/WorkTimeOrderServiceImpl.java
+4
-4
No files found.
wisenergy-model/src/main/java/cn/wisenergy/model/dto/WorkTimeOrderDto.java
View file @
a6e004f8
...
@@ -61,7 +61,5 @@ public class WorkTimeOrderDto {
...
@@ -61,7 +61,5 @@ public class WorkTimeOrderDto {
@ApiModelProperty
(
name
=
"isOvertime"
,
value
=
"0:正常工时,1:加班"
)
@ApiModelProperty
(
name
=
"isOvertime"
,
value
=
"0:正常工时,1:加班"
)
private
Integer
isOvertime
;
private
Integer
isOvertime
;
@JsonFormat
(
shape
=
JsonFormat
.
Shape
.
STRING
,
pattern
=
"yyyy-MM-dd"
)
@ApiModelProperty
(
name
=
"modifyTime"
,
value
=
"工单修改时间"
)
private
Date
modifyTime
;
}
}
wisenergy-service/src/main/java/cn/wisenergy/service/impl/WorkTimeOrderServiceImpl.java
View file @
a6e004f8
...
@@ -238,7 +238,9 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService {
...
@@ -238,7 +238,9 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService {
}
}
if
(
REJECTED
.
equals
(
dto
.
getStatus
())
||
RE_SUBMIT
.
equals
(
dto
.
getStatus
()))
{
if
(
REJECTED
.
equals
(
dto
.
getStatus
())
||
RE_SUBMIT
.
equals
(
dto
.
getStatus
()))
{
if
(
date
.
getTime
()
-
dto
.
getModifyTime
().
getTime
()
>
submitTime
*
24
*
60
*
60
*
1000
)
{
Date
modifyTime
=
DateUtil
.
convertStrToDate
(
DateUtil
.
convertDateToStr
(
workTimeOrderMapper
.
selectById
(
dto
.
getWorkId
()).
getModifyTime
(),
"yyyy-MM-dd"
),
"yyyy-MM-dd"
);
System
.
out
.
println
(
modifyTime
);
if
(
date
.
getTime
()
-
modifyTime
.
getTime
()
>
submitTime
*
24
*
60
*
60
*
1000
)
{
throw
new
BaseCustomException
(
BASE_RESP_CODE_ENUM
.
WORK_DAY_THAN_DATE
);
throw
new
BaseCustomException
(
BASE_RESP_CODE_ENUM
.
WORK_DAY_THAN_DATE
);
}
}
}
}
...
@@ -768,9 +770,7 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService {
...
@@ -768,9 +770,7 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService {
if
(
thanDate
(
dto
.
getWorkDay
()))
{
if
(
thanDate
(
dto
.
getWorkDay
()))
{
throw
new
BaseCustomException
(
BASE_RESP_CODE_ENUM
.
WORK_TIME_OVER_NOW_DAY
);
throw
new
BaseCustomException
(
BASE_RESP_CODE_ENUM
.
WORK_TIME_OVER_NOW_DAY
);
}
}
if
(
1
==
dto
.
getType
()
||
2
==
dto
.
getType
()
&&
null
==
dto
.
getProjectId
())
{
throw
new
BaseCustomException
(
BASE_RESP_CODE_ENUM
.
NO_JOIN_EVERY_PROJECT_PLASE_JION
);
}
for
(
ProjectTypeEnum
value
:
ProjectTypeEnum
.
values
())
{
for
(
ProjectTypeEnum
value
:
ProjectTypeEnum
.
values
())
{
if
(
value
.
getReviewer
()
==
2
)
{
if
(
value
.
getReviewer
()
==
2
)
{
if
(
dto
.
getType
().
equals
(
value
.
getType
()))
{
if
(
dto
.
getType
().
equals
(
value
.
getType
()))
{
...
...
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