using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Threading.Tasks;
using Win_in.Sfs.Shared.Domain.Entities;
namespace Win_in.Sfs.Wms.Job.Domain;
///
/// 发货任务
///
[Display(Name = "发货任务")]
public class DeliverJob : SfsJobAggregateRootBase
{
///
/// 发货请求单号
///
[IgnoreUpdate]
public string DeliverRequestNumber { get; set; }
///
/// 客户代码
///
[IgnoreUpdate]
public string CustomerCode { get; set; }
///
/// 客户地址
///
[IgnoreUpdate]
public string CustomerAddressCode { get; set; }
///
/// 发货日期
///
[IgnoreUpdate]
public DateTime DeliverTime { get; set; }
///
/// 发货计划单号
///
[IgnoreUpdate]
public string DeliverPlanNumber { get; set; }
///
/// 任务明细
///
[IgnoreUpdate]
public override List Details { get; set; } = new List();
///
/// 设置任务明细的实际库位和实际数量
///
///
///
///
///
///
///
///
///
///
///
public virtual async Task SetDetail(Guid id, string handledLocationCode, string handledLocationErpCode,
string handledWarehouseCode, decimal handledQty,
string handledSupplierBatch, DateTime handledArriveDate, DateTime handledProduceDate, DateTime handledExpireDate
, string handledContainerCode, string handledLot, string handledPackingCode)
{
var detail = GetDetail(id);
detail.HandledLocationCode = handledLocationCode;
detail.HandledLocationErpCode = handledLocationErpCode;
detail.HandledWarehouseCode = handledWarehouseCode;
detail.HandledQty = handledQty;
detail.HandledSupplierBatch = handledSupplierBatch;
detail.HandledArriveDate = handledArriveDate;
detail.HandledProduceDate = handledProduceDate;
detail.HandledExpireDate = handledExpireDate;
detail.HandledContainerCode = handledContainerCode;
detail.HandledLot = handledLot;
detail.HandledPackingCode = handledPackingCode;
await Task.CompletedTask.ConfigureAwait(false);
}
}