bug修復

This commit is contained in:
b110212000 2021-08-17 18:27:53 +08:00
parent 0b9e5b1a72
commit 5fa5b58d79
4 changed files with 10 additions and 5 deletions

View File

@ -572,7 +572,7 @@ namespace SolarPower.Controllers
cell = row.CreateCell(4); cell = row.CreateCell(4);
if (index == 25){ if (index == 25){
cell.CellStyle = style0; cell.CellStyle = style0;
cell.SetCellValue(bill.Result.Money); cell.SetCellValue(Math.Round(bill.Result.Money,2));
} }
else{ else{
cell.CellStyle = style14body; cell.CellStyle = style14body;
@ -604,7 +604,7 @@ namespace SolarPower.Controllers
region = new CellRangeAddress(27, 29, 1, 6); region = new CellRangeAddress(27, 29, 1, 6);
sheet.AddMergedRegion(region); sheet.AddMergedRegion(region);
cell = row.CreateCell(1); cell = row.CreateCell(1);
cell.SetCellValue($"{bill.Result.PowerName}-太陽光電售電收入 \r計算期間:{bill.Result.StartAt}-{bill.Result.EndAt} \r售電收入 = ( 度數 {bill.Result.Kwh} * 費率{bill.Result.PowerRate}) * 1.05 = {bill.Result.Kwh * bill.Result.PowerRate * 1.05} 元"); cell.SetCellValue($"{bill.Result.PowerName}-太陽光電售電收入 \r計算期間:{bill.Result.StartAt}-{bill.Result.EndAt} \r售電收入 = ( 度數 {bill.Result.Kwh} * 費率{bill.Result.PowerRate}) * 1.05 = {Math.Round(bill.Result.Kwh * bill.Result.PowerRate * 1.05,2) } 元");
cell.CellStyle = style14bodyleftnoborder; cell.CellStyle = style14bodyleftnoborder;
cell = row.CreateCell(6); cell = row.CreateCell(6);
cell.CellStyle = style14bodyrightnoborder; cell.CellStyle = style14bodyrightnoborder;

View File

@ -189,6 +189,7 @@ namespace SolarPower.Models
public string errMsg { get; set; }//錯誤原因 public string errMsg { get; set; }//錯誤原因
public string PowerStationName { get; set; }//電站名稱 public string PowerStationName { get; set; }//電站名稱
public int PowerStationId { get; set; }//電站流水號 public int PowerStationId { get; set; }//電站流水號
public string normalTime { get; set; }
} }
public class UserPowerStationTo public class UserPowerStationTo

View File

@ -33,9 +33,13 @@ namespace SolarPower.Quartz.Jobs
var ExceptionList = await overviewRepository.GetEmailExceptionList(); var ExceptionList = await overviewRepository.GetEmailExceptionList();
if(ExceptionList.Count > 0 ) if(ExceptionList.Count > 0 )
{ {
foreach(var Exception in ExceptionList) var ExceptionListex = ExceptionList.Where(x => x.normalTime == null && DateTime.Now.Subtract(DateTime.Parse(x.dev_time)).Hours >= 4).ToList();
foreach (var Exception in ExceptionListex)
{ {
var UserListWithPowerstation = await overviewRepository.GetUserListWithPowerstation(Exception.PowerStationId); var UserListWithPowerstation = await overviewRepository.GetUserListWithPowerstation(Exception.PowerStationId);
foreach (var user in UserListWithPowerstation) foreach (var user in UserListWithPowerstation)
{ {
var Content = $"電站名稱:{Exception.PowerStationName}" + "<br>" + var Content = $"電站名稱:{Exception.PowerStationName}" + "<br>" +

View File

@ -192,7 +192,7 @@
<p><span class="color-primary-400" id="stationtype">65</span></p> <p><span class="color-primary-400" id="stationtype">65</span></p>
</div> </div>
<div class=" d-flex justify-content-between"> <div class=" d-flex justify-content-between">
<p>Pr值</p> <p>PR值</p>
<p><span class="color-primary-400" id="PR">65</span> %</p> <p><span class="color-primary-400" id="PR">65</span> %</p>
<div style="text-align:right"> <div style="text-align:right">
<p class="small" id="date">06-30 17:50</p> <p class="small" id="date">06-30 17:50</p>