1
This commit is contained in:
286
Reportapi/MyCode.Project.Domain/Model/ReturnChangeGoodsDetail.cs
Normal file
286
Reportapi/MyCode.Project.Domain/Model/ReturnChangeGoodsDetail.cs
Normal file
@@ -0,0 +1,286 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using SqlSugar;
|
||||
|
||||
namespace MyCode.Project.Domain.Model
|
||||
{
|
||||
///<summary>
|
||||
///退换货商品明细表(记录售后订单中的商品变更详情)
|
||||
///</summary>
|
||||
[SugarTable("ReturnChangeGoodsDetail")]
|
||||
public partial class ReturnChangeGoodsDetail
|
||||
{
|
||||
public ReturnChangeGoodsDetail(){
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// Desc:主键(GUID格式)
|
||||
/// Default:newid()
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey=true)]
|
||||
public Guid Id {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:售后订单ID(关联售后主表)
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public long TradeAfterId {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:子订单ID(关联销售明细)
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public long SubTradeId {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:商品基础信息ID(关联商品主表)
|
||||
/// Default:
|
||||
/// Nullable:False
|
||||
/// </summary>
|
||||
public long GoodsId {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:商品系统编号(唯一业务标识)
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string GoodsNo {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:商品全称(显示名称)
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string GoodsName {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:规格ID(关联规格表)
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public long? SpecId {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:规格组合名称(如:颜色:红;尺寸:XL)
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string SpecName {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:计量单位(如:件、KG等)
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string Unit {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:销售单价(含税,单位:元)
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public decimal? Price {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:原始销售数量(单位与Unit字段一致)
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public decimal? SellCount {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:售后原因详细描述
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string ReasonDesc {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:申请退货数量(可含小数)
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public decimal? ReturnCount {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:实际退货金额(=退货数量*单价-退货优惠)
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public decimal? ReturnFee {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:补发商品数量
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public decimal? SendCount {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:退货部分享受的优惠金额
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public decimal? ReturnDiscounts {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:补发部分享受的优惠金额
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public decimal? SendDiscounts {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:补发商品总金额
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public decimal? SendFee {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:理论应退金额(未计算分摊)
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public decimal? ShouldReturnFee {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:处理备注信息
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string Remark {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:商品特性标记(1-7分别对应定制/虚拟/卡券/代销/预售/序列号/需安装)
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public int? GoodsAttribute {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:最后修改时间(格式:yyyy-MM-dd HH:mm:ss)
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string GmtModified {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:记录创建时间(格式:yyyy-MM-dd HH:mm)
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string GmtCreate {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:商品条码(国际标准条码)
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string Barcode {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:销售总金额(=单价*数量)
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public decimal? SellTotal {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:实际退货数量(仓库验收后)
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public decimal? DeliveryCount {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:组合装标识(1=是组合装子商品)
|
||||
/// Default:0
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public int? IsFit {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:赠品标识(1=是赠品 0=正常商品)
|
||||
/// Default:0
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public int? IsGift {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:分摊后退货金额(含订单级优惠分摊)
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public decimal? ShareReturnFee {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:分摊后补发金额(含订单级优惠分摊)
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public decimal? ShareSendFee {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:最终应退金额(含所有优惠和运费分摊)
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public decimal? ShareShouldReturnFee {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:货品批次信息(JSON格式存储)
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string GoodsBatchInfoList {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:电商平台子订单编号(如淘宝子订单号)
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string SourceSubtradeNo {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:次品数量描述(如:5件破损)
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string DefectiveAmount {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:品牌名称
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string BrandName {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:商品唯一序列号(用于高端商品追踪)
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string GoodsSerial {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:平台商品ID(第三方平台商品编码)
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public string PlatGoodsId {get;set;}
|
||||
|
||||
/// <summary>
|
||||
/// Desc:
|
||||
/// Default:
|
||||
/// Nullable:True
|
||||
/// </summary>
|
||||
public Guid? JackOrdersId {get;set;}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -99,6 +99,7 @@
|
||||
<Compile Include="Model\JackOrdersItem.cs" />
|
||||
<Compile Include="Model\PushKingDeeOrder.cs" />
|
||||
<Compile Include="Model\PushKingDeeOrderItem.cs" />
|
||||
<Compile Include="Model\ReturnChangeGoodsDetail.cs" />
|
||||
<Compile Include="Model\SysWorkprocess.cs" />
|
||||
<Compile Include="Model\WMStoJackyunInventoryMovementView1.cs" />
|
||||
<Compile Include="Model\YTKJTShopParameter.cs" />
|
||||
@@ -110,6 +111,7 @@
|
||||
<Compile Include="Repositories\IPushKingDeeOrderRepository.cs" />
|
||||
<Compile Include="Repositories\IRepository.cs" />
|
||||
<Compile Include="Repositories\IRepository`.cs" />
|
||||
<Compile Include="Repositories\IReturnChangeGoodsDetailRepository.cs" />
|
||||
<Compile Include="Repositories\ISysWorkprocessRepository.cs" />
|
||||
<Compile Include="Repositories\IWMStoJackyunInventoryMovementView1Repository.cs" />
|
||||
<Compile Include="Repositories\IYTKJTShopParameterRepository.cs" />
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using MyCode.Project.Infrastructure;
|
||||
using MyCode.Project.Domain;
|
||||
using MyCode.Project.Domain.Model;
|
||||
using MyCode.Project.Infrastructure.Common;
|
||||
using MyCode.Project.Domain.Message;
|
||||
|
||||
namespace MyCode.Project.Domain.Repositories
|
||||
{
|
||||
public interface IReturnChangeGoodsDetailRepository : IRepository<ReturnChangeGoodsDetail>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -75,7 +75,7 @@ namespace MyCode.Project.Infrastructure.JackYun
|
||||
/// <summary>
|
||||
/// 系统订单id
|
||||
/// </summary>
|
||||
public long TradeId { get; set; }
|
||||
public string TradeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 系统订单号
|
||||
@@ -313,7 +313,7 @@ namespace MyCode.Project.Infrastructure.JackYun
|
||||
public int SourceTradeStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 货品信息
|
||||
/// 退货货品信息
|
||||
/// </summary>
|
||||
public List<ReturnChangeGoodsDetail> ReturnChangeGoodsDetail { get; set; }
|
||||
|
||||
|
||||
@@ -193,9 +193,15 @@ namespace MyCode.Project.Infrastructure.JackYun
|
||||
/// </summary>
|
||||
public int apiType { get; set; }
|
||||
/// <summary>
|
||||
/// 货品详情
|
||||
/// 销售货品详情
|
||||
/// </summary>
|
||||
public List<GoodsDetailItem> goodsDetail { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 退货货品信息
|
||||
/// </summary>
|
||||
public List<ReturnChangeGoodsDetail> ReturnChangeGoodsDetail { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 系统编码
|
||||
/// </summary>
|
||||
|
||||
@@ -91,6 +91,7 @@
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="PushKingDeeOrderItemRepository.cs" />
|
||||
<Compile Include="PushKingDeeOrderRepository.cs" />
|
||||
<Compile Include="ReturnChangeGoodsDetailRepository.cs" />
|
||||
<Compile Include="SysWorkprocessRepository.cs" />
|
||||
<Compile Include="WMStoJackyunInventoryMovementView1Repository.cs" />
|
||||
<Compile Include="YTKJTShopParameterRepository.cs" />
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
using MyCode.Project.Repositories.Common;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using MyCode.Project.Domain.Message;
|
||||
using MyCode.Project.Domain.Model;
|
||||
using MyCode.Project.Domain.Repositories;
|
||||
using MyCode.Project.Infrastructure.Common;
|
||||
using MyCode.Project.Infrastructure.Search;
|
||||
|
||||
namespace MyCode.Project.Repositories
|
||||
{
|
||||
public class ReturnChangeGoodsDetailRepository: Repository<ReturnChangeGoodsDetail>, IReturnChangeGoodsDetailRepository
|
||||
{
|
||||
public ReturnChangeGoodsDetailRepository(MyCodeSqlSugarClient context) : base(context)
|
||||
{ }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -179,8 +179,8 @@ namespace MyCode.Project.Services.Implementation
|
||||
requestBizData.ShopIds = null; // new long[] { 378761130654261100, 378761130654261100 };
|
||||
List<int> TradeTypeList = new List<int>();
|
||||
TradeTypeList.Add(1005);
|
||||
|
||||
List<TradesItem> trades = new List<TradesItem>();
|
||||
List<TradesItem> reslut = new List<TradesItem>();
|
||||
List<ReturnChangeListResp> trades = new List<ReturnChangeListResp>();
|
||||
TradeTypeList.ForEach(ty =>
|
||||
{
|
||||
requestBizData.ProcessStatusList = ty.ToString();
|
||||
@@ -200,9 +200,9 @@ namespace MyCode.Project.Services.Implementation
|
||||
int TotalResults = list1.data.TotalResults;
|
||||
while (requestBizData.PageIndex* requestBizData.PageSize< TotalResults)
|
||||
{
|
||||
//list1.data.trades.ForEach(h => h.TradeType = ty);
|
||||
//list1.data.returnChangeList.ForEach(h => h.TradeType = ty);
|
||||
|
||||
//trades.AddRange(list1.data.trades);
|
||||
trades.AddRange(list1.data.returnChangeList);
|
||||
requestBizData.PageIndex = pageIndex;
|
||||
pageIndex++;
|
||||
Thread.Sleep(100);
|
||||
@@ -222,8 +222,46 @@ namespace MyCode.Project.Services.Implementation
|
||||
}
|
||||
});
|
||||
var shocodes = shopConfigs.Select(t => t.FSHOPCODE).ToList();
|
||||
trades = trades.Where(t => shocodes.Contains(t.shopCode)).ToList();
|
||||
return trades;
|
||||
trades = trades.Where(t => shocodes.Contains(t.ShopCode)).ToList();
|
||||
//reslut = trades.Select(t => new TradesItem { tradeId = t.TradeId, couponFee = 0, realFee = 0, shopCode = t.ShopCode ,orderNo=t.ReturnChangeNo, tradeNo =t.TradeNo
|
||||
//,isDelete=0, mainPostid=t.MainPostid,
|
||||
// companyName=t.CompanyName,
|
||||
// flagNames=t.FlagNames,
|
||||
// shopName=t.ShopName,
|
||||
// warehouseName=t.WarehouseName
|
||||
//}).ToList();
|
||||
|
||||
|
||||
|
||||
reslut = trades.Select(rc => new TradesItem
|
||||
{
|
||||
tradeId = rc.TradeId,
|
||||
couponFee = 0,
|
||||
realFee = 0,
|
||||
shopCode = rc.ShopCode,
|
||||
orderNo = rc.ReturnChangeNo,
|
||||
tradeNo = rc.TradeNo,
|
||||
isDelete = 0,
|
||||
mainPostid = rc.MainPostid,
|
||||
companyName = rc.CompanyName,
|
||||
flagNames = rc.FlagNames,
|
||||
shopName = rc.ShopName,
|
||||
warehouseName = rc.WarehouseName,
|
||||
warehouseCode = rc.WarehouseCode,
|
||||
logisticName = rc.LogisticName,
|
||||
shopId = rc.ShopId.ToString(),
|
||||
TradeType = 8, // 假设这是售后发货类型
|
||||
consignTime = !string.IsNullOrWhiteSpace(rc.ConsignTime) ? (DateTime?)DateTime.Parse(rc.ConsignTime) : null,
|
||||
payTime = null, // 可根据需要设置
|
||||
tradeStatus = int.Parse(rc.TradeAfterStatus), // 注意类型转换
|
||||
warehouseId = rc.WarehouseId.ToString(),
|
||||
shopTypeCode = "",
|
||||
apiType = -114, // 默认值
|
||||
ReturnChangeGoodsDetail = rc.ReturnChangeGoodsDetail
|
||||
}).ToList();
|
||||
|
||||
|
||||
return reslut;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -190,7 +190,7 @@ namespace MyCode.Project.Services.Implementation
|
||||
{
|
||||
DateTime runTime = DateTime.Parse(now);
|
||||
var list = _jackYunService.GetReturnChangeList(runTime);
|
||||
//SetOrder(list);
|
||||
SetOrder(list);
|
||||
//_workProcessService.Add<IJackYunTaskService>(this.MerchantId, "GetAndMergeJackYunOrder", "合并吉客云订单到新表", now, 1);
|
||||
}
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user