电梯下发逻辑变更
This commit is contained in:
@@ -40,7 +40,7 @@ namespace Tnb.WarehouseMgr
|
||||
private readonly IWmsCarryUnbindService _wmsCarryUnbindService;
|
||||
private readonly IWmsCarryService _wmsCarryService;
|
||||
|
||||
|
||||
|
||||
|
||||
public WmsPDACarryBindService(
|
||||
ISqlSugarRepository<WmsCarryH> repository,
|
||||
@@ -163,7 +163,7 @@ namespace Tnb.WarehouseMgr
|
||||
/// <returns></returns>
|
||||
/// <exception cref="AppFriendlyException"></exception>
|
||||
[HttpPost, NonUnify, AllowAnonymous]
|
||||
public async Task<dynamic> OutsourcedPartsInstock(OutsourcedPartsInstockInput input)
|
||||
public async Task<Tnb.WarehouseMgr.Entities.Dto.Outputs.Result> OutsourcedPartsInstock(OutsourcedPartsInstockInput input)
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -204,7 +204,7 @@ namespace Tnb.WarehouseMgr
|
||||
}
|
||||
WmsPointH sPoint = null!;
|
||||
WmsPointH ePoint = null!;
|
||||
|
||||
|
||||
sPoint = await _db.Queryable<WmsPointH>().FirstAsync(it => it.location_id == input.startlocation_id);
|
||||
if (endLocations?.Count > 0)
|
||||
{
|
||||
@@ -348,11 +348,11 @@ namespace Tnb.WarehouseMgr
|
||||
}
|
||||
|
||||
// 入库明细都完成 回写主表完成状态
|
||||
List<WmsTransferInstockD> wmsTransferInstockDs =_db.Queryable<WmsTransferInstockD>().InnerJoin<WmsTransferInstockD>((a, b) => a.bill_id == b.bill_id).Where((a, b) => a.id == input.source_id)
|
||||
List<WmsTransferInstockD> wmsTransferInstockDs = _db.Queryable<WmsTransferInstockD>().InnerJoin<WmsTransferInstockD>((a, b) => a.bill_id == b.bill_id).Where((a, b) => a.id == input.source_id)
|
||||
.Where((a, b) => b.status != WmsWareHouseConst.TASK_BILL_STATUS_COMPLE_ID).ToList();
|
||||
if (wmsTransferInstockDs.Count == 0)
|
||||
{
|
||||
await _db.Updateable<WmsTransferInstockH>().SetColumns(r =>r.status == WmsWareHouseConst.TASK_BILL_STATUS_COMPLE_ID).Where(r => r.id == wmsTransferInstockD.bill_id).ExecuteCommandAsync();
|
||||
await _db.Updateable<WmsTransferInstockH>().SetColumns(r => r.status == WmsWareHouseConst.TASK_BILL_STATUS_COMPLE_ID).Where(r => r.id == wmsTransferInstockD.bill_id).ExecuteCommandAsync();
|
||||
}
|
||||
|
||||
await _db.Ado.CommitTranAsync();
|
||||
@@ -360,7 +360,7 @@ namespace Tnb.WarehouseMgr
|
||||
catch (Exception ex)
|
||||
{
|
||||
await _db.Ado.RollbackTranAsync();
|
||||
throw Oops.Bah(ex.Message);
|
||||
return await ToApiResult(HttpStatusCode.InternalServerError, ex.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -368,7 +368,7 @@ namespace Tnb.WarehouseMgr
|
||||
await InvokeGenPretaskExcute();
|
||||
}
|
||||
|
||||
return await Task.FromResult(true);
|
||||
return await ToApiResult(HttpStatusCode.OK, "成功");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -377,7 +377,7 @@ namespace Tnb.WarehouseMgr
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, NonUnify, AllowAnonymous]
|
||||
public async Task<dynamic> FinishproductOutstockSign(FinishproductOutstockSignInput input)
|
||||
public async Task<Tnb.WarehouseMgr.Entities.Dto.Outputs.Result> FinishproductOutstockSign(FinishproductOutstockSignInput input)
|
||||
{
|
||||
Logger.LogInformation($"【FinishproductOutstockSign】载具签收 {input.carry_code}");
|
||||
if (string.IsNullOrEmpty(input.carry_code))
|
||||
@@ -414,7 +414,7 @@ namespace Tnb.WarehouseMgr
|
||||
throw new AppFriendlyException($"库位id {wmsCarryH.location_id}没有对应的库位基础资料!", 500);
|
||||
}
|
||||
|
||||
WmsDistaskH wmsDistaskH = _db.Queryable<WmsDistaskH>().Where(r => r.carry_code == input.carry_code && r.endlocation_id == location.id
|
||||
WmsDistaskH wmsDistaskH = _db.Queryable<WmsDistaskH>().Where(r => r.carry_code == input.carry_code && r.endlocation_id == location.id
|
||||
&& r.status != WmsWareHouseConst.TASK_BILL_STATUS_COMPLE_ID && r.status != WmsWareHouseConst.TASK_BILL_STATUS_CANCEL_ID).First();
|
||||
if (wmsDistaskH != null)
|
||||
{
|
||||
@@ -458,12 +458,12 @@ namespace Tnb.WarehouseMgr
|
||||
Logger.Error($"【FinishproductOutstockSign】 {ex.Message}");
|
||||
Logger.Error($"【FinishproductOutstockSign】 {ex.StackTrace}");
|
||||
await _db.Ado.RollbackTranAsync();
|
||||
throw Oops.Bah(ex.Message);
|
||||
return await ToApiResult(HttpStatusCode.InternalServerError, ex.Message);
|
||||
}
|
||||
|
||||
return await Task.FromResult(true);
|
||||
return await ToApiResult(HttpStatusCode.OK, "成功");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user