You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
wcs_core/Sln.Wcs/MaterialInStoreTest.cs

78 lines
2.2 KiB
C#

#region << 版 本 注 释 >>
/*--------------------------------------------------------------------
* (c) 2026 WenJY
* CLR4.0.30319.42000
* Mr.Wen's MacBook Pro
* Sln.Wcs
* 45EEA80E-9828-4E99-B3CF-F88DF38F4C55
*
* WenJY
*
* 2026-05-08 14:59:38
* V1.0.0
*
*
*--------------------------------------------------------------------
*
*
*
*
* V1.0.0
*--------------------------------------------------------------------*/
#endregion << 版 本 注 释 >>
using Sln.Wcs.Business;
using Sln.Wcs.Business.Domain.Dto.CreateTask;
using Sln.Wcs.Business.Domain.Dto.FilterLocation;
using Sln.Wcs.Business.Domain.Dto.SaveTask;
using Sln.Wcs.Business.Domain.Enum;
namespace Sln.Wcs;
public class MaterialInStoreTest
{
private readonly StoreTaskBusiness _service;
public MaterialInStoreTest(StoreTaskBusiness service)
{
_service = service;
}
public void Run()
{
var locationInfo = _service.FilterLocation(new FilterLocationDto()
{
materialCode = "20260507000001",
palletBarcode = "20260507000001"
});
for (int i = 0; i < 10; i++)
{
var materialBarcode = $"2026050700000{i + 1}";
var palletBarcode = $"PALLET{i + 1:D2}";
var info = _service.CreateTask(new CreateTaskDto()
{
materialCode = "20260507000001",
materialBarcode = materialBarcode,
palletBarcode = palletBarcode,
amount = 1,
startPoint = "13#_L1_01",
endPoint = "15#_L3_03",
taskCategory = TaskCategoryEnum.Material,
taskType = TaskTypeEnum.InStore
});
_service.SaveTask(new SaveTaskDto()
{
taskCode = info.data.taskCode,
taskQueue = info.data.taskQueue,
taskDetails = info.data.taskDetails,
});
Console.WriteLine($"[MaterialInStoreTest] 第 {i + 1} 条任务创建完成: {info.data.taskCode}");
}
}
}