diff --git a/ds-wms-service/DS.Module.Core/Condition/ConditionHelper.cs b/ds-wms-service/DS.Module.Core/Condition/ConditionHelper.cs index f44a6f2a..7e51376f 100644 --- a/ds-wms-service/DS.Module.Core/Condition/ConditionHelper.cs +++ b/ds-wms-service/DS.Module.Core/Condition/ConditionHelper.cs @@ -34,7 +34,10 @@ namespace DS.Module.Core.Condition else if (dataContext.ContainsKey(item.Field)) { var obj = dataContext.Get(item.Field)!; - valStr = obj.ToString(); + if (obj != null) + { + valStr = obj.ToString(); + } } else if (item.Field!.Contains('.')) { diff --git a/ds-wms-service/DS.Module.Core/Constants/MultiLanguageConst.cs b/ds-wms-service/DS.Module.Core/Constants/MultiLanguageConst.cs index 2234530f..994666ad 100644 --- a/ds-wms-service/DS.Module.Core/Constants/MultiLanguageConst.cs +++ b/ds-wms-service/DS.Module.Core/Constants/MultiLanguageConst.cs @@ -1502,6 +1502,8 @@ public static class MultiLanguageConst public const string TaskAuditStatusError = "Task_Audit_Status_Error"; [Description("无法从配置中获取任务接收人,请检查是否设置了订单的操作/客服/单证等人员,或联系管理员检查配置")] public const string TaskReceiverNotFound = "Task_Receiver_Not_Found"; + [Description("未找到此票订单的订舱任务")] + public const string BookingTaskNotFound = "Booking_Task_NotFound"; [Description("任务邮件必须设置收件人")] public const string TaskMailReceiverNotNull = "Task_Mail_Receiver_Not_Null"; diff --git a/ds-wms-service/DS.Module.Core/Enums/ContainerManagementEnum.cs b/ds-wms-service/DS.Module.Core/Enums/ContainerManagementEnum.cs index 558bd100..da9efc4b 100644 --- a/ds-wms-service/DS.Module.Core/Enums/ContainerManagementEnum.cs +++ b/ds-wms-service/DS.Module.Core/Enums/ContainerManagementEnum.cs @@ -102,6 +102,11 @@ namespace DS.Module.Core.Enums /// [Description("报废")] 报废 = 7, + /// + /// 单程业务 + /// + [Description("单程业务还箱")] + 单程业务还箱 = 8, } diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentOneWay_DetailReq.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentOneWay_DetailReq.cs index b99af008..480d53c3 100644 --- a/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentOneWay_DetailReq.cs +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentOneWay_DetailReq.cs @@ -9,183 +9,7 @@ namespace DS.WMS.ContainerManagement.Info.Dtos; /// /// 箱管_租箱租出 请求实体 /// -public class CM_RentOneWay_DetailReq +public class CM_RentOneWay_DetailReq: CM_Rent_DetailBase { - /// - /// 主键Id - /// - public long Id { get; set; } - /// - /// 租箱业务id - /// - public long Pid { get; set; } - - /// - /// Desc:租箱业务号 - /// - public string Billno { get; set; } - - /// - /// Desc:箱号 - /// - public string Cntrno { get; set; } - /// - /// 箱型代码 - /// - public string CtnCode { get; set; } - /// - /// Desc:箱型 - /// - public string Ctnall { get; set; } - - - /// - /// Desc:原箱主Id - /// - public long OldContainerOwnerId { get; set; } - /// - /// Desc:原箱主 - /// - public string OldContainerOwner { get; set; } - - /// - /// Desc:租箱客户Id - /// - public long RentCustomerId { get; set; } - /// - /// Desc:租箱客户 - /// - public string RentCustomerName { get; set; } - - - - - /// - /// Desc:租箱业务方向Id - /// - public CMRentDirectEnum? RentDirectId { get; set; } - /// - /// Desc:租箱业务方向 - /// - public string? RentDirect => RentDirectId?.EnumDescription(); - - - /// - /// Desc:租箱类型Id 长租1 短租0 单程2 - /// - public CMRentTypeEnum? RentTypeId { get; set; } - /// - /// Desc:租箱业务方向 - /// - public string? RentType => RentTypeId?.EnumDescription(); - - /// - /// Desc:业务状态 - /// - public string BillState { get; set; } - - - /// - /// Desc:关联放箱单号 - /// - public string CtnReleaseNo { get; set; } - - - /// - /// Desc:租入日期 - /// - public DateTime? Bsdate { get; set; } - - /// - /// Desc:开始计费日期 - /// - public string FeeStartDate { get; set; } - - /// - /// Desc:币别 - /// - public string Currency { get; set; } = "USD"; - - - /// - /// Desc:日租金 - /// - public decimal? DailyRate { get; set; } = 0M; - - - /// - /// Desc:提箱费 - /// - public decimal? PickupFee { get; set; } = 0M; - /// - /// Desc:提箱日期 - /// - public DateTime? PickupDate { get; set; } - /// - /// Desc:还箱费 - /// - public decimal? DropoffFee { get; set; } = 0M; - - - /// - /// Desc:还箱日期 - /// - public DateTime? DropoffDate { get; set; } - - /// - /// Desc:起租地点代码 - /// - public string RentalPortid { get; set; } - /// - /// Desc:起租地点五字码 - /// - public string RentalPortCode { get; set; } - /// - /// Desc:起租地点 - /// - - public string RentalPort { get; set; } - - /// - /// Desc:提箱港口代码 - /// - public long? PickupPortid { get; set; } - - /// - /// Desc:提箱港口五字码 - /// - public string PickupPortCode { get; set; } - - /// - /// Desc:提箱港口 - /// - public string PickupPort { get; set; } - - /// - /// Desc:还箱港口代码 - /// - public long? DropoffPortid { get; set; } - /// - /// Desc:还箱港口五字码 - /// - public string DropoffPortCode { get; set; } - /// - /// Desc:还箱港口 - /// - public string DropoffPort { get; set; } - - /// - /// Desc:业务编号/提单号 - /// - public string Mblno { get; set; } - - /// - /// Desc:船名航次 - /// - public string? VesselVoyno { get; set; } - - /// - /// 在 租箱租入_退租 或 租箱租出_退租 中 记录对应的租入或租出业务Id - /// - public long RentDetailId { get; set; } + } diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentOneWay_DetailRes.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentOneWay_DetailRes.cs index 364dff90..6883fb80 100644 --- a/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentOneWay_DetailRes.cs +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_RentOneWay_DetailRes.cs @@ -8,181 +8,7 @@ namespace DS.WMS.ContainerManagement.Info.Dtos; /// /// 箱管_租箱租出 返回实体 /// -public class CM_RentOneWay_DetailRes +public class CM_RentOneWay_DetailRes: CM_Rent_DetailBase { - /// - /// 主键Id - /// - public long Id { get; set; } - /// - /// 租箱业务id - /// - public long Pid { get; set; } - - /// - /// Desc:租箱业务号 - /// - public string Billno { get; set; } - - /// - /// Desc:箱号 - /// - public string Cntrno { get; set; } - /// - /// 箱型代码 - /// - public string CtnCode { get; set; } - /// - /// Desc:箱型 - /// - public string Ctnall { get; set; } - - - /// - /// Desc:原箱主Id - /// - public long OldContainerOwnerId { get; set; } - /// - /// Desc:原箱主 - /// - public string OldContainerOwner { get; set; } - - /// - /// Desc:租箱客户Id - /// - public long RentCustomerId { get; set; } - /// - /// Desc:租箱客户 - /// - public string RentCustomerName { get; set; } - - - - - /// - /// Desc:租箱业务方向Id - /// - public CMRentDirectEnum? RentDirectId { get; set; } - /// - /// Desc:租箱业务方向 - /// - public string? RentDirect => RentDirectId?.EnumDescription(); - - - /// - /// Desc:租箱类型Id 长租1 短租0 单程2 - /// - public CMRentTypeEnum? RentTypeId { get; set; } - /// - /// Desc:租箱业务方向 - /// - public string? RentType => RentTypeId?.EnumDescription(); - - /// - /// Desc:业务状态 - /// - public string BillState { get; set; } - - - /// - /// Desc:关联放箱单号 - /// - public string CtnReleaseNo { get; set; } - - - /// - /// Desc:租入日期 - /// - public DateTime? Bsdate { get; set; } - - /// - /// Desc:开始计费日期 - /// - public string FeeStartDate { get; set; } - - /// - /// Desc:币别 - /// - public string Currency { get; set; } = "USD"; - - - /// - /// Desc:日租金 - /// - public decimal? DailyRate { get; set; } = 0M; - - - /// - /// Desc:提箱费 - /// - public decimal? PickupFee { get; set; } = 0M; - /// - /// Desc:提箱日期 - /// - public DateTime? PickupDate { get; set; } - /// - /// Desc:还箱费 - /// - public decimal? DropoffFee { get; set; } = 0M; - - - /// - /// Desc:还箱日期 - /// - public DateTime? DropoffDate { get; set; } - - /// - /// Desc:起租地点代码 - /// - public string RentalPortid { get; set; } - /// - /// Desc:起租地点五字码 - /// - public string RentalPortCode { get; set; } - /// - /// Desc:起租地点 - /// - - public string RentalPort { get; set; } - - /// - /// Desc:提箱港口代码 - /// - public long? PickupPortid { get; set; } - /// - /// Desc:提箱港口五字码 - /// - public string PickupPortCode { get; set; } - /// - /// Desc:提箱港口 - /// - public string PickupPort { get; set; } - - /// - /// Desc:还箱港口代码 - /// - public string DropoffPortid { get; set; } - /// - /// Desc:还箱港口五字码 - /// - public long? DropoffPortCode { get; set; } - /// - /// Desc:还箱港口 - /// - public string DropoffPort { get; set; } - - /// - /// Desc:业务编号/提单号 - /// - public string Mblno { get; set; } - - /// - /// Desc:船名航次 - /// - public string? VesselVoyno { get; set; } - - /// - /// 在 租箱租入_退租 或 租箱租出_退租 中 记录对应的租入或租出业务Id - /// - public long RentDetailId { get; set; } + } \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/VW_CM_NeedEndLease_Detail.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/VW_CM_NeedEndLease_Detail.cs index 682e9926..839495ec 100644 --- a/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/VW_CM_NeedEndLease_Detail.cs +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/VW_CM_NeedEndLease_Detail.cs @@ -12,9 +12,9 @@ namespace DS.WMS.ContainerManagement.Info.Entity; public class VW_CM_NeedEndLease_Detail : BaseOrgModel { /// - /// 租箱业务id + /// 租箱租出业务明细id /// - [SugarColumn(ColumnDescription = "租箱业务id", IsNullable = false)] + [SugarColumn(ColumnDescription = "租箱租出业务明细id", IsNullable = false)] public long Pid { get; set; } /// @@ -216,5 +216,20 @@ public class VW_CM_NeedEndLease_Detail : BaseOrgModel /// [SugarColumn(ColumnDescription = "箱业务状态Id", IsNullable = true)] public CM_CtnBizStateEnum? CtnBizStateId { get; set; } + + + /// + /// + /// Desc:箱状态Id + /// + [SugarColumn(ColumnDescription = "箱状态Id", IsNullable = true)] + public CMCtnStateEnum? CtnStateId { get; set; } + + /// + /// Desc:箱流转状态Id + /// + [SugarColumn(ColumnDescription = "箱流转状态Id", IsNullable = true)] + public CMCtnFlowStateEnum? CtnFlowStateId { get; set; } + } diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/VW_CM_RentOut_NeedEndLease.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/VW_CM_RentOut_NeedEndLease.cs index e0f422f5..d6e5aa0a 100644 --- a/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/VW_CM_RentOut_NeedEndLease.cs +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/VW_CM_RentOut_NeedEndLease.cs @@ -12,9 +12,9 @@ namespace DS.WMS.ContainerManagement.Info.Entity; public class VW_CM_RentOut_NeedEndLease : BaseOrgModel { /// - /// 租箱业务id + /// 租箱租出业务明细id /// - [SugarColumn(ColumnDescription = "租箱业务id", IsNullable = false)] + [SugarColumn(ColumnDescription = "租箱租出业务明细id", IsNullable = false)] public long Id { get; set; } /// diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Interface/ICM_CurrentStateService.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Interface/ICM_CurrentStateService.cs index 707e014d..4241d8a4 100644 --- a/ds-wms-service/DS.WMS.Core/ContainerManagement/Interface/ICM_CurrentStateService.cs +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Interface/ICM_CurrentStateService.cs @@ -3,6 +3,7 @@ using DS.WMS.ContainerManagement.Info.Dtos; using DS.WMS.Core.Info.Dtos; using DS.WMS.Core.Op.View; using DS.WMS.Core.Sys.Dtos; +using SqlSugar; namespace DS.WMS.ContainerManagement.Info.Interface; @@ -16,6 +17,8 @@ public interface ICM_CurrentStateService //DataResult> GetListByPage(PageRequest request); public Task>> GetListByPage(PageRequest request); + public ISugarQueryable CreateCurrentStateQuery(); + /// /// 编辑 /// diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Interface/ICM_RentOneWayService.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Interface/ICM_RentOneWayService.cs index 9e917842..517ed443 100644 --- a/ds-wms-service/DS.WMS.Core/ContainerManagement/Interface/ICM_RentOneWayService.cs +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Interface/ICM_RentOneWayService.cs @@ -36,4 +36,20 @@ public interface ICM_RentOneWayService /// 单程业务业务ID /// Task DeleteCM_RentOneWayAsync(params long[] ids); + + ///// + ///// 单程_确认 + ///// + ///// + ///// + //Task CM_RentIn_Confirm(string id, params long[] ids); + + //Task CM_RentIn_Confirm(params long[] ids); + ///// + ///// 单程_取消 + ///// + ///// + ///// + //Task CM_RentIn_Cancel(string id, params long[] ids); + //Task CM_RentIn_Cancel(params long[] ids); } \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Method/CM_RentOutService.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Method/CM_RentOutService.cs index 6bf83be9..092ad40b 100644 --- a/ds-wms-service/DS.WMS.Core/ContainerManagement/Method/CM_RentOutService.cs +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Method/CM_RentOutService.cs @@ -39,6 +39,7 @@ public class CM_RentOutService : CMServiceBase, ICM_RentOutService private readonly ICommonService commonService; readonly IFeeRecordService _feeService; readonly ICM_State_ChangeService _Changeservice; + readonly ICM_CurrentStateService _CurrentStateservice; private readonly IFeeCurrencyExchangeService feeCurrencyExchangeService; /// /// @@ -56,6 +57,7 @@ public class CM_RentOutService : CMServiceBase, ICM_RentOutService _feeService = _serviceProvider.GetRequiredService(); _Changeservice = _serviceProvider.GetRequiredService(); + _CurrentStateservice= _serviceProvider.GetRequiredService(); feeCurrencyExchangeService = _serviceProvider.GetRequiredService(); } @@ -418,7 +420,7 @@ public class CM_RentOutService : CMServiceBase, ICM_RentOutService changerec.CtnFlowStateId = CMCtnFlowStateEnum.已还箱; changerec.ChangeTime = detail.DropoffDate; - changerec.IsOnlineId = CM_IsOnlineEnum.下线; + changerec.IsOnlineId = CM_IsOnlineEnum.上线; } @@ -747,8 +749,14 @@ public class CM_RentOutService : CMServiceBase, ICM_RentOutService var CurrentDetailList = TenantDb.Queryable() .Where(a => a.Pid == id).ToList(); - var AddCurrentStateList = TenantDb.Queryable() - .Where(a => ids.Contains(a.Id)).ToList(); + //var AddCurrentStateList = TenantDb.Queryable() + // .Where(a => ids.Contains(a.Id)).ToList(); + + var quary = CreateCurrentStateQuery(); + + var AddCurrentStateList= TenantDb.Queryable(quary) + .Where(a => ids.Contains(a.Id)) + .Select().ToList(); var addList = new List(); diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/ActionExecutor/Booking/EDIActionExecutor.cs b/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/ActionExecutor/Booking/EDIActionExecutor.cs index b29e9f17..93fbaab2 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/ActionExecutor/Booking/EDIActionExecutor.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/ActionExecutor/Booking/EDIActionExecutor.cs @@ -3,6 +3,7 @@ using DS.WMS.Core.Op.Dtos; using DS.WMS.Core.Op.Dtos.TaskInteraction; using DS.WMS.Core.Op.Interface; using Microsoft.Extensions.DependencyInjection; +using Newtonsoft.Json; namespace DS.WMS.Core.Op.Method.TaskInteraction.ActionExecutor.Booking { @@ -23,7 +24,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction.ActionExecutor.Booking var opService = context.ServiceProvider.GetRequiredService(); //发送订舱EDI - var result2 = await opService.SendBookingOrClosingEDI(new BookingOrClosingEDIOrderReq + var req = new BookingOrClosingEDIOrderReq { Id = context.TaskInfo.BusinessId, UseForwarderCode = false, @@ -32,11 +33,13 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction.ActionExecutor.Booking FileRole = "9", SendType = "B", Send = true - }); + }; + var result = await opService.SendBookingOrClosingEDI(req); //订舱未成功 - if (!result2.Succeeded) + if (!result.Succeeded) { - await LogService.WriteLogAsync(context.TaskInfo, "EDI返回结果失败,自动订舱未成功"); + await LogService.WriteLogAsync(context.TaskInfo, "EDI返回结果失败,自动订舱未成功!" + Environment.NewLine + "请求参数:" + + JsonConvert.SerializeObject(req) + Environment.NewLine + "响应参数:" + result.Data); return; } diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/ActionExecutor/ClosingOrderActionExecutor.cs b/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/ActionExecutor/ClosingOrderActionExecutor.cs index a66ac038..a8cd39da 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/ActionExecutor/ClosingOrderActionExecutor.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/ActionExecutor/ClosingOrderActionExecutor.cs @@ -1,8 +1,9 @@ using DS.WMS.Core.Op.Dtos; using DS.WMS.Core.Op.Dtos.TaskInteraction; -using DS.WMS.Core.Op.Interface.TaskInteraction; using DS.WMS.Core.Op.Interface; +using DS.WMS.Core.Op.Interface.TaskInteraction; using Microsoft.Extensions.DependencyInjection; +using Newtonsoft.Json; namespace DS.WMS.Core.Op.Method.TaskInteraction.ActionExecutor { @@ -17,8 +18,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction.ActionExecutor var taskService = context.ServiceProvider.GetRequiredService(); var logService = context.ServiceProvider.GetRequiredService(); - //发送截单EDI - var result = await opService.SendBookingOrClosingEDI(new BookingOrClosingEDIOrderReq + var req = new BookingOrClosingEDIOrderReq { Id = context.TaskInfo.BusinessId, UseForwarderCode = false, @@ -27,11 +27,14 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction.ActionExecutor FileRole = "9", SendType = "E", Send = true - }); + }; + //发送截单EDI + var result = await opService.SendBookingOrClosingEDI(req); //EDI提交未成功 if (!result.Succeeded) { - await logService.WriteLogAsync(context.TaskInfo, "截单EDI返回结果失败"); + await logService.WriteLogAsync(context.TaskInfo, "EDI返回结果失败,自动截单未成功!" + Environment.NewLine + "请求参数:" + + JsonConvert.SerializeObject(req) + Environment.NewLine + "响应参数:" + result.Data); return; } diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/ActionExecutor/SpaceRelease/SpaceReleaseActionExecutor.cs b/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/ActionExecutor/SpaceRelease/SpaceReleaseActionExecutor.cs index 3b0de0b3..6e09f65a 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/ActionExecutor/SpaceRelease/SpaceReleaseActionExecutor.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/ActionExecutor/SpaceRelease/SpaceReleaseActionExecutor.cs @@ -12,6 +12,7 @@ using DS.WMS.Core.TaskPlat.Entity; using DS.WMS.Core.TaskPlat.Interface; using Masuit.Tools.Systems; using Microsoft.Extensions.DependencyInjection; +using Newtonsoft.Json; namespace DS.WMS.Core.Op.Method.TaskInteraction.ActionExecutor.SpaceRelease { @@ -122,7 +123,11 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction.ActionExecutor.SpaceRelease var result = await BCService.SyncBookingSlotChange(taskBase.Id); if (!result.Succeeded) + { + await LogService.WriteLogAsync(context.TaskInfo, "转发BC返回结果失败,自动放舱未成功!" + Environment.NewLine + "请求参数:" + + taskBase.Id + Environment.NewLine + "响应参数:" + result.Data == null ? string.Empty : JsonConvert.SerializeObject(result.Data)); return; + } await SetTaskCompleteAsync(context.TaskInfo, context.ServiceProvider.GetRequiredService(), LogService); diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/ActionManagerService.cs b/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/ActionManagerService.cs index 5c732d85..f185a7ae 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/ActionManagerService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/ActionManagerService.cs @@ -248,7 +248,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction var businessTask = await TenantDb.Queryable().Where( x => x.BusinessId == businessId && x.BusinessType == businessType && x.TaskType == TaskBaseTypeEnum.WAIT_BOOKING).FirstAsync(); if (businessTask == null) - return DataResult.FailedWithDesc(MultiLanguageConst.TaskStatusNotSupported); + return DataResult.FailedWithDesc(MultiLanguageConst.BookingTaskNotFound); TaskFlowDataContext dataContext = new ( diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/TaskService.cs b/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/TaskService.cs index 3d934e26..bd770d20 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/TaskService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/TaskInteraction/TaskService.cs @@ -113,7 +113,7 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction if (request.HasCabin.GetValueOrDefault()) { //如果为现舱,获取下一任务类型进行创建 - var nextType = await GetNextTypeAsync(request.BusinessId, request.BusinessType, request.TaskType); + var nextType = await GetNextTypeAsync(request.BusinessId, request.BusinessType, request.TaskType, request.HasCabin); if (nextType.HasValue) request.TaskTypeName = nextType.Value.ToString(); } @@ -759,15 +759,17 @@ namespace DS.WMS.Core.Op.Method.TaskInteraction /// 业务ID /// 业务类型 /// 当前任务类型 + /// 是否现舱 /// - protected async Task GetNextTypeAsync(long bsId, BusinessType businessType, TaskBaseTypeEnum currentType) + protected async Task GetNextTypeAsync(long bsId, BusinessType businessType, TaskBaseTypeEnum currentType, bool? hasCabin = null) { var order = await ActionService.GetBusinessDataAsync(bsId, businessType); TaskFlowRuner flowRuner = new(TenantDb, ServiceProvider); - return await flowRuner.GetWorkFlowNextConfigByTaskType(TaskBaseTypeEnum.WORK_FLOW_MAIN, - new TaskFlowDataContext( - (TaskFlowDataNameConst.Business, order) - ), currentType); + var dataContext = new TaskFlowDataContext( + (TaskFlowDataNameConst.Business, order), + (nameof(hasCabin), hasCabin.HasValue ? hasCabin.ToString() : string.Empty) + ); + return await flowRuner.GetWorkFlowNextConfigByTaskType(TaskBaseTypeEnum.WORK_FLOW_MAIN, dataContext, currentType); } /// diff --git a/ds-wms-service/DS.WMS.OpApi/DS.WMS.OpApi.csproj.user b/ds-wms-service/DS.WMS.OpApi/DS.WMS.OpApi.csproj.user index da141c5a..fb7be066 100644 --- a/ds-wms-service/DS.WMS.OpApi/DS.WMS.OpApi.csproj.user +++ b/ds-wms-service/DS.WMS.OpApi/DS.WMS.OpApi.csproj.user @@ -1,7 +1,7 @@  - E:\MyCode\Dongsheng8\ds-wms-service\DS.WMS.OpApi\Properties\PublishProfiles\FolderProfile.pubxml + D:\Source\Repos\DS8\ds-wms-service\DS.WMS.OpApi\Properties\PublishProfiles\FolderProfile.pubxml MvcControllerEmptyScaffolder root/Common/MVC/Controller