usertest
dengyu 3 months ago
parent 8bc1a40fa2
commit a0e2a3af71

@ -102,6 +102,11 @@ namespace DS.Module.Core.Enums
/// </summary>
[Description("报废")]
= 7,
/// <summary>
/// 单程业务
/// </summary>
[Description("单程业务还箱")]
= 8,
}

@ -9,183 +9,7 @@ namespace DS.WMS.ContainerManagement.Info.Dtos;
/// <summary>
/// 箱管_租箱租出 请求实体
/// </summary>
public class CM_RentOneWay_DetailReq
public class CM_RentOneWay_DetailReq: CM_Rent_DetailBase
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 租箱业务id
/// </summary>
public long Pid { get; set; }
/// <summary>
/// Desc:租箱业务号
/// </summary>
public string Billno { get; set; }
/// <summary>
/// Desc:箱号
/// </summary>
public string Cntrno { get; set; }
/// <summary>
/// 箱型代码
/// </summary>
public string CtnCode { get; set; }
/// <summary>
/// Desc:箱型
/// </summary>
public string Ctnall { get; set; }
/// <summary>
/// Desc:原箱主Id
/// </summary>
public long OldContainerOwnerId { get; set; }
/// <summary>
/// Desc:原箱主
/// </summary>
public string OldContainerOwner { get; set; }
/// <summary>
/// Desc:租箱客户Id
/// </summary>
public long RentCustomerId { get; set; }
/// <summary>
/// Desc:租箱客户
/// </summary>
public string RentCustomerName { get; set; }
/// <summary>
/// Desc:租箱业务方向Id
/// </summary>
public CMRentDirectEnum? RentDirectId { get; set; }
/// <summary>
/// Desc:租箱业务方向
/// </summary>
public string? RentDirect => RentDirectId?.EnumDescription();
/// <summary>
/// Desc:租箱类型Id 长租1 短租0 单程2
/// </summary>
public CMRentTypeEnum? RentTypeId { get; set; }
/// <summary>
/// Desc:租箱业务方向
/// </summary>
public string? RentType => RentTypeId?.EnumDescription();
/// <summary>
/// Desc:业务状态
/// </summary>
public string BillState { get; set; }
/// <summary>
/// Desc:关联放箱单号
/// </summary>
public string CtnReleaseNo { get; set; }
/// <summary>
/// Desc:租入日期
/// </summary>
public DateTime? Bsdate { get; set; }
/// <summary>
/// Desc:开始计费日期
/// </summary>
public string FeeStartDate { get; set; }
/// <summary>
/// Desc:币别
/// </summary>
public string Currency { get; set; } = "USD";
/// <summary>
/// Desc:日租金
/// </summary>
public decimal? DailyRate { get; set; } = 0M;
/// <summary>
/// Desc:提箱费
/// </summary>
public decimal? PickupFee { get; set; } = 0M;
/// <summary>
/// Desc:提箱日期
/// </summary>
public DateTime? PickupDate { get; set; }
/// <summary>
/// Desc:还箱费
/// </summary>
public decimal? DropoffFee { get; set; } = 0M;
/// <summary>
/// Desc:还箱日期
/// </summary>
public DateTime? DropoffDate { get; set; }
/// <summary>
/// Desc:起租地点代码
/// </summary>
public string RentalPortid { get; set; }
/// <summary>
/// Desc:起租地点五字码
/// </summary>
public string RentalPortCode { get; set; }
/// <summary>
/// Desc:起租地点
/// </summary>
public string RentalPort { get; set; }
/// <summary>
/// Desc:提箱港口代码
/// </summary>
public long? PickupPortid { get; set; }
/// <summary>
/// Desc:提箱港口五字码
/// </summary>
public string PickupPortCode { get; set; }
/// <summary>
/// Desc:提箱港口
/// </summary>
public string PickupPort { get; set; }
/// <summary>
/// Desc:还箱港口代码
/// </summary>
public long? DropoffPortid { get; set; }
/// <summary>
/// Desc:还箱港口五字码
/// </summary>
public string DropoffPortCode { get; set; }
/// <summary>
/// Desc:还箱港口
/// </summary>
public string DropoffPort { get; set; }
/// <summary>
/// Desc:业务编号/提单号
/// </summary>
public string Mblno { get; set; }
/// <summary>
/// Desc:船名航次
/// </summary>
public string? VesselVoyno { get; set; }
/// <summary>
/// 在 租箱租入_退租 或 租箱租出_退租 中 记录对应的租入或租出业务Id
/// </summary>
public long RentDetailId { get; set; }
}

