|
|
|
@ -104,7 +104,7 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
|
|
|
|
|
_codeLaneRep = codeLaneRep;
|
|
|
|
|
_relaPortCarrierLaneRep = relaPortCarrierLaneRep;
|
|
|
|
|
_codeCountryRep = codeCountryRep;
|
|
|
|
|
_mappingIssueTypeRep= mappingIssueTypeRep;
|
|
|
|
|
_mappingIssueTypeRep = mappingIssueTypeRep;
|
|
|
|
|
_mappingForwarder = mappingForwarder;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -526,7 +526,7 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
var list = await _sysCacheService.GetAllMappingYard();
|
|
|
|
|
var count = list.Where(x => x.Code == dto.Code && x.Module == dto.Module && x.GID != dto.GID).Count();
|
|
|
|
|
var count = list.Where(x => x.Code == dto.Code && x.Module == dto.Module && x.CarrierCode == dto.CarrierCode && x.GID != dto.GID).Count();
|
|
|
|
|
if (count > 0)
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah(ErrorCode.D1006);
|
|
|
|
@ -1328,7 +1328,7 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
|
|
|
|
|
public async Task AddOrUpdateMappingIssueType([FromBody] MappingIssueTypeDto dto)
|
|
|
|
|
{
|
|
|
|
|
var list = await _sysCacheService.GetAllMappingIssueType();
|
|
|
|
|
var count = list.Where(x => x.Code == dto.Code && x.Module == dto.Module && x.GID != dto.GID).Count();
|
|
|
|
|
var count = list.Where(x => x.Code == dto.Code && x.Module == dto.Module && x.GID != dto.GID).Count();
|
|
|
|
|
if (count > 0)
|
|
|
|
|
{
|
|
|
|
|
throw Oops.Bah(ErrorCode.D1006);
|
|
|
|
@ -1578,13 +1578,13 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="input">查询条件</param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpGet("/commondb/CodeCountryList")]
|
|
|
|
|
[HttpGet("/commondb/CodeCountryList")]
|
|
|
|
|
public async Task<dynamic> CodeCountryList([FromQuery] NameQueryDto input)
|
|
|
|
|
{
|
|
|
|
|
List<CodeCountry> list = await _sysCacheService.GetAllCodeCountry();
|
|
|
|
|
|
|
|
|
|
var queryList = list
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(input.Name),x=>x.Code.ToUpper()==input.Name.ToUpper())
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(input.Name), x => x.Code.ToUpper() == input.Name.ToUpper())
|
|
|
|
|
.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))
|
|
|
|
|