Compare commits

...

3 Commits

Author SHA1 Message Date
chenhao d3bbf2da62 feat(finance): 更新开票单详情和操作功能
- 修改详情抽屉中的字段显示,将创建时间改为预计开票时间
- 添加开票状态、审批节点、审批状态和审批通过时间显示
- 更新销售-应收单表格的数据源和字段映射
- 扩展操作列宽度以适应更多按钮
- 添加发票按钮的显示条件控制
- 添加申请开票按钮的显示条件控制
- 添加申请红冲按钮的显示条件控制
- 实现撤销功能按钮和相关逻辑
- 添加撤销发票API接口
- 优化票据类型选择的交互逻辑
- 添加发票金额验证和自动计算功能
- 实现附件上传的权限控制
- 完善发票撤销的业务逻辑处理
2025-12-23 19:52:57 +08:00
chenhao 693899f45c Merge branch 'refs/heads/master' into dev_1.0.0 2025-12-23 16:00:55 +08:00
chenhao 4f781c9f2b feat(file): 优化文件上传下载功能并重构文件日志实体
- 重构OmsFileLog实体类,添加文件路径、大小、类型等属性
- 更新文件上传接口,使用OmsFileLog对象存储文件信息并返回完整对象
- 修改文件下载接口,使用正确的文件路径和文件名进行下载
- 优化前端文件上传组件,统一处理单文件和多文件上传返回格式
- 添加文件列表变化事件监听,完善文件上传成功回调逻辑
- 在采购订单中集成文件上传功能,支持附件关联和展示
- 修复流程审批中的版本判断逻辑,优化任务处理流程
- 添加导出功能的数据权限验证,确保数据安全性
2025-12-23 15:59:21 +08:00
32 changed files with 669 additions and 215 deletions

View File

@ -82,3 +82,11 @@ export function applyInvoice(data) {
data: data data: data
}) })
} }
// 撤销销售收票单
export function revokeInvoice(id) {
return request({
url: '/finance/invoice/revoke/' + id,
method: 'delete'
})
}

View File

