From f4c865ab2cb3a08a4c3fe9ba2334f98323eab3b7 Mon Sep 17 00:00:00 2001
From: liqionghai <1>
Date: Wed, 16 Jul 2025 14:41:39 +0800
Subject: [PATCH] 1
---
.../CreateAndStockinGetRequestBizData.cs | 114 ++++++++++++++++++
.../Response/JackYun/CreateAndStockinResp.cs | 67 ++++++++++
.../MyCode.Project.Domain.csproj | 9 +-
... => WMStoJackyunInventoryMovementView2.cs} | 6 +-
...ackyunInventoryMovementView2Repository.cs} | 3 +-
.../MyCode.Project.Repositories.csproj | 1 +
...JackyunInventoryMovementView1Repository.cs | 25 +++-
...JackyunInventoryMovementView1Repository.cs | 8 +-
.../IServices/IJackYunStockinService.cs | 35 ++++++
.../IServices/IWMSService.cs | 3 +-
.../Implementation/WMSService.cs | 4 +-
.../MyCode.Project.Services.csproj | 1 +
.../Program.cs | 2 +-
13 files changed, 262 insertions(+), 16 deletions(-)
create mode 100644 Reportapi/MyCode.Project.Domain/Message/Request/JackYun/CreateAndStockinGetRequestBizData.cs
create mode 100644 Reportapi/MyCode.Project.Domain/Message/Response/JackYun/CreateAndStockinResp.cs
rename Reportapi/MyCode.Project.Domain/ZHMDModel/{WMStoJackyunInventoryMovementView1.cs => WMStoJackyunInventoryMovementView2.cs} (95%)
rename Reportapi/MyCode.Project.Domain/ZHMDRepositories/{IWMStoJackyunInventoryMovementView1Repository.cs => IWMStoJackyunInventoryMovementView2Repository.cs} (82%)
create mode 100644 Reportapi/MyCode.Project.Services/IServices/IJackYunStockinService.cs
diff --git a/Reportapi/MyCode.Project.Domain/Message/Request/JackYun/CreateAndStockinGetRequestBizData.cs b/Reportapi/MyCode.Project.Domain/Message/Request/JackYun/CreateAndStockinGetRequestBizData.cs
new file mode 100644
index 0000000..f623384
--- /dev/null
+++ b/Reportapi/MyCode.Project.Domain/Message/Request/JackYun/CreateAndStockinGetRequestBizData.cs
@@ -0,0 +1,114 @@
+using MyCode.Project.Infrastructure.JackYun;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace MyCode.Project.Domain.Message.Request.JackYun
+{
+ public class CreateAndStockinGetRequestBizData : BaseRequestBizData
+ {
+ ///
+ /// 备注
+ ///
+ public String memo { get; set; }
+
+ ///
+ /// 来源,默认ERP
+ ///
+ public String source { get; set; }
+
+ ///
+ /// 制单人
+ ///
+ public String @operator { get; set; }
+
+ ///
+ /// 关联单据编号
+ /// 可随机,保证不重复即可
+ ///
+ public String relDataId { get; set; }
+
+ ///
+ /// 出库类型 101=采购入库 102=调拨入库 103=盘盈入库 104=其他入库
+ ///
+ public int inType { get; set; }
+
+ ///
+ /// 仓库code
+ ///
+ public String inWarehouseCode { get; set; }
+
+ ///
+ /// 申请人姓名
+ ///
+ public String applyUserName { get; set; }
+
+ ///
+ /// 入库申请单明细
+ ///
+ public List stockInDetailViews { get; set; }
+
+ /////
+ ///// 收发货人信息
+ /////
+ //public StockInExpressInfo stockInExpressInfo { get; set; }
+
+ ///
+ /// 申请人部门
+ ///
+ public String applyDepartName { get; set; }
+
+ ///
+ /// 申请时间
+ ///
+ public DateTime applyDate { get; set; }
+
+ }
+
+ public class StockInDetailViews
+ {
+
+ ///
+ /// 价格
+ ///
+ public decimal skuPrice { get; set; }
+
+ ///
+ /// 关联实际业务明细表的id
+ ///
+ public long relDetailId { get; set; }
+
+ ///
+ /// 规格id
+ ///
+ public long skuId { get; set; }
+
+ ///
+ /// 数量
+ ///
+ public decimal skuCount { get; set; }
+
+ ///
+ /// 货品编号
+ ///
+ public String goodsNo { get; set; }
+
+ ///
+ /// 计量单位名称
+ ///
+ public String unitName { get; set; }
+
+
+ ///
+ /// 是否正品
+ ///
+ public Byte isCertified { get; set; }
+
+ ///
+ /// 条形码
+ ///
+ public String skuBarcode { get; set; }
+ }
+}
diff --git a/Reportapi/MyCode.Project.Domain/Message/Response/JackYun/CreateAndStockinResp.cs b/Reportapi/MyCode.Project.Domain/Message/Response/JackYun/CreateAndStockinResp.cs
new file mode 100644
index 0000000..32a3a02
--- /dev/null
+++ b/Reportapi/MyCode.Project.Domain/Message/Response/JackYun/CreateAndStockinResp.cs
@@ -0,0 +1,67 @@
+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 CreateAndStockinResp
+ {
+ ///
+ /// [单据号]
+ ///
+ public string relDataId;
+
+ ///
+ /// [单据行号]
+ ///
+ public string relDetailId;
+
+ ///
+ /// [变动方向]
+ ///
+ public string type;
+
+ ///
+ /// [SKU]
+ ///
+ public string outSkuCode;
+
+ ///
+ /// [BARCODE]
+ ///
+ public string skuBarcode;
+
+ ///
+ /// [单位]
+ ///
+ public string unitName;
+
+ ///
+ /// [数量]
+ ///
+ public decimal skuCount;
+
+ ///
+ /// [仓库]
+ ///
+ public string inWarehouseCode;
+
+ ///
+ /// [过账日期]
+ ///
+ public DateTime applyDate;
+
+ ///
+ /// [备注]
+ ///
+ public string rowRemark;
+
+ ///
+ /// [status]
+ ///
+ public int status;
+
+ }
+}
diff --git a/Reportapi/MyCode.Project.Domain/MyCode.Project.Domain.csproj b/Reportapi/MyCode.Project.Domain/MyCode.Project.Domain.csproj
index 2bcf467..eb0e7ae 100644
--- a/Reportapi/MyCode.Project.Domain/MyCode.Project.Domain.csproj
+++ b/Reportapi/MyCode.Project.Domain/MyCode.Project.Domain.csproj
@@ -62,6 +62,7 @@
+
@@ -71,6 +72,7 @@
+
@@ -86,6 +88,7 @@
+
@@ -95,10 +98,12 @@
+
+
-
-
+
+
diff --git a/Reportapi/MyCode.Project.Domain/ZHMDModel/WMStoJackyunInventoryMovementView1.cs b/Reportapi/MyCode.Project.Domain/ZHMDModel/WMStoJackyunInventoryMovementView2.cs
similarity index 95%
rename from Reportapi/MyCode.Project.Domain/ZHMDModel/WMStoJackyunInventoryMovementView1.cs
rename to Reportapi/MyCode.Project.Domain/ZHMDModel/WMStoJackyunInventoryMovementView2.cs
index 387bf74..14bee09 100644
--- a/Reportapi/MyCode.Project.Domain/ZHMDModel/WMStoJackyunInventoryMovementView1.cs
+++ b/Reportapi/MyCode.Project.Domain/ZHMDModel/WMStoJackyunInventoryMovementView2.cs
@@ -8,10 +8,10 @@ namespace MyCode.Project.Domain.ZHMDModel
///
///
///
- [SugarTable("WMStoJackyun_InventoryMovement_View1")]
- public partial class WMStoJackyunInventoryMovementView1
+ [SugarTable("WMStoJackyun_InventoryMovement_View2")]
+ public partial class WMStoJackyunInventoryMovementView2
{
- public WMStoJackyunInventoryMovementView1(){
+ public WMStoJackyunInventoryMovementView2(){
}
diff --git a/Reportapi/MyCode.Project.Domain/ZHMDRepositories/IWMStoJackyunInventoryMovementView1Repository.cs b/Reportapi/MyCode.Project.Domain/ZHMDRepositories/IWMStoJackyunInventoryMovementView2Repository.cs
similarity index 82%
rename from Reportapi/MyCode.Project.Domain/ZHMDRepositories/IWMStoJackyunInventoryMovementView1Repository.cs
rename to Reportapi/MyCode.Project.Domain/ZHMDRepositories/IWMStoJackyunInventoryMovementView2Repository.cs
index e27d24d..f5c179e 100644
--- a/Reportapi/MyCode.Project.Domain/ZHMDRepositories/IWMStoJackyunInventoryMovementView1Repository.cs
+++ b/Reportapi/MyCode.Project.Domain/ZHMDRepositories/IWMStoJackyunInventoryMovementView2Repository.cs
@@ -8,10 +8,11 @@ using MyCode.Project.Domain;
using MyCode.Project.Domain.ZHMDModel;
using MyCode.Project.Infrastructure.Common;
using MyCode.Project.Domain.Message;
+using MyCode.Project.Domain.Model;
namespace MyCode.Project.Domain.Repositories.ZHMDRepositories
{
- public interface IWMStoJackyunInventoryMovementView1Repository
+ public interface IWMStoJackyunInventoryMovementView2Repository
{
List GetList(DateTime now);
diff --git a/Reportapi/MyCode.Project.Repositories/MyCode.Project.Repositories.csproj b/Reportapi/MyCode.Project.Repositories/MyCode.Project.Repositories.csproj
index 751c984..523df13 100644
--- a/Reportapi/MyCode.Project.Repositories/MyCode.Project.Repositories.csproj
+++ b/Reportapi/MyCode.Project.Repositories/MyCode.Project.Repositories.csproj
@@ -93,6 +93,7 @@
+
diff --git a/Reportapi/MyCode.Project.Repositories/WMStoJackyunInventoryMovementView1Repository.cs b/Reportapi/MyCode.Project.Repositories/WMStoJackyunInventoryMovementView1Repository.cs
index f85166f..3bedd94 100644
--- a/Reportapi/MyCode.Project.Repositories/WMStoJackyunInventoryMovementView1Repository.cs
+++ b/Reportapi/MyCode.Project.Repositories/WMStoJackyunInventoryMovementView1Repository.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,28 @@ namespace MyCode.Project.Repositories
public WMStoJackyunInventoryMovementView1Repository(MyCodeSqlSugarClient context) : base(context)
{ }
-
+ public List GetInventoryMovement()
+ {
+ string sql = $@"
+ SELECT [单据号] AS [relDataId]
+ ,[单据行号] AS [relDetailId]
+ ,[变动方向] AS [type]
+ ,[SKU] AS [outSkuCode]
+ ,[BARCODE] AS [skuBarcode]
+ ,[单位] AS [unitName]
+ ,[数量] AS [skuCount]
+ ,[仓库] AS [inWarehouseCode]
+ ,[过账日期] AS [applyDate]
+ ,[备注] AS [rowRemark]
+ ,[status] AS [status]
+ FROM [YunTong].[dbo].[WMStoJackyun_InventoryMovement_View1]
+ WHERE [status] = 0";
+ var list = this.SelectList(sql);
+ return list;
+ }
-
- }
+
+ }
}
\ No newline at end of file
diff --git a/Reportapi/MyCode.Project.Repositories/ZHMD/WMStoJackyunInventoryMovementView1Repository.cs b/Reportapi/MyCode.Project.Repositories/ZHMD/WMStoJackyunInventoryMovementView1Repository.cs
index 9c7dd36..beb445f 100644
--- a/Reportapi/MyCode.Project.Repositories/ZHMD/WMStoJackyunInventoryMovementView1Repository.cs
+++ b/Reportapi/MyCode.Project.Repositories/ZHMD/WMStoJackyunInventoryMovementView1Repository.cs
@@ -9,13 +9,15 @@ using MyCode.Project.Domain.ZHMDModel;
using MyCode.Project.Infrastructure.Common;
using MyCode.Project.Infrastructure.Search;
using MyCode.Project.Domain.Repositories.ZHMDRepositories;
+using MyCode.Project.Domain.Model;
namespace MyCode.Project.Repositories.ZHMD
{
- public class WMStoJackyunInventoryMovementView1Repository: WMSRepository,IWMStoJackyunInventoryMovementView1Repository
+ public class WMStoJackyunInventoryMovementView2Repository: WMSRepository,IWMStoJackyunInventoryMovementView2Repository
{
- public WMStoJackyunInventoryMovementView1Repository(WMSSqlSugarClient context) : base(context)
- { }
+ public WMStoJackyunInventoryMovementView2Repository(WMSSqlSugarClient context) : base(context)
+ {
+ }
diff --git a/Reportapi/MyCode.Project.Services/IServices/IJackYunStockinService.cs b/Reportapi/MyCode.Project.Services/IServices/IJackYunStockinService.cs
new file mode 100644
index 0000000..90e4e27
--- /dev/null
+++ b/Reportapi/MyCode.Project.Services/IServices/IJackYunStockinService.cs
@@ -0,0 +1,35 @@
+using MyCode.Project.Domain.Message.Response.JackYun;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace MyCode.Project.Services
+{
+ public interface IJackYunStockinService
+ {
+ /////
+ ///// 调度运行抓吉客云销售订单
+ /////
+ /////
+ //void TaskGetJackYunOrder(string now);
+
+ /////
+ ///// 合并吉客云订单到新表
+ /////
+ /////
+
+ //string GetAndMergeJackYunOrder(string now);
+
+
+ ///
+ /// 调度运行推送入库/出库申请
+ ///
+ ///
+ ///
+ void TaskSendInventoryMovement(DateTime now);
+
+ List GetInventoryMovement();
+ }
+}
diff --git a/Reportapi/MyCode.Project.Services/IServices/IWMSService.cs b/Reportapi/MyCode.Project.Services/IServices/IWMSService.cs
index 56dc424..ae6bade 100644
--- a/Reportapi/MyCode.Project.Services/IServices/IWMSService.cs
+++ b/Reportapi/MyCode.Project.Services/IServices/IWMSService.cs
@@ -1,4 +1,5 @@
-using MyCode.Project.Domain.ZHMDModel;
+using MyCode.Project.Domain.Model;
+using MyCode.Project.Domain.ZHMDModel;
using MyCode.Project.Repositories.Common;
using System;
using System.Collections.Generic;
diff --git a/Reportapi/MyCode.Project.Services/Implementation/WMSService.cs b/Reportapi/MyCode.Project.Services/Implementation/WMSService.cs
index 4ea6f3b..4b8081c 100644
--- a/Reportapi/MyCode.Project.Services/Implementation/WMSService.cs
+++ b/Reportapi/MyCode.Project.Services/Implementation/WMSService.cs
@@ -24,10 +24,10 @@ namespace MyCode.Project.Services.Implementation
DateTime startTime = DateTime.Parse("2025-06-01");
- private IWMStoJackyunInventoryMovementView1Repository _wMStoJackyunInventoryMovementView3Repository;
+ private IWMStoJackyunInventoryMovementView2Repository _wMStoJackyunInventoryMovementView3Repository;
private IRepository _repository;
private IWorkProcessService _workProcessService;
- public WMSService(IWMStoJackyunInventoryMovementView1Repository wMStoJackyunInventoryMovementView3Repository, IRepository repository
+ public WMSService(IWMStoJackyunInventoryMovementView2Repository wMStoJackyunInventoryMovementView3Repository, IRepository repository
, IWorkProcessService workProcessService)
{
_workProcessService = workProcessService;
diff --git a/Reportapi/MyCode.Project.Services/MyCode.Project.Services.csproj b/Reportapi/MyCode.Project.Services/MyCode.Project.Services.csproj
index 632ff7a..a9c365b 100644
--- a/Reportapi/MyCode.Project.Services/MyCode.Project.Services.csproj
+++ b/Reportapi/MyCode.Project.Services/MyCode.Project.Services.csproj
@@ -123,6 +123,7 @@
+
diff --git a/Reportapi/MyCode.Project.ZHMDGenerateCode/Program.cs b/Reportapi/MyCode.Project.ZHMDGenerateCode/Program.cs
index e4dbad8..286e862 100644
--- a/Reportapi/MyCode.Project.ZHMDGenerateCode/Program.cs
+++ b/Reportapi/MyCode.Project.ZHMDGenerateCode/Program.cs
@@ -19,7 +19,7 @@ namespace MyCode.Project.GenerateCode
//要生成的仓储和实体对象,不用整个库全部生成,只生成想要的就行
var listTalbeName = new List()
- { "WMStoJackyun_InventoryMovement_View1"};
+ { "WMStoJackyun_InventoryMovement_View2"};
using (var db = new WMSSqlSugarClient())
{