@ -43,22 +43,20 @@ public class MapLogisticServiceImpl extends ServiceImpl<MapLogisticMapper, MapLo
@@ -43,22 +43,20 @@ public class MapLogisticServiceImpl extends ServiceImpl<MapLogisticMapper, MapLo
super . save ( mapLogistic ) ;
mapLogistic . getMapTask ( ) . forEach ( mapTask - > {
mapTask . setMapLogisticId ( mapLogistic . getId ( ) ) ;
iMapTaskService . save ( mapTask ) ;
// 匹配查找跟地图任务关联的地图标记点数据
// 匹配查找跟地图任务关联的地图标记点数据,不需要包含其他收养样员的交接任务标记点,他们已经与自己的任务进行了id绑定
mapLogistic . getMapLogisticPoint ( ) . stream ( )
. filter ( item - > item . getKey ( ) . equals ( mapTask . getKey ( ) ) ) . forEach ( item - > {
item . setMapLogisticId ( mapLogistic . getId ( ) ) ;
item . setMapTaskId ( mapTask . getId ( ) ) ;
iMapLogisticPointService . save ( item ) ;
} ) ;
. filter ( item - > item . getKey ( ) . equals ( mapTask . getKey ( ) ) ) . forEach ( item - > item . setMapTaskId ( mapTask . getId ( ) ) ) ;
if ( ObjectUtil . isNotEmpty ( mapTask . getMapTaskPreset ( ) ) ) {
mapTask . getMapTaskPreset ( ) . forEach ( mapTaskPreset - > {
mapTaskPreset . setMapLogisticId ( mapLogistic . getId ( ) ) ;
mapTaskPreset . setMapTaskId ( mapTask . getId ( ) ) ;
iMapTaskPresetService . save ( mapTaskPreset ) ;
} ) ;
iMapTaskPresetService . saveBatch ( mapTask . getMapTaskPreset ( ) ) ;
}
} ) ;
mapLogistic . getMapLogisticPoint ( ) . forEach ( item - > item . setMapLogisticId ( mapLogistic . getId ( ) ) ) ;
iMapTaskService . saveBatch ( mapLogistic . getMapTask ( ) ) ;
iMapLogisticPointService . saveBatch ( mapLogistic . getMapLogisticPoint ( ) ) ;
return false ;
}