模具维修
This commit is contained in:
13
EquipMgr/Tnb.EquipMgr.Entities/Dto/MoldStartWxInput.cs
Normal file
13
EquipMgr/Tnb.EquipMgr.Entities/Dto/MoldStartWxInput.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Tnb.EquipMgr.Entities
|
||||
{
|
||||
public class MoldStartWxInput
|
||||
{
|
||||
public string? id { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -20,5 +20,6 @@ namespace Tnb.EquipMgr.Entities.Dto
|
||||
public string repairer_id { get; set; }
|
||||
public string repairer_id_id { get; set; }
|
||||
public string status { get; set; }
|
||||
public string attachment { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -53,4 +53,12 @@ public partial class ToolMoldMaintainTask : BaseEntity<string>
|
||||
/// </summary>
|
||||
public string status { get; set; }
|
||||
|
||||
public string? name { get; set; }
|
||||
public string? attachment { get; set; }
|
||||
public string? describe { get; set; }
|
||||
|
||||
public int is_finish { get; set; }
|
||||
public string? wxattachment { get; set; }
|
||||
public string? wxdescribe { get; set; }
|
||||
|
||||
}
|
||||
|
||||
@@ -397,7 +397,8 @@ namespace Tnb.EquipMgr
|
||||
repairer_id = c.RealName,
|
||||
repairer_id_id = c.Id,
|
||||
remark = a.remark,
|
||||
status = f.FullName
|
||||
status = f.FullName,
|
||||
attachment=a.attachment
|
||||
}).ToPagedListAsync(input?.currentPage ?? 1, input?.pageSize ?? 50);
|
||||
|
||||
return PageResult<PadRepairListOutput>.SqlSugarPageResult(result);
|
||||
|
||||
@@ -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