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
be48dd2a
Commit
be48dd2a
authored
Mar 18, 2021
by
cq990612
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化代码结构
parent
709e33a8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
17 deletions
+18
-17
WorkProjectServiceImpl.java
...ava/cn/wisenergy/service/impl/WorkProjectServiceImpl.java
+18
-17
No files found.
wisenergy-service/src/main/java/cn/wisenergy/service/impl/WorkProjectServiceImpl.java
View file @
be48dd2a
...
...
@@ -589,12 +589,9 @@ public class WorkProjectServiceImpl implements WorkProjectService {
if
(
StringUtils
.
isBlank
(
modifyProjectVo
.
getDeptIdReason
()))
{
throw
new
BaseCustomException
(
BASE_RESP_CODE_ENUM
.
REASON_CANNOT_BE_EMPTY
);
}
/* if () {
throw new BaseCustomException(BASE_RESP_CODE_ENUM.theNewContent_IsEqual_ToTheOriginal_Content);
}*/
}
System
.
out
.
println
(
"1111111111"
);
// 校验开始时间
if
(
null
!=
modifyProjectVo
.
getStartTime
())
{
if
(
StringUtils
.
isBlank
(
modifyProjectVo
.
getStartTimeReason
()))
{
...
...
@@ -613,7 +610,7 @@ public class WorkProjectServiceImpl implements WorkProjectService {
throw
new
BaseCustomException
(
BASE_RESP_CODE_ENUM
.
theNewContent_IsEqual_ToTheOriginal_Content
);
}
}
System
.
out
.
println
(
"22222222"
);
// 校验结束时间
if
(
null
!=
modifyProjectVo
.
getEndTime
())
{
if
(
StringUtils
.
isBlank
(
modifyProjectVo
.
getEndTimeReason
()))
{
...
...
@@ -632,7 +629,7 @@ public class WorkProjectServiceImpl implements WorkProjectService {
throw
new
BaseCustomException
(
BASE_RESP_CODE_ENUM
.
theNewContent_IsEqual_ToTheOriginal_Content
);
}
}
System
.
out
.
println
(
"33333333333"
);
// 校验成本预算
if
(
null
!=
modifyProjectVo
.
getCostBudget
())
{
if
(
BigDecimal
.
ZERO
.
compareTo
(
modifyProjectVo
.
getCostBudget
())
>
0
)
{
...
...
@@ -647,20 +644,25 @@ public class WorkProjectServiceImpl implements WorkProjectService {
}
}
}
System
.
out
.
println
(
"4444444444"
);
// oa编号验证
if
(!
modifyProjectVo
.
getOaProjectId
().
equals
(
workProject
.
getOaProjectId
()))
{
if
(
StringUtils
.
isBlank
(
modifyProjectVo
.
getOaProjectIdReason
()))
{
throw
new
BaseCustomException
(
BASE_RESP_CODE_ENUM
.
REASON_CANNOT_BE_EMPTY
);
if
(!
StringUtils
.
isBlank
(
modifyProjectVo
.
getOaProjectId
()))
{
if
(!
modifyProjectVo
.
getOaProjectId
().
equals
(
workProject
.
getOaProjectId
()))
{
if
(
StringUtils
.
isBlank
(
modifyProjectVo
.
getOaProjectIdReason
()))
{
throw
new
BaseCustomException
(
BASE_RESP_CODE_ENUM
.
REASON_CANNOT_BE_EMPTY
);
}
}
}
// 项目名称验证
if
(!
workProject
.
getProjectName
().
equals
(
modifyProjectVo
.
getProjectName
()))
{
if
(
StringUtils
.
isBlank
(
modifyProjectVo
.
getProjectNameReason
()))
{
throw
new
BaseCustomException
(
BASE_RESP_CODE_ENUM
.
REASON_CANNOT_BE_EMPTY
);
if
(!
StringUtils
.
isBlank
(
modifyProjectVo
.
getProjectName
()))
{
if
(!
modifyProjectVo
.
getProjectName
().
equals
(
workProject
.
getProjectName
()))
{
if
(
StringUtils
.
isBlank
(
modifyProjectVo
.
getProjectNameReason
()))
{
throw
new
BaseCustomException
(
BASE_RESP_CODE_ENUM
.
REASON_CANNOT_BE_EMPTY
);
}
}
}
System
.
out
.
println
(
"555555555"
);
// 校验工时预算
if
(
null
!=
modifyProjectVo
.
getWorkTime
())
{
if
(
BigDecimal
.
ZERO
.
compareTo
(
modifyProjectVo
.
getWorkTime
())
>
0
)
{
...
...
@@ -676,7 +678,6 @@ public class WorkProjectServiceImpl implements WorkProjectService {
}
}
System
.
out
.
println
(
"66666666666"
);
// 校验负责人
if
(!
workProject
.
getManagerId
().
equals
(
modifyProjectVo
.
getManagerId
()))
{
...
...
@@ -694,7 +695,7 @@ public class WorkProjectServiceImpl implements WorkProjectService {
throw
new
BaseCustomException
(
BASE_RESP_CODE_ENUM
.
NOADMIN_ISTRATIVE_RIGHTS
);
}
}
System
.
out
.
println
(
"7777777777"
);
if
(!(
userIds
.
containsAll
(
modifyProjectVo
.
getUserIds
())
&&
modifyProjectVo
.
getUserIds
().
containsAll
(
userIds
)))
{
...
...
@@ -702,7 +703,7 @@ public class WorkProjectServiceImpl implements WorkProjectService {
throw
new
BaseCustomException
(
BASE_RESP_CODE_ENUM
.
REASON_CANNOT_BE_EMPTY
);
}
}
System
.
out
.
println
(
"888888888"
);
}
}
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