费用相关接口

master
ZR20090193-陈敬勇 7 months ago
parent 9bec2a4571
commit 6fd22f2500

@ -311,4 +311,21 @@ public static class MultiLanguageConst
[Description("表单复制模板不存在")]
public const string FormCopyNotExist = "FormCopy_Not_Exist";
#endregion
#region 费用相关
[Description("币别信息已存在")]
public const string FeeCurrencyExist = "Fee_Currency_Exist";
[Description("汇率设置已存在")]
public const string FeeCurrencyExchangeExist = "Fee_Currency_Exchange_Exist";
[Description("费用模板已存在")]
public const string FeeTemplateExist = "Fee_Template_Exist";
[Description("费用模板明细已存在")]
public const string FeeTemplateDetailExist = "Fee_Template_Detail_Exist";
[Description("往来单位固定费用已存在")]
public const string FeeCustTemplateDetailExist = "Fee_Cust_Template_Detail_Exist";
[Description("费用代码已存在")]
public const string FeeCodeExist = "Fee_Code_Exist";
[Description("费用记录已存在")]
public const string FeeRecordExist = "Fee_Record_Exist";
#endregion
}

@ -28,8 +28,4 @@
<PackageReference Include="UAParser" Version="3.1.47" />
</ItemGroup>
<ItemGroup>
<Folder Include="Middlewares\" />
</ItemGroup>
</Project>

@ -0,0 +1,51 @@
using DS.Module.Core.Extensions;
using Microsoft.AspNetCore.Builder;
namespace DS.Module.Core.Middlewares
{
/// <summary>
/// 封装通用中间件
/// </summary>
public static class UseCommonMiddlewares
{
///<summary>
///为了让主Progarm.cs文件更加简洁我们将一些中间件的配置放到这里
/// </summary>
/// <param name="app"></param>
/// <returns></returns>
public static WebApplication UsePublicMiddlewares(this WebApplication app)
{
var documentName = AppSetting.app(new string[] { "SwaggerDoc", "ContactName" });
//app
// .UseSwagger(c => { c.RouteTemplate = "{documentName}/swagger.json"; })
// .UseSwaggerUI(c =>
// {
// c.SwaggerEndpoint("/" + documentName + "/swagger.json",
// AppSetting.app(new string[] { "SwaggerDoc", "ContactName" }));
// c.DocExpansion(DocExpansion.None);//DocExpansion设置为None可折叠所有方法
// c.DefaultModelExpandDepth(-1);//-1 可不显示Models
// });
//跨域
var policyName = AppSetting.app(new string[] { "Cors", "PolicyName" });
if (!policyName.IsNullOrEmpty())
{
app.UseCors(policyName); //添加跨域中间件
}
app.UseRouting();
app.UseStaticFiles();
// //操作日志中间件
// app.UseMiddleware<OperationLogMiddleware>();
// 先开启认证
app.UseAuthentication();
// 然后是授权中间件
app.UseAuthorization();
app.UseEndpoints(endpoints => { endpoints.MapControllers(); });
return app;
}
}
}

@ -38,6 +38,7 @@
<PackageReference Include="SqlSugarCore" Version="5.1.4.136" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
<PackageReference Include="Swashbuckle.AspNetCore.Filters" Version="8.0.1" />
<PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="6.5.0" />
<PackageReference Include="System.ComponentModel" Version="4.3.0" />
<PackageReference Include="UAParser" Version="3.1.47" />
</ItemGroup>

@ -17,9 +17,6 @@
<DocumentationFile>D:\Code\PublishCopy\ds8-mainapi\Data.xml</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<Folder Include="Fee\Dtos\" />
<Folder Include="Fee\Interface\" />
<Folder Include="Fee\Method\" />
<Folder Include="Template\Dtos\" />
<Folder Include="Template\Entity\" />
<Folder Include="Template\Interface\" />

@ -0,0 +1,135 @@
using DS.Module.Core;
using FluentValidation;
namespace DS.WMS.Core.Fee.Dtos;
/// <summary>
/// 费用代码请求实体
/// </summary>
public class FeeCodeReq
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 费用代码 录入费用是作为检索
/// </summary>
public string Code { get; set; }
/// <summary>
/// 费用名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 费用英文名称
/// </summary>
public string EnName { get; set; }
/// <summary>
/// 币别Id
/// </summary>
public long CurrencyId { get; set; }
/// <summary>
/// 默认计费标准
/// </summary>
public int DefaultUnit { get; set; }
/// <summary>
/// 默认收费客户类型
/// </summary>
public int DefaultDebit { get; set; }
/// <summary>
/// 默认付费客户类型
/// </summary>
public int DefaultCredit { get; set; }
/// <summary>
/// 海运 海运相关模块使用
/// </summary>
public bool? IsSea { get; set; } = false;
/// <summary>
/// 空运 空运相关模块使用
/// </summary>
public bool? IsAir { get; set; } = false;
/// <summary>
/// 陆运 陆运相关模块使用
/// </summary>
public bool? IsTrucking { get; set; } = false;
/// <summary>
/// 是否陆运固定费用
/// </summary>
public bool? IsTruckingFixed { get; set; } = false;
/// <summary>
/// 仓储 仓储相关模块使用
/// </summary>
public bool? IsWms { get; set; } = false;
/// <summary>
/// 是否垫付费用
/// </summary>
public bool? IsAdvancedPay { get; set; } = false;
/// <summary>
/// 默认是否机密
/// </summary>
public bool? IsOpen { get; set; } = false;
/// <summary>
/// 默认是否开票
/// </summary>
public bool? IsInvoice { get; set; } = false;
/// <summary>
/// 费用默认税率
/// </summary>
public decimal? TaxRate { get; set; }
/// <summary>
/// 费用分组 枚举可维护
/// </summary>
public string FeeGroup { get; set; }
/// <summary>
/// 费用默认FRT 枚举可维护
/// </summary>
public string FeeFrt { get; set; }
/// <summary>
/// 默认发票费用名称 发票费用名称模块可维护
/// </summary>
public string GoodName { get; set; }
/// <summary>
/// 对帐类型 枚举可维护
/// </summary>
public string CheckingType { get; set; }
/// <summary>
/// 默认币别
/// </summary>
public string DefaultCurrency { get; set; }
/// <summary>
/// 状态 0 启用 1 禁用
/// </summary>
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
/// <summary>
/// 备注
/// </summary>
public string Note { get; set; } = "";
}
/// <summary>
/// 验证
/// </summary>
public class FeeCodeReqValidator : AbstractValidator<FeeCodeReq>
{
/// <summary>
/// 构造函数
/// </summary>
public FeeCodeReqValidator()
{
this.RuleFor(o => o.Code)
.NotEmpty().WithName("费用代码");
this.RuleFor(o => o.Name)
.NotEmpty().WithName("费用名称");
}
}

