公共库

booking_auth_dev
wanghaomei 2 years ago
parent ff37cc0ed3
commit af0558c550

@ -38,6 +38,14 @@ public class CommonConst
/// 所有权限缓存
/// </summary>
public const string CACHE_KEY_ALLPERMISSION = "allpermission";
#region 公共数据库
public const string CACHE_KEY_COMMON_DB_CARRIER = "CommonDbCarrier";
public const string CACHE_KEY_COMMON_DB_VESSEL = "CommonDbVessel";
public const string CACHE_KEY_COMMON_DB_FORWARDER = "CommonDbForwarder";
public const string CACHE_KEY_COMMON_DB_YARD = "CommonDbYard";
#endregion
#endregion
/// <summary>

@ -0,0 +1,48 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Core.Entity
{
[SugarTable("CodeCarrier")]
[Description("船公司信息")]
public class CodeCarrier : CommonDbEntity
{
/// <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,78 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Core.Entity
{
[SugarTable("CodeCity")]
[Description("城市")]
public class CodeCity : CommonDbEntity
{
/// <summary>
/// 代码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 省份代码
/// </summary>
public string ProvinceCode { get; set; }
/// <summary>
/// 省份名称
/// </summary>
public string ProvinceName { get; set; }
/// <summary>
/// 中文名称
/// </summary>
public string CNName { get; set; }
/// <summary>
/// 英文名称
/// </summary>
public string EnName { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
/// <summary>
/// 区域代码
/// </summary>
public string AreaCode { get; set; }
/// <summary>
/// 邮编
/// </summary>
public string PostCode { 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,73 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Core.Entity
{
[SugarTable("CodeCountry")]
[Description("国家")]
public class CodeCountry : CommonDbEntity
{
/// <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 Capital { get; set; }
/// <summary>
/// 大洲
/// </summary>
public string Continent { 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,49 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Core.Entity
{
[SugarTable("CodeCtn")]
[Description("箱型")]
public class CodeCtn : CommonDbEntity
{
/// <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,38 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Core.Entity
{
[SugarTable("CodeDangerGrade")]
[Description("危险品等级")]
public class CodeDangerGrade : CommonDbEntity
{
/// <summary>
/// 代码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 等级
/// </summary>
public string Grade { get; set; }
/// <summary>
/// 描述
/// </summary>
public string Description { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
}
}

@ -0,0 +1,38 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Core.Entity
{
[SugarTable("CodeForwarder")]
[Description("船代")]
public class CodeForwarder : CommonDbEntity
{
/// <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,43 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Core.Entity
{
[SugarTable("CodePackage")]
[Description("包装")]
public class CodePackage : CommonDbEntity
{
/// <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,69 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Core.Entity
{
[SugarTable("CodePort")]
[Description("目的港")]
public class CodePort : CommonDbEntity
{
/// <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,48 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Core.Entity
{
[SugarTable("CodePortLoad")]
[Description("起运港")]
public class CodePortLoad : CommonDbEntity
{
/// <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,48 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Core.Entity
{
[SugarTable("CodeProvince")]
[Description("省份")]
public class CodeProvince : CommonDbEntity
{
/// <summary>
/// 代码
/// </summary>
public string Code { get; set; }
/// <summary>
/// 国家
/// </summary>
public string Country { get; set; }
/// <summary>
/// 中文名称
/// </summary>
public string CNName { get; set; }
/// <summary>
/// 英文名称
/// </summary>
public string ENName { get; set; }
/// <summary>
/// 描述
/// </summary>
public string Description { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
}
}

@ -0,0 +1,43 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Core.Entity
{
[SugarTable("CodeService")]
[Description("运输方式")]
public class CodeService : CommonDbEntity
{
/// <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,57 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Core.Entity
{
[SugarTable("CodeVessel")]
[Description("船名")]
public class CodeVessel : CommonDbEntity
{
/// <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,57 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Core.Entity
{
[SugarTable("CodeYard")]
[Description("场站")]
public class CodeYard : CommonDbEntity
{
/// <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; }
/// <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,40 @@
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Core.Entity
{
[Tenant("common")]
public class CommonDbEntity
{
/// <summary>
/// 主键
/// </summary>
[SugarColumn(ColumnDescription = "主键", IsPrimaryKey = true)]
public string GID { 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; }
}
}

@ -572,6 +572,486 @@
删除字段
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeCarrier.Code">
<summary>
代码
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeCarrier.EnName">
<summary>
英文名称
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeCarrier.CnName">
<summary>
中文名称
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeCarrier.EdiCode">
<summary>
EDI代码
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeCarrier.Description">
<summary>
描述
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeCarrier.Remark">
<summary>
备注
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeCity.Code">
<summary>
代码
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeCity.ProvinceCode">
<summary>
省份代码
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeCity.ProvinceName">
<summary>
省份名称
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeCity.CNName">
<summary>
中文名称
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeCity.EnName">
<summary>
英文名称
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeCity.Remark">
<summary>
备注
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeCity.AreaCode">
<summary>
区域代码
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeCity.PostCode">
<summary>
邮编
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeCity.CreateTime">
<summary>
创建时间
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeCity.ModifyTime">
<summary>
修改时间
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeCity.CreateUser">
<summary>
创建人
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeCity.ModifyUser">
<summary>
修改人
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeCountry.Code">
<summary>
代码
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeCountry.EnName">
<summary>
英文名
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeCountry.CnName">
<summary>
中文名
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeCountry.Capital">
<summary>
首都
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeCountry.Continent">
<summary>
大洲
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeCountry.Description">
<summary>
描述
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeCountry.Remark">
<summary>
备注
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeCountry.CreateTime">
<summary>
创建时间
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeCountry.ModifyTime">
<summary>
修改时间
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeCountry.CreateUser">
<summary>
创建人
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeCountry.ModifyUser">
<summary>
修改人
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeCtn.Code">
<summary>
代码
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeCtn.Size">
<summary>
尺寸
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeCtn.Name">
<summary>
名称
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeCtn.EdiCode">
<summary>
EDI代码
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeCtn.Description">
<summary>
描述
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeCtn.Remark">
<summary>
备注
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeDangerGrade.Code">
<summary>
代码
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeDangerGrade.Grade">
<summary>
等级
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeDangerGrade.Description">
<summary>
描述
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeDangerGrade.Remark">
<summary>
备注
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeForwarder.Code">
<summary>
代码
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeForwarder.Name">
<summary>
名称
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeForwarder.Description">
<summary>
描述
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeForwarder.Remark">
<summary>
备注
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodePackage.Code">
<summary>
代码
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodePackage.Name">
<summary>
名称
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodePackage.EdiCode">
<summary>
EDI代码
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodePackage.Description">
<summary>
描述
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodePackage.Remark">
<summary>
备注
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodePort.Code">
<summary>
代码
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodePort.EnName">
<summary>
英文名称
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodePort.CnName">
<summary>
中文名称
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodePort.ShippingRoute">
<summary>
航线
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodePort.Country">
<summary>
国家
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodePort.CountryCode">
<summary>
国家代码
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodePort.FullName">
<summary>
全名
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodePort.Description">
<summary>
描述
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodePort.EdiCode">
<summary>
EDI代码
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodePort.Remark">
<summary>
备注
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodePortLoad.Code">
<summary>
代码
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodePortLoad.EnName">
<summary>
英文名称
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodePortLoad.CnName">
<summary>
中文名称
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodePortLoad.Description">
<summary>
描述
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodePortLoad.EdiCode">
<summary>
EDI代码
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodePortLoad.Remark">
<summary>
备注
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeProvince.Code">
<summary>
代码
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeProvince.Country">
<summary>
国家
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeProvince.CNName">
<summary>
中文名称
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeProvince.ENName">
<summary>
英文名称
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeProvince.Description">
<summary>
描述
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeProvince.Remark">
<summary>
备注
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeService.Code">
<summary>
代码
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeService.Name">
<summary>
名称
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeService.EdiCode">
<summary>
EDI代码
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeService.Description">
<summary>
描述
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeService.Remark">
<summary>
备注
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeVessel.Name">
<summary>
名称
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeVessel.EdiCode">
<summary>
EDI代码
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeVessel.Description">
<summary>
描述
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeVessel.Remark">
<summary>
备注
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeVessel.CreateTime">
<summary>
创建时间
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeVessel.ModifyTime">
<summary>
修改时间
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeVessel.CreateUser">
<summary>
创建人
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeVessel.ModifyUser">
<summary>
修改人
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeYard.Code">
<summary>
代码
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeYard.Name">
<summary>
名称
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeYard.Description">
<summary>
描述
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeYard.Remark">
<summary>
备注
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeYard.CreateTime">
<summary>
创建时间
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeYard.ModifyTime">
<summary>
修改时间
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeYard.CreateUser">
<summary>
创建人
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CodeYard.ModifyUser">
<summary>
修改人
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CommonDbEntity.GID">
<summary>
主键
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CommonDbEntity.CreateTime">
<summary>
创建时间
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CommonDbEntity.ModifyTime">
<summary>
修改时间
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CommonDbEntity.CreateUser">
<summary>
创建人
</summary>
</member>
<member name="P:Myshipping.Core.Entity.CommonDbEntity.ModifyUser">
<summary>
修改人
</summary>
</member>
<member name="T:Myshipping.Core.Entity.DBEntityTenant">
<summary>
自定义租户基类实体
@ -4024,6 +4504,15 @@
<param name="value"></param>
<returns></returns>
</member>
<member name="M:Myshipping.Core.Service.SysCacheService.SetTimeoutAsync(System.String,System.Object,System.TimeSpan)">
<summary>
设置缓存,并带有过期时间
</summary>
<param name="key"></param>
<param name="value"></param>
<param name="ts"></param>
<returns></returns>
</member>
<member name="M:Myshipping.Core.Service.SysCacheService.Get(System.String)">
<summary>
获取缓存
@ -4572,6 +5061,31 @@
业务名
</summary>
</member>
<member name="T:Myshipping.Core.Service.CommonDBService">
<summary>
公共库
</summary>
</member>
<member name="M:Myshipping.Core.Service.CommonDBService.CarrierList(Myshipping.Core.Service.CodeCnEnQueryDto)">
<summary>
获取船公司列表信息
</summary>
</member>
<member name="M:Myshipping.Core.Service.CommonDBService.VesselList(Myshipping.Core.Service.NameQueryDto)">
<summary>
获取船名列表信息
</summary>
</member>
<member name="M:Myshipping.Core.Service.CommonDBService.ForwarderList(Myshipping.Core.Service.NameQueryDto)">
<summary>
获取船代列表信息
</summary>
</member>
<member name="M:Myshipping.Core.Service.CommonDBService.YardList(Myshipping.Core.Service.NameQueryDto)">
<summary>
获取场站列表信息
</summary>
</member>
<member name="M:Myshipping.Core.Service.CommonService.GetEntityInfos(System.Boolean)">
<summary>
获取库表信息

@ -1,4 +1,5 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Myshipping.Core.Service;
@ -19,6 +20,7 @@ public interface ISysCacheService
Task SetPermission(long userId, List<string> permissions);
bool Set(string key, object value);
Task<bool> SetAsync(string key, object value);
Task<bool> SetTimeoutAsync(string key, object value, TimeSpan ts);
string Get(string key);
Task<string> GetAsync(string key);
T Get<T>(string key);

@ -44,7 +44,7 @@ public class SysCacheService : ISysCacheService, IDynamicApiController, ISinglet
var cacheKey = CommonConst.CACHE_KEY_USERSDATASCOPE + $"{userId}";
return await _cache.GetAsync<List<long>>(cacheKey);
}
/// <summary>
/// 缓存数据范围机构Id集合
/// </summary>
@ -208,6 +208,18 @@ public class SysCacheService : ISysCacheService, IDynamicApiController, ISinglet
return await _cache.SetAsync(key, value);
}
/// <summary>
/// 设置缓存,并带有过期时间
/// </summary>
/// <param name="key"></param>
/// <param name="value"></param>
/// <param name="ts"></param>
/// <returns></returns>
public async Task<bool> SetTimeoutAsync(string key, object value, TimeSpan ts)
{
return await _cache.SetAsync(key, value, ts);
}
/// <summary>
/// 获取缓存
/// </summary>

@ -0,0 +1,149 @@

using Furion.DependencyInjection;
using Furion.DynamicApiController;
using Furion.FriendlyException;
using Myshipping.Core.Entity;
using Mapster;
using Microsoft.AspNetCore.Mvc;
using SqlSugar;
using System.Linq;
using System.Threading.Tasks;
using System.Collections.Generic;
using System;
namespace Myshipping.Core.Service;
/// <summary>
/// 公共库
/// </summary>
[ApiDescriptionSettings(Name = "CommonDB", Order = 1000)]
public class CommonDBService : ICommonDBService, IDynamicApiController, ITransient
{
private readonly SqlSugarRepository<CodeCarrier> _codeCarrierRep;
private readonly SqlSugarRepository<CodeVessel> _codeVesselRep;
private readonly SqlSugarRepository<CodeForwarder> _codeForwarderRep;
private readonly SqlSugarRepository<CodeYard> _codeYardRep;
private readonly SqlSugarRepository<CodePortLoad> _codePortLoadrRep;
private readonly SqlSugarRepository<CodePort> _codePortRep;
private readonly SqlSugarRepository<CodePackage> _codePackageRep;
private readonly SqlSugarRepository<CodeService> _codeServiceRep;
private readonly SqlSugarRepository<CodeCtn> _codeCtnRep;
private readonly ISysCacheService _sysCacheService;
public CommonDBService(SqlSugarRepository<CodeCarrier> codeCarrierRep,
SqlSugarRepository<CodeVessel> codeVesselRep,
SqlSugarRepository<CodeForwarder> codeForwarderRep,
SqlSugarRepository<CodeYard> codeYardRep,
SqlSugarRepository<CodePortLoad> codePortLoadrRep,
SqlSugarRepository<CodePort> codePortRep,
SqlSugarRepository<CodePackage> codePackageRep,
SqlSugarRepository<CodeService> codeServiceRep,
SqlSugarRepository<CodeCtn> codeCtnRep,
ISysCacheService sysCacheService)
{
_codeCarrierRep = codeCarrierRep;
_codeVesselRep = codeVesselRep;
_codeForwarderRep = codeForwarderRep;
_codeYardRep = codeYardRep;
_codePortLoadrRep = codePortLoadrRep;
_codePortRep = codePortRep;
_codePackageRep = codePackageRep;
_codeServiceRep = codeServiceRep;
_codeCtnRep = codeCtnRep;
_sysCacheService = sysCacheService;
}
/// <summary>
/// 获取船公司列表信息
/// </summary>
[HttpGet("/commondb/carrierlist")]
public async Task<dynamic> CarrierList([FromQuery] CodeCnEnQueryDto input)
{
List<CodeCarrier> list = null;
if (_sysCacheService.Exists(CommonConst.CACHE_KEY_COMMON_DB_CARRIER))
{
list = await _sysCacheService.GetAsync<List<CodeCarrier>>(CommonConst.CACHE_KEY_COMMON_DB_CARRIER);
}
else
{
list = await _codeCarrierRep.ToListAsync();
await _sysCacheService.SetTimeoutAsync(CommonConst.CACHE_KEY_COMMON_DB_CARRIER, list, TimeSpan.FromMinutes(5));
}
var queryList = list.WhereIF(!string.IsNullOrEmpty(input.Code), x => x.Code.Contains(input.Code, System.StringComparison.CurrentCultureIgnoreCase))
.WhereIF(!string.IsNullOrEmpty(input.CnName), x => x.Code.Contains(input.CnName))
.WhereIF(!string.IsNullOrEmpty(input.EnName), x => x.Code.Contains(input.EnName, System.StringComparison.CurrentCultureIgnoreCase));
return queryList.ToList();
}
/// <summary>
/// 获取船名列表信息
/// </summary>
[HttpGet("/commondb/vessellist")]
public async Task<dynamic> VesselList([FromQuery] NameQueryDto input)
{
List<CodeVessel> list = null;
if (_sysCacheService.Exists(CommonConst.CACHE_KEY_COMMON_DB_VESSEL))
{
list = await _sysCacheService.GetAsync<List<CodeVessel>>(CommonConst.CACHE_KEY_COMMON_DB_VESSEL);
}
else
{
list = await _codeVesselRep.ToListAsync();
await _sysCacheService.SetTimeoutAsync(CommonConst.CACHE_KEY_COMMON_DB_VESSEL, list, TimeSpan.FromMinutes(5));
}
var queryList = list.WhereIF(!string.IsNullOrEmpty(input.Name), x => x.Name.Contains(input.Name, System.StringComparison.CurrentCultureIgnoreCase));
return queryList.ToList();
}
/// <summary>
/// 获取船代列表信息
/// </summary>
[HttpGet("/commondb/forwarderlist")]
public async Task<dynamic> ForwarderList([FromQuery] NameQueryDto input)
{
List<CodeForwarder> list = null;
if (_sysCacheService.Exists(CommonConst.CACHE_KEY_COMMON_DB_FORWARDER))
{
list = await _sysCacheService.GetAsync<List<CodeForwarder>>(CommonConst.CACHE_KEY_COMMON_DB_FORWARDER);
}
else
{
list = await _codeForwarderRep.ToListAsync();
await _sysCacheService.SetTimeoutAsync(CommonConst.CACHE_KEY_COMMON_DB_FORWARDER, list, TimeSpan.FromMinutes(5));
}
var queryList = list.WhereIF(!string.IsNullOrEmpty(input.Name), x => x.Name.Contains(input.Name, System.StringComparison.CurrentCultureIgnoreCase));
return queryList.ToList();
}
/// <summary>
/// 获取场站列表信息
/// </summary>
[HttpGet("/commondb/yardlist")]
public async Task<dynamic> YardList([FromQuery] NameQueryDto input)
{
List<CodeYard> list = null;
if (_sysCacheService.Exists(CommonConst.CACHE_KEY_COMMON_DB_YARD))
{
list = await _sysCacheService.GetAsync<List<CodeYard>>(CommonConst.CACHE_KEY_COMMON_DB_YARD);
}
else
{
list = await _codeYardRep.ToListAsync();
await _sysCacheService.SetTimeoutAsync(CommonConst.CACHE_KEY_COMMON_DB_YARD, list, TimeSpan.FromMinutes(5));
}
var queryList = list.WhereIF(!string.IsNullOrEmpty(input.Name), x => x.Name.Contains(input.Name, System.StringComparison.CurrentCultureIgnoreCase));
return queryList.ToList();
}
}

@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Core.Service
{
//代码、中文、英文名查询
public class CodeCnEnQueryDto
{
public string Code { get; set; }
public string CnName { get; set; }
public string EnName { get; set; }
}
//Name查询
public class NameQueryDto
{
public string Name { get; set; }
}
}

@ -0,0 +1,10 @@
using Myshipping.Core.Entity;
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
namespace Myshipping.Core.Service;
public interface ICommonDBService
{
Task<dynamic> CarrierList([FromQuery] CodeCnEnQueryDto input);
}

@ -8,6 +8,11 @@
"DbNumber": "1",
"DbType": "Sqlite",
"DbString": "Data Source=./flow.db"
},
{
"DbNumber": "common",
"DbType": "SqlServer",
"DbString": "Server=60.209.125.238,28000;Database=DevCommonDB;User=dev;Password=dev123;MultipleActiveResultSets=True;"
}
]
}

Loading…
Cancel
Save