usertest
jianghaiqing 5 months ago
parent 969bcc3913
commit 48ada64312

@ -624,4 +624,37 @@ public static class MultiLanguageConst
[Description("非原币申请必须指定原始币别")]
public const string OriginalCurrencyCanNotNull = "OriginalCurrency_CanNot_Null";
#endregion
#region 预订舱API
[Description("始发地不能为空")]
public const string SpaceBookingAPIOriginCityNameNull = "SpaceBK_API_OrigCityName_Null";
[Description("目的地不能为空")]
public const string SpaceBookingAPIDestCityNameNull = "SpaceBK_API_DestCityName_Null";
[Description("服务船公司不能为空")]
public const string SpaceBookingAPIVesselCarrierCodeNull = "SpaceBK_API_VesselCarrierCode_Null";
[Description("船公司代码不能为空")]
public const string SpaceBookingAPICarrierIdNull = "SpaceBK_API_CarrierId_Null";
[Description("预计离港日期不能为空")]
public const string SpaceBookingAPIETDNull = "SpaceBK_API_ETD_Null";
[Description("预计离港日期格式错误")]
public const string SpaceBookingAPIETDFormatError = "SpaceBK_API_ETD_Format_Error";
[Description("当前船公司{0} 未配置相应的请求接口")]
public const string SpaceBookingAPICarrierSearchShipNOConfig = "SpaceBK_API_Carrier_SearchShip_NoConfig";
[Description("未配置查询船期请求接口地址,请联系管理员")]
public const string SpaceBookingAPISearchShipNOConfig = "SpaceBK_API_SearchShip_NoConfig";
[Description("未配置第三方账户个人账户MSKApi")]
public const string SpaceBookingAPIThirdPartyNull = "SpaceBK_API_ThirdParty_Null";
[Description("请求MSK API查询船期异常原因{0}")]
public const string SpaceBookingAPISearchShipException = "SpaceBK_API_SearchShip_Exception";
#endregion
}

@ -1,4 +1,5 @@
using DS.Module.Core;
using SqlSugar;
namespace DS.WMS.Core.Code.Dtos;
@ -51,4 +52,29 @@ public class CodeThirdPartyRes
/// 创建时间
/// </summary>
public DateTime CreateTime { get; set; }
/// <summary>
/// 是否为公司账号 true-是 false-否
/// </summary>
public bool IsCompany { get; set; }
/// <summary>
/// 备案代码
/// </summary>
public string RegistPartyCode { get; set; }
/// <summary>
/// 备案全称
/// </summary>
public string RegistPartyName { get; set; }
/// <summary>
/// 联系人
/// </summary>
public string RegistContractName { get; set; }
/// <summary>
/// 联系邮箱
/// </summary>
public string RegistContractEmail { get; set; }
}

@ -50,4 +50,34 @@ public class CodeThirdParty : BaseModel<long>
/// </summary>
[SugarColumn(ColumnDescription = "状态", DefaultValue = "0")]
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
/// <summary>
/// 是否为公司账号
/// </summary>
[SugarColumn(ColumnDescription = "是否为公司账号", DefaultValue = "0")]
public bool IsCompany { get; set; } = false;
/// <summary>
/// 备案代码
/// </summary>
[SugarColumn(ColumnDescription = "备案代码", IsNullable = true, Length = 50)]
public string RegistPartyCode { get; set; }
/// <summary>
/// 备案全称
/// </summary>
[SugarColumn(ColumnDescription = "备案全称", IsNullable = true, Length = 200)]
public string RegistPartyName { get; set; }
/// <summary>
/// 联系人
/// </summary>
[SugarColumn(ColumnDescription = "联系人", IsNullable = true, Length = 255)]
public string RegistContractName { get; set; }
/// <summary>
/// 联系邮箱
/// </summary>
[SugarColumn(ColumnDescription = "联系邮箱", IsNullable = true, Length = 150)]
public string RegistContractEmail { get; set; }
}

@ -28,5 +28,10 @@ public interface ICodeThirdPartyService
/// <returns></returns>
DataResult<CodeThirdPartyRes> GetCodeThirdPartyInfo(string id);
/// <summary>
/// 获取第三方详情(优先取个人配置,如果没有默认取公司配置)
/// </summary>
/// <param name="AccountType">账号类型</param>
/// <returns>返回第三方账户详情</returns>
Task<DataResult<CodeThirdPartyRes>> GetCodeThirdPartyInfoWithCompany(string AccountType);
}

