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 c38ee74a
authored
Jul 11, 2023
by
丁伟峰
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-dingwf-0715' into develop
2 parents
71372d65
b4449251
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
project-order/src/main/java/com/dituhui/pea/order/dao/OrgTeamDao.java
project-order/src/main/java/com/dituhui/pea/order/dao/OrgTeamEngineerDao.java
project-order/src/main/java/com/dituhui/pea/order/service/impl/BusinessTeamServiceImpl.java
project-order/src/main/java/com/dituhui/pea/order/dao/OrgTeamDao.java
View file @
c38ee74
...
@@ -12,16 +12,21 @@ import org.springframework.stereotype.Repository;
...
@@ -12,16 +12,21 @@ import org.springframework.stereotype.Repository;
import
java.util.List
;
import
java.util.List
;
@Repository
@Repository
@Where
(
clause
=
"status = 1"
)
public
interface
OrgTeamDao
extends
JpaRepository
<
OrgTeamEntity
,
Integer
>
{
public
interface
OrgTeamDao
extends
JpaRepository
<
OrgTeamEntity
,
Integer
>
{
@Query
(
"select t from OrgTeamEntity t where t.clusterId = :clusterId and t.status=1"
)
List
<
OrgTeamEntity
>
findAllByClusterId
(
String
clusterId
);
List
<
OrgTeamEntity
>
findAllByClusterId
(
String
clusterId
);
@Query
(
"select t from OrgTeamEntity t where t.branchId = :branchId and t.status=1"
)
List
<
OrgTeamEntity
>
findAllByBranchId
(
String
branchId
);
List
<
OrgTeamEntity
>
findAllByBranchId
(
String
branchId
);
@Query
(
"select t from OrgTeamEntity t where t.groupId = :groupId and t.status=1"
)
List
<
OrgTeamEntity
>
findAllByGroupId
(
String
groupId
);
List
<
OrgTeamEntity
>
findAllByGroupId
(
String
groupId
);
@Query
(
"select t from OrgTeamEntity t where t.groupId = :groupId and t.status=1"
)
Page
<
OrgTeamEntity
>
findAllByGroupId
(
String
groupId
,
Pageable
pageable
);
Page
<
OrgTeamEntity
>
findAllByGroupId
(
String
groupId
,
Pageable
pageable
);
@Query
(
"select t from OrgTeamEntity t where t.branchId = :branchId and t.status=1"
)
Page
<
OrgTeamEntity
>
findAllByBranchId
(
String
branchId
,
Pageable
pageable
);
Page
<
OrgTeamEntity
>
findAllByBranchId
(
String
branchId
,
Pageable
pageable
);
OrgTeamEntity
getByTeamId
(
String
teamId
);
OrgTeamEntity
getByTeamId
(
String
teamId
);
...
...
project-order/src/main/java/com/dituhui/pea/order/dao/OrgTeamEngineerDao.java
View file @
c38ee74
...
@@ -12,15 +12,14 @@ import java.util.List;
...
@@ -12,15 +12,14 @@ import java.util.List;
@Repository
@Repository
@Where
(
clause
=
"status = 1"
)
public
interface
OrgTeamEngineerDao
extends
JpaRepository
<
OrgTeamEngineerEntity
,
Integer
>
{
public
interface
OrgTeamEngineerDao
extends
JpaRepository
<
OrgTeamEngineerEntity
,
Integer
>
{
@Query
(
"select t from OrgTeamEngineerEntity t where t.teamId = :teamId and t.status=1"
)
List
<
OrgTeamEngineerEntity
>
findAllByTeamId
(
String
teamId
);
List
<
OrgTeamEngineerEntity
>
findAllByTeamId
(
String
teamId
);
@Query
(
"select t from OrgTeamEngineerEntity t where t.teamId in :teamIds and t.status=1"
)
List
<
OrgTeamEngineerEntity
>
findAllByTeamIdIn
(
List
<
String
>
teamIds
);
List
<
OrgTeamEngineerEntity
>
findAllByTeamIdIn
(
List
<
String
>
teamIds
);
List
<
OrgTeamEngineerEntity
>
findByTeamId
(
String
teamId
);
@Query
(
"select a.teamId from OrgTeamEngineerEntity a where a.engineerCode=:engineerCode"
)
@Query
(
"select a.teamId from OrgTeamEngineerEntity a where a.engineerCode=:engineerCode"
)
List
<
String
>
getTeamIdsByEngineerCode
(
String
engineerCode
);
List
<
String
>
getTeamIdsByEngineerCode
(
String
engineerCode
);
...
...
project-order/src/main/java/com/dituhui/pea/order/service/impl/BusinessTeamServiceImpl.java
View file @
c38ee74
...
@@ -185,7 +185,7 @@ public class BusinessTeamServiceImpl implements BusinessTeamService {
...
@@ -185,7 +185,7 @@ public class BusinessTeamServiceImpl implements BusinessTeamService {
public
void
updateTeamEngineers
(
String
teamId
,
List
<
String
>
engineerCodes
)
{
public
void
updateTeamEngineers
(
String
teamId
,
List
<
String
>
engineerCodes
)
{
// 获取现有的工作队和技术员之间的所有关系
// 获取现有的工作队和技术员之间的所有关系
List
<
OrgTeamEngineerEntity
>
existingRelations
=
orgTeamEngineerDao
.
findByTeamId
(
teamId
);
List
<
OrgTeamEngineerEntity
>
existingRelations
=
orgTeamEngineerDao
.
find
All
ByTeamId
(
teamId
);
// 构建新的关系映射
// 构建新的关系映射
Map
<
String
,
OrgTeamEngineerEntity
>
newRelationsMap
=
new
HashMap
<>();
Map
<
String
,
OrgTeamEngineerEntity
>
newRelationsMap
=
new
HashMap
<>();
...
...
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