diff --git a/ds-wms-service/DS.Module.Core/Constants/MultiLanguageConst.cs b/ds-wms-service/DS.Module.Core/Constants/MultiLanguageConst.cs
index 7a1133db..5f8981c7 100644
--- a/ds-wms-service/DS.Module.Core/Constants/MultiLanguageConst.cs
+++ b/ds-wms-service/DS.Module.Core/Constants/MultiLanguageConst.cs
@@ -1173,5 +1173,108 @@ public static class MultiLanguageConst
[Description("合约作废未提供主键ID")]
public const string BookingContractDeleteIdsNull = "BookingContract_Delete_IdsNull";
+ ///
+ /// 部分舱位信息提取失败,请确认舱位是否存在或已作废
+ ///
+ [Description("部分舱位信息提取失败,请确认舱位是否存在或已作废")]
+ public const string BookingSlotMergeCheckPartRecordDeletedOrNoExists = "BookingContract_MergeCheck_PartRecord_DeletedOrNoExists";
+
+ ///
+ /// 舱位合票校验失败,部分舱位的以下信息船公司、船名场次、合约号、承运方式、订舱方式、装货地、卸货地有空值情况
+ ///
+ [Description("舱位合票校验失败,部分舱位的以下信息船公司、船名场次、合约号、承运方式、订舱方式、装货地、卸货地有空值情况")]
+ public const string BookingSlotMergeCheckPartRecordNoConsistent = "BookingContract_MergeCheck_PartRecord_NoConsistent";
+
+ ///
+ /// 舱位合票校验失败,船公司、船名场次、合约号、承运方式、订舱方式、装货地、卸货地不统一不能合票
+ ///
+ [Description("舱位合票校验失败,船公司、船名场次、合约号、承运方式、订舱方式、装货地、卸货地不统一不能合票")]
+ public const string BookingSlotMergeCheckPartRecordNoConsistentFail = "BookingContract_MergeCheck_PartRecord_NoConsistent_Fail";
+
+ ///
+ /// 舱位合票失败,校验库存为不可用,请确认正确的库存
+ ///
+ [Description("舱位合票失败,校验库存为不可用,请确认正确的库存")]
+ public const string BookingSlotMergeCheckStockEmpty = "BookingContract_MergeCheck_StockEmpty";
+
+ ///
+ /// 舱位合票失败,舱位提单号:{0} 缺少库存
+ ///
+ [Description("舱位合票失败,舱位提单号:{0} 缺少库存")]
+ public const string BookingSlotMergeFailShortStock = "BookingContract_MergeFail_ShortStock";
+
+ ///
+ /// 单号【{0}】含有 {1}
+ ///
+ [Description("单号【{0}】含有 {1}")]
+ public const string BookingSlotMergeSpecialNotice = "BookingContract_Merge_SpecialNotice";
+
+ ///
+ /// 请选择委托单位
+ ///
+ [Description("请选择委托单位")]
+ public const string BookingSlotCreateCustomerNull = "BookingSlot_Create_CustomerNull";
+
+ ///
+ /// 请选择要使用的箱信息
+ ///
+ [Description("请选择要使用的箱信息")]
+ public const string BookingSlotCreateContaNull = "BookingSlot_Create_ContaNull";
+
+ ///
+ /// 舱位ID不能为空
+ ///
+ [Description("舱位ID不能为空")]
+ public const string BookingSlotCreateSlotIdNull = "BookingSlot_Create_SlotIdNull";
+
+ ///
+ /// 舱位数据不存在或已作废
+ ///
+ [Description("舱位数据不存在或已作废")]
+ public const string BookingSlotCreateRecordDeletedOrNoExists = "BookingSlot_Create_Recrod_DeleteOr_NoExists";
+
+ ///
+ /// 委托单位{0} 获取失败,委托单位不存在或已作废
+ ///
+ [Description("委托单位{0} 获取失败,委托单位不存在或已作废")]
+ public const string BookingSlotCreateCustomerDeletedOrNoExists = "BookingSlot_Create_Customer_DeleteOr_NoExists";
+
+ ///
+ /// 委托单位{0} 获取相关联系人失败,委托单位相关联系人为空
+ ///
+ [Description("委托单位{0} 获取相关联系人失败,委托单位相关联系人为空")]
+ public const string BookingSlotCreateCustomerContractInfoNull = "BookingSlot_Create_Customer_ContractInfoNull";
+
+ ///
+ /// 委托单位 {0} 联系人 {1} 获取失败,联系人不存在或已作废
+ ///
+ [Description("委托单位 {0} 联系人 {1} 获取失败,联系人不存在或已作废")]
+ public const string BookingSlotCreateCustomerContractDeletedOrNoExists = "BookingSlot_Create_Customer_ContractDeletedOrNoExists";
+
+ ///
+ /// 生成订舱时往来单位联系人必填,请修改
+ ///
+ [Description("生成订舱时往来单位联系人必填,请修改")]
+ public const string BookingSlotCreateCustomerContractNotNull = "BookingSlot_Create_Customer_ContractNotNull";
+
+ ///
+ /// 订舱主键{0}已引用舱位
+ ///
+ [Description("订舱主键{0}已引用舱位")]
+ public const string BookingSlotHasImportSlots = "BookingSlot_HasImportSlots";
+
+ ///
+ /// 获取的历史拆票后缀异常,maxChar={0}
+ ///
+ [Description("订舱主键{0}已引用舱位")]
+ public const string BookingSlotSplitMergeCheckError = "BookingSlot_SplitMerge_CheckError";
+
+ ///
+ /// 舱位提单号:{0} 已有订舱记录不能重复操作
+ ///
+ [Description("舱位提单号:{0} 已有订舱记录不能重复操作")]
+ public const string BookingSlotSplitMergeHasOrder = "BookingSlot_SplitMerge_HasOrder";
+
+
#endregion
}
\ No newline at end of file
diff --git a/ds-wms-service/DS.WMS.Core/Info/Dtos/ClientInfoRes.cs b/ds-wms-service/DS.WMS.Core/Info/Dtos/ClientInfoRes.cs
index 9b393f63..7a828e5e 100644
--- a/ds-wms-service/DS.WMS.Core/Info/Dtos/ClientInfoRes.cs
+++ b/ds-wms-service/DS.WMS.Core/Info/Dtos/ClientInfoRes.cs
@@ -400,4 +400,9 @@ public class ClientInfoRes
/// 客户标识
///
public ClientTagRes ClientTag { get; set; }
+
+ ///
+ /// 联系人列表
+ ///
+ public List ClientContactList { get; set; }
}
\ No newline at end of file
diff --git a/ds-wms-service/DS.WMS.Core/Info/Dtos/QueryClientInfo.cs b/ds-wms-service/DS.WMS.Core/Info/Dtos/QueryClientInfo.cs
new file mode 100644
index 00000000..6e4488d2
--- /dev/null
+++ b/ds-wms-service/DS.WMS.Core/Info/Dtos/QueryClientInfo.cs
@@ -0,0 +1,135 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace DS.WMS.Core.Info.Dtos
+{
+ ///
+ /// 检索往来单位
+ ///
+ public class QueryClientInfo
+ {
+ ///
+ /// 客户Id
+ ///
+ public long ClientId { get; set; }
+
+ ///
+ /// Desc:是否特批放单客户
+ ///
+ public bool IsSpecialApproval { get; set; } = false;
+ ///
+ /// Desc:是否船公司
+ ///
+ public bool IsCarrier { get; set; } = false;
+
+ ///
+ /// Desc:是否订舱公司
+ ///
+ public bool IsBooking { get; set; } = false;
+
+ ///
+ /// Desc:是否场站
+ ///
+ public bool IsYard { get; set; } = false;
+
+ ///
+ /// Desc:是否车队
+ ///
+ public bool IsTruck { get; set; } = false;
+
+ ///
+ /// Desc:是否委托单位
+ ///
+ public bool IsController { get; set; } = false;
+
+ ///
+ /// Desc:是否报关行
+ ///
+ public bool IsCustom { get; set; } = false;
+
+ ///
+ /// Desc:是否代理(国外)
+ ///
+ public bool IsAgent { get; set; } = false;
+
+ ///
+ /// Desc:是否代理(国内)
+ ///
+ public bool IsAgentCn { get; set; } = false;
+
+ ///
+ /// Desc:是否快递公司
+ ///
+ public bool IsExpress { get; set; } = false;
+
+ ///
+ /// Desc:是否航空公司
+ ///
+ public bool IsAirLines { get; set; } = false;
+
+ ///
+ /// Desc:是否发货人
+ ///
+ public bool IsShipper { get; set; } = false;
+
+ ///
+ /// Desc:是否收货人
+ ///
+ public bool IsConsignee { get; set; } = false;
+
+ ///
+ /// Desc:是否通知人
+ ///
+ public bool IsNotifyParty { get; set; } = false;
+
+ ///
+ /// Desc:是否仓库
+ ///
+ public bool IsWareHouse { get; set; } = false;
+
+
+ ///
+ /// Desc:是否码头
+ ///
+ public bool IsWharf { get; set; } = false;
+
+ ///
+ /// Desc:是否保险公司
+ ///
+ public bool IsInsurer { get; set; } = false;
+
+ ///
+ /// Desc:是否租箱公司
+ ///
+ public bool IsLeasing { get; set; } = false;
+
+ ///
+ /// Desc:是否贸易代理
+ ///
+ public bool IsTradingAgency { get; set; } = false;
+
+ ///
+ /// Desc:是否其他
+ ///
+ public bool IsOther { get; set; } = false;
+
+ ///
+ /// Desc:其他类型
+ ///
+ public string Others { get; set; }
+
+
+ ///
+ /// Desc:是否船代
+ ///
+ public bool IsShipAgency { get; set; } = false;
+
+ ///
+ /// Desc:是否经营单位
+ ///
+ public bool IsEnterprise { get; set; } = false;
+ }
+}
diff --git a/ds-wms-service/DS.WMS.Core/Info/Interface/IClientInfoService.cs b/ds-wms-service/DS.WMS.Core/Info/Interface/IClientInfoService.cs
index f253a54e..9b11d75c 100644
--- a/ds-wms-service/DS.WMS.Core/Info/Interface/IClientInfoService.cs
+++ b/ds-wms-service/DS.WMS.Core/Info/Interface/IClientInfoService.cs
@@ -36,4 +36,11 @@ public interface IClientInfoService
///
///
public DataResult BatchDelClientInfo(IdModel req);
+
+ ///
+ /// 获取往来单位详情(含有联系人列表)
+ ///
+ /// 查询往来单位
+ /// 返回往来单位详情
+ Task> GetClientInfoWithContact(QueryClientInfo query);
}
\ No newline at end of file
diff --git a/ds-wms-service/DS.WMS.Core/Info/Method/ClientInfoService.cs b/ds-wms-service/DS.WMS.Core/Info/Method/ClientInfoService.cs
index 596a4ba9..9b74c09f 100644
--- a/ds-wms-service/DS.WMS.Core/Info/Method/ClientInfoService.cs
+++ b/ds-wms-service/DS.WMS.Core/Info/Method/ClientInfoService.cs
@@ -13,6 +13,7 @@ using DS.WMS.Core.Op.Entity;
using DS.WMS.Core.Sys.Entity;
using Mapster;
using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Owin.Security.Provider;
using SqlSugar;
namespace DS.WMS.Core.Info.Method;
@@ -176,4 +177,61 @@ public class ClientInfoService : IClientInfoService
}
return DataResult.Successed("删除成功!", MultiLanguageConst.DataDelSuccess);
}
+
+ #region 获取往来单位详情(含有联系人列表)
+ ///
+ /// 获取往来单位详情(含有联系人列表)
+ ///
+ /// 查询往来单位
+ /// 返回往来单位详情
+ public async Task> GetClientInfoWithContact(QueryClientInfo query)
+ {
+ var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
+
+ var data = await tenantDb.Queryable().InnerJoin((c,t)=> c.Id == t.ClientId)
+ .Where((c,t)=> c.Id == query.ClientId)
+ .WhereIF(query.IsController,(c,t)=>t.IsController.HasValue && t.IsController.HasValue)
+ .WhereIF(query.IsSpecialApproval, (c, t) => t.IsSpecialApproval.HasValue && t.IsSpecialApproval.HasValue)
+ .WhereIF(query.IsCarrier, (c, t) => t.IsCarrier.HasValue && t.IsCarrier.HasValue)
+ .WhereIF(query.IsBooking, (c, t) => t.IsBooking.HasValue && t.IsBooking.HasValue)
+ .WhereIF(query.IsYard, (c, t) => t.IsYard.HasValue && t.IsYard.HasValue)
+ .WhereIF(query.IsTruck, (c, t) => t.IsTruck.HasValue && t.IsTruck.HasValue)
+ .WhereIF(query.IsController, (c, t) => t.IsController.HasValue && t.IsController.HasValue)
+ .WhereIF(query.IsCustom, (c, t) => t.IsCustom.HasValue && t.IsCustom.HasValue)
+ .WhereIF(query.IsAgent, (c, t) => t.IsAgent.HasValue && t.IsAgent.HasValue)
+ .WhereIF(query.IsAgentCn, (c, t) => t.IsAgentCn.HasValue && t.IsAgentCn.HasValue)
+ .WhereIF(query.IsExpress, (c, t) => t.IsExpress.HasValue && t.IsExpress.HasValue)
+ .WhereIF(query.IsAirLines, (c, t) => t.IsAirLines.HasValue && t.IsAirLines.HasValue)
+ .WhereIF(query.IsShipper, (c, t) => t.IsShipper.HasValue && t.IsShipper.HasValue)
+ .WhereIF(query.IsConsignee, (c, t) => t.IsConsignee.HasValue && t.IsConsignee.HasValue)
+ .WhereIF(query.IsNotifyParty, (c, t) => t.IsNotifyParty.HasValue && t.IsNotifyParty.HasValue)
+ .WhereIF(query.IsWareHouse, (c, t) => t.IsWareHouse.HasValue && t.IsWareHouse.HasValue)
+ .WhereIF(query.IsWharf, (c, t) => t.IsWharf.HasValue && t.IsWharf.HasValue)
+ .WhereIF(query.IsInsurer, (c, t) => t.IsInsurer.HasValue && t.IsInsurer.HasValue)
+ .WhereIF(query.IsLeasing, (c, t) => t.IsLeasing.HasValue && t.IsLeasing.HasValue)
+ .WhereIF(query.IsTradingAgency, (c, t) => t.IsTradingAgency.HasValue && t.IsTradingAgency.HasValue)
+ .WhereIF(query.IsOther, (c, t) => t.IsOther.HasValue && t.IsOther.HasValue)
+ .WhereIF(!string.IsNullOrWhiteSpace(query.Others), (c, t) => t.Others == query.Others)
+ .WhereIF(query.IsShipAgency, (c, t) => t.IsShipAgency.HasValue && t.IsShipAgency.HasValue)
+ .WhereIF(query.IsEnterprise, (c, t) => t.IsEnterprise.HasValue && t.IsEnterprise.HasValue)
+
+ .Select((c,t)=> new { Client = c, tag = t })
+ .FirstAsync();
+
+ var clientInfo = data.Client.Adapt();
+
+ clientInfo.ClientTag = data.tag.Adapt();
+
+ var contactList = tenantDb.Queryable()
+ .Where(a => a.ClientId == clientInfo.Id && a.Status == StatusEnum.Enable).ToList();
+
+ if (contactList.Count > 0)
+ clientInfo.ClientContactList = contactList.Adapt>();
+
+ if (clientInfo == null)
+ return DataResult.FailedData(clientInfo);
+
+ return DataResult.Success(clientInfo);
+ }
+ #endregion
}
\ No newline at end of file
diff --git a/ds-wms-service/DS.WMS.Core/Op/Dtos/BookingSlot/SqlSugarPagedList.cs b/ds-wms-service/DS.WMS.Core/Op/Dtos/BookingSlot/SqlSugarPagedList.cs
new file mode 100644
index 00000000..e477b567
--- /dev/null
+++ b/ds-wms-service/DS.WMS.Core/Op/Dtos/BookingSlot/SqlSugarPagedList.cs
@@ -0,0 +1,57 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace DS.WMS.Core.Op.Dtos
+{
+ ///
+ /// 分页泛型集合
+ ///
+ ///
+ public class SqlSugarPagedList
+ {
+ ///
+ /// 页码
+ ///
+ public int PageIndex { get; set; }
+
+ ///
+ /// 页容量
+ ///
+ public int PageSize { get; set; }
+
+ ///
+ /// 总条数
+ ///
+ public int TotalCount { get; set; }
+
+ ///
+ /// 总页数
+ ///
+ public int TotalPages { get; set; }
+
+ ///
+ /// 当前页集合
+ ///
+ public IEnumerable Items { get; set; }
+
+ ///
+ /// 是否有上一页
+ ///
+ public bool HasPrevPages { get; set; }
+
+ ///
+ /// 是否有下一页
+ ///
+ public bool HasNextPages { get; set; }
+ }
+
+ ///
+ /// 分页集合
+ ///
+ public class PagedModel : SqlSugarPagedList