|
|
|
@ -720,7 +720,7 @@ namespace Myshipping.Application
|
|
|
|
|
throw Oops.Bah("大简云接收订舱用户key和秘钥未配置,请联系管理员");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var orderList = _rep.AsQueryable().Where(x => ids.Contains(x.Id)).ToList();
|
|
|
|
|
var orderList = _rep.AsQueryable().Filter(null, true).Where(x => ids.Contains(x.Id)).ToList();
|
|
|
|
|
var noSubmitList = orderList.Where(x => x.BSSTATUS != "已提交").Select(x => x.BOOKINGNO).ToList();
|
|
|
|
|
if (noSubmitList.Count > 0)
|
|
|
|
|
{
|
|
|
|
@ -771,7 +771,7 @@ namespace Myshipping.Application
|
|
|
|
|
var succ = item.GetBooleanValue("success");
|
|
|
|
|
if (succ)
|
|
|
|
|
{
|
|
|
|
|
var model = _rep.AsQueryable().First(x => x.Id == id);
|
|
|
|
|
var model = _rep.AsQueryable().Filter(null, true).First(x => x.Id == id);
|
|
|
|
|
model.BSSTATUS = "已录入";
|
|
|
|
|
await _rep.UpdateAsync(model);
|
|
|
|
|
|
|
|
|
@ -916,6 +916,8 @@ namespace Myshipping.Application
|
|
|
|
|
//日志动态
|
|
|
|
|
SaveAuditLog($"{model.BSSTATUS},审核意见:{recModel.Comment}", id, model.CreatedUserId.Value, model.TenantId.Value, "系统");
|
|
|
|
|
|
|
|
|
|
long bookingId = 0;
|
|
|
|
|
|
|
|
|
|
//进入客户订舱系统的订舱台账
|
|
|
|
|
if (recModel.Accept)
|
|
|
|
|
{
|
|
|
|
@ -926,6 +928,7 @@ namespace Myshipping.Application
|
|
|
|
|
await _repOrder.InsertAsync(bkOrder);
|
|
|
|
|
|
|
|
|
|
model.BookingId = bkOrder.Id; //客户订舱数据与订舱台账数据关联
|
|
|
|
|
bookingId = bkOrder.Id;
|
|
|
|
|
await _rep.UpdateAsync(model);
|
|
|
|
|
|
|
|
|
|
var bkEdiExt = new BookingEDIExt();
|
|
|
|
@ -960,9 +963,6 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
await _repFile.InsertAsync(file);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return bkOrder.Id;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -970,19 +970,36 @@ namespace Myshipping.Application
|
|
|
|
|
_ = Task.Run(() =>
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
string json = null;
|
|
|
|
|
if (recModel.Accept)
|
|
|
|
|
{
|
|
|
|
|
var body = new
|
|
|
|
|
{
|
|
|
|
|
Type = "CustOrderStatusAccept",
|
|
|
|
|
Data = new
|
|
|
|
|
{
|
|
|
|
|
model.BSNO,
|
|
|
|
|
BSSTATUS = "已审核",
|
|
|
|
|
BookingOrderId = bookingId
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
json = body.ToJsonString();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
var body = new
|
|
|
|
|
{
|
|
|
|
|
Type = recModel.Accept ? "CustOrderStatusAccept" : "CustOrderStatusReject",
|
|
|
|
|
Type = "CustOrderStatusReject",
|
|
|
|
|
Data = new
|
|
|
|
|
{
|
|
|
|
|
model.BSNO,
|
|
|
|
|
BSSTATUS = recModel.Accept ? "已审核" : "已驳回",
|
|
|
|
|
BookingOrderId = recModel.Accept ? (long?)model.BookingId : null,
|
|
|
|
|
COMMENT = recModel.Accept ? null : recModel.Comment
|
|
|
|
|
BSSTATUS = "已驳回",
|
|
|
|
|
COMMENT = recModel.Comment
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
var json = body.ToJsonString();
|
|
|
|
|
json = body.ToJsonString();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var mqUrl = _cache.GetAllSysConfig().Result.FirstOrDefault(x => x.Code == "AuditBookingMqUrl")?.Value ?? throw new Exception("需配置接收订舱需求审核后推送东胜MQ连接串:[AuditBookingMqUrl]");
|
|
|
|
|
|
|
|
|
@ -1020,8 +1037,15 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if (recModel.Accept)
|
|
|
|
|
{
|
|
|
|
|
return bookingId;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 订舱完整数据
|
|
|
|
@ -1822,7 +1846,11 @@ namespace Myshipping.Application
|
|
|
|
|
throw Oops.Bah("当前状态不能修改");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (custOrder.BSSTATUS == "已提交")
|
|
|
|
|
{
|
|
|
|
|
await CancelSubmit(new List<long>() { custOrder.Id });
|
|
|
|
|
custOrder = await _rep.AsQueryable().Filter(null, true).FirstAsync(x => x.Id == custOrder.Id); //取消后重新拉取一遍数据
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
input.Id = custOrder.Id;
|
|
|
|
|