Compare commits
No commits in common. "a4ce1ba45aa7dc070e19264cfc608b3504e0b2a2" and "4238f345cb6bfdf39fe701a6298869a820830c27" have entirely different histories.
a4ce1ba45a
...
4238f345cb
|
|
@ -1,11 +0,0 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询项目报表列表
|
||||
export function listReport(query) {
|
||||
return request({
|
||||
url: '/finance/report/list',
|
||||
method: 'post',
|
||||
headers: { 'Content-Type': 'multipart/form-data' },
|
||||
data: query
|
||||
})
|
||||
}
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
<el-button size="mini" circle icon="el-icon-menu" @click="showColumn()" v-if="showColumnsType == 'transfer'"/>
|
||||
<el-dropdown trigger="click" :hide-on-click="false" style="padding-left: 12px" v-if="showColumnsType == 'checkbox'">
|
||||
<el-button size="mini" circle icon="el-icon-menu" />
|
||||
<el-dropdown-menu slot="dropdown" >
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<!-- 全选/反选 按钮 -->
|
||||
<el-dropdown-item>
|
||||
<el-checkbox :indeterminate="isIndeterminate" v-model="isChecked" @change="toggleCheckAll"> 列展示 </el-checkbox>
|
||||
|
|
@ -183,8 +183,4 @@ export default {
|
|||
background-color: #ccc;
|
||||
margin: 3px auto;
|
||||
}
|
||||
.el-dropdown-menu{
|
||||
max-height: 400px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
<div class="el-descriptions__title">附件信息</div>
|
||||
<el-table :data="attachments" border style="width: 100%; margin-top: 10px;">
|
||||
<el-table-column prop="fileName" label="附件名称" align="center"></el-table-column>
|
||||
<el-table-column prop="createByName" label="上传人" align="center"></el-table-column>
|
||||
<el-table-column prop="createUserName" label="上传人" align="center"></el-table-column>
|
||||
<el-table-column prop="createTime" label="上传时间" align="center"></el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
|
|
@ -97,7 +97,7 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
fetchAttachments(id) {
|
||||
getReceiptAttachments(id,{type: "receipt"}).then(response => {
|
||||
getReceiptAttachments(id,"receipt").then(response => {
|
||||
this.attachments = (response.data || []).filter(item => item.delFlag !== '2');
|
||||
});
|
||||
},
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
<div class="el-descriptions__title">附件信息</div>
|
||||
<el-table :data="attachments" border style="width: 100%; margin-top: 10px;">
|
||||
<el-table-column prop="fileName" label="附件名称" align="center"></el-table-column>
|
||||
<el-table-column prop="createByName" label="上传人" align="center"></el-table-column>
|
||||
<el-table-column prop="createUserName" label="上传人" align="center"></el-table-column>
|
||||
<el-table-column prop="createTime" label="上传时间" align="center"></el-table-column>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@
|
|||
</el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="6" v-if="orderData.orderStatus==='1'">
|
||||
<el-col :span="6">
|
||||
<span class="summary-label"> 折后总价合计</span> <span
|
||||
class="summary-value-right"> {{ formatCurrency(finalTotal) }}</span>
|
||||
</el-col>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
<div class="detail-item">销售-收款单编号: {{ detail.receiptBillCode }}</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="detail-item">预计收款时间: {{ detail.receiptTime }}</div>
|
||||
<div class="detail-item">收款时间: {{ detail.receiptTime }}</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="detail-item">进货商名称: {{ detail.partnerName }}</div>
|
||||
|
|
@ -35,30 +35,53 @@
|
|||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<div class="detail-item">备注:
|
||||
<div class="detail-item">收款单类型:
|
||||
<dict-tag :options="dict.type.receipt_bill_type" :value="detail.receiptBillType"/></div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="detail-item">预收单剩余额度:{{detail.remainAmount}}
|
||||
<div class="detail-item">对方支付方式:
|
||||
<dict-tag :options="dict.type.payment_method" :value="detail.receiptMethod"/>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="detail-item">实际收款时间: {{ detail.actualReceiptTime }}</div>
|
||||
<div class="detail-item">收款图/回执单:
|
||||
<span v-if="detail.attachment">
|
||||
<el-button type="text" size="mini" icon="el-icon-view" @click="handlePreview(detail.attachment)">预览</el-button>
|
||||
<el-button type="text" size="mini" icon="el-icon-download"
|
||||
@click="downloadFile(detail.attachment)">下载</el-button>
|
||||
</span>
|
||||
<span v-else>-</span>
|
||||
</div>
|
||||
</el-col>
|
||||
<!-- <el-col :span="8">-->
|
||||
<!-- <div class="detail-item">收款图/回执单:-->
|
||||
<!-- <span v-if="detail.attachment">-->
|
||||
<!-- <el-button type="text" size="mini" icon="el-icon-view" @click="handlePreview(detail.attachment)">预览</el-button>-->
|
||||
<!-- <el-button type="text" size="mini" icon="el-icon-download"-->
|
||||
<!-- @click="downloadFile(detail.attachment)">下载</el-button>-->
|
||||
<!-- </span>-->
|
||||
<!-- <span v-else>-</span>-->
|
||||
<!-- </div>-->
|
||||
<!-- </el-col>-->
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<div class="detail-item">支付方式: <dict-tag :options="dict.type.payment_method" :value="detail.receiptMethod"/></div>
|
||||
<div class="detail-item">收款金额:{{detail.totalPriceWithTax}}</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="detail-item">备注: {{ detail.remark|| '-' }}</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="detail-item">上传人姓名:
|
||||
{{ detail.attachment && detail.attachment.createByName || '-' }}
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<div class="detail-item">账户名称: {{ detail.receiptAccountName }}</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="detail-item">银行账号: {{ detail.receiptBankNumber|| '-' }}</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="detail-item">银行开户行:{{detail.receiptBankOpenAddress}}
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<div class="detail-item">银行行号: {{ detail.bankNumber }}</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="detail-item">收款状态: <dict-tag :options="dict.type.receipt_bill_status" :value="detail.receiptStatus"/></div>
|
||||
|
|
@ -76,25 +99,6 @@
|
|||
<el-col :span="8">
|
||||
<div class="detail-item">审批通过时间: {{ detail.approveTime || '-'}}</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
|
||||
<div class="detail-item">账户名称: {{ detail.receiptAccountName }}</div>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<div class="detail-item">银行账号: {{ detail.receiptBankNumber|| '-' }}</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="detail-item">银行开户行:{{detail.receiptBankOpenAddress}}
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="detail-item">银行行号: {{ detail.bankNumber }}</div>
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,380 +0,0 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||
<el-form-item label="项目编号" prop="projectCode">
|
||||
<el-input
|
||||
v-model="queryParams.projectCode"
|
||||
placeholder="请输入项目编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目名称" prop="projectName">
|
||||
<el-input
|
||||
v-model="queryParams.projectName"
|
||||
placeholder="请输入项目名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="计收状态" prop="chargeStatus">
|
||||
<el-select
|
||||
v-model="queryParams.chargeStatus"
|
||||
placeholder="请输入计收状态"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.charge_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="收款状态" prop="receiptStatus">
|
||||
<el-select
|
||||
v-model="queryParams.receiptStatus"
|
||||
placeholder="请输入收款状态"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.report_receipt_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="开票状态" prop="invoiceStatus">
|
||||
<el-select
|
||||
v-model="queryParams.invoiceStatus"
|
||||
placeholder="请输入开票状态"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.report_invoice_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="付款状态" prop="paymentStatus">
|
||||
<el-select
|
||||
v-model="queryParams.paymentStatus"
|
||||
placeholder="请输入付款状态"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.report_payment_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="收票状态" prop="ticketStatus">
|
||||
<el-select
|
||||
v-model="queryParams.ticketStatus"
|
||||
placeholder="请输入收票状态"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in dict.type.report_ticket_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['finance:report:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="reportList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="项目" align="center" prop="orderCode" width="180" v-if="columns.projectCode.visible || columns.projectName.visible" key="orderCode">
|
||||
<el-table-column label="项目编号" align="center" prop="projectCode" width="120" v-if="columns.projectCode.visible" key="receivableWithTax"/>
|
||||
<el-table-column label="项目名称" align="center" prop="projectName" width="120" v-if="columns.projectName.visible" key="receivableWithoutTax"/>
|
||||
</el-table-column>
|
||||
|
||||
<!-- 应收 -->
|
||||
<el-table-column label="应收单" align="center" v-if="columns.receivableWithTax.visible || columns.receivableWithoutTax.visible||columns.receivableTax.visible">
|
||||
<el-table-column label="应收含税总价" align="center" prop="receivableWithTax" width="120" v-if="columns.receivableWithTax.visible" key="receivableWithTax"/>
|
||||
<el-table-column label="应收未税总价" align="center" prop="receivableWithoutTax" width="120" v-if="columns.receivableWithoutTax.visible" key="receivableWithoutTax"/>
|
||||
<el-table-column label="应收税额" align="center" prop="receivableTax" width="120" v-if="columns.receivableTax.visible" key="receivableTax"/>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
|
||||
<!-- 毛利 -->
|
||||
<el-table-column label="计收统计" align="center" v-if="columns.chargeStatus.visible || columns.chargedWithoutTax.visible || columns.grossProfit.visible ||columns.grossProfitRate.visible">
|
||||
<el-table-column label="计收状态" align="center" prop="chargeStatus" width="100" v-if="columns.chargeStatus.visible" key="chargeStatus">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.charge_status" :value="scope.row.chargeStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已计收未税金额" align="center" prop="chargedWithoutTax" width="120" v-if="columns.chargedWithoutTax.visible" key="chargedWithoutTax"/>
|
||||
<el-table-column label="金额" align="center" prop="grossProfit" width="120" v-if="columns.grossProfit.visible" key="grossProfit"/>
|
||||
<el-table-column label="毛利率" align="center" prop="grossProfitRate" width="100" v-if="columns.grossProfitRate.visible" key="grossProfitRate"/>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="业务计收时间" align="center" prop="bizChargeDate" width="180" v-if="columns.bizChargeDate.visible" key="bizChargeDate">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.bizChargeDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="财务计收时间" align="center" prop="financeChargeDate" width="180" v-if="columns.financeChargeDate.visible" key="financeChargeDate">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.financeChargeDate, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<!-- 收款 -->
|
||||
<el-table-column label="收款单" align="center" >
|
||||
<el-table-column label="收款状态" align="center" prop="receiptStatus" width="100" v-if="columns.receiptStatus.visible" key="receiptStatus">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.report_receipt_status" :value="scope.row.receiptStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已收款含税金额" align="center" prop="receivedWithTax" width="120" v-if="columns.receivedWithTax.visible" key="receivedWithTax"/>
|
||||
<el-table-column label="已收款未税金额" align="center" prop="receivedWithoutTax" width="120" v-if="columns.receivedWithoutTax.visible" key="receivedWithoutTax"/>
|
||||
<el-table-column label="已收款税额" align="center" prop="receivedTax" width="120" v-if="columns.receivedTax.visible" key="receivedTax"/>
|
||||
<el-table-column label="收款中含税金额" align="center" prop="receivingWithTax" width="120" v-if="columns.receivingWithTax.visible" key="receivingWithTax"/>
|
||||
<el-table-column label="收款中未税金额" align="center" prop="receivingWithoutTax" width="120" v-if="columns.receivingWithoutTax.visible" key="receivingWithoutTax"/>
|
||||
<el-table-column label="收款中税额" align="center" prop="receivingTax" width="120" v-if="columns.receivingTax.visible" key="receivingTax"/>
|
||||
<el-table-column label="未收款含税金额" align="center" prop="unreceivedWithTax" width="120" v-if="columns.unreceivedWithTax.visible" key="unreceivedWithTax"/>
|
||||
<el-table-column label="未收款未税金额" align="center" prop="unreceivedWithoutTax" width="120" v-if="columns.unreceivedWithoutTax.visible" key="unreceivedWithoutTax"/>
|
||||
<el-table-column label="未收款税额" align="center" prop="unreceivedTax" width="120" v-if="columns.unreceivedTax.visible" key="unreceivedTax"/>
|
||||
</el-table-column>
|
||||
|
||||
<!-- 开票 -->
|
||||
<el-table-column label="开票单" align="center">
|
||||
<el-table-column label="开票状态" align="center" prop="invoiceStatus" width="100" v-if="columns.invoiceStatus.visible" key="invoiceStatus">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.report_invoice_status" :value="scope.row.invoiceStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已开票含税金额" align="center" prop="invoicedWithTax" width="120" v-if="columns.invoicedWithTax.visible" key="invoicedWithTax"/>
|
||||
<el-table-column label="已开票未税金额" align="center" prop="invoicedWithoutTax" width="120" v-if="columns.invoicedWithoutTax.visible" key="invoicedWithoutTax"/>
|
||||
<el-table-column label="已开票税额" align="center" prop="invoicedTax" width="120" v-if="columns.invoicedTax.visible" key="invoicedTax"/>
|
||||
<el-table-column label="开票中含税金额" align="center" prop="invoicingWithTax" width="120" v-if="columns.invoicingWithTax.visible" key="invoicingWithTax"/>
|
||||
<el-table-column label="开票中未税金额" align="center" prop="invoicingWithoutTax" width="120" v-if="columns.invoicingWithoutTax.visible" key="invoicingWithoutTax"/>
|
||||
<el-table-column label="开票中税额" align="center" prop="invoicingTax" width="120" v-if="columns.invoicingTax.visible" key="invoicingTax"/>
|
||||
<el-table-column label="未开票含税金额" align="center" prop="uninvoicedWithTax" width="120" v-if="columns.uninvoicedWithTax.visible" key="uninvoicedWithTax"/>
|
||||
<el-table-column label="未开票未税金额" align="center" prop="uninvoicedWithoutTax" width="120" v-if="columns.uninvoicedWithoutTax.visible" key="uninvoicedWithoutTax"/>
|
||||
<el-table-column label="未开票税额" align="center" prop="uninvoicedTax" width="120" v-if="columns.uninvoicedTax.visible" key="uninvoicedTax"/>
|
||||
</el-table-column>
|
||||
|
||||
<!-- 应付 -->
|
||||
<el-table-column label="应付单" align="center">
|
||||
<el-table-column label="应付含税金额" align="center" prop="payableWithTax" width="120" v-if="columns.payableWithTax.visible" key="payableWithTax"/>
|
||||
<el-table-column label="应付未税金额" align="center" prop="payableWithoutTax" width="120" v-if="columns.payableWithoutTax.visible" key="payableWithoutTax"/>
|
||||
<el-table-column label="应付税额" align="center" prop="payableTax" width="120" v-if="columns.payableTax.visible" key="payableTax"/>
|
||||
</el-table-column>
|
||||
|
||||
<!-- 付款 -->
|
||||
<el-table-column label="付款单" align="center">
|
||||
<el-table-column label="付款状态" align="center" prop="paymentStatus" width="100" v-if="columns.paymentStatus.visible" key="paymentStatus">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.report_payment_status" :value="scope.row.paymentStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已付款含税金额" align="center" prop="paidWithTax" width="120" v-if="columns.paidWithTax.visible" key="paidWithTax"/>
|
||||
<el-table-column label="已付款未税金额" align="center" prop="paidWithoutTax" width="120" v-if="columns.paidWithoutTax.visible" key="paidWithoutTax"/>
|
||||
<el-table-column label="已付款税额" align="center" prop="paidTax" width="120" v-if="columns.paidTax.visible" key="paidTax"/>
|
||||
<el-table-column label="付款中含税金额" align="center" prop="payingWithTax" width="120" v-if="columns.payingWithTax.visible" key="payingWithTax"/>
|
||||
<el-table-column label="付款中未税金额" align="center" prop="payingWithoutTax" width="120" v-if="columns.payingWithoutTax.visible" key="payingWithoutTax"/>
|
||||
<el-table-column label="付款中税额" align="center" prop="payingTax" width="120" v-if="columns.payingTax.visible" key="payingTax"/>
|
||||
<el-table-column label="未付款含税金额" align="center" prop="unpaidWithTax" width="120" v-if="columns.unpaidWithTax.visible" key="unpaidWithTax"/>
|
||||
<el-table-column label="未付款未税金额" align="center" prop="unpaidWithoutTax" width="120" v-if="columns.unpaidWithoutTax.visible" key="unpaidWithoutTax"/>
|
||||
<el-table-column label="未付款税额" align="center" prop="unpaidTax" width="120" v-if="columns.unpaidTax.visible" key="unpaidTax"/>
|
||||
</el-table-column>
|
||||
|
||||
<!-- 收票 -->
|
||||
<el-table-column label="收票单" align="center">
|
||||
<el-table-column label="收票状态" align="center" prop="ticketStatus" width="100" v-if="columns.ticketStatus.visible" key="ticketStatus">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.report_ticket_status" :value="scope.row.ticketStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="已收票含税金额" align="center" prop="ticketedWithTax" width="120" v-if="columns.ticketedWithTax.visible" key="ticketedWithTax"/>
|
||||
<el-table-column label="已收票未税金额" align="center" prop="ticketedWithoutTax" width="120" v-if="columns.ticketedWithoutTax.visible" key="ticketedWithoutTax"/>
|
||||
<el-table-column label="已收票税额" align="center" prop="ticketedTax" width="120" v-if="columns.ticketedTax.visible" key="ticketedTax"/>
|
||||
<el-table-column label="收票中含税金额" align="center" prop="ticketingWithTax" width="120" v-if="columns.ticketingWithTax.visible" key="ticketingWithTax"/>
|
||||
<el-table-column label="收票中未税金额" align="center" prop="ticketingWithoutTax" width="120" v-if="columns.ticketingWithoutTax.visible" key="ticketingWithoutTax"/>
|
||||
<el-table-column label="收票中税额" align="center" prop="ticketingTax" width="120" v-if="columns.ticketingTax.visible" key="ticketingTax"/>
|
||||
<el-table-column label="未收票含税金额" align="center" prop="unticketedWithTax" width="120" v-if="columns.unticketedWithTax.visible" key="unticketedWithTax"/>
|
||||
<el-table-column label="未收票未税金额" align="center" prop="unticketedWithoutTax" width="120" v-if="columns.unticketedWithoutTax.visible" key="unticketedWithoutTax"/>
|
||||
<el-table-column label="未收票税额" align="center" prop="unticketedTax" width="120" v-if="columns.unticketedTax.visible" key="unticketedTax"/>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listReport } from "@/api/finance/report";
|
||||
|
||||
export default {
|
||||
name: "Report",
|
||||
dicts: ['charge_status', 'report_receipt_status', 'report_invoice_status', 'report_payment_status', 'report_ticket_status'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 项目报表表格数据
|
||||
reportList: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
orderCode: null,
|
||||
projectCode: null,
|
||||
projectName: null,
|
||||
chargeStatus: null,
|
||||
receiptStatus: null,
|
||||
invoiceStatus: null,
|
||||
paymentStatus: null,
|
||||
ticketStatus: null,
|
||||
},
|
||||
// 列信息
|
||||
columns: {
|
||||
projectCode: { label: "项目编号", visible: true },
|
||||
projectName: { label: "项目名称", visible: true },
|
||||
receivableWithTax: { label: "应收含税总价", visible: true },
|
||||
receivableWithoutTax: { label: "应收未税总价", visible: true },
|
||||
receivableTax: { label: "应收税额", visible: true },
|
||||
chargeStatus: { label: "计收状态", visible: true },
|
||||
chargedWithoutTax: { label: "已计收未税金额", visible: true },
|
||||
grossProfit: { label: "毛利", visible: true },
|
||||
grossProfitRate: { label: "毛利率", visible: true },
|
||||
bizChargeDate: { label: "业务计收时间", visible: true },
|
||||
financeChargeDate: { label: "财务计收时间", visible: true },
|
||||
receiptStatus: { label: "收款状态", visible: true },
|
||||
receivedWithTax: { label: "已收款含税金额", visible: true },
|
||||
receivedWithoutTax: { label: "已收款未税金额", visible: true },
|
||||
receivedTax: { label: "已收款税额", visible: true },
|
||||
receivingWithTax: { label: "收款中含税金额", visible: true },
|
||||
receivingWithoutTax: { label: "收款中未税金额", visible: true },
|
||||
receivingTax: { label: "收款中税额", visible: true },
|
||||
unreceivedWithTax: { label: "未收款含税金额", visible: true },
|
||||
unreceivedWithoutTax: { label: "未收款未税金额", visible: true },
|
||||
unreceivedTax: { label: "未收款税额", visible: true },
|
||||
invoiceStatus: { label: "开票状态", visible: true },
|
||||
invoicedWithTax: { label: "已开票含税金额", visible: true },
|
||||
invoicedWithoutTax: { label: "已开票未税金额", visible: true },
|
||||
invoicedTax: { label: "已开票税额", visible: true },
|
||||
invoicingWithTax: { label: "开票中含税金额", visible: true },
|
||||
invoicingWithoutTax: { label: "开票中未税金额", visible: true },
|
||||
invoicingTax: { label: "开票中税额", visible: true },
|
||||
uninvoicedWithTax: { label: "未开票含税金额", visible: true },
|
||||
uninvoicedWithoutTax: { label: "未开票未税金额", visible: true },
|
||||
uninvoicedTax: { label: "未开票税额", visible: true },
|
||||
payableWithTax: { label: "应付含税总价", visible: true },
|
||||
payableWithoutTax: { label: "应付未税总价", visible: true },
|
||||
payableTax: { label: "应付税额", visible: true },
|
||||
paymentStatus: { label: "付款状态", visible: true },
|
||||
paidWithTax: { label: "已付款含税金额", visible: true },
|
||||
paidWithoutTax: { label: "已付款未税金额", visible: true },
|
||||
paidTax: { label: "已付款税额", visible: true },
|
||||
payingWithTax: { label: "付款中含税金额", visible: true },
|
||||
payingWithoutTax: { label: "付款中未税金额", visible: true },
|
||||
payingTax: { label: "付款中税额", visible: true },
|
||||
unpaidWithTax: { label: "未付款含税金额", visible: true },
|
||||
unpaidWithoutTax: { label: "未付款未税金额", visible: true },
|
||||
unpaidTax: { label: "未付款税额", visible: true },
|
||||
ticketStatus: { label: "收票状态", visible: true },
|
||||
ticketedWithTax: { label: "已收票含税金额", visible: true },
|
||||
ticketedWithoutTax: { label: "已收票未税金额", visible: true },
|
||||
ticketedTax: { label: "已收票税额", visible: true },
|
||||
ticketingWithTax: { label: "收票中含税金额", visible: true },
|
||||
ticketingWithoutTax: { label: "收票中未税金额", visible: true },
|
||||
ticketingTax: { label: "收票中税额", visible: true },
|
||||
unticketedWithTax: { label: "未收票含税金额", visible: true },
|
||||
unticketedWithoutTax: { label: "未收票未税金额", visible: true },
|
||||
unticketedTax: { label: "未收票税额", visible: true },
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询项目报表列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listReport(this.queryParams).then(response => {
|
||||
this.reportList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('finance/report/export', {
|
||||
...this.queryParams
|
||||
}, `report_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
|
||||
</style>
|
||||
|
|
@ -465,7 +465,7 @@ export default {
|
|||
this.$modal.msgError("折扣不能大于100%");
|
||||
return;
|
||||
}
|
||||
const checkProduct=(list)=>!list ||list.every(item => item.productBomCode!=='')
|
||||
const checkProduct=(list)=>list.every(item => item.productBomCode!=='')
|
||||
if (!checkProduct(this.form.softwareProjectProductInfoList) || !checkProduct(this.form.hardwareProjectProductInfoList) || !checkProduct(this.form.maintenanceProjectProductInfoList)) {
|
||||
this.$modal.msgError("请完善产品信息");
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ public class Constants
|
|||
/**
|
||||
* 定时任务白名单配置(仅允许访问的包名,如其他需要可以自行添加)
|
||||
*/
|
||||
public static final String[] JOB_WHITELIST_STR = { "com.ruoyi.quartz.task", "com.ruoyi.sip" };
|
||||
public static final String[] JOB_WHITELIST_STR = { "com.ruoyi.quartz.task" };
|
||||
|
||||
/**
|
||||
* 定时任务违规的字符
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@ public class OmsFinanceChargeController extends BaseController
|
|||
public TableDataInfo list(OmsFinanceCharge omsFinanceCharge)
|
||||
{
|
||||
startPage();
|
||||
omsFinanceCharge.setChargeStatus(OmsFinanceCharge.ChargeStatusEnum.COMPLETE_CHARGE.getCode());
|
||||
List<OmsFinanceCharge> list = omsFinanceChargeService.selectOmsFinanceChargeList(omsFinanceCharge);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
|
@ -48,12 +47,11 @@ public class OmsFinanceChargeController extends BaseController
|
|||
@RequiresPermissions("finance:charge:export")
|
||||
@Log(title = "财务计收", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public AjaxResult export(HttpServletResponse response, OmsFinanceCharge omsFinanceCharge)
|
||||
public void export(HttpServletResponse response, OmsFinanceCharge omsFinanceCharge)
|
||||
{
|
||||
omsFinanceCharge.setChargeStatus(OmsFinanceCharge.ChargeStatusEnum.COMPLETE_CHARGE.getCode());
|
||||
List<OmsFinanceCharge> list = omsFinanceChargeService.selectOmsFinanceChargeList(omsFinanceCharge);
|
||||
ExcelUtil<OmsFinanceCharge> util = new ExcelUtil<OmsFinanceCharge>(OmsFinanceCharge.class);
|
||||
return util.exportExcel(list, "财务计收数据");
|
||||
util.exportExcel(response, list, "财务计收数据");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,138 +0,0 @@
|
|||
package com.ruoyi.sip.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.annotation.Anonymous;
|
||||
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.OmsFinanceOperateReport;
|
||||
import com.ruoyi.sip.service.IOmsFinanceOperateReportService;
|
||||
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 2026-01-04
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/finance/report")
|
||||
public class OmsFinanceOperateReportController extends BaseController
|
||||
{
|
||||
private String prefix = "sip/financeReport";
|
||||
|
||||
@Autowired
|
||||
private IOmsFinanceOperateReportService omsFinanceOperateReportService;
|
||||
|
||||
@RequiresPermissions("sip:financeReport:view")
|
||||
@GetMapping()
|
||||
public String financeReport()
|
||||
{
|
||||
return prefix + "/financeReport";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询财务模块报列表
|
||||
*/
|
||||
@RequiresPermissions("sip:financeReport:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(OmsFinanceOperateReport omsFinanceOperateReport)
|
||||
{
|
||||
startPage();
|
||||
List<OmsFinanceOperateReport> list = omsFinanceOperateReportService.selectOmsFinanceOperateReportList(omsFinanceOperateReport);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出财务模块报列表
|
||||
*/
|
||||
@RequiresPermissions("sip:financeReport:export")
|
||||
@Log(title = "财务模块报", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(OmsFinanceOperateReport omsFinanceOperateReport)
|
||||
{
|
||||
List<OmsFinanceOperateReport> list = omsFinanceOperateReportService.selectOmsFinanceOperateReportList(omsFinanceOperateReport);
|
||||
ExcelUtil<OmsFinanceOperateReport> util = new ExcelUtil<OmsFinanceOperateReport>(OmsFinanceOperateReport.class);
|
||||
return util.exportExcel(list, "财务模块报数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增财务模块报
|
||||
*/
|
||||
@RequiresPermissions("sip:financeReport:add")
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存财务模块报
|
||||
*/
|
||||
@RequiresPermissions("sip:financeReport:add")
|
||||
@Log(title = "财务模块报", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(OmsFinanceOperateReport omsFinanceOperateReport)
|
||||
{
|
||||
return toAjax(omsFinanceOperateReportService.insertOmsFinanceOperateReport(omsFinanceOperateReport));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改财务模块报
|
||||
*/
|
||||
@RequiresPermissions("sip:financeReport:edit")
|
||||
@GetMapping("/edit/{id}")
|
||||
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||
{
|
||||
OmsFinanceOperateReport omsFinanceOperateReport = omsFinanceOperateReportService.selectOmsFinanceOperateReportById(id);
|
||||
mmap.put("omsFinanceOperateReport", omsFinanceOperateReport);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存财务模块报
|
||||
*/
|
||||
@RequiresPermissions("sip:financeReport:edit")
|
||||
@Log(title = "财务模块报", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(OmsFinanceOperateReport omsFinanceOperateReport)
|
||||
{
|
||||
return toAjax(omsFinanceOperateReportService.updateOmsFinanceOperateReport(omsFinanceOperateReport));
|
||||
}
|
||||
@GetMapping("/test")
|
||||
@ResponseBody
|
||||
@Anonymous
|
||||
public AjaxResult test()
|
||||
{
|
||||
omsFinanceOperateReportService.statisticsReport();
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除财务模块报
|
||||
*/
|
||||
@RequiresPermissions("sip:financeReport:remove")
|
||||
@Log(title = "财务模块报", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(omsFinanceOperateReportService.deleteOmsFinanceOperateReportByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -2,8 +2,6 @@ package com.ruoyi.sip.domain;
|
|||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AccessLevel;
|
||||
import lombok.Data;
|
||||
|
|
@ -105,7 +103,6 @@ public class OmsFinanceCharge extends BaseEntity
|
|||
/** 计收状态 0:等待收款完成 1:可申请计收 2:已申请计收 3:已完成计收 */
|
||||
@Excel(name = "计收状态", readConverterExp = "0=等待收款完成,1=可申请计收,2=已申请计收,3=已完成计收")
|
||||
private String chargeStatus;
|
||||
private List<String> chargeStatusList;
|
||||
private String projectCode;
|
||||
private String projectName;
|
||||
private String orderChannel;
|
||||
|
|
@ -173,8 +170,8 @@ public class OmsFinanceCharge extends BaseEntity
|
|||
|
||||
/** 付款单 */
|
||||
WAIT_RECEIPT("0", "等待收款"),
|
||||
WAIT_APPLY_CHARGE("1", "商务可申请计收"),
|
||||
APPLY_CHARGE("2", "财务已申请计收"),
|
||||
WAIT_APPLY_CHARGE("1", "可申请计收"),
|
||||
APPLY_CHARGE("2", "已申请计收"),
|
||||
COMPLETE_CHARGE("3", "已完成计收"),
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,269 +0,0 @@
|
|||
package com.ruoyi.sip.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import lombok.Getter;
|
||||
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_finance_operate_report
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-04
|
||||
*/
|
||||
@Data
|
||||
public class OmsFinanceOperateReport extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
private Long id;
|
||||
|
||||
/** 订单编号 */
|
||||
@Excel(name = "订单编号")
|
||||
private String orderCode;
|
||||
private String projectCode;
|
||||
private String projectName;
|
||||
|
||||
/** 应收含税总价 */
|
||||
@Excel(name = "应收含税总价")
|
||||
private BigDecimal receivableWithTax;
|
||||
|
||||
/** 应收未税总价 */
|
||||
@Excel(name = "应收未税总价")
|
||||
private BigDecimal receivableWithoutTax;
|
||||
|
||||
/** 应收税额 */
|
||||
@Excel(name = "应收税额")
|
||||
private BigDecimal receivableTax;
|
||||
|
||||
/** 计收状态 */
|
||||
@Excel(name = "计收状态")
|
||||
private String chargeStatus;
|
||||
|
||||
/** 已计收未税金额 */
|
||||
@Excel(name = "已计收未税金额")
|
||||
private BigDecimal chargedWithoutTax;
|
||||
|
||||
/** 毛利 */
|
||||
@Excel(name = "毛利")
|
||||
private BigDecimal grossProfit;
|
||||
|
||||
/** 毛利率 */
|
||||
@Excel(name = "毛利率")
|
||||
private BigDecimal grossProfitRate;
|
||||
|
||||
/** 业务计收时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@Excel(name = "业务计收时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date bizChargeDate;
|
||||
|
||||
/** 财务计收时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@Excel(name = "财务计收时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date financeChargeDate;
|
||||
|
||||
/** 收款状态 */
|
||||
@Excel(name = "收款状态")
|
||||
private String receiptStatus;
|
||||
|
||||
/** 已收款含税金额 */
|
||||
@Excel(name = "已收款含税金额")
|
||||
private BigDecimal receivedWithTax;
|
||||
|
||||
/** 已收款未税金额 */
|
||||
@Excel(name = "已收款未税金额")
|
||||
private BigDecimal receivedWithoutTax;
|
||||
|
||||
/** 已收款税额 */
|
||||
@Excel(name = "已收款税额")
|
||||
private BigDecimal receivedTax;
|
||||
|
||||
/** 收款中含税金额 */
|
||||
@Excel(name = "收款中含税金额")
|
||||
private BigDecimal receivingWithTax;
|
||||
|
||||
/** 收款中未税金额 */
|
||||
@Excel(name = "收款中未税金额")
|
||||
private BigDecimal receivingWithoutTax;
|
||||
|
||||
/** 收款中税额 */
|
||||
@Excel(name = "收款中税额")
|
||||
private BigDecimal receivingTax;
|
||||
|
||||
/** 未收款含税金额 */
|
||||
@Excel(name = "未收款含税金额")
|
||||
private BigDecimal unreceivedWithTax;
|
||||
|
||||
/** 未收款未税金额 */
|
||||
@Excel(name = "未收款未税金额")
|
||||
private BigDecimal unreceivedWithoutTax;
|
||||
|
||||
/** 未收款税额 */
|
||||
@Excel(name = "未收款税额")
|
||||
private BigDecimal unreceivedTax;
|
||||
|
||||
/** 开票状态 */
|
||||
@Excel(name = "开票状态")
|
||||
private String invoiceStatus;
|
||||
|
||||
/** 已开票含税金额 */
|
||||
@Excel(name = "已开票含税金额")
|
||||
private BigDecimal invoicedWithTax;
|
||||
|
||||
/** 已开票未税金额 */
|
||||
@Excel(name = "已开票未税金额")
|
||||
private BigDecimal invoicedWithoutTax;
|
||||
|
||||
/** 已开票税额 */
|
||||
@Excel(name = "已开票税额")
|
||||
private BigDecimal invoicedTax;
|
||||
|
||||
/** 开票中含税金额 */
|
||||
@Excel(name = "开票中含税金额")
|
||||
private BigDecimal invoicingWithTax;
|
||||
|
||||
/** 开票中未税金额 */
|
||||
@Excel(name = "开票中未税金额")
|
||||
private BigDecimal invoicingWithoutTax;
|
||||
|
||||
/** 开票中税额 */
|
||||
@Excel(name = "开票中税额")
|
||||
private BigDecimal invoicingTax;
|
||||
|
||||
/** 未开票含税金额 */
|
||||
@Excel(name = "未开票含税金额")
|
||||
private BigDecimal uninvoicedWithTax;
|
||||
|
||||
/** 未开票未税金额 */
|
||||
@Excel(name = "未开票未税金额")
|
||||
private BigDecimal uninvoicedWithoutTax;
|
||||
|
||||
/** 未开票税额 */
|
||||
@Excel(name = "未开票税额")
|
||||
private BigDecimal uninvoicedTax;
|
||||
|
||||
/** 应付含税总价 */
|
||||
@Excel(name = "应付含税总价")
|
||||
private BigDecimal payableWithTax;
|
||||
|
||||
/** 应付未税总价 */
|
||||
@Excel(name = "应付未税总价")
|
||||
private BigDecimal payableWithoutTax;
|
||||
|
||||
/** 应付税额 */
|
||||
@Excel(name = "应付税额")
|
||||
private BigDecimal payableTax;
|
||||
|
||||
/** 付款状态 */
|
||||
@Excel(name = "付款状态")
|
||||
private String paymentStatus;
|
||||
|
||||
/** 已付款含税金额 */
|
||||
@Excel(name = "已付款含税金额")
|
||||
private BigDecimal paidWithTax;
|
||||
|
||||
/** 已付款未税金额 */
|
||||
@Excel(name = "已付款未税金额")
|
||||
private BigDecimal paidWithoutTax;
|
||||
|
||||
/** 已付款税额 */
|
||||
@Excel(name = "已付款税额")
|
||||
private BigDecimal paidTax;
|
||||
|
||||
/** 付款中含税金额 */
|
||||
@Excel(name = "付款中含税金额")
|
||||
private BigDecimal payingWithTax;
|
||||
|
||||
/** 付款中未税金额 */
|
||||
@Excel(name = "付款中未税金额")
|
||||
private BigDecimal payingWithoutTax;
|
||||
|
||||
/** 付款中税额 */
|
||||
@Excel(name = "付款中税额")
|
||||
private BigDecimal payingTax;
|
||||
|
||||
/** 未付款含税金额 */
|
||||
@Excel(name = "未付款含税金额")
|
||||
private BigDecimal unpaidWithTax;
|
||||
|
||||
/** 未付款未税金额 */
|
||||
@Excel(name = "未付款未税金额")
|
||||
private BigDecimal unpaidWithoutTax;
|
||||
|
||||
/** 未付款税额 */
|
||||
@Excel(name = "未付款税额")
|
||||
private BigDecimal unpaidTax;
|
||||
|
||||
/** 收票状态 */
|
||||
@Excel(name = "收票状态")
|
||||
private String ticketStatus;
|
||||
|
||||
/** 已收票含税金额 */
|
||||
@Excel(name = "已收票含税金额")
|
||||
private BigDecimal ticketedWithTax;
|
||||
|
||||
/** 已收票未税金额 */
|
||||
@Excel(name = "已收票未税金额")
|
||||
private BigDecimal ticketedWithoutTax;
|
||||
|
||||
/** 已收票税额 */
|
||||
@Excel(name = "已收票税额")
|
||||
private BigDecimal ticketedTax;
|
||||
|
||||
/** 收票中含税金额 */
|
||||
@Excel(name = "收票中含税金额")
|
||||
private BigDecimal ticketingWithTax;
|
||||
|
||||
/** 收票中未税金额 */
|
||||
@Excel(name = "收票中未税金额")
|
||||
private BigDecimal ticketingWithoutTax;
|
||||
|
||||
/** 收票中税额 */
|
||||
@Excel(name = "收票中税额")
|
||||
private BigDecimal ticketingTax;
|
||||
|
||||
/** 未收票含税金额 */
|
||||
@Excel(name = "未收票含税金额")
|
||||
private BigDecimal unticketedWithTax;
|
||||
|
||||
/** 未收票未税金额 */
|
||||
@Excel(name = "未收票未税金额")
|
||||
private BigDecimal unticketedWithoutTax;
|
||||
|
||||
/** 未收票税额 */
|
||||
@Excel(name = "未收票税额")
|
||||
private BigDecimal unticketedTax;
|
||||
|
||||
/** 数据快照日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
@Excel(name = "数据快照日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date dataDate;
|
||||
|
||||
@Getter
|
||||
public enum StatusEnum {
|
||||
|
||||
/** 已红冲 */
|
||||
ALL("all", "全部"),
|
||||
/** 未开票 */
|
||||
PART("part", "部分"),
|
||||
/** 已开票 */
|
||||
NONE("wait", "未"),
|
||||
|
||||
|
||||
;
|
||||
private final String code;
|
||||
private final String desc;
|
||||
StatusEnum(String code, String desc) {
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -50,7 +50,6 @@ public class OmsPayableBill extends BaseEntity
|
|||
/** 合同编号 */
|
||||
@Excel(name = "合同编号")
|
||||
private String orderCode;
|
||||
private List<String> orderCodeList;
|
||||
|
||||
/** 入库/出库单号 */
|
||||
@Excel(name = "入库/出库单号")
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ public class OmsPayablePaymentDetail extends BaseEntity {
|
|||
|
||||
private Date actualPaymentTime;
|
||||
private String paymentStatus;
|
||||
private String orderCode;
|
||||
/** 回执单附件ID */
|
||||
private OmsFinAttachment finAttachment;
|
||||
@Getter
|
||||
|
|
|
|||
|
|
@ -44,7 +44,6 @@ public class OmsReceivableBill extends BaseEntity
|
|||
/** 合同编号 */
|
||||
@Excel(name = "合同编号")
|
||||
private String orderCode;
|
||||
private List<String> orderCodeList;
|
||||
|
||||
/** 出库/入库单号 */
|
||||
@Excel(name = "出库/入库单号")
|
||||
|
|
|
|||
|
|
@ -1,71 +0,0 @@
|
|||
package com.ruoyi.sip.mapper;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import com.ruoyi.sip.domain.OmsFinanceOperateReport;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 财务模块报Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-04
|
||||
*/
|
||||
public interface OmsFinanceOperateReportMapper
|
||||
{
|
||||
/**
|
||||
* 查询财务模块报
|
||||
*
|
||||
* @param id 财务模块报主键
|
||||
* @return 财务模块报
|
||||
*/
|
||||
public OmsFinanceOperateReport selectOmsFinanceOperateReportById(Long id);
|
||||
|
||||
/**
|
||||
* 查询财务模块报列表
|
||||
*
|
||||
* @param omsFinanceOperateReport 财务模块报
|
||||
* @return 财务模块报集合
|
||||
*/
|
||||
public List<OmsFinanceOperateReport> selectOmsFinanceOperateReportList(OmsFinanceOperateReport omsFinanceOperateReport);
|
||||
|
||||
/**
|
||||
* 新增财务模块报
|
||||
*
|
||||
* @param omsFinanceOperateReport 财务模块报
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOmsFinanceOperateReport(OmsFinanceOperateReport omsFinanceOperateReport);
|
||||
|
||||
/**
|
||||
* 修改财务模块报
|
||||
*
|
||||
* @param omsFinanceOperateReport 财务模块报
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOmsFinanceOperateReport(OmsFinanceOperateReport omsFinanceOperateReport);
|
||||
|
||||
/**
|
||||
* 删除财务模块报
|
||||
*
|
||||
* @param id 财务模块报主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOmsFinanceOperateReportById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除财务模块报
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOmsFinanceOperateReportByIds(String[] ids);
|
||||
|
||||
Date maxDataDate();
|
||||
|
||||
|
||||
void saveBatch(List<OmsFinanceOperateReport> omsFinanceOperateReports);
|
||||
void saveHistoryBatch(List<OmsFinanceOperateReport> omsFinanceOperateReports);
|
||||
|
||||
void syncDetailBatch(@Param("date") Date date);
|
||||
}
|
||||
|
|
@ -1,9 +1,7 @@
|
|||
package com.ruoyi.sip.mapper;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import com.ruoyi.sip.domain.OmsPayableBill;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 采购应付单Mapper接口
|
||||
|
|
@ -77,6 +75,4 @@ public interface OmsPayableBillMapper
|
|||
|
||||
void deleteByInventoryCode(List<String> inventoryCodeList);
|
||||
|
||||
List<OmsPayableBill> listPayable(OmsPayableBill payableBill);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import com.ruoyi.sip.domain.OmsPayablePaymentDetail;
|
|||
import com.ruoyi.sip.domain.dto.PaymentBillPayableDetailDTO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public interface OmsPayablePaymentDetailMapper {
|
||||
|
|
@ -26,5 +25,4 @@ public interface OmsPayablePaymentDetailMapper {
|
|||
|
||||
void deleteByPaymentCode(String payableBillCode);
|
||||
|
||||
List<OmsPayablePaymentDetail> listByPaymentUpdateTime(Date startTime, Date endTime);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,7 +76,4 @@ public interface OmsReceivableBillMapper
|
|||
int updateBatchReceivableBillInvoiceInfo(List<OmsReceivableBill> receivableBills);
|
||||
|
||||
int updateBatchReceivableBillReceiptInfo(List<OmsReceivableBill> receivableBills);
|
||||
|
||||
List<OmsReceivableBill> listReceivableBill(OmsReceivableBill queryUpdateAllReceivableBill);
|
||||
|
||||
}
|
||||
|
|
@ -1,66 +0,0 @@
|
|||
package com.ruoyi.sip.service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import com.ruoyi.sip.domain.OmsFinanceOperateReport;
|
||||
|
||||
/**
|
||||
* 财务模块报Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-04
|
||||
*/
|
||||
public interface IOmsFinanceOperateReportService
|
||||
{
|
||||
/**
|
||||
* 查询财务模块报
|
||||
*
|
||||
* @param id 财务模块报主键
|
||||
* @return 财务模块报
|
||||
*/
|
||||
public OmsFinanceOperateReport selectOmsFinanceOperateReportById(Long id);
|
||||
|
||||
/**
|
||||
* 查询财务模块报列表
|
||||
*
|
||||
* @param omsFinanceOperateReport 财务模块报
|
||||
* @return 财务模块报集合
|
||||
*/
|
||||
public List<OmsFinanceOperateReport> selectOmsFinanceOperateReportList(OmsFinanceOperateReport omsFinanceOperateReport);
|
||||
|
||||
/**
|
||||
* 新增财务模块报
|
||||
*
|
||||
* @param omsFinanceOperateReport 财务模块报
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOmsFinanceOperateReport(OmsFinanceOperateReport omsFinanceOperateReport);
|
||||
|
||||
/**
|
||||
* 修改财务模块报
|
||||
*
|
||||
* @param omsFinanceOperateReport 财务模块报
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOmsFinanceOperateReport(OmsFinanceOperateReport omsFinanceOperateReport);
|
||||
|
||||
/**
|
||||
* 批量删除财务模块报
|
||||
*
|
||||
* @param ids 需要删除的财务模块报主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOmsFinanceOperateReportByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除财务模块报信息
|
||||
*
|
||||
* @param id 财务模块报主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOmsFinanceOperateReportById(Long id);
|
||||
|
||||
public void statisticsReport();
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
package com.ruoyi.sip.service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import com.ruoyi.sip.domain.OmsPayableBill;
|
||||
|
||||
|
|
@ -88,5 +87,4 @@ public interface IOmsPayableBillService
|
|||
|
||||
void deleteByInventoryCode(List<String> collect);
|
||||
|
||||
List<OmsPayableBill> listPayable(OmsPayableBill payableBill);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package com.ruoyi.sip.service;
|
|||
import com.ruoyi.sip.domain.OmsPayablePaymentDetail;
|
||||
import com.ruoyi.sip.domain.dto.PaymentBillPayableDetailDTO;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
public interface IOmsPayablePaymentDetailService {
|
||||
|
|
@ -30,7 +29,6 @@ public interface IOmsPayablePaymentDetailService {
|
|||
|
||||
void deleteByPaymentCode(String payableBillCode);
|
||||
|
||||
List<OmsPayablePaymentDetail> listByPaymentUpdateTime(Date startTime, Date endTime);
|
||||
|
||||
|
||||
// List<OmsPayableWriteOffDetail> listWriteOffByPaymentCode(List<String> );
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package com.ruoyi.sip.service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
|
|
|
|||
|
|
@ -76,7 +76,4 @@ public interface IOmsReceivableBillService
|
|||
public int updateInvoiceAmount(List<Long> idList);
|
||||
|
||||
int mergeAndInitiateInvoice(MergedReceviableInvoiceDataDto dto);
|
||||
|
||||
List<OmsReceivableBill> listReceivableBill(OmsReceivableBill queryUpdateAllReceivableBill);
|
||||
|
||||
}
|
||||
|
|
@ -65,6 +65,7 @@ public class OmsFinanceChargeServiceImpl implements IOmsFinanceChargeService {
|
|||
*/
|
||||
@Override
|
||||
public List<OmsFinanceCharge> selectOmsFinanceChargeList(OmsFinanceCharge omsFinanceCharge) {
|
||||
omsFinanceCharge.setChargeStatus(OmsFinanceCharge.ChargeStatusEnum.COMPLETE_CHARGE.getCode());
|
||||
return omsFinanceChargeMapper.selectOmsFinanceChargeList(omsFinanceCharge);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,579 +0,0 @@
|
|||
package com.ruoyi.sip.service.impl;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.sip.domain.*;
|
||||
import com.ruoyi.sip.service.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.sip.mapper.OmsFinanceOperateReportMapper;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 财务模块报Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-04
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class OmsFinanceOperateReportServiceImpl implements IOmsFinanceOperateReportService {
|
||||
@Resource
|
||||
private OmsFinanceOperateReportMapper omsFinanceOperateReportMapper;
|
||||
|
||||
@Autowired
|
||||
private IOmsPayableBillService payableBillService;
|
||||
@Autowired
|
||||
private IOmsPayablePaymentDetailService paymentDetailService;
|
||||
@Autowired
|
||||
private IOmsPayableTicketDetailService ticketDetailService;
|
||||
|
||||
@Autowired
|
||||
private IOmsReceivableBillService receivableBillService;
|
||||
@Autowired
|
||||
private IOmsReceivableReceiptDetailService receiptDetailService;
|
||||
@Autowired
|
||||
private IOmsReceivableInvoiceDetailService invoiceDetailService;
|
||||
|
||||
@Autowired
|
||||
private IOmsFinanceChargeService chargeService;
|
||||
|
||||
/**
|
||||
* 查询财务模块报
|
||||
*
|
||||
* @param id 财务模块报主键
|
||||
* @return 财务模块报
|
||||
*/
|
||||
@Override
|
||||
public OmsFinanceOperateReport selectOmsFinanceOperateReportById(Long id) {
|
||||
return omsFinanceOperateReportMapper.selectOmsFinanceOperateReportById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询财务模块报列表
|
||||
*
|
||||
* @param omsFinanceOperateReport 财务模块报
|
||||
* @return 财务模块报
|
||||
*/
|
||||
@Override
|
||||
public List<OmsFinanceOperateReport> selectOmsFinanceOperateReportList(OmsFinanceOperateReport omsFinanceOperateReport) {
|
||||
return omsFinanceOperateReportMapper.selectOmsFinanceOperateReportList(omsFinanceOperateReport);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增财务模块报
|
||||
*
|
||||
* @param omsFinanceOperateReport 财务模块报
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertOmsFinanceOperateReport(OmsFinanceOperateReport omsFinanceOperateReport) {
|
||||
omsFinanceOperateReport.setCreateTime(DateUtils.getNowDate());
|
||||
return omsFinanceOperateReportMapper.insertOmsFinanceOperateReport(omsFinanceOperateReport);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改财务模块报
|
||||
*
|
||||
* @param omsFinanceOperateReport 财务模块报
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateOmsFinanceOperateReport(OmsFinanceOperateReport omsFinanceOperateReport) {
|
||||
omsFinanceOperateReport.setUpdateTime(DateUtils.getNowDate());
|
||||
return omsFinanceOperateReportMapper.updateOmsFinanceOperateReport(omsFinanceOperateReport);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除财务模块报
|
||||
*
|
||||
* @param ids 需要删除的财务模块报主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOmsFinanceOperateReportByIds(String ids) {
|
||||
return omsFinanceOperateReportMapper.deleteOmsFinanceOperateReportByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除财务模块报信息
|
||||
*
|
||||
* @param id 财务模块报主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOmsFinanceOperateReportById(Long id) {
|
||||
return omsFinanceOperateReportMapper.deleteOmsFinanceOperateReportById(id);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void statisticsReport() {
|
||||
Date date = omsFinanceOperateReportMapper.maxDataDate();
|
||||
Map<String, OmsFinanceOperateReport> payableUpdateMap = new HashMap<>();
|
||||
//查询有变化的orderCode 然后查询 付款 收票相关数据 然后计算金额再更新
|
||||
//查询有变化的应付单 如果付款或收票状态变化会更新应付单的时间--->更新收票或付款金额
|
||||
OmsPayableBill queryUpdateAllPayableBill = new OmsPayableBill();
|
||||
queryUpdateAllPayableBill.setParams(new HashMap<String, Object>(2) {{
|
||||
put("startUpdateTime", date);
|
||||
}});
|
||||
List<OmsPayableBill> omsPayableBills = payableBillService.listPayable(queryUpdateAllPayableBill);
|
||||
if (CollUtil.isNotEmpty(omsPayableBills)) {
|
||||
//根据订单查询所有应付单数据
|
||||
OmsPayableBill queryPayableBill = new OmsPayableBill();
|
||||
queryPayableBill.setOrderCodeList(omsPayableBills.stream().map(OmsPayableBill::getOrderCode).filter(Objects::nonNull).collect(Collectors.toList()));
|
||||
List<OmsPayableBill> allUpdatePayableBills = payableBillService.listPayable(queryPayableBill);
|
||||
Map<Long, String> payableIdOrderCodeMap = allUpdatePayableBills.stream().collect(Collectors.toMap(OmsPayableBill::getId, OmsPayableBill::getOrderCode, (v1, v2) -> v1));
|
||||
|
||||
//根据应付单变化计算 应付相关金额
|
||||
for (OmsPayableBill omsPayableBill : allUpdatePayableBills) {
|
||||
OmsFinanceOperateReport omsFinanceOperateReport = payableUpdateMap.get(omsPayableBill.getOrderCode());
|
||||
if (omsFinanceOperateReport == null) {
|
||||
omsFinanceOperateReport = new OmsFinanceOperateReport();
|
||||
initReport(omsPayableBill.getOrderCode(), "payable", omsFinanceOperateReport);
|
||||
payableUpdateMap.put(omsPayableBill.getOrderCode(), omsFinanceOperateReport);
|
||||
}
|
||||
//含税金额
|
||||
BigDecimal payableWithTax = Optional.ofNullable(omsFinanceOperateReport.getPayableWithTax()).orElse(BigDecimal.ZERO);
|
||||
omsFinanceOperateReport.setPayableWithTax(payableWithTax.add(omsPayableBill.getTotalPriceWithTax()));
|
||||
//未税金额
|
||||
BigDecimal payableWithoutTax = Optional.ofNullable(omsFinanceOperateReport.getPayableWithoutTax()).orElse(BigDecimal.ZERO);
|
||||
omsFinanceOperateReport.setPayableWithoutTax(payableWithoutTax.add(omsPayableBill.getTotalPriceWithoutTax()));
|
||||
//税额
|
||||
BigDecimal taxAmount = Optional.ofNullable(omsFinanceOperateReport.getPayableTax()).orElse(BigDecimal.ZERO);
|
||||
omsFinanceOperateReport.setPayableTax(taxAmount.add(omsPayableBill.getTaxAmount()));
|
||||
}
|
||||
//查询收款相关金额 进行计算
|
||||
List<OmsPayablePaymentDetail> omsPayablePaymentDetails = paymentDetailService.listByPayableBillIdList(new ArrayList<>(payableIdOrderCodeMap.keySet()));
|
||||
for (OmsPayablePaymentDetail omsPayablePaymentDetail : omsPayablePaymentDetails) {
|
||||
OmsFinanceOperateReport omsFinanceOperateReport = payableUpdateMap.get(payableIdOrderCodeMap.get(omsPayablePaymentDetail.getPayableBillId()));
|
||||
calculatePayment(omsPayablePaymentDetail, omsFinanceOperateReport);
|
||||
|
||||
}
|
||||
// 查询收票相关金额进行计算
|
||||
List<OmsPayableTicketDetail> omsPayableTicketDetails = ticketDetailService.listByPayableBillIdList(new ArrayList<>(payableIdOrderCodeMap.keySet()));
|
||||
for (OmsPayableTicketDetail omsPayableTicketDetail : omsPayableTicketDetails) {
|
||||
OmsFinanceOperateReport omsFinanceOperateReport = payableUpdateMap.get(payableIdOrderCodeMap.get(omsPayableTicketDetail.getPayableBillId()));
|
||||
calculateTicket(omsPayableTicketDetail, omsFinanceOperateReport);
|
||||
}
|
||||
|
||||
for (OmsFinanceOperateReport report : payableUpdateMap.values()) {
|
||||
//收票
|
||||
report.setUnticketedWithTax(report.getPayableWithTax()
|
||||
.subtract(Optional.ofNullable(report.getTicketedWithTax()).orElse(BigDecimal.ZERO))
|
||||
.subtract(Optional.ofNullable(report.getTicketingWithTax()).orElse(BigDecimal.ZERO)));
|
||||
report.setUnticketedWithoutTax(report.getPayableWithoutTax()
|
||||
.subtract(Optional.ofNullable(report.getTicketedWithoutTax()).orElse(BigDecimal.ZERO))
|
||||
.subtract(Optional.ofNullable(report.getTicketingWithoutTax()).orElse(BigDecimal.ZERO)));
|
||||
report.setUnticketedTax(report.getPayableTax()
|
||||
.subtract(Optional.ofNullable(report.getTicketedTax()).orElse(BigDecimal.ZERO))
|
||||
.subtract(Optional.ofNullable(report.getTicketingTax()).orElse(BigDecimal.ZERO)));
|
||||
//付款
|
||||
report.setUnpaidWithTax(report.getPayableWithTax()
|
||||
.subtract(Optional.ofNullable(report.getPaidWithTax()).orElse(BigDecimal.ZERO))
|
||||
.subtract(Optional.ofNullable(report.getPayingWithTax()).orElse(BigDecimal.ZERO)));
|
||||
report.setUnpaidWithoutTax(report.getPayableWithoutTax()
|
||||
.subtract(Optional.ofNullable(report.getPaidWithoutTax()).orElse(BigDecimal.ZERO))
|
||||
.subtract(Optional.ofNullable(report.getPayingWithoutTax()).orElse(BigDecimal.ZERO)));
|
||||
report.setUnpaidTax(report.getPayableTax()
|
||||
.subtract(Optional.ofNullable(report.getPaidTax()).orElse(BigDecimal.ZERO))
|
||||
.subtract(Optional.ofNullable(report.getPayingTax()).orElse(BigDecimal.ZERO)));
|
||||
if (report.getPayableWithTax() != null && report.getPaidWithTax() != null && report.getUnpaidWithTax() != null) {
|
||||
report.setPaymentStatus(report.getPayableWithTax().compareTo(report.getPaidWithTax()) == 0 ? OmsFinanceOperateReport.StatusEnum.ALL.getCode()
|
||||
: report.getPayableWithTax().compareTo(report.getUnpaidWithTax()) == 0 ? OmsFinanceOperateReport.StatusEnum.NONE.getCode() : OmsFinanceOperateReport.StatusEnum.PART.getCode());
|
||||
|
||||
}
|
||||
if (report.getPayableWithTax() != null && report.getTicketedWithTax() != null && report.getUnticketedWithTax() != null) {
|
||||
report.setTicketStatus(report.getPayableWithTax().compareTo(report.getTicketedWithTax()) == 0 ? OmsFinanceOperateReport.StatusEnum.ALL.getCode()
|
||||
: report.getPayableWithTax().compareTo(report.getUnticketedWithTax()) == 0 ? OmsFinanceOperateReport.StatusEnum.NONE.getCode() : OmsFinanceOperateReport.StatusEnum.PART.getCode());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//查询有变化的orderCode 然后查询 付款 收票相关数据 然后计算金额再更新
|
||||
//查询有变化的应付单 如果付款或收票状态变化会更新应付单的时间--->更新收票或付款金额
|
||||
OmsReceivableBill queryUpdateAllReceivableBill = new OmsReceivableBill();
|
||||
queryUpdateAllReceivableBill.setParams(new HashMap<String, Object>(2) {{
|
||||
put("startUpdateTime", date);
|
||||
}});
|
||||
List<OmsReceivableBill> receivableBills = receivableBillService.listReceivableBill(queryUpdateAllReceivableBill);
|
||||
Map<String, OmsFinanceOperateReport> receivableUpdateMap = new HashMap<>();
|
||||
if (CollUtil.isNotEmpty(receivableBills)) {
|
||||
//根据订单查询所有应付单数据
|
||||
OmsReceivableBill queryReceivableBill = new OmsReceivableBill();
|
||||
queryReceivableBill.setOrderCodeList(omsPayableBills.stream().map(OmsPayableBill::getOrderCode).filter(Objects::nonNull).collect(Collectors.toList()));
|
||||
List<OmsReceivableBill> allUpdatePayableBills = receivableBillService.listReceivableBill(queryReceivableBill);
|
||||
Map<Long, String> payableIdOrderCodeMap = allUpdatePayableBills.stream().collect(Collectors.toMap(OmsReceivableBill::getId, OmsReceivableBill::getOrderCode, (v1, v2) -> v1));
|
||||
if (CollUtil.isNotEmpty(allUpdatePayableBills)) {
|
||||
//计算应收
|
||||
for (OmsReceivableBill omsReceivableBill : allUpdatePayableBills) {
|
||||
OmsFinanceOperateReport omsFinanceOperateReport = receivableUpdateMap.get(omsReceivableBill.getOrderCode());
|
||||
if (omsFinanceOperateReport == null) {
|
||||
omsFinanceOperateReport = new OmsFinanceOperateReport();
|
||||
initReport(omsReceivableBill.getOrderCode(), "receivable", omsFinanceOperateReport);
|
||||
receivableUpdateMap.put(omsReceivableBill.getOrderCode(), omsFinanceOperateReport);
|
||||
}
|
||||
//含税金额
|
||||
BigDecimal receivableWithTax = Optional.ofNullable(omsFinanceOperateReport.getReceivableWithTax()).orElse(BigDecimal.ZERO);
|
||||
omsFinanceOperateReport.setReceivableWithTax(receivableWithTax.add(omsReceivableBill.getTotalPriceWithTax()));
|
||||
//未税金额
|
||||
BigDecimal receivableWithoutTax = Optional.ofNullable(omsFinanceOperateReport.getReceivableWithoutTax()).orElse(BigDecimal.ZERO);
|
||||
omsFinanceOperateReport.setReceivableWithoutTax(receivableWithoutTax.add(omsReceivableBill.getTotalPriceWithoutTax()));
|
||||
//税额
|
||||
BigDecimal taxAmount = Optional.ofNullable(omsFinanceOperateReport.getReceivableTax()).orElse(BigDecimal.ZERO);
|
||||
omsFinanceOperateReport.setReceivableTax(taxAmount.add(omsReceivableBill.getTaxAmount()));
|
||||
}
|
||||
//收款
|
||||
List<OmsReceivableReceiptDetail> omsReceivableReceiptDetailList = receiptDetailService.listByReceivableBillIdList(new ArrayList<>(payableIdOrderCodeMap.keySet()));
|
||||
for (OmsReceivableReceiptDetail omsReceivableReceiptDetail : omsReceivableReceiptDetailList) {
|
||||
OmsFinanceOperateReport omsFinanceOperateReport = receivableUpdateMap.get(payableIdOrderCodeMap.get(omsReceivableReceiptDetail.getReceivableBillId()));
|
||||
calculateReceipt(omsReceivableReceiptDetail, omsFinanceOperateReport);
|
||||
}
|
||||
|
||||
|
||||
//收票
|
||||
List<OmsReceivableInvoiceDetail> omsReceivableInvoiceDetails = invoiceDetailService.listByReceivableBillIdList(new ArrayList<>(payableIdOrderCodeMap.keySet()));
|
||||
for (OmsReceivableInvoiceDetail omsReceivableInvoiceDetail : omsReceivableInvoiceDetails) {
|
||||
OmsFinanceOperateReport omsFinanceOperateReport = receivableUpdateMap.get(payableIdOrderCodeMap.get(omsReceivableInvoiceDetail.getReceivableBillId()));
|
||||
calculateInvoice(omsReceivableInvoiceDetail, omsFinanceOperateReport);
|
||||
}
|
||||
for (OmsFinanceOperateReport report : receivableUpdateMap.values()) {
|
||||
//开票
|
||||
report.setUninvoicedTax(report.getReceivableTax()
|
||||
.subtract(Optional.ofNullable(report.getInvoicedTax()).orElse(BigDecimal.ZERO))
|
||||
.subtract(Optional.ofNullable(report.getTicketingTax()).orElse(BigDecimal.ZERO)));
|
||||
report.setUninvoicedWithTax(report.getReceivableWithTax()
|
||||
.subtract(Optional.ofNullable(report.getInvoicedWithTax()).orElse(BigDecimal.ZERO))
|
||||
.subtract(Optional.ofNullable(report.getTicketingWithTax()).orElse(BigDecimal.ZERO)));
|
||||
report.setUninvoicedWithoutTax(report.getReceivableWithoutTax()
|
||||
.subtract(Optional.ofNullable(report.getInvoicedWithoutTax()).orElse(BigDecimal.ZERO))
|
||||
.subtract(Optional.ofNullable(report.getTicketingWithoutTax()).orElse(BigDecimal.ZERO)));
|
||||
//收款
|
||||
report.setUnreceivedWithTax(report.getReceivableWithTax()
|
||||
.subtract(Optional.ofNullable(report.getReceivedWithTax()).orElse(BigDecimal.ZERO))
|
||||
.subtract(Optional.ofNullable(report.getReceivingWithTax()).orElse(BigDecimal.ZERO)));
|
||||
report.setUnreceivedWithoutTax(report.getReceivableWithoutTax()
|
||||
.subtract(Optional.ofNullable(report.getReceivedWithoutTax()).orElse(BigDecimal.ZERO))
|
||||
.subtract(Optional.ofNullable(report.getReceivingWithoutTax()).orElse(BigDecimal.ZERO)));
|
||||
report.setUnreceivedTax(report.getReceivableTax()
|
||||
.subtract(Optional.ofNullable(report.getReceivedTax()).orElse(BigDecimal.ZERO))
|
||||
.subtract(Optional.ofNullable(report.getReceivingTax()).orElse(BigDecimal.ZERO)));
|
||||
if (report.getReceivableWithTax() != null && report.getReceivedWithTax() != null && report.getUnreceivedWithTax() != null) {
|
||||
report.setReceiptStatus(report.getReceivableWithTax().compareTo(report.getReceivedWithTax()) == 0 ? OmsFinanceOperateReport.StatusEnum.ALL.getCode()
|
||||
: report.getReceivableWithTax().compareTo(report.getUnreceivedWithTax()) == 0 ? OmsFinanceOperateReport.StatusEnum.NONE.getCode() : OmsFinanceOperateReport.StatusEnum.PART.getCode());
|
||||
}
|
||||
if (report.getReceivableWithTax() != null && report.getInvoicedWithTax() != null && report.getUninvoicedWithTax() != null) {
|
||||
report.setInvoiceStatus(report.getReceivableWithTax().compareTo(report.getInvoicedWithTax()) == 0 ? OmsFinanceOperateReport.StatusEnum.ALL.getCode()
|
||||
: report.getReceivableWithTax().compareTo(report.getUninvoicedWithTax()) == 0 ? OmsFinanceOperateReport.StatusEnum.NONE.getCode() : OmsFinanceOperateReport.StatusEnum.PART.getCode());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
//金额计算完毕后 计算应收
|
||||
OmsFinanceCharge queryUpdateCharge = new OmsFinanceCharge();
|
||||
queryUpdateCharge.setParams(new HashMap<String, Object>(2) {{
|
||||
put("startUpdateTime", date);
|
||||
}});
|
||||
|
||||
List<OmsFinanceCharge> omsFinanceCharges = chargeService.selectOmsFinanceChargeList(queryUpdateCharge);
|
||||
Map<String, OmsFinanceOperateReport> chargeUpdateMap = new HashMap<>();
|
||||
if (CollUtil.isNotEmpty(omsFinanceCharges)) {
|
||||
for (OmsFinanceCharge omsFinanceCharge : omsFinanceCharges) {
|
||||
OmsFinanceOperateReport omsFinanceOperateReport = chargeUpdateMap.get(omsFinanceCharge.getOrderCode());
|
||||
if (omsFinanceOperateReport == null) {
|
||||
omsFinanceOperateReport = new OmsFinanceOperateReport();
|
||||
chargeUpdateMap.put(omsFinanceCharge.getOrderCode(), omsFinanceOperateReport);
|
||||
}
|
||||
omsFinanceOperateReport.setChargeStatus(omsFinanceCharge.getChargeStatus());
|
||||
omsFinanceOperateReport.setChargedWithoutTax(omsFinanceCharge.getIncomeWithoutTaxTotal());
|
||||
omsFinanceOperateReport.setGrossProfit(omsFinanceCharge.getGrossProfit());
|
||||
omsFinanceOperateReport.setGrossProfitRate(omsFinanceCharge.getGrossProfitRate());
|
||||
omsFinanceOperateReport.setBizChargeDate(omsFinanceCharge.getBizChargeDate());
|
||||
omsFinanceOperateReport.setFinanceChargeDate(omsFinanceCharge.getFinanceChargeDate());
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, OmsFinanceOperateReport> resultMap = new HashMap<>(payableUpdateMap);
|
||||
for (Map.Entry<String, OmsFinanceOperateReport> entry : receivableUpdateMap.entrySet()) {
|
||||
resultMap.compute(entry.getKey(), (key, value) -> {
|
||||
if (value == null) {
|
||||
return entry.getValue();
|
||||
}
|
||||
value.setReceivableWithTax(Optional.ofNullable(entry.getValue().getReceivableWithTax()).orElse(BigDecimal.ZERO));
|
||||
value.setReceivableWithoutTax(Optional.ofNullable(entry.getValue().getReceivableWithoutTax()).orElse(BigDecimal.ZERO));
|
||||
value.setReceivableTax(Optional.ofNullable(entry.getValue().getReceivableTax()).orElse(BigDecimal.ZERO));
|
||||
|
||||
|
||||
value.setReceiptStatus(entry.getValue().getReceiptStatus());
|
||||
value.setReceivedWithTax(Optional.ofNullable(entry.getValue().getReceivedWithTax()).orElse(BigDecimal.ZERO));
|
||||
value.setReceivedWithoutTax(Optional.ofNullable(entry.getValue().getReceivedWithoutTax()).orElse(BigDecimal.ZERO));
|
||||
value.setReceivedTax(Optional.ofNullable(entry.getValue().getReceivedTax()).orElse(BigDecimal.ZERO));
|
||||
|
||||
value.setReceivingWithTax(Optional.ofNullable(entry.getValue().getReceivingWithTax()).orElse(BigDecimal.ZERO));
|
||||
value.setReceivingWithoutTax(Optional.ofNullable(entry.getValue().getReceivingWithoutTax()).orElse(BigDecimal.ZERO));
|
||||
value.setReceivingTax(Optional.ofNullable(entry.getValue().getReceivingTax()).orElse(BigDecimal.ZERO));
|
||||
|
||||
value.setUnreceivedTax(Optional.ofNullable(entry.getValue().getUnreceivedTax()).orElse(BigDecimal.ZERO));
|
||||
value.setUnreceivedWithoutTax(Optional.ofNullable(entry.getValue().getUnreceivedWithoutTax()).orElse(BigDecimal.ZERO));
|
||||
value.setUnreceivedWithTax(Optional.ofNullable(entry.getValue().getUnreceivedWithTax()).orElse(BigDecimal.ZERO));
|
||||
|
||||
|
||||
value.setInvoiceStatus(entry.getValue().getInvoiceStatus());
|
||||
value.setInvoicedWithTax(Optional.ofNullable(entry.getValue().getInvoicedWithTax()).orElse(BigDecimal.ZERO));
|
||||
value.setInvoicedWithoutTax(Optional.ofNullable(entry.getValue().getInvoicedWithoutTax()).orElse(BigDecimal.ZERO));
|
||||
value.setInvoicedTax(Optional.ofNullable(entry.getValue().getInvoicedTax()).orElse(BigDecimal.ZERO));
|
||||
|
||||
value.setInvoicingWithoutTax(Optional.ofNullable(entry.getValue().getInvoicingWithoutTax()).orElse(BigDecimal.ZERO));
|
||||
value.setInvoicingTax(Optional.ofNullable(entry.getValue().getInvoicingTax()).orElse(BigDecimal.ZERO));
|
||||
value.setInvoicingWithTax(Optional.ofNullable(entry.getValue().getInvoicingWithTax()).orElse(BigDecimal.ZERO));
|
||||
value.setUninvoicedWithoutTax(Optional.ofNullable(entry.getValue().getUninvoicedWithoutTax()).orElse(BigDecimal.ZERO));
|
||||
value.setUninvoicedWithTax(Optional.ofNullable(entry.getValue().getUninvoicedWithTax()).orElse(BigDecimal.ZERO));
|
||||
value.setUninvoicedTax(Optional.ofNullable(entry.getValue().getUninvoicedTax()).orElse(BigDecimal.ZERO));
|
||||
return value;
|
||||
});
|
||||
}
|
||||
for (Map.Entry<String, OmsFinanceOperateReport> entry : chargeUpdateMap.entrySet()) {
|
||||
resultMap.compute(entry.getKey(), (key, value) -> {
|
||||
if (value == null) {
|
||||
return entry.getValue();
|
||||
}
|
||||
value.setChargeStatus(entry.getValue().getChargeStatus());
|
||||
value.setChargedWithoutTax(entry.getValue().getChargedWithoutTax());
|
||||
value.setGrossProfit(entry.getValue().getGrossProfit());
|
||||
value.setGrossProfitRate(entry.getValue().getGrossProfitRate());
|
||||
value.setBizChargeDate(entry.getValue().getBizChargeDate());
|
||||
value.setFinanceChargeDate(entry.getValue().getFinanceChargeDate());
|
||||
return value;
|
||||
});
|
||||
}
|
||||
|
||||
if (CollUtil.isNotEmpty(resultMap.values())) {
|
||||
omsFinanceOperateReportMapper.saveHistoryBatch(new ArrayList<>(resultMap.values()));
|
||||
omsFinanceOperateReportMapper.syncDetailBatch(date);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void initReport(String orderCode, String type, OmsFinanceOperateReport omsFinanceOperateReport) {
|
||||
omsFinanceOperateReport.setOrderCode(orderCode);
|
||||
omsFinanceOperateReport.setDataDate(DateUtils.getNowDate());
|
||||
if ("payable".equals(type)) {
|
||||
//已经初始化就无须再次初始化
|
||||
omsFinanceOperateReport.setPaidWithTax(Optional.ofNullable(omsFinanceOperateReport.getPaidWithTax()).orElse(BigDecimal.ZERO));
|
||||
omsFinanceOperateReport.setPaidWithoutTax(Optional.ofNullable(omsFinanceOperateReport.getPaidWithoutTax()).orElse(BigDecimal.ZERO));
|
||||
omsFinanceOperateReport.setPaidTax(Optional.ofNullable(omsFinanceOperateReport.getPaidTax()).orElse(BigDecimal.ZERO));
|
||||
|
||||
omsFinanceOperateReport.setPayingWithTax(Optional.ofNullable(omsFinanceOperateReport.getPayingWithTax()).orElse(BigDecimal.ZERO));
|
||||
omsFinanceOperateReport.setPayingWithoutTax(Optional.ofNullable(omsFinanceOperateReport.getPayingWithoutTax()).orElse(BigDecimal.ZERO));
|
||||
omsFinanceOperateReport.setPayingTax(Optional.ofNullable(omsFinanceOperateReport.getPayingTax()).orElse(BigDecimal.ZERO));
|
||||
|
||||
omsFinanceOperateReport.setTicketingWithTax(Optional.ofNullable(omsFinanceOperateReport.getTicketingWithTax()).orElse(BigDecimal.ZERO));
|
||||
omsFinanceOperateReport.setTicketingWithoutTax(Optional.ofNullable(omsFinanceOperateReport.getTicketingWithoutTax()).orElse(BigDecimal.ZERO));
|
||||
omsFinanceOperateReport.setTicketingTax(Optional.ofNullable(omsFinanceOperateReport.getTicketingTax()).orElse(BigDecimal.ZERO));
|
||||
|
||||
omsFinanceOperateReport.setTicketedWithTax(Optional.ofNullable(omsFinanceOperateReport.getTicketedWithTax()).orElse(BigDecimal.ZERO));
|
||||
omsFinanceOperateReport.setTicketedWithoutTax(Optional.ofNullable(omsFinanceOperateReport.getTicketedWithoutTax()).orElse(BigDecimal.ZERO));
|
||||
omsFinanceOperateReport.setTicketedTax(Optional.ofNullable(omsFinanceOperateReport.getTicketedTax()).orElse(BigDecimal.ZERO));
|
||||
} else {
|
||||
omsFinanceOperateReport.setReceivedWithTax(Optional.ofNullable(omsFinanceOperateReport.getReceivedWithTax()).orElse(BigDecimal.ZERO));
|
||||
omsFinanceOperateReport.setReceivedWithoutTax(Optional.ofNullable(omsFinanceOperateReport.getReceivedWithoutTax()).orElse(BigDecimal.ZERO));
|
||||
omsFinanceOperateReport.setReceivedTax(Optional.ofNullable(omsFinanceOperateReport.getReceivedTax()).orElse(BigDecimal.ZERO));
|
||||
|
||||
omsFinanceOperateReport.setReceivingWithTax(Optional.ofNullable(omsFinanceOperateReport.getReceivingWithTax()).orElse(BigDecimal.ZERO));
|
||||
omsFinanceOperateReport.setReceivingWithoutTax(Optional.ofNullable(omsFinanceOperateReport.getReceivingWithoutTax()).orElse(BigDecimal.ZERO));
|
||||
omsFinanceOperateReport.setReceivingTax(Optional.ofNullable(omsFinanceOperateReport.getReceivingTax()).orElse(BigDecimal.ZERO));
|
||||
|
||||
omsFinanceOperateReport.setInvoicedWithTax(Optional.ofNullable(omsFinanceOperateReport.getInvoicedWithTax()).orElse(BigDecimal.ZERO));
|
||||
omsFinanceOperateReport.setInvoicedWithoutTax(Optional.ofNullable(omsFinanceOperateReport.getInvoicedWithoutTax()).orElse(BigDecimal.ZERO));
|
||||
omsFinanceOperateReport.setInvoicedTax(Optional.ofNullable(omsFinanceOperateReport.getInvoicedTax()).orElse(BigDecimal.ZERO));
|
||||
|
||||
omsFinanceOperateReport.setInvoicingWithoutTax(Optional.ofNullable(omsFinanceOperateReport.getInvoicingWithoutTax()).orElse(BigDecimal.ZERO));
|
||||
omsFinanceOperateReport.setInvoicingTax(Optional.ofNullable(omsFinanceOperateReport.getInvoicingTax()).orElse(BigDecimal.ZERO));
|
||||
omsFinanceOperateReport.setInvoicingWithTax(Optional.ofNullable(omsFinanceOperateReport.getInvoicingWithTax()).orElse(BigDecimal.ZERO));
|
||||
}
|
||||
}
|
||||
|
||||
private void calculateInvoice(OmsReceivableInvoiceDetail omsReceivableInvoiceDetail, OmsFinanceOperateReport omsFinanceOperateReport) {
|
||||
if (omsFinanceOperateReport == null) {
|
||||
throw new ServiceException("数据错误");
|
||||
}
|
||||
|
||||
|
||||
if (OmsInvoiceBill.InvoiceStatusEnum.WAIT_INVOICE.getCode().equals(omsReceivableInvoiceDetail.getInvoiceStatus())) {
|
||||
//收票中
|
||||
//含税
|
||||
BigDecimal invoicingWithTax = Optional.ofNullable(omsFinanceOperateReport.getInvoicingWithTax()).orElse(BigDecimal.ZERO);
|
||||
omsFinanceOperateReport.setInvoicingWithTax(invoicingWithTax.add(omsReceivableInvoiceDetail.getInvoiceAmount()));
|
||||
//未税
|
||||
BigDecimal invoicingWithoutTax = Optional.ofNullable(omsFinanceOperateReport.getInvoicingWithoutTax()).orElse(BigDecimal.ZERO);
|
||||
omsFinanceOperateReport.setInvoicingWithoutTax(invoicingWithoutTax.add(omsReceivableInvoiceDetail.getInvoiceAmount()));
|
||||
//税额
|
||||
BigDecimal invoicingTax = Optional.ofNullable(omsFinanceOperateReport.getInvoicingTax()).orElse(BigDecimal.ZERO);
|
||||
omsFinanceOperateReport.setInvoicingTax(invoicingTax.add(omsReceivableInvoiceDetail.getInvoiceAmountTax()));
|
||||
|
||||
} else if (
|
||||
OmsInvoiceBill.InvoiceStatusEnum.INVOICE.getCode().equals(omsReceivableInvoiceDetail.getInvoiceStatus()) ||
|
||||
OmsInvoiceBill.InvoiceStatusEnum.WAIT_RED_RUSH.getCode().equals(omsReceivableInvoiceDetail.getInvoiceStatus()) ||
|
||||
OmsInvoiceBill.InvoiceStatusEnum.RED_RUSH.getCode().equals(omsReceivableInvoiceDetail.getInvoiceStatus())
|
||||
) {
|
||||
//已收票
|
||||
//含税金额
|
||||
BigDecimal invoicedWithTax = Optional.ofNullable(omsFinanceOperateReport.getInvoicedWithTax()).orElse(BigDecimal.ZERO);
|
||||
if (omsReceivableInvoiceDetail.getInvoiceStatus().equals(OmsInvoiceBill.InvoiceStatusEnum.WAIT_RED_RUSH.getCode())) {
|
||||
invoicedWithTax = invoicedWithTax.abs();
|
||||
}
|
||||
omsFinanceOperateReport.setInvoicedWithTax(invoicedWithTax.add(omsReceivableInvoiceDetail.getInvoiceAmount()));
|
||||
|
||||
//未税金额
|
||||
BigDecimal invoicedWithoutTax = Optional.ofNullable(omsFinanceOperateReport.getInvoicedWithoutTax()).orElse(BigDecimal.ZERO);
|
||||
if (omsReceivableInvoiceDetail.getInvoiceStatus().equals(OmsInvoiceBill.InvoiceStatusEnum.WAIT_RED_RUSH.getCode())) {
|
||||
invoicedWithoutTax = invoicedWithoutTax.abs();
|
||||
}
|
||||
omsFinanceOperateReport.setInvoicedWithoutTax(invoicedWithoutTax.add(omsReceivableInvoiceDetail.getInvoiceAmount()));
|
||||
//税额
|
||||
BigDecimal invoicedTax = Optional.ofNullable(omsFinanceOperateReport.getInvoicedTax()).orElse(BigDecimal.ZERO);
|
||||
if (omsReceivableInvoiceDetail.getInvoiceStatus().equals(OmsInvoiceBill.InvoiceStatusEnum.WAIT_RED_RUSH.getCode())) {
|
||||
invoicedTax = invoicedTax.abs();
|
||||
}
|
||||
omsFinanceOperateReport.setInvoicedTax(invoicedTax.add(omsReceivableInvoiceDetail.getInvoiceAmountTax()));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void calculateReceipt(OmsReceivableReceiptDetail omsReceivableReceiptDetail, OmsFinanceOperateReport omsFinanceOperateReport) {
|
||||
if (omsFinanceOperateReport == null) {
|
||||
throw new ServiceException("数据错误");
|
||||
}
|
||||
|
||||
if (OmsReceiptBill.ReceiptStatusEnum.WAIT_PAYMENT.getCode().equals(omsReceivableReceiptDetail.getReceiptStatus())) {
|
||||
//收票中
|
||||
BigDecimal receivingWithTax = Optional.ofNullable(omsFinanceOperateReport.getReceivingTax()).orElse(BigDecimal.ZERO);
|
||||
omsFinanceOperateReport.setReceivingTax(receivingWithTax.add(omsReceivableReceiptDetail.getReceiptAmount()));
|
||||
BigDecimal receivingWithoutTax = Optional.ofNullable(omsFinanceOperateReport.getReceivingWithoutTax()).orElse(BigDecimal.ZERO);
|
||||
omsFinanceOperateReport.setReceivingWithoutTax(receivingWithoutTax.add(omsReceivableReceiptDetail.getReceiptAmount()));
|
||||
BigDecimal receivingTax = Optional.ofNullable(omsFinanceOperateReport.getReceivingTax()).orElse(BigDecimal.ZERO);
|
||||
omsFinanceOperateReport.setReceivingTax(receivingTax.add(omsReceivableReceiptDetail.getReceiptAmountTax()));
|
||||
} else if (
|
||||
OmsReceiptBill.ReceiptStatusEnum.PAYMENT.getCode().equals(omsReceivableReceiptDetail.getReceiptStatus()) ||
|
||||
OmsReceiptBill.ReceiptStatusEnum.WAIT_REFUNDED.getCode().equals(omsReceivableReceiptDetail.getReceiptStatus()) ||
|
||||
OmsReceiptBill.ReceiptStatusEnum.REFUNDED.getCode().equals(omsReceivableReceiptDetail.getReceiptStatus())
|
||||
) {
|
||||
//已收款
|
||||
//含税金额
|
||||
BigDecimal receivedWithTax = Optional.ofNullable(omsFinanceOperateReport.getReceivedWithTax()).orElse(BigDecimal.ZERO);
|
||||
if (OmsReceiptBill.ReceiptStatusEnum.WAIT_REFUNDED.getCode().equals(omsReceivableReceiptDetail.getReceiptStatus())) {
|
||||
receivedWithTax = receivedWithTax.abs();
|
||||
}
|
||||
omsFinanceOperateReport.setReceivedWithTax(receivedWithTax.add(omsReceivableReceiptDetail.getReceiptAmount()));
|
||||
BigDecimal receivedWithoutTax = Optional.ofNullable(omsFinanceOperateReport.getReceivedWithoutTax()).orElse(BigDecimal.ZERO);
|
||||
if (OmsReceiptBill.ReceiptStatusEnum.WAIT_REFUNDED.getCode().equals(omsReceivableReceiptDetail.getReceiptStatus())) {
|
||||
receivedWithoutTax = receivedWithoutTax.abs();
|
||||
}
|
||||
omsFinanceOperateReport.setReceivedWithoutTax(receivedWithoutTax.add(omsReceivableReceiptDetail.getReceiptAmount()));
|
||||
BigDecimal receivedTax = Optional.ofNullable(omsFinanceOperateReport.getReceivedTax()).orElse(BigDecimal.ZERO);
|
||||
if (OmsReceiptBill.ReceiptStatusEnum.WAIT_REFUNDED.getCode().equals(omsReceivableReceiptDetail.getReceiptStatus())) {
|
||||
receivedTax = receivedTax.abs();
|
||||
}
|
||||
omsFinanceOperateReport.setReceivedTax(receivedTax.add(omsReceivableReceiptDetail.getReceiptAmountTax()));
|
||||
}
|
||||
}
|
||||
|
||||
private void calculateTicket(OmsPayableTicketDetail omsPayableTicketDetail, OmsFinanceOperateReport omsFinanceOperateReport) {
|
||||
if (omsFinanceOperateReport == null) {
|
||||
throw new ServiceException("数据错误");
|
||||
}
|
||||
|
||||
|
||||
if (OmsTicketBill.TicketStatusEnum.WAIT_TICKET.getCode().equals(omsPayableTicketDetail.getTicketStatus())) {
|
||||
//付款中
|
||||
//含税
|
||||
BigDecimal ticketingWithTax = Optional.ofNullable(omsFinanceOperateReport.getTicketingWithTax()).orElse(BigDecimal.ZERO);
|
||||
omsFinanceOperateReport.setTicketingWithTax(ticketingWithTax.add(omsPayableTicketDetail.getPaymentAmount()));
|
||||
//未税
|
||||
BigDecimal ticketingWithoutTax = Optional.ofNullable(omsFinanceOperateReport.getTicketingWithoutTax()).orElse(BigDecimal.ZERO);
|
||||
omsFinanceOperateReport.setTicketingWithoutTax(ticketingWithoutTax.add(omsPayableTicketDetail.getPaymentAmountWithoutTax()));
|
||||
//税额
|
||||
BigDecimal ticketingTax = Optional.ofNullable(omsFinanceOperateReport.getTicketingTax()).orElse(BigDecimal.ZERO);
|
||||
omsFinanceOperateReport.setTicketingTax(ticketingTax.add(omsPayableTicketDetail.getPaymentAmountTax()));
|
||||
} else if (OmsTicketBill.TicketStatusEnum.TICKET.getCode().equals(omsPayableTicketDetail.getTicketStatus()) ||
|
||||
OmsTicketBill.TicketStatusEnum.RED_RUSH.getCode().equals(omsPayableTicketDetail.getTicketStatus())
|
||||
|| OmsTicketBill.TicketStatusEnum.WAIT_RED_RUSH.getCode().equals(omsPayableTicketDetail.getTicketStatus())) {
|
||||
//已付款
|
||||
BigDecimal ticketedWithTax = Optional.ofNullable(omsFinanceOperateReport.getTicketedWithTax()).orElse(BigDecimal.ZERO);
|
||||
if (OmsTicketBill.TicketStatusEnum.WAIT_RED_RUSH.getCode().equals(omsPayableTicketDetail.getTicketStatus())) {
|
||||
//等待红冲是负数金额 但还在审批中 这个时候是属于已收款金额
|
||||
ticketedWithTax = ticketedWithTax.abs();
|
||||
}
|
||||
omsFinanceOperateReport.setTicketedWithTax(ticketedWithTax.add(omsPayableTicketDetail.getPaymentAmountTax()));
|
||||
BigDecimal ticketedWithoutTax = Optional.ofNullable(omsFinanceOperateReport.getTicketedWithoutTax()).orElse(BigDecimal.ZERO);
|
||||
if (OmsTicketBill.TicketStatusEnum.WAIT_RED_RUSH.getCode().equals(omsPayableTicketDetail.getTicketStatus())) {
|
||||
//等待红冲是负数金额 但还在审批中 这个时候是属于已收款金额
|
||||
ticketedWithoutTax = ticketedWithoutTax.abs();
|
||||
}
|
||||
omsFinanceOperateReport.setTicketedWithoutTax(ticketedWithoutTax.add(omsPayableTicketDetail.getPaymentAmountWithoutTax()));
|
||||
BigDecimal ticketedTax = Optional.ofNullable(omsFinanceOperateReport.getTicketedTax()).orElse(BigDecimal.ZERO);
|
||||
if (OmsTicketBill.TicketStatusEnum.WAIT_RED_RUSH.getCode().equals(omsPayableTicketDetail.getTicketStatus())) {
|
||||
//等待红冲是负数金额 但还在审批中 这个时候是属于已收款金额
|
||||
ticketedTax = ticketedTax.abs();
|
||||
}
|
||||
omsFinanceOperateReport.setTicketedTax(ticketedTax.add(omsPayableTicketDetail.getPaymentAmountTax()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void calculatePayment(OmsPayablePaymentDetail omsPayablePaymentDetail, OmsFinanceOperateReport omsFinanceOperateReport) {
|
||||
if (omsFinanceOperateReport == null) {
|
||||
throw new ServiceException("数据错误");
|
||||
}
|
||||
|
||||
|
||||
if (OmsPaymentBill.PaymentStatusEnum.WAIT_PAYMENT.getCode().equals(omsPayablePaymentDetail.getPaymentStatus())) {
|
||||
//付款中
|
||||
//含税
|
||||
BigDecimal payingWithTax = Optional.ofNullable(omsFinanceOperateReport.getPayingWithTax()).orElse(BigDecimal.ZERO);
|
||||
omsFinanceOperateReport.setPayingWithTax(payingWithTax.add(omsPayablePaymentDetail.getPaymentAmountTax()));
|
||||
//未税
|
||||
BigDecimal payingWithoutTax = Optional.ofNullable(omsFinanceOperateReport.getPayingWithoutTax()).orElse(BigDecimal.ZERO);
|
||||
omsFinanceOperateReport.setPayingWithoutTax(payingWithoutTax.add(omsPayablePaymentDetail.getPaymentAmountWithoutTax()));
|
||||
//税额
|
||||
BigDecimal payingTax = Optional.ofNullable(omsFinanceOperateReport.getPayingTax()).orElse(BigDecimal.ZERO);
|
||||
omsFinanceOperateReport.setPayingTax(payingTax.add(omsPayablePaymentDetail.getPaymentAmountTax()));
|
||||
} else if (OmsPaymentBill.PaymentStatusEnum.PAYMENT.getCode().equals(omsPayablePaymentDetail.getPaymentStatus()) ||
|
||||
OmsPaymentBill.PaymentStatusEnum.REFUNDED.getCode().equals(omsPayablePaymentDetail.getPaymentStatus())
|
||||
|| OmsPaymentBill.PaymentStatusEnum.WAIT_REFUNDED.getCode().equals(omsPayablePaymentDetail.getPaymentStatus())) {
|
||||
//已付款
|
||||
BigDecimal paidWithTax = Optional.ofNullable(omsFinanceOperateReport.getPaidWithTax()).orElse(BigDecimal.ZERO);
|
||||
if (OmsPaymentBill.PaymentStatusEnum.WAIT_REFUNDED.getCode().equals(omsPayablePaymentDetail.getPaymentStatus())) {
|
||||
//等待红冲是负数金额 但还在审批中 这个时候是属于已收款金额
|
||||
paidWithTax = paidWithTax.abs();
|
||||
}
|
||||
omsFinanceOperateReport.setPaidWithTax(paidWithTax.add(omsPayablePaymentDetail.getPaymentAmountTax()));
|
||||
BigDecimal paidWithoutTax = Optional.ofNullable(omsFinanceOperateReport.getPaidWithoutTax()).orElse(BigDecimal.ZERO);
|
||||
if (OmsPaymentBill.PaymentStatusEnum.WAIT_REFUNDED.getCode().equals(omsPayablePaymentDetail.getPaymentStatus())) {
|
||||
//等待红冲是负数金额 但还在审批中 这个时候是属于已收款金额
|
||||
paidWithoutTax = paidWithoutTax.abs();
|
||||
}
|
||||
omsFinanceOperateReport.setPaidWithoutTax(paidWithoutTax.add(omsPayablePaymentDetail.getPaymentAmountWithoutTax()));
|
||||
BigDecimal paidTax = Optional.ofNullable(omsFinanceOperateReport.getPaidTax()).orElse(BigDecimal.ZERO);
|
||||
if (OmsPaymentBill.PaymentStatusEnum.WAIT_REFUNDED.getCode().equals(omsPayablePaymentDetail.getPaymentStatus())) {
|
||||
//等待红冲是负数金额 但还在审批中 这个时候是属于已收款金额
|
||||
paidTax = paidTax.abs();
|
||||
}
|
||||
omsFinanceOperateReport.setPaidTax(paidTax.add(omsPayablePaymentDetail.getPaymentAmountTax()));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -26,6 +26,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
|
|
@ -570,10 +571,5 @@ public class OmsPayableBillServiceImpl implements IOmsPayableBillService {
|
|||
omsPayableBillMapper.deleteByInventoryCode(inventoryCodeList);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OmsPayableBill> listPayable(OmsPayableBill payableBill) {
|
||||
return omsPayableBillMapper.listPayable( payableBill);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,10 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
|
|
@ -155,9 +158,4 @@ public class OmsPayablePaymentDetailServiceImpl implements IOmsPayablePaymentDet
|
|||
public void deleteByPaymentCode(String paymentBillCode) {
|
||||
omsPayablePaymentDetailMapper.deleteByPaymentCode(paymentBillCode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OmsPayablePaymentDetail> listByPaymentUpdateTime(Date startTime, Date endTime) {
|
||||
return omsPayablePaymentDetailMapper.listByPaymentUpdateTime(startTime,endTime);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package com.ruoyi.sip.service.impl;
|
|||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.ruoyi.common.config.RuoYiConfig;
|
||||
import com.ruoyi.common.config.flow.ProcessConfig;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
|
|
@ -15,7 +14,6 @@ import com.ruoyi.common.utils.StringUtils;
|
|||
import com.ruoyi.common.utils.file.FileUploadUtils;
|
||||
import com.ruoyi.sip.domain.*;
|
||||
import com.ruoyi.sip.domain.dto.ReceiptDetailDTO;
|
||||
import com.ruoyi.sip.dto.WriteOffReceiptRequestDto;
|
||||
import com.ruoyi.sip.flowable.domain.Todo;
|
||||
import com.ruoyi.sip.flowable.service.TodoCommonTemplate;
|
||||
import com.ruoyi.sip.flowable.service.TodoService;
|
||||
|
|
@ -324,17 +322,16 @@ public class OmsReceiptBillServiceImpl implements IOmsReceiptBillService, TodoCo
|
|||
update(receiptBill);
|
||||
if (!receiptBill.getReceiptBillType().equals(OmsReceiptBill.ReceiptBillTypeEnum.PRE_RECEIPT.getCode())) {
|
||||
//todo 自动核销
|
||||
List<OmsReceivableReceiptDetail> omsReceivableReceiptDetailList = omsReceivableReceiptDetailService.listByReceiptBillCode(receiptBill.getReceiptBillCode());
|
||||
//
|
||||
//
|
||||
WriteOffReceiptRequestDto writeOffRequestDto = new WriteOffReceiptRequestDto();
|
||||
writeOffRequestDto.setReceiptBillId(receiptBill.getId());
|
||||
writeOffRequestDto.setDetailList(omsReceivableReceiptDetailList);
|
||||
writeOffRequestDto.setPartnerCode(receiptBill.getPartnerCode());
|
||||
writeOffRequestDto.setPartnerName(receiptBill.getPartnerName());
|
||||
writeOffRequestDto.setRemark(StrUtil.format("{}自动核销数据:{}", DateUtils.getTime(), receiptBill.getReceiptBillCode()));
|
||||
// 新增核销记录
|
||||
omsReceivableWriteOffService.autoWriteOff(writeOffRequestDto);
|
||||
// List<OmsPayablePaymentDetail> omsPayablePaymentDetails = omsReceivableReceiptDetailService.listByReceiptCode(receiptBill.getReceiptBillCode());
|
||||
|
||||
|
||||
// WriteOffRequestDto writeOffRequestDto = new WriteOffRequestDto();
|
||||
// writeOffRequestDto.setReceiptBillId(receiptBill.getId());
|
||||
// writeOffRequestDto.setDetailList(omsPayablePaymentDetails);
|
||||
// writeOffRequestDto.setVendorCode(paymentBill.getVendorCode());
|
||||
// writeOffRequestDto.setRemark(StrUtil.format("{}自动核销数据:{}", DateUtils.getTime(), paymentBill.getPaymentBillCode()));
|
||||
// // 新增核销记录
|
||||
// writeOffService.autoWriteOff(writeOffRequestDto);
|
||||
}
|
||||
return AjaxResult.success(attachment);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -303,9 +303,6 @@ public class OmsReceivableBillServiceImpl implements IOmsReceivableBillService
|
|||
bill.setInvoicedAmount(paidAmount);
|
||||
bill.setUninvoicedAmount(bill.getTotalPriceWithTax().subtract(paidAmount)
|
||||
.subtract(waitPayAmount));
|
||||
}else{
|
||||
bill.setInvoicedAmount(BigDecimal.ZERO);
|
||||
bill.setUninvoicedAmount(bill.getTotalPriceWithTax());
|
||||
}
|
||||
OmsReceivableInvoicePlan lastReceiptPlan = invoicePlanService.firstUnPayPlan(bill.getId());
|
||||
bill.setLastReceiptPlanId(lastReceiptPlan == null ? -1 : lastReceiptPlan.getId());
|
||||
|
|
@ -430,11 +427,6 @@ public class OmsReceivableBillServiceImpl implements IOmsReceivableBillService
|
|||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OmsReceivableBill> listReceivableBill(OmsReceivableBill queryUpdateAllReceivableBill) {
|
||||
return omsReceivableBillMapper.listReceivableBill(queryUpdateAllReceivableBill);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateReceiptAmount(List<Long> idList) {
|
||||
if (CollUtil.isEmpty(idList)) {
|
||||
|
|
@ -476,9 +468,6 @@ public class OmsReceivableBillServiceImpl implements IOmsReceivableBillService
|
|||
bill.setReceivedAmount(paidAmount);
|
||||
bill.setUnreceivedAmount(bill.getTotalPriceWithTax() .subtract(paidAmount)
|
||||
.subtract(waitPayAmount));
|
||||
}else{
|
||||
bill.setReceivedAmount(BigDecimal.ZERO);
|
||||
bill.setUninvoicedAmount(bill.getTotalPriceWithTax());
|
||||
}
|
||||
OmsReceivableReceiptPlan lastReceiptPlan = receiptPlanService.firstUnPayPlan(bill.getId());
|
||||
bill.setLastReceiptPlanId(lastReceiptPlan == null ? -1 : lastReceiptPlan.getId());
|
||||
|
|
|
|||
|
|
@ -110,13 +110,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</if>
|
||||
<if test="chargeStatus != null and chargeStatus != ''">
|
||||
and t1.charge_status = #{chargeStatus}
|
||||
</if>
|
||||
<if test="chargeStatusList != null and chargeStatusList.size>0">
|
||||
and t1.charge_status in (
|
||||
<foreach collection="chargeStatusList" item="chargeStatus" separator=",">
|
||||
#{chargeStatus}
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<if test="projectCode != null and projectCode != ''">
|
||||
and t3.project_code = #{projectCode}
|
||||
|
|
@ -127,19 +120,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="partnerName != null and partnerName != ''">
|
||||
and t4.partner_name like concat('%', #{partnerName}, '%')
|
||||
</if>
|
||||
<if test="params.startUpdateTime !=null or params.endUpdateTime !=null">
|
||||
<choose>
|
||||
<when test="params.startUpdateTime !=null and params.endUpdateTime !=null">
|
||||
and t1.update_time between #{params.startUpdateTime} and #{params.endUpdateTime}
|
||||
</when>
|
||||
<when test="params.startUpdateTime !=null">
|
||||
and t1.update_time <![CDATA[ >= ]]> #{params.startUpdateTime}
|
||||
</when>
|
||||
<when test="params.endUpdateTime !=null">
|
||||
and t1.update_time <![CDATA[ <= ]]> #{params.endUpdateTime}
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,600 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.sip.mapper.OmsFinanceOperateReportMapper">
|
||||
|
||||
<resultMap type="OmsFinanceOperateReport" id="OmsFinanceOperateReportResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="orderCode" column="order_code" />
|
||||
<result property="receivableWithTax" column="receivable_with_tax" />
|
||||
<result property="receivableWithoutTax" column="receivable_without_tax" />
|
||||
<result property="receivableTax" column="receivable_tax" />
|
||||
<result property="chargeStatus" column="charge_status" />
|
||||
<result property="chargedWithoutTax" column="charged_without_tax" />
|
||||
<result property="grossProfit" column="gross_profit" />
|
||||
<result property="grossProfitRate" column="gross_profit_rate" />
|
||||
<result property="bizChargeDate" column="biz_charge_date" />
|
||||
<result property="financeChargeDate" column="finance_charge_date" />
|
||||
<result property="receiptStatus" column="receipt_status" />
|
||||
<result property="receivedWithTax" column="received_with_tax" />
|
||||
<result property="receivedWithoutTax" column="received_without_tax" />
|
||||
<result property="receivedTax" column="received_tax" />
|
||||
<result property="receivingWithTax" column="receiving_with_tax" />
|
||||
<result property="receivingWithoutTax" column="receiving_without_tax" />
|
||||
<result property="receivingTax" column="receiving_tax" />
|
||||
<result property="unreceivedWithTax" column="unreceived_with_tax" />
|
||||
<result property="unreceivedWithoutTax" column="unreceived_without_tax" />
|
||||
<result property="unreceivedTax" column="unreceived_tax" />
|
||||
<result property="invoiceStatus" column="invoice_status" />
|
||||
<result property="invoicedWithTax" column="invoiced_with_tax" />
|
||||
<result property="invoicedWithoutTax" column="invoiced_without_tax" />
|
||||
<result property="invoicedTax" column="invoiced_tax" />
|
||||
<result property="invoicingWithTax" column="invoicing_with_tax" />
|
||||
<result property="invoicingWithoutTax" column="invoicing_without_tax" />
|
||||
<result property="invoicingTax" column="invoicing_tax" />
|
||||
<result property="uninvoicedWithTax" column="uninvoiced_with_tax" />
|
||||
<result property="uninvoicedWithoutTax" column="uninvoiced_without_tax" />
|
||||
<result property="uninvoicedTax" column="uninvoiced_tax" />
|
||||
<result property="payableWithTax" column="payable_with_tax" />
|
||||
<result property="payableWithoutTax" column="payable_without_tax" />
|
||||
<result property="payableTax" column="payable_tax" />
|
||||
<result property="paymentStatus" column="payment_status" />
|
||||
<result property="paidWithTax" column="paid_with_tax" />
|
||||
<result property="paidWithoutTax" column="paid_without_tax" />
|
||||
<result property="paidTax" column="paid_tax" />
|
||||
<result property="payingWithTax" column="paying_with_tax" />
|
||||
<result property="payingWithoutTax" column="paying_without_tax" />
|
||||
<result property="payingTax" column="paying_tax" />
|
||||
<result property="unpaidWithTax" column="unpaid_with_tax" />
|
||||
<result property="unpaidWithoutTax" column="unpaid_without_tax" />
|
||||
<result property="unpaidTax" column="unpaid_tax" />
|
||||
<result property="ticketStatus" column="ticket_status" />
|
||||
<result property="ticketedWithTax" column="ticketed_with_tax" />
|
||||
<result property="ticketedWithoutTax" column="ticketed_without_tax" />
|
||||
<result property="ticketedTax" column="ticketed_tax" />
|
||||
<result property="ticketingWithTax" column="ticketing_with_tax" />
|
||||
<result property="ticketingWithoutTax" column="ticketing_without_tax" />
|
||||
<result property="ticketingTax" column="ticketing_tax" />
|
||||
<result property="unticketedWithTax" column="unticketed_with_tax" />
|
||||
<result property="unticketedWithoutTax" column="unticketed_without_tax" />
|
||||
<result property="unticketedTax" column="unticketed_tax" />
|
||||
<result property="dataDate" column="data_date" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOmsFinanceOperateReportVo">
|
||||
select t1.id, t1.order_code, t1.receivable_with_tax, t1.receivable_without_tax, t1.receivable_tax, t1.charge_status, t1.charged_without_tax, t1.gross_profit,
|
||||
t1.gross_profit_rate, t1.biz_charge_date, t1.finance_charge_date, t1.receipt_status, t1.received_with_tax, t1.received_without_tax, t1.received_tax,
|
||||
t1.receiving_with_tax, t1.receiving_without_tax, t1.receiving_tax, t1.unreceived_with_tax, t1.unreceived_without_tax, t1.unreceived_tax, t1.invoice_status,
|
||||
invoiced_with_tax, invoiced_without_tax, invoiced_tax, invoicing_with_tax, invoicing_without_tax, invoicing_tax, uninvoiced_with_tax,
|
||||
t1.invoiced_with_tax, t1.invoiced_without_tax, t1.invoiced_tax, t1.invoicing_with_tax, t1.invoicing_without_tax, t1.invoicing_tax, t1.uninvoiced_with_tax,
|
||||
t1.uninvoiced_without_tax, t1.uninvoiced_tax, t1.payable_with_tax, t1.payable_without_tax, t1.payable_tax, t1.payment_status, t1.paid_with_tax, t1.paid_without_tax,
|
||||
t1.paid_tax, t1.paying_with_tax, t1.paying_without_tax, t1.paying_tax, t1.unpaid_with_tax, t1.unpaid_without_tax, t1.unpaid_tax, t1.ticket_status, t1.ticketed_with_tax,
|
||||
t1.ticketed_without_tax, t1.ticketed_tax, t1.ticketing_with_tax, t1.ticketing_without_tax, t1.ticketing_tax, t1.unticketed_with_tax, t1.unticketed_without_tax,
|
||||
t1.unticketed_tax, t1.create_time, t1.update_time ,
|
||||
t3.project_name, t3.project_code
|
||||
|
||||
from oms_finance_operate_report t1
|
||||
left join project_order_info t2 on t1.order_code = t2.order_code
|
||||
left join project_info t3 on t2.project_id=t3.id
|
||||
</sql>
|
||||
|
||||
<select id="selectOmsFinanceOperateReportList" parameterType="OmsFinanceOperateReport" resultMap="OmsFinanceOperateReportResult">
|
||||
<include refid="selectOmsFinanceOperateReportVo"/>
|
||||
<where>
|
||||
<if test="orderCode != null and orderCode != ''"> and t1.order_code = #{orderCode}</if>
|
||||
<if test="projectCode != null and projectCode != ''"> and t3.project_code = #{projectCode}</if>
|
||||
<if test="projectName != null and projectName != ''"> and t3.project_name like CONCAT('%', #{projectName}, '%')</if>
|
||||
<if test="receivableWithTax != null "> and t1.receivable_with_tax = #{receivableWithTax}</if>
|
||||
<if test="receivableWithoutTax != null "> and t1.receivable_without_tax = #{receivableWithoutTax}</if>
|
||||
<if test="receivableTax != null "> and t1.receivable_tax = #{receivableTax}</if>
|
||||
<if test="chargeStatus != null and chargeStatus != ''"> and t1.charge_status = #{chargeStatus}</if>
|
||||
<if test="chargedWithoutTax != null "> and t1.charged_without_tax = #{chargedWithoutTax}</if>
|
||||
<if test="grossProfit != null "> and t1.gross_profit = #{grossProfit}</if>
|
||||
<if test="grossProfitRate != null "> and t1.gross_profit_rate = #{grossProfitRate}</if>
|
||||
<if test="bizChargeDate != null "> and t1.biz_charge_date = #{bizChargeDate}</if>
|
||||
<if test="financeChargeDate != null "> and t1.finance_charge_date = #{financeChargeDate}</if>
|
||||
<if test="receiptStatus != null and receiptStatus != ''"> and receipt_status = #{receiptStatus}</if>
|
||||
<if test="receivedWithTax != null "> and t1.received_with_tax = #{receivedWithTax}</if>
|
||||
<if test="receivedWithoutTax != null "> and t1.received_without_tax = #{receivedWithoutTax}</if>
|
||||
<if test="receivedTax != null "> and t1.received_tax = #{receivedTax}</if>
|
||||
<if test="receivingWithTax != null "> and t1.receiving_with_tax = #{receivingWithTax}</if>
|
||||
<if test="receivingWithoutTax != null "> and t1.receiving_without_tax = #{receivingWithoutTax}</if>
|
||||
<if test="receivingTax != null "> and t1.receiving_tax = #{receivingTax}</if>
|
||||
<if test="unreceivedWithTax != null "> and t1.unreceived_with_tax = #{unreceivedWithTax}</if>
|
||||
<if test="unreceivedWithoutTax != null "> and t1.unreceived_without_tax = #{unreceivedWithoutTax}</if>
|
||||
<if test="unreceivedTax != null "> and t1.unreceived_tax = #{unreceivedTax}</if>
|
||||
<if test="invoiceStatus != null and invoiceStatus != ''"> and invoice_status = #{invoiceStatus}</if>
|
||||
<if test="invoicedWithTax != null "> and t1.invoiced_with_tax = #{invoicedWithTax}</if>
|
||||
<if test="invoicedWithoutTax != null "> and t1.invoiced_without_tax = #{invoicedWithoutTax}</if>
|
||||
<if test="invoicedTax != null "> and t1.invoiced_tax = #{invoicedTax}</if>
|
||||
<if test="invoicingWithTax != null "> and t1.invoicing_with_tax = #{invoicingWithTax}</if>
|
||||
<if test="invoicingWithoutTax != null "> and t1.invoicing_without_tax = #{invoicingWithoutTax}</if>
|
||||
<if test="invoicingTax != null "> and t1.invoicing_tax = #{invoicingTax}</if>
|
||||
<if test="uninvoicedWithTax != null "> and t1.uninvoiced_with_tax = #{uninvoicedWithTax}</if>
|
||||
<if test="uninvoicedWithoutTax != null "> and t1.uninvoiced_without_tax = #{uninvoicedWithoutTax}</if>
|
||||
<if test="uninvoicedTax != null "> and t1.uninvoiced_tax = #{uninvoicedTax}</if>
|
||||
<if test="payableWithTax != null "> and t1.payable_with_tax = #{payableWithTax}</if>
|
||||
<if test="payableWithoutTax != null "> and t1.payable_without_tax = #{payableWithoutTax}</if>
|
||||
<if test="payableTax != null "> and t1.payable_tax = #{payableTax}</if>
|
||||
<if test="paymentStatus != null and paymentStatus != ''"> and t1.payment_status = #{paymentStatus}</if>
|
||||
<if test="paidWithTax != null "> and t1.paid_with_tax = #{paidWithTax}</if>
|
||||
<if test="paidWithoutTax != null "> and t1.paid_without_tax = #{paidWithoutTax}</if>
|
||||
<if test="paidTax != null "> and t1.paid_tax = #{paidTax}</if>
|
||||
<if test="payingWithTax != null "> and t1.paying_with_tax = #{payingWithTax}</if>
|
||||
<if test="payingWithoutTax != null "> and t1.paying_without_tax = #{payingWithoutTax}</if>
|
||||
<if test="payingTax != null "> and t1.paying_tax = #{payingTax}</if>
|
||||
<if test="unpaidWithTax != null "> and t1.unpaid_with_tax = #{unpaidWithTax}</if>
|
||||
<if test="unpaidWithoutTax != null "> and t1.unpaid_without_tax = #{unpaidWithoutTax}</if>
|
||||
<if test="unpaidTax != null "> and t1.unpaid_tax = #{unpaidTax}</if>
|
||||
<if test="ticketStatus != null and ticketStatus != ''"> and t1.ticket_status = #{ticketStatus}</if>
|
||||
<if test="ticketedWithTax != null "> and t1.ticketed_with_tax = #{ticketedWithTax}</if>
|
||||
<if test="ticketedWithoutTax != null "> and t1.ticketed_without_tax = #{ticketedWithoutTax}</if>
|
||||
<if test="ticketedTax != null "> and t1.ticketed_tax = #{ticketedTax}</if>
|
||||
<if test="ticketingWithTax != null "> and t1.ticketing_with_tax = #{ticketingWithTax}</if>
|
||||
<if test="ticketingWithoutTax != null "> and t1.ticketing_without_tax = #{ticketingWithoutTax}</if>
|
||||
<if test="ticketingTax != null "> and t1.ticketing_tax = #{ticketingTax}</if>
|
||||
<if test="unticketedWithTax != null "> and t1.unticketed_with_tax = #{unticketedWithTax}</if>
|
||||
<if test="unticketedWithoutTax != null "> and t1.unticketed_without_tax = #{unticketedWithoutTax}</if>
|
||||
<if test="unticketedTax != null "> and t1.unticketed_tax = #{unticketedTax}</if>
|
||||
|
||||
</where>
|
||||
<if test="projectName != null and projectName != ''"> and t3.project_name like CONCAT('%', #{projectName}, '%')</if></select>
|
||||
|
||||
<select id="selectOmsFinanceOperateReportById" parameterType="Long" resultMap="OmsFinanceOperateReportResult">
|
||||
<include refid="selectOmsFinanceOperateReportVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
<select id="maxDataDate" resultType="java.util.Date">
|
||||
select max(data_date) from oms_finance_operate_report_detail
|
||||
</select>
|
||||
|
||||
<insert id="insertOmsFinanceOperateReport" parameterType="OmsFinanceOperateReport" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into oms_finance_operate_report
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="orderCode != null and orderCode != ''">order_code,</if>
|
||||
<if test="receivableWithTax != null">receivable_with_tax,</if>
|
||||
<if test="receivableWithoutTax != null">receivable_without_tax,</if>
|
||||
<if test="receivableTax != null">receivable_tax,</if>
|
||||
<if test="chargeStatus != null">charge_status,</if>
|
||||
<if test="chargedWithoutTax != null">charged_without_tax,</if>
|
||||
<if test="grossProfit != null">gross_profit,</if>
|
||||
<if test="grossProfitRate != null">gross_profit_rate,</if>
|
||||
<if test="bizChargeDate != null">biz_charge_date,</if>
|
||||
<if test="financeChargeDate != null">finance_charge_date,</if>
|
||||
<if test="receiptStatus != null">receipt_status,</if>
|
||||
<if test="receivedWithTax != null">received_with_tax,</if>
|
||||
<if test="receivedWithoutTax != null">received_without_tax,</if>
|
||||
<if test="receivedTax != null">received_tax,</if>
|
||||
<if test="receivingWithTax != null">receiving_with_tax,</if>
|
||||
<if test="receivingWithoutTax != null">receiving_without_tax,</if>
|
||||
<if test="receivingTax != null">receiving_tax,</if>
|
||||
<if test="unreceivedWithTax != null">unreceived_with_tax,</if>
|
||||
<if test="unreceivedWithoutTax != null">unreceived_without_tax,</if>
|
||||
<if test="unreceivedTax != null">unreceived_tax,</if>
|
||||
<if test="invoiceStatus != null">invoice_status,</if>
|
||||
<if test="invoicedWithTax != null">invoiced_with_tax,</if>
|
||||
<if test="invoicedWithoutTax != null">invoiced_without_tax,</if>
|
||||
<if test="invoicedTax != null">invoiced_tax,</if>
|
||||
<if test="invoicingWithTax != null">invoicing_with_tax,</if>
|
||||
<if test="invoicingWithoutTax != null">invoicing_without_tax,</if>
|
||||
<if test="invoicingTax != null">invoicing_tax,</if>
|
||||
<if test="uninvoicedWithTax != null">uninvoiced_with_tax,</if>
|
||||
<if test="uninvoicedWithoutTax != null">uninvoiced_without_tax,</if>
|
||||
<if test="uninvoicedTax != null">uninvoiced_tax,</if>
|
||||
<if test="payableWithTax != null">payable_with_tax,</if>
|
||||
<if test="payableWithoutTax != null">payable_without_tax,</if>
|
||||
<if test="payableTax != null">payable_tax,</if>
|
||||
<if test="paymentStatus != null">payment_status,</if>
|
||||
<if test="paidWithTax != null">paid_with_tax,</if>
|
||||
<if test="paidWithoutTax != null">paid_without_tax,</if>
|
||||
<if test="paidTax != null">paid_tax,</if>
|
||||
<if test="payingWithTax != null">paying_with_tax,</if>
|
||||
<if test="payingWithoutTax != null">paying_without_tax,</if>
|
||||
<if test="payingTax != null">paying_tax,</if>
|
||||
<if test="unpaidWithTax != null">unpaid_with_tax,</if>
|
||||
<if test="unpaidWithoutTax != null">unpaid_without_tax,</if>
|
||||
<if test="unpaidTax != null">unpaid_tax,</if>
|
||||
<if test="ticketStatus != null">ticket_status,</if>
|
||||
<if test="ticketedWithTax != null">ticketed_with_tax,</if>
|
||||
<if test="ticketedWithoutTax != null">ticketed_without_tax,</if>
|
||||
<if test="ticketedTax != null">ticketed_tax,</if>
|
||||
<if test="ticketingWithTax != null">ticketing_with_tax,</if>
|
||||
<if test="ticketingWithoutTax != null">ticketing_without_tax,</if>
|
||||
<if test="ticketingTax != null">ticketing_tax,</if>
|
||||
<if test="unticketedWithTax != null">unticketed_with_tax,</if>
|
||||
<if test="unticketedWithoutTax != null">unticketed_without_tax,</if>
|
||||
<if test="unticketedTax != null">unticketed_tax,</if>
|
||||
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="orderCode != null and orderCode != ''">#{orderCode},</if>
|
||||
<if test="receivableWithTax != null">#{receivableWithTax},</if>
|
||||
<if test="receivableWithoutTax != null">#{receivableWithoutTax},</if>
|
||||
<if test="receivableTax != null">#{receivableTax},</if>
|
||||
<if test="chargeStatus != null">#{chargeStatus},</if>
|
||||
<if test="chargedWithoutTax != null">#{chargedWithoutTax},</if>
|
||||
<if test="grossProfit != null">#{grossProfit},</if>
|
||||
<if test="grossProfitRate != null">#{grossProfitRate},</if>
|
||||
<if test="bizChargeDate != null">#{bizChargeDate},</if>
|
||||
<if test="financeChargeDate != null">#{financeChargeDate},</if>
|
||||
<if test="receiptStatus != null">#{receiptStatus},</if>
|
||||
<if test="receivedWithTax != null">#{receivedWithTax},</if>
|
||||
<if test="receivedWithoutTax != null">#{receivedWithoutTax},</if>
|
||||
<if test="receivedTax != null">#{receivedTax},</if>
|
||||
<if test="receivingWithTax != null">#{receivingWithTax},</if>
|
||||
<if test="receivingWithoutTax != null">#{receivingWithoutTax},</if>
|
||||
<if test="receivingTax != null">#{receivingTax},</if>
|
||||
<if test="unreceivedWithTax != null">#{unreceivedWithTax},</if>
|
||||
<if test="unreceivedWithoutTax != null">#{unreceivedWithoutTax},</if>
|
||||
<if test="unreceivedTax != null">#{unreceivedTax},</if>
|
||||
<if test="invoiceStatus != null">#{invoiceStatus},</if>
|
||||
<if test="invoicedWithTax != null">#{invoicedWithTax},</if>
|
||||
<if test="invoicedWithoutTax != null">#{invoicedWithoutTax},</if>
|
||||
<if test="invoicedTax != null">#{invoicedTax},</if>
|
||||
<if test="invoicingWithTax != null">#{invoicingWithTax},</if>
|
||||
<if test="invoicingWithoutTax != null">#{invoicingWithoutTax},</if>
|
||||
<if test="invoicingTax != null">#{invoicingTax},</if>
|
||||
<if test="uninvoicedWithTax != null">#{uninvoicedWithTax},</if>
|
||||
<if test="uninvoicedWithoutTax != null">#{uninvoicedWithoutTax},</if>
|
||||
<if test="uninvoicedTax != null">#{uninvoicedTax},</if>
|
||||
<if test="payableWithTax != null">#{payableWithTax},</if>
|
||||
<if test="payableWithoutTax != null">#{payableWithoutTax},</if>
|
||||
<if test="payableTax != null">#{payableTax},</if>
|
||||
<if test="paymentStatus != null">#{paymentStatus},</if>
|
||||
<if test="paidWithTax != null">#{paidWithTax},</if>
|
||||
<if test="paidWithoutTax != null">#{paidWithoutTax},</if>
|
||||
<if test="paidTax != null">#{paidTax},</if>
|
||||
<if test="payingWithTax != null">#{payingWithTax},</if>
|
||||
<if test="payingWithoutTax != null">#{payingWithoutTax},</if>
|
||||
<if test="payingTax != null">#{payingTax},</if>
|
||||
<if test="unpaidWithTax != null">#{unpaidWithTax},</if>
|
||||
<if test="unpaidWithoutTax != null">#{unpaidWithoutTax},</if>
|
||||
<if test="unpaidTax != null">#{unpaidTax},</if>
|
||||
<if test="ticketStatus != null">#{ticketStatus},</if>
|
||||
<if test="ticketedWithTax != null">#{ticketedWithTax},</if>
|
||||
<if test="ticketedWithoutTax != null">#{ticketedWithoutTax},</if>
|
||||
<if test="ticketedTax != null">#{ticketedTax},</if>
|
||||
<if test="ticketingWithTax != null">#{ticketingWithTax},</if>
|
||||
<if test="ticketingWithoutTax != null">#{ticketingWithoutTax},</if>
|
||||
<if test="ticketingTax != null">#{ticketingTax},</if>
|
||||
<if test="unticketedWithTax != null">#{unticketedWithTax},</if>
|
||||
<if test="unticketedWithoutTax != null">#{unticketedWithoutTax},</if>
|
||||
<if test="unticketedTax != null">#{unticketedTax},</if>
|
||||
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<insert id="saveBatch">
|
||||
insert into oms_finance_operate_report
|
||||
(order_code, receivable_with_tax, receivable_without_tax, receivable_tax, charge_status, charged_without_tax,
|
||||
gross_profit, gross_profit_rate, biz_charge_date, finance_charge_date, receipt_status, received_with_tax,
|
||||
received_without_tax, received_tax, receiving_with_tax, receiving_without_tax, receiving_tax, unreceived_with_tax,
|
||||
unreceived_without_tax, unreceived_tax, invoice_status, invoiced_with_tax, invoiced_without_tax, invoiced_tax,
|
||||
invoicing_with_tax, invoicing_without_tax, invoicing_tax, uninvoiced_with_tax, uninvoiced_without_tax, uninvoiced_tax,
|
||||
payable_with_tax, payable_without_tax, payable_tax, payment_status, paid_with_tax, paid_without_tax, paid_tax,
|
||||
paying_with_tax, paying_without_tax, paying_tax, unpaid_with_tax, unpaid_without_tax, unpaid_tax, ticket_status,
|
||||
ticketed_with_tax, ticketed_without_tax, ticketed_tax, ticketing_with_tax, ticketing_without_tax, ticketing_tax,
|
||||
unticketed_with_tax, unticketed_without_tax, unticketed_tax, create_time, update_time)
|
||||
values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
(#{item.orderCode}, #{item.receivableWithTax}, #{item.receivableWithoutTax}, #{item.receivableTax},
|
||||
#{item.chargeStatus}, #{item.chargedWithoutTax}, #{item.grossProfit}, #{item.grossProfitRate},
|
||||
#{item.bizChargeDate}, #{item.financeChargeDate}, #{item.receiptStatus}, #{item.receivedWithTax},
|
||||
#{item.receivedWithoutTax}, #{item.receivedTax}, #{item.receivingWithTax}, #{item.receivingWithoutTax},
|
||||
#{item.receivingTax}, #{item.unreceivedWithTax}, #{item.unreceivedWithoutTax}, #{item.unreceivedTax},
|
||||
#{item.invoiceStatus}, #{item.invoicedWithTax}, #{item.invoicedWithoutTax}, #{item.invoicedTax},
|
||||
#{item.invoicingWithTax}, #{item.invoicingWithoutTax}, #{item.invoicingTax}, #{item.uninvoicedWithTax},
|
||||
#{item.uninvoicedWithoutTax}, #{item.uninvoicedTax}, #{item.payableWithTax}, #{item.payableWithoutTax},
|
||||
#{item.payableTax}, #{item.paymentStatus}, #{item.paidWithTax}, #{item.paidWithoutTax}, #{item.paidTax},
|
||||
#{item.payingWithTax}, #{item.payingWithoutTax}, #{item.payingTax}, #{item.unpaidWithTax},
|
||||
#{item.unpaidWithoutTax}, #{item.unpaidTax}, #{item.ticketStatus}, #{item.ticketedWithTax},
|
||||
#{item.ticketedWithoutTax}, #{item.ticketedTax}, #{item.ticketingWithTax}, #{item.ticketingWithoutTax},
|
||||
#{item.ticketingTax}, #{item.unticketedWithTax}, #{item.unticketedWithoutTax}, #{item.unticketedTax},
|
||||
#{item.dataDate}, #{item.createTime}, #{item.updateTime})
|
||||
</foreach>
|
||||
ON DUPLICATE KEY UPDATE
|
||||
receivable_with_tax = IFNULL(VALUES(receivable_with_tax), receivable_with_tax),
|
||||
receivable_without_tax = IFNULL(VALUES(receivable_without_tax), receivable_without_tax),
|
||||
receivable_tax = IFNULL(VALUES(receivable_tax), receivable_tax),
|
||||
charge_status = IFNULL(VALUES(charge_status), charge_status),
|
||||
charged_without_tax = IFNULL(VALUES(charged_without_tax), charged_without_tax),
|
||||
gross_profit = IFNULL(VALUES(gross_profit), gross_profit),
|
||||
gross_profit_rate = IFNULL(VALUES(gross_profit_rate), gross_profit_rate),
|
||||
biz_charge_date = IFNULL(VALUES(biz_charge_date), biz_charge_date),
|
||||
finance_charge_date = IFNULL(VALUES(finance_charge_date), finance_charge_date),
|
||||
receipt_status = IFNULL(VALUES(receipt_status), receipt_status),
|
||||
received_with_tax = IFNULL(VALUES(received_with_tax), received_with_tax),
|
||||
received_without_tax = IFNULL(VALUES(received_without_tax), received_without_tax),
|
||||
received_tax = IFNULL(VALUES(received_tax), received_tax),
|
||||
receiving_with_tax = IFNULL(VALUES(receiving_with_tax), receiving_with_tax),
|
||||
receiving_without_tax = IFNULL(VALUES(receiving_without_tax), receiving_without_tax),
|
||||
receiving_tax = IFNULL(VALUES(receiving_tax), receiving_tax),
|
||||
unreceived_with_tax = IFNULL(VALUES(unreceived_with_tax), unreceived_with_tax),
|
||||
unreceived_without_tax = IFNULL(VALUES(unreceived_without_tax), unreceived_without_tax),
|
||||
unreceived_tax = IFNULL(VALUES(unreceived_tax), unreceived_tax),
|
||||
invoice_status = IFNULL(VALUES(invoice_status), invoice_status),
|
||||
invoiced_with_tax = IFNULL(VALUES(invoiced_with_tax), invoiced_with_tax),
|
||||
invoiced_without_tax = IFNULL(VALUES(invoiced_without_tax), invoiced_without_tax),
|
||||
invoiced_tax = IFNULL(VALUES(invoiced_tax), invoiced_tax),
|
||||
invoicing_with_tax = IFNULL(VALUES(invoicing_with_tax), invoicing_with_tax),
|
||||
invoicing_without_tax = IFNULL(VALUES(invoicing_without_tax), invoicing_without_tax),
|
||||
invoicing_tax = IFNULL(VALUES(invoicing_tax), invoicing_tax),
|
||||
uninvoiced_with_tax = IFNULL(VALUES(uninvoiced_with_tax), uninvoiced_with_tax),
|
||||
uninvoiced_without_tax = IFNULL(VALUES(uninvoiced_without_tax), uninvoiced_without_tax),
|
||||
uninvoiced_tax = IFNULL(VALUES(uninvoiced_tax), uninvoiced_tax),
|
||||
payable_with_tax = IFNULL(VALUES(payable_with_tax), payable_with_tax),
|
||||
payable_without_tax = IFNULL(VALUES(payable_without_tax), payable_without_tax),
|
||||
payable_tax = IFNULL(VALUES(payable_tax), payable_tax),
|
||||
payment_status = IFNULL(VALUES(payment_status), payment_status),
|
||||
paid_with_tax = IFNULL(VALUES(paid_with_tax), paid_with_tax),
|
||||
paid_without_tax = IFNULL(VALUES(paid_without_tax), paid_without_tax),
|
||||
paid_tax = IFNULL(VALUES(paid_tax), paid_tax),
|
||||
paying_with_tax = IFNULL(VALUES(paying_with_tax), paying_with_tax),
|
||||
paying_without_tax = IFNULL(VALUES(paying_without_tax), paying_without_tax),
|
||||
paying_tax = IFNULL(VALUES(paying_tax), paying_tax),
|
||||
unpaid_with_tax = IFNULL(VALUES(unpaid_with_tax), unpaid_with_tax),
|
||||
unpaid_without_tax = IFNULL(VALUES(unpaid_without_tax), unpaid_without_tax),
|
||||
unpaid_tax = IFNULL(VALUES(unpaid_tax), unpaid_tax),
|
||||
ticket_status = IFNULL(VALUES(ticket_status), ticket_status),
|
||||
ticketed_with_tax = IFNULL(VALUES(ticketed_with_tax), ticketed_with_tax),
|
||||
ticketed_without_tax = IFNULL(VALUES(ticketed_without_tax), ticketed_without_tax),
|
||||
ticketed_tax = IFNULL(VALUES(ticketed_tax), ticketed_tax),
|
||||
ticketing_with_tax = IFNULL(VALUES(ticketing_with_tax), ticketing_with_tax),
|
||||
ticketing_without_tax = IFNULL(VALUES(ticketing_without_tax), ticketing_without_tax),
|
||||
ticketing_tax = IFNULL(VALUES(ticketing_tax), ticketing_tax),
|
||||
unticketed_with_tax = IFNULL(VALUES(unticketed_with_tax), unticketed_with_tax),
|
||||
unticketed_without_tax = IFNULL(VALUES(unticketed_without_tax), unticketed_without_tax),
|
||||
unticketed_tax = IFNULL(VALUES(unticketed_tax), unticketed_tax),
|
||||
update_time = now()
|
||||
</insert>
|
||||
<insert id="saveHistoryBatch">
|
||||
insert into oms_finance_operate_report_detail
|
||||
(order_code, receivable_with_tax, receivable_without_tax, receivable_tax, charge_status, charged_without_tax,
|
||||
gross_profit, gross_profit_rate, biz_charge_date, finance_charge_date, receipt_status, received_with_tax,
|
||||
received_without_tax, received_tax, receiving_with_tax, receiving_without_tax, receiving_tax, unreceived_with_tax,
|
||||
unreceived_without_tax, unreceived_tax, invoice_status, invoiced_with_tax, invoiced_without_tax, invoiced_tax,
|
||||
invoicing_with_tax, invoicing_without_tax, invoicing_tax, uninvoiced_with_tax, uninvoiced_without_tax, uninvoiced_tax,
|
||||
payable_with_tax, payable_without_tax, payable_tax, payment_status, paid_with_tax, paid_without_tax, paid_tax,
|
||||
paying_with_tax, paying_without_tax, paying_tax, unpaid_with_tax, unpaid_without_tax, unpaid_tax, ticket_status,
|
||||
ticketed_with_tax, ticketed_without_tax, ticketed_tax, ticketing_with_tax, ticketing_without_tax, ticketing_tax,
|
||||
unticketed_with_tax, unticketed_without_tax, unticketed_tax, data_date, create_time, update_time)
|
||||
values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
(#{item.orderCode}, #{item.receivableWithTax}, #{item.receivableWithoutTax}, #{item.receivableTax},
|
||||
#{item.chargeStatus}, #{item.chargedWithoutTax}, #{item.grossProfit}, #{item.grossProfitRate},
|
||||
#{item.bizChargeDate}, #{item.financeChargeDate}, #{item.receiptStatus}, #{item.receivedWithTax},
|
||||
#{item.receivedWithoutTax}, #{item.receivedTax}, #{item.receivingWithTax}, #{item.receivingWithoutTax},
|
||||
#{item.receivingTax}, #{item.unreceivedWithTax}, #{item.unreceivedWithoutTax}, #{item.unreceivedTax},
|
||||
#{item.invoiceStatus}, #{item.invoicedWithTax}, #{item.invoicedWithoutTax}, #{item.invoicedTax},
|
||||
#{item.invoicingWithTax}, #{item.invoicingWithoutTax}, #{item.invoicingTax}, #{item.uninvoicedWithTax},
|
||||
#{item.uninvoicedWithoutTax}, #{item.uninvoicedTax}, #{item.payableWithTax}, #{item.payableWithoutTax},
|
||||
#{item.payableTax}, #{item.paymentStatus}, #{item.paidWithTax}, #{item.paidWithoutTax}, #{item.paidTax},
|
||||
#{item.payingWithTax}, #{item.payingWithoutTax}, #{item.payingTax}, #{item.unpaidWithTax},
|
||||
#{item.unpaidWithoutTax}, #{item.unpaidTax}, #{item.ticketStatus}, #{item.ticketedWithTax},
|
||||
#{item.ticketedWithoutTax}, #{item.ticketedTax}, #{item.ticketingWithTax}, #{item.ticketingWithoutTax},
|
||||
#{item.ticketingTax}, #{item.unticketedWithTax}, #{item.unticketedWithoutTax}, #{item.unticketedTax},
|
||||
#{item.dataDate}, now(), now())
|
||||
</foreach>
|
||||
ON DUPLICATE KEY UPDATE
|
||||
receivable_with_tax = IFNULL(VALUES(receivable_with_tax), receivable_with_tax),
|
||||
receivable_without_tax = IFNULL(VALUES(receivable_without_tax), receivable_without_tax),
|
||||
receivable_tax = IFNULL(VALUES(receivable_tax), receivable_tax),
|
||||
charge_status = IFNULL(VALUES(charge_status), charge_status),
|
||||
charged_without_tax = IFNULL(VALUES(charged_without_tax), charged_without_tax),
|
||||
gross_profit = IFNULL(VALUES(gross_profit), gross_profit),
|
||||
gross_profit_rate = IFNULL(VALUES(gross_profit_rate), gross_profit_rate),
|
||||
biz_charge_date = IFNULL(VALUES(biz_charge_date), biz_charge_date),
|
||||
finance_charge_date = IFNULL(VALUES(finance_charge_date), finance_charge_date),
|
||||
receipt_status = IFNULL(VALUES(receipt_status), receipt_status),
|
||||
received_with_tax = IFNULL(VALUES(received_with_tax), received_with_tax),
|
||||
received_without_tax = IFNULL(VALUES(received_without_tax), received_without_tax),
|
||||
received_tax = IFNULL(VALUES(received_tax), received_tax),
|
||||
receiving_with_tax = IFNULL(VALUES(receiving_with_tax), receiving_with_tax),
|
||||
receiving_without_tax = IFNULL(VALUES(receiving_without_tax), receiving_without_tax),
|
||||
receiving_tax = IFNULL(VALUES(receiving_tax), receiving_tax),
|
||||
unreceived_with_tax = IFNULL(VALUES(unreceived_with_tax), unreceived_with_tax),
|
||||
unreceived_without_tax = IFNULL(VALUES(unreceived_without_tax), unreceived_without_tax),
|
||||
unreceived_tax = IFNULL(VALUES(unreceived_tax), unreceived_tax),
|
||||
invoice_status = IFNULL(VALUES(invoice_status), invoice_status),
|
||||
invoiced_with_tax = IFNULL(VALUES(invoiced_with_tax), invoiced_with_tax),
|
||||
invoiced_without_tax = IFNULL(VALUES(invoiced_without_tax), invoiced_without_tax),
|
||||
invoiced_tax = IFNULL(VALUES(invoiced_tax), invoiced_tax),
|
||||
invoicing_with_tax = IFNULL(VALUES(invoicing_with_tax), invoicing_with_tax),
|
||||
invoicing_without_tax = IFNULL(VALUES(invoicing_without_tax), invoicing_without_tax),
|
||||
invoicing_tax = IFNULL(VALUES(invoicing_tax), invoicing_tax),
|
||||
uninvoiced_with_tax = IFNULL(VALUES(uninvoiced_with_tax), uninvoiced_with_tax),
|
||||
uninvoiced_without_tax = IFNULL(VALUES(uninvoiced_without_tax), uninvoiced_without_tax),
|
||||
uninvoiced_tax = IFNULL(VALUES(uninvoiced_tax), uninvoiced_tax),
|
||||
payable_with_tax = IFNULL(VALUES(payable_with_tax), payable_with_tax),
|
||||
payable_without_tax = IFNULL(VALUES(payable_without_tax), payable_without_tax),
|
||||
payable_tax = IFNULL(VALUES(payable_tax), payable_tax),
|
||||
payment_status = IFNULL(VALUES(payment_status), payment_status),
|
||||
paid_with_tax = IFNULL(VALUES(paid_with_tax), paid_with_tax),
|
||||
paid_without_tax = IFNULL(VALUES(paid_without_tax), paid_without_tax),
|
||||
paid_tax = IFNULL(VALUES(paid_tax), paid_tax),
|
||||
paying_with_tax = IFNULL(VALUES(paying_with_tax), paying_with_tax),
|
||||
paying_without_tax = IFNULL(VALUES(paying_without_tax), paying_without_tax),
|
||||
paying_tax = IFNULL(VALUES(paying_tax), paying_tax),
|
||||
unpaid_with_tax = IFNULL(VALUES(unpaid_with_tax), unpaid_with_tax),
|
||||
unpaid_without_tax = IFNULL(VALUES(unpaid_without_tax), unpaid_without_tax),
|
||||
unpaid_tax = IFNULL(VALUES(unpaid_tax), unpaid_tax),
|
||||
ticket_status = IFNULL(VALUES(ticket_status), ticket_status),
|
||||
ticketed_with_tax = IFNULL(VALUES(ticketed_with_tax), ticketed_with_tax),
|
||||
ticketed_without_tax = IFNULL(VALUES(ticketed_without_tax), ticketed_without_tax),
|
||||
ticketed_tax = IFNULL(VALUES(ticketed_tax), ticketed_tax),
|
||||
ticketing_with_tax = IFNULL(VALUES(ticketing_with_tax), ticketing_with_tax),
|
||||
ticketing_without_tax = IFNULL(VALUES(ticketing_without_tax), ticketing_without_tax),
|
||||
ticketing_tax = IFNULL(VALUES(ticketing_tax), ticketing_tax),
|
||||
unticketed_with_tax = IFNULL(VALUES(unticketed_with_tax), unticketed_with_tax),
|
||||
unticketed_without_tax = IFNULL(VALUES(unticketed_without_tax), unticketed_without_tax),
|
||||
unticketed_tax = IFNULL(VALUES(unticketed_tax), unticketed_tax),
|
||||
update_time = now()
|
||||
</insert>
|
||||
|
||||
<update id="updateOmsFinanceOperateReport" parameterType="OmsFinanceOperateReport">
|
||||
update oms_finance_operate_report
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="orderCode != null and orderCode != ''">order_code = #{orderCode},</if>
|
||||
<if test="receivableWithTax != null">receivable_with_tax = #{receivableWithTax},</if>
|
||||
<if test="receivableWithoutTax != null">receivable_without_tax = #{receivableWithoutTax},</if>
|
||||
<if test="receivableTax != null">receivable_tax = #{receivableTax},</if>
|
||||
<if test="chargeStatus != null">charge_status = #{chargeStatus},</if>
|
||||
<if test="chargedWithoutTax != null">charged_without_tax = #{chargedWithoutTax},</if>
|
||||
<if test="grossProfit != null">gross_profit = #{grossProfit},</if>
|
||||
<if test="grossProfitRate != null">gross_profit_rate = #{grossProfitRate},</if>
|
||||
<if test="bizChargeDate != null">biz_charge_date = #{bizChargeDate},</if>
|
||||
<if test="financeChargeDate != null">finance_charge_date = #{financeChargeDate},</if>
|
||||
<if test="receiptStatus != null">receipt_status = #{receiptStatus},</if>
|
||||
<if test="receivedWithTax != null">received_with_tax = #{receivedWithTax},</if>
|
||||
<if test="receivedWithoutTax != null">received_without_tax = #{receivedWithoutTax},</if>
|
||||
<if test="receivedTax != null">received_tax = #{receivedTax},</if>
|
||||
<if test="receivingWithTax != null">receiving_with_tax = #{receivingWithTax},</if>
|
||||
<if test="receivingWithoutTax != null">receiving_without_tax = #{receivingWithoutTax},</if>
|
||||
<if test="receivingTax != null">receiving_tax = #{receivingTax},</if>
|
||||
<if test="unreceivedWithTax != null">unreceived_with_tax = #{unreceivedWithTax},</if>
|
||||
<if test="unreceivedWithoutTax != null">unreceived_without_tax = #{unreceivedWithoutTax},</if>
|
||||
<if test="unreceivedTax != null">unreceived_tax = #{unreceivedTax},</if>
|
||||
<if test="invoiceStatus != null">invoice_status = #{invoiceStatus},</if>
|
||||
<if test="invoicedWithTax != null">invoiced_with_tax = #{invoicedWithTax},</if>
|
||||
<if test="invoicedWithoutTax != null">invoiced_without_tax = #{invoicedWithoutTax},</if>
|
||||
<if test="invoicedTax != null">invoiced_tax = #{invoicedTax},</if>
|
||||
<if test="invoicingWithTax != null">invoicing_with_tax = #{invoicingWithTax},</if>
|
||||
<if test="invoicingWithoutTax != null">invoicing_without_tax = #{invoicingWithoutTax},</if>
|
||||
<if test="invoicingTax != null">invoicing_tax = #{invoicingTax},</if>
|
||||
<if test="uninvoicedWithTax != null">uninvoiced_with_tax = #{uninvoicedWithTax},</if>
|
||||
<if test="uninvoicedWithoutTax != null">uninvoiced_without_tax = #{uninvoicedWithoutTax},</if>
|
||||
<if test="uninvoicedTax != null">uninvoiced_tax = #{uninvoicedTax},</if>
|
||||
<if test="payableWithTax != null">payable_with_tax = #{payableWithTax},</if>
|
||||
<if test="payableWithoutTax != null">payable_without_tax = #{payableWithoutTax},</if>
|
||||
<if test="payableTax != null">payable_tax = #{payableTax},</if>
|
||||
<if test="paymentStatus != null">payment_status = #{paymentStatus},</if>
|
||||
<if test="paidWithTax != null">paid_with_tax = #{paidWithTax},</if>
|
||||
<if test="paidWithoutTax != null">paid_without_tax = #{paidWithoutTax},</if>
|
||||
<if test="paidTax != null">paid_tax = #{paidTax},</if>
|
||||
<if test="payingWithTax != null">paying_with_tax = #{payingWithTax},</if>
|
||||
<if test="payingWithoutTax != null">paying_without_tax = #{payingWithoutTax},</if>
|
||||
<if test="payingTax != null">paying_tax = #{payingTax},</if>
|
||||
<if test="unpaidWithTax != null">unpaid_with_tax = #{unpaidWithTax},</if>
|
||||
<if test="unpaidWithoutTax != null">unpaid_without_tax = #{unpaidWithoutTax},</if>
|
||||
<if test="unpaidTax != null">unpaid_tax = #{unpaidTax},</if>
|
||||
<if test="ticketStatus != null">ticket_status = #{ticketStatus},</if>
|
||||
<if test="ticketedWithTax != null">ticketed_with_tax = #{ticketedWithTax},</if>
|
||||
<if test="ticketedWithoutTax != null">ticketed_without_tax = #{ticketedWithoutTax},</if>
|
||||
<if test="ticketedTax != null">ticketed_tax = #{ticketedTax},</if>
|
||||
<if test="ticketingWithTax != null">ticketing_with_tax = #{ticketingWithTax},</if>
|
||||
<if test="ticketingWithoutTax != null">ticketing_without_tax = #{ticketingWithoutTax},</if>
|
||||
<if test="ticketingTax != null">ticketing_tax = #{ticketingTax},</if>
|
||||
<if test="unticketedWithTax != null">unticketed_with_tax = #{unticketedWithTax},</if>
|
||||
<if test="unticketedWithoutTax != null">unticketed_without_tax = #{unticketedWithoutTax},</if>
|
||||
<if test="unticketedTax != null">unticketed_tax = #{unticketedTax},</if>
|
||||
<if test="dataDate != null">data_date = #{dataDate},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<update id="syncDetailBatch">
|
||||
insert into oms_finance_operate_report
|
||||
(order_code, receivable_with_tax, receivable_without_tax, receivable_tax, charge_status, charged_without_tax,
|
||||
gross_profit, gross_profit_rate, biz_charge_date, finance_charge_date, receipt_status, received_with_tax,
|
||||
received_without_tax, received_tax, receiving_with_tax, receiving_without_tax, receiving_tax,
|
||||
unreceived_with_tax,
|
||||
unreceived_without_tax, unreceived_tax, invoice_status, invoiced_with_tax, invoiced_without_tax, invoiced_tax,
|
||||
invoicing_with_tax, invoicing_without_tax, invoicing_tax, uninvoiced_with_tax, uninvoiced_without_tax,
|
||||
uninvoiced_tax,
|
||||
payable_with_tax, payable_without_tax, payable_tax, payment_status, paid_with_tax, paid_without_tax, paid_tax,
|
||||
paying_with_tax, paying_without_tax, paying_tax, unpaid_with_tax, unpaid_without_tax, unpaid_tax, ticket_status,
|
||||
ticketed_with_tax, ticketed_without_tax, ticketed_tax, ticketing_with_tax, ticketing_without_tax, ticketing_tax,
|
||||
unticketed_with_tax, unticketed_without_tax, unticketed_tax, create_time,update_time)
|
||||
select order_code, receivable_with_tax, receivable_without_tax, receivable_tax, charge_status,
|
||||
charged_without_tax,
|
||||
gross_profit, gross_profit_rate, biz_charge_date, finance_charge_date, receipt_status, received_with_tax,
|
||||
received_without_tax, received_tax, receiving_with_tax, receiving_without_tax, receiving_tax,
|
||||
unreceived_with_tax,
|
||||
unreceived_without_tax, unreceived_tax, invoice_status, invoiced_with_tax, invoiced_without_tax, invoiced_tax,
|
||||
invoicing_with_tax, invoicing_without_tax, invoicing_tax, uninvoiced_with_tax, uninvoiced_without_tax,
|
||||
uninvoiced_tax,
|
||||
payable_with_tax, payable_without_tax, payable_tax, payment_status, paid_with_tax, paid_without_tax, paid_tax,
|
||||
paying_with_tax, paying_without_tax, paying_tax, unpaid_with_tax, unpaid_without_tax, unpaid_tax, ticket_status,
|
||||
ticketed_with_tax, ticketed_without_tax, ticketed_tax, ticketing_with_tax, ticketing_without_tax, ticketing_tax,
|
||||
unticketed_with_tax, unticketed_without_tax, unticketed_tax, now(),now() from
|
||||
oms_finance_operate_report_detail t1
|
||||
<where>
|
||||
<if test="date != null">
|
||||
t1.update_time <![CDATA[ >= ]]> #{date}
|
||||
</if>
|
||||
</where>
|
||||
ON DUPLICATE KEY UPDATE
|
||||
receivable_with_tax = IFNULL(VALUES(receivable_with_tax), oms_finance_operate_report.receivable_with_tax),
|
||||
receivable_without_tax = IFNULL(VALUES(receivable_without_tax), oms_finance_operate_report.receivable_without_tax),
|
||||
receivable_tax = IFNULL(VALUES(receivable_tax), oms_finance_operate_report.receivable_tax),
|
||||
charge_status = IFNULL(VALUES(charge_status), oms_finance_operate_report.charge_status),
|
||||
charged_without_tax = IFNULL(VALUES(charged_without_tax), oms_finance_operate_report.charged_without_tax),
|
||||
gross_profit = IFNULL(VALUES(gross_profit), oms_finance_operate_report.gross_profit),
|
||||
gross_profit_rate = IFNULL(VALUES(gross_profit_rate), oms_finance_operate_report.gross_profit_rate),
|
||||
biz_charge_date = IFNULL(VALUES(biz_charge_date), oms_finance_operate_report.biz_charge_date),
|
||||
finance_charge_date = IFNULL(VALUES(finance_charge_date), oms_finance_operate_report.finance_charge_date),
|
||||
receipt_status = IFNULL(VALUES(receipt_status), oms_finance_operate_report.receipt_status),
|
||||
received_with_tax = IFNULL(VALUES(received_with_tax), oms_finance_operate_report.received_with_tax),
|
||||
received_without_tax = IFNULL(VALUES(received_without_tax), oms_finance_operate_report.received_without_tax),
|
||||
received_tax = IFNULL(VALUES(received_tax), oms_finance_operate_report.received_tax),
|
||||
receiving_with_tax = IFNULL(VALUES(receiving_with_tax), oms_finance_operate_report.receiving_with_tax),
|
||||
receiving_without_tax = IFNULL(VALUES(receiving_without_tax), oms_finance_operate_report.receiving_without_tax),
|
||||
receiving_tax = IFNULL(VALUES(receiving_tax), oms_finance_operate_report.receiving_tax),
|
||||
unreceived_with_tax = IFNULL(VALUES(unreceived_with_tax), oms_finance_operate_report.unreceived_with_tax),
|
||||
unreceived_without_tax = IFNULL(VALUES(unreceived_without_tax), oms_finance_operate_report.unreceived_without_tax),
|
||||
unreceived_tax = IFNULL(VALUES(unreceived_tax), oms_finance_operate_report.unreceived_tax),
|
||||
invoice_status = IFNULL(VALUES(invoice_status), oms_finance_operate_report.invoice_status),
|
||||
invoiced_with_tax = IFNULL(VALUES(invoiced_with_tax), oms_finance_operate_report.invoiced_with_tax),
|
||||
invoiced_without_tax = IFNULL(VALUES(invoiced_without_tax), oms_finance_operate_report.invoiced_without_tax),
|
||||
invoiced_tax = IFNULL(VALUES(invoiced_tax), oms_finance_operate_report.invoiced_tax),
|
||||
invoicing_with_tax = IFNULL(VALUES(invoicing_with_tax), oms_finance_operate_report.invoicing_with_tax),
|
||||
invoicing_without_tax = IFNULL(VALUES(invoicing_without_tax), oms_finance_operate_report.invoicing_without_tax),
|
||||
invoicing_tax = IFNULL(VALUES(invoicing_tax), oms_finance_operate_report.invoicing_tax),
|
||||
uninvoiced_with_tax = IFNULL(VALUES(uninvoiced_with_tax),oms_finance_operate_report.uninvoiced_with_tax),
|
||||
uninvoiced_without_tax = IFNULL(VALUES(uninvoiced_without_tax), oms_finance_operate_report.uninvoiced_without_tax),
|
||||
uninvoiced_tax = IFNULL(VALUES(uninvoiced_tax), oms_finance_operate_report.uninvoiced_tax),
|
||||
payable_with_tax = IFNULL(VALUES(payable_with_tax), oms_finance_operate_report.payable_with_tax),
|
||||
payable_without_tax = IFNULL(VALUES(payable_without_tax), oms_finance_operate_report.payable_without_tax),
|
||||
payable_tax = IFNULL(VALUES(payable_tax), oms_finance_operate_report.payable_tax),
|
||||
payment_status = IFNULL(VALUES(payment_status), oms_finance_operate_report.payment_status),
|
||||
paid_with_tax = IFNULL(VALUES(paid_with_tax), oms_finance_operate_report.paid_with_tax),
|
||||
paid_without_tax = IFNULL(VALUES(paid_without_tax), oms_finance_operate_report.paid_without_tax),
|
||||
paid_tax = IFNULL(VALUES(paid_tax), oms_finance_operate_report.paid_tax),
|
||||
paying_with_tax = IFNULL(VALUES(paying_with_tax), oms_finance_operate_report.paying_with_tax),
|
||||
paying_without_tax = IFNULL(VALUES(paying_without_tax), oms_finance_operate_report.paying_without_tax),
|
||||
paying_tax = IFNULL(VALUES(paying_tax), oms_finance_operate_report.paying_tax),
|
||||
unpaid_with_tax = IFNULL(VALUES(unpaid_with_tax), oms_finance_operate_report.unpaid_with_tax),
|
||||
unpaid_without_tax = IFNULL(VALUES(unpaid_without_tax), oms_finance_operate_report.unpaid_without_tax),
|
||||
unpaid_tax = IFNULL(VALUES(unpaid_tax), oms_finance_operate_report.unpaid_tax),
|
||||
ticket_status = IFNULL(VALUES(ticket_status), oms_finance_operate_report.ticket_status),
|
||||
ticketed_with_tax = IFNULL(VALUES(ticketed_with_tax), oms_finance_operate_report.ticketed_with_tax),
|
||||
ticketed_without_tax = IFNULL(VALUES(ticketed_without_tax), oms_finance_operate_report.ticketed_without_tax),
|
||||
ticketed_tax = IFNULL(VALUES(ticketed_tax), oms_finance_operate_report.ticketed_tax),
|
||||
ticketing_with_tax = IFNULL(VALUES(ticketing_with_tax), oms_finance_operate_report.ticketing_with_tax),
|
||||
ticketing_without_tax = IFNULL(VALUES(ticketing_without_tax), oms_finance_operate_report.ticketing_without_tax),
|
||||
ticketing_tax = IFNULL(VALUES(ticketing_tax), oms_finance_operate_report.ticketing_tax),
|
||||
unticketed_with_tax = IFNULL(VALUES(unticketed_with_tax), oms_finance_operate_report.unticketed_with_tax),
|
||||
unticketed_without_tax = IFNULL(VALUES(unticketed_without_tax), oms_finance_operate_report.unticketed_without_tax),
|
||||
unticketed_tax = IFNULL(VALUES(unticketed_tax), oms_finance_operate_report.unticketed_tax),
|
||||
update_time = now()
|
||||
</update>
|
||||
|
||||
<delete id="deleteOmsFinanceOperateReportById" parameterType="Long">
|
||||
delete from oms_finance_operate_report where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteOmsFinanceOperateReportByIds" parameterType="String">
|
||||
delete from oms_finance_operate_report where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -51,7 +51,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
t1.create_time,
|
||||
t1.update_by,
|
||||
t1.update_time,
|
||||
t1.tax_rate,
|
||||
t1.remark,
|
||||
t1.del_flag
|
||||
from oms_payable_bill t1
|
||||
|
|
@ -194,28 +193,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
|
||||
</select>
|
||||
<select id="listPayable" resultType="com.ruoyi.sip.domain.OmsPayableBill">
|
||||
<include refid="selectOmsPayableBillVo"/>
|
||||
<where>
|
||||
<if test="params.startUpdateTime !=null or params.endUpdateTime !=null">
|
||||
<choose>
|
||||
<when test="params.startUpdateTime !=null and params.endUpdateTime !=null">
|
||||
and t1.update_time between #{params.startUpdateTime} and #{params.endUpdateTime}
|
||||
</when>
|
||||
<when test="params.startUpdateTime !=null">
|
||||
and t1.update_time <![CDATA[ >= ]]> #{params.startUpdateTime}
|
||||
</when>
|
||||
<when test="params.endUpdateTime !=null">
|
||||
and t1.update_time <![CDATA[ <= ]]> #{params.endUpdateTime}
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
<if test="orderCodeList !=null and orderCodeList.size>0">
|
||||
and t1.order_code in
|
||||
<foreach item="item" collection="orderCodeList" separator="," open="(" close=")" index="">#{item}</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<insert id="insertOmsPayableBill" parameterType="OmsPayableBill" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into oms_payable_bill
|
||||
|
|
|
|||
|
|
@ -151,30 +151,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
left join project_info t4 on t3.project_id = t4.id
|
||||
left join oms_vendor_info t5 on t2.vendor_code = t5.vendor_code
|
||||
|
||||
</select>
|
||||
<select id="listByPaymentUpdateTime" resultType="com.ruoyi.sip.domain.OmsPayablePaymentDetail">
|
||||
SELECT
|
||||
t1.payment_amount,t1.payment_amount_tax,t1.payment_amount_without_tax,t2.payment_status,t3.order_code
|
||||
FROM
|
||||
oms_payable_payment_detail t1
|
||||
INNER JOIN oms_payment_bill t2 ON t1.payment_bill_code = t2.payment_bill_code
|
||||
left join oms_payable_bill t3 on t1.payable_bill_id=t3.id
|
||||
<where>
|
||||
<if test="startTime !=null or endTime !=null">
|
||||
<choose>
|
||||
<when test="startTime !=null and endTime !=null">
|
||||
and t2.update_time between #{startTime} and #{endTime}
|
||||
</when>
|
||||
<when test="startTime !=null">
|
||||
and t2.update_time <![CDATA[ >= ]]> #{startTime}
|
||||
</when>
|
||||
<when test="endTime !=null">
|
||||
and t2.update_time <![CDATA[ <= ]]> #{endTime}
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
<update id="clearWriteOffByWriteOffId" parameterType="java.lang.Long">
|
||||
|
|
|
|||
|
|
@ -178,33 +178,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
WHERE receivable_bill_code LIKE CONCAT(#{codePrefix}, '%')
|
||||
AND receivable_bill_code REGEXP CONCAT('^', #{codePrefix}, '[0-9]+$')
|
||||
</select>
|
||||
<select id="listReceivableBill" resultType="com.ruoyi.sip.domain.OmsReceivableBill">
|
||||
select t1.id, t1.receivable_bill_code, t1.last_receipt_plan_id, t1.last_invoice_plan_id, t1.partner_code, t1.partner_name, t1.order_code, t1.inventory_code, t1.product_type,
|
||||
t1.total_price_with_tax, t1.total_price_without_tax, t1.tax_rate, t1.tax_amount, t1.received_amount, t1.unreceived_amount,
|
||||
t1.invoiced_amount, t1.uninvoiced_amount, t1.create_by, t1.create_time, t1.update_by, t1.update_time, t1.remark, t1.del_flag
|
||||
from oms_receivable_bill t1
|
||||
<where>
|
||||
<if test="orderCodeList != null and orderCodeList.size>0">
|
||||
and t1.order_code in
|
||||
<foreach item="orderCode" collection="orderCodeList" separator="," open="(" close=")">
|
||||
#{orderCode}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="params.startUpdateTime !=null or params.endUpdateTime !=null">
|
||||
<choose>
|
||||
<when test="params.startUpdateTime !=null and params.endUpdateTime !=null">
|
||||
and t1.update_time between #{params.startUpdateTime} and #{params.endUpdateTime}
|
||||
</when>
|
||||
<when test="params.startUpdateTime !=null">
|
||||
and t1.update_time <![CDATA[ >= ]]> #{params.startUpdateTime}
|
||||
</when>
|
||||
<when test="params.endUpdateTime !=null">
|
||||
and t1.update_time <![CDATA[ <= ]]> #{params.endUpdateTime}
|
||||
</when>
|
||||
</choose>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<update id="updateBatchReceivableBillInvoiceInfo" parameterType="java.util.List">
|
||||
<foreach collection="list" item="item" separator=";">
|
||||
|
|
|
|||
|
|
@ -141,21 +141,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
</choose>
|
||||
</if>
|
||||
<if test="params.beginDeliveryTime != null or params.endDeliveryTime != null">
|
||||
<choose>
|
||||
<when test="params.beginDeliveryTime != null and params.endDeliveryTime != null">
|
||||
and t1.delivery_time between date_format(#{params.beginDeliveryTime}, '%Y-%m-%d 00:00:00') and
|
||||
date_format(#{params.endDeliveryTime}, '%Y-%m-%d 23:59:59')
|
||||
</when>
|
||||
<when test="params.beginDeliveryTime != null">
|
||||
and t1.delivery_time <![CDATA[ >= ]]> date_format(#{params.beginDeliveryTime}, '%Y-%m-%d 00:00:00')
|
||||
</when>
|
||||
<when test="params.endDeliveryTime != null">
|
||||
and t1.delivery_time <![CDATA[ <= ]]> date_format(#{params.endDeliveryTime}, '%Y-%m-%d 23:59:59')
|
||||
</when>
|
||||
|
||||
</choose>
|
||||
</if>
|
||||
<if test="updateTimeStart != null or updateTimeEnd != null">
|
||||
<choose>
|
||||
<when test="updateTimeStart != null and updateTimeEnd != null">
|
||||
|
|
@ -203,23 +188,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
</choose>
|
||||
</if>
|
||||
<if test="params.beginEstimatedOrderTime != null or params.endEstimatedOrderTime != null">
|
||||
<choose>
|
||||
<when test="params.beginEstimatedOrderTime != null and params.endEstimatedOrderTime != null">
|
||||
and t2.estimated_order_time between date_format(#{params.beginEstimatedOrderTime}, '%Y-%m-%d 00:00:00')
|
||||
and date_format(#{params.endEstimatedOrderTime}, '%Y-%m-%d 23:59:59')
|
||||
</when>
|
||||
<when test="params.beginEstimatedOrderTime != null">
|
||||
and t2.estimated_order_time <![CDATA[ >= ]]> date_format(#{params.beginEstimatedOrderTime}, '%Y-%m-%d
|
||||
00:00:00')
|
||||
</when>
|
||||
<when test="params.endEstimatedOrderTime != null">
|
||||
and t2.estimated_order_time <![CDATA[ <= ]]> date_format(#{params.endEstimatedOrderTime}, '%Y-%m-%d
|
||||
23:59:59')
|
||||
</when>
|
||||
|
||||
</choose>
|
||||
</if>
|
||||
<if test="orderEndTimeStart != null or orderEndTimeEnd != null">
|
||||
<choose>
|
||||
<when test="orderEndTimeStart != null and orderEndTimeEnd != null">
|
||||
|
|
@ -235,21 +203,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
</choose>
|
||||
</if>
|
||||
<if test="params.beginOrderEndTime != null or params.endOrderEndTime != null">
|
||||
<choose>
|
||||
<when test="params.beginOrderEndTime != null and params.endOrderEndTime != null">
|
||||
and t1.order_end_time between date_format(#{params.beginOrderEndTime}, '%Y-%m-%d 00:00:00') and
|
||||
date_format(#{params.endOrderEndTime}, '%Y-%m-%d 23:59:59')
|
||||
</when>
|
||||
<when test="params.beginOrderEndTime != null">
|
||||
and t1.order_end_time <![CDATA[ >= ]]> date_format(#{params.beginOrderEndTime}, '%Y-%m-%d 00:00:00')
|
||||
</when>
|
||||
<when test="params.endOrderEndTime != null">
|
||||
and t1.order_end_time <![CDATA[ <= ]]> date_format(#{params.endOrderEndTime}, '%Y-%m-%d 23:59:59')
|
||||
</when>
|
||||
|
||||
</choose>
|
||||
</if>
|
||||
<if test="approve!=null and approve!=''">and t1.order_code in (select business_key from bu_todo where
|
||||
process_key in ('order_approve_online','order_approve_offline') and approve_user = #{approve} and
|
||||
task_name != '售前')
|
||||
|
|
|
|||
Loading…
Reference in New Issue