feat(aihitSyncer): В АИХИТ добавлены переносы строк в качестве разделителей. Обновил метод ParseAppsList
This commit is contained in:
@@ -183,7 +183,8 @@ namespace PARR.AIHITSyncer.Services
|
||||
}
|
||||
|
||||
int responseAreaCode = GetResponseAreaCodeFromStr(objFromQuery.ResponseArea) ?? 0;
|
||||
if (responseAreaCode == 0) {
|
||||
if (responseAreaCode == 0)
|
||||
{
|
||||
logger.LogWarning($"Ошибка при получении ЗО хоста: {objFromQuery.EK}, ЗО: {objFromQuery.ResponseArea}");
|
||||
return;
|
||||
}
|
||||
@@ -286,6 +287,15 @@ namespace PARR.AIHITSyncer.Services
|
||||
|
||||
private List<string> ParseAppsList(string appStr)
|
||||
{
|
||||
// в АИХИТ стали появляться разделители \r \n находим их и заменяем на ,
|
||||
if (appStr.Contains("\r") || appStr.Contains("\n"))
|
||||
{
|
||||
string orig = appStr;
|
||||
appStr = appStr.Replace("\r", ",").Replace("\n", ",");
|
||||
|
||||
logger.LogDebug($"В строке найдены переносы, заменены на разделители. Исходная строка: {orig}. Результат: {appStr}");
|
||||
}
|
||||
|
||||
var regex = new Regex("\\([^)]*\\)");
|
||||
|
||||
if (regex.IsMatch(appStr))
|
||||
|
||||
Reference in New Issue
Block a user