|
|
@ -1464,7 +1464,7 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
selectedShipSchedule = JsonConvert.DeserializeObject<MSKAPISearchTransportSchedules>(shipScheduleRecord.ShipJson);
|
|
|
|
selectedShipSchedule = JsonConvert.DeserializeObject<MSKAPISearchTransportSchedules>(shipScheduleRecord.ShipJson);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//if (selectedShipSchedule == null)
|
|
|
|
if (selectedShipSchedule == null)
|
|
|
|
//throw Oops.Oh("船期数据校验失败,请重新查询船期信息");
|
|
|
|
//throw Oops.Oh("船期数据校验失败,请重新查询船期信息");
|
|
|
|
|
|
|
|
|
|
|
|
model.placeOfReceiptCountryName = selectedShipSchedule.originCountryName;
|
|
|
|
model.placeOfReceiptCountryName = selectedShipSchedule.originCountryName;
|
|
|
@ -1487,15 +1487,18 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
var oldInfo = tenantDb.Queryable<SpaceBookingOrder>()
|
|
|
|
var oldInfo = tenantDb.Queryable<SpaceBookingOrder>()
|
|
|
|
.First(a => a.Id == model.id);
|
|
|
|
.First(a => a.Id == model.id);
|
|
|
|
|
|
|
|
|
|
|
|
//if (oldInfo == null)
|
|
|
|
//预订舱数据不存在或已作废
|
|
|
|
//throw Oops.Oh("订舱数据不存在或已作废");
|
|
|
|
if (oldInfo == null)
|
|
|
|
|
|
|
|
throw new Exception(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.SpaceBookingRecordDeletedOrNoExists)));
|
|
|
|
|
|
|
|
|
|
|
|
if (oldInfo.Status == "SUCC")
|
|
|
|
if (oldInfo.Status == "SUCC")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//if (isSendApi)
|
|
|
|
//预订舱数据已发送成功,不能重复发送
|
|
|
|
//throw Oops.Oh("订舱数据已发送成功,不能重复发送");
|
|
|
|
if (isSendApi)
|
|
|
|
|
|
|
|
throw new Exception(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.SpaceBookingBeSendNotRepeat)));
|
|
|
|
|
|
|
|
|
|
|
|
//throw Oops.Oh("订舱数据已发送成功,不能修改");
|
|
|
|
//预订舱数据已发送成功,不能修改
|
|
|
|
|
|
|
|
throw new Exception(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.SpaceBookingBeSendNotModify)));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1504,7 +1507,7 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
entity.Id = model.id.Value;
|
|
|
|
entity.Id = model.id.Value;
|
|
|
|
entity.UpdateTime = nowDate;
|
|
|
|
entity.UpdateTime = nowDate;
|
|
|
|
entity.UpdateBy = long.Parse(user.UserId);
|
|
|
|
entity.UpdateBy = long.Parse(user.UserId);
|
|
|
|
//entity.UpdatedUserName = UserManager.Name;
|
|
|
|
entity.UpdateUserName = user.UserName;
|
|
|
|
entity.CtnStat = ctnStat;
|
|
|
|
entity.CtnStat = ctnStat;
|
|
|
|
entity.BookingChannelType = "CON_API";
|
|
|
|
entity.BookingChannelType = "CON_API";
|
|
|
|
entity.BookingChannelTypeName = "合约订舱";
|
|
|
|
entity.BookingChannelTypeName = "合约订舱";
|
|
|
@ -1513,7 +1516,7 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
{
|
|
|
|
{
|
|
|
|
x.CreateTime,
|
|
|
|
x.CreateTime,
|
|
|
|
x.CreateBy,
|
|
|
|
x.CreateBy,
|
|
|
|
//x.CreatedUserName,
|
|
|
|
x.CreateUserName,
|
|
|
|
x.BookingReference,
|
|
|
|
x.BookingReference,
|
|
|
|
x.BookingId,
|
|
|
|
x.BookingId,
|
|
|
|
x.RequestAcknowledgementId,
|
|
|
|
x.RequestAcknowledgementId,
|
|
|
@ -1546,12 +1549,12 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
ctnEntity.RecordId = entity.Id;
|
|
|
|
ctnEntity.RecordId = entity.Id;
|
|
|
|
ctnEntity.UpdateTime = nowDate;
|
|
|
|
ctnEntity.UpdateTime = nowDate;
|
|
|
|
ctnEntity.UpdateBy = long.Parse(user.UserId);
|
|
|
|
ctnEntity.UpdateBy = long.Parse(user.UserId);
|
|
|
|
//ctnEntity.UpdatedUserName = UserManager.Name;
|
|
|
|
ctnEntity.UpdateUserName = user.UserName;
|
|
|
|
|
|
|
|
|
|
|
|
tenantDb.Updateable<SpaceBookingOrderCtn>(ctnEntity).IgnoreColumns(x => new
|
|
|
|
tenantDb.Updateable<SpaceBookingOrderCtn>(ctnEntity).IgnoreColumns(x => new
|
|
|
|
{
|
|
|
|
{
|
|
|
|
x.CreateBy,
|
|
|
|
x.CreateBy,
|
|
|
|
//x.CreatedUserName,
|
|
|
|
x.CreateUserName,
|
|
|
|
x.CreateTime,
|
|
|
|
x.CreateTime,
|
|
|
|
//x.TenantId,
|
|
|
|
//x.TenantId,
|
|
|
|
x.StuffingMeasurementType,
|
|
|
|
x.StuffingMeasurementType,
|
|
|
@ -1573,7 +1576,7 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
ctnEntity.CreateTime = nowDate;
|
|
|
|
ctnEntity.CreateTime = nowDate;
|
|
|
|
ctnEntity.UpdateTime = nowDate;
|
|
|
|
ctnEntity.UpdateTime = nowDate;
|
|
|
|
ctnEntity.CreateBy = long.Parse(user.UserId);
|
|
|
|
ctnEntity.CreateBy = long.Parse(user.UserId);
|
|
|
|
//ctnEntity.CreatedUserName = UserManager.Name;
|
|
|
|
ctnEntity.CreateUserName = user.UserName;
|
|
|
|
ctnEntity.StuffingMeasurementType = "WEIGHT";
|
|
|
|
ctnEntity.StuffingMeasurementType = "WEIGHT";
|
|
|
|
ctnEntity.StuffingMeasurementUnit = "KGS";
|
|
|
|
ctnEntity.StuffingMeasurementUnit = "KGS";
|
|
|
|
|
|
|
|
|
|
|
@ -1589,14 +1592,14 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
ctn.Deleted = true;
|
|
|
|
ctn.Deleted = true;
|
|
|
|
ctn.DeleteTime = nowDate;
|
|
|
|
ctn.DeleteTime = nowDate;
|
|
|
|
ctn.DeleteBy = long.Parse(user.UserId);
|
|
|
|
ctn.DeleteBy = long.Parse(user.UserId);
|
|
|
|
//ctn.UpdatedUserName = UserManager.Name;
|
|
|
|
ctn.UpdateUserName = user.UserName;
|
|
|
|
|
|
|
|
|
|
|
|
await tenantDb.Updateable<SpaceBookingOrderCtn>(ctn).UpdateColumns(x => new
|
|
|
|
await tenantDb.Updateable<SpaceBookingOrderCtn>(ctn).UpdateColumns(x => new
|
|
|
|
{
|
|
|
|
{
|
|
|
|
x.Deleted,
|
|
|
|
x.Deleted,
|
|
|
|
x.DeleteTime,
|
|
|
|
x.DeleteTime,
|
|
|
|
x.DeleteBy,
|
|
|
|
x.DeleteBy,
|
|
|
|
//x.UpdatedUserName
|
|
|
|
x.UpdateUserName
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1616,7 +1619,7 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
CreateTime = nowDate,
|
|
|
|
CreateTime = nowDate,
|
|
|
|
UpdateTime = nowDate,
|
|
|
|
UpdateTime = nowDate,
|
|
|
|
CreateBy = long.Parse(user.UserId),
|
|
|
|
CreateBy = long.Parse(user.UserId),
|
|
|
|
//CreatedUserName = UserManager.Name
|
|
|
|
UpdateUserName = user.UserName
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
await tenantDb.Insertable<SpaceBookingOrderShipSchedule>(shipScheduleRecord).ExecuteCommandAsync();
|
|
|
|
await tenantDb.Insertable<SpaceBookingOrderShipSchedule>(shipScheduleRecord).ExecuteCommandAsync();
|
|
|
@ -1632,7 +1635,7 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
entity.CreateTime = nowDate;
|
|
|
|
entity.CreateTime = nowDate;
|
|
|
|
entity.UpdateTime = nowDate;
|
|
|
|
entity.UpdateTime = nowDate;
|
|
|
|
entity.CreateBy = long.Parse(user.UserId);
|
|
|
|
entity.CreateBy = long.Parse(user.UserId);
|
|
|
|
//entity.CreatedUserName = UserManager.Name;
|
|
|
|
entity.CreateUserName = user.UserName;
|
|
|
|
entity.Status = "TEMP";
|
|
|
|
entity.Status = "TEMP";
|
|
|
|
entity.StatusName = "暂存";
|
|
|
|
entity.StatusName = "暂存";
|
|
|
|
entity.CtnStat = ctnStat;
|
|
|
|
entity.CtnStat = ctnStat;
|
|
|
@ -1657,7 +1660,7 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
ctnEntity.CreateTime = nowDate;
|
|
|
|
ctnEntity.CreateTime = nowDate;
|
|
|
|
ctnEntity.UpdateTime = nowDate;
|
|
|
|
ctnEntity.UpdateTime = nowDate;
|
|
|
|
ctnEntity.CreateBy = long.Parse(user.UserId);
|
|
|
|
ctnEntity.CreateBy = long.Parse(user.UserId);
|
|
|
|
//ctnEntity.CreatedUserName = UserManager.Name;
|
|
|
|
ctnEntity.CreateUserName = user.UserName;
|
|
|
|
ctnEntity.StuffingMeasurementType = "WEIGHT";
|
|
|
|
ctnEntity.StuffingMeasurementType = "WEIGHT";
|
|
|
|
ctnEntity.StuffingMeasurementUnit = "KGS";
|
|
|
|
ctnEntity.StuffingMeasurementUnit = "KGS";
|
|
|
|
|
|
|
|
|
|
|
@ -1679,7 +1682,7 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
CreateTime = nowDate,
|
|
|
|
CreateTime = nowDate,
|
|
|
|
UpdateTime = nowDate,
|
|
|
|
UpdateTime = nowDate,
|
|
|
|
CreateBy = long.Parse(user.UserId),
|
|
|
|
CreateBy = long.Parse(user.UserId),
|
|
|
|
//CreatedUserName = UserManager.Name
|
|
|
|
CreateUserName = user.UserName
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
await tenantDb.Insertable<SpaceBookingOrderShipSchedule>(shipScheduleRecord).ExecuteCommandAsync();
|
|
|
|
await tenantDb.Insertable<SpaceBookingOrderShipSchedule>(shipScheduleRecord).ExecuteCommandAsync();
|
|
|
@ -1690,19 +1693,19 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
//只有船期发生变化时才重新写入新的船期记录
|
|
|
|
//只有船期发生变化时才重新写入新的船期记录
|
|
|
|
if (model.PId != shipScheduleRecord.ShipRatePid.Value)
|
|
|
|
if (model.PId != shipScheduleRecord.ShipRatePid.Value)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//_logger.LogInformation($"MSK CON id={model.id} 换了船期 原记录:{selectedShipSchedule.PId} 新记录:{model.PId} 作废原船期,插入新船期");
|
|
|
|
Logger.Log(NLog.LogLevel.Info, $"MSK CON id={model.id} 换了船期 原记录:{selectedShipSchedule.PId} 新记录:{model.PId} 作废原船期,插入新船期");
|
|
|
|
|
|
|
|
|
|
|
|
shipScheduleRecord.Deleted = true;
|
|
|
|
shipScheduleRecord.Deleted = true;
|
|
|
|
shipScheduleRecord.DeleteTime = nowDate;
|
|
|
|
shipScheduleRecord.DeleteTime = nowDate;
|
|
|
|
shipScheduleRecord.DeleteBy = long.Parse(user.UserId);
|
|
|
|
shipScheduleRecord.DeleteBy = long.Parse(user.UserId);
|
|
|
|
//shipScheduleRecord.UpdatedUserName = UserManager.Name;
|
|
|
|
shipScheduleRecord.UpdateUserName = user.UserName;
|
|
|
|
|
|
|
|
|
|
|
|
await tenantDb.Updateable<SpaceBookingOrderShipSchedule>(shipScheduleRecord).UpdateColumns(x => new
|
|
|
|
await tenantDb.Updateable<SpaceBookingOrderShipSchedule>(shipScheduleRecord).UpdateColumns(x => new
|
|
|
|
{
|
|
|
|
{
|
|
|
|
x.Deleted,
|
|
|
|
x.Deleted,
|
|
|
|
x.DeleteTime,
|
|
|
|
x.DeleteTime,
|
|
|
|
x.DeleteBy,
|
|
|
|
x.DeleteBy,
|
|
|
|
//x.UpdatedTime
|
|
|
|
x.UpdateTime
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
}).ExecuteCommandAsync();
|
|
|
|
|
|
|
|
|
|
|
|
shipScheduleRecord = new SpaceBookingOrderShipSchedule
|
|
|
|
shipScheduleRecord = new SpaceBookingOrderShipSchedule
|
|
|
@ -1715,14 +1718,14 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
CreateTime = nowDate,
|
|
|
|
CreateTime = nowDate,
|
|
|
|
UpdateTime = nowDate,
|
|
|
|
UpdateTime = nowDate,
|
|
|
|
CreateBy = long.Parse(user.UserId),
|
|
|
|
CreateBy = long.Parse(user.UserId),
|
|
|
|
//CreatedUserName = UserManager.Name
|
|
|
|
CreateUserName = user.UserName
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
await tenantDb.Insertable<SpaceBookingOrderShipSchedule>(shipScheduleRecord).ExecuteCommandAsync();
|
|
|
|
await tenantDb.Insertable<SpaceBookingOrderShipSchedule>(shipScheduleRecord).ExecuteCommandAsync();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//_logger.LogInformation($"MSK CON id={model.id} 船期没变化 model.PId={model.PId} shipScheduleRecord.SHIP_RATE_PID={shipScheduleRecord.SHIP_RATE_PID.Value}");
|
|
|
|
Logger.Log(NLog.LogLevel.Info, $"MSK CON id={model.id} 船期没变化 model.PId={model.PId} shipScheduleRecord.SHIP_RATE_PID={shipScheduleRecord.ShipRatePid.Value}");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -1749,7 +1752,7 @@ namespace DS.WMS.Core.Op.Method
|
|
|
|
info.Deleted = true;
|
|
|
|
info.Deleted = true;
|
|
|
|
info.DeleteTime = DateTime.Now;
|
|
|
|
info.DeleteTime = DateTime.Now;
|
|
|
|
info.DeleteBy = long.Parse(user.UserId);
|
|
|
|
info.DeleteBy = long.Parse(user.UserId);
|
|
|
|
//info.UpdatedUserName = UserManager.Name;
|
|
|
|
info.DeleteUserName = user.UserName;
|
|
|
|
|
|
|
|
|
|
|
|
await tenantDb.Updateable<SpaceBookingOrder>(info).UpdateColumns(x => new
|
|
|
|
await tenantDb.Updateable<SpaceBookingOrder>(info).UpdateColumns(x => new
|
|
|
|
{
|
|
|
|
{
|
|
|
|