diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/OperationPacking/ContainerRequestController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/OperationPacking/ContainerRequestController.cs
new file mode 100644
index 000000000..4f6c78d48
--- /dev/null
+++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/OperationPacking/ContainerRequestController.cs
@@ -0,0 +1,36 @@
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using Volo.Abp.AspNetCore.Mvc;
+using Win_in.Sfs.Wms.Store.Application.Contracts;
+
+namespace Win_in.Sfs.Wms.Pda.Controllers.Stores;
+
+///
+///空器具呼叫请求
+///
+[ApiController]
+[Route($"{PdaHostConst.ROOT_ROUTE}store/integration-packing-note")]
+
+public class IntegrationPackingNoteController : AbpController
+{
+ private readonly IIntegrationPackingNoteAppService _integrationPackingNoteAppService;
+
+ ///
+ ///
+ ///
+ ///
+ public IntegrationPackingNoteController(IIntegrationPackingNoteAppService integrationPackingNoteAppService)
+ {
+ _integrationPackingNoteAppService = integrationPackingNoteAppService;
+ }
+
+ ///
+ ///
+ ///
+ ///
+ [HttpPost("")]
+ public virtual async Task CreateAsync(IntegrationPackingNoteEditInput input)
+ {
+ await _integrationPackingNoteAppService.CreateAsync(input).ConfigureAwait(false);
+ }
+}
diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/OperationPacking/SeparationPackingNoteController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/OperationPacking/SeparationPackingNoteController.cs
new file mode 100644
index 000000000..491ed304d
--- /dev/null
+++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/OperationPacking/SeparationPackingNoteController.cs
@@ -0,0 +1,37 @@
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using Volo.Abp.AspNetCore.Mvc;
+using Win_in.Sfs.Wms.Store.Application.Contracts;
+
+namespace Win_in.Sfs.Wms.Pda.Controllers.Stores;
+
+///
+///
+///
+[ApiController]
+[Route($"{PdaHostConst.ROOT_ROUTE}store/separation-packing-note")]
+
+public class SeparationPackingNoteController : AbpController
+{
+ private readonly ISeparationPackingNoteAppService _separationPackingNoteAppService;
+
+ ///
+ ///
+ ///
+ ///
+ public SeparationPackingNoteController(ISeparationPackingNoteAppService separationPackingNoteAppService)
+ {
+ _separationPackingNoteAppService = separationPackingNoteAppService;
+ }
+
+ ///
+ ///
+ ///
+ ///
+ [HttpPost("")]
+ public virtual async Task CreateAsync(SeparationPackingNoteEditInput input)
+ {
+ await _separationPackingNoteAppService.CreateAsync(input).ConfigureAwait(false);
+ }
+
+}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/OperationPacking/IntegrationPackingNotes/IIntegrationPackingNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/OperationPacking/IntegrationPackingNotes/IIntegrationPackingNoteAppService.cs
index 374f78700..3f5f8eee1 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/OperationPacking/IntegrationPackingNotes/IIntegrationPackingNoteAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/OperationPacking/IntegrationPackingNotes/IIntegrationPackingNoteAppService.cs
@@ -9,5 +9,5 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public interface IIntegrationPackingNoteAppService : ISfsStoreMasterReadOnlyAppServiceBase
{
-
+ Task CreateAsync(IntegrationPackingNoteEditInput input);
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/OperationPacking/SeparationPackingNotes/ISeparationPackingNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/OperationPacking/SeparationPackingNotes/ISeparationPackingNoteAppService.cs
index 8ea9f8568..9fe50a044 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/OperationPacking/SeparationPackingNotes/ISeparationPackingNoteAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/OperationPacking/SeparationPackingNotes/ISeparationPackingNoteAppService.cs
@@ -9,5 +9,5 @@ namespace Win_in.Sfs.Wms.Store.Application.Contracts;
public interface ISeparationPackingNoteAppService : ISfsStoreMasterReadOnlyAppServiceBase
{
-
+ Task CreateAsync(SeparationPackingNoteEditInput input);
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/OperationPacking/IntegrationPackingNotes/IntegrationPackingNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/OperationPacking/IntegrationPackingNotes/IntegrationPackingNoteAppService.cs
index e816dcf80..68fa0877e 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/OperationPacking/IntegrationPackingNotes/IntegrationPackingNoteAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/OperationPacking/IntegrationPackingNotes/IntegrationPackingNoteAppService.cs
@@ -78,105 +78,20 @@ public class IntegrationPackingNoteAppService :
throw new UserFriendlyException($"此物料已经被【任务编号:{outDtos.First().JobNumber}】占用");
}
- if (input.Details.Any(p=>p.Qty<=0))
- {
- //标签记录
- var splitPackingRecDtos = await _splitPackingRecAppService.GetListByToPackingCode(new List { input.PackingCode }).ConfigureAwait(false);
- var splitPackingRecDto = splitPackingRecDtos.First();
- var inventoryLabelWithoutCodeCreateInput = new InventoryLabelWithoutCodeCreateInput
- {
- Qty = detailInput.Qty, ItemCode = detailInput.ItemCode,
- SupplierCode = detailInput.SupplierCode,
- Lot = detailInput.Lot,
- Uom = detailInput.Uom,
- LocationErpCode = detailInput.LocationErpCode,
- ItemDesc1 = detailInput.ItemDesc1,
- ArriveDate = detailInput.ArriveDate,
- StdPackQty = detailInput.StdPackQty,
- ProdLine = string.Empty,
- AsnNumber = detailInput.PurchaseInfo_AsnNumber,
- ContainerCode = detailInput.ContainerCode,
- ExpireDate = detailInput.ExpireDate,
- FullBarcodeString = string.Empty,
- ItemDesc2 = detailInput.ItemDesc2,
- ItemName = detailInput.ItemName,
- SupplierName = detailInput.SupplierName,
- Remark = detailInput.Remark,
- LabelStatus = LabelStatus.Enable,
- LabelType = detailInput.LabelType,
- PlanArriveDate = detailInput.PlanArriveDate,
- PoNumber = detailInput.PurchaseInfo_PoNumber,
- ProduceDate = detailInput.ProduceDate,
- QLevel = string.Empty,
- QualityFile = string.Empty,
- RecommendLocationCode = detailInput.RecommendLocationCode,
- RpNumber = detailInput.RpNumber,
- Shift = string.Empty,
- Specifications = string.Empty,
- SupplierBatch = detailInput.SupplierBatch,
- SupplierItemCode = detailInput.ItemCode,
- SupplierItemName = detailInput.SupplierItemName,
- SupplierSimpleName = detailInput.SupplierSimpleName,
- Team = string.Empty,
- };
- var inventoryLabelDto=await _inventoryLabelAppService.GenerateAndCreateAsync(inventoryLabelWithoutCodeCreateInput).ConfigureAwait(false);
- var splitPackingRecEditInputs = new List()
- {
- new SplitPackingRecEditInput()
- {
- ItemCode = inventoryLabelDto.ItemCode,
- SupplierCode = inventoryLabelDto.SupplierCode,
- ToPackingCode = inventoryLabelDto.Code,
- FromPackingCode = input.PackingCode,
- LocationErpCode = inventoryLabelDto.LocationErpCode,
- ItemDesc1 = inventoryLabelDto.ItemDesc1,
- FromLot = input.Lot,
- ToLot = inventoryLabelDto.Lot,
- ArriveDate = inventoryLabelDto.ArriveDate,
- ItemName = inventoryLabelDto.ItemName,
- ItemDesc2 = inventoryLabelDto.ItemDesc2,
- PurchaseInfo_PoNumber = inventoryLabelDto.PoNumber,
- LabelType = (EnumLabelType)inventoryLabelDto.LabelType,
- RecommendLocationCode = inventoryLabelDto.RecommendLocationCode,
- RpNumber = inventoryLabelDto.RpNumber,
- SupplierName = inventoryLabelDto.SupplierName,
- Remark = inventoryLabelDto.Remark,
- FromQty = input.Qty,
- ToQty = inventoryLabelDto.Qty,
- PurchaseInfo_AsnNumber = inventoryLabelDto.AsnNumber,
- ExpireDate = inventoryLabelDto.ExpireDate,
- FullBarcodeString = inventoryLabelDto.FullBarcodeString,
- SupplierBatch = inventoryLabelDto.SupplierBatch,
- ProduceDate = inventoryLabelDto.ProduceDate,
- LabelStatus = Basedata.LabelStatus.Enable,
- SupplierSimpleName = inventoryLabelDto.SupplierSimpleName,
- SupplierItemCode = inventoryLabelDto.SupplierItemCode,
- SupplierItemName = inventoryLabelDto.SupplierItemName,
- PlanArriveDate = inventoryLabelDto.PlanArriveDate,
- FromStdPackQty = input.StdPackQty,
- FromUom = input.Uom,
- OprType = OprTypeEnum.SplitBox,
- ReceiptRecNumber = inventoryLabelDto.RpNumber,
- ToStdPackQty = inventoryLabelDto.StdPackQty,
- ToUom = inventoryLabelDto.Uom,
- TaskOrderNumber = detailInput.TaskOrderNumber,
- ArrivalNoticNumber = detailInput.ArrivalNoticNumber,
- PutOnShelfNumber = detailInput.PutOnShelfNumber,
- }
- };
- await _splitPackingRecAppService.BatchInsertAsync(splitPackingRecEditInputs).ConfigureAwait(false);
-
- //创建标签
- var dto= await base.CreateAsync(input).ConfigureAwait(false);
+ var dto = await base.CreateAsync(input).ConfigureAwait(false);
foreach (var detailInput in input.Details)
{
//库存移动
- var transferLogEditInput=await BuildTransferLogsAsync(dto, detailInput, splitPackingRecEditInputs.First()).ConfigureAwait(false);
+ var transferLogEditInput =
+ await BuildTransferLogsAsync(dto, detailInput)
+ .ConfigureAwait(false);
transferLogEditInputs.Add(transferLogEditInput);
}
await _transferLogAppService.AddManyAsync(transferLogEditInputs).ConfigureAwait(false);
+
+ return dto;
}
///
@@ -233,9 +148,4 @@ public class IntegrationPackingNoteAppService :
return transferLogEditInput;
}
-
- private async Task CreateLabelAsync()
- {
- var batchInsert=await _splitPackingRecAppService.BatchInsertAsync().ConfigureAwait(false);
- }
}
diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/OperationPacking/SeparationPackingNotes/SeparationPackingNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/OperationPacking/SeparationPackingNotes/SeparationPackingNoteAppService.cs
index 31f2bf534..d7aa5e023 100644
--- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/OperationPacking/SeparationPackingNotes/SeparationPackingNoteAppService.cs
+++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/OperationPacking/SeparationPackingNotes/SeparationPackingNoteAppService.cs
@@ -76,7 +76,7 @@ public class SeparationPackingNoteAppService :
if (input.Qty <= 0)
{
- throw new UserFriendlyException($"数量小于或等于0");
+ throw new UserFriendlyException($"被拆箱的数量小于或等于0");
}
var entity = input.ToObject();
@@ -88,8 +88,6 @@ public class SeparationPackingNoteAppService :
entity = await _repository.InsertAsync(entity).ConfigureAwait(false);
var dto = entity.ToObject();
- //var dto = await base.CreateAsync(input).ConfigureAwait(false);
-
foreach (var detailInput in input.Details)
{
//创建标签