diff --git a/Reportapi/MyCode.Project.Domain/Message/Request/JackYun/StorageGoodsDocOutV2Request.cs b/Reportapi/MyCode.Project.Domain/Message/Request/JackYun/StorageGoodsDocOutV2Request.cs
index 7fc208e..6dfe17f 100644
--- a/Reportapi/MyCode.Project.Domain/Message/Request/JackYun/StorageGoodsDocOutV2Request.cs
+++ b/Reportapi/MyCode.Project.Domain/Message/Request/JackYun/StorageGoodsDocOutV2Request.cs
@@ -13,6 +13,12 @@ namespace MyCode.Project.Domain.Message.Request.JackYun
///
public class StorageGoodsDocOutV2Request : BaseRequestBizData
{
+
+ ///
+ /// 上下文编号
+ ///
+ public string contextId { get; set; }
+
///
/// 分页页码
///
diff --git a/Reportapi/MyCode.Project.Domain/Message/Response/JackYun/BusiOrderGoodsDocInSummary.cs b/Reportapi/MyCode.Project.Domain/Message/Response/JackYun/BusiOrderGoodsDocInSummary.cs
new file mode 100644
index 0000000..1f6e0e8
--- /dev/null
+++ b/Reportapi/MyCode.Project.Domain/Message/Response/JackYun/BusiOrderGoodsDocInSummary.cs
@@ -0,0 +1,102 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace MyCode.Project.Domain.Message.Response.JackYun
+{
+ public class BusiOrderGoodsDocInSummary
+ {
+ ///
+ /// 出入库日期
+ ///
+ public DateTime InOutDate2 { get; set; }
+
+ ///
+ /// 仓库编码
+ ///
+ public string WarehouseCode { get; set; }
+
+ ///
+ /// 仓库名称
+ ///
+ public string WarehouseName { get; set; }
+
+ ///
+ /// 商品编码
+ ///
+ public string GoodsNo { get; set; }
+
+ ///
+ /// 商品名称
+ ///
+ public string GoodsName { get; set; }
+
+ ///
+ /// 规格
+ ///
+ public string SkuName { get; set; }
+
+ ///
+ /// 单位
+ ///
+ public string UnitName { get; set; }
+
+ ///
+ /// 条码
+ ///
+ public string SkuBarcode { get; set; }
+
+ ///
+ /// 总数量
+ ///
+ public decimal Quantity { get; set; }
+
+ ///
+ /// 总入库金额
+ ///
+ public decimal BaceCurrencyCostAmount { get; set; }
+
+ ///
+ /// 总本币无税金额
+ ///
+ public decimal BaceCurrencyNoTaxAmount { get; set; }
+
+ ///
+ /// 总本币含税金额
+ ///
+ public decimal BaceCurrencyWithTaxAmount { get; set; }
+
+ ///
+ /// 总本币税额
+ ///
+ public decimal BaceCurrencyTaxAmount { get; set; }
+
+ ///
+ /// 总原币无税金额
+ ///
+ public decimal TransNoTaxAmount { get; set; }
+
+ ///
+ /// 总原币含税金额
+ ///
+ public decimal TransHasTaxAmount { get; set; }
+
+ ///
+ /// 总原币税额
+ ///
+ public decimal TransTaxAmount { get; set; }
+
+ ///
+ /// 入库单数
+ ///
+ public int OrderCount { get; set; }
+
+ ///
+ /// 明细行数
+ ///
+ public int DetailCount { get; set; }
+ }
+
+}
\ No newline at end of file
diff --git a/Reportapi/MyCode.Project.Domain/Model/PushKingDeeGoodsDocIn.cs b/Reportapi/MyCode.Project.Domain/Model/PushKingDeeGoodsDocIn.cs
new file mode 100644
index 0000000..bc65186
--- /dev/null
+++ b/Reportapi/MyCode.Project.Domain/Model/PushKingDeeGoodsDocIn.cs
@@ -0,0 +1,314 @@
+using System;
+using System.Linq;
+using System.Text;
+using SqlSugar;
+
+namespace MyCode.Project.Domain.Model
+{
+ ///
+ ///
+ ///
+ [SugarTable("PushKingDeeGoodsDocIn")]
+ public partial class PushKingDeeGoodsDocIn
+ {
+ public PushKingDeeGoodsDocIn(){
+
+
+ }
+ ///
+ /// Desc:
+ /// Default:newid()
+ /// Nullable:False
+ ///
+ [SugarColumn(IsPrimaryKey=true)]
+ public Guid ID {get;set;}
+
+ ///
+ /// Desc:出入库单号
+ /// Default:
+ /// Nullable:True
+ ///
+ public string GoodsdocNo {get;set;}
+
+ ///
+ /// Desc:出入库日期
+ /// Default:
+ /// Nullable:True
+ ///
+ public DateTime? InOutDate2 {get;set;}
+
+ ///
+ /// Desc:系统出入库日期
+ /// Default:
+ /// Nullable:True
+ ///
+ public DateTime? GmtCreate2 {get;set;}
+
+ ///
+ /// Desc:入库类型
+ /// Default:
+ /// Nullable:True
+ ///
+ public string InouttypeName {get;set;}
+
+ ///
+ /// Desc:仓库名称
+ /// Default:
+ /// Nullable:True
+ ///
+ public string WarehouseName {get;set;}
+
+ ///
+ /// Desc:币种
+ /// Default:
+ /// Nullable:True
+ ///
+ public string CurrencyCode {get;set;}
+
+ ///
+ /// Desc:币种名称
+ /// Default:
+ /// Nullable:True
+ ///
+ public string CurrencyCodeName {get;set;}
+
+ ///
+ /// Desc:汇率
+ /// Default:
+ /// Nullable:True
+ ///
+ public decimal? CurrencyRate {get;set;}
+
+ ///
+ /// Desc:操作人
+ /// Default:
+ /// Nullable:True
+ ///
+ public string CreateUserName {get;set;}
+
+ ///
+ /// Desc:公司
+ /// Default:
+ /// Nullable:True
+ ///
+ public string CompanyName {get;set;}
+
+ ///
+ /// Desc:往来单位
+ /// Default:
+ /// Nullable:True
+ ///
+ public string VendCustomerName {get;set;}
+
+ ///
+ /// Desc:回传状态:0未回传;1回传失败;10不回传;11已回传
+ /// Default:
+ /// Nullable:True
+ ///
+ public string CallbackStatus {get;set;}
+
+ ///
+ /// Desc:申请公司
+ /// Default:
+ /// Nullable:True
+ ///
+ public string ApplyCompanyName {get;set;}
+
+ ///
+ /// Desc:申请部门
+ /// Default:
+ /// Nullable:True
+ ///
+ public string ApplyDepartName {get;set;}
+
+ ///
+ /// Desc:申请人
+ /// Default:
+ /// Nullable:True
+ ///
+ public string ApplyUserName {get;set;}
+
+ ///
+ /// Desc:渠道
+ /// Default:
+ /// Nullable:True
+ ///
+ public string ChannelName {get;set;}
+
+ ///
+ /// Desc:货品编号
+ /// Default:
+ /// Nullable:True
+ ///
+ public string GoodsNo {get;set;}
+
+ ///
+ /// Desc:货品名称
+ /// Default:
+ /// Nullable:True
+ ///
+ public string GoodsName {get;set;}
+
+ ///
+ /// Desc:规格
+ /// Default:
+ /// Nullable:True
+ ///
+ public string SkuName {get;set;}
+
+ ///
+ /// Desc:条码
+ /// Default:
+ /// Nullable:True
+ ///
+ public string SkuBarcode {get;set;}
+
+ ///
+ /// Desc:单位
+ /// Default:
+ /// Nullable:True
+ ///
+ public string UnitName {get;set;}
+
+ ///
+ /// Desc:数量
+ /// Default:
+ /// Nullable:True
+ ///
+ public decimal? Quantity {get;set;}
+
+ ///
+ /// Desc:入库价
+ /// Default:
+ /// Nullable:True
+ ///
+ public decimal? BaceCurrencyCostPrice {get;set;}
+
+ ///
+ /// Desc:入库金额
+ /// Default:
+ /// Nullable:True
+ ///
+ public decimal? BaceCurrencyCostAmount {get;set;}
+
+ ///
+ /// Desc:本币无税单价
+ /// Default:
+ /// Nullable:True
+ ///
+ public decimal? BaceCurrencyNoTaxPrice {get;set;}
+
+ ///
+ /// Desc:本币无税金额
+ /// Default:
+ /// Nullable:True
+ ///
+ public decimal? BaceCurrencyNoTaxAmount {get;set;}
+
+ ///
+ /// Desc:本币含税单价
+ /// Default:
+ /// Nullable:True
+ ///
+ public decimal? BaceCurrencyWithTaxPrice {get;set;}
+
+ ///
+ /// Desc:本币含税金额
+ /// Default:
+ /// Nullable:True
+ ///
+ public decimal? BaceCurrencyWithTaxAmount {get;set;}
+
+ ///
+ /// Desc:baceCurrencyTaxAmount
+ /// Default:
+ /// Nullable:True
+ ///
+ public decimal? BaceCurrencyTaxAmount {get;set;}
+
+ ///
+ /// Desc:税率
+ /// Default:
+ /// Nullable:True
+ ///
+ public decimal? TaxRate {get;set;}
+
+ ///
+ /// Desc:原币无税单价
+ /// Default:
+ /// Nullable:True
+ ///
+ public decimal? TransNoTaxPrice {get;set;}
+
+ ///
+ /// Desc:原币无税金额
+ /// Default:
+ /// Nullable:True
+ ///
+ public decimal? TransNoTaxAmount {get;set;}
+
+ ///
+ /// Desc:原币含税单价
+ /// Default:
+ /// Nullable:True
+ ///
+ public decimal? TransHasTaxPrice {get;set;}
+
+ ///
+ /// Desc:原币含税金额
+ /// Default:
+ /// Nullable:True
+ ///
+ public decimal? TransHasTaxAmount {get;set;}
+
+ ///
+ /// Desc:原币税额
+ /// Default:
+ /// Nullable:True
+ ///
+ public decimal? TransTaxAmount {get;set;}
+
+ ///
+ /// Desc:正次品 1-正品 0-次品
+ /// Default:
+ /// Nullable:True
+ ///
+ public byte? IsCertified {get;set;}
+
+ ///
+ /// Desc:往来单位code
+ /// Default:
+ /// Nullable:True
+ ///
+ public string VendCode {get;set;}
+
+ ///
+ /// Desc:仓库code
+ /// Default:
+ /// Nullable:True
+ ///
+ public string WarehouseCode {get;set;}
+
+ ///
+ /// Desc:创建时间
+ /// Default:DateTime.Now
+ /// Nullable:False
+ ///
+ public DateTime CreateTime {get;set;}
+
+ ///
+ /// Desc:更新时间
+ /// Default:
+ /// Nullable:True
+ ///
+ public DateTime? UpdateTime {get;set;}
+
+ ///
+ /// Desc:0=未处理 1=已合并 2=已推送
+ /// Default:0
+ /// Nullable:True
+ ///
+ public int? Status {get;set;}
+
+ }
+}
diff --git a/Reportapi/MyCode.Project.Domain/MyCode.Project.Domain.csproj b/Reportapi/MyCode.Project.Domain/MyCode.Project.Domain.csproj
index 540ecc6..de3d4c4 100644
--- a/Reportapi/MyCode.Project.Domain/MyCode.Project.Domain.csproj
+++ b/Reportapi/MyCode.Project.Domain/MyCode.Project.Domain.csproj
@@ -81,6 +81,7 @@
+
@@ -102,6 +103,7 @@
+
@@ -115,6 +117,7 @@
+
diff --git a/Reportapi/MyCode.Project.Domain/Repositories/IPushKingDeeGoodsDocInRepository.cs b/Reportapi/MyCode.Project.Domain/Repositories/IPushKingDeeGoodsDocInRepository.cs
new file mode 100644
index 0000000..6047f2a
--- /dev/null
+++ b/Reportapi/MyCode.Project.Domain/Repositories/IPushKingDeeGoodsDocInRepository.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 IPushKingDeeGoodsDocInRepository : IRepository
+ {
+
+ }
+}
diff --git a/Reportapi/MyCode.Project.Repositories/BusiOrderGoodsDocInRepository.cs b/Reportapi/MyCode.Project.Repositories/BusiOrderGoodsDocInRepository.cs
index 9e885b4..aa1a4c4 100644
--- a/Reportapi/MyCode.Project.Repositories/BusiOrderGoodsDocInRepository.cs
+++ b/Reportapi/MyCode.Project.Repositories/BusiOrderGoodsDocInRepository.cs
@@ -9,6 +9,7 @@ using MyCode.Project.Domain.Model;
using MyCode.Project.Domain.Repositories;
using MyCode.Project.Infrastructure.Common;
using MyCode.Project.Infrastructure.Search;
+using MyCode.Project.Domain.Message.Response.JackYun;
namespace MyCode.Project.Repositories
{
@@ -17,10 +18,74 @@ namespace MyCode.Project.Repositories
public BusiOrderGoodsDocInRepository(MyCodeSqlSugarClient context) : base(context)
{ }
-
+
+// SELECT
+// -- 分组字段
+// CONVERT(date, InOutDate2) AS 出入库日期,
+// WarehouseCode AS 仓库编码,
+// WarehouseName AS 仓库名称,
+// GoodsNo AS 商品编码,
+// GoodsName AS 商品名称,
+// SkuName AS 规格,
+// UnitName AS 单位,
+
+// -- 合计数据
+// SUM(Quantity) AS 总数量,
+// SUM(BaceCurrencyCostAmount) AS 总入库金额,
+// SUM(BaceCurrencyNoTaxAmount) AS 总本币无税金额,
+// SUM(BaceCurrencyWithTaxAmount) AS 总本币含税金额,
+// SUM(BaceCurrencyTaxAmount) AS 总本币税额,
+// SUM(TransNoTaxAmount) AS 总原币无税金额,
+// SUM(TransHasTaxAmount) AS 总原币含税金额,
+// SUM(TransTaxAmount) AS 总原币税额,
+
+// -- 计数统计
+// COUNT(DISTINCT GoodsdocNo) AS 入库单数,
+// COUNT(*) AS 明细行数
-
+//FROM[dbo].[BusiOrderGoodsDocIn]
+// WHERE Status IN(0) -- 根据业务需求调整状态筛选
+// GROUP BY
+// CONVERT(date, InOutDate2),
+// WarehouseCode,
+// WarehouseName,
+// GoodsNo,
+// GoodsName,
+// SkuName,
+// UnitName
+//ORDER BY
+// CONVERT(date, InOutDate2) DESC,
+// WarehouseCode,
+// GoodsNo;
- }
+ #region GetPushOrder(获取合并后的吉客云订单)
+ ///
+ /// 获取合并后的吉客云订单
+ ///
+ ///
+ public List GetPushReturnOrder()
+ {
+ string sql = $@"
+ SELECT [shopCode], [shopName], [shopId], [warehouseName], [warehouseCode],
+ [status], CONVERT(NVARCHAR(30),[consignTime],23) [consignTime],
+ [goodsNo], [goodsId],SUM([sellTotal]*-1) [sellTotal],
+ SUM([returnCount]*-1) [sellCount], SUM([ShareShouldReturnFee]*-1) AS [divideSellTotal],
+ [barcode], [TradeType] ,[warehouseId],Unit
+FROM [JackOrders] a WITH (NOLOCK)
+ LEFT JOIN [dbo].[ReturnChangeGoodsDetail] b WITH (NOLOCK)
+ ON a.id = b.JackOrdersId
+WHERE a.status = 0 and [TradeType]=8 and returnCount <> 0
+GROUP BY [shopCode],[shopName], [shopId], [warehouseName], [warehouseCode], [status], CONVERT(NVARCHAR(30),[consignTime],23) ,[goodsNo],
+[goodsId], [barcode] ,[warehouseId], [TradeType],Unit
+ORDER BY [shopCode],[consignTime] desc,[TradeType]
+";
+ var list = this.SelectList(sql);
+ return list;
+ }
+ #endregion
+
+
+
+ }
}
\ No newline at end of file
diff --git a/Reportapi/MyCode.Project.Repositories/MyCode.Project.Repositories.csproj b/Reportapi/MyCode.Project.Repositories/MyCode.Project.Repositories.csproj
index ecfc0d6..79764b6 100644
--- a/Reportapi/MyCode.Project.Repositories/MyCode.Project.Repositories.csproj
+++ b/Reportapi/MyCode.Project.Repositories/MyCode.Project.Repositories.csproj
@@ -90,6 +90,7 @@
+
diff --git a/Reportapi/MyCode.Project.Repositories/PushKingDeeGoodsDocInRepository.cs b/Reportapi/MyCode.Project.Repositories/PushKingDeeGoodsDocInRepository.cs
new file mode 100644
index 0000000..006d7a4
--- /dev/null
+++ b/Reportapi/MyCode.Project.Repositories/PushKingDeeGoodsDocInRepository.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 PushKingDeeGoodsDocInRepository: Repository, IPushKingDeeGoodsDocInRepository
+ {
+ public PushKingDeeGoodsDocInRepository(MyCodeSqlSugarClient context) : base(context)
+ { }
+
+
+
+
+
+
+ }
+}
\ No newline at end of file
diff --git a/Reportapi/MyCode.Project.Services/Implementation/JackYunService.cs b/Reportapi/MyCode.Project.Services/Implementation/JackYunService.cs
index 77980c4..594bae1 100644
--- a/Reportapi/MyCode.Project.Services/Implementation/JackYunService.cs
+++ b/Reportapi/MyCode.Project.Services/Implementation/JackYunService.cs
@@ -411,6 +411,7 @@ namespace MyCode.Project.Services.Implementation
trades.AddRange(list1.Data);
requestBizData.PageIndex = pageIndex;
+ requestBizData.contextId = TotalResults;
pageIndex++;
Thread.Sleep(100);
response = Call(EnumAttribute.GetAttribute(ApiEnum.ERPSTORAGEGOODSDOCOUTV2).Value, "1.0", requestBizData);
@@ -468,9 +469,9 @@ namespace MyCode.Project.Services.Implementation
//}).ToList();
- //return reslut;
+ return trades;
+
- return new List();
}
#endregion
}
diff --git a/Reportapi/MyCode.Project.WebApi/Web.config b/Reportapi/MyCode.Project.WebApi/Web.config
index 87d7b74..1462a6e 100644
--- a/Reportapi/MyCode.Project.WebApi/Web.config
+++ b/Reportapi/MyCode.Project.WebApi/Web.config
@@ -22,9 +22,9 @@
-
+
-
+