| 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_Core/Helper/SqlSugarHelper.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| 项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockInfoController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_Core/Helper/SqlSugarHelper.cs
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,29 @@ using SqlSugar; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using WIDESEA_Core.DB; using WIDESEA_Core.Seed; namespace WIDESEA_Core.Helper { public class SqlSugarHelper { //å¤åºæ åµä¸ä½¿ç¨è¯´æï¼ //妿æ¯åºå®å¤åºå¯ä»¥ä¼ new SqlSugarScope(List<ConnectionConfig>,db=>{}) ææ¡£ï¼å¤ç§æ· //妿æ¯ä¸åºå®å¤åº å¯ä»¥çææ¡£Saasååº //ç¨å便¨¡å¼ public static SqlSugarScope DbWMS = new SqlSugarScope(new ConnectionConfig() { ConnectionString = DBContext.GetMainConnectionDb().Connection, //ConnectionString = AppSettings.app(MainDb.ConnectionStringWCS), DbType = DbType.SqlServer,//æ°æ®åºç±»å IsAutoCloseConnection = true //ä¸è®¾ætrueè¦æå¨close }, db => { }); } } ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_StockService/StockInfoService.cs
@@ -22,16 +22,16 @@ public IRepository<Dt_StockInfo> Repository => BaseDal; private readonly IRepository<Dt_StockInfoDetail> _stockInfoDetailRepository; private readonly IOutboundOrderService _outboundOrderService; private readonly IOutboundOrderDetailService _outboundOrderDetailService; //private readonly IOutboundOrderDetailService _outboundOrderDetailService; private readonly ILocationInfoService _locationInfoService; public StockInfoService(IRepository<Dt_StockInfo> BaseDal, IMapper mapper, IRepository<Dt_StockInfoDetail> stockInfoDetailRepository, IRecordService recordService, ILocationInfoService locationInfoService, IOutboundOrderService outboundOrderService, IOutboundOrderDetailService outboundOrderDetailService) : base(BaseDal) public StockInfoService(IRepository<Dt_StockInfo> BaseDal, IMapper mapper, IRepository<Dt_StockInfoDetail> stockInfoDetailRepository, IRecordService recordService, ILocationInfoService locationInfoService, IOutboundOrderService outboundOrderService) : base(BaseDal) { _mapper = mapper; _stockInfoDetailRepository = stockInfoDetailRepository; _recordService = recordService; _locationInfoService = locationInfoService; _outboundOrderService = outboundOrderService; _outboundOrderDetailService = outboundOrderDetailService; //_outboundOrderDetailService = outboundOrderDetailService; } /// <summary> @@ -289,7 +289,7 @@ } // è·ååºåºåæç»ï¼ç¨äºç¡®å®éè¦çæ¹æ¬¡åä¾åºå var orderDetails = _outboundOrderDetailService.Db.Queryable<Dt_OutboundOrderDetail>().Where(x => x.OrderId == orderId && x.MaterielCode == materielCode).ToList(); var orderDetails = SqlSugarHelper.DbWMS.Queryable<Dt_OutboundOrderDetail>().Where(x => x.OrderId == orderId && x.MaterielCode == materielCode).ToList(); if (!orderDetails.Any()) { ÏîÄ¿´úÂë/WMSÎÞ²Ö´¢°æ/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Stock/StockInfoController.cs
@@ -25,7 +25,7 @@ /// <param name="orderId"></param> /// <param name="materielCode"></param> /// <returns></returns> [HttpPost, HttpGet, Route("GetStockSelectViews")] [HttpPost, HttpGet, Route("GetStockSelectViews"),AllowAnonymous] public List<StockSelectViewDTO> GetStockSelectViews(int orderId, string materielCode) { return Service.GetStockSelectViews(orderId, materielCode);