@ -8,181 +8,7 @@ namespace DS.WMS.ContainerManagement.Info.Dtos;
/// <summary>
/// 箱管_租箱租出 返回实体
/// </summary>
public class CM_RentOneWay_DetailRes
public class CM_RentOneWay_DetailRes: CM_Rent_DetailBase
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 租箱业务id
/// </summary>
public long Pid { get; set; }
/// <summary>
/// Desc:租箱业务号
/// </summary>
public string Billno { get; set; }
/// <summary>
/// Desc:箱号
/// </summary>
public string Cntrno { get; set; }
/// <summary>
/// 箱型代码
/// </summary>
public string CtnCode { get; set; }
/// <summary>
/// Desc:箱型
/// </summary>
public string Ctnall { get; set; }
/// <summary>
/// Desc:原箱主Id
/// </summary>
public long OldContainerOwnerId { get; set; }
/// <summary>
/// Desc:原箱主
/// </summary>
public string OldContainerOwner { get; set; }
/// <summary>
/// Desc:租箱客户Id
/// </summary>
public long RentCustomerId { get; set; }
/// <summary>
/// Desc:租箱客户
/// </summary>
public string RentCustomerName { get; set; }
/// <summary>
/// Desc:租箱业务方向Id
/// </summary>
public CMRentDirectEnum? RentDirectId { get; set; }
/// <summary>
/// Desc:租箱业务方向
/// </summary>
public string? RentDirect => RentDirectId?.EnumDescription();
/// <summary>
/// Desc:租箱类型Id 长租1 短租0 单程2
/// </summary>
public CMRentTypeEnum? RentTypeId { get; set; }
/// <summary>
/// Desc:租箱业务方向
/// </summary>
public string? RentType => RentTypeId?.EnumDescription();
/// <summary>
/// Desc:业务状态
/// </summary>
public string BillState { get; set; }
/// <summary>
/// Desc:关联放箱单号
/// </summary>
public string CtnReleaseNo { get; set; }
/// <summary>
/// Desc:租入日期
/// </summary>
public DateTime? Bsdate { get; set; }
/// <summary>
/// Desc:开始计费日期
/// </summary>
public string FeeStartDate { get; set; }
/// <summary>
/// Desc:币别
/// </summary>
public string Currency { get; set; } = "USD";
/// <summary>
/// Desc:日租金
/// </summary>
public decimal? DailyRate { get; set; } = 0M;
/// <summary>
/// Desc:提箱费
/// </summary>
public decimal? PickupFee { get; set; } = 0M;
/// <summary>
/// Desc:提箱日期
/// </summary>
public DateTime? PickupDate { get; set; }
/// <summary>
/// Desc:还箱费
/// </summary>
public decimal? DropoffFee { get; set; } = 0M;
/// <summary>
/// Desc:还箱日期
/// </summary>
public DateTime? DropoffDate { get; set; }
/// <summary>
/// Desc:起租地点代码
/// </summary>
public string RentalPortid { get; set; }
/// <summary>
/// Desc:起租地点五字码
/// </summary>
public string RentalPortCode { get; set; }
/// <summary>
/// Desc:起租地点
/// </summary>
public string RentalPort { get; set; }
/// <summary>
/// Desc:提箱港口代码
/// </summary>
public long? PickupPortid { get; set; }
/// <summary>
/// Desc:提箱港口五字码
/// </summary>
public string PickupPortCode { get; set; }
/// <summary>
/// Desc:提箱港口
/// </summary>
public string PickupPort { get; set; }
/// <summary>
/// Desc:还箱港口代码
/// </summary>
public string DropoffPortid { get; set; }
/// <summary>
/// Desc:还箱港口五字码
/// </summary>
public long? DropoffPortCode { get; set; }
/// <summary>
/// Desc:还箱港口
/// </summary>
public string DropoffPort { get; set; }
/// <summary>
/// Desc:业务编号/提单号
/// </summary>
public string Mblno { get; set; }
/// <summary>
/// Desc:船名航次
/// </summary>
public string? VesselVoyno { get; set; }
/// <summary>
/// 在 租箱租入_退租 或 租箱租出_退租 中 记录对应的租入或租出业务Id
/// </summary>
public long RentDetailId { get; set; }
}

