1234567891011121314151617181920212223242526272829303132333435363738 |
- using SMP.Model;
- using SMP.Model.Order;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using XYY.Core.Standard.Data.Infrastructure;
- using Dapper;
- namespace SMP.Data
- {
- public interface IFinance_OrderRangeSearchResultRepository : IBaseRepository<Finance_OrderRangeSearchResult>
- {
- Task<IEnumerable<OrderNumberInfo>> GetOrderSystemNoByTransferNumber(IEnumerable<string> transferNumbers);
- Task<IEnumerable<OrderNumberInfo>> GetOrderSystemNoByTrackingNumberNumber(IEnumerable<string> trackingNumbers);
- }
- public class Finance_OrderRangeSearchResultRepository : BaseRepository<Finance_OrderRangeSearchResult>, IFinance_OrderRangeSearchResultRepository
- {
- public Finance_OrderRangeSearchResultRepository(IUnitOfWork unitOfWork) : base(unitOfWork)
- {
- }
- public Task<IEnumerable<OrderNumberInfo>> GetOrderSystemNoByTrackingNumberNumber(IEnumerable<string> trackingNumbers)
- {
- string sql = "select SystemNo,TrackingNumber from Logistisc_Order where TrackingNumber in @TrackingNumbers";
- var result = _unitOfWork.Connection.QueryAsync<OrderNumberInfo>(sql, new { TrackingNumbers = trackingNumbers }, transaction: _unitOfWork.Transaction);
- return result;
- }
- public Task<IEnumerable<OrderNumberInfo>> GetOrderSystemNoByTransferNumber(IEnumerable<string> transferNumbers)
- {
- string sql = "select SystemNo,TransferNumber from Logistisc_Order where TransferNumber in @TransferNumbers";
- var result = _unitOfWork.Connection.QueryAsync<OrderNumberInfo>(sql, new { TransferNumbers = transferNumbers },transaction:_unitOfWork.Transaction);
- return result;
- }
- }
- }
|