From b53dacf7cfcc8a2b18baeb784eb9a205ad47ecde Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Wed, 14 Aug 2024 08:58:26 +0800 Subject: [PATCH 01/10] =?UTF-8?q?[feat]=E9=94=80=E5=94=AE=E7=AE=A1?= =?UTF-8?q?=E7=90=86=20=E8=B4=A2=E5=8A=A1=E7=AE=A1=E7=90=86=20=E5=9B=BD?= =?UTF-8?q?=E7=A8=8E=E5=8F=91=E7=A5=A8=E5=AE=9E=E4=BD=93=E7=B1=BB=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=BC=80=E7=A5=A8=E9=87=91=E9=A2=9D=E7=BE=8E?= =?UTF-8?q?=E5=85=83=E5=AD=97=E6=AE=B5=EF=BC=8C=E4=BF=AE=E6=94=B9=E5=BC=80?= =?UTF-8?q?=E7=A5=A8=E9=87=91=E9=A2=9D=E4=BA=BA=E6=B0=91=E5=B8=81=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=20=E4=BF=AE=E6=94=B9=E5=9B=BD=E7=A8=8E=E5=8F=91?= =?UTF-8?q?=E7=A5=A8=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3=EF=BC=9A=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=BC=80=E7=A5=A8=E9=87=91=E9=A2=9D=E7=BE=8E=E5=85=83?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=EF=BC=8C=E4=BF=AE=E6=94=B9=E5=BC=80=E7=A5=A8?= =?UTF-8?q?=E9=87=91=E9=A2=9D=E4=BA=BA=E6=B0=91=E5=B8=81=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=20=E4=BF=AE=E6=94=B9=E5=9B=BD=E7=A8=8E=E5=8F=91=E7=A5=A8?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8E=A5=E5=8F=A3=EF=BC=9A=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E5=BC=80=E7=A5=A8=E9=87=91=E9=A2=9D=E7=BE=8E=E5=85=83=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=EF=BC=8C=E4=BF=AE=E6=94=B9=E5=BC=80=E7=A5=A8=E9=87=91?= =?UTF-8?q?=E9=A2=9D=E4=BA=BA=E6=B0=91=E5=B8=81=E5=AD=97=E6=AE=B5=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9B=BD=E7=A8=8E=E5=8F=91=E7=A5=A8=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=8E=A5=E5=8F=A3=EF=BC=9A=E6=96=B0=E5=A2=9E=E5=BC=80?= =?UTF-8?q?=E7=A5=A8=E9=87=91=E9=A2=9D=E7=BE=8E=E5=85=83=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E6=94=B9=E5=BC=80=E7=A5=A8=E9=87=91=E9=A2=9D?= =?UTF-8?q?=E4=BA=BA=E6=B0=91=E5=B8=81=E5=AD=97=E6=AE=B5=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=BC=80=E7=A5=A8-=E5=9B=BD=E5=86=85=E5=85=AC?= =?UTF-8?q?=E5=8F=B8=E5=89=8D=E7=AB=AF=E5=88=97=E8=A1=A8=EF=BC=9A=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=BC=80=E7=A5=A8=E9=87=91=E9=A2=9D=E4=BA=BA=E6=B0=91?= =?UTF-8?q?=E5=B8=81=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../financial/domain/FinancialTaxInvoice.java | 37 +++++++++++++------ .../financial/FinancialTaxInvoiceMapper.xml | 14 ++++--- .../system/salesOrder/makeInvoiceRMB.html | 4 +- 3 files changed, 37 insertions(+), 18 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/financial/domain/FinancialTaxInvoice.java b/ruoyi-admin/src/main/java/com/ruoyi/financial/domain/FinancialTaxInvoice.java index 14e14bd9..ac8e9a8d 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/financial/domain/FinancialTaxInvoice.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/financial/domain/FinancialTaxInvoice.java @@ -130,8 +130,12 @@ public class FinancialTaxInvoice extends BaseEntity @Excel(name = "开票额度比例") private BigDecimal invoiceQuotaRatio; - /** 开票金额 */ - private BigDecimal invoiceAmount; + /** 开票金额(RMB) */ + private BigDecimal invoiceAmountRmb; + + /** 开票金额(美元) */ + private BigDecimal invoiceAmountUsd; + /** 实际开票金额 */ @Excel(name = "实际开票金额") @@ -455,16 +459,16 @@ public class FinancialTaxInvoice extends BaseEntity { return invoiceQuotaRatio; } - public void setInvoiceAmount(BigDecimal invoiceAmount) - { - this.invoiceAmount = invoiceAmount; + + public BigDecimal getInvoiceAmountRmb() { + return invoiceAmountRmb; } - public BigDecimal getInvoiceAmount() - { - return invoiceAmount; + public void setInvoiceAmountRmb(BigDecimal invoiceAmountRmb) { + this.invoiceAmountRmb = invoiceAmountRmb; } - public void setActualInvoiceAmount(BigDecimal actualInvoiceAmount) + + public void setActualInvoiceAmount(BigDecimal actualInvoiceAmount) { this.actualInvoiceAmount = actualInvoiceAmount; } @@ -473,7 +477,17 @@ public class FinancialTaxInvoice extends BaseEntity { return actualInvoiceAmount; } - public void setActualInvoiceAmountRmb(BigDecimal actualInvoiceAmountRmb) + + + public BigDecimal getInvoiceAmountUsd() { + return invoiceAmountUsd; + } + + public void setInvoiceAmountUsd(BigDecimal invoiceAmountUsd) { + this.invoiceAmountUsd = invoiceAmountUsd; + } + + public void setActualInvoiceAmountRmb(BigDecimal actualInvoiceAmountRmb) { this.actualInvoiceAmountRmb = actualInvoiceAmountRmb; } @@ -597,7 +611,8 @@ public class FinancialTaxInvoice extends BaseEntity .append("usdTaxSum", getUsdTaxSum()) .append("invoiceEmail", getInvoiceEmail()) .append("invoiceQuotaRatio", getInvoiceQuotaRatio()) - .append("invoiceAmount", getInvoiceAmount()) + .append("invoiceAmountRmb", getInvoiceAmountRmb()) + .append("invoiceAmountUsd", getInvoiceAmountUsd()) .append("actualInvoiceAmount", getActualInvoiceAmount()) .append("actualInvoiceAmountRmb", getActualInvoiceAmountRmb()) .append("actualInvoiceAmountUsd", getActualInvoiceAmountUsd()) diff --git a/ruoyi-admin/src/main/resources/mapper/financial/FinancialTaxInvoiceMapper.xml b/ruoyi-admin/src/main/resources/mapper/financial/FinancialTaxInvoiceMapper.xml index f6f096d5..3545cd82 100644 --- a/ruoyi-admin/src/main/resources/mapper/financial/FinancialTaxInvoiceMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/financial/FinancialTaxInvoiceMapper.xml @@ -36,7 +36,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + + @@ -55,7 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select tax_invoice_id, tax_invoice_code, tax_invoice_status, use_status, sales_order_code, sales_order_number, sales_order_type, tax_invoice_type, tax_invoice_class, tax_invoice_title, business_members, apply_user, enterprise_code, enterprise_name, contact_number, enterprise_address, common_currency, invoice_company_name, invoice_company_code, deposit_bank, bank_account, tax_rate, usd_tax, material_sum, enterprise_sum, noRmbSum, rmbTaxSum, noUsdSum, usdTaxSum, invoice_email, invoice_quota_ratio, invoice_amount, actual_invoice_amount, actual_invoice_amount_rmb, actual_invoice_amount_usd, invoice_purpose, business_remark, invoice_remark, invoice_data, invoice_code, invoice_phone, create_by, create_time, update_by, update_time, remark, del_flag from financial_tax_invoice + select tax_invoice_id, tax_invoice_code, tax_invoice_status, use_status, sales_order_code, sales_order_number, sales_order_type, tax_invoice_type, tax_invoice_class, tax_invoice_title, business_members, apply_user, enterprise_code, enterprise_name, contact_number, enterprise_address, common_currency, invoice_company_name, invoice_company_code, deposit_bank, bank_account, tax_rate, usd_tax, material_sum, enterprise_sum, noRmbSum, rmbTaxSum, noUsdSum, usdTaxSum, invoice_email, invoice_quota_ratio, invoice_amount_rmb, invoice_amount_usd, actual_invoice_amount, actual_invoice_amount_rmb, actual_invoice_amount_usd, invoice_purpose, business_remark, invoice_remark, invoice_data, invoice_code, invoice_phone, create_by, create_time, update_by, update_time, remark, del_flag from financial_tax_invoice @@ -113,7 +114,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" usdTaxSum, invoice_email, invoice_quota_ratio, - invoice_amount, + invoice_amount_rmb, + invoice_amount_usd, actual_invoice_amount, actual_invoice_amount_rmb, actual_invoice_amount_usd, @@ -161,7 +163,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{usdTaxSum}, #{invoiceEmail}, #{invoiceQuotaRatio}, - #{invoiceAmount}, + #{invoiceAmountRmb}, + #{invoiceAmountUsd}, #{actualInvoiceAmount}, #{actualInvoiceAmountRmb}, #{actualInvoiceAmountUsd}, @@ -213,7 +216,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" usdTaxSum = #{usdTaxSum}, invoice_email = #{invoiceEmail}, invoice_quota_ratio = #{invoiceQuotaRatio}, - invoice_amount = #{invoiceAmount}, + invoice_amount_rmb = #{invoiceAmountRmb}, + invoice_amount_usd = #{invoiceAmountUsd}, actual_invoice_amount = #{actualInvoiceAmount}, actual_invoice_amount_rmb = #{actualInvoiceAmountRmb}, actual_invoice_amount_usd = #{actualInvoiceAmountUsd}, diff --git a/ruoyi-admin/src/main/resources/templates/system/salesOrder/makeInvoiceRMB.html b/ruoyi-admin/src/main/resources/templates/system/salesOrder/makeInvoiceRMB.html index 57039a5c..df975bd2 100644 --- a/ruoyi-admin/src/main/resources/templates/system/salesOrder/makeInvoiceRMB.html +++ b/ruoyi-admin/src/main/resources/templates/system/salesOrder/makeInvoiceRMB.html @@ -201,9 +201,9 @@ - 开票金额: + 开票金额(RMB): - + From 5c7be1f66be7b0a5e1223c98b56fe4504102585b Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Wed, 14 Aug 2024 09:16:29 +0800 Subject: [PATCH 02/10] =?UTF-8?q?[feat]=E8=B4=A2=E5=8A=A1=E7=AE=A1?= =?UTF-8?q?=E7=90=86:=20=E5=9B=BD=E7=A8=8E=E5=8F=91=E7=A5=A8=E7=89=A9?= =?UTF-8?q?=E6=96=99=20=E6=96=B0=E5=A2=9E=E5=9B=BD=E7=A8=8E=E5=8F=91?= =?UTF-8?q?=E7=A5=A8=E5=8E=86=E5=8F=B2=E8=AE=B0=E5=BD=95=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E8=A1=A8=20=E6=96=B0=E5=A2=9E=E5=9B=BD=E7=A8=8E?= =?UTF-8?q?=E5=8F=91=E7=A5=A8=E5=8E=86=E5=8F=B2=E8=AE=B0=E5=BD=95domain=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=9B=BD=E7=A8=8E=E5=8F=91=E7=A5=A8=E5=8E=86?= =?UTF-8?q?=E5=8F=B2=E8=AE=B0=E5=BD=95Mapper=20=E6=96=B0=E5=A2=9E=E5=9B=BD?= =?UTF-8?q?=E7=A8=8E=E5=8F=91=E7=A5=A8=E5=8E=86=E5=8F=B2=E8=AE=B0=E5=BD=95?= =?UTF-8?q?Mapper.xml=20=E6=96=B0=E5=A2=9E=E5=9B=BD=E7=A8=8E=E5=8F=91?= =?UTF-8?q?=E7=A5=A8=E5=8E=86=E5=8F=B2=E8=AE=B0=E5=BD=95Service=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=9B=BD=E7=A8=8E=E5=8F=91=E7=A5=A8=E5=8E=86?= =?UTF-8?q?=E5=8F=B2=E8=AE=B0=E5=BD=95ServiceImpl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../domain/FinancialTaxInvoiceHistory.java | 197 ++++++++++++++++++ .../FinancialTaxInvoiceHistoryMapper.java | 77 +++++++ .../IFinancialTaxInvoiceHistoryService.java | 75 +++++++ ...FinancialTaxInvoiceHistoryServiceImpl.java | 126 +++++++++++ .../FinancialTaxInvoiceHistoryMapper.xml | 124 +++++++++++ 5 files changed, 599 insertions(+) create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/financial/domain/FinancialTaxInvoiceHistory.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/financial/mapper/FinancialTaxInvoiceHistoryMapper.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/financial/service/IFinancialTaxInvoiceHistoryService.java create mode 100644 ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/FinancialTaxInvoiceHistoryServiceImpl.java create mode 100644 ruoyi-admin/src/main/resources/mapper/financial/FinancialTaxInvoiceHistoryMapper.xml diff --git a/ruoyi-admin/src/main/java/com/ruoyi/financial/domain/FinancialTaxInvoiceHistory.java b/ruoyi-admin/src/main/java/com/ruoyi/financial/domain/FinancialTaxInvoiceHistory.java new file mode 100644 index 00000000..60208ce2 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/financial/domain/FinancialTaxInvoiceHistory.java @@ -0,0 +1,197 @@ +package com.ruoyi.financial.domain; + +import java.math.BigDecimal; +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 国税发票历史记录对象 financial_tax_invoice_history + * + * @author 刘晓旭 + * @date 2024-08-14 + */ +public class FinancialTaxInvoiceHistory extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 国税发票历史id */ + private Long invoiceHistoryId; + + /** 国税发票单号 */ + @Excel(name = "国税发票单号") + private String taxInvoiceCode; + + /** 销售订单编号 */ + private String salesOrderCode; + + /** 发票状态(0待审核、1待开具、2已开具、3审核拒绝) */ + @Excel(name = "发票状态(0待审核、1待开具、2已开具、3审核拒绝)") + private String taxInvoiceStatus; + + /** 申请时间 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd") + private Date applyTime; + + /** 财务员 */ + @Excel(name = "财务员") + private String financeMembers; + + /** 开票额度比例 */ + @Excel(name = "开票额度比例") + private BigDecimal invoiceQuotaRatio; + + /** 开票金额(RMB) */ + @Excel(name = "开票金额(RMB)") + private BigDecimal invoiceAmountRmb; + + /** 开票金额(美元) */ + @Excel(name = "开票金额(美元)") + private BigDecimal invoiceAmountUsd; + + /** 开票用途 */ + @Excel(name = "开票用途") + private String invoicePurpose; + + /** 使用状态(1是、0否、2已作废) */ + private String useStatus; + + /** 删除标志 0正常 1删除 */ + private String delFlag; + + public void setInvoiceHistoryId(Long invoiceHistoryId) + { + this.invoiceHistoryId = invoiceHistoryId; + } + + public Long getInvoiceHistoryId() + { + return invoiceHistoryId; + } + public void setTaxInvoiceCode(String taxInvoiceCode) + { + this.taxInvoiceCode = taxInvoiceCode; + } + + public String getTaxInvoiceCode() + { + return taxInvoiceCode; + } + public void setSalesOrderCode(String salesOrderCode) + { + this.salesOrderCode = salesOrderCode; + } + + public String getSalesOrderCode() + { + return salesOrderCode; + } + public void setTaxInvoiceStatus(String taxInvoiceStatus) + { + this.taxInvoiceStatus = taxInvoiceStatus; + } + + public String getTaxInvoiceStatus() + { + return taxInvoiceStatus; + } + public void setApplyTime(Date applyTime) + { + this.applyTime = applyTime; + } + + public Date getApplyTime() + { + return applyTime; + } + public void setFinanceMembers(String financeMembers) + { + this.financeMembers = financeMembers; + } + + public String getFinanceMembers() + { + return financeMembers; + } + public void setInvoiceQuotaRatio(BigDecimal invoiceQuotaRatio) + { + this.invoiceQuotaRatio = invoiceQuotaRatio; + } + + public BigDecimal getInvoiceQuotaRatio() + { + return invoiceQuotaRatio; + } + public void setInvoiceAmountRmb(BigDecimal invoiceAmountRmb) + { + this.invoiceAmountRmb = invoiceAmountRmb; + } + + public BigDecimal getInvoiceAmountRmb() + { + return invoiceAmountRmb; + } + public void setInvoiceAmountUsd(BigDecimal invoiceAmountUsd) + { + this.invoiceAmountUsd = invoiceAmountUsd; + } + + public BigDecimal getInvoiceAmountUsd() + { + return invoiceAmountUsd; + } + public void setInvoicePurpose(String invoicePurpose) + { + this.invoicePurpose = invoicePurpose; + } + + public String getInvoicePurpose() + { + return invoicePurpose; + } + public void setUseStatus(String useStatus) + { + this.useStatus = useStatus; + } + + public String getUseStatus() + { + return useStatus; + } + public void setDelFlag(String delFlag) + { + this.delFlag = delFlag; + } + + public String getDelFlag() + { + return delFlag; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("invoiceHistoryId", getInvoiceHistoryId()) + .append("taxInvoiceCode", getTaxInvoiceCode()) + .append("salesOrderCode", getSalesOrderCode()) + .append("taxInvoiceStatus", getTaxInvoiceStatus()) + .append("applyTime", getApplyTime()) + .append("financeMembers", getFinanceMembers()) + .append("invoiceQuotaRatio", getInvoiceQuotaRatio()) + .append("invoiceAmountRmb", getInvoiceAmountRmb()) + .append("invoiceAmountUsd", getInvoiceAmountUsd()) + .append("invoicePurpose", getInvoicePurpose()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .append("useStatus", getUseStatus()) + .append("delFlag", getDelFlag()) + .toString(); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/financial/mapper/FinancialTaxInvoiceHistoryMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/financial/mapper/FinancialTaxInvoiceHistoryMapper.java new file mode 100644 index 00000000..6b0fab8a --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/financial/mapper/FinancialTaxInvoiceHistoryMapper.java @@ -0,0 +1,77 @@ +package com.ruoyi.financial.mapper; + +import java.util.List; +import com.ruoyi.financial.domain.FinancialTaxInvoiceHistory; + +/** + * 国税发票历史记录Mapper接口 + * + * @author 刘晓旭 + * @date 2024-08-14 + */ +public interface FinancialTaxInvoiceHistoryMapper +{ + /** + * 查询国税发票历史记录 + * + * @param invoiceHistoryId 国税发票历史记录ID + * @return 国税发票历史记录 + */ + public FinancialTaxInvoiceHistory selectFinancialTaxInvoiceHistoryById(Long invoiceHistoryId); + + /** + * 查询国税发票历史记录列表 + * + * @param financialTaxInvoiceHistory 国税发票历史记录 + * @return 国税发票历史记录集合 + */ + public List selectFinancialTaxInvoiceHistoryList(FinancialTaxInvoiceHistory financialTaxInvoiceHistory); + + /** + * 新增国税发票历史记录 + * + * @param financialTaxInvoiceHistory 国税发票历史记录 + * @return 结果 + */ + public int insertFinancialTaxInvoiceHistory(FinancialTaxInvoiceHistory financialTaxInvoiceHistory); + + /** + * 修改国税发票历史记录 + * + * @param financialTaxInvoiceHistory 国税发票历史记录 + * @return 结果 + */ + public int updateFinancialTaxInvoiceHistory(FinancialTaxInvoiceHistory financialTaxInvoiceHistory); + + /** + * 删除国税发票历史记录 + * + * @param invoiceHistoryId 国税发票历史记录ID + * @return 结果 + */ + public int deleteFinancialTaxInvoiceHistoryById(Long invoiceHistoryId); + + /** + * 批量删除国税发票历史记录 + * + * @param invoiceHistoryIds 需要删除的数据ID + * @return 结果 + */ + public int deleteFinancialTaxInvoiceHistoryByIds(String[] invoiceHistoryIds); + + /** + * 作废国税发票历史记录 + * + * @param invoiceHistoryId 国税发票历史记录ID + * @return 结果 + */ + public int cancelFinancialTaxInvoiceHistoryById(Long invoiceHistoryId); + + /** + * 恢复国税发票历史记录 + * + * @param invoiceHistoryId 国税发票历史记录ID + * @return 结果 + */ + public int restoreFinancialTaxInvoiceHistoryById(Long invoiceHistoryId); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/financial/service/IFinancialTaxInvoiceHistoryService.java b/ruoyi-admin/src/main/java/com/ruoyi/financial/service/IFinancialTaxInvoiceHistoryService.java new file mode 100644 index 00000000..b18c141d --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/financial/service/IFinancialTaxInvoiceHistoryService.java @@ -0,0 +1,75 @@ +package com.ruoyi.financial.service; + +import java.util.List; +import com.ruoyi.financial.domain.FinancialTaxInvoiceHistory; + +/** + * 国税发票历史记录Service接口 + * + * @author 刘晓旭 + * @date 2024-08-14 + */ +public interface IFinancialTaxInvoiceHistoryService +{ + /** + * 查询国税发票历史记录 + * + * @param invoiceHistoryId 国税发票历史记录ID + * @return 国税发票历史记录 + */ + public FinancialTaxInvoiceHistory selectFinancialTaxInvoiceHistoryById(Long invoiceHistoryId); + + /** + * 查询国税发票历史记录列表 + * + * @param financialTaxInvoiceHistory 国税发票历史记录 + * @return 国税发票历史记录集合 + */ + public List selectFinancialTaxInvoiceHistoryList(FinancialTaxInvoiceHistory financialTaxInvoiceHistory); + + /** + * 新增国税发票历史记录 + * + * @param financialTaxInvoiceHistory 国税发票历史记录 + * @return 结果 + */ + public int insertFinancialTaxInvoiceHistory(FinancialTaxInvoiceHistory financialTaxInvoiceHistory); + + /** + * 修改国税发票历史记录 + * + * @param financialTaxInvoiceHistory 国税发票历史记录 + * @return 结果 + */ + public int updateFinancialTaxInvoiceHistory(FinancialTaxInvoiceHistory financialTaxInvoiceHistory); + + /** + * 批量删除国税发票历史记录 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteFinancialTaxInvoiceHistoryByIds(String ids); + + /** + * 删除国税发票历史记录信息 + * + * @param invoiceHistoryId 国税发票历史记录ID + * @return 结果 + */ + public int deleteFinancialTaxInvoiceHistoryById(Long invoiceHistoryId); + + /** + * 作废国税发票历史记录 + * @param invoiceHistoryId 国税发票历史记录ID + * @return + */ + int cancelFinancialTaxInvoiceHistoryById(Long invoiceHistoryId); + + /** + * 恢复国税发票历史记录 + * @param invoiceHistoryId 国税发票历史记录ID + * @return + */ + int restoreFinancialTaxInvoiceHistoryById(Long invoiceHistoryId); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/FinancialTaxInvoiceHistoryServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/FinancialTaxInvoiceHistoryServiceImpl.java new file mode 100644 index 00000000..3e7a9c8a --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/FinancialTaxInvoiceHistoryServiceImpl.java @@ -0,0 +1,126 @@ +package com.ruoyi.financial.service.impl; + +import java.util.List; +import com.ruoyi.common.utils.DateUtils; +import com.ruoyi.common.utils.ShiroUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.financial.mapper.FinancialTaxInvoiceHistoryMapper; +import com.ruoyi.financial.domain.FinancialTaxInvoiceHistory; +import com.ruoyi.financial.service.IFinancialTaxInvoiceHistoryService; +import com.ruoyi.common.core.text.Convert; + +/** + * 国税发票历史记录Service业务层处理 + * + * @author 刘晓旭 + * @date 2024-08-14 + */ +@Service +public class FinancialTaxInvoiceHistoryServiceImpl implements IFinancialTaxInvoiceHistoryService +{ + @Autowired + private FinancialTaxInvoiceHistoryMapper financialTaxInvoiceHistoryMapper; + + /** + * 查询国税发票历史记录 + * + * @param invoiceHistoryId 国税发票历史记录ID + * @return 国税发票历史记录 + */ + @Override + public FinancialTaxInvoiceHistory selectFinancialTaxInvoiceHistoryById(Long invoiceHistoryId) + { + return financialTaxInvoiceHistoryMapper.selectFinancialTaxInvoiceHistoryById(invoiceHistoryId); + } + + /** + * 查询国税发票历史记录列表 + * + * @param financialTaxInvoiceHistory 国税发票历史记录 + * @return 国税发票历史记录 + */ + @Override + public List selectFinancialTaxInvoiceHistoryList(FinancialTaxInvoiceHistory financialTaxInvoiceHistory) + { + return financialTaxInvoiceHistoryMapper.selectFinancialTaxInvoiceHistoryList(financialTaxInvoiceHistory); + } + + /** + * 新增国税发票历史记录 + * + * @param financialTaxInvoiceHistory 国税发票历史记录 + * @return 结果 + */ + @Override + public int insertFinancialTaxInvoiceHistory(FinancialTaxInvoiceHistory financialTaxInvoiceHistory) + { + String loginName = ShiroUtils.getLoginName(); + financialTaxInvoiceHistory.setCreateBy(loginName); + financialTaxInvoiceHistory.setCreateTime(DateUtils.getNowDate()); + return financialTaxInvoiceHistoryMapper.insertFinancialTaxInvoiceHistory(financialTaxInvoiceHistory); + } + + /** + * 修改国税发票历史记录 + * + * @param financialTaxInvoiceHistory 国税发票历史记录 + * @return 结果 + */ + @Override + public int updateFinancialTaxInvoiceHistory(FinancialTaxInvoiceHistory financialTaxInvoiceHistory) + { + String loginName = ShiroUtils.getLoginName(); + financialTaxInvoiceHistory.setUpdateBy(loginName); + financialTaxInvoiceHistory.setUpdateTime(DateUtils.getNowDate()); + return financialTaxInvoiceHistoryMapper.updateFinancialTaxInvoiceHistory(financialTaxInvoiceHistory); + } + + /** + * 删除国税发票历史记录对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Override + public int deleteFinancialTaxInvoiceHistoryByIds(String ids) + { + return financialTaxInvoiceHistoryMapper.deleteFinancialTaxInvoiceHistoryByIds(Convert.toStrArray(ids)); + } + + /** + * 删除国税发票历史记录信息 + * + * @param invoiceHistoryId 国税发票历史记录ID + * @return 结果 + */ + @Override + public int deleteFinancialTaxInvoiceHistoryById(Long invoiceHistoryId) + { + return financialTaxInvoiceHistoryMapper.deleteFinancialTaxInvoiceHistoryById(invoiceHistoryId); + } + + /** + * 作废国税发票历史记录 + * + * @param invoiceHistoryId 国税发票历史记录ID + * @return 结果 + */ + @Override + public int cancelFinancialTaxInvoiceHistoryById(Long invoiceHistoryId) + { + return financialTaxInvoiceHistoryMapper.cancelFinancialTaxInvoiceHistoryById(invoiceHistoryId); + } + + /** + * 恢复国税发票历史记录信息 + * + * @param invoiceHistoryId 国税发票历史记录ID + * @return 结果 + */ + @Override + public int restoreFinancialTaxInvoiceHistoryById(Long invoiceHistoryId) + { + return financialTaxInvoiceHistoryMapper.restoreFinancialTaxInvoiceHistoryById(invoiceHistoryId); + } +} diff --git a/ruoyi-admin/src/main/resources/mapper/financial/FinancialTaxInvoiceHistoryMapper.xml b/ruoyi-admin/src/main/resources/mapper/financial/FinancialTaxInvoiceHistoryMapper.xml new file mode 100644 index 00000000..f9017ac3 --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/financial/FinancialTaxInvoiceHistoryMapper.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + select invoice_history_id, tax_invoice_code, sales_order_code, tax_invoice_status, apply_time, finance_members, invoice_quota_ratio, invoice_amount_rmb, invoice_amount_usd, invoice_purpose, create_by, create_time, update_by, update_time, remark, use_status, del_flag from financial_tax_invoice_history + + + + + + + + + + + where invoice_history_id = #{invoiceHistoryId} + + + + insert into financial_tax_invoice_history + + tax_invoice_code, + sales_order_code, + tax_invoice_status, + apply_time, + finance_members, + invoice_quota_ratio, + invoice_amount_rmb, + invoice_amount_usd, + invoice_purpose, + create_by, + create_time, + update_by, + update_time, + remark, + use_status, + del_flag, + + + #{taxInvoiceCode}, + #{salesOrderCode}, + #{taxInvoiceStatus}, + #{applyTime}, + #{financeMembers}, + #{invoiceQuotaRatio}, + #{invoiceAmountRmb}, + #{invoiceAmountUsd}, + #{invoicePurpose}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + #{useStatus}, + #{delFlag}, + + + + + update financial_tax_invoice_history + + tax_invoice_code = #{taxInvoiceCode}, + sales_order_code = #{salesOrderCode}, + tax_invoice_status = #{taxInvoiceStatus}, + apply_time = #{applyTime}, + finance_members = #{financeMembers}, + invoice_quota_ratio = #{invoiceQuotaRatio}, + invoice_amount_rmb = #{invoiceAmountRmb}, + invoice_amount_usd = #{invoiceAmountUsd}, + invoice_purpose = #{invoicePurpose}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + use_status = #{useStatus}, + del_flag = #{delFlag}, + + where invoice_history_id = #{invoiceHistoryId} + + + + delete from financial_tax_invoice_history where invoice_history_id = #{invoiceHistoryId} + + + + delete from financial_tax_invoice_history where invoice_history_id in + + #{invoiceHistoryId} + + + + + update financial_tax_invoice_history set del_flag = '1' where invoice_history_id = #{invoiceHistoryId} + + + + update financial_tax_invoice_history set del_flag = '0' where invoice_history_id = #{invoiceHistoryId} + + + \ No newline at end of file From 9abf6ca59e8f45273f0d45cf4ff73a5484c54357 Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Wed, 14 Aug 2024 10:00:57 +0800 Subject: [PATCH 03/10] =?UTF-8?q?[feat]=E8=B4=A2=E5=8A=A1=E7=AE=A1?= =?UTF-8?q?=E7=90=86=20=E9=94=80=E5=94=AE=E7=AE=A1=E7=90=86=20=E9=94=80?= =?UTF-8?q?=E5=94=AE=E8=AE=A2=E5=8D=95Controller=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=EF=BC=9A=E6=9F=A5=E8=AF=A2=E5=BC=80=E7=A5=A8=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E5=88=97=E8=A1=A8=E5=90=8E=E7=AB=AF=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=20=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95=E5=BC=80?= =?UTF-8?q?=E7=A5=A8-=E5=9B=BD=E5=86=85=E5=89=8D=E7=AB=AF=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=96=B0=E5=A2=9E=EF=BC=9A=E5=BC=80=E7=A5=A8=E5=8E=86?= =?UTF-8?q?=E5=8F=B2=E5=88=97=E8=A1=A8=E5=B1=95=E7=A4=BA=EF=BC=9B=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=9F=A5=E8=AF=A2=E5=BC=80=E7=A5=A8=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E5=89=8D=E7=AB=AF=E6=8E=A5=E5=8F=A3=20=E5=9B=BD=E7=A8=8E?= =?UTF-8?q?=E5=BC=80=E7=A5=A8=E5=8E=86=E5=8F=B2=E6=96=B0=E5=A2=9E=E6=A0=B9?= =?UTF-8?q?=E6=8D=AE=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95=E7=BC=96=E5=8F=B7?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E5=8E=86=E5=8F=B2=E8=AE=B0=E5=BD=95=E9=9B=86?= =?UTF-8?q?=E5=90=88=E5=90=8E=E7=AB=AF=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FinancialTaxInvoiceHistoryMapper.java | 8 ++ .../IFinancialTaxInvoiceHistoryService.java | 7 ++ ...FinancialTaxInvoiceHistoryServiceImpl.java | 14 ++++ .../controller/SysSalesOrderController.java | 26 ++++++- .../FinancialTaxInvoiceHistoryMapper.xml | 7 +- .../system/salesOrder/makeInvoiceRMB.html | 75 ++++++++++++++++++- 6 files changed, 132 insertions(+), 5 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/financial/mapper/FinancialTaxInvoiceHistoryMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/financial/mapper/FinancialTaxInvoiceHistoryMapper.java index 6b0fab8a..5dd24a68 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/financial/mapper/FinancialTaxInvoiceHistoryMapper.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/financial/mapper/FinancialTaxInvoiceHistoryMapper.java @@ -74,4 +74,12 @@ public interface FinancialTaxInvoiceHistoryMapper * @return 结果 */ public int restoreFinancialTaxInvoiceHistoryById(Long invoiceHistoryId); + + /** + * 根据销售订单编号查询发票历史记录集合 + * + * @param salesOrderCode 销售订单编号 + * @return 结果 + */ + List selectInvoiceHistoryListBySalesOrderCode(String salesOrderCode); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/financial/service/IFinancialTaxInvoiceHistoryService.java b/ruoyi-admin/src/main/java/com/ruoyi/financial/service/IFinancialTaxInvoiceHistoryService.java index b18c141d..59c8ccbe 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/financial/service/IFinancialTaxInvoiceHistoryService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/financial/service/IFinancialTaxInvoiceHistoryService.java @@ -72,4 +72,11 @@ public interface IFinancialTaxInvoiceHistoryService * @return */ int restoreFinancialTaxInvoiceHistoryById(Long invoiceHistoryId); + + /** + * 根据销售订单编号查询发票历史记录集合 + * @param salesOrderCode 销售订单编号 + * @return + */ + List selectInvoiceHistoryListBySalesOrderCode(String salesOrderCode); } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/FinancialTaxInvoiceHistoryServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/FinancialTaxInvoiceHistoryServiceImpl.java index 3e7a9c8a..46e4e3f9 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/FinancialTaxInvoiceHistoryServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/FinancialTaxInvoiceHistoryServiceImpl.java @@ -123,4 +123,18 @@ public class FinancialTaxInvoiceHistoryServiceImpl implements IFinancialTaxInvoi { return financialTaxInvoiceHistoryMapper.restoreFinancialTaxInvoiceHistoryById(invoiceHistoryId); } + + + /** + * 根据销售订单编号查询历史记录集合 + * + * @param salesOrderCode 销售订单编号 + * @return 结果 + */ + @Override + public List selectInvoiceHistoryListBySalesOrderCode(String salesOrderCode) { + + List list = financialTaxInvoiceHistoryMapper.selectInvoiceHistoryListBySalesOrderCode(salesOrderCode); + return list; + } } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderController.java b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderController.java index ba3d6190..167a7301 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderController.java @@ -22,7 +22,9 @@ import com.ruoyi.common.utils.file.FileUtils; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.erp.domain.ErpMaterialVo; import com.ruoyi.financial.domain.FinancialTaxInvoice; +import com.ruoyi.financial.domain.FinancialTaxInvoiceHistory; import com.ruoyi.financial.service.IFinancialReceivablesService; +import com.ruoyi.financial.service.IFinancialTaxInvoiceHistoryService; import com.ruoyi.financial.service.IFinancialTaxInvoiceService; import com.ruoyi.process.general.service.IProcessService; import com.ruoyi.system.domain.*; @@ -101,6 +103,10 @@ public class SysSalesOrderController extends BaseController @Autowired private IFinancialTaxInvoiceService taxInvoiceService; + @Autowired + private IFinancialTaxInvoiceHistoryService invoiceHistoryService; + + @RequiresPermissions("system:salesOrder:view") @GetMapping() public String salesOrder(ModelMap mmap) @@ -623,11 +629,27 @@ public class SysSalesOrderController extends BaseController */ @ResponseBody - @PostMapping("/getSalesOrderCodeChildListByCode") - public TableDataInfo getSalesOrderCodeChildListByCode(@RequestParam("salesOrderCode") String salesOrderCode) + @PostMapping("/getSalesOrderChildListByCode") + public TableDataInfo getSalesOrderChildListByCode(@RequestParam("salesOrderCode") String salesOrderCode) { startPage(); List list = sysSalesOrderChildService.selectOrderChildListBySalesOrderCode(salesOrderCode); return getDataTable(list); } + + + /** + * 查询开票历史记录列表 + */ + + @ResponseBody + @PostMapping("/getInvoiceHistoryListBySalesOrderCode") + public TableDataInfo getInvoiceHistoryListBySalesOrderCode(@RequestParam("salesOrderCode") String salesOrderCode) + { + startPage(); + List list = invoiceHistoryService.selectInvoiceHistoryListBySalesOrderCode(salesOrderCode); + return getDataTable(list); + } + + } \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/mapper/financial/FinancialTaxInvoiceHistoryMapper.xml b/ruoyi-admin/src/main/resources/mapper/financial/FinancialTaxInvoiceHistoryMapper.xml index f9017ac3..5edd1493 100644 --- a/ruoyi-admin/src/main/resources/mapper/financial/FinancialTaxInvoiceHistoryMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/financial/FinancialTaxInvoiceHistoryMapper.xml @@ -38,7 +38,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where invoice_history_id = #{invoiceHistoryId} - + + + + where sales_order_code = #{salesOrderCode} + + insert into financial_tax_invoice_history diff --git a/ruoyi-admin/src/main/resources/templates/system/salesOrder/makeInvoiceRMB.html b/ruoyi-admin/src/main/resources/templates/system/salesOrder/makeInvoiceRMB.html index df975bd2..34a57450 100644 --- a/ruoyi-admin/src/main/resources/templates/system/salesOrder/makeInvoiceRMB.html +++ b/ruoyi-admin/src/main/resources/templates/system/salesOrder/makeInvoiceRMB.html @@ -224,6 +224,7 @@ var materialProcessMethodDatas = [[${@dict.getType('processMethod')}]]; var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; + var taxInvoiceStatusDatas = [[${@dict.getType('tax_invoice_status')}]]; var taxInvoice = [[${taxInvoice}]]; @@ -273,11 +274,11 @@ } - + //开票物料 $(function() { var options = { id: 'bootstrap-table-material', - url: prefix + "/getSalesOrderCodeChildListByCode", + url: prefix + "/getSalesOrderChildListByCode", queryParams: function(params) { return { salesOrderCode: $("#salesOrderCode").val(), @@ -364,6 +365,76 @@ }); + //开票历史 + $(function() { + var options = { + id: 'bootstrap-table-history', + url: prefix + "/getInvoiceHistoryListBySalesOrderCode", + queryParams: function(params) { + return { + salesOrderCode: $("#salesOrderCode").val(), + } + }, + showSearch: false, + showRefresh: false, + showToggle: false, + showColumns: false, + pagination: false, // 设置不分页 + modalName: "国税发票历史记录", + columns: [{ + checkbox: true + }, + { + title: '国税发票历史id', + field: 'invoiceHistoryId', + visible: false + }, + { + title: '国税发票单号', + field: 'taxInvoiceCode', + }, + { + title: '发票状态', //(0待审核、1待开具、2已开具、3审核拒绝) + field: 'taxInvoiceStatus', + formatter: function(value, row, index) { + return $.table.selectDictLabel(taxInvoiceStatusDatas, value); + } + }, + { + title: '申请时间', + field: 'applyTime', + }, + { + title: '财务员', + field: 'financeMembers', + }, + { + title: '开票额度比例', + field: 'invoiceQuotaRatio', + }, + { + title: '开票金额(RMB)', + field: 'invoiceAmountRmb', + }, + { + title: '开票用途', + field: 'invoicePurpose', + }, + { + title: '操作', + align: 'center', + formatter: function(value, row, index) { + var actions = []; + actions.push('编辑 '); + return actions.join(''); + } + }] + }; + $.table.init(options); + }); + + + //获取客户发票信息 $(document).ready(function() { From 856f7d00d29db842ce696b6bcee023a97c79240a Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Wed, 14 Aug 2024 10:40:15 +0800 Subject: [PATCH 04/10] =?UTF-8?q?[fix]=E8=B4=A2=E5=8A=A1=E7=AE=A1=E7=90=86?= =?UTF-8?q?=20=E9=94=80=E5=94=AE=E7=AE=A1=E7=90=86=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95=E5=BC=80=E7=A5=A8=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=A1=AB=E5=85=85=E5=9B=BD=E7=A8=8E=E5=8F=91?= =?UTF-8?q?=E7=A5=A8=E5=8E=86=E5=8F=B2=E6=95=B0=E6=8D=AE=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E9=94=80=E5=94=AE=E8=AE=A2=E5=8D=95=E5=BC=80=E7=A5=A8?= =?UTF-8?q?=E5=89=8D=E9=A1=B5=E9=9D=A2=EF=BC=9A=E4=BF=AE=E6=94=B9=E6=8A=A5?= =?UTF-8?q?=E4=BB=B7=E5=B8=81=E7=A7=8D=E7=9A=84=E5=B1=95=E7=A4=BA=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=EF=BC=9B=E6=96=B0=E5=A2=9E=E5=BC=80=E7=A5=A8=E9=87=91?= =?UTF-8?q?=E9=A2=9D=E7=94=B1=E5=BC=80=E7=A5=A8=E9=A2=9D=E5=BA=A6=E6=AF=94?= =?UTF-8?q?=E4=BE=8B=E5=8A=A8=E6=80=81=E8=BE=93=E5=85=A5=E5=92=8C=E5=90=AB?= =?UTF-8?q?=E7=A8=8E=E6=80=BB=E4=BB=B7=E5=8A=A8=E6=80=81=E8=AE=A1=E7=AE=97?= =?UTF-8?q?=E5=BE=97=E5=88=B0=EF=BC=9B=E8=B0=83=E6=95=B4=E5=BC=80=E7=A5=A8?= =?UTF-8?q?=E5=8E=86=E5=8F=B2=E5=89=8D=E7=AB=AF=E5=88=97=E8=A1=A8=E5=B1=95?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/FinancialTaxInvoiceServiceImpl.java | 22 ++++++ .../system/salesOrder/makeInvoiceRMB.html | 71 ++++++++++++------- 2 files changed, 69 insertions(+), 24 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/FinancialTaxInvoiceServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/FinancialTaxInvoiceServiceImpl.java index 12abd152..76a656bd 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/FinancialTaxInvoiceServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/FinancialTaxInvoiceServiceImpl.java @@ -7,7 +7,9 @@ import java.util.List; import com.ruoyi.common.core.redis.RedisCache; import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.ShiroUtils; +import com.ruoyi.financial.domain.FinancialTaxInvoiceHistory; import com.ruoyi.financial.domain.FinancialTaxInvoiceMaterial; +import com.ruoyi.financial.mapper.FinancialTaxInvoiceHistoryMapper; import com.ruoyi.financial.mapper.FinancialTaxInvoiceMaterialMapper; import com.ruoyi.financial.service.IFinancialTaxInvoiceMaterialService; import com.ruoyi.system.domain.SysCustomerVo; @@ -39,6 +41,9 @@ public class FinancialTaxInvoiceServiceImpl implements IFinancialTaxInvoiceServi @Autowired private IFinancialTaxInvoiceMaterialService invoiceMaterialService; + @Autowired + private FinancialTaxInvoiceHistoryMapper invoiceHistoryMapper; + @Autowired private SysCustomerMapper sysCustomerMapper; @@ -201,6 +206,7 @@ public class FinancialTaxInvoiceServiceImpl implements IFinancialTaxInvoiceServi financialTaxInvoice.setApplyUser(loginName); financialTaxInvoice.setBusinessMembers(loginName); + //填充国税发票物料数据 List invoiceMaterialList = financialTaxInvoice.getInvoiceMaterialList(); invoiceMaterialList.parallelStream().forEach(invoiceMaterial -> { invoiceMaterial.setTaxInvoiceCode(taxInvoiceCode); @@ -209,6 +215,22 @@ public class FinancialTaxInvoiceServiceImpl implements IFinancialTaxInvoiceServi invoiceMaterial.setCreateTime(new Date()); }); invoiceMaterialMapper.insertFinancialTaxInvoiceMaterialBatch(invoiceMaterialList); + + //填充国税发票历史数据 + FinancialTaxInvoiceHistory financialTaxInvoiceHistory = new FinancialTaxInvoiceHistory(); + financialTaxInvoiceHistory.setTaxInvoiceCode(taxInvoiceCode); + financialTaxInvoiceHistory.setSalesOrderCode(financialTaxInvoice.getSalesOrderCode()); + financialTaxInvoiceHistory.setInvoiceAmountRmb(financialTaxInvoice.getInvoiceAmountRmb()); + //financialTaxInvoiceHistory.setInvoiceAmountUsd(financialTaxInvoice.getInvoiceAmountUsd()); + financialTaxInvoiceHistory.setInvoicePurpose(financialTaxInvoice.getInvoicePurpose()); + financialTaxInvoiceHistory.setInvoiceQuotaRatio(financialTaxInvoice.getInvoiceQuotaRatio()); + financialTaxInvoiceHistory.setTaxInvoiceStatus("0");//待审核 + financialTaxInvoiceHistory.setApplyTime(new Date()); + financialTaxInvoiceHistory.setCreateBy(loginName); + financialTaxInvoiceHistory.setCreateTime(new Date()); + invoiceHistoryMapper.insertFinancialTaxInvoiceHistory(financialTaxInvoiceHistory); + + return financialTaxInvoiceMapper.insertFinancialTaxInvoice(financialTaxInvoice); } } diff --git a/ruoyi-admin/src/main/resources/templates/system/salesOrder/makeInvoiceRMB.html b/ruoyi-admin/src/main/resources/templates/system/salesOrder/makeInvoiceRMB.html index 34a57450..3115902b 100644 --- a/ruoyi-admin/src/main/resources/templates/system/salesOrder/makeInvoiceRMB.html +++ b/ruoyi-admin/src/main/resources/templates/system/salesOrder/makeInvoiceRMB.html @@ -25,13 +25,15 @@ 报价币种: - - - - + + + + + + 客户代码/ID: @@ -174,7 +176,7 @@ 含税总价(RMB): - + @@ -194,7 +196,7 @@ 开票额度比例: - + % @@ -203,7 +205,7 @@ 开票金额(RMB): - + @@ -213,9 +215,6 @@ - - - @@ -389,24 +388,13 @@ field: 'invoiceHistoryId', visible: false }, - { - title: '国税发票单号', - field: 'taxInvoiceCode', - }, - { - title: '发票状态', //(0待审核、1待开具、2已开具、3审核拒绝) - field: 'taxInvoiceStatus', - formatter: function(value, row, index) { - return $.table.selectDictLabel(taxInvoiceStatusDatas, value); - } - }, { title: '申请时间', field: 'applyTime', }, { - title: '财务员', - field: 'financeMembers', + title: '国税发票单号', + field: 'taxInvoiceCode', }, { title: '开票额度比例', @@ -416,16 +404,28 @@ title: '开票金额(RMB)', field: 'invoiceAmountRmb', }, + { title: '开票用途', field: 'invoicePurpose', }, + { + title: '发票状态', //(0待审核、1待开具、2已开具、3审核拒绝) + field: 'taxInvoiceStatus', + formatter: function(value, row, index) { + return $.table.selectDictLabel(taxInvoiceStatusDatas, value); + } + }, + { + title: '财务员', + field: 'financeMembers', + }, { title: '操作', align: 'center', formatter: function(value, row, index) { var actions = []; - actions.push('编辑 '); + actions.push('详情 '); return actions.join(''); } }] @@ -528,6 +528,29 @@ } + + //通过监听额度比例输入框的值,动态计算开票金额 + $(document).ready(function() { + + var invoiceAmountRmbInput = $('#invoiceAmountRmbInput'); + var invoiceQuotaRatioInput = $('#invoiceQuotaRatioInput'); + var rmbTaxSumInput = $('#rmbTaxSumInput'); + + //监听开票额度比例输入框的变化 + invoiceQuotaRatioInput.on('input', function() { + var rmbTaxSum = parseFloat(rmbTaxSumInput.val()); + var invoiceQuotaRatio = parseFloat($(this).val()); + if (!isNaN(rmbTaxSum) && !isNaN(invoiceQuotaRatio)) { + //计算开票金额 = 税前总额 * 开票比例 + var invoiceAmountRmb = rmbTaxSum * (invoiceQuotaRatio / 100); + //更新开票金额输入框 + invoiceAmountRmbInput.val(invoiceAmountRmb.toFixed(2)); + } else { + invoiceAmountRmbInput.val(''); + } + }); + }); +