Compare commits

..

No commits in common. "d3bbf2da62ad06feb4aecda2f6b2f1d18d3a3fde" and "fe2791f815c8847d58dd255fce9cc41e583e8993" have entirely different histories.

32 changed files with 215 additions and 669 deletions

View File

@ -82,11 +82,3 @@ 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.id" class="el-upload-list__item ele-upload-list__item-content" v-for="(file, index) in fileList"> <li :key="file.url" class="el-upload-list__item ele-upload-list__item-content" v-for="(file, index) in fileList">
<el-link :href="`${baseUrl}${file.filePath}`" :underline="false" target="_blank"> <el-link :href="`${baseUrl}${file.url}`" :underline="false" target="_blank">
<span class="el-icon-document"> {{ getFileName(file.fileName) }} </span> <span class="el-icon-document"> {{ getFileName(file.name) }} </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,7 +112,6 @@ 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)
} }
}) })
}) })
@ -189,8 +188,8 @@ export default {
}, },
// //
handleUploadSuccess(res, file) { handleUploadSuccess(res, file) {
if (res.code === 0) { if (res.code === 200) {
this.uploadList.push({ ...res.data }) this.uploadList.push({ name: res.fileName, url: res.fileName })
this.uploadedSuccessfully() this.uploadedSuccessfully()
} else { } else {
this.number-- this.number--
@ -204,7 +203,6 @@ 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() {
@ -213,7 +211,6 @@ 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,30 +45,16 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="8"> <el-col :span="12">
<div class="detail-item">开票状态:
<dict-tag :options="dict.type.invoice_bill_status" :value="detail.invoiceStatus"/>
</div>
</el-col>
<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-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">票据类型: <div class="detail-item">票据类型:
<span class="item-value"><dict-tag :options="dict.type.finance_invoice_type" :value="detail.invoiceType"/></span> <span class="item-value"><dict-tag :options="dict.type.finance_invoice_type" :value="detail.invoiceType"/></span>
</div> </div>
</el-col> </el-col>
<el-col :span="12">
<div class="detail-item">发票/红冲:
{{detail.totalPriceWithTax<0?'':''}}
</div>
</el-col>
</el-row> </el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
@ -106,20 +92,45 @@
</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.detailDTOList"> <el-table :data="detail.detailList">
<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="receiptAmount" label="本次开票金额"></el-table-column> <el-table-column property="invoiceAmount" label="本次收票金额"></el-table-column>
<el-table-column property="receiptRate" label="本次开票比例(%)"></el-table-column> <el-table-column property="invoiceRate" 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" v-hasPermi="['finance:invoice:upload']"icon="el-icon-upload" @click="openUploadDialog">{{ titleText }}</el-button> <el-button type="primary" 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="invoiceData.invoiceType"/></span> <span class="item-value"><dict-tag :options="dict.type.finance_invoice_type" :value="attachment.ticketType"/></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="invoiceType" required> <el-form-item label="票据类型" prop="ticketType" required>
<el-select v-model="uploadForm.invoiceType" placeholder="请选择票据类型" @change="handleTypeChange"> <el-select v-model="uploadForm.ticketType" placeholder="请选择票据类型">
<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.totalPriceWithTax }}</span> <span>{{ invoiceData.invoicePriceWithTax }}</span>
</el-form-item> </el-form-item>
<el-form-item label="发票含税总价" prop="invoicePriceWithTax" required> <el-form-item label="发票含税总价" prop="ticketPriceWithTax" required>
<el-input v-model="uploadForm.invoicePriceWithTax" placeholder="请输入发票含税总价"></el-input> <el-input v-model="uploadForm.ticketPriceWithTax" placeholder="请输入发票含税总价"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="未税总价"> <el-form-item label="未税总价">
<span>{{ invoiceData.totalPriceWithoutTax }}</span> <span>{{ invoiceData.invoicePriceWithoutTax }}</span>
</el-form-item> </el-form-item>
<el-form-item label="发票未税总价" prop="invoicePriceWithoutTax" required> <el-form-item label="发票未税总价" prop="ticketPriceWithoutTax" required>
<el-input v-model="uploadForm.invoicePriceWithoutTax" placeholder="请输入发票未税总价" @input="handleWithoutTaxChange"></el-input> <el-input v-model="uploadForm.ticketPriceWithoutTax" placeholder="请输入发票未税总价"></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="invoiceAmount" required> <el-form-item label="发票税额" prop="ticketAmount" required>
<el-input v-model="uploadForm.invoiceAmount" placeholder="请输入发票税额" @input="handleAmountChange"></el-input> <el-input v-model="uploadForm.ticketAmount" placeholder="请输入发票税额"></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: {
invoicePriceWithTax: '', ticketPriceWithTax: '',
invoicePriceWithoutTax: '', ticketPriceWithoutTax: '',
invoiceAmount: '', ticketAmount: '',
invoiceType: this.invoiceData.invoiceType, ticketType: '',
remark: '', remark: '',
file: null file: null
}, },
rules: { rules: {
invoicePriceWithTax: [ ticketPriceWithTax: [
{ required: true, message: "请输入发票含税总价", trigger: "blur" } { required: true, message: "请输入发票含税总价", trigger: "blur" }
], ],
invoicePriceWithoutTax: [ ticketPriceWithoutTax: [
{ required: true, message: "请输入发票未税总价", trigger: "blur" } { required: true, message: "请输入发票未税总价", trigger: "blur" }
], ],
invoiceAmount: [ ticketAmount: [
{ 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: 'invoice' }) getInvoiceAttachments(this.invoiceData.id, { type: 'ticket' })
.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 = {
invoicePriceWithTax: '', ticketPriceWithTax: '',
invoicePriceWithoutTax: '', ticketPriceWithoutTax: '',
invoiceAmount: '', ticketAmount: '',
invoiceType: '', ticketType: '',
remark: '', remark: '',
file: null file: null
}; };
@ -358,26 +358,6 @@ 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);
@ -408,50 +388,15 @@ 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("invoicePriceWithTax", this.uploadForm.invoicePriceWithTax); formData.append("ticketPriceWithTax", this.uploadForm.ticketPriceWithTax);
formData.append("invoicePriceWithoutTax", this.uploadForm.invoicePriceWithoutTax); formData.append("ticketPriceWithoutTax", this.uploadForm.ticketPriceWithoutTax);
formData.append("invoiceAmount", this.uploadForm.invoiceAmount); formData.append("ticketAmount", this.uploadForm.ticketAmount);
formData.append("invoiceType", this.uploadForm.invoiceType); formData.append("ticketType", this.uploadForm.ticketType);
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="300" fixed="right"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
@ -170,14 +170,12 @@
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
@ -191,16 +189,9 @@
size="mini" size="mini"
type="text" type="text"
icon="el-icon-refresh-left" icon="el-icon-refresh-left"
v-show="scope.row.approveStatus === '2' && scope.row.invoiceStatus === '1'" v-show="scope.row.approveStatus=='2'"
@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>
@ -226,7 +217,7 @@
</template> </template>
<script> <script>
import {listInvoice, getInvoice, redRush, addInvoice, returnInvoice, revokeInvoice} from "@/api/finance/invoice"; import {listInvoice, getInvoice, redRush, addInvoice, returnInvoice} 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";
@ -362,15 +353,6 @@ 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,12 +107,6 @@
<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%">
@ -202,15 +196,13 @@ 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, FileUpload}, components: {TaxRateInput, SelectUser, SelectProduct },
props: { props: {
orderData: { orderData: {
type: Object, type: Object,
@ -236,7 +228,6 @@ export default {
purchaserSelectOpen: false, purchaserSelectOpen: false,
// //
ownerSelectOpen: false, ownerSelectOpen: false,
fileList: [],
// //
form: { form: {
id: null, id: null,
@ -254,7 +245,6 @@ 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,
@ -315,12 +305,6 @@ 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());
@ -344,11 +328,6 @@ 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());
} }
@ -464,10 +443,6 @@ 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 => {
@ -505,7 +480,6 @@ 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,
@ -529,7 +503,6 @@ 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,12 +105,6 @@
<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%">
@ -242,7 +236,6 @@ 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,
@ -274,7 +267,6 @@ 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,
@ -287,9 +279,6 @@ 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;
@ -376,7 +365,6 @@ 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,
@ -399,22 +387,6 @@ 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,16 +87,23 @@ public class CommonController
String filePath = RuoYiConfig.getUploadPath(); String filePath = RuoYiConfig.getUploadPath();
// 上传并返回新文件名称 // 上传并返回新文件名称
String fileName = FileUploadUtils.upload(filePath, file); String fileName = FileUploadUtils.upload(filePath, file);
OmsFileLog omsFileLog = new OmsFileLog(); String url = serverConfig.getUrl() + fileName;
omsFileLog.setFilePath(fileName); OmsFileLog omsFileLog =OmsFileLog.builder()
omsFileLog.setNewFilename(FileUtils.getName(fileName)); .url(url)
omsFileLog.setFileName(file.getOriginalFilename()); .fileName(fileName)
omsFileLog.setFileSize(file.getSize()); .newFilename(FileUtils.getName(fileName))
omsFileLog.setFileType(file.getContentType()); .originalFilename(file.getOriginalFilename())
omsFileLog.setCreateBy(ShiroUtils.getUserId().toString()); .createBy(ShiroUtils.getUserId().toString())
omsFileLog.setCreateTime(DateUtil.date()); .createTime(DateUtil.date())
.build();
fileLogService.insert(omsFileLog); fileLogService.insert(omsFileLog);
return AjaxResult.success(omsFileLog); AjaxResult ajax = AjaxResult.success();
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)
{ {
@ -110,9 +117,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.getFilePath().replace(Constants.RESOURCE_PREFIX,localPath); String downloadPath = omsFileLog.getFileName().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.getFileName()) ? omsFileLog.getFileName() : omsFileLog.getNewFilename()); FileUtils.setAttachmentResponseHeader(response, StringUtils.isEmpty(omsFileLog.getOriginalFilename()) ? omsFileLog.getNewFilename() : omsFileLog.getOriginalFilename());
FileUtils.writeBytes(downloadPath, response.getOutputStream()); FileUtils.writeBytes(downloadPath, response.getOutputStream());
} catch (Exception e) { } catch (Exception e) {
log.error("下载文件失败", e); log.error("下载文件失败", e);
@ -130,22 +137,25 @@ public class CommonController
{ {
// 上传文件路径 // 上传文件路径
String filePath = RuoYiConfig.getUploadPath(); String filePath = RuoYiConfig.getUploadPath();
List<OmsFileLog> resultList=new ArrayList<>(); List<String> urls = new ArrayList<String>();
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);
OmsFileLog omsFileLog = new OmsFileLog(); String url = serverConfig.getUrl() + fileName;
omsFileLog.setFilePath(fileName); urls.add(url);
omsFileLog.setNewFilename(FileUtils.getName(fileName)); fileNames.add(fileName);
omsFileLog.setFileName(file.getOriginalFilename()); newFileNames.add(FileUtils.getName(fileName));
omsFileLog.setFileSize(file.getSize()); originalFilenames.add(file.getOriginalFilename());
omsFileLog.setFileType(file.getContentType());
omsFileLog.setCreateBy(ShiroUtils.getUserId().toString());
omsFileLog.setCreateTime(DateUtil.date());
resultList.add(omsFileLog);
} }
AjaxResult ajax = AjaxResult.success(resultList); AjaxResult ajax = AjaxResult.success();
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 apply(@RequestBody OmsInvoiceBill omsInvoiceBill) public AjaxResult getInfo(@RequestBody OmsInvoiceBill omsInvoiceBill)
{ {
return omsInvoiceBillService.applyInvoice(omsInvoiceBill); return omsInvoiceBillService.applyInvoice(omsInvoiceBill);
} }
@ -206,27 +206,6 @@ 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,14 +122,6 @@ 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,11 +1,9 @@
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;
@ -133,25 +131,4 @@ 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,13 +1,11 @@
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;
/** /**
* (OmsFileLog) * (OmsFileLog)
* *
@ -15,55 +13,31 @@ import java.util.Date;
* @since 2025-08-27 18:01:33 * @since 2025-08-27 18:01:33
*/ */
@Data @Data
public class OmsFileLog extends BaseEntity { @Builder
public class OmsFileLog {
/**
* ID
*/
private Integer id; private Integer id;
/**
* private String url;
*/
private String newFilename;
/**
*
*/
private String fileName; private String fileName;
/**
* private String newFilename;
*/
private String filePath;
private String originalFilename;
/**
*
*/
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,7 +6,6 @@ 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;
@ -117,9 +116,6 @@ 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,8 +103,6 @@ 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,7 +89,6 @@ 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,7 +90,4 @@ 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,7 +3,6 @@ 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
@ -70,9 +69,4 @@ 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,11 +69,7 @@ public interface IOmsFinAttachmentService
* @return * @return
* @throws Exception * @throws Exception
*/ */
default OmsFinAttachment uploadAttachment(MultipartFile file, Long invoiceReceiptBillId, OmsFinAttachment.RelatedBillTypeEnum type) throws Exception public 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,7 +116,4 @@ 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,7 +4,6 @@ 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
@ -74,8 +73,4 @@ 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,String remark) throws Exception public OmsFinAttachment uploadAttachment(MultipartFile file, Long relatedBillId, OmsFinAttachment.RelatedBillTypeEnum type) throws Exception
{ {
// 上传文件路径 // 上传文件路径
String filePath = RuoYiConfig.getUploadPath(); String filePath = RuoYiConfig.getUploadPath();
@ -40,7 +40,6 @@ 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,6 +9,7 @@ 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;
@ -16,7 +17,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.ReceiptDetailDTO; import com.ruoyi.sip.domain.dto.PaymentBillPayableDetailDTO;
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;
@ -72,9 +73,6 @@ 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;
} }
@ -144,10 +142,7 @@ public class OmsInvoiceBillServiceImpl implements IOmsInvoiceBillService, TodoCo
@Override @Override
public int deleteOmsInvoiceBillById(Long id) public int deleteOmsInvoiceBillById(Long id)
{ {
OmsInvoiceBill invoiceBill = selectOmsInvoiceBillById(id); return omsInvoiceBillMapper.deleteOmsInvoiceBillById(id);
int i = omsInvoiceBillMapper.deleteOmsInvoiceBillById(id);
omsInvoiceBillMapper.clearRelationReceivable(invoiceBill.getInvoiceBillCode());
return i;
} }
/** /**
@ -188,14 +183,24 @@ public class OmsInvoiceBillServiceImpl implements IOmsInvoiceBillService, TodoCo
} }
// 这里可以添加上传附件的逻辑 // 这里可以添加上传附件的逻辑
omsFinAttachmentService.uploadAttachment(file, omsInvoiceBill.getId(), OmsFinAttachment.RelatedBillTypeEnum.RECEIVE_INVOICE, bill.getRemark()); // omsFinAttachmentService.uploadAttachment(file, omsInvoiceBill.getId(), "INVOICE_RECEIPT");
omsInvoiceBill.setActualInvoiceTime(DateUtils.getNowDate()); omsInvoiceBill.setActualInvoiceTime(DateUtils.getNowDate());
omsInvoiceBill.setInvoiceStatus(OmsInvoiceBill.InvoiceStatusEnum.INVOICE.getCode()); omsInvoiceBill.setApproveStatus(ApproveStatusEnum.WAIT_APPROVE.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("上传成功");
} }
@ -261,34 +266,16 @@ public class OmsInvoiceBillServiceImpl implements IOmsInvoiceBillService, TodoCo
// 创建红冲单 // 创建红冲单
OmsInvoiceBill refundBill = new OmsInvoiceBill(); OmsInvoiceBill refundBill = new OmsInvoiceBill();
refundBill.setInvoiceBillCode(generateInvoiceBillCode()); refundBill.setInvoiceBillCode(generateInvoiceBillCode());
refundBill.setPartnerName(originalBill.getPartnerName());
refundBill.setPartnerCode(originalBill.getPartnerCode());
refundBill.setInvoiceType(originalBill.getInvoiceType()); refundBill.setInvoiceType(originalBill.getInvoiceType());
refundBill.setInvoiceTime(DateUtils.getNowDate()); refundBill.setPartnerCode(originalBill.getPartnerCode());
// 负数金额 refundBill.setTotalPriceWithTax(originalBill.getTotalPriceWithTax().negate()); // 负数金额
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);
@ -296,10 +283,6 @@ 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("红冲申请已提交");
} }
@ -384,44 +367,6 @@ 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,7 +19,9 @@ 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.*; import com.ruoyi.sip.service.ICnareaService;
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;
@ -33,6 +35,7 @@ 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;
@ -66,8 +69,6 @@ public class OmsPurchaseOrderServiceImpl implements IOmsPurchaseOrderService, To
private TodoService todoService; private TodoService todoService;
@Autowired @Autowired
protected ManagementService managementService; protected ManagementService managementService;
@Autowired
private IOmsFileLogService omsFileLogService;
/** /**
* *
* *
@ -78,15 +79,9 @@ 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;
} }
@ -358,15 +353,8 @@ 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,19 +1,13 @@
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;
@ -152,38 +146,4 @@ 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,8 +1176,6 @@ 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);
@ -1189,7 +1187,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) && processDefinitionVersion>9){ } else if ("领导1".equals(taskName) && todo.getApplyTime().compareTo(DateUtils.parseDate("2025-12-19"))>0){
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);
@ -1198,6 +1196,7 @@ 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,7 +95,6 @@ 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

@ -1,27 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?> <?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"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<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="newFilename" column="new_filename"/> <result property="url" column="url"/>
<result property="fileName" column="file_name"/> <result property="fileName" column="file_name"/>
<result property="filePath" column="file_path"/> <result property="newFilename" column="new_filename"/>
<result property="fileSize" column="file_size"/> <result property="originalFilename" column="original_filename"/>
<result property="fileType" column="file_type"/> <result property="createBy" column="create_by"/>
<result property="createBy" column="create_by"/> <result property="createTime" column="create_time"/>
<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, new_filename, file_name, file_path, file_size, file_type, create_by, create_time, update_by, update_time, remark id, url, file_name, new_filename, original_filename, create_by, create_time
</sql> </sql>
<!--通过实体作为筛选条件查询--> <!--通过实体作为筛选条件查询-->
<select id="queryAll" resultMap="OmsFileLogMap"> <select id="queryAll" resultMap="OmsFileLogMap">
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
@ -30,20 +26,17 @@
<if test="id != null"> <if test="id != null">
and id = #{id} and id = #{id}
</if> </if>
<if test="newFilename != null and newFilename != ''"> <if test="url != null and url != ''">
and new_filename = #{newFilename} and url = #{url}
</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="filePath != null and filePath != ''"> <if test="newFilename != null and newFilename != ''">
and file_path = #{filePath} and new_filename = #{newFilename}
</if> </if>
<if test="fileSize != null"> <if test="originalFilename != null and originalFilename != ''">
and file_size = #{fileSize} and original_filename = #{originalFilename}
</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}
@ -51,46 +44,34 @@
<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>
<!--根据ID查详情--> <!--根据ID查详情-->
<select id="queryById" parameterType="Integer" resultMap="OmsFileLogMap"> <select id="queryById" parameterType="Integer" resultMap="OmsFileLogMap">
SELECT SELECT
<include refid="Base_Column_List" /> id, url, file_name, new_filename, original_filename, create_by, create_time
FROM oms_file_log FROM oms_file_log
WHERE id = #{id} LIMIT 1 WHERE id = #{id} LIMIT 1
</select> </select>
<!--新增所有列--> <!--新增所有列-->
<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="newFilename != null and newFilename != ''"> <if test="url != null and url != ''">
new_filename, url,
</if> </if>
<if test="fileName != null and fileName != ''"> <if test="fileName != null and fileName != ''">
file_name, file_name,
</if> </if>
<if test="filePath != null and filePath != ''"> <if test="newFilename != null and newFilename != ''">
file_path, new_filename,
</if> </if>
<if test="fileSize != null"> <if test="originalFilename != null and originalFilename != ''">
file_size, original_filename,
</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,
@ -98,31 +79,19 @@
<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="newFilename != null and newFilename != ''"> <if test="url != null and url != ''">
#{newFilename}, #{url},
</if> </if>
<if test="fileName != null and fileName != ''"> <if test="fileName != null and fileName != ''">
#{fileName}, #{fileName},
</if> </if>
<if test="filePath != null and filePath != ''"> <if test="newFilename != null and newFilename != ''">
#{filePath}, #{newFilename},
</if> </if>
<if test="fileSize != null"> <if test="originalFilename != null and originalFilename != ''">
#{fileSize}, #{originalFilename},
</if>
<if test="fileType != null and fileType != ''">
#{fileType},
</if> </if>
<if test="createBy != null and createBy != ''"> <if test="createBy != null and createBy != ''">
#{createBy}, #{createBy},
@ -130,36 +99,24 @@
<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>
<!--通过主键修改数据--> <!--通过主键修改数据-->
<update id="update"> <update id="update">
UPDATE oms_file_log UPDATE oms_file_log
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="newFilename != null and newFilename != ''"> <if test="url != null and url != ''">
new_filename = #{newFilename}, url = #{url},
</if> </if>
<if test="fileName != null and fileName != ''"> <if test="fileName != null and fileName != ''">
file_name = #{fileName}, file_name = #{fileName},
</if> </if>
<if test="filePath != null and filePath != ''"> <if test="newFilename != null and newFilename != ''">
file_path = #{filePath}, new_filename = #{newFilename},
</if> </if>
<if test="fileSize != null"> <if test="originalFilename != null and originalFilename != ''">
file_size = #{fileSize}, original_filename = #{originalFilename},
</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},
@ -167,32 +124,23 @@
<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>
<!--通过主键删除--> <!--通过主键删除-->
<delete id="deleteById"> <delete id="deleteById">
DELETE FROM oms_file_log WHERE id = #{id} DELETE FROM oms_file_log WHERE id = #{id}
</delete> </delete>
<!--通过id批量删除--> <!--通过id批量删除-->
<delete id="batchRemove"> <delete id="batchRemove">
delete from oms_file_log where id in delete from oms_file_log where id in
<foreach item="id" collection="array" open="(" separator="," close=")"> <foreach item="id" collection="array" open="(" separator="," close=")">
#{id} #{id}
</foreach> </foreach>
</delete> </delete>
</mapper> </mapper>

View File

@ -14,8 +14,6 @@ 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" />
@ -42,7 +40,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_price_with_tax,invoice_price_without_tax, invoice_time, partner_code,partner_name, total_price_with_tax, total_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
@ -178,12 +176,6 @@ 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>
@ -276,12 +268,6 @@ 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>
@ -377,12 +363,6 @@ 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>
@ -492,12 +472,6 @@ 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,11 +36,10 @@ 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, file_id 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 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">
@ -77,7 +76,6 @@ 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>
@ -106,12 +104,11 @@ 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">#{createTime},</if> <if test="createTime != null">create_time,</if>
<if test="updateBy != null">#{updateBy},</if> <if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">update_time,</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,7 +29,6 @@ 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">
@ -48,7 +47,6 @@ 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">
@ -71,7 +69,6 @@ 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
@ -114,7 +111,6 @@ 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)">
@ -261,7 +257,6 @@ 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>
@ -289,7 +284,6 @@ 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>
@ -321,7 +315,6 @@ 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>
@ -353,7 +346,6 @@ 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>
@ -385,7 +377,6 @@ 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,21 +83,6 @@ 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
@ -136,21 +121,6 @@ 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">