生成特种设备检验计划定时任务

This commit is contained in:
2023-06-01 16:17:55 +08:00
parent b8d77e72d9
commit 45b05925d7
4 changed files with 70 additions and 42 deletions

View File

@@ -72,7 +72,7 @@ public partial class EqpSpEquipCheckRecord : BaseEntity<string>
/// <summary>
/// 提前预警时间单位
/// </summary>
public int? warn_unit { get; set; }
public string? warn_unit { get; set; }
/// <summary>
/// 有效开始时间

View File

@@ -37,10 +37,10 @@ namespace Tnb.EquipMgr
throw Oops.Bah("该设备已存在检验计划");
}
if (entity.warn_unit == 1)//月
if (entity.warn_unit == "1")//月
{
entity.next_check_time = entity.end_time.Value.AddMonths(-entity.warm_time.Value);
}else if (entity.warn_unit == 2)//天
}else if (entity.warn_unit == "2")//天
{
entity.next_check_time = entity.end_time.Value.AddDays(-entity.warm_time.Value);
}