出库单结构调整
This commit is contained in:
@@ -25,17 +25,6 @@ namespace WMS.Web.Domain.Entitys
|
||||
/// </summary>
|
||||
[Column("Fid")]
|
||||
public int Fid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 销售订单号
|
||||
///</summary>
|
||||
[Column("SaleBillNo")]
|
||||
public List<string> SaleBillNos { get; set; }
|
||||
/// <summary>
|
||||
/// 来源单号
|
||||
///</summary>
|
||||
[Column("SourceBillNo")]
|
||||
public List<string> SourceBillNos { get; set; }
|
||||
/// <summary>
|
||||
/// 物料Id
|
||||
///</summary>
|
||||
@@ -61,5 +50,10 @@ namespace WMS.Web.Domain.Entitys
|
||||
///</summary>
|
||||
[Column("Qty")]
|
||||
public decimal Qty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 对应erp明细 同一个物料 存在于不同的来源单中(合并后出现多条)
|
||||
/// </summary>
|
||||
public List<OutStockErpDetails> ErpDetails { get; set; } = new List<OutStockErpDetails>();
|
||||
}
|
||||
}
|
||||
|
||||
48
src/WMS.Web.Domain/Entitys/OutStockErpDetails.cs
Normal file
48
src/WMS.Web.Domain/Entitys/OutStockErpDetails.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text;
|
||||
using WMS.Web.Core;
|
||||
|
||||
namespace WMS.Web.Domain.Entitys
|
||||
{
|
||||
/// <summary>
|
||||
/// 对应金蝶的明细
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[Table("t_erp_outstock_erp_details")]
|
||||
public class OutStockErpDetails : EntityBase
|
||||
{
|
||||
public OutStockErpDetails() { }
|
||||
/// <summary>
|
||||
/// 主键 订单编号
|
||||
/// </summary>
|
||||
[Column("Id")]
|
||||
public override int Id { get; set; }
|
||||
/// <summary>
|
||||
/// 任务单明细Id
|
||||
/// </summary>
|
||||
[Column("DetailId")]
|
||||
public int DetailId { get; set; }
|
||||
/// <summary>
|
||||
/// 对应金蝶单据明细id(销售出库同步金蝶下推使用)
|
||||
/// </summary>
|
||||
[Column("Erp_DetailId")]
|
||||
public int Erp_DetailId { get; set; }
|
||||
/// <summary>
|
||||
/// 来源单号
|
||||
///</summary>
|
||||
[Column("SourceBillNo")]
|
||||
public string SourceBillNo { get; set; }
|
||||
/// <summary>
|
||||
/// 销售订单号
|
||||
///</summary>
|
||||
[Column("SaleBillNo")]
|
||||
public string SaleBillNo { get; set; }
|
||||
/// <summary>
|
||||
/// 出库数量
|
||||
///</summary>
|
||||
[Column("Qty")]
|
||||
public decimal Qty { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -204,14 +204,14 @@ namespace WMS.Web.Domain.Services
|
||||
OperateTime = DateTime.Now,
|
||||
OperateType = OutStockTypeConvert(outStock.Type),
|
||||
OperateUser = userName,
|
||||
Remark = "来源单号:" + string.Join(",", outstockDetail.SourceBillNos) + "\r\n" + "出库单号:" + outStock.BillNo
|
||||
Remark = "来源单号:" + string.Join(",", outstockDetail.ErpDetails.Select(s=>s.SourceBillNo)) + "\r\n" + "出库单号:" + outStock.BillNo
|
||||
};
|
||||
if (outStock.Type == OutStockType.Sal)
|
||||
{
|
||||
var detail = outStock.Details.FirstOrDefault(f => f.MaterialId == entity.MaterialId);
|
||||
var res_c = await _erpService.BillQueryForCustomer();
|
||||
var customer = res_c.Data.FirstOrDefault(f => f.Id == outStock.ReceiptCustomerId);
|
||||
op.Remark += "\r\n" + "销售订单号:" + string.Join(",", detail.SaleBillNos);
|
||||
op.Remark += "\r\n" + "销售订单号:" + string.Join(",", detail.ErpDetails.Select(s => s.SaleBillNo));
|
||||
op.Remark += "\r\n" + "客户:" + customer?.Name;
|
||||
}
|
||||
sList.Add(op);
|
||||
|
||||
Reference in New Issue
Block a user