@ -12,9 +12,9 @@ namespace DS.WMS.ContainerManagement.Info.Entity;
public class VW_CM_NeedEndLease_Detail : BaseOrgModel<long>
{
/// <summary>
/// 租箱业务id
/// 租箱租出业务明细id
/// </summary>
[SugarColumn(ColumnDescription = "租箱业务id", IsNullable = false)]
[SugarColumn(ColumnDescription = "租箱租出业务明细id", IsNullable = false)]
public long Pid { get; set; }
/// <summary>
@ -216,5 +216,20 @@ public class VW_CM_NeedEndLease_Detail : BaseOrgModel<long>
/// </summary>
[SugarColumn(ColumnDescription = "箱业务状态Id", IsNullable = true)]
public CM_CtnBizStateEnum? CtnBizStateId { get; set; }
/// <summary>
/// <summary>
/// Desc:箱状态Id
/// </summary>
[SugarColumn(ColumnDescription = "箱状态Id", IsNullable = true)]
public CMCtnStateEnum? CtnStateId { get; set; }
/// <summary>
/// Desc:箱流转状态Id
/// </summary>
[SugarColumn(ColumnDescription = "箱流转状态Id", IsNullable = true)]
public CMCtnFlowStateEnum? CtnFlowStateId { get; set; }
}

@ -12,9 +12,9 @@ namespace DS.WMS.ContainerManagement.Info.Entity;
public class VW_CM_RentOut_NeedEndLease : BaseOrgModel<long>
{
/// <summary>
/// 租箱业务id
/// 租箱租出业务明细id
/// </summary>
[SugarColumn(ColumnDescription = "租箱业务id", IsNullable = false)]
[SugarColumn(ColumnDescription = "租箱租出业务明细id", IsNullable = false)]
public long Id { get; set; }
/// <summary>

@ -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<List<CM_CurrentStateRes>> GetListByPage(PageRequest request);
public Task<DataResult<List<CM_CurrentStateRes>>> GetListByPage(PageRequest request);
public ISugarQueryable<CM_CurrentStateRes> CreateCurrentStateQuery();
/// <summary>
/// 编辑
/// </summary>

@ -36,4 +36,20 @@ public interface ICM_RentOneWayService
/// <param name="ids">单程业务业务ID</param>
/// <returns></returns>
Task<DataResult> DeleteCM_RentOneWayAsync(params long[] ids);
///// <summary>
///// 单程_确认
///// </summary>
///// <param name="id"></param>
///// <returns></returns>
//Task<DataResult> CM_RentIn_Confirm(string id, params long[] ids);
//Task<DataResult> CM_RentIn_Confirm(params long[] ids);
///// <summary>
///// 单程_取消
///// </summary>
///// <param name="id"></param>
///// <returns></returns>
//Task<DataResult> CM_RentIn_Cancel(string id, params long[] ids);
//Task<DataResult> CM_RentIn_Cancel(params long[] ids);
}

@ -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;
/// <summary>
///
@ -56,6 +57,7 @@ public class CM_RentOutService : CMServiceBase, ICM_RentOutService
_feeService = _serviceProvider.GetRequiredService<IFeeRecordService>();
_Changeservice = _serviceProvider.GetRequiredService<ICM_State_ChangeService>();
_CurrentStateservice= _serviceProvider.GetRequiredService<ICM_CurrentStateService>();
feeCurrencyExchangeService = _serviceProvider.GetRequiredService<IFeeCurrencyExchangeService>();
}
@ -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<CM_RentOut_Detail>()
.Where(a => a.Pid == id).ToList();
var AddCurrentStateList = TenantDb.Queryable<CM_CurrentState>()
.Where(a => ids.Contains(a.Id)).ToList();
//var AddCurrentStateList = TenantDb.Queryable<CM_CurrentState>()
// .Where(a => ids.Contains(a.Id)).ToList();
var quary = CreateCurrentStateQuery();
var AddCurrentStateList= TenantDb.Queryable(quary)
.Where(a => ids.Contains(a.Id))
.Select<CM_CurrentStateRes>().ToList();
var addList = new List<CM_RentOut_Detail>();

Loading…
Cancel
Save