master
wufan 2 months ago
parent 18fcad6a8c
commit db7a276034

@ -33,7 +33,12 @@
<add assembly="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" /> <add assembly="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
<add assembly="System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> <add assembly="System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> <add assembly="System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
<add assembly="CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" /><add assembly="CrystalDecisions.ReportSource, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" /><add assembly="CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" /><add assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" /><add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" /></assemblies> <!--<add assembly="CrystalDecisions.CrystalReports.Engine, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
<add assembly="CrystalDecisions.ReportSource, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
<add assembly="CrystalDecisions.Shared, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
<add assembly="CrystalDecisions.Web, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />
<add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=13.0.2000.0, Culture=neutral, PublicKeyToken=692fbea5521e1304" />-->
</assemblies>
</compilation> </compilation>
<!-- <!--
通过 <authentication> 节可以配置 ASP.NET 用来 通过 <authentication> 节可以配置 ASP.NET 用来

@ -0,0 +1,10 @@
namespace TradeManageNew.Models.Shage
{
public class GetOrderUsedSale
{
/// <summary>
/// 跟踪号
/// </summary>
public string TrackingCode { get; set; }
}
}

@ -0,0 +1,34 @@
using TradeUsedSale.Enums;
namespace TradeManageNew.Models.Shage
{
public class OrderUsedSaleEntryInput
{
/// <summary>
/// 订单号
/// </summary>
public string OrderCode { get; set; }
/// <summary>
/// SKU Code
/// </summary>
public string GoodsCode { get; set; }
/// <summary>
/// 数量
/// </summary>
public int Quantity { get; set; }
/// <summary>
/// 跟踪号
/// </summary>
public string TrackingCode { get; set; }
/// <summary>
/// 仓库
/// </summary>
public WarehouseLocation WarehouseLocation { get; set; }
public int UserId { get; set; }
}
}

