生成特种设备检验计划定时任务
This commit is contained in:
@@ -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>
|
||||
/// 有效开始时间
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user