diff --git a/ruoyi-admin/src/main/java/com/ruoyi/financial/controller/FinancialTaxInvoiceController.java b/ruoyi-admin/src/main/java/com/ruoyi/financial/controller/FinancialTaxInvoiceController.java new file mode 100644 index 00000000..9696e92f --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/financial/controller/FinancialTaxInvoiceController.java @@ -0,0 +1,151 @@ +package com.ruoyi.financial.controller; + +import java.util.List; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.financial.domain.FinancialTaxInvoice; +import com.ruoyi.financial.service.IFinancialTaxInvoiceService; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 国税发票Controller + * + * @author 刘晓旭 + * @date 2024-08-12 + */ +@Controller +@RequestMapping("/financial/taxInvoice") +public class FinancialTaxInvoiceController extends BaseController +{ + private String prefix = "financial/taxInvoice"; + + @Autowired + private IFinancialTaxInvoiceService financialTaxInvoiceService; + + @RequiresPermissions("financial:taxInvoice:view") + @GetMapping() + public String taxInvoice() + { + return prefix + "/taxInvoice"; + } + + /** + * 查询国税发票列表 + */ + @RequiresPermissions("financial:taxInvoice:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(FinancialTaxInvoice financialTaxInvoice) + { + startPage(); + List list = financialTaxInvoiceService.selectFinancialTaxInvoiceList(financialTaxInvoice); + return getDataTable(list); + } + + /** + * 导出国税发票列表 + */ + @RequiresPermissions("financial:taxInvoice:export") + @Log(title = "国税发票", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(FinancialTaxInvoice financialTaxInvoice) + { + List list = financialTaxInvoiceService.selectFinancialTaxInvoiceList(financialTaxInvoice); + ExcelUtil util = new ExcelUtil(FinancialTaxInvoice.class); + return util.exportExcel(list, "国税发票数据"); + } + + /** + * 新增国税发票 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存国税发票 + */ + @RequiresPermissions("financial:taxInvoice:add") + @Log(title = "国税发票", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(FinancialTaxInvoice financialTaxInvoice) + { + return toAjax(financialTaxInvoiceService.insertFinancialTaxInvoice(financialTaxInvoice)); + } + + /** + * 修改国税发票 + */ + @GetMapping("/edit/{taxInvoiceId}") + public String edit(@PathVariable("taxInvoiceId") Long taxInvoiceId, ModelMap mmap) + { + FinancialTaxInvoice financialTaxInvoice = financialTaxInvoiceService.selectFinancialTaxInvoiceById(taxInvoiceId); + mmap.put("financialTaxInvoice", financialTaxInvoice); + return prefix + "/edit"; + } + + /** + * 修改保存国税发票 + */ + @RequiresPermissions("financial:taxInvoice:edit") + @Log(title = "国税发票", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(FinancialTaxInvoice financialTaxInvoice) + { + return toAjax(financialTaxInvoiceService.updateFinancialTaxInvoice(financialTaxInvoice)); + } + + /** + * 删除国税发票 + */ + @RequiresPermissions("financial:taxInvoice:remove") + @Log(title = "国税发票", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(financialTaxInvoiceService.deleteFinancialTaxInvoiceByIds(ids)); + } + + /** + * 作废国税发票 + */ + @RequiresPermissions("financial:taxInvoice:cancel") + @Log(title = "国税发票", businessType = BusinessType.CANCEL) + @GetMapping( "/cancel/{id}") + @ResponseBody + public AjaxResult cancel(@PathVariable("id") Long id){ + return toAjax(financialTaxInvoiceService.cancelFinancialTaxInvoiceById(id)); + } + + /** + * 恢复国税发票 + */ + @RequiresPermissions("financial:taxInvoice:restore") + @Log(title = "国税发票", businessType = BusinessType.RESTORE) + @GetMapping( "/restore/{id}") + @ResponseBody + public AjaxResult restore(@PathVariable("id")Long id) + { + return toAjax(financialTaxInvoiceService.restoreFinancialTaxInvoiceById(id)); + } + + +} 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 new file mode 100644 index 00000000..8c60ab0c --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/financial/domain/FinancialTaxInvoice.java @@ -0,0 +1,604 @@ +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 + * + * @author 刘晓旭 + * @date 2024-08-12 + */ +public class FinancialTaxInvoice extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 国税发票id */ + private Long taxInvoiceId; + + /** 国税发票单号 */ + @Excel(name = "国税发票单号") + private String taxInvoiceCode; + + /** 发票状态(0待审核、1待开具、2已开具、3审核拒绝) */ + @Excel(name = "发票状态(0待审核、1待开具、2已开具、3审核拒绝)") + private String taxInvoiceStatus; + + /** 使用状态(1是、0否、2已作废) */ + private String useStatus; + + /** 销售订单编号 */ + private String salesOrderCode; + + /** 客户订单号码 */ + private String salesOrderNumber; + + /** 订单类型(0客户订单、1研发订单、2其他订单) */ + private String salesOrderType; + + /** 发票类型(0电子发票、1纸制发票) */ + @Excel(name = "发票类型(0电子发票、1纸制发票)") + private String taxInvoiceType; + + /** 发票种类(0专票、1普票) */ + @Excel(name = "发票种类(0专票、1普票)") + private String taxInvoiceClass; + + /** 发票抬头(0企业、1其他) */ + @Excel(name = "发票抬头(0企业、1其他)") + private String taxInvoiceTitle; + + /** 业务人员 */ + private String businessMembers; + + /** 申请人 */ + @Excel(name = "申请人") + private String applyUser; + + /** 客户代码/ID */ + @Excel(name = "客户代码/ID") + private String enterpriseCode; + + /** 客户名称 */ + @Excel(name = "客户名称") + private String enterpriseName; + + /** 联系电话 */ + private String contactNumber; + + /** 公司地址 */ + private String enterpriseAddress; + + /** 币种(1RMB、2美元) */ + @Excel(name = "币种(1RMB、2美元)") + private String commonCurrency; + + /** 开票公司名称 */ + private String invoiceCompanyName; + + /** 开票公司税号 */ + private String invoiceCompanyCode; + + /** 公司开户行 */ + private String depositBank; + + /** 公司开户账号 */ + private String bankAccount; + + /** 税率 */ + private BigDecimal taxRate; + + /** 美元汇率 */ + private BigDecimal usdTax; + + /** 物料数合计 */ + @Excel(name = "物料数合计") + private String materialSum; + + /** 数量合计 */ + @Excel(name = "数量合计") + private String enterpriseSum; + + /** 不含税总价(RMB) */ + @Excel(name = "不含税总价(RMB)") + private BigDecimal noRmbSum; + + /** 含税总价(RMB) */ + @Excel(name = "含税总价(RMB)") + private BigDecimal rmbTaxSum; + + /** 不含税总价(美元) */ + @Excel(name = "不含税总价(美元)") + private BigDecimal noUsdSum; + + /** 含税总价(美元) */ + @Excel(name = "含税总价(美元)") + private BigDecimal usdTaxSum; + + /** 邮箱 */ + @Excel(name = "邮箱") + private String invoiceEmail; + + /** 开票额度比例 */ + @Excel(name = "开票额度比例") + private BigDecimal invoiceQuotaRatio; + + /** 开票金额 */ + private BigDecimal invoiceAmount; + + /** 实际开票金额 */ + @Excel(name = "实际开票金额") + private BigDecimal actualInvoiceAmount; + + /** 实际开票金额(RMB) */ + @Excel(name = "实际开票金额(RMB)") + private BigDecimal actualInvoiceAmountRmb; + + /** 实际开票金额(美元) */ + @Excel(name = "实际开票金额(美元)") + private BigDecimal actualInvoiceAmountUsd; + + /** 开票用途 */ + @Excel(name = "开票用途") + private String invoicePurpose; + + /** 业务备注 */ + @Excel(name = "业务备注") + private String businessRemark; + + /** 发票备注 */ + private String invoiceRemark; + + /** 开票日期 */ + @JsonFormat(pattern = "yyyy-MM-dd") + @Excel(name = "开票日期", width = 30, dateFormat = "yyyy-MM-dd") + private Date invoiceData; + + /** 发票代码 */ + @Excel(name = "发票代码") + private String invoiceCode; + + /** 发票号码 */ + @Excel(name = "发票号码") + private String invoicePhone; + + /** 删除标志 0正常 1删除 */ + private String delFlag; + + public void setTaxInvoiceId(Long taxInvoiceId) + { + this.taxInvoiceId = taxInvoiceId; + } + + public Long getTaxInvoiceId() + { + return taxInvoiceId; + } + public void setTaxInvoiceCode(String taxInvoiceCode) + { + this.taxInvoiceCode = taxInvoiceCode; + } + + public String getTaxInvoiceCode() + { + return taxInvoiceCode; + } + public void setTaxInvoiceStatus(String taxInvoiceStatus) + { + this.taxInvoiceStatus = taxInvoiceStatus; + } + + public String getTaxInvoiceStatus() + { + return taxInvoiceStatus; + } + public void setUseStatus(String useStatus) + { + this.useStatus = useStatus; + } + + public String getUseStatus() + { + return useStatus; + } + public void setSalesOrderCode(String salesOrderCode) + { + this.salesOrderCode = salesOrderCode; + } + + public String getSalesOrderCode() + { + return salesOrderCode; + } + public void setSalesOrderNumber(String salesOrderNumber) + { + this.salesOrderNumber = salesOrderNumber; + } + + public String getSalesOrderNumber() + { + return salesOrderNumber; + } + public void setSalesOrderType(String salesOrderType) + { + this.salesOrderType = salesOrderType; + } + + public String getSalesOrderType() + { + return salesOrderType; + } + public void setTaxInvoiceType(String taxInvoiceType) + { + this.taxInvoiceType = taxInvoiceType; + } + + public String getTaxInvoiceType() + { + return taxInvoiceType; + } + public void setTaxInvoiceClass(String taxInvoiceClass) + { + this.taxInvoiceClass = taxInvoiceClass; + } + + public String getTaxInvoiceClass() + { + return taxInvoiceClass; + } + public void setTaxInvoiceTitle(String taxInvoiceTitle) + { + this.taxInvoiceTitle = taxInvoiceTitle; + } + + public String getTaxInvoiceTitle() + { + return taxInvoiceTitle; + } + public void setBusinessMembers(String businessMembers) + { + this.businessMembers = businessMembers; + } + + public String getBusinessMembers() + { + return businessMembers; + } + public void setApplyUser(String applyUser) + { + this.applyUser = applyUser; + } + + public String getApplyUser() + { + return applyUser; + } + public void setEnterpriseCode(String enterpriseCode) + { + this.enterpriseCode = enterpriseCode; + } + + public String getEnterpriseCode() + { + return enterpriseCode; + } + public void setEnterpriseName(String enterpriseName) + { + this.enterpriseName = enterpriseName; + } + + public String getEnterpriseName() + { + return enterpriseName; + } + public void setContactNumber(String contactNumber) + { + this.contactNumber = contactNumber; + } + + public String getContactNumber() + { + return contactNumber; + } + public void setEnterpriseAddress(String enterpriseAddress) + { + this.enterpriseAddress = enterpriseAddress; + } + + public String getEnterpriseAddress() + { + return enterpriseAddress; + } + public void setCommonCurrency(String commonCurrency) + { + this.commonCurrency = commonCurrency; + } + + public String getCommonCurrency() + { + return commonCurrency; + } + public void setInvoiceCompanyName(String invoiceCompanyName) + { + this.invoiceCompanyName = invoiceCompanyName; + } + + public String getInvoiceCompanyName() + { + return invoiceCompanyName; + } + public void setInvoiceCompanyCode(String invoiceCompanyCode) + { + this.invoiceCompanyCode = invoiceCompanyCode; + } + + public String getInvoiceCompanyCode() + { + return invoiceCompanyCode; + } + public void setDepositBank(String depositBank) + { + this.depositBank = depositBank; + } + + public String getDepositBank() + { + return depositBank; + } + public void setBankAccount(String bankAccount) + { + this.bankAccount = bankAccount; + } + + public String getBankAccount() + { + return bankAccount; + } + public void setTaxRate(BigDecimal taxRate) + { + this.taxRate = taxRate; + } + + public BigDecimal getTaxRate() + { + return taxRate; + } + public void setUsdTax(BigDecimal usdTax) + { + this.usdTax = usdTax; + } + + public BigDecimal getUsdTax() + { + return usdTax; + } + public void setMaterialSum(String materialSum) + { + this.materialSum = materialSum; + } + + public String getMaterialSum() + { + return materialSum; + } + public void setEnterpriseSum(String enterpriseSum) + { + this.enterpriseSum = enterpriseSum; + } + + public String getEnterpriseSum() + { + return enterpriseSum; + } + public void setNoRmbSum(BigDecimal noRmbSum) + { + this.noRmbSum = noRmbSum; + } + + public BigDecimal getNoRmbSum() + { + return noRmbSum; + } + public void setRmbTaxSum(BigDecimal rmbTaxSum) + { + this.rmbTaxSum = rmbTaxSum; + } + + public BigDecimal getRmbTaxSum() + { + return rmbTaxSum; + } + public void setNoUsdSum(BigDecimal noUsdSum) + { + this.noUsdSum = noUsdSum; + } + + public BigDecimal getNoUsdSum() + { + return noUsdSum; + } + public void setUsdTaxSum(BigDecimal usdTaxSum) + { + this.usdTaxSum = usdTaxSum; + } + + public BigDecimal getUsdTaxSum() + { + return usdTaxSum; + } + public void setInvoiceEmail(String invoiceEmail) + { + this.invoiceEmail = invoiceEmail; + } + + public String getInvoiceEmail() + { + return invoiceEmail; + } + public void setInvoiceQuotaRatio(BigDecimal invoiceQuotaRatio) + { + this.invoiceQuotaRatio = invoiceQuotaRatio; + } + + public BigDecimal getInvoiceQuotaRatio() + { + return invoiceQuotaRatio; + } + public void setInvoiceAmount(BigDecimal invoiceAmount) + { + this.invoiceAmount = invoiceAmount; + } + + public BigDecimal getInvoiceAmount() + { + return invoiceAmount; + } + public void setActualInvoiceAmount(BigDecimal actualInvoiceAmount) + { + this.actualInvoiceAmount = actualInvoiceAmount; + } + + public BigDecimal getActualInvoiceAmount() + { + return actualInvoiceAmount; + } + public void setActualInvoiceAmountRmb(BigDecimal actualInvoiceAmountRmb) + { + this.actualInvoiceAmountRmb = actualInvoiceAmountRmb; + } + + public BigDecimal getActualInvoiceAmountRmb() + { + return actualInvoiceAmountRmb; + } + public void setActualInvoiceAmountUsd(BigDecimal actualInvoiceAmountUsd) + { + this.actualInvoiceAmountUsd = actualInvoiceAmountUsd; + } + + public BigDecimal getActualInvoiceAmountUsd() + { + return actualInvoiceAmountUsd; + } + public void setInvoicePurpose(String invoicePurpose) + { + this.invoicePurpose = invoicePurpose; + } + + public String getInvoicePurpose() + { + return invoicePurpose; + } + public void setBusinessRemark(String businessRemark) + { + this.businessRemark = businessRemark; + } + + public String getBusinessRemark() + { + return businessRemark; + } + public void setInvoiceRemark(String invoiceRemark) + { + this.invoiceRemark = invoiceRemark; + } + + public String getInvoiceRemark() + { + return invoiceRemark; + } + public void setInvoiceData(Date invoiceData) + { + this.invoiceData = invoiceData; + } + + public Date getInvoiceData() + { + return invoiceData; + } + public void setInvoiceCode(String invoiceCode) + { + this.invoiceCode = invoiceCode; + } + + public String getInvoiceCode() + { + return invoiceCode; + } + public void setInvoicePhone(String invoicePhone) + { + this.invoicePhone = invoicePhone; + } + + public String getInvoicePhone() + { + return invoicePhone; + } + 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("taxInvoiceId", getTaxInvoiceId()) + .append("taxInvoiceCode", getTaxInvoiceCode()) + .append("taxInvoiceStatus", getTaxInvoiceStatus()) + .append("useStatus", getUseStatus()) + .append("salesOrderCode", getSalesOrderCode()) + .append("salesOrderNumber", getSalesOrderNumber()) + .append("salesOrderType", getSalesOrderType()) + .append("taxInvoiceType", getTaxInvoiceType()) + .append("taxInvoiceClass", getTaxInvoiceClass()) + .append("taxInvoiceTitle", getTaxInvoiceTitle()) + .append("businessMembers", getBusinessMembers()) + .append("applyUser", getApplyUser()) + .append("enterpriseCode", getEnterpriseCode()) + .append("enterpriseName", getEnterpriseName()) + .append("contactNumber", getContactNumber()) + .append("enterpriseAddress", getEnterpriseAddress()) + .append("commonCurrency", getCommonCurrency()) + .append("invoiceCompanyName", getInvoiceCompanyName()) + .append("invoiceCompanyCode", getInvoiceCompanyCode()) + .append("depositBank", getDepositBank()) + .append("bankAccount", getBankAccount()) + .append("taxRate", getTaxRate()) + .append("usdTax", getUsdTax()) + .append("materialSum", getMaterialSum()) + .append("enterpriseSum", getEnterpriseSum()) + .append("noRmbSum", getNoRmbSum()) + .append("rmbTaxSum", getRmbTaxSum()) + .append("noUsdSum", getNoUsdSum()) + .append("usdTaxSum", getUsdTaxSum()) + .append("invoiceEmail", getInvoiceEmail()) + .append("invoiceQuotaRatio", getInvoiceQuotaRatio()) + .append("invoiceAmount", getInvoiceAmount()) + .append("actualInvoiceAmount", getActualInvoiceAmount()) + .append("actualInvoiceAmountRmb", getActualInvoiceAmountRmb()) + .append("actualInvoiceAmountUsd", getActualInvoiceAmountUsd()) + .append("invoicePurpose", getInvoicePurpose()) + .append("businessRemark", getBusinessRemark()) + .append("invoiceRemark", getInvoiceRemark()) + .append("invoiceData", getInvoiceData()) + .append("invoiceCode", getInvoiceCode()) + .append("invoicePhone", getInvoicePhone()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .append("delFlag", getDelFlag()) + .toString(); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/financial/mapper/FinancialTaxInvoiceMapper.java b/ruoyi-admin/src/main/java/com/ruoyi/financial/mapper/FinancialTaxInvoiceMapper.java new file mode 100644 index 00000000..9a48797c --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/financial/mapper/FinancialTaxInvoiceMapper.java @@ -0,0 +1,77 @@ +package com.ruoyi.financial.mapper; + +import java.util.List; +import com.ruoyi.financial.domain.FinancialTaxInvoice; + +/** + * 国税发票Mapper接口 + * + * @author 刘晓旭 + * @date 2024-08-12 + */ +public interface FinancialTaxInvoiceMapper +{ + /** + * 查询国税发票 + * + * @param taxInvoiceId 国税发票ID + * @return 国税发票 + */ + public FinancialTaxInvoice selectFinancialTaxInvoiceById(Long taxInvoiceId); + + /** + * 查询国税发票列表 + * + * @param financialTaxInvoice 国税发票 + * @return 国税发票集合 + */ + public List selectFinancialTaxInvoiceList(FinancialTaxInvoice financialTaxInvoice); + + /** + * 新增国税发票 + * + * @param financialTaxInvoice 国税发票 + * @return 结果 + */ + public int insertFinancialTaxInvoice(FinancialTaxInvoice financialTaxInvoice); + + /** + * 修改国税发票 + * + * @param financialTaxInvoice 国税发票 + * @return 结果 + */ + public int updateFinancialTaxInvoice(FinancialTaxInvoice financialTaxInvoice); + + /** + * 删除国税发票 + * + * @param taxInvoiceId 国税发票ID + * @return 结果 + */ + public int deleteFinancialTaxInvoiceById(Long taxInvoiceId); + + /** + * 批量删除国税发票 + * + * @param taxInvoiceIds 需要删除的数据ID + * @return 结果 + */ + public int deleteFinancialTaxInvoiceByIds(String[] taxInvoiceIds); + + /** + * 作废国税发票 + * + * @param taxInvoiceId 国税发票ID + * @return 结果 + */ + public int cancelFinancialTaxInvoiceById(Long taxInvoiceId); + + /** + * 恢复国税发票 + * + * @param taxInvoiceId 国税发票ID + * @return 结果 + */ + public int restoreFinancialTaxInvoiceById(Long taxInvoiceId); +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/financial/service/IFinancialTaxInvoiceService.java b/ruoyi-admin/src/main/java/com/ruoyi/financial/service/IFinancialTaxInvoiceService.java new file mode 100644 index 00000000..177b8eec --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/financial/service/IFinancialTaxInvoiceService.java @@ -0,0 +1,75 @@ +package com.ruoyi.financial.service; + +import java.util.List; +import com.ruoyi.financial.domain.FinancialTaxInvoice; + +/** + * 国税发票Service接口 + * + * @author 刘晓旭 + * @date 2024-08-12 + */ +public interface IFinancialTaxInvoiceService +{ + /** + * 查询国税发票 + * + * @param taxInvoiceId 国税发票ID + * @return 国税发票 + */ + public FinancialTaxInvoice selectFinancialTaxInvoiceById(Long taxInvoiceId); + + /** + * 查询国税发票列表 + * + * @param financialTaxInvoice 国税发票 + * @return 国税发票集合 + */ + public List selectFinancialTaxInvoiceList(FinancialTaxInvoice financialTaxInvoice); + + /** + * 新增国税发票 + * + * @param financialTaxInvoice 国税发票 + * @return 结果 + */ + public int insertFinancialTaxInvoice(FinancialTaxInvoice financialTaxInvoice); + + /** + * 修改国税发票 + * + * @param financialTaxInvoice 国税发票 + * @return 结果 + */ + public int updateFinancialTaxInvoice(FinancialTaxInvoice financialTaxInvoice); + + /** + * 批量删除国税发票 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + public int deleteFinancialTaxInvoiceByIds(String ids); + + /** + * 删除国税发票信息 + * + * @param taxInvoiceId 国税发票ID + * @return 结果 + */ + public int deleteFinancialTaxInvoiceById(Long taxInvoiceId); + + /** + * 作废国税发票 + * @param taxInvoiceId 国税发票ID + * @return + */ + int cancelFinancialTaxInvoiceById(Long taxInvoiceId); + + /** + * 恢复国税发票 + * @param taxInvoiceId 国税发票ID + * @return + */ + int restoreFinancialTaxInvoiceById(Long taxInvoiceId); +} 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 new file mode 100644 index 00000000..c604b573 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/FinancialTaxInvoiceServiceImpl.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.FinancialTaxInvoiceMapper; +import com.ruoyi.financial.domain.FinancialTaxInvoice; +import com.ruoyi.financial.service.IFinancialTaxInvoiceService; +import com.ruoyi.common.core.text.Convert; + +/** + * 国税发票Service业务层处理 + * + * @author 刘晓旭 + * @date 2024-08-12 + */ +@Service +public class FinancialTaxInvoiceServiceImpl implements IFinancialTaxInvoiceService +{ + @Autowired + private FinancialTaxInvoiceMapper financialTaxInvoiceMapper; + + /** + * 查询国税发票 + * + * @param taxInvoiceId 国税发票ID + * @return 国税发票 + */ + @Override + public FinancialTaxInvoice selectFinancialTaxInvoiceById(Long taxInvoiceId) + { + return financialTaxInvoiceMapper.selectFinancialTaxInvoiceById(taxInvoiceId); + } + + /** + * 查询国税发票列表 + * + * @param financialTaxInvoice 国税发票 + * @return 国税发票 + */ + @Override + public List selectFinancialTaxInvoiceList(FinancialTaxInvoice financialTaxInvoice) + { + return financialTaxInvoiceMapper.selectFinancialTaxInvoiceList(financialTaxInvoice); + } + + /** + * 新增国税发票 + * + * @param financialTaxInvoice 国税发票 + * @return 结果 + */ + @Override + public int insertFinancialTaxInvoice(FinancialTaxInvoice financialTaxInvoice) + { + String loginName = ShiroUtils.getLoginName(); + financialTaxInvoice.setCreateBy(loginName); + financialTaxInvoice.setCreateTime(DateUtils.getNowDate()); + return financialTaxInvoiceMapper.insertFinancialTaxInvoice(financialTaxInvoice); + } + + /** + * 修改国税发票 + * + * @param financialTaxInvoice 国税发票 + * @return 结果 + */ + @Override + public int updateFinancialTaxInvoice(FinancialTaxInvoice financialTaxInvoice) + { + String loginName = ShiroUtils.getLoginName(); + financialTaxInvoice.setUpdateBy(loginName); + financialTaxInvoice.setUpdateTime(DateUtils.getNowDate()); + return financialTaxInvoiceMapper.updateFinancialTaxInvoice(financialTaxInvoice); + } + + /** + * 删除国税发票对象 + * + * @param ids 需要删除的数据ID + * @return 结果 + */ + @Override + public int deleteFinancialTaxInvoiceByIds(String ids) + { + return financialTaxInvoiceMapper.deleteFinancialTaxInvoiceByIds(Convert.toStrArray(ids)); + } + + /** + * 删除国税发票信息 + * + * @param taxInvoiceId 国税发票ID + * @return 结果 + */ + @Override + public int deleteFinancialTaxInvoiceById(Long taxInvoiceId) + { + return financialTaxInvoiceMapper.deleteFinancialTaxInvoiceById(taxInvoiceId); + } + + /** + * 作废国税发票 + * + * @param taxInvoiceId 国税发票ID + * @return 结果 + */ + @Override + public int cancelFinancialTaxInvoiceById(Long taxInvoiceId) + { + return financialTaxInvoiceMapper.cancelFinancialTaxInvoiceById(taxInvoiceId); + } + + /** + * 恢复国税发票信息 + * + * @param taxInvoiceId 国税发票ID + * @return 结果 + */ + @Override + public int restoreFinancialTaxInvoiceById(Long taxInvoiceId) + { + return financialTaxInvoiceMapper.restoreFinancialTaxInvoiceById(taxInvoiceId); + } +} diff --git a/ruoyi-admin/src/main/resources/mapper/financial/FinancialTaxInvoiceMapper.xml b/ruoyi-admin/src/main/resources/mapper/financial/FinancialTaxInvoiceMapper.xml new file mode 100644 index 00000000..f6f096d5 --- /dev/null +++ b/ruoyi-admin/src/main/resources/mapper/financial/FinancialTaxInvoiceMapper.xml @@ -0,0 +1,255 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + insert into financial_tax_invoice + + 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, + + + #{taxInvoiceCode}, + #{taxInvoiceStatus}, + #{useStatus}, + #{salesOrderCode}, + #{salesOrderNumber}, + #{salesOrderType}, + #{taxInvoiceType}, + #{taxInvoiceClass}, + #{taxInvoiceTitle}, + #{businessMembers}, + #{applyUser}, + #{enterpriseCode}, + #{enterpriseName}, + #{contactNumber}, + #{enterpriseAddress}, + #{commonCurrency}, + #{invoiceCompanyName}, + #{invoiceCompanyCode}, + #{depositBank}, + #{bankAccount}, + #{taxRate}, + #{usdTax}, + #{materialSum}, + #{enterpriseSum}, + #{noRmbSum}, + #{rmbTaxSum}, + #{noUsdSum}, + #{usdTaxSum}, + #{invoiceEmail}, + #{invoiceQuotaRatio}, + #{invoiceAmount}, + #{actualInvoiceAmount}, + #{actualInvoiceAmountRmb}, + #{actualInvoiceAmountUsd}, + #{invoicePurpose}, + #{businessRemark}, + #{invoiceRemark}, + #{invoiceData}, + #{invoiceCode}, + #{invoicePhone}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + #{delFlag}, + + + + + update financial_tax_invoice + + tax_invoice_code = #{taxInvoiceCode}, + tax_invoice_status = #{taxInvoiceStatus}, + use_status = #{useStatus}, + sales_order_code = #{salesOrderCode}, + sales_order_number = #{salesOrderNumber}, + sales_order_type = #{salesOrderType}, + tax_invoice_type = #{taxInvoiceType}, + tax_invoice_class = #{taxInvoiceClass}, + tax_invoice_title = #{taxInvoiceTitle}, + business_members = #{businessMembers}, + apply_user = #{applyUser}, + enterprise_code = #{enterpriseCode}, + enterprise_name = #{enterpriseName}, + contact_number = #{contactNumber}, + enterprise_address = #{enterpriseAddress}, + common_currency = #{commonCurrency}, + invoice_company_name = #{invoiceCompanyName}, + invoice_company_code = #{invoiceCompanyCode}, + deposit_bank = #{depositBank}, + bank_account = #{bankAccount}, + tax_rate = #{taxRate}, + usd_tax = #{usdTax}, + material_sum = #{materialSum}, + enterprise_sum = #{enterpriseSum}, + noRmbSum = #{noRmbSum}, + rmbTaxSum = #{rmbTaxSum}, + noUsdSum = #{noUsdSum}, + usdTaxSum = #{usdTaxSum}, + invoice_email = #{invoiceEmail}, + invoice_quota_ratio = #{invoiceQuotaRatio}, + invoice_amount = #{invoiceAmount}, + actual_invoice_amount = #{actualInvoiceAmount}, + actual_invoice_amount_rmb = #{actualInvoiceAmountRmb}, + actual_invoice_amount_usd = #{actualInvoiceAmountUsd}, + invoice_purpose = #{invoicePurpose}, + business_remark = #{businessRemark}, + invoice_remark = #{invoiceRemark}, + invoice_data = #{invoiceData}, + invoice_code = #{invoiceCode}, + invoice_phone = #{invoicePhone}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + del_flag = #{delFlag}, + + where tax_invoice_id = #{taxInvoiceId} + + + + delete from financial_tax_invoice where tax_invoice_id = #{taxInvoiceId} + + + + delete from financial_tax_invoice where tax_invoice_id in + + #{taxInvoiceId} + + + + + update financial_tax_invoice set del_flag = '1' where tax_invoice_id = #{taxInvoiceId} + + + + update financial_tax_invoice set del_flag = '0' where tax_invoice_id = #{taxInvoiceId} + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/financial/taxInvoice/add.html b/ruoyi-admin/src/main/resources/templates/financial/taxInvoice/add.html new file mode 100644 index 00000000..7fede454 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/financial/taxInvoice/add.html @@ -0,0 +1,305 @@ + + + + + + + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+ 代码生成请选择字典属性 +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/financial/taxInvoice/edit.html b/ruoyi-admin/src/main/resources/templates/financial/taxInvoice/edit.html new file mode 100644 index 00000000..a76f3f44 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/financial/taxInvoice/edit.html @@ -0,0 +1,300 @@ + + + + + + + +
+
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+ 代码生成请选择字典属性 +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ + + + + \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/financial/taxInvoice/taxInvoice.html b/ruoyi-admin/src/main/resources/templates/financial/taxInvoice/taxInvoice.html new file mode 100644 index 00000000..242e2de3 --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/financial/taxInvoice/taxInvoice.html @@ -0,0 +1,282 @@ + + + + + + +
+
+
+
+
+
    +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + + - + +
  • +
  • +  搜索 +  重置 +
  • +
+
+
+
+ + +
+
+
+
+
+ + + + \ No newline at end of file