@ -10,6 +10,8 @@ using NetLibrary;
using Org.BouncyCastle.Utilities.Encoders; using Org.BouncyCastle.Utilities.Encoders;
using System.Drawing; using System.Drawing;
using LinqToDB; using LinqToDB;
using TradeManageNew.Models.Shage;
using TradeUsedSale.Enums;
using TradeUsedSale.Repositories; using TradeUsedSale.Repositories;
namespace TradeManageNew.OuterService namespace TradeManageNew.OuterService
@ -1369,157 +1371,262 @@ namespace TradeManageNew.OuterService
md.Data = null; md.Data = null;
} }
} }
if (Method == "ReturnUsedSale") if (Method == "OrderUsedSaleEntry")
{ {
var input = JsonConvert.DeserializeObject<Sync_ReturnGoodsSave>(ResponseContent); var input = JsonConvert.DeserializeObject<OrderUsedSaleEntryInput>(ResponseContent);
var validatedSuccess = true; var validatedSuccess = true;
if (string.IsNullOrEmpty(input.StoreCode)) if (string.IsNullOrEmpty(input.OrderCode))
{ {
md.Code = "400"; md.Code = "400";
md.Result = "Please enter storage Location"; md.Result = "Please enter order code";
md.Data = null; md.Data = null;
validatedSuccess = false; validatedSuccess = false;
} }
if (string.IsNullOrEmpty(input.TrackCode)) if (string.IsNullOrEmpty(input.GoodsCode))
{ {
md.Code = "400"; md.Code = "400";
md.Result = "Please enter tracking code"; md.Result = "Please enter sku code";
md.Data = null; md.Data = null;
validatedSuccess = false; validatedSuccess = false;
} }
if (string.IsNullOrEmpty(input.OrderCode)) if (string.IsNullOrEmpty(input.TrackingCode))
{ {
md.Code = "400"; md.Code = "400";
md.Result = "Please enter order no"; md.Result = "Please enter tracking code";
md.Data = null; md.Data = null;
validatedSuccess = false; validatedSuccess = false;
} }
if (input.GoodsList==null || !input.GoodsList.Any()) if (input.Quantity<=0)
{ {
md.Code = "400"; md.Code = "400";
md.Result = "Please enter goods information"; md.Result = "The quantity must be greater than 0";
md.Data = null; md.Data = null;
validatedSuccess = false; validatedSuccess = false;
} }
if (validatedSuccess) if (validatedSuccess)
{ {
var detailIds = input.GoodsList.Select(x => x.GoodsId).ToList();
using (var db = new ErpDbContext()) using (var db = new ErpDbContext())
{ {
var orderReturns = db.DT_OrderReturn.Where(x => //订单信息
x.tracking_id == input.TrackCode && var order = db.DT_OrderInfo.FirstOrDefault(x =>
x.ordercode==input.OrderCode && x.PlatOrderCode == input.OrderCode || x.OrderCode == input.OrderCode);
(string.IsNullOrEmpty(x.InType) || x.InType == "6") && if (order is null)
(string.IsNullOrEmpty(x.ScanState) || x.ScanState == "1") &&
x.detailid != null && detailIds.Contains(x.detailid.Value))
.ToList();
var orderReturnIds = orderReturns.Select(x => x.id).ToList();
if (!orderReturnIds.Any())
{ {
throw new Exception("Return order information not obtained"); throw new Exception($"There is no order with order number {input.OrderCode}");
} }
//二手平台上架信息 //订单明细信息
var orderReturnUsedSales = db.DT_OrderReturnUsedSale var orderItem = db.DT_OrderGoods
.Where(x => orderReturnIds.Contains(x.OrderReturnId)) .FirstOrDefault(x => x.OrderId == order.OrderId && x.GoodsSKU == input.GoodsCode);
.ToList(); if (orderItem is null)
foreach (var inputItem in input.GoodsList)
{
var returnItem = orderReturns.FirstOrDefault(x => x.detailid == inputItem.GoodsId);
if (returnItem is null)
{ {
throw new Exception( throw new Exception(
$"Return order information not obtained. tracking id {input.TrackCode},order no {input.OrderCode},sku {inputItem.GoodsId}"); $"There is no SKU with code {input.GoodsCode} in order [{input.OrderCode}]");
} }
//已上架二手平台的数量 //SKU信息
var usedSalesQuantity = orderReturnUsedSales var sku = db.HW_GoodsDetail.FirstOrDefault(x => x.DetailId == orderItem.DetailId);
.Where(x => x.OrderReturnId == returnItem.id) if (sku is null)
.Sum(x => x.Quantity);
//剩余可以上架二手平台的数量
var remainingQuantity = returnItem.return_quantity - usedSalesQuantity;
if (inputItem.GoodsNum > remainingQuantity)
{ {
throw new Exception( throw new Exception(
$"sku {returnItem.merchant_sku} submitted quantity {inputItem.GoodsNum} exceeds the remaining submittable quantity {remainingQuantity}"); $"There is no product information with ID {orderItem.DetailId}");
}
} }
db.BeginTransaction(); //检查是否存在相同跟踪号不同情况的订单
try
{
#region 插入二手商品信息
foreach (var inputItem in input.GoodsList)
{
var returnItem = orderReturns.First(x => x.detailid == inputItem.GoodsId);
//更新退货订单表数据
db.DT_OrderReturn.Where(x => x.id == returnItem.id)
.Set(x => x.InType, "6")
.Set(x => x.ScanState, "1")
.Set(x => x.ScanDate, DateTime.Now)
.Set(x => x.ScanUserId, input.UserId)
.Set(x => x.PostionCode, input.StoreCode)
.Set(x => x.ImgUrl, input.Photo1)
.Set(x => x.ImgUrl2, input.Photo2)
.Set(x => x.ImgUrl3, input.Photo3)
.Set(x => x.ImgUrl4, input.Photo4)
.Set(x => x.ImgUrl5, input.Photo5)
.Update();
var newOrderReturnUsedSale =
new TradeUsedSale.Repositories.Models.DT_OrderReturnUsedSale
{
OrderReturnId = returnItem.id,
OrderId = returnItem.orderid,
OrderCode = returnItem.ordercode,
GoodsId = returnItem.detailid.Value,
MerchantSku = returnItem.merchant_sku,
Quantity = inputItem.GoodsNum,
CreationTime = DateTime.Now,
CreatorId = input.UserId
};
var newOrderReturnUsedSaleId =
db.InsertWithInt32Identity(newOrderReturnUsedSale);
for (var i = 1; i <= inputItem.GoodsNum; i++) var newOrderUsedSaleEntry =
{ new TradeUsedSale.Repositories.Models.DT_OrderUsedSaleEntry
var newOrderReturnUsedSaleItem =
new TradeUsedSale.Repositories.Models.DT_OrderReturnUsedSaleItem
{ {
OrderReturnUsedSaleId = newOrderReturnUsedSaleId, OrderId = order.OrderId,
IsPublished = false, OrderCode = order.OrderCode,
GoodsId = sku.DetailId,
GoodsCode = sku.SKU1,
Quantity = input.Quantity,
TrackingCode = input.TrackingCode,
WarehouseLocation = input.WarehouseLocation,
CreationTime = DateTime.Now, CreationTime = DateTime.Now,
CreatorId = input.UserId, CreatorId = input.UserId
}; };
db.InsertWithInt32Identity(newOrderReturnUsedSaleItem); db.InsertWithInt32Identity(newOrderUsedSaleEntry);
}
}
#endregion md.Code = "100";
md.Result = "Success";
db.CommitTransaction(); md.Data = "";
}
catch (Exception ex)
{
db.RollbackTransaction();
throw;
} }
} }
} }
if (Method == "GetOrderUsedSale")
{
var input = JsonConvert.DeserializeObject<GetOrderUsedSale>(ResponseContent);
if (string.IsNullOrEmpty(input.TrackingCode))
{
md.Code = "400";
md.Result = "Please enter tracking code";
md.Data = null;
} }
else
{
using (var db = new ErpDbContext())
{
//var orderUsedSaleEntry
}
}
}
// if (Method == "ReturnUsedSale")
// {
// var input = JsonConvert.DeserializeObject<Sync_ReturnGoodsSave>(ResponseContent);
// var validatedSuccess = true;
// if (string.IsNullOrEmpty(input.StoreCode))
// {
// md.Code = "400";
// md.Result = "Please enter storage Location";
// md.Data = null;
// validatedSuccess = false;
// }
// if (string.IsNullOrEmpty(input.TrackCode))
// {
// md.Code = "400";
// md.Result = "Please enter tracking code";
// md.Data = null;
// validatedSuccess = false;
// }
// if (string.IsNullOrEmpty(input.OrderCode))
// {
// md.Code = "400";
// md.Result = "Please enter order no";
// md.Data = null;
// validatedSuccess = false;
// }
// if (input.GoodsList==null || !input.GoodsList.Any())
// {
// md.Code = "400";
// md.Result = "Please enter goods information";
// md.Data = null;
// validatedSuccess = false;
// }
//
// if (validatedSuccess)
// {
// var detailIds = input.GoodsList.Select(x => x.GoodsId).ToList();
// using (var db = new ErpDbContext())
// {
// var orderReturns = db.DT_OrderReturn.Where(x =>
// x.tracking_id == input.TrackCode &&
// x.ordercode==input.OrderCode &&
// (string.IsNullOrEmpty(x.InType) || x.InType == "6") &&
// (string.IsNullOrEmpty(x.ScanState) || x.ScanState == "1") &&
// x.detailid != null && detailIds.Contains(x.detailid.Value))
// .ToList();
//
// var orderReturnIds = orderReturns.Select(x => x.id).ToList();
//
// if (!orderReturnIds.Any())
// {
// throw new Exception("Return order information not obtained");
// }
//
// //二手平台上架信息
// var orderReturnUsedSales = db.DT_OrderReturnUsedSale
// .Where(x => orderReturnIds.Contains(x.OrderReturnId))
// .ToList();
//
// foreach (var inputItem in input.GoodsList)
// {
// var returnItem = orderReturns.FirstOrDefault(x => x.detailid == inputItem.GoodsId);
//
// if (returnItem is null)
// {
// throw new Exception(
// $"Return order information not obtained. tracking id {input.TrackCode},order no {input.OrderCode},sku {inputItem.GoodsId}");
// }
//
// //已上架二手平台的数量
// var usedSalesQuantity = orderReturnUsedSales
// .Where(x => x.OrderReturnId == returnItem.id)
// .Sum(x => x.Quantity);
//
// //剩余可以上架二手平台的数量
// var remainingQuantity = returnItem.return_quantity - usedSalesQuantity;
//
// if (inputItem.GoodsNum > remainingQuantity)
// {
// throw new Exception(
// $"sku {returnItem.merchant_sku} submitted quantity {inputItem.GoodsNum} exceeds the remaining submittable quantity {remainingQuantity}");
// }
// }
//
// db.BeginTransaction();
//
// try
// {
// #region 插入二手商品信息
//
// foreach (var inputItem in input.GoodsList)
// {
// var returnItem = orderReturns.First(x => x.detailid == inputItem.GoodsId);
//
// //更新退货订单表数据
// db.DT_OrderReturn.Where(x => x.id == returnItem.id)
// .Set(x => x.InType, "6")
// .Set(x => x.ScanState, "1")
// .Set(x => x.ScanDate, DateTime.Now)
// .Set(x => x.ScanUserId, input.UserId)
// .Set(x => x.PostionCode, input.StoreCode)
// .Set(x => x.ImgUrl, input.Photo1)
// .Set(x => x.ImgUrl2, input.Photo2)
// .Set(x => x.ImgUrl3, input.Photo3)
// .Set(x => x.ImgUrl4, input.Photo4)
// .Set(x => x.ImgUrl5, input.Photo5)
// .Update();
//
// var newOrderReturnUsedSale =
// new TradeUsedSale.Repositories.Models.DT_OrderReturnUsedSale
// {
// OrderReturnId = returnItem.id,
// OrderId = returnItem.orderid,
// OrderCode = returnItem.ordercode,
// GoodsId = returnItem.detailid.Value,
// MerchantSku = returnItem.merchant_sku,
// Quantity = inputItem.GoodsNum,
// CreationTime = DateTime.Now,
// CreatorId = input.UserId
// };
//
// var newOrderReturnUsedSaleId =
// db.InsertWithInt32Identity(newOrderReturnUsedSale);
//
// for (var i = 1; i <= inputItem.GoodsNum; i++)
// {
// var newOrderReturnUsedSaleItem =
// new TradeUsedSale.Repositories.Models.DT_OrderReturnUsedSaleItem
// {
// OrderReturnUsedSaleId = newOrderReturnUsedSaleId,
// IsPublished = false,
// CreationTime = DateTime.Now,
// CreatorId = input.UserId,
// };
//
// db.InsertWithInt32Identity(newOrderReturnUsedSaleItem);
// }
// }
//
// #endregion
//
// db.CommitTransaction();
// }
// catch (Exception ex)
// {
// db.RollbackTransaction();
// throw;
// }
// }
// }
//
// }
} }
} }

