原材料转库、出库签收
This commit is contained in:
@@ -15,6 +15,7 @@ using Tnb.BasicData.Entities;
|
||||
using Tnb.WarehouseMgr.Entities;
|
||||
using Tnb.WarehouseMgr.Entities.Consts;
|
||||
using Tnb.WarehouseMgr.Entities.Dto;
|
||||
using Tnb.WarehouseMgr.Entities.Dto.Inputs;
|
||||
using Tnb.WarehouseMgr.Entities.Entity;
|
||||
using Tnb.WarehouseMgr.Entities.Enums;
|
||||
using Tnb.WarehouseMgr.Interfaces;
|
||||
@@ -33,13 +34,16 @@ namespace Tnb.WarehouseMgr
|
||||
private readonly IUserManager _userManager;
|
||||
private readonly IBillRullService _billRullService;
|
||||
private readonly IWareHouseService _wareHouseService;
|
||||
private readonly IWmsCarryBindService _wmsCarryBindService;
|
||||
|
||||
public WmsPDACarryBindService(
|
||||
ISqlSugarRepository<WmsCarryH> repository,
|
||||
IRunService runService,
|
||||
IVisualDevService visualDevService,
|
||||
IUserManager userManager,
|
||||
IWareHouseService wareHouseService,
|
||||
IBillRullService billRullService)
|
||||
IBillRullService billRullService,
|
||||
IWmsCarryBindService wmsCarryBindService)
|
||||
{
|
||||
_db = repository.AsSugarClient();
|
||||
_runService = runService;
|
||||
@@ -47,6 +51,7 @@ namespace Tnb.WarehouseMgr
|
||||
_userManager = userManager;
|
||||
_billRullService = billRullService;
|
||||
_wareHouseService = wareHouseService;
|
||||
_wmsCarryBindService = wmsCarryBindService;
|
||||
OverideFuncs.CreateAsync = PDACarryBind;
|
||||
}
|
||||
|
||||
@@ -365,10 +370,10 @@ namespace Tnb.WarehouseMgr
|
||||
throw new AppFriendlyException("起点id不可为空", 500);
|
||||
}
|
||||
|
||||
if (!_wareHouseService.GetFloor1OutstockLocation().Contains(input.location_id))
|
||||
{
|
||||
throw new AppFriendlyException("非一楼出库库位不允许通过此功能解锁", 500);
|
||||
}
|
||||
//if (!_wareHouseService.GetFloor1OutstockLocation().Contains(input.location_id))
|
||||
//{
|
||||
// throw new AppFriendlyException("非一楼出库库位不允许通过此功能解锁", 500);
|
||||
//}
|
||||
|
||||
await _db.Ado.BeginTranAsync();
|
||||
try
|
||||
@@ -384,6 +389,11 @@ namespace Tnb.WarehouseMgr
|
||||
is_lock = 0
|
||||
}).Where(r => r.location_id == input.location_id).ExecuteCommandAsync();
|
||||
|
||||
WmsCarryH wmsCarryH = _db.Queryable<WmsCarryH>().Where(r => r.location_id == input.location_id).First();
|
||||
CarryCodeUnbindInput carryCodeUnbindInput = new CarryCodeUnbindInput();
|
||||
carryCodeUnbindInput.carry_id = wmsCarryH.id;
|
||||
await _wmsCarryBindService.CarryCodeUnbind(carryCodeUnbindInput);
|
||||
|
||||
await _db.Ado.CommitTranAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
Reference in New Issue
Block a user