站
This commit is contained in:
parent
7332e8d9d8
commit
69de707137
@ -1192,11 +1192,24 @@ namespace SolarPower.Controllers
|
||||
return Path.Combine("\\" + "upload" ,"report", Datename, "FIC太陽能監控平台" + "_" + name + "報表" + "_" + postObject.Userid+ Datename + ".xlsx");
|
||||
}
|
||||
|
||||
//public async Task<ApiResult<List<MaxFormbody>>> GetMaxForm (Select_table2 post)
|
||||
//{
|
||||
|
||||
// return;
|
||||
//}
|
||||
public async Task<ApiResult<List<MaxFormbody>>> GetMaxForm(Select_table2 post)
|
||||
{
|
||||
ApiResult<List<MaxFormbody>> apiResult = new ApiResult<List<MaxFormbody>>();
|
||||
List<MaxFormbody> body = new List<MaxFormbody>();
|
||||
try
|
||||
{
|
||||
var a = await stationReportRepository.GetMaxtablebody(post);
|
||||
apiResult.Code = "0000";
|
||||
apiResult.Data = a;
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
apiResult.Code = "9999";
|
||||
Logger.LogError("【" + controllerName + "/" + actionName + "】");
|
||||
Logger.LogError("【" + controllerName + "/" + actionName + "】" + exception.Message);
|
||||
}
|
||||
return apiResult;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -85,7 +85,7 @@ namespace SolarPower.Models
|
||||
public string AreaName { get; set; }
|
||||
public string PowerstationName { get; set; }
|
||||
public int PowerstationId { get; set; }
|
||||
public double Kwp { get; set; }
|
||||
public double Kwh { get; set; }
|
||||
public string PowerstationDB { get; set; }
|
||||
public double SolarHour { get; set; }
|
||||
public double AvgIrradiance { get; set; }
|
||||
|
||||
@ -232,5 +232,28 @@ namespace SolarPower.Repository.Implement
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<List<MaxFormbody>> GetMaxtablebody(Select_table2 post)
|
||||
{
|
||||
List<MaxFormbody> result = new List<MaxFormbody>();
|
||||
using (IDbConnection conn = _databaseHelper.GetConnection())
|
||||
{
|
||||
conn.Open();
|
||||
try
|
||||
{
|
||||
string sql = @$"";
|
||||
result = (await conn.QueryAsync<MaxFormbody>(sql)).ToList();
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
throw exception;
|
||||
}
|
||||
finally
|
||||
{
|
||||
conn.Close();
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user