@ -2915,6 +2915,8 @@
<Compile Include="LXOpenApi.cs" /> <Compile Include="LXOpenApi.cs" />
<Compile Include="MicrosoftExcelNew.cs" /> <Compile Include="MicrosoftExcelNew.cs" />
<Compile Include="ModelNew.cs" /> <Compile Include="ModelNew.cs" />
<Compile Include="Models\Shage\OrderUsedSaleEntryInput.cs" />
<Compile Include="Models\Shage\GetOrderUsedSale.cs" />
<Compile Include="OrderAPI.ashx.cs"> <Compile Include="OrderAPI.ashx.cs">
<DependentUpon>OrderAPI.ashx</DependentUpon> <DependentUpon>OrderAPI.ashx</DependentUpon>
</Compile> </Compile>

@ -0,0 +1,17 @@
using System.ComponentModel;
namespace TradeUsedSale.Enums
{
public enum WarehouseLocation
{
/// <summary>
/// 东仓
/// </summary>
[Description("东仓")] East = 1,
/// <summary>
/// 西仓
/// </summary>
[Description("西仓")] West
}
}

@ -17,11 +17,12 @@ namespace TradeUsedSale.Repositories
WriteTraceLine = TraceCallback; WriteTraceLine = TraceCallback;
} }
public ITable<DT_OrderInfo> DT_OrderInfo => this.GetTable<DT_OrderInfo>();
public ITable<DT_OrderGoods> DT_OrderGoods => this.GetTable<DT_OrderGoods>();
public ITable<HW_GoodsDetail> HW_GoodsDetail => this.GetTable<HW_GoodsDetail>();
public ITable<DT_OrderReturn> DT_OrderReturn => this.GetTable<DT_OrderReturn>(); public ITable<DT_OrderReturn> DT_OrderReturn => this.GetTable<DT_OrderReturn>();
public ITable<DT_OrderUsedSale> DT_OrderUsedSale => this.GetTable<DT_OrderUsedSale>();
public ITable<DT_OrderReturnUsedSale> DT_OrderReturnUsedSale => this.GetTable<DT_OrderReturnUsedSale>(); public ITable<DT_OrderUsedSaleEntry> DT_OrderUsedSaleEntry => this.GetTable<DT_OrderUsedSaleEntry>();
public ITable<DT_OrderUsedSalePlatform> DT_OrderUsedSalePlatform => this.GetTable<DT_OrderUsedSalePlatform>();
public ITable<DT_OrderReturnUsedSaleItem> DT_OrderReturnUsedSaleItem => this.GetTable<DT_OrderReturnUsedSaleItem>();
} }
} }

