5 changed files with 127 additions and 15 deletions
@ -0,0 +1,48 @@ |
|||||
|
using Dapper; |
||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp.DependencyInjection; |
||||
|
using Volo.Abp.Domain.Repositories.Dapper; |
||||
|
using Volo.Abp.EntityFrameworkCore; |
||||
|
using Win.Sfs.SettleAccount.EntityFrameworkCore; |
||||
|
using Win.Sfs.SettleAccount.Reports.InvoiceSettledDiffs; |
||||
|
|
||||
|
namespace Win.Sfs.SettleAccount.Repository.SettleAccountJob |
||||
|
{ |
||||
|
|
||||
|
|
||||
|
/// <summary>
|
||||
|
/// 1.大众发票与结算汇总核对表-UPdate
|
||||
|
/// </summary>
|
||||
|
public class WmsJitOutputDapperRepository : DapperRepository<UnInterfaceDbContext>, ITransientDependency |
||||
|
{ |
||||
|
public WmsJitOutputDapperRepository(IDbContextProvider<UnInterfaceDbContext> dbContextProvider) |
||||
|
: base(dbContextProvider) |
||||
|
{ |
||||
|
} |
||||
|
public virtual bool Execute(string billnum,string date) |
||||
|
{ |
||||
|
string sqlString = |
||||
|
"DECLARE\t@return_value int\n" + |
||||
|
"EXEC\t@return_value = [dbo].[p_wms_output_jit1]\n" + |
||||
|
"@billnum = N'{0}',\n" + |
||||
|
"@type = 1,\n" + |
||||
|
"@date = N'{1}'\n" + |
||||
|
"SELECT\t'Return Value' = @return_value\n"; |
||||
|
|
||||
|
|
||||
|
string _sql = string.Format(sqlString, billnum,date); |
||||
|
|
||||
|
var _query = DbConnection.ExecuteScalar(_sql,null,null,1200,System.Data.CommandType.StoredProcedure); |
||||
|
|
||||
|
|
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,49 @@ |
|||||
|
using System; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Linq; |
||||
|
using System.Text; |
||||
|
using System.Threading.Tasks; |
||||
|
using TaskJob.EventArgs; |
||||
|
using TaskJob.Interfaces; |
||||
|
using Volo.Abp.DependencyInjection; |
||||
|
using Win.Sfs.SettleAccount.Reports.InvoiceSettledDiffs; |
||||
|
using Win.Sfs.SettleAccount.Repository.SettleAccount; |
||||
|
using Win.Sfs.SettleAccount.Repository.SettleAccountJob; |
||||
|
|
||||
|
namespace SettleAccount.Job.Services |
||||
|
{ |
||||
|
public class FisOutputService : ITransientDependency, IExportJob |
||||
|
{ |
||||
|
private readonly InvoiceSettledDiffRepository _repository; |
||||
|
private readonly InvoiceSettledDiffVersionRepository _versionRepository; |
||||
|
private readonly WmsJitOutputDapperRepository _dapperRepository; |
||||
|
private readonly OutputService _outputService; |
||||
|
private readonly InputService _inputService; |
||||
|
|
||||
|
public FisOutputService( |
||||
|
InvoiceSettledDiffRepository repository, |
||||
|
InvoiceSettledDiffVersionRepository versionRepository, |
||||
|
WmsJitOutputDapperRepository dapperRepository, |
||||
|
OutputService outputService, |
||||
|
InputService inputService |
||||
|
) |
||||
|
{ |
||||
|
_inputService = inputService; |
||||
|
_outputService = outputService; |
||||
|
_repository = repository; |
||||
|
_versionRepository = versionRepository; |
||||
|
_dapperRepository=dapperRepository; |
||||
|
} |
||||
|
|
||||
|
public string ExportFile(Guid id, List<string> exportName, List<CustomCondition> p_list) |
||||
|
{ |
||||
|
var billnum = p_list.Where(p => p.Name == "BillNum").FirstOrDefault().Value; |
||||
|
|
||||
|
var date = p_list.Where(p => p.Name == "Date").FirstOrDefault().Value; |
||||
|
|
||||
|
var _ls= _dapperRepository.Execute(billnum,date); |
||||
|
|
||||
|
return id.ToString(); |
||||
|
} |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue