feat(finance): 新增财务计收模块并完善相关功能
- 新增财务计收API接口文件,包含查询、新增、修改、删除等操作 - 创建财务计收页面组件,实现列表展示、搜索、导出等功能 - 配置财务计收路由,添加菜单权限控制 - 在订单页面添加申请计收按钮,实现订单与计收关联 - 完善库存发货服务,在发货完成时自动创建计收数据 - 新增财务计收相关实体类、服务接口和数据访问层 - 添加库存信息按订单编号查询功能 - 修复内部库存页面数量验证逻辑问题 - 优化发货表单中序列号列表加载时机dev_1.0.1
parent
695c77ca60
commit
caec1d4bd0
|
|
@ -0,0 +1,72 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询财务计收列表
|
||||||
|
export function listCharge(query) {
|
||||||
|
return request({
|
||||||
|
url: '/finance/charge/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询财务计收详细
|
||||||
|
export function getCharge(id) {
|
||||||
|
return request({
|
||||||
|
url: '/finance/charge/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增财务计收
|
||||||
|
export function addCharge(data) {
|
||||||
|
return request({
|
||||||
|
url: '/finance/charge',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改财务计收
|
||||||
|
export function updateCharge(data) {
|
||||||
|
return request({
|
||||||
|
url: '/finance/charge',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function revokeCharge(data) {
|
||||||
|
return request({
|
||||||
|
url: '/finance/charge/revoke',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除财务计收
|
||||||
|
export function delCharge(id) {
|
||||||
|
return request({
|
||||||
|
url: '/finance/charge/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function applyChargeBiz(data) {
|
||||||
|
return request({
|
||||||
|
url: '/finance/charge/applyBiz' ,
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function returnApplyBiz(data) {
|
||||||
|
return request({
|
||||||
|
url: '/finance/charge/returnApplyBiz' ,
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function applyCharge(data) {
|
||||||
|
return request({
|
||||||
|
url: '/finance/charge/apply' ,
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
@ -214,6 +214,13 @@ export const dynamicRoutes = [
|
||||||
component: () => import('@/views/finance/payment/index'),
|
component: () => import('@/views/finance/payment/index'),
|
||||||
name: 'Payment',
|
name: 'Payment',
|
||||||
meta: { title: '付款单', icon: 'form' }
|
meta: { title: '付款单', icon: 'form' }
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'charge',
|
||||||
|
component: () => import('@/views/finance/charge/index'),
|
||||||
|
name: 'Charge',
|
||||||
|
meta: { title: '财务计收', icon: 'money' },
|
||||||
|
permissions: ['finance:charge:list']
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,280 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||||
|
<el-form-item label="项目编号" prop="projectCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.projectCode"
|
||||||
|
placeholder="请输入项目编号"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="项目名称" prop="projectName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.projectName"
|
||||||
|
placeholder="请输入项目名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="进货商" prop="partnerName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.partnerName"
|
||||||
|
placeholder="请输入进货商"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<!-- <el-col :span="1.5">-->
|
||||||
|
<!-- <el-button-->
|
||||||
|
<!-- type="danger"-->
|
||||||
|
<!-- plain-->
|
||||||
|
<!-- icon="el-icon-delete"-->
|
||||||
|
<!-- size="mini"-->
|
||||||
|
<!-- :disabled="multiple"-->
|
||||||
|
<!-- @click="handleDelete"-->
|
||||||
|
<!-- v-hasPermi="['finance:charge:remove']"-->
|
||||||
|
<!-- >删除</el-button>-->
|
||||||
|
<!-- </el-col>-->
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="warning"
|
||||||
|
plain
|
||||||
|
icon="el-icon-download"
|
||||||
|
size="mini"
|
||||||
|
@click="handleExport"
|
||||||
|
v-hasPermi="['finance:charge:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="chargeList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="项目编码" align="center" prop="projectCode" />
|
||||||
|
<el-table-column label="项目名称" align="center" prop="projectName" />
|
||||||
|
<el-table-column label="合同编号" align="center" prop="orderCode" />
|
||||||
|
<el-table-column label="下单通路" align="center" prop="orderChannel" />
|
||||||
|
<el-table-column label="供货商" align="center" prop="supplier" />
|
||||||
|
<el-table-column label="进货商" align="center" prop="partnerName" />
|
||||||
|
<el-table-column label="业务侧可计收时间" align="center" prop="bizChargeDate" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.bizChargeDate, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="财务计收时间" align="center" prop="financeChargeDate" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.financeChargeDate, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="收入" align="center">
|
||||||
|
<el-table-column label="含税总价(元)" align="center" prop="incomeWithTaxTotal" />
|
||||||
|
<el-table-column label="未含税总价(元)" align="center" prop="incomeWithoutTaxTotal" />
|
||||||
|
<el-table-column label="税额(元)" align="center" prop="incomeTax" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ $calc.sub(scope.row.incomeWithTaxTotal, scope.row.incomeWithoutTaxTotal) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="成本" align="center">
|
||||||
|
<el-table-column label="软件折后未税小计" align="center" prop="costSoftwareWithoutTax" />
|
||||||
|
<el-table-column label="硬件折后未税小计" align="center" prop="costHardwareWithoutTax" />
|
||||||
|
<el-table-column label="软件维保折后未税小计" align="center" prop="costSoftwareMaintWithoutTax" />
|
||||||
|
<el-table-column label="硬件维保折后未税小计" align="center" prop="costHardwareMaintWithoutTax" />
|
||||||
|
<el-table-column label="省代服务折后未税小计" align="center" prop="costProvinceServiceWithoutTax" />
|
||||||
|
<el-table-column label="其它折后未税小计" align="center" prop="costOtherWithoutTax" />
|
||||||
|
<el-table-column label="成本未税合计" align="center" prop="costTotalWithoutTax" >
|
||||||
|
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="毛利" align="center" prop="grossProfit" />
|
||||||
|
<el-table-column label="毛利率" align="center" prop="grossProfitRate" />
|
||||||
|
<el-table-column label="备注" align="center" prop="remark" />
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleRemark(scope.row)"
|
||||||
|
v-hasPermi="['finance:charge:edit']"
|
||||||
|
>编辑备注</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-refresh-left"
|
||||||
|
@click="handleRevoke(scope.row)"
|
||||||
|
v-hasPermi="['finance:charge:remove']"
|
||||||
|
>撤销</el-button>
|
||||||
|
<!-- <el-button-->
|
||||||
|
<!-- size="mini"-->
|
||||||
|
<!-- type="text"-->
|
||||||
|
<!-- icon="el-icon-delete"-->
|
||||||
|
<!-- @click="handleDelete(scope.row)"-->
|
||||||
|
<!-- v-hasPermi="['finance:charge:remove']"-->
|
||||||
|
<!-- >删除</el-button>-->
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 编辑备注对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
|
<el-form ref="form" :model="form" label-width="80px">
|
||||||
|
<el-form-item label="备注" prop="remark">
|
||||||
|
<el-input v-model="form.remark" type="textarea" placeholder="请输入备注内容" :rows="4" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { listCharge, getCharge, delCharge, updateCharge, revokeCharge } from "@/api/finance/charge";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Charge",
|
||||||
|
dicts: ['finance_charge_status'],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 财务计收表格数据
|
||||||
|
chargeList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
projectCode: null,
|
||||||
|
projectName: null,
|
||||||
|
partnerName: null,
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询财务计收列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listCharge(this.queryParams).then(response => {
|
||||||
|
this.chargeList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
remark: null,
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
/** 多选框选中数据 */
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.id)
|
||||||
|
this.single = selection.length!==1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 编辑备注按钮操作 */
|
||||||
|
handleRemark(row) {
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids
|
||||||
|
// 使用 getCharge 获取最新数据回显,或者直接用 row 赋值
|
||||||
|
getCharge(id).then(response => {
|
||||||
|
this.form = {
|
||||||
|
id: response.data.id,
|
||||||
|
remark: response.data.remark
|
||||||
|
};
|
||||||
|
this.open = true;
|
||||||
|
this.title = "编辑备注";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 撤销按钮操作 */
|
||||||
|
handleRevoke(row) {
|
||||||
|
this.$modal.confirm('是否确认撤销该条数据?').then(function() {
|
||||||
|
return revokeCharge({id: row.id});
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("撤销成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
// 仅提交备注修改
|
||||||
|
updateCharge({id:this.form.id,remark:this.form.remark}).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal.confirm('是否确认删除财务计收编号为"' + ids + '"的数据项?').then(function() {
|
||||||
|
return delCharge(ids);
|
||||||
|
}).then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('finance/charge/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `charge_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
@ -541,7 +541,7 @@ export default {
|
||||||
this.$modal.msgWarning("请至少添加一条产品信息");
|
this.$modal.msgWarning("请至少添加一条产品信息");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.form.quantity!==this.form.inventoryInfoList.length){
|
if (this.form.quantity!==this.form.inventoryInfoList.length && !this.isServiceIn){
|
||||||
this.$modal.msgWarning("采购数量与入库数量不一致");
|
this.$modal.msgWarning("采购数量与入库数量不一致");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -156,7 +156,9 @@ export default {
|
||||||
this.queryParams.pageSize = productRow.quantity - productRow.deliveryGenerateQuantity - productRow.deliveryConfirmQuantity;
|
this.queryParams.pageSize = productRow.quantity - productRow.deliveryGenerateQuantity - productRow.deliveryConfirmQuantity;
|
||||||
|
|
||||||
this.isInitialLoad = true;
|
this.isInitialLoad = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
this.getSnList();
|
this.getSnList();
|
||||||
|
})
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
},
|
},
|
||||||
getSnList() {
|
getSnList() {
|
||||||
|
|
|
||||||
|
|
@ -120,6 +120,7 @@
|
||||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['project:order:edit']">编辑</el-button>
|
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['project:order:edit']">编辑</el-button>
|
||||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['project:order:remove']">删除</el-button>
|
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['project:order:remove']">删除</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
<el-button size="mini" type="text" icon="el-icon-download" v-if="scope.row.chargeStatus==='1'" @click="applyCharge(scope.row)" v-hasPermi="['project:order:charge']">申请计收</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -142,6 +143,7 @@ import { listOrder, delOrder, exportOrder } from "@/api/project/order";
|
||||||
import OrderDetail from './OrderDetail.vue';
|
import OrderDetail from './OrderDetail.vue';
|
||||||
import OrderDetailDrawer from './OrderDetailDrawer.vue';
|
import OrderDetailDrawer from './OrderDetailDrawer.vue';
|
||||||
import ProjectDetailDrawer from '../info/ProjectDetailDrawer.vue';
|
import ProjectDetailDrawer from '../info/ProjectDetailDrawer.vue';
|
||||||
|
import {applyChargeBiz} from "@/api/finance/charge";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Order",
|
name: "Order",
|
||||||
|
|
@ -235,6 +237,14 @@ export default {
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
|
applyCharge(row){
|
||||||
|
applyChargeBiz({orderCode:row.orderCode}).then(response => {
|
||||||
|
this.$message.success("申请计收成功");
|
||||||
|
this.getList();
|
||||||
|
}).catch(error => {
|
||||||
|
this.$message.error("申请计收失败");
|
||||||
|
});
|
||||||
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.dateRange = [];
|
this.dateRange = [];
|
||||||
|
|
|
||||||
|
|
@ -150,6 +150,13 @@
|
||||||
<el-table-column label="下单时间" prop="estimatedOrderTime" width="180" sortable/>
|
<el-table-column label="下单时间" prop="estimatedOrderTime" width="180" sortable/>
|
||||||
<el-table-column label="执行单截止时间" prop="orderEndTime" width="180" sortable/>
|
<el-table-column label="执行单截止时间" prop="orderEndTime" width="180" sortable/>
|
||||||
<el-table-column label="归档时间" prop="approveTime" width="180" sortable/>
|
<el-table-column label="归档时间" prop="approveTime" width="180" sortable/>
|
||||||
|
<el-table-column label="商务是否申请计收" prop="approveTime" width="180" >
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{scope.row.bizChargeDate ?'已申请' : '未申请'}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="业务侧可计收时间" prop="bizChargeDate" width="180" />
|
||||||
|
<el-table-column label="财务计收时间" prop="financeChargeDate" width="180" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120" fixed="right">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120" fixed="right">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
|
|
@ -159,6 +166,20 @@
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdateFinanceStatus(scope.row, '1')"
|
@click="handleUpdateFinanceStatus(scope.row, '1')"
|
||||||
>完结</el-button>
|
>完结</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="scope.row.chargeStatus == '2'"
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleApplyCharge(scope.row)"
|
||||||
|
>计收</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="scope.row.chargeStatus == '2'"
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleApplyChargeBack(scope.row)"
|
||||||
|
>申请计收退回</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -183,6 +204,7 @@
|
||||||
import { listOrder, updateFinanceStatus } from "@/api/project/order";
|
import { listOrder, updateFinanceStatus } from "@/api/project/order";
|
||||||
import ProjectDetailDrawer from '../info/ProjectDetailDrawer.vue';
|
import ProjectDetailDrawer from '../info/ProjectDetailDrawer.vue';
|
||||||
import OrderDetailDrawer from './OrderDetailDrawer.vue';
|
import OrderDetailDrawer from './OrderDetailDrawer.vue';
|
||||||
|
import {applyCharge, returnApplyBiz} from "@/api/finance/charge";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "OrderFinance",
|
name: "OrderFinance",
|
||||||
|
|
@ -243,6 +265,22 @@ export default {
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleApplyCharge(row){
|
||||||
|
applyCharge({orderCode:row.orderCode}).then(response => {
|
||||||
|
this.$message.success("计收成功");
|
||||||
|
this.getList();
|
||||||
|
}).catch(error => {
|
||||||
|
this.$message.error("计收失败");
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleApplyChargeBack(row){
|
||||||
|
returnApplyBiz({orderCode:row.orderCode}).then(response => {
|
||||||
|
this.$message.success("申请计收退回成功");
|
||||||
|
this.getList();
|
||||||
|
}).catch(error => {
|
||||||
|
this.$message.error("申请计收退回失败");
|
||||||
|
})
|
||||||
|
},
|
||||||
/** 查询订单管理列表 */
|
/** 查询订单管理列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,131 @@
|
||||||
|
package com.ruoyi.sip.controller;
|
||||||
|
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.sip.domain.OmsFinanceCharge;
|
||||||
|
import com.ruoyi.sip.service.IOmsFinanceChargeService;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 财务计收Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-12-30
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/finance/charge")
|
||||||
|
public class OmsFinanceChargeController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IOmsFinanceChargeService omsFinanceChargeService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询财务计收列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("finance:charge:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(OmsFinanceCharge omsFinanceCharge)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<OmsFinanceCharge> list = omsFinanceChargeService.selectOmsFinanceChargeList(omsFinanceCharge);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出财务计收列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("finance:charge:export")
|
||||||
|
@Log(title = "财务计收", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, OmsFinanceCharge omsFinanceCharge)
|
||||||
|
{
|
||||||
|
List<OmsFinanceCharge> list = omsFinanceChargeService.selectOmsFinanceChargeList(omsFinanceCharge);
|
||||||
|
ExcelUtil<OmsFinanceCharge> util = new ExcelUtil<OmsFinanceCharge>(OmsFinanceCharge.class);
|
||||||
|
util.exportExcel(response, list, "财务计收数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取财务计收详细信息
|
||||||
|
*/
|
||||||
|
|
||||||
|
@RequiresPermissions("finance:charge:query")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return AjaxResult.success(omsFinanceChargeService.selectOmsFinanceChargeById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增财务计收
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("finance:charge:add")
|
||||||
|
@Log(title = "财务计收", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody OmsFinanceCharge omsFinanceCharge)
|
||||||
|
{
|
||||||
|
return toAjax(omsFinanceChargeService.insertOmsFinanceCharge(omsFinanceCharge));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改财务计收
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("finance:charge:edit")
|
||||||
|
@Log(title = "财务计收", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody OmsFinanceCharge omsFinanceCharge)
|
||||||
|
{
|
||||||
|
return toAjax(omsFinanceChargeService.updateOmsFinanceCharge(omsFinanceCharge));
|
||||||
|
}
|
||||||
|
@RequiresPermissions("finance:charge:edit")
|
||||||
|
@Log(title = "申请计收", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping("applyBiz")
|
||||||
|
public AjaxResult applyBiz(@RequestBody OmsFinanceCharge omsFinanceCharge)
|
||||||
|
{
|
||||||
|
omsFinanceCharge.setChargeStatus(OmsFinanceCharge.ChargeStatusEnum.APPLY_CHARGE.getCode());
|
||||||
|
omsFinanceCharge.setBizChargeDate(DateUtils.getNowDate());
|
||||||
|
return toAjax(omsFinanceChargeService.updateOmsFinanceChargeByOrderCode(omsFinanceCharge));
|
||||||
|
}
|
||||||
|
@RequiresPermissions("finance:charge:edit")
|
||||||
|
@Log(title = "退回申请计收", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping("returnApplyBiz")
|
||||||
|
public AjaxResult returnApplyBiz(@RequestBody OmsFinanceCharge omsFinanceCharge)
|
||||||
|
{
|
||||||
|
omsFinanceCharge.setChargeStatus(OmsFinanceCharge.ChargeStatusEnum.WAIT_APPLY_CHARGE.getCode());
|
||||||
|
return toAjax(omsFinanceChargeService.returnApplyBiz(omsFinanceCharge));
|
||||||
|
}
|
||||||
|
@RequiresPermissions("finance:charge:edit")
|
||||||
|
@Log(title = "财务计收", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping("apply")
|
||||||
|
public AjaxResult completedCharge(@RequestBody OmsFinanceCharge omsFinanceCharge)
|
||||||
|
{
|
||||||
|
|
||||||
|
return toAjax(omsFinanceChargeService.completedCharge(omsFinanceCharge));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除财务计收
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("finance:charge:remove")
|
||||||
|
@Log(title = "财务计收", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(omsFinanceChargeService.deleteOmsFinanceChargeByIds(ids));
|
||||||
|
}
|
||||||
|
@Log(title = "财务计收", businessType = BusinessType.DELETE)
|
||||||
|
@PutMapping("/revoke")
|
||||||
|
public AjaxResult revoke(@RequestBody OmsFinanceCharge omsFinanceCharge)
|
||||||
|
{
|
||||||
|
return toAjax(omsFinanceChargeService.revoke(omsFinanceCharge));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -64,6 +64,7 @@ public class InventoryInfo extends BaseEntity
|
||||||
/** 出库价 */
|
/** 出库价 */
|
||||||
@Excel(name = "出库价")
|
@Excel(name = "出库价")
|
||||||
private BigDecimal outerPrice;
|
private BigDecimal outerPrice;
|
||||||
|
private String productType;
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
public enum InventoryStatusEnum {
|
public enum InventoryStatusEnum {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,125 @@
|
||||||
|
package com.ruoyi.sip.domain;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.Getter;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 财务计收对象 oms_finance_charge
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-12-30
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OmsFinanceCharge extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键ID */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 订单编号 */
|
||||||
|
@Excel(name = "订单编号")
|
||||||
|
private String orderCode;
|
||||||
|
|
||||||
|
/** 业务计收时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "业务计收时间", width = 15, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date bizChargeDate;
|
||||||
|
|
||||||
|
/** 财务计收时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "财务计收时间", width = 15, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date financeChargeDate;
|
||||||
|
|
||||||
|
/** 收入-含税总价 */
|
||||||
|
@Excel(name = "收入-含税总价")
|
||||||
|
private BigDecimal incomeWithTaxTotal;
|
||||||
|
|
||||||
|
/** 收入-未税总价 */
|
||||||
|
@Excel(name = "收入-未税总价")
|
||||||
|
private BigDecimal incomeWithoutTaxTotal;
|
||||||
|
|
||||||
|
/** 成本-软件未税总价 */
|
||||||
|
@Excel(name = "成本-软件未税总价")
|
||||||
|
private BigDecimal costSoftwareWithoutTax;
|
||||||
|
|
||||||
|
/** 成本-软件含税总价 */
|
||||||
|
@Excel(name = "成本-软件含税总价")
|
||||||
|
private BigDecimal costSoftwareWithTax;
|
||||||
|
|
||||||
|
/** 成本-硬件未税总价 */
|
||||||
|
@Excel(name = "成本-硬件未税总价")
|
||||||
|
private BigDecimal costHardwareWithoutTax;
|
||||||
|
|
||||||
|
/** 成本-硬件含税总价 */
|
||||||
|
@Excel(name = "成本-硬件含税总价")
|
||||||
|
private BigDecimal costHardwareWithTax;
|
||||||
|
|
||||||
|
/** 成本-软件维保未税总价 */
|
||||||
|
@Excel(name = "成本-软件维保未税总价")
|
||||||
|
private BigDecimal costSoftwareMaintWithoutTax;
|
||||||
|
|
||||||
|
/** 成本-软件维保含税总价 */
|
||||||
|
@Excel(name = "成本-软件维保含税总价")
|
||||||
|
private BigDecimal costSoftwareMaintWithTax;
|
||||||
|
|
||||||
|
/** 成本-硬件维保未税总价 */
|
||||||
|
@Excel(name = "成本-硬件维保未税总价")
|
||||||
|
private BigDecimal costHardwareMaintWithoutTax;
|
||||||
|
|
||||||
|
/** 成本-硬件维保含税总价 */
|
||||||
|
@Excel(name = "成本-硬件维保含税总价")
|
||||||
|
private BigDecimal costHardwareMaintWithTax;
|
||||||
|
|
||||||
|
/** 成本-省代服务含税总价 */
|
||||||
|
@Excel(name = "成本-省代服务含税总价")
|
||||||
|
private BigDecimal costProvinceServiceWithTax;
|
||||||
|
|
||||||
|
/** 成本-省代服务未税总价 */
|
||||||
|
@Excel(name = "成本-省代服务未税总价")
|
||||||
|
private BigDecimal costProvinceServiceWithoutTax;
|
||||||
|
|
||||||
|
/** 成本-其它含税总价 */
|
||||||
|
@Excel(name = "成本-其它含税总价")
|
||||||
|
private BigDecimal costOtherWithTax;
|
||||||
|
|
||||||
|
/** 成本-其它未税总价 */
|
||||||
|
@Excel(name = "成本-其它未税总价")
|
||||||
|
private BigDecimal costOtherWithoutTax;
|
||||||
|
|
||||||
|
/** 备注 */
|
||||||
|
@Excel(name = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/** 计收状态 0:等待收款完成 1:可申请计收 2:已申请计收 3:已完成计收 */
|
||||||
|
@Excel(name = "计收状态", readConverterExp = "0=等待收款完成,1=可申请计收,2=已申请计收,3=已完成计收")
|
||||||
|
private String chargeStatus;
|
||||||
|
@Getter
|
||||||
|
public enum ChargeStatusEnum {
|
||||||
|
|
||||||
|
/** 付款单 */
|
||||||
|
WAIT_RECEIPT("0", "等待收款"),
|
||||||
|
WAIT_APPLY_CHARGE("1", "可申请计收"),
|
||||||
|
APPLY_CHARGE("2", "已申请计收"),
|
||||||
|
COMPLETE_CHARGE("3", "已完成计收"),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
;
|
||||||
|
private final String code;
|
||||||
|
private final String desc;
|
||||||
|
ChargeStatusEnum(String code, String desc) {
|
||||||
|
this.code = code;
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -91,6 +91,7 @@ public class ProductInfo extends BaseEntity
|
||||||
* 硬件维保
|
* 硬件维保
|
||||||
*/
|
*/
|
||||||
HARDWARE_MAINTENANCE("22","硬件维保"),
|
HARDWARE_MAINTENANCE("22","硬件维保"),
|
||||||
|
PROVINCE_SERVICE("70", "省代服务"),
|
||||||
/**
|
/**
|
||||||
* 其它
|
* 其它
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -167,6 +167,10 @@ public class ProjectOrderInfo extends BaseEntity {
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
@Excel(name = "执行单有效截止时间", width = 30, dateFormat = "yyyy-MM-dd")
|
@Excel(name = "执行单有效截止时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
private Date orderEndTime;
|
private Date orderEndTime;
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
private Date bizChargeDate;
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||||
|
private Date financeChargeDate;
|
||||||
private Date orderEndTimeStart;
|
private Date orderEndTimeStart;
|
||||||
private Date orderEndTimeEnd;
|
private Date orderEndTimeEnd;
|
||||||
private Date updateTimeStart;
|
private Date updateTimeStart;
|
||||||
|
|
@ -253,6 +257,8 @@ public class ProjectOrderInfo extends BaseEntity {
|
||||||
private String approve;
|
private String approve;
|
||||||
private String approveLog;
|
private String approveLog;
|
||||||
private String approveNode;
|
private String approveNode;
|
||||||
|
//计收状态
|
||||||
|
private String chargeStatus;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 付款方式
|
* 付款方式
|
||||||
|
|
|
||||||
|
|
@ -77,4 +77,6 @@ public interface InventoryInfoMapper
|
||||||
List<InventoryInfo> listByProductSnList(List<String> productSnList);
|
List<InventoryInfo> listByProductSnList(List<String> productSnList);
|
||||||
|
|
||||||
List<InventoryInfo> listByDeliveryId(Long id);
|
List<InventoryInfo> listByDeliveryId(Long id);
|
||||||
|
|
||||||
|
List<InventoryInfo> selectInventoryInfoByOrderCode(List<String> strings);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,68 @@
|
||||||
|
package com.ruoyi.sip.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.sip.domain.OmsFinanceCharge;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 财务计收Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-12-30
|
||||||
|
*/
|
||||||
|
public interface OmsFinanceChargeMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询财务计收
|
||||||
|
*
|
||||||
|
* @param id 财务计收主键
|
||||||
|
* @return 财务计收
|
||||||
|
*/
|
||||||
|
public OmsFinanceCharge selectOmsFinanceChargeById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询财务计收列表
|
||||||
|
*
|
||||||
|
* @param omsFinanceCharge 财务计收
|
||||||
|
* @return 财务计收集合
|
||||||
|
*/
|
||||||
|
public List<OmsFinanceCharge> selectOmsFinanceChargeList(OmsFinanceCharge omsFinanceCharge);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增财务计收
|
||||||
|
*
|
||||||
|
* @param omsFinanceCharge 财务计收
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertOmsFinanceCharge(OmsFinanceCharge omsFinanceCharge);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改财务计收
|
||||||
|
*
|
||||||
|
* @param omsFinanceCharge 财务计收
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateOmsFinanceCharge(OmsFinanceCharge omsFinanceCharge);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除财务计收
|
||||||
|
*
|
||||||
|
* @param id 财务计收主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteOmsFinanceChargeById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除财务计收
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteOmsFinanceChargeByIds(Long[] ids);
|
||||||
|
|
||||||
|
int updateOmsFinanceChargeByOrderCode(OmsFinanceCharge omsFinanceCharge);
|
||||||
|
|
||||||
|
int returnApplyBiz(OmsFinanceCharge omsFinanceCharge);
|
||||||
|
|
||||||
|
int revoke(OmsFinanceCharge omsFinanceCharge);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -70,4 +70,9 @@ public interface OmsPayableBillMapper
|
||||||
Integer selectMaxCodeByPrefix(String codePrefix);
|
Integer selectMaxCodeByPrefix(String codePrefix);
|
||||||
|
|
||||||
int updateBatchPayableBillTicketInfo(List<OmsPayableBill> omsPayableBills);
|
int updateBatchPayableBillTicketInfo(List<OmsPayableBill> omsPayableBills);
|
||||||
|
|
||||||
|
List<String> checkDelete(List<String> inventoryCodeList);
|
||||||
|
|
||||||
|
void deleteByInventoryCode(List<String> inventoryCodeList);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -87,4 +87,6 @@ public interface IInventoryInfoService
|
||||||
void recallByOrderCode(List<String> orderCode);
|
void recallByOrderCode(List<String> orderCode);
|
||||||
|
|
||||||
List<InventoryInfo> listByDeliveryId(Long id);
|
List<InventoryInfo> listByDeliveryId(Long id);
|
||||||
|
|
||||||
|
List<InventoryInfo> selectInventoryInfoByOrderCode(List<String> strings);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,69 @@
|
||||||
|
package com.ruoyi.sip.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.sip.domain.OmsFinanceCharge;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 财务计收Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-12-30
|
||||||
|
*/
|
||||||
|
public interface IOmsFinanceChargeService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询财务计收
|
||||||
|
*
|
||||||
|
* @param id 财务计收主键
|
||||||
|
* @return 财务计收
|
||||||
|
*/
|
||||||
|
public OmsFinanceCharge selectOmsFinanceChargeById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询财务计收列表
|
||||||
|
*
|
||||||
|
* @param omsFinanceCharge 财务计收
|
||||||
|
* @return 财务计收集合
|
||||||
|
*/
|
||||||
|
public List<OmsFinanceCharge> selectOmsFinanceChargeList(OmsFinanceCharge omsFinanceCharge);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增财务计收
|
||||||
|
*
|
||||||
|
* @param omsFinanceCharge 财务计收
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertOmsFinanceCharge(OmsFinanceCharge omsFinanceCharge);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改财务计收
|
||||||
|
*
|
||||||
|
* @param omsFinanceCharge 财务计收
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateOmsFinanceCharge(OmsFinanceCharge omsFinanceCharge);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除财务计收
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的财务计收主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteOmsFinanceChargeByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除财务计收信息
|
||||||
|
*
|
||||||
|
* @param id 财务计收主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteOmsFinanceChargeById(Long id);
|
||||||
|
|
||||||
|
int updateOmsFinanceChargeByOrderCode(OmsFinanceCharge omsFinanceCharge);
|
||||||
|
|
||||||
|
int completedCharge(OmsFinanceCharge omsFinanceCharge);
|
||||||
|
|
||||||
|
int returnApplyBiz(OmsFinanceCharge omsFinanceCharge);
|
||||||
|
|
||||||
|
int revoke(OmsFinanceCharge omsFinanceCharge);
|
||||||
|
}
|
||||||
|
|
@ -82,4 +82,9 @@ public interface IOmsPayableBillService
|
||||||
public int updateTicketAmount(List<Long> idList);
|
public int updateTicketAmount(List<Long> idList);
|
||||||
|
|
||||||
OmsPayableBill query(Long id);
|
OmsPayableBill query(Long id);
|
||||||
|
|
||||||
|
List<String> checkDelete(List<String> collect);
|
||||||
|
|
||||||
|
void deleteByInventoryCode(List<String> collect);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,8 @@ public class InventoryDeliveryServiceImpl implements IInventoryDeliveryService {
|
||||||
@Autowired
|
@Autowired
|
||||||
@Lazy
|
@Lazy
|
||||||
private IVendorInfoService vendorInfoService;
|
private IVendorInfoService vendorInfoService;
|
||||||
|
@Autowired
|
||||||
|
private IOmsFinanceChargeService omsFinanceChargeService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IOmsInventoryDeliveryDetailService deliveryDetailService;
|
private IOmsInventoryDeliveryDetailService deliveryDetailService;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|
@ -229,6 +230,15 @@ public class InventoryDeliveryServiceImpl implements IInventoryDeliveryService {
|
||||||
updateOrder.setUpdateBy(ShiroUtils.getUserId().toString());
|
updateOrder.setUpdateBy(ShiroUtils.getUserId().toString());
|
||||||
updateOrder.setDeliveryStatus(sum == allSum ? ProjectOrderInfo.DeliveryStatusEnum.ALL_DELIVERY.getCode() : ProjectOrderInfo.DeliveryStatusEnum.PART_DELIVERY.getCode());
|
updateOrder.setDeliveryStatus(sum == allSum ? ProjectOrderInfo.DeliveryStatusEnum.ALL_DELIVERY.getCode() : ProjectOrderInfo.DeliveryStatusEnum.PART_DELIVERY.getCode());
|
||||||
projectOrderInfoService.updateProjectOrderInfoByCode(updateOrder);
|
projectOrderInfoService.updateProjectOrderInfoByCode(updateOrder);
|
||||||
|
//新增计收数据
|
||||||
|
if (sum==allSum){
|
||||||
|
//新增计收数据
|
||||||
|
OmsFinanceCharge omsFinanceCharge = new OmsFinanceCharge();
|
||||||
|
omsFinanceCharge.setOrderCode(inventoryDelivery.getOrderCode());
|
||||||
|
omsFinanceCharge.setChargeStatus(OmsFinanceCharge.ChargeStatusEnum.WAIT_RECEIPT.getCode());
|
||||||
|
omsFinanceCharge.setCreateBy(ShiroUtils.getUserId().toString());
|
||||||
|
omsFinanceChargeService.insertOmsFinanceCharge(omsFinanceCharge);
|
||||||
|
}
|
||||||
//修改累计发货数量
|
//修改累计发货数量
|
||||||
productInfoService.updateCumulativeCount(outerSum, inventoryDelivery.getProductCode());
|
productInfoService.updateCumulativeCount(outerSum, inventoryDelivery.getProductCode());
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -212,5 +212,10 @@ public class InventoryInfoServiceImpl implements IInventoryInfoService {
|
||||||
return inventoryInfoMapper.listByDeliveryId(id);
|
return inventoryInfoMapper.listByDeliveryId(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<InventoryInfo> selectInventoryInfoByOrderCode(List<String> strings) {
|
||||||
|
return inventoryInfoMapper.selectInventoryInfoByOrderCode(strings);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,253 @@
|
||||||
|
package com.ruoyi.sip.service.impl;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.math.RoundingMode;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.function.Function;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import com.ruoyi.common.exception.ServiceException;
|
||||||
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import com.ruoyi.common.utils.ShiroUtils;
|
||||||
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import com.ruoyi.sip.domain.*;
|
||||||
|
import com.ruoyi.sip.mapper.OmsInventoryInnerMapper;
|
||||||
|
import com.ruoyi.sip.service.*;
|
||||||
|
import org.apache.shiro.SecurityUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.context.annotation.Lazy;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ruoyi.sip.mapper.OmsFinanceChargeMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 财务计收Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-12-30
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class OmsFinanceChargeServiceImpl implements IOmsFinanceChargeService {
|
||||||
|
@Autowired
|
||||||
|
private OmsFinanceChargeMapper omsFinanceChargeMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IProjectProductInfoService projectProductInfoService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IOmsPayableBillService payableBillService;
|
||||||
|
@Autowired
|
||||||
|
private OmsInventoryInnerMapper innerMapper;
|
||||||
|
@Autowired
|
||||||
|
private IInventoryInfoService inventoryInfoService;
|
||||||
|
@Value("${oms.inventory.innerTax:0.13}")
|
||||||
|
private String defaultTax;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询财务计收
|
||||||
|
*
|
||||||
|
* @param id 财务计收主键
|
||||||
|
* @return 财务计收
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public OmsFinanceCharge selectOmsFinanceChargeById(Long id) {
|
||||||
|
return omsFinanceChargeMapper.selectOmsFinanceChargeById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询财务计收列表
|
||||||
|
*
|
||||||
|
* @param omsFinanceCharge 财务计收
|
||||||
|
* @return 财务计收
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<OmsFinanceCharge> selectOmsFinanceChargeList(OmsFinanceCharge omsFinanceCharge) {
|
||||||
|
omsFinanceCharge.setChargeStatus(OmsFinanceCharge.ChargeStatusEnum.COMPLETE_CHARGE.getCode());
|
||||||
|
return omsFinanceChargeMapper.selectOmsFinanceChargeList(omsFinanceCharge);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增财务计收
|
||||||
|
*
|
||||||
|
* @param omsFinanceCharge 财务计收
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertOmsFinanceCharge(OmsFinanceCharge omsFinanceCharge) {
|
||||||
|
return omsFinanceChargeMapper.insertOmsFinanceCharge(omsFinanceCharge);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改财务计收
|
||||||
|
*
|
||||||
|
* @param omsFinanceCharge 财务计收
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateOmsFinanceCharge(OmsFinanceCharge omsFinanceCharge) {
|
||||||
|
return omsFinanceChargeMapper.updateOmsFinanceCharge(omsFinanceCharge);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除财务计收
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的财务计收主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteOmsFinanceChargeByIds(Long[] ids) {
|
||||||
|
return omsFinanceChargeMapper.deleteOmsFinanceChargeByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除财务计收信息
|
||||||
|
*
|
||||||
|
* @param id 财务计收主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteOmsFinanceChargeById(Long id) {
|
||||||
|
return omsFinanceChargeMapper.deleteOmsFinanceChargeById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int updateOmsFinanceChargeByOrderCode(OmsFinanceCharge omsFinanceCharge) {
|
||||||
|
if (StringUtils.isEmpty(omsFinanceCharge.getOrderCode())) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return omsFinanceChargeMapper.updateOmsFinanceChargeByOrderCode(omsFinanceCharge);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int completedCharge(OmsFinanceCharge omsFinanceCharge) {
|
||||||
|
if (StringUtils.isEmpty(omsFinanceCharge.getOrderCode())) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
omsFinanceCharge.setChargeStatus(OmsFinanceCharge.ChargeStatusEnum.COMPLETE_CHARGE.getCode());
|
||||||
|
omsFinanceCharge.setFinanceChargeDate(DateUtils.getNowDate());
|
||||||
|
//计算对应数据
|
||||||
|
List<ProjectProductInfo> projectProductInfos = projectProductInfoService.selectProjectProductInfoListByOrderCode(Collections.singletonList(omsFinanceCharge.getOrderCode()));
|
||||||
|
//
|
||||||
|
|
||||||
|
OmsInventoryInner omsInventoryInner = new OmsInventoryInner();
|
||||||
|
omsInventoryInner.setOrderCode(omsFinanceCharge.getOrderCode());
|
||||||
|
List<OmsInventoryInner> omsInventoryInners = innerMapper.selectOmsInventoryInnerList(omsInventoryInner);
|
||||||
|
Map<String, OmsInventoryInner> innerMap = omsInventoryInners.stream().collect(Collectors.toMap(OmsInventoryInner::getProductCode, Function.identity()));
|
||||||
|
boolean allMatch = projectProductInfos.stream().filter(item -> !item.getType().equals(ProductInfo.ProductTypeEnum.HARDWARE.getType()) && !item.getType().equals(ProductInfo.ProductTypeEnum.SOFTWARE.getType()))
|
||||||
|
.allMatch(item -> innerMap.containsKey(item.getProductCode()));
|
||||||
|
if (!allMatch) {
|
||||||
|
throw new ServiceException("服务未进行入库绑定,无法计算成本,计收失败");
|
||||||
|
}
|
||||||
|
//计算收入
|
||||||
|
BigDecimal incomeWithoutTaxTotal = BigDecimal.ZERO;
|
||||||
|
BigDecimal incomeWithTaxTotal = BigDecimal.ZERO;
|
||||||
|
|
||||||
|
|
||||||
|
//特殊处理 projectProductInfo 税率为 百分比
|
||||||
|
BigDecimal defaultTaxRate = new BigDecimal(defaultTax);
|
||||||
|
for (ProjectProductInfo projectProductInfo : projectProductInfos) {
|
||||||
|
BigDecimal taxRate = projectProductInfo.getTaxRate()==null?defaultTaxRate:projectProductInfo.getTaxRate().divide(new BigDecimal("100"),4, RoundingMode.HALF_UP);
|
||||||
|
BigDecimal allPrice = projectProductInfo.getAllPrice();
|
||||||
|
incomeWithTaxTotal = incomeWithTaxTotal.add(allPrice);
|
||||||
|
BigDecimal withOutTax = allPrice.divide(BigDecimal.ONE.add(taxRate), 2, RoundingMode.HALF_UP);
|
||||||
|
incomeWithoutTaxTotal = incomeWithoutTaxTotal.add(withOutTax);
|
||||||
|
|
||||||
|
}
|
||||||
|
omsFinanceCharge.setIncomeWithoutTaxTotal(incomeWithoutTaxTotal);
|
||||||
|
omsFinanceCharge.setIncomeWithTaxTotal(incomeWithTaxTotal);
|
||||||
|
|
||||||
|
//计算成本 软硬件从库存中取 不从应付单取的原因如下 1: 应付单有可能是入库单生成 然后入库生成时可能是全部数据 但发到某个项目只有一部分 所以无法从应付单取数
|
||||||
|
BigDecimal costSoftwareWithoutTax = BigDecimal.ZERO;
|
||||||
|
BigDecimal costSoftwareWithTax = BigDecimal.ZERO;
|
||||||
|
BigDecimal costHardwareWithoutTax = BigDecimal.ZERO;
|
||||||
|
BigDecimal costHardwareWithTax = BigDecimal.ZERO;
|
||||||
|
List<InventoryInfo> inventoryInfos = inventoryInfoService.selectInventoryInfoByOrderCode(Collections.singletonList(omsFinanceCharge.getOrderCode()));
|
||||||
|
|
||||||
|
for (InventoryInfo inventoryInfo : inventoryInfos) {
|
||||||
|
BigDecimal taxRate = inventoryInfo.getTaxRate() == null ? defaultTaxRate : inventoryInfo.getTaxRate();
|
||||||
|
if (inventoryInfo.getProductType().equals(ProductInfo.ProductTypeEnum.SOFTWARE.getType())) {
|
||||||
|
costSoftwareWithTax = costSoftwareWithTax.add(inventoryInfo.getInnerPrice());
|
||||||
|
costSoftwareWithoutTax = costSoftwareWithoutTax.add(inventoryInfo.getInnerPrice().divide(BigDecimal.ONE.add(taxRate), 2, RoundingMode.HALF_UP));
|
||||||
|
} else if (inventoryInfo.getProductType().equals(ProductInfo.ProductTypeEnum.HARDWARE.getType())) {
|
||||||
|
costHardwareWithTax = costHardwareWithTax.add(inventoryInfo.getInnerPrice());
|
||||||
|
costHardwareWithoutTax = costHardwareWithoutTax.add(inventoryInfo.getInnerPrice().divide(BigDecimal.ONE.add(taxRate), 2, RoundingMode.HALF_UP));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
omsFinanceCharge.setCostSoftwareWithoutTax(costSoftwareWithoutTax);
|
||||||
|
omsFinanceCharge.setCostSoftwareWithTax(costSoftwareWithTax);
|
||||||
|
omsFinanceCharge.setCostHardwareWithoutTax(costHardwareWithoutTax);
|
||||||
|
omsFinanceCharge.setCostHardwareWithTax(costHardwareWithTax);
|
||||||
|
|
||||||
|
|
||||||
|
//服务从入库单取应付单的数据 因为服务是出入库一起 必须要绑定项目
|
||||||
|
BigDecimal costSoftwareMaintWithoutTax = BigDecimal.ZERO;
|
||||||
|
BigDecimal costSoftwareMaintWithTax = BigDecimal.ZERO;
|
||||||
|
BigDecimal costHardwareMaintWithoutTax = BigDecimal.ZERO;
|
||||||
|
BigDecimal costHardwareMaintWithTax = BigDecimal.ZERO;
|
||||||
|
BigDecimal costProvinceServiceWithoutTax = BigDecimal.ZERO;
|
||||||
|
BigDecimal costProvinceServiceWithTax = BigDecimal.ZERO;
|
||||||
|
BigDecimal costOtherWithoutTax = BigDecimal.ZERO;
|
||||||
|
BigDecimal costOtherWithTax = BigDecimal.ZERO;
|
||||||
|
OmsPayableBill queryBill = new OmsPayableBill();
|
||||||
|
queryBill.setOrderCode(omsFinanceCharge.getOrderCode());
|
||||||
|
List<OmsPayableBill> omsPayableBills = payableBillService.selectOmsPayableBillList(queryBill);
|
||||||
|
for (OmsPayableBill omsPayableBill : omsPayableBills) {
|
||||||
|
if (omsPayableBill.getProductType().equals(ProductInfo.ProductTypeEnum.SOFTWARE_MAINTENANCE.getType())){
|
||||||
|
costSoftwareMaintWithTax = costSoftwareMaintWithTax.add(omsPayableBill.getTotalPriceWithTax());
|
||||||
|
costSoftwareMaintWithoutTax = costSoftwareMaintWithoutTax.add(omsPayableBill.getTotalPriceWithoutTax());
|
||||||
|
}else if (omsPayableBill.getProductType().equals(ProductInfo.ProductTypeEnum.HARDWARE_MAINTENANCE.getType())){
|
||||||
|
costHardwareMaintWithTax = costHardwareMaintWithTax.add(omsPayableBill.getTotalPriceWithTax());
|
||||||
|
costHardwareMaintWithoutTax = costHardwareMaintWithoutTax.add(omsPayableBill.getTotalPriceWithoutTax());
|
||||||
|
}else if (omsPayableBill.getProductType().equals(ProductInfo.ProductTypeEnum.PROVINCE_SERVICE.getType())){
|
||||||
|
costProvinceServiceWithTax = costProvinceServiceWithTax.add(omsPayableBill.getTotalPriceWithTax());
|
||||||
|
costProvinceServiceWithoutTax = costProvinceServiceWithoutTax.add(omsPayableBill.getTotalPriceWithoutTax());
|
||||||
|
}else if (omsPayableBill.getProductType().equals(ProductInfo.ProductTypeEnum.OTHER.getType())){
|
||||||
|
costOtherWithTax = costOtherWithTax.add(omsPayableBill.getTotalPriceWithTax());
|
||||||
|
costOtherWithoutTax = costOtherWithoutTax.add(omsPayableBill.getTotalPriceWithoutTax());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
omsFinanceCharge.setCostSoftwareMaintWithoutTax(costSoftwareMaintWithoutTax);
|
||||||
|
omsFinanceCharge.setCostSoftwareMaintWithTax(costSoftwareMaintWithTax);
|
||||||
|
omsFinanceCharge.setCostHardwareMaintWithoutTax(costHardwareMaintWithoutTax);
|
||||||
|
omsFinanceCharge.setCostHardwareMaintWithTax(costHardwareMaintWithTax);
|
||||||
|
omsFinanceCharge.setCostProvinceServiceWithoutTax(costProvinceServiceWithoutTax);
|
||||||
|
omsFinanceCharge.setCostProvinceServiceWithTax(costProvinceServiceWithTax);
|
||||||
|
omsFinanceCharge.setCostOtherWithoutTax(costOtherWithoutTax);
|
||||||
|
omsFinanceCharge.setCostOtherWithTax(costOtherWithTax);
|
||||||
|
return omsFinanceChargeMapper.updateOmsFinanceChargeByOrderCode(omsFinanceCharge);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int returnApplyBiz(OmsFinanceCharge omsFinanceCharge) {
|
||||||
|
return omsFinanceChargeMapper.returnApplyBiz(omsFinanceCharge);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int revoke(OmsFinanceCharge omsFinanceCharge) {
|
||||||
|
omsFinanceCharge.setChargeStatus(OmsFinanceCharge.ChargeStatusEnum.APPLY_CHARGE.getCode());
|
||||||
|
omsFinanceCharge.setFinanceChargeDate(null);
|
||||||
|
omsFinanceCharge.setIncomeWithTaxTotal(BigDecimal.ZERO);
|
||||||
|
omsFinanceCharge.setIncomeWithoutTaxTotal(BigDecimal.ZERO);
|
||||||
|
omsFinanceCharge.setCostSoftwareWithoutTax(BigDecimal.ZERO);
|
||||||
|
omsFinanceCharge.setCostSoftwareWithTax(BigDecimal.ZERO);
|
||||||
|
omsFinanceCharge.setCostHardwareWithoutTax(BigDecimal.ZERO);
|
||||||
|
omsFinanceCharge.setCostHardwareWithTax(BigDecimal.ZERO);
|
||||||
|
omsFinanceCharge.setCostSoftwareMaintWithoutTax(BigDecimal.ZERO);
|
||||||
|
omsFinanceCharge.setCostSoftwareMaintWithTax(BigDecimal.ZERO);
|
||||||
|
omsFinanceCharge.setCostHardwareMaintWithoutTax(BigDecimal.ZERO);
|
||||||
|
omsFinanceCharge.setCostHardwareMaintWithTax(BigDecimal.ZERO);
|
||||||
|
omsFinanceCharge.setCostProvinceServiceWithoutTax(BigDecimal.ZERO);
|
||||||
|
omsFinanceCharge.setCostProvinceServiceWithTax(BigDecimal.ZERO);
|
||||||
|
omsFinanceCharge.setCostOtherWithoutTax(BigDecimal.ZERO);
|
||||||
|
omsFinanceCharge.setCostOtherWithTax(BigDecimal.ZERO);
|
||||||
|
omsFinanceCharge.setCostOtherWithoutTax(BigDecimal.ZERO);
|
||||||
|
omsFinanceCharge.setCostOtherWithTax(BigDecimal.ZERO);
|
||||||
|
omsFinanceCharge.setRemark("");
|
||||||
|
omsFinanceCharge.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
omsFinanceCharge.setUpdateBy(ShiroUtils.getUserId().toString());
|
||||||
|
return omsFinanceChargeMapper.revoke(omsFinanceCharge);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -146,7 +146,7 @@ public class OmsInventoryInnerServiceImpl implements IOmsInventoryInnerService {
|
||||||
|
|
||||||
OmsPayableBill payableBill = new OmsPayableBill();
|
OmsPayableBill payableBill = new OmsPayableBill();
|
||||||
VendorInfo vendorInfo = vendorInfoService.selectVendorInfoByVendorCode(vendorCode);
|
VendorInfo vendorInfo = vendorInfoService.selectVendorInfoByVendorCode(vendorCode);
|
||||||
if (vendorInfo != null && VendorInfo.PayTypeEnum.INNER_PAY.getCode().equals(vendorInfo.getPayType())) {
|
if ((vendorInfo != null && VendorInfo.PayTypeEnum.INNER_PAY.getCode().equals(vendorInfo.getPayType())) || !Arrays.asList("1", "2").contains(omsInventoryInner.getProductType())) {
|
||||||
BigDecimal reduce = inventoryInfoList.stream().map(InventoryInfo::getInnerPrice).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
BigDecimal reduce = inventoryInfoList.stream().map(InventoryInfo::getInnerPrice).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||||
//服务金额为单价* 数量 没有具体的详情
|
//服务金额为单价* 数量 没有具体的详情
|
||||||
BigDecimal totalPriceWithTax = Arrays.asList("11", "22").contains(omsInventoryInner.getProductType()) ?
|
BigDecimal totalPriceWithTax = Arrays.asList("11", "22").contains(omsInventoryInner.getProductType()) ?
|
||||||
|
|
@ -158,6 +158,9 @@ public class OmsInventoryInnerServiceImpl implements IOmsInventoryInnerService {
|
||||||
payableBill.setProductType(productInfos.get(0).getType());
|
payableBill.setProductType(productInfos.get(0).getType());
|
||||||
payableBill.setProductCode(omsInventoryInner.getProductCode());
|
payableBill.setProductCode(omsInventoryInner.getProductCode());
|
||||||
payableBill.setTotalPriceWithTax(totalPriceWithTax);
|
payableBill.setTotalPriceWithTax(totalPriceWithTax);
|
||||||
|
payableBill.setOrderCode(omsInventoryInner.getOrderCode());
|
||||||
|
payableBill.setProjectCode(omsInventoryInner.getProductCode());
|
||||||
|
payableBill.setProjectName(omsInventoryInner.getProjectName());
|
||||||
String purchaseNo = omsInventoryInner.getPurchaseNo();
|
String purchaseNo = omsInventoryInner.getPurchaseNo();
|
||||||
BigDecimal taxRate = null;
|
BigDecimal taxRate = null;
|
||||||
if (StringUtils.isNotEmpty(purchaseNo)) {
|
if (StringUtils.isNotEmpty(purchaseNo)) {
|
||||||
|
|
@ -225,9 +228,12 @@ public class OmsInventoryInnerServiceImpl implements IOmsInventoryInnerService {
|
||||||
if (CollUtil.isNotEmpty(innerCodeList)){
|
if (CollUtil.isNotEmpty(innerCodeList)){
|
||||||
throw new ServiceException(StrUtil.format("已发货的入库单[{}]不能删除", String.join(",",innerCodeList)));
|
throw new ServiceException(StrUtil.format("已发货的入库单[{}]不能删除", String.join(",",innerCodeList)));
|
||||||
}
|
}
|
||||||
|
List<OmsInventoryInner> omsInventoryInners = omsInventoryInnerMapper.listById(idArray);
|
||||||
|
//删除对应的应付单
|
||||||
|
payableBillService.deleteByInventoryCode(omsInventoryInners.stream().map(OmsInventoryInner::getInnerCode).collect(Collectors.toList()));
|
||||||
inventoryInfoService.deleteInventoryInfoByInnerIds(idArray);
|
inventoryInfoService.deleteInventoryInfoByInnerIds(idArray);
|
||||||
//还原入库数量
|
//还原入库数量
|
||||||
List<OmsInventoryInner> omsInventoryInners = omsInventoryInnerMapper.listById(idArray);
|
|
||||||
List<OmsPurchaseOrderItem> omsPurchaseOrderItems = omsInventoryInners.stream().map(item -> {
|
List<OmsPurchaseOrderItem> omsPurchaseOrderItems = omsInventoryInners.stream().map(item -> {
|
||||||
OmsPurchaseOrderItem omsPurchaseOrderItem = new OmsPurchaseOrderItem();
|
OmsPurchaseOrderItem omsPurchaseOrderItem = new OmsPurchaseOrderItem();
|
||||||
omsPurchaseOrderItem.setInnerQuantity(BigDecimal.valueOf(item.getQuantity()));
|
omsPurchaseOrderItem.setInnerQuantity(BigDecimal.valueOf(item.getQuantity()));
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package com.ruoyi.sip.service.impl;
|
||||||
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 cn.hutool.core.util.StrUtil;
|
||||||
import com.ruoyi.common.core.text.Convert;
|
import com.ruoyi.common.core.text.Convert;
|
||||||
import com.ruoyi.common.exception.ServiceException;
|
import com.ruoyi.common.exception.ServiceException;
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
|
@ -554,5 +555,21 @@ public class OmsPayableBillServiceImpl implements IOmsPayableBillService {
|
||||||
|
|
||||||
return omsPayableBill;
|
return omsPayableBill;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<String> checkDelete(List<String> inventoryCodeList) {
|
||||||
|
return omsPayableBillMapper.checkDelete(inventoryCodeList);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteByInventoryCode(List<String> inventoryCodeList) {
|
||||||
|
List<String> payableInnerCodeList = omsPayableBillMapper.checkDelete(inventoryCodeList);
|
||||||
|
if (CollUtil.isNotEmpty(payableInnerCodeList)){
|
||||||
|
throw new ServiceException(StrUtil.format("入库单[{}]关联的应付单已执行付款或收票操作不能删除",
|
||||||
|
String.join(",",payableInnerCodeList)));
|
||||||
|
}
|
||||||
|
omsPayableBillMapper.deleteByInventoryCode(inventoryCodeList);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,413 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ruoyi.sip.mapper.OmsFinanceChargeMapper">
|
||||||
|
|
||||||
|
<resultMap type="OmsFinanceCharge" id="OmsFinanceChargeResult">
|
||||||
|
<id property="id" column="id" />
|
||||||
|
<result property="orderCode" column="order_code" />
|
||||||
|
<result property="bizChargeDate" column="biz_charge_date" />
|
||||||
|
<result property="financeChargeDate" column="finance_charge_date" />
|
||||||
|
<result property="incomeWithTaxTotal" column="income_with_tax_total" />
|
||||||
|
<result property="incomeWithoutTaxTotal" column="income_without_tax_total" />
|
||||||
|
<result property="costSoftwareWithoutTax" column="cost_software_without_tax" />
|
||||||
|
<result property="costSoftwareWithTax" column="cost_software_with_tax" />
|
||||||
|
<result property="costHardwareWithoutTax" column="cost_hardware_without_tax" />
|
||||||
|
<result property="costHardwareWithTax" column="cost_hardware_with_tax" />
|
||||||
|
<result property="costSoftwareMaintWithoutTax" column="cost_software_maint_without_tax" />
|
||||||
|
<result property="costSoftwareMaintWithTax" column="cost_software_maint_with_tax" />
|
||||||
|
<result property="costHardwareMaintWithoutTax" column="cost_hardware_maint_without_tax" />
|
||||||
|
<result property="costHardwareMaintWithTax" column="cost_hardware_maint_with_tax" />
|
||||||
|
<result property="costProvinceServiceWithTax" column="cost_province_service_with_tax" />
|
||||||
|
<result property="costProvinceServiceWithoutTax" column="cost_province_service_without_tax" />
|
||||||
|
<result property="costOtherWithTax" column="cost_other_with_tax" />
|
||||||
|
<result property="costOtherWithoutTax" column="cost_other_without_tax" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="chargeStatus" column="charge_status" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectOmsFinanceChargeVo">
|
||||||
|
select id, order_code, biz_charge_date, finance_charge_date,
|
||||||
|
income_with_tax_total, income_without_tax_total,
|
||||||
|
cost_software_without_tax, cost_software_with_tax,
|
||||||
|
cost_hardware_without_tax, cost_hardware_with_tax,
|
||||||
|
cost_software_maint_without_tax, cost_software_maint_with_tax,
|
||||||
|
cost_hardware_maint_without_tax, cost_hardware_maint_with_tax,
|
||||||
|
cost_province_service_with_tax, cost_province_service_without_tax,
|
||||||
|
cost_other_with_tax, cost_other_without_tax,
|
||||||
|
remark, create_time, update_time,update_by, charge_status
|
||||||
|
from oms_finance_charge
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectOmsFinanceChargeById" parameterType="Long" resultMap="OmsFinanceChargeResult">
|
||||||
|
<include refid="selectOmsFinanceChargeVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectOmsFinanceChargeList" parameterType="OmsFinanceCharge" resultMap="OmsFinanceChargeResult">
|
||||||
|
<include refid="selectOmsFinanceChargeVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="orderCode != null and orderCode != ''">
|
||||||
|
and order_code = #{orderCode}
|
||||||
|
</if>
|
||||||
|
<if test="bizChargeDate != null">
|
||||||
|
and biz_charge_date = #{bizChargeDate}
|
||||||
|
</if>
|
||||||
|
<if test="financeChargeDate != null">
|
||||||
|
and finance_charge_date = #{financeChargeDate}
|
||||||
|
</if>
|
||||||
|
<if test="incomeWithTaxTotal != null">
|
||||||
|
and income_with_tax_total = #{incomeWithTaxTotal}
|
||||||
|
</if>
|
||||||
|
<if test="incomeWithoutTaxTotal != null">
|
||||||
|
and income_without_tax_total = #{incomeWithoutTaxTotal}
|
||||||
|
</if>
|
||||||
|
<if test="costSoftwareWithoutTax != null">
|
||||||
|
and cost_software_without_tax = #{costSoftwareWithoutTax}
|
||||||
|
</if>
|
||||||
|
<if test="costSoftwareWithTax != null">
|
||||||
|
and cost_software_with_tax = #{costSoftwareWithTax}
|
||||||
|
</if>
|
||||||
|
<if test="costHardwareWithoutTax != null">
|
||||||
|
and cost_hardware_without_tax = #{costHardwareWithoutTax}
|
||||||
|
</if>
|
||||||
|
<if test="costHardwareWithTax != null">
|
||||||
|
and cost_hardware_with_tax = #{costHardwareWithTax}
|
||||||
|
</if>
|
||||||
|
<if test="costSoftwareMaintWithoutTax != null">
|
||||||
|
and cost_software_maint_without_tax = #{costSoftwareMaintWithoutTax}
|
||||||
|
</if>
|
||||||
|
<if test="costSoftwareMaintWithTax != null">
|
||||||
|
and cost_software_maint_with_tax = #{costSoftwareMaintWithTax}
|
||||||
|
</if>
|
||||||
|
<if test="costHardwareMaintWithoutTax != null">
|
||||||
|
and cost_hardware_maint_without_tax = #{costHardwareMaintWithoutTax}
|
||||||
|
</if>
|
||||||
|
<if test="costHardwareMaintWithTax != null">
|
||||||
|
and cost_hardware_maint_with_tax = #{costHardwareMaintWithTax}
|
||||||
|
</if>
|
||||||
|
<if test="costProvinceServiceWithTax != null">
|
||||||
|
and cost_province_service_with_tax = #{costProvinceServiceWithTax}
|
||||||
|
</if>
|
||||||
|
<if test="costProvinceServiceWithoutTax != null">
|
||||||
|
and cost_province_service_without_tax = #{costProvinceServiceWithoutTax}
|
||||||
|
</if>
|
||||||
|
<if test="costOtherWithTax != null">
|
||||||
|
and cost_other_with_tax = #{costOtherWithTax}
|
||||||
|
</if>
|
||||||
|
<if test="costOtherWithoutTax != null">
|
||||||
|
and cost_other_without_tax = #{costOtherWithoutTax}
|
||||||
|
</if>
|
||||||
|
<if test="remark != null and remark != ''">
|
||||||
|
and remark like concat('%', #{remark}, '%')
|
||||||
|
</if>
|
||||||
|
<if test="chargeStatus != null and chargeStatus != ''">
|
||||||
|
and charge_status = #{chargeStatus}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertOmsFinanceCharge" parameterType="OmsFinanceCharge" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into oms_finance_charge
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="orderCode != null and orderCode != ''">
|
||||||
|
order_code,
|
||||||
|
</if>
|
||||||
|
<if test="bizChargeDate != null">
|
||||||
|
biz_charge_date,
|
||||||
|
</if>
|
||||||
|
<if test="financeChargeDate != null">
|
||||||
|
finance_charge_date,
|
||||||
|
</if>
|
||||||
|
<if test="incomeWithTaxTotal != null">
|
||||||
|
income_with_tax_total,
|
||||||
|
</if>
|
||||||
|
<if test="incomeWithoutTaxTotal != null">
|
||||||
|
income_without_tax_total,
|
||||||
|
</if>
|
||||||
|
<if test="costSoftwareWithoutTax != null">
|
||||||
|
cost_software_without_tax,
|
||||||
|
</if>
|
||||||
|
<if test="costSoftwareWithTax != null">
|
||||||
|
cost_software_with_tax,
|
||||||
|
</if>
|
||||||
|
<if test="costHardwareWithoutTax != null">
|
||||||
|
cost_hardware_without_tax,
|
||||||
|
</if>
|
||||||
|
<if test="costHardwareWithTax != null">
|
||||||
|
cost_hardware_with_tax,
|
||||||
|
</if>
|
||||||
|
<if test="costSoftwareMaintWithoutTax != null">
|
||||||
|
cost_software_maint_without_tax,
|
||||||
|
</if>
|
||||||
|
<if test="costSoftwareMaintWithTax != null">
|
||||||
|
cost_software_maint_with_tax,
|
||||||
|
</if>
|
||||||
|
<if test="costHardwareMaintWithoutTax != null">
|
||||||
|
cost_hardware_maint_without_tax,
|
||||||
|
</if>
|
||||||
|
<if test="costHardwareMaintWithTax != null">
|
||||||
|
cost_hardware_maint_with_tax,
|
||||||
|
</if>
|
||||||
|
<if test="costProvinceServiceWithTax != null">
|
||||||
|
cost_province_service_with_tax,
|
||||||
|
</if>
|
||||||
|
<if test="costProvinceServiceWithoutTax != null">
|
||||||
|
cost_province_service_without_tax,
|
||||||
|
</if>
|
||||||
|
<if test="costOtherWithTax != null">
|
||||||
|
cost_other_with_tax,
|
||||||
|
</if>
|
||||||
|
<if test="costOtherWithoutTax != null">
|
||||||
|
cost_other_without_tax,
|
||||||
|
</if>
|
||||||
|
<if test="remark != null and remark != ''">
|
||||||
|
remark,
|
||||||
|
</if>
|
||||||
|
<if test="chargeStatus != null and chargeStatus != ''">
|
||||||
|
charge_status,
|
||||||
|
</if>
|
||||||
|
create_time,
|
||||||
|
update_time
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="orderCode != null and orderCode != ''">
|
||||||
|
#{orderCode},
|
||||||
|
</if>
|
||||||
|
<if test="bizChargeDate != null">
|
||||||
|
#{bizChargeDate},
|
||||||
|
</if>
|
||||||
|
<if test="financeChargeDate != null">
|
||||||
|
#{financeChargeDate},
|
||||||
|
</if>
|
||||||
|
<if test="incomeWithTaxTotal != null">
|
||||||
|
#{incomeWithTaxTotal},
|
||||||
|
</if>
|
||||||
|
<if test="incomeWithoutTaxTotal != null">
|
||||||
|
#{incomeWithoutTaxTotal},
|
||||||
|
</if>
|
||||||
|
<if test="costSoftwareWithoutTax != null">
|
||||||
|
#{costSoftwareWithoutTax},
|
||||||
|
</if>
|
||||||
|
<if test="costSoftwareWithTax != null">
|
||||||
|
#{costSoftwareWithTax},
|
||||||
|
</if>
|
||||||
|
<if test="costHardwareWithoutTax != null">
|
||||||
|
#{costHardwareWithoutTax},
|
||||||
|
</if>
|
||||||
|
<if test="costHardwareWithTax != null">
|
||||||
|
#{costHardwareWithTax},
|
||||||
|
</if>
|
||||||
|
<if test="costSoftwareMaintWithoutTax != null">
|
||||||
|
#{costSoftwareMaintWithoutTax},
|
||||||
|
</if>
|
||||||
|
<if test="costSoftwareMaintWithTax != null">
|
||||||
|
#{costSoftwareMaintWithTax},
|
||||||
|
</if>
|
||||||
|
<if test="costHardwareMaintWithoutTax != null">
|
||||||
|
#{costHardwareMaintWithoutTax},
|
||||||
|
</if>
|
||||||
|
<if test="costHardwareMaintWithTax != null">
|
||||||
|
#{costHardwareMaintWithTax},
|
||||||
|
</if>
|
||||||
|
<if test="costProvinceServiceWithTax != null">
|
||||||
|
#{costProvinceServiceWithTax},
|
||||||
|
</if>
|
||||||
|
<if test="costProvinceServiceWithoutTax != null">
|
||||||
|
#{costProvinceServiceWithoutTax},
|
||||||
|
</if>
|
||||||
|
<if test="costOtherWithTax != null">
|
||||||
|
#{costOtherWithTax},
|
||||||
|
</if>
|
||||||
|
<if test="costOtherWithoutTax != null">
|
||||||
|
#{costOtherWithoutTax},
|
||||||
|
</if>
|
||||||
|
<if test="remark != null and remark != ''">
|
||||||
|
#{remark},
|
||||||
|
</if>
|
||||||
|
<if test="chargeStatus != null and chargeStatus != ''">
|
||||||
|
#{chargeStatus},
|
||||||
|
</if>
|
||||||
|
now(),
|
||||||
|
now()
|
||||||
|
</trim>
|
||||||
|
on duplicate key update charge_status=values(charge_status)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateOmsFinanceCharge" parameterType="OmsFinanceCharge">
|
||||||
|
update oms_finance_charge
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="orderCode != null and orderCode != ''">
|
||||||
|
order_code = #{orderCode},
|
||||||
|
</if>
|
||||||
|
<if test="bizChargeDate != null">
|
||||||
|
biz_charge_date = #{bizChargeDate},
|
||||||
|
</if>
|
||||||
|
<if test="financeChargeDate != null">
|
||||||
|
finance_charge_date = #{financeChargeDate},
|
||||||
|
</if>
|
||||||
|
<if test="incomeWithTaxTotal != null">
|
||||||
|
income_with_tax_total = #{incomeWithTaxTotal},
|
||||||
|
</if>
|
||||||
|
<if test="incomeWithoutTaxTotal != null">
|
||||||
|
income_without_tax_total = #{incomeWithoutTaxTotal},
|
||||||
|
</if>
|
||||||
|
<if test="costSoftwareWithoutTax != null">
|
||||||
|
cost_software_without_tax = #{costSoftwareWithoutTax},
|
||||||
|
</if>
|
||||||
|
<if test="costSoftwareWithTax != null">
|
||||||
|
cost_software_with_tax = #{costSoftwareWithTax},
|
||||||
|
</if>
|
||||||
|
<if test="costHardwareWithoutTax != null">
|
||||||
|
cost_hardware_without_tax = #{costHardwareWithoutTax},
|
||||||
|
</if>
|
||||||
|
<if test="costHardwareWithTax != null">
|
||||||
|
cost_hardware_with_tax = #{costHardwareWithTax},
|
||||||
|
</if>
|
||||||
|
<if test="costSoftwareMaintWithoutTax != null">
|
||||||
|
cost_software_maint_without_tax = #{costSoftwareMaintWithoutTax},
|
||||||
|
</if>
|
||||||
|
<if test="costSoftwareMaintWithTax != null">
|
||||||
|
cost_software_maint_with_tax = #{costSoftwareMaintWithTax},
|
||||||
|
</if>
|
||||||
|
<if test="costHardwareMaintWithoutTax != null">
|
||||||
|
cost_hardware_maint_without_tax = #{costHardwareMaintWithoutTax},
|
||||||
|
</if>
|
||||||
|
<if test="costHardwareMaintWithTax != null">
|
||||||
|
cost_hardware_maint_with_tax = #{costHardwareMaintWithTax},
|
||||||
|
</if>
|
||||||
|
<if test="costProvinceServiceWithTax != null">
|
||||||
|
cost_province_service_with_tax = #{costProvinceServiceWithTax},
|
||||||
|
</if>
|
||||||
|
<if test="costProvinceServiceWithoutTax != null">
|
||||||
|
cost_province_service_without_tax = #{costProvinceServiceWithoutTax},
|
||||||
|
</if>
|
||||||
|
<if test="costOtherWithTax != null">
|
||||||
|
cost_other_with_tax = #{costOtherWithTax},
|
||||||
|
</if>
|
||||||
|
<if test="costOtherWithoutTax != null">
|
||||||
|
cost_other_without_tax = #{costOtherWithoutTax},
|
||||||
|
</if>
|
||||||
|
<if test="remark != null and remark != ''">
|
||||||
|
remark = #{remark},
|
||||||
|
</if>
|
||||||
|
<if test="chargeStatus != null and chargeStatus != ''">
|
||||||
|
charge_status = #{chargeStatus},
|
||||||
|
</if>
|
||||||
|
<if test="updateBy != null and updateBy != ''">
|
||||||
|
update_by = #{updateBy},
|
||||||
|
</if>
|
||||||
|
update_time = now()
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
<update id="updateOmsFinanceChargeByOrderCode">
|
||||||
|
update oms_finance_charge
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
|
||||||
|
<if test="bizChargeDate != null">
|
||||||
|
biz_charge_date = #{bizChargeDate},
|
||||||
|
</if>
|
||||||
|
<if test="financeChargeDate != null">
|
||||||
|
finance_charge_date = #{financeChargeDate},
|
||||||
|
</if>
|
||||||
|
<if test="incomeWithTaxTotal != null">
|
||||||
|
income_with_tax_total = #{incomeWithTaxTotal},
|
||||||
|
</if>
|
||||||
|
<if test="incomeWithoutTaxTotal != null">
|
||||||
|
income_without_tax_total = #{incomeWithoutTaxTotal},
|
||||||
|
</if>
|
||||||
|
<if test="costSoftwareWithoutTax != null">
|
||||||
|
cost_software_without_tax = #{costSoftwareWithoutTax},
|
||||||
|
</if>
|
||||||
|
<if test="costSoftwareWithTax != null">
|
||||||
|
cost_software_with_tax = #{costSoftwareWithTax},
|
||||||
|
</if>
|
||||||
|
<if test="costHardwareWithoutTax != null">
|
||||||
|
cost_hardware_without_tax = #{costHardwareWithoutTax},
|
||||||
|
</if>
|
||||||
|
<if test="costHardwareWithTax != null">
|
||||||
|
cost_hardware_with_tax = #{costHardwareWithTax},
|
||||||
|
</if>
|
||||||
|
<if test="costSoftwareMaintWithoutTax != null">
|
||||||
|
cost_software_maint_without_tax = #{costSoftwareMaintWithoutTax},
|
||||||
|
</if>
|
||||||
|
<if test="costSoftwareMaintWithTax != null">
|
||||||
|
cost_software_maint_with_tax = #{costSoftwareMaintWithTax},
|
||||||
|
</if>
|
||||||
|
<if test="costHardwareMaintWithoutTax != null">
|
||||||
|
cost_hardware_maint_without_tax = #{costHardwareMaintWithoutTax},
|
||||||
|
</if>
|
||||||
|
<if test="costHardwareMaintWithTax != null">
|
||||||
|
cost_hardware_maint_with_tax = #{costHardwareMaintWithTax},
|
||||||
|
</if>
|
||||||
|
<if test="costProvinceServiceWithTax != null">
|
||||||
|
cost_province_service_with_tax = #{costProvinceServiceWithTax},
|
||||||
|
</if>
|
||||||
|
<if test="costProvinceServiceWithoutTax != null">
|
||||||
|
cost_province_service_without_tax = #{costProvinceServiceWithoutTax},
|
||||||
|
</if>
|
||||||
|
<if test="costOtherWithTax != null">
|
||||||
|
cost_other_with_tax = #{costOtherWithTax},
|
||||||
|
</if>
|
||||||
|
<if test="costOtherWithoutTax != null">
|
||||||
|
cost_other_without_tax = #{costOtherWithoutTax},
|
||||||
|
</if>
|
||||||
|
<if test="remark != null and remark != ''">
|
||||||
|
remark = #{remark},
|
||||||
|
</if>
|
||||||
|
<if test="chargeStatus != null and chargeStatus != ''">
|
||||||
|
charge_status = #{chargeStatus},
|
||||||
|
</if>
|
||||||
|
<if test="updateBy != null and updateBy != ''">
|
||||||
|
update_by = #{updateBy},
|
||||||
|
</if>
|
||||||
|
update_time = now()
|
||||||
|
</trim>
|
||||||
|
where order_code = #{orderCode}
|
||||||
|
</update>
|
||||||
|
<update id="returnApplyBiz">
|
||||||
|
update oms_finance_charge
|
||||||
|
set charge_status=#{chargeStatus},
|
||||||
|
biz_charge_date=null,
|
||||||
|
update_time=now()
|
||||||
|
where order_code = #{orderCode}
|
||||||
|
</update>
|
||||||
|
<update id="revoke">
|
||||||
|
update oms_finance_charge set
|
||||||
|
finance_charge_date = #{financeChargeDate},
|
||||||
|
income_with_tax_total = #{incomeWithTaxTotal},
|
||||||
|
income_without_tax_total = #{incomeWithoutTaxTotal},
|
||||||
|
cost_software_without_tax = #{costSoftwareWithoutTax},
|
||||||
|
cost_software_with_tax = #{costSoftwareWithTax},
|
||||||
|
cost_hardware_without_tax = #{costHardwareWithoutTax},
|
||||||
|
cost_hardware_with_tax = #{costHardwareWithTax},
|
||||||
|
cost_software_maint_without_tax = #{costSoftwareMaintWithoutTax},
|
||||||
|
cost_software_maint_with_tax = #{costSoftwareMaintWithTax},
|
||||||
|
cost_hardware_maint_without_tax = #{costHardwareMaintWithoutTax},
|
||||||
|
cost_hardware_maint_with_tax = #{costHardwareMaintWithTax},
|
||||||
|
cost_province_service_with_tax = #{costProvinceServiceWithTax},
|
||||||
|
cost_province_service_without_tax = #{costProvinceServiceWithoutTax},
|
||||||
|
cost_other_with_tax = #{costOtherWithTax},
|
||||||
|
cost_other_without_tax = #{costOtherWithoutTax},
|
||||||
|
remark = #{remark},
|
||||||
|
charge_status = #{chargeStatus},
|
||||||
|
update_by = #{updateBy},
|
||||||
|
update_time = now()
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteOmsFinanceChargeById" parameterType="Long">
|
||||||
|
delete from oms_finance_charge where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteOmsFinanceChargeByIds" parameterType="String">
|
||||||
|
delete from oms_finance_charge where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
||||||
|
|
@ -182,6 +182,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
from oms_payable_bill
|
from oms_payable_bill
|
||||||
where payable_bill_code like concat(#{prefix}, '%')
|
where payable_bill_code like concat(#{prefix}, '%')
|
||||||
</select>
|
</select>
|
||||||
|
<select id="checkDelete" resultType="java.lang.String">
|
||||||
|
select DISTINCT t1.inventory_code
|
||||||
|
from oms_payable_bill t1
|
||||||
|
left join oms_payable_payment_detail t2 on t1.id=t2.payable_bill_id
|
||||||
|
left join oms_payable_ticket_detail t3 on t1.id=t3.payable_bill_id
|
||||||
|
where (t2.id is not null or t3.id is not null)
|
||||||
|
and t1.inventory_code in
|
||||||
|
<foreach item="item" collection="list" separator="," open="(" close=")" index="">#{item}</foreach>
|
||||||
|
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
<insert id="insertOmsPayableBill" parameterType="OmsPayableBill" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertOmsPayableBill" parameterType="OmsPayableBill" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into oms_payable_bill
|
insert into oms_payable_bill
|
||||||
|
|
@ -275,6 +286,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
<delete id="deleteByInventoryCode">
|
||||||
|
delete from oms_payable_bill where inventory_code in
|
||||||
|
<foreach collection="list" item="item" separator="," open="(" close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
|
||||||
<update id="updateBatchPayableBillPaymentInfo">
|
<update id="updateBatchPayableBillPaymentInfo">
|
||||||
<foreach collection="list" item="item" separator=";">
|
<foreach collection="list" item="item" separator=";">
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<sql id="selectInventoryInfoVo">
|
<sql id="selectInventoryInfoVo">
|
||||||
select t1.id, t1.product_code, t1.product_sn, t1.inventory_status, t1.inner_code, t1.outer_code, t1.warehouse_id, t1.inner_price,t1.tax_rate,
|
select t1.id, t1.product_code, t1.product_sn, t1.inventory_status, t1.inner_code, t1.outer_code, t1.warehouse_id, t1.inner_price,t1.tax_rate,
|
||||||
t1.outer_price, t1.create_by, t1.create_time, t1.update_by, t1.update_time ,
|
t1.outer_price, t1.create_by, t1.create_time, t1.update_by, t1.update_time ,
|
||||||
t2.warehouse_name,t3.description as 'product_desc',t3.model
|
t2.warehouse_name,t3.description as 'product_desc',t3.model,t3.type as product_type
|
||||||
from oms_inventory_info t1
|
from oms_inventory_info t1
|
||||||
left join oms_warehouse_info t2 on t1.warehouse_id = t2.id
|
left join oms_warehouse_info t2 on t1.warehouse_id = t2.id
|
||||||
left join product_info t3 on t1.product_code = t3.product_code
|
left join product_info t3 on t1.product_code = t3.product_code
|
||||||
|
|
@ -100,6 +100,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
select product_sn from oms_inventory_delivery_detail where delivery_id = #{id}
|
select product_sn from oms_inventory_delivery_detail where delivery_id = #{id}
|
||||||
)
|
)
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectInventoryInfoByOrderCode" resultType="com.ruoyi.sip.domain.InventoryInfo">
|
||||||
|
<include refid="selectInventoryInfoVo"/>
|
||||||
|
where t1.outer_code in (
|
||||||
|
|
||||||
|
select outer_code from oms_inventory_outer where order_code in
|
||||||
|
<foreach item="item" index="index" collection="list" separator="," open="(" close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
|
||||||
|
)
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<insert id="insertInventoryInfo" parameterType="InventoryInfo" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertInventoryInfo" parameterType="InventoryInfo" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
|
|
||||||
|
|
@ -60,12 +60,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
,t3.partner_name,t3.level,t3.system_user_id,t3.address partner_address
|
,t3.partner_name,t3.level,t3.system_user_id,t3.address partner_address
|
||||||
,t4.agent_name
|
,t4.agent_name
|
||||||
,t5.user_name as duty_name
|
,t5.user_name as duty_name
|
||||||
|
,t6.charge_status,t6.biz_charge_date,t6.finance_charge_date
|
||||||
from project_order_info t1
|
from project_order_info t1
|
||||||
left join project_info t2 on t1.project_id = t2.id
|
left join project_info t2 on t1.project_id = t2.id
|
||||||
|
|
||||||
left join partner_info t3 on t1.partner_code=t3.partner_code
|
left join partner_info t3 on t1.partner_code=t3.partner_code
|
||||||
left join agent_info t4 on t2.agent_code=t4.agent_code
|
left join agent_info t4 on t2.agent_code=t4.agent_code
|
||||||
left join sys_user t5 on t1.duty=t5.user_id
|
left join sys_user t5 on t1.duty=t5.user_id
|
||||||
|
left join oms_finance_charge t6 on t1.order_code=t6.order_code
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectProjectOrderInfoList" parameterType="ProjectOrderInfo" resultMap="ProjectOrderInfoResult">
|
<select id="selectProjectOrderInfoList" parameterType="ProjectOrderInfo" resultMap="ProjectOrderInfoResult">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue