1
This commit is contained in:
@@ -45,7 +45,8 @@ namespace Tnb.WarehouseMgr
|
||||
IVisualDevService visualDevService,
|
||||
IWareHouseService wareHouseService,
|
||||
IUserManager userManager,
|
||||
IBillRullService billRullService)
|
||||
IBillRullService billRullService,
|
||||
ITaskMessageNotify taskMessageNotify) : base(taskMessageNotify.Writer)
|
||||
{
|
||||
_db = repository.AsSugarClient();
|
||||
_runService = runService;
|
||||
@@ -124,10 +125,11 @@ namespace Tnb.WarehouseMgr
|
||||
preTask.create_time = DateTime.Now;
|
||||
return preTask;
|
||||
}).ToList();
|
||||
if (loc.is_sign ==0 ) {
|
||||
if (loc.is_sign == 0)
|
||||
{
|
||||
preTasks[^1].is_sign = 0; // 修改最后一个元素的是否签收值
|
||||
}
|
||||
var isOk = await _wareHouseService.GenPreTask(preTasks,null!);
|
||||
var isOk = await _wareHouseService.GenPreTask(preTasks, null!);
|
||||
if (isOk)
|
||||
{
|
||||
var preTaskUpInput = new GenPreTaskUpInput();
|
||||
@@ -142,7 +144,7 @@ namespace Tnb.WarehouseMgr
|
||||
await _db.Updateable<WmsMoveOutstock>().SetColumns(it => new WmsMoveOutstock { status = WmsWareHouseConst.BILLSTATUS_ON_ID }).Where(it => it.id == preTaskUpInput.RquireId).ExecuteCommandAsync();
|
||||
|
||||
await _wareHouseService.GenInStockTaskHandleAfter(preTaskUpInput,
|
||||
it => new WmsCarryH { is_lock = 1},
|
||||
it => new WmsCarryH { is_lock = 1 },
|
||||
it => new BasLocation { is_lock = 1 });
|
||||
|
||||
}
|
||||
@@ -157,6 +159,10 @@ namespace Tnb.WarehouseMgr
|
||||
await _db.Ado.RollbackTranAsync();
|
||||
throw;
|
||||
}
|
||||
finally
|
||||
{
|
||||
await Publish(nameof(IWareHouseService.GenTaskExecute));
|
||||
}
|
||||
return Task.FromResult(true);
|
||||
}
|
||||
public override async Task ModifyAsync(WareHouseUpInput input)
|
||||
@@ -165,5 +171,5 @@ namespace Tnb.WarehouseMgr
|
||||
var isOk = await _db.Updateable<WmsMoveOutstock>().SetColumns(it => new WmsMoveOutstock { status = WmsWareHouseConst.BILLSTATUS_COMPLETE_ID }).Where(it => it.id == input.requireId).ExecuteCommandHasChangeAsync();
|
||||
if (!isOk) throw Oops.Oh(ErrorCode.COM1001);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user