Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
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
9e6848e1
Commit
9e6848e1
authored
Mar 03, 2021
by
cq990612
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化代码结构
parent
7e4dc613
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
9 deletions
+10
-9
WorkHolidayServiceImpl.java
...ava/cn/wisenergy/service/impl/WorkHolidayServiceImpl.java
+3
-2
WorkProjectServiceImpl.java
...ava/cn/wisenergy/service/impl/WorkProjectServiceImpl.java
+5
-5
WorkTimeOrderServiceImpl.java
...a/cn/wisenergy/service/impl/WorkTimeOrderServiceImpl.java
+2
-2
No files found.
wisenergy-service/src/main/java/cn/wisenergy/service/impl/WorkHolidayServiceImpl.java
View file @
9e6848e1
...
...
@@ -14,11 +14,12 @@ import cn.wisenergy.service.WorkTypeService;
import
cn.wisenergy.service.utils.UserRoleLevelUtils
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.StringUtils
;
import
java.util.Calendar
;
import
java.util.Date
;
...
...
@@ -176,7 +177,7 @@ public class WorkHolidayServiceImpl implements WorkHolidayService {
/*if (null == workHoliday.getDayType()) {
throw new BaseCustomException(BASE_RESP_CODE_ENUM.INPUT_PARAM_IS_NULL);
}*/
if
(
StringUtils
.
is
Empty
(
workHoliday
.
getDes
()))
{
if
(
StringUtils
.
is
Blank
(
workHoliday
.
getDes
()))
{
throw
new
BaseCustomException
(
BASE_RESP_CODE_ENUM
.
INPUT_PARAM_IS_NULL
);
}
if
(
workHoliday
.
getDayStart
().
compareTo
(
workHoliday
.
getDayEnd
())
>
0
)
{
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/impl/WorkProjectServiceImpl.java
View file @
9e6848e1
...
...
@@ -219,7 +219,7 @@ public class WorkProjectServiceImpl implements WorkProjectService {
if
(
null
==
rank
)
{
rank
=
level
.
getRank
();
}
if
(
null
!=
rank
&&
rank
<
level
.
getRank
())
{
if
(
null
!=
rank
&&
rank
<
level
.
getRank
())
{
rank
=
level
.
getRank
();
}
}
...
...
@@ -335,8 +335,8 @@ public class WorkProjectServiceImpl implements WorkProjectService {
workProjectChange
.
setReason
(
modifyProjectVo
.
getStartTimeReason
());
workProjectChanges
.
add
(
workProjectChange
);
}
if
(
null
!=
modifyProjectVo
.
getEndTime
())
{
WorkProjectChange
workProjectChange
=
new
WorkProjectChange
();
if
(
null
!=
modifyProjectVo
.
getEndTime
())
{
WorkProjectChange
workProjectChange
=
new
WorkProjectChange
();
workProjectChange
.
setProjectId
(
modifyProjectVo
.
getProjectId
());
workProjectChange
.
setModifyTime
(
new
Date
());
workProjectChange
.
setChangeType
(
4
);
...
...
@@ -392,8 +392,8 @@ public class WorkProjectServiceImpl implements WorkProjectService {
if
(
null
==
createProjectVo
)
{
throw
new
BaseCustomException
(
BASE_RESP_CODE_ENUM
.
INPUT_PARAM_IS_NULL
);
}
if
(
null
==
createProjectVo
.
getManagerId
()
||
null
==
createProjectVo
.
getStartTime
()
||
null
==
createProjectVo
.
getEndTime
()
||
null
==
createProjectVo
.
getOaProjectId
(
)
||
null
==
createProjectVo
.
getWorkTime
()
||
null
==
createProjectVo
.
getCostBudget
()
||
null
==
createProjectVo
.
getProjectName
(
)
||
CollectionUtils
.
isEmpty
(
createProjectVo
.
getUserIds
())
||
null
==
createProjectVo
.
getDeptId
())
{
if
(
null
==
createProjectVo
.
getManagerId
()
||
null
==
createProjectVo
.
getStartTime
()
||
null
==
createProjectVo
.
getEndTime
()
||
StringUtils
.
isBlank
(
createProjectVo
.
getOaProjectId
()
)
||
null
==
createProjectVo
.
getWorkTime
()
||
null
==
createProjectVo
.
getCostBudget
()
||
StringUtils
.
isBlank
(
createProjectVo
.
getProjectName
()
)
||
CollectionUtils
.
isEmpty
(
createProjectVo
.
getUserIds
())
||
null
==
createProjectVo
.
getDeptId
())
{
throw
new
BaseCustomException
(
BASE_RESP_CODE_ENUM
.
INPUT_PARAM_IS_NULL
);
}
if
(
createProjectVo
.
getStartTime
().
compareTo
(
createProjectVo
.
getEndTime
())
>
0
)
{
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/impl/WorkTimeOrderServiceImpl.java
View file @
9e6848e1
...
...
@@ -26,8 +26,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
java.util.*
;
import
static
java
.
util
.
Collections
.*;
...
...
@@ -122,7 +122,7 @@ public class WorkTimeOrderServiceImpl implements WorkTimeOrderService {
@Override
public
SubtotalDto
getSubtotalReport
(
Integer
userId
,
Date
workDay
)
{
log
.
info
(
"WorkTimeOrderServiceImpl[]getSubtotalReport[]input.param.userId:{},workDay:{}"
+
userId
,
workDay
);
if
(
null
==
userId
||
StringUtils
.
isEmpty
(
workDay
)
)
{
if
(
null
==
userId
||
null
==
workDay
)
{
throw
new
BaseCustomException
(
BASE_RESP_CODE_ENUM
.
INPUT_PARAM_IS_NULL
);
}
...
...
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