修改舱位标签

usertest
jianghaiqing 4 months ago
parent 4193489bc3
commit 63709fd321

@ -1392,5 +1392,12 @@ public static class MultiLanguageConst
[Description("导入失败")]
public const string BookingSlotImportFail = "BookingSlot_Import_Fail";
/// <summary>
/// 作废成功
/// </summary>
[Description("作废成功")]
public const string BookingSlotDeleteSucc = "BookingSlot_DeleteSucc";
#endregion
}

@ -172,7 +172,7 @@ namespace DS.WMS.Core.Op.Interface
/// <param name="bcTargetDto">新舱位详情</param>
/// <param name="slotId">舱位ID</param>
/// <returns></returns>
Task<DataResult<string>> MeasureDiffCautionTask(ParserBCInfoDto bcSrcDto, ParserBCInfoDto bcTargetDto, long slotId);
Task<DataResult> MeasureDiffCautionTask(ParserBCInfoDto bcSrcDto, ParserBCInfoDto bcTargetDto, long slotId);
/// <summary>
/// 订舱编号检索舱位信息
@ -180,7 +180,7 @@ namespace DS.WMS.Core.Op.Interface
/// <param name="slotBookingNo">订舱编号</param>
/// <param name="CarrierId">船公司ID</param>
/// <returns></returns>
Task<long> QueryBookingSlot(string slotBookingNo, string CarrierId);
Task<DataResult<long>> QueryBookingSlot(string slotBookingNo, string CarrierId);
/// <summary>
/// 获取舱位详情列表
@ -194,14 +194,14 @@ namespace DS.WMS.Core.Op.Interface
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
Task<BookingSlotMergeResultDto> GetMergeList(QueryMergeSlotDto model);
Task<DataResult<BookingSlotMergeResultDto>> GetMergeList(QueryMergeSlotDto model);
/// <summary>
/// 生成合票订舱订单
/// </summary>
/// <param name="model">生成订舱订单请求</param>
/// <returns>返回回执</returns>
Task<TaskManageOrderResultDto> MergeCreateBookingOrder(BookingGenerateDto model);
Task<DataResult<TaskManageOrderResultDto>> MergeCreateBookingOrder(BookingGenerateDto model);
/// <summary>
/// 导出舱位为Excel
@ -209,5 +209,12 @@ namespace DS.WMS.Core.Op.Interface
/// <param name="input">请求参数</param>
/// <returns></returns>
Task<DataResult<string>> ExportOrder(BookingSlotBasePageInput input);
/// <summary>
/// 作废舱位(可以批量)
/// </summary>
/// <param name="ids">舱位主键数组</param>
/// <returns>返回回执</returns>
Task<DataResult> Delete(long[] ids);
}
}

@ -71,7 +71,7 @@ namespace DS.WMS.Core.Op.Method
recordList.ForEach(async p =>
{
await tenantDb.Deleteable<BookingLabelAllocation>().ExecuteCommandAsync();
await tenantDb.Deleteable<BookingLabelAllocation>(p).ExecuteCommandAsync();
});
if (input.LabelIdArray != null && input.LabelIdArray.Length > 0)

