销售出库与拣货接口以及部分问题修复
This commit is contained in:
@@ -47,8 +47,10 @@ namespace Tnb.WarehouseMgr
|
||||
_userManager = userManager;
|
||||
_billRullService = billRullService;
|
||||
OverideFuncs.CreateAsync = CarryBind;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
public async Task<dynamic> CarryBind(VisualDevModelDataCrInput input)
|
||||
{
|
||||
@@ -264,7 +266,49 @@ namespace Tnb.WarehouseMgr
|
||||
}
|
||||
return Task.FromResult(true);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 二楼机械手解绑定
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="ArgumentNullException"></exception>
|
||||
/// <exception cref="AppFriendlyException"></exception>
|
||||
[NonAction]
|
||||
public async Task<dynamic> CarryCodeUnbind(CarryCodeUnbindInput input)
|
||||
{
|
||||
bool isOk = false;
|
||||
try
|
||||
{
|
||||
if (input == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(input));
|
||||
}
|
||||
|
||||
WmsCarryH? carry = await _db.Queryable<WmsCarryH>().SingleAsync(it => it.id == input.carry_id);
|
||||
if (carry != null)
|
||||
{
|
||||
int row = await _db.Deleteable<WmsCarryCode>().Where(r => r.carry_id == input.carry_id).ExecuteCommandAsync();
|
||||
isOk = row > 0;
|
||||
|
||||
if (!isOk)
|
||||
{
|
||||
throw Oops.Oh(ErrorCode.COM1001);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (carry == null)
|
||||
{
|
||||
throw new AppFriendlyException("没有可用的主载具", 500);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
}
|
||||
return Task.FromResult(true);
|
||||
}
|
||||
/* public override async Task ModifyAsync(WareHouseUpInput input)
|
||||
{
|
||||
if (input == null) throw new ArgumentNullException(nameof(input));
|
||||
|
||||
Reference in New Issue
Block a user