|
|
|
@ -56,17 +56,7 @@ namespace DS.WMS.Core.HangfireJob.Method
|
|
|
|
|
_logger.Error("海运出口信息不存在!");
|
|
|
|
|
throw new Exception("海运出口信息不存在!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var orderUrl = tenantDb.Queryable<BookingOrderUrl>().First(x => x.BusinessId == bookingId);
|
|
|
|
|
if (orderUrl == null)
|
|
|
|
|
{
|
|
|
|
|
orderUrl = new BookingOrderUrl()
|
|
|
|
|
{
|
|
|
|
|
BusinessId = bookingId
|
|
|
|
|
};
|
|
|
|
|
tenantDb.Insertable(orderUrl).ExecuteCommand();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//if (!string.IsNullOrEmpty(orderUrl.UrlVgm))
|
|
|
|
|
//{
|
|
|
|
|
// return await Task.FromResult(DataResult<string[]>.Success(new string[] { orderUrl.UrlVgm, orderUrl.UrlVgmSi }));
|
|
|
|
@ -210,25 +200,42 @@ namespace DS.WMS.Core.HangfireJob.Method
|
|
|
|
|
_logger.Error(jobjResp.GetStringValue("message"));
|
|
|
|
|
throw new Exception(jobjResp.GetStringValue("message"));
|
|
|
|
|
}
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
tenantDb.Ado.BeginTran();
|
|
|
|
|
var orderUrl = tenantDb.Queryable<BookingOrderUrl>().First(x => x.BusinessId == bookingId);
|
|
|
|
|
if (orderUrl == null)
|
|
|
|
|
{
|
|
|
|
|
orderUrl = new BookingOrderUrl()
|
|
|
|
|
{
|
|
|
|
|
BusinessId = bookingId
|
|
|
|
|
};
|
|
|
|
|
tenantDb.Insertable(orderUrl).ExecuteCommand();
|
|
|
|
|
}
|
|
|
|
|
//保存url
|
|
|
|
|
var memoData = jobjResp.GetJObjectValue("memoData");
|
|
|
|
|
orderUrl.UrlVgm = memoData.GetStringValue("vgmUrl");
|
|
|
|
|
orderUrl.UrlVgmSi = memoData.GetStringValue("vgmAndSiUrl");
|
|
|
|
|
tenantDb.Updateable(orderUrl).ExecuteCommand();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//保存url
|
|
|
|
|
var memoData = jobjResp.GetJObjectValue("memoData");
|
|
|
|
|
orderUrl.UrlVgm = memoData.GetStringValue("vgmUrl");
|
|
|
|
|
orderUrl.UrlVgmSi = memoData.GetStringValue("vgmAndSiUrl");
|
|
|
|
|
tenantDb.Updateable(orderUrl).ExecuteCommand();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//货运动态
|
|
|
|
|
var bookingStatus = new BookingStatusLog()
|
|
|
|
|
//货运动态
|
|
|
|
|
var bookingStatus = new BookingStatusLog()
|
|
|
|
|
{
|
|
|
|
|
BusinessId = bookingId,
|
|
|
|
|
Status = $"生成VGM链接",
|
|
|
|
|
Group = "ship",
|
|
|
|
|
OpTime = DateTime.Now,
|
|
|
|
|
MBLNO = order.MBLNO
|
|
|
|
|
};
|
|
|
|
|
tenantDb.Insertable(bookingStatus).ExecuteCommand();
|
|
|
|
|
tenantDb.Ado.CommitTran();
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
BusinessId = bookingId,
|
|
|
|
|
Status = $"生成VGM链接",
|
|
|
|
|
Group = "ship",
|
|
|
|
|
OpTime = DateTime.Now,
|
|
|
|
|
MBLNO = order.MBLNO
|
|
|
|
|
};
|
|
|
|
|
tenantDb.Insertable(bookingStatus).ExecuteCommand();
|
|
|
|
|
tenantDb.Ado.RollbackTran();
|
|
|
|
|
throw new Exception(ex.ToString());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void TxxpLinkJob(BaseJobReq req)
|
|
|
|
@ -238,17 +245,7 @@ namespace DS.WMS.Core.HangfireJob.Method
|
|
|
|
|
|
|
|
|
|
var bookingId = req.Id;
|
|
|
|
|
var order = tenantDb.Queryable<SeaExport>().First(x => x.Id == bookingId);
|
|
|
|
|
|
|
|
|
|
var orderUrl = tenantDb.Queryable<BookingOrderUrl>().First(x => x.BusinessId == bookingId);
|
|
|
|
|
if (orderUrl == null)
|
|
|
|
|
{
|
|
|
|
|
orderUrl = new BookingOrderUrl()
|
|
|
|
|
{
|
|
|
|
|
BusinessId = bookingId
|
|
|
|
|
};
|
|
|
|
|
tenantDb.Insertable(orderUrl).ExecuteCommand();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//校验船公司
|
|
|
|
|
if (string.IsNullOrEmpty(order.Carrier) || order.CarrierId == 0)
|
|
|
|
|
{
|
|
|
|
@ -377,26 +374,44 @@ namespace DS.WMS.Core.HangfireJob.Method
|
|
|
|
|
_logger.Error(jobjResp.GetStringValue("message"));
|
|
|
|
|
throw new Exception(jobjResp.GetStringValue("message"));
|
|
|
|
|
}
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
tenantDb.Ado.BeginTran();
|
|
|
|
|
var orderUrl = tenantDb.Queryable<BookingOrderUrl>().First(x => x.BusinessId == bookingId);
|
|
|
|
|
if (orderUrl == null)
|
|
|
|
|
{
|
|
|
|
|
orderUrl = new BookingOrderUrl()
|
|
|
|
|
{
|
|
|
|
|
BusinessId = bookingId
|
|
|
|
|
};
|
|
|
|
|
tenantDb.Insertable(orderUrl).ExecuteCommand();
|
|
|
|
|
}
|
|
|
|
|
var addUrlFlag = string.IsNullOrEmpty(orderUrl.UrlTxxp) ? true : false; //新生成还是更新链接
|
|
|
|
|
//保存url
|
|
|
|
|
|
|
|
|
|
var addUrlFlag = string.IsNullOrEmpty(orderUrl.UrlTxxp) ? true : false; //新生成还是更新链接
|
|
|
|
|
//保存url
|
|
|
|
|
|
|
|
|
|
//保存url
|
|
|
|
|
var txxpUrl = jobjResp.GetStringValue("data");
|
|
|
|
|
orderUrl.UrlTxxp = txxpUrl;
|
|
|
|
|
tenantDb.Updateable(orderUrl).ExecuteCommand();
|
|
|
|
|
//保存url
|
|
|
|
|
var txxpUrl = jobjResp.GetStringValue("data");
|
|
|
|
|
orderUrl.UrlTxxp = txxpUrl;
|
|
|
|
|
tenantDb.Updateable(orderUrl).ExecuteCommand();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//货运动态
|
|
|
|
|
var bookingStatus = new BookingStatusLog()
|
|
|
|
|
//货运动态
|
|
|
|
|
var bookingStatus = new BookingStatusLog()
|
|
|
|
|
{
|
|
|
|
|
BusinessId = bookingId,
|
|
|
|
|
Status = $"{(addUrlFlag ? "生成" : "更新")}提箱小票链接",
|
|
|
|
|
Group = "ship",
|
|
|
|
|
OpTime = DateTime.Now,
|
|
|
|
|
MBLNO = order.MBLNO
|
|
|
|
|
};
|
|
|
|
|
tenantDb.Insertable(bookingStatus).ExecuteCommand();
|
|
|
|
|
tenantDb.Ado.CommitTran();
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
BusinessId = bookingId,
|
|
|
|
|
Status = $"{(addUrlFlag ? "生成" : "更新")}提箱小票链接",
|
|
|
|
|
Group = "ship",
|
|
|
|
|
OpTime = DateTime.Now,
|
|
|
|
|
MBLNO = order.MBLNO
|
|
|
|
|
};
|
|
|
|
|
tenantDb.Insertable(bookingStatus).ExecuteCommand();
|
|
|
|
|
tenantDb.Ado.RollbackTran();
|
|
|
|
|
throw new Exception(ex.ToString());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|