Browse Source

计划删除优化

linzhiwei 2 years ago
parent
commit
d7cb327368

+ 4 - 0
snws-gps/snws-gps-boot/src/main/java/com/tofly/gpsboot/service/paln/task/impl/PlanServiceImpl.java

@@ -478,6 +478,7 @@ public class PlanServiceImpl extends ServiceImpl<PlanMapper, Plan> implements Pl
             Long id = parDto.getId();
             List<Long> idList = new ArrayList<>();
             idList.add(id);
+
             this.deletePlan(idList);
             this.removeById(id);
             // 走保存
@@ -516,6 +517,9 @@ public class PlanServiceImpl extends ServiceImpl<PlanMapper, Plan> implements Pl
     }
 
     private void deletePlan(List<Long> planIdList) {
+        planFactoryService.remove(new QueryWrapper<PlanFactory>().lambda().in(PlanFactory::getPlanId,planIdList));
+        plantypeService.remove(new QueryWrapper<Plantype>().lambda().in(Plantype::getPlanId,planIdList));
+        planchildService.remove(new QueryWrapper<Planchild>().lambda().in(Planchild::getPlanId,planIdList));
         // 删除点到位信息
         pointtempService.remove(new QueryWrapper<Pointtemp>().lambda().in(Pointtemp::getPlanId, planIdList));
         // 删除用户关联计划的信息