wet 2 years ago
commit b0e075f79d

@ -42,16 +42,30 @@ namespace Myshipping.Core.Entity
[Description("船名映射")] [Description("船名映射")]
public class MappingVessel : CommonDbEntity public class MappingVessel : CommonDbEntity
{ {
/// <summary>
/// 代码
/// </summary>
public string Code { get; set; }
/// <summary> /// <summary>
/// 名称 /// 名称
/// </summary> /// </summary>
public string Name { get; set; } public string Name { get; set; }
/// <summary>
/// 场站代码
/// </summary>
public string YardCode { get; set; }
/// <summary> /// <summary>
/// 模块 /// 模块
/// </summary> /// </summary>
public string Module { get; set; } public string Module { get; set; }
/// <summary>
/// 映射代码
/// </summary>
public string MapCode { get; set; }
/// <summary> /// <summary>
/// 映射名称 /// 映射名称
/// </summary> /// </summary>
@ -62,5 +76,6 @@ namespace Myshipping.Core.Entity
/// </summary> /// </summary>
public string Remark { get; set; } public string Remark { get; set; }
} }
} }

@ -1392,16 +1392,31 @@
备注 备注
</summary> </summary>
</member> </member>
<member name="P:Myshipping.Core.Entity.MappingVessel.Code">
<summary>
代码
</summary>
</member>
<member name="P:Myshipping.Core.Entity.MappingVessel.Name"> <member name="P:Myshipping.Core.Entity.MappingVessel.Name">
<summary> <summary>
名称 名称
</summary> </summary>
</member> </member>
<member name="P:Myshipping.Core.Entity.MappingVessel.YardCode">
<summary>
场站代码
</summary>
</member>
<member name="P:Myshipping.Core.Entity.MappingVessel.Module"> <member name="P:Myshipping.Core.Entity.MappingVessel.Module">
<summary> <summary>
模块 模块
</summary> </summary>
</member> </member>
<member name="P:Myshipping.Core.Entity.MappingVessel.MapCode">
<summary>
映射代码
</summary>
</member>
<member name="P:Myshipping.Core.Entity.MappingVessel.MapName"> <member name="P:Myshipping.Core.Entity.MappingVessel.MapName">
<summary> <summary>
映射名称 映射名称
@ -8619,6 +8634,11 @@
排序 排序
</summary> </summary>
</member> </member>
<member name="P:Myshipping.Core.Service.CommonDB.Dto.MappingVesselDto.Code">
<summary>
代码
</summary>
</member>
<member name="P:Myshipping.Core.Service.CommonDB.Dto.MappingVesselDto.Name"> <member name="P:Myshipping.Core.Service.CommonDB.Dto.MappingVesselDto.Name">
<summary> <summary>
名称 名称
@ -8629,6 +8649,7 @@
模块 模块
</summary> </summary>
</member> </member>
<!-- Badly formed XML comment ignored for member "P:Myshipping.Core.Service.CommonDB.Dto.MappingVesselDto.MapCode" -->
<member name="P:Myshipping.Core.Service.CommonDB.Dto.MappingVesselDto.MapName"> <member name="P:Myshipping.Core.Service.CommonDB.Dto.MappingVesselDto.MapName">
<summary> <summary>
映射名称 映射名称
@ -8644,6 +8665,11 @@
排序 排序
</summary> </summary>
</member> </member>
<member name="P:Myshipping.Core.Service.CommonDB.Dto.MappingVesselDto.YardCode">
<summary>
场站代码
</summary>
</member>
<member name="P:Myshipping.Core.Service.CommonDB.Dto.MappingYardDto.GID"> <member name="P:Myshipping.Core.Service.CommonDB.Dto.MappingYardDto.GID">
<summary> <summary>
业务id 业务id

@ -276,7 +276,11 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
var queryList = list.Where(x => x.Module == input.Module) var queryList = list.Where(x => x.Module == input.Module)
.WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.MapName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase) .WhereIF(!string.IsNullOrEmpty(input.KeyWord), x => x.MapName.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|| x.Name.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)); || x.Name.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|| x.Code.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|| x.MapCode.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase)
|| x.YardCode.Contains(input.KeyWord, System.StringComparison.CurrentCultureIgnoreCase));
if (queryList.Count() > 20) if (queryList.Count() > 20)
{ {
return queryList.Take(input.Limit).OrderBy(x => x.Sort).ToList(); return queryList.Take(input.Limit).OrderBy(x => x.Sort).ToList();
@ -290,10 +294,12 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
[HttpPost("/commondb/addorupdatevessel")] [HttpPost("/commondb/addorupdatevessel")]
public async Task AddOrUpdateMappingVessel([FromBody] MappingVesselDto dto) public async Task AddOrUpdateMappingVessel([FromBody] MappingVesselDto dto)
{ {
var list = await _sysCacheService.GetAllMappingVessel(); var list = await _sysCacheService.GetAllMappingVessel();
var count = list.Where(x => x.Name == dto.Name.Trim() && x.Module == dto.Module && x.GID != dto.GID).Count(); var count = list.Where(x => x.Code == dto.Code.Trim()
&& x.Module == dto.Module
&& x.YardCode == dto.YardCode
&& x.GID != dto.GID).Count();
if (count > 0) if (count > 0)
{ {
throw Oops.Bah(ErrorCode.D1006); throw Oops.Bah(ErrorCode.D1006);

@ -9,6 +9,12 @@ namespace Myshipping.Core.Service.CommonDB.Dto
public class MappingVesselDto public class MappingVesselDto
{ {
public string GID { get; set; } public string GID { get; set; }
/// <summary>
/// 代码
/// </summary>
public string Code { get; set; }
/// <summary> /// <summary>
/// 名称 /// 名称
/// </summary> /// </summary>
@ -19,6 +25,11 @@ namespace Myshipping.Core.Service.CommonDB.Dto
/// </summary> /// </summary>
public string Module { get; set; } public string Module { get; set; }
// <summary>
/// 映射代码
/// </summary>
public string MapCode { get; set; }
/// <summary> /// <summary>
/// 映射名称 /// 映射名称
/// </summary> /// </summary>
@ -33,5 +44,10 @@ namespace Myshipping.Core.Service.CommonDB.Dto
/// </summary> /// </summary>
public int Sort { get; set; } public int Sort { get; set; }
/// <summary>
/// 场站代码
/// </summary>
public string YardCode { get; set; }
} }
} }

Loading…
Cancel
Save