@ -0,0 +1,121 @@
using DS.Module.Core;
using SqlSugar;
namespace DS.WMS.Core.Fee.Dtos;
/// <summary>
/// 费用代码返回实体
/// </summary>
public class FeeCodeRes
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 费用代码 录入费用是作为检索
/// </summary>
public string Code { get; set; }
/// <summary>
/// 费用名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 费用英文名称
/// </summary>
public string EnName { get; set; }
/// <summary>
/// 币别Id
/// </summary>
public long CurrencyId { get; set; }
/// <summary>
/// 默认计费标准
/// </summary>
public int DefaultUnit { get; set; }
/// <summary>
/// 默认收费客户类型
/// </summary>
public int DefaultDebit { get; set; }
/// <summary>
/// 默认付费客户类型
/// </summary>
public int DefaultCredit { get; set; }
/// <summary>
/// 海运 海运相关模块使用
/// </summary>
public bool? IsSea { get; set; } = false;
/// <summary>
/// 空运 空运相关模块使用
/// </summary>
public bool? IsAir { get; set; } = false;
/// <summary>
/// 陆运 陆运相关模块使用
/// </summary>
public bool? IsTrucking { get; set; } = false;
/// <summary>
/// 是否陆运固定费用
/// </summary>
public bool? IsTruckingFixed { get; set; } = false;
/// <summary>
/// 仓储 仓储相关模块使用
/// </summary>
public bool? IsWms { get; set; } = false;
/// <summary>
/// 是否垫付费用
/// </summary>
public bool? IsAdvancedPay { get; set; } = false;
/// <summary>
/// 默认是否机密
/// </summary>
public bool? IsOpen { get; set; } = false;
/// <summary>
/// 默认是否开票
/// </summary>
public bool? IsInvoice { get; set; } = false;
/// <summary>
/// 费用默认税率
/// </summary>
public decimal? TaxRate { get; set; }
/// <summary>
/// 费用分组 枚举可维护
/// </summary>
public string FeeGroup { get; set; }
/// <summary>
/// 费用默认FRT 枚举可维护
/// </summary>
public string FeeFrt { get; set; }
/// <summary>
/// 默认发票费用名称 发票费用名称模块可维护
/// </summary>
public string GoodName { get; set; }
/// <summary>
/// 对帐类型 枚举可维护
/// </summary>
public string CheckingType { get; set; }
/// <summary>
/// 默认币别
/// </summary>
public string DefaultCurrency { 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,82 @@
using DS.Module.Core;
using FluentValidation;
using SqlSugar;
namespace DS.WMS.Core.Fee.Dtos;
/// <summary>
/// 汇率设置表请求实体
/// </summary>
public class FeeCurrencyExchangeReq
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 币别Id
/// </summary>
public long CurrencyId { get; set; }
/// <summary>
/// 币别代码
/// </summary>
public string CurrencyCode { get; set; }
/// <summary>
/// 应收汇率
/// </summary>
public decimal? DRValue { get; set; } = 0;
/// <summary>
/// 应付汇率
/// </summary>
public decimal? CRValue { get; set; } = 0;
/// <summary>
/// 海关汇率
/// </summary>
public decimal? CustomValue { get; set; } = 0;
/// <summary>
/// 开始日期
/// </summary>
public DateTime StartDate { get; set; }
/// <summary>
/// 结束日期
/// </summary>
public DateTime EndDate { get; set; }
/// <summary>
/// 本位币
/// </summary>
public string LocalCurrency { get; set; }
/// <summary>
/// 状态 0 启用 1 禁用
/// </summary>
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
/// <summary>
/// 备注
/// </summary>
public string Note { get; set; } = "";
}
/// <summary>
/// 验证
/// </summary>
public class FeeCurrencyExchangeReqValidator : AbstractValidator<FeeCurrencyExchangeReq>
{
/// <summary>
/// 构造函数
/// </summary>
public FeeCurrencyExchangeReqValidator()
{
this.RuleFor(o => o.CurrencyCode)
.NotEmpty().WithName("币别代码");
}
}

@ -0,0 +1,70 @@
using DS.Module.Core;
using SqlSugar;
namespace DS.WMS.Core.Fee.Dtos;
/// <summary>
/// 汇率设置表返回实体
/// </summary>
public class FeeCurrencyExchangeRes
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 币别Id
/// </summary>
public long CurrencyId { get; set; }
/// <summary>
/// 币别代码
/// </summary>
public string CurrencyCode { get; set; }
/// <summary>
/// 应收汇率
/// </summary>
public decimal? DRValue { get; set; } = 0;
/// <summary>
/// 应付汇率
/// </summary>
public decimal? CRValue { get; set; } = 0;
/// <summary>
/// 海关汇率
/// </summary>
public decimal? CustomValue { get; set; } = 0;
/// <summary>
/// 开始日期
/// </summary>
public DateTime StartDate { get; set; }
/// <summary>
/// 结束日期
/// </summary>
public DateTime EndDate { get; set; }
/// <summary>
/// 本位币
/// </summary>
public string LocalCurrency { 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,70 @@
using DS.Module.Core;
using FluentValidation;
namespace DS.WMS.Core.Fee.Dtos;
/// <summary>
/// 币别信息请求实体
/// </summary>
public class FeeCurrencyReq
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 币别代码
/// </summary>
public string CodeName { get; set; }
/// <summary>
/// 币别名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 描述
/// </summary>
public string Description { get; set; }
/// <summary>
/// 财务软件代码
/// </summary>
public string FinanceSoftCode { get; set; }
/// <summary>
/// 默认对人民币汇率
/// </summary>
public decimal? DefaultRate { get; set; }
/// <summary>
/// 状态 0 启用 1 禁用
/// </summary>
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
/// <summary>
/// 备注
/// </summary>
public string Note { get; set; } = "";
}
/// <summary>
/// 验证
/// </summary>
public class FeeCurrencyReqValidator : AbstractValidator<FeeCurrencyReq>
{
/// <summary>
/// 构造函数
/// </summary>
public FeeCurrencyReqValidator()
{
this.RuleFor(o => o.CodeName)
.NotEmpty().WithName("币别代码");
this.RuleFor(o => o.Name)
.NotEmpty().WithName("币别名称");
}
}