@ -29,9 +29,9 @@
<!-- 文件列表 --> <!-- 文件列表 -->
<transition-group ref="uploadFileList" class="upload-file-list el-upload-list el-upload-list--text" name="el-fade-in-linear" tag="ul"> <transition-group ref="uploadFileList" class="upload-file-list el-upload-list el-upload-list--text" name="el-fade-in-linear" tag="ul">
<li :key="file.url" class="el-upload-list__item ele-upload-list__item-content" v-for="(file, index) in fileList"> <li :key="file.id" class="el-upload-list__item ele-upload-list__item-content" v-for="(file, index) in fileList">
<el-link :href="`${baseUrl}${file.url}`" :underline="false" target="_blank"> <el-link :href="`${baseUrl}${file.filePath}`" :underline="false" target="_blank">
<span class="el-icon-document"> {{ getFileName(file.name) }} </span> <span class="el-icon-document"> {{ getFileName(file.fileName) }} </span>
</el-link> </el-link>
<div class="ele-upload-list__item-content-action"> <div class="ele-upload-list__item-content-action">
<el-link :underline="false" @click="handleDelete(index)" type="danger" v-if="!disabled"></el-link> <el-link :underline="false" @click="handleDelete(index)" type="danger" v-if="!disabled"></el-link>
@ -112,6 +112,7 @@ export default {
const movedItem = this.fileList.splice(evt.oldIndex, 1)[0] const movedItem = this.fileList.splice(evt.oldIndex, 1)[0]
this.fileList.splice(evt.newIndex, 0, movedItem) this.fileList.splice(evt.newIndex, 0, movedItem)
this.$emit("input", this.listToString(this.fileList)) this.$emit("input", this.listToString(this.fileList))
this.$emit("file-list-changed", this.fileList)
} }
}) })
}) })
@ -188,8 +189,8 @@ export default {
}, },
// //
handleUploadSuccess(res, file) { handleUploadSuccess(res, file) {
if (res.code === 200) { if (res.code === 0) {
this.uploadList.push({ name: res.fileName, url: res.fileName }) this.uploadList.push({ ...res.data })
this.uploadedSuccessfully() this.uploadedSuccessfully()
} else { } else {
this.number-- this.number--
@ -203,6 +204,7 @@ export default {
handleDelete(index) { handleDelete(index) {
this.fileList.splice(index, 1) this.fileList.splice(index, 1)
this.$emit("input", this.listToString(this.fileList)) this.$emit("input", this.listToString(this.fileList))
this.$emit("file-list-changed", this.fileList)
}, },
// //
uploadedSuccessfully() { uploadedSuccessfully() {
@ -211,6 +213,7 @@ export default {
this.uploadList = [] this.uploadList = []
this.number = 0 this.number = 0
this.$emit("input", this.listToString(this.fileList)) this.$emit("input", this.listToString(this.fileList))
this.$emit("file-list-changed", this.fileList)
this.$modal.closeLoading() this.$modal.closeLoading()
} }
}, },

View File

@ -15,7 +15,7 @@
<div class="detail-item">销售-开票单编号: {{ detail.invoiceBillCode }}</div> <div class="detail-item">销售-开票单编号: {{ detail.invoiceBillCode }}</div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="detail-item">销售-生成时间: {{ detail.createTime }}</div> <div class="detail-item">预计开票时间: {{ detail.createTime }}</div>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<div class="detail-item">进货商名称: {{ detail.partnerName }}</div> <div class="detail-item">进货商名称: {{ detail.partnerName }}</div>
@ -45,14 +45,28 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="8">
<div class="detail-item">票据类型: <div class="detail-item">开票状态:
<span class="item-value"><dict-tag :options="dict.type.finance_invoice_type" :value="detail.invoiceType"/></span> <dict-tag :options="dict.type.invoice_bill_status" :value="detail.invoiceStatus"/>
</div> </div>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="8">
<div class="detail-item">发票/红冲: <div class="detail-item">审批节点: {{ detail.approveNode }}</div>
{{detail.totalPriceWithTax<0?'':''}} </el-col>
<el-col :span="8">
<div class="detail-item">审批状态:
<dict-tag :options="dict.type.approve_status" :value="detail.approveStatus"/></div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<div class="detail-item">审批通过时间 :{{detail.approveTime}}
</div>
</el-col>
<el-col :span="16">
<div class="detail-item">票据类型:
<span class="item-value"><dict-tag :options="dict.type.finance_invoice_type" :value="detail.invoiceType"/></span>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
@ -92,45 +106,20 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20">
<el-col :span="8">
<div class="detail-item">备注: {{ detail.remark }}</div>
</el-col>
<el-col :span="8">
<div class="detail-item">上传人姓名: {{ detail.createByName }}</div>
</el-col>
<el-col :span="8">
<div class="detail-item">开票状态:
<dict-tag :options="dict.type.invoice_bill_status" :value="detail.invoiceStatus"/>
</div>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<div class="detail-item">审批节点: {{ detail.approveNode }}</div>
</el-col>
<el-col :span="8">
<div class="detail-item">审批状态:
<dict-tag :options="dict.type.approve_status" :value="detail.approveStatus"/></div>
</el-col>
<el-col :span="8">
<div class="detail-item">审批通过时间 :{{detail.approveTime}}
</div>
</el-col>
</el-row>
</div> </div>
</div> </div>
<div class="section"> <div class="section">
<el-divider content-position="left">销售-应收单</el-divider> <el-divider content-position="left">销售-应收单</el-divider>
<el-table :data="detail.detailList"> <el-table :data="detail.detailDTOList">
<el-table-column type="index" label="序号" width="50"></el-table-column> <el-table-column type="index" label="序号" width="50"></el-table-column>
<el-table-column property="projectCode" label="项目编号"></el-table-column> <!-- <el-table-column property="projectCode" label="项目编号"></el-table-column>-->
<el-table-column property="projectName" label="项目名称"></el-table-column> <el-table-column property="projectName" label="项目名称"></el-table-column>
<el-table-column property="receivableBillCode" label="销售应收单编号"></el-table-column> <el-table-column property="receivableBillCode" label="销售-应收单编号"></el-table-column>
<el-table-column property="totalPriceWithTax" label="含税总价"></el-table-column> <el-table-column property="totalPriceWithTax" label="含税总价(元)"></el-table-column>
<el-table-column property="invoiceAmount" label="本次收票金额"></el-table-column> <el-table-column property="receiptAmount" label="本次开票金额"></el-table-column>
<el-table-column property="invoiceRate" label="本次收票比例(%)"></el-table-column> <el-table-column property="receiptRate" label="本次开票比例(%)"></el-table-column>
</el-table> </el-table>
</div> </div>
</div> </div>

View File

@ -5,7 +5,7 @@
</div> </div>
<div v-else class="receipt-dialog-body"> <div v-else class="receipt-dialog-body">
<div v-if="canUpload" class="upload-btn-container"> <div v-if="canUpload" class="upload-btn-container">
<el-button type="primary" icon="el-icon-upload" @click="openUploadDialog">{{ titleText }}</el-button> <el-button type="primary" v-hasPermi="['finance:invoice:upload']"icon="el-icon-upload" @click="openUploadDialog">{{ titleText }}</el-button>
</div> </div>
<el-timeline v-if="attachments.length > 0"> <el-timeline v-if="attachments.length > 0">
@ -20,7 +20,7 @@
<div class="receipt-details"> <div class="receipt-details">
<div class="detail-item"> <div class="detail-item">
<span class="item-label">票据类型</span> <span class="item-label">票据类型</span>
<span class="item-value"><dict-tag :options="dict.type.finance_invoice_type" :value="attachment.ticketType"/></span> <span class="item-value"><dict-tag :options="dict.type.finance_invoice_type" :value="invoiceData.invoiceType"/></span>
</div> </div>
<div class="detail-item"> <div class="detail-item">
<span class="item-label">{{ titleText }}</span> <span class="item-label">{{ titleText }}</span>
@ -113,8 +113,8 @@
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form :model="uploadForm" ref="uploadForm" :rules="rules" label-width="120px" size="medium" > <el-form :model="uploadForm" ref="uploadForm" :rules="rules" label-width="120px" size="medium" >
<el-form-item label="票据类型" prop="ticketType" required> <el-form-item label="票据类型" prop="invoiceType" required>
<el-select v-model="uploadForm.ticketType" placeholder="请选择票据类型"> <el-select v-model="uploadForm.invoiceType" placeholder="请选择票据类型" @change="handleTypeChange">
<el-option <el-option
v-for="item in dict.type.finance_invoice_type" v-for="item in dict.type.finance_invoice_type"
:key="item.value" :key="item.value"
@ -123,7 +123,7 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="票附件" prop="file" required> <el-form-item label="票附件" prop="file" required>
<div style="display: flex; flex-direction: column; align-items: flex-start;"> <div style="display: flex; flex-direction: column; align-items: flex-start;">
<el-upload <el-upload
ref="upload" ref="upload"
@ -140,22 +140,22 @@
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="含税总价"> <el-form-item label="含税总价">
<span>{{ invoiceData.invoicePriceWithTax }}</span> <span>{{ invoiceData.totalPriceWithTax }}</span>
</el-form-item> </el-form-item>
<el-form-item label="发票含税总价" prop="ticketPriceWithTax" required> <el-form-item label="发票含税总价" prop="invoicePriceWithTax" required>
<el-input v-model="uploadForm.ticketPriceWithTax" placeholder="请输入发票含税总价"></el-input> <el-input v-model="uploadForm.invoicePriceWithTax" placeholder="请输入发票含税总价"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="未税总价"> <el-form-item label="未税总价">
<span>{{ invoiceData.invoicePriceWithoutTax }}</span> <span>{{ invoiceData.totalPriceWithoutTax }}</span>
</el-form-item> </el-form-item>
<el-form-item label="发票未税总价" prop="ticketPriceWithoutTax" required> <el-form-item label="发票未税总价" prop="invoicePriceWithoutTax" required>
<el-input v-model="uploadForm.ticketPriceWithoutTax" placeholder="请输入发票未税总价"></el-input> <el-input v-model="uploadForm.invoicePriceWithoutTax" placeholder="请输入发票未税总价" @input="handleWithoutTaxChange"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="税额"> <el-form-item label="税额">
<span>{{ invoiceData.taxAmount }}</span> <span>{{ invoiceData.taxAmount }}</span>
</el-form-item> </el-form-item>
<el-form-item label="发票税额" prop="ticketAmount" required> <el-form-item label="发票税额" prop="invoiceAmount" required>
<el-input v-model="uploadForm.ticketAmount" placeholder="请输入发票税额"></el-input> <el-input v-model="uploadForm.invoiceAmount" placeholder="请输入发票税额" @input="handleAmountChange"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="备注"> <el-form-item label="备注">
<el-input <el-input
@ -220,21 +220,21 @@ export default {
// Upload Dialog Data // Upload Dialog Data
uploadDialogVisible: false, uploadDialogVisible: false,
uploadForm: { uploadForm: {
ticketPriceWithTax: '', invoicePriceWithTax: '',
ticketPriceWithoutTax: '', invoicePriceWithoutTax: '',
ticketAmount: '', invoiceAmount: '',
ticketType: '', invoiceType: this.invoiceData.invoiceType,
remark: '', remark: '',
file: null file: null
}, },
rules: { rules: {
ticketPriceWithTax: [ invoicePriceWithTax: [
{ required: true, message: "请输入发票含税总价", trigger: "blur" } { required: true, message: "请输入发票含税总价", trigger: "blur" }
], ],
ticketPriceWithoutTax: [ invoicePriceWithoutTax: [
{ required: true, message: "请输入发票未税总价", trigger: "blur" } { required: true, message: "请输入发票未税总价", trigger: "blur" }
], ],
ticketAmount: [ invoiceAmount: [
{ required: true, message: "请输入发票税额", trigger: "blur" } { required: true, message: "请输入发票税额", trigger: "blur" }
] ]
}, },
@ -281,7 +281,7 @@ export default {
fetchAttachments() { fetchAttachments() {
if (!this.invoiceData.id) return; if (!this.invoiceData.id) return;
this.loading = true; this.loading = true;
getInvoiceAttachments(this.invoiceData.id, { type: 'ticket' }) getInvoiceAttachments(this.invoiceData.id, { type: 'invoice' })
.then(response => { .then(response => {
const data = response.data || []; const data = response.data || [];
data.sort((a, b) => new Date(b.createTime) - new Date(a.createTime)); data.sort((a, b) => new Date(b.createTime) - new Date(a.createTime));
@ -339,10 +339,10 @@ export default {
// New Upload Dialog Methods // New Upload Dialog Methods
openUploadDialog() { openUploadDialog() {
this.uploadForm = { this.uploadForm = {
ticketPriceWithTax: '', invoicePriceWithTax: '',
ticketPriceWithoutTax: '', invoicePriceWithoutTax: '',
ticketAmount: '', invoiceAmount: '',
ticketType: '', invoiceType: '',
remark: '', remark: '',
file: null file: null
}; };
@ -358,6 +358,26 @@ export default {
this.uploadForm.file = null; this.uploadForm.file = null;
this.previewUrl = ''; this.previewUrl = '';
}, },
handleTypeChange(val) {
if (val === '2') {
this.uploadForm.invoiceAmount = '0';
this.handleAmountChange('0');
}
},
handleWithoutTaxChange(val) {
const total = parseFloat(this.uploadForm.invoicePriceWithTax);
const withoutTax = parseFloat(val);
if (!isNaN(total) && !isNaN(withoutTax)) {
this.uploadForm.invoiceAmount = (total - withoutTax).toFixed(2);
}
},
handleAmountChange(val) {
const total = parseFloat(this.uploadForm.invoicePriceWithTax);
const tax = parseFloat(val);
if (!isNaN(total) && !isNaN(tax)) {
this.uploadForm.invoicePriceWithoutTax = (total - tax).toFixed(2);
}
},
handleFileChange(file) { handleFileChange(file) {
const isLt2M = file.size / 1024 / 1024 < 2; const isLt2M = file.size / 1024 / 1024 < 2;
const isAcceptedType = ['image/jpeg', 'image/png', 'application/pdf'].includes(file.raw.type); const isAcceptedType = ['image/jpeg', 'image/png', 'application/pdf'].includes(file.raw.type);
@ -388,15 +408,50 @@ export default {
return; return;
} }
const limitTotal = parseFloat(this.invoiceData.totalPriceWithTax);
const inputTotal = parseFloat(this.uploadForm.invoicePriceWithTax);
const inputWithoutTax = parseFloat(this.uploadForm.invoicePriceWithoutTax);
const inputTax = parseFloat(this.uploadForm.invoiceAmount);
if (!isNaN(limitTotal)) {
if (limitTotal >= 0) {
if (!isNaN(inputTotal) && inputTotal > limitTotal) {
this.$message.warning("发票含税总价不能超过开票单含税总价");
return;
}
if (!isNaN(inputWithoutTax) && inputWithoutTax < 0) {
this.$message.warning("发票未税总价不能为负数");
return;
}
if (!isNaN(inputTax) && inputTax < 0) {
this.$message.warning("发票税额不能为负数");
return;
}
} else {
if (!isNaN(inputTotal) && inputTotal < limitTotal) {
this.$message.warning("发票含税总价不能小于开票单含税总价");
return;
}
if (!isNaN(inputWithoutTax) && inputWithoutTax > 0) {
this.$message.warning("发票未税总价不能为正数");
return;
}
if (!isNaN(inputTax) && inputTax > 0) {
this.$message.warning("发票税额不能为正数");
return;
}
}
}
const formData = new FormData(); const formData = new FormData();
formData.append("file", this.uploadForm.file); formData.append("file", this.uploadForm.file);
formData.append("id", this.invoiceData.id); formData.append("id", this.invoiceData.id);
formData.append("remark", this.uploadForm.remark); formData.append("remark", this.uploadForm.remark);
formData.append("ticketPriceWithTax", this.uploadForm.ticketPriceWithTax); formData.append("invoicePriceWithTax", this.uploadForm.invoicePriceWithTax);
formData.append("ticketPriceWithoutTax", this.uploadForm.ticketPriceWithoutTax); formData.append("invoicePriceWithoutTax", this.uploadForm.invoicePriceWithoutTax);
formData.append("ticketAmount", this.uploadForm.ticketAmount); formData.append("invoiceAmount", this.uploadForm.invoiceAmount);
formData.append("ticketType", this.uploadForm.ticketType); formData.append("invoiceType", this.uploadForm.invoiceType);
this.invoiceData.invoiceType=this.uploadForm.invoiceType
uploadInvoiceAttachment(formData) uploadInvoiceAttachment(formData)
.then(response => { .then(response => {
this.$message.success("上传成功"); this.$message.success("上传成功");

View File

@ -158,7 +158,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="审批节点" align="center" prop="approveNode" width="200" fixed="right"/> <el-table-column label="审批节点" align="center" prop="approveNode" width="200" fixed="right"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200" fixed="right"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="300" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
@ -170,12 +170,14 @@
size="mini" size="mini"
type="text" type="text"
icon="el-icon-document" icon="el-icon-document"
v-show="scope.row.approveStatus==='2'"
@click="handleReceipt(scope.row)" @click="handleReceipt(scope.row)"
>发票</el-button> >发票</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-s-ticket" icon="el-icon-s-ticket"
v-show="scope.row.invoiceStatus==='1' &&(scope.row.approveStatus==='0'||scope.row.approveStatus==='3')"
@click="handleApplyInvoice(scope.row)" @click="handleApplyInvoice(scope.row)"
>申请开票</el-button> >申请开票</el-button>
<el-button <el-button
@ -189,9 +191,16 @@
size="mini" size="mini"
type="text" type="text"
icon="el-icon-refresh-left" icon="el-icon-refresh-left"
v-show="scope.row.approveStatus=='2'" v-show="scope.row.approveStatus === '2' && scope.row.invoiceStatus === '1'"
@click="handleRedRush(scope.row)" @click="handleRedRush(scope.row)"
>申请红冲</el-button> >申请红冲</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
v-show="(scope.row.invoiceBillType === 'FROM_RECEIVABLE' && (scope.row.approveStatus === '2' || scope.row.approveStatus === '3') && scope.row.invoiceStatus === '1') || (scope.row.invoiceBillType === 'RED_RUSH' && scope.row.approveStatus === '3')"
@click="handleRevoke(scope.row)"
>撤销</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -217,7 +226,7 @@
</template> </template>
<script> <script>
import {listInvoice, getInvoice, redRush, addInvoice, returnInvoice} from "@/api/finance/invoice"; import {listInvoice, getInvoice, redRush, addInvoice, returnInvoice, revokeInvoice} from "@/api/finance/invoice";
import { addDateRange } from "@/utils/ruoyi"; import { addDateRange } from "@/utils/ruoyi";
import DetailDrawer from "./components/DetailDrawer.vue"; import DetailDrawer from "./components/DetailDrawer.vue";
import AddForm from "./components/AddForm.vue"; import AddForm from "./components/AddForm.vue";
@ -353,6 +362,15 @@ export default {
this.getList(); this.getList();
this.$modal.msgSuccess("退回成功"); this.$modal.msgSuccess("退回成功");
}).catch(() => {}); }).catch(() => {});
},
/** 撤销按钮操作 */
handleRevoke(row) {
this.$modal.confirm('是否确认撤销收票单编号为"' + row.invoiceBillCode + '"的数据项?').then(function() {
return revokeInvoice(row.id);
}).then(() => {
this.getList();
this.$modal.msgSuccess("撤销成功");
}).catch(() => {});
} }
} }
}; };

View File

@ -107,6 +107,12 @@
<el-input type="textarea" v-model="form.remark" placeholder="请输入备注"></el-input> <el-input type="textarea" v-model="form.remark" placeholder="请输入备注"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24">
<el-form-item label="附件" prop="fileId">
<file-upload :value="fileList" @file-list-changed="handleFileListChanged" :limit="1"
:file-type="['png', 'jpg', 'jpeg', 'doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'txt', 'pdf']"/>
</el-form-item>
</el-col>
</el-row> </el-row>
<el-divider content-position="left">采购列表</el-divider> <el-divider content-position="left">采购列表</el-divider>
<el-table :data="form.omsPurchaseOrderItemList" style="width: 100%"> <el-table :data="form.omsPurchaseOrderItemList" style="width: 100%">
@ -196,13 +202,15 @@ import { getPurchaseorder, addPurchaseorder, updatePurchaseorder } from "@/api/s
import { listAllVendor } from "@/api/base/vendor"; import { listAllVendor } from "@/api/base/vendor";
import SelectUser from "@/views/system/user/selectUser"; import SelectUser from "@/views/system/user/selectUser";
import SelectProduct from "@/views/system/product/selectProduct"; import SelectProduct from "@/views/system/product/selectProduct";
import FileUpload from "@/components/FileUpload";
import { getDicts } from "@/api/system/dict/data"; import { getDicts } from "@/api/system/dict/data";
import TaxRateInput from "@/components/TaxRateInput/TaxInput.vue"; import TaxRateInput from "@/components/TaxRateInput/TaxInput.vue";
import request from '@/utils/request'
export default { export default {
name: "PurchaseOrderDetail", name: "PurchaseOrderDetail",
components: {TaxRateInput, SelectUser, SelectProduct }, components: {TaxRateInput, SelectUser, SelectProduct, FileUpload},
props: { props: {
orderData: { orderData: {
type: Object, type: Object,
@ -228,6 +236,7 @@ export default {
purchaserSelectOpen: false, purchaserSelectOpen: false,
// //
ownerSelectOpen: false, ownerSelectOpen: false,
fileList: [],
// //
form: { form: {
id: null, id: null,
@ -245,6 +254,7 @@ export default {
ownerId: null, ownerId: null,
ownerName: null, ownerName: null,
remark: null, remark: null,
fileId: null,
totalAmount: null, totalAmount: null,
status: 0, status: 0,
approveStatus: 0, approveStatus: 0,
@ -305,6 +315,12 @@ export default {
// vendorOptions // vendorOptions
this.$nextTick(() => { this.$nextTick(() => {
this.handleVendorChange(this.form.vendorId); this.handleVendorChange(this.form.vendorId);
// fileList
if (this.form.fileLog) {
this.fileList = [{...this.form.fileLog}]
} else {
this.fileList = [];
}
// omsPurchaseOrderItemList // omsPurchaseOrderItemList
if (this.form.omsPurchaseOrderItemList && this.form.omsPurchaseOrderItemList.length === 0) { if (this.form.omsPurchaseOrderItemList && this.form.omsPurchaseOrderItemList.length === 0) {
this.form.omsPurchaseOrderItemList.push(this.getNewPurchaseOrderItem()); this.form.omsPurchaseOrderItemList.push(this.getNewPurchaseOrderItem());
@ -328,6 +344,11 @@ export default {
if (this.orderData) { if (this.orderData) {
this.form = JSON.parse(JSON.stringify(this.orderData)); this.form = JSON.parse(JSON.stringify(this.orderData));
this.handleVendorChange(this.form.vendorId); this.handleVendorChange(this.form.vendorId);
if (this.form.fileLog) {
this.fileList = [{...this.form.fileLog}]
} else {
this.fileList = [];
}
if (this.form.omsPurchaseOrderItemList && this.form.omsPurchaseOrderItemList.length === 0) { if (this.form.omsPurchaseOrderItemList && this.form.omsPurchaseOrderItemList.length === 0) {
this.form.omsPurchaseOrderItemList.push(this.getNewPurchaseOrderItem()); this.form.omsPurchaseOrderItemList.push(this.getNewPurchaseOrderItem());
} }
@ -443,6 +464,10 @@ export default {
this.$set(this.form, 'ownerName', user.userName); this.$set(this.form, 'ownerName', user.userName);
this.ownerSelectOpen = false; this.ownerSelectOpen = false;
}, },
handleFileListChanged(fileList) {
this.fileList = fileList;
this.form.fileId = this.fileList.map(f => f.id).filter(id => !!id).join(',')
},
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
@ -480,6 +505,7 @@ export default {
ownerId: null, ownerId: null,
ownerName: null, ownerName: null,
remark: null, remark: null,
fileId: null,
totalAmount: null, totalAmount: null,
status: 0, status: 0,
approveStatus: 0, approveStatus: 0,
@ -503,6 +529,7 @@ export default {
this.purchaserSelectOpen = false; this.purchaserSelectOpen = false;
this.ownerSelectOpen = false; this.ownerSelectOpen = false;
this.productSelectOpen = false; this.productSelectOpen = false;
this.fileList = [];
this.editingProductIndex = -1; this.editingProductIndex = -1;
this.currentProductType = null; this.currentProductType = null;
if (this.$refs.form) { if (this.$refs.form) {

View File

@ -105,6 +105,12 @@
<span>{{ form.remark }}</span> <span>{{ form.remark }}</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" v-if="form.fileLog">
<el-form-item label="附件" prop="annex">
<el-link :href="getFileUrl(form.fileLog.filePath)" target="_blank" type="primary" style="margin-right: 10px">{{ form.fileLog.fileName }}</el-link>
<el-button size="mini" type="text" icon="el-icon-download" @click="downloadFile(form.fileLog)"></el-button>
</el-form-item>
</el-col>
</el-row> </el-row>
<el-divider content-position="left">采购列表</el-divider> <el-divider content-position="left">采购列表</el-divider>
<el-table :data="form.omsPurchaseOrderItemList" style="width: 100%"> <el-table :data="form.omsPurchaseOrderItemList" style="width: 100%">
@ -236,6 +242,7 @@ import {getDicts} from "@/api/system/dict/data";
export default { export default {
name: "PurchaseOrderDetailView", name: "PurchaseOrderDetailView",
dicts: ['approve_status'], dicts: ['approve_status'],
components: {},
props: { props: {
orderData: { orderData: {
type: Object, type: Object,
@ -267,6 +274,7 @@ export default {
ownerId: null, ownerId: null,
ownerName: null, ownerName: null,
remark: null, remark: null,
annex: null,
totalAmount: null, totalAmount: null,
status: 0, status: 0,
approveStatus: 0, approveStatus: 0,
@ -279,6 +287,9 @@ export default {
}; };
}, },
computed: { computed: {
annexList() {
return this.form.annex ? this.form.annex.split(',') : [];
},
totalAmountWithTax() { totalAmountWithTax() {
const total = this.form.omsPurchaseOrderItemList?.reduce((acc, cur) => acc + (cur.amountTotal || 0), 0); const total = this.form.omsPurchaseOrderItemList?.reduce((acc, cur) => acc + (cur.amountTotal || 0), 0);
return this.$calc.toFixed(total) || 0; return this.$calc.toFixed(total) || 0;
@ -365,6 +376,7 @@ export default {
ownerId: null, ownerId: null,
ownerName: null, ownerName: null,
remark: null, remark: null,
annex: null,
totalAmount: null, totalAmount: null,
status: 0, status: 0,
approveStatus: 0, approveStatus: 0,
@ -387,6 +399,22 @@ export default {
handleViewHistoryDetail(row) { handleViewHistoryDetail(row) {
this.$emit('view-history-detail', row); this.$emit('view-history-detail', row);
this.showHistoryDialog = false; // this.showHistoryDialog = false; //
},
getFileUrl(url) {
if (url && (url.indexOf('http://') === 0 || url.indexOf('https://') === 0)) {
return url;
}
return process.env.VUE_APP_BASE_API + url;
},
getFileName(url) {
if (url) {
return url.substring(url.lastIndexOf('/') + 1);
}
return '';
},
downloadFile(file) {
const url = `${process.env.VUE_APP_BASE_API}/project/order/file/download?filePath=${encodeURIComponent(file.filePath)}&fileName=${encodeURIComponent(file.fileName)}`;
window.location.href = url;
} }
} }
}; };

View File

@ -87,23 +87,16 @@ public class CommonController
String filePath = RuoYiConfig.getUploadPath(); String filePath = RuoYiConfig.getUploadPath();
// 上传并返回新文件名称 // 上传并返回新文件名称
String fileName = FileUploadUtils.upload(filePath, file); String fileName = FileUploadUtils.upload(filePath, file);
String url = serverConfig.getUrl() + fileName; OmsFileLog omsFileLog = new OmsFileLog();
OmsFileLog omsFileLog =OmsFileLog.builder() omsFileLog.setFilePath(fileName);
.url(url) omsFileLog.setNewFilename(FileUtils.getName(fileName));
.fileName(fileName) omsFileLog.setFileName(file.getOriginalFilename());
.newFilename(FileUtils.getName(fileName)) omsFileLog.setFileSize(file.getSize());
.originalFilename(file.getOriginalFilename()) omsFileLog.setFileType(file.getContentType());
.createBy(ShiroUtils.getUserId().toString()) omsFileLog.setCreateBy(ShiroUtils.getUserId().toString());
.createTime(DateUtil.date()) omsFileLog.setCreateTime(DateUtil.date());
.build();
fileLogService.insert(omsFileLog); fileLogService.insert(omsFileLog);
AjaxResult ajax = AjaxResult.success(); return AjaxResult.success(omsFileLog);
ajax.put("id", omsFileLog.getId());
ajax.put("url", url);
ajax.put("fileName", fileName);
ajax.put("newFileName", FileUtils.getName(fileName));
ajax.put("originalFilename", file.getOriginalFilename());
return ajax;
} }
catch (Exception e) catch (Exception e)
{ {
@ -117,9 +110,9 @@ public class CommonController
String localPath = RuoYiConfig.getProfile(); String localPath = RuoYiConfig.getProfile();
OmsFileLog omsFileLog = fileLogService.queryById(id); OmsFileLog omsFileLog = fileLogService.queryById(id);
// 下载名称 // 下载名称
String downloadPath = omsFileLog.getFileName().replace(Constants.RESOURCE_PREFIX,localPath); String downloadPath = omsFileLog.getFilePath().replace(Constants.RESOURCE_PREFIX,localPath);
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE); response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
FileUtils.setAttachmentResponseHeader(response, StringUtils.isEmpty(omsFileLog.getOriginalFilename()) ? omsFileLog.getNewFilename() : omsFileLog.getOriginalFilename()); FileUtils.setAttachmentResponseHeader(response, StringUtils.isEmpty(omsFileLog.getFileName()) ? omsFileLog.getFileName() : omsFileLog.getNewFilename());
FileUtils.writeBytes(downloadPath, response.getOutputStream()); FileUtils.writeBytes(downloadPath, response.getOutputStream());
} catch (Exception e) { } catch (Exception e) {
log.error("下载文件失败", e); log.error("下载文件失败", e);
@ -137,25 +130,22 @@ public class CommonController
{ {
// 上传文件路径 // 上传文件路径
String filePath = RuoYiConfig.getUploadPath(); String filePath = RuoYiConfig.getUploadPath();
List<String> urls = new ArrayList<String>(); List<OmsFileLog> resultList=new ArrayList<>();
List<String> fileNames = new ArrayList<String>();
List<String> newFileNames = new ArrayList<String>();
List<String> originalFilenames = new ArrayList<String>();
for (MultipartFile file : files) for (MultipartFile file : files)
{ {
// 上传并返回新文件名称 // 上传并返回新文件名称
String fileName = FileUploadUtils.upload(filePath, file); String fileName = FileUploadUtils.upload(filePath, file);
String url = serverConfig.getUrl() + fileName; OmsFileLog omsFileLog = new OmsFileLog();
urls.add(url); omsFileLog.setFilePath(fileName);
fileNames.add(fileName); omsFileLog.setNewFilename(FileUtils.getName(fileName));
newFileNames.add(FileUtils.getName(fileName)); omsFileLog.setFileName(file.getOriginalFilename());
originalFilenames.add(file.getOriginalFilename()); omsFileLog.setFileSize(file.getSize());
omsFileLog.setFileType(file.getContentType());
omsFileLog.setCreateBy(ShiroUtils.getUserId().toString());
omsFileLog.setCreateTime(DateUtil.date());
resultList.add(omsFileLog);
} }
AjaxResult ajax = AjaxResult.success(); AjaxResult ajax = AjaxResult.success(resultList);
ajax.put("urls", StringUtils.join(urls, FILE_DELIMETER));
ajax.put("fileNames", StringUtils.join(fileNames, FILE_DELIMETER));
ajax.put("newFileNames", StringUtils.join(newFileNames, FILE_DELIMETER));
ajax.put("originalFilenames", StringUtils.join(originalFilenames, FILE_DELIMETER));
return ajax; return ajax;
} }
catch (Exception e) catch (Exception e)

View File

@ -106,7 +106,7 @@ public class OmsInvoiceBillController extends BaseController
} }
@RequiresPermissions("sip:invoiceBill:query") @RequiresPermissions("sip:invoiceBill:query")
@PostMapping(value = "/apply") @PostMapping(value = "/apply")
public AjaxResult getInfo(@RequestBody OmsInvoiceBill omsInvoiceBill) public AjaxResult apply(@RequestBody OmsInvoiceBill omsInvoiceBill)
{ {
return omsInvoiceBillService.applyInvoice(omsInvoiceBill); return omsInvoiceBillService.applyInvoice(omsInvoiceBill);
} }
@ -206,6 +206,27 @@ public class OmsInvoiceBillController extends BaseController
return AjaxResult.error("操作失败:" + e.getMessage()); return AjaxResult.error("操作失败:" + e.getMessage());
} }
} }
/**
* 退
*/
@RequiresPermissions("finance:invoice:return")
@Log(title = "撤销开票单", businessType = BusinessType.UPDATE)
@DeleteMapping("/revoke/{id}")
@ResponseBody
public AjaxResult revokeInvoice(@PathVariable("id") Long id)
{
try {
// 验证开票单ID
if (id == null) {
return AjaxResult.error("开票ID不能为空");
}
// 调用服务层方法处理退回逻辑
return omsInvoiceBillService.revokeInvoice(id);
} catch (Exception e) {
logger.error("退回开票单失败", e);
return AjaxResult.error("操作失败:" + e.getMessage());
}
}
@GetMapping("/product/{code}") @GetMapping("/product/{code}")
@ResponseBody @ResponseBody

View File

@ -122,6 +122,14 @@ public class VueDeliveryController extends BaseController {
@Log(title = "发货记录", businessType = BusinessType.EXPORT) @Log(title = "发货记录", businessType = BusinessType.EXPORT)
@PostMapping("/export") @PostMapping("/export")
public AjaxResult export(@RequestBody InventoryDelivery inventoryDelivery) { public AjaxResult export(@RequestBody InventoryDelivery inventoryDelivery) {
inventoryDelivery.setDeliveryStatus(InventoryDelivery.DeliveryStatusEnum.CONFIRM_DELIVERY.getCode());
if (!inventoryAuthService.authAll()) {
List<String> productCodeList = inventoryAuthService.authProductCode();
if (CollUtil.isEmpty(productCodeList)) {
return error("数据为空");
}
inventoryDelivery.setProductCodeList(productCodeList);
}
List<InventoryDelivery> list = inventoryDeliveryService.selectInventoryDeliveryList(inventoryDelivery); List<InventoryDelivery> list = inventoryDeliveryService.selectInventoryDeliveryList(inventoryDelivery);
ExcelUtil<InventoryDelivery> util = new ExcelUtil<>(InventoryDelivery.class); ExcelUtil<InventoryDelivery> util = new ExcelUtil<>(InventoryDelivery.class);
return util.exportExcel(list, "发货记录数据"); return util.exportExcel(list, "发货记录数据");

View File

@ -1,9 +1,11 @@
package com.ruoyi.sip.controller.vue; package com.ruoyi.sip.controller.vue;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.exception.ServiceException; import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.sip.domain.InventoryOuter; import com.ruoyi.sip.domain.InventoryOuter;
@ -131,4 +133,25 @@ public class VueInventoryOuterController extends BaseController
} }
} }
/**
*
*/
@RequiresPermissions("inventory:outer:export")
@Log(title = "出库单", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(InventoryOuter inventoryOuter)
{
inventoryOuter.setOuterStatusList(Arrays.asList(InventoryOuter.OuterStatusEnum.WAIT_RECEIVE.getCode(), InventoryOuter.OuterStatusEnum.RECEIVED.getCode()));
if (!inventoryAuthService.authAll()){
List<String> productCodeList = inventoryAuthService.authProductCode();
if (CollUtil.isEmpty(productCodeList)){
return error("数据为空");
}
inventoryOuter.setProductCodeList(productCodeList);
}
List<InventoryOuter> list = inventoryOuterService.selectInventoryOuterList(inventoryOuter);
ExcelUtil<InventoryOuter> util = new ExcelUtil<InventoryOuter>(InventoryOuter.class);
return util.exportExcel(list, "出库单数据");
}
} }

View File

@ -1,7 +1,9 @@
package com.ruoyi.sip.domain; package com.ruoyi.sip.domain;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date; import java.util.Date;
@ -13,31 +15,55 @@ import java.util.Date;
* @since 2025-08-27 18:01:33 * @since 2025-08-27 18:01:33
*/ */
@Data @Data
@Builder public class OmsFileLog extends BaseEntity {
public class OmsFileLog {
/**
* ID
*/
private Integer id; private Integer id;
/**
private String url; *
*/
private String fileName;
private String newFilename; private String newFilename;
/**
*
*/
private String fileName;
private String originalFilename; /**
*
*/
private String filePath;
/**
*
*/
private Long fileSize;
/**
* MIME
*/
private String fileType;
/**
*
*/
private String createBy; private String createBy;
private String updateBy;
/**
*
*/
private Date updateTime;
private Date createTime; private Date createTime;
/**
*
*/
private String remark;
} }

View File

@ -6,6 +6,7 @@ import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.sip.domain.dto.PaymentBillPayableDetailDTO; import com.ruoyi.sip.domain.dto.PaymentBillPayableDetailDTO;
import com.ruoyi.sip.domain.dto.ReceiptDetailDTO;
import lombok.AccessLevel; import lombok.AccessLevel;
import lombok.Data; import lombok.Data;
import lombok.Getter; import lombok.Getter;
@ -116,6 +117,9 @@ public class OmsInvoiceBill extends BaseEntity
private String sellerCreditCode; private String sellerCreditCode;
private String sellerBank; private String sellerBank;
private String sellerBankAccount; private String sellerBankAccount;
private List<ReceiptDetailDTO> detailDTOList;
public BigDecimal getTaxAmount() { public BigDecimal getTaxAmount() {
if (null != totalPriceWithTax && null != totalPriceWithoutTax){ if (null != totalPriceWithTax && null != totalPriceWithoutTax){
return totalPriceWithTax.subtract(totalPriceWithoutTax); return totalPriceWithTax.subtract(totalPriceWithoutTax);

View File

@ -103,6 +103,8 @@ public class OmsPurchaseOrder extends BaseEntity
private String processKey; private String processKey;
private String todoId; private String todoId;
private String taskId; private String taskId;
private Integer fileId;
private OmsFileLog fileLog;
/** 采购单明细表信息 */ /** 采购单明细表信息 */

View File

@ -89,6 +89,7 @@ public class OmsPurchaseOrderHistory extends BaseEntity
/** 版本号 */ /** 版本号 */
private Integer version; private Integer version;
private Integer fileId;
private List<OmsPurchaseOrderItemHistory> omsPurchaseOrderItemList; private List<OmsPurchaseOrderItemHistory> omsPurchaseOrderItemList;
} }

View File

@ -90,4 +90,7 @@ public interface OmsInvoiceBillMapper
void clearRelationReceivable(String invoiceBillCode); void clearRelationReceivable(String invoiceBillCode);
void applyInvoice(OmsInvoiceBill omsInvoiceBill); void applyInvoice(OmsInvoiceBill omsInvoiceBill);
void clearApprove(OmsInvoiceBill invoiceBill);
} }

View File

@ -3,6 +3,7 @@ package com.ruoyi.sip.mapper;
import java.util.List; import java.util.List;
import com.ruoyi.sip.domain.OmsReceivableInvoiceDetail; import com.ruoyi.sip.domain.OmsReceivableInvoiceDetail;
import com.ruoyi.sip.domain.dto.ReceiptDetailDTO;
/** /**
* Mapper * Mapper
@ -69,4 +70,9 @@ public interface OmsReceivableInvoiceDetailMapper
* @return * @return
*/ */
List<OmsReceivableInvoiceDetail> selectByInvoicePlanIds(List<Long> invoicePlanIds); List<OmsReceivableInvoiceDetail> selectByInvoicePlanIds(List<Long> invoicePlanIds);
void insertBatch(List<OmsReceivableInvoiceDetail> addList);
List<ReceiptDetailDTO> listReceivableByInvoiceBillCode(List<String> strings);
} }

View File

@ -69,7 +69,11 @@ public interface IOmsFinAttachmentService
* @return * @return
* @throws Exception * @throws Exception
*/ */
public OmsFinAttachment uploadAttachment(MultipartFile file, Long invoiceReceiptBillId, OmsFinAttachment.RelatedBillTypeEnum type) throws Exception; default OmsFinAttachment uploadAttachment(MultipartFile file, Long invoiceReceiptBillId, OmsFinAttachment.RelatedBillTypeEnum type) throws Exception
{
return uploadAttachment(file, invoiceReceiptBillId, type,null);
}
public OmsFinAttachment uploadAttachment(MultipartFile file, Long invoiceReceiptBillId, OmsFinAttachment.RelatedBillTypeEnum type,String remark) throws Exception;
List<OmsFinAttachment> list(List<Long> ids, String type); List<OmsFinAttachment> list(List<Long> ids, String type);

View File

@ -116,4 +116,7 @@ public interface IOmsInvoiceBillService
List<InvoiceProductDto> listProduct(String code); List<InvoiceProductDto> listProduct(String code);
AjaxResult applyInvoice(OmsInvoiceBill omsInvoiceBill); AjaxResult applyInvoice(OmsInvoiceBill omsInvoiceBill);
AjaxResult revokeInvoice(Long id);
} }

View File

@ -4,6 +4,7 @@ import java.util.List;
import com.ruoyi.sip.domain.OmsPayableTicketDetail; import com.ruoyi.sip.domain.OmsPayableTicketDetail;
import com.ruoyi.sip.domain.OmsReceivableInvoiceDetail; import com.ruoyi.sip.domain.OmsReceivableInvoiceDetail;
import com.ruoyi.sip.domain.dto.ReceiptDetailDTO;
/** /**
* Service * Service
@ -73,4 +74,8 @@ public interface IOmsReceivableInvoiceDetailService
List<OmsReceivableInvoiceDetail> selectByInvoicePlanIds(List<Long> invoicePlanIds); List<OmsReceivableInvoiceDetail> selectByInvoicePlanIds(List<Long> invoicePlanIds);
List<OmsReceivableInvoiceDetail> listByInvoiceBillCode(String invoiceBillCode); List<OmsReceivableInvoiceDetail> listByInvoiceBillCode(String invoiceBillCode);
void applyRefund(String invoiceBillCode, String invoiceBillCode1);
List<ReceiptDetailDTO> listReceivableByInvoiceBillCode(String invoiceBillCode);
} }

View File

@ -26,7 +26,7 @@ public class OmsFinAttachmentServiceImpl implements IOmsFinAttachmentService
private OmsFinAttachmentMapper omsFinAttachmentMapper; private OmsFinAttachmentMapper omsFinAttachmentMapper;
@Override @Override
public OmsFinAttachment uploadAttachment(MultipartFile file, Long relatedBillId, OmsFinAttachment.RelatedBillTypeEnum type) throws Exception public OmsFinAttachment uploadAttachment(MultipartFile file, Long relatedBillId, OmsFinAttachment.RelatedBillTypeEnum type,String remark) throws Exception
{ {
// 上传文件路径 // 上传文件路径
String filePath = RuoYiConfig.getUploadPath(); String filePath = RuoYiConfig.getUploadPath();
@ -40,6 +40,7 @@ public class OmsFinAttachmentServiceImpl implements IOmsFinAttachmentService
attachment.setFileType(file.getContentType()); attachment.setFileType(file.getContentType());
attachment.setRelatedBillType(type.getCode()); attachment.setRelatedBillType(type.getCode());
attachment.setRelatedBillId(relatedBillId); attachment.setRelatedBillId(relatedBillId);
attachment.setRemark(remark);
attachment.setCreateBy(com.ruoyi.common.utils.ShiroUtils.getLoginName()); attachment.setCreateBy(com.ruoyi.common.utils.ShiroUtils.getLoginName());
this.insertOmsFinAttachment(attachment); this.insertOmsFinAttachment(attachment);
return attachment; return attachment;

View File

@ -9,7 +9,6 @@ import java.util.stream.Collectors;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DatePattern; import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.enums.ApproveStatusEnum; import com.ruoyi.common.enums.ApproveStatusEnum;
import com.ruoyi.common.utils.DateUtils; import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils; import com.ruoyi.common.utils.ShiroUtils;
@ -17,7 +16,7 @@ import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.sip.domain.*; import com.ruoyi.sip.domain.*;
import com.ruoyi.sip.domain.dto.InvoiceProductDto; import com.ruoyi.sip.domain.dto.InvoiceProductDto;
import com.ruoyi.sip.domain.dto.PaymentBillPayableDetailDTO; import com.ruoyi.sip.domain.dto.ReceiptDetailDTO;
import com.ruoyi.sip.flowable.domain.Todo; import com.ruoyi.sip.flowable.domain.Todo;
import com.ruoyi.sip.service.*; import com.ruoyi.sip.service.*;
import org.flowable.engine.runtime.ProcessInstance; import org.flowable.engine.runtime.ProcessInstance;
@ -73,6 +72,9 @@ public class OmsInvoiceBillServiceImpl implements IOmsInvoiceBillService, TodoCo
{ {
OmsInvoiceBill omsInvoiceBill = omsInvoiceBillMapper.selectOmsInvoiceBillById(id); OmsInvoiceBill omsInvoiceBill = omsInvoiceBillMapper.selectOmsInvoiceBillById(id);
// 如果需要关联查询其他数据,可以在这里添加 // 如果需要关联查询其他数据,可以在这里添加
List<ReceiptDetailDTO> receiptDetailDTOS = detailService.listReceivableByInvoiceBillCode(omsInvoiceBill.getInvoiceBillCode());
omsInvoiceBill.setDetailDTOList(receiptDetailDTOS);
return omsInvoiceBill; return omsInvoiceBill;
} }
@ -142,7 +144,10 @@ public class OmsInvoiceBillServiceImpl implements IOmsInvoiceBillService, TodoCo
@Override @Override
public int deleteOmsInvoiceBillById(Long id) public int deleteOmsInvoiceBillById(Long id)
{ {
return omsInvoiceBillMapper.deleteOmsInvoiceBillById(id); OmsInvoiceBill invoiceBill = selectOmsInvoiceBillById(id);
int i = omsInvoiceBillMapper.deleteOmsInvoiceBillById(id);
omsInvoiceBillMapper.clearRelationReceivable(invoiceBill.getInvoiceBillCode());
return i;
} }
/** /**
@ -183,24 +188,14 @@ public class OmsInvoiceBillServiceImpl implements IOmsInvoiceBillService, TodoCo
} }
// 这里可以添加上传附件的逻辑 // 这里可以添加上传附件的逻辑
// omsFinAttachmentService.uploadAttachment(file, omsInvoiceBill.getId(), "INVOICE_RECEIPT"); omsFinAttachmentService.uploadAttachment(file, omsInvoiceBill.getId(), OmsFinAttachment.RelatedBillTypeEnum.RECEIVE_INVOICE, bill.getRemark());
omsInvoiceBill.setActualInvoiceTime(DateUtils.getNowDate()); omsInvoiceBill.setActualInvoiceTime(DateUtils.getNowDate());
omsInvoiceBill.setApproveStatus(ApproveStatusEnum.WAIT_APPROVE.getCode()); omsInvoiceBill.setInvoiceStatus(OmsInvoiceBill.InvoiceStatusEnum.INVOICE.getCode());
omsInvoiceBill.setInvoicePriceWithTax(bill.getInvoicePriceWithTax()); omsInvoiceBill.setInvoicePriceWithTax(bill.getInvoicePriceWithTax());
omsInvoiceBill.setInvoicePriceWithoutTax(bill.getInvoicePriceWithoutTax()); omsInvoiceBill.setInvoicePriceWithoutTax(bill.getInvoicePriceWithoutTax());
omsInvoiceBill.setInvoiceType(bill.getInvoiceType()); omsInvoiceBill.setInvoiceType(bill.getInvoiceType());
updateOmsInvoiceBill(omsInvoiceBill); updateOmsInvoiceBill(omsInvoiceBill);
// // 根据开票单类型启动不同流程
// if (OmsInvoiceBill.InvoiceBillTypeEnum.FROM_RECEIVABLE.getCode().equals(omsInvoiceBill.getInvoiceBillType())) {
// todoService.startProcessDeleteBefore(omsInvoiceBill.getInvoiceBillCode(), omsInvoiceBill.getInvoiceBillCode(),
// "financeInvoice", omsInvoiceBill.getCreateBy());
// } else {
// todoService.startProcessDeleteBefore(omsInvoiceBill.getInvoiceBillCode(), omsInvoiceBill.getInvoiceBillCode(),
// "financeInvoiceRefound", omsInvoiceBill.getCreateBy());
// }
return AjaxResult.success("上传成功"); return AjaxResult.success("上传成功");
} }
@ -266,16 +261,34 @@ public class OmsInvoiceBillServiceImpl implements IOmsInvoiceBillService, TodoCo
// 创建红冲单 // 创建红冲单
OmsInvoiceBill refundBill = new OmsInvoiceBill(); OmsInvoiceBill refundBill = new OmsInvoiceBill();
refundBill.setInvoiceBillCode(generateInvoiceBillCode()); refundBill.setInvoiceBillCode(generateInvoiceBillCode());
refundBill.setInvoiceType(originalBill.getInvoiceType()); refundBill.setPartnerName(originalBill.getPartnerName());
refundBill.setPartnerCode(originalBill.getPartnerCode()); refundBill.setPartnerCode(originalBill.getPartnerCode());
refundBill.setTotalPriceWithTax(originalBill.getTotalPriceWithTax().negate()); // 负数金额 refundBill.setInvoiceType(originalBill.getInvoiceType());
refundBill.setInvoiceTime(DateUtils.getNowDate());
// 负数金额
refundBill.setTotalPriceWithTax(originalBill.getTotalPriceWithTax().negate());
refundBill.setTotalPriceWithoutTax(originalBill.getTotalPriceWithoutTax().negate()); refundBill.setTotalPriceWithoutTax(originalBill.getTotalPriceWithoutTax().negate());
refundBill.setInvoicePriceWithTax(originalBill.getInvoicePriceWithTax().negate());
refundBill.setInvoicePriceWithoutTax(originalBill.getInvoicePriceWithoutTax().negate());
refundBill.setTaxRate(originalBill.getTaxRate()); refundBill.setTaxRate(originalBill.getTaxRate());
refundBill.setApproveStatus(ApproveStatusEnum.WAIT_COMMIT.getCode()); refundBill.setApproveStatus(ApproveStatusEnum.WAIT_COMMIT.getCode());
refundBill.setInvoiceBillType(OmsInvoiceBill.InvoiceBillTypeEnum.RED_RUSH.getCode()); refundBill.setInvoiceBillType(OmsInvoiceBill.InvoiceBillTypeEnum.RED_RUSH.getCode());
refundBill.setInvoiceStatus(OmsInvoiceBill.InvoiceStatusEnum.INVOICE.getCode()); refundBill.setInvoiceStatus(OmsInvoiceBill.InvoiceStatusEnum.INVOICE.getCode());
refundBill.setRefundStatus(OmsInvoiceBill.RefundStatusEnum.REFUNDED.getCode()); refundBill.setRefundStatus(OmsInvoiceBill.RefundStatusEnum.REFUNDED.getCode());
refundBill.setOriginalBillId(originalBill.getId()); // 关联原始单据
refundBill.setBuyerName(originalBill.getBuyerName());
refundBill.setBuyerCreditCode(originalBill.getBuyerCreditCode());
refundBill.setBuyerBank(originalBill.getBuyerBank());
refundBill.setBuyerBankAccount(originalBill.getBuyerBankAccount());
refundBill.setSellerName(originalBill.getSellerName());
refundBill.setSellerCreditCode(originalBill.getSellerCreditCode());
refundBill.setSellerBank(originalBill.getSellerBank());
refundBill.setSellerBankAccount(originalBill.getSellerBankAccount());
// 关联原始单据
refundBill.setOriginalBillId(originalBill.getId());
refundBill.setActualInvoiceTime(null);
refundBill.setApproveTime(null);
refundBill.setCreateTime(DateUtils.getNowDate()); refundBill.setCreateTime(DateUtils.getNowDate());
insertOmsInvoiceBill(refundBill); insertOmsInvoiceBill(refundBill);
@ -284,6 +297,10 @@ public class OmsInvoiceBillServiceImpl implements IOmsInvoiceBillService, TodoCo
originalBill.setRefundStatus(OmsInvoiceBill.RefundStatusEnum.REFUNDED.getCode()); originalBill.setRefundStatus(OmsInvoiceBill.RefundStatusEnum.REFUNDED.getCode());
updateOmsInvoiceBill(originalBill); updateOmsInvoiceBill(originalBill);
//创建开票明细
detailService.applyRefund(originalBill.getInvoiceBillCode(), refundBill.getInvoiceBillCode());
return AjaxResult.success("红冲申请已提交"); return AjaxResult.success("红冲申请已提交");
} }
@ -367,6 +384,44 @@ public class OmsInvoiceBillServiceImpl implements IOmsInvoiceBillService, TodoCo
return AjaxResult.success(); return AjaxResult.success();
} }
@Override
public AjaxResult revokeInvoice(Long id) {
OmsInvoiceBill originalBill = selectOmsInvoiceBillById(id);
//未开票的审批通过
if (originalBill.getInvoiceBillType().equals(OmsInvoiceBill.InvoiceBillTypeEnum.FROM_RECEIVABLE.getCode())) {
if (originalBill.getRefundStatus().equals(OmsInvoiceBill.RefundStatusEnum.REFUNDED.getCode())){
return AjaxResult.error("已申请红冲的开票单不能撤销");
}
//应付单生成 未开票的审批通过
if ((originalBill.getApproveStatus().equals(ApproveStatusEnum.APPROVE_COMPLETE.getCode()) && originalBill.getInvoiceStatus().equals(OmsInvoiceBill.InvoiceStatusEnum.WAIT_INVOICE.getCode()))
||
originalBill.getApproveStatus().equals(ApproveStatusEnum.APPROVE_REJECT.getCode())) {
OmsInvoiceBill invoiceBill = new OmsInvoiceBill();
invoiceBill.setApproveStatus(ApproveStatusEnum.WAIT_COMMIT.getCode());
invoiceBill.setApproveTime(null);
invoiceBill.setId(id);
omsInvoiceBillMapper.clearApprove(invoiceBill);
}else{
return AjaxResult.error("应收单发起开票单只有未开票的数据才能撤回才能撤销");
}
}else{
if (originalBill.getApproveStatus().equals(ApproveStatusEnum.APPROVE_REJECT.getCode())){
deleteOmsInvoiceBillById(id);
OmsInvoiceBill invoiceBill = new OmsInvoiceBill();
invoiceBill.setId(originalBill.getOriginalBillId());
invoiceBill.setRefundStatus(OmsInvoiceBill.RefundStatusEnum.WAIT_REFUNDED.getCode());
omsInvoiceBillMapper.updateOmsInvoiceBill(invoiceBill);
}else{
return AjaxResult.error("红冲单只有审批驳回的数据才能撤回才能撤销");
}
}
return AjaxResult.success("撤销成功");
}
@Override @Override
public Object todoDetail(String businessKey, String processKey, String todoId) { public Object todoDetail(String businessKey, String processKey, String todoId) {
return null; return null;

View File

@ -19,9 +19,7 @@ import com.ruoyi.sip.flowable.service.TodoCommonTemplate;
import com.ruoyi.sip.flowable.service.TodoService; import com.ruoyi.sip.flowable.service.TodoService;
import com.ruoyi.sip.mapper.OmsPurchaseOrderItemHistoryMapper; import com.ruoyi.sip.mapper.OmsPurchaseOrderItemHistoryMapper;
import com.ruoyi.sip.mapper.OmsPurchaseOrderHistoryMapper; import com.ruoyi.sip.mapper.OmsPurchaseOrderHistoryMapper;
import com.ruoyi.sip.service.ICnareaService; import com.ruoyi.sip.service.*;
import com.ruoyi.sip.service.IInventoryAuthService;
import com.ruoyi.sip.service.IVendorInfoService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.flowable.engine.ManagementService; import org.flowable.engine.ManagementService;
@ -35,7 +33,6 @@ import org.springframework.stereotype.Service;
import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.StringUtils;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import com.ruoyi.sip.mapper.OmsPurchaseOrderMapper; import com.ruoyi.sip.mapper.OmsPurchaseOrderMapper;
import com.ruoyi.sip.service.IOmsPurchaseOrderService;
import javax.annotation.Resource; import javax.annotation.Resource;
@ -69,6 +66,8 @@ public class OmsPurchaseOrderServiceImpl implements IOmsPurchaseOrderService, To
private TodoService todoService; private TodoService todoService;
@Autowired @Autowired
protected ManagementService managementService; protected ManagementService managementService;
@Autowired
private IOmsFileLogService omsFileLogService;
/** /**
* *
* *
@ -79,9 +78,15 @@ public class OmsPurchaseOrderServiceImpl implements IOmsPurchaseOrderService, To
public OmsPurchaseOrder selectOmsPurchaseOrderById(Long id) public OmsPurchaseOrder selectOmsPurchaseOrderById(Long id)
{ {
OmsPurchaseOrder omsPurchaseOrder = omsPurchaseOrderMapper.selectOmsPurchaseOrderById(id); OmsPurchaseOrder omsPurchaseOrder = omsPurchaseOrderMapper.selectOmsPurchaseOrderById(id);
if (omsPurchaseOrder == null) {
return null;
}
List<OmsPurchaseOrderItem> omsPurchaseOrderItems = omsPurchaseOrderMapper.listItemByPurchaseId(id); List<OmsPurchaseOrderItem> omsPurchaseOrderItems = omsPurchaseOrderMapper.listItemByPurchaseId(id);
omsPurchaseOrder.setOmsPurchaseOrderItemList(omsPurchaseOrderItems); omsPurchaseOrder.setOmsPurchaseOrderItemList(omsPurchaseOrderItems);
if (omsPurchaseOrder.getFileId() != null) {
OmsFileLog omsFileLog = omsFileLogService.queryById(omsPurchaseOrder.getFileId());
omsPurchaseOrder.setFileLog(omsFileLog);
}
return omsPurchaseOrder; return omsPurchaseOrder;
} }
@ -353,8 +358,15 @@ public class OmsPurchaseOrderServiceImpl implements IOmsPurchaseOrderService, To
@Override @Override
public OmsPurchaseOrder selectOmsPurchaseOrderByNo(String purchaseNo) { public OmsPurchaseOrder selectOmsPurchaseOrderByNo(String purchaseNo) {
OmsPurchaseOrder omsPurchaseOrder = omsPurchaseOrderMapper.selectByNo(purchaseNo); OmsPurchaseOrder omsPurchaseOrder = omsPurchaseOrderMapper.selectByNo(purchaseNo);
if (omsPurchaseOrder == null){
return null;
}
List<OmsPurchaseOrderItem> omsPurchaseOrderItems = omsPurchaseOrderMapper.listItemByPurchaseId(omsPurchaseOrder.getId()); List<OmsPurchaseOrderItem> omsPurchaseOrderItems = omsPurchaseOrderMapper.listItemByPurchaseId(omsPurchaseOrder.getId());
omsPurchaseOrder.setOmsPurchaseOrderItemList(omsPurchaseOrderItems); omsPurchaseOrder.setOmsPurchaseOrderItemList(omsPurchaseOrderItems);
if (omsPurchaseOrder.getFileId() != null) {
OmsFileLog omsFileLog = omsFileLogService.queryById(omsPurchaseOrder.getFileId());
omsPurchaseOrder.setFileLog(omsFileLog);
}
return omsPurchaseOrder; return omsPurchaseOrder;
} }

View File

@ -1,13 +1,19 @@
package com.ruoyi.sip.service.impl; package com.ruoyi.sip.service.impl;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.function.Function; import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.sip.domain.OmsFinAttachment; import com.ruoyi.sip.domain.OmsFinAttachment;
import com.ruoyi.sip.domain.OmsPayableTicketDetail;
import com.ruoyi.sip.domain.dto.ReceiptDetailDTO;
import com.ruoyi.sip.service.IOmsFinAttachmentService; import com.ruoyi.sip.service.IOmsFinAttachmentService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -146,4 +152,38 @@ public class OmsReceivableInvoiceDetailServiceImpl implements IOmsReceivableInvo
omsReceivableInvoiceDetail.setInvoiceBillCode(invoiceBillCode); omsReceivableInvoiceDetail.setInvoiceBillCode(invoiceBillCode);
return omsReceivableInvoiceDetailMapper.list(omsReceivableInvoiceDetail); return omsReceivableInvoiceDetailMapper.list(omsReceivableInvoiceDetail);
} }
@Override
public void applyRefund(String originalCode, String targetCode) {
OmsReceivableInvoiceDetail query = new OmsReceivableInvoiceDetail();
query.setInvoiceBillCode(originalCode);
List<OmsReceivableInvoiceDetail> list = omsReceivableInvoiceDetailMapper.selectOmsReceivableInvoiceDetailList(query);
if (CollUtil.isNotEmpty(list)){
List<OmsReceivableInvoiceDetail> addList=new ArrayList<>();
for (OmsReceivableInvoiceDetail detail : list) {
OmsReceivableInvoiceDetail temp = new OmsReceivableInvoiceDetail();
BeanUtil.copyProperties(detail,temp);
temp.setId(null);
temp.setReceivableDetailType(OmsReceivableInvoiceDetail.ReceivableDetailTypeEnum.REFUND.getCode());
temp.setCreateBy(ShiroUtils.getUserId().toString());
temp.setInvoiceAmount(detail.getInvoiceAmount().negate());
temp.setInvoiceRate(detail.getInvoiceRate().negate());
temp.setInvoiceBillCode(targetCode);
temp.setRemark("退款");
addList.add( temp);
}
omsReceivableInvoiceDetailMapper.insertBatch(addList);
}
}
@Override
public List<ReceiptDetailDTO> listReceivableByInvoiceBillCode(String invoiceBillCode) {
List<ReceiptDetailDTO> receiptDetailDTOS = omsReceivableInvoiceDetailMapper.listReceivableByInvoiceBillCode(Collections.singletonList(invoiceBillCode));
for (ReceiptDetailDTO detailDTO : receiptDetailDTOS) {
detailDTO.setReceiptRate(detailDTO.getReceiptAmount()
.divide(detailDTO.getTotalPriceWithTax(),4,java.math.RoundingMode.HALF_UP)
.multiply(new BigDecimal("100")));
}
return receiptDetailDTOS;
}
} }

View File

@ -1176,6 +1176,8 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
String taskName = todo.getTaskName(); String taskName = todo.getTaskName();
String businessKey = todo.getBusinessKey(); String businessKey = todo.getBusinessKey();
ProcessInstance processInstance = todoService.getProcessInstance(getFlowBusinessKey(businessKey, null));
Integer processDefinitionVersion = processInstance.getProcessDefinitionVersion();
// 审批驳回处理 // 审批驳回处理
if (approveBtn.equals(0)) { if (approveBtn.equals(0)) {
handleRejectOrder(taskName, businessKey); handleRejectOrder(taskName, businessKey);
@ -1187,7 +1189,7 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
handleBusinessApproval(businessKey); handleBusinessApproval(businessKey);
} else if ("省代".equals(taskName)) { } else if ("省代".equals(taskName)) {
handlePartnerApproval(businessKey); handlePartnerApproval(businessKey);
} else if ("领导1".equals(taskName) && todo.getApplyTime().compareTo(DateUtils.parseDate("2025-12-19"))>0){ } else if ("领导1".equals(taskName) && processDefinitionVersion>9){
ProjectOrderInfo orderInfo = selectProjectOrderInfoByOrderCode(businessKey); ProjectOrderInfo orderInfo = selectProjectOrderInfoByOrderCode(businessKey);
String amountConfig = configService.selectConfigByKey("order.approve.amount.config"); String amountConfig = configService.selectConfigByKey("order.approve.amount.config");
BigDecimal amountConfigNumber = new BigDecimal(amountConfig); BigDecimal amountConfigNumber = new BigDecimal(amountConfig);
@ -1196,7 +1198,6 @@ public class ProjectOrderInfoServiceImpl implements IProjectOrderInfoService, To
//查询对应的数据 插入已办数据 //查询对应的数据 插入已办数据
List<Long> approveUserList = approveConfigService.listByProcessKeyAndTaskName(todo.getProcessKey(), "公司领导"); List<Long> approveUserList = approveConfigService.listByProcessKeyAndTaskName(todo.getProcessKey(), "公司领导");
for (Long l : approveUserList) { for (Long l : approveUserList) {
todoService.completed(new HashMap<>(), todo.getTaskId(), businessKey);
todo.setApproveUser(l.toString()); todo.setApproveUser(l.toString());
todo.setTaskName("公司领导"); todo.setTaskName("公司领导");
todo.setApproveUserName(userService.selectUserById(l).getUserName()); todo.setApproveUserName(userService.selectUserById(l).getUserName());

View File

@ -95,6 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
)</if> )</if>
<if test="approveUserName != null and approveUserName != ''">and approve_user_name = #{approveUserName} <if test="approveUserName != null and approveUserName != ''">and approve_user_name = #{approveUserName}
</if> </if>
<if test="approveUser != null and approveUser != ''">and approve_user = #{approveUser}</if>
<if test="applyUserName != null and applyUserName != ''">and apply_user_name like concat('%', <if test="applyUserName != null and applyUserName != ''">and apply_user_name like concat('%',
#{applyUserName}, '%') #{applyUserName}, '%')
</if> </if>

View File

@ -3,21 +3,25 @@
<mapper namespace="com.ruoyi.sip.mapper.OmsFileLogMapper"> <mapper namespace="com.ruoyi.sip.mapper.OmsFileLogMapper">
<resultMap type="com.ruoyi.sip.domain.OmsFileLog" id="OmsFileLogMap"> <resultMap type="com.ruoyi.sip.domain.OmsFileLog" id="OmsFileLogMap">
<result property="id" column="id"/> <result property="id" column="id"/>
<result property="url" column="url"/> <result property="newFilename" column="new_filename"/>
<result property="fileName" column="file_name"/> <result property="fileName" column="file_name"/>
<result property="newFilename" column="new_filename"/> <result property="filePath" column="file_path"/>
<result property="originalFilename" column="original_filename"/> <result property="fileSize" column="file_size"/>
<result property="createBy" column="create_by"/> <result property="fileType" column="file_type"/>
<result property="createTime" column="create_time"/> <result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
<result property="updateTime" column="update_time"/>
<result property="remark" column="remark"/>
</resultMap> </resultMap>
<!-- 基本字段 --> <!-- 基本字段 -->
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, url, file_name, new_filename, original_filename, create_by, create_time id, new_filename, file_name, file_path, file_size, file_type, create_by, create_time, update_by, update_time, remark
</sql> </sql>
<!--通过实体作为筛选条件查询--> <!--通过实体作为筛选条件查询-->
<select id="queryAll" resultMap="OmsFileLogMap"> <select id="queryAll" resultMap="OmsFileLogMap">
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
@ -26,17 +30,20 @@ id, url, file_name, new_filename, original_filename, create_by, create_time
<if test="id != null"> <if test="id != null">
and id = #{id} and id = #{id}
</if> </if>
<if test="url != null and url != ''"> <if test="newFilename != null and newFilename != ''">
and url = #{url} and new_filename = #{newFilename}
</if> </if>
<if test="fileName != null and fileName != ''"> <if test="fileName != null and fileName != ''">
and file_name = #{fileName} and file_name = #{fileName}
</if> </if>
<if test="newFilename != null and newFilename != ''"> <if test="filePath != null and filePath != ''">
and new_filename = #{newFilename} and file_path = #{filePath}
</if> </if>
<if test="originalFilename != null and originalFilename != ''"> <if test="fileSize != null">
and original_filename = #{originalFilename} and file_size = #{fileSize}
</if>
<if test="fileType != null and fileType != ''">
and file_type = #{fileType}
</if> </if>
<if test="createBy != null and createBy != ''"> <if test="createBy != null and createBy != ''">
and create_by = #{createBy} and create_by = #{createBy}
@ -44,6 +51,15 @@ id, url, file_name, new_filename, original_filename, create_by, create_time
<if test="createTime != null"> <if test="createTime != null">
and create_time = #{createTime} and create_time = #{createTime}
</if> </if>
<if test="updateBy != null and updateBy != ''">
and update_by = #{updateBy}
</if>
<if test="updateTime != null">
and update_time = #{updateTime}
</if>
<if test="remark != null and remark != ''">
and remark = #{remark}
</if>
</where> </where>
</select> </select>
@ -51,7 +67,7 @@ id, url, file_name, new_filename, original_filename, create_by, create_time
<!--根据ID查详情--> <!--根据ID查详情-->
<select id="queryById" parameterType="Integer" resultMap="OmsFileLogMap"> <select id="queryById" parameterType="Integer" resultMap="OmsFileLogMap">
SELECT SELECT
id, url, file_name, new_filename, original_filename, create_by, create_time <include refid="Base_Column_List" />
FROM oms_file_log FROM oms_file_log
WHERE id = #{id} LIMIT 1 WHERE id = #{id} LIMIT 1
</select> </select>
@ -61,17 +77,20 @@ id, url, file_name, new_filename, original_filename, create_by, create_time
<insert id="insert" keyProperty="id" useGeneratedKeys="true"> <insert id="insert" keyProperty="id" useGeneratedKeys="true">
INSERT INTO oms_file_log INSERT INTO oms_file_log
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="url != null and url != ''"> <if test="newFilename != null and newFilename != ''">
url, new_filename,
</if> </if>
<if test="fileName != null and fileName != ''"> <if test="fileName != null and fileName != ''">
file_name, file_name,
</if> </if>
<if test="newFilename != null and newFilename != ''"> <if test="filePath != null and filePath != ''">
new_filename, file_path,
</if> </if>
<if test="originalFilename != null and originalFilename != ''"> <if test="fileSize != null">
original_filename, file_size,
</if>
<if test="fileType != null and fileType != ''">
file_type,
</if> </if>
<if test="createBy != null and createBy != ''"> <if test="createBy != null and createBy != ''">
create_by, create_by,
@ -79,19 +98,31 @@ id, url, file_name, new_filename, original_filename, create_by, create_time
<if test="createTime != null"> <if test="createTime != null">
create_time, create_time,
</if> </if>
<if test="updateBy != null and updateBy != ''">
update_by,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="remark != null and remark != ''">
remark,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="url != null and url != ''"> <if test="newFilename != null and newFilename != ''">
#{url}, #{newFilename},
</if> </if>
<if test="fileName != null and fileName != ''"> <if test="fileName != null and fileName != ''">
#{fileName}, #{fileName},
</if> </if>
<if test="newFilename != null and newFilename != ''"> <if test="filePath != null and filePath != ''">
#{newFilename}, #{filePath},
</if> </if>
<if test="originalFilename != null and originalFilename != ''"> <if test="fileSize != null">
#{originalFilename}, #{fileSize},
</if>
<if test="fileType != null and fileType != ''">
#{fileType},
</if> </if>
<if test="createBy != null and createBy != ''"> <if test="createBy != null and createBy != ''">
#{createBy}, #{createBy},
@ -99,6 +130,15 @@ id, url, file_name, new_filename, original_filename, create_by, create_time
<if test="createTime != null"> <if test="createTime != null">
#{createTime}, #{createTime},
</if> </if>
<if test="updateBy != null and updateBy != ''">
#{updateBy},
</if>
<if test="updateTime != null">
#{updateTime},
</if>
<if test="remark != null and remark != ''">
#{remark},
</if>
</trim> </trim>
</insert> </insert>
@ -106,17 +146,20 @@ id, url, file_name, new_filename, original_filename, create_by, create_time
<update id="update"> <update id="update">
UPDATE oms_file_log UPDATE oms_file_log
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="url != null and url != ''"> <if test="newFilename != null and newFilename != ''">
url = #{url}, new_filename = #{newFilename},
</if> </if>
<if test="fileName != null and fileName != ''"> <if test="fileName != null and fileName != ''">
file_name = #{fileName}, file_name = #{fileName},
</if> </if>
<if test="newFilename != null and newFilename != ''"> <if test="filePath != null and filePath != ''">
new_filename = #{newFilename}, file_path = #{filePath},
</if> </if>
<if test="originalFilename != null and originalFilename != ''"> <if test="fileSize != null">
original_filename = #{originalFilename}, file_size = #{fileSize},
</if>
<if test="fileType != null and fileType != ''">
file_type = #{fileType},
</if> </if>
<if test="createBy != null and createBy != ''"> <if test="createBy != null and createBy != ''">
create_by = #{createBy}, create_by = #{createBy},
@ -124,6 +167,15 @@ id, url, file_name, new_filename, original_filename, create_by, create_time
<if test="createTime != null"> <if test="createTime != null">
create_time = #{createTime}, create_time = #{createTime},
</if> </if>
<if test="updateBy != null and updateBy != ''">
update_by = #{updateBy},
</if>
<if test="updateTime != null">
update_time = #{updateTime},
</if>
<if test="remark != null and remark != ''">
remark = #{remark},
</if>
</trim> </trim>
WHERE id = #{id} WHERE id = #{id}
</update> </update>

View File

@ -14,6 +14,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="partnerCode" column="partner_code" /> <result property="partnerCode" column="partner_code" />
<result property="totalPriceWithTax" column="total_price_with_tax" /> <result property="totalPriceWithTax" column="total_price_with_tax" />
<result property="totalPriceWithoutTax" column="total_price_without_tax" /> <result property="totalPriceWithoutTax" column="total_price_without_tax" />
<result property="invoicePriceWithTax" column="invoice_price_with_tax" />
<result property="invoicePriceWithoutTax" column="invoice_price_without_tax" />
<result property="taxRate" column="tax_rate" /> <result property="taxRate" column="tax_rate" />
<result property="createBy" column="create_by" /> <result property="createBy" column="create_by" />
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
@ -40,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectOmsInvoiceBillVo"> <sql id="selectOmsInvoiceBillVo">
select id, invoice_bill_code, invoice_type, invoice_bill_type, select id, invoice_bill_code, invoice_type, invoice_bill_type,
invoice_time, partner_code,partner_name, total_price_with_tax, total_price_without_tax, invoice_time, partner_code,partner_name, total_price_with_tax, total_price_without_tax,invoice_price_with_tax,invoice_price_without_tax,
tax_rate, create_by, create_time, update_by, update_time, tax_rate, create_by, create_time, update_by, update_time,
remark, del_flag, actual_invoice_time, invoice_status, remark, del_flag, actual_invoice_time, invoice_status,
approve_status, approve_time, refund_status approve_status, approve_time, refund_status
@ -176,6 +178,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="totalPriceWithoutTax != null"> <if test="totalPriceWithoutTax != null">
total_price_without_tax, total_price_without_tax,
</if> </if>
<if test="invoicePriceWithTax != null">
invoice_price_with_tax,
</if>
<if test="invoicePriceWithoutTax != null">
invoice_price_without_tax,
</if>
<if test="taxRate != null"> <if test="taxRate != null">
tax_rate, tax_rate,
</if> </if>
@ -268,6 +276,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="totalPriceWithoutTax != null"> <if test="totalPriceWithoutTax != null">
#{totalPriceWithoutTax}, #{totalPriceWithoutTax},
</if> </if>
<if test="invoicePriceWithTax != null">
#{invoicePriceWithTax},
</if>
<if test="invoicePriceWithoutTax != null">
#{invoicePriceWithoutTax},
</if>
<if test="taxRate != null"> <if test="taxRate != null">
#{taxRate}, #{taxRate},
</if> </if>
@ -363,6 +377,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="totalPriceWithoutTax != null"> <if test="totalPriceWithoutTax != null">
total_price_without_tax = #{totalPriceWithoutTax}, total_price_without_tax = #{totalPriceWithoutTax},
</if> </if>
<if test="invoicePriceWithTax != null">
invoice_price_with_tax = #{invoicePriceWithTax},
</if>
<if test="invoicePriceWithoutTax != null">
invoice_price_without_tax = #{invoicePriceWithoutTax},
</if>
<if test="taxRate != null"> <if test="taxRate != null">
tax_rate = #{taxRate}, tax_rate = #{taxRate},
</if> </if>
@ -472,6 +492,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where invoice_bill_code = #{invoiceBillCode} where invoice_bill_code = #{invoiceBillCode}
</update> </update>
<update id="clearApprove">
update oms_invoice_bill
set approve_status=#{approveStatus},
approve_time=null
where id = #{id}
</update>
<delete id="deleteOmsInvoiceBillById" parameterType="Long"> <delete id="deleteOmsInvoiceBillById" parameterType="Long">
delete from oms_invoice_bill where id = #{id} delete from oms_invoice_bill where id = #{id}

View File

@ -36,10 +36,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateBy" column="update_by" /> <result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="remark" column="remark" /> <result property="remark" column="remark" />
<result property="fileId" column="file_id" />
</resultMap> </resultMap>
<sql id="selectOmsPurchaseOrderHistoryVo"> <sql id="selectOmsPurchaseOrderHistoryVo">
select id, purchase_id, purchase_no, buyer_name, buyer_address, vendor_id, vendor_name, vendor_user, vendor_phone, currency, purchaser_id, purchaser_name, purchaser_mobile, purchaser_email, warehouse_id, pay_method, owner_id, owner_name, total_amount, status, approve_status, approve_time, approve_node, confirm_status, del_flag, version, create_by, create_time, update_by, update_time, remark from oms_purchase_order_history select id, purchase_id, purchase_no, buyer_name, buyer_address, vendor_id, vendor_name, vendor_user, vendor_phone, currency, purchaser_id, purchaser_name, purchaser_mobile, purchaser_email, warehouse_id, pay_method, owner_id, owner_name, total_amount, status, approve_status, approve_time, approve_node, confirm_status, del_flag, version, create_by, create_time, update_by, update_time, remark, file_id from oms_purchase_order_history
</sql> </sql>
<insert id="insertOmsPurchaseOrderHistory" parameterType="OmsPurchaseOrderHistory" useGeneratedKeys="true" keyProperty="id"> <insert id="insertOmsPurchaseOrderHistory" parameterType="OmsPurchaseOrderHistory" useGeneratedKeys="true" keyProperty="id">
@ -76,6 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if> <if test="remark != null">remark,</if>
<if test="flowType != null">flow_type,</if> <if test="flowType != null">flow_type,</if>
<if test="fileId != null">file_id,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="purchaseId != null">#{purchaseId},</if> <if test="purchaseId != null">#{purchaseId},</if>
@ -104,11 +106,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="delFlag != null">#{delFlag},</if> <if test="delFlag != null">#{delFlag},</if>
<if test="version != null">#{version},</if> <if test="version != null">#{version},</if>
<if test="createBy != null">#{createBy},</if> <if test="createBy != null">#{createBy},</if>
<if test="createTime != null">create_time,</if> <if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if> <if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if> <if test="remark != null">#{remark},</if>
<if test="flowType != null">#{flowType},</if> <if test="flowType != null">#{flowType},</if>
<if test="fileId != null">#{fileId},</if>
</trim> </trim>
</insert> </insert>

View File

@ -29,6 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="delFlag" column="del_flag" /> <result property="delFlag" column="del_flag" />
<result property="fileId" column="file_id" />
</resultMap> </resultMap>
<resultMap type="OmsPurchaseOrderItem" id="OmsPurchaseOrderItemResult"> <resultMap type="OmsPurchaseOrderItem" id="OmsPurchaseOrderItemResult">
@ -47,6 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select t1.id, t1.purchase_no, t1.buyer_name, t1.buyer_address, t1.vendor_id, t1.currency, t1.purchaser_id, t1.purchaser_name select t1.id, t1.purchase_no, t1.buyer_name, t1.buyer_address, t1.vendor_id, t1.currency, t1.purchaser_id, t1.purchaser_name
, t1.purchaser_mobile, t1.purchaser_email, t1.warehouse_id, t1.pay_method, t1.owner_id, t1.owner_name, t1.remark, t1.total_amount , t1.purchaser_mobile, t1.purchaser_email, t1.warehouse_id, t1.pay_method, t1.owner_id, t1.owner_name, t1.remark, t1.total_amount
, t1.status, t1.approve_status, t1.approve_time, t1.approve_node, t1.confirm_status, t1.create_time, t1.update_time, t1.del_flag,t1.version,t1.flow_type , t1.status, t1.approve_status, t1.approve_time, t1.approve_node, t1.confirm_status, t1.create_time, t1.update_time, t1.del_flag,t1.version,t1.flow_type
, t1.file_id
from oms_purchase_order t1 from oms_purchase_order t1
</sql> </sql>
<sql id="selectOmsPurchaseOrderItemVo"> <sql id="selectOmsPurchaseOrderItemVo">
@ -69,6 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select t1.id, t1.purchase_no, t1.buyer_name, t1.buyer_address, t1.vendor_id, t1.currency, t1.purchaser_id, t1.purchaser_name select t1.id, t1.purchase_no, t1.buyer_name, t1.buyer_address, t1.vendor_id, t1.currency, t1.purchaser_id, t1.purchaser_name
, t1.purchaser_mobile, t1.purchaser_email, t1.warehouse_id, t1.pay_method, t1.owner_id, t1.owner_name, t1.remark, t1.total_amount,t1.flow_type , t1.purchaser_mobile, t1.purchaser_email, t1.warehouse_id, t1.pay_method, t1.owner_id, t1.owner_name, t1.remark, t1.total_amount,t1.flow_type
, t1.status, t1.approve_status, t1.approve_time, t1.approve_node, t1.confirm_status, t1.create_time, t1.update_time, t1.del_flag,t1.version , t1.status, t1.approve_status, t1.approve_time, t1.approve_node, t1.confirm_status, t1.create_time, t1.update_time, t1.del_flag,t1.version
, t1.file_id
,t2.vendor_name,t2.vendor_user,t2.vendor_phone,t3.warehouse_name ,t2.vendor_name,t2.vendor_user,t2.vendor_phone,t3.warehouse_name
from oms_purchase_order t1 from oms_purchase_order t1
left join oms_vendor_info t2 on t1.vendor_id = t2.vendor_id left join oms_vendor_info t2 on t1.vendor_id = t2.vendor_id
@ -111,6 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select t1.id, t1.purchase_no, t1.buyer_name, t1.buyer_address, t1.vendor_id, t1.currency, t1.purchaser_id, t1.purchaser_name select t1.id, t1.purchase_no, t1.buyer_name, t1.buyer_address, t1.vendor_id, t1.currency, t1.purchaser_id, t1.purchaser_name
, t1.purchaser_mobile, t1.purchaser_email, t1.warehouse_id, t1.pay_method, t1.owner_id, t1.owner_name, t1.remark, t1.total_amount,t1.flow_type , t1.purchaser_mobile, t1.purchaser_email, t1.warehouse_id, t1.pay_method, t1.owner_id, t1.owner_name, t1.remark, t1.total_amount,t1.flow_type
, t1.status, t1.approve_status, t1.approve_time, t1.approve_node, t1.confirm_status, t1.create_time, t1.update_time, t1.del_flag,t1.version , t1.status, t1.approve_status, t1.approve_time, t1.approve_node, t1.confirm_status, t1.create_time, t1.update_time, t1.del_flag,t1.version
, t1.file_id
,t2.vendor_name,t2.vendor_user,t2.vendor_phone ,t2.vendor_name,t2.vendor_user,t2.vendor_phone
,t3.apply_time,t3.process_key,t3.todo_id,t3.task_id ,t3.apply_time,t3.process_key,t3.todo_id,t3.task_id
<if test="'bu_todo_completed'.equals(tableName)"> <if test="'bu_todo_completed'.equals(tableName)">
@ -257,6 +261,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="delFlag != null">del_flag,</if> <if test="delFlag != null">del_flag,</if>
<if test="version != null">version,</if> <if test="version != null">version,</if>
<if test="flowType != null">flow_type,</if> <if test="flowType != null">flow_type,</if>
<if test="fileId != null">file_id,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="purchaseNo != null">#{purchaseNo},</if> <if test="purchaseNo != null">#{purchaseNo},</if>
@ -284,6 +289,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="delFlag != null">#{delFlag},</if> <if test="delFlag != null">#{delFlag},</if>
<if test="version != null">#{version},</if> <if test="version != null">#{version},</if>
<if test="flowType != null">#{flowType},</if> <if test="flowType != null">#{flowType},</if>
<if test="fileId != null">#{fileId},</if>
</trim> </trim>
</insert> </insert>
@ -315,6 +321,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="delFlag != null">del_flag = #{delFlag},</if> <if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="version != null">version = #{version},</if> <if test="version != null">version = #{version},</if>
<if test="flowType != null">flow_type=#{flowType},</if> <if test="flowType != null">flow_type=#{flowType},</if>
<if test="fileId != null">file_id = #{fileId},</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>
@ -346,6 +353,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="delFlag != null">del_flag = #{delFlag},</if> <if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="version != null">version = #{version},</if> <if test="version != null">version = #{version},</if>
<if test="flowType != null">flow_type=#{flowType},</if> <if test="flowType != null">flow_type=#{flowType},</if>
<if test="fileId != null">file_id = #{fileId},</if>
</trim> </trim>
where purchase_no = #{purchaseNo} where purchase_no = #{purchaseNo}
</update> </update>
@ -377,6 +385,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="delFlag != null">del_flag = #{delFlag},</if> <if test="delFlag != null">del_flag = #{delFlag},</if>
<if test="version != null">version = #{version},</if> <if test="version != null">version = #{version},</if>
<if test="flowType != null">flow_type=#{flowType},</if> <if test="flowType != null">flow_type=#{flowType},</if>
<if test="fileId != null">file_id = #{fileId},</if>
</trim> </trim>
where purchase_no = #{purchaseNo} where purchase_no = #{purchaseNo}
</update> </update>

View File

@ -83,6 +83,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where> </where>
order by create_time desc order by create_time desc
</select> </select>
<select id="listReceivableByInvoiceBillCode" resultType="com.ruoyi.sip.domain.dto.ReceiptDetailDTO">
select t1.receipt_amount, t2.receivable_bill_code, t4.project_name, t4.project_code, t2.total_price_with_tax
from (SELECT sum(invoice_amount) receipt_amount,
receivable_bill_id
FROM oms_receivable_invoice_detail
WHERE write_off_id is null and invoice_bill_code in
<foreach item="item" collection="list" separator="," open="(" close=")" index="">
#{item}
</foreach>
group by receivable_bill_id) t1
left join oms_receivable_bill t2 on t1.receivable_bill_id = t2.id
left join project_order_info t3 on t2.order_code = t3.order_code
left join project_info t4 on t3.project_id = t4.id
</select>
<insert id="insertOmsReceivableInvoiceDetail" parameterType="com.ruoyi.sip.domain.OmsReceivableInvoiceDetail" useGeneratedKeys="true" keyProperty="id"> <insert id="insertOmsReceivableInvoiceDetail" parameterType="com.ruoyi.sip.domain.OmsReceivableInvoiceDetail" useGeneratedKeys="true" keyProperty="id">
insert into oms_receivable_invoice_detail insert into oms_receivable_invoice_detail
@ -121,6 +136,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null and updateBy != ''">#{updateBy},</if> <if test="updateBy != null and updateBy != ''">#{updateBy},</if>
</trim> </trim>
</insert> </insert>
<insert id="insertBatch">
insert into oms_receivable_invoice_detail(
invoice_plan_id,receivable_bill_id,invoice_time,invoice_amount,invoice_amount_without_tax,invoice_amount_tax,
invoice_rate,invoice_bill_code,receivable_detail_type,remark,create_time,create_by,update_time,update_by
)
values
<foreach item="item" collection="list" separator="," index="index">
(
#{item.invoicePlanId},#{item.receivableBillId},#{item.invoiceTime},#{item.invoiceAmount},#{item.invoiceAmountWithoutTax},#{item.invoiceAmountTax}
,#{item.invoiceRate},#{item.invoiceBillCode},#{item.receivableDetailType},#{item.remark},#{item.createTime},#{item.createBy},#{item.updateTime},#{item.updateBy}
)
</foreach>
</insert>
<update id="updateOmsReceivableInvoiceDetail" parameterType="com.ruoyi.sip.domain.OmsReceivableInvoiceDetail"> <update id="updateOmsReceivableInvoiceDetail" parameterType="com.ruoyi.sip.domain.OmsReceivableInvoiceDetail">
update oms_receivable_invoice_detail update oms_receivable_invoice_detail

View File

@ -93,7 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
group by receivable_bill_id) t1 group by receivable_bill_id) t1
left join oms_receivable_bill t2 on t1.receivable_bill_id = t2.id left join oms_receivable_bill t2 on t1.receivable_bill_id = t2.id
left join project_order_info t3 on t2.order_code = t3.order_code left join project_order_info t3 on t2.order_code = t3.order_code
left join project_info t4 on t3.project_id = t4.id; left join project_info t4 on t3.project_id = t4.id
</select> </select>
<insert id="insertOmsReceivableReceiptDetail" parameterType="com.ruoyi.sip.domain.OmsReceivableReceiptDetail" useGeneratedKeys="true" keyProperty="id"> <insert id="insertOmsReceivableReceiptDetail" parameterType="com.ruoyi.sip.domain.OmsReceivableReceiptDetail" useGeneratedKeys="true" keyProperty="id">