feat(finance): 新增采购收票单、应付单、付款单功能模块
- 新增收票单、应付单、付款单的新增页面模板 - 新增收票单、应付单、付款单的编辑页面模板 - 新增收票单、应付单、付款单的列表查询页面模板- 新增收票单、应付单、付款单的后端服务接口定义 - 在库存信息实体中增加应付账单号字段并更新数据库映射 - 完善入库逻辑中的SN码重复校验功能 - 添加批量插入库存信息时对新增应付账单号的支持dev_1.0.0
parent
2d50416020
commit
6545b50582
|
|
@ -0,0 +1,89 @@
|
|||
<!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-invoice-add">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">收票单编号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="invoiceReceiptBillCode" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">制造商名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="vendorCode" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">合同编号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="orderCode" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">含税总价:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="totalPriceWithTax" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">未税总价:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="totalPriceWithoutTax" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">税额:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="taxAmount" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">备注:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="remark" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">删除标志:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="delFlag" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "finance/invoice"
|
||||
$("#form-invoice-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-invoice-add').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
<!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-invoice-edit" th:object="${omsInvoiceReceiptBill}">
|
||||
<input name="id" th:field="*{id}" type="hidden">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">收票单编号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="invoiceReceiptBillCode" th:field="*{invoiceReceiptBillCode}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">制造商名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="vendorCode" th:field="*{vendorCode}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">合同编号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="orderCode" th:field="*{orderCode}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">含税总价:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="totalPriceWithTax" th:field="*{totalPriceWithTax}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">未税总价:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="totalPriceWithoutTax" th:field="*{totalPriceWithoutTax}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">税额:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="taxAmount" th:field="*{taxAmount}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">备注:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="remark" class="form-control">[[*{remark}]]</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "finance/invoice";
|
||||
$("#form-invoice-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-invoice-edit').serialize());
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,130 @@
|
|||
<!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="invoiceReceiptBillCode"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>制造商名称:</label>
|
||||
<input type="text" name="vendorCode"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>合同编号:</label>
|
||||
<input type="text" name="orderCode"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>含税总价:</label>
|
||||
<input type="text" name="totalPriceWithTax"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>未税总价:</label>
|
||||
<input type="text" name="totalPriceWithoutTax"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>税额:</label>
|
||||
<input type="text" name="taxAmount"/>
|
||||
</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="finance:invoice:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="finance:invoice:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="finance:invoice:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="finance:invoice: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('finance:invoice:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('finance:invoice:remove')}]];
|
||||
var prefix = ctx + "finance/invoice";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "采购收票单",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'id',
|
||||
title: '主键ID',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'invoiceReceiptBillCode',
|
||||
title: '收票单编号'
|
||||
},
|
||||
{
|
||||
field: 'vendorCode',
|
||||
title: '制造商名称'
|
||||
},
|
||||
{
|
||||
field: 'orderCode',
|
||||
title: '合同编号'
|
||||
},
|
||||
{
|
||||
field: 'totalPriceWithTax',
|
||||
title: '含税总价'
|
||||
},
|
||||
{
|
||||
field: 'totalPriceWithoutTax',
|
||||
title: '未税总价'
|
||||
},
|
||||
{
|
||||
field: 'taxAmount',
|
||||
title: '税额'
|
||||
},
|
||||
{
|
||||
field: 'remark',
|
||||
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.id + '\')"><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.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,132 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增采购应付单')" />
|
||||
<th:block th:include="include :: datetimepicker-css" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-payable-add">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">应付单编号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="payableBillCode" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">预计付款时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input name="estimatedPaymentTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">制造商编码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="vendorCode" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">合同编号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="orderCode" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">入库/出库单号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="inventoryCode" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">含税总价:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="totalPriceWithTax" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">未税总价:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="totalPriceWithoutTax" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">税额:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="taxAmount" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">关联的付款单ID:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="paymentBillId" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">关联的收票单ID:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="invoiceReceiptBillId" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">备注:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="remark" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">删除标志:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="delFlag" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: datetimepicker-js" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "finance/payable"
|
||||
$("#form-payable-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-payable-add').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$("input[name='estimatedPaymentTime']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,125 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改采购应付单')" />
|
||||
<th:block th:include="include :: datetimepicker-css" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-payable-edit" th:object="${omsPayableBill}">
|
||||
<input name="id" th:field="*{id}" type="hidden">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">应付单编号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="payableBillCode" th:field="*{payableBillCode}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">预计付款时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input name="estimatedPaymentTime" th:value="${#dates.format(omsPayableBill.estimatedPaymentTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">制造商编码:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="vendorCode" th:field="*{vendorCode}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">合同编号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="orderCode" th:field="*{orderCode}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">入库/出库单号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="inventoryCode" th:field="*{inventoryCode}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">含税总价:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="totalPriceWithTax" th:field="*{totalPriceWithTax}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">未税总价:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="totalPriceWithoutTax" th:field="*{totalPriceWithoutTax}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">税额:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="taxAmount" th:field="*{taxAmount}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">关联的付款单ID:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="paymentBillId" th:field="*{paymentBillId}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">关联的收票单ID:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="invoiceReceiptBillId" th:field="*{invoiceReceiptBillId}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">备注:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="remark" class="form-control">[[*{remark}]]</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: datetimepicker-js" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "finance/payable";
|
||||
$("#form-payable-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-payable-edit').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$("input[name='estimatedPaymentTime']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,212 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<th:block th:include="include :: datetimepicker-css" />
|
||||
<head>
|
||||
<th:block th:include="include :: header('采购应付单列表')" />
|
||||
</head>
|
||||
<style>
|
||||
.select-list li p, .select-list li label:not(.radio-box){
|
||||
width: 90px;
|
||||
}
|
||||
|
||||
</style>
|
||||
<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" placeholder="请输入应付单编号" name="payableBillCode"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>项目编号:</label>
|
||||
<input type="text" placeholder="请输入项目编号" name="projectCode"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>项目名称:</label>
|
||||
<input type="text" placeholder="请输入项目名称" name="projectName"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>合同编号:</label>
|
||||
<input type="text" placeholder="请输入合同编号" name="orderCode"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>制造商:</label>
|
||||
<input type="text" placeholder="请输入制造商" name="vendorName"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>入/出库单号:</label>
|
||||
<input type="text" placeholder="入/出库单号" name="inventoryCode"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<label>产品类型:</label>
|
||||
<select name="productType" class="form-control" th:with="type=${@dict.getType('product_type')}" >
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<label>付款状态:</label>
|
||||
<input type="text" name="taxAmount"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>收票状态:</label>
|
||||
<input type="text" name="paymentBillId"/>
|
||||
</li>
|
||||
<li style="width: 30%">
|
||||
<div>
|
||||
<label>生成时间:</label>
|
||||
<!-- <input style="width: 300px" type="text" class="input-sm form-control" placeholder="yyyy-MM-dd HH:mm:ss"/>-->
|
||||
<div id="laydate-startTime">
|
||||
<input id="start" type="text" name="start">-
|
||||
<input id="end" type="text" name="end">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</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="finance:payable:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="finance:payable:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="finance:payable:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="finance:payable: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" />
|
||||
<th:block th:include="include :: datetimepicker-js" />
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('finance:payable:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('finance:payable:remove')}]];
|
||||
var prefix = ctx + "finance/payable";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "采购应付单",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'id',
|
||||
title: '主键ID',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'payableBillCode',
|
||||
title: '采购-应付单编号'
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '生成时间'
|
||||
},
|
||||
{
|
||||
field: 'estimatedPaymentTime',
|
||||
title: '预计付款时间'
|
||||
},
|
||||
{
|
||||
field: 'vendorCode',
|
||||
title: '制造商编码'
|
||||
},
|
||||
{
|
||||
field: 'orderCode',
|
||||
title: '合同编号'
|
||||
},
|
||||
{
|
||||
field: 'inventoryCode',
|
||||
title: '入库/出库单号'
|
||||
},
|
||||
{
|
||||
field: 'productType',
|
||||
title: '产品类型'
|
||||
},
|
||||
{
|
||||
field: 'totalPriceWithTax',
|
||||
title: '含税总价'
|
||||
},
|
||||
{
|
||||
field: 'totalPriceWithoutTax',
|
||||
title: '未税总价'
|
||||
},
|
||||
{
|
||||
field: 'taxAmount',
|
||||
title: '税额'
|
||||
},
|
||||
{
|
||||
field: 'paymentBillId',
|
||||
title: '关联的付款单ID'
|
||||
},
|
||||
{
|
||||
field: 'invoiceReceiptBillId',
|
||||
title: '关联的收票单ID'
|
||||
},
|
||||
{
|
||||
field: 'remark',
|
||||
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.id + '\')"><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.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
|
||||
|
||||
|
||||
layui.use('laydate', function(){
|
||||
var laydate = layui.laydate;
|
||||
var startDate = laydate.render({
|
||||
elem: '#laydate-startTime',
|
||||
type: 'datetime',
|
||||
fullPanel: true,
|
||||
theme: 'molv',
|
||||
range: ['#start', '#end'],
|
||||
format:'yyyy-MM-dd HH:mm:ss',
|
||||
trigger: 'click',
|
||||
done: function(value, date, endDate){
|
||||
console.log(value); // 获取范围日期值,格式:[开始日期,结束日期]
|
||||
console.log(date); // 获取范围日期值,格式:[开始日期,结束日期]
|
||||
console.log(endDate); // 获取范围日期值,格式:[开始日期,结束日期]
|
||||
$('#start').val(date)
|
||||
$('#end').val(endDate)
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,108 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增采购付款单')" />
|
||||
<th:block th:include="include :: datetimepicker-css" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-payment-add">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">付款单编号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="paymentBillCode" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">付款时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input name="paymentTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">制造商名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="vendorCode" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">合同编号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="orderCode" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">含税总价:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="totalPriceWithTax" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">未税总价:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="totalPriceWithoutTax" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">税额:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="taxAmount" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">备注:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="remark" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">删除标志:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="delFlag" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: datetimepicker-js" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "finance/payment"
|
||||
$("#form-payment-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-payment-add').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$("input[name='paymentTime']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,101 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改采购付款单')" />
|
||||
<th:block th:include="include :: datetimepicker-css" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-payment-edit" th:object="${omsPaymentBill}">
|
||||
<input name="id" th:field="*{id}" type="hidden">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">付款单编号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="paymentBillCode" th:field="*{paymentBillCode}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">付款时间:</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group date">
|
||||
<input name="paymentTime" th:value="${#dates.format(omsPaymentBill.paymentTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">制造商名称:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="vendorCode" th:field="*{vendorCode}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">合同编号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="orderCode" th:field="*{orderCode}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">含税总价:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="totalPriceWithTax" th:field="*{totalPriceWithTax}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">未税总价:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="totalPriceWithoutTax" th:field="*{totalPriceWithoutTax}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">税额:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="taxAmount" th:field="*{taxAmount}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">备注:</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea name="remark" class="form-control">[[*{remark}]]</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: datetimepicker-js" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "finance/payment";
|
||||
$("#form-payment-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-payment-edit').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$("input[name='paymentTime']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,142 @@
|
|||
<!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="paymentBillCode"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>付款时间:</label>
|
||||
<input type="text" class="time-input" placeholder="请选择付款时间" name="paymentTime"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>制造商名称:</label>
|
||||
<input type="text" name="vendorCode"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>合同编号:</label>
|
||||
<input type="text" name="orderCode"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>含税总价:</label>
|
||||
<input type="text" name="totalPriceWithTax"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>未税总价:</label>
|
||||
<input type="text" name="totalPriceWithoutTax"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>税额:</label>
|
||||
<input type="text" name="taxAmount"/>
|
||||
</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="finance:payment:add">
|
||||
<i class="fa fa-plus"></i> 添加
|
||||
</a>
|
||||
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="finance:payment:edit">
|
||||
<i class="fa fa-edit"></i> 修改
|
||||
</a>
|
||||
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="finance:payment:remove">
|
||||
<i class="fa fa-remove"></i> 删除
|
||||
</a>
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="finance:payment: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('finance:payment:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('finance:payment:remove')}]];
|
||||
var prefix = ctx + "finance/payment";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "采购付款单",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'id',
|
||||
title: '主键ID',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'paymentBillCode',
|
||||
title: '付款单编号'
|
||||
},
|
||||
{
|
||||
field: 'paymentBillType',
|
||||
title: '付款单类型 (FROM_PAYABLE, PRE_PAYMENT)'
|
||||
},
|
||||
{
|
||||
field: 'paymentTime',
|
||||
title: '付款时间'
|
||||
},
|
||||
{
|
||||
field: 'vendorCode',
|
||||
title: '制造商名称'
|
||||
},
|
||||
{
|
||||
field: 'orderCode',
|
||||
title: '合同编号'
|
||||
},
|
||||
{
|
||||
field: 'totalPriceWithTax',
|
||||
title: '含税总价'
|
||||
},
|
||||
{
|
||||
field: 'totalPriceWithoutTax',
|
||||
title: '未税总价'
|
||||
},
|
||||
{
|
||||
field: 'taxAmount',
|
||||
title: '税额'
|
||||
},
|
||||
{
|
||||
field: 'remark',
|
||||
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.id + '\')"><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.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,128 @@
|
|||
package com.ruoyi.sip.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.sip.domain.OmsInvoiceReceiptBill;
|
||||
import com.ruoyi.sip.service.IOmsInvoiceReceiptBillService;
|
||||
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 2025-10-22
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/finance/invoice")
|
||||
public class OmsInvoiceReceiptBillController extends BaseController
|
||||
{
|
||||
private String prefix = "finance/invoice";
|
||||
|
||||
@Autowired
|
||||
private IOmsInvoiceReceiptBillService omsInvoiceReceiptBillService;
|
||||
|
||||
@RequiresPermissions("finance:invoice:view")
|
||||
@GetMapping()
|
||||
public String invoice()
|
||||
{
|
||||
return prefix + "/invoice";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询采购收票单列表
|
||||
*/
|
||||
@RequiresPermissions("finance:invoice:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(OmsInvoiceReceiptBill omsInvoiceReceiptBill)
|
||||
{
|
||||
startPage();
|
||||
List<OmsInvoiceReceiptBill> list = omsInvoiceReceiptBillService.selectOmsInvoiceReceiptBillList(omsInvoiceReceiptBill);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出采购收票单列表
|
||||
*/
|
||||
@RequiresPermissions("finance:invoice:export")
|
||||
@Log(title = "采购收票单", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(OmsInvoiceReceiptBill omsInvoiceReceiptBill)
|
||||
{
|
||||
List<OmsInvoiceReceiptBill> list = omsInvoiceReceiptBillService.selectOmsInvoiceReceiptBillList(omsInvoiceReceiptBill);
|
||||
ExcelUtil<OmsInvoiceReceiptBill> util = new ExcelUtil<OmsInvoiceReceiptBill>(OmsInvoiceReceiptBill.class);
|
||||
return util.exportExcel(list, "采购收票单数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增采购收票单
|
||||
*/
|
||||
@RequiresPermissions("finance:invoice:add")
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存采购收票单
|
||||
*/
|
||||
@RequiresPermissions("finance:invoice:add")
|
||||
@Log(title = "采购收票单", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(OmsInvoiceReceiptBill omsInvoiceReceiptBill)
|
||||
{
|
||||
return toAjax(omsInvoiceReceiptBillService.insertOmsInvoiceReceiptBill(omsInvoiceReceiptBill));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改采购收票单
|
||||
*/
|
||||
@RequiresPermissions("finance:invoice:edit")
|
||||
@GetMapping("/edit/{id}")
|
||||
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||
{
|
||||
OmsInvoiceReceiptBill omsInvoiceReceiptBill = omsInvoiceReceiptBillService.selectOmsInvoiceReceiptBillById(id);
|
||||
mmap.put("omsInvoiceReceiptBill", omsInvoiceReceiptBill);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存采购收票单
|
||||
*/
|
||||
@RequiresPermissions("finance:invoice:edit")
|
||||
@Log(title = "采购收票单", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(OmsInvoiceReceiptBill omsInvoiceReceiptBill)
|
||||
{
|
||||
return toAjax(omsInvoiceReceiptBillService.updateOmsInvoiceReceiptBill(omsInvoiceReceiptBill));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除采购收票单
|
||||
*/
|
||||
@RequiresPermissions("finance:invoice:remove")
|
||||
@Log(title = "采购收票单", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(omsInvoiceReceiptBillService.deleteOmsInvoiceReceiptBillByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,128 @@
|
|||
package com.ruoyi.sip.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.sip.domain.OmsPayableBill;
|
||||
import com.ruoyi.sip.service.IOmsPayableBillService;
|
||||
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 2025-10-22
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/finance/payable")
|
||||
public class OmsPayableBillController extends BaseController
|
||||
{
|
||||
private String prefix = "finance/payable";
|
||||
|
||||
@Autowired
|
||||
private IOmsPayableBillService omsPayableBillService;
|
||||
|
||||
@RequiresPermissions("finance:payable:view")
|
||||
@GetMapping()
|
||||
public String payable()
|
||||
{
|
||||
return prefix + "/payable";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询采购应付单列表
|
||||
*/
|
||||
@RequiresPermissions("finance:payable:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(OmsPayableBill omsPayableBill)
|
||||
{
|
||||
startPage();
|
||||
List<OmsPayableBill> list = omsPayableBillService.selectOmsPayableBillList(omsPayableBill);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出采购应付单列表
|
||||
*/
|
||||
@RequiresPermissions("finance:payable:export")
|
||||
@Log(title = "采购应付单", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(OmsPayableBill omsPayableBill)
|
||||
{
|
||||
List<OmsPayableBill> list = omsPayableBillService.selectOmsPayableBillList(omsPayableBill);
|
||||
ExcelUtil<OmsPayableBill> util = new ExcelUtil<OmsPayableBill>(OmsPayableBill.class);
|
||||
return util.exportExcel(list, "采购应付单数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增采购应付单
|
||||
*/
|
||||
@RequiresPermissions("finance:payable:add")
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存采购应付单
|
||||
*/
|
||||
@RequiresPermissions("finance:payable:add")
|
||||
@Log(title = "采购应付单", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(OmsPayableBill omsPayableBill)
|
||||
{
|
||||
return toAjax(omsPayableBillService.insertOmsPayableBill(omsPayableBill));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改采购应付单
|
||||
*/
|
||||
@RequiresPermissions("finance:payable:edit")
|
||||
@GetMapping("/edit/{id}")
|
||||
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||
{
|
||||
OmsPayableBill omsPayableBill = omsPayableBillService.selectOmsPayableBillById(id);
|
||||
mmap.put("omsPayableBill", omsPayableBill);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存采购应付单
|
||||
*/
|
||||
@RequiresPermissions("finance:payable:edit")
|
||||
@Log(title = "采购应付单", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(OmsPayableBill omsPayableBill)
|
||||
{
|
||||
return toAjax(omsPayableBillService.updateOmsPayableBill(omsPayableBill));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除采购应付单
|
||||
*/
|
||||
@RequiresPermissions("finance:payable:remove")
|
||||
@Log(title = "采购应付单", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(omsPayableBillService.deleteOmsPayableBillByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,128 @@
|
|||
package com.ruoyi.sip.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.sip.domain.OmsPaymentBill;
|
||||
import com.ruoyi.sip.service.IOmsPaymentBillService;
|
||||
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 2025-10-22
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/finance/payment")
|
||||
public class OmsPaymentBillController extends BaseController
|
||||
{
|
||||
private String prefix = "finance/payment";
|
||||
|
||||
@Autowired
|
||||
private IOmsPaymentBillService omsPaymentBillService;
|
||||
|
||||
@RequiresPermissions("finance:payment:view")
|
||||
@GetMapping()
|
||||
public String payment()
|
||||
{
|
||||
return prefix + "/payment";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询采购付款单列表
|
||||
*/
|
||||
@RequiresPermissions("finance:payment:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(OmsPaymentBill omsPaymentBill)
|
||||
{
|
||||
startPage();
|
||||
List<OmsPaymentBill> list = omsPaymentBillService.selectOmsPaymentBillList(omsPaymentBill);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出采购付款单列表
|
||||
*/
|
||||
@RequiresPermissions("finance:payment:export")
|
||||
@Log(title = "采购付款单", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(OmsPaymentBill omsPaymentBill)
|
||||
{
|
||||
List<OmsPaymentBill> list = omsPaymentBillService.selectOmsPaymentBillList(omsPaymentBill);
|
||||
ExcelUtil<OmsPaymentBill> util = new ExcelUtil<OmsPaymentBill>(OmsPaymentBill.class);
|
||||
return util.exportExcel(list, "采购付款单数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增采购付款单
|
||||
*/
|
||||
@RequiresPermissions("finance:payment:add")
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存采购付款单
|
||||
*/
|
||||
@RequiresPermissions("finance:payment:add")
|
||||
@Log(title = "采购付款单", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(OmsPaymentBill omsPaymentBill)
|
||||
{
|
||||
return toAjax(omsPaymentBillService.insertOmsPaymentBill(omsPaymentBill));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改采购付款单
|
||||
*/
|
||||
@RequiresPermissions("finance:payment:edit")
|
||||
@GetMapping("/edit/{id}")
|
||||
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||
{
|
||||
OmsPaymentBill omsPaymentBill = omsPaymentBillService.selectOmsPaymentBillById(id);
|
||||
mmap.put("omsPaymentBill", omsPaymentBill);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存采购付款单
|
||||
*/
|
||||
@RequiresPermissions("finance:payment:edit")
|
||||
@Log(title = "采购付款单", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(OmsPaymentBill omsPaymentBill)
|
||||
{
|
||||
return toAjax(omsPaymentBillService.updateOmsPaymentBill(omsPaymentBill));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除采购付款单
|
||||
*/
|
||||
@RequiresPermissions("finance:payment:remove")
|
||||
@Log(title = "采购付款单", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(omsPaymentBillService.deleteOmsPaymentBillByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -57,7 +57,8 @@ public class InventoryInfo extends BaseEntity
|
|||
/** 入库价 */
|
||||
@Excel(name = "入库价")
|
||||
private BigDecimal innerPrice;
|
||||
|
||||
/** 应付账单号 */
|
||||
private String payableBillCode;
|
||||
/** 出库价 */
|
||||
@Excel(name = "出库价")
|
||||
private BigDecimal outerPrice;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,147 @@
|
|||
package com.ruoyi.sip.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 采购收票单对象 oms_invoice_receipt_bill
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-10-22
|
||||
*/
|
||||
public class OmsInvoiceReceiptBill extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 收票单编号 */
|
||||
@Excel(name = "收票单编号")
|
||||
private String invoiceReceiptBillCode;
|
||||
|
||||
/** 制造商名称 */
|
||||
@Excel(name = "制造商名称")
|
||||
private String vendorCode;
|
||||
|
||||
/** 合同编号 */
|
||||
@Excel(name = "合同编号")
|
||||
private String orderCode;
|
||||
|
||||
/** 含税总价 */
|
||||
@Excel(name = "含税总价")
|
||||
private BigDecimal totalPriceWithTax;
|
||||
|
||||
/** 未税总价 */
|
||||
@Excel(name = "未税总价")
|
||||
private BigDecimal totalPriceWithoutTax;
|
||||
|
||||
/** 税额 */
|
||||
@Excel(name = "税额")
|
||||
private BigDecimal taxAmount;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setInvoiceReceiptBillCode(String invoiceReceiptBillCode)
|
||||
{
|
||||
this.invoiceReceiptBillCode = invoiceReceiptBillCode;
|
||||
}
|
||||
|
||||
public String getInvoiceReceiptBillCode()
|
||||
{
|
||||
return invoiceReceiptBillCode;
|
||||
}
|
||||
|
||||
public void setVendorCode(String vendorCode)
|
||||
{
|
||||
this.vendorCode = vendorCode;
|
||||
}
|
||||
|
||||
public String getVendorCode()
|
||||
{
|
||||
return vendorCode;
|
||||
}
|
||||
|
||||
public void setOrderCode(String orderCode)
|
||||
{
|
||||
this.orderCode = orderCode;
|
||||
}
|
||||
|
||||
public String getOrderCode()
|
||||
{
|
||||
return orderCode;
|
||||
}
|
||||
|
||||
public void setTotalPriceWithTax(BigDecimal totalPriceWithTax)
|
||||
{
|
||||
this.totalPriceWithTax = totalPriceWithTax;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalPriceWithTax()
|
||||
{
|
||||
return totalPriceWithTax;
|
||||
}
|
||||
|
||||
public void setTotalPriceWithoutTax(BigDecimal totalPriceWithoutTax)
|
||||
{
|
||||
this.totalPriceWithoutTax = totalPriceWithoutTax;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalPriceWithoutTax()
|
||||
{
|
||||
return totalPriceWithoutTax;
|
||||
}
|
||||
|
||||
public void setTaxAmount(BigDecimal taxAmount)
|
||||
{
|
||||
this.taxAmount = taxAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getTaxAmount()
|
||||
{
|
||||
return taxAmount;
|
||||
}
|
||||
|
||||
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("id", getId())
|
||||
.append("invoiceReceiptBillCode", getInvoiceReceiptBillCode())
|
||||
.append("vendorCode", getVendorCode())
|
||||
.append("orderCode", getOrderCode())
|
||||
.append("totalPriceWithTax", getTotalPriceWithTax())
|
||||
.append("totalPriceWithoutTax", getTotalPriceWithoutTax())
|
||||
.append("taxAmount", getTaxAmount())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.append("delFlag", getDelFlag())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
package com.ruoyi.sip.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.*;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 采购应付单对象 oms_payable_bill
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-10-22
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
public class OmsPayableBill extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 应付单编号 */
|
||||
@Excel(name = "应付单编号")
|
||||
private String payableBillCode;
|
||||
|
||||
/** 预计付款时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@Excel(name = "预计付款时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date estimatedPaymentTime;
|
||||
|
||||
/** 制造商编码 */
|
||||
@Excel(name = "制造商编码")
|
||||
private String vendorCode;
|
||||
|
||||
/** 合同编号 */
|
||||
@Excel(name = "合同编号")
|
||||
private String orderCode;
|
||||
|
||||
/** 入库/出库单号 */
|
||||
@Excel(name = "入库/出库单号")
|
||||
private String inventoryCode;
|
||||
|
||||
/** 产品类型 */
|
||||
@Excel(name = "产品类型")
|
||||
private String productType;
|
||||
|
||||
/** 含税总价 */
|
||||
@Excel(name = "含税总价")
|
||||
private BigDecimal totalPriceWithTax;
|
||||
|
||||
/** 未税总价 */
|
||||
@Excel(name = "未税总价")
|
||||
private BigDecimal totalPriceWithoutTax;
|
||||
|
||||
/** 税额 */
|
||||
@Excel(name = "税额")
|
||||
private BigDecimal taxAmount;
|
||||
|
||||
/** 关联的付款单ID */
|
||||
@Excel(name = "关联的付款单ID")
|
||||
private Long paymentBillId;
|
||||
|
||||
/** 关联的收票单ID */
|
||||
@Excel(name = "关联的收票单ID")
|
||||
private Long invoiceReceiptBillId;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,180 @@
|
|||
package com.ruoyi.sip.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;
|
||||
|
||||
/**
|
||||
* 采购付款单对象 oms_payment_bill
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-10-22
|
||||
*/
|
||||
public class OmsPaymentBill extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 付款单编号 */
|
||||
@Excel(name = "付款单编号")
|
||||
private String paymentBillCode;
|
||||
|
||||
/** 付款单类型 (FROM_PAYABLE, PRE_PAYMENT) */
|
||||
@Excel(name = "付款单类型 (FROM_PAYABLE, PRE_PAYMENT)")
|
||||
private String paymentBillType;
|
||||
|
||||
/** 付款时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@Excel(name = "付款时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date paymentTime;
|
||||
|
||||
/** 制造商名称 */
|
||||
@Excel(name = "制造商名称")
|
||||
private String vendorCode;
|
||||
|
||||
/** 合同编号 */
|
||||
@Excel(name = "合同编号")
|
||||
private String orderCode;
|
||||
|
||||
/** 含税总价 */
|
||||
@Excel(name = "含税总价")
|
||||
private BigDecimal totalPriceWithTax;
|
||||
|
||||
/** 未税总价 */
|
||||
@Excel(name = "未税总价")
|
||||
private BigDecimal totalPriceWithoutTax;
|
||||
|
||||
/** 税额 */
|
||||
@Excel(name = "税额")
|
||||
private BigDecimal taxAmount;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setPaymentBillCode(String paymentBillCode)
|
||||
{
|
||||
this.paymentBillCode = paymentBillCode;
|
||||
}
|
||||
|
||||
public String getPaymentBillCode()
|
||||
{
|
||||
return paymentBillCode;
|
||||
}
|
||||
|
||||
public void setPaymentBillType(String paymentBillType)
|
||||
{
|
||||
this.paymentBillType = paymentBillType;
|
||||
}
|
||||
|
||||
public String getPaymentBillType()
|
||||
{
|
||||
return paymentBillType;
|
||||
}
|
||||
|
||||
public void setPaymentTime(Date paymentTime)
|
||||
{
|
||||
this.paymentTime = paymentTime;
|
||||
}
|
||||
|
||||
public Date getPaymentTime()
|
||||
{
|
||||
return paymentTime;
|
||||
}
|
||||
|
||||
public void setVendorCode(String vendorCode)
|
||||
{
|
||||
this.vendorCode = vendorCode;
|
||||
}
|
||||
|
||||
public String getVendorCode()
|
||||
{
|
||||
return vendorCode;
|
||||
}
|
||||
|
||||
public void setOrderCode(String orderCode)
|
||||
{
|
||||
this.orderCode = orderCode;
|
||||
}
|
||||
|
||||
public String getOrderCode()
|
||||
{
|
||||
return orderCode;
|
||||
}
|
||||
|
||||
public void setTotalPriceWithTax(BigDecimal totalPriceWithTax)
|
||||
{
|
||||
this.totalPriceWithTax = totalPriceWithTax;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalPriceWithTax()
|
||||
{
|
||||
return totalPriceWithTax;
|
||||
}
|
||||
|
||||
public void setTotalPriceWithoutTax(BigDecimal totalPriceWithoutTax)
|
||||
{
|
||||
this.totalPriceWithoutTax = totalPriceWithoutTax;
|
||||
}
|
||||
|
||||
public BigDecimal getTotalPriceWithoutTax()
|
||||
{
|
||||
return totalPriceWithoutTax;
|
||||
}
|
||||
|
||||
public void setTaxAmount(BigDecimal taxAmount)
|
||||
{
|
||||
this.taxAmount = taxAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getTaxAmount()
|
||||
{
|
||||
return taxAmount;
|
||||
}
|
||||
|
||||
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("id", getId())
|
||||
.append("paymentBillCode", getPaymentBillCode())
|
||||
.append("paymentBillType", getPaymentBillType())
|
||||
.append("paymentTime", getPaymentTime())
|
||||
.append("vendorCode", getVendorCode())
|
||||
.append("orderCode", getOrderCode())
|
||||
.append("totalPriceWithTax", getTotalPriceWithTax())
|
||||
.append("totalPriceWithoutTax", getTotalPriceWithoutTax())
|
||||
.append("taxAmount", getTaxAmount())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.append("delFlag", getDelFlag())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.ruoyi.sip.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.sip.domain.OmsInvoiceReceiptBill;
|
||||
|
||||
/**
|
||||
* 采购收票单Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-10-22
|
||||
*/
|
||||
public interface OmsInvoiceReceiptBillMapper
|
||||
{
|
||||
/**
|
||||
* 查询采购收票单
|
||||
*
|
||||
* @param id 采购收票单主键
|
||||
* @return 采购收票单
|
||||
*/
|
||||
public OmsInvoiceReceiptBill selectOmsInvoiceReceiptBillById(Long id);
|
||||
|
||||
/**
|
||||
* 查询采购收票单列表
|
||||
*
|
||||
* @param omsInvoiceReceiptBill 采购收票单
|
||||
* @return 采购收票单集合
|
||||
*/
|
||||
public List<OmsInvoiceReceiptBill> selectOmsInvoiceReceiptBillList(OmsInvoiceReceiptBill omsInvoiceReceiptBill);
|
||||
|
||||
/**
|
||||
* 新增采购收票单
|
||||
*
|
||||
* @param omsInvoiceReceiptBill 采购收票单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOmsInvoiceReceiptBill(OmsInvoiceReceiptBill omsInvoiceReceiptBill);
|
||||
|
||||
/**
|
||||
* 修改采购收票单
|
||||
*
|
||||
* @param omsInvoiceReceiptBill 采购收票单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOmsInvoiceReceiptBill(OmsInvoiceReceiptBill omsInvoiceReceiptBill);
|
||||
|
||||
/**
|
||||
* 删除采购收票单
|
||||
*
|
||||
* @param id 采购收票单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOmsInvoiceReceiptBillById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除采购收票单
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOmsInvoiceReceiptBillByIds(String[] ids);
|
||||
}
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
package com.ruoyi.sip.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.sip.domain.OmsPayableBill;
|
||||
|
||||
/**
|
||||
* 采购应付单Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-10-22
|
||||
*/
|
||||
public interface OmsPayableBillMapper
|
||||
{
|
||||
/**
|
||||
* 查询采购应付单
|
||||
*
|
||||
* @param id 采购应付单主键
|
||||
* @return 采购应付单
|
||||
*/
|
||||
public OmsPayableBill selectOmsPayableBillById(Long id);
|
||||
|
||||
/**
|
||||
* 查询采购应付单列表
|
||||
*
|
||||
* @param omsPayableBill 采购应付单
|
||||
* @return 采购应付单集合
|
||||
*/
|
||||
public List<OmsPayableBill> selectOmsPayableBillList(OmsPayableBill omsPayableBill);
|
||||
|
||||
/**
|
||||
* 新增采购应付单
|
||||
*
|
||||
* @param omsPayableBill 采购应付单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOmsPayableBill(OmsPayableBill omsPayableBill);
|
||||
|
||||
/**
|
||||
* 修改采购应付单
|
||||
*
|
||||
* @param omsPayableBill 采购应付单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOmsPayableBill(OmsPayableBill omsPayableBill);
|
||||
|
||||
/**
|
||||
* 删除采购应付单
|
||||
*
|
||||
* @param id 采购应付单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOmsPayableBillById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除采购应付单
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOmsPayableBillByIds(String[] ids);
|
||||
|
||||
Integer selectMaxCodeByPrefix(String codePrefix);
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.ruoyi.sip.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.sip.domain.OmsPaymentBill;
|
||||
|
||||
/**
|
||||
* 采购付款单Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-10-22
|
||||
*/
|
||||
public interface OmsPaymentBillMapper
|
||||
{
|
||||
/**
|
||||
* 查询采购付款单
|
||||
*
|
||||
* @param id 采购付款单主键
|
||||
* @return 采购付款单
|
||||
*/
|
||||
public OmsPaymentBill selectOmsPaymentBillById(Long id);
|
||||
|
||||
/**
|
||||
* 查询采购付款单列表
|
||||
*
|
||||
* @param omsPaymentBill 采购付款单
|
||||
* @return 采购付款单集合
|
||||
*/
|
||||
public List<OmsPaymentBill> selectOmsPaymentBillList(OmsPaymentBill omsPaymentBill);
|
||||
|
||||
/**
|
||||
* 新增采购付款单
|
||||
*
|
||||
* @param omsPaymentBill 采购付款单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOmsPaymentBill(OmsPaymentBill omsPaymentBill);
|
||||
|
||||
/**
|
||||
* 修改采购付款单
|
||||
*
|
||||
* @param omsPaymentBill 采购付款单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOmsPaymentBill(OmsPaymentBill omsPaymentBill);
|
||||
|
||||
/**
|
||||
* 删除采购付款单
|
||||
*
|
||||
* @param id 采购付款单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOmsPaymentBillById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除采购付款单
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOmsPaymentBillByIds(String[] ids);
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.ruoyi.sip.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.sip.domain.OmsInvoiceReceiptBill;
|
||||
|
||||
/**
|
||||
* 采购收票单Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-10-22
|
||||
*/
|
||||
public interface IOmsInvoiceReceiptBillService
|
||||
{
|
||||
/**
|
||||
* 查询采购收票单
|
||||
*
|
||||
* @param id 采购收票单主键
|
||||
* @return 采购收票单
|
||||
*/
|
||||
public OmsInvoiceReceiptBill selectOmsInvoiceReceiptBillById(Long id);
|
||||
|
||||
/**
|
||||
* 查询采购收票单列表
|
||||
*
|
||||
* @param omsInvoiceReceiptBill 采购收票单
|
||||
* @return 采购收票单集合
|
||||
*/
|
||||
public List<OmsInvoiceReceiptBill> selectOmsInvoiceReceiptBillList(OmsInvoiceReceiptBill omsInvoiceReceiptBill);
|
||||
|
||||
/**
|
||||
* 新增采购收票单
|
||||
*
|
||||
* @param omsInvoiceReceiptBill 采购收票单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOmsInvoiceReceiptBill(OmsInvoiceReceiptBill omsInvoiceReceiptBill);
|
||||
|
||||
/**
|
||||
* 修改采购收票单
|
||||
*
|
||||
* @param omsInvoiceReceiptBill 采购收票单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOmsInvoiceReceiptBill(OmsInvoiceReceiptBill omsInvoiceReceiptBill);
|
||||
|
||||
/**
|
||||
* 批量删除采购收票单
|
||||
*
|
||||
* @param ids 需要删除的采购收票单主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOmsInvoiceReceiptBillByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除采购收票单信息
|
||||
*
|
||||
* @param id 采购收票单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOmsInvoiceReceiptBillById(Long id);
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.ruoyi.sip.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.sip.domain.OmsPayableBill;
|
||||
|
||||
/**
|
||||
* 采购应付单Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-10-22
|
||||
*/
|
||||
public interface IOmsPayableBillService
|
||||
{
|
||||
/**
|
||||
* 查询采购应付单
|
||||
*
|
||||
* @param id 采购应付单主键
|
||||
* @return 采购应付单
|
||||
*/
|
||||
public OmsPayableBill selectOmsPayableBillById(Long id);
|
||||
|
||||
/**
|
||||
* 查询采购应付单列表
|
||||
*
|
||||
* @param omsPayableBill 采购应付单
|
||||
* @return 采购应付单集合
|
||||
*/
|
||||
public List<OmsPayableBill> selectOmsPayableBillList(OmsPayableBill omsPayableBill);
|
||||
|
||||
/**
|
||||
* 新增采购应付单
|
||||
*
|
||||
* @param omsPayableBill 采购应付单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOmsPayableBill(OmsPayableBill omsPayableBill);
|
||||
|
||||
/**
|
||||
* 修改采购应付单
|
||||
*
|
||||
* @param omsPayableBill 采购应付单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOmsPayableBill(OmsPayableBill omsPayableBill);
|
||||
|
||||
/**
|
||||
* 批量删除采购应付单
|
||||
*
|
||||
* @param ids 需要删除的采购应付单主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOmsPayableBillByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除采购应付单信息
|
||||
*
|
||||
* @param id 采购应付单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOmsPayableBillById(Long id);
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.ruoyi.sip.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.sip.domain.OmsPaymentBill;
|
||||
|
||||
/**
|
||||
* 采购付款单Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-10-22
|
||||
*/
|
||||
public interface IOmsPaymentBillService
|
||||
{
|
||||
/**
|
||||
* 查询采购付款单
|
||||
*
|
||||
* @param id 采购付款单主键
|
||||
* @return 采购付款单
|
||||
*/
|
||||
public OmsPaymentBill selectOmsPaymentBillById(Long id);
|
||||
|
||||
/**
|
||||
* 查询采购付款单列表
|
||||
*
|
||||
* @param omsPaymentBill 采购付款单
|
||||
* @return 采购付款单集合
|
||||
*/
|
||||
public List<OmsPaymentBill> selectOmsPaymentBillList(OmsPaymentBill omsPaymentBill);
|
||||
|
||||
/**
|
||||
* 新增采购付款单
|
||||
*
|
||||
* @param omsPaymentBill 采购付款单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOmsPaymentBill(OmsPaymentBill omsPaymentBill);
|
||||
|
||||
/**
|
||||
* 修改采购付款单
|
||||
*
|
||||
* @param omsPaymentBill 采购付款单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOmsPaymentBill(OmsPaymentBill omsPaymentBill);
|
||||
|
||||
/**
|
||||
* 批量删除采购付款单
|
||||
*
|
||||
* @param ids 需要删除的采购付款单主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOmsPaymentBillByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除采购付款单信息
|
||||
*
|
||||
* @param id 采购付款单主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOmsPaymentBillById(Long id);
|
||||
}
|
||||
|
|
@ -1,5 +1,7 @@
|
|||
package com.ruoyi.sip.service.impl;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
|
@ -42,6 +44,8 @@ public class OmsInventoryInnerServiceImpl implements IOmsInventoryInnerService {
|
|||
@Autowired
|
||||
private IInventoryAuthService inventoryAuthService;
|
||||
|
||||
@Autowired
|
||||
private IOmsPayableBillService payableBillService;
|
||||
/**
|
||||
* 查询入库单信息
|
||||
*
|
||||
|
|
@ -103,24 +107,41 @@ public class OmsInventoryInnerServiceImpl implements IOmsInventoryInnerService {
|
|||
if (!omsInventoryInner.getVendorCode().equals(vendorCode)) {
|
||||
throw new ServiceException("添加产品信息中产品编码和选择制造商不匹配,导入失败");
|
||||
}
|
||||
List<Long> warehouseIdList = inventoryInfoList.stream().map(InventoryInfo::getWarehouseId).distinct().filter(Objects::nonNull).collect(Collectors.toList());
|
||||
if (warehouseIdList.size() != 1) {
|
||||
throw new ServiceException("添加产品信息中仓库不允许多个,导入失败");
|
||||
}
|
||||
omsInventoryInner.setWarehouseId(warehouseIdList.get(0));
|
||||
inventoryInfoList.forEach(item->{
|
||||
item.setInnerCode(omsInventoryInner.getInnerCode());
|
||||
item.setCreateBy(currentUserId);
|
||||
item.setCreateTime(nowDate);
|
||||
if (StringUtils.isEmpty(item.getInventoryStatus())) {
|
||||
item.setInventoryStatus(InventoryInfo.InventoryStatusEnum.INNER.getCode());
|
||||
}
|
||||
});
|
||||
//校验sn是否重复
|
||||
List<String> repeatSnList = inventoryInfoService.checkUnq(inventoryInfoList.stream().map(InventoryInfo::getProductSn).collect(Collectors.toList()));
|
||||
if (CollUtil.isNotEmpty(repeatSnList)) {
|
||||
throw new ServiceException(StrUtil.format("SN码[{}]已存在,保存失败", repeatSnList));
|
||||
}
|
||||
List<Long> warehouseIdList = inventoryInfoList.stream().map(InventoryInfo::getWarehouseId).distinct().filter(Objects::nonNull).collect(Collectors.toList());
|
||||
if (warehouseIdList.size() != 1) {
|
||||
throw new ServiceException("添加产品信息中仓库不允许多个,导入失败");
|
||||
}
|
||||
omsInventoryInner.setWarehouseId(warehouseIdList.get(0));
|
||||
|
||||
//todo 判断制造商是否需要生成应付单
|
||||
// BigDecimal totalPriceWithTax = inventoryInfoList.stream().map(InventoryInfo::getInnerPrice).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
// //生成应付单
|
||||
// BigDecimal taxAmount = totalPriceWithTax.multiply(new BigDecimal("0.13")).setScale(2, RoundingMode.HALF_UP);
|
||||
// OmsPayableBill payableBill = OmsPayableBill.builder()
|
||||
// .inventoryCode(omsInventoryInner.getInnerCode())
|
||||
// .vendorCode(omsInventoryInner.getVendorCode())
|
||||
// .productType(productInfos.get(0).getType())
|
||||
// .estimatedPaymentTime(DateUtils.addDays(DateUtils.getNowDate(),30))
|
||||
// .totalPriceWithTax(totalPriceWithTax)
|
||||
// .taxAmount(taxAmount)
|
||||
// .totalPriceWithoutTax(totalPriceWithTax.subtract(taxAmount))
|
||||
// .build();
|
||||
// payableBillService.insertOmsPayableBill(payableBill);
|
||||
|
||||
inventoryInfoList.forEach(item->{
|
||||
item.setInnerCode(omsInventoryInner.getInnerCode());
|
||||
item.setCreateBy(currentUserId);
|
||||
// item.setPayableBillCode(payableBill.getPayableBillCode());
|
||||
item.setCreateTime(nowDate);
|
||||
if (StringUtils.isEmpty(item.getInventoryStatus())) {
|
||||
item.setInventoryStatus(InventoryInfo.InventoryStatusEnum.INNER.getCode());
|
||||
}
|
||||
});
|
||||
inventoryInfoService.saveBatch(inventoryInfoList);
|
||||
productInfoService.updateAvailableCount(omsInventoryInner.getQuantity(),omsInventoryInner.getProductCode());
|
||||
return omsInventoryInnerMapper.insertOmsInventoryInner(omsInventoryInner);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,97 @@
|
|||
package com.ruoyi.sip.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.sip.mapper.OmsInvoiceReceiptBillMapper;
|
||||
import com.ruoyi.sip.domain.OmsInvoiceReceiptBill;
|
||||
import com.ruoyi.sip.service.IOmsInvoiceReceiptBillService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* 采购收票单Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-10-22
|
||||
*/
|
||||
@Service
|
||||
public class OmsInvoiceReceiptBillServiceImpl implements IOmsInvoiceReceiptBillService
|
||||
{
|
||||
@Autowired
|
||||
private OmsInvoiceReceiptBillMapper omsInvoiceReceiptBillMapper;
|
||||
|
||||
/**
|
||||
* 查询采购收票单
|
||||
*
|
||||
* @param id 采购收票单主键
|
||||
* @return 采购收票单
|
||||
*/
|
||||
@Override
|
||||
public OmsInvoiceReceiptBill selectOmsInvoiceReceiptBillById(Long id)
|
||||
{
|
||||
return omsInvoiceReceiptBillMapper.selectOmsInvoiceReceiptBillById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询采购收票单列表
|
||||
*
|
||||
* @param omsInvoiceReceiptBill 采购收票单
|
||||
* @return 采购收票单
|
||||
*/
|
||||
@Override
|
||||
public List<OmsInvoiceReceiptBill> selectOmsInvoiceReceiptBillList(OmsInvoiceReceiptBill omsInvoiceReceiptBill)
|
||||
{
|
||||
return omsInvoiceReceiptBillMapper.selectOmsInvoiceReceiptBillList(omsInvoiceReceiptBill);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增采购收票单
|
||||
*
|
||||
* @param omsInvoiceReceiptBill 采购收票单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertOmsInvoiceReceiptBill(OmsInvoiceReceiptBill omsInvoiceReceiptBill)
|
||||
{
|
||||
omsInvoiceReceiptBill.setCreateTime(DateUtils.getNowDate());
|
||||
return omsInvoiceReceiptBillMapper.insertOmsInvoiceReceiptBill(omsInvoiceReceiptBill);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改采购收票单
|
||||
*
|
||||
* @param omsInvoiceReceiptBill 采购收票单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateOmsInvoiceReceiptBill(OmsInvoiceReceiptBill omsInvoiceReceiptBill)
|
||||
{
|
||||
omsInvoiceReceiptBill.setUpdateTime(DateUtils.getNowDate());
|
||||
return omsInvoiceReceiptBillMapper.updateOmsInvoiceReceiptBill(omsInvoiceReceiptBill);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除采购收票单
|
||||
*
|
||||
* @param ids 需要删除的采购收票单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOmsInvoiceReceiptBillByIds(String ids)
|
||||
{
|
||||
return omsInvoiceReceiptBillMapper.deleteOmsInvoiceReceiptBillByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除采购收票单信息
|
||||
*
|
||||
* @param id 采购收票单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOmsInvoiceReceiptBillById(Long id)
|
||||
{
|
||||
return omsInvoiceReceiptBillMapper.deleteOmsInvoiceReceiptBillById(id);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,115 @@
|
|||
package com.ruoyi.sip.service.impl;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.date.DateField;
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
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.sip.mapper.OmsPayableBillMapper;
|
||||
import com.ruoyi.sip.domain.OmsPayableBill;
|
||||
import com.ruoyi.sip.service.IOmsPayableBillService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* 采购应付单Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-10-22
|
||||
*/
|
||||
@Service
|
||||
public class OmsPayableBillServiceImpl implements IOmsPayableBillService {
|
||||
@Autowired
|
||||
private OmsPayableBillMapper omsPayableBillMapper;
|
||||
|
||||
/**
|
||||
* 查询采购应付单
|
||||
*
|
||||
* @param id 采购应付单主键
|
||||
* @return 采购应付单
|
||||
*/
|
||||
@Override
|
||||
public OmsPayableBill selectOmsPayableBillById(Long id) {
|
||||
return omsPayableBillMapper.selectOmsPayableBillById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询采购应付单列表
|
||||
*
|
||||
* @param omsPayableBill 采购应付单
|
||||
* @return 采购应付单
|
||||
*/
|
||||
@Override
|
||||
public List<OmsPayableBill> selectOmsPayableBillList(OmsPayableBill omsPayableBill) {
|
||||
return omsPayableBillMapper.selectOmsPayableBillList(omsPayableBill);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增采购应付单
|
||||
*
|
||||
* @param omsPayableBill 采购应付单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertOmsPayableBill(OmsPayableBill omsPayableBill) {
|
||||
//生成采购应付单编号
|
||||
omsPayableBill.setPayableBillCode(generatePayableBillCode());
|
||||
omsPayableBill.setCreateTime(DateUtils.getNowDate());
|
||||
omsPayableBill.setCreateBy(ShiroUtils.getUserId().toString());
|
||||
return omsPayableBillMapper.insertOmsPayableBill(omsPayableBill);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成应付单编号 CYF+YYMMdd+当日序列号
|
||||
* @return 应付单编号
|
||||
*/
|
||||
private String generatePayableBillCode() {
|
||||
String prefix = "CYF";
|
||||
// 查询当天已有的最大序列号
|
||||
String codePrefix = prefix + DateUtil.format(DateUtil.date(), DatePattern.PURE_DATE_PATTERN);
|
||||
int maxSequence = omsPayableBillMapper.selectMaxCodeByPrefix(codePrefix);
|
||||
// 生成新的序列号
|
||||
int newSequence = maxSequence + 1;
|
||||
// 序列号补零到4位
|
||||
String sequenceStr = String.format("%04d", newSequence);
|
||||
return codePrefix + sequenceStr;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改采购应付单
|
||||
*
|
||||
* @param omsPayableBill 采购应付单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateOmsPayableBill(OmsPayableBill omsPayableBill) {
|
||||
omsPayableBill.setUpdateTime(DateUtils.getNowDate());
|
||||
return omsPayableBillMapper.updateOmsPayableBill(omsPayableBill);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除采购应付单
|
||||
*
|
||||
* @param ids 需要删除的采购应付单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOmsPayableBillByIds(String ids) {
|
||||
return omsPayableBillMapper.deleteOmsPayableBillByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除采购应付单信息
|
||||
*
|
||||
* @param id 采购应付单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOmsPayableBillById(Long id) {
|
||||
return omsPayableBillMapper.deleteOmsPayableBillById(id);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,97 @@
|
|||
package com.ruoyi.sip.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.sip.mapper.OmsPaymentBillMapper;
|
||||
import com.ruoyi.sip.domain.OmsPaymentBill;
|
||||
import com.ruoyi.sip.service.IOmsPaymentBillService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* 采购付款单Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-10-22
|
||||
*/
|
||||
@Service
|
||||
public class OmsPaymentBillServiceImpl implements IOmsPaymentBillService
|
||||
{
|
||||
@Autowired
|
||||
private OmsPaymentBillMapper omsPaymentBillMapper;
|
||||
|
||||
/**
|
||||
* 查询采购付款单
|
||||
*
|
||||
* @param id 采购付款单主键
|
||||
* @return 采购付款单
|
||||
*/
|
||||
@Override
|
||||
public OmsPaymentBill selectOmsPaymentBillById(Long id)
|
||||
{
|
||||
return omsPaymentBillMapper.selectOmsPaymentBillById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询采购付款单列表
|
||||
*
|
||||
* @param omsPaymentBill 采购付款单
|
||||
* @return 采购付款单
|
||||
*/
|
||||
@Override
|
||||
public List<OmsPaymentBill> selectOmsPaymentBillList(OmsPaymentBill omsPaymentBill)
|
||||
{
|
||||
return omsPaymentBillMapper.selectOmsPaymentBillList(omsPaymentBill);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增采购付款单
|
||||
*
|
||||
* @param omsPaymentBill 采购付款单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertOmsPaymentBill(OmsPaymentBill omsPaymentBill)
|
||||
{
|
||||
omsPaymentBill.setCreateTime(DateUtils.getNowDate());
|
||||
return omsPaymentBillMapper.insertOmsPaymentBill(omsPaymentBill);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改采购付款单
|
||||
*
|
||||
* @param omsPaymentBill 采购付款单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateOmsPaymentBill(OmsPaymentBill omsPaymentBill)
|
||||
{
|
||||
omsPaymentBill.setUpdateTime(DateUtils.getNowDate());
|
||||
return omsPaymentBillMapper.updateOmsPaymentBill(omsPaymentBill);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除采购付款单
|
||||
*
|
||||
* @param ids 需要删除的采购付款单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOmsPaymentBillByIds(String ids)
|
||||
{
|
||||
return omsPaymentBillMapper.deleteOmsPaymentBillByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除采购付款单信息
|
||||
*
|
||||
* @param id 采购付款单主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOmsPaymentBillById(Long id)
|
||||
{
|
||||
return omsPaymentBillMapper.deleteOmsPaymentBillById(id);
|
||||
}
|
||||
}
|
||||
|
|
@ -1281,13 +1281,25 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
|
|||
emailList.addAll(partnerInfos.stream().map(PartnerInfo::getContactEmail).filter(StringUtils::isNotEmpty).collect(Collectors.toList()));
|
||||
}
|
||||
// 发送邮件
|
||||
List<String> cssMailList = new ArrayList<>(CSS_EMAIL_LIST);
|
||||
List<String> cssMailList = new ArrayList<>();
|
||||
if (ProjectOrderInfo.OrderChannelEnum.DIRECT_SIGNING.getCode().equals(dbProjectOrderInfo.getOrderChannel())) {
|
||||
//直签
|
||||
cssMailList.add("xuxinyu@unisinsight.com");
|
||||
} else {
|
||||
//总代
|
||||
cssMailList.addAll(CSS_EMAIL_LIST);
|
||||
cssMailList.add("jiao.sumei@unisinsight.com");
|
||||
}
|
||||
|
||||
//查询商务邮件
|
||||
List<SysUser> sysUsers = userService.listByRoleId(businessRoleId);
|
||||
cssMailList.addAll(sysUsers.stream()
|
||||
.map(SysUser::getEmail)
|
||||
.filter(StringUtils::isNotEmpty)
|
||||
.collect(Collectors.toList()));
|
||||
// List<SysUser> sysUsers = userService.listByRoleId(businessRoleId);
|
||||
// cssMailList.addAll(sysUsers.stream()
|
||||
// .map(SysUser::getEmail)
|
||||
// .filter(StringUtils::isNotEmpty)
|
||||
// .collect(Collectors.toList()));
|
||||
|
||||
|
||||
|
||||
|
||||
this.sendPartnerMail(emailList.stream().distinct().collect(Collectors.toList()), dbProjectOrderInfo,cssMailList);
|
||||
}
|
||||
|
|
@ -1337,16 +1349,9 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
|
|||
}
|
||||
String templateTile="{}-紫光汇智云桌面-{}-进供货执行通知";
|
||||
String title = StringUtils.format(templateTile, projectOrderInfo.getOrderCode(), projectOrderInfo.getProjectName());
|
||||
|
||||
String activeProfile = SpringUtils.getActiveProfile();
|
||||
if ("dev".equals(activeProfile)){
|
||||
//开发环境不抄送领导
|
||||
TemplateMailUtil.sendTemplateMail(toEmail,title,
|
||||
TemplateMailUtil.MailTemplate.ORDER_PARTNER,Dict.create());
|
||||
}else{
|
||||
TemplateMailUtil.sendTemplateMail(toEmail,title,
|
||||
TemplateMailUtil.sendTemplateMail(toEmail,title,
|
||||
TemplateMailUtil.MailTemplate.ORDER_PARTNER,Dict.create(),toCssEmail);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,106 @@
|
|||
<?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.sip.mapper.OmsInvoiceReceiptBillMapper">
|
||||
|
||||
<resultMap type="OmsInvoiceReceiptBill" id="OmsInvoiceReceiptBillResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="invoiceReceiptBillCode" column="invoice_receipt_bill_code" />
|
||||
<result property="vendorCode" column="vendor_code" />
|
||||
<result property="orderCode" column="order_code" />
|
||||
<result property="totalPriceWithTax" column="total_price_with_tax" />
|
||||
<result property="totalPriceWithoutTax" column="total_price_without_tax" />
|
||||
<result property="taxAmount" column="tax_amount" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOmsInvoiceReceiptBillVo">
|
||||
select id, invoice_receipt_bill_code, vendor_code, order_code, total_price_with_tax, total_price_without_tax, tax_amount, create_by, create_time, update_by, update_time, remark, del_flag from oms_invoice_receipt_bill
|
||||
</sql>
|
||||
|
||||
<select id="selectOmsInvoiceReceiptBillList" parameterType="OmsInvoiceReceiptBill" resultMap="OmsInvoiceReceiptBillResult">
|
||||
<include refid="selectOmsInvoiceReceiptBillVo"/>
|
||||
<where>
|
||||
<if test="invoiceReceiptBillCode != null and invoiceReceiptBillCode != ''"> and invoice_receipt_bill_code = #{invoiceReceiptBillCode}</if>
|
||||
<if test="vendorCode != null and vendorCode != ''"> and vendor_code = #{vendorCode}</if>
|
||||
<if test="orderCode != null and orderCode != ''"> and order_code = #{orderCode}</if>
|
||||
<if test="totalPriceWithTax != null "> and total_price_with_tax = #{totalPriceWithTax}</if>
|
||||
<if test="totalPriceWithoutTax != null "> and total_price_without_tax = #{totalPriceWithoutTax}</if>
|
||||
<if test="taxAmount != null "> and tax_amount = #{taxAmount}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectOmsInvoiceReceiptBillById" parameterType="Long" resultMap="OmsInvoiceReceiptBillResult">
|
||||
<include refid="selectOmsInvoiceReceiptBillVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertOmsInvoiceReceiptBill" parameterType="OmsInvoiceReceiptBill" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into oms_invoice_receipt_bill
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="invoiceReceiptBillCode != null and invoiceReceiptBillCode != ''">invoice_receipt_bill_code,</if>
|
||||
<if test="vendorCode != null">vendor_code,</if>
|
||||
<if test="orderCode != null">order_code,</if>
|
||||
<if test="totalPriceWithTax != null">total_price_with_tax,</if>
|
||||
<if test="totalPriceWithoutTax != null">total_price_without_tax,</if>
|
||||
<if test="taxAmount != null">tax_amount,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="invoiceReceiptBillCode != null and invoiceReceiptBillCode != ''">#{invoiceReceiptBillCode},</if>
|
||||
<if test="vendorCode != null">#{vendorCode},</if>
|
||||
<if test="orderCode != null">#{orderCode},</if>
|
||||
<if test="totalPriceWithTax != null">#{totalPriceWithTax},</if>
|
||||
<if test="totalPriceWithoutTax != null">#{totalPriceWithoutTax},</if>
|
||||
<if test="taxAmount != null">#{taxAmount},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateOmsInvoiceReceiptBill" parameterType="OmsInvoiceReceiptBill">
|
||||
update oms_invoice_receipt_bill
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="invoiceReceiptBillCode != null and invoiceReceiptBillCode != ''">invoice_receipt_bill_code = #{invoiceReceiptBillCode},</if>
|
||||
<if test="vendorCode != null">vendor_code = #{vendorCode},</if>
|
||||
<if test="orderCode != null">order_code = #{orderCode},</if>
|
||||
<if test="totalPriceWithTax != null">total_price_with_tax = #{totalPriceWithTax},</if>
|
||||
<if test="totalPriceWithoutTax != null">total_price_without_tax = #{totalPriceWithoutTax},</if>
|
||||
<if test="taxAmount != null">tax_amount = #{taxAmount},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteOmsInvoiceReceiptBillById" parameterType="Long">
|
||||
delete from oms_invoice_receipt_bill where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteOmsInvoiceReceiptBillByIds" parameterType="String">
|
||||
delete from oms_invoice_receipt_bill where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,136 @@
|
|||
<?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.sip.mapper.OmsPayableBillMapper">
|
||||
|
||||
<resultMap type="OmsPayableBill" id="OmsPayableBillResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="payableBillCode" column="payable_bill_code" />
|
||||
<result property="estimatedPaymentTime" column="estimated_payment_time" />
|
||||
<result property="vendorCode" column="vendor_code" />
|
||||
<result property="orderCode" column="order_code" />
|
||||
<result property="inventoryCode" column="inventory_code" />
|
||||
<result property="productType" column="product_type" />
|
||||
<result property="totalPriceWithTax" column="total_price_with_tax" />
|
||||
<result property="totalPriceWithoutTax" column="total_price_without_tax" />
|
||||
<result property="taxAmount" column="tax_amount" />
|
||||
<result property="paymentBillId" column="payment_bill_id" />
|
||||
<result property="invoiceReceiptBillId" column="invoice_receipt_bill_id" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOmsPayableBillVo">
|
||||
select id, payable_bill_code, estimated_payment_time, vendor_code, order_code, inventory_code, product_type, total_price_with_tax, total_price_without_tax, tax_amount, payment_bill_id, invoice_receipt_bill_id, create_by, create_time, update_by, update_time, remark, del_flag from oms_payable_bill
|
||||
</sql>
|
||||
|
||||
<select id="selectOmsPayableBillList" parameterType="OmsPayableBill" resultMap="OmsPayableBillResult">
|
||||
<include refid="selectOmsPayableBillVo"/>
|
||||
<where>
|
||||
<if test="payableBillCode != null and payableBillCode != ''"> and payable_bill_code like concat( #{payableBillCode},'%') </if>
|
||||
<if test="estimatedPaymentTime != null "> and estimated_payment_time = #{estimatedPaymentTime}</if>
|
||||
<if test="vendorCode != null and vendorCode != ''"> and vendor_code = #{vendorCode}</if>
|
||||
<if test="orderCode != null and orderCode != ''"> and order_code like concat( #{orderCode},'%') </if>
|
||||
<if test="inventoryCode != null and inventoryCode != ''"> and inventory_code like concat( #{inventoryCode},'%') </if>
|
||||
<if test="productType != null and productType != ''"> and product_type = #{productType}</if>
|
||||
<if test="totalPriceWithTax != null "> and total_price_with_tax = #{totalPriceWithTax}</if>
|
||||
<if test="totalPriceWithoutTax != null "> and total_price_without_tax = #{totalPriceWithoutTax}</if>
|
||||
<if test="taxAmount != null "> and tax_amount = #{taxAmount}</if>
|
||||
<if test="paymentBillId != null "> and payment_bill_id = #{paymentBillId}</if>
|
||||
<if test="invoiceReceiptBillId != null "> and invoice_receipt_bill_id = #{invoiceReceiptBillId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectOmsPayableBillById" parameterType="Long" resultMap="OmsPayableBillResult">
|
||||
<include refid="selectOmsPayableBillVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
<select id="selectMaxCodeByPrefix" resultType="java.lang.Integer">
|
||||
select ifnull(max(SUBSTR(payable_bill_code FROM LENGTH(#{prefix}) + 1 FOR 4)), 0)
|
||||
from oms_payable_bill
|
||||
where payable_bill_code like concat(#{prefix}, '%')
|
||||
</select>
|
||||
|
||||
<insert id="insertOmsPayableBill" parameterType="OmsPayableBill" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into oms_payable_bill
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="payableBillCode != null and payableBillCode != ''">payable_bill_code,</if>
|
||||
<if test="estimatedPaymentTime != null">estimated_payment_time,</if>
|
||||
<if test="vendorCode != null">vendor_code,</if>
|
||||
<if test="orderCode != null">order_code,</if>
|
||||
<if test="inventoryCode != null">inventory_code,</if>
|
||||
<if test="productType != null">product_type,</if>
|
||||
<if test="totalPriceWithTax != null">total_price_with_tax,</if>
|
||||
<if test="totalPriceWithoutTax != null">total_price_without_tax,</if>
|
||||
<if test="taxAmount != null">tax_amount,</if>
|
||||
<if test="paymentBillId != null">payment_bill_id,</if>
|
||||
<if test="invoiceReceiptBillId != null">invoice_receipt_bill_id,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="payableBillCode != null and payableBillCode != ''">#{payableBillCode},</if>
|
||||
<if test="estimatedPaymentTime != null">#{estimatedPaymentTime},</if>
|
||||
<if test="vendorCode != null">#{vendorCode},</if>
|
||||
<if test="orderCode != null">#{orderCode},</if>
|
||||
<if test="inventoryCode != null">#{inventoryCode},</if>
|
||||
<if test="productType != null">#{productType},</if>
|
||||
<if test="totalPriceWithTax != null">#{totalPriceWithTax},</if>
|
||||
<if test="totalPriceWithoutTax != null">#{totalPriceWithoutTax},</if>
|
||||
<if test="taxAmount != null">#{taxAmount},</if>
|
||||
<if test="paymentBillId != null">#{paymentBillId},</if>
|
||||
<if test="invoiceReceiptBillId != null">#{invoiceReceiptBillId},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateOmsPayableBill" parameterType="OmsPayableBill">
|
||||
update oms_payable_bill
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="payableBillCode != null and payableBillCode != ''">payable_bill_code = #{payableBillCode},</if>
|
||||
<if test="estimatedPaymentTime != null">estimated_payment_time = #{estimatedPaymentTime},</if>
|
||||
<if test="vendorCode != null">vendor_code = #{vendorCode},</if>
|
||||
<if test="orderCode != null">order_code = #{orderCode},</if>
|
||||
<if test="inventoryCode != null">inventory_code = #{inventoryCode},</if>
|
||||
<if test="productType != null">product_type = #{productType},</if>
|
||||
<if test="totalPriceWithTax != null">total_price_with_tax = #{totalPriceWithTax},</if>
|
||||
<if test="totalPriceWithoutTax != null">total_price_without_tax = #{totalPriceWithoutTax},</if>
|
||||
<if test="taxAmount != null">tax_amount = #{taxAmount},</if>
|
||||
<if test="paymentBillId != null">payment_bill_id = #{paymentBillId},</if>
|
||||
<if test="invoiceReceiptBillId != null">invoice_receipt_bill_id = #{invoiceReceiptBillId},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteOmsPayableBillById" parameterType="Long">
|
||||
delete from oms_payable_bill where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteOmsPayableBillByIds" parameterType="String">
|
||||
delete from oms_payable_bill where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,116 @@
|
|||
<?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.sip.mapper.OmsPaymentBillMapper">
|
||||
|
||||
<resultMap type="OmsPaymentBill" id="OmsPaymentBillResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="paymentBillCode" column="payment_bill_code" />
|
||||
<result property="paymentBillType" column="payment_bill_type" />
|
||||
<result property="paymentTime" column="payment_time" />
|
||||
<result property="vendorCode" column="vendor_code" />
|
||||
<result property="orderCode" column="order_code" />
|
||||
<result property="totalPriceWithTax" column="total_price_with_tax" />
|
||||
<result property="totalPriceWithoutTax" column="total_price_without_tax" />
|
||||
<result property="taxAmount" column="tax_amount" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOmsPaymentBillVo">
|
||||
select id, payment_bill_code, payment_bill_type, payment_time, vendor_code, order_code, total_price_with_tax, total_price_without_tax, tax_amount, create_by, create_time, update_by, update_time, remark, del_flag from oms_payment_bill
|
||||
</sql>
|
||||
|
||||
<select id="selectOmsPaymentBillList" parameterType="OmsPaymentBill" resultMap="OmsPaymentBillResult">
|
||||
<include refid="selectOmsPaymentBillVo"/>
|
||||
<where>
|
||||
<if test="paymentBillCode != null and paymentBillCode != ''"> and payment_bill_code = #{paymentBillCode}</if>
|
||||
<if test="paymentBillType != null and paymentBillType != ''"> and payment_bill_type = #{paymentBillType}</if>
|
||||
<if test="paymentTime != null "> and payment_time = #{paymentTime}</if>
|
||||
<if test="vendorCode != null and vendorCode != ''"> and vendor_code = #{vendorCode}</if>
|
||||
<if test="orderCode != null and orderCode != ''"> and order_code = #{orderCode}</if>
|
||||
<if test="totalPriceWithTax != null "> and total_price_with_tax = #{totalPriceWithTax}</if>
|
||||
<if test="totalPriceWithoutTax != null "> and total_price_without_tax = #{totalPriceWithoutTax}</if>
|
||||
<if test="taxAmount != null "> and tax_amount = #{taxAmount}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectOmsPaymentBillById" parameterType="Long" resultMap="OmsPaymentBillResult">
|
||||
<include refid="selectOmsPaymentBillVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertOmsPaymentBill" parameterType="OmsPaymentBill" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into oms_payment_bill
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="paymentBillCode != null and paymentBillCode != ''">payment_bill_code,</if>
|
||||
<if test="paymentBillType != null">payment_bill_type,</if>
|
||||
<if test="paymentTime != null">payment_time,</if>
|
||||
<if test="vendorCode != null">vendor_code,</if>
|
||||
<if test="orderCode != null">order_code,</if>
|
||||
<if test="totalPriceWithTax != null">total_price_with_tax,</if>
|
||||
<if test="totalPriceWithoutTax != null">total_price_without_tax,</if>
|
||||
<if test="taxAmount != null">tax_amount,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="paymentBillCode != null and paymentBillCode != ''">#{paymentBillCode},</if>
|
||||
<if test="paymentBillType != null">#{paymentBillType},</if>
|
||||
<if test="paymentTime != null">#{paymentTime},</if>
|
||||
<if test="vendorCode != null">#{vendorCode},</if>
|
||||
<if test="orderCode != null">#{orderCode},</if>
|
||||
<if test="totalPriceWithTax != null">#{totalPriceWithTax},</if>
|
||||
<if test="totalPriceWithoutTax != null">#{totalPriceWithoutTax},</if>
|
||||
<if test="taxAmount != null">#{taxAmount},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateOmsPaymentBill" parameterType="OmsPaymentBill">
|
||||
update oms_payment_bill
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="paymentBillCode != null and paymentBillCode != ''">payment_bill_code = #{paymentBillCode},</if>
|
||||
<if test="paymentBillType != null">payment_bill_type = #{paymentBillType},</if>
|
||||
<if test="paymentTime != null">payment_time = #{paymentTime},</if>
|
||||
<if test="vendorCode != null">vendor_code = #{vendorCode},</if>
|
||||
<if test="orderCode != null">order_code = #{orderCode},</if>
|
||||
<if test="totalPriceWithTax != null">total_price_with_tax = #{totalPriceWithTax},</if>
|
||||
<if test="totalPriceWithoutTax != null">total_price_without_tax = #{totalPriceWithoutTax},</if>
|
||||
<if test="taxAmount != null">tax_amount = #{taxAmount},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteOmsPaymentBillById" parameterType="Long">
|
||||
delete from oms_payment_bill where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteOmsPaymentBillByIds" parameterType="String">
|
||||
delete from oms_payment_bill where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -115,9 +115,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</trim>
|
||||
</insert>
|
||||
<insert id="saveBatch">
|
||||
insert into oms_inventory_info (product_code, product_sn, inventory_status, inner_code, outer_code, warehouse_id, inner_price, outer_price, create_by, create_time, update_by, update_time) values
|
||||
insert into oms_inventory_info (product_code, product_sn, inventory_status, inner_code, outer_code
|
||||
, warehouse_id, inner_price, outer_price, create_by, create_time, update_by, update_time,payable_bill_code) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
(#{item.productCode}, #{item.productSn}, #{item.inventoryStatus}, #{item.innerCode}, #{item.outerCode}, #{item.warehouseId}, #{item.innerPrice}, #{item.outerPrice}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime})
|
||||
(#{item.productCode}, #{item.productSn}, #{item.inventoryStatus}, #{item.innerCode}, #{item.outerCode}
|
||||
, #{item.warehouseId}, #{item.innerPrice}, #{item.outerPrice}, #{item.createBy}, #{item.createTime}, #{item.updateBy}, #{item.updateTime},#{item.payableBillCode})
|
||||
</foreach>
|
||||
ON DUPLICATE KEY UPDATE
|
||||
inventory_status = VALUES(inventory_status),
|
||||
|
|
|
|||
Loading…
Reference in New Issue