master
wanghaomei 4 months ago
parent df1419deac
commit 452e177236

@ -75,6 +75,7 @@ namespace Myshipping.Application.EDI.SITC
postModel.deliveryName = InttrEdi.BSLIST[0].PLACEDELIVERY; postModel.deliveryName = InttrEdi.BSLIST[0].PLACEDELIVERY;
postModel.porId = InttrEdi.BSLIST[0].PLACERECEIPTID; postModel.porId = InttrEdi.BSLIST[0].PLACERECEIPTID;
postModel.porName = InttrEdi.BSLIST[0].PLACERECEIPT; postModel.porName = InttrEdi.BSLIST[0].PLACERECEIPT;
postModel.poWtatName = InttrEdi.BSLIST[0].TRANSPORT;
postModel.vesselName = InttrEdi.BSLIST[0].VESSEL; postModel.vesselName = InttrEdi.BSLIST[0].VESSEL;
postModel.lineCode = InttrEdi.BSLIST[0].ESLLINECODE; postModel.lineCode = InttrEdi.BSLIST[0].ESLLINECODE;
postModel.voyNo = InttrEdi.BSLIST[0].VOYNO; postModel.voyNo = InttrEdi.BSLIST[0].VOYNO;
@ -102,10 +103,11 @@ namespace Myshipping.Application.EDI.SITC
postModel.weight = InttrEdi.BSLIST[0].KGS; postModel.weight = InttrEdi.BSLIST[0].KGS;
postModel.cube = InttrEdi.BSLIST[0].CBM; postModel.cube = InttrEdi.BSLIST[0].CBM;
postModel.packages = InttrEdi.BSLIST[0].PKGS; postModel.packages = InttrEdi.BSLIST[0].PKGS;
postModel.packingType = InttrEdi.BSLIST[0].KINDPKGS;
postModel.packageDesc = InttrEdi.BSLIST[0].KINDPKGS; postModel.packageDesc = InttrEdi.BSLIST[0].KINDPKGS;
postModel.marks = InttrEdi.BSLIST[0].MARKS; postModel.marks = InttrEdi.BSLIST[0].MARKS;
postModel.cargoDesc = InttrEdi.BSLIST[0].DESCRIPTION; postModel.cargoDesc = InttrEdi.BSLIST[0].DESCRIPTION;
postModel.cargoType = InttrEdi.BSLIST[0].CARGOID; postModel.cargoType = CargoIdStr(InttrEdi.BSLIST[0].CARGOID);
postModel.isDanger = InttrEdi.BSLIST[0].CARGOID == "D" ? true : false; postModel.isDanger = InttrEdi.BSLIST[0].CARGOID == "D" ? true : false;
postModel.isRf = InttrEdi.BSLIST[0].CARGOID == "R" ? true : false; postModel.isRf = InttrEdi.BSLIST[0].CARGOID == "R" ? true : false;
postModel.contactInfo = InttrEdi.BSLIST[0].OpEmail; postModel.contactInfo = InttrEdi.BSLIST[0].OpEmail;
@ -128,6 +130,7 @@ namespace Myshipping.Application.EDI.SITC
{ {
postModel.extras = new List<SitcApiPostModelExtra>(); postModel.extras = new List<SitcApiPostModelExtra>();
SitcApiPostModelExtra e = new SitcApiPostModelExtra(); SitcApiPostModelExtra e = new SitcApiPostModelExtra();
e.ctype = "RF";
e.tempMin = InttrEdi.BSLIST[0].TEMPMIN; e.tempMin = InttrEdi.BSLIST[0].TEMPMIN;
e.tempMax = InttrEdi.BSLIST[0].TEMPMAX; e.tempMax = InttrEdi.BSLIST[0].TEMPMAX;
e.tempSetting = InttrEdi.BSLIST[0].TEMPSET; e.tempSetting = InttrEdi.BSLIST[0].TEMPSET;
@ -177,8 +180,32 @@ namespace Myshipping.Application.EDI.SITC
} }
#endregion #endregion
/// <summary>
/// 货物类型翻译
/// </summary>
/// <param name="cargoId"></param>
/// <returns></returns>
private static string CargoIdStr(string cargoId)
{
if (cargoId == "S")
{
return "ORDI";
}
else if (cargoId == "R")
{
return "REEF";
}
else if (cargoId == "D")
{
return "DNGR";
}
return "";
}
} }
public class SitcApiPostModel public class SitcApiPostModel
{ {
/// <summary> /// <summary>
@ -226,6 +253,11 @@ namespace Myshipping.Application.EDI.SITC
/// </summary> /// </summary>
public string porName { get; set; } public string porName { get; set; }
/// <summary>
/// 中转港名称
/// </summary>
public string poWtatName { get; set; }
/// <summary> /// <summary>
/// 船名 /// 船名
/// </summary> /// </summary>
@ -361,6 +393,11 @@ namespace Myshipping.Application.EDI.SITC
/// </summary> /// </summary>
public int packages { get; set; } public int packages { get; set; }
/// <summary>
/// 包装类型
/// </summary>
public string packingType { get; set; }
/// <summary> /// <summary>
/// 包装类型 /// 包装类型
/// </summary> /// </summary>

@ -7698,6 +7698,15 @@ namespace Myshipping.Application
ediModel.BSLIST.Add(primaryModel); ediModel.BSLIST.Add(primaryModel);
//SITC
if (ediRouteEnum == EDIRouteEnum.SITC)
{
var user = await _repUser.FirstOrDefaultAsync(x => x.Id == UserManager.UserId);
primaryModel.OpEmail = $"{user.EnName};{(string.IsNullOrEmpty(user.Tel) ? user.Phone : user.Tel)};{UserManager.Email}";
}
var result = await InnerSendBookingOrClosingEDI(model, ediModel, ediRouteEnum); var result = await InnerSendBookingOrClosingEDI(model, ediModel, ediRouteEnum);
_logger.LogInformation("批次={no} 生成EDI文件完成 结果={result}", batchNo, JSON.Serialize(result)); _logger.LogInformation("批次={no} 生成EDI文件完成 结果={result}", batchNo, JSON.Serialize(result));

Loading…
Cancel
Save