机器人回调出库功能
This commit is contained in:
@@ -31,7 +31,7 @@ namespace Tnb.WarehouseMgr
|
||||
/// 载具绑定
|
||||
/// </summary>
|
||||
[OverideVisualDev(ModuleConsts.MODULE_WMSCARRYBIND_ID)]
|
||||
public class WmsCarryBindService : BaseWareHouseService
|
||||
public class WmsCarryBindService : BaseWareHouseService, IWmsCarryBindService
|
||||
{
|
||||
private readonly ISqlSugarClient _db;
|
||||
private readonly IRunService _runService;
|
||||
@@ -52,8 +52,8 @@ namespace Tnb.WarehouseMgr
|
||||
_billRullService = billRullService;
|
||||
OverideFuncs.CreateAsync = CarryBind;
|
||||
}
|
||||
|
||||
private async Task<dynamic> CarryBind(VisualDevModelDataCrInput input)
|
||||
[NonAction]
|
||||
public async Task<dynamic> CarryBind(VisualDevModelDataCrInput input)
|
||||
{
|
||||
var isOk = false;
|
||||
try
|
||||
@@ -88,6 +88,7 @@ namespace Tnb.WarehouseMgr
|
||||
};
|
||||
row = await _db.Insertable(wmsCarryD).ExecuteCommandAsync();
|
||||
var items = await _db.Queryable<WmsCarryCode>().Where(it => it.carry_id == subCarryId).ToListAsync();
|
||||
List<WmsCarrybindCode> wmsCarrybindCodes = new();
|
||||
//更新载具绑定条码表
|
||||
for (int i = 0; i < items.Count; i++)
|
||||
{
|
||||
@@ -106,8 +107,9 @@ namespace Tnb.WarehouseMgr
|
||||
wmsCarrybindCode.unit_code = items[i].unit_code;
|
||||
wmsCarrybindCode.create_id = _userManager.UserId;
|
||||
wmsCarrybindCode.create_time = DateTime.Now;
|
||||
row = await _db.Insertable(wmsCarrybindCode).ExecuteCommandAsync();
|
||||
wmsCarrybindCodes.Add(wmsCarrybindCode);
|
||||
}
|
||||
row = await _db.Insertable(wmsCarrybindCodes).ExecuteCommandAsync();
|
||||
isOk = (row > 0);
|
||||
if (!isOk) throw Oops.Oh(ErrorCode.COM1001);
|
||||
}
|
||||
@@ -128,17 +130,8 @@ namespace Tnb.WarehouseMgr
|
||||
return Task.FromResult(true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 机器人回调操作
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task RobotCallBack()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* public override async Task ModifyAsync(WareHouseUpInput input)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user