|
|
@ -769,6 +769,7 @@ namespace Myshipping.Application
|
|
|
|
vgmInfo.CreatedUserName = taskInfo.CreatedUserName;
|
|
|
|
vgmInfo.CreatedUserName = taskInfo.CreatedUserName;
|
|
|
|
vgmInfo.TenantId = taskInfo.TenantId;
|
|
|
|
vgmInfo.TenantId = taskInfo.TenantId;
|
|
|
|
vgmInfo.TenantName = taskInfo.TenantName;
|
|
|
|
vgmInfo.TenantName = taskInfo.TenantName;
|
|
|
|
|
|
|
|
vgmInfo.TASK_TYPE = info.Main.TaskType.ToString();
|
|
|
|
|
|
|
|
|
|
|
|
_taskVGMInfoRepository.InsertAsync(vgmInfo);
|
|
|
|
_taskVGMInfoRepository.InsertAsync(vgmInfo);
|
|
|
|
|
|
|
|
|
|
|
@ -813,19 +814,8 @@ namespace Myshipping.Application
|
|
|
|
var bookingInfo = bookingList.FirstOrDefault(a =>
|
|
|
|
var bookingInfo = bookingList.FirstOrDefault(a =>
|
|
|
|
a.MBLNO.Equals(vgmInfo.MBL_NO, StringComparison.OrdinalIgnoreCase));
|
|
|
|
a.MBLNO.Equals(vgmInfo.MBL_NO, StringComparison.OrdinalIgnoreCase));
|
|
|
|
|
|
|
|
|
|
|
|
//推送状态
|
|
|
|
if (bookingInfo != null)
|
|
|
|
var pushModel = new ModifyServiceProjectStatusDto
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
BookingId = bookingInfo.Id,
|
|
|
|
|
|
|
|
SourceType = TrackingSourceTypeEnum.AUTO,
|
|
|
|
|
|
|
|
StatusCodes = new List<ModifyServiceProjectStatusDetailDto> {
|
|
|
|
|
|
|
|
new ModifyServiceProjectStatusDetailDto { StatusCode = "VGMCG" } }
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var saveStatusRlt = _bookingValueAddedService.SaveServiceStatus(pushModel).GetAwaiter().GetResult();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation("请求JSON={json} 异步推送服务状态完成,结果={rlt}", JSON.Serialize(pushModel), JSON.Serialize(saveStatusRlt));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var vgmEntity = _taskVGMInfoRepository.AsQueryable().Filter(null, true)
|
|
|
|
var vgmEntity = _taskVGMInfoRepository.AsQueryable().Filter(null, true)
|
|
|
|
.First(x => x.PK_ID == vgmInfo.PK_ID && x.IsDeleted == false && x.TenantId == taskInfo.TenantId);
|
|
|
|
.First(x => x.PK_ID == vgmInfo.PK_ID && x.IsDeleted == false && x.TenantId == taskInfo.TenantId);
|
|
|
|
|
|
|
|
|
|
|
@ -842,6 +832,21 @@ namespace Myshipping.Application
|
|
|
|
var ctnList = info.Main.VGMFeedBack
|
|
|
|
var ctnList = info.Main.VGMFeedBack
|
|
|
|
.FirstOrDefault(x => x.MBlNo.Equals(vgmInfo.MBL_NO, StringComparison.OrdinalIgnoreCase)).CtnList;
|
|
|
|
.FirstOrDefault(x => x.MBlNo.Equals(vgmInfo.MBL_NO, StringComparison.OrdinalIgnoreCase)).CtnList;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (info.Main.TaskType == TaskBaseTypeEnum.VGM_FEEDBACK)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
//推送状态
|
|
|
|
|
|
|
|
var pushModel = new ModifyServiceProjectStatusDto
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
BookingId = bookingInfo.Id,
|
|
|
|
|
|
|
|
SourceType = TrackingSourceTypeEnum.AUTO,
|
|
|
|
|
|
|
|
StatusCodes = new List<ModifyServiceProjectStatusDetailDto> {
|
|
|
|
|
|
|
|
new ModifyServiceProjectStatusDetailDto { StatusCode = "VGMCG" } }
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var saveStatusRlt = _bookingValueAddedService.SaveServiceStatus(pushModel).GetAwaiter().GetResult();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_logger.LogInformation("请求JSON={json} 异步推送服务状态完成,结果={rlt}", JSON.Serialize(pushModel), JSON.Serialize(saveStatusRlt));
|
|
|
|
|
|
|
|
|
|
|
|
foreach (var ctn in ctnList)
|
|
|
|
foreach (var ctn in ctnList)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var bookCtnVGM = ctnVGMList.FirstOrDefault(t => t.CNTRNO.Equals(ctn.CntrNo, StringComparison.OrdinalIgnoreCase));
|
|
|
|
var bookCtnVGM = ctnVGMList.FirstOrDefault(t => t.CNTRNO.Equals(ctn.CntrNo, StringComparison.OrdinalIgnoreCase));
|
|
|
@ -853,6 +858,8 @@ namespace Myshipping.Application
|
|
|
|
bookCtnVGM.UpdatedTime = taskInfo.CreatedTime;
|
|
|
|
bookCtnVGM.UpdatedTime = taskInfo.CreatedTime;
|
|
|
|
bookCtnVGM.UpdatedUserId = taskInfo.CreatedUserId;
|
|
|
|
bookCtnVGM.UpdatedUserId = taskInfo.CreatedUserId;
|
|
|
|
bookCtnVGM.UpdatedUserName = taskInfo.CreatedUserName;
|
|
|
|
bookCtnVGM.UpdatedUserName = taskInfo.CreatedUserName;
|
|
|
|
|
|
|
|
bookCtnVGM.IS_MISSING = false;
|
|
|
|
|
|
|
|
bookCtnVGM.SUBMISSION_DEADLINE = null;
|
|
|
|
|
|
|
|
|
|
|
|
_bookingCtnVGMRepository.AsUpdateable(bookCtnVGM).UpdateColumns(x => new
|
|
|
|
_bookingCtnVGMRepository.AsUpdateable(bookCtnVGM).UpdateColumns(x => new
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -881,11 +888,50 @@ namespace Myshipping.Application
|
|
|
|
CreatedUserId = taskInfo.CreatedUserId,
|
|
|
|
CreatedUserId = taskInfo.CreatedUserId,
|
|
|
|
CreatedUserName = taskInfo.CreatedUserName,
|
|
|
|
CreatedUserName = taskInfo.CreatedUserName,
|
|
|
|
TenantId = taskInfo.TenantId,
|
|
|
|
TenantId = taskInfo.TenantId,
|
|
|
|
|
|
|
|
REC_TIME = vgmInfo.NOTICE_DATE
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_bookingCtnVGMRepository.Insert(bookingCtnVGM);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (ctnList.Count > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
foreach (var ctn in ctnList)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
var bookCtnVGM = ctnVGMList.FirstOrDefault(t => t.CNTRNO.Equals(ctn.CntrNo, StringComparison.OrdinalIgnoreCase));
|
|
|
|
|
|
|
|
var bookCtn = bookCtnList.FirstOrDefault(t => t.CNTRNO.Equals(ctn.CntrNo, StringComparison.OrdinalIgnoreCase));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (bookCtnVGM == null)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
//写入
|
|
|
|
|
|
|
|
var bookingCtnVGM = new BookingCtnVGM
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
CNTRNO = ctn.CntrNo,
|
|
|
|
|
|
|
|
BILLID = bookingInfo.Id,
|
|
|
|
|
|
|
|
VGM_WEIGHT = ctn.VGMWeight,
|
|
|
|
|
|
|
|
VGM_WEIGHT_UNIT = ctn.VGMWeightUnit,
|
|
|
|
|
|
|
|
VGM_METHOD = ctn.VGMWeightMethod,
|
|
|
|
|
|
|
|
IS_MATCH = bookCtn != null,
|
|
|
|
|
|
|
|
CreatedTime = taskInfo.CreatedTime,
|
|
|
|
|
|
|
|
UpdatedTime = taskInfo.CreatedTime,
|
|
|
|
|
|
|
|
CreatedUserId = taskInfo.CreatedUserId,
|
|
|
|
|
|
|
|
CreatedUserName = taskInfo.CreatedUserName,
|
|
|
|
|
|
|
|
TenantId = taskInfo.TenantId,
|
|
|
|
|
|
|
|
REC_TIME = vgmInfo.NOTICE_DATE,
|
|
|
|
|
|
|
|
IS_MISSING = true,
|
|
|
|
|
|
|
|
SUBMISSION_DEADLINE = vgmInfo.VGM_SUBMISSION_DEADLINE
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
_bookingCtnVGMRepository.Insert(bookingCtnVGM);
|
|
|
|
_bookingCtnVGMRepository.Insert(bookingCtnVGM);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|