mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-20 02:29:39 +08:00
Add demo
This commit is contained in:
@@ -0,0 +1,63 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using ERP1.Entity;
|
||||||
|
using SqlSugar;
|
||||||
|
|
||||||
|
namespace ERP1.Entity
|
||||||
|
{
|
||||||
|
[Serializable]
|
||||||
|
[SugarTable("t_Address")]
|
||||||
|
public class AddressEntity
|
||||||
|
{
|
||||||
|
#region # 数据库字段 #
|
||||||
|
|
||||||
|
/// <summary>地址Id</summary>
|
||||||
|
[SugarColumn(IsPrimaryKey = true, IsIdentity = false)]
|
||||||
|
public string AddressId { set; get; }
|
||||||
|
|
||||||
|
/// <summary>RefId(订单收货地址、订单发货单收货地址、客户收货地址)</summary>
|
||||||
|
public string RefId { set; get; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>姓名</summary>
|
||||||
|
public string Name { set; get; }
|
||||||
|
|
||||||
|
/// <summary>联系电话</summary>
|
||||||
|
public string Telephone { set; get; }
|
||||||
|
|
||||||
|
/// <summary>电子邮箱</summary>
|
||||||
|
public string Email { set; get; }
|
||||||
|
|
||||||
|
/// <summary>国家/地区</summary>
|
||||||
|
public string Country { set; get; }
|
||||||
|
|
||||||
|
/// <summary>省/州</summary>
|
||||||
|
public string State { set; get; }
|
||||||
|
|
||||||
|
/// <summary>城市</summary>
|
||||||
|
public string City { set; get; }
|
||||||
|
|
||||||
|
/// <summary>地址</summary>
|
||||||
|
public string Address { set; get; }
|
||||||
|
|
||||||
|
/// <summary>邮编</summary>
|
||||||
|
public string ZipCode { set; get; }
|
||||||
|
|
||||||
|
/// <summary>创建时间</summary>
|
||||||
|
public DateTime AddTime { set; get; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
/// <summary>国家/地区(中文名称)</summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public string Country_NameCn { set; get; }
|
||||||
|
|
||||||
|
/// <summary>省/州(中文名称)/summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public string State_NameCn { set; get; }
|
||||||
|
|
||||||
|
/// <summary>省/州(英文名称)/summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public string State_NameEn { set; get; }
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,72 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using ERP1.Entity;
|
||||||
|
using SqlSugar;
|
||||||
|
|
||||||
|
namespace ERP1.Entity
|
||||||
|
{
|
||||||
|
[Serializable]
|
||||||
|
[SugarTable("t_Customer")]
|
||||||
|
public class CustomerEntity: TeamBasePart
|
||||||
|
{
|
||||||
|
#region # 数据库字段 #
|
||||||
|
/// <summary>客户Id</summary>
|
||||||
|
[SugarColumn(IsPrimaryKey = true, IsIdentity = false)]
|
||||||
|
public string CustomerId { set; get; }
|
||||||
|
|
||||||
|
/// <summary>姓名</summary>
|
||||||
|
public string Name { set; get; }
|
||||||
|
|
||||||
|
/// <summary>联系电话</summary>
|
||||||
|
public string Telephone { set; get; }
|
||||||
|
|
||||||
|
/// <summary>电子邮箱</summary>
|
||||||
|
public string Email { set; get; }
|
||||||
|
|
||||||
|
/// <summary>联系方式</summary>
|
||||||
|
public string? Concat { set; get; }
|
||||||
|
|
||||||
|
/// <summary>国家/地区</summary>
|
||||||
|
public string Country { set; get; }
|
||||||
|
|
||||||
|
/// <summary>客户等级</summary>
|
||||||
|
public string Level { get; set; }
|
||||||
|
|
||||||
|
/// <summary>备注</summary>
|
||||||
|
public string? Remark { set; get; }
|
||||||
|
|
||||||
|
/// <summary>交易笔数</summary>
|
||||||
|
public Int32 TransNum { set; get; }
|
||||||
|
|
||||||
|
/// <summary>交易金额</summary>
|
||||||
|
public Decimal TransAmt { set; get; }
|
||||||
|
|
||||||
|
/// <summary>最后交易时间</summary>
|
||||||
|
public DateTime? LastTransTime { set; get; }
|
||||||
|
|
||||||
|
/// <summary>创建时间</summary>
|
||||||
|
public DateTime AddTime { set; get; }
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
/// <summary>国家/地区(中文名称)</summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public string Country_NameCn { set; get; }
|
||||||
|
|
||||||
|
/// <summary>等级名称</summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public string LevelName { set; get; }
|
||||||
|
|
||||||
|
/// <summary>是否黑名单</summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public bool IsBlack { set; get; }
|
||||||
|
|
||||||
|
/// <summary>黑名单类型</summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public List<string> BlackTypes { set; get; }
|
||||||
|
|
||||||
|
/// <summary>收货地址</summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
[Navigate(NavigateType.OneToMany, nameof(AddressEntity.RefId))]
|
||||||
|
public List<AddressEntity> CustomerAddressEntitys { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,58 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using ERP1.Entity;
|
||||||
|
using SqlSugar;
|
||||||
|
|
||||||
|
namespace ERP1.Entity
|
||||||
|
{
|
||||||
|
[Serializable]
|
||||||
|
[SugarTable("t_orderamt")]
|
||||||
|
public class OrderAmtEntity
|
||||||
|
{
|
||||||
|
#region # 数据库字段 #
|
||||||
|
|
||||||
|
/// <summary>订单单号</summary>
|
||||||
|
public string SaleNo { set; get; }
|
||||||
|
|
||||||
|
/// <summary>类型</summary>
|
||||||
|
public string Type { set; get; }
|
||||||
|
|
||||||
|
/// <summary>异常款项单号</summary>
|
||||||
|
public string? AbMoneyNo { set; get; }
|
||||||
|
|
||||||
|
/// <summary>售后单号</summary>
|
||||||
|
public string? ServiceNo { set; get; }
|
||||||
|
|
||||||
|
/// <summary>收款方式</summary>
|
||||||
|
public string? PaymentMethod { set; get; }
|
||||||
|
|
||||||
|
/// <summary>实收币种</summary>
|
||||||
|
public string? PaymentCurrency { set; get; }
|
||||||
|
|
||||||
|
/// <summary>实收金额</summary>
|
||||||
|
public Decimal? PaymentAmt { set; get; }
|
||||||
|
|
||||||
|
/// <summary>收款流水号</summary>
|
||||||
|
public string? PaymentNo { set; get; }
|
||||||
|
|
||||||
|
/// <summary>收款备注</summary>
|
||||||
|
public string? PaymentRemark { set; get; }
|
||||||
|
|
||||||
|
/// <summary>创建时间</summary>
|
||||||
|
public DateTime AddTime { set; get; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
/// <summary>收款方式名称</summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public string? PaymentMethodName { set; get; }
|
||||||
|
|
||||||
|
/// <summary>实收币种名称</summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public string? PaymentCurrencyName { set; get; }
|
||||||
|
|
||||||
|
///// <summary>订单信息</summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public OrderEntity OrderEntity { get; set; }
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,195 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using ERP1.Entity;
|
||||||
|
using SqlSugar;
|
||||||
|
|
||||||
|
namespace ERP1.Entity
|
||||||
|
{
|
||||||
|
[Serializable]
|
||||||
|
[SugarTable("t_OrderDelivery")]
|
||||||
|
public class OrderDeliveryEntity
|
||||||
|
{
|
||||||
|
#region # 数据库字段 #
|
||||||
|
|
||||||
|
/// <summary>发货单号</summary>
|
||||||
|
[SugarColumn(IsPrimaryKey = true, IsIdentity = false)]
|
||||||
|
public string DeliveryNo { set; get; }
|
||||||
|
|
||||||
|
/// <summary>订单号</summary>
|
||||||
|
public string SaleNo { set; get; }
|
||||||
|
|
||||||
|
/// <summary>揽收单号</summary>
|
||||||
|
public string? ReceiveNo { set; get; }
|
||||||
|
|
||||||
|
/// <summary>业务备注</summary>
|
||||||
|
public string? Remark { set; get; }
|
||||||
|
|
||||||
|
/// <summary>创建人Id</summary>
|
||||||
|
public string AdderId { set; get; }
|
||||||
|
|
||||||
|
/// <summary>创建时间</summary>
|
||||||
|
public DateTime AddTime { set; get; }
|
||||||
|
|
||||||
|
/// <summary>发货时间</summary>
|
||||||
|
public DateTime? SendTime { set; get; }
|
||||||
|
|
||||||
|
/// <summary>发货备注</summary>
|
||||||
|
public string? DeliveryRemark { set; get; }
|
||||||
|
|
||||||
|
/// <summary>关闭原因</summary>
|
||||||
|
public string? CloseRemark { set; get; }
|
||||||
|
|
||||||
|
/// <summary>货代公司</summary>
|
||||||
|
public string Forwarder { set; get; }
|
||||||
|
|
||||||
|
/// <summary>物流公司</summary>
|
||||||
|
public string LogisticsProviderId { set; get; }
|
||||||
|
|
||||||
|
/// <summary>物流单号</summary>
|
||||||
|
public string? LogisticeNo { set; get; }
|
||||||
|
|
||||||
|
/// <summary>物流费用¥</summary>
|
||||||
|
public Decimal? LogisticsFee { set; get; }
|
||||||
|
|
||||||
|
/// <summary>物流更新时间</summary>
|
||||||
|
public DateTime? LastUpdateTime { set; get; }
|
||||||
|
|
||||||
|
/// <summary>物流未更新天数</summary>
|
||||||
|
public Int32? NotUpdateDays { set; get; }
|
||||||
|
|
||||||
|
/// <summary>中转日期</summary>
|
||||||
|
public DateTime? TransitDate { set; get; }
|
||||||
|
|
||||||
|
/// <summary>中转耗时(天)</summary>
|
||||||
|
public Int32? TransitSpent { set; get; }
|
||||||
|
|
||||||
|
/// <summary>上网日期</summary>
|
||||||
|
public DateTime? OnlineDate { set; get; }
|
||||||
|
|
||||||
|
/// <summary>上网耗时(天)</summary>
|
||||||
|
public Int32? OnlineSpent { set; get; }
|
||||||
|
|
||||||
|
/// <summary>订单耗时(天)</summary>
|
||||||
|
public Int32? OrderSpent { set; get; }
|
||||||
|
|
||||||
|
/// <summary>运输耗时(天)</summary>
|
||||||
|
public Int32? CarrySpent { set; get; }
|
||||||
|
|
||||||
|
/// <summary>商城物流记录Id</summary>
|
||||||
|
public string? ExtDeliveryNo { get; set; }
|
||||||
|
|
||||||
|
/// <summary>同步结果描述</summary>
|
||||||
|
public string? SyncMsg { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>物流商名称</summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public string? LogisticsProviderName { set; get; }
|
||||||
|
|
||||||
|
/// <summary>货代公司名称</summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public string? ForwarderName { set; get; }
|
||||||
|
|
||||||
|
/// <summary>订单信息</summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public OrderEntity OrderEntity { get; set; }
|
||||||
|
|
||||||
|
/// <summary>发货商品数量</summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public int? ProductNum { set; get; }
|
||||||
|
|
||||||
|
/// <summary>发货商品信息</summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
[Navigate(NavigateType.OneToMany, nameof(ERP1.Entity.OrderDeliveryProductEntity.DeliveryNo))]
|
||||||
|
public List<OrderDeliveryProductEntity> OrderDeliveryProductEntities { get; set; }
|
||||||
|
|
||||||
|
/// <summary>发货地址</summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
[Navigate(NavigateType.OneToMany, nameof(AddressEntity.RefId))]
|
||||||
|
public List<AddressEntity> OrderAddressEntities { get; set; }
|
||||||
|
|
||||||
|
/// <summary>发货地址</summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public AddressEntity OrderAddressEntity
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (this.OrderAddressEntities?.Count > 0)
|
||||||
|
{
|
||||||
|
return this.OrderAddressEntities[0];
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>订单发货单物流单号历史</summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
[Navigate(NavigateType.OneToMany, nameof(ERP1.Entity.OrderDeliveryLogHisEntity.DeliveryNo))]
|
||||||
|
public List<OrderDeliveryLogHisEntity> OrderDeliveryLogHisEntitys { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>货代公司信息</summary>
|
||||||
|
public class Forwarder
|
||||||
|
{
|
||||||
|
/// <summary>地址</summary>
|
||||||
|
public string Url { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>畅安达货代公司信息</summary>
|
||||||
|
public class ChangandaForwarder: Forwarder
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>啊督货代公司信息</summary>
|
||||||
|
public class AduForwarder : Forwarder
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 售后申请,责任款项下拉发货单号、物流单号产品信息
|
||||||
|
/// </summary>
|
||||||
|
|
||||||
|
public class ProductInfoOfOrderDelivery
|
||||||
|
{
|
||||||
|
public List<ProductInfoOfDeliveryNo> ProductInfoOfDeliveryNos { get; set; }
|
||||||
|
|
||||||
|
public List<ProductInfoOfLogisticeNo> ProductInfoOfLogisticeNos { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 基础发货单商品信息
|
||||||
|
/// </summary>
|
||||||
|
public class BaseProductInfoOfOrderDelivery
|
||||||
|
{
|
||||||
|
public string Id { get; set; }
|
||||||
|
|
||||||
|
public string ProductBatchName { get; set; }
|
||||||
|
|
||||||
|
public string ProductColor { get; set; }
|
||||||
|
|
||||||
|
public string ProductSize { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 发货单号商品信息
|
||||||
|
/// </summary>
|
||||||
|
public class ProductInfoOfDeliveryNo: BaseProductInfoOfOrderDelivery
|
||||||
|
{
|
||||||
|
public string DeliveryNo { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 物流单号商品信息
|
||||||
|
/// </summary>
|
||||||
|
public class ProductInfoOfLogisticeNo : BaseProductInfoOfOrderDelivery
|
||||||
|
{
|
||||||
|
public string LogisticeNo { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@@ -0,0 +1,30 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using SqlSugar;
|
||||||
|
|
||||||
|
namespace ERP1.Entity
|
||||||
|
{
|
||||||
|
[Serializable]
|
||||||
|
[SugarTable("t_OrderDeliveryLogHis")]
|
||||||
|
public class OrderDeliveryLogHisEntity
|
||||||
|
{
|
||||||
|
#region # 数据库字段 #
|
||||||
|
|
||||||
|
/// <summary>Id</summary>
|
||||||
|
public string Id { set; get; }
|
||||||
|
|
||||||
|
/// <summary>发货单号</summary>
|
||||||
|
public string DeliveryNo { set; get; }
|
||||||
|
|
||||||
|
/// <summary>物流单号</summary>
|
||||||
|
public string LogisticeNo { set; get; }
|
||||||
|
|
||||||
|
/// <summary>创建人Id</summary>
|
||||||
|
public string? AdderId { set; get; }
|
||||||
|
|
||||||
|
/// <summary>创建时间</summary>
|
||||||
|
public DateTime AddTime { set; get; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,61 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using SqlSugar;
|
||||||
|
|
||||||
|
namespace ERP1.Entity
|
||||||
|
{
|
||||||
|
[Serializable]
|
||||||
|
[SugarTable("t_OrderDeliveryProduct")]
|
||||||
|
public class OrderDeliveryProductEntity
|
||||||
|
{
|
||||||
|
#region # 数据库字段 #
|
||||||
|
|
||||||
|
/// <summary>发货单商品Id</summary>
|
||||||
|
public string DeliveryProductId { set; get; }
|
||||||
|
|
||||||
|
/// <summary>发货单号</summary>
|
||||||
|
public string DeliveryNo { set; get; }
|
||||||
|
|
||||||
|
/// <summary>序号</summary>
|
||||||
|
public Int32 Sequence { set; get; }
|
||||||
|
|
||||||
|
/// <summary>订单商品Id</summary>
|
||||||
|
public string OrderProductId { set; get; }
|
||||||
|
|
||||||
|
/// <summary>商品数量</summary>
|
||||||
|
public Int32 ProductNum { set; get; }
|
||||||
|
|
||||||
|
/// <summary>单价¥</summary>
|
||||||
|
public Decimal ProductPrice { set; get; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
/// <summary>发货单商品编号</summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public string DeliveryProductNo { get { return $"{DeliveryNo}-{Sequence}"; } }
|
||||||
|
|
||||||
|
/// <summary>订单商品</summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public OrderProductEntity OrderProductEntity { get; set; }
|
||||||
|
|
||||||
|
/// <summary>发货单信息</summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public OrderDeliveryEntity OrderDeliveryEntity { get; set; }
|
||||||
|
|
||||||
|
/// <summary>客户信息</summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public CustomerEntity CustomerEntity { get; set; }
|
||||||
|
|
||||||
|
/// <summary>订单收货地址</summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public AddressEntity OrderAddressEntitie { get; set; }
|
||||||
|
|
||||||
|
/// <summary>采购价¥</summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public decimal PurchaseAmount { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class OrderDeliveryEntity_P: OrderDeliveryEntity
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,202 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Net.NetworkInformation;
|
||||||
|
using ERP1.Entity;
|
||||||
|
using SqlSugar;
|
||||||
|
|
||||||
|
namespace ERP1.Entity
|
||||||
|
{
|
||||||
|
[Serializable]
|
||||||
|
[SugarTable("t_order")]
|
||||||
|
public class OrderEntity: TeamBasePart
|
||||||
|
{
|
||||||
|
/// <summary>订单号</summary>
|
||||||
|
[SugarColumn(IsPrimaryKey = true, IsIdentity = false)]
|
||||||
|
public string SaleNo { set; get; }
|
||||||
|
|
||||||
|
/// <summary>发货团队</summary>
|
||||||
|
public string WarehouseTeamId { set; get; }
|
||||||
|
|
||||||
|
/// <summary>客户Id</summary>
|
||||||
|
public string CustomerId { set; get; }
|
||||||
|
|
||||||
|
/// <summary>订单类型</summary>
|
||||||
|
public string OrderType { set; get; }
|
||||||
|
|
||||||
|
/// <summary>订单来源</summary>
|
||||||
|
public string OrderSource { set; get; }
|
||||||
|
|
||||||
|
/// <summary>商品数量</summary>
|
||||||
|
public Int32 ProductNum { set; get; }
|
||||||
|
|
||||||
|
/// <summary>订单时间</summary>
|
||||||
|
public DateTime OrderTime { set; get; }
|
||||||
|
|
||||||
|
/// <summary>支付时间</summary>
|
||||||
|
public DateTime PaidTime { set; get; }
|
||||||
|
|
||||||
|
/// <summary>订单币种</summary>
|
||||||
|
public string Currency { set; get; }
|
||||||
|
|
||||||
|
/// <summary>订单金额</summary>
|
||||||
|
public Decimal Amount { set; get; }
|
||||||
|
|
||||||
|
/// <summary>订单折扣(统一填写负数)</summary>
|
||||||
|
private Decimal discount;
|
||||||
|
public Decimal Discount
|
||||||
|
{
|
||||||
|
set { if (value > 0) { throw new ArgumentException("订单折扣不能大于0"); } this.discount = value; }
|
||||||
|
get { return discount; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>订单运费</summary>
|
||||||
|
public Decimal LogisticeAmt { set; get; }
|
||||||
|
|
||||||
|
/// <summary>订单状态</summary>
|
||||||
|
public string OrderStatus { set; get; }
|
||||||
|
|
||||||
|
/// <summary>发货状态</summary>
|
||||||
|
public string DeliveryStatus { set; get; }
|
||||||
|
|
||||||
|
/// <summary>异常状态</summary>
|
||||||
|
public string AbnormalStatus { set; get; }
|
||||||
|
|
||||||
|
/// <summary>是否需要质检</summary>
|
||||||
|
public string? NeedQC { set; get; }
|
||||||
|
|
||||||
|
/// <summary>质检图上传状态</summary>
|
||||||
|
public string? QCPhotoStatus { set; get; }
|
||||||
|
|
||||||
|
/// <summary>质检状态</summary>
|
||||||
|
public string? QCStatus { set; get; }
|
||||||
|
|
||||||
|
/// <summary>客户备注</summary>
|
||||||
|
public string? CustomerRemark { set; get; }
|
||||||
|
|
||||||
|
/// <summary>内部备注</summary>
|
||||||
|
public string? InnerRemark { set; get; }
|
||||||
|
|
||||||
|
/// <summary>创建时间</summary>
|
||||||
|
public DateTime AddTime { set; get; }
|
||||||
|
|
||||||
|
#region 客户信息
|
||||||
|
/// <summary>客户信息</summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
[Navigate(NavigateType.OneToOne, nameof(ERP1.Entity.OrderEntity.CustomerId), nameof(ERP1.Entity.CustomerEntity.CustomerId))]
|
||||||
|
public CustomerEntity CustomerEntity { get; set; }
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 订单款项
|
||||||
|
/// <summary>订单款项(支付)</summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public OrderAmtEntity OrderAmtEntity_Order { get; set; }
|
||||||
|
|
||||||
|
/// <summary>订单款项(售后)</summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public List<OrderAmtEntity> OrderAmtEntity_Service { get; set; }
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
/// <summary>订单收货地址</summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
[Navigate(NavigateType.OneToMany, nameof(AddressEntity.RefId))]
|
||||||
|
public List<AddressEntity> OrderAddressEntities { get; set; }
|
||||||
|
|
||||||
|
/// <summary>订单收货地址</summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public AddressEntity OrderAddressEntitie
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (this.OrderAddressEntities?.Count > 0)
|
||||||
|
{
|
||||||
|
return this.OrderAddressEntities[0];
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>订单商品</summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
[Navigate(NavigateType.OneToMany, nameof(OrderProductEntity.SaleNo))]
|
||||||
|
public List<OrderProductEntity> OrderProductEntities { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>订单款项</summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
[Navigate(NavigateType.OneToMany, nameof(ERP1.Entity.OrderAmtEntity.SaleNo))]
|
||||||
|
public List<OrderAmtEntity> OrderAmtEntitys { get; set; }
|
||||||
|
|
||||||
|
/// <summary>订单发货单</summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
[Navigate(NavigateType.OneToMany, nameof(ERP1.Entity.OrderDeliveryEntity.SaleNo))]
|
||||||
|
public List<OrderDeliveryEntity> OrderDeliveryEntitys { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>订单币种名称</summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public string CurrencyName { set; get; }
|
||||||
|
|
||||||
|
/// <summary>订单币种符号</summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public string CurrencySymbol { set; get; }
|
||||||
|
|
||||||
|
/// <summary>采购金额</summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public decimal PurchaseAmount { set; get; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 店先生
|
||||||
|
/// </summary>
|
||||||
|
public class MrShopPlus
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 店先生url
|
||||||
|
/// </summary>
|
||||||
|
public string Url { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 万全运
|
||||||
|
/// </summary>
|
||||||
|
public class Wangquanyun
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 万全运url
|
||||||
|
/// </summary>
|
||||||
|
public string Url { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public class TeamBasePart
|
||||||
|
{
|
||||||
|
/// <summary>业务团队</summary>
|
||||||
|
public string BusinessTeamId { set; get; }
|
||||||
|
|
||||||
|
/// <summary>业务网站</summary>
|
||||||
|
public string WebsiteId { set; get; }
|
||||||
|
|
||||||
|
/// <summary>客户经理</summary>
|
||||||
|
public string? BusinesserId { set; get; }
|
||||||
|
|
||||||
|
/// <summary>业务团队名称</summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public string BusinessTeamName { set; get; }
|
||||||
|
|
||||||
|
/// <summary>网站名称</summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public string WebsiteName { set; get; }
|
||||||
|
|
||||||
|
/// <summary>客户经理名称</summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public string BusinesserName { set; get; }
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@@ -0,0 +1,102 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using ERP1.Entity;
|
||||||
|
using SqlSugar;
|
||||||
|
|
||||||
|
namespace ERP1.Entity
|
||||||
|
{
|
||||||
|
[Serializable]
|
||||||
|
[SugarTable("t_orderproduct")]
|
||||||
|
public class OrderProductEntity
|
||||||
|
{
|
||||||
|
#region # 数据库字段 #
|
||||||
|
|
||||||
|
/// <summary>订单商品Id</summary>
|
||||||
|
[SugarColumn(IsPrimaryKey = true, IsIdentity = false)]
|
||||||
|
public string OrderProductId { set; get; }
|
||||||
|
|
||||||
|
/// <summary>订单号</summary>
|
||||||
|
public string SaleNo { set; get; }
|
||||||
|
|
||||||
|
/// <summary>序号</summary>
|
||||||
|
public int Sequence { set; get; }
|
||||||
|
|
||||||
|
/// <summary>名称</summary>
|
||||||
|
public string Name { set; get; }
|
||||||
|
|
||||||
|
/// <summary>产品批次名称</summary>
|
||||||
|
public string? BatchName { set; get; }
|
||||||
|
|
||||||
|
/// <summary>图片</summary>
|
||||||
|
public string? ImagePath { set; get; }
|
||||||
|
|
||||||
|
/// <summary>尺码(商城订单同步)</summary>
|
||||||
|
public string Specifications { set; get; }
|
||||||
|
|
||||||
|
/// <summary>颜色</summary>
|
||||||
|
public string? Color { set; get; }
|
||||||
|
|
||||||
|
/// <summary>产品批次尺码</summary>
|
||||||
|
public string? Size { set; get; }
|
||||||
|
|
||||||
|
/// <summary>来源</summary>
|
||||||
|
public string? Source { set; get; }
|
||||||
|
|
||||||
|
/// <summary>特殊需求</summary>
|
||||||
|
public string? SpecialRequire { set; get; }
|
||||||
|
|
||||||
|
/// <summary>是否需要质检</summary>
|
||||||
|
public Boolean? NeedQC { set; get; }
|
||||||
|
|
||||||
|
/// <summary>质检确认状态</summary>
|
||||||
|
public string? QCStatus { set; get; }
|
||||||
|
|
||||||
|
/// <summary>拍照时间</summary>
|
||||||
|
public DateTime? TakePhotoTime { set; get; }
|
||||||
|
|
||||||
|
/// <summary>质检时间</summary>
|
||||||
|
public DateTime? QCTime { set; get; }
|
||||||
|
|
||||||
|
/// <summary>商品类型</summary>
|
||||||
|
public string ProductType { set; get; }
|
||||||
|
|
||||||
|
/// <summary>品类</summary>
|
||||||
|
public string? Category { set; get; }
|
||||||
|
|
||||||
|
/// <summary>商品单价</summary>
|
||||||
|
public Decimal ProductPrice { set; get; }
|
||||||
|
|
||||||
|
/// <summary>采购单价¥</summary>
|
||||||
|
public Decimal PurchasePrice { set; get; }
|
||||||
|
|
||||||
|
/// <summary>商品数量</summary>
|
||||||
|
public Int32 ProductNum { set; get; }
|
||||||
|
|
||||||
|
/// <summary>已发货数</summary>
|
||||||
|
public Int32 DeliveryNum { set; get; }
|
||||||
|
|
||||||
|
/// <summary>取消发货数</summary>
|
||||||
|
public Int32 CancelDeliveryNum { set; get; }
|
||||||
|
|
||||||
|
/// <summary>售后次数</summary>
|
||||||
|
public Int32 ServiceNum { set; get; }
|
||||||
|
|
||||||
|
/// <summary>是否质检售后</summary>
|
||||||
|
public Boolean? HasQCService { set; get; }
|
||||||
|
|
||||||
|
/// <summary>备注</summary>
|
||||||
|
public string? Remark { set; get; }
|
||||||
|
|
||||||
|
/// <summary>商城订单商品Id(此字段主要用于后续同步物流信息到店先生)</summary>
|
||||||
|
public string? ExtOrderProId { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
/// <summary>订单信息</summary>
|
||||||
|
[SugarColumn(IsIgnore = true)]
|
||||||
|
public OrderEntity OrderEntity { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@@ -31,6 +31,7 @@ namespace OrmTest
|
|||||||
}
|
}
|
||||||
public static void Init()
|
public static void Init()
|
||||||
{
|
{
|
||||||
|
Unitadfasfafays.Init();
|
||||||
Unitadfa12.Init();
|
Unitadfa12.Init();
|
||||||
Unitsdfa1231.Init();
|
Unitsdfa1231.Init();
|
||||||
Unitadfad1.Init();
|
Unitadfad1.Init();
|
||||||
|
@@ -23,7 +23,8 @@ namespace OrmTest
|
|||||||
|
|
||||||
//插入测试数据
|
//插入测试数据
|
||||||
var indexList = db.Insertable(longList).AS(tableName).ExecuteReturnPkList<long>();
|
var indexList = db.Insertable(longList).AS(tableName).ExecuteReturnPkList<long>();
|
||||||
db.DbMaintenance.DropTable<UnitDefaultValueadsfa>();
|
if(db.DbMaintenance.IsAnyTable("UnitDefaultValueadsfa", false))
|
||||||
|
db.DbMaintenance.DropTable<UnitDefaultValueadsfa>();
|
||||||
db.CodeFirst.InitTables<UnitDefaultValueadsfa>();
|
db.CodeFirst.InitTables<UnitDefaultValueadsfa>();
|
||||||
db.Insertable(new UnitDefaultValueadsfa() { name = "a" }).ExecuteCommand();
|
db.Insertable(new UnitDefaultValueadsfa() { name = "a" }).ExecuteCommand();
|
||||||
}
|
}
|
||||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user