新增中远订舱POST

master
jianghaiqing 8 months ago
parent f2f229ab6a
commit 321e5f71df

@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application
{
/// <summary>
/// 检索始发地、目的地城市信息
/// </summary>
public class COSCOSearchLocationDto
{
/// <summary>
/// 请求接口账户KEY
/// </summary>
public string userKey { get; set; }
/// <summary>
/// 请求接口账户密钥
/// </summary>
public string userSecret { get; set; }
/// <summary>
/// 网站账户
/// </summary>
public string webAccount { get; set; }
/// <summary>
/// 网站密码
/// </summary>
public string webPassword { get; set; }
/// <summary>
/// 检索名称
/// </summary>
public string name { get; set; }
}
}

@ -0,0 +1,64 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application
{
public class COSCOSearchLocationResultDto
{
/// <summary>
/// 回执代码
/// </summary>
public int code { get; set; }
/// <summary>
/// 回执消息
/// </summary>
public string msg { get; set; }
/// <summary>
/// 回执代码
/// </summary>
public List<COSCOSearchLocationResultDataDto> data { get; set; }
}
public class COSCOSearchLocationResultDataDto
{
/// <summary>
/// 到门服务列表
/// </summary>
public List<object> toDoorServices { get; set; }
/// <summary>
/// 网站内部定义的港口id
/// </summary>
public Nullable<long> id { get; set; }
/// <summary>
/// 网站定义的港口代码
/// </summary>
public string officeCode { get; set; }
/// <summary>
/// 标准城市id
/// </summary>
public Nullable<long> standardCityID { get; set; }
/// <summary>
/// 父级城市id
/// </summary>
public Nullable<long> parentCityID { get; set; }
/// <summary>
/// 城市字符串id, 不是一个uuid
/// </summary>
public string cityUUID { get; set; }
/// <summary>
/// 城市名
/// </summary>
public string cityName { get; set; }
}
}

@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application
{
public class QueryLocationsCOSCODto
{
/// <summary>
/// 港口或城市名称
/// </summary>
public string cityName { get; set; }
/// <summary>
/// 船公司代码
/// </summary>
public string carrierId { get; set; }
/// <summary>
/// 指定适用邮箱代码
/// </summary>
public string assignUserAccountCode { get; set; }
}
}

@ -22,7 +22,7 @@ namespace Myshipping.Application
public string carrierId { get; set; }
/// <summary>
/// 服务船公司代码MAEU, SEAU, SEJJ, MCPU, MAEI
/// 服务船公司代码MAEU, SEAU, SEJJ, MCPU, MAEI carrierId=MSK时必填
/// </summary>
public string carrierCode { get; set; } = "MAEU";

@ -0,0 +1,68 @@
using Myshipping.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Myshipping.Application
{
public interface IBookingCOSCOService
{
/// <summary>
/// 检索海运船期详情
/// </summary>
/// <param name="model">请求船期详情</param>
/// <returns>返回船期结果</returns>
Task<List<SearchShipSailingScheduleResultDto>> SearchShipSailingSchedule(QueryShipSailingScheduleDto model);
/// <summary>
/// 发送中远订舱请求
/// </summary>
/// <param name="model">请求订舱详情</param>
/// <returns>返回检索结果</returns>
Task<MSKBookingResultDto> SendMSKBooking(MSKBookingDto model);
/// <summary>
/// 检索商品名称
/// </summary>
/// <param name="model">请求详情</param>
/// <returns>返回检索结果</returns>
Task<List<SearchCommodityResultDto>> SearchCommodities(QueryCommoditiesDto model);
/// <summary>
/// 检索始发地、目的港口信息
/// </summary>
/// <param name="model">请求详情</param>
/// <returns>返回检索结果</returns>
Task<List<QueryLocationsResultDto>> SearchLocations(QueryLocationsCOSCODto model);
/// <summary>
/// 中远订舱台账
/// </summary>
/// <param name="QuerySearch">查询条件</param>
/// <returns>返回台账列表</returns>
Task<SqlSugarPagedList<BookingDeliveryRecordPageDto>> GetPageAsync(QueryBookingDeliveryRecordDto QuerySearch);
/// <summary>
/// 获取中远订舱详情
/// </summary>
/// <param name="id">中远订舱ID</param>
/// <returns>返回详情</returns>
Task<MSKBookingDto> GetInfo(long id);
/// <summary>
/// 保存
/// </summary>
/// <param name="model">请求订舱详情</param>
/// <returns>返回ID</returns>
Task<long> Save(MSKBookingDto model);
/// <summary>
/// 删除
/// </summary>
/// <param name="id">请求订舱ID</param>
/// <returns></returns>
Task Delete(long id);
}
}

@ -1522,19 +1522,22 @@ namespace Myshipping.Application
await _serviceWorkFlowActivitiesSubRelationRepository.InsertAsync(wfRelationActivitiesSub);
sub.StatusTriggerList.ForEach(async trg =>
if (sub != null && sub.StatusTriggerList != null && sub.StatusTriggerList.Count > 0)
{
var triggerRela = new ServiceWorkFlowActivitiesTriggerRelation
sub.StatusTriggerList.ForEach(async trg =>
{
PK_ID = IDGen.NextID().ToString(),
SERVICE_WORKFLOW_ID = wfBaseInfo.PKId,
SERVICE_ACTIVITIES_ID = sub.PKId,
STATUS_TRIGGER_ID = trg.PKId,
WF_VERSION = releaseVersion
};
await _serviceWorkFlowActivitiesTriggerRelationRepository.InsertAsync(triggerRela);
});
var triggerRela = new ServiceWorkFlowActivitiesTriggerRelation
{
PK_ID = IDGen.NextID().ToString(),
SERVICE_WORKFLOW_ID = wfBaseInfo.PKId,
SERVICE_ACTIVITIES_ID = sub.PKId,
STATUS_TRIGGER_ID = trg.PKId,
WF_VERSION = releaseVersion
};
await _serviceWorkFlowActivitiesTriggerRelationRepository.InsertAsync(triggerRela);
});
}
});
}

Loading…
Cancel
Save