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
9866be74
Commit
9866be74
authored
Mar 13, 2021
by
cq990612
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化代码结构
parent
a774a425
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
WorkProjectServiceImpl.java
...ava/cn/wisenergy/service/impl/WorkProjectServiceImpl.java
+16
-7
No files found.
wisenergy-service/src/main/java/cn/wisenergy/service/impl/WorkProjectServiceImpl.java
View file @
9866be74
...
@@ -367,8 +367,9 @@ public class WorkProjectServiceImpl implements WorkProjectService {
...
@@ -367,8 +367,9 @@ public class WorkProjectServiceImpl implements WorkProjectService {
workProjectChange
.
setProjectId
(
modifyProjectVo
.
getProjectId
());
workProjectChange
.
setProjectId
(
modifyProjectVo
.
getProjectId
());
workProjectChange
.
setModifyTime
(
new
Date
());
workProjectChange
.
setModifyTime
(
new
Date
());
workProjectChange
.
setChangeType
(
2
);
workProjectChange
.
setChangeType
(
2
);
if
(
null
!=
workProject
.
getWorkTime
())
{
workProjectChange
.
setModifyBefore
(
workProject
.
getWorkTime
().
toString
());
workProjectChange
.
setModifyBefore
(
workProject
.
getWorkTime
().
toString
());
}
workProjectChange
.
setModifyAfter
(
modifyProjectVo
.
getWorkTime
().
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
toString
());
workProjectChange
.
setModifyAfter
(
modifyProjectVo
.
getWorkTime
().
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
toString
());
workProjectChange
.
setReason
(
modifyProjectVo
.
getWorkTimeReason
());
workProjectChange
.
setReason
(
modifyProjectVo
.
getWorkTimeReason
());
workProjectChanges
.
add
(
workProjectChange
);
workProjectChanges
.
add
(
workProjectChange
);
...
@@ -378,7 +379,9 @@ public class WorkProjectServiceImpl implements WorkProjectService {
...
@@ -378,7 +379,9 @@ public class WorkProjectServiceImpl implements WorkProjectService {
workProjectChange
.
setProjectId
(
modifyProjectVo
.
getProjectId
());
workProjectChange
.
setProjectId
(
modifyProjectVo
.
getProjectId
());
workProjectChange
.
setModifyTime
(
new
Date
());
workProjectChange
.
setModifyTime
(
new
Date
());
workProjectChange
.
setChangeType
(
1
);
workProjectChange
.
setChangeType
(
1
);
workProjectChange
.
setModifyBefore
(
workProject
.
getCostBudget
().
toString
());
if
(
null
!=
workProject
.
getCostBudget
())
{
workProjectChange
.
setModifyBefore
(
workProject
.
getCostBudget
().
toString
());
}
workProjectChange
.
setModifyAfter
(
modifyProjectVo
.
getCostBudget
().
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
toString
());
workProjectChange
.
setModifyAfter
(
modifyProjectVo
.
getCostBudget
().
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
toString
());
workProjectChange
.
setReason
(
modifyProjectVo
.
getCostBudgetReason
());
workProjectChange
.
setReason
(
modifyProjectVo
.
getCostBudgetReason
());
workProjectChanges
.
add
(
workProjectChange
);
workProjectChanges
.
add
(
workProjectChange
);
...
@@ -559,9 +562,12 @@ public class WorkProjectServiceImpl implements WorkProjectService {
...
@@ -559,9 +562,12 @@ public class WorkProjectServiceImpl implements WorkProjectService {
if
(
StringUtils
.
isBlank
(
modifyProjectVo
.
getCostBudgetReason
()))
{
if
(
StringUtils
.
isBlank
(
modifyProjectVo
.
getCostBudgetReason
()))
{
throw
new
BaseCustomException
(
BASE_RESP_CODE_ENUM
.
REASON_CANNOT_BE_EMPTY
);
throw
new
BaseCustomException
(
BASE_RESP_CODE_ENUM
.
REASON_CANNOT_BE_EMPTY
);
}
}
if
(
workProject
.
getCostBudget
().
compareTo
(
modifyProjectVo
.
getCostBudget
())
==
0
)
{
if
(
null
!=
workProject
.
getCostBudget
())
{
throw
new
BaseCustomException
(
BASE_RESP_CODE_ENUM
.
theNewContent_IsEqual_ToTheOriginal_Content
);
if
(
modifyProjectVo
.
getCostBudget
().
compareTo
(
workProject
.
getCostBudget
())
==
0
)
{
throw
new
BaseCustomException
(
BASE_RESP_CODE_ENUM
.
theNewContent_IsEqual_ToTheOriginal_Content
);
}
}
}
}
}
// 校验工时预算
// 校验工时预算
...
@@ -572,9 +578,12 @@ public class WorkProjectServiceImpl implements WorkProjectService {
...
@@ -572,9 +578,12 @@ public class WorkProjectServiceImpl implements WorkProjectService {
if
(
StringUtils
.
isBlank
(
modifyProjectVo
.
getWorkTimeReason
()))
{
if
(
StringUtils
.
isBlank
(
modifyProjectVo
.
getWorkTimeReason
()))
{
throw
new
BaseCustomException
(
BASE_RESP_CODE_ENUM
.
REASON_CANNOT_BE_EMPTY
);
throw
new
BaseCustomException
(
BASE_RESP_CODE_ENUM
.
REASON_CANNOT_BE_EMPTY
);
}
}
if
(
workProject
.
getWorkTime
().
compareTo
(
modifyProjectVo
.
getWorkTime
())
==
0
)
{
if
(
null
!=
workProject
.
getWorkTime
())
{
throw
new
BaseCustomException
(
BASE_RESP_CODE_ENUM
.
theNewContent_IsEqual_ToTheOriginal_Content
);
if
(
modifyProjectVo
.
getWorkTime
().
compareTo
(
workProject
.
getWorkTime
())
==
0
)
{
throw
new
BaseCustomException
(
BASE_RESP_CODE_ENUM
.
theNewContent_IsEqual_ToTheOriginal_Content
);
}
}
}
}
}
// 校验负责人
// 校验负责人
...
...
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