|
@@ -0,0 +1,78 @@
|
|
|
+package com.jiayue.ipfcst.spare2.baseinfos.service;
|
|
|
+
|
|
|
+import com.jiayue.ipfcst.common.data.entity.ElectricField;
|
|
|
+import com.jiayue.ipfcst.spare2.base4.BaseService;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+
|
|
|
+@Slf4j
|
|
|
+@Service
|
|
|
+public class ImageLoadeService extends BaseService {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ AGC_AVCInfoService agcAvcInfoService;
|
|
|
+ @Autowired
|
|
|
+ BoosterStationInfoService boosterStationInfoService;
|
|
|
+ @Autowired
|
|
|
+ ElectricFieldService electricFieldService;
|
|
|
+ @Autowired
|
|
|
+ EquipmentAttributeService equipmentAttributeService;
|
|
|
+ @Autowired
|
|
|
+ Gather104TcpTunnelInfoService gather104TcpTunnelInfoService;
|
|
|
+ @Autowired
|
|
|
+ InitJobClassService initJobClassService;
|
|
|
+ @Autowired
|
|
|
+ InverterInfoService inverterInfoService;
|
|
|
+ @Autowired
|
|
|
+ ProtocolGatherDataPointService protocolGatherDataPointService;
|
|
|
+ @Autowired
|
|
|
+ PvModuleModelService pvModuleModelService;
|
|
|
+ @Autowired
|
|
|
+ QuartzService quartzService;
|
|
|
+ @Autowired
|
|
|
+ UploadFileChannelService uploadFileChannelService;
|
|
|
+ @Autowired
|
|
|
+ UploadFileCodeService uploadFileCodeService;
|
|
|
+ @Autowired
|
|
|
+ UploadObjectService uploadObjectService;
|
|
|
+ @Autowired
|
|
|
+ WeatherStationInfoService weatherStationInfoService;
|
|
|
+ @Autowired
|
|
|
+ WindTowerInfoService windTowerInfoService;
|
|
|
+ @Autowired
|
|
|
+ WindTurbineInfoService windTurbineInfoService;
|
|
|
+
|
|
|
+ public void imageLoad() {
|
|
|
+ log.info("==> 开始加载镜像基础信息");
|
|
|
+ try {// 加载“必要”基础信息
|
|
|
+ ElectricField electricField = electricFieldService.findFirst();
|
|
|
+ equipmentAttributeService.fresh();
|
|
|
+ //agcAvcInfoService.fresh();
|
|
|
+ //boosterStationInfoService.fresh();
|
|
|
+ //gather104TcpTunnelInfoService.fresh();
|
|
|
+ //initJobClassService.fresh();
|
|
|
+ inverterInfoService.fresh();
|
|
|
+ protocolGatherDataPointService.fresh();
|
|
|
+ pvModuleModelService.fresh();
|
|
|
+ quartzService.fresh();
|
|
|
+ sysParameterService.fresh();
|
|
|
+ uploadFileChannelService.fresh();
|
|
|
+ uploadObjectService.fresh();
|
|
|
+ uploadFileCodeService.fresh();
|
|
|
+ switch (electricField.getElectricFieldTypeEnum()) {
|
|
|
+ case E1://光伏
|
|
|
+ weatherStationInfoService.fresh();
|
|
|
+ break;
|
|
|
+ case E2://风电
|
|
|
+ windTowerInfoService.fresh();
|
|
|
+ windTurbineInfoService.fresh();
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ log.info("加载完成");
|
|
|
+ } catch (Exception ex) {
|
|
|
+ log.error(ex.getLocalizedMessage());
|
|
|
+ }
|
|
|
+ log.info("==> 结束加载镜像基础信息");
|
|
|
+ }
|
|
|
+}
|