using Microsoft.AspNetCore.Components.Forms; using Newtonsoft.Json; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Text; using System.Threading.Tasks; using WIDESEA_Model.Models; namespace WIDESEA_DTO.Outbound { public class OutboundOrderGetDTO { public string OrderNo { get; set; } public int pageNo { get; set; } } // 拆包链DTO public class SplitPackageChainDto { public int Id { get; set; } public DateTime SplitTime { get; set; } public string Operator { get; set; } public string OriginalBarcode { get; set; } public string NewBarcode { get; set; } public decimal SplitQty { get; set; } public decimal RemainQuantity { get; set; } public bool IsReverted { get; set; } public DateTime? RevertTime { get; set; } public int? PreviousSplitRecordId { get; set; } public int NewLockInfoId { get; set; } public int Status { get; set; } } // 拆包请求 public class SplitPackageRequest { public int OutStockLockInfoId { get; set; } public string MaterielCode { get; set; } public string Operator { get; set; } [Required(ErrorMessage = "订单号不能为空")] public string OrderNo { get; set; } [Required(ErrorMessage = "托盘号不能为空")] public string PalletCode { get; set; } [Required(ErrorMessage = "原条码不能为空")] public string OriginalBarcode { get; set; } [Range(0.001, double.MaxValue, ErrorMessage = "拆包数量必须大于0")] public decimal SplitQuantity { get; set; } } public class ConfirmPickingDto { [JsonProperty("orderNo")] public string OrderNo { get; set; } [JsonProperty("palletCode")] public string PalletCode { get; set; } [JsonProperty("barcode")] public string Barcode { get; set; } } public class SummaryPickingDto { public string PalletCode { get; set; } public string MaterielCode { get; set; } public int UnpickedCount { get; set; } public decimal UnpickedQuantity { get; set; } public int pickedCount { get; set; } } public class PickingConfirmRequest { public int OrderDetailId { get; set; } public string Barcode { get; set; } public string MaterielCode { get; set; } public decimal PickQuantity { get; set; } public string LocationCode { get; set; } public string PalletCode { get; set; } public int StockId { get; set; } // 库存ID public int OutStockLockInfoId { get; set; } // 出库锁定信息ID } public class DirectOutboundRequest { public string PalletCode { get; set; } public string OrderNo { get; set; } } public class BackToStockRequest { public string PalletCode { get; set; } public string CurrentLocation { get; set; } public string TargetLocation { get; set; } public string Operator { get; set; } } public class BackToStockCompleteRequest { public string TaskNum { get; set; } public string TargetLocation { get; set; } public DateTime CompleteTime { get; set; } } public class InputDto { } public class OutputDto { } #region 入参DTO public class ScanCodeValidateInput : InputDto { public string ScanCode { get; set; } = string.Empty; // 扫描的条码 public string OrderNo { get; set; } = string.Empty; // 出库单号 } public class PickingConfirmInput : InputDto { public string TaskNum { get; set; } = string.Empty; // 任务号 public string PalletCode { get; set; } = string.Empty; // 托盘码 public string MaterielBarcode { get; set; } = string.Empty; // 物料条码 } public class SplitPackageInput : InputDto { public long OutStockLockId { get; set; } // 待拆分的出库详情ID public string NewBarcode { get; set; } = string.Empty; // 新条码 public decimal SplitQty { get; set; } // 新条码分配数量 } public class StockReturnInput : InputDto { public string OrderNo { get; set; } = string.Empty; // 出库单号 public string TaskNum { get; set; } = string.Empty; // 任务号(可选) } public class OutStockLockDetailInput : InputDto { public long OutStockLockId { get; set; } // 出库详情ID } #endregion #region 出参DTO //[AutoMapFrom(typeof(OutStockLockInfo))] public class OutStockLockInfoOutput : OutputDto { public string TaskNum { get; set; } = string.Empty; public string PalletCode { get; set; } = string.Empty; public string CurrentBarcode { get; set; } = string.Empty; public decimal AssignQuantity { get; set; } public decimal PickedQty { get; set; } public int Status { get; set; } public bool IsSplitted { get; set; } } //[AutoMapFrom(typeof(OutStockLockInfo))] public class OutStockLockDetailOutput : OutputDto { public string CurrentBarcode { get; set; } = string.Empty; public decimal AssignQuantity { get; set; } } public class LockInfoDetailDto : Dt_OutStockLockInfo { public string MaterielName { get; set; } public string Unit { get; set; } } public class MaterielBarcodeValidateOutput : OutputDto { public bool IsValid { get; set; } public long OutStockLockId { get; set; } public decimal PackageQty { get; set; } // 分配数量 public string Message { get; set; } = string.Empty; } //[AutoMapFrom(typeof(PickingRecord))] public class PickingRecordOutput : OutputDto { public string Barcode { get; set; } = string.Empty; public string PalletCode { get; set; } = string.Empty; public decimal PickQuantity { get; set; } public string PickTime { get; set; } = string.Empty; } #endregion public class ScanCodeValidateReq { public string ScanCode { get; set; } = string.Empty; // 扫描的条码 public string OrderNo { get; set; } = string.Empty; // 出库单号 } public class PickingConfirmReq { public string TaskNum { get; set; } = string.Empty; // 任务号 public string PalletCode { get; set; } = string.Empty; // 托盘码 public string MaterielBarcode { get; set; } = string.Empty; // 物料条码 } public class SplitPackageReq { public long OutStockLockId { get; set; } // 待拆分的出库详情ID public string NewBarcode { get; set; } = string.Empty; // 新条码 public decimal SplitQty { get; set; } // 新条码分配数量 } public class StockReturnReq { public string OrderNo { get; set; } = string.Empty; // 出库单号 public string TaskNum { get; set; } = string.Empty; // 任务号(可选) } public class OutStockLockDetailReq { public long OutStockLockId { get; set; } // 出库详情ID } public class MaterielBarcodeValidateResp { public bool IsValid { get; set; } public long OutStockLockId { get; set; } public decimal PackageQty { get; set; } // 整包数量(分配数量) public string Message { get; set; } = string.Empty; } public class OutStockLockDetailResp { public string CurrentBarcode { get; set; } = string.Empty; public decimal AssignQuantity { get; set; } } public class OutStockLockListResp { public long Id { get; set; } public string TaskNum { get; set; } = string.Empty; public string PalletCode { get; set; } = string.Empty; public string CurrentBarcode { get; set; } = string.Empty; public decimal AssignQuantity { get; set; } public decimal PickedQty { get; set; } public int Status { get; set; } public bool IsSplitted { get; set; } } public class PickedRecordListResp { public string barcode { get; set; } = string.Empty; public string palletCode { get; set; } = string.Empty; public decimal pickQuantity { get; set; } public string pickTime { get; set; } = string.Empty; } public class CancelPickingDto { public string OrderNo { get; set; } public string PalletCode { get; set; } public string Barcode { get; set; } } public class CancelSplitChainDto { [Required(ErrorMessage = "订单号不能为空")] public string OrderNo { get; set; } [Required(ErrorMessage = "托盘号不能为空")] public string PalletCode { get; set; } [Required(ErrorMessage = "起始条码不能为空")] public string StartBarcode { get; set; } } public class SplitPackageChainInfoRequestDto { [Required(ErrorMessage = "订单号不能为空")] public string OrderNo { get; set; } [Required(ErrorMessage = "条码不能为空")] public string Barcode { get; set; } } public class SplitPackageDto { public string OrderNo { get; set; } public string PalletCode { get; set; } public string OriginalBarcode { get; set; } public decimal SplitQuantity { get; set; } public string MaterielCode { get; set; } } public class RevertSplitDto { public string OriginalBarcode { get; set; } } // 拆包结果类 public class SplitResult { public string materialCode { get; set; } public string supplierCode { get; set; } public string quantityTotal { get; set; } public string batchNumber { get; set; } public string batch { get; set; } public string factory { get; set; } public string date { get; set; } // public string OriginalBarcode { get; set; } // public string NewBarcode { get; set; } //public decimal SplitQuantity { get; set; } //public decimal RemainQuantity { get; set; } } }