公共库

booking_auth_dev
wet 2 years ago
parent 320e58e34b
commit 602334a8ca

@ -119,6 +119,23 @@ public class CommonConst
/// 场站映射 /// 场站映射
/// </summary> /// </summary>
public const string CACHE_KEY_COMMON_DB_MAPPING_YARD = "CommonDbMappingYard"; public const string CACHE_KEY_COMMON_DB_MAPPING_YARD = "CommonDbMappingYard";
/// <summary>
/// 起始港映射
/// </summary>
public const string CACHE_KEY_COMMON_DB_MAPPING_PORTLOAD = "CommonDbMappingPortLoad";
/// <summary>
/// 目的港映射
/// </summary>
public const string CACHE_KEY_COMMON_DB_MAPPING_PORT = "CommonDbMappingPort";
/// <summary>
/// 包装映射
/// </summary>
public const string CACHE_KEY_COMMON_DB_MAPPING_PACKAGE = "CommonDbMappingPackage";
/// <summary>
/// 包装映射
/// </summary>
public const string CACHE_KEY_COMMON_DB_MAPPING_SERVICE = "CommonDbMappingService";
/// <summary> /// <summary>
/// 字典映射 /// 字典映射

@ -76,4 +76,10 @@ namespace Myshipping.Core.Entity
public string Remark { get; set; } public string Remark { get; set; }
} }
} }

@ -40,4 +40,40 @@ namespace Myshipping.Core.Entity
} }
[SugarTable("MappingPackage")]
[Description("包装映射")]
public class MappingPackage : CommonDbEntity
{
/// <summary>
/// 代码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 船司代码
/// </summary>
public string CarrierCode { get; set; }
/// <summary>
/// 模块
/// </summary>
public string Module { get; set; }
/// <summary>
/// 映射代码
/// </summary>
public string MapCode { get; set; }
/// <summary>
/// 映射名称
/// </summary>
public string MapName { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
}
} }

@ -66,4 +66,40 @@ namespace Myshipping.Core.Entity
} }
[SugarTable("MappingPort")]
[Description("起运港映射")]
public class MappingPort : CommonDbEntity
{
/// <summary>
/// 代码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 船司代码
/// </summary>
public string CarrierCode { get; set; }
/// <summary>
/// 模块
/// </summary>
public string Module { get; set; }
/// <summary>
/// 映射代码
/// </summary>
public string MapCode { get; set; }
/// <summary>
/// 映射名称
/// </summary>
public string MapName { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
}
} }

@ -41,8 +41,42 @@ namespace Myshipping.Core.Entity
/// 备注 /// 备注
/// </summary> /// </summary>
public string Remark { get; set; } public string Remark { get; set; }
}
[SugarTable("MappingPortLoad")]
[Description("起运港映射")]
public class MappingPortLoad : CommonDbEntity
{
/// <summary>
/// 代码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 船司代码
/// </summary>
public string CarrierCode { get; set; }
/// <summary>
/// 模块
/// </summary>
public string Module { get; set; }
/// <summary>
/// 映射代码
/// </summary>
public string MapCode { get; set; }
/// <summary>
/// 映射名称
/// </summary>
public string MapName { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
} }
} }

@ -39,5 +39,44 @@ namespace Myshipping.Core.Entity
}
[SugarTable("MappingService")]
[Description("运输方式")]
public class MappingService : CommonDbEntity
{
/// <summary>
/// 代码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 船司代码
/// </summary>
public string CarrierCode { get; set; }
/// <summary>
/// 模块
/// </summary>
public string Module { get; set; }
/// <summary>
/// 映射代码
/// </summary>
public string MapCode { get; set; }
/// <summary>
/// 映射名称
/// </summary>
public string MapName { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
} }
} }

File diff suppressed because it is too large Load Diff

@ -94,7 +94,7 @@ public class AuthService : IAuthService, IDynamicApiController, ITransient
{ClaimConst.CLAINM_SUPERADMIN, user.AdminType}, {ClaimConst.CLAINM_SUPERADMIN, user.AdminType},
{ ClaimConst.CLAINM_TENANT_TYPE, tenant.TenantType }, { ClaimConst.CLAINM_TENANT_TYPE, tenant.TenantType },
{ ClaimConst.CLAINM_TENANT_NAME, tenant.Name }, { ClaimConst.CLAINM_TENANT_NAME, tenant.Name },
{ ClaimConst.DjyUserId, user.DjyUserId }, { ClaimConst.DjyUserId, user.DjyUserId },
}); });
// 设置Swagger自动登录 // 设置Swagger自动登录

@ -214,6 +214,50 @@ public interface ISysCacheService
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
Task SetAllMappingYard(List<MappingYard> list); Task SetAllMappingYard(List<MappingYard> list);
/// <summary>
/// 设置公共库 起始港映射
/// </summary>
/// <returns></returns>
Task SetAllMappingPortLoad(List<MappingPortLoad> list);
/// <summary>
/// 获取公共库 起始港映射
/// </summary>
/// <returns></returns>
Task<List<MappingPortLoad>> GetAllMappingPortLoad();
/// <summary>
/// 获取公共库 目的港映射
/// </summary>
/// <returns></returns>
Task<List<MappingPort>> GetAllMappingPort();
/// <summary>
/// 设置公共库 目的港映射
/// </summary>
/// <returns></returns>
Task SetAllMappingPort(List<MappingPort> list);
/// <summary>
/// 设置公共库 包装映射
/// </summary>
/// <returns></returns>
Task SetAllMappingPackage(List<MappingPackage> list);
/// <summary>
/// 获取公共库 包装映射
/// </summary>
/// <returns></returns>
Task<List<MappingPackage>> GetAllMappingPackage();
/// <summary>
/// 获取公共库 运输条款映射
/// </summary>
/// <returns></returns>
Task<List<MappingService>> GetAllMappingService();
/// <summary>
/// 设置公共库 运输条款映射
/// </summary>
/// <returns></returns>
Task SetAllMappingService(List<MappingService> list);
#endregion #endregion
#region DJY #region DJY

