修改 - 作業紀錄建立通知

This commit is contained in:
b110212000 2021-09-22 14:35:30 +08:00
parent ffdad5ce96
commit d749cdabc8
3 changed files with 4 additions and 3 deletions

View File

@ -99,11 +99,11 @@ namespace SolarPower.Models
public string UpdatedAt { get { return Convert.ToDateTime(updatedAt).ToString("yyyy-MM-dd HH:mm:ss"); } set { updatedAt = value; } } //修改時間
private string lastCreateTime;
public string LastCreateTime { get { return Convert.ToDateTime(lastCreateTime).ToString("yyyy-MM-dd HH:mm:ss"); } set { lastCreateTime = value; } }
public string PowerStationName { get; set; }
}
public class OperationPlanTable : OperationCreatePlan
{
public string TypeName { get; set; }
public string PowerStationName { get; set; }
public string Schedule { get; set; }
public string EmailTypeName { get; set; }
public string CreatedPerson { get; set; }

View File

@ -158,7 +158,7 @@ namespace SolarPower.Quartz.Jobs
{
//Get所有運維人員
var personal = await operationRepository.GetOperationPersonnel(a.PowerStationId);
var Title = $@"編號:{a.PlanId} - {WorkType}單 - 作業紀錄建立通知";
var Title = $@"電站:{a.PowerStationName} - {WorkType}單 - 編號:{a.PlanId}";
var content = $@" {noticeName} {Environment.NewLine} 內容描述:{a.Description}";
await operationRepository.InsertNoticeSchedule(personal, Title, content);

View File

@ -604,7 +604,8 @@ namespace SolarPower.Repository.Implement
{
try
{
var sql = @$"SELECT * FROM operation_plan_create opc
var sql = @$"SELECT opc.*,ps.Name AS PowerStationName FROM operation_plan_create opc
LEFT JOIN power_station ps ON opc.PowerStationId = ps.Id
WHERE opc.Deleted = 0";
result = (await conn.QueryAsync<OperationCreatePlan>(sql)).ToList();
}