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