Commit 983dfefe authored by 竹天卫's avatar 竹天卫
parents f635f02d 7dadbf06
...@@ -159,11 +159,12 @@ public class PlanTrainingServiceImpl extends ServiceImpl<PlanTrainingMapper, Pla ...@@ -159,11 +159,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 +179,9 @@ public class PlanTrainingServiceImpl extends ServiceImpl<PlanTrainingMapper, Pla ...@@ -178,7 +179,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 +200,8 @@ public class PlanTrainingServiceImpl extends ServiceImpl<PlanTrainingMapper, Pla ...@@ -197,6 +200,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);
......
...@@ -7,8 +7,8 @@ spring: ...@@ -7,8 +7,8 @@ spring:
active: dev active: dev
datasource: datasource:
# 192.168.110.85 admin!@#123 # 192.168.110.85 admin!@#123
# url: jdbc:mysql://192.168.110.85:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false url: jdbc:mysql://192.168.110.85:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
url: jdbc:mysql://81.68.92.175:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false #url: jdbc:mysql://81.68.92.175:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false
username: root username: root
password: admin!@#123 password: admin!@#123
driverClassName: com.mysql.cj.jdbc.Driver driverClassName: com.mysql.cj.jdbc.Driver
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment