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();