@ -0,0 +1,56 @@
using DS.Module.Core;
using SqlSugar;
namespace DS.WMS.Core.Fee.Dtos;
/// <summary>
/// 币别信息返回实体
/// </summary>
public class FeeCurrencyRes
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 币别代码
/// </summary>
public string CodeName { get; set; }
/// <summary>
/// 币别名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 描述
/// </summary>
public string Description { get; set; }
/// <summary>
/// 财务软件代码
/// </summary>
public string FinanceSoftCode { get; set; }
/// <summary>
/// 默认对人民币汇率
/// </summary>
public decimal? DefaultRate { 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,125 @@
using DS.Module.Core;
using FluentValidation;
namespace DS.WMS.Core.Fee.Dtos;
/// <summary>
/// 往来单位固定费用请求实体
/// </summary>
public class FeeCustTemplateDetailReq
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 费用Id
/// </summary>
public long FeeId { get; set; }
/// <summary>
/// 费用代码 录入费用是作为检索
/// </summary>
public string FeeCode { get; set; }
/// <summary>
/// 费用名称
/// </summary>
public string FeeName { get; set; }
/// <summary>
/// 结算对象
/// </summary>
public string CustomerName { get; set; }
/// <summary>
/// 结算对象类型
/// </summary>
public int CustomerType { get; set; }
/// <summary>
/// 收付类型(收、付)
/// </summary>
public int FeeType { get; set; }
/// <summary>
/// 客户Id
/// </summary>
public long CustomerId { get; set; }
/// <summary>
/// 费用标准
/// </summary>
public string Unit { get; set; }
/// <summary>
/// 是否箱型
/// </summary>
public bool? IsCtn { get; set; } = false;
/// <summary>
/// 币别
/// </summary>
public string Currency { get; set; }
/// <summary>
/// 单价
/// </summary>
public decimal? UnitPrice { get; set; }
/// <summary>
/// 排序
/// </summary>
public int? OrderNo { get; set; } = 100;
/// <summary>
/// 汇率
/// </summary>
public decimal? ExchangeRate { get; set; }
/// <summary>
/// 费用默认税率
/// </summary>
public decimal? TaxRate { get; set; }
/// <summary>
/// 财务税率
/// </summary>
public decimal? AccTaxRate { get; set; }
/// <summary>
/// 税额
/// </summary>
public decimal? Tax { get; set; }
/// <summary>
/// 含税单价
/// </summary>
public decimal? TaxUnitPrice { get; set; }
/// <summary>
/// 是否开票
/// </summary>
public bool? IsInvoice { get; set; } = false;
/// <summary>
/// 是否垫付费用
/// </summary>
public bool? IsAdvancedPay { 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 FeeCustTemplateDetailReqValidator : AbstractValidator<FeeCustTemplateDetailReq>
{
/// <summary>
/// 构造函数
/// </summary>
public FeeCustTemplateDetailReqValidator()
{
this.RuleFor(o => o.CustomerName)
.NotEmpty().WithName("结算对象");
this.RuleFor(o => o.FeeName)
.NotEmpty().WithName("费用名称");
}
}

@ -0,0 +1,110 @@
using DS.Module.Core;
using SqlSugar;
namespace DS.WMS.Core.Fee.Dtos;
/// <summary>
/// 费用模板明细表返回实体
/// </summary>
public class FeeCustTemplateDetailRes
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 费用Id
/// </summary>
public long FeeId { get; set; }
/// <summary>
/// 费用代码 录入费用是作为检索
/// </summary>
public string FeeCode { get; set; }
/// <summary>
/// 费用名称
/// </summary>
public string FeeName { get; set; }
/// <summary>
/// 结算对象
/// </summary>
public string CustomerName { get; set; }
/// <summary>
/// 结算对象类型
/// </summary>
public int CustomerType { get; set; }
/// <summary>
/// 收付类型(收、付)
/// </summary>
public int FeeType { get; set; }
/// <summary>
/// 客户Id
/// </summary>
public long CustomerId { get; set; }
/// <summary>
/// 费用标准
/// </summary>
public string Unit { get; set; }
/// <summary>
/// 是否箱型
/// </summary>
public bool? IsCtn { get; set; } = false;
/// <summary>
/// 币别
/// </summary>
public string Currency { get; set; }
/// <summary>
/// 单价
/// </summary>
public decimal? UnitPrice { get; set; }
/// <summary>
/// 排序
/// </summary>
public int? OrderNo { get; set; } = 100;
/// <summary>
/// 汇率
/// </summary>
public decimal? ExchangeRate { get; set; }
/// <summary>
/// 费用默认税率
/// </summary>
public decimal? TaxRate { get; set; }
/// <summary>
/// 财务税率
/// </summary>
public decimal? AccTaxRate { get; set; }
/// <summary>
/// 税额
/// </summary>
public decimal? Tax { get; set; }
/// <summary>
/// 含税单价
/// </summary>
public decimal? TaxUnitPrice { get; set; }
/// <summary>
/// 是否开票
/// </summary>
public bool? IsInvoice { get; set; } = false;
/// <summary>
/// 是否垫付费用
/// </summary>
public bool? IsAdvancedPay { 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,319 @@
using DS.Module.Core;
using FluentValidation;
namespace DS.WMS.Core.Fee.Dtos;
/// <summary>
/// 费用记录请求实体
/// </summary>
public class FeeRecordReq
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 业务Id
/// </summary>
public long BusinessId { get; set; }
/// <summary>
/// 收付类型(收、付) 1应收 2 应付
/// </summary>
public int FeeType { get; set; }
/// <summary>
/// 费用Id
/// </summary>
public long FeeId { get; set; }
/// <summary>
/// 费用代码 录入费用是作为检索
/// </summary>
public string FeeCode { get; set; }
/// <summary>
/// 费用名称
/// </summary>
public string FeeName { get; set; }
/// <summary>
/// 费用对象
/// </summary>
public string CustomerName { get; set; }
/// <summary>
/// 费用对象编码
/// </summary>
public string CustomerCode { get; set; }
/// <summary>
/// 费用对象Id
/// </summary>
public long CustomerId { get; set; }
/// <summary>
/// 费用对象类型
/// </summary>
public int CustomerType { get; set; }
/// <summary>
/// 费用标准
/// </summary>
public string Unit { get; set; }
/// <summary>
/// 单价
/// </summary>
public decimal? UnitPrice { get; set; }
/// <summary>
/// 数量
/// </summary>
public decimal? Quantity { get; set; }
/// <summary>
/// 金额
/// </summary>
public decimal? Amount { get; set; }
/// <summary>
/// 币别
/// </summary>
public string Currency { get; set; }
/// <summary>
/// 汇率
/// </summary>
public decimal? ExchangeRate { get; set; }
/// <summary>
/// 驳回原因
/// </summary>
public string Reason { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
/// <summary>
/// Desc:佣金比率
/// </summary>
public decimal? CommissionRate { get; set; } = 0;
/// <summary>
/// Desc:结算金额
/// </summary>
public decimal? SettlementAmount { get; set; } = 0;
/// <summary>
/// Desc:开票金额
/// </summary>
public decimal? InvoiceAmount { get; set; } = 0;
/// <summary>
/// Desc:申请金额
/// </summary>
public decimal? OrderAmount { get; set; } = 0;
/// <summary>
/// Desc:申请开票金额
/// </summary>
public decimal? OrderInvoiceAmount { get; set; } = 0;
/// <summary>
/// 提交日期
/// </summary>
public DateTime? SubmitDate { get; set; }
/// <summary>
/// 审核人Id
/// </summary>
public long AuditBy { get; set; }
/// <summary>
/// 审核人
/// </summary>
public string AuditOperator { get; set; }
/// <summary>
/// 审核日期
/// </summary>
public DateTime AuditDate { get; set; }
/// <summary>
/// 是否机密费用
/// </summary>
public bool? IsOpen { get; set; } = false;
/// <summary>
/// 对帐编号
/// </summary>
public string DebitNo { get; set; }
/// <summary>
/// 是否对帐
/// </summary>
public bool IsDebit { get; set; } = false;
/// <summary>
/// 是否垫付费用
/// </summary>
public bool? IsAdvancedPay { get; set; } = false;
/// <summary>
/// 是否禁开发票
/// </summary>
public bool? IsInvoice { get; set; } = false;
/// <summary>
/// 是否销售订舱
/// </summary>
public bool? IsCrmOrderFee { get; set; } = false;
/// <summary>
/// 排序
/// </summary>
public int? OrderNo { get; set; } = 100;
/// <summary>
/// 费用状态
/// </summary>
public int FeeStatus { get; set; }
/// <summary>
/// 发票号
/// </summary>
public string InvoiceNum { get; set; }
/// <summary>
/// 支票号
/// </summary>
public string ChequeNum { get; set; }
/// <summary>
/// 仓储编号
/// </summary>
public string WmsOutBSNO { get; set; }
/// <summary>
/// 行号
/// </summary>
public int LineNum { get; set; }
/// <summary>
/// 税率
/// </summary>
public decimal TaxRate { get; set; }
/// <summary>
/// 不含税金额
/// </summary>
public decimal NoTaxAmount { get; set; }
/// <summary>
/// 财务税率
/// </summary>
public decimal AccTaxRate { get; set; }
/// <summary>
/// 是否生成凭证
/// </summary>
public bool IsVou { get; set; }
/// <summary>
/// 报销编号
/// </summary>
public string BxId { get; set; }
/// <summary>
/// 税额
/// </summary>
public decimal Tax { get; set; }
/// <summary>
/// 申请结算金额
/// </summary>
public decimal OrderSettlementAmount { get; set; }
/// <summary>
/// 含税单价
/// </summary>
public decimal TaxUnitPrice { get; set; }
/// <summary>
/// 申请发票开票金额
/// </summary>
public decimal OrderInvSettlementAmount { get; set; }
/// <summary>
/// 凭证号
/// </summary>
public string VoucherNo { get; set; }
/// <summary>
///
/// </summary>
public string SalesNo { get; set; }
/// <summary>
/// 借款编号
/// </summary>
public string JkId { get; set; }
/// <summary>
///
/// </summary>
public string DeliveryNo { get; set; }
/// <summary>
/// 本位币
/// </summary>
public string LocalCurrency { get; set; }
/// <summary>
/// 责任人
/// </summary>
public string Manager { get; set; }
/// <summary>
/// 是否财务费用
/// </summary>
public bool IsAcc { get; set; }
/// <summary>
///
/// </summary>
public string PaymentId { get; set; }
/// <summary>
///
/// </summary>
public string StatementNo { get; set; }
/// <summary>
/// 核算单位
/// </summary>
public string SaleOrg { get; set; }
/// <summary>
/// 核算单位Id
/// </summary>
public long SaleOrgId { get; set; }
/// <summary>
/// 发票自助连接
/// </summary>
public string InvLinkId { get; set; }
/// <summary>
/// 提交人
/// </summary>
public string SubmitBy { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Note { get; set; } = "";
}
/// <summary>
/// 验证
/// </summary>
public class FeeRecordReqValidator : AbstractValidator<FeeRecordReq>
{
/// <summary>
/// 构造函数
/// </summary>
public FeeRecordReqValidator()
{
this.RuleFor(o => o.FeeCode)
.NotEmpty().WithName("费用代码");
this.RuleFor(o => o.CustomerCode)
.NotEmpty().WithName("费用对象");
}
}

@ -0,0 +1,306 @@
using DS.Module.Core;
using SqlSugar;
using System.ComponentModel;
namespace DS.WMS.Core.Fee.Dtos;
/// <summary>
/// 费用记录返回实体
/// </summary>
public class FeeRecordRes
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 业务Id
/// </summary>
public long BusinessId { get; set; }
/// <summary>
/// 收付类型(收、付) 1应收 2 应付
/// </summary>
public int FeeType { get; set; }
/// <summary>
/// 费用Id
/// </summary>
public long FeeId { get; set; }
/// <summary>
/// 费用代码 录入费用是作为检索
/// </summary>
public string FeeCode { get; set; }
/// <summary>
/// 费用名称
/// </summary>
public string FeeName { get; set; }
/// <summary>
/// 费用对象
/// </summary>
public string CustomerName { get; set; }
/// <summary>
/// 费用对象编码
/// </summary>
public string CustomerCode { get; set; }
/// <summary>
/// 费用对象Id
/// </summary>
public long CustomerId { get; set; }
/// <summary>
/// 费用对象类型
/// </summary>
public int CustomerType { get; set; }
/// <summary>
/// 费用标准
/// </summary>
public string Unit { get; set; }
/// <summary>
/// 单价
/// </summary>
public decimal? UnitPrice { get; set; }
/// <summary>
/// 数量
/// </summary>
public decimal? Quantity { get; set; }
/// <summary>
/// 金额
/// </summary>
public decimal? Amount { get; set; }
/// <summary>
/// 币别
/// </summary>
public string Currency { get; set; }
/// <summary>
/// 汇率
/// </summary>
public decimal? ExchangeRate { get; set; }
/// <summary>
/// 驳回原因
/// </summary>
public string Reason { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
/// <summary>
/// Desc:佣金比率
/// </summary>
public decimal? CommissionRate { get; set; } = 0;
/// <summary>
/// Desc:结算金额
/// </summary>
public decimal? SettlementAmount { get; set; } = 0;
/// <summary>
/// Desc:开票金额
/// </summary>
public decimal? InvoiceAmount { get; set; } = 0;
/// <summary>
/// Desc:申请金额
/// </summary>
public decimal? OrderAmount { get; set; } = 0;
/// <summary>
/// Desc:申请开票金额
/// </summary>
public decimal? OrderInvoiceAmount { get; set; } = 0;
/// <summary>
/// 提交日期
/// </summary>
public DateTime? SubmitDate { get; set; }
/// <summary>
/// 审核人Id
/// </summary>
public long AuditBy { get; set; }
/// <summary>
/// 审核人
/// </summary>
public string AuditOperator { get; set; }
/// <summary>
/// 审核日期
/// </summary>
public DateTime AuditDate { get; set; }
/// <summary>
/// 是否机密费用
/// </summary>
public bool? IsOpen { get; set; } = false;
/// <summary>
/// 对帐编号
/// </summary>
public string DebitNo { get; set; }
/// <summary>
/// 是否对帐
/// </summary>
public bool IsDebit { get; set; } = false;
/// <summary>
/// 是否垫付费用
/// </summary>
public bool? IsAdvancedPay { get; set; } = false;
/// <summary>
/// 是否禁开发票
/// </summary>
public bool? IsInvoice { get; set; } = false;
/// <summary>
/// 是否销售订舱
/// </summary>
public bool? IsCrmOrderFee { get; set; } = false;
/// <summary>
/// 排序
/// </summary>
public int? OrderNo { get; set; } = 100;
/// <summary>
/// 费用状态
/// </summary>
public int FeeStatus { get; set; }
/// <summary>
/// 发票号
/// </summary>
public string InvoiceNum { get; set; }
/// <summary>
/// 支票号
/// </summary>
public string ChequeNum { get; set; }
/// <summary>
/// 仓储编号
/// </summary>
public string WmsOutBSNO { get; set; }
/// <summary>
/// 行号
/// </summary>
public int LineNum { get; set; }
/// <summary>
/// 税率
/// </summary>
public decimal TaxRate { get; set; }
/// <summary>
/// 不含税金额
/// </summary>
public decimal NoTaxAmount { get; set; }
/// <summary>
/// 财务税率
/// </summary>
public decimal AccTaxRate { get; set; }
/// <summary>
/// 是否生成凭证
/// </summary>
public bool IsVou { get; set; }
/// <summary>
/// 报销编号
/// </summary>
public string BxId { get; set; }
/// <summary>
/// 税额
/// </summary>
public decimal Tax { get; set; }
/// <summary>
/// 申请结算金额
/// </summary>
public decimal OrderSettlementAmount { get; set; }
/// <summary>
/// 含税单价
/// </summary>
public decimal TaxUnitPrice { get; set; }
/// <summary>
/// 申请发票开票金额
/// </summary>
public decimal OrderInvSettlementAmount { get; set; }
/// <summary>
/// 凭证号
/// </summary>
public string VoucherNo { get; set; }
/// <summary>
///
/// </summary>
public string SalesNo { get; set; }
/// <summary>
/// 借款编号
/// </summary>
public string JkId { get; set; }
/// <summary>
///
/// </summary>
public string DeliveryNo { get; set; }
/// <summary>
/// 本位币
/// </summary>
public string LocalCurrency { get; set; }
/// <summary>
/// 责任人
/// </summary>
public string Manager { get; set; }
/// <summary>
/// 是否财务费用
/// </summary>
public bool IsAcc { get; set; }
/// <summary>
///
/// </summary>
public string PaymentId { get; set; }
/// <summary>
///
/// </summary>
public string StatementNo { get; set; }
/// <summary>
/// 核算单位
/// </summary>
public string SaleOrg { get; set; }
/// <summary>
/// 核算单位Id
/// </summary>
public long SaleOrgId { get; set; }
/// <summary>
/// 发票自助连接
/// </summary>
public string InvLinkId { get; set; }
/// <summary>
/// 提交人
/// </summary>
public string SubmitBy { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Note { get; set; } = "";
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreateTime { get; set; }
}

@ -0,0 +1,147 @@
using DS.Module.Core;
using FluentValidation;
namespace DS.WMS.Core.Fee.Dtos;
/// <summary>
/// 费用模板明细表请求实体
/// </summary>
public class FeeTemplateDetailReq
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 模板Id
/// </summary>
public long TemplateId { get; set; }
/// <summary>
/// 费用Id
/// </summary>
public long FeeId { get; set; }
/// <summary>
/// 费用代码 录入费用是作为检索
/// </summary>
public string FeeCode { get; set; }
/// <summary>
/// 费用名称
/// </summary>
public string FeeName { get; set; }
/// <summary>
/// 费用英文名称
/// </summary>
public string FeeEnName { get; set; }
/// <summary>
/// 结算对象
/// </summary>
public string CustomerName { get; set; }
/// <summary>
/// 结算对象类型
/// </summary>
public int CustomerType { get; set; }
/// <summary>
/// 收付类型(收、付)
/// </summary>
public int FeeType { get; set; }
/// <summary>
/// 客户Id
/// </summary>
public long CustomerId { get; set; }
/// <summary>
/// 费用标准
/// </summary>
public string Unit { get; set; }
/// <summary>
/// 是否箱型
/// </summary>
public bool? IsCtn { get; set; } = false;
/// <summary>
/// 币别
/// </summary>
public string Currency { get; set; }
/// <summary>
/// 单价
/// </summary>
public decimal? UnitPrice { get; set; }
/// <summary>
/// 排序
/// </summary>
public int? OrderNo { get; set; } = 100;
/// <summary>
/// 汇率
/// </summary>
public decimal? ExchangeRate { get; set; }
/// <summary>
/// 费用默认税率
/// </summary>
public decimal? TaxRate { get; set; }
/// <summary>
/// 财务税率
/// </summary>
public decimal? AccTaxRate { get; set; }
/// <summary>
/// 税额
/// </summary>
public decimal? Tax { get; set; }
/// <summary>
/// 含税单价
/// </summary>
public decimal? TaxUnitPrice { get; set; }
/// <summary>
/// 是否开票
/// </summary>
public bool? IsInvoice { get; set; } = false;
/// <summary>
/// 是否垫付费用
/// </summary>
public bool? IsAdvancedPay { get; set; } = false;
/// <summary>
/// 费用分组 枚举可维护
/// </summary>
public string FeeGroup { get; set; }
/// <summary>
/// 费用默认FRT 枚举可维护
/// </summary>
public string FeeFrt { get; set; }
/// <summary>
/// 核算单位Id
/// </summary>
public long SaleOrgId { get; set; }
/// <summary>
/// 状态 0 启用 1 禁用
/// </summary>
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
/// <summary>
/// 备注
/// </summary>
public string Note { get; set; } = "";
}
/// <summary>
/// 验证
/// </summary>
public class FeeTemplateDetailReqValidator : AbstractValidator<FeeTemplateDetailReq>
{
/// <summary>
/// 构造函数
/// </summary>
public FeeTemplateDetailReqValidator()
{
this.RuleFor(o => o.CustomerName)
.NotEmpty().WithName("结算对象");
this.RuleFor(o => o.FeeName)
.NotEmpty().WithName("费用名称");
}
}

@ -0,0 +1,132 @@
using DS.Module.Core;
using SqlSugar;
namespace DS.WMS.Core.Fee.Dtos;
/// <summary>
/// 费用模板明细表返回实体
/// </summary>
public class FeeTemplateDetailRes
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 模板Id
/// </summary>
public long TemplateId { get; set; }
/// <summary>
/// 费用Id
/// </summary>
public long FeeId { get; set; }
/// <summary>
/// 费用代码 录入费用是作为检索
/// </summary>
public string FeeCode { get; set; }
/// <summary>
/// 费用名称
/// </summary>
public string FeeName { get; set; }
/// <summary>
/// 费用英文名称
/// </summary>
public string FeeEnName { get; set; }
/// <summary>
/// 结算对象
/// </summary>
public string CustomerName { get; set; }
/// <summary>
/// 结算对象类型
/// </summary>
public int CustomerType { get; set; }
/// <summary>
/// 收付类型(收、付)
/// </summary>
public int FeeType { get; set; }
/// <summary>
/// 客户Id
/// </summary>
public long CustomerId { get; set; }
/// <summary>
/// 费用标准
/// </summary>
public string Unit { get; set; }
/// <summary>
/// 是否箱型
/// </summary>
public bool? IsCtn { get; set; } = false;
/// <summary>
/// 币别
/// </summary>
public string Currency { get; set; }
/// <summary>
/// 单价
/// </summary>
public decimal? UnitPrice { get; set; }
/// <summary>
/// 排序
/// </summary>
public int? OrderNo { get; set; } = 100;
/// <summary>
/// 汇率
/// </summary>
public decimal? ExchangeRate { get; set; }
/// <summary>
/// 费用默认税率
/// </summary>
public decimal? TaxRate { get; set; }
/// <summary>
/// 财务税率
/// </summary>
public decimal? AccTaxRate { get; set; }
/// <summary>
/// 税额
/// </summary>
public decimal? Tax { get; set; }
/// <summary>
/// 含税单价
/// </summary>
public decimal? TaxUnitPrice { get; set; }
/// <summary>
/// 是否开票
/// </summary>
public bool? IsInvoice { get; set; } = false;
/// <summary>
/// 是否垫付费用
/// </summary>
public bool? IsAdvancedPay { get; set; } = false;
/// <summary>
/// 费用分组 枚举可维护
/// </summary>
public string FeeGroup { get; set; }
/// <summary>
/// 费用默认FRT 枚举可维护
/// </summary>
public string FeeFrt { get; set; }
/// <summary>
/// 核算单位Id
/// </summary>
public long SaleOrgId { 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,67 @@
using DS.Module.Core;
using FluentValidation;
namespace DS.WMS.Core.Fee.Dtos;
/// <summary>
/// 费用模板主表请求实体
/// </summary>
public class FeeTemplateReq
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 模板名称
/// </summary>
public string TemplateName { get; set; }
/// <summary>
/// 业务类型(海运出口、海运进口、空运出口、空运进口)
/// </summary>
public int OpType { get; set; }
/// <summary>
/// 收付类型(收、付)
/// </summary>
public int FeeType { get; set; } = 1;
/// <summary>
/// 是否公共标识
/// </summary>
public bool IsPublic { get; set; } = false;
/// <summary>
/// 描述
/// </summary>
public string Description { get; set; }
/// <summary>
/// 状态 0 启用 1 禁用
/// </summary>
public StatusEnum? Status { get; set; } = StatusEnum.Enable;
/// <summary>
/// 备注
/// </summary>
public string Note { get; set; } = "";
}
/// <summary>
/// 验证
/// </summary>
public class FeeTemplateReqValidator : AbstractValidator<FeeTemplateReq>
{
/// <summary>
/// 构造函数
/// </summary>
public FeeTemplateReqValidator()
{
this.RuleFor(o => o.TemplateName)
.NotEmpty().WithName("模板名称");
this.RuleFor(o => o.OpType)
.NotEmpty().WithName("业务类型");
}
}

@ -0,0 +1,53 @@
using DS.Module.Core;
using SqlSugar;
namespace DS.WMS.Core.Fee.Dtos;
/// <summary>
/// 费用模板主表返回实体
/// </summary>
public class FeeTemplateRes
{
/// <summary>
/// 主键Id
/// </summary>
public long Id { get; set; }
/// <summary>
/// 模板名称
/// </summary>
public string TemplateName { get; set; }
/// <summary>
/// 业务类型(海运出口、海运进口、空运出口、空运进口)
/// </summary>
public int OpType { get; set; }
/// <summary>
/// 收付类型(收、付)
/// </summary>
public int FeeType { get; set; }
/// <summary>
/// 是否公共标识
/// </summary>
public bool IsPublic { get; set; } = false;
/// <summary>
/// 描述
/// </summary>
public string Description { 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; }
}

@ -2,7 +2,7 @@ using DS.Module.Core;
using DS.Module.Core.Data;
using SqlSugar;
namespace DS.WMS.Core.Code.Entity;
namespace DS.WMS.Core.Fee.Entity;
/// <summary>
/// 费用代码设置
/// </summary>

@ -2,7 +2,7 @@ using DS.Module.Core;
using DS.Module.Core.Data;
using SqlSugar;
namespace DS.WMS.Core.Code.Entity;
namespace DS.WMS.Core.Fee.Entity;
/// <summary>
/// 币别信息表
/// </summary>

@ -2,7 +2,7 @@ using DS.Module.Core;
using DS.Module.Core.Data;
using SqlSugar;
namespace DS.WMS.Core.Code.Entity;
namespace DS.WMS.Core.Fee.Entity;
/// <summary>
/// 汇率设置表
/// </summary>

@ -48,7 +48,7 @@ namespace DS.WMS.Core.Fee.Entity
/// 客户Id
/// </summary>
[SugarColumn(ColumnDescription = "客户Id")]
public long ClientId { get; set; }
public long CustomerId { get; set; }
/// <summary>
/// 费用标准
/// </summary>

@ -52,6 +52,11 @@ namespace DS.WMS.Core.Fee.Entity
[SugarColumn(ColumnDescription = "费用对象编码", Length = 100, IsNullable = true)]
public string CustomerCode { get; set; }
/// <summary>
/// 费用对象Id
/// </summary>
[SugarColumn(ColumnDescription = "费用对象Id")]
public long CustomerId { get; set; }
/// <summary>
/// 费用对象类型
/// </summary>
[SugarColumn(ColumnDescription = "费用对象类型", IsNullable = false, DefaultValue = "1")]

@ -2,7 +2,7 @@ using DS.Module.Core;
using DS.Module.Core.Data;
using SqlSugar;
namespace DS.WMS.Core.Code.Entity;
namespace DS.WMS.Core.Fee.Entity;
/// <summary>
/// 费用模板主表
/// </summary>

@ -58,7 +58,7 @@ namespace DS.WMS.Core.Fee.Entity
/// 客户Id
/// </summary>
[SugarColumn(ColumnDescription = "客户Id")]
public long ClientId { get; set; }
public long CustomerId { get; set; }
/// <summary>
/// 费用标准
/// </summary>

@ -0,0 +1,30 @@
using DS.Module.Core;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.System.Dtos;
namespace DS.WMS.Core.Fee.Interface;
public interface IFeeCodeService
{
/// <summary>
/// 列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
DataResult<List<FeeCodeRes>> GetListByPage(PageRequest request);
/// <summary>
/// 编辑
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
DataResult EditFeeCode(FeeCodeReq model);
/// <summary>
/// 获取详情
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
DataResult<FeeCodeRes> GetFeeCodeInfo(string id);
}

@ -0,0 +1,30 @@
using DS.Module.Core;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.System.Dtos;
namespace DS.WMS.Core.Fee.Interface;
public interface IFeeCurrencyExchangeService
{
/// <summary>
/// 列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
DataResult<List<FeeCurrencyExchangeRes>> GetListByPage(PageRequest request);
/// <summary>
/// 编辑
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
DataResult EditFeeCurrencyExchange(FeeCurrencyExchangeReq model);
/// <summary>
/// 获取详情
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
DataResult<FeeCurrencyExchangeRes> GetFeeCurrencyExchangeInfo(string id);
}

@ -0,0 +1,30 @@
using DS.Module.Core;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.System.Dtos;
namespace DS.WMS.Core.Fee.Interface;
public interface IFeeCurrencyService
{
/// <summary>
/// 列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
DataResult<List<FeeCurrencyRes>> GetListByPage(PageRequest request);
/// <summary>
/// 编辑
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
DataResult EditFeeCurrency(FeeCurrencyReq model);
/// <summary>
/// 获取详情
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
DataResult<FeeCurrencyRes> GetFeeCurrencyInfo(string id);
}

@ -0,0 +1,30 @@
using DS.Module.Core;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.System.Dtos;
namespace DS.WMS.Core.Fee.Interface;
public interface IFeeCustTemplateDetailService
{
/// <summary>
/// 列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
DataResult<List<FeeCustTemplateDetailRes>> GetListByPage(PageRequest request);
/// <summary>
/// 编辑
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
DataResult EditFeeCustTemplateDetail(FeeCustTemplateDetailReq model);
/// <summary>
/// 获取详情
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
DataResult<FeeCustTemplateDetailRes> GetFeeCustTemplateDetailInfo(string id);
}

@ -0,0 +1,30 @@
using DS.Module.Core;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.System.Dtos;
namespace DS.WMS.Core.Fee.Interface;
public interface IFeeRecordService
{
/// <summary>
/// 列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
DataResult<List<FeeRecordRes>> GetListByPage(PageRequest request);
/// <summary>
/// 编辑
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
DataResult EditFeeRecord(FeeRecordReq model);
/// <summary>
/// 获取详情
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
DataResult<FeeRecordRes> GetFeeRecordInfo(string id);
}

@ -0,0 +1,30 @@
using DS.Module.Core;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.System.Dtos;
namespace DS.WMS.Core.Fee.Interface;
public interface IFeeTemplateDetailService
{
/// <summary>
/// 列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
DataResult<List<FeeTemplateDetailRes>> GetListByPage(PageRequest request);
/// <summary>
/// 编辑
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
DataResult EditFeeTemplateDetail(FeeTemplateDetailReq model);
/// <summary>
/// 获取详情
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
DataResult<FeeTemplateDetailRes> GetFeeTemplateDetailInfo(string id);
}

@ -0,0 +1,30 @@
using DS.Module.Core;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.System.Dtos;
namespace DS.WMS.Core.Fee.Interface;
public interface IFeeTemplateService
{
/// <summary>
/// 列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
DataResult<List<FeeTemplateRes>> GetListByPage(PageRequest request);
/// <summary>
/// 编辑
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
DataResult EditFeeTemplate(FeeTemplateReq model);
/// <summary>
/// 获取详情
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
DataResult<FeeTemplateRes> GetFeeTemplateInfo(string id);
}

@ -0,0 +1,98 @@
using DS.Module.Core;
using DS.Module.SqlSugar;
using DS.Module.UserModule;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.Fee.Entity;
using DS.WMS.Core.Fee.Interface;
using DS.WMS.Core.System.Entity;
using Microsoft.Extensions.DependencyInjection;
using SqlSugar;
using Mapster;
using DS.Module.Core.Extensions;
namespace DS.WMS.Core.Fee.Method
{
public class FeeCodeService: IFeeCodeService
{
private readonly IServiceProvider _serviceProvider;
private readonly ISqlSugarClient db;
private readonly IUser user;
private readonly ISaasDbService saasService;
/// <summary>
///
/// </summary>
/// <param name="serviceProvider"></param>
public FeeCodeService(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<FeeCodeRes>> GetListByPage(PageRequest request)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
//序列化查询条件
var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
var data = tenantDb.Queryable<FeeCode>()
.Where(whereList)
.Select<FeeCodeRes>().ToQueryPage(request.PageCondition);
return data;
}
/// <summary>
/// 编辑
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
public DataResult EditFeeCode(FeeCodeReq req)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
if (req.Id == 0)
{
if (tenantDb.Queryable<FeeCode>()
.Where(x => x.Code == req.Code).Any())
{
return DataResult.Failed("费用代码已存在", MultiLanguageConst.FeeCodeExist);
}
var data = req.Adapt<FeeCode>();
var entity = tenantDb.Insertable(data).ExecuteReturnEntity();
return DataResult.Successed("添加成功!", entity.Id, MultiLanguageConst.DataCreateSuccess);
}
else
{
var info = tenantDb.Queryable<FeeCode>().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<FeeCodeRes> GetFeeCodeInfo(string id)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var data = tenantDb.Queryable<FeeCode>()
.Where(x => x.Id == long.Parse(id))
.Select<FeeCodeRes>()
.First();
return DataResult<FeeCodeRes>.Success(data, MultiLanguageConst.DataQuerySuccess);
}
}
}

@ -0,0 +1,98 @@
using DS.Module.Core;
using DS.Module.SqlSugar;
using DS.Module.UserModule;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.Fee.Entity;
using DS.WMS.Core.Fee.Interface;
using DS.WMS.Core.System.Entity;
using Microsoft.Extensions.DependencyInjection;
using SqlSugar;
using Mapster;
using DS.Module.Core.Extensions;
namespace DS.WMS.Core.Fee.Method
{
public class FeeCurrencyExchangeService : IFeeCurrencyExchangeService
{
private readonly IServiceProvider _serviceProvider;
private readonly ISqlSugarClient db;
private readonly IUser user;
private readonly ISaasDbService saasService;
/// <summary>
///
/// </summary>
/// <param name="serviceProvider"></param>
public FeeCurrencyExchangeService(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<FeeCurrencyExchangeRes>> GetListByPage(PageRequest request)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
//序列化查询条件
var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
var data = tenantDb.Queryable<FeeCurrencyExchange>()
.Where(whereList)
.Select<FeeCurrencyExchangeRes>().ToQueryPage(request.PageCondition);
return data;
}
/// <summary>
/// 编辑
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
public DataResult EditFeeCurrencyExchange(FeeCurrencyExchangeReq req)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
if (req.Id == 0)
{
if (tenantDb.Queryable<FeeCurrencyExchange>()
.Where(x => x.CurrencyCode == req.CurrencyCode && x.LocalCurrency == req.LocalCurrency).Any())
{
return DataResult.Failed("汇率设置已存在!", MultiLanguageConst.FeeCurrencyExchangeExist);
}
var data = req.Adapt<FeeCurrencyExchange>();
var entity = tenantDb.Insertable(data).ExecuteReturnEntity();
return DataResult.Successed("添加成功!", entity.Id, MultiLanguageConst.DataCreateSuccess);
}
else
{
var info = tenantDb.Queryable<FeeCurrencyExchange>().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<FeeCurrencyExchangeRes> GetFeeCurrencyExchangeInfo(string id)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var data = tenantDb.Queryable<FeeCurrencyExchange>()
.Where(x => x.Id == long.Parse(id))
.Select<FeeCurrencyExchangeRes>()
.First();
return DataResult<FeeCurrencyExchangeRes>.Success(data, MultiLanguageConst.DataQuerySuccess);
}
}
}

@ -0,0 +1,98 @@
using DS.Module.Core;
using DS.Module.SqlSugar;
using DS.Module.UserModule;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.Fee.Entity;
using DS.WMS.Core.Fee.Interface;
using DS.WMS.Core.System.Entity;
using Microsoft.Extensions.DependencyInjection;
using SqlSugar;
using Mapster;
using DS.Module.Core.Extensions;
namespace DS.WMS.Core.Fee.Method
{
public class FeeCurrencyService: IFeeCurrencyService
{
private readonly IServiceProvider _serviceProvider;
private readonly ISqlSugarClient db;
private readonly IUser user;
private readonly ISaasDbService saasService;
/// <summary>
///
/// </summary>
/// <param name="serviceProvider"></param>
public FeeCurrencyService(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<FeeCurrencyRes>> GetListByPage(PageRequest request)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
//序列化查询条件
var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
var data = tenantDb.Queryable<FeeCurrency>()
.Where(whereList)
.Select<FeeCurrencyRes>().ToQueryPage(request.PageCondition);
return data;
}
/// <summary>
/// 编辑
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
public DataResult EditFeeCurrency(FeeCurrencyReq req)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
if (req.Id == 0)
{
if (tenantDb.Queryable<FeeCurrency>()
.Where(x => x.CodeName == req.CodeName).Any())
{
return DataResult.Failed("币别信息已存在!", MultiLanguageConst.FeeCurrencyExist);
}
var data = req.Adapt<FeeCurrency>();
var entity = tenantDb.Insertable(data).ExecuteReturnEntity();
return DataResult.Successed("添加成功!", entity.Id, MultiLanguageConst.DataCreateSuccess);
}
else
{
var info = tenantDb.Queryable<FeeCurrency>().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<FeeCurrencyRes> GetFeeCurrencyInfo(string id)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var data = tenantDb.Queryable<FeeCurrency>()
.Where(x => x.Id == long.Parse(id))
.Select<FeeCurrencyRes>()
.First();
return DataResult<FeeCurrencyRes>.Success(data, MultiLanguageConst.DataQuerySuccess);
}
}
}

@ -0,0 +1,99 @@
using DS.Module.Core;
using DS.Module.SqlSugar;
using DS.Module.UserModule;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.Fee.Entity;
using DS.WMS.Core.Fee.Interface;
using DS.WMS.Core.System.Entity;
using Microsoft.Extensions.DependencyInjection;
using SqlSugar;
using Mapster;
using DS.Module.Core.Extensions;
using Masuit.Tools.Strings;
namespace DS.WMS.Core.Fee.Method
{
public class FeeCustTemplateDetailService: IFeeCustTemplateDetailService
{
private readonly IServiceProvider _serviceProvider;
private readonly ISqlSugarClient db;
private readonly IUser user;
private readonly ISaasDbService saasService;
/// <summary>
///
/// </summary>
/// <param name="serviceProvider"></param>
public FeeCustTemplateDetailService(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<FeeCustTemplateDetailRes>> GetListByPage(PageRequest request)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
//序列化查询条件
var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
var data = tenantDb.Queryable<FeeCustTemplateDetail>()
.Where(whereList)
.Select<FeeCustTemplateDetailRes>().ToQueryPage(request.PageCondition);
return data;
}
/// <summary>
/// 编辑
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
public DataResult EditFeeCustTemplateDetail(FeeCustTemplateDetailReq req)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
if (req.Id == 0)
{
if (tenantDb.Queryable<FeeCustTemplateDetail>()
.Where(x => x.FeeId == req.FeeId && x.CustomerId == req.CustomerId && x.FeeType == req.FeeType).Any())
{
return DataResult.Failed("往来单位固定费用已存在!", MultiLanguageConst.FeeCustTemplateDetailExist);
}
var data = req.Adapt<FeeCustTemplateDetail>();
var entity = tenantDb.Insertable(data).ExecuteReturnEntity();
return DataResult.Successed("添加成功!", entity.Id, MultiLanguageConst.DataCreateSuccess);
}
else
{
var info = tenantDb.Queryable<FeeCustTemplateDetail>().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<FeeCustTemplateDetailRes> GetFeeCustTemplateDetailInfo(string id)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var data = tenantDb.Queryable<FeeCustTemplateDetail>()
.Where(x => x.Id == long.Parse(id))
.Select<FeeCustTemplateDetailRes>()
.First();
return DataResult<FeeCustTemplateDetailRes>.Success(data, MultiLanguageConst.DataQuerySuccess);
}
}
}

@ -0,0 +1,98 @@
using DS.Module.Core;
using DS.Module.SqlSugar;
using DS.Module.UserModule;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.Fee.Entity;
using DS.WMS.Core.Fee.Interface;
using DS.WMS.Core.System.Entity;
using Microsoft.Extensions.DependencyInjection;
using SqlSugar;
using Mapster;
using DS.Module.Core.Extensions;
namespace DS.WMS.Core.Fee.Method
{
public class FeeRecordService : IFeeRecordService
{
private readonly IServiceProvider _serviceProvider;
private readonly ISqlSugarClient db;
private readonly IUser user;
private readonly ISaasDbService saasService;
/// <summary>
///
/// </summary>
/// <param name="serviceProvider"></param>
public FeeRecordService(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<FeeRecordRes>> GetListByPage(PageRequest request)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
//序列化查询条件
var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
var data = tenantDb.Queryable<FeeRecord>()
.Where(whereList)
.Select<FeeRecordRes>().ToQueryPage(request.PageCondition);
return data;
}
/// <summary>
/// 编辑
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
public DataResult EditFeeRecord(FeeRecordReq req)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
if (req.Id == 0)
{
if (tenantDb.Queryable<FeeRecord>()
.Where(x => x.BusinessId == req.BusinessId && x.FeeType == req.FeeType && x.FeeId == req.FeeId).Any())
{
return DataResult.Failed("费用记录已存在", MultiLanguageConst.FeeRecordExist);
}
var data = req.Adapt<FeeRecord>();
var entity = tenantDb.Insertable(data).ExecuteReturnEntity();
return DataResult.Successed("添加成功!", entity.Id, MultiLanguageConst.DataCreateSuccess);
}
else
{
var info = tenantDb.Queryable<FeeRecord>().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<FeeRecordRes> GetFeeRecordInfo(string id)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var data = tenantDb.Queryable<FeeRecord>()
.Where(x => x.Id == long.Parse(id))
.Select<FeeRecordRes>()
.First();
return DataResult<FeeRecordRes>.Success(data, MultiLanguageConst.DataQuerySuccess);
}
}
}

@ -0,0 +1,99 @@
using DS.Module.Core;
using DS.Module.SqlSugar;
using DS.Module.UserModule;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.Fee.Entity;
using DS.WMS.Core.Fee.Interface;
using DS.WMS.Core.System.Entity;
using Microsoft.Extensions.DependencyInjection;
using SqlSugar;
using Mapster;
using DS.Module.Core.Extensions;
using Masuit.Tools.Strings;
namespace DS.WMS.Core.Fee.Method
{
public class FeeTemplateDetailService: IFeeTemplateDetailService
{
private readonly IServiceProvider _serviceProvider;
private readonly ISqlSugarClient db;
private readonly IUser user;
private readonly ISaasDbService saasService;
/// <summary>
///
/// </summary>
/// <param name="serviceProvider"></param>
public FeeTemplateDetailService(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<FeeTemplateDetailRes>> GetListByPage(PageRequest request)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
//序列化查询条件
var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
var data = tenantDb.Queryable<FeeTemplateDetail>()
.Where(whereList)
.Select<FeeTemplateDetailRes>().ToQueryPage(request.PageCondition);
return data;
}
/// <summary>
/// 编辑
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
public DataResult EditFeeTemplateDetail(FeeTemplateDetailReq req)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
if (req.Id == 0)
{
if (tenantDb.Queryable<FeeTemplateDetail>()
.Where(x => x.FeeId == req.FeeId && x.CustomerId == req.CustomerId && x.TemplateId == req.TemplateId).Any())
{
return DataResult.Failed("费用模板明细已存在!", MultiLanguageConst.FeeTemplateDetailExist);
}
var data = req.Adapt<FeeTemplateDetail>();
var entity = tenantDb.Insertable(data).ExecuteReturnEntity();
return DataResult.Successed("添加成功!", entity.Id, MultiLanguageConst.DataCreateSuccess);
}
else
{
var info = tenantDb.Queryable<FeeTemplateDetail>().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<FeeTemplateDetailRes> GetFeeTemplateDetailInfo(string id)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var data = tenantDb.Queryable<FeeTemplateDetail>()
.Where(x => x.Id == long.Parse(id))
.Select<FeeTemplateDetailRes>()
.First();
return DataResult<FeeTemplateDetailRes>.Success(data, MultiLanguageConst.DataQuerySuccess);
}
}
}

@ -0,0 +1,98 @@
using DS.Module.Core;
using DS.Module.SqlSugar;
using DS.Module.UserModule;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.Fee.Entity;
using DS.WMS.Core.Fee.Interface;
using DS.WMS.Core.System.Entity;
using Microsoft.Extensions.DependencyInjection;
using SqlSugar;
using Mapster;
using DS.Module.Core.Extensions;
namespace DS.WMS.Core.Fee.Method
{
public class FeeTemplateService: IFeeTemplateService
{
private readonly IServiceProvider _serviceProvider;
private readonly ISqlSugarClient db;
private readonly IUser user;
private readonly ISaasDbService saasService;
/// <summary>
///
/// </summary>
/// <param name="serviceProvider"></param>
public FeeTemplateService(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<FeeTemplateRes>> GetListByPage(PageRequest request)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
//序列化查询条件
var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition);
var data = tenantDb.Queryable<FeeTemplate>()
.Where(whereList)
.Select<FeeTemplateRes>().ToQueryPage(request.PageCondition);
return data;
}
/// <summary>
/// 编辑
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
public DataResult EditFeeTemplate(FeeTemplateReq req)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
if (req.Id == 0)
{
if (tenantDb.Queryable<FeeTemplate>()
.Where(x => x.OpType == req.OpType && x.FeeType == req.FeeType).Any())
{
return DataResult.Failed("费用模板已存在!", MultiLanguageConst.FeeTemplateExist);
}
var data = req.Adapt<FeeTemplate>();
var entity = tenantDb.Insertable(data).ExecuteReturnEntity();
return DataResult.Successed("添加成功!", entity.Id, MultiLanguageConst.DataCreateSuccess);
}
else
{
var info = tenantDb.Queryable<FeeTemplate>().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<FeeTemplateRes> GetFeeTemplateInfo(string id)
{
var tenantDb = saasService.GetBizDbScopeById(user.TenantId);
var data = tenantDb.Queryable<FeeTemplate>()
.Where(x => x.Id == long.Parse(id))
.Select<FeeTemplateRes>()
.First();
return DataResult<FeeTemplateRes>.Success(data, MultiLanguageConst.DataQuerySuccess);
}
}
}

@ -0,0 +1,66 @@
using DS.Module.Core;
using DS.WMS.Core.Code.Dtos;
using DS.WMS.Core.Code.Interface;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.Fee.Interface;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace DS.WMS.FeeApi.Controllers
{
/// <summary>
/// 币别信息服务
/// </summary>
public class FeeCurrencyController : ApiController
{
private readonly IFeeCurrencyService _invokeService;
/// <summary>
/// 构造函数
/// </summary>
/// <param name="invokeService"></param>
public FeeCurrencyController(IFeeCurrencyService invokeService)
{
_invokeService = invokeService;
}
/// <summary>
/// 列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost]
[Route("GetFeeCurrencyList")]
public DataResult<List<FeeCurrencyRes>> GetFeeCurrencyList([FromBody] PageRequest request)
{
var res = _invokeService.GetListByPage(request);
return res;
}
/// <summary>
/// 编辑
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
[HttpPost]
[Route("EditFeeCurrency")]
public DataResult EditFeeCurrency([FromBody] FeeCurrencyReq model)
{
var res = _invokeService.EditFeeCurrency(model);
return res;
}
/// <summary>
/// 详情
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
[Route("GetFeeCurrencyInfo")]
public DataResult<FeeCurrencyRes> GetFeeCurrencyInfo([FromQuery] string id)
{
var res = _invokeService.GetFeeCurrencyInfo(id);
return res;
}
}
}

@ -0,0 +1,66 @@
using DS.Module.Core;
using DS.WMS.Core.Code.Dtos;
using DS.WMS.Core.Code.Interface;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.Fee.Interface;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace DS.WMS.FeeApi.Controllers
{
/// <summary>
/// 汇率设置服务
/// </summary>
public class FeeCurrencyExchangeController : ApiController
{
private readonly IFeeCurrencyExchangeService _invokeService;
/// <summary>
/// 构造函数
/// </summary>
/// <param name="invokeService"></param>
public FeeCurrencyExchangeController(IFeeCurrencyExchangeService invokeService)
{
_invokeService = invokeService;
}
/// <summary>
/// 列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost]
[Route("GetFeeCurrencyExchangeList")]
public DataResult<List<FeeCurrencyExchangeRes>> GetFeeCurrencyExchangeList([FromBody] PageRequest request)
{
var res = _invokeService.GetListByPage(request);
return res;
}
/// <summary>
/// 编辑
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
[HttpPost]
[Route("EditFeeCurrencyExchange")]
public DataResult EditFeeCurrencyExchange([FromBody] FeeCurrencyExchangeReq model)
{
var res = _invokeService.EditFeeCurrencyExchange(model);
return res;
}
/// <summary>
/// 详情
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
[Route("GetFeeCurrencyExchangeInfo")]
public DataResult<FeeCurrencyExchangeRes> GetFeeCurrencyExchangeInfo([FromQuery] string id)
{
var res = _invokeService.GetFeeCurrencyExchangeInfo(id);
return res;
}
}
}

@ -0,0 +1,66 @@
using DS.Module.Core;
using DS.WMS.Core.Code.Dtos;
using DS.WMS.Core.Code.Interface;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.Fee.Interface;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace DS.WMS.FeeApi.Controllers
{
/// <summary>
/// 往来单位固定费用-服务
/// </summary>
public class FeeCustTemplateDetailController : ApiController
{
private readonly IFeeCustTemplateDetailService _invokeService;
/// <summary>
/// 构造函数
/// </summary>
/// <param name="invokeService"></param>
public FeeCustTemplateDetailController(IFeeCustTemplateDetailService invokeService)
{
_invokeService = invokeService;
}
/// <summary>
/// 列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost]
[Route("GetFeeCustTemplateDetailList")]
public DataResult<List<FeeCustTemplateDetailRes>> GetFeeCustTemplateDetailList([FromBody] PageRequest request)
{
var res = _invokeService.GetListByPage(request);
return res;
}
/// <summary>
/// 编辑
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
[HttpPost]
[Route("EditFeeCustTemplateDetail")]
public DataResult EditFeeCustTemplateDetail([FromBody] FeeCustTemplateDetailReq model)
{
var res = _invokeService.EditFeeCustTemplateDetail(model);
return res;
}
/// <summary>
/// 详情
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
[Route("GetFeeCustTemplateDetailInfo")]
public DataResult<FeeCustTemplateDetailRes> GetFeeCustTemplateDetailInfo([FromQuery] string id)
{
var res = _invokeService.GetFeeCustTemplateDetailInfo(id);
return res;
}
}
}

@ -0,0 +1,66 @@
using DS.Module.Core;
using DS.WMS.Core.Code.Dtos;
using DS.WMS.Core.Code.Interface;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.Fee.Interface;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace DS.WMS.FeeApi.Controllers
{
/// <summary>
/// 费用模板服务
/// </summary>
public class FeeTemplateController : ApiController
{
private readonly IFeeTemplateService _invokeService;
/// <summary>
/// 构造函数
/// </summary>
/// <param name="invokeService"></param>
public FeeTemplateController(IFeeTemplateService invokeService)
{
_invokeService = invokeService;
}
/// <summary>
/// 列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost]
[Route("GetFeeTemplateList")]
public DataResult<List<FeeTemplateRes>> GetFeeTemplateList([FromBody] PageRequest request)
{
var res = _invokeService.GetListByPage(request);
return res;
}
/// <summary>
/// 编辑
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
[HttpPost]
[Route("EditFeeTemplate")]
public DataResult EditFeeTemplate([FromBody] FeeTemplateReq model)
{
var res = _invokeService.EditFeeTemplate(model);
return res;
}
/// <summary>
/// 详情
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
[Route("GetFeeTemplateInfo")]
public DataResult<FeeTemplateRes> GetFeeTemplateInfo([FromQuery] string id)
{
var res = _invokeService.GetFeeTemplateInfo(id);
return res;
}
}
}

@ -0,0 +1,66 @@
using DS.Module.Core;
using DS.WMS.Core.Code.Dtos;
using DS.WMS.Core.Code.Interface;
using DS.WMS.Core.Fee.Dtos;
using DS.WMS.Core.Fee.Interface;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
namespace DS.WMS.FeeApi.Controllers
{
/// <summary>
/// 费用模板明细服务
/// </summary>
public class FeeTemplateDetailController : ApiController
{
private readonly IFeeTemplateDetailService _invokeService;
/// <summary>
/// 构造函数
/// </summary>
/// <param name="invokeService"></param>
public FeeTemplateDetailController(IFeeTemplateDetailService invokeService)
{
_invokeService = invokeService;
}
/// <summary>
/// 列表
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
[HttpPost]
[Route("GetFeeTemplateDetailList")]
public DataResult<List<FeeTemplateDetailRes>> GetFeeTemplateDetailList([FromBody] PageRequest request)
{
var res = _invokeService.GetListByPage(request);
return res;
}
/// <summary>
/// 编辑
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
[HttpPost]
[Route("EditFeeTemplateDetail")]
public DataResult EditFeeTemplateDetail([FromBody] FeeTemplateDetailReq model)
{
var res = _invokeService.EditFeeTemplateDetail(model);
return res;
}
/// <summary>
/// 详情
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
[Route("GetFeeTemplateDetailInfo")]
public DataResult<FeeTemplateDetailRes> GetFeeTemplateDetailInfo([FromQuery] string id)
{
var res = _invokeService.GetFeeTemplateDetailInfo(id);
return res;
}
}
}

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<DeleteExistingFiles>false</DeleteExistingFiles>
<ExcludeApp_Data>false</ExcludeApp_Data>
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<PublishProvider>FileSystem</PublishProvider>
<PublishUrl>D:\Code\PublishCopy\ds8-feeapi</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod>
<_TargetId>Folder</_TargetId>
</PropertyGroup>
</Project>

@ -12,13 +12,13 @@ namespace DS.WMS.MainApi.Controllers;
/// </summary>
public class FormCopyController : ApiController
{
private readonly IFormCopyService _invokeService;
private readonly IFeeCurrencyService _invokeService;
/// <summary>
/// 构造函数
/// </summary>
/// <param name="invokeService"></param>
public FormCopyController(IFormCopyService invokeService)
public FormCopyController(IFeeCurrencyService invokeService)
{
_invokeService = invokeService;
}

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project>
<PropertyGroup>
<DeleteExistingFiles>false</DeleteExistingFiles>
<ExcludeApp_Data>false</ExcludeApp_Data>
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<PublishProvider>FileSystem</PublishProvider>
<PublishUrl>D:\Code\PublishCopy\ds8-opapi</PublishUrl>
<WebPublishMethod>FileSystem</WebPublishMethod>
<_TargetId>Folder</_TargetId>
</PropertyGroup>
</Project>

@ -27,7 +27,7 @@ public class SaasTest
{
Type[] types= Assembly
.LoadFrom("DS.WMS.Core.dll")//如果 .dll报错可以换成 xxx.exe 有些生成的是exe
.GetTypes().Where(it=>it.FullName.Contains("DS.WMS.Core.Code.Entity.")||it.FullName.Contains("DS.WMS.Core.Info.Entity.")||it.FullName.Contains("DS.WMS.Core.Sea.Entity."))//命名空间过滤,当然你也可以写其他条件过滤
.GetTypes().Where(it=>it.FullName.Contains("DS.WMS.Core.Code.Entity.")||it.FullName.Contains("DS.WMS.Core.Info.Entity.")||it.FullName.Contains("DS.WMS.Core.Sea.Entity.") || it.FullName.Contains("DS.WMS.Core.Fee.Entity."))//命名空间过滤,当然你也可以写其他条件过滤
.ToArray();
var tenantDb = saasService.GetBizDbScopeById("1750335377144680448");
// var temp = tenantDb.CodeFirst.GetDifferenceTables(types);

Loading…
Cancel
Save