From 1d91c5e3d45da08c752b6913cd37c65ea796993f Mon Sep 17 00:00:00 2001 From: skx <610262374@qq.com> Date: Sun, 29 Nov 2020 13:20:36 +0800 Subject: [PATCH] Update demo --- .../MySqlTest/Models/Unit/Custom1/EGoods.cs | 604 ++++++++++++++++++ .../Models/Unit/Custom1/EGoodsBrand.cs | 68 ++ .../Models/Unit/Custom1/EGoodsClass.cs | 261 ++++++++ .../Models/Unit/Custom1/EOrderAlbaran.cs | 404 ++++++++++++ .../Unit/Custom1/EOrderAlbaranDetail.cs | 234 +++++++ .../Models/Unit/Custom1/EOrderReturn.cs | 381 +++++++++++ .../Models/Unit/Custom1/EOrderReturnDetail.cs | 202 ++++++ .../Unit/Custom1/PurchaseDetailModel.cs | 162 +++++ Src/Asp.Net/MySqlTest/MySqlTest.csproj | 8 + Src/Asp.Net/MySqlTest/UnitTest/UQueryable.cs | 4 + .../QueryableProvider/QueryableProvider.cs | 22 +- 11 files changed, 2349 insertions(+), 1 deletion(-) create mode 100644 Src/Asp.Net/MySqlTest/Models/Unit/Custom1/EGoods.cs create mode 100644 Src/Asp.Net/MySqlTest/Models/Unit/Custom1/EGoodsBrand.cs create mode 100644 Src/Asp.Net/MySqlTest/Models/Unit/Custom1/EGoodsClass.cs create mode 100644 Src/Asp.Net/MySqlTest/Models/Unit/Custom1/EOrderAlbaran.cs create mode 100644 Src/Asp.Net/MySqlTest/Models/Unit/Custom1/EOrderAlbaranDetail.cs create mode 100644 Src/Asp.Net/MySqlTest/Models/Unit/Custom1/EOrderReturn.cs create mode 100644 Src/Asp.Net/MySqlTest/Models/Unit/Custom1/EOrderReturnDetail.cs create mode 100644 Src/Asp.Net/MySqlTest/Models/Unit/Custom1/PurchaseDetailModel.cs diff --git a/Src/Asp.Net/MySqlTest/Models/Unit/Custom1/EGoods.cs b/Src/Asp.Net/MySqlTest/Models/Unit/Custom1/EGoods.cs new file mode 100644 index 000000000..86dcf3488 --- /dev/null +++ b/Src/Asp.Net/MySqlTest/Models/Unit/Custom1/EGoods.cs @@ -0,0 +1,604 @@ +using SqlSugar; + +namespace HONORCSData +{ + + /// + /// 商品主表 + /// + [SugarTable("goods")] + public class EGoods + { + /// + /// 商品 + /// + public EGoods() + { + } + private int _GoodsId; + /// + /// 商品id + /// + [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "goods_id")] + public int GoodsId { get => _GoodsId; set => _GoodsId = value; } + private string _GoodsNo; + /// + /// 商品编号 + /// + [SugarColumn( ColumnName = "goods_no")] + public string GoodsNo { get => _GoodsNo; set => _GoodsNo = value?.Trim(); } + + private string _BarCode; + /// + /// 条码 + /// + [SugarColumn(ColumnName = "bar_code")] + public string BarCode { get => _BarCode; set => _BarCode = value?.Trim(); } + + private string _Description; + /// + /// 描述 + /// + [SugarColumn(ColumnName = "description")] + public string Description { get => _Description; set => _Description = value?.Trim(); } + + private decimal _RetailPrice; + /// + /// 零售价 + /// + [SugarColumn(ColumnName = "retail_price")] + public decimal RetailPrice { get => _RetailPrice; set => _RetailPrice = value; } + + private decimal _DeliveryPrice; + /// + /// 送货价 + /// + [SugarColumn(ColumnName = "delivery_price")] + public decimal DeliveryPrice { get => _DeliveryPrice; set => _DeliveryPrice = value; } + + private decimal _MemberPrice; + /// + /// 会员价 + /// + [SugarColumn(ColumnName = "member_price")] + public decimal MemberPrice { get => _MemberPrice; set => _MemberPrice = value; } + + private decimal _WholesalePrice; + /// + /// 批发价 + /// + [SugarColumn(ColumnName = "wholesale_price")] + public decimal WholesalePrice { get => _WholesalePrice; set => _WholesalePrice = value; } + + private decimal _ReceiptPrice; + /// + /// 发票价 + /// + [SugarColumn(ColumnName = "receipt_price")] + public decimal ReceiptPrice { get => _ReceiptPrice; set => _ReceiptPrice = value; } + + private decimal _InternetPrice; + /// + /// 网络价 + /// + [SugarColumn(ColumnName = "internet_price")] + public decimal InternetPrice { get => _InternetPrice; set => _InternetPrice = value; } + + private decimal _FriendshipPrice; + /// + /// 友情价 + /// + [SugarColumn(ColumnName = "friendship_price")] + public decimal FriendshipPrice { get => _FriendshipPrice; set => _FriendshipPrice = value; } + + private decimal _SpecialPrice; + /// + /// 特别价 + /// + [SugarColumn(ColumnName = "special_price")] + public decimal SpecialPrice { get => _SpecialPrice; set => _SpecialPrice = value; } + + private decimal _PromotionPrice; + /// + /// 促销价 + /// + [SugarColumn(ColumnName = "promotion_price")] + public decimal PromotionPrice { get => _PromotionPrice; set => _PromotionPrice = value; } + + private decimal _PurchasePrice; + /// + /// 进货价 + /// + [SugarColumn(ColumnName = "purchase_price")] + public decimal PurchasePrice { get => _PurchasePrice; set => _PurchasePrice = value; } + + private string _SpanishName; + /// + /// 西文名称 + /// + [SugarColumn(ColumnName = "spanish_name")] + public string SpanishName { get => _SpanishName; set => _SpanishName = value?.Trim(); } + + private string _Initials; + /// + /// 首字母 + /// + [SugarColumn(ColumnName = "initials")] + public string Initials { get => _Initials; set => _Initials = value?.Trim(); } + + private string _ChineseName; + /// + /// 中文名称 + /// + [SugarColumn(ColumnName = "chinese_name")] + public string ChineseName { get => _ChineseName; set => _ChineseName = value?.Trim(); } + + /// + /// 商品名称 西文中文组合 + /// + [SugarColumn(IsIgnore = true)] + public string GoodsName { get => string.Format("{0}[{1}]", _SpanishName, _ChineseName); } + + private string _ChinesePinyin; + /// + /// 拼音 + /// + [SugarColumn(ColumnName = "chinese_pinyin")] + public string ChinesePinyin { get => _ChinesePinyin; set => _ChinesePinyin = value?.Trim(); } + + private decimal _PackageNumber; + /// + /// 整包数量 + /// + [SugarColumn(ColumnName = "package_number")] + public decimal PackageNumber { get => _PackageNumber; set => _PackageNumber = value; } + + private decimal _BoxNumber; + /// + /// 整箱数量 + /// + [SugarColumn(ColumnName = "box_number")] + public decimal BoxNumber { get => _BoxNumber; set => _BoxNumber = value; } + + private double _WeightCapacity; + /// + /// 重量容量 + /// + [SugarColumn(ColumnName = "weight_capacity")] + public double WeightCapacity { get => _WeightCapacity; set => _WeightCapacity = value; } + + private bool _IsOnlyPerUnit; + /// + /// 是否只按单位 + /// + [SugarColumn(ColumnName = "is_only_per_unit")] + public bool IsOnlyPerUnit { get => _IsOnlyPerUnit; set => _IsOnlyPerUnit = value; } + + private int _GoodsClassId; + /// + /// 商品类别编号 + /// + [SugarColumn(ColumnName = "goods_class_id")] + public int GoodsClassId { get => _GoodsClassId; set => _GoodsClassId = value; } + + /// + /// 商品类别名称 + /// + [SugarColumn(IsIgnore = true)] + public string GoodsClass { get; set; } + + private string _UnitName; + /// + /// 单位名称 + /// + [SugarColumn(ColumnName = "unit_name")] + public string UnitName { get => _UnitName; set => _UnitName = value?.Trim(); } + + private System.DateTime? _GoodsAddDate; + /// + /// 商品添加日期 + /// + [SugarColumn(ColumnName = "goods_add_date")] + public System.DateTime? GoodsAddDate { get => _GoodsAddDate; set => _GoodsAddDate = value ?? default(System.DateTime); } + + private decimal _Discount; + /// + /// 折扣 + /// + [SugarColumn(ColumnName = "discount")] + public decimal Discount { get => _Discount; set => _Discount = value; } + + private decimal _DiscountPrice; + /// + /// 折扣价 + /// + [SugarColumn(ColumnName = "discount_price")] + public decimal DiscountPrice { get => _DiscountPrice; set => _DiscountPrice = value; } + + private decimal _ReceiptPercentage; + /// + /// 发票百分比 + /// + [SugarColumn(ColumnName = "receipt_percentage")] + public decimal ReceiptPercentage { get => _ReceiptPercentage; set => _ReceiptPercentage = value; } + + private System.DateTime? _ExpiryDate; + /// + /// 到期日期 + /// + [SugarColumn(ColumnName = "expiry_date")] + public System.DateTime? ExpiryDate { get => _ExpiryDate; set => _ExpiryDate = value ?? default(System.DateTime); } + + private string _SupplierId; + /// + /// 供应商编号 + /// + [SugarColumn(ColumnName = "supplier_id")] + public string SupplierId { get => _SupplierId; set => _SupplierId = value?.Trim(); } + + private int _IsGift; + /// + /// 是否有赠品 + /// + [SugarColumn(ColumnName = "is_gift")] + public int IsGift { get => _IsGift; set => _IsGift = value; } + + private int _IsPrivate; + /// + /// 是否私营 + /// + [SugarColumn(ColumnName = "is_private")] + public int IsPrivate { get => _IsPrivate; set => _IsPrivate = value; } + + private System.Boolean? _IsPriceByVolume; + /// + /// 是否以量定价 + /// + [SugarColumn(ColumnName = "is_price_by_volume")] + public System.Boolean? IsPriceByVolume { get { return this._IsPriceByVolume; } set { this._IsPriceByVolume = value ?? default(System.Boolean); } } + + private System.Boolean? _IsDiscountByQuantity; + /// + /// 是否以量定折扣 + /// + [SugarColumn(ColumnName = "is_discount_by_quantity")] + public System.Boolean? IsDiscountByQuantity { get { return this._IsDiscountByQuantity; } set { this._IsDiscountByQuantity = value ?? default(System.Boolean); } } + + private decimal _Price1; + /// + /// 价格1 + /// + [SugarColumn(ColumnName = "price1")] + public decimal Price1 { get => _Price1; set => _Price1 = value; } + + private decimal _Discount1; + /// + /// 折扣1 + /// + [SugarColumn(ColumnName = "discount1")] + public decimal Discount1 { get => _Discount1; set => _Discount1 = value; } + + private decimal _Number1; + /// + /// 数量1 + /// + [SugarColumn(ColumnName = "number1")] + public decimal Number1 { get => _Number1; set => _Number1 = value; } + + private decimal _Price2; + /// + /// 价格2 + /// + [SugarColumn(ColumnName = "price2")] + public decimal Price2 { get => _Price2; set => _Price2 = value; } + + private decimal _Discount2; + /// + /// 折扣2 + /// + [SugarColumn(ColumnName = "discount2")] + public decimal Discount2 { get => _Discount2; set => _Discount2 = value; } + + private decimal _Number2; + /// + /// 数量2 + /// + [SugarColumn(ColumnName = "number2")] + public decimal Number2 { get => _Number2; set => _Number2 = value; } + + private decimal _Price3; + /// + /// 价格3 + /// + [SugarColumn(ColumnName = "price3")] + public decimal Price3 { get => _Price3; set => _Price3 = value; } + + private decimal _Discount3; + /// + /// 折扣3 + /// + [SugarColumn(ColumnName = "discount3")] + public decimal Discount3 { get => _Discount3; set => _Discount3 = value; } + + private decimal _Number3; + /// + /// 数量3 + /// + [SugarColumn(ColumnName = "number3")] + public decimal Number3 { get => _Number3; set => _Number3 = value; } + + private decimal _Price4; + /// + /// 价格4 + /// + [SugarColumn(ColumnName = "price4")] + public decimal Price4 { get => _Price4; set => _Price4 = value; } + + private decimal _Discount4; + /// + /// 折扣4 + /// + [SugarColumn(ColumnName = "discount4")] + public decimal Discount4 { get => _Discount4; set => _Discount4 = value; } + + private decimal _Number4; + /// + /// 数量4 + /// + [SugarColumn(ColumnName = "number4")] + public decimal Number4 { get => _Number4; set => _Number4 = value; } + + private decimal _Price5; + /// + /// 价格5 + /// + [SugarColumn(ColumnName = "price5")] + public decimal Price5 { get => _Price5; set => _Price5 = value; } + + private decimal _Discount5; + /// + /// 折扣5 + /// + [SugarColumn(ColumnName = "discount5")] + public decimal Discount5 { get => _Discount5; set => _Discount5 = value; } + + private decimal _Number5; + /// + /// 数量5 + /// + [SugarColumn(ColumnName = "number5")] + public decimal Number5 { get => _Number5; set => _Number5 = value; } + + private decimal _Price6; + /// + /// 价格6 + /// + [SugarColumn(ColumnName = "price6")] + public decimal Price6 { get => _Price6; set => _Price6 = value; } + + private decimal _Discount6; + /// + /// 折扣6 + /// + [SugarColumn(ColumnName = "discount6")] + public decimal Discount6 { get => _Discount6; set => _Discount6 = value; } + + private string _WarehouseSite; + /// + /// 仓库位置 + /// + [SugarColumn(ColumnName = "warehouse_site")] + public string WarehouseSite { get => _WarehouseSite; set => _WarehouseSite = value?.Trim(); } + + private string _GoodsGrade; + /// + /// 商品等级 + /// + [SugarColumn(ColumnName = "goods_grade")] + public string GoodsGrade { get => _GoodsGrade; set => _GoodsGrade = value?.Trim(); } + + private decimal _MinStock; + /// + /// 库存下限 + /// + [SugarColumn(ColumnName = "min_stock")] + public decimal MinStock { get => _MinStock; set => _MinStock = value; } + + private decimal _MaxStock; + /// + /// 库存上限 + /// + [SugarColumn(ColumnName = "max_stock")] + public decimal MaxStock { get => _MaxStock; set => _MaxStock = value; } + + private bool _IsContainImage; + /// + /// 有图案 + /// + [SugarColumn(ColumnName = "is_contain_image")] + public bool IsContainImage { get => _IsContainImage; set => _IsContainImage = value; } + + private string _GoodsImageMd5; + /// + /// 图案的消息摘要 + /// + [SugarColumn(ColumnName = "goods_image_md5")] + public string GoodsImageMd5 { get => _GoodsImageMd5; set => _GoodsImageMd5 = value?.Trim(); } + + private System.DateTime? _ImageUpdateTime; + /// + /// 修改绘图时间 + /// + [SugarColumn(ColumnName = "image_update_time")] + public System.DateTime? ImageUpdateTime { get => _ImageUpdateTime; set => _ImageUpdateTime = value ?? default(System.DateTime); } + //private Goods.EGoodsImage _GoodsImage = new Goods.EGoodsImage(); + ///// + ///// 图片 + ///// + //[SugarColumn(IsIgnore = true)] + //public Goods.EGoodsImage GoodsImage { get=>_GoodsImage; set => _GoodsImage = value; } + + private bool _IsProhibitedChangeDiscount; + /// + /// 是否禁止更改折扣 + /// + [SugarColumn(ColumnName = "is_prohibited_change_discount")] + public bool IsProhibitedChangeDiscount { get => _IsProhibitedChangeDiscount; set => _IsProhibitedChangeDiscount = value; } + + private bool _PrintSign; + /// + /// 打印标记 + /// + [SugarColumn(ColumnName = "print_sign")] + public bool PrintSign { get => _PrintSign; set => _PrintSign = value; } + + private System.DateTime? _PrintSignTime; + /// + /// 打印标记时间 + /// + [SugarColumn(ColumnName = "print_sign_time")] + public System.DateTime? PrintSignTime { get => _PrintSignTime; set => _PrintSignTime = value ?? default(System.DateTime); } + + private bool _IsAddByAttachment; + /// + /// 是否添加为附件 + /// + [SugarColumn(ColumnName = "is_add_by_attachment")] + public bool IsAddByAttachment { get => _IsAddByAttachment; set => _IsAddByAttachment = value; } + + private string _MultipleBarcode; + /// + /// 多条码 + /// + [SugarColumn(ColumnName = "multiple_barcode")] + public string MultipleBarcode { get => _MultipleBarcode; set => _MultipleBarcode = value?.Trim(); } + + private string _PartialConsultation; + /// + /// 部分查询 + /// + [SugarColumn(ColumnName = "partial_consultation")] + public string PartialConsultation { get => _PartialConsultation; set => _PartialConsultation = value?.Trim(); } + + private System.DateTime? _StartDate; + /// + /// 起始日期 + /// + [SugarColumn(ColumnName = "start_date")] + public System.DateTime? StartDate { get => _StartDate; set => _StartDate = value ?? default(System.DateTime); } + + private int _IsLock; + /// + /// 是否锁定:1 锁定(下架) 0 未锁定(在售) + /// + [SugarColumn(ColumnName = "is_lock")] + public int IsLock { get => _IsLock; set => _IsLock = value; } + + private int _SpecialSign; + /// + /// 特殊标识 + /// + [SugarColumn(ColumnName = "special_sign")] + public int SpecialSign { get => _SpecialSign; set => _SpecialSign = value; } + + private string _Remark; + /// + /// 备注 + /// + [SugarColumn(ColumnName = "remark")] + public string Remark { get => _Remark; set => _Remark = value?.Trim(); } + + private string _DelFlag = "0"; + /// + /// 删除标记:1 删除 0 非删除 + /// + [SugarColumn(ColumnName = "del_flag")] + public string DelFlag { get => _DelFlag; set => _DelFlag = value?.Trim(); } + + private int? _BrandId; + /// + /// 商品品牌id + /// + [SugarColumn(ColumnName = "brand_id")] + public int? BrandId { get => _BrandId; set => _BrandId = value ?? default(int); } + + /// + /// 商品品牌名称 + /// + [SugarColumn(IsIgnore = true)] + public string Brand { get; set; } + + private string _Origin; + /// + /// 产地 + /// + [SugarColumn(ColumnName = "origin")] + public string Origin { get => _Origin; set => _Origin = value?.Trim(); } + + private string _ValuationMethod; + /// + /// 计价方式:1 包装 2 称重 + /// + [SugarColumn(ColumnName = "valuation_method")] + public string ValuationMethod { get => _ValuationMethod; set => _ValuationMethod = value?.Trim(); } + + private string _SyncOnlineShop; + /// + /// 是否同步网店:1 同步 0 不同步 + /// + [SugarColumn(ColumnName = "sync_online_shop")] + public string SyncOnlineShop { get => _SyncOnlineShop; set => _SyncOnlineShop = value?.Trim(); } + + private string _PackageSale; + /// + /// 是否整包销售:1 是 0 否 + /// + [SugarColumn(ColumnName = "package_sale")] + public string PackageSale { get => _PackageSale; set => _PackageSale = value?.Trim(); } + + private string _IsEnablePoints; + /// + /// 是否启用积分:1 启用 0 不启用 + /// + [SugarColumn(ColumnName = "is_enable_points")] + public string IsEnablePoints { get => _IsEnablePoints; set => _IsEnablePoints = value?.Trim(); } + + private string _PointsRule; + /// + /// 积分规则 + /// + [SugarColumn(ColumnName = "points_rule")] + public string PointsRule { get => _PointsRule; set => _PointsRule = value?.Trim(); } + + private string _PurchaseSpec; + /// + /// 进货规格 + /// + [SugarColumn(ColumnName = "purchase_spec")] + public string PurchaseSpec { get => _PurchaseSpec; set => _PurchaseSpec = value?.Trim(); } + + private System.Boolean? _IsIntervalPrice; + /// + /// 是否启用区间价格:1 启用 0 不启用 + /// + [SugarColumn(ColumnName = "is_interval_price")] + public System.Boolean? IsIntervalPrice { get { return this._IsIntervalPrice; } set { this._IsIntervalPrice = value ?? default(System.Boolean); } } + + private System.Boolean? _IsCountEarning; + /// + /// 是否计算利润(毛利润):1 启用 0 不启用 + /// + [SugarColumn(ColumnName = "is_count_earning")] + public System.Boolean? IsCountEarning { get { return this._IsCountEarning; } set { this._IsCountEarning = value ?? default(System.Boolean); } } + + private int _TenantId; + /// + /// 所属租户 + /// + [SugarColumn(ColumnName = "tenant_id")] + public int TenantId { get => _TenantId; set => _TenantId = value; } + + [SugarColumn(IsIgnore = true)] + public decimal StockNum { get; set; } + } +} diff --git a/Src/Asp.Net/MySqlTest/Models/Unit/Custom1/EGoodsBrand.cs b/Src/Asp.Net/MySqlTest/Models/Unit/Custom1/EGoodsBrand.cs new file mode 100644 index 000000000..0965b6e92 --- /dev/null +++ b/Src/Asp.Net/MySqlTest/Models/Unit/Custom1/EGoodsBrand.cs @@ -0,0 +1,68 @@ +using SqlSugar; + +namespace HONORCSData +{ + /// + /// 商品品牌 + /// + [SugarTable("goods_brand")] + public class EGoodsBrand + { + /// + /// + /// + public EGoodsBrand() + { + } + + private System.Int32 _BrandId; + /// + /// 自增编号 + /// + [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnName = "brand_id")] + public System.Int32 BrandId { get { return this._BrandId; } set { this._BrandId = value; } } + + private System.String _BrandCnName; + /// + /// 中文名称 + /// + [SugarColumn(ColumnName = "brand_cn_name")] + public System.String BrandCnName { get { return this._BrandCnName; } set { this._BrandCnName = value?.Trim(); } } + + private System.String _BranchSpanishName; + /// + /// 西文名称 + /// + [SugarColumn(ColumnName = "branch_spanish_name")] + public System.String BranchSpanishName { get { return this._BranchSpanishName; } set { this._BranchSpanishName = value?.Trim(); } } + + + private System.String _BrandNo; + /// + /// 编号 + /// + [SugarColumn(ColumnName = "brand_no")] + public System.String BrandNo { get { return this._BrandNo; } set { this._BrandNo = value?.Trim(); } } + + private System.String _BrandStatus = "1"; + /// + /// 状态:1 正常 0 禁用 + /// + [SugarColumn(ColumnName = "brand_status")] + public System.String BrandStatus { get { return this._BrandStatus; } set { this._BrandStatus = value?.Trim(); } } + + private System.String _DelFlag = "0"; + /// + /// 是否删除:1 删除 0 未删除 + /// + [SugarColumn(ColumnName = "del_flag")] + public System.String DelFlag { get { return this._DelFlag; } set { this._DelFlag = value?.Trim(); } } + + private int _TenantId; + /// + /// 所属租户 + /// + [SugarColumn(ColumnName = "tenant_id")] + public int TenantId { get => _TenantId; set => _TenantId = value; } + } +} diff --git a/Src/Asp.Net/MySqlTest/Models/Unit/Custom1/EGoodsClass.cs b/Src/Asp.Net/MySqlTest/Models/Unit/Custom1/EGoodsClass.cs new file mode 100644 index 000000000..5d0652ee2 --- /dev/null +++ b/Src/Asp.Net/MySqlTest/Models/Unit/Custom1/EGoodsClass.cs @@ -0,0 +1,261 @@ +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HONORCSData.Goods +{ + /// + /// 商品种类 + /// + [SugarTable("goods_class")] + public class EGoodsClass + { + private System.Int32 _GoodsClassId; + /// + /// 商品种类编号 + /// + [SugarColumn(IsPrimaryKey = true,ColumnName = "goods_class_id")] + public System.Int32 GoodsClassId { get { return this._GoodsClassId; } set { this._GoodsClassId = value; } } + + private System.String _SpanishName; + /// + /// 西文名称 + /// + [SugarColumn(ColumnName = "spanish_name")] + public System.String SpanishName { get { return this._SpanishName; } set { this._SpanishName = value?.Trim(); } } + + private System.String _ChineseName; + /// + /// 中文名称 + /// + [SugarColumn(ColumnName = "chinese_name")] + public System.String ChineseName { get { return this._ChineseName; } set { this._ChineseName = value?.Trim(); } } + + private System.Int16 _IvaId; + /// + /// iva编号 + /// + [SugarColumn(ColumnName = "iva_id")] + public System.Int16 IvaId { get { return this._IvaId; } set { this._IvaId = value; } } + + + private System.String _GoodsClassNo; + /// + /// 编号 + /// + [SugarColumn(ColumnName = "goods_class_no")] + public System.String GoodsClassNo { get { return this._GoodsClassNo; } set { this._GoodsClassNo = value?.Trim(); } } + + private System.Decimal _Discount; + /// + /// 折扣 + /// + [SugarColumn(ColumnName = "discount")] + public System.Decimal Discount { get { return this._Discount; } set { this._Discount = value; } } + + private System.Decimal _ReceiptPercentage; + /// + /// 发票百分比 + /// + [SugarColumn(ColumnName = "receipt_percentage")] + public System.Decimal ReceiptPercentage { get { return this._ReceiptPercentage; } set { this._ReceiptPercentage = value; } } + + private System.Boolean _IsOnlyPerUnit; + /// + /// 是否仅每单位 + /// + [SugarColumn(ColumnName = "is_only_per_unit")] + public System.Boolean IsOnlyPerUnit { get { return this._IsOnlyPerUnit; } set { this._IsOnlyPerUnit = value; } } + + private System.String _UnitName; + /// + /// 单位名称 + /// + [SugarColumn(ColumnName = "unit_name")] + public System.String UnitName { get { return this._UnitName; } set { this._UnitName = value?.Trim(); } } + + private System.Boolean _IsCountEarning; + /// + /// 是否计算收益 + /// + [SugarColumn(ColumnName = "is_count_earning")] + public System.Boolean IsCountEarning { get { return this._IsCountEarning; } set { this._IsCountEarning = value; } } + + private System.Boolean _IsCountStock; + /// + /// 是否计算库存 + /// + [SugarColumn(ColumnName = "is_count_stock")] + public System.Boolean IsCountStock { get { return this._IsCountStock; } set { this._IsCountStock = value; } } + + private System.Boolean _IsProhibitedChangeDiscount; + /// + /// 是否禁止更改折扣 + /// + [SugarColumn(ColumnName = "is_prohibited_change_discount")] + public System.Boolean IsProhibitedChangeDiscount { get { return this._IsProhibitedChangeDiscount; } set { this._IsProhibitedChangeDiscount = value; } } + + private System.Boolean _IsGift; + /// + /// 是否为赠品 + /// + [SugarColumn(ColumnName = "is_gift")] + public System.Boolean IsGift { get { return this._IsGift; } set { this._IsGift = value; } } + + private System.Boolean _IsPrivate; + /// + /// 是否私营 + /// + [SugarColumn(ColumnName = "is_private")] + public System.Boolean IsPrivate { get { return this._IsPrivate; } set { this._IsPrivate = value; } } + + private System.Int16 _GoodsStorehouse; + /// + /// 商品仓库 + /// + [SugarColumn(ColumnName = "goods_storehouse")] + public System.Int16 GoodsStorehouse { get { return this._GoodsStorehouse; } set { this._GoodsStorehouse = value; } } + + private System.Decimal _RetailPriceProfitPercentage; + /// + /// 零售价利润百分比 + /// + [SugarColumn(ColumnName = "retail_price_profit_percentage")] + public System.Decimal RetailPriceProfitPercentage { get { return this._RetailPriceProfitPercentage; } set { this._RetailPriceProfitPercentage = value; } } + + private System.Decimal _DeliveryPriceProfitPercentage; + /// + /// 送货价收益百分比 + /// + [SugarColumn(ColumnName = "delivery_price_profit_percentage")] + public System.Decimal DeliveryPriceProfitPercentage { get { return this._DeliveryPriceProfitPercentage; } set { this._DeliveryPriceProfitPercentage = value; } } + + private System.Decimal _MemberPriceProfitPercentage; + /// + /// 会员价百分比 + /// + [SugarColumn(ColumnName = "member_price_profit_percentage")] + public System.Decimal MemberPriceProfitPercentage { get { return this._MemberPriceProfitPercentage; } set { this._MemberPriceProfitPercentage = value; } } + + private System.Decimal _WholesalePriceProfitPercentage; + /// + /// 批发价收益百分比 + /// + [SugarColumn(ColumnName = "wholesale_price_profit_percentage")] + public System.Decimal WholesalePriceProfitPercentage { get { return this._WholesalePriceProfitPercentage; } set { this._WholesalePriceProfitPercentage = value; } } + + private System.Decimal _ReceiptPriceProfitPercentage; + /// + /// 发票价格收益百分比 + /// + [SugarColumn(ColumnName = "receipt_price_profit_percentage")] + public System.Decimal ReceiptPriceProfitPercentage { get { return this._ReceiptPriceProfitPercentage; } set { this._ReceiptPriceProfitPercentage = value; } } + + private System.Decimal _InternetPriceProfitPercentage; + /// + /// 网络价格收益百分比 + /// + [SugarColumn(ColumnName = "internet_price_profit_percentage")] + public System.Decimal InternetPriceProfitPercentage { get { return this._InternetPriceProfitPercentage; } set { this._InternetPriceProfitPercentage = value; } } + + private System.Decimal _FriendshipPriceProfitPercentage; + /// + /// 友情价收益百分比 + /// + [SugarColumn(ColumnName = "friendship_price_profit_percentage")] + public System.Decimal FriendshipPriceProfitPercentage { get { return this._FriendshipPriceProfitPercentage; } set { this._FriendshipPriceProfitPercentage = value; } } + + private System.Decimal _SpecialPriceProfitPercentage; + /// + /// 特别价格收益百分比 + /// + [SugarColumn(ColumnName = "special_price_profit_percentage")] + public System.Decimal SpecialPriceProfitPercentage { get { return this._SpecialPriceProfitPercentage; } set { this._SpecialPriceProfitPercentage = value; } } + + private System.Decimal _PromotionPriceProfitPercentage; + /// + /// 促销价格收益百分比 + /// + [SugarColumn(ColumnName = "promotion_price_profit_percentage")] + public System.Decimal PromotionPriceProfitPercentage { get { return this._PromotionPriceProfitPercentage; } set { this._PromotionPriceProfitPercentage = value; } } + + private System.Boolean _IsLock; + /// + /// 是否锁定 + /// + [SugarColumn(ColumnName = "is_lock")] + public System.Boolean IsLock { get { return this._IsLock; } set { this._IsLock = value; } } + + private System.String _Remark; + /// + /// 备注 + /// + [SugarColumn(ColumnName = "remark")] + public System.String Remark { get { return this._Remark; } set { this._Remark = value?.Trim(); } } + + private System.Int32 _ParentId; + /// + /// 上级分类id + /// + [SugarColumn(ColumnName = "parent_id")] + public System.Int32 ParentId { get { return this._ParentId; } set { this._ParentId = value; } } + + private System.String _IsEnablePoints; + /// + /// 是否启用积分:1 启用 0 不启用 + /// + [SugarColumn(ColumnName = "is_enable_points")] + public System.String IsEnablePoints { get { return this._IsEnablePoints; } set { this._IsEnablePoints = value?.Trim(); } } + + private System.String _PointsRule; + /// + /// 积分规则 + /// + [SugarColumn(ColumnName = "points_rule")] + public System.String PointsRule { get { return this._PointsRule; } set { this._PointsRule = value?.Trim(); } } + + private System.String _ValuationMethod; + /// + /// 计价方式:1 包装 2 称重 + /// + [SugarColumn(ColumnName = "valuation_method")] + public System.String ValuationMethod { get { return this._ValuationMethod; } set { this._ValuationMethod = value?.Trim(); } } + + private System.String _DelFlag; + /// + /// 删除标记:1 删除 0 未删除 + /// + [SugarColumn(ColumnName = "del_flag")] + public System.String DelFlag { get { return this._DelFlag; } set { this._DelFlag = value?.Trim(); } } + + private System.String _IsShowOnCshier = "1"; + /// + /// 收银前台是否显示:1 显示 0 不显示 + /// + [SugarColumn(ColumnName = "is_show_on_cashier")] + public System.String IsShowOnCshier { get { return this._IsShowOnCshier; } set { this._IsShowOnCshier = value?.Trim(); } } + + private System.Int32 _TenantId; + /// + /// 所属租户 + /// + [SugarColumn(ColumnName = "tenant_id")] + public System.Int32 TenantId { get { return this._TenantId; } set { this._TenantId = value; } } + } + public class EGoodsClassTree : EGoodsClass + { + /// + /// 子集 + /// + [SugarColumn(IsIgnore = true)] + public List Childrens { get; set; } + /// + /// 是否选中 + /// + [SugarColumn(IsIgnore = true)] + public bool IsSelected { get; set; } = false; + } +} diff --git a/Src/Asp.Net/MySqlTest/Models/Unit/Custom1/EOrderAlbaran.cs b/Src/Asp.Net/MySqlTest/Models/Unit/Custom1/EOrderAlbaran.cs new file mode 100644 index 000000000..dccc953a2 --- /dev/null +++ b/Src/Asp.Net/MySqlTest/Models/Unit/Custom1/EOrderAlbaran.cs @@ -0,0 +1,404 @@ +using SqlSugar; + +namespace HONORCSData.Order +{ + /// + /// 出库单/入库单 + /// + /// + [SugarTable("order_albaran")] + public class EOrderAlbaran + { + /// + /// 出库单/入库单 + /// + public EOrderAlbaran() + { + } + + private System.Int32 _AlbaranId; + /// + /// 主键id + /// + [SugarColumn(IsPrimaryKey =true, ColumnName = "albaran_id")] + public System.Int32 AlbaranId { get { return this._AlbaranId; } set { this._AlbaranId = value; } } + + private System.Int32? _ServerAccountId; + /// + /// 服务器端账户id + /// + [SugarColumn(ColumnName = "server_account_id")] + public System.Int32? ServerAccountId { get { return this._ServerAccountId; } set { this._ServerAccountId = value; } } + + private System.String _ClientNo; + /// + /// 客户/供应商ID + /// + [SugarColumn(ColumnName = "client_no")] + public System.String ClientNo { get { return this._ClientNo; } set { this._ClientNo = value; } } + + private System.Boolean? _IsClientWithoutIva; + /// + /// 客户是否不含iva:1 含 0 不含 + /// + [SugarColumn(ColumnName = "is_client_without_iva")] + public System.Boolean? IsClientWithoutIva { get { return this._IsClientWithoutIva; } set { this._IsClientWithoutIva = value; } } + + private System.Boolean? _IsClientWithoutIvaAndIvaInclude; + /// + /// ClienteSinIVA的IVAIncluido是否勾选:1 是 0 否 + /// + [SugarColumn(ColumnName = "is_client_without_iva_and_iva_include")] + public System.Boolean? IsClientWithoutIvaAndIvaInclude { get { return this._IsClientWithoutIvaAndIvaInclude; } set { this._IsClientWithoutIvaAndIvaInclude = value; } } + + private System.Boolean? _IsClientReq; + /// + /// 客户是否有REQ:1 是 0 否 + /// + [SugarColumn(ColumnName = "is_client_req")] + public System.Boolean? IsClientReq { get { return this._IsClientReq; } set { this._IsClientReq = value; } } + + private System.Boolean? _IsClientReqAndReqInclude; + /// + /// ClienteREQ的req_include是否勾选:1 是 0 否 + /// + [SugarColumn(ColumnName = "is_client_req_and_req_include")] + public System.Boolean? IsClientReqAndReqInclude { get { return this._IsClientReqAndReqInclude; } set { this._IsClientReqAndReqInclude = value; } } + + private System.Decimal? _Discount; + /// + /// 折扣 + /// + [SugarColumn(ColumnName = "discount")] + public System.Decimal? Discount { get { return this._Discount; } set { this._Discount = value; } } + + private System.Decimal? _DirectDiscount; + /// + /// 直接折扣 + /// + [SugarColumn(ColumnName = "direct_discount")] + public System.Decimal? DirectDiscount { get { return this._DirectDiscount; } set { this._DirectDiscount = value; } } + + private System.Int16? _IvaRule; + /// + /// iva规则(id) + /// + [SugarColumn(ColumnName = "iva_rule")] + public System.Int16? IvaRule { get { return this._IvaRule; } set { this._IvaRule = value; } } + + private System.Int32? _IvaId; + /// + /// iva_id + /// + [SugarColumn(ColumnName = "iva_id")] + public System.Int32? IvaId { get { return this._IvaId; } set { this._IvaId = value; } } + + private System.Int16? _UsePrice; + /// + /// 使用价格:1 零售价 2 会员价 3 进货价 + /// + [SugarColumn(ColumnName = "use_price")] + public System.Int16? UsePrice { get { return this._UsePrice; } set { this._UsePrice = value; } } + + private System.Decimal? _Total; + /// + /// 共计 + /// + [SugarColumn(ColumnName = "total")] + public System.Decimal? Total { get { return this._Total; } set { this._Total = value; } } + + private System.Decimal? _TotalDiscount; + /// + /// 折扣总计 + /// + [SugarColumn(ColumnName = "total_discount")] + public System.Decimal? TotalDiscount { get { return this._TotalDiscount; } set { this._TotalDiscount = value; } } + + private System.Decimal? _TotalVale; + /// + /// vale代金券总计 + /// + [SugarColumn(ColumnName = "total_vale")] + public System.Decimal? TotalVale { get { return this._TotalVale; } set { this._TotalVale = value; } } + + private System.Decimal? _Profit; + /// + /// 利润 + /// + [SugarColumn(ColumnName = "profit")] + public System.Decimal? Profit { get { return this._Profit; } set { this._Profit = value; } } + + private System.Decimal? _TotalNumber; + /// + /// 总数量 + /// + [SugarColumn(ColumnName = "total_number")] + public System.Decimal? TotalNumber { get { return this._TotalNumber; } set { this._TotalNumber = value; } } + + private System.Decimal? _TotalCash; + /// + /// 总现金 + /// + [SugarColumn(ColumnName = "total_cash")] + public System.Decimal? TotalCash { get { return this._TotalCash; } set { this._TotalCash = value; } } + + private System.DateTime? _AlbaranDate; + /// + /// albaran日期 + /// + [SugarColumn(ColumnName = "albaran_date")] + public System.DateTime? AlbaranDate { get { return this._AlbaranDate; } set { this._AlbaranDate = value; } } + + private System.DateTime? _EntryTime; + /// + /// 录入时间 + /// + [SugarColumn(ColumnName = "entry_time")] + public System.DateTime? EntryTime { get { return this._EntryTime; } set { this._EntryTime = value; } } + + private System.String _OriginDocType; + /// + /// 原始文件类型 + /// + [SugarColumn(ColumnName = "origin_doc_type")] + public System.String OriginDocType { get { return this._OriginDocType; } set { this._OriginDocType = value; } } + + private System.Int32? _OriginDocId; + /// + /// 原始文件编号 + /// + [SugarColumn(ColumnName = "origin_doc_id")] + public System.Int32? OriginDocId { get { return this._OriginDocId; } set { this._OriginDocId = value; } } + + private System.String _DestinationDocType; + /// + /// 目的文件类型 + /// + [SugarColumn(ColumnName = "destination_doc_type")] + public System.String DestinationDocType { get { return this._DestinationDocType; } set { this._DestinationDocType = value; } } + + private System.Int32? _DestinationDocId; + /// + /// 目的文件编号 + /// + [SugarColumn(ColumnName = "destination_doc_id")] + public System.Int32? DestinationDocId { get { return this._DestinationDocId; } set { this._DestinationDocId = value; } } + + private System.Int16? _ChargeType; + /// + /// 收费类型 + /// + [SugarColumn(ColumnName = "charge_type")] + public System.Int16? ChargeType { get { return this._ChargeType; } set { this._ChargeType = value; } } + + private System.Decimal? _Cash; + /// + /// 收费类型 + /// + [SugarColumn(ColumnName = "cash")] + public System.Decimal? Cash { get { return this._Cash; } set { this._Cash = value; } } + + private System.Int32? _AgentId; + /// + /// 代理商id + /// + [SugarColumn(ColumnName = "agent_id")] + public System.Int32? AgentId { get { return this._AgentId; } set { this._AgentId = value; } } + + private System.Int32? _TransporterId; + /// + /// 运输商ID + /// + [SugarColumn(ColumnName = "transporter_id")] + public System.Int32? TransporterId { get { return this._TransporterId; } set { this._TransporterId = value; } } + + private System.String _CarNo; + /// + /// 车牌号 + /// + [SugarColumn(ColumnName = "car_no")] + public System.String CarNo { get { return this._CarNo; } set { this._CarNo = value; } } + + private System.Int32? _Operator; + /// + /// 操作员编号 + /// + [SugarColumn(ColumnName = "operator")] + public System.Int32? Operator { get { return this._Operator; } set { this._Operator = value; } } + + private System.Int32? _Verifier; + /// + /// 审核员编号 + /// + [SugarColumn(ColumnName = "verifier")] + public System.Int32? Verifier { get { return this._Verifier; } set { this._Verifier = value; } } + + private System.Int32? _StorehouseId; + /// + /// 仓库id + /// + [SugarColumn(ColumnName = "storehouse_id")] + public System.Int32? StorehouseId { get { return this._StorehouseId; } set { this._StorehouseId = value; } } + + private System.String _AttachedDocSymbol; + /// + /// 附加文件符号 + /// + [SugarColumn(ColumnName = "attached_doc_symbol")] + public System.String AttachedDocSymbol { get { return this._AttachedDocSymbol; } set { this._AttachedDocSymbol = value; } } + + private System.Int32? _PrePaymentMethod; + /// + /// 预付款方式 + /// + [SugarColumn(ColumnName = "pre_payment_method")] + public System.Int32? PrePaymentMethod { get { return this._PrePaymentMethod; } set { this._PrePaymentMethod = value; } } + + private System.String _ComputerName; + /// + /// 计算机名称 + /// + [SugarColumn(ColumnName = "computer_name")] + public System.String ComputerName { get { return this._ComputerName; } set { this._ComputerName = value; } } + + private System.String _Hash; + /// + /// 哈希 + /// + [SugarColumn(ColumnName = "hash")] + public System.String Hash { get { return this._Hash; } set { this._Hash = value; } } + + private System.Int32? _CifId; + /// + /// cif_id(到岸编号) + /// + [SugarColumn(ColumnName = "cif_id")] + public System.Int32? CifId { get { return this._CifId; } set { this._CifId = value; } } + + private System.String _SubStoreId; + /// + /// 子商店编号 + /// + [SugarColumn(ColumnName = "sub_store_id")] + public System.String SubStoreId { get { return this._SubStoreId; } set { this._SubStoreId = value; } } + + private System.Decimal? _AbonoTotal; + /// + /// abono总计 + /// + [SugarColumn(ColumnName = "abono_total")] + public System.Decimal? AbonoTotal { get { return this._AbonoTotal; } set { this._AbonoTotal = value; } } + + private System.Decimal? _PaymentTotal; + /// + /// 付款总计 + /// + [SugarColumn(ColumnName = "payment_total")] + public System.Decimal? PaymentTotal { get { return this._PaymentTotal; } set { this._PaymentTotal = value; } } + + private System.Boolean? _IsCharged; + /// + /// 是否已收款:1 是 0 否 + /// + [SugarColumn(ColumnName = "is_charged")] + public System.Boolean? IsCharged { get { return this._IsCharged; } set { this._IsCharged = value; } } + + private System.Boolean? _IsLock; + /// + /// 是否锁定:1 是 0 否 + /// + [SugarColumn(ColumnName = "is_lock")] + public System.Boolean? IsLock { get { return this._IsLock; } set { this._IsLock = value; } } + + private System.Boolean? _IsCanceled; + /// + /// 是否取消:1 是 0 否 + /// + [SugarColumn(ColumnName = "is_canceled")] + public System.Boolean? IsCanceled { get { return this._IsCanceled; } set { this._IsCanceled = value; } } + + private System.String _IsModify; + /// + /// 是否修改:1 是 0 否 + /// + [SugarColumn(ColumnName = "is_modify")] + public System.String IsModify { get { return this._IsModify; } set { this._IsModify = value; } } + + private System.Boolean? _IsSendEmail; + /// + /// 是否发送电子邮件:1 是 0 否 + /// + [SugarColumn(ColumnName = "is_send_email")] + public System.Boolean? IsSendEmail { get { return this._IsSendEmail; } set { this._IsSendEmail = value; } } + + private System.String _Remark; + /// + /// 备注 + /// + [SugarColumn(ColumnName = "remark")] + public System.String Remark { get { return this._Remark; } set { this._Remark = value; } } + + private System.String _AlbaranNo; + /// + /// 订单编号 + /// + [SugarColumn(ColumnName = "albaran_no")] + public System.String AlbaranNo { get { return this._AlbaranNo; } set { this._AlbaranNo = value; } } + + private System.Int16? _AlbaranType; + /// + /// 订单类型:1 入库 2 出库 + /// + [SugarColumn(ColumnName = "albaran_type")] + public System.Int16? AlbaranType { get { return this._AlbaranType; } set { this._AlbaranType = value; } } + + private System.Int32? _CreateTime; + /// + /// 创建时间 + /// + [SugarColumn(ColumnName = "create_time")] + public System.Int32? CreateTime { get { return this._CreateTime; } set { this._CreateTime = value; } } + + private System.Int32? _UpdateTime; + /// + /// 修改时间 + /// + [SugarColumn(ColumnName = "update_time")] + public System.Int32? UpdateTime { get { return this._UpdateTime; } set { this._UpdateTime = value; } } + + private System.String _VerifyStatus; + /// + /// albaran(入库/出库单)审核状态:1 审核 0 未审核 + /// + [SugarColumn(ColumnName = "verify_status")] + public System.String VerifyStatus { get { return this._VerifyStatus; } set { this._VerifyStatus = value; } } + + private System.Int32? _VerifyTime; + /// + /// 审核日期 + /// + [SugarColumn(ColumnName = "verify_time")] + public System.Int32? VerifyTime { get { return this._VerifyTime; } set { this._VerifyTime = value; } } + + private System.Int32? _PurchaseReceiveId; + /// + /// 采购收货订单Id + /// + [SugarColumn(ColumnName = "purchase_receive_id")] + public System.Int32? PurchaseReceiveId { get { return this._PurchaseReceiveId; } set { this._PurchaseReceiveId = value; } } + + private System.String _DelFlag; + /// + /// 删除标记:1 删除 0 未删除 + /// + [SugarColumn(ColumnName = "del_flag")] + public System.String DelFlag { get { return this._DelFlag; } set { this._DelFlag = value; } } + + private System.Int32 _TenantId; + /// + /// 所属租户 + /// + [SugarColumn(ColumnName = "tenant_id")] + public System.Int32 TenantId { get { return this._TenantId; } set { this._TenantId = value; } } + } +} diff --git a/Src/Asp.Net/MySqlTest/Models/Unit/Custom1/EOrderAlbaranDetail.cs b/Src/Asp.Net/MySqlTest/Models/Unit/Custom1/EOrderAlbaranDetail.cs new file mode 100644 index 000000000..ab5c3730c --- /dev/null +++ b/Src/Asp.Net/MySqlTest/Models/Unit/Custom1/EOrderAlbaranDetail.cs @@ -0,0 +1,234 @@ +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HONORCSData.Order +{ + /// + /// 出库单/入库单详情 + /// + [SugarTable("order_albaran_detail")] + public class EOrderAlbaranDetail + { + /// + /// 出库单/入库单详情 + /// + public EOrderAlbaranDetail() + { + } + + private System.Int32 _AlbaranId; + /// + /// albaran_id + /// + [SugarColumn(ColumnName = "albaran_id")] + public System.Int32 AlbaranId { get { return this._AlbaranId; } set { this._AlbaranId = value; } } + + private System.String _GoodsNo; + /// + /// 商品编号 + /// + [SugarColumn(ColumnName = "goods_no")] + public System.String GoodsNo { get { return this._GoodsNo; } set { this._GoodsNo = value; } } + + private System.String _BarCode; + /// + /// 条码 + /// + [SugarColumn(ColumnName = "bar_code")] + public System.String BarCode { get { return this._BarCode; } set { this._BarCode = value; } } + + private System.Boolean _IsBlanceBarCode; + /// + /// 是否对称条码:1 是 0 否 + /// + [SugarColumn(ColumnName = "is_blance_bar_code")] + public System.Boolean IsBlanceBarCode { get { return this._IsBlanceBarCode; } set { this._IsBlanceBarCode = value; } } + + private System.String _SpanishName; + /// + /// 西文名称 + /// + [SugarColumn(ColumnName = "spanish_name")] + public System.String SpanishName { get { return this._SpanishName; } set { this._SpanishName = value; } } + + private System.String _ChineseName; + /// + /// 中文名称 + /// + [SugarColumn(ColumnName = "chinese_name")] + public System.String ChineseName { get { return this._ChineseName; } set { this._ChineseName = value; } } + + private System.Decimal? _Price; + /// + /// 价格 + /// + [SugarColumn(ColumnName = "price")] + public System.Decimal? Price { get { return this._Price; } set { this._Price = value; } } + + private System.Decimal? _Number; + /// + /// 数量 + /// + [SugarColumn(ColumnName = "number")] + public System.Decimal? Number { get { return this._Number; } set { this._Number = value; } } + + private System.Decimal? _Iva; + /// + /// iva + /// + [SugarColumn(ColumnName = "iva")] + public System.Decimal? Iva { get { return this._Iva; } set { this._Iva = value; } } + + private System.Decimal? _Req; + /// + /// req + /// + [SugarColumn(ColumnName = "req")] + public System.Decimal? Req { get { return this._Req; } set { this._Req = value; } } + + private System.Int32? _IvaId; + /// + /// iva_id + /// + [SugarColumn(ColumnName = "iva_id")] + public System.Int32? IvaId { get { return this._IvaId; } set { this._IvaId = value; } } + + private System.Decimal? _Discount; + /// + /// 折扣 + /// + [SugarColumn(ColumnName = "discount")] + public System.Decimal? Discount { get { return this._Discount; } set { this._Discount = value; } } + + private System.Boolean? _IsProhibitedChangeDiscount; + /// + /// 是否禁止更改折扣:1 是 0 否 + /// + [SugarColumn(ColumnName = "is_prohibited_change_discount")] + public System.Boolean? IsProhibitedChangeDiscount { get { return this._IsProhibitedChangeDiscount; } set { this._IsProhibitedChangeDiscount = value; } } + + private System.Decimal? _CostPrice; + /// + /// 成本价 + /// + [SugarColumn(ColumnName = "cost_price")] + public System.Decimal? CostPrice { get { return this._CostPrice; } set { this._CostPrice = value; } } + + private System.String _Commentary; + /// + /// 批注 + /// + [SugarColumn(ColumnName = "commentary")] + public System.String Commentary { get { return this._Commentary; } set { this._Commentary = value; } } + + private System.Boolean? _IsTemporary; + /// + /// 是否是临时的:1 是 0 否 + /// + [SugarColumn(ColumnName = "is_temporary")] + public System.Boolean? IsTemporary { get { return this._IsTemporary; } set { this._IsTemporary = value; } } + + private System.Int32? _OrderId; + /// + /// 订单id + /// + [SugarColumn(ColumnName = "order_id")] + public System.Int32? OrderId { get { return this._OrderId; } set { this._OrderId = value; } } + + private System.Decimal? _PackageAmount; + /// + /// 包装数量(包数) + /// + [SugarColumn(ColumnName = "package_amount")] + public System.Decimal? PackageAmount { get { return this._PackageAmount; } set { this._PackageAmount = value; } } + + private System.Decimal? _Total; + /// + /// 合计 + /// + [SugarColumn(ColumnName = "total")] + public System.Decimal? Total { get { return this._Total; } set { this._Total = value; } } + + private System.String _Remark; + /// + /// 备注 + /// + [SugarColumn(ColumnName = "remark")] + public System.String Remark { get { return this._Remark; } set { this._Remark = value; } } + + private System.String _DelFlag; + /// + /// 删除标记:1 删除 0 未删除 + /// + [SugarColumn(ColumnName = "del_flag")] + public System.String DelFlag { get { return this._DelFlag; } set { this._DelFlag = value; } } + + private System.String _UnitName; + /// + /// 单位名称 + /// + [SugarColumn(ColumnName = "unit_name")] + public System.String UnitName { get { return this._UnitName; } set { this._UnitName = value; } } + + private System.String _PurchaseSpec; + /// + /// 进货规格 + /// + [SugarColumn(ColumnName = "purchase_spec")] + public System.String PurchaseSpec { get { return this._PurchaseSpec; } set { this._PurchaseSpec = value; } } + + private System.Int32? _GoodsClassId; + /// + /// 商品类别 + /// + [SugarColumn(ColumnName = "goods_class_id")] + public System.Int32? GoodsClassId { get { return this._GoodsClassId; } set { this._GoodsClassId = value; } } + + private System.String _GoodsClassName; + /// + /// 商品类别名称 + /// + [SugarColumn(ColumnName = "goods_class_name")] + public System.String GoodsClassName { get { return this._GoodsClassName; } set { this._GoodsClassName = value; } } + + private System.Int32? _GoodsBrandId; + /// + /// 商品品牌 + /// + [SugarColumn(ColumnName = "goods_brand_id")] + public System.Int32? GoodsBrandId { get { return this._GoodsBrandId; } set { this._GoodsBrandId = value; } } + + private System.String _GoodsBrandName; + /// + /// 商品品牌名称 + /// + [SugarColumn(ColumnName = "goods_brand_name")] + public System.String GoodsBrandName { get { return this._GoodsBrandName; } set { this._GoodsBrandName = value; } } + + private System.Int32 _Id; + /// + /// 主键 + /// + [SugarColumn(IsPrimaryKey = true, ColumnName = "id")] + public System.Int32 Id { get { return this._Id; } set { this._Id = value; } } + + private System.Int32 _TenantId; + /// + /// 所属租户id + /// + [SugarColumn(ColumnName = "tenant_id")] + public System.Int32 TenantId { get { return this._TenantId; } set { this._TenantId = value; } } + + [SugarColumn(IsIgnore = true)] + public int Index { get; set; } + } + + public class ViewModelOrderAlbaranDetail: EOrderAlbaranDetail + { + + } +} diff --git a/Src/Asp.Net/MySqlTest/Models/Unit/Custom1/EOrderReturn.cs b/Src/Asp.Net/MySqlTest/Models/Unit/Custom1/EOrderReturn.cs new file mode 100644 index 000000000..fd02d71ef --- /dev/null +++ b/Src/Asp.Net/MySqlTest/Models/Unit/Custom1/EOrderReturn.cs @@ -0,0 +1,381 @@ +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HONORCSData.Order +{ + /// + /// 退货单 + /// + [SugarTable("order_return")] + public class EOrderReturn + { + /// + /// 退货单 + /// + + public EOrderReturn() + { + } + + private System.Int32 _OrderReturnId; + /// + /// 主键id + /// + [SugarColumn(IsPrimaryKey = true, ColumnName = "order_return_id")] + public System.Int32 OrderReturnId { get { return this._OrderReturnId; } set { this._OrderReturnId = value; } } + + private System.Int32? _ServerAccountId; + /// + /// 服务器端账户id + /// + [SugarColumn(ColumnName = "server_account_id")] + public System.Int32? ServerAccountId { get { return this._ServerAccountId; } set { this._ServerAccountId = value; } } + + private System.DateTime? _ReturnTime; + /// + /// 退货日期 + /// + [SugarColumn(ColumnName = "return_time")] + public System.DateTime? ReturnTime { get { return this._ReturnTime; } set { this._ReturnTime = value; } } + + private System.DateTime? _EntryTime; + /// + /// 录入时间 + /// + [SugarColumn(ColumnName = "entry_time")] + public System.DateTime? EntryTime { get { return this._EntryTime; } set { this._EntryTime = value; } } + + private System.String _OriginDocType; + /// + /// 原始文件类型 + /// + [SugarColumn(ColumnName = "origin_doc_type")] + public System.String OriginDocType { get { return this._OriginDocType; } set { this._OriginDocType = value; } } + + private System.Int32? _OriginDocId; + /// + /// 原始文件编号 + /// + [SugarColumn(ColumnName = "origin_doc_id")] + public System.Int32? OriginDocId { get { return this._OriginDocId; } set { this._OriginDocId = value; } } + + private System.String _DestinationDocType; + /// + /// 目的文件类型 + /// + [SugarColumn(ColumnName = "destination_doc_type")] + public System.String DestinationDocType { get { return this._DestinationDocType; } set { this._DestinationDocType = value; } } + + private System.Int32? _DestinationDocId; + /// + /// 目的文件编号 + /// + [SugarColumn(ColumnName = "destination_doc_id")] + public System.Int32? DestinationDocId { get { return this._DestinationDocId; } set { this._DestinationDocId = value; } } + + private System.Int16? _ChargeType; + /// + /// 收费类型 + /// + [SugarColumn(ColumnName = "charge_type")] + public System.Int16? ChargeType { get { return this._ChargeType; } set { this._ChargeType = value; } } + + private System.Decimal? _Cash; + /// + /// 现金 + /// + [SugarColumn(ColumnName = "cash")] + public System.Decimal? Cash { get { return this._Cash; } set { this._Cash = value; } } + + private System.Decimal? _Discount; + /// + /// 折扣 + /// + [SugarColumn(ColumnName = "discount")] + public System.Decimal? Discount { get { return this._Discount; } set { this._Discount = value; } } + + private System.Decimal? _DirectDiscount; + /// + /// 直接折扣 + /// + [SugarColumn(ColumnName = "direct_discount")] + public System.Decimal? DirectDiscount { get { return this._DirectDiscount; } set { this._DirectDiscount = value; } } + + private System.Decimal? _Total; + /// + /// 共计 + /// + [SugarColumn(ColumnName = "total")] + public System.Decimal? Total { get { return this._Total; } set { this._Total = value; } } + + private System.Decimal? _TotalDiscount; + /// + /// 折扣总计 + /// + [SugarColumn(ColumnName = "total_discount")] + public System.Decimal? TotalDiscount { get { return this._TotalDiscount; } set { this._TotalDiscount = value; } } + + private System.Decimal? _TotalVale; + /// + /// vale代金券总计 + /// + [SugarColumn(ColumnName = "total_vale")] + public System.Decimal? TotalVale { get { return this._TotalVale; } set { this._TotalVale = value; } } + + private System.Decimal? _Profit; + /// + /// 利润 + /// + [SugarColumn(ColumnName = "profit")] + public System.Decimal? Profit { get { return this._Profit; } set { this._Profit = value; } } + + private System.Decimal? _TotalPayment; + /// + /// 付款总计 + /// + [SugarColumn(ColumnName = "total_payment")] + public System.Decimal? TotalPayment { get { return this._TotalPayment; } set { this._TotalPayment = value; } } + + private System.Decimal? _TotalNumber; + /// + /// 总数量 + /// + [SugarColumn(ColumnName = "total_number")] + public System.Decimal? TotalNumber { get { return this._TotalNumber; } set { this._TotalNumber = value; } } + + private System.Decimal? _TotalCash; + /// + /// 总现金 + /// + [SugarColumn(ColumnName = "total_cash")] + public System.Decimal? TotalCash { get { return this._TotalCash; } set { this._TotalCash = value; } } + + private System.Int16? _IvaRule; + /// + /// iva规则(id) + /// + [SugarColumn(ColumnName = "iva_rule")] + public System.Int16? IvaRule { get { return this._IvaRule; } set { this._IvaRule = value; } } + + private System.Int32? _IvaId; + /// + /// iva_id + /// + [SugarColumn(ColumnName = "iva_id")] + public System.Int32? IvaId { get { return this._IvaId; } set { this._IvaId = value; } } + + private System.Int16? _UsePrice; + /// + /// 使用价格:1 零售价 2 会员价 3 进货价 + /// + [SugarColumn(ColumnName = "use_price")] + public System.Int16? UsePrice { get { return this._UsePrice; } set { this._UsePrice = value; } } + + private System.Int16? _CashdrawerId; + /// + /// 收银箱编号 + /// + [SugarColumn(ColumnName = "cashdrawer_id")] + public System.Int16? CashdrawerId { get { return this._CashdrawerId; } set { this._CashdrawerId = value; } } + + private System.String _ClientNo; + /// + /// 会员/供应商编号 + /// + [SugarColumn(ColumnName = "client_no")] + public System.String ClientNo { get { return this._ClientNo; } set { this._ClientNo = value; } } + + private System.Int32? _AgentId; + /// + /// 代理商id + /// + [SugarColumn(ColumnName = "agent_id")] + public System.Int32? AgentId { get { return this._AgentId; } set { this._AgentId = value; } } + + private System.Int32? _TransporterId; + /// + /// 运输商ID + /// + [SugarColumn(ColumnName = "transporter_id")] + public System.Int32? TransporterId { get { return this._TransporterId; } set { this._TransporterId = value; } } + + private System.String _CarNo; + /// + /// 车辆编号 + /// + [SugarColumn(ColumnName = "car_no")] + public System.String CarNo { get { return this._CarNo; } set { this._CarNo = value; } } + + private System.Int32? _OperatorId; + /// + /// 操作员编号 + /// + [SugarColumn(ColumnName = "operator_id")] + public System.Int32? OperatorId { get { return this._OperatorId; } set { this._OperatorId = value; } } + + private System.Int32? _VerifierId; + /// + /// 审核员编号 + /// + [SugarColumn(ColumnName = "verifier_id")] + public System.Int32? VerifierId { get { return this._VerifierId; } set { this._VerifierId = value; } } + + private System.Int32? _StorehouseId; + /// + /// 仓库id + /// + [SugarColumn(ColumnName = "storehouse_id")] + public System.Int32? StorehouseId { get { return this._StorehouseId; } set { this._StorehouseId = value; } } + + private System.String _AttachedDocSymbol; + /// + /// 附加文件符号 + /// + [SugarColumn(ColumnName = "attached_doc_symbol")] + public System.String AttachedDocSymbol { get { return this._AttachedDocSymbol; } set { this._AttachedDocSymbol = value; } } + + private System.Int32? _PrePaymentMethod; + /// + /// 预付款方式 + /// + [SugarColumn(ColumnName = "pre_payment_method")] + public System.Int32? PrePaymentMethod { get { return this._PrePaymentMethod; } set { this._PrePaymentMethod = value; } } + + private System.String _ReturnComputerName; + /// + /// 退款计算机名称 + /// + [SugarColumn(ColumnName = "return_computer_name")] + public System.String ReturnComputerName { get { return this._ReturnComputerName; } set { this._ReturnComputerName = value; } } + + private System.String _ComputerName; + /// + /// 计算机名称 + /// + [SugarColumn(ColumnName = "computer_name")] + public System.String ComputerName { get { return this._ComputerName; } set { this._ComputerName = value; } } + + private System.String _Hash; + /// + /// 哈希 + /// + [SugarColumn(ColumnName = "hash")] + public System.String Hash { get { return this._Hash; } set { this._Hash = value; } } + + private System.Int32? _CifId; + /// + /// cif_id(到岸编号) + /// + [SugarColumn(ColumnName = "cif_id")] + public System.Int32? CifId { get { return this._CifId; } set { this._CifId = value; } } + + private System.String _SubStoreId; + /// + /// 子商店编号 + /// + [SugarColumn(ColumnName = "sub_store_id")] + public System.String SubStoreId { get { return this._SubStoreId; } set { this._SubStoreId = value; } } + + private System.Decimal? _AbonoTotal; + /// + /// abono总计 + /// + [SugarColumn(ColumnName = "abono_total")] + public System.Decimal? AbonoTotal { get { return this._AbonoTotal; } set { this._AbonoTotal = value; } } + + private System.Boolean? _IsCharged; + /// + /// 是否已收款:1 是 0 否 + /// + [SugarColumn(ColumnName = "is_charged")] + public System.Boolean? IsCharged { get { return this._IsCharged; } set { this._IsCharged = value; } } + + private System.Boolean? _IsLock; + /// + /// 是否锁定:1 是 0 否 + /// + [SugarColumn(ColumnName = "is_lock")] + public System.Boolean? IsLock { get { return this._IsLock; } set { this._IsLock = value; } } + + private System.Boolean? _IsCanceled; + /// + /// 是否取消:1 是 0 否 + /// + [SugarColumn(ColumnName = "is_canceled")] + public System.Boolean? IsCanceled { get { return this._IsCanceled; } set { this._IsCanceled = value; } } + + private System.String _IsModify; + /// + /// 是否修改:1 是 0 否 + /// + [SugarColumn(ColumnName = "is_modify")] + public System.String IsModify { get { return this._IsModify; } set { this._IsModify = value; } } + + private System.Boolean? _IsSendEmail; + /// + /// 是否发送电子邮件:1 是 0 否 + /// + [SugarColumn(ColumnName = "is_send_email")] + public System.Boolean? IsSendEmail { get { return this._IsSendEmail; } set { this._IsSendEmail = value; } } + + private System.String _Remark; + /// + /// 备注 + /// + [SugarColumn(ColumnName = "remark")] + public System.String Remark { get { return this._Remark; } set { this._Remark = value; } } + + private System.String _OrderReturnNo; + /// + /// 订单编号 + /// + [SugarColumn(ColumnName = "order_return_no")] + public System.String OrderReturnNo { get { return this._OrderReturnNo; } set { this._OrderReturnNo = value; } } + + private System.Int16? _OrderReturnType; + /// + /// 订单类型:1 采购 2 销售 + /// + [SugarColumn(ColumnName = "order_return_type")] + public System.Int16? OrderReturnType { get { return this._OrderReturnType; } set { this._OrderReturnType = value; } } + + private System.Int32? _CreateTime; + /// + /// 创建时间 + /// + [SugarColumn(ColumnName = "create_time")] + public System.Int32? CreateTime { get { return this._CreateTime; } set { this._CreateTime = value; } } + + private System.Int32? _UpdateTime; + /// + /// 修改时间 + /// + [SugarColumn(ColumnName = "update_time")] + public System.Int32? UpdateTime { get { return this._UpdateTime; } set { this._UpdateTime = value; } } + + private System.String _DelFlag; + /// + /// 删除标记:1 删除 0 未删除 + /// + [SugarColumn(ColumnName = "del_flag")] + public System.String DelFlag { get { return this._DelFlag; } set { this._DelFlag = value; } } + + private System.String _VerifyStatus; + /// + /// 审核状态:1 已审核 0 未审核 + /// + [SugarColumn(ColumnName = "verify_status")] + public System.String VerifyStatus { get { return this._VerifyStatus; } set { this._VerifyStatus = value?.Trim(); } } + + private System.Int32 _TenantId; + /// + /// 所属租户 + /// + [SugarColumn(ColumnName = "tenant_id")] + public System.Int32 TenantId { get { return this._TenantId; } set { this._TenantId = value; } } + } +} diff --git a/Src/Asp.Net/MySqlTest/Models/Unit/Custom1/EOrderReturnDetail.cs b/Src/Asp.Net/MySqlTest/Models/Unit/Custom1/EOrderReturnDetail.cs new file mode 100644 index 000000000..a5fe1cd6b --- /dev/null +++ b/Src/Asp.Net/MySqlTest/Models/Unit/Custom1/EOrderReturnDetail.cs @@ -0,0 +1,202 @@ +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HONORCSData.Order +{ + /// + /// 退货详情 + /// + [SugarTable("order_return_detail")] + public class EOrderReturnDetail + { + /// + /// 退货详情 + /// + public EOrderReturnDetail() + { + } + + private System.Int32 _OrderReturnId; + /// + /// 退货单编号 + /// + [SugarColumn(ColumnName = "order_return_id")] + public System.Int32 OrderReturnId { get { return this._OrderReturnId; } set { this._OrderReturnId = value; } } + + private System.String _GoodsNo; + /// + /// 商品编号 + /// + [SugarColumn(ColumnName = "goods_no")] + public System.String GoodsNo { get { return this._GoodsNo; } set { this._GoodsNo = value; } } + + private System.String _BarCode; + /// + /// 条码 + /// + [SugarColumn(ColumnName = "bar_code")] + public System.String BarCode { get { return this._BarCode; } set { this._BarCode = value; } } + + private System.Boolean _IsBlanceBarCode; + /// + /// 是否对称条码:1 是 0 否 + /// + [SugarColumn(ColumnName = "is_blance_bar_code")] + public System.Boolean IsBlanceBarCode { get { return this._IsBlanceBarCode; } set { this._IsBlanceBarCode = value; } } + + private System.String _SpanishName; + /// + /// 西文名称 + /// + [SugarColumn(ColumnName = "spanish_name")] + public System.String SpanishName { get { return this._SpanishName; } set { this._SpanishName = value; } } + + private System.String _ChineseName; + /// + /// 中文名称 + /// + [SugarColumn(ColumnName = "chinese_name")] + public System.String ChineseName { get { return this._ChineseName; } set { this._ChineseName = value; } } + + private System.Decimal? _Price; + /// + /// 价格 + /// + [SugarColumn(ColumnName = "price")] + public System.Decimal? Price { get { return this._Price; } set { this._Price = value; } } + + private System.Decimal? _Number; + /// + /// 数量 + /// + [SugarColumn(ColumnName = "number")] + public System.Decimal? Number { get { return this._Number; } set { this._Number = value; } } + + private System.Decimal? _Iva; + /// + /// iva + /// + [SugarColumn(ColumnName = "iva")] + public System.Decimal? Iva { get { return this._Iva; } set { this._Iva = value; } } + + private System.Decimal? _Req; + /// + /// req + /// + [SugarColumn(ColumnName = "req")] + public System.Decimal? Req { get { return this._Req; } set { this._Req = value; } } + + private System.Int32? _IvaId; + /// + /// iva_id + /// + [SugarColumn(ColumnName = "iva_id")] + public System.Int32? IvaId { get { return this._IvaId; } set { this._IvaId = value; } } + + private System.Decimal? _Discount; + /// + /// 折扣 + /// + [SugarColumn(ColumnName = "discount")] + public System.Decimal? Discount { get { return this._Discount; } set { this._Discount = value; } } + + private System.Boolean? _IsProhibitedChangeDiscount; + /// + /// 是否禁止更改折扣:1 是 0 否 + /// + [SugarColumn(ColumnName = "is_prohibited_change_discount")] + public System.Boolean? IsProhibitedChangeDiscount { get { return this._IsProhibitedChangeDiscount; } set { this._IsProhibitedChangeDiscount = value; } } + + private System.Decimal? _CostPrice; + /// + /// 成本价 + /// + [SugarColumn(ColumnName = "cost_price")] + public System.Decimal? CostPrice { get { return this._CostPrice; } set { this._CostPrice = value; } } + + private System.String _Commentary; + /// + /// 批注 + /// + [SugarColumn(ColumnName = "commentary")] + public System.String Commentary { get { return this._Commentary; } set { this._Commentary = value; } } + + private System.Boolean? _IsTemporary; + /// + /// 是否是临时的:1 是 0 否 + /// + [SugarColumn(ColumnName = "is_temporary")] + public System.Boolean? IsTemporary { get { return this._IsTemporary; } set { this._IsTemporary = value; } } + + private System.Int32? _OrderId; + /// + /// 订单id + /// + [SugarColumn(ColumnName = "order_id")] + public System.Int32? OrderId { get { return this._OrderId; } set { this._OrderId = value; } } + + private System.Decimal? _PackageAmount; + /// + /// 包装数量(包数) + /// + [SugarColumn(ColumnName = "package_amount")] + public System.Decimal? PackageAmount { get { return this._PackageAmount; } set { this._PackageAmount = value; } } + + private System.Decimal? _Total; + /// + /// 合计 + /// + [SugarColumn(ColumnName = "total")] + public System.Decimal? Total { get { return this._Total; } set { this._Total = value; } } + + private System.String _Remark; + /// + /// 备注 + /// + [SugarColumn(ColumnName = "remark")] + public System.String Remark { get { return this._Remark; } set { this._Remark = value; } } + + private System.String _DelFlag; + /// + /// 删除标记:1 删除 0 未删除 + /// + [SugarColumn(ColumnName = "del_flag")] + public System.String DelFlag { get { return this._DelFlag; } set { this._DelFlag = value; } } + + private System.String _UnitName; + /// + /// 单位名称 + /// + [SugarColumn(ColumnName = "unit_name")] + public System.String UnitName { get { return this._UnitName; } set { this._UnitName = value; } } + + private System.String _PurchaseSpec; + /// + /// 进货规格 + /// + [SugarColumn(ColumnName = "purchase_spec")] + public System.String PurchaseSpec { get { return this._PurchaseSpec; } set { this._PurchaseSpec = value; } } + + private System.Int32 _Id; + /// + /// 主键 + /// + [SugarColumn(IsPrimaryKey = true, ColumnName = "id")] + public System.Int32 Id { get { return this._Id; } set { this._Id = value; } } + + private System.Int32 _TenantId; + /// + /// 所属租户id + /// + [SugarColumn(ColumnName = "tenant_id")] + public System.Int32 TenantId { get { return this._TenantId; } set { this._TenantId = value; } } + + + [SugarColumn(IsIgnore = true)] + public int Index { get; set; } + } +} diff --git a/Src/Asp.Net/MySqlTest/Models/Unit/Custom1/PurchaseDetailModel.cs b/Src/Asp.Net/MySqlTest/Models/Unit/Custom1/PurchaseDetailModel.cs new file mode 100644 index 000000000..e714cfd4d --- /dev/null +++ b/Src/Asp.Net/MySqlTest/Models/Unit/Custom1/PurchaseDetailModel.cs @@ -0,0 +1,162 @@ +using HONORCSData; +using HONORCSData.Goods; +using HONORCSData.Order; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; +using System.Text; +using System.Threading.Tasks; +using HONORCSData.Order; +namespace OrmTest +{ + /// + /// 采购明细 + /// + public class PurchaseDetailModel + { + public int Index { get; set; } + + /// + /// 录入日期 + /// + public DateTime? EntryTime { get; set; } + + /// + /// 编号 + /// + public string No { get; set; } + + /// + /// 类型 + /// + public int Type { get; set; } + + public string GoodsNo { get; set; } + + public string GoodsName { get; set; } + + + public string GoodsCategory { get; set; } + + + public string BrandName { get; set; } + + + public decimal? Number { get; set; } + + + public decimal? Price { get; set; } + + public decimal TotalPrice + { + get + { + if (Number == null || Price == null) return 0; + return Number.Value * Price.Value; + } + } + + + } + public class CustomTest1 + { + /// + /// 采购明细汇总 + /// + /// + /// + /// + public static async Task GetPurchaseDetailPageAsync(SqlSugarClient Db) + { + Db.CodeFirst.InitTables(); + Db.CodeFirst.InitTables(); + //入库单 + Db.Insertable(new EOrderAlbaranDetail() + { + AlbaranId = 1, + BarCode = "a", + ChineseName = "a", + Commentary = "a", + CostPrice = 1, + DelFlag = "a", + Discount = 1, + GoodsBrandId = 1, + GoodsBrandName = "a", + GoodsClassId = 1, + GoodsClassName = "a", + GoodsNo = "a", + Id = new Random().Next(0, 99999999), + Index = 1, + IsBlanceBarCode = true, + IsProhibitedChangeDiscount = true, + IsTemporary = true, + Iva = 1, + IvaId = 1, + Number = 1, + OrderId = 1, + PackageAmount = 1, + Price = 1, + PurchaseSpec = "", + Remark = "a", + Req = 1, + SpanishName = "a", + TenantId = 1, + Total = 1, + UnitName = "a" + }).ExecuteCommand(); + var query1 = Db.Queryable((d, h, g, c, b) => new JoinQueryInfos( + JoinType.Left, h.AlbaranId == d.AlbaranId, + JoinType.Left, d.GoodsNo == g.GoodsNo, + JoinType.Left, g.GoodsClassId == c.GoodsClassId, + JoinType.Left, g.BrandId == b.BrandId + )) + .Where((d, h, g, c, b) => h.AlbaranType == null) //固定入库单 + .Select((d, h, g, c, b) => new PurchaseDetailModel + { + EntryTime = h.EntryTime, + No = h.AlbaranNo, + Type = 1, + GoodsNo = d.GoodsNo, + GoodsName = g.SpanishName, + GoodsCategory = c.SpanishName, + BrandName = b.BranchSpanishName, + Number = d.Number, + Price = d.Price + }); + + //退货单 + var query2 = Db.Queryable((d, h, g, c, b) => new JoinQueryInfos( + JoinType.Left, h.OrderReturnId == d.OrderReturnId, + JoinType.Left, d.GoodsNo == g.GoodsNo, + JoinType.Left, g.GoodsClassId == c.GoodsClassId, + JoinType.Left, g.BrandId == b.BrandId + )).Where((d, h, g, c, b) => h.OrderReturnType == 1) //固定入库单 + .Select((d, h, g, c, b) => new PurchaseDetailModel + { + EntryTime = h.EntryTime, + No = h.OrderReturnNo, + Type = 2, + GoodsNo = d.GoodsNo, + GoodsName = g.SpanishName, + GoodsCategory = c.SpanishName, + BrandName = b.BranchSpanishName, + Number = d.Number, + Price = d.Price + }); + SqlSugar.RefAsync totalNum = 0; + + var res2 = await query2.Clone().ToPageListAsync(1, 2, totalNum); + var res = await Db.UnionAll(query1, query2).ToPageListAsync(1, 2, totalNum); + + var q = Db.Queryable().Where(it => it.Id == 1).Select(it => new { id=1}); + var q2 = q.Clone(); + var x = q.ToList(); + var y = q2.ToList(); + //var res = await Db.UnionAll(query1.Clone(), query2.Clone()).ToPageListAsync(1, 10, totalNum); + + } + + } +} diff --git a/Src/Asp.Net/MySqlTest/MySqlTest.csproj b/Src/Asp.Net/MySqlTest/MySqlTest.csproj index a6bcbd66b..cfdf9f591 100644 --- a/Src/Asp.Net/MySqlTest/MySqlTest.csproj +++ b/Src/Asp.Net/MySqlTest/MySqlTest.csproj @@ -78,6 +78,14 @@ + + + + + + + + diff --git a/Src/Asp.Net/MySqlTest/UnitTest/UQueryable.cs b/Src/Asp.Net/MySqlTest/UnitTest/UQueryable.cs index bac46dc74..7de3baca9 100644 --- a/Src/Asp.Net/MySqlTest/UnitTest/UQueryable.cs +++ b/Src/Asp.Net/MySqlTest/UnitTest/UQueryable.cs @@ -78,6 +78,10 @@ namespace OrmTest CheckMan = saleOrderInfo.CheckMan, CheckTime = DateTime.Now }, o => o.OrderSn == saleOrderInfo.OrderSn && o.OrderStatus != 1); + + + var task=CustomTest1.GetPurchaseDetailPageAsync(Db); + task.Wait(); } public static class IEnumerbleContains diff --git a/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs b/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs index 74f3b7f32..d27a4b061 100644 --- a/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs +++ b/Src/Asp.Net/SqlSugar/Abstract/QueryableProvider/QueryableProvider.cs @@ -1958,7 +1958,27 @@ namespace SqlSugar protected void CopyQueryBuilder(QueryBuilder asyncQueryableBuilder) { var pars = new List(); - pars.AddRange(this.QueryBuilder.Parameters); + if (this.QueryBuilder.Parameters != null) + { + pars=this.QueryBuilder.Parameters.Select(it=>new SugarParameter(it.ParameterName,it.Value) { + DbType=it.DbType, + Value=it.Value, + ParameterName=it.ParameterName, + Direction=it.Direction, + IsArray=it.IsArray, + IsJson=it.IsJson, + IsNullable=it.IsNullable, + IsRefCursor=it.IsRefCursor, + Size=it.Size, + SourceColumn=it.SourceColumn, + SourceColumnNullMapping=it.SourceColumnNullMapping, + SourceVersion=it.SourceVersion, + TempDate=it.TempDate, + TypeName=it.TypeName, + UdtTypeName=it.UdtTypeName, + _Size=it._Size + }).ToList(); + } asyncQueryableBuilder.Take = this.QueryBuilder.Take; asyncQueryableBuilder.Skip = this.QueryBuilder.Skip; asyncQueryableBuilder.SelectValue = this.QueryBuilder.SelectValue;