模具维修
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using JNPF.Common.Enums;
|
||||
using JNPF.Common.Core.Manager;
|
||||
using JNPF.Common.Enums;
|
||||
using JNPF.Common.Extension;
|
||||
using JNPF.DependencyInjection;
|
||||
using JNPF.DynamicApiController;
|
||||
@@ -29,16 +30,19 @@ namespace Tnb.EquipMgr
|
||||
private readonly IRunService _runService;
|
||||
private readonly IVisualDevService _visualDevService;
|
||||
private static Dictionary<string, (string code, string name)> _dicMold = new();
|
||||
private readonly IUserManager _userManager;
|
||||
public ToolMoldMaintainTaskService(
|
||||
ISqlSugarRepository<ToolMoldMaintainTask> repository,
|
||||
IRunService runService,
|
||||
IVisualDevService visualDevService
|
||||
IVisualDevService visualDevService,
|
||||
IUserManager userManager
|
||||
)
|
||||
{
|
||||
_db = repository.AsSugarClient();
|
||||
_runService = runService;
|
||||
_visualDevService = visualDevService;
|
||||
OverideFuncs.GetListAsync = GetList;
|
||||
_userManager = userManager;
|
||||
//OverideFuncs.CreateAsync = Create;
|
||||
}
|
||||
public OverideVisualDevFunc OverideFuncs { get; } = new OverideVisualDevFunc();
|
||||
@@ -100,5 +104,23 @@ namespace Tnb.EquipMgr
|
||||
throw Oops.Oh(ErrorCode.COM1001);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 开始维修
|
||||
/// </summary>
|
||||
/// <param name="input">输入参数</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task StartWx(MoldStartWxInput input)
|
||||
{
|
||||
DateTime? StartTime = DateTime.Now;
|
||||
int row = await _db.Updateable<ToolMoldMaintainTask>().SetColumns(it => new ToolMoldMaintainTask { status = "WXZ", modify_strat_time = StartTime, modify_id = _userManager.UserId })
|
||||
.Where(it => input.id == it.id).ExecuteCommandAsync();
|
||||
if (row < 1)
|
||||
{
|
||||
throw Oops.Oh(ErrorCode.COM1001);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user