綜合報表月報
發布錯誤修正
This commit is contained in:
parent
c7651dcd56
commit
36bf91da72
@ -1099,6 +1099,7 @@ namespace SolarPower.Controllers
|
|||||||
var thour = ""; var tpr = ""; var tkwh = ""; var kWhkwp = ""; var ntd = ""; var ntdone = ""; var GeneratingCapacity = "";
|
var thour = ""; var tpr = ""; var tkwh = ""; var kWhkwp = ""; var ntd = ""; var ntdone = ""; var GeneratingCapacity = "";
|
||||||
foreach (dynamic body in Formbody.Result.Data)
|
foreach (dynamic body in Formbody.Result.Data)
|
||||||
{
|
{
|
||||||
|
|
||||||
index = 0;
|
index = 0;
|
||||||
var dbody = body as IDictionary<string, object>;
|
var dbody = body as IDictionary<string, object>;
|
||||||
thour = Checknull(Math.Round(Convert.ToDouble(dbody["tothour"]), 2).ToString());
|
thour = Checknull(Math.Round(Convert.ToDouble(dbody["tothour"]), 2).ToString());
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Quartz;
|
using Quartz;
|
||||||
using SolarPower.Models;
|
using SolarPower.Models;
|
||||||
|
using SolarPower.Models.User;
|
||||||
using SolarPower.Repository.Interface;
|
using SolarPower.Repository.Interface;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
@ -198,10 +199,25 @@ namespace SolarPower.Quartz.Jobs
|
|||||||
|
|
||||||
#region 寄送日月報
|
#region 寄送日月報
|
||||||
var users = userRepository.GetAllAsync();
|
var users = userRepository.GetAllAsync();
|
||||||
var ttt = new List<string>() {
|
|
||||||
"s506488@gmail.com",
|
//var usertest = new List<User>();
|
||||||
"cesarliuc@gmail.com"
|
//var oneuser = new User()
|
||||||
};
|
//{
|
||||||
|
// Account = "cesarliuc@gmail.com",
|
||||||
|
// Password = "np/F0eliIy3lPJe1tU18oiG7dzKRrpVw16/XZpHOph8=",
|
||||||
|
// Id = 13,
|
||||||
|
// Email = "cesarliuc@gmail.com",
|
||||||
|
// Status = 1,
|
||||||
|
// Name = "TEST"
|
||||||
|
//};
|
||||||
|
//usertest.Add(oneuser);
|
||||||
|
|
||||||
|
//var ttt = new List<string>() {
|
||||||
|
// "s506488@gmail.com",
|
||||||
|
// "cesarliuc@gmail.com"
|
||||||
|
//};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
foreach (var user in users.Result)
|
foreach (var user in users.Result)
|
||||||
{
|
{
|
||||||
@ -294,9 +310,9 @@ namespace SolarPower.Quartz.Jobs
|
|||||||
{
|
{
|
||||||
Select_table2 maxmonthexcel = new Select_table2()
|
Select_table2 maxmonthexcel = new Select_table2()
|
||||||
{
|
{
|
||||||
FormType = 0,
|
FormType = 1,
|
||||||
PowerStation = sentMaxpowerstations,
|
PowerStation = sentMaxpowerstations,
|
||||||
SearchType = 0,
|
SearchType = 1,
|
||||||
Time = DateTime.Now.AddDays(-1).ToString("yyyy-MM"),
|
Time = DateTime.Now.AddDays(-1).ToString("yyyy-MM"),
|
||||||
Userid = user.Id
|
Userid = user.Id
|
||||||
};
|
};
|
||||||
|
|||||||
@ -393,7 +393,7 @@ namespace SolarPower.Repository.Implement
|
|||||||
GROUP BY a.Id,a.time
|
GROUP BY a.Id,a.time
|
||||||
) n ON n.Id = ps.Id
|
) n ON n.Id = ps.Id
|
||||||
WHERE ps.Id IN @ids ORDER BY ps.CityId";
|
WHERE ps.Id IN @ids ORDER BY ps.CityId";
|
||||||
result = (await conn.QueryAsync<MaxFormbody>(sql,new { ids = ids})).ToList();
|
result = (await conn.QueryAsync<MaxFormbody>(sql,new { ids = ids}, commandTimeout: 300)).ToList();
|
||||||
}
|
}
|
||||||
catch (Exception exception)
|
catch (Exception exception)
|
||||||
{
|
{
|
||||||
@ -597,7 +597,7 @@ namespace SolarPower.Repository.Implement
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
a = await conn.QueryAsync<dynamic>(sql);
|
a = await conn.QueryAsync<dynamic>(sql,commandTimeout: 300);
|
||||||
}
|
}
|
||||||
catch (Exception exception)
|
catch (Exception exception)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user