重写预任务申请,任务执行删除功能
This commit is contained in:
@@ -221,12 +221,12 @@ namespace Tnb.WarehouseMgr
|
||||
await _db.Updateable(instockDetails).ExecuteCommandAsync();
|
||||
var instock = await _db.Queryable<WmsInstockH>().SingleAsync(it => it.id == input.requireId);
|
||||
if (instock.IsNull()) ArgumentNullException.ThrowIfNull(nameof(instock));
|
||||
if (instock?.sync_status != WmsWareHouseConst.SYNC_STATUS_NONEEDSYNC)
|
||||
if (instock.sync_status != WmsWareHouseConst.SYNC_STATUS_NONEEDSYNC)
|
||||
{
|
||||
//如果是自动单据,需要回更上层系统
|
||||
Dictionary<string, string> pars = new() { { nameof(WmsInstockH.source_id), instock!.source_id } };
|
||||
Dictionary<string, string> pars = new() { { nameof(WmsInstockH.source_id), instock?.source_id ?? string.Empty } };
|
||||
var callBackRes = await _prdInstockService.SyncInstock(pars);
|
||||
instock.sync_status = callBackRes == true ? WmsWareHouseConst.SYNC_STATUS__SYNCCOMPLETE : WmsWareHouseConst.SYNC_STATUS__SYNCFAILED;
|
||||
instock!.sync_status = callBackRes == true ? WmsWareHouseConst.SYNC_STATUS__SYNCCOMPLETE : WmsWareHouseConst.SYNC_STATUS__SYNCFAILED;
|
||||
await _db.Updateable(instock).UpdateColumns(it => it.sync_status).ExecuteCommandAsync();
|
||||
}
|
||||
var allInstockDetails = await _db.Queryable<WmsInstockD>().Where(it => it.bill_id == input.requireId).ToListAsync();
|
||||
@@ -348,22 +348,22 @@ namespace Tnb.WarehouseMgr
|
||||
|
||||
WmsPretaskH preTask = new();
|
||||
preTask.org_id = _userManager.User.OrganizeId;
|
||||
preTask.startlocation_id = sPoint?.location_id!;
|
||||
preTask.startlocation_code = sPoint?.location_code!;
|
||||
preTask.endlocation_id = ePoint?.location_id!;
|
||||
preTask.endlocation_code = ePoint?.location_code!;
|
||||
preTask.startlocation_id = sPoint?.location_id ?? string.Empty;
|
||||
preTask.startlocation_code = sPoint?.location_code ?? string.Empty;
|
||||
preTask.endlocation_id = ePoint?.location_id ?? string.Empty;
|
||||
preTask.endlocation_code = ePoint?.location_code ?? string.Empty;
|
||||
preTask.start_floor = sPoint?.floor.ToString();
|
||||
preTask.end_floor = ePoint?.floor.ToString();
|
||||
preTask.bill_code = _billRullService.GetBillNumber(WmsWareHouseConst.WMS_PRETASK_H_ENCODE).GetAwaiter().GetResult();
|
||||
preTask.status = WmsWareHouseConst.PRETASK_BILL_STATUS_DXF_ID;
|
||||
preTask.biz_type = instock.biz_type;
|
||||
preTask.biz_type = instock?.biz_type ?? string.Empty;
|
||||
preTask.task_type = WmsWareHouseConst.WMS_PRETASK_INSTOCK_TYPE_ID;
|
||||
preTask.carry_id = instock.carry_id!;
|
||||
preTask.carry_code = instock.carry_code!;
|
||||
preTask.area_id = sPoint?.area_id!;
|
||||
preTask.carry_id = instock?.carry_id ?? string.Empty;
|
||||
preTask.carry_code = instock?.carry_code ?? string.Empty;
|
||||
preTask.area_id = sPoint?.area_id ?? string.Empty;
|
||||
preTask.area_code = it.Key;
|
||||
preTask.require_id = instock.id;
|
||||
preTask.require_code = instock.bill_code;
|
||||
preTask.require_id = instock?.id ?? string.Empty;
|
||||
preTask.require_code = instock?.bill_code ?? string.Empty;
|
||||
preTask.create_id = _userManager.UserId;
|
||||
preTask.create_time = DateTime.Now;
|
||||
return preTask;
|
||||
|
||||
Reference in New Issue
Block a user