cjy 4 months ago
commit 13df02a721

@ -1293,6 +1293,22 @@ public static class MultiLanguageConst
[Description("清除缓存成功")]
public const string RemoveCacheSucc = "RemoveCache_Succ";
/// <summary>
/// 预订舱数据不存在或已作废
/// </summary>
[Description("预订舱数据不存在或已作废")]
public const string SpaceBookingRecordDeletedOrNoExists = "SpaceBooking_Record_DeletedOrNoExists";
/// <summary>
/// 预订舱数据已发送成功,不能重复发送
/// </summary>
[Description("预订舱数据已发送成功,不能重复发送")]
public const string SpaceBookingBeSendNotRepeat = "SpaceBooking_BeSend_NotRepeat";
/// <summary>
/// 预订舱数据已发送成功,不能修改
/// </summary>
[Description("预订舱数据已发送成功,不能修改")]
public const string SpaceBookingBeSendNotModify = "SpaceBooking_BeSend_NotModify";
#endregion
}

@ -1464,7 +1464,7 @@ namespace DS.WMS.Core.Op.Method
selectedShipSchedule = JsonConvert.DeserializeObject<MSKAPISearchTransportSchedules>(shipScheduleRecord.ShipJson);
}
//if (selectedShipSchedule == null)
if (selectedShipSchedule == null)
//throw Oops.Oh("船期数据校验失败,请重新查询船期信息");
model.placeOfReceiptCountryName = selectedShipSchedule.originCountryName;
@ -1487,15 +1487,18 @@ namespace DS.WMS.Core.Op.Method
var oldInfo = tenantDb.Queryable<SpaceBookingOrder>()
.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 (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.UpdateTime = nowDate;
entity.UpdateBy = long.Parse(user.UserId);
//entity.UpdatedUserName = UserManager.Name;
entity.UpdateUserName = user.UserName;
entity.CtnStat = ctnStat;
entity.BookingChannelType = "CON_API";
entity.BookingChannelTypeName = "合约订舱";
@ -1513,7 +1516,7 @@ namespace DS.WMS.Core.Op.Method
{
x.CreateTime,
x.CreateBy,
//x.CreatedUserName,
x.CreateUserName,
x.BookingReference,
x.BookingId,
x.RequestAcknowledgementId,
@ -1546,12 +1549,12 @@ namespace DS.WMS.Core.Op.Method
ctnEntity.RecordId = entity.Id;
ctnEntity.UpdateTime = nowDate;
ctnEntity.UpdateBy = long.Parse(user.UserId);
//ctnEntity.UpdatedUserName = UserManager.Name;
ctnEntity.UpdateUserName = user.UserName;
tenantDb.Updateable<SpaceBookingOrderCtn>(ctnEntity).IgnoreColumns(x => new
{
x.CreateBy,
//x.CreatedUserName,
x.CreateUserName,
x.CreateTime,
//x.TenantId,
x.StuffingMeasurementType,
@ -1573,7 +1576,7 @@ namespace DS.WMS.Core.Op.Method
ctnEntity.CreateTime = nowDate;
ctnEntity.UpdateTime = nowDate;
ctnEntity.CreateBy = long.Parse(user.UserId);
//ctnEntity.CreatedUserName = UserManager.Name;
ctnEntity.CreateUserName = user.UserName;
ctnEntity.StuffingMeasurementType = "WEIGHT";
ctnEntity.StuffingMeasurementUnit = "KGS";
@ -1589,14 +1592,14 @@ namespace DS.WMS.Core.Op.Method
ctn.Deleted = true;
ctn.DeleteTime = nowDate;
ctn.DeleteBy = long.Parse(user.UserId);
//ctn.UpdatedUserName = UserManager.Name;
ctn.UpdateUserName = user.UserName;
await tenantDb.Updateable<SpaceBookingOrderCtn>(ctn).UpdateColumns(x => new
{
x.Deleted,
x.DeleteTime,
x.DeleteBy,
//x.UpdatedUserName
x.UpdateUserName
}).ExecuteCommandAsync();
});
}
@ -1616,7 +1619,7 @@ namespace DS.WMS.Core.Op.Method
CreateTime = nowDate,
UpdateTime = nowDate,
CreateBy = long.Parse(user.UserId),
//CreatedUserName = UserManager.Name
UpdateUserName = user.UserName
};
await tenantDb.Insertable<SpaceBookingOrderShipSchedule>(shipScheduleRecord).ExecuteCommandAsync();
@ -1632,7 +1635,7 @@ namespace DS.WMS.Core.Op.Method
entity.CreateTime = nowDate;
entity.UpdateTime = nowDate;
entity.CreateBy = long.Parse(user.UserId);
//entity.CreatedUserName = UserManager.Name;
entity.CreateUserName = user.UserName;
entity.Status = "TEMP";
entity.StatusName = "暂存";
entity.CtnStat = ctnStat;
@ -1657,7 +1660,7 @@ namespace DS.WMS.Core.Op.Method
ctnEntity.CreateTime = nowDate;
ctnEntity.UpdateTime = nowDate;
ctnEntity.CreateBy = long.Parse(user.UserId);
//ctnEntity.CreatedUserName = UserManager.Name;
ctnEntity.CreateUserName = user.UserName;
ctnEntity.StuffingMeasurementType = "WEIGHT";
ctnEntity.StuffingMeasurementUnit = "KGS";
@ -1679,7 +1682,7 @@ namespace DS.WMS.Core.Op.Method
CreateTime = nowDate,
UpdateTime = nowDate,
CreateBy = long.Parse(user.UserId),
//CreatedUserName = UserManager.Name
CreateUserName = user.UserName
};
await tenantDb.Insertable<SpaceBookingOrderShipSchedule>(shipScheduleRecord).ExecuteCommandAsync();
@ -1690,19 +1693,19 @@ namespace DS.WMS.Core.Op.Method
//只有船期发生变化时才重新写入新的船期记录
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.DeleteTime = nowDate;
shipScheduleRecord.DeleteBy = long.Parse(user.UserId);
//shipScheduleRecord.UpdatedUserName = UserManager.Name;
shipScheduleRecord.UpdateUserName = user.UserName;
await tenantDb.Updateable<SpaceBookingOrderShipSchedule>(shipScheduleRecord).UpdateColumns(x => new
{
x.Deleted,
x.DeleteTime,
x.DeleteBy,
//x.UpdatedTime
x.UpdateTime
}).ExecuteCommandAsync();
shipScheduleRecord = new SpaceBookingOrderShipSchedule
@ -1715,14 +1718,14 @@ namespace DS.WMS.Core.Op.Method
CreateTime = nowDate,
UpdateTime = nowDate,
CreateBy = long.Parse(user.UserId),
//CreatedUserName = UserManager.Name
CreateUserName = user.UserName
};
await tenantDb.Insertable<SpaceBookingOrderShipSchedule>(shipScheduleRecord).ExecuteCommandAsync();
}
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.DeleteTime = DateTime.Now;
info.DeleteBy = long.Parse(user.UserId);
//info.UpdatedUserName = UserManager.Name;
info.DeleteUserName = user.UserName;
await tenantDb.Updateable<SpaceBookingOrder>(info).UpdateColumns(x => new
{

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<NameOfLastUsedPublishProfile>D:\Code\DS\ds8-solution-pro\ds-wms-service\DS.WMS.OpApi\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
<NameOfLastUsedPublishProfile>E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
<Controller_SelectedScaffolderID>MvcControllerEmptyScaffolder</Controller_SelectedScaffolderID>
<Controller_SelectedScaffolderCategoryPath>root/Common/MVC/Controller</Controller_SelectedScaffolderCategoryPath>
</PropertyGroup>

@ -6,7 +6,7 @@
<Project>
<PropertyGroup>
<_PublishTargetUrl>D:\Code\PublishCopy\ds8-opapi</_PublishTargetUrl>
<History>True|2024-07-19T07:33:45.3242155Z||;False|2024-07-19T15:32:41.9604526+08:00||;True|2024-07-19T13:48:27.9722093+08:00||;False|2024-07-19T13:47:56.7900396+08:00||;True|2024-07-19T11:41:15.4223247+08:00||;True|2024-07-19T08:46:28.8014836+08:00||;True|2024-07-18T19:24:50.4184188+08:00||;True|2024-07-18T19:19:14.7056635+08:00||;True|2024-07-18T19:04:43.5615501+08:00||;True|2024-07-18T18:38:39.1976753+08:00||;True|2024-07-18T18:25:15.6833492+08:00||;True|2024-07-18T18:08:46.3114951+08:00||;True|2024-07-18T17:59:12.5292256+08:00||;True|2024-07-18T16:18:45.8049777+08:00||;True|2024-07-18T16:12:42.9723969+08:00||;True|2024-07-18T16:07:14.1432207+08:00||;True|2024-07-17T17:44:18.4741963+08:00||;True|2024-07-17T17:42:47.2735071+08:00||;True|2024-07-17T16:13:32.9037697+08:00||;True|2024-07-17T15:40:21.2550083+08:00||;True|2024-07-17T14:03:08.1814323+08:00||;True|2024-07-15T13:43:42.6073130+08:00||;True|2024-07-15T11:53:40.6498579+08:00||;True|2024-07-15T11:53:03.1652559+08:00||;True|2024-07-15T11:42:33.0154478+08:00||;True|2024-07-15T10:20:03.3925876+08:00||;True|2024-07-15T10:13:28.1415352+08:00||;True|2024-07-08T14:33:12.6884426+08:00||;True|2024-07-08T09:56:58.4995696+08:00||;</History>
<History>True|2024-07-19T07:45:49.1068004Z||;True|2024-07-19T15:33:45.3242155+08:00||;False|2024-07-19T15:32:41.9604526+08:00||;True|2024-07-19T13:48:27.9722093+08:00||;False|2024-07-19T13:47:56.7900396+08:00||;True|2024-07-19T11:41:15.4223247+08:00||;True|2024-07-19T08:46:28.8014836+08:00||;True|2024-07-18T19:24:50.4184188+08:00||;True|2024-07-18T19:19:14.7056635+08:00||;True|2024-07-18T19:04:43.5615501+08:00||;True|2024-07-18T18:38:39.1976753+08:00||;True|2024-07-18T18:25:15.6833492+08:00||;True|2024-07-18T18:08:46.3114951+08:00||;True|2024-07-18T17:59:12.5292256+08:00||;True|2024-07-18T16:18:45.8049777+08:00||;True|2024-07-18T16:12:42.9723969+08:00||;True|2024-07-18T16:07:14.1432207+08:00||;True|2024-07-17T17:44:18.4741963+08:00||;True|2024-07-17T17:42:47.2735071+08:00||;True|2024-07-17T16:13:32.9037697+08:00||;True|2024-07-17T15:40:21.2550083+08:00||;True|2024-07-17T14:03:08.1814323+08:00||;True|2024-07-15T13:43:42.6073130+08:00||;True|2024-07-15T11:53:40.6498579+08:00||;True|2024-07-15T11:53:03.1652559+08:00||;True|2024-07-15T11:42:33.0154478+08:00||;True|2024-07-15T10:20:03.3925876+08:00||;True|2024-07-15T10:13:28.1415352+08:00||;True|2024-07-08T14:33:12.6884426+08:00||;True|2024-07-08T09:56:58.4995696+08:00||;</History>
<LastFailureDetails />
</PropertyGroup>
</Project>
Loading…
Cancel
Save