@ -78,5 +78,37 @@ namespace DS.WMS.Core.Code.Method
.First();
return DataResult<CodeThirdPartyRes>.Success(data, MultiLanguageConst.DataQuerySuccess);
}
#region 获取第三方详情(优先取个人配置,如果没有默认取公司配置)
/// <summary>
/// 获取第三方详情(优先取个人配置,如果没有默认取公司配置)
/// </summary>
/// <param name="AccountType">账号类型</param>
/// <returns>返回第三方账户详情</returns>
public async Task<DataResult<CodeThirdPartyRes>> GetCodeThirdPartyInfoWithCompany(string AccountType)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var data = await tenantDb.Queryable<CodeThirdParty>()
.Where(a => a.AccountType == AccountType && a.IsCompany == false && a.CreateBy == long.Parse(user.UserId))
.Select<CodeThirdPartyRes>()
.FirstAsync();
if (data == null)
{
data = await tenantDb.Queryable<CodeThirdParty>()
.Where(a => a.AccountType == AccountType && a.IsCompany == true)
.Select<CodeThirdPartyRes>()
.FirstAsync();
}
if (data == null)
return DataResult<CodeThirdPartyRes>.FailedData(data, MultiLanguageConst.DataQuerySuccess);
return DataResult<CodeThirdPartyRes>.Success(data, MultiLanguageConst.DataQuerySuccess);
}
#endregion
}
}

@ -0,0 +1,149 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DS.WMS.Core.Op.Dtos
{
/// <summary>
/// 马士基点对点查询船期请求
/// </summary>
public class MSKAPISearchPoint2PointScheduleDto
{
/// <summary>
/// 用户key(取用户配置)
/// </summary>
public string userKey { get; set; }
/// <summary>
/// 用户secret
/// </summary>
public string userSecret { get; set; }
/// <summary>
/// app的key
/// </summary>
public string mskAppKey { get; set; }
/// <summary>
/// 运行环境 TEST-测试环境PRODUCTION-生产环境
/// </summary>
public string operatingEnvironment { get; set; }
/// <summary>
/// 起始地的GEO ID
/// </summary>
public string carrierCollectionOriginGeoID { get; set; }
/// <summary>
/// 目的地的GEO ID
/// </summary>
public string carrierDeliveryDestinationGeoID { get; set; }
/// <summary>
/// 起始地国家代码(英文)
/// </summary>
public string collectionOriginCountryCode { get; set; }
/// <summary>
/// 起始地城市名
/// </summary>
public string collectionOriginCityName { get; set; }
/// <summary>
/// 起始地五字码
/// </summary>
public string collectionOriginUNLocationCode { get; set; }
/// <summary>
/// 起始地区代码
/// </summary>
public string collectionOriginUNRegionCode { get; set; }
/// <summary>
/// 目的地国家代码 二字码
/// </summary>
public string deliveryDestinationCountryCode { get; set; }
/// <summary>
/// 目的地城市名称
/// </summary>
public string deliveryDestinationCityName { get; set; }
/// <summary>
/// 目的都五字码
/// </summary>
public string deliveryDestinationUNLocationCode { get; set; }
/// <summary>
/// 目的地区代码
/// </summary>
public string deliveryDestinationUNRegionCode { get; set; }
/// <summary>
/// 承运人代码MAEU, SEAU, SEJJ, MCPU, MAEI
/// </summary>
public string vesselOperatorCarrierCode { get; set; }
/// <summary>
/// 货物类型代码DRY, REEFER
/// </summary>
public string cargoType { get; set; }
/// <summary>
/// 箱型代码
/// </summary>
public string ISOEquipmentCode { get; set; }
/// <summary>
/// 箱重量
/// </summary>
public string stuffingWeight { get; set; }
/// <summary>
/// 重量单位KGS, LBS
/// </summary>
public string weightMeasurementUnit { get; set; }
/// <summary>
/// 箱体积
/// </summary>
public Nullable<int> stuffingVolume { get; set; }
/// <summary>
/// 体积单位MTQ, FTQ
/// </summary>
public string volumeMeasurementUnit { get; set; }
/// <summary>
/// 出口服务代码CY, SD, CFS
/// </summary>
public string exportServiceMode { get; set; }
/// <summary>
/// 进口服务代码CY, SD, CFS
/// </summary>
public string importServiceMode { get; set; }
/// <summary>
/// 开始时间
/// </summary>
public string startDate { get; set; }
/// <summary>
/// 开始时间类型D, A
/// </summary>
public string startDateType { get; set; }
/// <summary>
/// 请求产品信息的时间段P1W, P2W, P3W, P4W, P5W, P6W, P7W, P8W
/// </summary>
public string dateRange { get; set; }
/// <summary>
/// 船舶标志代号
/// </summary>
public string vesselFlagCode { get; set; }
}
}

