EMC订舱

master
wanghaomei 6 months ago
parent 5bdfc8a6d3
commit 4a0ece052a

@ -154,12 +154,9 @@ namespace Myshipping.Application.EDI
//var mapServArr = mappService.MapCode.Split('-');
var startDay = template.StartDay.HasValue ? template.StartDay.Value : 1;
var endWeek = template.EndWeek.HasValue ? template.EndWeek.Value : 2;
postModel.routes = new EMCSoApiRoute()
{
searchConditionDate = custOrder.ETD.Value.AddDays(startDay).ToString("yyyy-MM-dd"),
searchConditionDate = custOrder.ETD.Value.ToString("yyyy-MM-dd"),
originName = mapPlaceReceipt.MapCode,
destinationName = mapDestination.MapCode,
polPortName = mapPortLoad.MapCode,
@ -329,6 +326,8 @@ namespace Myshipping.Application.EDI
};
#endregion
postModel.remark = custOrder.SOREMARK;
var apiUrl = sCfgSpiderUrl.Value;
if (!apiUrl.EndsWith("/"))
{

@ -669,11 +669,9 @@ namespace Myshipping.Application
throw Oops.Bah("回推数据接收接口授权未配置");
}
foreach (var order in orderList)
{
if (order.BSSTATUS != "已录入" && order.BSSTATUS != "已驳回")
if (order.BSSTATUS == "已审核")
{
throw Oops.Bah($"{order.BOOKINGNO} 当前状态为{order.BSSTATUS},不能提交");
}
@ -694,6 +692,10 @@ namespace Myshipping.Application
dto.Files = fileList.Where(x => x.BookingId == order.Id).ToList().Adapt<List<BookingFileSyncCustomerDto>>();
sendList.Add(dto);
//2024年6月17日因为运营端有自动审核导致“已审核”的状态被覆盖成“已提交”与衣国豪讨论改为先改为“已提交”状态后调用运营端提交
order.BSSTATUS = "已提交";
await _rep.AsUpdateable(order).UpdateColumns(x => new { x.BSSTATUS }).ExecuteCommandAsync();
}
//构建完整url
@ -744,9 +746,10 @@ namespace Myshipping.Application
var succ = item.GetBooleanValue("success");
if (succ)
{
var model = _rep.AsQueryable().Filter(null, true).First(x => x.Id == id);
model.BSSTATUS = "已提交";
await _rep.UpdateAsync(model);
//2024年6月17日因为运营端有自动审核导致“已审核”的状态被这里覆盖成“已提交”与衣国豪讨论改为先改为“已提交”状态后调用运营端提交
//var model = _rep.AsQueryable().Filter(null, true).First(x => x.Id == id);
//model.BSSTATUS = "已提交";
//await _rep.UpdateAsync(model);
//日志动态
SaveAuditLog("已提交", id);
@ -1884,7 +1887,7 @@ namespace Myshipping.Application
custOrder.SignType = "Forwarder";
custOrder.BillCount = 1;
var lastOrder =await _rep.AsQueryable().Where(x => x.CreatedUserId == UserManager.UserId).OrderByDescending(x => x.CreatedTime).FirstAsync();
var lastOrder = await _rep.AsQueryable().Where(x => x.CreatedUserId == UserManager.UserId).OrderByDescending(x => x.CreatedTime).FirstAsync();
custOrder.BookingAddr = lastOrder.BookingAddr;
custOrder.BillSignLoc = lastOrder.BillSignLoc;
custOrder.SHIPPER = lastOrder.SHIPPER;

Loading…
Cancel
Save