运踪订阅:保存订舱时,取消自动订阅目的港运踪

optimize
zhangxiaofeng 10 months ago
parent c21af7ee38
commit 248057f55f

@ -117,24 +117,24 @@ namespace Myshipping.Application.Event
YardCode = order.YARDID == "" ? null : order.YARDID,
CARRIER = order.CARRIER == "" ? null : order.CARRIER,
CARRIERID = order.CARRIERID == "" ? null : order.CARRIERID,
isBook = true,
isBook = false,
AlertEmail = string.Join(";", emailList)
});
var status = string.Empty;
if (!string.IsNullOrWhiteSpace(order.YARDID) && !string.IsNullOrWhiteSpace(order.CARRIERID))
{
status = "订阅起运港,目的港";
}
else
if (string.IsNullOrWhiteSpace(order.YARDID) && !string.IsNullOrWhiteSpace(order.CARRIERID))
{
status = "订阅目的港";
}
else if (!string.IsNullOrWhiteSpace(order.YARDID) && string.IsNullOrWhiteSpace(order.CARRIERID))
{
status = "订阅起运港";
}
var status = "订阅起运港";
//if (!string.IsNullOrWhiteSpace(order.YARDID) && !string.IsNullOrWhiteSpace(order.CARRIERID))
//{
// status = "订阅起运港,目的港";
//}
//else
//if (string.IsNullOrWhiteSpace(order.YARDID) && !string.IsNullOrWhiteSpace(order.CARRIERID))
//{
// status = "订阅目的港";
//}
//else if (!string.IsNullOrWhiteSpace(order.YARDID) && string.IsNullOrWhiteSpace(order.CARRIERID))
//{
// status = "订阅起运港";
//}
var stalogids = _repStatuslog.AsQueryable().Filter(null, true).Where(x => x.BookingId == order.Id).Select(x => x.Id).ToList();
_repBookingStatus.Delete(x => x.BookingId == order.Id);
_repStatuslogDetail.Delete(x => stalogids.Contains(x.PId));

@ -1566,21 +1566,20 @@ namespace Myshipping.Application
//判断是否订阅运踪目的港起运港标识
if (!string.IsNullOrEmpty(entity.MBLNO))
{
if (!string.IsNullOrEmpty(entity.CARRIERID) && !string.IsNullOrEmpty(entity.YARDID))
{
entity.IsBookingYZ = "3";
}
if (!string.IsNullOrEmpty(entity.CARRIERID) && string.IsNullOrEmpty(entity.YARDID))
{
entity.IsBookingYZ = "2";
}
if (string.IsNullOrEmpty(entity.CARRIERID) && !string.IsNullOrEmpty(entity.YARDID))
{
entity.IsBookingYZ = "1";
entity.IsBookingYZ = "1";
}
//if (!string.IsNullOrEmpty(entity.CARRIERID) && !string.IsNullOrEmpty(entity.YARDID))
//{
// entity.IsBookingYZ = "3";
//}
//if (!string.IsNullOrEmpty(entity.CARRIERID) && string.IsNullOrEmpty(entity.YARDID))
//{
// entity.IsBookingYZ = "2";
//}
//if (string.IsNullOrEmpty(entity.CARRIERID) && !string.IsNullOrEmpty(entity.YARDID))
//{
// entity.IsBookingYZ = "1";
//}
}
else
{

Loading…
Cancel
Save