调整金蝶同步
This commit is contained in:
@@ -51,7 +51,7 @@ namespace WMS.Web.Domain.Entitys
|
||||
/// 单据类型
|
||||
/// </summary>
|
||||
[Column("Type")]
|
||||
public OrderType Type { get; set; } = OrderType.Sal_Out;
|
||||
public OutStockType Type { get; set; } = OutStockType.Sal;
|
||||
/// <summary>
|
||||
/// 操作人(出库人)
|
||||
/// </summary>
|
||||
@@ -71,6 +71,14 @@ namespace WMS.Web.Domain.Entitys
|
||||
/// 明细
|
||||
/// </summary>
|
||||
public List<OutStockTaskDetails> Details = new List<OutStockTaskDetails>();
|
||||
public void Create(OutStockType type, string sourceBillNo, int deliveryOrgId, int receiptCustomerId, DateTime createTime)
|
||||
{
|
||||
this.Type = type;
|
||||
this.SourceBillNo = sourceBillNo;
|
||||
this.DeliveryOrgId = deliveryOrgId;
|
||||
this.ReceiptCustomerId = receiptCustomerId;
|
||||
this.CreateTime = createTime;
|
||||
}
|
||||
/// <summary>
|
||||
/// 生成单据号
|
||||
/// </summary>
|
||||
@@ -114,7 +122,7 @@ namespace WMS.Web.Domain.Entitys
|
||||
{
|
||||
// 符合合并数据逻辑:出库状态为”待拣货”+出库类型为:销售出库+发货组织一致+收货客户一致+发货仓库一致
|
||||
if (list.Where(w => w.Status != OutStockStatus.Wait).Any()) return Result.ReFailure(ResultCodes.MergeStatusError);
|
||||
if (list.Where(w => w.Type != OrderType.Sal_Out).Any()) return Result.ReFailure(ResultCodes.MergeStatusError);
|
||||
if (list.Where(w => w.Type != OutStockType.Sal).Any()) return Result.ReFailure(ResultCodes.MergeStatusError);
|
||||
if (list.GroupBy(g => g.DeliveryOrgId).Count() > 1) return Result.ReFailure(ResultCodes.MergeStatusError);
|
||||
if (list.GroupBy(g => g.ReceiptCustomerId).Count() > 1) return Result.ReFailure(ResultCodes.MergeStatusError);
|
||||
|
||||
@@ -131,7 +139,7 @@ namespace WMS.Web.Domain.Entitys
|
||||
this.OperatorId = creatorId;
|
||||
this.OperateTime = DateTime.Now;
|
||||
this.Status = OutStockStatus.Wait;
|
||||
this.Type = OrderType.Sal_Out;
|
||||
this.Type = OutStockType.Sal;
|
||||
this.Details = details;
|
||||
|
||||
return Result.ReSuccess();
|
||||
|
||||
Reference in New Issue
Block a user