@ -419,7 +419,7 @@ public class SysCacheService : ISysCacheService, IDynamicApiController, ISinglet
} }
/// <summary> /// <summary>
/// 获取公共库 船名映射 /// 获取公共库 场站映射
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
public Task<List<MappingYard>> GetAllMappingYard() public Task<List<MappingYard>> GetAllMappingYard()
@ -562,8 +562,71 @@ public class SysCacheService : ISysCacheService, IDynamicApiController, ISinglet
{ {
return _cache.SetAsync(CommonConst.CACHE_KEY_COMMON_DB_MAPPING_YARD, list); return _cache.SetAsync(CommonConst.CACHE_KEY_COMMON_DB_MAPPING_YARD, list);
} }
/// <summary>
/// 设置公共库 起始港映射
/// </summary>
/// <returns></returns>
public Task SetAllMappingPortLoad(List<MappingPortLoad> list)
{
return _cache.SetAsync(CommonConst.CACHE_KEY_COMMON_DB_MAPPING_PORTLOAD, list);
}
/// <summary>
/// 获取公共库 起始港映射
/// </summary>
/// <returns></returns>
public Task<List<MappingPortLoad>> GetAllMappingPortLoad()
{
return _cache.GetAsync<List<MappingPortLoad>>(CommonConst.CACHE_KEY_COMMON_DB_MAPPING_PORTLOAD);
}
/// <summary>
/// 获取公共库 目的港映射
/// </summary>
/// <returns></returns>
public Task<List<MappingPort>> GetAllMappingPort()
{
return _cache.GetAsync<List<MappingPort>>(CommonConst.CACHE_KEY_COMMON_DB_MAPPING_PORT);
}
/// <summary>
/// 设置公共库 目的港映射
/// </summary>
/// <returns></returns>
public Task SetAllMappingPort(List<MappingPort> list)
{
return _cache.SetAsync(CommonConst.CACHE_KEY_COMMON_DB_MAPPING_PORT, list);
}
/// <summary>
/// 设置公共库 包装映射
/// </summary>
/// <returns></returns>
public Task SetAllMappingPackage(List<MappingPackage> list)
{
return _cache.SetAsync(CommonConst.CACHE_KEY_COMMON_DB_MAPPING_PACKAGE, list);
}
/// <summary>
/// 获取公共库 包装映射
/// </summary>
/// <returns></returns>
public Task<List<MappingPackage>> GetAllMappingPackage()
{
return _cache.GetAsync<List<MappingPackage>>(CommonConst.CACHE_KEY_COMMON_DB_MAPPING_PACKAGE);
}
/// <summary>
/// 获取公共库 运输条款映射
/// </summary>
/// <returns></returns>
public Task<List<MappingService>> GetAllMappingService()
{
return _cache.GetAsync<List<MappingService>>(CommonConst.CACHE_KEY_COMMON_DB_MAPPING_SERVICE);
} /// <summary>
/// 设置公共库 运输条款映射
/// </summary>
/// <returns></returns>
public Task SetAllMappingService(List<MappingService> list)
{
return _cache.SetAsync(CommonConst.CACHE_KEY_COMMON_DB_MAPPING_SERVICE, list);
}
#endregion #endregion
#region DJY #region DJY

