|
|
|
|
using Furion.DependencyInjection;
|
|
|
|
|
using Furion.DynamicApiController;
|
|
|
|
|
using Furion.FriendlyException;
|
|
|
|
|
using Myshipping.Core.Entity;
|
|
|
|
|
using Mapster;
|
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
using SqlSugar;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System;
|
|
|
|
|
using Myshipping.Core.Entity.CommonDB;
|
|
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
|
using Myshipping.Core.Service.CommonDB.Dto;
|
|
|
|
|
|
|
|
|
|
namespace Myshipping.Core.Service;
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 公共库分页处理
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ApiDescriptionSettings(Name = "CommonDBPage", Order = 1000)]
|
|
|
|
|
public class CommonDBPageService : IDynamicApiController, ITransient
|
|
|
|
|
{
|
|
|
|
|
#region
|
|
|
|
|
private readonly SqlSugarRepository<CodeCarrier> _codeCarrierRep;
|
|
|
|
|
private readonly SqlSugarRepository<MappingCarrier> _mappingCarrierRep;
|
|
|
|
|
private readonly SqlSugarRepository<CodeVessel> _codeVesselRep;
|
|
|
|
|
private readonly SqlSugarRepository<MappingVessel> _mappingVesselRep;
|
|
|
|
|
private readonly SqlSugarRepository<CodeForwarder> _codeForwarderRep;
|
|
|
|
|
private readonly SqlSugarRepository<CodeYard> _codeYardRep;
|
|
|
|
|
private readonly SqlSugarRepository<MappingYard> _mappingYardRep;
|
|
|
|
|
private readonly SqlSugarRepository<CodePortLoad> _codePortLoadrRep;
|
|
|
|
|
private readonly SqlSugarRepository<CodePort> _codePortRep;
|
|
|
|
|
private readonly SqlSugarRepository<CodePackage> _codePackageRep;
|
|
|
|
|
private readonly SqlSugarRepository<CodeService> _codeServiceRep;
|
|
|
|
|
private readonly SqlSugarRepository<CodeCtn> _codeCtnRep;
|
|
|
|
|
private readonly SqlSugarRepository<MappingCtn> _mappingCtnRep;
|
|
|
|
|
private readonly SqlSugarRepository<CodeFrt> _codeFrtRep;
|
|
|
|
|
private readonly SqlSugarRepository<MappingFrt> _mappingFrtRep;
|
|
|
|
|
private readonly SqlSugarRepository<MappingPortLoad> _mappingPortLoadRep;
|
|
|
|
|
private readonly SqlSugarRepository<MappingPort> _mappingPortRep;
|
|
|
|
|
private readonly SqlSugarRepository<MappingPackage> _mappingPackageRep;
|
|
|
|
|
private readonly SqlSugarRepository<MappingService> _mappingServiceRep;
|
|
|
|
|
private readonly ISysCacheService _sysCacheService;
|
|
|
|
|
private readonly SqlSugarRepository<CodeIssueType> _codeIssueTypeRep;
|
|
|
|
|
private readonly SqlSugarRepository<CommonModule> _commonModuleRep;
|
|
|
|
|
private readonly ILogger<CommonDBPageService> _logger;
|
|
|
|
|
private readonly SqlSugarRepository<CodeLane> _codeLaneRep;
|
|
|
|
|
private readonly SqlSugarRepository<RelaPortCarrierLane> _relaPortCarrierLaneRep;
|
|
|
|
|
private readonly SqlSugarRepository<CodeCountry> _codeCountryRep;
|
|
|
|
|
public CommonDBPageService(SqlSugarRepository<CodeCarrier> codeCarrierRep,
|
|
|
|
|
SqlSugarRepository<CodeVessel> codeVesselRep,
|
|
|
|
|
SqlSugarRepository<CodeForwarder> codeForwarderRep,
|
|
|
|
|
SqlSugarRepository<CodeYard> codeYardRep,
|
|
|
|
|
SqlSugarRepository<CodePortLoad> codePortLoadrRep,
|
|
|
|
|
SqlSugarRepository<CodePort> codePortRep,
|
|
|
|
|
SqlSugarRepository<CodePackage> codePackageRep,
|
|
|
|
|
SqlSugarRepository<CodeService> codeServiceRep,
|
|
|
|
|
SqlSugarRepository<CodeCtn> codeCtnRep,
|
|
|
|
|
SqlSugarRepository<CodeFrt> codeFrtRep,
|
|
|
|
|
SqlSugarRepository<MappingCarrier> mappingCarrierRep,
|
|
|
|
|
SqlSugarRepository<MappingVessel> mappingVesselRep,
|
|
|
|
|
SqlSugarRepository<MappingCtn> mappingCtnRep,
|
|
|
|
|
SqlSugarRepository<MappingFrt> mappingFrtRep,
|
|
|
|
|
SqlSugarRepository<MappingYard> mappingYardRep,
|
|
|
|
|
SqlSugarRepository<MappingPortLoad> mappingPortLoadRep,
|
|
|
|
|
SqlSugarRepository<MappingPort> mappingPortRep,
|
|
|
|
|
SqlSugarRepository<MappingPackage> mappingPackageRep,
|
|
|
|
|
SqlSugarRepository<MappingService> mappingServiceRep,
|
|
|
|
|
SqlSugarRepository<CodeIssueType> codeIssueTypeRep,
|
|
|
|
|
SqlSugarRepository<CommonModule> commonModuleRep,
|
|
|
|
|
ILogger<CommonDBPageService> logger,
|
|
|
|
|
ISysCacheService sysCacheService,
|
|
|
|
|
SqlSugarRepository<CodeLane> codeLaneRep,
|
|
|
|
|
SqlSugarRepository<RelaPortCarrierLane> relaPortCarrierLaneRep,
|
|
|
|
|
SqlSugarRepository<CodeCountry> codeCountryRep)
|
|
|
|
|
{
|
|
|
|
|
_codeCarrierRep = codeCarrierRep;
|
|
|
|
|
_codeVesselRep = codeVesselRep;
|
|
|
|
|
_codeForwarderRep = codeForwarderRep;
|
|
|
|
|
_codeYardRep = codeYardRep;
|
|
|
|
|
_codePortLoadrRep = codePortLoadrRep;
|
|
|
|
|
_codePortRep = codePortRep;
|
|
|
|
|
_codePackageRep = codePackageRep;
|
|
|
|
|
_codeServiceRep = codeServiceRep;
|
|
|
|
|
_codeCtnRep = codeCtnRep;
|
|
|
|
|
_codeFrtRep = codeFrtRep;
|
|
|
|
|
_mappingCarrierRep = mappingCarrierRep;
|
|
|
|
|
_mappingVesselRep = mappingVesselRep;
|
|
|
|
|
_mappingCtnRep = mappingCtnRep;
|
|
|
|
|
_mappingFrtRep = mappingFrtRep;
|
|
|
|
|
_mappingYardRep = mappingYardRep;
|
|
|
|
|
_sysCacheService = sysCacheService;
|
|
|
|
|
_mappingPortLoadRep = mappingPortLoadRep;
|
|
|
|
|
_mappingPortRep = mappingPortRep;
|
|
|
|
|
_mappingPackageRep = mappingPackageRep;
|
|
|
|
|
_mappingServiceRep = mappingServiceRep;
|
|
|
|
|
_codeIssueTypeRep = codeIssueTypeRep;
|
|
|
|
|
_commonModuleRep = commonModuleRep;
|
|
|
|
|
_logger = logger;
|
|
|
|
|
_codeLaneRep = codeLaneRep;
|
|
|
|
|
_relaPortCarrierLaneRep = relaPortCarrierLaneRep;
|
|
|
|
|
_codeCountryRep = codeCountryRep;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 船公司
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取船公司列表信息
|
|
|
|
|
/// </summary>
|
|
|
|
|
[HttpGet("/commondbpage/carrierlist")]
|
|
|
|
|
public async Task<dynamic> CarrierList([FromQuery] NameQueryDto input)
|
|
|
|
|
{
|
|
|
|
|
return await _codeCarrierRep.AsQueryable().WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|
|
|
|
|
|| x.CnName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.EnName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)).OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.descSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取船公司映射列表信息
|
|
|
|
|
/// </summary>
|
|
|
|
|
[HttpGet("/commondbpage/mappingcarrierlist")]
|
|
|
|
|
public async Task<dynamic> MappingCarrierList([FromQuery] MappingQueryDto input)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
return await _mappingCarrierRep.AsQueryable().Where(x => x.Module == input.Module)
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|
|
|
|
|
|| x.MapCode.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.MapName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)).OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.descSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 船名
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取船名列表信息
|
|
|
|
|
/// </summary>
|
|
|
|
|
[HttpGet("/commondbpage/vessellist")]
|
|
|
|
|
public async Task<dynamic> VesselList([FromQuery] NameQueryDto input)
|
|
|
|
|
{
|
|
|
|
|
return await _codeVesselRep.AsQueryable().WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Name.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)).OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.descSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取船名映射
|
|
|
|
|
/// </summary>
|
|
|
|
|
[HttpGet("/commondbpage/mappingvessellist")]
|
|
|
|
|
public async Task<dynamic> MappingVesselList([FromQuery] MappingQueryDto input)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
return await _mappingVesselRep.AsQueryable().Where(x => x.Module == input.Module)
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.MapName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|
|
|
|
|
|| x.Name.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)).OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.descSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 船代
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取船代列表信息
|
|
|
|
|
/// </summary>
|
|
|
|
|
[HttpGet("/commondbpage/forwarderlist")]
|
|
|
|
|
public async Task<dynamic> ForwarderList([FromQuery] NameQueryDto input)
|
|
|
|
|
{
|
|
|
|
|
return await _codeForwarderRep.AsQueryable().WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Name.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)).OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.descSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 场站
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取场站列表信息
|
|
|
|
|
/// </summary>
|
|
|
|
|
[HttpGet("/commondbpage/yardlist")]
|
|
|
|
|
public async Task<dynamic> YardList([FromQuery] NameQueryDto input)
|
|
|
|
|
{
|
|
|
|
|
return await _codeYardRep.AsQueryable().WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Name.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.ShowCode.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)).OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.descSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取场站映射
|
|
|
|
|
/// </summary>
|
|
|
|
|
[HttpGet("/commondbpage/mappingyardlist")]
|
|
|
|
|
public async Task<dynamic> MappingYardList([FromQuery] MappingQueryDto input)
|
|
|
|
|
{
|
|
|
|
|
return await _mappingYardRep.AsQueryable().Where(x => x.Module == input.Module)
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|
|
|
|
|
|| x.MapCode.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.MapName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)).OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.descSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 起始港
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取起始港信息
|
|
|
|
|
/// </summary>
|
|
|
|
|
[HttpGet("/commondbpage/portloadlist")]
|
|
|
|
|
public async Task<dynamic> PortloadList([FromQuery] NameQueryDto input)
|
|
|
|
|
{
|
|
|
|
|
return await _codePortLoadrRep.AsQueryable().WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|
|
|
|
|
|| x.EnName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.CnName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.EdiCode.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)).OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.descSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取起始港映射
|
|
|
|
|
/// </summary>
|
|
|
|
|
[HttpGet("/commondbpage/mappingportloadlist")]
|
|
|
|
|
public async Task<dynamic> PortloadList([FromQuery] MappingQueryDto input)
|
|
|
|
|
{
|
|
|
|
|
return await _mappingPortLoadRep.AsQueryable().Where(x => x.Module == input.Module)
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|
|
|
|
|
|| x.MapCode.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.MapName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)).OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.descSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 目的港
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取目的港信息
|
|
|
|
|
/// </summary>
|
|
|
|
|
[HttpGet("/commondbpage/portlist")]
|
|
|
|
|
public async Task<dynamic> PortList([FromQuery] NameQueryDto input)
|
|
|
|
|
{
|
|
|
|
|
return await _codePortRep.AsQueryable().WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|
|
|
|
|
|| x.EnName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.CnName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.EdiCode.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)).OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.descSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取目的港映射
|
|
|
|
|
/// </summary>
|
|
|
|
|
[HttpGet("/commondbpage/mappingportlist")]
|
|
|
|
|
public async Task<dynamic> PortList([FromQuery] MappingQueryDto input)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
return await _mappingPortRep.AsQueryable().Where(x => x.Module == input.Module)
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|
|
|
|
|
|| x.MapCode.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.MapName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)).OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.descSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 包装
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取包装信息
|
|
|
|
|
/// </summary>
|
|
|
|
|
[HttpGet("/commondbpage/package")]
|
|
|
|
|
public async Task<dynamic> PackageList([FromQuery] NameQueryDto input)
|
|
|
|
|
{
|
|
|
|
|
return await _codePackageRep.AsQueryable().WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Name.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|
|
|
|
|
|| x.EdiCode.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)).OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.descSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取包装映射
|
|
|
|
|
/// </summary>
|
|
|
|
|
[HttpGet("/commondbpage/mappingpackage")]
|
|
|
|
|
public async Task<dynamic> MappingPackageList([FromQuery] MappingQueryDto input)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return await _mappingPackageRep.AsQueryable().Where(x => x.Module == input.Module)
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|
|
|
|
|
|| x.MapCode.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.MapName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)).OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.descSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 运输条款
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取运输条款信息
|
|
|
|
|
/// </summary>
|
|
|
|
|
[HttpGet("/commondbpage/service")]
|
|
|
|
|
public async Task<dynamic> ServiceList([FromQuery] NameQueryDto input)
|
|
|
|
|
{
|
|
|
|
|
return await _codeServiceRep.AsQueryable().WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Name.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|
|
|
|
|
|| x.EdiCode.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)).OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.descSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取运输条款映射
|
|
|
|
|
/// </summary>
|
|
|
|
|
[HttpGet("/commondbpage/mappingservice")]
|
|
|
|
|
public async Task<dynamic> MappingServiceList([FromQuery] MappingQueryDto input)
|
|
|
|
|
{
|
|
|
|
|
return await _mappingServiceRep.AsQueryable().Where(x => x.Module == input.Module)
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|
|
|
|
|
|| x.MapCode.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.MapName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)).OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.descSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 箱型
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取箱型信息
|
|
|
|
|
/// </summary>
|
|
|
|
|
[HttpGet("/commondbpage/ctn")]
|
|
|
|
|
public async Task<dynamic> CtnList([FromQuery] NameQueryDto input)
|
|
|
|
|
{
|
|
|
|
|
return await _codeCtnRep.AsQueryable().WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Name.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|
|
|
|
|
|| x.EdiCode.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)).OrderByDescending(x=>x.CreateTime).OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.descSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取箱型映射列表信息
|
|
|
|
|
/// </summary>
|
|
|
|
|
[HttpGet("/commondbpage/mappingctnlist")]
|
|
|
|
|
public async Task<dynamic> MappingCtnList([FromQuery] MappingQueryDto input)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
return await _mappingCtnRep.AsQueryable().Where(x => x.Module == input.Module)
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|
|
|
|
|
|| x.MapCode.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.MapName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)).OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.descSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 付费方式
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 付费方式
|
|
|
|
|
/// </summary>
|
|
|
|
|
[HttpGet("/commondbpage/frt")]
|
|
|
|
|
public async Task<dynamic> FrtList([FromQuery] NameQueryDto input)
|
|
|
|
|
{
|
|
|
|
|
return await _codeFrtRep.AsQueryable().WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.EnName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|
|
|
|
|
|| x.CnName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)).OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.descSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取付费映射列表信息
|
|
|
|
|
/// </summary>
|
|
|
|
|
[HttpGet("/commondbpage/mappingfrtlist")]
|
|
|
|
|
public async Task<dynamic> MappingFrtList([FromQuery] MappingQueryDto input)
|
|
|
|
|
{
|
|
|
|
|
return await _mappingFrtRep.AsQueryable().Where(x => x.Module == input.Module)
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|
|
|
|
|
|| x.MapCode.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.MapName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)).OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.descSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 签单方式
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取签单方式信息
|
|
|
|
|
/// </summary>
|
|
|
|
|
[HttpGet("/commondbpage/codeissuetypelist")]
|
|
|
|
|
public async Task<dynamic> CodeIssueTypeList([FromQuery] NameQueryDto input)
|
|
|
|
|
{
|
|
|
|
|
return await _codeIssueTypeRep.AsQueryable().WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) || x.EnName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|
|
|
|
|
|| x.CnName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)).OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.descSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 模块列表
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取模块信息
|
|
|
|
|
/// </summary>
|
|
|
|
|
[HttpGet("/commondbpage/modules")]
|
|
|
|
|
public async Task<dynamic> ModuleList([FromQuery] NameQueryDto input)
|
|
|
|
|
{
|
|
|
|
|
return await _commonModuleRep.AsQueryable().Select(x => new { x.Code, x.Name, x.Sort }).OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.descSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 航线信息
|
|
|
|
|
[HttpGet("/commondbpage/CodeLaneList")]
|
|
|
|
|
public async Task<dynamic> CodeLaneList([FromQuery] NameQueryDto input)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
return await _codeLaneRep.AsQueryable().WhereIF(!string.IsNullOrEmpty(input.KeyWord),
|
|
|
|
|
x => (!string.IsNullOrWhiteSpace(x.Code) && x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase))
|
|
|
|
|
|| (!string.IsNullOrWhiteSpace(x.EnName) && x.EnName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase))
|
|
|
|
|
|| (!string.IsNullOrWhiteSpace(x.CnName) && x.CnName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase))
|
|
|
|
|
|| (!string.IsNullOrWhiteSpace(x.LaneType) && x.LaneType.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase))
|
|
|
|
|
).OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.descSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 查询国家
|
|
|
|
|
[HttpGet("/commondbpage/CodeCountryList")]
|
|
|
|
|
public async Task<dynamic> CodeCountryList([FromQuery] NameQueryDto input)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
return await _codeCountryRep.AsQueryable().WhereIF(!string.IsNullOrEmpty(input.KeyWord),
|
|
|
|
|
x => (!string.IsNullOrWhiteSpace(x.Code) && x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase))
|
|
|
|
|
|| (!string.IsNullOrWhiteSpace(x.EnName) && x.EnName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase))
|
|
|
|
|
|| (!string.IsNullOrWhiteSpace(x.CnName) && x.CnName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase))
|
|
|
|
|
|| (!string.IsNullOrWhiteSpace(x.Capital) && x.Capital.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase))
|
|
|
|
|
|| (!string.IsNullOrWhiteSpace(x.Continent) && x.Continent.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase))
|
|
|
|
|
).OrderBy(PageInputOrder.OrderBuilder(input.SortField, input.descSort)).ToPagedListAsync(input.PageNo, input.PageSize);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
}
|