|
|
@@ -15,8 +15,6 @@ import com.kym.service.admin.EquipmentInfoService;
|
|
|
import com.kym.service.admin.StationService;
|
|
|
import com.kym.service.enplus.EnPlusService;
|
|
|
import com.kym.service.utils.KymCache;
|
|
|
-import org.slf4j.Logger;
|
|
|
-import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.context.annotation.Lazy;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
@@ -38,7 +36,6 @@ import java.util.List;
|
|
|
@DS("db-admin")
|
|
|
public class StationServiceImpl extends ServiceImpl<StationMapper, Station> implements StationService {
|
|
|
|
|
|
- private static final Logger LOGGER = LoggerFactory.getLogger(StationServiceImpl.class);
|
|
|
private final KymCache kymCache;
|
|
|
|
|
|
private final EquipmentInfoService equipmentInfoService;
|
|
|
@@ -117,7 +114,7 @@ public class StationServiceImpl extends ServiceImpl<StationMapper, Station> impl
|
|
|
var stationList = new ArrayList<Station>();
|
|
|
var equipmentList = new ArrayList<EquipmentInfo>();
|
|
|
stationVoList.forEach(vo -> {
|
|
|
- if(vo.getEquipmentInfos().size()>0){
|
|
|
+ if (vo.getEquipmentInfos().size() > 0) {
|
|
|
vo.getEquipmentInfos().forEach(item -> {
|
|
|
var equipment = new EquipmentInfo()
|
|
|
.setStationId(vo.getStationId())
|
|
|
@@ -132,7 +129,7 @@ public class StationServiceImpl extends ServiceImpl<StationMapper, Station> impl
|
|
|
BeanUtils.copyProperties(vo, station);
|
|
|
stationList.add(station);
|
|
|
});
|
|
|
- // saveBatch(stationList);
|
|
|
+ saveBatch(stationList);
|
|
|
equipmentInfoService.saveBatch(equipmentList);
|
|
|
}
|
|
|
|