修改派车任务

optimize
jianghaiqing 2 years ago
parent 2a9d10f65b
commit 72dc4d553b

@ -1273,7 +1273,7 @@ namespace Myshipping.Application
BLNo = currBC.BLNo?.Trim().ToUpper(),
Vessel = currBC.Vessel?.Trim().ToUpper(),
Voyage = currBC.Voyage?.Trim().ToUpper(),
ClosingDate = currBC.ClosingDate,
ClosingDate = currBC.CutSingleTime,
CYCutOffTime = currBC.CYCutOffTime,
ETD = currBC.ETD
};
@ -1370,6 +1370,32 @@ namespace Myshipping.Application
2
3
*/
var bookingOrder = _bookingOrderRepository.AsQueryable().First(a => a.Id == model.BookingOrderId);
if(bookingOrder == null)
throw Oops.Bah($"订舱信息获取失败,订舱信息不存在或已作废");
if (model.ClosingDate.HasValue)
bookingOrder.CLOSINGDATE = model.ClosingDate;
if (model.VGMCutOffTime.HasValue)
bookingOrder.CLOSEVGMDATE = model.VGMCutOffTime;
if (model.CYCutOffTime.HasValue)
bookingOrder.CLOSEDOCDATE = model.CYCutOffTime;
if (model.ETD.HasValue)
bookingOrder.ETD = model.ETD;
if(!string.IsNullOrWhiteSpace(model.Vessel))
bookingOrder.VESSEL = model.Vessel;
if (!string.IsNullOrWhiteSpace(model.Voyage))
bookingOrder.VOYNO = model.Voyage;
if (!string.IsNullOrWhiteSpace(model.Voyage))
bookingOrder.VOYNO = model.Voyage;
if (model.IsLetterYard)
{
_logger.LogInformation("批次={no} 单票BC更新订舱后用户选择了转为入货通知开始发送入货通知", batchNo);

@ -97,7 +97,7 @@ namespace Myshipping.Application
public Nullable<DateTime> PortOfDestinationETA { get; set; }
/// <summary>
/// 预付地点
/// 截单时间
/// </summary>
public Nullable<DateTime> CutSingleTime { get; set; }

@ -23,15 +23,20 @@ namespace Myshipping.Application
public Nullable<long> LetterYardId { get; set; }
/// <summary>
/// 截关时间
/// 截单日期
/// </summary>
public Nullable<DateTime> ClosingDate { get; set; }
/// <summary>
/// 截港时间
/// 截港日期
/// </summary>
public Nullable<DateTime> CYCutOffTime { get; set; }
/// <summary>
/// 截VGM时间
/// </summary>
public Nullable<DateTime> VGMCutOffTime { get; set; }
/// <summary>
/// 船名
/// </summary>

@ -1352,20 +1352,20 @@ namespace Myshipping.Application
/// <param name="taskOperTypeEnum">操作类型</param>
/// <param name="sortNo">顺序号</param>
/// <returns>返回回执</returns>
private async Task<TaskManageOrderResultDto> InnerManualTask(string batchNo, TaskBaseInfo taskBaseInfo,
private async Task<TaskManageOrderResultDto> InnerManualTask(string batchNo, TaskBaseInfo model,
TaskOperTypeEnum taskOperTypeEnum, int sortNo)
{
TaskManageOrderResultDto result = new TaskManageOrderResultDto();
result.bno = taskBaseInfo.TASK_NO;
result.bno = model.TASK_NO;
try
{
var model = _taskBaseInfoRepository.AsQueryable().First(t => t.PK_ID == taskBaseInfo.PK_ID);
//var model = _taskBaseInfoRepository.Context.CopyNew().Queryable<TaskBaseInfo>().First(t => t.PK_ID == taskBaseInfo.PK_ID);
if (taskOperTypeEnum == TaskOperTypeEnum.COMPLETE_TASK)
{
if(taskBaseInfo.TASK_TYPE == TaskBusiTypeEnum.TRUCK_DISPATCH.ToString())
if(model.TASK_TYPE == TaskBusiTypeEnum.TRUCK_DISPATCH.ToString())
{
if(model.STATUS == TaskStatusEnum.Cancel.ToString())
{
@ -1373,7 +1373,7 @@ namespace Myshipping.Application
}
}
if (taskBaseInfo.TASK_TYPE == TaskBusiTypeEnum.CANCELLATION.ToString())
if (model.TASK_TYPE == TaskBusiTypeEnum.CANCELLATION.ToString())
{
//收到订舱已被取消邮件后生成的任务,如果点击完成,(订舱状态变为【退舱】,注意这里还需要确认)
}
@ -1397,7 +1397,7 @@ namespace Myshipping.Application
}
else if (taskOperTypeEnum == TaskOperTypeEnum.CANCEL_TASK)
{
if (taskBaseInfo.TASK_TYPE == TaskBusiTypeEnum.CHANGE_SHIP.ToString())
if (model.TASK_TYPE == TaskBusiTypeEnum.CHANGE_SHIP.ToString())
{
model.STATUS = TaskStatusEnum.Cancel.ToString();
model.STATUS_NAME = TaskStatusEnum.Cancel.GetDescription();
@ -1412,7 +1412,7 @@ namespace Myshipping.Application
it.STATUS_NAME
}).ExecuteCommand();
}
else if (taskBaseInfo.TASK_TYPE == TaskBusiTypeEnum.ABORT_CHANGE_SHIP.ToString())
else if (model.TASK_TYPE == TaskBusiTypeEnum.ABORT_CHANGE_SHIP.ToString())
{
/*
1.

Loading…
Cancel
Save