@ -9,6 +9,7 @@ using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Collections.Generic; using System.Collections.Generic;
using System; using System;
using Myshipping.Core.Service.CommonDB.Dto;
namespace Myshipping.Core.Service; namespace Myshipping.Core.Service;
/// <summary> /// <summary>
@ -33,6 +34,10 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
private readonly SqlSugarRepository<MappingCtn> _mappingCtnRep; private readonly SqlSugarRepository<MappingCtn> _mappingCtnRep;
private readonly SqlSugarRepository<CodeFrt> _codeFrtRep; private readonly SqlSugarRepository<CodeFrt> _codeFrtRep;
private readonly SqlSugarRepository<MappingFrt> _mappingFrtRep; 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 ISysCacheService _sysCacheService;
public CommonDBService(SqlSugarRepository<CodeCarrier> codeCarrierRep, public CommonDBService(SqlSugarRepository<CodeCarrier> codeCarrierRep,
@ -50,6 +55,10 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
SqlSugarRepository<MappingCtn> mappingCtnRep, SqlSugarRepository<MappingCtn> mappingCtnRep,
SqlSugarRepository<MappingFrt> mappingFrtRep, SqlSugarRepository<MappingFrt> mappingFrtRep,
SqlSugarRepository<MappingYard> mappingYardRep, SqlSugarRepository<MappingYard> mappingYardRep,
SqlSugarRepository<MappingPortLoad> mappingPortLoadRep,
SqlSugarRepository<MappingPort> mappingPortRep,
SqlSugarRepository<MappingPackage> mappingPackageRep,
SqlSugarRepository<MappingService> mappingServiceRep,
ISysCacheService sysCacheService) ISysCacheService sysCacheService)
{ {
_codeCarrierRep = codeCarrierRep; _codeCarrierRep = codeCarrierRep;
@ -68,8 +77,10 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
_mappingFrtRep = mappingFrtRep; _mappingFrtRep = mappingFrtRep;
_mappingYardRep = mappingYardRep; _mappingYardRep = mappingYardRep;
_sysCacheService = sysCacheService; _sysCacheService = sysCacheService;
_mappingPortLoadRep = mappingPortLoadRep;
_mappingPortRep = mappingPortRep;
_mappingPackageRep = mappingPackageRep;
_mappingServiceRep = mappingServiceRep;
} }
@ -91,10 +102,12 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
/// 新增船公司信息 /// 新增船公司信息
/// </summary> /// </summary>
[HttpPost("/commondb/addcarrier")] [HttpPost("/commondb/addcarrier")]
public async Task AddCarrier([FromBody] CodeCarrier dto) public async Task AddCarrier([FromBody] CodeCarrierDto dto)
{ {
var entity = dto.Adapt<CodeCarrier>(); var entity = dto.Adapt<CodeCarrier>();
entity.GID = Guid.NewGuid().ToString(); entity.GID = Guid.NewGuid().ToString();
entity.CreateTime = DateTime.Now;
entity.CreateUser = UserManager.DjyUserId;
await _codeCarrierRep.InsertAsync(entity); await _codeCarrierRep.InsertAsync(entity);
await GetAllCarrier(); await GetAllCarrier();
} }
@ -119,17 +132,20 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
/// 新增编辑船公司映射信息 /// 新增编辑船公司映射信息
/// </summary> /// </summary>
[HttpPost("/commondb/addorupdatemappingcarrier")] [HttpPost("/commondb/addorupdatemappingcarrier")]
public async Task AddOrUpdateMappingCarrier([FromBody] MappingCarrier dto) public async Task AddOrUpdateMappingCarrier([FromBody] MappingCarrierDto dto)
{ {
var entity = dto.Adapt<MappingCarrier>(); var entity = dto.Adapt<MappingCarrier>();
if (string.IsNullOrWhiteSpace(dto.GID)) if (string.IsNullOrWhiteSpace(dto.GID))
{ {
entity.GID = Guid.NewGuid().ToString(); entity.GID = Guid.NewGuid().ToString();
entity.CreateTime = DateTime.Now;
entity.CreateUser =UserManager.DjyUserId;
await _mappingCarrierRep.InsertAsync(entity); await _mappingCarrierRep.InsertAsync(entity);
} }
else else
{ {
entity.ModifyTime = DateTime.Now;
entity.ModifyUser = UserManager.DjyUserId;
await _mappingCarrierRep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); await _mappingCarrierRep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
} }
@ -163,10 +179,12 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
/// 新增船名信息 /// 新增船名信息
/// </summary> /// </summary>
[HttpPost("/commondb/addvessel")] [HttpPost("/commondb/addvessel")]
public async Task AddVessel([FromBody] CodeVessel dto) public async Task AddVessel([FromBody] CodeVesselDto dto)
{ {
var entity = dto.Adapt<CodeVessel>(); var entity = dto.Adapt<CodeVessel>();
entity.GID = Guid.NewGuid().ToString(); entity.GID = Guid.NewGuid().ToString();
entity.CreateTime = DateTime.Now;
entity.CreateUser = UserManager.DjyUserId;
await _codeVesselRep.InsertAsync(entity); await _codeVesselRep.InsertAsync(entity);
await GetAllVessel(); await GetAllVessel();
} }
@ -195,17 +213,20 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
/// 新增编辑船名映射信息 /// 新增编辑船名映射信息
/// </summary> /// </summary>
[HttpPost("/commondb/addorupdatevessel")] [HttpPost("/commondb/addorupdatevessel")]
public async Task AddOrUpdateMappingVessel([FromBody] MappingVessel dto) public async Task AddOrUpdateMappingVessel([FromBody] MappingVesselDto dto)
{ {
var entity = dto.Adapt<MappingVessel>(); var entity = dto.Adapt<MappingVessel>();
if (string.IsNullOrWhiteSpace(dto.GID)) if (string.IsNullOrWhiteSpace(dto.GID))
{ {
entity.GID = Guid.NewGuid().ToString(); entity.GID = Guid.NewGuid().ToString();
entity.CreateTime = DateTime.Now;
entity.CreateUser = UserManager.DjyUserId;
await _mappingVesselRep.InsertAsync(entity); await _mappingVesselRep.InsertAsync(entity);
} }
else else
{ {
entity.ModifyTime = DateTime.Now;
entity.ModifyUser = UserManager.DjyUserId;
await _mappingVesselRep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); await _mappingVesselRep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
} }
@ -232,10 +253,12 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
/// 新增船代信息 /// 新增船代信息
/// </summary> /// </summary>
[HttpPost("/commondb/addforwarder")] [HttpPost("/commondb/addforwarder")]
public async Task AddForwarder([FromBody] CodeForwarder dto) public async Task AddForwarder([FromBody] CodeForwarderDto dto)
{ {
var entity = dto.Adapt<CodeForwarder>(); var entity = dto.Adapt<CodeForwarder>();
entity.GID = Guid.NewGuid().ToString(); entity.GID = Guid.NewGuid().ToString();
entity.CreateTime = DateTime.Now;
entity.CreateUser = UserManager.DjyUserId;
await _codeForwarderRep.InsertAsync(entity); await _codeForwarderRep.InsertAsync(entity);
await GetAllForwarder(); await GetAllForwarder();
} }
@ -259,10 +282,12 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
/// 新增场站信息 /// 新增场站信息
/// </summary> /// </summary>
[HttpPost("/commondb/addyard")] [HttpPost("/commondb/addyard")]
public async Task AddYard([FromBody] CodeYard dto) public async Task AddYard([FromBody] CodeYardDto dto)
{ {
var entity = dto.Adapt<CodeYard>(); var entity = dto.Adapt<CodeYard>();
entity.GID = Guid.NewGuid().ToString(); entity.GID = Guid.NewGuid().ToString();
entity.CreateTime = DateTime.Now;
entity.CreateUser = UserManager.DjyUserId;
await _codeYardRep.InsertAsync(entity); await _codeYardRep.InsertAsync(entity);
await GetAllYard(); await GetAllYard();
} }
@ -291,16 +316,20 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
/// 新增编辑场站映射信息 /// 新增编辑场站映射信息
/// </summary> /// </summary>
[HttpPost("/commondb/addorupdatemappingyard")] [HttpPost("/commondb/addorupdatemappingyard")]
public async Task AddOrUpdateMappingYard([FromBody] MappingYard dto) public async Task AddOrUpdateMappingYard([FromBody] MappingYardDto dto)
{ {
var entity = dto.Adapt<MappingYard>(); var entity = dto.Adapt<MappingYard>();
if (string.IsNullOrWhiteSpace(dto.GID)) if (string.IsNullOrWhiteSpace(dto.GID))
{ {
entity.GID = Guid.NewGuid().ToString(); entity.GID = Guid.NewGuid().ToString();
entity.CreateTime = DateTime.Now;
entity.CreateUser = UserManager.DjyUserId;
await _mappingYardRep.InsertAsync(entity); await _mappingYardRep.InsertAsync(entity);
} }
else else
{ {
entity.ModifyTime = DateTime.Now;
entity.ModifyUser = UserManager.DjyUserId;
await _mappingYardRep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); await _mappingYardRep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
} }
await GetAllMappingYard(); await GetAllMappingYard();
@ -328,13 +357,62 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
/// 新增起始港信息 /// 新增起始港信息
/// </summary> /// </summary>
[HttpPost("/commondb/addportload")] [HttpPost("/commondb/addportload")]
public async Task AddPortload([FromBody] CodePortLoad dto) public async Task AddPortload([FromBody] CodePortLoadDto dto)
{ {
var entity = dto.Adapt<CodePortLoad>(); var entity = dto.Adapt<CodePortLoad>();
entity.GID = Guid.NewGuid().ToString(); entity.GID = Guid.NewGuid().ToString();
entity.CreateTime = DateTime.Now;
entity.CreateUser = UserManager.DjyUserId;
await _codePortLoadrRep.InsertAsync(entity); await _codePortLoadrRep.InsertAsync(entity);
await GetAllPortload(); await GetAllPortload();
} }
/// <summary>
/// 获取起始港映射
/// </summary>
[HttpGet("/commondb/mappingportloadlist")]
public async Task<dynamic> PortloadList([FromQuery] MappingQueryDto input)
{
//数量太多,不允许查询全部
if (string.IsNullOrEmpty(input.Module) || input.Module.Length < 1)
{
return new List<MappingPortLoad>();
}
List<MappingPortLoad> list = await _sysCacheService.GetAllMappingPortLoad();
var queryList = list.WhereIF(!string.IsNullOrEmpty(input.Module), x => x.Module == input.Module)
.WhereIF(!string.IsNullOrEmpty(input.MapName), x => x.MapName.Contains(input.MapName, System.StringComparison.CurrentCultureIgnoreCase));
return queryList.ToList();
}
/// <summary>
/// 新增编辑起始港映射信息
/// </summary>
[HttpPost("/commondb/addorupdatemappingportload")]
public async Task AddOrUpdatePortload([FromBody] MappingPortLoadDto dto)
{
var entity = dto.Adapt<MappingPortLoad>();
if (string.IsNullOrWhiteSpace(dto.GID))
{
entity.GID = Guid.NewGuid().ToString();
entity.CreateTime = DateTime.Now;
entity.CreateUser = UserManager.DjyUserId;
await _mappingPortLoadRep.InsertAsync(entity);
}
else
{
entity.ModifyTime = DateTime.Now;
entity.ModifyUser = UserManager.DjyUserId;
await _mappingPortLoadRep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
}
await GetAllMappingPortLoad();
}
#endregion #endregion
#region 目的港 #region 目的港
@ -362,14 +440,57 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
/// 新增目的港信息 /// 新增目的港信息
/// </summary> /// </summary>
[HttpPost("/commondb/addport")] [HttpPost("/commondb/addport")]
public async Task AddPort([FromBody] CodePort dto) public async Task AddPort([FromBody] CodePortDto dto)
{ {
var entity = dto.Adapt<CodePort>(); var entity = dto.Adapt<CodePort>();
entity.GID = Guid.NewGuid().ToString(); entity.GID = Guid.NewGuid().ToString();
entity.CreateTime = DateTime.Now;
entity.CreateUser = UserManager.DjyUserId;
await _codePortRep.InsertAsync(entity); await _codePortRep.InsertAsync(entity);
await GetAllPort(); await GetAllPort();
} }
/// <summary>
/// 获取目的港映射
/// </summary>
[HttpGet("/commondb/mappingportlist")]
public async Task<dynamic> PortList([FromQuery] MappingQueryDto input)
{
//数量太多,不允许查询全部
if (string.IsNullOrEmpty(input.Module) || input.Module.Length < 1)
{
return new List<MappingPort>();
}
List<MappingPort> list = await _sysCacheService.GetAllMappingPort();
var queryList = list.WhereIF(!string.IsNullOrEmpty(input.Module), x => x.Module == input.Module)
.WhereIF(!string.IsNullOrEmpty(input.MapName), x => x.MapName.Contains(input.MapName, System.StringComparison.CurrentCultureIgnoreCase));
return queryList.ToList();
}
/// <summary>
/// 新增编辑目的港映射信息
/// </summary>
[HttpPost("/commondb/addorupdatemappingport")]
public async Task AddOrUpdatePort([FromBody] MappingPortDto dto)
{
var entity = dto.Adapt<MappingPort>();
if (string.IsNullOrWhiteSpace(dto.GID))
{
entity.GID = Guid.NewGuid().ToString();
entity.CreateTime = DateTime.Now;
entity.CreateUser = UserManager.DjyUserId;
await _mappingPortRep.InsertAsync(entity);
}
else
{
entity.ModifyTime = DateTime.Now;
entity.ModifyUser = UserManager.DjyUserId;
await _mappingPortRep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
}
await GetAllMappingPort();
}
#endregion #endregion
@ -390,7 +511,7 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
/// 新增包装信息 /// 新增包装信息
/// </summary> /// </summary>
[HttpPost("/commondb/addpackage")] [HttpPost("/commondb/addpackage")]
public async Task AddPackage([FromBody] CodePackage dto) public async Task AddPackage([FromBody] CodePackageDto dto)
{ {
var entity = dto.Adapt<CodePackage>(); var entity = dto.Adapt<CodePackage>();
entity.GID = Guid.NewGuid().ToString(); entity.GID = Guid.NewGuid().ToString();
@ -398,6 +519,49 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
await GetAllPackage(); await GetAllPackage();
} }
/// <summary>
/// 获取包装映射
/// </summary>
[HttpGet("/commondb/mappingpackage")]
public async Task<dynamic> MappingPackageList([FromQuery] MappingQueryDto input)
{
//数量太多,不允许查询全部
if (string.IsNullOrEmpty(input.Module) || input.Module.Length < 1)
{
return new List<MappingPackage>();
}
List<MappingPackage> list = await _sysCacheService.GetAllMappingPackage();
var queryList = list.WhereIF(!string.IsNullOrEmpty(input.Module), x => x.Module == input.Module)
.WhereIF(!string.IsNullOrEmpty(input.MapName), x => x.MapName.Contains(input.MapName, System.StringComparison.CurrentCultureIgnoreCase));
return queryList.ToList();
}
/// <summary>
/// 新增编辑包装映射信息
/// </summary>
[HttpPost("/commondb/addorupdatemappingpackage")]
public async Task AddOrUpdateMappingPackage([FromBody] MappingPackageDto dto)
{
var entity = dto.Adapt<MappingPackage>();
if (string.IsNullOrWhiteSpace(dto.GID))
{
entity.GID = Guid.NewGuid().ToString();
entity.CreateTime = DateTime.Now;
entity.CreateUser = UserManager.DjyUserId;
await _mappingPackageRep.InsertAsync(entity);
}
else
{
entity.ModifyTime = DateTime.Now;
entity.ModifyUser = UserManager.DjyUserId;
await _mappingPackageRep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
}
await GetAllMappingPackage();
}
#endregion #endregion
#region 运输条款 #region 运输条款
@ -418,14 +582,58 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
/// 新增运输条款 /// 新增运输条款
/// </summary> /// </summary>
[HttpPost("/commondb/addservice")] [HttpPost("/commondb/addservice")]
public async Task AddService([FromBody] CodeService dto) public async Task AddService([FromBody] CodeServiceDto dto)
{ {
var entity = dto.Adapt<CodeService>(); var entity = dto.Adapt<CodeService>();
entity.GID = Guid.NewGuid().ToString(); entity.GID = Guid.NewGuid().ToString();
entity.CreateTime = DateTime.Now;
entity.CreateUser = UserManager.DjyUserId;
await _codeServiceRep.InsertAsync(entity); await _codeServiceRep.InsertAsync(entity);
await GetAllService(); await GetAllService();
} }
/// <summary>
/// 获取运输条款映射
/// </summary>
[HttpGet("/commondb/mappingservice")]
public async Task<dynamic> MappingServiceList([FromQuery] MappingQueryDto input)
{
//数量太多,不允许查询全部
if (string.IsNullOrEmpty(input.Module) || input.Module.Length < 1)
{
return new List<MappingService>();
}
List<MappingService> list = await _sysCacheService.GetAllMappingService();
var queryList = list.WhereIF(!string.IsNullOrEmpty(input.Module), x => x.Module == input.Module)
.WhereIF(!string.IsNullOrEmpty(input.MapName), x => x.MapName.Contains(input.MapName, System.StringComparison.CurrentCultureIgnoreCase));
return queryList.ToList();
}
/// <summary>
/// 新增编辑运输条款映射信息
/// </summary>
[HttpPost("/commondb/addorupdatemappingservice")]
public async Task AddOrUpdateMappingService([FromBody] MappingServiceDto dto)
{
var entity = dto.Adapt<MappingService>();
if (string.IsNullOrWhiteSpace(dto.GID))
{
entity.GID = Guid.NewGuid().ToString();
entity.CreateTime = DateTime.Now;
entity.CreateUser = UserManager.DjyUserId;
await _mappingServiceRep.InsertAsync(entity);
}
else
{
entity.ModifyTime = DateTime.Now;
entity.ModifyUser = UserManager.DjyUserId;
await _mappingServiceRep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
}
await GetAllMappingService();
}
#endregion #endregion
@ -448,9 +656,11 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
/// 新增箱型 /// 新增箱型
/// </summary> /// </summary>
[HttpPost("/commondb/addctn")] [HttpPost("/commondb/addctn")]
public async Task AddCtn([FromBody] CodeCtn dto) public async Task AddCtn([FromBody] CodeCtnDto dto)
{ {
var entity = dto.Adapt<CodeCtn>(); var entity = dto.Adapt<CodeCtn>();
entity.CreateTime = DateTime.Now;
entity.CreateUser = UserManager.DjyUserId;
entity.GID = Guid.NewGuid().ToString(); entity.GID = Guid.NewGuid().ToString();
await _codeCtnRep.InsertAsync(entity); await _codeCtnRep.InsertAsync(entity);
await GetAllCtn(); await GetAllCtn();
@ -478,17 +688,20 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
/// 新增编辑箱型映射信息 /// 新增编辑箱型映射信息
/// </summary> /// </summary>
[HttpPost("/commondb/addmappingctn")] [HttpPost("/commondb/addmappingctn")]
public async Task AddOrUpdateMappingCtn([FromBody] MappingCtn dto) public async Task AddOrUpdateMappingCtn([FromBody] MappingCtnDto dto)
{ {
var entity = dto.Adapt<MappingCtn>(); var entity = dto.Adapt<MappingCtn>();
if (string.IsNullOrWhiteSpace(dto.GID)) if (string.IsNullOrWhiteSpace(dto.GID))
{ {
entity.GID = Guid.NewGuid().ToString(); entity.GID = Guid.NewGuid().ToString();
entity.CreateTime = DateTime.Now;
entity.CreateUser = UserManager.DjyUserId;
await _mappingCtnRep.InsertAsync(entity); await _mappingCtnRep.InsertAsync(entity);
} }
else else
{ {
entity.ModifyTime = DateTime.Now;
entity.ModifyUser = UserManager.DjyUserId;
await _mappingCtnRep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); await _mappingCtnRep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
} }
@ -516,10 +729,12 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
/// 新增付费方式 /// 新增付费方式
/// </summary> /// </summary>
[HttpPost("/commondb/addfrt")] [HttpPost("/commondb/addfrt")]
public async Task AddFrt([FromBody] CodeFrt dto) public async Task AddFrt([FromBody] CodeFrtDto dto)
{ {
var entity = dto.Adapt<CodeFrt>(); var entity = dto.Adapt<CodeFrt>();
entity.GID = Guid.NewGuid().ToString(); entity.GID = Guid.NewGuid().ToString();
entity.CreateTime = DateTime.Now;
entity.CreateUser = UserManager.DjyUserId;
await _codeFrtRep.InsertAsync(entity); await _codeFrtRep.InsertAsync(entity);
await GetAllFrt(); await GetAllFrt();
} }
@ -545,16 +760,20 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
/// 新增编辑付费映射信息 /// 新增编辑付费映射信息
/// </summary> /// </summary>
[HttpPost("/commondb/addmappingfrt")] [HttpPost("/commondb/addmappingfrt")]
public async Task AddOrUpdateMappingFrt([FromBody] MappingFrt dto) public async Task AddOrUpdateMappingFrt([FromBody] MappingFrtDto dto)
{ {
var entity = dto.Adapt<MappingFrt>(); var entity = dto.Adapt<MappingFrt>();
if (string.IsNullOrWhiteSpace(dto.GID)) if (string.IsNullOrWhiteSpace(dto.GID))
{ {
entity.GID = Guid.NewGuid().ToString(); entity.GID = Guid.NewGuid().ToString();
entity.CreateTime = DateTime.Now;
entity.CreateUser = UserManager.DjyUserId;
await _mappingFrtRep.InsertAsync(entity); await _mappingFrtRep.InsertAsync(entity);
} }
else else
{ {
entity.ModifyTime = DateTime.Now;
entity.ModifyUser = UserManager.DjyUserId;
await _mappingFrtRep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); await _mappingFrtRep.AsUpdateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync();
} }
await GetAllMappingFrt(); await GetAllMappingFrt();
@ -701,6 +920,45 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
return list; return list;
} }
[NonAction]
public async Task<List<MappingPortLoad>> GetAllMappingPortLoad()
{
var list = await _mappingPortLoadRep.ToListAsync();
await _sysCacheService.SetAllMappingPortLoad(list);
return list;
}
[NonAction]
public async Task<List<MappingPort>> GetAllMappingPort()
{
var list = await _mappingPortRep.ToListAsync();
await _sysCacheService.SetAllMappingPort(list);
return list;
}
[NonAction]
public async Task<List<MappingPackage>> GetAllMappingPackage()
{
var list = await _mappingPackageRep.ToListAsync();
await _sysCacheService.SetAllMappingPackage(list);
return list;
}
[NonAction]
public async Task<List<MappingService>> GetAllMappingService()
{
var list = await _mappingServiceRep.ToListAsync();
await _sysCacheService.SetAllMappingService(list);
return list;
}
#endregion #endregion
} }

@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Core.Service.CommonDB.Dto
{
public class CodeCarrierDto
{
/// <summary>
/// 代码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 英文名称
/// </summary>
public string EnName { get; set; }
/// <summary>
/// 中文名称
/// </summary>
public string CnName { get; set; }
/// <summary>
/// EDI代码
/// </summary>
public string EdiCode { get; set; }
/// <summary>
/// 描述
/// </summary>
public string Description { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
}
}

@ -0,0 +1,45 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Core.Service.CommonDB.Dto
{
public class CodeCtnDto
{
/// <summary>
/// 代码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 尺寸
/// </summary>
public int? Size { get; set; }
/// <summary>
/// 名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// EDI代码
/// </summary>
public string EdiCode { get; set; }
/// <summary>
/// 描述
/// </summary>
public string Description { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
}
}

@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Core.Service.CommonDB.Dto
{
public class CodeForwarderDto
{
/// <summary>
/// 代码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 描述
/// </summary>
public string Description { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
}
}

@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Core.Service.CommonDB.Dto
{
public class CodeFrtDto
{
/// <summary>
/// 代码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 英文名称
/// </summary>
public string EnName { get; set; }
/// <summary>
/// 中文名称
/// </summary>
public string CnName { get; set; }
/// <summary>
/// 描述
/// </summary>
public string Description { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
}
}

@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Core.Service.CommonDB.Dto
{
public class CodePackageDto
{
/// <summary>
/// 代码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// EDI代码
/// </summary>
public string EdiCode { get; set; }
/// <summary>
/// 描述
/// </summary>
public string Description { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
}
}

@ -0,0 +1,65 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Core.Service.CommonDB.Dto
{
public class CodePortDto
{
/// <summary>
/// 代码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 英文名称
/// </summary>
public string EnName { get; set; }
/// <summary>
/// 中文名称
/// </summary>
public string CnName { get; set; }
/// <summary>
/// 航线
/// </summary>
public string ShippingRoute { get; set; }
/// <summary>
/// 国家
/// </summary>
public string Country { get; set; }
/// <summary>
/// 国家代码
/// </summary>
public string CountryCode { get; set; }
/// <summary>
/// 全名
/// </summary>
public string FullName { get; set; }
/// <summary>
/// 描述
/// </summary>
public string Description { get; set; }
/// <summary>
/// EDI代码
/// </summary>
public string EdiCode { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
}
}

@ -0,0 +1,41 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Core.Service.CommonDB.Dto
{
public class CodePortLoadDto
{
/// <summary>
/// 代码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 英文名称
/// </summary>
public string EnName { get; set; }
/// <summary>
/// 中文名称
/// </summary>
public string CnName { get; set; }
/// <summary>
/// 描述
/// </summary>
public string Description { get; set; }
/// <summary>
/// EDI代码
/// </summary>
public string EdiCode { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
}
}

@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Core.Service.CommonDB.Dto
{
public class CodeServiceDto
{ /// <summary>
/// 代码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// EDI代码
/// </summary>
public string EdiCode { get; set; }
/// <summary>
/// 描述
/// </summary>
public string Description { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
}
}

@ -0,0 +1,53 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Core.Service.CommonDB.Dto
{
public class CodeVesselDto
{
/// <summary>
/// 名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// EDI代码
/// </summary>
public string EdiCode { get; set; }
/// <summary>
/// 描述
/// </summary>
public string Description { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreateTime { get; set; }
/// <summary>
/// 修改时间
/// </summary>
public DateTime? ModifyTime { get; set; }
/// <summary>
/// 创建人
/// </summary>
public string CreateUser { get; set; }
/// <summary>
/// 修改人
/// </summary>
public string ModifyUser { get; set; }
}
}

@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Core.Service.CommonDB.Dto
{
public class CodeYardDto
{
/// <summary>
/// 代码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 描述
/// </summary>
public string Description { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
}
}

@ -0,0 +1,42 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Core.Service.CommonDB.Dto
{
public class MappingCarrierDto
{
/// <summary>
/// 业务id
/// </summary>
public string GID { get; set; }
/// <summary>
/// 代码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 模块
/// </summary>
public string Module { get; set; }
/// <summary>
/// 映射代码
/// </summary>
public string MapCode { get; set; }
/// <summary>
/// 映射名称
/// </summary>
public string MapName { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
}
}

@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Core.Service.CommonDB.Dto
{
public class MappingCtnDto
{
/// <summary>
/// 业务id
/// </summary>
public string GID { get; set; }
/// <summary>
/// 代码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 船司代码
/// </summary>
public string CarrierCode { get; set; }
/// <summary>
/// 模块
/// </summary>
public string Module { get; set; }
/// <summary>
/// 映射代码
/// </summary>
public string MapCode { get; set; }
/// <summary>
/// 映射名称
/// </summary>
public string MapName { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
}
}

@ -0,0 +1,45 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Core.Service.CommonDB.Dto
{
public class MappingFrtDto
{
/// <summary>
/// 业务id
/// </summary>
public string GID { get; set; }
/// <summary>
/// 代码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 船司代码
/// </summary>
public string CarrierCode { get; set; }
/// <summary>
/// 模块
/// </summary>
public string Module { get; set; }
/// <summary>
/// 映射代码
/// </summary>
public string MapCode { get; set; }
/// <summary>
/// 映射名称
/// </summary>
public string MapName { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
}
}

@ -0,0 +1,45 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Core.Service.CommonDB.Dto
{
public class MappingServiceDto
{
/// <summary>
/// 业务id
/// </summary>
public string GID { get; set; }
/// <summary>
/// 代码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 船司代码
/// </summary>
public string CarrierCode { get; set; }
/// <summary>
/// 模块
/// </summary>
public string Module { get; set; }
/// <summary>
/// 映射代码
/// </summary>
public string MapCode { get; set; }
/// <summary>
/// 映射名称
/// </summary>
public string MapName { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
}
}

@ -0,0 +1,45 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Core.Service.CommonDB.Dto
{
public class MappingPortDto
{
/// <summary>
///业务id
/// </summary>
public string GID { get; set; }
/// <summary>
/// 代码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 船司代码
/// </summary>
public string CarrierCode { get; set; }
/// <summary>
/// 模块
/// </summary>
public string Module { get; set; }
/// <summary>
/// 映射代码
/// </summary>
public string MapCode { get; set; }
/// <summary>
/// 映射名称
/// </summary>
public string MapName { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
}
}

@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Core.Service.CommonDB.Dto
{
public class MappingPortLoadDto
{
/// <summary>
/// 业务id
/// </summary>
public string GID { get; set; }
/// <summary>
/// 代码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 船司代码
/// </summary>
public string CarrierCode { get; set; }
/// <summary>
/// 模块
/// </summary>
public string Module { get; set; }
/// <summary>
/// 映射代码
/// </summary>
public string MapCode { get; set; }
/// <summary>
/// 映射名称
/// </summary>
public string MapName { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
}
}

@ -0,0 +1,45 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Core.Service.CommonDB.Dto
{
public class MappingPackageDto
{
/// <summary>
/// 业务id
/// </summary>
public string GID { get; set; }
/// <summary>
/// 代码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 船司代码
/// </summary>
public string CarrierCode { get; set; }
/// <summary>
/// 模块
/// </summary>
public string Module { get; set; }
/// <summary>
/// 映射代码
/// </summary>
public string MapCode { get; set; }
/// <summary>
/// 映射名称
/// </summary>
public string MapName { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
}
}

@ -0,0 +1,33 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Core.Service.CommonDB.Dto
{
public class MappingVesselDto
{
public string GID { get; set; }
/// <summary>
/// 名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 模块
/// </summary>
public string Module { get; set; }
/// <summary>
/// 映射名称
/// </summary>
public string MapName { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
}
}

@ -0,0 +1,41 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Core.Service.CommonDB.Dto
{
public class MappingYardDto
{
/// <summary>
/// 业务id
/// </summary>
public string GID { get; set; }
/// <summary>
/// 代码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 模块
/// </summary>
public string Module { get; set; }
/// <summary>
/// 映射代码
/// </summary>
public string MapCode { get; set; }
/// <summary>
/// 映射名称
/// </summary>
public string MapName { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
}
}

@ -95,4 +95,23 @@ public interface ICommonDBService
/// 付费方式映射 /// 付费方式映射
/// </summary> /// </summary>
Task<List<MappingFrt>> GetAllMappingFrt(); Task<List<MappingFrt>> GetAllMappingFrt();
/// <summary>
/// 起始港映射
/// </summary>
Task<List<MappingPortLoad>> GetAllMappingPortLoad();
/// <summary>
/// 目的港映射
/// </summary>
Task<List<MappingPort>> GetAllMappingPort();
/// <summary>
/// 包装映射
/// </summary>
Task<List<MappingPackage>> GetAllMappingPackage();
/// <summary>
/// 运输服务映射
/// </summary>
Task<List<MappingService>> GetAllMappingService();
} }

@ -168,6 +168,15 @@ public class Startup : AppStartup
//付费方式映射 //付费方式映射
App.GetService<ICommonDBService>().GetAllMappingFrt(); App.GetService<ICommonDBService>().GetAllMappingFrt();
//起始港映射
App.GetService<ICommonDBService>().GetAllMappingPortLoad();
//目的港映射
App.GetService<ICommonDBService>().GetAllMappingPort();
//包装映射
App.GetService<ICommonDBService>().GetAllMappingPackage();
//运输服务映射
App.GetService<ICommonDBService>().GetAllMappingService();
#endregion #endregion
} }

Loading…
Cancel
Save