12
This commit is contained in:
@@ -13,6 +13,7 @@ namespace SqlSugar
|
|||||||
get
|
get
|
||||||
{
|
{
|
||||||
return "SELECT NAME FROM MASTER.DBO.SYSDATABASES ORDER BY NAME";
|
return "SELECT NAME FROM MASTER.DBO.SYSDATABASES ORDER BY NAME";
|
||||||
|
//return "SELECT name FROM sys.objects WHERE type = 'V' ORDER BY name";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
protected override string GetColumnInfosByTableNameSql
|
protected override string GetColumnInfosByTableNameSql
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace MyCode.Project.Domain.Config
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// B数据库链接对象
|
/// B数据库链接对象
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string LxmConnectionStr =WebConfigUtils.GetConnectionStringsInfo("WMSConn");
|
public static string WMSConnectionStr =WebConfigUtils.GetConnectionStringsInfo("WMSConn");
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// JWT的key
|
/// JWT的key
|
||||||
|
|||||||
@@ -80,6 +80,7 @@
|
|||||||
<Compile Include="Model\JackOrders.cs" />
|
<Compile Include="Model\JackOrders.cs" />
|
||||||
<Compile Include="Model\JackOrdersItem.cs" />
|
<Compile Include="Model\JackOrdersItem.cs" />
|
||||||
<Compile Include="Model\SysWorkprocess.cs" />
|
<Compile Include="Model\SysWorkprocess.cs" />
|
||||||
|
<Compile Include="Model\YTKJTShopParameter.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Repositories\IApiLogRepository.cs" />
|
<Compile Include="Repositories\IApiLogRepository.cs" />
|
||||||
<Compile Include="Repositories\IJackOrdersItemRepository.cs" />
|
<Compile Include="Repositories\IJackOrdersItemRepository.cs" />
|
||||||
@@ -87,6 +88,9 @@
|
|||||||
<Compile Include="Repositories\IRepository.cs" />
|
<Compile Include="Repositories\IRepository.cs" />
|
||||||
<Compile Include="Repositories\IRepository`.cs" />
|
<Compile Include="Repositories\IRepository`.cs" />
|
||||||
<Compile Include="Repositories\ISysWorkprocessRepository.cs" />
|
<Compile Include="Repositories\ISysWorkprocessRepository.cs" />
|
||||||
|
<Compile Include="Repositories\IYTKJTShopParameterRepository.cs" />
|
||||||
|
<Compile Include="ZHMDModel\WMStoJackyunInventoryMovementView1.cs" />
|
||||||
|
<Compile Include="ZHMDRepositories\IWMStoJackyunInventoryMovementView1Repository.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="App.config" />
|
<None Include="App.config" />
|
||||||
|
|||||||
@@ -0,0 +1,147 @@
|
|||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using SqlSugar;
|
||||||
|
|
||||||
|
namespace MyCode.Project.Domain.ZHMDModel
|
||||||
|
{
|
||||||
|
///<summary>
|
||||||
|
///
|
||||||
|
///</summary>
|
||||||
|
[SugarTable("WMStoJackyun_InventoryMovement_View1")]
|
||||||
|
public partial class WMStoJackyunInventoryMovementView1
|
||||||
|
{
|
||||||
|
public WMStoJackyunInventoryMovementView1(){
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:False
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(IsPrimaryKey=true,IsIdentity=true)]
|
||||||
|
public int Id {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string 单据号 {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string WMS单号 {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public long? 单据行号 {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string 单据类型 {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string 单据类型名称 {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string 变动方向 {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string ITEMID {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string SKU {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string BARCODE {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string 尺码 {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string 单位 {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string 商品名称 {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public int? 数量 {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string 仓库 {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? 过账日期 {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:
|
||||||
|
/// Default:
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
public string 备注 {get;set;}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Desc:0=未处理 1=已合并 2=已推送
|
||||||
|
/// Default:0
|
||||||
|
/// Nullable:True
|
||||||
|
/// </summary>
|
||||||
|
[SugarColumn(ColumnName="status")]
|
||||||
|
public int? Status {get;set;}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
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.ZHMDModel;
|
||||||
|
using MyCode.Project.Infrastructure.Common;
|
||||||
|
using MyCode.Project.Domain.Message;
|
||||||
|
|
||||||
|
namespace MyCode.Project.Domain.Repositories.ZHMDRepositories
|
||||||
|
{
|
||||||
|
public interface IWMStoJackyunInventoryMovementView1Repository
|
||||||
|
{
|
||||||
|
List<WMStoJackyunInventoryMovementView1> GetList(DateTime now);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -24,12 +24,12 @@ using System.Data;
|
|||||||
|
|
||||||
namespace MyCode.Project.Repositories.Common
|
namespace MyCode.Project.Repositories.Common
|
||||||
{
|
{
|
||||||
public class LxmRepository :IDisposable
|
public class WMSRepository :IDisposable
|
||||||
{
|
{
|
||||||
#region 初始化
|
#region 初始化
|
||||||
private LxmSqlSugarClient _context;
|
private WMSSqlSugarClient _context;
|
||||||
|
|
||||||
public LxmRepository(LxmSqlSugarClient context)
|
public WMSRepository(WMSSqlSugarClient context)
|
||||||
{
|
{
|
||||||
this._context = context;
|
this._context = context;
|
||||||
|
|
||||||
@@ -9,17 +9,17 @@ using MyCode.Project.Infrastructure.Cache;
|
|||||||
namespace MyCode.Project.Repositories.Common
|
namespace MyCode.Project.Repositories.Common
|
||||||
{
|
{
|
||||||
|
|
||||||
public class LxmSqlSugarClient : SqlSugar.SqlSugarClient
|
public class WMSSqlSugarClient : SqlSugar.SqlSugarClient
|
||||||
{
|
{
|
||||||
|
|
||||||
public LxmSqlSugarClient() : base(config)
|
public WMSSqlSugarClient() : base(config)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ConnectionConfig config = new ConnectionConfig()
|
private static ConnectionConfig config = new ConnectionConfig()
|
||||||
{
|
{
|
||||||
ConnectionString = SystemConfig.LxmConnectionStr,
|
ConnectionString = SystemConfig.WMSConnectionStr,
|
||||||
DbType = DbType.SqlServer,
|
DbType = DbType.SqlServer,
|
||||||
InitKeyType = InitKeyType.Attribute,
|
InitKeyType = InitKeyType.Attribute,
|
||||||
IsAutoCloseConnection = true,
|
IsAutoCloseConnection = true,
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
using MyCode.Project.Repositories.Common;
|
|
||||||
|
|
||||||
namespace MyCode.Project.Repositories
|
|
||||||
{
|
|
||||||
public class LxmReportRepository: LxmRepository
|
|
||||||
{
|
|
||||||
public LxmReportRepository(LxmSqlSugarClient context) : base(context)
|
|
||||||
{ }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -80,18 +80,19 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="ApiLogRepository.cs" />
|
<Compile Include="ApiLogRepository.cs" />
|
||||||
<Compile Include="Common\LxmSqlSugarClient.cs" />
|
<Compile Include="Common\Repository.cs" />
|
||||||
|
<Compile Include="Common\WMSSqlSugarClient.cs" />
|
||||||
<Compile Include="Common\MyCodeSqlSugarClient.cs" />
|
<Compile Include="Common\MyCodeSqlSugarClient.cs" />
|
||||||
<Compile Include="Common\LxmRepository`.cs" />
|
<Compile Include="Common\WMSRepository.cs" />
|
||||||
<Compile Include="Common\Repository`.cs" />
|
<Compile Include="Common\Repository`.cs" />
|
||||||
<Compile Include="Common\TransactionCallHandler.cs" />
|
<Compile Include="Common\TransactionCallHandler.cs" />
|
||||||
<Compile Include="Common\TransactionCallHandlerAttribute.cs" />
|
<Compile Include="Common\TransactionCallHandlerAttribute.cs" />
|
||||||
<Compile Include="JackOrdersItemRepository.cs" />
|
<Compile Include="JackOrdersItemRepository.cs" />
|
||||||
<Compile Include="JackOrdersRepository.cs" />
|
<Compile Include="JackOrdersRepository.cs" />
|
||||||
<Compile Include="Lxm\LxmReportRepository.cs" />
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Common\Repository.cs" />
|
|
||||||
<Compile Include="SysWorkprocessRepository.cs" />
|
<Compile Include="SysWorkprocessRepository.cs" />
|
||||||
|
<Compile Include="YTKJTShopParameterRepository.cs" />
|
||||||
|
<Compile Include="ZHMD\WMStoJackyunInventoryMovementView1Repository.cs" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="App.config">
|
<None Include="App.config">
|
||||||
@@ -115,7 +116,9 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
|
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup />
|
<ItemGroup>
|
||||||
|
<Folder Include="Lxm\" />
|
||||||
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
|
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
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.ZHMDModel;
|
||||||
|
using MyCode.Project.Infrastructure.Common;
|
||||||
|
using MyCode.Project.Infrastructure.Search;
|
||||||
|
using MyCode.Project.Domain.Repositories.ZHMDRepositories;
|
||||||
|
|
||||||
|
namespace MyCode.Project.Repositories.ZHMD
|
||||||
|
{
|
||||||
|
public class WMStoJackyunInventoryMovementView1Repository: WMSRepository,IWMStoJackyunInventoryMovementView1Repository
|
||||||
|
{
|
||||||
|
public WMStoJackyunInventoryMovementView1Repository(WMSSqlSugarClient context) : base(context)
|
||||||
|
{ }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public List<WMStoJackyunInventoryMovementView1> GetList(DateTime now)
|
||||||
|
{
|
||||||
|
now = now.Date;
|
||||||
|
string sql = $@"select TOP 100 * from [WMStoJackyun_InventoryMovement_View]
|
||||||
|
where [过账日期]>='{now}'
|
||||||
|
ORDER BY [单据号],[单据行号]";
|
||||||
|
var list = this.SelectList<WMStoJackyunInventoryMovementView1>(sql);
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
19
Reportapi/MyCode.Project.Services/IServices/IWMSService.cs
Normal file
19
Reportapi/MyCode.Project.Services/IServices/IWMSService.cs
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
using MyCode.Project.Domain.ZHMDModel;
|
||||||
|
using MyCode.Project.Repositories.Common;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace MyCode.Project.Services
|
||||||
|
{
|
||||||
|
public interface IWMSService
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 把WMS订单存进本地数据库
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="trades"></param>
|
||||||
|
|
||||||
|
void SetWMSOrder(List<WMStoJackyunInventoryMovementView1> trades);
|
||||||
|
List<WMStoJackyunInventoryMovementView1> GetList(DateTime now);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -9,13 +9,13 @@ namespace MyCode.Project.Services.Implementation
|
|||||||
|
|
||||||
#region 初始化
|
#region 初始化
|
||||||
private readonly IRepository _repository;
|
private readonly IRepository _repository;
|
||||||
private readonly LxmRepository _lxmRepository;
|
private readonly WMSRepository _lxmRepository;
|
||||||
|
|
||||||
private IMyCodeCacheService _myCodeCacheService;
|
private IMyCodeCacheService _myCodeCacheService;
|
||||||
|
|
||||||
|
|
||||||
public ApiLogService(IRepository repository
|
public ApiLogService(IRepository repository
|
||||||
, LxmRepository lxmRepository
|
, WMSRepository lxmRepository
|
||||||
, IMyCodeCacheService myCodeCacheService
|
, IMyCodeCacheService myCodeCacheService
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,93 @@
|
|||||||
|
using MyCode.Project.Domain.Message.Request.JackYun;
|
||||||
|
using MyCode.Project.Domain.Model;
|
||||||
|
using MyCode.Project.Domain.Repositories;
|
||||||
|
using MyCode.Project.Domain.Repositories.ZHMDRepositories;
|
||||||
|
using MyCode.Project.Domain.ZHMDModel;
|
||||||
|
using MyCode.Project.Infrastructure.Common;
|
||||||
|
using MyCode.Project.Infrastructure.Enumeration;
|
||||||
|
using MyCode.Project.Infrastructure.Exceptions;
|
||||||
|
using MyCode.Project.Infrastructure.JackYun;
|
||||||
|
using MyCode.Project.Repositories;
|
||||||
|
using MyCode.Project.Repositories.Common;
|
||||||
|
using MyCode.Project.Repositories.ZHMD;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Threading;
|
||||||
|
|
||||||
|
namespace MyCode.Project.Services.Implementation
|
||||||
|
{
|
||||||
|
public class WMSService : ServiceBase , IWMSService
|
||||||
|
{
|
||||||
|
DateTime startTime = DateTime.Parse("2025-06-01");
|
||||||
|
|
||||||
|
private IWMStoJackyunInventoryMovementView1Repository _wMStoJackyunInventoryMovementView3Repository;
|
||||||
|
private IRepository _repository;
|
||||||
|
|
||||||
|
public WMSService(IWMStoJackyunInventoryMovementView1Repository wMStoJackyunInventoryMovementView3Repository, IRepository repository )
|
||||||
|
{
|
||||||
|
_wMStoJackyunInventoryMovementView3Repository = wMStoJackyunInventoryMovementView3Repository;
|
||||||
|
_repository = repository;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public List<WMStoJackyunInventoryMovementView1> GetList(DateTime now)
|
||||||
|
{
|
||||||
|
if (now < startTime)
|
||||||
|
now = startTime;
|
||||||
|
var list= _wMStoJackyunInventoryMovementView3Repository.GetList(now);
|
||||||
|
SetWMSOrder(list);
|
||||||
|
return list;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#region SetWMSOrder(把WMS订单存进本地数据库)
|
||||||
|
/// <summary>
|
||||||
|
/// 把WMS订单存进本地数据库
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="trades"></param>
|
||||||
|
[TransactionCallHandler]
|
||||||
|
public void SetWMSOrder(List<WMStoJackyunInventoryMovementView1> trades)
|
||||||
|
{
|
||||||
|
var ids = trades.Select(t => t.单据号).ToList();
|
||||||
|
var oldids = _repository.Queryable<WMStoJackyunInventoryMovementView1>().Where(t => ids.Contains(t.单据号))
|
||||||
|
.Select(t => new { t.单据号, t.单据行号 }).ToList();
|
||||||
|
if (oldids.Count > 0)
|
||||||
|
{
|
||||||
|
//trades = (from p in trades
|
||||||
|
// join k in oldids on new { p.WMS单号, p.单据行号 } equals new { k.WMS单号, k.单据行号 }
|
||||||
|
// where k.单据行号 == null
|
||||||
|
// select p).ToList();
|
||||||
|
|
||||||
|
// 方法1:使用左外连接(推荐 - 高效且符合SQL思维)
|
||||||
|
trades = (
|
||||||
|
from p in trades
|
||||||
|
join k in oldids
|
||||||
|
on new { p.单据号, p.单据行号 }
|
||||||
|
equals new { k.单据号, k.单据行号 }
|
||||||
|
into temp
|
||||||
|
from k in temp.DefaultIfEmpty()
|
||||||
|
where k == null // 只保留未匹配的记录
|
||||||
|
select p
|
||||||
|
).ToList();
|
||||||
|
|
||||||
|
//// 方法2:使用Any()进行条件过滤(更简洁)
|
||||||
|
//var excludedTrades = trades
|
||||||
|
// .Where(p => !oldids.Any(k =>
|
||||||
|
// k.WMS单号 == p.WMS单号 &&
|
||||||
|
// k.单据行号 == p.单据行号))
|
||||||
|
// .ToList();
|
||||||
|
|
||||||
|
|
||||||
|
//trades = trades.Where(t => !oldids.Contains(new { t.WMS单号, t.单据行号 })).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
_repository.Add<WMStoJackyunInventoryMovementView1>(trades);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -115,6 +115,7 @@
|
|||||||
<Compile Include="BLL\WebSocketBLL.cs" />
|
<Compile Include="BLL\WebSocketBLL.cs" />
|
||||||
<Compile Include="Implementation\AnsyDataProcessService.cs" />
|
<Compile Include="Implementation\AnsyDataProcessService.cs" />
|
||||||
<Compile Include="Implementation\ApiLogService.cs" />
|
<Compile Include="Implementation\ApiLogService.cs" />
|
||||||
|
<Compile Include="Implementation\WMSService.cs" />
|
||||||
<Compile Include="Implementation\JackYunService.cs" />
|
<Compile Include="Implementation\JackYunService.cs" />
|
||||||
<Compile Include="Implementation\JackYunTaskService.cs" />
|
<Compile Include="Implementation\JackYunTaskService.cs" />
|
||||||
<Compile Include="Implementation\ReportService.cs" />
|
<Compile Include="Implementation\ReportService.cs" />
|
||||||
@@ -122,6 +123,7 @@
|
|||||||
<Compile Include="Implementation\WebSocketService.cs" />
|
<Compile Include="Implementation\WebSocketService.cs" />
|
||||||
<Compile Include="Implementation\WorkProcessService.cs" />
|
<Compile Include="Implementation\WorkProcessService.cs" />
|
||||||
<Compile Include="IServices\IAnsyDataProcessService.cs" />
|
<Compile Include="IServices\IAnsyDataProcessService.cs" />
|
||||||
|
<Compile Include="IServices\IWMSService.cs" />
|
||||||
<Compile Include="IServices\IJackYunTaskService.cs" />
|
<Compile Include="IServices\IJackYunTaskService.cs" />
|
||||||
<Compile Include="IServices\IJackYunService.cs" />
|
<Compile Include="IServices\IJackYunService.cs" />
|
||||||
<Compile Include="IServices\IApiLogService.cs" />
|
<Compile Include="IServices\IApiLogService.cs" />
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ using MyCode.Project.Services;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System;
|
using System;
|
||||||
using System.Web.Http;
|
using System.Web.Http;
|
||||||
|
using MyCode.Project.Domain.ZHMDModel;
|
||||||
|
|
||||||
namespace MyCode.Project.WebApi.Controllers
|
namespace MyCode.Project.WebApi.Controllers
|
||||||
{
|
{
|
||||||
@@ -14,9 +15,13 @@ namespace MyCode.Project.WebApi.Controllers
|
|||||||
{
|
{
|
||||||
|
|
||||||
private IJackYunTaskService _jackYunTaskService;
|
private IJackYunTaskService _jackYunTaskService;
|
||||||
public TestController(IJackYunTaskService jackYunTaskService)
|
private IWMSService _wMSService;
|
||||||
|
|
||||||
|
|
||||||
|
public TestController(IJackYunTaskService jackYunTaskService, IWMSService wMSService )
|
||||||
{
|
{
|
||||||
_jackYunTaskService = jackYunTaskService;
|
_jackYunTaskService = jackYunTaskService;
|
||||||
|
_wMSService = wMSService;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region 调度运行抓吉客云销售订单
|
#region 调度运行抓吉客云销售订单
|
||||||
@@ -32,6 +37,20 @@ namespace MyCode.Project.WebApi.Controllers
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region 抓WMS订单
|
||||||
|
/// <summary>
|
||||||
|
/// 抓WMS订单
|
||||||
|
/// </summary>
|
||||||
|
[HttpGet]
|
||||||
|
[AllowAnonymous]
|
||||||
|
public List<WMStoJackyunInventoryMovementView1> GetList(DateTime now)
|
||||||
|
{
|
||||||
|
return _wMSService.GetList(now);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
//#region 订单查询
|
//#region 订单查询
|
||||||
|
|
||||||
///// <summary>
|
///// <summary>
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
<connectionStrings>
|
<connectionStrings>
|
||||||
|
|
||||||
<!-- 数据库测试-->
|
<!-- 数据库测试-->
|
||||||
<add name="WMSConn" connectionString="Data Source=127.0.0.1; Initial Catalog=YunTong; User ID=sa;Password=1; Connect Timeout=120; MultipleActiveResultSets=True;App=JiKeYun2" providerName="System.Data.SqlClient" />
|
<add name="WMSConn" connectionString="Data Source=127.0.0.1; Initial Catalog=sdf; User ID=sa;Password=1; Connect Timeout=120; MultipleActiveResultSets=True;App=WMS" providerName="System.Data.SqlClient" />
|
||||||
<add name="YunTongConn" connectionString="Data Source=127.0.0.1; Initial Catalog=YunTong; User ID=sa;Password=1; Connect Timeout=120; MultipleActiveResultSets=True;App=JiKeYun1" providerName="System.Data.SqlClient" />
|
<add name="YunTongConn" connectionString="Data Source=127.0.0.1; Initial Catalog=YunTong; User ID=sa;Password=1; Connect Timeout=120; MultipleActiveResultSets=True;App=JiKeYun1" providerName="System.Data.SqlClient" />
|
||||||
|
|
||||||
<!--测试MYSQL内网-->
|
<!--测试MYSQL内网-->
|
||||||
|
|||||||
@@ -10,8 +10,8 @@
|
|||||||
|
|
||||||
<connectionStrings>
|
<connectionStrings>
|
||||||
|
|
||||||
<add name="WMSConn" connectionString="Data Source=127.0.0.1; Initial Catalog=xietong; User ID=sa;Password=1; Connect Timeout=120; MultipleActiveResultSets=True;App=JiKeYun2" providerName="System.Data.SqlClient" />
|
<add name="WMSConn" connectionString="Data Source=127.0.0.1; Initial Catalog=YunTong; User ID=sa;Password=1; Connect Timeout=120; MultipleActiveResultSets=True;App=JiKeYun2" providerName="System.Data.SqlClient" />
|
||||||
<add name="YunTongConn" connectionString="Data Source=127.0.0.1; Initial Catalog=xietong; User ID=sa;Password=1; Connect Timeout=120; MultipleActiveResultSets=True;App=JiKeYun1" providerName="System.Data.SqlClient" />
|
<add name="YunTongConn" connectionString="Data Source=127.0.0.1; Initial Catalog=YunTong; User ID=sa;Password=1; Connect Timeout=120; MultipleActiveResultSets=True;App=JiKeYun1" providerName="System.Data.SqlClient" />
|
||||||
|
|
||||||
|
|
||||||
</connectionStrings>
|
</connectionStrings>
|
||||||
|
|||||||
@@ -19,11 +19,11 @@ namespace MyCode.Project.GenerateCode
|
|||||||
|
|
||||||
//要生成的仓储和实体对象,不用整个库全部生成,只生成想要的就行
|
//要生成的仓储和实体对象,不用整个库全部生成,只生成想要的就行
|
||||||
var listTalbeName = new List<string>()
|
var listTalbeName = new List<string>()
|
||||||
{ "BasShop","BusSalesServiceSetIdBook"};
|
{ "WMStoJackyun_InventoryMovement_View1"};
|
||||||
|
|
||||||
using (var db = new LxmSqlSugarClient())
|
using (var db = new WMSSqlSugarClient())
|
||||||
{
|
{
|
||||||
var tables = db.DbMaintenance.GetTableInfoList();
|
var tables = db.DbMaintenance.GetTableInfoList(false);
|
||||||
|
|
||||||
var solutionPath = FileUtils.GetSolutionPath();
|
var solutionPath = FileUtils.GetSolutionPath();
|
||||||
|
|
||||||
|
|||||||
@@ -27,9 +27,9 @@ using MyCode.Project.Domain.Repositories.ZHMDRepositories;
|
|||||||
|
|
||||||
namespace MyCode.Project.Repositories.ZHMD
|
namespace MyCode.Project.Repositories.ZHMD
|
||||||
{{
|
{{
|
||||||
public class {ClassName}Repository: LxmRepository,I{ClassName}Repository
|
public class {ClassName}Repository: WMSRepository,I{ClassName}Repository
|
||||||
{{
|
{{
|
||||||
public {ClassName}Repository(LxmSqlSugarClient context) : base(context)
|
public {ClassName}Repository(WMSSqlSugarClient context) : base(context)
|
||||||
{{ }}
|
{{ }}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user