|
|
|
@ -602,10 +602,10 @@ namespace Myshipping.Application
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 刷新预甩货对应订舱
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="nominationId">预甩货主键</param>
|
|
|
|
|
/// <param name="taskPkId">预甩货主键</param>
|
|
|
|
|
/// <returns>返回回执</returns>
|
|
|
|
|
[HttpGet("/TaskManageRollingNomination/RefreshBookingOrder")]
|
|
|
|
|
public async Task<TaskManageOrderResultDto> RefreshBookingOrder(string nominationId)
|
|
|
|
|
public async Task<TaskManageOrderResultDto> RefreshBookingOrder(string taskPkId)
|
|
|
|
|
{
|
|
|
|
|
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
|
|
|
|
|
|
|
|
|
@ -616,17 +616,17 @@ namespace Myshipping.Application
|
|
|
|
|
*/
|
|
|
|
|
var list = _taskRollingNominationInfoRepository.AsQueryable().Filter(null, true)
|
|
|
|
|
.InnerJoin<TaskRollingNominationDetailInfo>((nom, detail) => nom.PK_ID == detail.NOM_ID)
|
|
|
|
|
.Where((nom, detail) => nom.PK_ID == nominationId
|
|
|
|
|
.Where((nom, detail) => nom.TASK_ID == taskPkId
|
|
|
|
|
&& detail.IsDeleted == false && !detail.BOOKING_ID.HasValue)
|
|
|
|
|
.Select((nom, detail) => detail).ToList();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (list.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
var mblNoArg = list.Select(a=>a.SHIPMENT).Distinct().ToList();
|
|
|
|
|
var mblNoArg = list.Select(a => a.SHIPMENT?.Trim()).Distinct().ToList();
|
|
|
|
|
|
|
|
|
|
var orderList = _bookingOrderRepository.AsQueryable()
|
|
|
|
|
.Where(a => mblNoArg.Contains(a.MBLNO) && !a.ParentId.HasValue && a.IsDeleted == false).ToList();
|
|
|
|
|
.Where(a => mblNoArg.Contains(a.MBLNO) && (a.ParentId == null || a.ParentId == 0) && a.IsDeleted == false).ToList();
|
|
|
|
|
|
|
|
|
|
DateTime nowDate = DateTime.Now;
|
|
|
|
|
|
|
|
|
@ -659,6 +659,9 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
result.succ = true;
|
|
|
|
|
result.msg = "对应订舱完成";
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
@ -1278,7 +1281,7 @@ namespace Myshipping.Application
|
|
|
|
|
|
|
|
|
|
model.LoadDetailList = list.Select(a => a.Adapt<TaskRollingNominationShipDetailShowDto>()).ToList();
|
|
|
|
|
|
|
|
|
|
if (model.From != null && model.From.Count > 0)
|
|
|
|
|
if (model.From != null && model.From.Count > 1)
|
|
|
|
|
{
|
|
|
|
|
var firstLoadDetail = model.LoadDetailList.FirstOrDefault();
|
|
|
|
|
|
|
|
|
@ -1566,7 +1569,7 @@ namespace Myshipping.Application
|
|
|
|
|
//原船
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(fromShipInfo.VESSEL) && !string.IsNullOrWhiteSpace(fromShipInfo.VOYNO))
|
|
|
|
|
{
|
|
|
|
|
baseHtml = baseHtml.Replace("#VesselVoyno#", $"{fromShipInfo.VESSEL} / {fromShipInfo.VOYNO}");
|
|
|
|
|
baseHtml = baseHtml.Replace("#VesselVoyno#", $"{fromShipInfo.VESSEL}/{fromShipInfo.VOYNO}");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
@ -1585,7 +1588,7 @@ namespace Myshipping.Application
|
|
|
|
|
//换船
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(toShipInfo.VESSEL) && !string.IsNullOrWhiteSpace(toShipInfo.VOYNO))
|
|
|
|
|
{
|
|
|
|
|
baseHtml = baseHtml.Replace("#newVesselVoyno#", $"{toShipInfo.VESSEL} / {toShipInfo.VOYNO}");
|
|
|
|
|
baseHtml = baseHtml.Replace("#newVesselVoyno#", $"{toShipInfo.VESSEL}/{toShipInfo.VOYNO}");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|