@ -0,0 +1,90 @@
using System;
using LinqToDB.Mapping;
namespace TradeUsedSale.Repositories.Models
{
public class DT_OrderGoods
{
[PrimaryKey, Identity] public int Id { get; set; }
/// <summary>
/// 订单 id
/// </summary>
public int? OrderId { get; set; }
/// <summary>
/// 货物明细id
/// </summary>
public int? DetailId { get; set; }
/// <summary>
/// 货物明细数量
/// </summary>
public int? GoodsNum { get; set; }
/// <summary>
/// 货物价格
/// </summary>
public decimal? GoodsPrice { get; set; }
public decimal? RMBMoney { get; set; }
/// <summary>
/// 货币代码
/// </summary>
public string MoneyCode { get; set; }
/// <summary>
/// 锁定匹配库存数量
/// </summary>
public int? LockNum { get; set; }
/// <summary>
/// 对应的采购单id
/// </summary>
public int? ChaseId { get; set; }
/// <summary>
/// 货物sku
/// </summary>
public string GoodsSKU { get; set; }
/// <summary>
/// 货物名称
/// </summary>
public string GoodsName { get; set; }
public string PostInfo { get; set; }
public int? OutNum { get; set; }
public string productImgUrl { get; set; }
public string GoodsDesc { get; set; }
public string GoodsCode { get; set; }
public int? OldNum { get; set; }
/// <summary>
/// 加码分配的型号
/// </summary>
public string OldTypeCode { get; set; }
/// <summary>
/// 加码分配原描述
/// </summary>
public string OldTypeDesc { get; set; }
public decimal? GoodsFee { get; set; }
public decimal? TCFee { get; set; }
public decimal? GoodsRate { get; set; }
public decimal? Fee6 { get; set; }
public decimal? Fee7 { get; set; }
public decimal? Fee8 { get; set; }
public decimal? GoodsOrderFee { get; set; }
public decimal? Fee9 { get; set; }
public string Sort1 { get; set; }
public string Sort2 { get; set; }
public string ItemOrderId { get; set; }
public decimal? ckfee { get; set; }
public decimal? mdfee { get; set; }
public decimal? adfee { get; set; }
public DateTime? ck_date { get; set; }
}
}

