新增VOLTA

master
jianghaiqing 3 months ago
parent 44af0fb65e
commit 9ac230a44a

File diff suppressed because it is too large Load Diff

@ -55,6 +55,10 @@ namespace Myshipping.Application
/// <summary> /// <summary>
/// SITC /// SITC
/// </summary> /// </summary>
SITC SITC,
/// <summary>
/// INTTRA
/// </summary>
VOLTA
} }
} }

@ -9239,6 +9239,30 @@ namespace Myshipping.Application
result.extra = currRlt.succ ? currRlt.extra : null; result.extra = currRlt.succ ? currRlt.extra : null;
result.extra2 = currRlt.succ ? currRlt.extra2 : null; result.extra2 = currRlt.succ ? currRlt.extra2 : null;
} }
else if (ediRouteEnum == EDIRouteEnum.VOLTA)
{
#region VOLTA
string strCheck = VOLTAEdiNewHelper.IsCreateVOLTAEDI(ediModel);
_logger.LogInformation($"调用SO(SI),校验:{strCheck},数据对象:{JsonConvert.SerializeObject(ediModel)}");
if (!string.IsNullOrWhiteSpace(strCheck))
{
if (Regex.IsMatch(strCheck, "\\<br\\s{1,}/\\>"))
{
strCheck = Regex.Replace(strCheck, "\\<br\\s{1,}/\\>", "\n");
}
throw Oops.Bah($"发送{EDIRouteEnum.YT.ToString()}校验失败,{strCheck}");
}
CommonWebApiResult currRlt = VOLTAEdiNewHelper.CreateEdiVOLTA(ediModel);
#endregion
result.succ = currRlt.succ;
result.extra = currRlt.succ ? currRlt.extra.ToString() : "";
}
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -10391,6 +10415,28 @@ namespace Myshipping.Application
dto.YARDREMARK = item.BookingSlotTypeName; dto.YARDREMARK = item.BookingSlotTypeName;
} }
//这里判断一下ATD,优先以船期表为主。
if (dto.ATD.HasValue)
{
var paramConfig = _djyTenantParamService.GetParaCodeWithValue(new[] { "SYNC_DONGSHENG_ATD_USE_SHIPSCHEDULE" }).GetAwaiter().GetResult().FirstOrDefault();
if (paramConfig != null && !string.IsNullOrWhiteSpace(paramConfig.ParaValue) && paramConfig.ParaValue.Equals("ENABLE", StringComparison.OrdinalIgnoreCase))
{
//取船期表,最新的记录
if (!string.IsNullOrWhiteSpace(item.VESSEL) && !string.IsNullOrWhiteSpace(item.VOYNO) && !string.IsNullOrWhiteSpace(item.PORTLOADCODE))
{
var vesselInfo = _vesselInfo.AsQueryable().Filter(null, true).Where(a => a.Vessel == item.VESSEL && a.Voyno == item.VOYNO && a.PortLoadingId == item.PORTLOADCODE && a.IsDeleted == false
&& a.TenantId == UserManager.TENANT_ID).OrderByDescending(a => a.CreatedTime.Value).First();
if (vesselInfo != null && vesselInfo.ATD.HasValue && dto.ATD != vesselInfo.ATD)
{
//每次强制适用船期ATD
dto.ATD = vesselInfo.ATD;
}
}
}
}
List<ServiceProjectStatusDto> statusList = new List<ServiceProjectStatusDto>(); List<ServiceProjectStatusDto> statusList = new List<ServiceProjectStatusDto>();
if (App.Configuration["ServiceStatusOpenAuto"] == "1") if (App.Configuration["ServiceStatusOpenAuto"] == "1")
@ -11699,6 +11745,13 @@ namespace Myshipping.Application
*/ */
string batchNo = IDGen.NextID().ToString(); string batchNo = IDGen.NextID().ToString();
var isVOLTASIExport = App.Configuration["IsVOLTASIExport"];
if(!string.IsNullOrWhiteSpace(isVOLTASIExport) && isVOLTASIExport == "0")
{
throw Oops.Bah("配置IsVOLTASIExport=0不弹出窗口");
}
_logger.LogInformation("批次={no}获取请求VOLTA截单详情 {msg}", batchNo, JSON.Serialize(model)); _logger.LogInformation("批次={no}获取请求VOLTA截单详情 {msg}", batchNo, JSON.Serialize(model));
if (!model.sendType.Equals("E", StringComparison.OrdinalIgnoreCase)) if (!model.sendType.Equals("E", StringComparison.OrdinalIgnoreCase))

@ -142,5 +142,6 @@
"SICompareUrl": "http://localhost:5110/api/TaskDraftCompare/ExcuteSISubmittedCompare", "SICompareUrl": "http://localhost:5110/api/TaskDraftCompare/ExcuteSISubmittedCompare",
"EmailNoticeUrl": "http://47.104.73.97:8801/mail/send", "EmailNoticeUrl": "http://47.104.73.97:8801/mail/send",
"EmailNoticeDefaultUser": "jianghaiqing@myshipping.net", "EmailNoticeDefaultUser": "jianghaiqing@myshipping.net",
"BookingAmendModifyWebApiUrl": "http://localhost:5110/api/TaskBookingAmendmentParser/ModifyBookingAmendmentFile" "BookingAmendModifyWebApiUrl": "http://localhost:5110/api/TaskBookingAmendmentParser/ModifyBookingAmendmentFile",
"IsVOLTASIExport": "0"
} }
Loading…
Cancel
Save