@ -0,0 +1,390 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DS.WMS.Core.Op.Dtos
{
/// <summary>
/// 马士基点对点查询船期回执
/// </summary>
public class MSKAPISearchPoint2PointScheduleResultDto
{
/// <summary>
/// 回执代码
/// </summary>
public int code { get; set; }
/// <summary>
/// 回执消息
/// </summary>
public string msg { get; set; }
/// <summary>
/// 回执代码
/// </summary>
public List<MSKAPISearchPoint2PointScheduleResultDataDto> data { get; set; }
}
public class MSKAPISearchPoint2PointScheduleResultDataDto
{
/// <summary>
/// 产品id
/// </summary>
public string carrierProductId { get; set; }
/// <summary>
/// 产品序号
/// </summary>
public string carrierProductSequenceId { get; set; }
/// <summary>
/// 产品的生效日期格式为YYYY-MM-DD
/// </summary>
public string productValidFromDate { get; set; }
/// <summary>
/// 产品的截止日期格式为YYYY-MM-DD
/// </summary>
public string productValidToDate { get; set; }
/// <summary>
/// 产品从原产地到目的地的链接数
/// </summary>
public string numberOfProductLinks { get; set; }
/// <summary>
/// 产品从原产地到目的地的链接数
/// </summary>
public List<MSKAPISearchTransportSchedules> transportSchedules { get; set; }
}
/// <summary>
/// 路线的详细信息
/// </summary>
public class MSKAPISearchTransportSchedules
{
/// <summary>
/// 出发时间, ISO格式
/// </summary>
public Nullable<DateTime> departureDateTime { get; set; }
/// <summary>
/// 到达时间, ISO格式
/// </summary>
public Nullable<DateTime> arrivalDateTime { get; set; }
/// <summary>
/// 路线相关数据
/// </summary>
public MSKAPISearchFacilities facilities { get; set; }
/// <summary>
/// 头程船信息
/// </summary>
public MSKDepartureVessel firstDepartureVessel { get; set; }
/// <summary>
/// 通过的时间,以分钟为单位
/// </summary>
public string transitTime { get; set; }
/// <summary>
/// The details for the individual schedule
/// </summary>
public List<MSKTransportLegInfo> transportLegs { get; set; }
/// <summary>
/// 承运人代码(MAEU, SEAU, SEJJ, MCPU, MAEI)
/// </summary>
public string vesselOperatorCarrierCode { get; set; }
//以下的字段是自己添加的不是船期返回的信息
/// <summary>
/// 产品id
/// </summary>
public string carrierProductId { get; set; }
/// <summary>
/// 产品序号
/// </summary>
public string carrierProductSequenceId { get; set; }
/// <summary>
/// 产品的生效日期格式为YYYY-MM-DD
/// </summary>
public string productValidFromDate { get; set; }
/// <summary>
/// 产品的截止日期格式为YYYY-MM-DD
/// </summary>
public string productValidToDate { get; set; }
/// <summary>
/// 产品从原产地到目的地的链接数
/// </summary>
public string numberOfProductLinks { get; set; }
/// <summary>
/// 船期MD5
/// </summary>
public string MD5 { get; set; }
/// <summary>
/// 主键ID
/// </summary>
public long PId { get; set; }
/// <summary>
/// 起运地rkst代码
/// </summary>
public string originRkstCode { get; set; }
/// <summary>
/// 起运地geoID
/// </summary>
public string originGeoId { get; set; }
/// <summary>
/// 起运地五子码
/// </summary>
public string originUnLocCode { get; set; }
/// <summary>
/// 起运地城市名
/// </summary>
public string originCityName { get; set; }
/// <summary>
/// 起运地区名
/// </summary>
public string originRegionName { get; set; }
/// <summary>
/// 起运地国家名
/// </summary>
public string originCountryName { get; set; }
/// <summary>
/// 目的地rkst代码
/// </summary>
public string destinationRkstCode { get; set; }
/// <summary>
/// 目的地geoID
/// </summary>
public string destinationGeoId { get; set; }
/// <summary>
/// 目的地五子码
/// </summary>
public string destinationUnLocCode { get; set; }
/// <summary>
/// 目的地城市名
/// </summary>
public string destinationCityName { get; set; }
/// <summary>
/// 目的地区名
/// </summary>
public string destinationRegionName { get; set; }
/// <summary>
/// 目的地国家名
/// </summary>
public string destinationCountryName { get; set; }
}
/// <summary>
/// 路线相关数据
/// </summary>
public class MSKAPISearchFacilities
{
/// <summary>
/// 出发地港口信息
/// </summary>
public MSKAPISearchFacilitiesCityInfo collectionOrigin { get; set; }
/// <summary>
/// 目的地港口信息
/// </summary>
public MSKAPISearchFacilitiesCityInfo deliveryDestination { get; set; }
}
/// <summary>
/// 城市信息
/// </summary>
public class MSKAPISearchFacilitiesCityInfo
{
/// <summary>
/// 城市名
/// </summary>
public string cityName { get; set; }
/// <summary>
/// 地点的GEO ID
/// </summary>
public string carrierSiteGeoID { get; set; }
/// <summary>
/// 地点的名称
/// </summary>
public string locationName { get; set; }
/// <summary>
/// 国家代码
/// </summary>
public string countryCode { get; set; }
/// <summary>
/// 位置类型
/// </summary>
public string locationType { get; set; }
/// <summary>
/// 五字码
/// </summary>
public string UNLocationCode { get; set; }
/// <summary>
/// 区代码
/// </summary>
public string UNRegionCode { get; set; }
}
/// <summary>
/// 头程船信息
/// </summary>
public class MSKDepartureVessel
{
/// <summary>
/// IMO
/// </summary>
public string vesselIMONumber { get; set; }
/// <summary>
/// 船名代码
/// </summary>
public string carrierVesselCode { get; set; }
/// <summary>
/// 船名
/// </summary>
public string vesselName { get; set; }
}
public class MSKTransportLegInfo
{
/// <summary>
/// 出发时间, ISO格式
/// </summary>
public Nullable<DateTime> departureDateTime { get; set; }
/// <summary>
/// 到达时间, ISO格式
/// </summary>
public Nullable<DateTime> arrivalDateTime { get; set; }
/// <summary>
/// 路线相关数据
/// </summary>
public MSKTransportLegInfoFacilities facilities { get; set; }
/// <summary>
/// 航运信息
/// </summary>
public MSKAPISearchTransportInfo transport { get; set; }
}
/// <summary>
///
/// </summary>
public class MSKTransportLegInfoFacilities
{
/// <summary>
/// 出发地港口信息
/// </summary>
public MSKAPISearchFacilitiesCityInfo startLocation { get; set; }
/// <summary>
/// 目的地港口信息
/// </summary>
public MSKAPISearchFacilitiesCityInfo endLocation { get; set; }
}
public class MSKAPISearchTransportInfo
{
/// <summary>
/// 运输方式
/// </summary>
public string transportMode { get; set; }
/// <summary>
/// 船信息
/// </summary>
public MSKAPISearchVesselInfo vessel { get; set; }
/// <summary>
/// 贸易航线名称
/// </summary>
public string carrierTradeLaneName { get; set; }
/// <summary>
/// 航次代码
/// </summary>
public string carrierDepartureVoyageNumber { get; set; }
/// <summary>
/// Indicator that defines the link as a port call offered as an inducement
/// </summary>
public string inducementLinkFlag { get; set; }
/// <summary>
///
/// </summary>
public string carrierServiceCode { get; set; }
/// <summary>
/// 服务代码
/// </summary>
public string carrierServiceName { get; set; }
/// <summary>
/// 航行方向
/// </summary>
public string linkDirection { get; set; }
/// <summary>
/// RKST system Carrier Code as defined by A.P. Moller-Maersk A/S for the scheduled carrier
/// </summary>
public string carrierCode { get; set; }
/// <summary>
/// Describes the type of route link
/// </summary>
public string routingType { get; set; }
}
public class MSKAPISearchVesselInfo
{
/// <summary>
/// IMO号
/// </summary>
public string vesselIMONumber { get; set; }
/// <summary>
/// 内部船舶代码
/// </summary>
public string carrierVesselCode { get; set; }
/// <summary>
/// 船名
/// </summary>
public string vesselName { get; set; }
}
}

@ -85,5 +85,10 @@
"Port": "7115",
"SenderKey": "SEFBZkh5V3R1TGxtdlBIcTF4QmNMWURCS08vb2EvTzVxS0F0eDFKdlgyS3lKVUx6K3JRRE94Q2kvcWZMRytZeWxyVkhLdk9hRGpzVStPamhIUXd5NU9FMjhFTktwUlZ2eThJZGlQd3p5dUk9",
"SendUrl": "/api/RulesEngineManage/ExcuteWorkFlow"
},
"MSKAPIService": {
"UserKey": "wu",
"UserSecret": "123456",
"Environment": "TEST"
}
}

Loading…
Cancel
Save