Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
yangxiujun
/
paidan_demo
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 70077aa4
authored
Oct 20, 2023
by
huangjinxin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:工作队支持修改归属站点
1 parent
5703ce12
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
13 deletions
project-order/src/main/java/com/dituhui/pea/order/service/impl/BusinessTeamServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/BusinessTeamServiceImpl.java
View file @
70077aa
...
@@ -12,6 +12,7 @@ import com.dituhui.pea.order.entity.OrgWarehouseInfoEntity;
...
@@ -12,6 +12,7 @@ import com.dituhui.pea.order.entity.OrgWarehouseInfoEntity;
import
com.dituhui.pea.order.service.BusinessTeamService
;
import
com.dituhui.pea.order.service.BusinessTeamService
;
import
com.dituhui.pea.order.service.CommonService
;
import
com.dituhui.pea.order.service.CommonService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageRequest
;
import
org.springframework.data.domain.PageRequest
;
...
@@ -173,6 +174,9 @@ public class BusinessTeamServiceImpl implements BusinessTeamService {
...
@@ -173,6 +174,9 @@ public class BusinessTeamServiceImpl implements BusinessTeamService {
if
(
req
.
getWarehouseId
()
!=
null
)
{
if
(
req
.
getWarehouseId
()
!=
null
)
{
entity
.
setWarehouseId
(
req
.
getWarehouseId
());
entity
.
setWarehouseId
(
req
.
getWarehouseId
());
}
}
if
(
StringUtils
.
isNotBlank
(
req
.
getGroupId
()))
{
entity
.
setGroupId
(
req
.
getGroupId
());
}
entity
.
setUpdateTime
(
LocalDateTime
.
now
());
entity
.
setUpdateTime
(
LocalDateTime
.
now
());
orgTeamDao
.
save
(
entity
);
orgTeamDao
.
save
(
entity
);
...
@@ -215,19 +219,19 @@ public class BusinessTeamServiceImpl implements BusinessTeamService {
...
@@ -215,19 +219,19 @@ public class BusinessTeamServiceImpl implements BusinessTeamService {
}
}
// 遍历新的关系映射,创建新的关系
// 遍历新的关系映射,创建新的关系
for
(
OrgTeamEngineerEntity
newRelation
:
newRelationsMap
.
values
())
{
for
(
OrgTeamEngineerEntity
newRelation
:
newRelationsMap
.
values
())
{
if
(!
existingRelations
.
contains
(
newRelation
))
{
if
(!
existingRelations
.
contains
(
newRelation
))
{
// 检查是否存在,已经存在的,只需要set status=1就可以了
// 检查是否存在,已经存在的,只需要set status=1就可以了
OrgTeamEngineerEntity
exist
=
orgTeamEngineerDao
.
findByTeamIdAndEngineerCode
(
newRelation
.
getTeamId
(),
OrgTeamEngineerEntity
exist
=
orgTeamEngineerDao
.
findByTeamIdAndEngineerCode
(
newRelation
.
getTeamId
(),
newRelation
.
getEngineerCode
());
newRelation
.
getEngineerCode
());
if
(
null
!=
exist
&&
exist
.
getId
()
!=
null
)
{
if
(
null
!=
exist
&&
exist
.
getId
()
!=
null
)
{
exist
.
setStatus
(
1
);
exist
.
setStatus
(
1
);
orgTeamEngineerDao
.
save
(
exist
);
orgTeamEngineerDao
.
save
(
exist
);
}
else
{
}
else
{
orgTeamEngineerDao
.
save
(
newRelation
);
orgTeamEngineerDao
.
save
(
newRelation
);
}
}
}
}
}
}
}
}
@Override
@Override
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment