逆變器計算---逾時
This commit is contained in:
parent
b1a62fde79
commit
7193826d63
@ -913,8 +913,15 @@ namespace SolarPower.Controllers
|
||||
apiResult.Data = analysisInverter;
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
if(exception.Message == "Fatal error encountered during command execution.")
|
||||
{
|
||||
apiResult.Code = "9984";
|
||||
}
|
||||
else
|
||||
{
|
||||
apiResult.Code = "9999";
|
||||
}
|
||||
Logger.LogError("【" + controllerName + "/" + actionName + "】");
|
||||
Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message);
|
||||
}
|
||||
|
||||
@ -17,10 +17,11 @@ namespace SolarPower.Models
|
||||
{
|
||||
{ "0000", "OK" },
|
||||
{ "0001", "傳入參數錯誤。" },
|
||||
{ "0002","請先刪除相關逆變器"},
|
||||
{ "0003","請先刪除相關設備"},
|
||||
{ "0004","請先移除相關逆變器綁定"},
|
||||
{ "9985","該電站尚無逆變器資料"},
|
||||
{ "0002", "請先刪除相關逆變器"},
|
||||
{ "0003", "請先刪除相關設備"},
|
||||
{ "0004", "請先移除相關逆變器綁定"},
|
||||
{ "9984", "連線逾時"},
|
||||
{ "9985", "該電站尚無逆變器資料"},
|
||||
{ "9986", "該帳號已被註冊,請重新輸入"},
|
||||
{ "9987", "查無該運維作業記錄檔案"},
|
||||
{ "9988", "查無該資料紀錄"},
|
||||
|
||||
@ -4475,7 +4475,7 @@ namespace SolarPower.Repository.Implement
|
||||
}
|
||||
sql = "SELECT * FROM (" + string.Join(" UNION ", sql_perSiteDB) + ") a ORDER BY a.TIMESTAMP ASC";
|
||||
|
||||
result = (await conn.QueryAsync<InverterHistory>(sql, new { NowDay = nowDay })).ToList();
|
||||
result = (await conn.QueryAsync<InverterHistory>(sql, new { NowDay = nowDay }, commandTimeout: 300)).ToList();
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
|
||||
@ -243,7 +243,7 @@ namespace SolarPower.Repository.Implement
|
||||
break;
|
||||
|
||||
}
|
||||
a = await conn.QueryAsync<dynamic>(sql,commandTimeout: 300);
|
||||
a = await conn.QueryAsync<dynamic>(sql, commandTimeout: 300);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user