点巡检执行 模板发布
This commit is contained in:
@@ -13,11 +13,11 @@ namespace Tnb.EquipMgr
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 待复核
|
/// 待复核
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const string TOBECHECK = "1";
|
public const string TOBECHECK = "2";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 已完成
|
/// 已完成
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const string COMPLETED = "1";
|
public const string COMPLETED = "3";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
namespace Tnb.EquipMgr.Entities.Dto
|
||||||
|
{
|
||||||
|
public class SpotInsTemPublishInput
|
||||||
|
{
|
||||||
|
public string id { get; set; }
|
||||||
|
|
||||||
|
public string[] equipIds { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -81,7 +81,7 @@ public partial class EqpSpotInsRecordD : BaseEntity<string>
|
|||||||
/// Default:
|
/// Default:
|
||||||
/// Nullable:True
|
/// Nullable:True
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int? result { get; set; }
|
public string? result { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Desc:实际测量值
|
/// Desc:实际测量值
|
||||||
|
|||||||
42
EquipMgr/Tnb.EquipMgr.Entities/Entity/EqpSpotInsTemD.cs
Normal file
42
EquipMgr/Tnb.EquipMgr.Entities/Entity/EqpSpotInsTemD.cs
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using JNPF.Common.Security;
|
||||||
|
using SqlSugar;
|
||||||
|
|
||||||
|
namespace Tnb.EquipMgr.Entities
|
||||||
|
{
|
||||||
|
///<summary>
|
||||||
|
///点巡检模板子表
|
||||||
|
///</summary>
|
||||||
|
[SugarTable("eqp_spot_ins_tem_d")]
|
||||||
|
public partial class EqpSpotInsTemD
|
||||||
|
{
|
||||||
|
public EqpSpotInsTemD(){
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:编号
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:False
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(IsPrimaryKey=true)]
|
||||||
|
public string id {get;set;} = SnowflakeIdHelper.NextId();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:模板id
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string? spot_ins_tem_id {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:点巡检项id
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string? spot_ins_item_id {get;set;}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
181
EquipMgr/Tnb.EquipMgr.Entities/Entity/EqpSpotInsTemH.cs
Normal file
181
EquipMgr/Tnb.EquipMgr.Entities/Entity/EqpSpotInsTemH.cs
Normal file
@@ -0,0 +1,181 @@
|
|||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using JNPF.Common.Security;
|
||||||
|
using SqlSugar;
|
||||||
|
|
||||||
|
namespace Tnb.EquipMgr.Entities
|
||||||
|
{
|
||||||
|
///<summary>
|
||||||
|
///点巡检模板
|
||||||
|
///</summary>
|
||||||
|
[SugarTable("eqp_spot_ins_tem_h")]
|
||||||
|
public partial class EqpSpotInsTemH
|
||||||
|
{
|
||||||
|
public EqpSpotInsTemH()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:创建时间
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? create_time { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:创建用户
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string? create_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:修改时间
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? modify_time { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:修改用户
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string? modify_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:主键
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:False
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(IsPrimaryKey = true)]
|
||||||
|
public string id { get; set; } = SnowflakeIdHelper.NextId();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:设备类型id
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string? equip_type_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:编码
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string? code { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:名称
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string? name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:周期
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:False
|
||||||
|
/// </summary>
|
||||||
|
public decimal plan_cycle { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:周期方式 1 单次 2 循环
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:False
|
||||||
|
/// </summary>
|
||||||
|
public string plan_cycle_unit { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:计划执行通知提前量
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public int? plan_run_notice { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:计划执行通知提前量单位 1 小时 2 天 3 周
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string? plan_run_notice_unit { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:执行滞后推送时间
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public int? plan_delay { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:执行滞后推送时间单位 1 小时 2 天 3 周
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string? plan_delay_unit { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:启用时间
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:False
|
||||||
|
/// </summary>
|
||||||
|
public DateTime start_time { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:是否启用
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:False
|
||||||
|
/// </summary>
|
||||||
|
public int is_start { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:是否复核
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:False
|
||||||
|
/// </summary>
|
||||||
|
public int is_repeat { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:复核岗位id
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string? repeat_post_info_user_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:责任岗位id
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string? send_post_info_user_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:不合格推送 0 不推送 1 推送
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:False
|
||||||
|
/// </summary>
|
||||||
|
public int is_send { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:备注
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string? remark { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:推送人id
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string? send_post_id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:所属组织
|
||||||
|
/// Default:NULL::character varying
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string? org_id { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
12
EquipMgr/Tnb.EquipMgr.Interfaces/IEqpSpotInsTemService.cs
Normal file
12
EquipMgr/Tnb.EquipMgr.Interfaces/IEqpSpotInsTemService.cs
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
using Tnb.EquipMgr.Entities.Dto;
|
||||||
|
namespace Tnb.EquipMgr.Interfaces
|
||||||
|
{
|
||||||
|
public interface IEqpSpotInsTemService
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 根据模板id发布到设备
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="dic"></param>
|
||||||
|
public Task<string> Publish(SpotInsTemPublishInput input);
|
||||||
|
}
|
||||||
|
}
|
||||||
14
EquipMgr/Tnb.EquipMgr.Interfaces/IEquSpotInsRecordService.cs
Normal file
14
EquipMgr/Tnb.EquipMgr.Interfaces/IEquSpotInsRecordService.cs
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
using JNPF.Common.Dtos.VisualDev;
|
||||||
|
|
||||||
|
namespace Tnb.EquipMgr.Interfaces
|
||||||
|
{
|
||||||
|
public interface IEquSpotInsRecordService
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 执行点巡检
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pageInput"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public Task<dynamic> ExecuteSpotIns(string id,VisualDevModelDataUpInput input);
|
||||||
|
}
|
||||||
|
}
|
||||||
111
EquipMgr/Tnb.EquipMgr/EqpSpotInsTemService.cs
Normal file
111
EquipMgr/Tnb.EquipMgr/EqpSpotInsTemService.cs
Normal file
@@ -0,0 +1,111 @@
|
|||||||
|
using JNPF.Common.Core.Manager;
|
||||||
|
using JNPF.Common.Enums;
|
||||||
|
using JNPF.Common.Security;
|
||||||
|
using JNPF.DependencyInjection;
|
||||||
|
using JNPF.DynamicApiController;
|
||||||
|
using JNPF.FriendlyException;
|
||||||
|
using JNPF.VisualDev.Interfaces;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using SqlSugar;
|
||||||
|
using Tnb.EquipMgr.Entities;
|
||||||
|
using Tnb.EquipMgr.Interfaces;
|
||||||
|
using Tnb.EquipMgr.Entities.Dto;
|
||||||
|
|
||||||
|
namespace Tnb.EquipMgr
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 点巡检模板管理
|
||||||
|
/// </summary>
|
||||||
|
[ApiDescriptionSettings(Tag = ModuleConsts.Tag, Area = ModuleConsts.Area, Order = 700)]
|
||||||
|
[Route("api/[area]/[controller]/[action]")]
|
||||||
|
public class EqpSpotInsTemService : IEqpSpotInsTemService, IDynamicApiController, ITransient
|
||||||
|
{
|
||||||
|
private const string ModuleId = "26123080740885";
|
||||||
|
private readonly ISqlSugarRepository<EqpSpotInsTemH> _repository;
|
||||||
|
private readonly IUserManager _userManager;
|
||||||
|
|
||||||
|
public EqpSpotInsTemService(ISqlSugarRepository<EqpSpotInsTemH> repository,
|
||||||
|
IUserManager userManager,
|
||||||
|
IVisualDevService visualDevService)
|
||||||
|
{
|
||||||
|
_repository = repository;
|
||||||
|
_userManager = userManager;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<string> Publish(SpotInsTemPublishInput input)
|
||||||
|
{
|
||||||
|
var db = _repository.AsSugarClient();
|
||||||
|
DbResult<bool> result = await db.Ado.UseTranAsync(async () =>
|
||||||
|
{
|
||||||
|
EqpSpotInsTemH eqpSpotInsTemH = await _repository.GetSingleAsync(x => x.id == input.id);
|
||||||
|
List<EqpSpotInsTemD> eqpSpotInsTemDs = await db.Queryable<EqpSpotInsTemD>().Where(x=>x.spot_ins_item_id==input.id).ToListAsync();
|
||||||
|
|
||||||
|
if (input.equipIds != null && input.equipIds.Length > 0)
|
||||||
|
{
|
||||||
|
List<EqpSpotInsTemEquipH> insertEqpSpotInsTemEquipHs = new List<EqpSpotInsTemEquipH>();
|
||||||
|
List<EqpSpotInsTemEquipD> insertEqpSpotInsTemEquipDs = new List<EqpSpotInsTemEquipD>();
|
||||||
|
foreach (var equipId in input.equipIds)
|
||||||
|
{
|
||||||
|
string id = SnowflakeIdHelper.NextId();
|
||||||
|
string code = $"{DateTime.Now.ToString("yyyy-MM-dd") + equipId}";
|
||||||
|
EqpSpotInsTemEquipH eqpSpotInsTemEquipH = new EqpSpotInsTemEquipH()
|
||||||
|
{
|
||||||
|
id = id,
|
||||||
|
code = code,
|
||||||
|
name = eqpSpotInsTemH.name+equipId,
|
||||||
|
plan_cycle = eqpSpotInsTemH.plan_cycle,
|
||||||
|
plan_cycle_unit = eqpSpotInsTemH.plan_cycle_unit,
|
||||||
|
plan_run_notice = eqpSpotInsTemH.plan_run_notice,
|
||||||
|
plan_delay = eqpSpotInsTemH.plan_delay,
|
||||||
|
start_time = eqpSpotInsTemH.start_time,
|
||||||
|
is_start = eqpSpotInsTemH.is_start.ToString(),
|
||||||
|
is_repeat = eqpSpotInsTemH.is_repeat.ToString(),
|
||||||
|
is_send = eqpSpotInsTemH.is_send,
|
||||||
|
spot_ins_tem_id = input.id,
|
||||||
|
equip_id = equipId,
|
||||||
|
remark = eqpSpotInsTemH.remark,
|
||||||
|
plan_run_notice_unit = eqpSpotInsTemH.plan_run_notice_unit,
|
||||||
|
plan_delay_unit = eqpSpotInsTemH.plan_delay_unit,
|
||||||
|
repeat_post_info_user_id = eqpSpotInsTemH.repeat_post_info_user_id,
|
||||||
|
send_post_info_user_id = eqpSpotInsTemH.send_post_info_user_id,
|
||||||
|
send_post_id = eqpSpotInsTemH.send_post_id,
|
||||||
|
org_id = eqpSpotInsTemH.org_id,
|
||||||
|
create_id = _userManager.UserId,
|
||||||
|
create_time = DateTime.Now,
|
||||||
|
};
|
||||||
|
insertEqpSpotInsTemEquipHs.Add(eqpSpotInsTemEquipH);
|
||||||
|
|
||||||
|
if (eqpSpotInsTemDs != null && eqpSpotInsTemDs.Count > 0)
|
||||||
|
{
|
||||||
|
foreach (var eqpSpotInsTem in eqpSpotInsTemDs)
|
||||||
|
{
|
||||||
|
EqpSpotInsTemEquipD eqpSpotInsTemEquipD = new EqpSpotInsTemEquipD()
|
||||||
|
{
|
||||||
|
id = SnowflakeIdHelper.NextId(),
|
||||||
|
spot_ins_item_id = eqpSpotInsTem.id,
|
||||||
|
spot_ins_tem_equip_id = id,
|
||||||
|
};
|
||||||
|
insertEqpSpotInsTemEquipDs.Add(eqpSpotInsTemEquipD);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (insertEqpSpotInsTemEquipHs != null && insertEqpSpotInsTemEquipHs.Count > 0)
|
||||||
|
{
|
||||||
|
await db.Insertable(insertEqpSpotInsTemEquipHs).ExecuteCommandAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (insertEqpSpotInsTemEquipDs != null && insertEqpSpotInsTemEquipDs.Count > 0)
|
||||||
|
{
|
||||||
|
await db.Insertable(insertEqpSpotInsTemEquipDs).ExecuteCommandAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
if(!result.IsSuccess) throw Oops.Oh(ErrorCode.COM1008);
|
||||||
|
return result.IsSuccess ? "发布成功" : result.ErrorMessage;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
82
EquipMgr/Tnb.EquipMgr/EquSpotInsRecordService.cs
Normal file
82
EquipMgr/Tnb.EquipMgr/EquSpotInsRecordService.cs
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
using JNPF.Common.Core.Manager;
|
||||||
|
using JNPF.Common.Dtos.VisualDev;
|
||||||
|
using JNPF.Common.Enums;
|
||||||
|
using JNPF.DependencyInjection;
|
||||||
|
using JNPF.DynamicApiController;
|
||||||
|
using JNPF.FriendlyException;
|
||||||
|
using JNPF.VisualDev;
|
||||||
|
using JNPF.VisualDev.Entitys;
|
||||||
|
using JNPF.VisualDev.Interfaces;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
using SqlSugar;
|
||||||
|
using Tnb.EquipMgr.Entities;
|
||||||
|
using Tnb.EquipMgr.Interfaces;
|
||||||
|
|
||||||
|
namespace Tnb.EquipMgr
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 点巡检执行管理
|
||||||
|
/// </summary>
|
||||||
|
[ApiDescriptionSettings(Tag = ModuleConsts.Tag, Area = ModuleConsts.Area, Order = 700)]
|
||||||
|
[Route("api/[area]/[controller]/[action]")]
|
||||||
|
[OverideVisualDev(ModuleId)]
|
||||||
|
public class EquSpotInsRecordService : IOverideVisualDevService, IEquSpotInsRecordService, IDynamicApiController, ITransient
|
||||||
|
{
|
||||||
|
public OverideVisualDevFunc OverideFuncs { get; } = new OverideVisualDevFunc();
|
||||||
|
private const string ModuleId = "26123080740885";
|
||||||
|
private readonly ISqlSugarRepository<EqpSpotInsRecordH> _repository;
|
||||||
|
private readonly IVisualDevService _visualDevService;
|
||||||
|
private readonly IRunService _runService;
|
||||||
|
private readonly IUserManager _userManager;
|
||||||
|
|
||||||
|
public EquSpotInsRecordService(ISqlSugarRepository<EqpSpotInsRecordH> repository,
|
||||||
|
IRunService runService,
|
||||||
|
IUserManager userManager,
|
||||||
|
IVisualDevService visualDevService)
|
||||||
|
{
|
||||||
|
_repository = repository;
|
||||||
|
_visualDevService = visualDevService;
|
||||||
|
_runService = runService;
|
||||||
|
_userManager = userManager;
|
||||||
|
OverideFuncs.UpdateAsync = ExecuteSpotIns;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<dynamic> ExecuteSpotIns(string id,[FromBody]VisualDevModelDataUpInput input)
|
||||||
|
{
|
||||||
|
DbResult<bool> result = await _repository.AsSugarClient().Ado.UseTranAsync(async () =>
|
||||||
|
{
|
||||||
|
//string attachment = JsonConvert.SerializeObject(input.data["attachment"]);
|
||||||
|
// _repository.UpdateAsync(x => new EqpSpotInsRecordH()
|
||||||
|
// {
|
||||||
|
// result = (int)input.data["result"],
|
||||||
|
// attachment = attachment,
|
||||||
|
// result_remark = input.data["result_remark"].ToString(),
|
||||||
|
// }, x => x.id == input.data["id"]);
|
||||||
|
VisualDevEntity? templateEntity = await _visualDevService.GetInfoById(ModuleId, true);
|
||||||
|
await _runService.Update(id,templateEntity, input);
|
||||||
|
|
||||||
|
EqpSpotInsRecordH eqpSpotInsRecordH = _repository.GetSingle(x=>x.id==input.data["id"].ToString());
|
||||||
|
string status = "";
|
||||||
|
if (eqpSpotInsRecordH.is_repeat == "1")
|
||||||
|
{
|
||||||
|
status = SpotInsRecordExecutionStatus.TOBECHECK;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
status = SpotInsRecordExecutionStatus.COMPLETED;
|
||||||
|
}
|
||||||
|
_repository.UpdateAsync(x => new EqpSpotInsRecordH()
|
||||||
|
{
|
||||||
|
status = status,
|
||||||
|
spot_record_date_time = DateTime.Now,
|
||||||
|
spot_record_user_id = _userManager.UserId
|
||||||
|
}, x => x.id == input.data["id"]);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
if(!result.IsSuccess) throw Oops.Oh(ErrorCode.COM1008);
|
||||||
|
return result.IsSuccess ? "执行成功" : result.ErrorMessage;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -17,7 +17,7 @@ namespace JNPF.TaskScheduler.Listener
|
|||||||
// _repository = repository;
|
// _repository = repository;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
[SpareTime("0 0 0 * * ?", "生成点巡检计划", ExecuteType = SpareTimeExecuteTypes.Serial,StartNow = false)]
|
[SpareTime("0 0,30 * * * ?", "生成点巡检计划", ExecuteType = SpareTimeExecuteTypes.Serial,StartNow = false)]
|
||||||
public void GenerateSpotInspectionPlan(SpareTimer timer, long count)
|
public void GenerateSpotInspectionPlan(SpareTimer timer, long count)
|
||||||
{
|
{
|
||||||
Log.Information("----------------------开始生成点巡检计划----------------------");
|
Log.Information("----------------------开始生成点巡检计划----------------------");
|
||||||
@@ -100,6 +100,7 @@ namespace JNPF.TaskScheduler.Listener
|
|||||||
repeat_post_info_user_id = item.repeat_post_info_user_id,
|
repeat_post_info_user_id = item.repeat_post_info_user_id,
|
||||||
is_send = item.is_send,
|
is_send = item.is_send,
|
||||||
create_time = DateTime.Now,
|
create_time = DateTime.Now,
|
||||||
|
status = Tnb.EquipMgr.SpotInsRecordExecutionStatus.TOBEEXECUTED
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user