@ -1742,7 +1742,7 @@ namespace DS.WMS.Core.Op.Method
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public async Task<BookingSlotMergeResultDto> GetMergeList(QueryMergeSlotDto model)
public async Task<DataResult<BookingSlotMergeResultDto>> GetMergeList(QueryMergeSlotDto model)
{
BookingSlotMergeResultDto rlt = new BookingSlotMergeResultDto();
@ -1839,7 +1839,7 @@ namespace DS.WMS.Core.Op.Method
// 查询可用舱位及箱子列表
return rlt;
return DataResult<BookingSlotMergeResultDto>.Success(rlt);
}
#endregion
@ -2723,7 +2723,7 @@ namespace DS.WMS.Core.Op.Method
/// <param name="slotBookingNo">订舱编号</param>
/// <param name="CarrierId">船公司ID</param>
/// <returns></returns>
public async Task<long> QueryBookingSlot(string slotBookingNo, string CarrierId)
public async Task<DataResult<long>> QueryBookingSlot(string slotBookingNo, string CarrierId)
{
long id = 0;
@ -2743,7 +2743,7 @@ namespace DS.WMS.Core.Op.Method
//_logger.LogInformation($"订舱编号检索舱位信息失败,原因:{ex.Message}");
}
return id;
return DataResult<long>.Success(id);
}
#endregion
@ -2774,7 +2774,7 @@ namespace DS.WMS.Core.Op.Method
/// </summary>
/// <param name="model">生成订舱订单请求</param>
/// <returns>返回回执</returns>
public async Task<TaskManageOrderResultDto> MergeCreateBookingOrder(BookingGenerateDto model)
public async Task<DataResult<TaskManageOrderResultDto>> MergeCreateBookingOrder(BookingGenerateDto model)
{
return null;
}
@ -2786,9 +2786,9 @@ namespace DS.WMS.Core.Op.Method
/// <param name="bcTargetDto">新舱位详情</param>
/// <param name="slotId">舱位ID</param>
/// <returns></returns>
public async Task<DataResult<string>> MeasureDiffCautionTask(ParserBCInfoDto bcSrcDto, ParserBCInfoDto bcTargetDto, long slotId)
public async Task<DataResult> MeasureDiffCautionTask(ParserBCInfoDto bcSrcDto, ParserBCInfoDto bcTargetDto, long slotId)
{
return DataResult<string>.Success(string.Empty);
return DataResult.Successed(string.Empty);
}
/// <summary>
@ -3692,6 +3692,76 @@ namespace DS.WMS.Core.Op.Method
return DataResult<List<BookingSlotBaseSaveOutput>>.FailedData(data);
}
#endregion
#region 作废舱位(可以批量)
/// <summary>
/// 作废舱位(可以批量)
/// </summary>
/// <param name="ids">舱位主键数组</param>
/// <returns>返回回执</returns>
public async Task<DataResult> Delete(long[] ids)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
foreach (long id in ids)
{
var slot = await tenantDb.Queryable<BookingSlotBase>().FirstAsync(x => x.Id == id);
if (slot == null)
{
throw new Exception(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.BookingSlotBaseInfoNull)));
}
slot.Deleted = true;
slot.DeleteBy = long.Parse(user.UserId);
slot.DeleteUserName = user.UserName;
slot.DeleteTime = DateTime.Now;
await tenantDb.Updateable<BookingSlotBase>(slot).ExecuteCommandAsync();
var ctnList = tenantDb.Queryable<BookingSlotCtn>().Where(x=>x.SlotId == id).ToList();
ctnList.ForEach(async t =>
{
t.Deleted = true;
t.DeleteTime = DateTime.Now;
t.DeleteBy = long.Parse(user.UserId);
t.DeleteUserName = user.UserName;
await tenantDb.Updateable<BookingSlotCtn>(t).ExecuteCommandAsync();
});
var alloc = tenantDb.Queryable<BookingSlotAllocation>().Where(a => a.BookingSlotId == id && a.Deleted == false).ToList();
if (alloc.Count > 0)
{
alloc.ForEach(async t =>
{
t.Deleted = true;
t.DeleteTime = DateTime.Now;
t.DeleteBy = long.Parse(user.UserId);
t.DeleteUserName = user.UserName;
await tenantDb.Updateable<BookingSlotAllocation>(t).ExecuteCommandAsync();
});
}
//更新库存
await _bookingSlotStockService.BookingSlotStock(new BookingSlotStockUpdateModel
{
BookingSlotType = slot.BookingSlotType,
CarrierCode = slot.CarrierCode,
ContractNo = slot.ContractNo,
Vessel = slot.Vessel,
Voyno = slot.Voyno,
PortLoadId = slot.PortLoadCode,
PortDischargeId = slot.PortDischargeCode,
TenantId = long.Parse(user.TenantId)
});
}
return DataResult.Successed(MultiLanguageConst.GetDescription(nameof(MultiLanguageConst.BookingSlotDeleteSucc)));
}
#endregion
}
public static class LetterIndexUtil

