客户信息相关模块
parent
5068ddae03
commit
fdfc555d51
@ -0,0 +1,111 @@
|
||||
using DS.Module.Core;
|
||||
using FluentValidation;
|
||||
|
||||
namespace DS.WMS.Core.Info.Dtos;
|
||||
|
||||
/// <summary>
|
||||
/// 客户财务账期请求实体
|
||||
/// </summary>
|
||||
public class ClientAccountDateReq
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键Id
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 客户Id
|
||||
/// </summary>
|
||||
public long ClientId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:业务来源Id
|
||||
/// </summary>
|
||||
public long SourceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:合同生效日期
|
||||
/// </summary>
|
||||
public DateTime? BeginDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:合同结束日期
|
||||
/// </summary>
|
||||
public DateTime? EndDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:业务类型
|
||||
/// </summary>
|
||||
public string BusinessType { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Desc:揽货人Id
|
||||
/// </summary>
|
||||
public long SaleId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:账期类型
|
||||
/// </summary>
|
||||
public string AccountType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:账期起算日
|
||||
/// </summary>
|
||||
public string AccountStartDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:间隔月份
|
||||
/// </summary>
|
||||
public byte? AccountMonth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:账期日期
|
||||
/// </summary>
|
||||
public byte? AccountDays { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:信用额度
|
||||
/// </summary>
|
||||
public decimal? AllowAmount { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Desc:合同Id
|
||||
/// </summary>
|
||||
public long ContractId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:运杂费比例
|
||||
/// </summary>
|
||||
public decimal? CommissionRate { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// 状态 0 启用 1 禁用
|
||||
/// </summary>
|
||||
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string Note { get; set; } = "";
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 验证
|
||||
/// </summary>
|
||||
public class ClientAccountDateReqValidator : AbstractValidator<ClientAccountDateReq>
|
||||
{
|
||||
/// <summary>
|
||||
/// 构造函数
|
||||
/// </summary>
|
||||
public ClientAccountDateReqValidator()
|
||||
{
|
||||
this.RuleFor(o => o.AccountType)
|
||||
.NotEmpty().WithName("账期类型");
|
||||
this.RuleFor(o => o.BusinessType)
|
||||
.NotEmpty().WithName("业务类型");
|
||||
}
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
using DS.Module.Core;
|
||||
|
||||
namespace DS.WMS.Core.Info.Dtos;
|
||||
|
||||
/// <summary>
|
||||
/// 客户账期返回实体
|
||||
/// </summary>
|
||||
public class ClientAccountDateRes
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键Id
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 客户id
|
||||
/// </summary>
|
||||
public long ClientId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:业务来源Id
|
||||
/// </summary>
|
||||
public long SourceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:合同生效日期
|
||||
/// </summary>
|
||||
public DateTime? BeginDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:合同结束日期
|
||||
/// </summary>
|
||||
public DateTime? EndDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:业务类型
|
||||
/// </summary>
|
||||
public string BusinessType { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Desc:揽货人Id
|
||||
/// </summary>
|
||||
public long SaleId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:账期类型
|
||||
/// </summary>
|
||||
public string AccountType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:账期起算日
|
||||
/// </summary>
|
||||
public string AccountStartDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:间隔月份
|
||||
/// </summary>
|
||||
public byte? AccountMonth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:账期日期
|
||||
/// </summary>
|
||||
public byte? AccountDays { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:信用额度
|
||||
/// </summary>
|
||||
public decimal? AllowAmount { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Desc:合同Id
|
||||
/// </summary>
|
||||
public long ContractId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:运杂费比例
|
||||
/// </summary>
|
||||
public decimal? CommissionRate { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// 状态 0 启用 1 禁用
|
||||
/// </summary>
|
||||
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string Note { get; set; } = "";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public DateTime CreateTime { get; set; }
|
||||
}
|
@ -0,0 +1,145 @@
|
||||
using DS.Module.Core;
|
||||
using FluentValidation;
|
||||
|
||||
namespace DS.WMS.Core.Info.Dtos;
|
||||
|
||||
/// <summary>
|
||||
/// 客户银行信息请求实体
|
||||
/// </summary>
|
||||
public class ClientBankReq
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键Id
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 客户id
|
||||
/// </summary>
|
||||
public long ClientId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:联系人代码
|
||||
/// </summary>
|
||||
public string CodeName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:联系人简称
|
||||
/// </summary>
|
||||
public string ShortName { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Desc:职务
|
||||
/// </summary>
|
||||
public string Job { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:通讯地址
|
||||
/// </summary>
|
||||
public string Address { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:邮箱
|
||||
/// </summary>
|
||||
public string Email { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:手机
|
||||
/// </summary>
|
||||
public string Mobile { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:电话
|
||||
/// </summary>
|
||||
public string Tel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:传真
|
||||
/// </summary>
|
||||
public string Fax { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:QQ
|
||||
/// </summary>
|
||||
public string QQ { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否为操作
|
||||
/// </summary>
|
||||
public bool? IsOperator { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否为财务
|
||||
/// </summary>
|
||||
public bool? IsFinancialStaff { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否为销售
|
||||
/// </summary>
|
||||
public bool? IsSaleMan { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否为其他
|
||||
/// </summary>
|
||||
public bool? IsOther { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否保险联系人
|
||||
/// </summary>
|
||||
public bool? IsInsurance { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否对账联系人
|
||||
/// </summary>
|
||||
public bool? IsCheckAccount { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 提醒日期1
|
||||
/// </summary>
|
||||
public DateTime Anniversary1 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 提醒日期2
|
||||
/// </summary>
|
||||
public DateTime Anniversary2 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 提醒备注1
|
||||
/// </summary>
|
||||
public string AnniversaryNote1 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 提醒备注2
|
||||
/// </summary>
|
||||
public string AnniversaryNote2 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态 0 启用 1 禁用
|
||||
/// </summary>
|
||||
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string Note { get; set; } = "";
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 验证
|
||||
/// </summary>
|
||||
public class ClientBankReqValidator : AbstractValidator<ClientBankReq>
|
||||
{
|
||||
/// <summary>
|
||||
/// 构造函数
|
||||
/// </summary>
|
||||
public ClientBankReqValidator()
|
||||
{
|
||||
this.RuleFor(o => o.CodeName)
|
||||
.NotEmpty().WithName("联系人代码");
|
||||
this.RuleFor(o => o.ShortName)
|
||||
.NotEmpty().WithName("联系人简称");
|
||||
}
|
||||
}
|
@ -0,0 +1,101 @@
|
||||
using DS.Module.Core;
|
||||
|
||||
namespace DS.WMS.Core.Info.Dtos;
|
||||
|
||||
/// <summary>
|
||||
/// 客户银行信息返回实体
|
||||
/// </summary>
|
||||
public class ClientBankRes
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键Id
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 客户Id
|
||||
/// </summary>
|
||||
public long ClientId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:代码
|
||||
/// </summary>
|
||||
public string CodeName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:币别
|
||||
/// </summary>
|
||||
public string Currency { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:银行名称
|
||||
/// </summary>
|
||||
public string BankName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:银行账户
|
||||
/// </summary>
|
||||
public string Account { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:银行地址
|
||||
/// </summary>
|
||||
public string BankAddress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:财务软件代码
|
||||
/// </summary>
|
||||
public string FinanceSoftCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:科目代码
|
||||
/// </summary>
|
||||
public string SubjectCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:户头名称
|
||||
/// </summary>
|
||||
public string AccountName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:代理银行名称
|
||||
/// </summary>
|
||||
public string BankAgentName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:银行账号
|
||||
/// </summary>
|
||||
public string BankAccountNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc: 银行SWIFT
|
||||
/// </summary>
|
||||
public string SWIFT { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Desc: 国家Id
|
||||
/// </summary>
|
||||
public long? CountryId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否开票默认账户
|
||||
/// </summary>
|
||||
public bool? IsInvoiceDefault { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 状态 0 启用 1 禁用
|
||||
/// </summary>
|
||||
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string Note { get; set; } = "";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public DateTime CreateTime { get; set; }
|
||||
}
|
@ -0,0 +1,115 @@
|
||||
using DS.Module.Core;
|
||||
using FluentValidation;
|
||||
|
||||
namespace DS.WMS.Core.Info.Dtos;
|
||||
|
||||
/// <summary>
|
||||
/// 客户联系人请求实体
|
||||
/// </summary>
|
||||
public class ClientContactReq
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键Id
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 客户Id
|
||||
/// </summary>
|
||||
public long ClientId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:代码
|
||||
/// </summary>
|
||||
public string CodeName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:币别
|
||||
/// </summary>
|
||||
public string Currency { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:银行名称
|
||||
/// </summary>
|
||||
public string BankName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:银行账户
|
||||
/// </summary>
|
||||
public string Account { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:银行地址
|
||||
/// </summary>
|
||||
public string BankAddress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:财务软件代码
|
||||
/// </summary>
|
||||
public string FinanceSoftCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:科目代码
|
||||
/// </summary>
|
||||
public string SubjectCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:户头名称
|
||||
/// </summary>
|
||||
public string AccountName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:代理银行名称
|
||||
/// </summary>
|
||||
public string BankAgentName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:银行账号
|
||||
/// </summary>
|
||||
public string BankAccountNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc: 银行SWIFT
|
||||
/// </summary>
|
||||
public string SWIFT { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Desc: 国家Id
|
||||
/// </summary>
|
||||
public long? CountryId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否开票默认账户
|
||||
/// </summary>
|
||||
public bool? IsInvoiceDefault { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 状态 0 启用 1 禁用
|
||||
/// </summary>
|
||||
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string Note { get; set; } = "";
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 验证
|
||||
/// </summary>
|
||||
public class ClientContactReqValidator : AbstractValidator<ClientContactReq>
|
||||
{
|
||||
/// <summary>
|
||||
/// 构造函数
|
||||
/// </summary>
|
||||
public ClientContactReqValidator()
|
||||
{
|
||||
this.RuleFor(o => o.BankName)
|
||||
.NotEmpty().WithName("银行名称");
|
||||
this.RuleFor(o => o.Currency)
|
||||
.NotEmpty().WithName("币别");
|
||||
}
|
||||
}
|
@ -0,0 +1,131 @@
|
||||
using DS.Module.Core;
|
||||
|
||||
namespace DS.WMS.Core.Info.Dtos;
|
||||
|
||||
/// <summary>
|
||||
/// 客户联系人返回实体
|
||||
/// </summary>
|
||||
public class ClientContactRes
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键Id
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 客户id
|
||||
/// </summary>
|
||||
public long ClientId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:联系人代码
|
||||
/// </summary>
|
||||
public string CodeName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:联系人简称
|
||||
/// </summary>
|
||||
public string ShortName { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Desc:职务
|
||||
/// </summary>
|
||||
public string Job { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:通讯地址
|
||||
/// </summary>
|
||||
public string Address { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:邮箱
|
||||
/// </summary>
|
||||
public string Email { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:手机
|
||||
/// </summary>
|
||||
public string Mobile { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:电话
|
||||
/// </summary>
|
||||
public string Tel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:传真
|
||||
/// </summary>
|
||||
public string Fax { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:QQ
|
||||
/// </summary>
|
||||
public string QQ { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否为操作
|
||||
/// </summary>
|
||||
public bool? IsOperator { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否为财务
|
||||
/// </summary>
|
||||
public bool? IsFinancialStaff { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否为销售
|
||||
/// </summary>
|
||||
public bool? IsSaleMan { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否为其他
|
||||
/// </summary>
|
||||
public bool? IsOther { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否保险联系人
|
||||
/// </summary>
|
||||
public bool? IsInsurance { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否对账联系人
|
||||
/// </summary>
|
||||
public bool? IsCheckAccount { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 提醒日期1
|
||||
/// </summary>
|
||||
public DateTime Anniversary1 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 提醒日期2
|
||||
/// </summary>
|
||||
public DateTime Anniversary2 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 提醒备注1
|
||||
/// </summary>
|
||||
public string AnniversaryNote1 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 提醒备注2
|
||||
/// </summary>
|
||||
public string AnniversaryNote2 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态 0 启用 1 禁用
|
||||
/// </summary>
|
||||
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string Note { get; set; } = "";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public DateTime CreateTime { get; set; }
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
using DS.Module.Core;
|
||||
using FluentValidation;
|
||||
|
||||
namespace DS.WMS.Core.Info.Dtos;
|
||||
|
||||
/// <summary>
|
||||
/// 客户合同请求实体
|
||||
/// </summary>
|
||||
public class ClientContractReq
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键Id
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 客户Id
|
||||
/// </summary>
|
||||
public long ClientId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:合同号
|
||||
/// </summary>
|
||||
public string ContractNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:签订日期
|
||||
/// </summary>
|
||||
public DateTime SignDate { get; set; }
|
||||
/// <summary>
|
||||
/// Desc:起始日期
|
||||
/// </summary>
|
||||
public DateTime StartDate { get; set; }
|
||||
/// <summary>
|
||||
/// Desc:截止日期
|
||||
/// </summary>
|
||||
public DateTime EndDate { get; set; }
|
||||
/// <summary>
|
||||
/// Desc:负责人
|
||||
/// </summary>
|
||||
public string Chief { get; set; }
|
||||
/// <summary>
|
||||
/// Desc:签订部门Id
|
||||
/// </summary>
|
||||
public long DeptId { get; set; }
|
||||
/// <summary>
|
||||
/// Desc:合同名称
|
||||
/// </summary>
|
||||
public string ContractName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态 0 启用 1 禁用
|
||||
/// </summary>
|
||||
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string Note { get; set; } = "";
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 验证
|
||||
/// </summary>
|
||||
public class ClientContractReqValidator : AbstractValidator<ClientContractReq>
|
||||
{
|
||||
/// <summary>
|
||||
/// 构造函数
|
||||
/// </summary>
|
||||
public ClientContractReqValidator()
|
||||
{
|
||||
this.RuleFor(o => o.ContractNo)
|
||||
.NotEmpty().WithName("合同号");
|
||||
this.RuleFor(o => o.ContractName)
|
||||
.NotEmpty().WithName("合同名称");
|
||||
}
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
using DS.Module.Core;
|
||||
|
||||
namespace DS.WMS.Core.Info.Dtos;
|
||||
|
||||
/// <summary>
|
||||
/// 客户合同返回实体
|
||||
/// </summary>
|
||||
public class ClientContractRes
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键Id
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 客户id
|
||||
/// </summary>
|
||||
public long ClientId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Desc:合同号
|
||||
/// </summary>
|
||||
public string ContractNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:签订日期
|
||||
/// </summary>
|
||||
public DateTime SignDate { get; set; }
|
||||
/// <summary>
|
||||
/// Desc:起始日期
|
||||
/// </summary>
|
||||
public DateTime StartDate { get; set; }
|
||||
/// <summary>
|
||||
/// Desc:截止日期
|
||||
/// </summary>
|
||||
public DateTime EndDate { get; set; }
|
||||
/// <summary>
|
||||
/// Desc:负责人
|
||||
/// </summary>
|
||||
public string Chief { get; set; }
|
||||
/// <summary>
|
||||
/// Desc:签订部门Id
|
||||
/// </summary>
|
||||
public long DeptId { get; set; }
|
||||
/// <summary>
|
||||
/// Desc:合同名称
|
||||
/// </summary>
|
||||
public string ContractName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态 0 启用 1 禁用
|
||||
/// </summary>
|
||||
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string Note { get; set; } = "";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public DateTime CreateTime { get; set; }
|
||||
}
|
@ -0,0 +1,94 @@
|
||||
using DS.Module.Core;
|
||||
using FluentValidation;
|
||||
|
||||
namespace DS.WMS.Core.Info.Dtos;
|
||||
|
||||
/// <summary>
|
||||
/// 客户收发货人请求实体
|
||||
/// </summary>
|
||||
public class ClientShipperReq
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键Id
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 客户Id
|
||||
/// </summary>
|
||||
public long ClientId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:收发货人代码
|
||||
/// </summary>
|
||||
public string CodeName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:收发货人简称
|
||||
/// </summary>
|
||||
public string ShortName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:类型 下拉选择(Shipper-1,Consinee-2,Notifypaty-3,Agent-4)
|
||||
/// </summary>
|
||||
public int ShipperType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否公共标识
|
||||
/// </summary>
|
||||
public bool IsPublic { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:详细信息
|
||||
/// </summary>
|
||||
public string ShortDetail { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:联系人
|
||||
/// </summary>
|
||||
public string ATTN { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:邮箱
|
||||
/// </summary>
|
||||
public string Email { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:电话
|
||||
/// </summary>
|
||||
public string Tel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:公司代码
|
||||
/// </summary>
|
||||
public string CompanyNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态 0 启用 1 禁用
|
||||
/// </summary>
|
||||
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string Note { get; set; } = "";
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 验证
|
||||
/// </summary>
|
||||
public class ClientShipperReqValidator : AbstractValidator<ClientShipperReq>
|
||||
{
|
||||
/// <summary>
|
||||
/// 构造函数
|
||||
/// </summary>
|
||||
public ClientShipperReqValidator()
|
||||
{
|
||||
this.RuleFor(o => o.CodeName)
|
||||
.NotEmpty().WithName("代码");
|
||||
this.RuleFor(o => o.ShortName)
|
||||
.NotEmpty().WithName("简称");
|
||||
}
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
using DS.Module.Core;
|
||||
|
||||
namespace DS.WMS.Core.Info.Dtos;
|
||||
|
||||
/// <summary>
|
||||
/// 客户收发货人返回实体
|
||||
/// </summary>
|
||||
public class ClientShipperRes
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键Id
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 客户id
|
||||
/// </summary>
|
||||
public long ClientId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:收发货人代码
|
||||
/// </summary>
|
||||
public string CodeName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:收发货人简称
|
||||
/// </summary>
|
||||
public string ShortName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:类型 下拉选择(Shipper-1,Consinee-2,Notifypaty-3,Agent-4)
|
||||
/// </summary>
|
||||
public int ShipperType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否公共标识
|
||||
/// </summary>
|
||||
public bool IsPublic { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:详细信息
|
||||
/// </summary>
|
||||
public string ShortDetail { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:联系人
|
||||
/// </summary>
|
||||
public string ATTN { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:邮箱
|
||||
/// </summary>
|
||||
public string Email { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:电话
|
||||
/// </summary>
|
||||
public string Tel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:公司代码
|
||||
/// </summary>
|
||||
public string CompanyNo { get; set; }
|
||||
/// <summary>
|
||||
/// 状态 0 启用 1 禁用
|
||||
/// </summary>
|
||||
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string Note { get; set; } = "";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public DateTime CreateTime { get; set; }
|
||||
}
|
@ -0,0 +1,140 @@
|
||||
using DS.Module.Core;
|
||||
|
||||
namespace DS.WMS.Core.Info.Dtos;
|
||||
|
||||
/// <summary>
|
||||
/// 客户标识信息请求实体
|
||||
/// </summary>
|
||||
public class ClientTagReq
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键Id
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 客户Id
|
||||
/// </summary>
|
||||
public long? ClientId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否特批放单客户
|
||||
/// </summary>
|
||||
public bool? IsSpecialApproval { get; set; }= false;
|
||||
/// <summary>
|
||||
/// Desc:是否船公司
|
||||
/// </summary>
|
||||
public bool? IsCarrier { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否订舱公司
|
||||
/// </summary>
|
||||
public bool? IsBooking { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否场站
|
||||
/// </summary>
|
||||
public bool? IsYard { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否车队
|
||||
/// </summary>
|
||||
public bool? IsTruck { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否委托单位
|
||||
/// </summary>
|
||||
public bool? IsController { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否报关行
|
||||
/// </summary>
|
||||
public bool? IsCustom { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否代理(国外)
|
||||
/// </summary>
|
||||
public bool? IsAgent { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否代理(国内)
|
||||
/// </summary>
|
||||
public bool? IsAgentCn { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否快递公司
|
||||
/// </summary>
|
||||
public bool? IsExpress { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否航空公司
|
||||
/// </summary>
|
||||
public bool? IsAirLines { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否发货人
|
||||
/// </summary>
|
||||
public bool? IsShipper { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否收货人
|
||||
/// </summary>
|
||||
public bool? IsConsignee { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否通知人
|
||||
/// </summary>
|
||||
public bool? IsNotifyParty { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否仓库
|
||||
/// </summary>
|
||||
public bool? IsWareHouse { get; set; } = false;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否码头
|
||||
/// </summary>
|
||||
public bool? IsWharf { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否保险公司
|
||||
/// </summary>
|
||||
public bool? IsInsurer { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否租箱公司
|
||||
/// </summary>
|
||||
public bool? IsLeasing { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否贸易代理
|
||||
/// </summary>
|
||||
public bool? IsTradingAgency { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否其他
|
||||
/// </summary>
|
||||
public bool? IsOther { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:其他类型
|
||||
/// </summary>
|
||||
public string Others { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否船代
|
||||
/// </summary>
|
||||
public bool? IsShipAgency { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否经营单位
|
||||
/// </summary>
|
||||
public bool? IsEnterprise { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string Note { get; set; } = "";
|
||||
}
|
@ -0,0 +1,145 @@
|
||||
using DS.Module.Core;
|
||||
|
||||
namespace DS.WMS.Core.Info.Dtos;
|
||||
|
||||
/// <summary>
|
||||
/// 客户标识信息返回实体
|
||||
/// </summary>
|
||||
public class ClientTagRes
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键Id
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 客户Id
|
||||
/// </summary>
|
||||
public long ClientId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否特批放单客户
|
||||
/// </summary>
|
||||
public bool? IsSpecialApproval { get; set; }= false;
|
||||
/// <summary>
|
||||
/// Desc:是否船公司
|
||||
/// </summary>
|
||||
public bool? IsCarrier { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否订舱公司
|
||||
/// </summary>
|
||||
public bool? IsBooking { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否场站
|
||||
/// </summary>
|
||||
public bool? IsYard { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否车队
|
||||
/// </summary>
|
||||
public bool? IsTruck { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否委托单位
|
||||
/// </summary>
|
||||
public bool? IsController { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否报关行
|
||||
/// </summary>
|
||||
public bool? IsCustom { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否代理(国外)
|
||||
/// </summary>
|
||||
public bool? IsAgent { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否代理(国内)
|
||||
/// </summary>
|
||||
public bool? IsAgentCn { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否快递公司
|
||||
/// </summary>
|
||||
public bool? IsExpress { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否航空公司
|
||||
/// </summary>
|
||||
public bool? IsAirLines { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否发货人
|
||||
/// </summary>
|
||||
public bool? IsShipper { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否收货人
|
||||
/// </summary>
|
||||
public bool? IsConsignee { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否通知人
|
||||
/// </summary>
|
||||
public bool? IsNotifyParty { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否仓库
|
||||
/// </summary>
|
||||
public bool? IsWareHouse { get; set; } = false;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否码头
|
||||
/// </summary>
|
||||
public bool? IsWharf { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否保险公司
|
||||
/// </summary>
|
||||
public bool? IsInsurer { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否租箱公司
|
||||
/// </summary>
|
||||
public bool? IsLeasing { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否贸易代理
|
||||
/// </summary>
|
||||
public bool? IsTradingAgency { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否其他
|
||||
/// </summary>
|
||||
public bool? IsOther { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:其他类型
|
||||
/// </summary>
|
||||
public string Others { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否船代
|
||||
/// </summary>
|
||||
public bool? IsShipAgency { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否经营单位
|
||||
/// </summary>
|
||||
public bool? IsEnterprise { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string Note { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public DateTime CreateTime { get; set; }
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
using DS.Module.Core;
|
||||
using DS.Module.Core.Data;
|
||||
using SqlSugar;
|
||||
|
||||
namespace DS.WMS.Core.Info.Entity;
|
||||
|
||||
/// <summary>
|
||||
/// 往来单位-账期信息
|
||||
/// </summary>
|
||||
[SqlSugar.SugarTable("info_client_account_date")]
|
||||
public class InfoClientAccountDate : BaseOrgModel<long>
|
||||
{
|
||||
/// <summary>
|
||||
/// 往来单位id
|
||||
/// </summary>
|
||||
public long ClientId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Desc:业务来源Id
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "业务来源Id")]
|
||||
public long SourceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:合同生效日期
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "合同生效日期")]
|
||||
public DateTime? BeginDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:合同结束日期
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "合同失效日期")]
|
||||
public DateTime? EndDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:业务类型
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "业务类型",Length = 20)]
|
||||
public string BusinessType { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Desc:揽货人Id
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "揽货人Id")]
|
||||
public long SaleId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:账期类型
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "账期类型",Length = 20)]
|
||||
public string AccountType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:账期起算日
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "账期起算日",Length = 20)]
|
||||
public string AccountStartDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:间隔月份
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "间隔月份")]
|
||||
public byte? AccountMonth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:账期日期
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "账期日期")]
|
||||
public byte? AccountDays { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:信用额度
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "信用额度", Length = 18, DecimalDigits = 2, DefaultValue = "0")]
|
||||
public decimal? AllowAmount { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Desc:合同Id
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "合同Id")]
|
||||
public long ContractId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:运杂费比例
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "运杂费比例", Length = 18, DecimalDigits = 2, DefaultValue = "0")]
|
||||
public decimal? CommissionRate { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// 状态 0启用 1禁用
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "状态",DefaultValue = "0")]
|
||||
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
|
||||
}
|
@ -0,0 +1,103 @@
|
||||
using DS.Module.Core;
|
||||
using DS.Module.Core.Data;
|
||||
using SqlSugar;
|
||||
|
||||
namespace DS.WMS.Core.Info.Entity;
|
||||
|
||||
/// <summary>
|
||||
/// 往来单位-银行信息
|
||||
/// </summary>
|
||||
[SqlSugar.SugarTable("info_client_bank")]
|
||||
public class InfoClientBank : BaseOrgModel<long>
|
||||
{
|
||||
/// <summary>
|
||||
/// 往来单位id
|
||||
/// </summary>
|
||||
public long ClientId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Desc:代码
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "代码", Length = 20)]
|
||||
public string CodeName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:币别
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "币别", Length = 20)]
|
||||
public string Currency { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:银行名称
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "银行名称", Length = 100)]
|
||||
public string BankName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:银行账户
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "银行账户", Length = 40)]
|
||||
public string Account { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:银行地址
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "银行地址", Length = 50)]
|
||||
public string BankAddress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:财务软件代码
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "财务软件代码", Length = 50)]
|
||||
public string FinanceSoftCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:科目代码
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "科目代码", Length = 20)]
|
||||
public string SubjectCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:户头名称
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "户头名称", Length = 100)]
|
||||
public string AccountName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:代理银行名称
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "代理银行名称", Length = 20)]
|
||||
public string BankAgentName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:银行账号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "银行账号", Length = 20)]
|
||||
public string BankAccountNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc: 银行SWIFT
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "银行SWIFT", Length = 20)]
|
||||
public string SWIFT { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Desc: 国家Id
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "国家Id")]
|
||||
public long? CountryId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否开票默认账户
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否开票默认账户")]
|
||||
public bool? IsInvoiceDefault { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 状态 0启用 1禁用
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "状态",DefaultValue = "0")]
|
||||
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
|
||||
}
|
@ -0,0 +1,139 @@
|
||||
using DS.Module.Core;
|
||||
using DS.Module.Core.Data;
|
||||
using SqlSugar;
|
||||
|
||||
namespace DS.WMS.Core.Info.Entity;
|
||||
|
||||
/// <summary>
|
||||
/// 往来单位-联系人信息
|
||||
/// </summary>
|
||||
[SqlSugar.SugarTable("info_client_contact")]
|
||||
public class InfoClientContact : BaseOrgModel<long>
|
||||
{
|
||||
/// <summary>
|
||||
/// 往来单位id
|
||||
/// </summary>
|
||||
public long ClientId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Desc:联系人代码
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "联系人代码", Length = 6)]
|
||||
public string CodeName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:联系人简称
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "联系人简称", Length = 20)]
|
||||
public string ShortName { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Desc:职务
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "职务", Length = 50)]
|
||||
public string Job { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:通讯地址
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "通讯地址", Length = 100)]
|
||||
public string Address { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:邮箱
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "邮箱", Length = 50)]
|
||||
public string Email { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:手机
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "手机", Length = 50)]
|
||||
public string Mobile { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:电话
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "电话", Length = 50)]
|
||||
public string Tel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:传真
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "传真", Length = 50)]
|
||||
public string Fax { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:QQ
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "QQ", Length = 50)]
|
||||
public string QQ { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否为操作
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否为操作")]
|
||||
public bool? IsOperator { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否为财务
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否为财务")]
|
||||
public bool? IsFinancialStaff { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否为销售
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否为销售")]
|
||||
public bool? IsSaleMan { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否为其他
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否为其他")]
|
||||
public bool? IsOther { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否保险联系人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否保险联系人")]
|
||||
public bool? IsInsurance { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否对账联系人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否对账联系人")]
|
||||
public bool? IsCheckAccount { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 提醒日期1
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "提醒日期1")]
|
||||
public DateTime Anniversary1 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 提醒日期2
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "提醒日期2")]
|
||||
public DateTime Anniversary2 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 提醒备注1
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "提醒备注1", Length = 200)]
|
||||
public string AnniversaryNote1 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 提醒备注2
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "提醒备注2", Length = 200)]
|
||||
public string AnniversaryNote2 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态 0启用 1禁用
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "状态",DefaultValue = "0")]
|
||||
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
using DS.Module.Core;
|
||||
using DS.Module.Core.Data;
|
||||
using SqlSugar;
|
||||
|
||||
namespace DS.WMS.Core.Info.Entity;
|
||||
|
||||
/// <summary>
|
||||
/// 往来单位-合同信息
|
||||
/// </summary>
|
||||
[SqlSugar.SugarTable("info_client_contract")]
|
||||
public class InfoClientContract : BaseOrgModel<long>
|
||||
{
|
||||
/// <summary>
|
||||
/// 往来单位id
|
||||
/// </summary>
|
||||
public long ClientId { get; set; }
|
||||
/// <summary>
|
||||
/// Desc:合同号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "合同号", Length = 100)]
|
||||
public string ContractNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:签订日期
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "签订日期")]
|
||||
public DateTime SignDate { get; set; }
|
||||
/// <summary>
|
||||
/// Desc:起始日期
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "起始日期")]
|
||||
public DateTime StartDate { get; set; }
|
||||
/// <summary>
|
||||
/// Desc:截止日期
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "截止日期")]
|
||||
public DateTime EndDate { get; set; }
|
||||
/// <summary>
|
||||
/// Desc:负责人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "负责人", Length = 20)]
|
||||
public string Chief { get; set; }
|
||||
/// <summary>
|
||||
/// Desc:签订部门Id
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "签订部门Id")]
|
||||
public long DeptId { get; set; }
|
||||
/// <summary>
|
||||
/// Desc:合同名称
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "合同名称", Length = 100)]
|
||||
public string ContractName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态 0启用 1禁用
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "状态",DefaultValue = "0")]
|
||||
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
|
||||
}
|
@ -0,0 +1,83 @@
|
||||
using DS.Module.Core;
|
||||
using DS.Module.Core.Data;
|
||||
using SqlSugar;
|
||||
|
||||
namespace DS.WMS.Core.Info.Entity;
|
||||
|
||||
/// <summary>
|
||||
/// 往来单位-收发货人信息
|
||||
/// </summary>
|
||||
[SqlSugar.SugarTable("info_client_contact")]
|
||||
public class InfoClientShipper : BaseOrgModel<long>
|
||||
{
|
||||
/// <summary>
|
||||
/// 往来单位id
|
||||
/// </summary>
|
||||
public long ClientId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Desc:收发货人代码
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "收发货人代码", Length = 20)]
|
||||
public string CodeName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:收发货人简称
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "收发货人简称", Length = 20)]
|
||||
public string ShortName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:类型 下拉选择(Shipper-1,Consinee-2,Notifypaty-3,Agent-4)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "类型 下拉选择(Shipper-1,Consinee-2,Notifypaty-3,Agent-4)")]
|
||||
public int ShipperType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否公共标识
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否公共标识", DefaultValue = "0")]
|
||||
public bool IsPublic { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:详细信息
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "详细信息", Length = 600)]
|
||||
public string ShortDetail { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:联系人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "联系人", Length = 25)]
|
||||
public string ATTN { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:邮箱
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "邮箱", Length = 50)]
|
||||
public string Email { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:电话
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "电话", Length = 50)]
|
||||
public string Tel { get; set; }
|
||||
|
||||
// /// <summary>
|
||||
// /// 国家Id
|
||||
// /// </summary>
|
||||
// [SugarColumn(ColumnDescription = "国家Id")]
|
||||
// public long CountryId { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// Desc:公司代码
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "公司代码", Length = 50)]
|
||||
public string CompanyNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态 0启用 1禁用
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "状态",DefaultValue = "0")]
|
||||
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
|
||||
}
|
@ -0,0 +1,153 @@
|
||||
using DS.Module.Core.Data;
|
||||
using SqlSugar;
|
||||
|
||||
namespace DS.WMS.Core.Info.Entity;
|
||||
|
||||
/// <summary>
|
||||
/// 往来单位标识
|
||||
/// </summary>
|
||||
[SqlSugar.SugarTable("info_client_tag")]
|
||||
public class InfoClientTag : BaseOrgModel<long>
|
||||
{
|
||||
/// <summary>
|
||||
/// 往来单位id
|
||||
/// </summary>
|
||||
public long ClientId { get; set; }
|
||||
/// <summary>
|
||||
/// Desc:是否特批放单客户
|
||||
/// </summary>
|
||||
public bool? IsSpecialApproval { get; set; }
|
||||
/// <summary>
|
||||
/// Desc:是否船公司
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否船公司")]
|
||||
public bool? IsCarrier { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否订舱公司
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否订舱公司")]
|
||||
public bool? IsBooking { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否场站
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否场站")]
|
||||
public bool? IsYard { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否车队
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否车队")]
|
||||
public bool? IsTruck { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否委托单位
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否委托单位")]
|
||||
public bool? IsController { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否报关行
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否报关行")]
|
||||
public bool? IsCustom { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否代理(国外)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否代理(国外)")]
|
||||
public bool? IsAgent { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否代理(国内)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否代理(国内)")]
|
||||
public bool? IsAgentCn { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否快递公司
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否快递公司")]
|
||||
public bool? IsExpress { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否航空公司
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否航空公司")]
|
||||
public bool? IsAirLines { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否发货人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否发货人")]
|
||||
public bool? IsShipper { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否收货人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否收货人")]
|
||||
public bool? IsConsignee { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否通知人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否通知人")]
|
||||
public bool? IsNotifyParty { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否仓库
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否仓库")]
|
||||
public bool? IsWareHouse { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否码头
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否码头")]
|
||||
public bool? IsWharf { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否保险公司
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否保险公司")]
|
||||
public bool? IsInsurer { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否租箱公司
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否租箱公司")]
|
||||
public bool? IsLeasing { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否贸易代理
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否贸易代理")]
|
||||
public bool? IsTradingAgency { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否其他
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否其他")]
|
||||
public bool? IsOther { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:其他类型
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "其他类型", Length = 100)]
|
||||
public string Others { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否船代
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否船代", DefaultValue = "0")]
|
||||
public bool? IsShipAgency { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否经营单位
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否经营单位", DefaultValue = "0")]
|
||||
public bool? IsEnterprise { get; set; } = false;
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
using DS.Module.Core;
|
||||
using DS.WMS.Core.Info.Dtos;
|
||||
using DS.WMS.Core.System.Dtos;
|
||||
|
||||
namespace DS.WMS.Core.Info.Interface;
|
||||
|
||||
public interface IClientAccountDateService
|
||||
{
|
||||
/// <summary>
|
||||
/// 列表
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
DataResult<List<ClientAccountDateRes>> GetListByPage(PageRequest request);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 编辑
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
DataResult EditClientAccountDate(ClientAccountDateReq model);
|
||||
|
||||
/// <summary>
|
||||
/// 获取详情
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
DataResult<ClientAccountDateRes> GetClientAccountDateInfo(string id);
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
using DS.Module.Core;
|
||||
using DS.WMS.Core.Info.Dtos;
|
||||
using DS.WMS.Core.System.Dtos;
|
||||
|
||||
namespace DS.WMS.Core.Info.Interface;
|
||||
|
||||
public interface IClientBankService
|
||||
{
|
||||
/// <summary>
|
||||
/// 列表
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
DataResult<List<ClientBankRes>> GetListByPage(PageRequest request);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 编辑
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
DataResult EditClientBank(ClientBankReq model);
|
||||
|
||||
/// <summary>
|
||||
/// 获取详情
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
DataResult<ClientBankRes> GetClientBankInfo(string id);
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
using DS.Module.Core;
|
||||
using DS.WMS.Core.Info.Dtos;
|
||||
using DS.WMS.Core.System.Dtos;
|
||||
|
||||
namespace DS.WMS.Core.Info.Interface;
|
||||
|
||||
public interface IClientContactService
|
||||
{
|
||||
/// <summary>
|
||||
/// 列表
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
DataResult<List<ClientContactRes>> GetListByPage(PageRequest request);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 编辑
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
DataResult EditClientContact(ClientContactReq model);
|
||||
|
||||
/// <summary>
|
||||
/// 获取详情
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
DataResult<ClientContactRes> GetClientContactInfo(string id);
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
using DS.Module.Core;
|
||||
using DS.WMS.Core.Info.Dtos;
|
||||
using DS.WMS.Core.System.Dtos;
|
||||
|
||||
namespace DS.WMS.Core.Info.Interface;
|
||||
|
||||
public interface IClientContractService
|
||||
{
|
||||
/// <summary>
|
||||
/// 列表
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
DataResult<List<ClientContractRes>> GetListByPage(PageRequest request);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 编辑
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
DataResult EditClientContract(ClientContractReq model);
|
||||
|
||||
/// <summary>
|
||||
/// 获取详情
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
DataResult<ClientContractRes> GetClientContractInfo(string id);
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
using DS.Module.Core;
|
||||
using DS.WMS.Core.Info.Dtos;
|
||||
using DS.WMS.Core.System.Dtos;
|
||||
|
||||
namespace DS.WMS.Core.Info.Interface;
|
||||
|
||||
public interface IClientInfoService
|
||||
{
|
||||
/// <summary>
|
||||
/// 列表
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
DataResult<List<ClientInfoRes>> GetListByPage(PageRequest request);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 编辑
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
DataResult EditClientInfo(ClientInfoReq model);
|
||||
|
||||
/// <summary>
|
||||
/// 获取详情
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
DataResult<ClientInfoRes> GetClientInfo(string id);
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
using DS.Module.Core;
|
||||
using DS.WMS.Core.Info.Dtos;
|
||||
using DS.WMS.Core.System.Dtos;
|
||||
|
||||
namespace DS.WMS.Core.Info.Interface;
|
||||
|
||||
public interface IClientShipperService
|
||||
{
|
||||
/// <summary>
|
||||
/// 列表
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
DataResult<List<ClientShipperRes>> GetListByPage(PageRequest request);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 编辑
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
DataResult EditClientShipper(ClientShipperReq model);
|
||||
|
||||
/// <summary>
|
||||
/// 获取详情
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
DataResult<ClientShipperRes> GetClientShipperInfo(string id);
|
||||
}
|
@ -0,0 +1,100 @@
|
||||
using DS.Module.Core;
|
||||
using DS.Module.Core.Extensions;
|
||||
using DS.Module.SqlSugar;
|
||||
using DS.Module.UserModule;
|
||||
using DS.WMS.Core.Info.Dtos;
|
||||
using DS.WMS.Core.Info.Entity;
|
||||
using DS.WMS.Core.Info.Interface;
|
||||
using DS.WMS.Core.System.Entity;
|
||||
using Mapster;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using SqlSugar;
|
||||
|
||||
namespace DS.WMS.Core.Info.Method;
|
||||
|
||||
public class ClientAccountDateService : IClientAccountDateService
|
||||
{
|
||||
private readonly IServiceProvider _serviceProvider;
|
||||
private readonly ISqlSugarClient db;
|
||||
private readonly IUser user;
|
||||
private readonly ISaasDbService saasService;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="serviceProvider"></param>
|
||||
public ClientAccountDateService(IServiceProvider serviceProvider)
|
||||
{
|
||||
_serviceProvider = serviceProvider;
|
||||
db = _serviceProvider.GetRequiredService<ISqlSugarClient>();
|
||||
user = _serviceProvider.GetRequiredService<IUser>();
|
||||
saasService = _serviceProvider.GetRequiredService<ISaasDbService>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 列表
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
public DataResult<List<ClientAccountDateRes>> GetListByPage(PageRequest request)
|
||||
{
|
||||
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
||||
//序列化查询条件
|
||||
var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
|
||||
var data = tenantDb.Queryable<InfoClientAccountDate>()
|
||||
.Where(whereList)
|
||||
.Select<ClientAccountDateRes>().ToQueryPage(request.PageCondition);
|
||||
return data;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 编辑
|
||||
/// </summary>
|
||||
/// <param name="req"></param>
|
||||
/// <returns></returns>
|
||||
public DataResult EditClientAccountDate(ClientAccountDateReq req)
|
||||
{
|
||||
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
||||
if (req.Id == 0)
|
||||
{
|
||||
if (tenantDb.Queryable<InfoClientAccountDate>().Where(x => x.AccountType == req.AccountType &&
|
||||
x.AccountType == req.AccountType &&
|
||||
x.SaleId == req.SaleId &&
|
||||
x.BeginDate == req.BeginDate &&
|
||||
x.EndDate == req.EndDate).Any())
|
||||
{
|
||||
return DataResult.Failed("客户账期信息已存在!", MultiLanguageConst.ClientAccountDateExist);
|
||||
}
|
||||
|
||||
var data = req.Adapt<InfoClientAccountDate>();
|
||||
|
||||
var entity = tenantDb.Insertable(data).ExecuteReturnEntity();
|
||||
|
||||
return DataResult.Successed("添加成功!", entity.Id, MultiLanguageConst.DataCreateSuccess);
|
||||
}
|
||||
else
|
||||
{
|
||||
var info = tenantDb.Queryable<InfoClientAccountDate>().Where(x => x.Id == req.Id).First();
|
||||
|
||||
info = req.Adapt(info);
|
||||
|
||||
tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand();
|
||||
return DataResult.Successed("更新成功!", MultiLanguageConst.DataUpdateSuccess);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 详情
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
public DataResult<ClientAccountDateRes> GetClientAccountDateInfo(string id)
|
||||
{
|
||||
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
||||
var data = tenantDb.Queryable<InfoClientAccountDate>()
|
||||
.Where(a => a.Id == long.Parse(id))
|
||||
.Select<ClientAccountDateRes>()
|
||||
.First();
|
||||
return DataResult<ClientAccountDateRes>.Success(data, MultiLanguageConst.DataQuerySuccess);
|
||||
}
|
||||
}
|
@ -0,0 +1,94 @@
|
||||
using DS.Module.Core;
|
||||
using DS.Module.Core.Extensions;
|
||||
using DS.Module.SqlSugar;
|
||||
using DS.Module.UserModule;
|
||||
using DS.WMS.Core.Info.Dtos;
|
||||
using DS.WMS.Core.Info.Entity;
|
||||
using DS.WMS.Core.Info.Interface;
|
||||
using DS.WMS.Core.System.Entity;
|
||||
using Mapster;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using SqlSugar;
|
||||
|
||||
namespace DS.WMS.Core.Info.Method;
|
||||
|
||||
public class ClientBankService : IClientBankService
|
||||
{
|
||||
private readonly IServiceProvider _serviceProvider;
|
||||
private readonly ISqlSugarClient db;
|
||||
private readonly IUser user;
|
||||
private readonly ISaasDbService saasService;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="serviceProvider"></param>
|
||||
public ClientBankService(IServiceProvider serviceProvider)
|
||||
{
|
||||
_serviceProvider = serviceProvider;
|
||||
db = _serviceProvider.GetRequiredService<ISqlSugarClient>();
|
||||
user = _serviceProvider.GetRequiredService<IUser>();
|
||||
saasService = _serviceProvider.GetRequiredService<ISaasDbService>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 列表
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
public DataResult<List<ClientBankRes>> GetListByPage(PageRequest request)
|
||||
{
|
||||
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
||||
//序列化查询条件
|
||||
var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
|
||||
var data = tenantDb.Queryable<InfoClientBank>()
|
||||
.Where(whereList)
|
||||
.Select<ClientBankRes>().ToQueryPage(request.PageCondition);
|
||||
return data;
|
||||
}
|
||||
/// <summary>
|
||||
/// 编辑
|
||||
/// </summary>
|
||||
/// <param name="req"></param>
|
||||
/// <returns></returns>
|
||||
public DataResult EditClientBank(ClientBankReq req)
|
||||
{
|
||||
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
||||
if (req.Id == 0)
|
||||
{
|
||||
|
||||
if (tenantDb.Queryable<InfoClientBank>().Where(x=>x.CodeName == req.CodeName).Any())
|
||||
{
|
||||
return DataResult.Failed("客户银行信息已存在!",MultiLanguageConst.ClientBankExist);
|
||||
}
|
||||
|
||||
var data = req.Adapt<InfoClientBank>();
|
||||
|
||||
var entity = tenantDb.Insertable(data).ExecuteReturnEntity();
|
||||
|
||||
return DataResult.Successed("添加成功!", entity.Id,MultiLanguageConst.DataCreateSuccess);
|
||||
}
|
||||
else
|
||||
{
|
||||
var info = tenantDb.Queryable<InfoClientBank>().Where(x => x.Id == req.Id).First();
|
||||
|
||||
info = req.Adapt(info);
|
||||
|
||||
tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand();
|
||||
return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 详情
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
public DataResult<ClientBankRes> GetClientBankInfo(string id)
|
||||
{
|
||||
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
||||
var data = tenantDb.Queryable<InfoClientBank>()
|
||||
.Where(a => a.Id == long.Parse(id))
|
||||
.Select<ClientBankRes>()
|
||||
.First();
|
||||
return DataResult<ClientBankRes>.Success(data,MultiLanguageConst.DataQuerySuccess);
|
||||
}
|
||||
}
|
@ -0,0 +1,94 @@
|
||||
using DS.Module.Core;
|
||||
using DS.Module.Core.Extensions;
|
||||
using DS.Module.SqlSugar;
|
||||
using DS.Module.UserModule;
|
||||
using DS.WMS.Core.Info.Dtos;
|
||||
using DS.WMS.Core.Info.Entity;
|
||||
using DS.WMS.Core.Info.Interface;
|
||||
using DS.WMS.Core.System.Entity;
|
||||
using Mapster;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using SqlSugar;
|
||||
|
||||
namespace DS.WMS.Core.Info.Method;
|
||||
|
||||
public class ClientContactService : IClientContactService
|
||||
{
|
||||
private readonly IServiceProvider _serviceProvider;
|
||||
private readonly ISqlSugarClient db;
|
||||
private readonly IUser user;
|
||||
private readonly ISaasDbService saasService;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="serviceProvider"></param>
|
||||
public ClientContactService(IServiceProvider serviceProvider)
|
||||
{
|
||||
_serviceProvider = serviceProvider;
|
||||
db = _serviceProvider.GetRequiredService<ISqlSugarClient>();
|
||||
user = _serviceProvider.GetRequiredService<IUser>();
|
||||
saasService = _serviceProvider.GetRequiredService<ISaasDbService>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 列表
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
public DataResult<List<ClientContactRes>> GetListByPage(PageRequest request)
|
||||
{
|
||||
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
||||
//序列化查询条件
|
||||
var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
|
||||
var data = tenantDb.Queryable<InfoClientContact>()
|
||||
.Where(whereList)
|
||||
.Select<ClientContactRes>().ToQueryPage(request.PageCondition);
|
||||
return data;
|
||||
}
|
||||
/// <summary>
|
||||
/// 编辑
|
||||
/// </summary>
|
||||
/// <param name="req"></param>
|
||||
/// <returns></returns>
|
||||
public DataResult EditClientContact(ClientContactReq req)
|
||||
{
|
||||
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
||||
if (req.Id == 0)
|
||||
{
|
||||
|
||||
if (tenantDb.Queryable<InfoClientContact>().Where(x=>x.CodeName == req.CodeName).Any())
|
||||
{
|
||||
return DataResult.Failed("客户联系人信息已存在!",MultiLanguageConst.ClientContactExist);
|
||||
}
|
||||
|
||||
var data = req.Adapt<InfoClientContact>();
|
||||
|
||||
var entity = tenantDb.Insertable(data).ExecuteReturnEntity();
|
||||
|
||||
return DataResult.Successed("添加成功!", entity.Id,MultiLanguageConst.DataCreateSuccess);
|
||||
}
|
||||
else
|
||||
{
|
||||
var info = tenantDb.Queryable<InfoClientContact>().Where(x => x.Id == req.Id).First();
|
||||
|
||||
info = req.Adapt(info);
|
||||
|
||||
tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand();
|
||||
return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 详情
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
public DataResult<ClientContactRes> GetClientContactInfo(string id)
|
||||
{
|
||||
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
||||
var data = tenantDb.Queryable<InfoClientContact>()
|
||||
.Where(a => a.Id == long.Parse(id))
|
||||
.Select<ClientContactRes>()
|
||||
.First();
|
||||
return DataResult<ClientContactRes>.Success(data,MultiLanguageConst.DataQuerySuccess);
|
||||
}
|
||||
}
|
@ -0,0 +1,94 @@
|
||||
using DS.Module.Core;
|
||||
using DS.Module.Core.Extensions;
|
||||
using DS.Module.SqlSugar;
|
||||
using DS.Module.UserModule;
|
||||
using DS.WMS.Core.Info.Dtos;
|
||||
using DS.WMS.Core.Info.Entity;
|
||||
using DS.WMS.Core.Info.Interface;
|
||||
using DS.WMS.Core.System.Entity;
|
||||
using Mapster;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using SqlSugar;
|
||||
|
||||
namespace DS.WMS.Core.Info.Method;
|
||||
|
||||
public class ClientContractService : IClientContractService
|
||||
{
|
||||
private readonly IServiceProvider _serviceProvider;
|
||||
private readonly ISqlSugarClient db;
|
||||
private readonly IUser user;
|
||||
private readonly ISaasDbService saasService;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="serviceProvider"></param>
|
||||
public ClientContractService(IServiceProvider serviceProvider)
|
||||
{
|
||||
_serviceProvider = serviceProvider;
|
||||
db = _serviceProvider.GetRequiredService<ISqlSugarClient>();
|
||||
user = _serviceProvider.GetRequiredService<IUser>();
|
||||
saasService = _serviceProvider.GetRequiredService<ISaasDbService>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 列表
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
public DataResult<List<ClientContractRes>> GetListByPage(PageRequest request)
|
||||
{
|
||||
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
||||
//序列化查询条件
|
||||
var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
|
||||
var data = tenantDb.Queryable<InfoClientContract>()
|
||||
.Where(whereList)
|
||||
.Select<ClientContractRes>().ToQueryPage(request.PageCondition);
|
||||
return data;
|
||||
}
|
||||
/// <summary>
|
||||
/// 编辑
|
||||
/// </summary>
|
||||
/// <param name="req"></param>
|
||||
/// <returns></returns>
|
||||
public DataResult EditClientContract(ClientContractReq req)
|
||||
{
|
||||
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
||||
if (req.Id == 0)
|
||||
{
|
||||
|
||||
if (tenantDb.Queryable<InfoClientContract>().Where(x=>x.ContractNo == req.ContractNo).Any())
|
||||
{
|
||||
return DataResult.Failed("客户合同信息已存在!",MultiLanguageConst.ClientContractExist);
|
||||
}
|
||||
|
||||
var data = req.Adapt<InfoClientContract>();
|
||||
|
||||
var entity = tenantDb.Insertable(data).ExecuteReturnEntity();
|
||||
|
||||
return DataResult.Successed("添加成功!", entity.Id,MultiLanguageConst.DataCreateSuccess);
|
||||
}
|
||||
else
|
||||
{
|
||||
var info = tenantDb.Queryable<InfoClientContract>().Where(x => x.Id == req.Id).First();
|
||||
|
||||
info = req.Adapt(info);
|
||||
|
||||
tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand();
|
||||
return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 详情
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
public DataResult<ClientContractRes> GetClientContractInfo(string id)
|
||||
{
|
||||
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
||||
var data = tenantDb.Queryable<InfoClientContract>()
|
||||
.Where(a => a.Id == long.Parse(id))
|
||||
.Select<ClientContractRes>()
|
||||
.First();
|
||||
return DataResult<ClientContractRes>.Success(data,MultiLanguageConst.DataQuerySuccess);
|
||||
}
|
||||
}
|
@ -0,0 +1,106 @@
|
||||
using DS.Module.Core;
|
||||
using DS.Module.Core.Extensions;
|
||||
using DS.Module.SqlSugar;
|
||||
using DS.Module.UserModule;
|
||||
using DS.WMS.Core.Info.Dtos;
|
||||
using DS.WMS.Core.Info.Entity;
|
||||
using DS.WMS.Core.Info.Interface;
|
||||
using DS.WMS.Core.System.Entity;
|
||||
using Mapster;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using SqlSugar;
|
||||
|
||||
namespace DS.WMS.Core.Info.Method;
|
||||
|
||||
public class ClientInfoService : IClientInfoService
|
||||
{
|
||||
private readonly IServiceProvider _serviceProvider;
|
||||
private readonly ISqlSugarClient db;
|
||||
private readonly IUser user;
|
||||
private readonly ISaasDbService saasService;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="serviceProvider"></param>
|
||||
public ClientInfoService(IServiceProvider serviceProvider)
|
||||
{
|
||||
_serviceProvider = serviceProvider;
|
||||
db = _serviceProvider.GetRequiredService<ISqlSugarClient>();
|
||||
user = _serviceProvider.GetRequiredService<IUser>();
|
||||
saasService = _serviceProvider.GetRequiredService<ISaasDbService>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 列表
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
public DataResult<List<ClientInfoRes>> GetListByPage(PageRequest request)
|
||||
{
|
||||
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
||||
//序列化查询条件
|
||||
var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
|
||||
var data = tenantDb.Queryable<InfoClient>()
|
||||
.Where(whereList)
|
||||
.Select<ClientInfoRes>().ToQueryPage(request.PageCondition);
|
||||
return data;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 编辑
|
||||
/// </summary>
|
||||
/// <param name="req"></param>
|
||||
/// <returns></returns>
|
||||
public DataResult EditClientInfo(ClientInfoReq req)
|
||||
{
|
||||
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
||||
if (req.Id == 0)
|
||||
{
|
||||
if (tenantDb.Queryable<InfoClient>().Where(x => x.CodeName == req.CodeName).Any())
|
||||
{
|
||||
return DataResult.Failed("客户信息已存在!", MultiLanguageConst.ClientInfoExist);
|
||||
}
|
||||
|
||||
var data = req.Adapt<InfoClient>();
|
||||
var tag = req.ClientTag.Adapt<InfoClientTag>();
|
||||
|
||||
var entity = tenantDb.Insertable(data).ExecuteReturnEntity();
|
||||
tag.ClientId = entity.Id;
|
||||
tenantDb.Insertable(tag).ExecuteCommand();
|
||||
return DataResult.Successed("添加成功!", entity.Id, MultiLanguageConst.DataCreateSuccess);
|
||||
}
|
||||
else
|
||||
{
|
||||
var info = tenantDb.Queryable<InfoClient>().Where(x => x.Id == req.Id).First();
|
||||
var tag = tenantDb.Queryable<InfoClientTag>().Where(x => x.Id == req.ClientTag.Id).First();
|
||||
|
||||
info = req.Adapt(info);
|
||||
tag = req.ClientTag.Adapt(tag);
|
||||
|
||||
tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand();
|
||||
tenantDb.Updateable(tag).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand();
|
||||
return DataResult.Successed("更新成功!", MultiLanguageConst.DataUpdateSuccess);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 详情
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
public DataResult<ClientInfoRes> GetClientInfo(string id)
|
||||
{
|
||||
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
||||
var data = tenantDb.Queryable<InfoClient>()
|
||||
.Where(a => a.Id == long.Parse(id))
|
||||
// .Select<ClientInfoRes>()
|
||||
.Select(x => new ClientInfoRes
|
||||
{
|
||||
ClientTag = tenantDb.Queryable<InfoClientTag>().Select<ClientTagRes>()
|
||||
.First(a => a.ClientId == long.Parse(id))
|
||||
})
|
||||
.First();
|
||||
return DataResult<ClientInfoRes>.Success(data, MultiLanguageConst.DataQuerySuccess);
|
||||
}
|
||||
}
|
@ -0,0 +1,94 @@
|
||||
using DS.Module.Core;
|
||||
using DS.Module.Core.Extensions;
|
||||
using DS.Module.SqlSugar;
|
||||
using DS.Module.UserModule;
|
||||
using DS.WMS.Core.Info.Dtos;
|
||||
using DS.WMS.Core.Info.Entity;
|
||||
using DS.WMS.Core.Info.Interface;
|
||||
using DS.WMS.Core.System.Entity;
|
||||
using Mapster;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using SqlSugar;
|
||||
|
||||
namespace DS.WMS.Core.Info.Method;
|
||||
|
||||
public class ClientShipperService : IClientShipperService
|
||||
{
|
||||
private readonly IServiceProvider _serviceProvider;
|
||||
private readonly ISqlSugarClient db;
|
||||
private readonly IUser user;
|
||||
private readonly ISaasDbService saasService;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="serviceProvider"></param>
|
||||
public ClientShipperService(IServiceProvider serviceProvider)
|
||||
{
|
||||
_serviceProvider = serviceProvider;
|
||||
db = _serviceProvider.GetRequiredService<ISqlSugarClient>();
|
||||
user = _serviceProvider.GetRequiredService<IUser>();
|
||||
saasService = _serviceProvider.GetRequiredService<ISaasDbService>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 列表
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
public DataResult<List<ClientShipperRes>> GetListByPage(PageRequest request)
|
||||
{
|
||||
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
||||
//序列化查询条件
|
||||
var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
|
||||
var data = tenantDb.Queryable<InfoClientShipper>()
|
||||
.Where(whereList)
|
||||
.Select<ClientShipperRes>().ToQueryPage(request.PageCondition);
|
||||
return data;
|
||||
}
|
||||
/// <summary>
|
||||
/// 编辑
|
||||
/// </summary>
|
||||
/// <param name="req"></param>
|
||||
/// <returns></returns>
|
||||
public DataResult EditClientShipper(ClientShipperReq req)
|
||||
{
|
||||
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
||||
if (req.Id == 0)
|
||||
{
|
||||
|
||||
if (tenantDb.Queryable<InfoClientShipper>().Where(x=>x.CodeName == req.CodeName).Any())
|
||||
{
|
||||
return DataResult.Failed("客户收发货人信息已存在!",MultiLanguageConst.ClientShipperExist);
|
||||
}
|
||||
|
||||
var data = req.Adapt<InfoClientShipper>();
|
||||
|
||||
var entity = tenantDb.Insertable(data).ExecuteReturnEntity();
|
||||
|
||||
return DataResult.Successed("添加成功!", entity.Id,MultiLanguageConst.DataCreateSuccess);
|
||||
}
|
||||
else
|
||||
{
|
||||
var info = tenantDb.Queryable<InfoClientShipper>().Where(x => x.Id == req.Id).First();
|
||||
|
||||
info = req.Adapt(info);
|
||||
|
||||
tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).EnableDiffLogEvent().ExecuteCommand();
|
||||
return DataResult.Successed("更新成功!",MultiLanguageConst.DataUpdateSuccess);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 详情
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
public DataResult<ClientShipperRes> GetClientShipperInfo(string id)
|
||||
{
|
||||
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
|
||||
var data = tenantDb.Queryable<InfoClientShipper>()
|
||||
.Where(a => a.Id == long.Parse(id))
|
||||
.Select<ClientShipperRes>()
|
||||
.First();
|
||||
return DataResult<ClientShipperRes>.Success(data,MultiLanguageConst.DataQuerySuccess);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue