修改船名映射基础数据

optimize
jianghaiqing 2 years ago
parent 9edee588fb
commit 6a1f6e62fb

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

@ -1392,16 +1392,31 @@
备注
</summary>
</member>
<member name="P:Myshipping.Core.Entity.MappingVessel.Code">
<summary>
代码
</summary>
</member>
<member name="P:Myshipping.Core.Entity.MappingVessel.Name">
<summary>
名称
</summary>
</member>
<member name="P:Myshipping.Core.Entity.MappingVessel.YardCode">
<summary>
场站代码
</summary>
</member>
<member name="P:Myshipping.Core.Entity.MappingVessel.Module">
<summary>
模块
</summary>
</member>
<member name="P:Myshipping.Core.Entity.MappingVessel.MapCode">
<summary>
映射代码
</summary>
</member>
<member name="P:Myshipping.Core.Entity.MappingVessel.MapName">
<summary>
映射名称
@ -8619,6 +8634,11 @@
排序
</summary>
</member>
<member name="P:Myshipping.Core.Service.CommonDB.Dto.MappingVesselDto.Code">
<summary>
代码
</summary>
</member>
<member name="P:Myshipping.Core.Service.CommonDB.Dto.MappingVesselDto.Name">
<summary>
名称
@ -8629,6 +8649,7 @@
模块
</summary>
</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">
<summary>
映射名称
@ -8644,6 +8665,11 @@
排序
</summary>
</member>
<member name="P:Myshipping.Core.Service.CommonDB.Dto.MappingVesselDto.YardCode">
<summary>
场站代码
</summary>
</member>
<member name="P:Myshipping.Core.Service.CommonDB.Dto.MappingYardDto.GID">
<summary>
业务id
@ -17720,6 +17746,16 @@
东胜id
</summary>
</member>
<member name="P:Myshipping.Application.Entity.DjyVesselInfo.CreatedUserName">
<summary>
创建人名称
</summary>
</member>
<member name="P:Myshipping.Application.Entity.DjyVesselInfo.CreatedUserId">
<summary>
创建者Id
</summary>
</member>
<member name="P:Myshipping.Application.Entity.DjyVesselInfoDto.BSNO">
<summary>
东胜id
@ -17810,5 +17846,10 @@
内部航次
</summary>
</member>
<member name="P:Myshipping.Application.Entity.DjyVesselInfoDto.CreatedUserName">
<summary>
创建人名称
</summary>
</member>
</members>
</doc>

@ -276,7 +276,11 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
var queryList = list.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));
|| 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)
{
return queryList.Take(input.Limit).OrderBy(x => x.Sort).ToList();
@ -290,10 +294,12 @@ public class CommonDBService : ICommonDBService, IDynamicApiController, ITransie
[HttpPost("/commondb/addorupdatevessel")]
public async Task AddOrUpdateMappingVessel([FromBody] MappingVesselDto dto)
{
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)
{
throw Oops.Bah(ErrorCode.D1006);

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

Loading…
Cancel
Save