Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
tianjin-cement
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
竹天卫
tianjin-cement
Commits
5e9d9b5d
Commit
5e9d9b5d
authored
Oct 28, 2020
by
mengbali153
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
培训计划
parent
be2dfeca
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
27 deletions
+32
-27
PlanTrainingServiceImpl.java
...cement/business/service/impl/PlanTrainingServiceImpl.java
+32
-27
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/PlanTrainingServiceImpl.java
View file @
5e9d9b5d
...
@@ -147,6 +147,7 @@ public class PlanTrainingServiceImpl extends ServiceImpl<PlanTrainingMapper, Pla
...
@@ -147,6 +147,7 @@ public class PlanTrainingServiceImpl extends ServiceImpl<PlanTrainingMapper, Pla
}
}
@Override
@Override
@Transactional
public
BaseResponse
<
PlanTraining
>
update
(
PlanTrainingQuery
planTrainingQuery
)
{
public
BaseResponse
<
PlanTraining
>
update
(
PlanTrainingQuery
planTrainingQuery
)
{
PlanTraining
update
=
new
PlanTraining
();
PlanTraining
update
=
new
PlanTraining
();
BeanUtils
.
copyProperties
(
planTrainingQuery
,
update
);
BeanUtils
.
copyProperties
(
planTrainingQuery
,
update
);
...
@@ -159,11 +160,12 @@ public class PlanTrainingServiceImpl extends ServiceImpl<PlanTrainingMapper, Pla
...
@@ -159,11 +160,12 @@ public class PlanTrainingServiceImpl extends ServiceImpl<PlanTrainingMapper, Pla
boolean
remove
=
iPlantPeopleService
.
remove
(
qw
);
boolean
remove
=
iPlantPeopleService
.
remove
(
qw
);
if
(
remove
)
{
if
(
remove
)
{
Integer
planId
=
update
.
getId
();
Integer
planId
=
update
.
getId
();
List
<
PlanPeople
>
batchAdd
=
new
ArrayList
<>();
//todo 培训关联表对象 ==>plant + 基本用户信息
//todo 培训关联表对象 ==>plant + 基本用户信息
//拆分用户id
//拆分用户id
String
userIds
=
planTrainingQuery
.
getUserIds
();
String
userIds
=
planTrainingQuery
.
getUserIds
();
String
[]
split
=
userIds
.
split
(
"、"
);
String
[]
split
=
userIds
.
split
(
"、"
);
List
<
PlanPeople
>
batchAdd
=
new
ArrayList
<>();
if
(
planTrainingQuery
.
getUserIds
()!=
null
)
{
//为每个用户id创建关联表信息s
//为每个用户id创建关联表信息s
for
(
String
userId
:
split
)
{
for
(
String
userId
:
split
)
{
Integer
id
=
Integer
.
parseInt
(
userId
);
Integer
id
=
Integer
.
parseInt
(
userId
);
...
@@ -178,7 +180,9 @@ public class PlanTrainingServiceImpl extends ServiceImpl<PlanTrainingMapper, Pla
...
@@ -178,7 +180,9 @@ public class PlanTrainingServiceImpl extends ServiceImpl<PlanTrainingMapper, Pla
batchAdd
.
add
(
planPeople
);
batchAdd
.
add
(
planPeople
);
update
.
setPlanObject
(
update
.
getPlanObject
()
+
user
.
getName
()
+
"、"
);
update
.
setPlanObject
(
update
.
getPlanObject
()
+
user
.
getName
()
+
"、"
);
}
}
}
if
(
planTrainingQuery
.
getGroupIds
()!=
null
)
{
//传的GroupIds
//传的GroupIds
String
groupIds
=
planTrainingQuery
.
getGroupIds
();
String
groupIds
=
planTrainingQuery
.
getGroupIds
();
String
[]
split1
=
groupIds
.
split
(
"、"
);
String
[]
split1
=
groupIds
.
split
(
"、"
);
...
@@ -197,6 +201,8 @@ public class PlanTrainingServiceImpl extends ServiceImpl<PlanTrainingMapper, Pla
...
@@ -197,6 +201,8 @@ public class PlanTrainingServiceImpl extends ServiceImpl<PlanTrainingMapper, Pla
planPeople
.
setGroupId
(
user
.
getGroupId
());
planPeople
.
setGroupId
(
user
.
getGroupId
());
batchAdd
.
add
(
planPeople
);
batchAdd
.
add
(
planPeople
);
update
.
setPlanObject
(
update
.
getPlanObject
()
+
user
.
getName
()
+
"、"
);
}
}
}
}
}
iPlantPeopleService
.
saveBatch
(
batchAdd
);
iPlantPeopleService
.
saveBatch
(
batchAdd
);
...
@@ -204,7 +210,6 @@ public class PlanTrainingServiceImpl extends ServiceImpl<PlanTrainingMapper, Pla
...
@@ -204,7 +210,6 @@ public class PlanTrainingServiceImpl extends ServiceImpl<PlanTrainingMapper, Pla
update
.
setPlanObject
(
substring
);
update
.
setPlanObject
(
substring
);
iPlanTrainingService
.
updateById
(
update
);
iPlanTrainingService
.
updateById
(
update
);
}
}
return
BaseResponse
.
okData
(
update
);
return
BaseResponse
.
okData
(
update
);
}
}
...
...
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