调拨订单同步生成原材料/成品调拨出库 物料签收接口
This commit is contained in:
@@ -247,5 +247,45 @@ namespace Tnb.WarehouseMgr
|
||||
}
|
||||
return await ToApiResult(JNPF.Common.Enums.HttpStatusCode.OK, "成功");
|
||||
}
|
||||
|
||||
public async Task<Result> CarryCodeUnbindCode(CarryCodeUnbindCodeInput input, ISqlSugarClient dbConn = null)
|
||||
{
|
||||
bool isOk = false;
|
||||
|
||||
var db = _db;
|
||||
if (dbConn != null)
|
||||
db = dbConn;
|
||||
|
||||
try
|
||||
{
|
||||
if (input == null)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(input));
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(input.carry_code_id))
|
||||
{
|
||||
int row = await db.Deleteable<WmsCarryCode>().Where(r => r.id == input.carry_code_id).ExecuteCommandAsync();
|
||||
isOk = row > 0;
|
||||
|
||||
Logger.LogInformation($"【CarryCodeUnbind】载具物料明细{input.carry_code_id}已解绑,解绑条数{row}");
|
||||
//if (!isOk)
|
||||
//{
|
||||
// throw Oops.Oh(ErrorCode.COM1001);
|
||||
//}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new AppFriendlyException("载具物料明细不能为空", 500);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.LogError($"【CarryCodeUnbind】 {ex.Message}");
|
||||
Logger.LogError($"【CarryCodeUnbind】 {ex.StackTrace}");
|
||||
return await ToApiResult(JNPF.Common.Enums.HttpStatusCode.InternalServerError, ex.Message);
|
||||
}
|
||||
return await ToApiResult(JNPF.Common.Enums.HttpStatusCode.OK, "成功");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user