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
709e33a8
Commit
709e33a8
authored
Mar 18, 2021
by
cq990612
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化代码结构
parent
2d2986bc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
20 deletions
+16
-20
WorkProjectMapper.xml
...gy-mapper/src/main/resources/mapper/WorkProjectMapper.xml
+6
-0
WorkProjectServiceImpl.java
...ava/cn/wisenergy/service/impl/WorkProjectServiceImpl.java
+10
-20
No files found.
wisenergy-mapper/src/main/resources/mapper/WorkProjectMapper.xml
View file @
709e33a8
...
...
@@ -84,6 +84,12 @@
<if
test=
"null != businessName"
>
business_name = #{businessName},
</if>
<if
test=
"null != oaProjectId"
>
oa_project_id = #{oaProjectId},
</if>
<if
test=
"null != projectName"
>
project_name = #{projectName},
</if>
modify_time = now()
</set>
<where>
...
...
wisenergy-service/src/main/java/cn/wisenergy/service/impl/WorkProjectServiceImpl.java
View file @
709e33a8
...
...
@@ -286,14 +286,14 @@ public class WorkProjectServiceImpl implements WorkProjectService {
workProjectMapper
.
updateIsConclusionById
(
projectId
);
// 插入更变日志
List
<
WorkProjectChange
>
workProjectChanges
=
new
ArrayList
<>();
/*
List<WorkProjectChange> workProjectChanges = new ArrayList<>();
WorkProjectChange workProjectChange = new WorkProjectChange();
workProjectChange.setProjectId(projectId);
workProjectChange.setReviserId(userId);
workProjectChange.setModifyTime(new Date());
workProjectChange.setOperationType(3);
workProjectChanges.add(workProjectChange);
workProjectChangeService
.
insertbatch
(
workProjectChanges
);
workProjectChangeService.insertbatch(workProjectChanges);
*/
return
true
;
}
...
...
@@ -557,15 +557,15 @@ public class WorkProjectServiceImpl implements WorkProjectService {
}
// 插入参与人员信息
if
(!
CollectionUtils
.
isEmpty
(
createProjectVo
.
getUserIds
()))
{
workUserProjectService
.
insertBatch
(
createProjectVo
.
getUserIds
(),
workProject
.
getId
());
workUserProjectService
.
insertBatch
(
createProjectVo
.
getUserIds
(),
workProject
.
getId
());
}
// 插入更变日志
WorkProjectChange
workProjectChange
=
new
WorkProjectChange
();
/*
WorkProjectChange workProjectChange = new WorkProjectChange();
workProjectChange.setProjectId(workProject.getId());
workProjectChange.setReviserId(createProjectVo.getCreatorId());
workProjectChange.setModifyTime(new Date());
workProjectChange.setOperationType(1);
int
insert1
=
workProjectChangeMapper
.
insert
(
workProjectChange
);
int insert1 = workProjectChangeMapper.insert(workProjectChange);
*/
return
true
;
}
...
...
@@ -585,13 +585,13 @@ public class WorkProjectServiceImpl implements WorkProjectService {
private
void
verificationItem
(
ModifyProjectVo
modifyProjectVo
,
WorkProject
workProject
,
List
<
Integer
>
userIds
)
{
// 校验部门
if
(
null
!=
modifyProjectVo
.
getDeptId
(
))
{
if
(
!
workProject
.
getDeptId
().
equals
(
modifyProjectVo
.
getDeptId
()
))
{
if
(
StringUtils
.
isBlank
(
modifyProjectVo
.
getDeptIdReason
()))
{
throw
new
BaseCustomException
(
BASE_RESP_CODE_ENUM
.
REASON_CANNOT_BE_EMPTY
);
}
if
(
workProject
.
getDeptId
().
equals
(
modifyProjectVo
.
getDeptId
())
)
{
/* if (
) {
throw new BaseCustomException(BASE_RESP_CODE_ENUM.theNewContent_IsEqual_ToTheOriginal_Content);
}
}
*/
}
System
.
out
.
println
(
"1111111111"
);
...
...
@@ -649,26 +649,16 @@ public class WorkProjectServiceImpl implements WorkProjectService {
}
System
.
out
.
println
(
"4444444444"
);
// oa编号验证
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
(
null
!=
workProject
.
getOaProjectId
())
{
if
(
workProject
.
getOaProjectId
().
equals
(
modifyProjectVo
.
getOaProjectId
()))
{
throw
new
BaseCustomException
(
BASE_RESP_CODE_ENUM
.
theNewContent_IsEqual_ToTheOriginal_Content
);
}
}
}
// 项目名称验证
if
(!
StringUtils
.
isBlank
(
modifyProjectVo
.
getProjectName
()))
{
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
(
workProject
.
getProjectName
()))
{
if
(
workProject
.
getProjectName
().
equals
(
modifyProjectVo
.
getProjectName
()))
{
throw
new
BaseCustomException
(
BASE_RESP_CODE_ENUM
.
theNewContent_IsEqual_ToTheOriginal_Content
);
}
}
}
System
.
out
.
println
(
"555555555"
);
// 校验工时预算
...
...
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