From ecca272e76781186085b377c6d5a34229f9138f6 Mon Sep 17 00:00:00 2001 From: FanLian Date: Tue, 18 Jul 2023 09:11:22 +0800 Subject: [PATCH] 1 --- .../Tnb.WarehouseMgr/WmsInStockService.cs | 56 ++++++++++--------- 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WmsInStockService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WmsInStockService.cs index 5a538235..e0b3ecb9 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WmsInStockService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WmsInStockService.cs @@ -346,26 +346,28 @@ namespace Tnb.WarehouseMgr var sPoint = it.FirstOrDefault(); var ePoint = it.LastOrDefault(); - WmsPretaskH preTask = new(); - preTask.org_id = _userManager.User.OrganizeId; - 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 ?? string.Empty; - preTask.task_type = WmsWareHouseConst.WMS_PRETASK_INSTOCK_TYPE_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 ?? string.Empty; - preTask.require_code = instock?.bill_code ?? string.Empty; - preTask.create_id = _userManager.UserId; - preTask.create_time = DateTime.Now; + WmsPretaskH preTask = new() + { + org_id = _userManager.User.OrganizeId, + startlocation_id = sPoint?.location_id ?? string.Empty, + startlocation_code = sPoint?.location_code ?? string.Empty, + endlocation_id = ePoint?.location_id ?? string.Empty, + endlocation_code = ePoint?.location_code ?? string.Empty, + start_floor = sPoint?.floor.ToString(), + end_floor = ePoint?.floor.ToString(), + bill_code = _billRullService.GetBillNumber(WmsWareHouseConst.WMS_PRETASK_H_ENCODE).GetAwaiter().GetResult(), + status = WmsWareHouseConst.PRETASK_BILL_STATUS_DXF_ID, + biz_type = instock?.biz_type ?? string.Empty, + task_type = WmsWareHouseConst.WMS_PRETASK_INSTOCK_TYPE_ID, + carry_id = instock?.carry_id ?? string.Empty, + carry_code = instock?.carry_code ?? string.Empty, + area_id = sPoint?.area_id ?? string.Empty, + area_code = it.Key, + require_id = instock?.id ?? string.Empty, + require_code = instock?.bill_code ?? string.Empty, + create_id = _userManager.UserId, + create_time = DateTime.Now + }; return preTask; }).ToList(); //生成预任务条码信息 @@ -395,12 +397,14 @@ namespace Tnb.WarehouseMgr if (isOk) { - var preTaskUpInput = new GenPreTaskUpInput(); - preTaskUpInput.RquireId = instock?.id; - preTaskUpInput.CarryId = instock?.carry_id!; - preTaskUpInput.CarryStartLocationId = points.FirstOrDefault()?.location_id; - preTaskUpInput.CarryStartLocationCode = points.FirstOrDefault()?.location_code; - preTaskUpInput.LocationIds = (points?.Select(x => x.location_id)?.ToList() ?? Enumerable.Empty().ToList()) as List; + GenPreTaskUpInput preTaskUpInput = new() + { + RquireId = instock?.id, + CarryId = instock?.carry_id!, + CarryStartLocationId = points.FirstOrDefault()?.location_id, + CarryStartLocationCode = points.FirstOrDefault()?.location_code, + LocationIds = (points?.Select(x => x.location_id)?.ToList() ?? Enumerable.Empty().ToList()) as List + }; //创建预任务操作记录 var operBillId = string.Empty;