|
@@ -398,11 +398,35 @@ namespace X1LeoTaskServer54.Service
|
|
|
{
|
|
|
await LogHelper.Info($"【获取一星配置信息");
|
|
|
LeoSat1AppSettingDto settingDto = new LeoSat1AppSettingDto();
|
|
|
- settingDto.CapDir = ConfigurationManager.AppSettings["CapDir"].Trim();
|
|
|
- settingDto.Time1SatInfo = ConfigurationManager.AppSettings["Time1SatInfo"].Replace(",", ",").Trim();
|
|
|
- settingDto.Time2SatInfo = ConfigurationManager.AppSettings["Time2SatInfo"].Replace(",", ",").Trim();
|
|
|
- settingDto.Time3SatInfo = ConfigurationManager.AppSettings["Time3SatInfo"].Replace(",", ",").Trim();
|
|
|
- return settingDto;
|
|
|
+ try
|
|
|
+ {
|
|
|
+ if (string.IsNullOrEmpty(ConfigurationManager.AppSettings["CapDir"]))
|
|
|
+ {
|
|
|
+ throw new Exception($"未配置采集数据目录");
|
|
|
+ }
|
|
|
+ if (string.IsNullOrEmpty(ConfigurationManager.AppSettings["Time1SatInfo"]))
|
|
|
+ {
|
|
|
+ throw new Exception($"未配置卫星及星历Time1SatInfo");
|
|
|
+ }
|
|
|
+ if (string.IsNullOrEmpty(ConfigurationManager.AppSettings["Time2SatInfo"]))
|
|
|
+ {
|
|
|
+ throw new Exception($"未配置卫星及星历Time2SatInfo");
|
|
|
+ }
|
|
|
+ if (string.IsNullOrEmpty(ConfigurationManager.AppSettings["Time3SatInfo"]))
|
|
|
+ {
|
|
|
+ throw new Exception($"未配置卫星及星历Time3SatInfo");
|
|
|
+ }
|
|
|
+ settingDto.CapDir = ConfigurationManager.AppSettings["CapDir"].Trim();
|
|
|
+ settingDto.Time1SatInfo = ConfigurationManager.AppSettings["Time1SatInfo"].Replace(",", ",").Trim();
|
|
|
+ settingDto.Time2SatInfo = ConfigurationManager.AppSettings["Time2SatInfo"].Replace(",", ",").Trim();
|
|
|
+ settingDto.Time3SatInfo = ConfigurationManager.AppSettings["Time3SatInfo"].Replace(",", ",").Trim();
|
|
|
+ return settingDto;
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ await LogHelper.Error($"【获取一星配置信息】异常:{ex.Message}");
|
|
|
+ throw new Exception($"【获取一星配置信息】异常:{ex.Message}");
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
private AdFile StringToAdFile(string file)
|