|
|
|
@ -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
|
|
|
|
|