配送申请模块,增加预任务申请业务

This commit is contained in:
2023-06-15 15:39:53 +08:00
parent 5b62f7a470
commit 123a92c0b9
2 changed files with 84 additions and 6 deletions

View File

@@ -33,7 +33,7 @@ namespace Tnb.WarehouseMgr
[ServiceModule(BizTypeId)]
public class WmsTransferService : BaseWareHouseService
{
private const string BizTypeId = "26125644258853";
private const string BizTypeId = "26585291847957";
private readonly ISqlSugarClient _db;
private readonly IRunService _runService;
private readonly IVisualDevService _visualDevService;
@@ -66,6 +66,7 @@ namespace Tnb.WarehouseMgr
VisualDevEntity? templateEntity = await _visualDevService.GetInfoById(ModuleConsts.MODULE_WMSTRANSFER_ID, true);
await _runService.Create(templateEntity, input);
// 计算路径,插入预任务申请
WmsPointH sPoint = null;
WmsPointH ePoint = null;
if (input.data.ContainsKey(nameof(WmsTransfer.startlocation_id)))
@@ -99,7 +100,7 @@ namespace Tnb.WarehouseMgr
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 = WmsWareHouseConst.BIZTYPE_WMSTRANSFER_ID;
preTask.biz_type = WmsWareHouseConst.BIZTYPE_WMSDELIVERY_ID;
preTask.task_type = WmsWareHouseConst.WMS_PRETASK_TRANSFER_TYPE_ID;
preTask.carry_id = input.data[nameof(preTask.carry_id)]?.ToString()!;
preTask.carry_code = input.data[nameof(preTask.carry_code)]?.ToString()!;
@@ -114,7 +115,8 @@ namespace Tnb.WarehouseMgr
var isOk = await _wareHouseService.GenPreTask(preTasks);
if (isOk)
{
var preTaskUpInput = new GenPreTaskUpInput();
//不需要插入操作表
/* var preTaskUpInput = new GenPreTaskUpInput();
preTaskUpInput.PreTaskId = input.data["ReturnIdentity"].ToString();
preTaskUpInput.CarryId = input.data[nameof(WmsCarryD.carry_id)]?.ToString()!;
preTaskUpInput.CarryStartLocationId = points.FirstOrDefault().location_id;
@@ -122,7 +124,7 @@ namespace Tnb.WarehouseMgr
preTaskUpInput.LocationIds = points.Select(x => x.location_id).ToList();
preTaskUpInput.PreTaskRecords = preTasks.Adapt<List<WmsHandleH>>();
preTaskUpInput.PreTaskRecords.ForEach(x => x.id = SnowflakeIdHelper.NextId());
await _wareHouseService.GenTaskHandleAfter(preTaskUpInput);
await _wareHouseService.GenTaskHandleAfter(preTaskUpInput);*/
}
}