diff --git a/Myshipping.Application/Entity/Fee/FeeCode.cs b/Myshipping.Application/Entity/Fee/FeeCode.cs new file mode 100644 index 00000000..b386b840 --- /dev/null +++ b/Myshipping.Application/Entity/Fee/FeeCode.cs @@ -0,0 +1,155 @@ +using System; +using System.Collections.Generic; +using SqlSugar; +using Myshipping.Core.Entity; +using System.ComponentModel; + +/* + * @author : whm + * @date : 2024-1-22 + * @desc : 费用代码 + */ +namespace Myshipping.Application.Entity +{ + /// + /// 费用代码 + /// + [SugarTable("fee_code", TableDescription = "费用代码")] + public class FeeCode : DBEntityTenant + { + /// + /// 费用代码,录入费用是作为检索 + /// + [SugarColumn(ColumnName = "FeeCode")] + [Description("费用代码,录入费用是作为检索")] + public string Code{ get; set; } + + /// + /// 费用名称 + /// + [SugarColumn(ColumnName = "Name")] + [Description("费用名称")] + public string Name{ get; set; } + + /// + /// 费用英文名称 + /// + [SugarColumn(ColumnName = "Description")] + [Description("费用英文名称")] + public string Description{ get; set; } + + /// + /// 默认币别 + /// + [SugarColumn(ColumnName = "DefaultCurr")] + [Description("默认币别")] + public string DefaultCurr{ get; set; } + + /// + /// 海运 海运相关模块使用 + /// + [SugarColumn(ColumnName = "IsSea")] + [Description("海运 海运相关模块使用")] + public bool IsSea{ get; set; } + + /// + /// 空运 空运相关模块使用 + /// + [SugarColumn(ColumnName = "IsAir")] + [Description("空运 空运相关模块使用")] + public bool IsAir{ get; set; } + + /// + /// 默认计费标准 + /// + [SugarColumn(ColumnName = "DefaultUnit")] + [Description("默认计费标准")] + public string DefaultUnit{ get; set; } + + /// + /// 收费默认 客户类别 + /// + [SugarColumn(ColumnName = "DefaultDebit")] + [Description("收费默认 客户类别")] + public string DefaultDebit{ get; set; } + + /// + /// 付费默认 客户类别 + /// + [SugarColumn(ColumnName = "DefaultCredit")] + [Description("付费默认 客户类别")] + public string DefaultCredit{ get; set; } + + /// + /// 陆运 陆运相关模块使用 + /// + [SugarColumn(ColumnName = "IsTrucking")] + [Description("陆运 陆运相关模块使用")] + public bool IsTrucking{ get; set; } + + /// + /// 仓储 仓储相关模块使用 + /// + [SugarColumn(ColumnName = "IsWMS")] + [Description("仓储 仓储相关模块使用")] + public bool IsWMS{ get; set; } + + /// + /// 费用分组 + /// + [SugarColumn(ColumnName = "FeeGroup")] + [Description("费用分组")] + public string FeeGroup{ get; set; } + + /// + /// 费用默认frt + /// + [SugarColumn(ColumnName = "FeeFrt")] + [Description("费用默认frt")] + public string FeeFrt{ get; set; } + + /// + /// 费用默认税率 + /// + [SugarColumn(ColumnName = "TaxRate")] + [Description("费用默认税率")] + public decimal TaxRate{ get; set; } + + /// + /// 对帐类型 + /// + [SugarColumn(ColumnName = "DuiType")] + [Description("对帐类型")] + public string DuiType{ get; set; } + + /// + /// 默认发票费用名称 + /// + [SugarColumn(ColumnName = "GoodName")] + [Description("默认发票费用名称")] + public string GoodName{ get; set; } + + /// + /// 默认是否机密 + /// + [SugarColumn(ColumnName = "IsOpen")] + [Description("默认是否机密")] + public bool IsOpen{ get; set; } + + /// + /// 默认是否开票 + /// + [SugarColumn(ColumnName = "IsInvoice")] + [Description("默认是否开票")] + public bool IsInvoice{ get; set; } + + + /// + /// 租户名称 + /// + [SugarColumn(ColumnName = "TenantName")] + [Description("租户名称")] + public string TenantName{ get; set; } + + } +} \ No newline at end of file diff --git a/Myshipping.Application/Entity/Fee/FeeCurrency.cs b/Myshipping.Application/Entity/Fee/FeeCurrency.cs new file mode 100644 index 00000000..e4a0dcd5 --- /dev/null +++ b/Myshipping.Application/Entity/Fee/FeeCurrency.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using SqlSugar; +using Myshipping.Core.Entity; +using System.ComponentModel; + +/* + * @author : whm + * @date : 2024-1-22 + * @desc : 币别 + */ +namespace Myshipping.Application.Entity +{ + /// + /// 币别 + /// + [SugarTable("fee_currency", TableDescription = "币别")] + public class FeeCurrency : DBEntityTenant + { + /// + /// 币别代码 + /// + [SugarColumn(ColumnName = "CodeName")] + [Description("币别代码")] + public string CodeName{ get; set; } + + /// + /// 币别名称 + /// + [SugarColumn(ColumnName = "Name")] + [Description("币别名称")] + public string Name{ get; set; } + + /// + /// 描述 + /// + [SugarColumn(ColumnName = "Description")] + [Description("描述")] + public string Description{ get; set; } + + /// + /// 默认对人民币汇率;录入费用时如果汇率设置里没有设置汇率,提此处汇率 + /// + [SugarColumn(ColumnName = "DefaultRate")] + [Description("默认对人民币汇率;录入费用时如果汇率设置里没有设置汇率,提此处汇率")] + public decimal DefaultRate{ get; set; } + + /// + /// 财务软件对应代码 + /// + [SugarColumn(ColumnName = "FinanceSoftCode")] + [Description("财务软件对应代码")] + public string FinanceSoftCode{ get; set; } + + /// + /// 租户名称 + /// + [SugarColumn(ColumnName = "TenantName")] + [Description("租户名称")] + public string TenantName{ get; set; } + + } +} \ No newline at end of file diff --git a/Myshipping.Application/Entity/Fee/FeeCurrencyExchange.cs b/Myshipping.Application/Entity/Fee/FeeCurrencyExchange.cs new file mode 100644 index 00000000..d8cd26c3 --- /dev/null +++ b/Myshipping.Application/Entity/Fee/FeeCurrencyExchange.cs @@ -0,0 +1,77 @@ +using System; +using System.Collections.Generic; +using SqlSugar; +using Myshipping.Core.Entity; +using System.ComponentModel; + +/* + * @author : whm + * @date : 2024-1-22 + * @desc : 汇率 + */ +namespace Myshipping.Application.Entity +{ + /// + /// 汇率 + /// + [SugarTable("fee_currency_exchange", TableDescription = "汇率")] + public class FeeCurrencyExchange : DBEntityTenant + { + /// + /// 币别代码 + /// + [SugarColumn(ColumnName = "Currency")] + [Description("币别代码")] + public string Currency{ get; set; } + + /// + /// 应收汇率 + /// + [SugarColumn(ColumnName = "DrValue")] + [Description("应收汇率")] + public decimal DrValue{ get; set; } + + /// + /// 开始日期 + /// + [SugarColumn(ColumnName = "StartTime")] + [Description("开始日期")] + public DateTime StartTime{ get; set; } + + /// + /// 结束日期 + /// + [SugarColumn(ColumnName = "EndTime")] + [Description("结束日期")] + public DateTime EndTime{ get; set; } + + /// + /// 应付汇率 + /// + [SugarColumn(ColumnName = "CrValue")] + [Description("应付汇率")] + public decimal CrValue{ get; set; } + + /// + /// 本位币 + /// + [SugarColumn(ColumnName = "LocalCurr")] + [Description("本位币")] + public string LocalCurr{ get; set; } + + /// + /// 备注 + /// + [SugarColumn(ColumnName = "Remark")] + [Description("备注")] + public string Remark{ get; set; } + + /// + /// 租户名称 + /// + [SugarColumn(ColumnName = "TenantName")] + [Description("租户名称")] + public string TenantName{ get; set; } + + } +} \ No newline at end of file diff --git a/Myshipping.Application/Entity/Fee/FeeCustTemplateDetail.cs b/Myshipping.Application/Entity/Fee/FeeCustTemplateDetail.cs new file mode 100644 index 00000000..b92a2ef6 --- /dev/null +++ b/Myshipping.Application/Entity/Fee/FeeCustTemplateDetail.cs @@ -0,0 +1,119 @@ +using System; +using System.Collections.Generic; +using SqlSugar; +using Myshipping.Core.Entity; +using System.ComponentModel; + +/* + * @author : whm + * @date : 2024-1-22 + * @desc : 往来单位固定费用 + */ +namespace Myshipping.Application.Entity +{ + /// + /// 往来单位固定费用 + /// + [SugarTable("fee_cust_template_detail", TableDescription = "往来单位固定费用")] + public class FeeCustTemplateDetail : DBEntityTenant + { + /// + /// 费用名称 + /// + [SugarColumn(ColumnName = "FeeName")] + [Description("费用名称")] + public string FeeName{ get; set; } + + /// + /// 客户名称 + /// + [SugarColumn(ColumnName = "CustomerName")] + [Description("客户名称")] + public string CustomerName{ get; set; } + + /// + /// 费用标准 + /// + [SugarColumn(ColumnName = "Unit")] + [Description("费用标准")] + public string Unit{ get; set; } + + /// + /// 币别 + /// + [SugarColumn(ColumnName = "Currency")] + [Description("币别")] + public string Currency{ get; set; } + + /// + /// 单价 + /// + [SugarColumn(ColumnName = "UnitPrice")] + [Description("单价")] + public decimal UnitPrice{ get; set; } + + /// + /// 备注 + /// + [SugarColumn(ColumnName = "Remark")] + [Description("备注")] + public string Remark{ get; set; } + + /// + /// 排序号 + /// + [SugarColumn(ColumnName = "Sort")] + [Description("排序号")] + public int Sort{ get; set; } + + /// + /// 汇率 + /// + [SugarColumn(ColumnName = "ExchangeRate")] + [Description("汇率")] + public decimal ExchangeRate{ get; set; } + + /// + /// 是否开票 + /// + [SugarColumn(ColumnName = "IsInvoice")] + [Description("是否开票")] + public bool IsInvoice{ get; set; } + + /// + /// 是否垫付 + /// + [SugarColumn(ColumnName = "IsAdvancedPay")] + [Description("是否垫付")] + public bool IsAdvancedPay{ get; set; } + + /// + /// Frt PP CC + /// + [SugarColumn(ColumnName = "FeeFrt")] + [Description("Frt PP CC")] + public string FeeFrt{ get; set; } + + /// + /// 税率 + /// + [SugarColumn(ColumnName = "TaxRate")] + [Description("税率")] + public decimal TaxRate{ get; set; } + + /// + /// 财务税率 + /// + [SugarColumn(ColumnName = "AccTaxRate")] + [Description("财务税率")] + public decimal AccTaxRate{ get; set; } + + /// + /// 租户名称 + /// + [SugarColumn(ColumnName = "TenantName")] + [Description("租户名称")] + public string TenantName{ get; set; } + + } +} \ No newline at end of file diff --git a/Myshipping.Application/Entity/Fee/FeeRecord.cs b/Myshipping.Application/Entity/Fee/FeeRecord.cs new file mode 100644 index 00000000..4a6407e5 --- /dev/null +++ b/Myshipping.Application/Entity/Fee/FeeRecord.cs @@ -0,0 +1,427 @@ +using System; +using System.Collections.Generic; +using SqlSugar; +using Myshipping.Core.Entity; +using System.ComponentModel; + +/* + * @author : whm + * @date : 2024-1-22 + * @desc : 费用记录 + */ +namespace Myshipping.Application.Entity +{ + /// + /// 费用记录 + /// + [SugarTable("fee_record", TableDescription = "费用记录")] + public class FeeRecord : DBEntityTenant + { + /// + /// 业务ID + /// + [SugarColumn(ColumnName = "BussId")] + [Description("业务ID")] + public long BussId{ get; set; } + + /// + /// 收付类型 + /// + [SugarColumn(ColumnName = "FeeType")] + [Description("收付类型")] + public string FeeType{ get; set; } + + /// + /// 费用名称 + /// + [SugarColumn(ColumnName = "FeeName")] + [Description("费用名称")] + public string FeeName{ get; set; } + + /// + /// 费用英文名称 + /// + [SugarColumn(ColumnName = "FeeDescription")] + [Description("费用英文名称")] + public string FeeDescription{ get; set; } + + /// + /// 客户类别 + /// + [SugarColumn(ColumnName = "CustomerType")] + [Description("客户类别")] + public string CustomerType{ get; set; } + + /// + /// 费用对象 + /// + [SugarColumn(ColumnName = "CustomerName")] + [Description("费用对象")] + public string CustomerName{ get; set; } + + /// + /// 费用标准 + /// + [SugarColumn(ColumnName = "Unit")] + [Description("费用标准")] + public string Unit{ get; set; } + + /// + /// 单价 + /// + [SugarColumn(ColumnName = "UnitPrice")] + [Description("单价")] + public decimal UnitPrice{ get; set; } + + /// + /// 数量 + /// + [SugarColumn(ColumnName = "Quantity")] + [Description("数量")] + public decimal Quantity{ get; set; } + + /// + /// 金额 + /// + [SugarColumn(ColumnName = "Amount")] + [Description("金额 ")] + public decimal Amount{ get; set; } + + /// + /// 币别 + /// + [SugarColumn(ColumnName = "Currency")] + [Description("币别 ")] + public string Currency{ get; set; } + + /// + /// 汇率 + /// + [SugarColumn(ColumnName = "ExchangeRate")] + [Description("汇率")] + public decimal ExchangeRate{ get; set; } + + /// + /// 驳回原因 + /// + [SugarColumn(ColumnName = "Reason")] + [Description("驳回原因 ")] + public string Reason{ get; set; } + + /// + /// 备注 + /// + [SugarColumn(ColumnName = "Remark")] + [Description("备注 ")] + public string Remark{ get; set; } + + /// + /// 佣金比率 + /// + [SugarColumn(ColumnName = "CommissionRate")] + [Description("佣金比率 ")] + public decimal CommissionRate{ get; set; } + + /// + /// 结算金额 + /// + [SugarColumn(ColumnName = "Settlement")] + [Description("结算金额 ")] + public decimal Settlement{ get; set; } + + /// + /// 开票金额 + /// + [SugarColumn(ColumnName = "Invoice")] + [Description("开票金额 ")] + public decimal Invoice{ get; set; } + + /// + /// 申请金额 + /// + [SugarColumn(ColumnName = "Orderamount")] + [Description("申请金额 ")] + public decimal Orderamount{ get; set; } + + /// + /// 申请开票金额 + /// + [SugarColumn(ColumnName = "Orderinvoice")] + [Description("申请开票金额 ")] + public decimal Orderinvoice{ get; set; } + + /// + /// 提交日期 + /// + [SugarColumn(ColumnName = "Submitdate")] + [Description("提交日期 ")] + public DateTime Submitdate{ get; set; } + + /// + /// 审核人 + /// + [SugarColumn(ColumnName = "AuditOperator")] + [Description("审核人 ")] + public string AuditOperator{ get; set; } + + /// + /// 审核日期 + /// + [SugarColumn(ColumnName = "AuditDate")] + [Description("审核日期 ")] + public DateTime AuditDate{ get; set; } + + /// + /// 对帐编号 + /// + [SugarColumn(ColumnName = "DebitNO")] + [Description("对帐编号 ")] + public string DebitNO{ get; set; } + + /// + /// 是否对帐 + /// + [SugarColumn(ColumnName = "IsDebit")] + [Description("是否对帐 ")] + public bool IsDebit{ get; set; } + + /// + /// 是否机密费用 + /// + [SugarColumn(ColumnName = "IsOpen")] + [Description("是否机密费用 ")] + public bool IsOpen{ get; set; } + + /// + /// 是否垫付 + /// + [SugarColumn(ColumnName = "IsAdvancedPay")] + [Description("是否垫付 ")] + public bool IsAdvancedPay{ get; set; } + + /// + /// 顺序号 + /// + [SugarColumn(ColumnName = "Sort")] + [Description("顺序号 ")] + public int Sort{ get; set; } + + /// + /// 是否禁开发票 + /// + [SugarColumn(ColumnName = "IsInvoice")] + [Description("是否禁开发票 ")] + public bool IsInvoice{ get; set; } + + /// + /// 费用状态 + /// + [SugarColumn(ColumnName = "FeeStatus")] + [Description("费用状态 ")] + public string FeeStatus{ get; set; } + + /// + /// Frt + /// + [SugarColumn(ColumnName = "FeeFrt")] + [Description("Frt ")] + public string FeeFrt{ get; set; } + + /// + /// 是否销售订舱 + /// + [SugarColumn(ColumnName = "IsCrmOrderFee")] + [Description("是否销售订舱 ")] + public bool IsCrmOrderFee{ get; set; } + + /// + /// 发票号 + /// + [SugarColumn(ColumnName = "InvoiceNum")] + [Description("发票号 ")] + public string InvoiceNum{ get; set; } + + /// + /// 支票号 + /// + [SugarColumn(ColumnName = "ChequeNum")] + [Description("支票号 ")] + public string ChequeNum{ get; set; } + + /// + /// 仓储编号 + /// + [SugarColumn(ColumnName = "WmsOutBSNO")] + [Description("仓储编号 ")] + public string WmsOutBSNO{ get; set; } + + /// + /// 行号 + /// + [SugarColumn(ColumnName = "LineNum")] + [Description("行号 ")] + public int LineNum{ get; set; } + + /// + /// 税率 + /// + [SugarColumn(ColumnName = "TaxRate")] + [Description("税率 ")] + public decimal TaxRate{ get; set; } + + /// + /// 不含税金额 + /// + [SugarColumn(ColumnName = "NoTaxAmount")] + [Description("不含税金额 ")] + public decimal NoTaxAmount{ get; set; } + + /// + /// 财务税率 + /// + [SugarColumn(ColumnName = "AccTaxRate")] + [Description("财务税率 ")] + public decimal AccTaxRate{ get; set; } + + /// + /// 是否生成凭证 + /// + [SugarColumn(ColumnName = "IsVou")] + [Description("是否生成凭证 ")] + public bool IsVou{ get; set; } + + /// + /// 报销编号 + /// + [SugarColumn(ColumnName = "BxId")] + [Description("报销编号 ")] + public string BxId{ get; set; } + + /// + /// 税额 + /// + [SugarColumn(ColumnName = "Tax")] + [Description("税额 ")] + public decimal Tax{ get; set; } + + /// + /// 申请结算金额 + /// + [SugarColumn(ColumnName = "OrderSettlement")] + [Description("申请结算金额 ")] + public decimal OrderSettlement{ get; set; } + + /// + /// 含税单价 + /// + [SugarColumn(ColumnName = "TaxUnitPrice")] + [Description("含税单价 ")] + public decimal TaxUnitPrice{ get; set; } + + /// + /// 申请发票开票金额 + /// + [SugarColumn(ColumnName = "OrderInvSettlement")] + [Description("申请发票开票金额 ")] + public decimal OrderInvSettlement{ get; set; } + + /// + /// 凭证号 + /// + [SugarColumn(ColumnName = "VouallNO")] + [Description("凭证号 ")] + public string VouallNO{ get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "SalesNO")] + [Description("")] + public string SalesNO{ get; set; } + + /// + /// 借款编号 + /// + [SugarColumn(ColumnName = "JkId")] + [Description("借款编号 ")] + public string JkId{ get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "DeliveryNO")] + [Description("")] + public string DeliveryNO{ get; set; } + + /// + /// 本位币 + /// + [SugarColumn(ColumnName = "LocalCurr")] + [Description("本位币")] + public string LocalCurr{ get; set; } + + /// + /// 责任人 + /// + [SugarColumn(ColumnName = "Manager")] + [Description("责任人")] + public string Manager{ get; set; } + + /// + /// 是否财务费用 + /// + [SugarColumn(ColumnName = "IsAcc")] + [Description("是否财务费用")] + public bool IsAcc{ get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "PaymentId")] + [Description("")] + public string PaymentId{ get; set; } + + /// + /// + /// + [SugarColumn(ColumnName = "StatementNO")] + [Description("")] + public string StatementNO{ get; set; } + + /// + /// 核算单位 + /// + [SugarColumn(ColumnName = "SaleCorp")] + [Description("核算单位")] + public string SaleCorp{ get; set; } + + /// + /// 财务税率 + /// + [SugarColumn(ColumnName = "AccTax")] + [Description("财务税率")] + public decimal AccTax{ get; set; } + + /// + /// 发票自助连接 + /// + [SugarColumn(ColumnName = "InvLinkId")] + [Description("发票自助连接")] + public string InvLinkId{ get; set; } + + /// + /// 提交人 + /// + [SugarColumn(ColumnName = "SubmitOp")] + [Description("提交人")] + public string SubmitOp{ get; set; } + + /// + /// 租户名称 + /// + [SugarColumn(ColumnName = "TenantName")] + [Description("租户名称")] + public string TenantName{ get; set; } + + } +} \ No newline at end of file diff --git a/Myshipping.Application/Entity/Fee/FeeRecordBusiness.cs b/Myshipping.Application/Entity/Fee/FeeRecordBusiness.cs new file mode 100644 index 00000000..44a41faf --- /dev/null +++ b/Myshipping.Application/Entity/Fee/FeeRecordBusiness.cs @@ -0,0 +1,182 @@ +using System; +using System.Collections.Generic; +using SqlSugar; +using Myshipping.Core.Entity; +using System.ComponentModel; + +/* + * @author : whm + * @date : 2024-1-22 + * @desc : 费用业务信息 + */ +namespace Myshipping.Application.Entity +{ + /// + /// 费用业务信息 + /// + [SugarTable("fee_record_business", TableDescription = "费用业务信息")] + public class FeeRecordBusiness : DBEntityTenant + { + /// + /// 业务编号 + /// + [SugarColumn(ColumnName = "BSNO")] + [Description("业务编号")] + public string BSNO{ get; set; } + + /// + /// 主提单号 + /// + [SugarColumn(ColumnName = "MBLNO")] + [Description("主提单号")] + public string MBLNO{ get; set; } + + /// + /// 分提单号 + /// + [SugarColumn(ColumnName = "HBLNO")] + [Description("分提单号")] + public string HBLNO{ get; set; } + + /// + /// 船名 + /// + [SugarColumn(ColumnName = "VESSEL")] + [Description("船名")] + public string VESSEL{ get; set; } + + /// + /// 海关航次 + /// + [SugarColumn(ColumnName = "VOYNO")] + [Description("海关航次")] + public string VOYNO{ get; set; } + + /// + /// 内部航次 + /// + [SugarColumn(ColumnName = "VOYNOINNER")] + [Description("内部航次")] + public string VOYNOINNER{ get; set; } + + /// + /// 开船日期 + /// + [SugarColumn(ColumnName = "ETD")] + [Description("开船日期")] + public DateTime ETD{ get; set; } + + /// + /// 收货地代码 + /// + [SugarColumn(ColumnName = "PLACERECEIPTID")] + [Description("收货地代码")] + public string PLACERECEIPTID{ get; set; } + + /// + /// 收货地 + /// + [SugarColumn(ColumnName = "PLACERECEIPT")] + [Description("收货地")] + public string PLACERECEIPT{ get; set; } + + /// + /// 起运港代码 + /// + [SugarColumn(ColumnName = "PORTLOADID")] + [Description("起运港代码")] + public string PORTLOADID{ get; set; } + + /// + /// 起运港 + /// + [SugarColumn(ColumnName = "PORTLOAD")] + [Description("起运港")] + public string PORTLOAD{ get; set; } + + /// + /// 卸货港代码 + /// + [SugarColumn(ColumnName = "PORTDISCHARGEID")] + [Description("卸货港代码")] + public string PORTDISCHARGEID{ get; set; } + + /// + /// 卸货港 + /// + [SugarColumn(ColumnName = "PORTDISCHARGE")] + [Description("卸货港")] + public string PORTDISCHARGE{ get; set; } + + /// + /// 交货地代码 + /// + [SugarColumn(ColumnName = "PLACEDELIVERYID")] + [Description("交货地代码")] + public string PLACEDELIVERYID{ get; set; } + + /// + /// 交货地 + /// + [SugarColumn(ColumnName = "PLACEDELIVERY")] + [Description("交货地")] + public string PLACEDELIVERY{ get; set; } + + /// + /// 目的地代码 + /// + [SugarColumn(ColumnName = "DESTINATIONID")] + [Description("目的地代码")] + public string DESTINATIONID{ get; set; } + + /// + /// 目的地 + /// + [SugarColumn(ColumnName = "DESTINATION")] + [Description("目的地")] + public string DESTINATION{ get; set; } + + /// + /// 件数 + /// + [SugarColumn(ColumnName = "PKGS")] + [Description("件数")] + public int PKGS{ get; set; } + + /// + /// 包装 + /// + [SugarColumn(ColumnName = "KINDPKGS")] + [Description("包装")] + public string KINDPKGS{ get; set; } + + /// + /// 毛重 + /// + [SugarColumn(ColumnName = "KGS")] + [Description("毛重")] + public decimal KGS{ get; set; } + + /// + /// 尺码 + /// + [SugarColumn(ColumnName = "CBM")] + [Description("尺码")] + public decimal CBM{ get; set; } + + /// + /// 集装箱 + /// + [SugarColumn(ColumnName = "CNTRTOTAL")] + [Description("集装箱")] + public string CNTRTOTAL{ get; set; } + + /// + /// 租户名称 + /// + [SugarColumn(ColumnName = "TenantName")] + [Description("租户名称")] + public string TenantName{ get; set; } + + } +} \ No newline at end of file diff --git a/Myshipping.Application/Entity/Fee/FeeTemplate.cs b/Myshipping.Application/Entity/Fee/FeeTemplate.cs new file mode 100644 index 00000000..5e2b46b4 --- /dev/null +++ b/Myshipping.Application/Entity/Fee/FeeTemplate.cs @@ -0,0 +1,84 @@ +using System; +using System.Collections.Generic; +using SqlSugar; +using Myshipping.Core.Entity; +using System.ComponentModel; + +/* + * @author : whm + * @date : 2024-1-22 + * @desc : 费用模板 + */ +namespace Myshipping.Application.Entity +{ + /// + /// 费用模板 + /// + [SugarTable("fee_template", TableDescription = "费用模板")] + public class FeeTemplate : DBEntityTenant + { + /// + /// 业务类型 + /// + [SugarColumn(ColumnName = "OpType")] + [Description("业务类型")] + public string OpType{ get; set; } + + /// + /// 收付类型(收、付) + /// + [SugarColumn(ColumnName = "FeeType")] + [Description("收付类型(收、付)")] + public string FeeType{ get; set; } + + /// + /// 费用模板名称 + /// + [SugarColumn(ColumnName = "Name")] + [Description("费用模板名称")] + public string Name{ get; set; } + + /// + /// 费用模板描述 + /// + [SugarColumn(ColumnName = "Description")] + [Description("费用模板描述")] + public string Description{ get; set; } + + /// + /// 备注 + /// + [SugarColumn(ColumnName = "Remark")] + [Description("备注")] + public string Remark{ get; set; } + + /// + /// 是否公共 + /// + [SugarColumn(ColumnName = "IsPublic")] + [Description("是否公共")] + public bool IsPublic{ get; set; } + + /// + /// 开始时间 + /// + [SugarColumn(ColumnName = "BgnDate")] + [Description("开始时间")] + public DateTime BgnDate{ get; set; } + + /// + /// 结束时间 + /// + [SugarColumn(ColumnName = "EndDate")] + [Description("结束时间")] + public DateTime EndDate{ get; set; } + + /// + /// 租户名称 + /// + [SugarColumn(ColumnName = "TenantName")] + [Description("租户名称")] + public string TenantName{ get; set; } + + } +} \ No newline at end of file diff --git a/Myshipping.Application/Entity/Fee/FeeTemplateDetail.cs b/Myshipping.Application/Entity/Fee/FeeTemplateDetail.cs new file mode 100644 index 00000000..97c7e051 --- /dev/null +++ b/Myshipping.Application/Entity/Fee/FeeTemplateDetail.cs @@ -0,0 +1,182 @@ +using System; +using System.Collections.Generic; +using SqlSugar; +using Myshipping.Core.Entity; +using System.ComponentModel; + +/* + * @author : whm + * @date : 2024-1-22 + * @desc : 费用模板明细 + */ +namespace Myshipping.Application.Entity +{ + /// + /// 费用模板明细 + /// + [SugarTable("fee_template_detail", TableDescription = "费用模板明细")] + public class FeeTemplateDetail : DBEntityTenant + { + /// + /// 模板ID + /// + [SugarColumn(ColumnName = "TemplateID")] + [Description("模板ID")] + public long TemplateID{ get; set; } + + /// + /// 费用名称;取【费用代码】 中的费用名称,录入是可以 通过过费用代码、费用名称检索 + /// + [SugarColumn(ColumnName = "FeeName")] + [Description("费用名称;取【费用代码】 中的费用名称,录入是可以 通过过费用代码、费用名称检索")] + public string FeeName{ get; set; } + + /// + /// 费用对象;可以为空,为空时 录入费用按客户类型提取业务数据费用对象 + /// + [SugarColumn(ColumnName = "CustomerName")] + [Description("费用对象;可以为空,为空时 录入费用按客户类型提取业务数据费用对象")] + public string CustomerName{ get; set; } + + /// + /// 客户类别;可枚举维护、(船公司、委托单位、场站、车队等) + /// + [SugarColumn(ColumnName = "CustType")] + [Description("客户类别;可枚举维护、(船公司、委托单位、场站、车队等)")] + public string CustType{ get; set; } + + /// + /// 费用标准;枚举维护加所有箱型 + /// + [SugarColumn(ColumnName = "Unit")] + [Description("费用标准;枚举维护加所有箱型")] + public string Unit{ get; set; } + + /// + /// 币别;可以录入汇率(数值)或选择按【汇率设置】中提取汇率 + /// + [SugarColumn(ColumnName = "Currency")] + [Description("币别;可以录入汇率(数值)或选择按【汇率设置】中提取汇率")] + public string Currency{ get; set; } + + /// + /// 单价 + /// + [SugarColumn(ColumnName = "UnitPrice")] + [Description("单价")] + public decimal UnitPrice{ get; set; } + + /// + /// 备注 + /// + [SugarColumn(ColumnName = "Remark")] + [Description("备注")] + public string Remark{ get; set; } + + /// + /// 排序号 + /// + [SugarColumn(ColumnName = "Sort")] + [Description("排序号")] + public int Sort{ get; set; } + + /// + /// 收付类别(收、付) + /// + [SugarColumn(ColumnName = "FeeType")] + [Description("收付类别(收、付)")] + public string FeeType{ get; set; } + + /// + /// 汇率;可以选择 本公司中的 各分公司 + /// + [SugarColumn(ColumnName = "ExchangeRate")] + [Description("汇率;可以选择 本公司中的 各分公司")] + public decimal ExchangeRate{ get; set; } + + /// + /// 是否按箱型;如果选择了否,则假如前面标准选择了以 20GP为标准,则在调用时不管业务信息里有无20GP的箱子,都是以20GP为标准,有20GP的则调用其数量,没有20GP的,则生成一条标准为20GP数量为0的费用;如果选择了是,则只有当业务信息里有 20GP这种箱型时,才调用这条费用 + /// + [SugarColumn(ColumnName = "IsCtn")] + [Description("是否按箱型")] + public bool IsCtn{ get; set; } + + /// + /// 是否开票 + /// + [SugarColumn(ColumnName = "IsInvoice")] + [Description("是否开票")] + public bool IsInvoice{ get; set; } + + /// + /// 是否垫付 + /// + [SugarColumn(ColumnName = "IsAdvancedPay")] + [Description("是否垫付")] + public bool IsAdvancedPay{ get; set; } + + /// + /// 费用FRT;PP,CC + /// + [SugarColumn(ColumnName = "FeeFrt")] + [Description("费用FRT;PP,CC")] + public string FeeFrt{ get; set; } + + /// + /// 税率;含税单价=单价*(1+(税率/100))录入单价或税率自动计算 含税单价 + /// + [SugarColumn(ColumnName = "TaxRate")] + [Description("税率;含税单价=单价*(1+(税率/100))录入单价或税率自动计算 含税单价")] + public decimal TaxRate{ get; set; } + + /// + /// 税额 + /// + [SugarColumn(ColumnName = "Tax")] + [Description("税额")] + public decimal Tax{ get; set; } + + /// + /// 核算单位 + /// + [SugarColumn(ColumnName = "SaleCorp")] + [Description("核算单位")] + public string SaleCorp{ get; set; } + + /// + /// 含税单价 + /// + [SugarColumn(ColumnName = "TaxUnitPrice")] + [Description("含税单价")] + public decimal TaxUnitPrice{ get; set; } + + /// + /// 财务税率 + /// + [SugarColumn(ColumnName = "AccTaxRate")] + [Description("财务税率")] + public decimal AccTaxRate{ get; set; } + + /// + /// 费用英文名称;录入费用名称时,自动带出【费用代码】的 费用英文名称 + /// + [SugarColumn(ColumnName = "FeeDescription")] + [Description("费用英文名称;录入费用名称时,自动带出【费用代码】的 费用英文名称")] + public string FeeDescription{ get; set; } + + /// + /// 费用分组;枚举中设置的 费用分组 + /// + [SugarColumn(ColumnName = "FeeGroup")] + [Description("费用分组;枚举中设置的 费用分组")] + public string FeeGroup{ get; set; } + + /// + /// 租户名称 + /// + [SugarColumn(ColumnName = "TenantName")] + [Description("租户名称")] + public string TenantName{ get; set; } + + } +} \ No newline at end of file diff --git a/Myshipping.Application/Myshipping.Application.csproj b/Myshipping.Application/Myshipping.Application.csproj index 92ba3f52..8b9c5aa3 100644 --- a/Myshipping.Application/Myshipping.Application.csproj +++ b/Myshipping.Application/Myshipping.Application.csproj @@ -48,6 +48,7 @@ + diff --git a/Myshipping.Application/Service/Fee/Dto/FeeCodeDto.cs b/Myshipping.Application/Service/Fee/Dto/FeeCodeDto.cs new file mode 100644 index 00000000..cd70450d --- /dev/null +++ b/Myshipping.Application/Service/Fee/Dto/FeeCodeDto.cs @@ -0,0 +1,143 @@ +using Myshipping.Core; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Myshipping.Application.Service.Fee.Dto +{ + public class FeeCodeDto + { + /// + /// ID + /// + public long Id { get; set; } + + /// + /// 费用代码,录入费用是作为检索 + /// + public string Code { get; set; } + + /// + /// 费用名称 + /// + public string Name { get; set; } + + /// + /// 费用英文名称 + /// + public string Description { get; set; } + + /// + /// 默认币别 + /// + public string DefaultCurr { get; set; } + + /// + /// 海运 海运相关模块使用 + /// + public bool IsSea { get; set; } + + /// + /// 空运 空运相关模块使用 + /// + public bool IsAir { get; set; } + + /// + /// 默认计费标准 + /// + public string DefaultUnit { get; set; } + + /// + /// 收费默认 客户类别 + /// + public string DefaultDebit { get; set; } + + /// + /// 付费默认 客户类别 + /// + public string DefaultCredit { get; set; } + + /// + /// 陆运 陆运相关模块使用 + /// + public bool IsTrucking { get; set; } + + /// + /// 仓储 仓储相关模块使用 + /// + public bool IsWMS { get; set; } + + /// + /// 费用分组 + /// + public string FeeGroup { get; set; } + + /// + /// 费用默认frt + /// + public string FeeFrt { get; set; } + + /// + /// 费用默认税率 + /// + public decimal TaxRate { get; set; } + + /// + /// 对帐类型 + /// + public string DuiType { get; set; } + + /// + /// 默认发票费用名称 + /// + public string GoodName { get; set; } + + /// + /// 默认是否机密 + /// + public bool IsOpen { get; set; } + + /// + /// 默认是否开票 + /// + public bool IsInvoice { get; set; } + + } + + /// + /// 查询 + /// + public class FeeCodePageInput: PageInputBase + { + /// + /// 费用代码,录入费用是作为检索 + /// + public string Code { get; set; } + + /// + /// 费用名称 + /// + public string Name { get; set; } + + } + + /// + /// 台账列表 + /// + public class FeeCodePageOutput: FeeCodeDto + { + + } + + /// + /// 保存 + /// + public class FeeCodeSaveDto: FeeCodeDto + { + + } +} diff --git a/Myshipping.Application/Service/Fee/FeeCodeService.cs b/Myshipping.Application/Service/Fee/FeeCodeService.cs new file mode 100644 index 00000000..bd256b34 --- /dev/null +++ b/Myshipping.Application/Service/Fee/FeeCodeService.cs @@ -0,0 +1,134 @@ +using Furion; +using Furion.DependencyInjection; +using Furion.DynamicApiController; +using Furion.EventBus; +using Furion.FriendlyException; +using Furion.LinqBuilder; +using Mapster; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Logging; +using Myshipping.Application.ConfigOption; +using Myshipping.Application.Entity; +using Myshipping.Application.Event; +using Myshipping.Application.Service.BookingOrder.Dto; +using Myshipping.Application.Service.BookingSlot.Dto; +using Myshipping.Application.Service.Fee.Dto; +using Myshipping.Core; +using Myshipping.Core.Service; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Yitter.IdGenerator; + + +namespace Myshipping.Application +{ + /// + /// 费用代码 + /// + [ApiDescriptionSettings("Application", Name = "FeeCode", Order = 1)] + public class FeeCodeService : IDynamicApiController, ITransient + { + private readonly SqlSugarRepository _repCode; + + private readonly ILogger _logger; + private readonly ISysCacheService _cache; + + private readonly IEventPublisher _publisher; + + public FeeCodeService(SqlSugarRepository repCode, + ILogger logger, + ISysCacheService cache, + IEventPublisher publisher) + { + _repCode = repCode; + + _logger = logger; + _cache = cache; + + _publisher = publisher; + } + + /// + /// 费用代码查询 + /// + /// + /// + [HttpPost("/FeeCode/Page")] + public async Task Page(FeeCodePageInput input) + { + var entities = await _repCode.AsQueryable() + .WhereIF(!string.IsNullOrEmpty(input.Code), u => u.Code.Contains(input.Code)) + .WhereIF(!string.IsNullOrEmpty(input.Name), u => u.Name.Contains(input.Name)) + .ToPagedListAsync(input.PageNo, input.PageSize); + + var result = entities.Adapt>(); + + return result.XnPagedResult(); + } + + /// + /// 保存 + /// + /// + /// + [HttpPost("/FeeCode/Save")] + public async Task Save(FeeCodeSaveDto input) + { + if (input == null) + { + throw Oops.Bah("请传入正常数据!"); + } + + FeeCode entity = null; + if (input.Id == 0) + { + entity = input.Adapt(); + entity.Id = YitIdHelper.NextId(); + await _repCode.InsertAsync(entity); + + } + else + { + entity = await _repCode.AsQueryable().Filter(null, true).FirstAsync(x => x.Id == input.Id); + entity = input.Adapt(entity); + await _repCode.UpdateAsync(entity); + } + + return entity.Adapt(); + } + + /// + /// 获取详情 + /// + /// + /// + [HttpGet("/FeeCode/Detail")] + public async Task Detail(long id) + { + var entity = await _repCode.AsQueryable().Filter(null, true).FirstAsync(x => x.Id == id); + + return entity.Adapt(); + } + + + /// + /// 删除 + /// + /// + /// + [HttpPost("/FeeCode/Delete")] + public async Task Delete(List ids) + { + var list = await _repCode.AsQueryable().Filter(null, true).Where(x => ids.Contains(x.Id)).ToListAsync(); + list.ForEach(x => x.IsDeleted = true); + await _repCode.AsUpdateable(list).ExecuteCommandAsync(); + } + } +}