|
|
@ -22,7 +22,7 @@ namespace Myshipping.Core.Service
|
|
|
|
private readonly SqlSugarRepository<DjyEdiSetting> _rep;
|
|
|
|
private readonly SqlSugarRepository<DjyEdiSetting> _rep;
|
|
|
|
private readonly ISysCacheService _cacheService;
|
|
|
|
private readonly ISysCacheService _cacheService;
|
|
|
|
private readonly ILogger<DjyEdiSetting> _logger;
|
|
|
|
private readonly ILogger<DjyEdiSetting> _logger;
|
|
|
|
|
|
|
|
|
|
|
|
public DjyEdiSettingService(SqlSugarRepository<DjyEdiSetting> rep, ILogger<DjyEdiSetting> logger, ISysCacheService cacheService)
|
|
|
|
public DjyEdiSettingService(SqlSugarRepository<DjyEdiSetting> rep, ILogger<DjyEdiSetting> logger, ISysCacheService cacheService)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_rep = rep;
|
|
|
|
_rep = rep;
|
|
|
@ -38,32 +38,11 @@ namespace Myshipping.Core.Service
|
|
|
|
[HttpGet("/DjyEdiSetting/page")]
|
|
|
|
[HttpGet("/DjyEdiSetting/page")]
|
|
|
|
public async Task<dynamic> Page([FromQuery] QueryDjyEdiSettingInput input)
|
|
|
|
public async Task<dynamic> Page([FromQuery] QueryDjyEdiSettingInput input)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_rep.Context.QueryFilter.Clear();
|
|
|
|
var entities = await _rep.AsQueryable().Filter(null, true)
|
|
|
|
var entities = await _rep.AsQueryable()
|
|
|
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.EDICODE), u => u.EDICODE == input.EDICODE)
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.EDICODE), u => u.EDICODE == input.EDICODE)
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.EDINAME), u => u.EDINAME.Contains(input.EDINAME.Trim()))
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.EDINAME), u => u.EDINAME.Contains(input.EDINAME.Trim()))
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.SERVERIP), u => u.SERVERIP.Contains(input.SERVERIP.Trim()))
|
|
|
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.FOLDERNAME), u => u.FOLDERNAME.Contains(input.FOLDERNAME.Trim()))
|
|
|
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.USERNAME), u => u.USERNAME.Contains(input.USERNAME.Trim()))
|
|
|
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.PASSWORD), u => u.PASSWORD.Contains(input.PASSWORD.Trim()))
|
|
|
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.SENDCODE), u => u.SENDCODE.Contains(input.SENDCODE.Trim()))
|
|
|
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.RECEIVECODE), u => u.RECEIVECODE.Contains(input.RECEIVECODE.Trim()))
|
|
|
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.SENDNAME), u => u.SENDNAME.Contains(input.SENDNAME.Trim()))
|
|
|
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.SENDATTN), u => u.SENDATTN.Contains(input.SENDATTN.Trim()))
|
|
|
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.SENDTEL), u => u.SENDTEL.Contains(input.SENDTEL.Trim()))
|
|
|
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.SENDEMAIL), u => u.SENDEMAIL.Contains(input.SENDEMAIL.Trim()))
|
|
|
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.SENDCOMPANYCODE), u => u.SENDCOMPANYCODE.Contains(input.SENDCOMPANYCODE.Trim()))
|
|
|
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.SENDSUBCOMPANYCODE), u => u.SENDSUBCOMPANYCODE.Contains(input.SENDSUBCOMPANYCODE.Trim()))
|
|
|
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.CARRIERID), u => u.CARRIERID.Contains(input.CARRIERID.Trim()))
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.CARRIERID), u => u.CARRIERID.Contains(input.CARRIERID.Trim()))
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.RECEIVEEMAIL), u => u.RECEIVEEMAIL.Contains(input.RECEIVEEMAIL.Trim()))
|
|
|
|
.WhereIF(input.TenantId > 0, u => u.TenantId == input.TenantId)
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.RECEIVESIEMAIL), u => u.RECEIVESIEMAIL.Contains(input.RECEIVESIEMAIL.Trim()))
|
|
|
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.RECEIVEOP), u => u.RECEIVEOP.Contains(input.RECEIVEOP.Trim()))
|
|
|
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.RECEIVESALE), u => u.RECEIVESALE.Contains(input.RECEIVESALE.Trim()))
|
|
|
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.RECEIVEDEPT), u => u.RECEIVEDEPT.Contains(input.RECEIVEDEPT.Trim()))
|
|
|
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.SHIPPERTEL), u => u.SHIPPERTEL.Contains(input.SHIPPERTEL.Trim()))
|
|
|
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.CONSIGNEETEL), u => u.CONSIGNEETEL.Contains(input.CONSIGNEETEL.Trim()))
|
|
|
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.NOTIFYPARTYTEL), u => u.NOTIFYPARTYTEL == input.NOTIFYPARTYTEL)
|
|
|
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.ISUSETEL), u => u.ISUSETEL == input.ISUSETEL)
|
|
|
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.TenantName), u => u.TenantName.Contains(input.TenantName.Trim()))
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(input.TenantName), u => u.TenantName.Contains(input.TenantName.Trim()))
|
|
|
|
.ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
.ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
return entities.XnPagedResult();
|
|
|
|
return entities.XnPagedResult();
|
|
|
|