|
|
|
@ -12,6 +12,7 @@ using System;
|
|
|
|
|
using Myshipping.Core.Service.CommonDB.Dto;
|
|
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
|
using Myshipping.Core.Entity.CommonDB;
|
|
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
|
|
|
|
|
|
|
namespace Myshipping.Core.Service;
|
|
|
|
|
/// <summary>
|
|
|
|
@ -2332,12 +2333,12 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 公开数据:获取起运港映射代码
|
|
|
|
|
/// </summary>
|
|
|
|
|
[HttpGet("/commondb/OpenGetMappingPortload"), ApiUser(ApiCode = "CommonDbOpenData")]
|
|
|
|
|
[HttpGet("/commondb/OpenGetMappingPortload"), AllowAnonymous, ApiUser(ApiCode = "CommonDbOpenData")]
|
|
|
|
|
public async Task<dynamic> OpenGetMappingPortload([FromQuery] OpenGetMappingPortLoadDto input)
|
|
|
|
|
{
|
|
|
|
|
List<MappingPortLoad> list = await _sysCacheService.GetAllMappingPortLoad();
|
|
|
|
|
|
|
|
|
|
var map = list.FirstOrDefault(x => x.Module == input.Module && x.Code == input.Code);
|
|
|
|
|
var map = list.FirstOrDefault(x => x.Module == input.Module && x.Code == input.Code && x.CarrierCode == input.CarrierCode);
|
|
|
|
|
if (map != null)
|
|
|
|
|
{
|
|
|
|
|
return new { map.MapCode, map.MapName };
|
|
|
|
@ -2349,12 +2350,12 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 公开数据:获取目的港映射代码
|
|
|
|
|
/// </summary>
|
|
|
|
|
[HttpGet("/commondb/OpenGetMappingPort"), ApiUser(ApiCode = "CommonDbOpenData")]
|
|
|
|
|
[HttpGet("/commondb/OpenGetMappingPort"), AllowAnonymous, ApiUser(ApiCode = "CommonDbOpenData")]
|
|
|
|
|
public async Task<dynamic> OpenGetMappingPort([FromQuery] OpenGetMappingPortLoadDto input)
|
|
|
|
|
{
|
|
|
|
|
List<MappingPort> list = await _sysCacheService.GetAllMappingPort();
|
|
|
|
|
|
|
|
|
|
var map = list.FirstOrDefault(x => x.Module == input.Module && x.Code == input.Code);
|
|
|
|
|
var map = list.FirstOrDefault(x => x.Module == input.Module && x.Code == input.Code && x.CarrierCode == input.CarrierCode);
|
|
|
|
|
if (map != null)
|
|
|
|
|
{
|
|
|
|
|
return new { map.MapCode, map.MapName };
|
|
|
|
|