liuxiaoxu
1 month ago
11 changed files with 0 additions and 1149 deletions
@ -1,126 +0,0 @@ |
|||
package com.ruoyi.taxInvoice.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.taxInvoice.domain.TaxInvoicePurchaseProduct; |
|||
import com.ruoyi.taxInvoice.service.ITaxInvoicePurchaseProductService; |
|||
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 ruoyi |
|||
* @date 2023-07-10 |
|||
*/ |
|||
@Controller |
|||
@RequestMapping("/taxInvoice/taxInvoicePurchaseProduct") |
|||
public class TaxInvoicePurchaseProductController extends BaseController |
|||
{ |
|||
private String prefix = "taxInvoice/taxInvoicePurchaseProduct"; |
|||
|
|||
@Autowired |
|||
private ITaxInvoicePurchaseProductService taxInvoicePurchaseProductService; |
|||
|
|||
@RequiresPermissions("taxInvoice:taxInvoicePurchaseProduct:view") |
|||
@GetMapping() |
|||
public String taxInvoicePurchaseProduct() |
|||
{ |
|||
return prefix + "/taxInvoicePurchaseProduct"; |
|||
} |
|||
|
|||
/** |
|||
* 查询国税发票(采购)列表 |
|||
*/ |
|||
@RequiresPermissions("taxInvoice:taxInvoicePurchaseProduct:list") |
|||
@PostMapping("/list") |
|||
@ResponseBody |
|||
public TableDataInfo list(TaxInvoicePurchaseProduct taxInvoicePurchaseProduct) |
|||
{ |
|||
startPage(); |
|||
List<TaxInvoicePurchaseProduct> list = taxInvoicePurchaseProductService.selectTaxInvoicePurchaseProductList(taxInvoicePurchaseProduct); |
|||
return getDataTable(list); |
|||
} |
|||
|
|||
/** |
|||
* 导出国税发票(采购)列表 |
|||
*/ |
|||
@RequiresPermissions("taxInvoice:taxInvoicePurchaseProduct:export") |
|||
@Log(title = "国税发票(采购)", businessType = BusinessType.EXPORT) |
|||
@PostMapping("/export") |
|||
@ResponseBody |
|||
public AjaxResult export(TaxInvoicePurchaseProduct taxInvoicePurchaseProduct) |
|||
{ |
|||
List<TaxInvoicePurchaseProduct> list = taxInvoicePurchaseProductService.selectTaxInvoicePurchaseProductList(taxInvoicePurchaseProduct); |
|||
ExcelUtil<TaxInvoicePurchaseProduct> util = new ExcelUtil<TaxInvoicePurchaseProduct>(TaxInvoicePurchaseProduct.class); |
|||
return util.exportExcel(list, "国税发票(采购)数据"); |
|||
} |
|||
|
|||
/** |
|||
* 新增国税发票(采购) |
|||
*/ |
|||
@GetMapping("/add") |
|||
public String add() |
|||
{ |
|||
return prefix + "/add"; |
|||
} |
|||
|
|||
/** |
|||
* 新增保存国税发票(采购) |
|||
*/ |
|||
@RequiresPermissions("taxInvoice:taxInvoicePurchaseProduct:add") |
|||
@Log(title = "国税发票(采购)", businessType = BusinessType.INSERT) |
|||
@PostMapping("/add") |
|||
@ResponseBody |
|||
public AjaxResult addSave(TaxInvoicePurchaseProduct taxInvoicePurchaseProduct) |
|||
{ |
|||
return toAjax(taxInvoicePurchaseProductService.insertTaxInvoicePurchaseProduct(taxInvoicePurchaseProduct)); |
|||
} |
|||
|
|||
/** |
|||
* 修改国税发票(采购) |
|||
*/ |
|||
@GetMapping("/edit/{taxPurchaseProductId}") |
|||
public String edit(@PathVariable("taxPurchaseProductId") Long taxPurchaseProductId, ModelMap mmap) |
|||
{ |
|||
TaxInvoicePurchaseProduct taxInvoicePurchaseProduct = taxInvoicePurchaseProductService.selectTaxInvoicePurchaseProductById(taxPurchaseProductId); |
|||
mmap.put("taxInvoicePurchaseProduct", taxInvoicePurchaseProduct); |
|||
return prefix + "/edit"; |
|||
} |
|||
|
|||
/** |
|||
* 修改保存国税发票(采购) |
|||
*/ |
|||
@RequiresPermissions("taxInvoice:taxInvoicePurchaseProduct:edit") |
|||
@Log(title = "国税发票(采购)", businessType = BusinessType.UPDATE) |
|||
@PostMapping("/edit") |
|||
@ResponseBody |
|||
public AjaxResult editSave(TaxInvoicePurchaseProduct taxInvoicePurchaseProduct) |
|||
{ |
|||
return toAjax(taxInvoicePurchaseProductService.updateTaxInvoicePurchaseProduct(taxInvoicePurchaseProduct)); |
|||
} |
|||
|
|||
/** |
|||
* 删除国税发票(采购) |
|||
*/ |
|||
@RequiresPermissions("taxInvoice:taxInvoicePurchaseProduct:remove") |
|||
@Log(title = "国税发票(采购)", businessType = BusinessType.DELETE) |
|||
@PostMapping( "/remove") |
|||
@ResponseBody |
|||
public AjaxResult remove(String ids) |
|||
{ |
|||
return toAjax(taxInvoicePurchaseProductService.deleteTaxInvoicePurchaseProductByIds(ids)); |
|||
} |
|||
} |
@ -1,149 +0,0 @@ |
|||
package com.ruoyi.taxInvoice.domain; |
|||
|
|||
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; |
|||
|
|||
/** |
|||
* 国税发票(采购)对象 tax_invoice_purchase_product |
|||
* |
|||
* @author ruoyi |
|||
* @date 2023-07-10 |
|||
*/ |
|||
public class TaxInvoicePurchaseProduct extends BaseEntity |
|||
{ |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** */ |
|||
private Long taxPurchaseProductId; |
|||
|
|||
/** 发票编号 */ |
|||
@Excel(name = "发票编号") |
|||
private String taxPurchaseCode; |
|||
|
|||
/** 料号 */ |
|||
@Excel(name = "料号") |
|||
private String productCode; |
|||
|
|||
/** 品名 */ |
|||
@Excel(name = "品名") |
|||
private String productName; |
|||
|
|||
/** 单位 */ |
|||
@Excel(name = "单位") |
|||
private String inventoryUnit; |
|||
|
|||
/** 数量 */ |
|||
@Excel(name = "数量") |
|||
private Long count; |
|||
|
|||
/** 币种 */ |
|||
@Excel(name = "币种") |
|||
private String commonCurrency; |
|||
|
|||
/** 单价 */ |
|||
@Excel(name = "单价") |
|||
private String monovalent; |
|||
|
|||
/** 金额 */ |
|||
@Excel(name = "金额") |
|||
private String amount; |
|||
|
|||
public void setTaxPurchaseProductId(Long taxPurchaseProductId) |
|||
{ |
|||
this.taxPurchaseProductId = taxPurchaseProductId; |
|||
} |
|||
|
|||
public Long getTaxPurchaseProductId() |
|||
{ |
|||
return taxPurchaseProductId; |
|||
} |
|||
public void setTaxPurchaseCode(String taxPurchaseCode) |
|||
{ |
|||
this.taxPurchaseCode = taxPurchaseCode; |
|||
} |
|||
|
|||
public String getTaxPurchaseCode() |
|||
{ |
|||
return taxPurchaseCode; |
|||
} |
|||
public void setProductCode(String productCode) |
|||
{ |
|||
this.productCode = productCode; |
|||
} |
|||
|
|||
public String getProductCode() |
|||
{ |
|||
return productCode; |
|||
} |
|||
public void setProductName(String productName) |
|||
{ |
|||
this.productName = productName; |
|||
} |
|||
|
|||
public String getProductName() |
|||
{ |
|||
return productName; |
|||
} |
|||
public void setInventoryUnit(String inventoryUnit) |
|||
{ |
|||
this.inventoryUnit = inventoryUnit; |
|||
} |
|||
|
|||
public String getInventoryUnit() |
|||
{ |
|||
return inventoryUnit; |
|||
} |
|||
public void setCount(Long count) |
|||
{ |
|||
this.count = count; |
|||
} |
|||
|
|||
public Long getCount() |
|||
{ |
|||
return count; |
|||
} |
|||
public void setCommonCurrency(String commonCurrency) |
|||
{ |
|||
this.commonCurrency = commonCurrency; |
|||
} |
|||
|
|||
public String getCommonCurrency() |
|||
{ |
|||
return commonCurrency; |
|||
} |
|||
public void setMonovalent(String monovalent) |
|||
{ |
|||
this.monovalent = monovalent; |
|||
} |
|||
|
|||
public String getMonovalent() |
|||
{ |
|||
return monovalent; |
|||
} |
|||
public void setAmount(String amount) |
|||
{ |
|||
this.amount = amount; |
|||
} |
|||
|
|||
public String getAmount() |
|||
{ |
|||
return amount; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
|||
.append("taxPurchaseProductId", getTaxPurchaseProductId()) |
|||
.append("taxPurchaseCode", getTaxPurchaseCode()) |
|||
.append("productCode", getProductCode()) |
|||
.append("productName", getProductName()) |
|||
.append("inventoryUnit", getInventoryUnit()) |
|||
.append("count", getCount()) |
|||
.append("commonCurrency", getCommonCurrency()) |
|||
.append("monovalent", getMonovalent()) |
|||
.append("amount", getAmount()) |
|||
.toString(); |
|||
} |
|||
} |
@ -1,151 +0,0 @@ |
|||
package com.ruoyi.taxInvoice.domain.exportDto; |
|||
|
|||
import com.alibaba.excel.annotation.ExcelProperty; |
|||
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; |
|||
|
|||
/** |
|||
* 国税发票(采购)对象 tax_invoice_purchase_product |
|||
* |
|||
* @author ruoyi |
|||
* @date 2023-07-06 |
|||
*/ |
|||
public class TaxInvoicePurchaseProductDto extends BaseEntity |
|||
{ |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** */ |
|||
private Long taxPurchaseProductId; |
|||
|
|||
/** 发票编号 */ |
|||
@ExcelProperty("发票编号") |
|||
private String taxPurchaseCode; |
|||
|
|||
/** 料号 */ |
|||
@ExcelProperty("料号") |
|||
private String productCode; |
|||
|
|||
/** 品名 */ |
|||
@ExcelProperty("品名") |
|||
private String productName; |
|||
|
|||
/** 单位 */ |
|||
@ExcelProperty("单位") |
|||
private String inventoryUnit; |
|||
|
|||
/** 数量 */ |
|||
@ExcelProperty("数量") |
|||
private Long count; |
|||
|
|||
/** 币种 */ |
|||
@ExcelProperty("币种") |
|||
private String commonCurrency; |
|||
|
|||
/** 单价 */ |
|||
@ExcelProperty("单价") |
|||
private String monovalent; |
|||
|
|||
/** 金额 */ |
|||
@ExcelProperty("金额") |
|||
private String amount; |
|||
|
|||
public void setTaxPurchaseCode(String taxPurchaseCode) |
|||
{ |
|||
this.taxPurchaseCode = taxPurchaseCode; |
|||
} |
|||
|
|||
public String getTaxPurchaseCode() |
|||
{ |
|||
return taxPurchaseCode; |
|||
} |
|||
|
|||
public void setTaxPurchaseProductId(Long taxPurchaseProductId) |
|||
{ |
|||
this.taxPurchaseProductId = taxPurchaseProductId; |
|||
} |
|||
|
|||
public Long getTaxPurchaseProductId() |
|||
{ |
|||
return taxPurchaseProductId; |
|||
} |
|||
public void setProductCode(String productCode) |
|||
{ |
|||
this.productCode = productCode; |
|||
} |
|||
|
|||
public String getProductCode() |
|||
{ |
|||
return productCode; |
|||
} |
|||
public void setProductName(String productName) |
|||
{ |
|||
this.productName = productName; |
|||
} |
|||
|
|||
public String getProductName() |
|||
{ |
|||
return productName; |
|||
} |
|||
public void setInventoryUnit(String inventoryUnit) |
|||
{ |
|||
this.inventoryUnit = inventoryUnit; |
|||
} |
|||
|
|||
public String getInventoryUnit() |
|||
{ |
|||
return inventoryUnit; |
|||
} |
|||
public void setCount(Long count) |
|||
{ |
|||
this.count = count; |
|||
} |
|||
|
|||
public Long getCount() |
|||
{ |
|||
return count; |
|||
} |
|||
public void setCommonCurrency(String commonCurrency) |
|||
{ |
|||
this.commonCurrency = commonCurrency; |
|||
} |
|||
|
|||
public String getCommonCurrency() |
|||
{ |
|||
return commonCurrency; |
|||
} |
|||
public void setMonovalent(String monovalent) |
|||
{ |
|||
this.monovalent = monovalent; |
|||
} |
|||
|
|||
public String getMonovalent() |
|||
{ |
|||
return monovalent; |
|||
} |
|||
public void setAmount(String amount) |
|||
{ |
|||
this.amount = amount; |
|||
} |
|||
|
|||
public String getAmount() |
|||
{ |
|||
return amount; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
|||
.append("taxPurchaseProductId", getTaxPurchaseProductId()) |
|||
.append("taxPurchaseCode", getTaxPurchaseCode()) |
|||
.append("productCode", getProductCode()) |
|||
.append("productName", getProductName()) |
|||
.append("inventoryUnit", getInventoryUnit()) |
|||
.append("count", getCount()) |
|||
.append("commonCurrency", getCommonCurrency()) |
|||
.append("monovalent", getMonovalent()) |
|||
.append("amount", getAmount()) |
|||
.toString(); |
|||
} |
|||
} |
@ -1,61 +0,0 @@ |
|||
package com.ruoyi.taxInvoice.mapper; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.taxInvoice.domain.TaxInvoicePurchaseProduct; |
|||
|
|||
/** |
|||
* 国税发票(采购)Mapper接口 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2023-07-10 |
|||
*/ |
|||
public interface TaxInvoicePurchaseProductMapper |
|||
{ |
|||
/** |
|||
* 查询国税发票(采购) |
|||
* |
|||
* @param taxPurchaseProductId 国税发票(采购)ID |
|||
* @return 国税发票(采购) |
|||
*/ |
|||
public TaxInvoicePurchaseProduct selectTaxInvoicePurchaseProductById(Long taxPurchaseProductId); |
|||
|
|||
/** |
|||
* 查询国税发票(采购)列表 |
|||
* |
|||
* @param taxInvoicePurchaseProduct 国税发票(采购) |
|||
* @return 国税发票(采购)集合 |
|||
*/ |
|||
public List<TaxInvoicePurchaseProduct> selectTaxInvoicePurchaseProductList(TaxInvoicePurchaseProduct taxInvoicePurchaseProduct); |
|||
|
|||
/** |
|||
* 新增国税发票(采购) |
|||
* |
|||
* @param taxInvoicePurchaseProduct 国税发票(采购) |
|||
* @return 结果 |
|||
*/ |
|||
public int insertTaxInvoicePurchaseProduct(TaxInvoicePurchaseProduct taxInvoicePurchaseProduct); |
|||
|
|||
/** |
|||
* 修改国税发票(采购) |
|||
* |
|||
* @param taxInvoicePurchaseProduct 国税发票(采购) |
|||
* @return 结果 |
|||
*/ |
|||
public int updateTaxInvoicePurchaseProduct(TaxInvoicePurchaseProduct taxInvoicePurchaseProduct); |
|||
|
|||
/** |
|||
* 删除国税发票(采购) |
|||
* |
|||
* @param taxPurchaseProductId 国税发票(采购)ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteTaxInvoicePurchaseProductById(Long taxPurchaseProductId); |
|||
|
|||
/** |
|||
* 批量删除国税发票(采购) |
|||
* |
|||
* @param taxPurchaseProductIds 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteTaxInvoicePurchaseProductByIds(String[] taxPurchaseProductIds); |
|||
} |
@ -1,61 +0,0 @@ |
|||
package com.ruoyi.taxInvoice.service; |
|||
|
|||
import java.util.List; |
|||
import com.ruoyi.taxInvoice.domain.TaxInvoicePurchaseProduct; |
|||
|
|||
/** |
|||
* 国税发票(采购)Service接口 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2023-07-10 |
|||
*/ |
|||
public interface ITaxInvoicePurchaseProductService |
|||
{ |
|||
/** |
|||
* 查询国税发票(采购) |
|||
* |
|||
* @param taxPurchaseProductId 国税发票(采购)ID |
|||
* @return 国税发票(采购) |
|||
*/ |
|||
public TaxInvoicePurchaseProduct selectTaxInvoicePurchaseProductById(Long taxPurchaseProductId); |
|||
|
|||
/** |
|||
* 查询国税发票(采购)列表 |
|||
* |
|||
* @param taxInvoicePurchaseProduct 国税发票(采购) |
|||
* @return 国税发票(采购)集合 |
|||
*/ |
|||
public List<TaxInvoicePurchaseProduct> selectTaxInvoicePurchaseProductList(TaxInvoicePurchaseProduct taxInvoicePurchaseProduct); |
|||
|
|||
/** |
|||
* 新增国税发票(采购) |
|||
* |
|||
* @param taxInvoicePurchaseProduct 国税发票(采购) |
|||
* @return 结果 |
|||
*/ |
|||
public int insertTaxInvoicePurchaseProduct(TaxInvoicePurchaseProduct taxInvoicePurchaseProduct); |
|||
|
|||
/** |
|||
* 修改国税发票(采购) |
|||
* |
|||
* @param taxInvoicePurchaseProduct 国税发票(采购) |
|||
* @return 结果 |
|||
*/ |
|||
public int updateTaxInvoicePurchaseProduct(TaxInvoicePurchaseProduct taxInvoicePurchaseProduct); |
|||
|
|||
/** |
|||
* 批量删除国税发票(采购) |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteTaxInvoicePurchaseProductByIds(String ids); |
|||
|
|||
/** |
|||
* 删除国税发票(采购)信息 |
|||
* |
|||
* @param taxPurchaseProductId 国税发票(采购)ID |
|||
* @return 结果 |
|||
*/ |
|||
public int deleteTaxInvoicePurchaseProductById(Long taxPurchaseProductId); |
|||
} |
@ -1,94 +0,0 @@ |
|||
package com.ruoyi.taxInvoice.service.impl; |
|||
|
|||
import java.util.List; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import com.ruoyi.taxInvoice.mapper.TaxInvoicePurchaseProductMapper; |
|||
import com.ruoyi.taxInvoice.domain.TaxInvoicePurchaseProduct; |
|||
import com.ruoyi.taxInvoice.service.ITaxInvoicePurchaseProductService; |
|||
import com.ruoyi.common.core.text.Convert; |
|||
|
|||
/** |
|||
* 国税发票(采购)Service业务层处理 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2023-07-10 |
|||
*/ |
|||
@Service |
|||
public class TaxInvoicePurchaseProductServiceImpl implements ITaxInvoicePurchaseProductService |
|||
{ |
|||
@Autowired |
|||
private TaxInvoicePurchaseProductMapper taxInvoicePurchaseProductMapper; |
|||
|
|||
/** |
|||
* 查询国税发票(采购) |
|||
* |
|||
* @param taxPurchaseProductId 国税发票(采购)ID |
|||
* @return 国税发票(采购) |
|||
*/ |
|||
@Override |
|||
public TaxInvoicePurchaseProduct selectTaxInvoicePurchaseProductById(Long taxPurchaseProductId) |
|||
{ |
|||
return taxInvoicePurchaseProductMapper.selectTaxInvoicePurchaseProductById(taxPurchaseProductId); |
|||
} |
|||
|
|||
/** |
|||
* 查询国税发票(采购)列表 |
|||
* |
|||
* @param taxInvoicePurchaseProduct 国税发票(采购) |
|||
* @return 国税发票(采购) |
|||
*/ |
|||
@Override |
|||
public List<TaxInvoicePurchaseProduct> selectTaxInvoicePurchaseProductList(TaxInvoicePurchaseProduct taxInvoicePurchaseProduct) |
|||
{ |
|||
return taxInvoicePurchaseProductMapper.selectTaxInvoicePurchaseProductList(taxInvoicePurchaseProduct); |
|||
} |
|||
|
|||
/** |
|||
* 新增国税发票(采购) |
|||
* |
|||
* @param taxInvoicePurchaseProduct 国税发票(采购) |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int insertTaxInvoicePurchaseProduct(TaxInvoicePurchaseProduct taxInvoicePurchaseProduct) |
|||
{ |
|||
return taxInvoicePurchaseProductMapper.insertTaxInvoicePurchaseProduct(taxInvoicePurchaseProduct); |
|||
} |
|||
|
|||
/** |
|||
* 修改国税发票(采购) |
|||
* |
|||
* @param taxInvoicePurchaseProduct 国税发票(采购) |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int updateTaxInvoicePurchaseProduct(TaxInvoicePurchaseProduct taxInvoicePurchaseProduct) |
|||
{ |
|||
return taxInvoicePurchaseProductMapper.updateTaxInvoicePurchaseProduct(taxInvoicePurchaseProduct); |
|||
} |
|||
|
|||
/** |
|||
* 删除国税发票(采购)对象 |
|||
* |
|||
* @param ids 需要删除的数据ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteTaxInvoicePurchaseProductByIds(String ids) |
|||
{ |
|||
return taxInvoicePurchaseProductMapper.deleteTaxInvoicePurchaseProductByIds(Convert.toStrArray(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 删除国税发票(采购)信息 |
|||
* |
|||
* @param taxPurchaseProductId 国税发票(采购)ID |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteTaxInvoicePurchaseProductById(Long taxPurchaseProductId) |
|||
{ |
|||
return taxInvoicePurchaseProductMapper.deleteTaxInvoicePurchaseProductById(taxPurchaseProductId); |
|||
} |
|||
} |
@ -1,120 +0,0 @@ |
|||
package com.ruoyi.taxInvoice.utils; |
|||
|
|||
import java.math.BigDecimal; |
|||
import java.text.DecimalFormat; |
|||
import java.text.NumberFormat; |
|||
|
|||
/* |
|||
* 数字大小写转化 |
|||
* */ |
|||
public class CNNumberFormat { |
|||
|
|||
/** |
|||
* 中文数字正写 |
|||
*/ |
|||
private static final char[] cnNumbers = {'零', '壹', '贰', '叁', '肆', '伍', |
|||
'陆', '柒', '捌', '玖'}; |
|||
|
|||
private static final char[] stdNumbers = {'0', '1', '2', '3', '4', '5', |
|||
'6', '7', '8', '9'}; |
|||
|
|||
/** |
|||
* 货币单位 |
|||
*/ |
|||
// 顺序不能变,否则下面的实现代码页需要同步修改
|
|||
private static final char[] units = {'厘', '分', '角', '元', '拾', '佰', |
|||
'仟', '万', '拾', '佰', '仟', '亿', '拾', '佰', '仟'}; |
|||
|
|||
/** |
|||
* 是否输出货币单位元角分的完整格式,简单格式通常用于套打纸张上已印有货币单位的情形。 |
|||
*/ |
|||
private boolean fullFormat = true; |
|||
|
|||
public CNNumberFormat() { |
|||
|
|||
} |
|||
|
|||
public CNNumberFormat(boolean fullFormat) { |
|||
this.fullFormat = fullFormat; |
|||
} |
|||
|
|||
/** |
|||
* 取得大写形式的字符串 |
|||
* |
|||
* @return 中文正写的数字字符串 |
|||
*/ |
|||
public String format(double d) { |
|||
NumberFormat nf = new DecimalFormat("#.###"); |
|||
String original = String.valueOf(nf.format(d)); |
|||
return this.transform(original); |
|||
} |
|||
|
|||
public String format(long ln) { |
|||
return this.transform(String.valueOf(ln)); |
|||
} |
|||
|
|||
private String transform(String original) { |
|||
String integerPart = ""; |
|||
String floatPart = ""; |
|||
|
|||
if (original.indexOf(".") > -1) { |
|||
int dotIndex = original.indexOf("."); |
|||
integerPart = original.substring(0, dotIndex); |
|||
floatPart = original.substring(dotIndex + 1); |
|||
} else { |
|||
integerPart = original; |
|||
} |
|||
StringBuffer sb = new StringBuffer(); |
|||
|
|||
// 整数部分处理
|
|||
for (int i = 0; i < integerPart.length(); i++) { |
|||
int number = Integer |
|||
.parseInt(String.valueOf(integerPart.charAt(i))); |
|||
sb.append(cnNumbers[number]); |
|||
if (fullFormat) { |
|||
sb.append(units[integerPart.length() + 2 - i]); |
|||
} |
|||
} |
|||
|
|||
// 小数部分处理
|
|||
if (floatPart.length() >= 1) { |
|||
for (int i = 0; i < floatPart.length(); i++) { |
|||
int number = Integer.parseInt(String.valueOf(floatPart |
|||
.charAt(i))); |
|||
sb.append(cnNumbers[number]); |
|||
if (fullFormat && i < 3) { |
|||
sb.append(units[2 - i]); |
|||
} |
|||
} |
|||
} else if (fullFormat) { |
|||
sb.append('整'); |
|||
} |
|||
|
|||
return sb.toString(); |
|||
|
|||
} |
|||
|
|||
/** |
|||
* 将中文大写数字字符串转换成对应的数字类型 |
|||
* |
|||
* @param cnNumStr |
|||
* @return Java Number类型对象 |
|||
*/ |
|||
public Number parse(String cnNumStr) { |
|||
if (null == cnNumStr || "".equals(cnNumStr.trim())) { |
|||
return null; |
|||
} |
|||
cnNumStr = cnNumStr.replaceAll("整", ""); |
|||
if (!cnNumStr.endsWith("元")) { |
|||
cnNumStr = cnNumStr.replaceAll("元", "."); |
|||
} |
|||
for (int i = 0; i < cnNumbers.length; i++) { |
|||
cnNumStr = cnNumStr.replace(cnNumbers[i], stdNumbers[i]); |
|||
} |
|||
for (int j = 0; j < units.length; j++) { |
|||
cnNumStr = cnNumStr.replaceAll(units[j] + "", ""); |
|||
} |
|||
BigDecimal b = new BigDecimal(cnNumStr); |
|||
return b; |
|||
} |
|||
} |
@ -1,87 +0,0 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper |
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.ruoyi.taxInvoice.mapper.TaxInvoicePurchaseProductMapper"> |
|||
|
|||
<resultMap type="TaxInvoicePurchaseProduct" id="TaxInvoicePurchaseProductResult"> |
|||
<result property="taxPurchaseProductId" column="tax_purchase_product_id" /> |
|||
<result property="productCode" column="product_code" /> |
|||
<result property="productName" column="product_name" /> |
|||
<result property="inventoryUnit" column="inventory_unit" /> |
|||
<result property="count" column="count" /> |
|||
<result property="commonCurrency" column="commonCurrency" /> |
|||
<result property="monovalent" column="monovalent" /> |
|||
<result property="amount" column="amount" /> |
|||
</resultMap> |
|||
|
|||
<sql id="selectTaxInvoicePurchaseProductVo"> |
|||
select tax_purchase_product_id, product_code, product_name, inventory_unit, count, commonCurrency, monovalent, amount from tax_invoice_purchase_product |
|||
</sql> |
|||
|
|||
<select id="selectTaxInvoicePurchaseProductList" parameterType="TaxInvoicePurchaseProduct" resultMap="TaxInvoicePurchaseProductResult"> |
|||
<include refid="selectTaxInvoicePurchaseProductVo"/> |
|||
<where> |
|||
<if test="productCode != null and productCode != ''"> and product_code = #{productCode}</if> |
|||
<if test="productName != null and productName != ''"> and product_name like concat('%', #{productName}, '%')</if> |
|||
<if test="inventoryUnit != null and inventoryUnit != ''"> and inventory_unit = #{inventoryUnit}</if> |
|||
<if test="count != null "> and count = #{count}</if> |
|||
<if test="commonCurrency != null and commonCurrency != ''"> and commonCurrency = #{commonCurrency}</if> |
|||
<if test="monovalent != null and monovalent != ''"> and monovalent = #{monovalent}</if> |
|||
<if test="amount != null and amount != ''"> and amount = #{amount}</if> |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectTaxInvoicePurchaseProductById" parameterType="Long" resultMap="TaxInvoicePurchaseProductResult"> |
|||
<include refid="selectTaxInvoicePurchaseProductVo"/> |
|||
where tax_purchase_product_id = #{taxPurchaseProductId} |
|||
</select> |
|||
|
|||
<insert id="insertTaxInvoicePurchaseProduct" parameterType="TaxInvoicePurchaseProduct" useGeneratedKeys="true" keyProperty="taxPurchaseProductId"> |
|||
insert into tax_invoice_purchase_product |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="productCode != null">product_code,</if> |
|||
<if test="productName != null">product_name,</if> |
|||
<if test="inventoryUnit != null">inventory_unit,</if> |
|||
<if test="count != null">count,</if> |
|||
<if test="commonCurrency != null">commonCurrency,</if> |
|||
<if test="monovalent != null">monovalent,</if> |
|||
<if test="amount != null">amount,</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="productCode != null">#{productCode},</if> |
|||
<if test="productName != null">#{productName},</if> |
|||
<if test="inventoryUnit != null">#{inventoryUnit},</if> |
|||
<if test="count != null">#{count},</if> |
|||
<if test="commonCurrency != null">#{commonCurrency},</if> |
|||
<if test="monovalent != null">#{monovalent},</if> |
|||
<if test="amount != null">#{amount},</if> |
|||
</trim> |
|||
</insert> |
|||
|
|||
<update id="updateTaxInvoicePurchaseProduct" parameterType="TaxInvoicePurchaseProduct"> |
|||
update tax_invoice_purchase_product |
|||
<trim prefix="SET" suffixOverrides=","> |
|||
<if test="productCode != null">product_code = #{productCode},</if> |
|||
<if test="productName != null">product_name = #{productName},</if> |
|||
<if test="inventoryUnit != null">inventory_unit = #{inventoryUnit},</if> |
|||
<if test="count != null">count = #{count},</if> |
|||
<if test="commonCurrency != null">commonCurrency = #{commonCurrency},</if> |
|||
<if test="monovalent != null">monovalent = #{monovalent},</if> |
|||
<if test="amount != null">amount = #{amount},</if> |
|||
</trim> |
|||
where tax_purchase_product_id = #{taxPurchaseProductId} |
|||
</update> |
|||
|
|||
<delete id="deleteTaxInvoicePurchaseProductById" parameterType="Long"> |
|||
delete from tax_invoice_purchase_product where tax_purchase_product_id = #{taxPurchaseProductId} |
|||
</delete> |
|||
|
|||
<delete id="deleteTaxInvoicePurchaseProductByIds" parameterType="String"> |
|||
delete from tax_invoice_purchase_product where tax_purchase_product_id in |
|||
<foreach item="taxPurchaseProductId" collection="array" open="(" separator="," close=")"> |
|||
#{taxPurchaseProductId} |
|||
</foreach> |
|||
</delete> |
|||
|
|||
</mapper> |
@ -1,75 +0,0 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('新增国税发票(采购)')" /> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-taxInvoicePurchaseProduct-add"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">发票编号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="taxPurchaseCode" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">料号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="productCode" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">品名:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="productName" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">单位:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="inventoryUnit" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">数量:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="count" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">币种:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="commonCurrency" class="form-control m-b" th:with="type=${@dict.getType('sys_common_currency')}"> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">单价:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="monovalent" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">金额:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="amount" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "taxInvoice/taxInvoicePurchaseProduct" |
|||
$("#form-taxInvoicePurchaseProduct-add").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/add", $('#form-taxInvoicePurchaseProduct-add').serialize()); |
|||
} |
|||
} |
|||
</script> |
|||
</body> |
|||
</html> |
@ -1,76 +0,0 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" > |
|||
<head> |
|||
<th:block th:include="include :: header('修改国税发票(采购)')" /> |
|||
</head> |
|||
<body class="white-bg"> |
|||
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
|||
<form class="form-horizontal m" id="form-taxInvoicePurchaseProduct-edit" th:object="${taxInvoicePurchaseProduct}"> |
|||
<input name="taxPurchaseProductId" th:field="*{taxPurchaseProductId}" type="hidden"> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">发票编号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="taxPurchaseCode" th:field="*{taxPurchaseCode}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">料号:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="productCode" th:field="*{productCode}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">品名:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="productName" th:field="*{productName}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">单位:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="inventoryUnit" th:field="*{inventoryUnit}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">数量:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="count" th:field="*{count}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">币种:</label> |
|||
<div class="col-sm-8"> |
|||
<select name="commonCurrency" class="form-control m-b" th:with="type=${@dict.getType('sys_common_currency')}"> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{commonCurrency}"></option> |
|||
</select> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">单价:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="monovalent" th:field="*{monovalent}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
<div class="form-group"> |
|||
<label class="col-sm-3 control-label">金额:</label> |
|||
<div class="col-sm-8"> |
|||
<input name="amount" th:field="*{amount}" class="form-control" type="text"> |
|||
</div> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:inline="javascript"> |
|||
var prefix = ctx + "taxInvoice/taxInvoicePurchaseProduct"; |
|||
$("#form-taxInvoicePurchaseProduct-edit").validate({ |
|||
focusCleanup: true |
|||
}); |
|||
|
|||
function submitHandler() { |
|||
if ($.validate.form()) { |
|||
$.operate.save(prefix + "/edit", $('#form-taxInvoicePurchaseProduct-edit').serialize()); |
|||
} |
|||
} |
|||
</script> |
|||
</body> |
|||
</html> |
@ -1,149 +0,0 @@ |
|||
<!DOCTYPE html> |
|||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> |
|||
<head> |
|||
<th:block th:include="include :: header('国税发票(采购)列表')" /> |
|||
</head> |
|||
<body class="gray-bg"> |
|||
<div class="container-div"> |
|||
<div class="row"> |
|||
<div class="col-sm-12 search-collapse"> |
|||
<form id="formId"> |
|||
<div class="select-list"> |
|||
<ul> |
|||
<li> |
|||
<label>发票编号:</label> |
|||
<input type="text" name="taxPurchaseCode"/> |
|||
</li> |
|||
<li> |
|||
<label>料号:</label> |
|||
<input type="text" name="productCode"/> |
|||
</li> |
|||
<li> |
|||
<label>品名:</label> |
|||
<input type="text" name="productName"/> |
|||
</li> |
|||
<li> |
|||
<label>单位:</label> |
|||
<input type="text" name="inventoryUnit"/> |
|||
</li> |
|||
<li> |
|||
<label>数量:</label> |
|||
<input type="text" name="count"/> |
|||
</li> |
|||
<li> |
|||
<label>币种:</label> |
|||
<select name="commonCurrency" th:with="type=${@dict.getType('sys_common_currency')}"> |
|||
<option value="">所有</option> |
|||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> |
|||
</select> |
|||
</li> |
|||
<li> |
|||
<label>单价:</label> |
|||
<input type="text" name="monovalent"/> |
|||
</li> |
|||
<li> |
|||
<label>金额:</label> |
|||
<input type="text" name="amount"/> |
|||
</li> |
|||
<li> |
|||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
|||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a> |
|||
</li> |
|||
</ul> |
|||
</div> |
|||
</form> |
|||
</div> |
|||
|
|||
<div class="btn-group-sm" id="toolbar" role="group"> |
|||
<a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="taxInvoice:taxInvoicePurchaseProduct:add"> |
|||
<i class="fa fa-plus"></i> 添加 |
|||
</a> |
|||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="taxInvoice:taxInvoicePurchaseProduct:edit"> |
|||
<i class="fa fa-edit"></i> 修改 |
|||
</a> |
|||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="taxInvoice:taxInvoicePurchaseProduct:remove"> |
|||
<i class="fa fa-remove"></i> 删除 |
|||
</a> |
|||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="taxInvoice:taxInvoicePurchaseProduct:export"> |
|||
<i class="fa fa-download"></i> 导出 |
|||
</a> |
|||
</div> |
|||
<div class="col-sm-12 select-table table-striped"> |
|||
<table id="bootstrap-table"></table> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<th:block th:include="include :: footer" /> |
|||
<script th:inline="javascript"> |
|||
var editFlag = [[${@permission.hasPermi('taxInvoice:taxInvoicePurchaseProduct:edit')}]]; |
|||
var removeFlag = [[${@permission.hasPermi('taxInvoice:taxInvoicePurchaseProduct:remove')}]]; |
|||
var commonCurrencyDatas = [[${@dict.getType('sys_common_currency')}]]; |
|||
var prefix = ctx + "taxInvoice/taxInvoicePurchaseProduct"; |
|||
|
|||
$(function() { |
|||
var options = { |
|||
url: prefix + "/list", |
|||
createUrl: prefix + "/add", |
|||
updateUrl: prefix + "/edit/{id}", |
|||
removeUrl: prefix + "/remove", |
|||
exportUrl: prefix + "/export", |
|||
modalName: "国税发票(采购)", |
|||
columns: [{ |
|||
checkbox: true |
|||
}, |
|||
{ |
|||
field: 'taxPurchaseProductId', |
|||
title: '', |
|||
visible: false |
|||
}, |
|||
{ |
|||
field: 'taxPurchaseCode', |
|||
title: '发票编号' |
|||
}, |
|||
{ |
|||
field: 'productCode', |
|||
title: '料号' |
|||
}, |
|||
{ |
|||
field: 'productName', |
|||
title: '品名' |
|||
}, |
|||
{ |
|||
field: 'inventoryUnit', |
|||
title: '单位' |
|||
}, |
|||
{ |
|||
field: 'count', |
|||
title: '数量' |
|||
}, |
|||
{ |
|||
field: 'commonCurrency', |
|||
title: '币种', |
|||
formatter: function(value, row, index) { |
|||
return $.table.selectDictLabel(commonCurrencyDatas, value); |
|||
} |
|||
}, |
|||
{ |
|||
field: 'monovalent', |
|||
title: '单价' |
|||
}, |
|||
{ |
|||
field: 'amount', |
|||
title: '金额' |
|||
}, |
|||
{ |
|||
title: '操作', |
|||
align: 'center', |
|||
formatter: function(value, row, index) { |
|||
var actions = []; |
|||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.taxPurchaseProductId + '\')"><i class="fa fa-edit"></i>编辑</a> '); |
|||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.taxPurchaseProductId + '\')"><i class="fa fa-remove"></i>删除</a>'); |
|||
return actions.join(''); |
|||
} |
|||
}] |
|||
}; |
|||
$.table.init(options); |
|||
}); |
|||
</script> |
|||
</body> |
|||
</html> |
Loading…
Reference in new issue