diff --git a/src/WMS.Web.Api/Controllers/ProductInventoryController.cs b/src/WMS.Web.Api/Controllers/ProductInventoryController.cs
new file mode 100644
index 00000000..5eb31ea1
--- /dev/null
+++ b/src/WMS.Web.Api/Controllers/ProductInventoryController.cs
@@ -0,0 +1,122 @@
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using System;
+using System.Threading.Tasks;
+using WMS.Web.Core.Dto.OutStock;
+using WMS.Web.Core.Dto.ProductInventory;
+using WMS.Web.Core.Dto.SingleData;
+using WMS.Web.Core.Internal.Results;
+using WMS.Web.Domain.Infrastructure;
+using WMS.Web.Domain.IService.Public;
+using WMS.Web.Domain.Services.Public;
+using WMS.Web.Domain.Values;
+using WMS.Web.Repositories;
+using WMS.Web.Core;
+using WMS.Web.Domain.IService;
+using WMS.Web.Domain.Options;
+using Google.Protobuf.WellKnownTypes;
+using WMS.Web.Domain.Services;
+using Microsoft.Extensions.Options;
+using System.Linq;
+using WMS.Web.Core.Dto;
+
+namespace WMS.Web.Api.Controllers
+{
+ ///
+ /// 成品仓即时库存
+ ///
+ [Route("api/[controller]")]
+ [ApiController]
+ public class ProductInventoryController : ControllerBase
+ {
+ private readonly ILoginService _loginService;
+ private readonly IBasicsRepositories _basicsRepositories;
+ private readonly IProductInventoryRepositories _repositories;
+ private readonly QiniuOptions _option;
+ private readonly IExportExcelService _exportExcelService;
+ private readonly IProductInventoryService _productInventoryService;
+ public ProductInventoryController(ILoginService loginService, IBasicsRepositories basicsRepositories,
+ IProductInventoryRepositories repositories, IOptions option,
+ IExportExcelService exportExcelServic, IProductInventoryService productInventoryService) {
+ _loginService = loginService;
+ _basicsRepositories = basicsRepositories;
+ _repositories = repositories;
+ _option = option?.Value;
+ _exportExcelService = exportExcelServic;
+ _productInventoryService = productInventoryService;
+ }
+
+ ///
+ /// 获取仓库
+ ///
+ /// 仓库模糊匹配 不必填
+ ///
+ [HttpGet]
+ [Route("GetUcStock")]
+ public async Task> GetUcStock([FromQuery] string name)
+ {
+ //var loginInfo = _loginService.GetLoginInfo(this.HttpContext.Request.Headers["Authorization"]);
+ //if (loginInfo == null || loginInfo.UserInfo == null)
+ // return ResultList.ReFailure(ResultCodes.Token_Invalid_Error);
+ var r = await _basicsRepositories.GetUcStockByHeadOfficeAsync(name, 1);
+ var response = r.Where(w => w.ManagementSystem == 1 || w.ManagementSystem == 4
+ || (w.ManagementSystem == 2 && !string.IsNullOrEmpty(w.WarehouseCodeOfJushuitan))
+ ||(w.ManagementSystem == 3 && !string.IsNullOrEmpty(w.WarehouseCodeOfLingxing))).ToList();
+ return ResultList.ReSuccess(r);
+ }
+
+ ///
+ /// 列表
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Route("GetList")]
+ public async Task> GetPagedList([FromBody] ProductInventoryQueryRequest dto)
+ {
+ //var loginInfo = _loginService.GetLoginInfo(this.HttpContext.Request.Headers["Authorization"]);
+ //if (loginInfo == null || loginInfo.UserInfo == null)
+ // return ResultPagedNumber2List.ReFailure(ResultCodes.Token_Invalid_Error);
+
+ var (list, count, details) = await _repositories.GetListAsync(dto);
+ var result = ResultPagedNumber2List.ReSuccess(list,count,details);
+ return result;
+ }
+ ///
+ /// 导出
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Route("Export")]
+ public Task> Export([FromBody] ProductInventoryQueryRequest dto)
+ {
+ var loginInfo = _loginService.GetLoginInfo(this.HttpContext.Request.Headers["Authorization"]);
+ if (loginInfo == null)
+ return Task.FromResult(Result.ReFailure(ResultCodes.Token_Invalid_Error));
+ string fileName = FileDownLoadOrderType.ProductInventory.GetRemark() + loginInfo.UserInfo.CompanyId + DateTime.Now.ToString("yyyyMMddHHmmss") + ".xlsx";
+ string res = _option.Url + fileName;
+
+ Task.Run(async () =>
+ {
+ await _exportExcelService.ExportList(dto, fileName, loginInfo.UserInfo.StaffId, loginInfo.UserInfo.CompanyId, FileDownLoadOrderType.ProductInventory);
+ });
+
+ return Task.FromResult(Result.ReSuccess(res));
+ }
+ ///
+ /// 刷新数据
+ ///
+ ///
+ [HttpPost]
+ [Route("Refresh")]
+ public async Task Refresh()
+ {
+ //var loginInfo = _loginService.GetLoginInfo(this.HttpContext.Request.Headers["Authorization"]);
+ //if (loginInfo == null || loginInfo.UserInfo == null)
+ // return Result.ReFailure(ResultCodes.Token_Invalid_Error);
+
+ return await _productInventoryService.Refresh();
+ }
+ }
+}
diff --git a/src/WMS.Web.Api/Controllers/TestController.cs b/src/WMS.Web.Api/Controllers/TestController.cs
index f9495ee9..68bc8c00 100644
--- a/src/WMS.Web.Api/Controllers/TestController.cs
+++ b/src/WMS.Web.Api/Controllers/TestController.cs
@@ -28,6 +28,10 @@ using System.Reflection;
using WMS.Web.Domain.Services;
using SkiaSharp;
using Google.Protobuf.Collections;
+using NPOI.SS.Formula.Functions;
+using System.Text.Json;
+using WMS.Web.Core.Dto.LingXing;
+using WMS.Web.Domain.Services.Public;
namespace WMS.Web.Api.Controllers
{
@@ -57,11 +61,16 @@ namespace WMS.Web.Api.Controllers
private readonly IMemoryCache _memoryCache;
private readonly IRedisConcurrentProcessService _redisConcurrentProcessService;
private IInStockService _inStockService;
+ private readonly ILingXingService _lingXingService;
+ private readonly IProductInventoryService _productInventoryService;
+ private readonly IJuShuiTanService _juShuiTanService;
+ private readonly IErpInventoryService _erpInventoryService;
public TestController(IErpService erpService, IInStockTaskService inStockTaskService, IBoxInventoryRepositories boxInventoryRepositories, IRedisConcurrentProcessService redisConcurrentProcessService,
IBasicsRepositories transactionRepositories, IOpsService opsService, IBoxService boxService, IBasicsRepositories basicsRepositories, IMemoryCache memoryCache,
IOutStockTaskRepositories outStockTaskRepositories, IOutStockTaskService outStockTaskService, IOptions options, ILoginService loginService, ISendMessageService sendMessageService,
ITakeStockService takeStockService, ITakeStockRepositories takeStockRepositories, IOutStockService outStockService, IInStockTaskRepositories inStockTaskRepositories,
- IWebHostEnvironment env, IMaterialService materialService, IOutStockRepositories outStockRepositories, IInStockService inStockService)
+ IWebHostEnvironment env, IMaterialService materialService, IOutStockRepositories outStockRepositories, IInStockService inStockService, ILingXingService lingXingService
+ , IProductInventoryService productInventoryService, IJuShuiTanService juShuiTanService, IErpInventoryService erpInventoryService)
{
_inStockService = inStockService;
_redisConcurrentProcessService = redisConcurrentProcessService;
@@ -85,12 +94,50 @@ namespace WMS.Web.Api.Controllers
_outStockService = outStockService;
_outStockRepositories = outStockRepositories;
_env = env;
+ _lingXingService = lingXingService;
+ _productInventoryService = productInventoryService;
+ _juShuiTanService = juShuiTanService;
+ _erpInventoryService = erpInventoryService;
}
[HttpGet]
[Route("hj")]
public async Task TestHJ()
{
+ ////var myJson = "{\"name\":\"小明\",\"address\":\"威海\"}";//json字符串
+ //var myJson= "{\"code\":\"200\",\"msg\":\"OK\",\"data\":{\"access_token\":\"05895ad6-e318-41da-9b2c-579dedd18fd1\",\"refresh_token\":\"ad9145cf-8af9-4617-9dbe-187b0ff3edf9\",\"expires_in\":7162}}";
+ //var myObj = JsonConvert.DeserializeObject(myJson);//反序列化为 dynamic 对象
+ //var my2 = System.Text.Json.JsonSerializer.Deserialize(myJson);
+ //string m = myObj.code;
+ //var m2 = my2.Object;
+ //var md = m2.code;
+
+ //var b33= await _juShuiTanService.GetStock();
+ // var bc = await _lingXingService.GetStock();
+
+ //List<(string orgCode, string stockCode)> request = new List<(string orgCode, string stockCode)>();
+ //request.Add(("101", "CK001"));
+ //request.Add(("101", "CK002"));
+ //var list = await _erpService.BillQueryForInventory(request);
+ //var b33 = await _juShuiTanService.GetStock();
+ //var b = b33.Data.Where(w => w.Id == 10923342).FirstOrDefault();
+ //await _juShuiTanService.GetTest();
+ //string codes = "AD";
+ //var b = await _erpInventoryService.GetInventory(new List() { "111"});
+ //int count = 10 / 5;
+ var bcd=await _productInventoryService.LingXing();
+
+ //LingXingResponse r = new LingXingResponse();
+
+ //string str = "{\"code\":0,\"message\":\"success\",\"error_details\":[],\"request_id\":\"7A739491-8740-01AC-304E-0203AF887AE2\",\"response_time\":\"2024-10-16 17:58:57\",\"data\":[{\"wid\":437,\"type\":1,\"name\":\"ORICO_OD\",\"is_delete\":0}],\"total\":1}";
+ //var ss=JsonConvert.DeserializeObject>(str);
+ //var b = System.Text.Json.JsonSerializer.Deserialize>(str);
+ //await _productInventoryService.LingXing();
+ //var s = await _lingXingService.GetSeller();
+ //var ns = s.Data.Where(w =>w.Id== "2101").ToList();
+ //string str = string.Join(",", s.Data.Select(s => s.Id).ToList());
+ //var sd= await _lingXingService.GetInventory(new LingXingInventoryRequest() { wid = "437" });
+ //string sdsdf = sd.Message;
//List list = new List();
//list.Add("GD-02-15");
//list.Add("GD-01-15");
diff --git a/src/WMS.Web.Api/appsettings.json b/src/WMS.Web.Api/appsettings.json
index 8d69e2a9..b80a9f8e 100644
--- a/src/WMS.Web.Api/appsettings.json
+++ b/src/WMS.Web.Api/appsettings.json
@@ -37,15 +37,27 @@
},
"ErpOptions": {
"EndpointAddress": "http://erp.orico.com.cn/k3cloud/ERPGW.asmx", //原:119.23.206.129
- "UserName": "mes", //测试账号密码 mes/A1B2C3Dh/ce20210909 正式账号密码 orico/A123321./Orico
+ "UserName": "mes", //测试账号密码 mes/A1B2C3Dh/ce20210909/6723b1acf19987 正式账号密码 orico/A123321./Orico/663a26829afbdd
"Password": "A1B2C3Dh.",
- "ErpId": "ce20210909"
+ "ErpId": "ce20210909",
+ "ZhangTaoId": "6723b1acf19987"
},
"OpsOptions": {
"Url": "https://api.opsscm.test.f2b211.com/", //https://api.opsscm.test.f2b211.com/
"UserName": "admin",
"PassWord": "888888"
},
+ "LingXingOptions": {
+ "Url": "https://openapi.lingxing.com",
+ "AppId": "ak_QGK2J8TssERmu",
+ "AppSecret": "n/HUKD2wVdTbvhnFZbVBPw=="
+ },
+ "JuShuiTanOptions": {
+ "Url": "https://openapi.jushuitan.com",
+ "AppKey": "17231841286c45f99eb9acf445404349",
+ "AppSecret": "5ce9641ae6db4abb8b96eea7df6a81e9",
+ "AccessToken": "4605358c37374780a8a4395e6cdb1c3f" //一年后过期(2025/10/18)
+ },
"Qiniu": {
"AccessKey": "dOsTum4a5qvhPTBbZRPX0pIOU7PZWRX7htKjztms",
"SecretKey": "KFxsGbnErkALFfeGdMa8QWTdodJbamMX0iznLe-q",
@@ -89,6 +101,7 @@
"JobStartExpreSend": "0 0 12,16,20 * * ?",
"JobStartExpreMaterial": "0 30 23 * * ?",
"JobStartErpDelete": "0 5 * * * ?",
+ "JobStartProductInventory": "0 0/30 * * * ?",
//a.是否启用集群:键和值
"JobStoreClusteredKey": "quartz.jobStore.clustered",
"JobStoreClusteredValue": true,
diff --git a/src/WMS.Web.Api/wwwroot/WMS.Web.Core.xml b/src/WMS.Web.Api/wwwroot/WMS.Web.Core.xml
index 7e714386..98db1f10 100644
--- a/src/WMS.Web.Api/wwwroot/WMS.Web.Core.xml
+++ b/src/WMS.Web.Api/wwwroot/WMS.Web.Core.xml
@@ -1006,15 +1006,25 @@
仓库
-
+
- 子仓库(跟金蝶交互字段)
+ 子仓库
+
+
+ 批号
+
+
-
- 数量
-
+
+ 可用量
+
+
+
+
+ 库存量
+
@@ -4199,6 +4209,197 @@
wms箱ID
+
+
+ 页码
+
+
+
+
+ 页条数
+
+
+
+
+ 仓库Id
+
+
+
+
+ 开始时间
+
+
+
+
+ 结算时间
+
+
+
+
+ 商品
+
+
+
+
+ 总量
+
+
+
+
+ 可用数:可用数[同步线上的库存数]=
+ 主仓实际库存-订单占有数+虚拟库存+采购在途(业务设置)+进货仓(业务设置)+销退仓库存(业务设置)
+
+
+
+
+ 订单占有数
+
+
+
+
+ 虚拟库存
+
+
+
+
+ 采购在途
+
+
+
+
+ 销退仓库存
+
+
+
+
+ 进货仓
+
+
+
+
+ 页码
+
+
+
+
+ 页条数
+
+
+
+
+ 仓库id
+
+
+
+
+ 仓库名
+
+
+
+
+ 领星即时库存
+
+
+
+
+ 仓库Id 1,3,234,33
+
+
+
+
+ 物料规格型号
+
+
+
+
+ 领星即时库存
+
+
+
+
+ 仓库Id
+
+
+
+
+ SKU
+
+
+
+
+ 店铺id
+
+
+
+
+ 库存总量
+
+
+
+
+ 可用量
+
+
+
+
+ 领星登录
+
+
+
+
+ id
+
+
+
+
+ Secret
+
+
+
+
+ 领星请求
+
+
+
+
+ 不是页码 是从第几条数据开始 如果是第二页的话 就是1*800
+
+
+
+
+ 页条数
+
+
+
+
+ 海外仓
+
+
+
+
+ 店铺信息
+
+
+
+
+ id
+
+
+
+
+ name
+
+
+
+
+ id
+
+
+
+
+ name
+
+
客户端名称
@@ -5914,6 +6115,86 @@
每页条数 不传默认每页10 条
+
+
+ 成品即时库存列表
+
+
+
+
+ 物料编码
+
+
+
+
+ 仓库编码
+
+
+
+
+ 客户/店铺
+
+
+
+
+ 成品即时库存
+
+
+
+
+ 单据Id
+
+
+
+
+ 单据类型
+
+
+
+
+ 物料编码
+
+
+
+
+ 物料规格型号
+
+
+
+
+ 物料名称
+
+
+
+
+ 仓库
+
+
+
+
+ 组织
+
+
+
+
+ 客户/店铺
+
+
+
+
+ 批号
+
+
+
+
+ 可用量
+
+
+
+
+ 库存量
+
+
客户编码
@@ -6204,6 +6485,31 @@
仓库名称
+
+
+ 根据总公司查仓库
+
+
+
+
+ 领星仓库编码
+
+
+
+
+ 聚水潭仓库编码
+
+
+
+
+ 用途 0 总公司
+
+
+
+
+ 管理系统 1 金蝶 2 聚水潭 3 领星 4WMS
+
+
仓库响应
@@ -7197,6 +7503,78 @@
+
+
+ 实体分页集合结果
+
+
+
+
+ 实体分页集合结果
+
+ 实体集合
+ 总条数
+
+
+
+ 实体分页集合结果
+
+
+
+
+
+
+
+ Total count of Items.
+
+
+
+
+ 总数量
+
+
+
+
+ 创建成功的返回消息
+
+ 实体集合
+ 总条数
+
+
+
+
+ 创建成功的返回消息
+
+
+
+
+
+ 创建返回信息(返回处理失败)
+
+ 结果消息
+ 结果状态
+
+
+
+
+ 创建返回信息(返回处理失败)
+
+ 结果消息
+
+
+
+
+ 创建返回信息(返回处理失败)
+
+ 结果
+
+
+
+
+ 转换为 task
+
+
+
分页列表结果对象
diff --git a/src/WMS.Web.Core/Dto/Erp/ErpInventoryDto.cs b/src/WMS.Web.Core/Dto/Erp/ErpInventoryDto.cs
index 39a786f7..173e7c87 100644
--- a/src/WMS.Web.Core/Dto/Erp/ErpInventoryDto.cs
+++ b/src/WMS.Web.Core/Dto/Erp/ErpInventoryDto.cs
@@ -1,4 +1,5 @@
-using System;
+using Newtonsoft.Json;
+using System;
using System.Collections.Generic;
using System.Text;
@@ -9,22 +10,37 @@ namespace WMS.Web.Core.Dto.Erp
///
/// 物料编码
///
+ [JsonProperty("FMATERIALNUMBER")]
public string MaterialNumber { get; set; }
///
/// 组织编码
///
+ [JsonProperty("FSTOCKORGNUMBER")]
public string OrgCode { get; set; }
///
/// 仓库
///
+ [JsonProperty("FSTOCKNUMBER")]
public string StockCode { get; set; }
///
- /// 子仓库(跟金蝶交互字段)
+ /// 子仓库
///
- public int Erp_SubStockId { get; set; }
+ [JsonProperty("FSTOCKLOC")]
+ public string Erp_SubStockName { get; set; }
///
- /// 数量
- ///
- public decimal Qty { get; set; }
+ /// 批号
+ ///
+ [JsonProperty("FLOTNUMBER")]
+ public string Batch { get; set; }
+ ///
+ /// 可用量
+ ///
+ [JsonProperty("FAVBQTY")]
+ public decimal Qty { get; set; } = 0;
+ ///
+ /// 库存量
+ ///
+ [JsonProperty("FQTY")]
+ public decimal BeforeQty { get; set; } = 0;
}
}
diff --git a/src/WMS.Web.Core/Dto/JuShuiTan/JuShuiTanInventoryRequst.cs b/src/WMS.Web.Core/Dto/JuShuiTan/JuShuiTanInventoryRequst.cs
new file mode 100644
index 00000000..591b36f5
--- /dev/null
+++ b/src/WMS.Web.Core/Dto/JuShuiTan/JuShuiTanInventoryRequst.cs
@@ -0,0 +1,36 @@
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace WMS.Web.Core.Dto.JuShuiTan
+{
+ public class JuShuiTanInventoryRequst
+ {
+ ///
+ /// 页码
+ ///
+ [JsonProperty("page_index")]
+ public int page_index { get; set; } = 1;
+ ///
+ /// 页条数
+ ///
+ [JsonProperty("page_size")]
+ public int page_size { get; set; } = 30;
+ ///
+ /// 仓库Id
+ ///
+ [JsonProperty("wms_co_id")]
+ public int wms_co_id { get; set; }
+ ///
+ /// 开始时间
+ ///
+ [JsonProperty("modified_begin")]
+ public string modified_begin { get; set; }
+ ///
+ /// 结算时间
+ ///
+ [JsonProperty("modified_end")]
+ public string modified_end { get; set; }
+ }
+}
diff --git a/src/WMS.Web.Core/Dto/JuShuiTan/JuShuiTanInventoryResponse.cs b/src/WMS.Web.Core/Dto/JuShuiTan/JuShuiTanInventoryResponse.cs
new file mode 100644
index 00000000..7b570426
--- /dev/null
+++ b/src/WMS.Web.Core/Dto/JuShuiTan/JuShuiTanInventoryResponse.cs
@@ -0,0 +1,55 @@
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Ubiety.Dns.Core.Common;
+
+namespace WMS.Web.Core.Dto.JuShuiTan
+{
+ public class JuShuiTanInventoryResponse
+ {
+ ///
+ /// 商品
+ ///
+ [JsonProperty("sku_id")]
+ public string sku_id { get; set; }
+ [JsonProperty("wms_co_id")]
+ public int wms_co_id { get; set; }
+ ///
+ /// 总量
+ ///
+ [JsonProperty("qty")]
+ public int? qty { get; set; }
+ ///
+ /// 可用数:可用数[同步线上的库存数]=
+ /// 主仓实际库存-订单占有数+虚拟库存+采购在途(业务设置)+进货仓(业务设置)+销退仓库存(业务设置)
+ ///
+ [JsonProperty("ky_qty")]
+ public int ky_qty { get; set; }
+ ///
+ /// 订单占有数
+ ///
+ [JsonProperty("order_lock")]
+ public int? order_lock { get; set; }
+ ///
+ /// 虚拟库存
+ ///
+ [JsonProperty("virtual_qty")]
+ public int? virtual_qty { get; set; }
+ ///
+ /// 采购在途
+ ///
+ [JsonProperty("purchase_qty")]
+ public int? purchase_qty { get; set; }
+ ///
+ /// 销退仓库存
+ ///
+ [JsonProperty("return_qty")]
+ public int? return_qty { get; set; }
+ ///
+ /// 进货仓
+ ///
+ [JsonProperty("in_qty")]
+ public int? in_qty { get; set; }
+ }
+}
diff --git a/src/WMS.Web.Core/Dto/JuShuiTan/JuShuiTanStockRequst.cs b/src/WMS.Web.Core/Dto/JuShuiTan/JuShuiTanStockRequst.cs
new file mode 100644
index 00000000..d18528a1
--- /dev/null
+++ b/src/WMS.Web.Core/Dto/JuShuiTan/JuShuiTanStockRequst.cs
@@ -0,0 +1,21 @@
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace WMS.Web.Core.Dto.JuShuiTan
+{
+ public class JuShuiTanStockRequst
+ {
+ ///
+ /// 页码
+ ///
+ [JsonProperty("page_index")]
+ public int page_index { get; set; } = 1;
+ ///
+ /// 页条数
+ ///
+ [JsonProperty("page_size")]
+ public int page_size { get; set; } = 30;
+ }
+}
diff --git a/src/WMS.Web.Core/Dto/JuShuiTan/JuShuiTanStockResResponse.cs b/src/WMS.Web.Core/Dto/JuShuiTan/JuShuiTanStockResResponse.cs
new file mode 100644
index 00000000..2f187e00
--- /dev/null
+++ b/src/WMS.Web.Core/Dto/JuShuiTan/JuShuiTanStockResResponse.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace WMS.Web.Core.Dto.JuShuiTan
+{
+ public class JuShuiTanStockResResponse
+ {
+ public int code { get; set; }
+ public string msg { get; set; }
+ public object data { get; set; }
+ }
+}
diff --git a/src/WMS.Web.Core/Dto/JuShuiTan/JuShuiTanStockResponse.cs b/src/WMS.Web.Core/Dto/JuShuiTan/JuShuiTanStockResponse.cs
new file mode 100644
index 00000000..3cfebdc3
--- /dev/null
+++ b/src/WMS.Web.Core/Dto/JuShuiTan/JuShuiTanStockResponse.cs
@@ -0,0 +1,21 @@
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace WMS.Web.Core.Dto.JuShuiTan
+{
+ public class JuShuiTanStockResponse
+ {
+ ///
+ /// 仓库id
+ ///
+ [JsonProperty("wms_co_id")]
+ public int Id { get; set; }
+ ///
+ /// 仓库名
+ ///
+ [JsonProperty("name")]
+ public string Name { get; set; }
+ }
+}
diff --git a/src/WMS.Web.Core/Dto/LingXing/LingXingInventoryRequest.cs b/src/WMS.Web.Core/Dto/LingXing/LingXingInventoryRequest.cs
new file mode 100644
index 00000000..9d770042
--- /dev/null
+++ b/src/WMS.Web.Core/Dto/LingXing/LingXingInventoryRequest.cs
@@ -0,0 +1,26 @@
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace WMS.Web.Core.Dto.LingXing
+{
+ ///
+ /// 领星即时库存
+ ///
+ [Serializable]
+ public class LingXingInventoryRequest:LingXingRequest
+ {
+ ///
+ /// 仓库Id 1,3,234,33
+ ///
+ [JsonProperty("wid")]
+ public string wid { get; set; }
+ ///
+ /// 物料规格型号
+ ///
+ [JsonProperty("sku")]
+ public string sku { get; set; }
+
+ }
+}
diff --git a/src/WMS.Web.Core/Dto/LingXing/LingXingInventoryResponse.cs b/src/WMS.Web.Core/Dto/LingXing/LingXingInventoryResponse.cs
new file mode 100644
index 00000000..030c15ba
--- /dev/null
+++ b/src/WMS.Web.Core/Dto/LingXing/LingXingInventoryResponse.cs
@@ -0,0 +1,41 @@
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace WMS.Web.Core.Dto.LingXing
+{
+ ///
+ /// 领星即时库存
+ ///
+ [Serializable]
+ public class LingXingInventoryResponse
+ {
+ ///
+ /// 仓库Id
+ ///
+ [JsonProperty("wid")]
+ public int StockId { get; set; }
+ ///
+ /// SKU
+ ///
+ [JsonProperty("sku")]
+ public string SKU { get; set; }
+ ///
+ /// 店铺id
+ ///
+ [JsonProperty("seller_id")]
+ public string SellerId { get; set; }
+ ///
+ /// 库存总量
+ ///
+ [JsonProperty("product_total")]
+ public decimal Product_Total { get; set; }
+ ///
+ /// 可用量
+ ///
+ [JsonProperty("product_valid_num")]
+ public decimal Product_Valid_Num { get; set; }
+
+ }
+}
diff --git a/src/WMS.Web.Core/Dto/LingXing/LingXingKongRequest.cs b/src/WMS.Web.Core/Dto/LingXing/LingXingKongRequest.cs
new file mode 100644
index 00000000..0a81b7a9
--- /dev/null
+++ b/src/WMS.Web.Core/Dto/LingXing/LingXingKongRequest.cs
@@ -0,0 +1,10 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace WMS.Web.Core.Dto.LingXing
+{
+ public class LingXingKongRequest
+ {
+ }
+}
diff --git a/src/WMS.Web.Core/Dto/LingXing/LingXingLoginRequest.cs b/src/WMS.Web.Core/Dto/LingXing/LingXingLoginRequest.cs
new file mode 100644
index 00000000..b785544c
--- /dev/null
+++ b/src/WMS.Web.Core/Dto/LingXing/LingXingLoginRequest.cs
@@ -0,0 +1,24 @@
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace WMS.Web.Core.Dto.LingXing
+{
+ ///
+ /// 领星登录
+ ///
+ public class LingXingLoginRequest
+ {
+ ///
+ /// id
+ ///
+ [JsonProperty("appId")]
+ public string AppId { get; set; }
+ ///
+ /// Secret
+ ///
+ [JsonProperty("appSecret")]
+ public string AppSecret { get; set; }
+ }
+}
diff --git a/src/WMS.Web.Core/Dto/LingXing/LingXingRequest.cs b/src/WMS.Web.Core/Dto/LingXing/LingXingRequest.cs
new file mode 100644
index 00000000..d4df39b9
--- /dev/null
+++ b/src/WMS.Web.Core/Dto/LingXing/LingXingRequest.cs
@@ -0,0 +1,29 @@
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace WMS.Web.Core.Dto.LingXing
+{
+ ///
+ /// 领星请求
+ ///
+ public class LingXingRequest
+ {
+ ///
+ /// 不是页码 是从第几条数据开始 如果是第二页的话 就是1*800
+ ///
+ [JsonProperty("offset")]
+ public int offset { get; set; } = 0;
+ ///
+ /// 页条数
+ ///
+ [JsonProperty("length")]
+ public int length { get; set; } = 800;
+ ///
+ /// 海外仓
+ ///
+ [JsonProperty("type")]
+ public int type { get; set; } = 1;
+ }
+}
diff --git a/src/WMS.Web.Core/Dto/LingXing/LingXingResponse.cs b/src/WMS.Web.Core/Dto/LingXing/LingXingResponse.cs
new file mode 100644
index 00000000..17beb7b5
--- /dev/null
+++ b/src/WMS.Web.Core/Dto/LingXing/LingXingResponse.cs
@@ -0,0 +1,23 @@
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Text.Json.Serialization;
+
+namespace WMS.Web.Core.Dto.LingXing
+{
+ public class LingXingResponse
+ {
+ public LingXingResponse() { }
+ [JsonProperty("code")]
+ public int Code { get; set; }
+ [JsonProperty("message")]
+ public string Message { get; set; }
+ [JsonProperty("error_details")]
+ public List