@ -0,0 +1,235 @@
using System;
using LinqToDB.Mapping;
namespace TradeUsedSale.Repositories.Models
{
public class DT_OrderInfo
{
[PrimaryKey, Identity] public int OrderId { get; set; }
/// <summary>
/// 订单等级
/// </summary>
public int? OrderLevel { get; set; }
/// <summary>
/// 平台类型
/// </summary>
public int? PlatId { get; set; }
/// <summary>
/// 平台店铺id
/// </summary>
public int? ShopId { get; set; }
/// <summary>
/// 订单号
/// </summary>
public string OrderCode { get; set; }
/// <summary>
/// 平台订单号
/// </summary>
public string PlatOrderCode { get; set; }
/// <summary>
/// 合并的订单号填的是要合并的订单的PlatOrderCode
/// </summary>
public string JoinOrderCode { get; set; }
/// <summary>
/// 订单名称
/// </summary>
public string OrderName { get; set; }
/// <summary>
/// 是否是合并订单
/// </summary>
public int? IsJoin { get; set; }
/// <summary>
/// 货物编号
/// </summary>
public string GoodsCode { get; set; }
/// <summary>
/// 货物名称
/// </summary>
public string GoodsName { get; set; }
/// <summary>
/// 购买数量
/// </summary>
public int? GoodsNum { get; set; }
/// <summary>
/// 价格总计
/// </summary>
public decimal? TotalPrice { get; set; }
/// <summary>
/// 换算成人民币金额
/// </summary>
public decimal? RMBPrice { get; set; }
/// <summary>
/// 货币代码
/// </summary>
public string MoneyCode { get; set; }
/// <summary>
/// 0未收款1已收款
/// </summary>
public int? MoneyState { get; set; }
/// <summary>
/// 收款时间
/// </summary>
public DateTime? MoneyDate { get; set; }
/// <summary>
/// 发货状态0未发货1已发货2不允许发货
/// </summary>
public int? PostState { get; set; }
/// <summary>
/// 发货时间
/// </summary>
public DateTime? PostDate { get; set; }
/// <summary>
/// 打印状态0未打印1已经打印
/// </summary>
public int? PrintState { get; set; }
/// <summary>
/// 打印时间
/// </summary>
public DateTime? PrintDate { get; set; }
/// <summary>
/// 匹配状态0未匹配1部分匹配2匹配完成
/// </summary>
public int? MateState { get; set; }
/// <summary>
/// 订单状态0删除1未完成2已经结束
/// </summary>
public int? State { get; set; }
/// <summary>
/// 订单时间
/// </summary>
public DateTime? OrderDate { get; set; }
/// <summary>
/// 导入时间
/// </summary>
public DateTime? InDate { get; set; }
/// <summary>
/// 导入人
/// </summary>
public int? InUserId { get; set; }
public DateTime? UpdateDate { get; set; }
/// <summary>
/// 订单销售
/// </summary>
public int? SaleUserId { get; set; }
public int? CompanyId { get; set; }
/// <summary>
/// 是否海外仓发货
/// </summary>
public int? IsFba { get; set; }
/// <summary>
/// 订单过期时间
/// </summary>
public DateTime? OrderOutDate { get; set; }
public int? IsSpare { get; set; }
public int? NoBuy { get; set; }
public decimal? logisticsAmount { get; set; }
public decimal? escrowFee { get; set; }
public int? IsSDan { get; set; }
public DateTime? BuyDate { get; set; }
public DateTime? JoinDate { get; set; }
public int? IsJoinAddr { get; set; }
public int? SaleState { get; set; }
public int? IsBlank { get; set; }
public DateTime? FPDate { get; set; }
public int? BillPrint { get; set; }
public decimal? GoodsPrice { get; set; }
public decimal? Fee1 { get; set; }
public decimal? Fee2 { get; set; }
public decimal? Fee3 { get; set; }
public decimal? Fee4 { get; set; }
public int? OrderState2 { get; set; }
public int? GoodsState { get; set; }
public decimal? Fee5 { get; set; }
public decimal? Fee6 { get; set; }
public decimal? Fee7 { get; set; }
public decimal? Fee8 { get; set; }
public string FeeLog { get; set; }
public decimal? Fee9 { get; set; }
public decimal? Fee10 { get; set; }
public decimal? Fee11 { get; set; }
public decimal? Fee12 { get; set; }
public decimal? Fee13 { get; set; }
public decimal? Fee14 { get; set; }
public decimal? FeeE { get; set; }
public decimal? FeeW { get; set; }
public int? WLSS { get; set; }
public decimal? FactOrderFee { get; set; }
public decimal? FactOrderCommison { get; set; }
public decimal? FactOrderFax { get; set; }
public int? JHError { get; set; }
public string JHRemark { get; set; }
public decimal? DR_BackFee { get; set; }
public decimal? DR_SSFee { get; set; }
public decimal? DR_PostFee { get; set; }
public DateTime? DR_BackFeeDate { get; set; }
public DateTime? DR_SSFeeDate { get; set; }
public DateTime? DR_PostFeeDate { get; set; }
public decimal? Other_Fee { get; set; }
public decimal? Ad_Fee { get; set; }
public int? YC_TS { get; set; }
public string YC_Result { get; set; }
public DateTime? ck_date { get; set; }
public decimal? FeeLTL { get; set; }
public decimal? UpsFeeR { get; set; }
public decimal? UpsFeeE { get; set; }
public string UpsFeeLog { get; set; }
/// <summary>
/// 是否允许订单同步到WMS系统null和1都表示允许0表示不允许
/// </summary>
public int? IsSyncToWMS { get; set; }
public decimal? UpsFeeE1 { get; set; }
public decimal? UpsFeeE2 { get; set; }
public decimal? UpsFeeW1 { get; set; }
public decimal? UpsFeeW2 { get; set; }
/// <summary>
/// 对应零星发货单号
/// </summary>
public string outboundOrderNo { get; set; }
/// <summary>
/// 推送领星状态1推送成功2异常
/// </summary>
public int? IsLX { get; set; }
/// <summary>
/// 零星异常信息
/// </summary>
public string LxMess { get; set; }
public DateTime? LxDate { get; set; }
}
}