@ -283,7 +283,7 @@ namespace DS.WMS.OpApi.Controllers
[Route("MeasureDiffCautionTask")]
public async Task<DataResult> MeasureDiffCautionTask([FromBody] ParserBCInfoDto bcSrcDto)
{
return null;// await _bookingSlotService.MeasureDiffCautionTask(bcSrcDto, null, 0);
return await _bookingSlotService.MeasureDiffCautionTask(bcSrcDto, null, 0);
}
#endregion
@ -298,7 +298,7 @@ namespace DS.WMS.OpApi.Controllers
[Route("QueryBookingSlot")]
public async Task<DataResult<long>> QueryBookingSlot([FromQuery] string slotBookingNo, [FromQuery] string CarrierId)
{
return null;// await _bookingSlotService.QueryBookingSlot(slotBookingNo, CarrierId);
return await _bookingSlotService.QueryBookingSlot(slotBookingNo, CarrierId);
}
#endregion
@ -312,7 +312,7 @@ namespace DS.WMS.OpApi.Controllers
[Route("GetSlotList")]
public async Task<DataResult<List<BookingSlotBaseSaveOutput>>> GetSlotList([FromBody] long[] ids)
{
return null;// await _bookingSlotService.GetSlotList(ids);
return await _bookingSlotService.GetSlotList(ids);
}
#endregion
@ -326,7 +326,7 @@ namespace DS.WMS.OpApi.Controllers
[Route("GetMergeList")]
public async Task<DataResult<BookingSlotMergeResultDto>> GetMergeList([FromBody] QueryMergeSlotDto model)
{
return null;// await _bookingSlotService.GetMergeList(model);
return await _bookingSlotService.GetMergeList(model);
}
#endregion
@ -340,7 +340,21 @@ namespace DS.WMS.OpApi.Controllers
[Route("MergeCreateBookingOrder")]
public async Task<DataResult<TaskManageOrderResultDto>> MergeCreateBookingOrder([FromBody] BookingGenerateDto model)
{
return null;// await _bookingSlotService.MergeCreateBookingOrder(model);
return await _bookingSlotService.MergeCreateBookingOrder(model);
}
#endregion
#region 作废舱位(可以批量)
/// <summary>
/// 作废舱位(可以批量)
/// </summary>
/// <param name="ids">舱位主键数组</param>
/// <returns>返回回执</returns>
[HttpPost]
[Route("Delete")]
public async Task<DataResult> Delete([FromBody] long[] ids)
{
return await _bookingSlotService.Delete(ids);
}
#endregion
}

@ -6,7 +6,7 @@
<Project>
<PropertyGroup>
<_PublishTargetUrl>D:\Code\PublishCopy\ds8-opapi</_PublishTargetUrl>
<History>True|2024-07-24T04:56:48.1663545Z||;True|2024-07-24T08:47:26.1616069+08:00||;True|2024-07-24T08:42:02.7606608+08:00||;True|2024-07-24T08:41:18.4678459+08:00||;False|2024-07-24T08:40:29.5381703+08:00||;False|2024-07-24T08:39:20.2230656+08:00||;True|2024-07-23T15:56:16.8305907+08:00||;True|2024-07-22T16:42:12.1933090+08:00||;True|2024-07-19T18:28:29.1420269+08:00||;True|2024-07-19T15:45:49.1068004+08:00||;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>
<History>True|2024-07-24T07:38:29.2442086Z||;True|2024-07-24T14:48:12.2303919+08:00||;True|2024-07-24T14:18:05.5309704+08:00||;True|2024-07-24T12:56:48.1663545+08:00||;True|2024-07-24T08:47:26.1616069+08:00||;True|2024-07-24T08:42:02.7606608+08:00||;True|2024-07-24T08:41:18.4678459+08:00||;False|2024-07-24T08:40:29.5381703+08:00||;False|2024-07-24T08:39:20.2230656+08:00||;True|2024-07-23T15:56:16.8305907+08:00||;True|2024-07-22T16:42:12.1933090+08:00||;True|2024-07-19T18:28:29.1420269+08:00||;True|2024-07-19T15:45:49.1068004+08:00||;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