Browse Source

[feat]财务管理 销售管理

销售订单Controller新增:查询开票历史记录列表后端接口
销售订单开票-国内前端页面新增:开票历史列表展示;新增查询开票历史前端接口
国税开票历史新增根据销售订单编号查询历史记录集合后端接口
dev
liuxiaoxu 3 months ago
parent
commit
9abf6ca59e
  1. 8
      ruoyi-admin/src/main/java/com/ruoyi/financial/mapper/FinancialTaxInvoiceHistoryMapper.java
  2. 7
      ruoyi-admin/src/main/java/com/ruoyi/financial/service/IFinancialTaxInvoiceHistoryService.java
  3. 14
      ruoyi-admin/src/main/java/com/ruoyi/financial/service/impl/FinancialTaxInvoiceHistoryServiceImpl.java
  4. 26
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysSalesOrderController.java
  5. 7
      ruoyi-admin/src/main/resources/mapper/financial/FinancialTaxInvoiceHistoryMapper.xml
  6. 75
      ruoyi-admin/src/main/resources/templates/system/salesOrder/makeInvoiceRMB.html

8
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<FinancialTaxInvoiceHistory> selectInvoiceHistoryListBySalesOrderCode(String salesOrderCode);
}

7
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<FinancialTaxInvoiceHistory> selectInvoiceHistoryListBySalesOrderCode(String salesOrderCode);
}

14
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<FinancialTaxInvoiceHistory> selectInvoiceHistoryListBySalesOrderCode(String salesOrderCode) {
List<FinancialTaxInvoiceHistory> list = financialTaxInvoiceHistoryMapper.selectInvoiceHistoryListBySalesOrderCode(salesOrderCode);
return list;
}
}

26
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<SysSalesOrderChild> list = sysSalesOrderChildService.selectOrderChildListBySalesOrderCode(salesOrderCode);
return getDataTable(list);
}
/**
* 查询开票历史记录列表
*/
@ResponseBody
@PostMapping("/getInvoiceHistoryListBySalesOrderCode")
public TableDataInfo getInvoiceHistoryListBySalesOrderCode(@RequestParam("salesOrderCode") String salesOrderCode)
{
startPage();
List<FinancialTaxInvoiceHistory> list = invoiceHistoryService.selectInvoiceHistoryListBySalesOrderCode(salesOrderCode);
return getDataTable(list);
}
}

7
ruoyi-admin/src/main/resources/mapper/financial/FinancialTaxInvoiceHistoryMapper.xml

@ -38,7 +38,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectFinancialTaxInvoiceHistoryVo"/>
where invoice_history_id = #{invoiceHistoryId}
</select>
<select id="selectInvoiceHistoryListBySalesOrderCode" parameterType="String" resultMap="FinancialTaxInvoiceHistoryResult">
<include refid="selectFinancialTaxInvoiceHistoryVo"/>
where sales_order_code = #{salesOrderCode}
</select>
<insert id="insertFinancialTaxInvoiceHistory" parameterType="FinancialTaxInvoiceHistory" useGeneratedKeys="true" keyProperty="invoiceHistoryId">
insert into financial_tax_invoice_history
<trim prefix="(" suffix=")" suffixOverrides=",">

75
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('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.invoiceHistoryId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
return actions.join('');
}
}]
};
$.table.init(options);
});
//获取客户发票信息
$(document).ready(function() {

Loading…
Cancel
Save