@ -0,0 +1,76 @@
using System;
using LinqToDB.Mapping;
using TradeUsedSale.Enums;
namespace TradeUsedSale.Repositories.Models
{
public class DT_OrderUsedSale
{
[PrimaryKey, Identity] public int Id { get; set; }
/// <summary>
/// 跟踪号
/// </summary>
public string TrackingCode { get; set; }
/// <summary>
/// 订单Id
/// </summary>
public int OrderId { get; set; }
/// <summary>
/// 订单号
/// </summary>
public string OrderCode { get; set; }
/// <summary>
/// SKU ID
/// </summary>
public int GoodsId { get; set; }
/// <summary>
/// SKU Code
/// </summary>
public string GoodsCode { get; set; }
/// <summary>
/// 数量
/// </summary>
public int Quantity { get; set; }
/// <summary>
/// 仓库
/// </summary>
public WarehouseLocation WarehouseLocation { get; set; }
/// <summary>
/// 库位编码
/// </summary>
public string WarehousePositionCode { get; set; }
/// <summary>
/// 扫描时间
/// </summary>
public DateTime ScanTime { get; set; }
/// <summary>
/// 扫描人
/// </summary>
public int ScanUserId { get; set; }
/// <summary>
/// 图片信息
/// </summary>
public string ImageUrls { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreationTime { get; set; }
/// <summary>
/// 创建人
/// </summary>
public int CreatorId { get; set; }
}
}

@ -1,25 +1,20 @@
using System; using System;
using LinqToDB.Mapping; using LinqToDB.Mapping;
using TradeUsedSale.Enums;
namespace TradeUsedSale.Repositories.Models namespace TradeUsedSale.Repositories.Models
{ {
/// <summary> /// <summary>
/// 退货商品转二手商品 /// 二手销售商品录入记录
/// </summary> /// </summary>
public class DT_OrderReturnUsedSale public class DT_OrderUsedSaleEntry
{ {
[PrimaryKey, Identity] [PrimaryKey, Identity] public int Id { get; set; }
public int Id { get; set; }
/// <summary>
/// 退货订单Id
/// </summary>
public int OrderReturnId { get; set; }
/// <summary> /// <summary>
/// 订单Id /// 订单Id
/// </summary> /// </summary>
public int? OrderId { get; set; } public int OrderId { get; set; }
/// <summary> /// <summary>
/// 订单号 /// 订单号
@ -32,15 +27,25 @@ namespace TradeUsedSale.Repositories.Models
public int GoodsId { get; set; } public int GoodsId { get; set; }
/// <summary> /// <summary>
/// 综合的SKU编码(SKU中SKU1、SKU2、SKU3、SKU4的其中一个) /// SKU Code
/// </summary> /// </summary>
public string MerchantSku { get; set; } public string GoodsCode { get; set; }
/// <summary> /// <summary>
/// 数量 /// 数量
/// </summary> /// </summary>
public int Quantity { get; set; } public int Quantity { get; set; }
/// <summary>
/// 跟踪号
/// </summary>
public string TrackingCode { get; set; }
/// <summary>
/// 仓库
/// </summary>
public WarehouseLocation WarehouseLocation { get; set; }
/// <summary> /// <summary>
/// 创建时间 /// 创建时间
/// </summary> /// </summary>

@ -4,17 +4,11 @@ using TradeUsedSale.Enums;
namespace TradeUsedSale.Repositories.Models namespace TradeUsedSale.Repositories.Models
{ {
/// <summary> public class DT_OrderUsedSalePlatform
/// 二手商品明细
/// </summary>
public class DT_OrderReturnUsedSaleItem
{ {
[PrimaryKey, Identity] public int Id { get; set; } [PrimaryKey, Identity] public int Id { get; set; }
/// <summary> public int OrderUsedSaleId { get; set; }
/// 二手商品Id
/// </summary>
public int OrderReturnUsedSaleId { get; set; }
/// <summary> /// <summary>
/// 打印条码 /// 打印条码
@ -22,7 +16,7 @@ namespace TradeUsedSale.Repositories.Models
public string BarCode { get; set; } public string BarCode { get; set; }
/// <summary> /// <summary>
/// 是否已推送至电商平台 /// 是否已推送
/// </summary> /// </summary>
public bool IsPublished { get; set; } public bool IsPublished { get; set; }

@ -0,0 +1,222 @@
using System;
using LinqToDB.Mapping;
namespace TradeUsedSale.Repositories.Models
{
public class HW_GoodsDetail
{
[PrimaryKey, Identity] public int DetailId { get; set; }
public int? GoodsId { get; set; }
/// <summary>
/// 型号
/// </summary>
public string TypeCode { get; set; }
/// <summary>
/// 型号描述
/// </summary>
public string TypeDesc { get; set; }
/// <summary>
/// 速卖通sku
/// </summary>
public string SKU1 { get; set; }
/// <summary>
/// 亚马逊sku
/// </summary>
public string SKU2 { get; set; }
/// <summary>
/// Ebaysku
/// </summary>
public string SKU3 { get; set; }
/// <summary>
/// Wish sku
/// </summary>
public string SKU4 { get; set; }
/// <summary>
/// 暂留
/// </summary>
public string SKU5 { get; set; }
/// <summary>
/// 货物重量
/// </summary>
public decimal? Weight { get; set; }
/// <summary>
/// 是否自动分配订单
/// </summary>
public int? AutoPlan { get; set; }
/// <summary>
/// 是否断货
/// </summary>
public int? NoGoods { get; set; }
/// <summary>
/// 最小采购数量
/// </summary>
public int? MinBuyNum { get; set; }
/// <summary>
/// 货物实际剩余数量
/// </summary>
public int? GoodsNum { get; set; }
/// <summary>
/// 货物锁定数量(匹配锁定)
/// </summary>
public int? GoodsLockNum { get; set; }
/// <summary>
/// 货物计划购买数量
/// </summary>
public int? GoodsPlanNum { get; set; }
/// <summary>
/// 海外仓数量
/// </summary>
public int? GoodsOutNum { get; set; }
/// <summary>
/// 购买途中数量
/// </summary>
public int? GoodsInNum { get; set; }
/// <summary>
/// 商品价格
/// </summary>
public decimal? Price { get; set; }
/// <summary>
/// 图片id多个逗号隔开
/// </summary>
public string GoodsImageIds { get; set; }
/// <summary>
/// 列表页预览图片路径
/// </summary>
public string FirstImgUrl { get; set; }
/// <summary>
/// 修改日期
/// </summary>
public DateTime? UpdateDate { get; set; }
/// <summary>
/// 修改人
/// </summary>
public string UpdateName { get; set; }
/// <summary>
/// 货物备注
/// </summary>
public string GoodsRemark { get; set; }
public decimal? SaleDays { get; set; }
public decimal? AvgTime { get; set; }
/// <summary>
/// 安全库存
/// </summary>
public int? SafeNum { get; set; }
/// <summary>
/// 体积
/// </summary>
public decimal? Solid { get; set; }
public decimal? BGPrice { get; set; }
public string SKU6 { get; set; }
public string SKU7 { get; set; }
public string SKU8 { get; set; }
public string SKU9 { get; set; }
public string SKU10 { get; set; }
public int? GoodsHJNum { get; set; }
public int? GoodsHJNum2 { get; set; }
public int? GoodsHJNum3 { get; set; }
public int? GoodsHJNum4 { get; set; }
public int? GoodsInNum2 { get; set; }
public int? GoodsBackNum { get; set; }
public int? GoodsBackNum2 { get; set; }
public int? GoodsBackNum3 { get; set; }
public string SKU11 { get; set; }
public string SKU12 { get; set; }
public string SKU13 { get; set; }
public string SKU14 { get; set; }
public string SKU15 { get; set; }
public int? IsYC { get; set; }
public int? CGNum { get; set; }
public int? GoodsBackNum4 { get; set; }
public int? GoodsBackNum5 { get; set; }
public int? GoodsBackNum6 { get; set; }
public int? GoodsHJNum5 { get; set; }
public int? GoodsHJNum6 { get; set; }
public int? GoodsHJNum7 { get; set; }
public int? GoodsHJNum8 { get; set; }
public int? GoodsHJNum9 { get; set; }
public int? GoodsHJNum10 { get; set; }
public int? GoodsHJNum11 { get; set; }
public int? WestNum { get; set; }
public int? EastNum { get; set; }
public int? GoodsHJNum12 { get; set; }
public int? GoodsHJNum13 { get; set; }
public int? GoodsHJNum14 { get; set; }
public int? GoodsHJNum15 { get; set; }
public int? GoodsPlanNumE { get; set; }
public int? GoodsPlanNumW { get; set; }
public int? JHDays { get; set; }
public int? FHPlan { get; set; }
public int? CGNum2 { get; set; }
public int? CGNum3 { get; set; }
public string bhremark { get; set; }
public int? BHNum1 { get; set; }
public int? BHNum2 { get; set; }
public DateTime? JH_Date { get; set; }
public int? BHNum3 { get; set; }
public bool? IsSP { get; set; }
public int? SalesType { get; set; }
public decimal? GoodsMonthHJPrice { get; set; }
public decimal? GoodsWeekHJPrice { get; set; }
public int? GoodsWeekHJNum { get; set; }
/// <summary>
/// w海外在途金额
/// </summary>
public decimal? GoodsHJNum14Price { get; set; }
/// <summary>
/// E海外在途金额
/// </summary>
public decimal? GoodsHJNum15Price { get; set; }
/// <summary>
/// w仓库存金额
/// </summary>
public decimal? WestNumPrice { get; set; }
/// <summary>
/// E仓库存金额
/// </summary>
public decimal? EastNumPrice { get; set; }
public int? NBHJNum { get; set; }
/// <summary>
/// 宁波仓库存合计金额
/// </summary>
public decimal? NBHJNumPrice { get; set; }
public int? GoodsHJNum_FBA { get; set; }
/// <summary>
/// 拣货扫描条形码
/// </summary>
public string Barcode { get; set; }
}
}

@ -46,11 +46,16 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Enums\ShippingMethod.cs" /> <Compile Include="Enums\ShippingMethod.cs" />
<Compile Include="Enums\WarehouseLocation.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Repositories\ErpDbContext.cs" /> <Compile Include="Repositories\ErpDbContext.cs" />
<Compile Include="Repositories\Models\DT_OrderGoods.cs" />
<Compile Include="Repositories\Models\DT_OrderInfo.cs" />
<Compile Include="Repositories\Models\DT_OrderReturn.cs" /> <Compile Include="Repositories\Models\DT_OrderReturn.cs" />
<Compile Include="Repositories\Models\DT_OrderReturnUsedSale.cs" /> <Compile Include="Repositories\Models\DT_OrderUsedSale.cs" />
<Compile Include="Repositories\Models\DT_OrderReturnUsedSaleItem.cs" /> <Compile Include="Repositories\Models\DT_OrderUsedSaleEntry.cs" />
<Compile Include="Repositories\Models\DT_OrderUsedSalePlatform.cs" />
<Compile Include="Repositories\Models\HW_GoodsDetail.cs" />
<Compile Include="Repositories\Utils\ExpressionExtensions.cs" /> <Compile Include="Repositories\Utils\ExpressionExtensions.cs" />
<Compile Include="Repositories\Utils\LinqToDbExtensions.cs" /> <Compile Include="Repositories\Utils\LinqToDbExtensions.cs" />
<Compile Include="Repositories\Utils\ParameterRebinder.cs" /> <Compile Include="Repositories\Utils\ParameterRebinder.cs" />

Loading…
Cancel
Save