no commit message
This commit is contained in:
parent
9f20555ea2
commit
af7f587cb7
53
ruoyi-ui/src/api/data/currentinventory.js
Normal file
53
ruoyi-ui/src/api/data/currentinventory.js
Normal file
@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询当前库存存储列表
|
||||
export function listCurrentinventory(query) {
|
||||
return request({
|
||||
url: '/data/currentinventory/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询当前库存存储详细
|
||||
export function getCurrentinventory(id) {
|
||||
return request({
|
||||
url: '/data/currentinventory/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增当前库存存储
|
||||
export function addCurrentinventory(data) {
|
||||
return request({
|
||||
url: '/data/currentinventory',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改当前库存存储
|
||||
export function updateCurrentinventory(data) {
|
||||
return request({
|
||||
url: '/data/currentinventory',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除当前库存存储
|
||||
export function delCurrentinventory(id) {
|
||||
return request({
|
||||
url: '/data/currentinventory/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 导出当前库存存储
|
||||
export function exportCurrentinventory(query) {
|
||||
return request({
|
||||
url: '/data/currentinventory/export',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
657
ruoyi-ui/src/views/data/currentinventory/index.vue
Normal file
657
ruoyi-ui/src/views/data/currentinventory/index.vue
Normal file
@ -0,0 +1,657 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
|
||||
<el-form-item label="记账日期" prop="accountdate">
|
||||
<el-date-picker clearable size="small" style="width: 200px"
|
||||
v-model="queryParams.accountdate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择记账日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="单号" prop="billnumber">
|
||||
<el-input
|
||||
v-model="queryParams.billnumber"
|
||||
placeholder="请输入单号"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="公司名称" prop="companyname">
|
||||
<el-input
|
||||
v-model="queryParams.companyname"
|
||||
placeholder="请输入公司名称"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="工厂名称" prop="factoryname">
|
||||
<el-input
|
||||
v-model="queryParams.factoryname"
|
||||
placeholder="请输入工厂名称"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库名称" prop="warehousename">
|
||||
<el-input
|
||||
v-model="queryParams.warehousename"
|
||||
placeholder="请输入仓库名称"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="库位名称" prop="locationname">
|
||||
<el-input
|
||||
v-model="queryParams.locationname"
|
||||
placeholder="请输入库位名称"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品名称" prop="goodname">
|
||||
<el-input
|
||||
v-model="queryParams.goodname"
|
||||
placeholder="请输入商品名称"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次单号" prop="batchbillnumber">
|
||||
<el-input
|
||||
v-model="queryParams.batchbillnumber"
|
||||
placeholder="请输入批次单号"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="专供号" prop="specialnumber">
|
||||
<el-input
|
||||
v-model="queryParams.specialnumber"
|
||||
placeholder="请输入专供号"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="描述" prop="remark">
|
||||
<el-input
|
||||
v-model="queryParams.remark"
|
||||
placeholder="请输入描述"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="类型名称" prop="typename">
|
||||
<el-select v-model="queryParams.typename" placeholder="请选择类型名称" clearable size="small">
|
||||
<el-option
|
||||
v-for="dict in typenameOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="客户名称" prop="customername">
|
||||
<el-input
|
||||
v-model="queryParams.customername"
|
||||
placeholder="请输入客户名称"
|
||||
clearable
|
||||
size="small"
|
||||
@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="primary"
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['data:currentinventory:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['data:currentinventory:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['data:currentinventory:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['data:currentinventory:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" stripe border show-summary highlight-current-row :data="currentinventoryList"
|
||||
@selection-change="handleSelectionChange" @sort-change='tableSortChange' @row-dblclick="handleUpdate">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="行号" width="80" align="center">
|
||||
<template slot-scope="scope">{{scope.$index + 1}}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="UUID" align="center" prop="id" v-if="false" />
|
||||
<el-table-column label="仓库名称" align="center" prop="warehousename" sortable='custom' :sort-orders="['ascending', 'descending']" />
|
||||
<el-table-column label="商品代码" align="center" prop="goodid" sortable='custom' :sort-orders="['ascending', 'descending']" />
|
||||
<el-table-column label="商品名称" align="center" prop="goodname" sortable='custom' :sort-orders="['ascending', 'descending']" />
|
||||
<el-table-column label="单位" align="center" prop="unitname" sortable='custom' :sort-orders="['ascending', 'descending']" />
|
||||
<el-table-column label="规格" align="center" prop="standard" sortable='custom' :sort-orders="['ascending', 'descending']" />
|
||||
<el-table-column label="当前库存" align="center" prop="amount" sortable='custom' :sort-orders="['ascending', 'descending']" />
|
||||
<el-table-column label="占用库存" align="center" prop="freezeamount" sortable='custom' :sort-orders="['ascending', 'descending']" />
|
||||
<el-table-column label="可用库存" align="center" prop="availableamount" sortable='custom' :sort-orders="['ascending', 'descending']" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
plain
|
||||
size="small"
|
||||
type="primary"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['data:currentinventory:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
plain
|
||||
size="small"
|
||||
type="primary"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['data:currentinventory: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">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="记账日期" prop="accountdate">
|
||||
<el-date-picker clearable size="small" style="width: 200px"
|
||||
v-model="form.accountdate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择记账日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="单号" prop="billnumber">
|
||||
<el-input v-model="form.billnumber" placeholder="请输入单号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="公司UUID" prop="companyuuid">
|
||||
<el-input v-model="form.companyuuid" placeholder="请输入公司UUID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="公司代码" prop="companyid">
|
||||
<el-input v-model="form.companyid" placeholder="请输入公司代码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="公司名称" prop="companyname">
|
||||
<el-input v-model="form.companyname" placeholder="请输入公司名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工厂UUID" prop="factoryuuid">
|
||||
<el-input v-model="form.factoryuuid" placeholder="请输入工厂UUID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工厂代码" prop="factoryid">
|
||||
<el-input v-model="form.factoryid" placeholder="请输入工厂代码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="工厂名称" prop="factoryname">
|
||||
<el-input v-model="form.factoryname" placeholder="请输入工厂名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库UUID" prop="warehouseuuid">
|
||||
<el-input v-model="form.warehouseuuid" placeholder="请输入仓库UUID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库代码" prop="warehouseid">
|
||||
<el-input v-model="form.warehouseid" placeholder="请输入仓库代码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="仓库名称" prop="warehousename">
|
||||
<el-input v-model="form.warehousename" placeholder="请输入仓库名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="库位UUID" prop="locationuuid">
|
||||
<el-input v-model="form.locationuuid" placeholder="请输入库位UUID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="库位代码" prop="locationid">
|
||||
<el-input v-model="form.locationid" placeholder="请输入库位代码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="库位名称" prop="locationname">
|
||||
<el-input v-model="form.locationname" placeholder="请输入库位名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品UUID" prop="gooduuid">
|
||||
<el-input v-model="form.gooduuid" placeholder="请输入商品UUID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品代码" prop="goodid">
|
||||
<el-input v-model="form.goodid" placeholder="请输入商品代码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品名称" prop="goodname">
|
||||
<el-input v-model="form.goodname" placeholder="请输入商品名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="计量单位名称" prop="unitname">
|
||||
<el-input v-model="form.unitname" placeholder="请输入计量单位名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="规格" prop="standard">
|
||||
<el-input v-model="form.standard" placeholder="请输入规格" />
|
||||
</el-form-item>
|
||||
<el-form-item label="入库数量" prop="inamount">
|
||||
<el-input v-model="form.inamount" placeholder="请输入入库数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="出库数量" prop="outamount">
|
||||
<el-input v-model="form.outamount" placeholder="请输入出库数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="数量" prop="amount">
|
||||
<el-input v-model="form.amount" placeholder="请输入数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="冻结数量" prop="freezeamount">
|
||||
<el-input v-model="form.freezeamount" placeholder="请输入冻结数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="批次管理" prop="isbatch">
|
||||
<el-input v-model="form.isbatch" placeholder="请输入批次管理" />
|
||||
</el-form-item>
|
||||
<el-form-item label="批次单号" prop="batchbillnumber">
|
||||
<el-input v-model="form.batchbillnumber" placeholder="请输入批次单号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="专供号" prop="specialnumber">
|
||||
<el-input v-model="form.specialnumber" placeholder="请输入专供号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="类型">
|
||||
<el-select v-model="form.type" placeholder="请选择类型">
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="单据类型">
|
||||
<el-select v-model="form.billtype" placeholder="请选择单据类型">
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人代码" prop="createuserid">
|
||||
<el-input v-model="form.createuserid" placeholder="请输入创建人代码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="创建人名称" prop="createusername">
|
||||
<el-input v-model="form.createusername" placeholder="请输入创建人名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单据类型名称" prop="billtypename">
|
||||
<el-input v-model="form.billtypename" placeholder="请输入单据类型名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="类型名称">
|
||||
<el-select v-model="form.typename" placeholder="请选择类型名称">
|
||||
<el-option
|
||||
v-for="dict in typenameOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="生产日期" prop="productdate">
|
||||
<el-date-picker clearable size="small" style="width: 200px"
|
||||
v-model="form.productdate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择生产日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单号" prop="salebillnumber">
|
||||
<el-input v-model="form.salebillnumber" placeholder="请输入订单号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="产地" prop="productionarea">
|
||||
<el-input v-model="form.productionarea" placeholder="请输入产地" />
|
||||
</el-form-item>
|
||||
<el-form-item label="版本号" prop="versionnumber">
|
||||
<el-input v-model="form.versionnumber" placeholder="请输入版本号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="客户UUID" prop="customeruuid">
|
||||
<el-input v-model="form.customeruuid" placeholder="请输入客户UUID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="客户代码" prop="customerid">
|
||||
<el-input v-model="form.customerid" placeholder="请输入客户代码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="客户名称" prop="customername">
|
||||
<el-input v-model="form.customername" placeholder="请输入客户名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="明细UUID" prop="detailuuid">
|
||||
<el-input v-model="form.detailuuid" placeholder="请输入明细UUID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="专供号代码" prop="specialcode">
|
||||
<el-input v-model="form.specialcode" placeholder="请输入专供号代码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单据类型">
|
||||
<el-radio-group v-model="form.billstatus">
|
||||
<el-radio label="1">请选择字典生成</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="仓储日期" prop="storedate">
|
||||
<el-date-picker clearable size="small" style="width: 200px"
|
||||
v-model="form.storedate"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="选择仓储日期">
|
||||
</el-date-picker>
|
||||
</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 { listCurrentinventory, getCurrentinventory, delCurrentinventory, addCurrentinventory, updateCurrentinventory, exportCurrentinventory } from "@/api/data/currentinventory";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 当前库存存储表格数据
|
||||
currentinventoryList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 类型名称字典
|
||||
typenameOptions: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
orderByColumn: undefined,
|
||||
isAsc: undefined,
|
||||
accountdate: undefined,
|
||||
billnumber: undefined,
|
||||
companyname: undefined,
|
||||
factoryname: undefined,
|
||||
warehousename: undefined,
|
||||
locationname: undefined,
|
||||
goodname: undefined,
|
||||
batchbillnumber: undefined,
|
||||
specialnumber: undefined,
|
||||
remark: undefined,
|
||||
typename: undefined,
|
||||
customername: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
accountdate: [
|
||||
{ required: true, message: "记账日期不能为空", trigger: "blur" }
|
||||
], billnumber: [
|
||||
{ required: true, message: "单号不能为空", trigger: "blur" }
|
||||
], companyuuid: [
|
||||
{ required: true, message: "公司UUID不能为空", trigger: "blur" }
|
||||
], companyid: [
|
||||
{ required: true, message: "公司代码不能为空", trigger: "blur" }
|
||||
], companyname: [
|
||||
{ required: true, message: "公司名称不能为空", trigger: "blur" }
|
||||
], factoryuuid: [
|
||||
{ required: true, message: "工厂UUID不能为空", trigger: "blur" }
|
||||
], factoryid: [
|
||||
{ required: true, message: "工厂代码不能为空", trigger: "blur" }
|
||||
], factoryname: [
|
||||
{ required: true, message: "工厂名称不能为空", trigger: "blur" }
|
||||
], warehouseuuid: [
|
||||
{ required: true, message: "仓库UUID不能为空", trigger: "blur" }
|
||||
], warehouseid: [
|
||||
{ required: true, message: "仓库代码不能为空", trigger: "blur" }
|
||||
], warehousename: [
|
||||
{ required: true, message: "仓库名称不能为空", trigger: "blur" }
|
||||
], gooduuid: [
|
||||
{ required: true, message: "商品UUID不能为空", trigger: "blur" }
|
||||
], goodid: [
|
||||
{ required: true, message: "商品代码不能为空", trigger: "blur" }
|
||||
], goodname: [
|
||||
{ required: true, message: "商品名称不能为空", trigger: "blur" }
|
||||
], unitname: [
|
||||
{ required: true, message: "计量单位名称不能为空", trigger: "blur" }
|
||||
], inamount: [
|
||||
{ required: true, message: "入库数量不能为空", trigger: "blur" }
|
||||
], outamount: [
|
||||
{ required: true, message: "出库数量不能为空", trigger: "blur" }
|
||||
], amount: [
|
||||
{ required: true, message: "数量不能为空", trigger: "blur" }
|
||||
], freezeamount: [
|
||||
{ required: true, message: "冻结数量不能为空", trigger: "blur" }
|
||||
], isbatch: [
|
||||
{ required: true, message: "批次管理不能为空", trigger: "blur" }
|
||||
], type: [
|
||||
{ required: true, message: "类型不能为空", trigger: "blur" }
|
||||
], billtype: [
|
||||
{ required: true, message: "单据类型不能为空", trigger: "blur" }
|
||||
], createuserid: [
|
||||
{ required: true, message: "创建人代码不能为空", trigger: "blur" }
|
||||
], createusername: [
|
||||
{ required: true, message: "创建人名称不能为空", trigger: "blur" }
|
||||
], createtime: [
|
||||
{ required: true, message: "创建时间不能为空", trigger: "blur" }
|
||||
], billtypename: [
|
||||
{ required: true, message: "单据类型名称不能为空", trigger: "blur" }
|
||||
], typename: [
|
||||
{ required: true, message: "类型名称不能为空", trigger: "blur" }
|
||||
], storedate: [
|
||||
{ required: true, message: "仓储日期不能为空", trigger: "blur" }
|
||||
] }
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getDicts("data_current_type").then(response => {
|
||||
this.typenameOptions = response.data;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
/** 通用当前库存存储排序 */
|
||||
tableSortChange(column) {
|
||||
this.queryParams.pageNum = 1;
|
||||
if (column.order === 'descending') {
|
||||
this.queryParams.orderByColumn = column.prop;
|
||||
this.queryParams.isAsc = 'desc';
|
||||
} else {
|
||||
this.queryParams.orderByColumn = column.prop;
|
||||
this.queryParams.isAsc = 'asc';
|
||||
}
|
||||
this.getList();
|
||||
},
|
||||
/** 查询当前库存存储列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listCurrentinventory(this.queryParams).then(response => {
|
||||
this.currentinventoryList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 类型名称字典翻译
|
||||
typenameFormat(row, column) {
|
||||
return this.selectDictLabel(this.typenameOptions, row.typename);
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: undefined,
|
||||
accountdate: undefined,
|
||||
billnumber: undefined,
|
||||
companyuuid: undefined,
|
||||
companyid: undefined,
|
||||
companyname: undefined,
|
||||
factoryuuid: undefined,
|
||||
factoryid: undefined,
|
||||
factoryname: undefined,
|
||||
warehouseuuid: undefined,
|
||||
warehouseid: undefined,
|
||||
warehousename: undefined,
|
||||
locationuuid: undefined,
|
||||
locationid: undefined,
|
||||
locationname: undefined,
|
||||
gooduuid: undefined,
|
||||
goodid: undefined,
|
||||
goodname: undefined,
|
||||
unitname: undefined,
|
||||
standard: undefined,
|
||||
inamount: undefined,
|
||||
outamount: undefined,
|
||||
amount: undefined,
|
||||
freezeamount: undefined,
|
||||
isbatch: undefined,
|
||||
batchbillnumber: undefined,
|
||||
specialnumber: undefined,
|
||||
type: undefined,
|
||||
billtype: undefined,
|
||||
remark: undefined,
|
||||
createuserid: undefined,
|
||||
createusername: undefined,
|
||||
createtime: undefined,
|
||||
billtypename: undefined,
|
||||
typename: undefined,
|
||||
productdate: undefined,
|
||||
salebillnumber: undefined,
|
||||
productionarea: undefined,
|
||||
versionnumber: undefined,
|
||||
customeruuid: undefined,
|
||||
customerid: undefined,
|
||||
customername: undefined,
|
||||
detailuuid: undefined,
|
||||
specialcode: undefined,
|
||||
billstatus: "0",
|
||||
storedate: undefined
|
||||
};
|
||||
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
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加当前库存存储";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getCurrentinventory(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改当前库存存储";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != undefined) {
|
||||
updateCurrentinventory(this.form).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
} else {
|
||||
this.msgError(response.msg);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
addCurrentinventory(this.form).then(response => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
} else {
|
||||
this.msgError(response.msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$confirm('是否确认删除当前库存存储编号为"' + ids + '"的数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
return delCurrentinventory(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.msgSuccess("删除成功");
|
||||
}).catch(function() {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$confirm('是否确认导出所有当前库存存储数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
return exportCurrentinventory(queryParams);
|
||||
}).then(response => {
|
||||
this.download(response.msg);
|
||||
}).catch(function() {});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -67,8 +67,8 @@ export default {
|
||||
loginForm: {
|
||||
username: "admin",
|
||||
password: "admin123",
|
||||
rememberMe: false,
|
||||
code: "",
|
||||
rememberMe: true,
|
||||
code: "6666",
|
||||
uuid: ""
|
||||
},
|
||||
loginRules: {
|
||||
|
@ -0,0 +1,97 @@
|
||||
package com.ruoyi.project.mr.data.controller;
|
||||
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
||||
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
||||
import com.ruoyi.framework.web.controller.BaseController;
|
||||
import com.ruoyi.framework.web.domain.AjaxResult;
|
||||
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||
import com.ruoyi.project.mr.data.domain.DataCurrentinventory;
|
||||
import com.ruoyi.project.mr.data.service.IDataCurrentinventoryService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 当前库存存储Controller
|
||||
*
|
||||
* @author mr
|
||||
* @date 2020-01-14
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/data/currentinventory")
|
||||
public class DataCurrentinventoryController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IDataCurrentinventoryService dataCurrentinventoryService;
|
||||
|
||||
/**
|
||||
* 查询当前库存存储列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('data:currentinventory:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DataCurrentinventory dataCurrentinventory)
|
||||
{
|
||||
startPage();
|
||||
List<DataCurrentinventory> list = dataCurrentinventoryService.selectDataCurrentinventorySum(dataCurrentinventory);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出当前库存存储列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('data:currentinventory:export')")
|
||||
@Log(title = "当前库存存储", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(DataCurrentinventory dataCurrentinventory)
|
||||
{
|
||||
List<DataCurrentinventory> list = dataCurrentinventoryService.selectDataCurrentinventoryList(dataCurrentinventory);
|
||||
ExcelUtil<DataCurrentinventory> util = new ExcelUtil<DataCurrentinventory>(DataCurrentinventory.class);
|
||||
return util.exportExcel(list, "currentinventory");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前库存存储详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('data:currentinventory:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
return AjaxResult.success(dataCurrentinventoryService.selectDataCurrentinventoryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增当前库存存储
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('data:currentinventory:add')")
|
||||
@Log(title = "当前库存存储", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody DataCurrentinventory dataCurrentinventory)
|
||||
{
|
||||
return toAjax(dataCurrentinventoryService.insertDataCurrentinventory(dataCurrentinventory));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改当前库存存储
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('data:currentinventory:edit')")
|
||||
@Log(title = "当前库存存储", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody DataCurrentinventory dataCurrentinventory)
|
||||
{
|
||||
return toAjax(dataCurrentinventoryService.updateDataCurrentinventory(dataCurrentinventory));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除当前库存存储
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('data:currentinventory:remove')")
|
||||
@Log(title = "当前库存存储", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
return toAjax(dataCurrentinventoryService.deleteDataCurrentinventoryByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,667 @@
|
||||
package com.ruoyi.project.mr.data.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
|
||||
import com.ruoyi.framework.web.domain.BaseEntity;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 当前库存存储对象 data_currentinventory
|
||||
*
|
||||
* @author mr
|
||||
* @date 2020-01-14
|
||||
*/
|
||||
public class DataCurrentinventory extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** UUID */
|
||||
private String id;
|
||||
|
||||
/** 记账日期 */
|
||||
@Excel(name = "记账日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date accountdate;
|
||||
|
||||
/** 单号 */
|
||||
@Excel(name = "单号")
|
||||
private String billnumber;
|
||||
|
||||
/** 公司UUID */
|
||||
@Excel(name = "公司UUID")
|
||||
private String companyuuid;
|
||||
|
||||
/** 公司代码 */
|
||||
@Excel(name = "公司代码")
|
||||
private String companyid;
|
||||
|
||||
/** 公司名称 */
|
||||
@Excel(name = "公司名称")
|
||||
private String companyname;
|
||||
|
||||
/** 工厂UUID */
|
||||
@Excel(name = "工厂UUID")
|
||||
private String factoryuuid;
|
||||
|
||||
/** 工厂代码 */
|
||||
@Excel(name = "工厂代码")
|
||||
private String factoryid;
|
||||
|
||||
/** 工厂名称 */
|
||||
@Excel(name = "工厂名称")
|
||||
private String factoryname;
|
||||
|
||||
/** 仓库UUID */
|
||||
@Excel(name = "仓库UUID")
|
||||
private String warehouseuuid;
|
||||
|
||||
/** 仓库代码 */
|
||||
@Excel(name = "仓库代码")
|
||||
private String warehouseid;
|
||||
|
||||
/** 仓库名称 */
|
||||
@Excel(name = "仓库名称")
|
||||
private String warehousename;
|
||||
|
||||
/** 库位UUID */
|
||||
@Excel(name = "库位UUID")
|
||||
private String locationuuid;
|
||||
|
||||
/** 库位代码 */
|
||||
@Excel(name = "库位代码")
|
||||
private String locationid;
|
||||
|
||||
/** 库位名称 */
|
||||
@Excel(name = "库位名称")
|
||||
private String locationname;
|
||||
|
||||
/** 商品UUID */
|
||||
@Excel(name = "商品UUID")
|
||||
private String gooduuid;
|
||||
|
||||
/** 商品代码 */
|
||||
@Excel(name = "商品代码")
|
||||
private String goodid;
|
||||
|
||||
/** 商品名称 */
|
||||
@Excel(name = "商品名称")
|
||||
private String goodname;
|
||||
|
||||
/** 计量单位名称 */
|
||||
@Excel(name = "计量单位名称")
|
||||
private String unitname;
|
||||
|
||||
/** 规格 */
|
||||
@Excel(name = "规格")
|
||||
private String standard;
|
||||
|
||||
/** 入库数量 */
|
||||
@Excel(name = "入库数量")
|
||||
private Double inamount;
|
||||
|
||||
/** 出库数量 */
|
||||
@Excel(name = "出库数量")
|
||||
private Double outamount;
|
||||
|
||||
/** 数量 */
|
||||
@Excel(name = "数量")
|
||||
private Double amount;
|
||||
|
||||
/** 冻结数量 */
|
||||
@Excel(name = "冻结数量")
|
||||
private Double freezeamount;
|
||||
|
||||
/** 批次管理 */
|
||||
@Excel(name = "批次管理")
|
||||
private Integer isbatch;
|
||||
|
||||
/** 批次单号 */
|
||||
@Excel(name = "批次单号")
|
||||
private String batchbillnumber;
|
||||
|
||||
/** 专供号 */
|
||||
@Excel(name = "专供号")
|
||||
private String specialnumber;
|
||||
|
||||
/** 类型 */
|
||||
@Excel(name = "类型")
|
||||
private String type;
|
||||
|
||||
/** 单据类型 */
|
||||
@Excel(name = "单据类型")
|
||||
private String billtype;
|
||||
|
||||
/** 创建人代码 */
|
||||
@Excel(name = "创建人代码")
|
||||
private String createuserid;
|
||||
|
||||
/** 创建人名称 */
|
||||
@Excel(name = "创建人名称")
|
||||
private String createusername;
|
||||
|
||||
/** 创建人时间 */
|
||||
@Excel(name = "创建人时间")
|
||||
private String createtime;
|
||||
|
||||
/** 单据类型名称 */
|
||||
@Excel(name = "单据类型名称")
|
||||
private String billtypename;
|
||||
|
||||
/** 类型名称 */
|
||||
@Excel(name = "类型名称")
|
||||
private String typename;
|
||||
|
||||
/** 生产日期 */
|
||||
@Excel(name = "生产日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date productdate;
|
||||
|
||||
/** 订单号 */
|
||||
@Excel(name = "订单号")
|
||||
private String salebillnumber;
|
||||
|
||||
/** 产地 */
|
||||
@Excel(name = "产地")
|
||||
private String productionarea;
|
||||
|
||||
/** 版本号 */
|
||||
@Excel(name = "版本号")
|
||||
private String versionnumber;
|
||||
|
||||
/** 客户UUID */
|
||||
@Excel(name = "客户UUID")
|
||||
private String customeruuid;
|
||||
|
||||
/** 客户代码 */
|
||||
@Excel(name = "客户代码")
|
||||
private String customerid;
|
||||
|
||||
/** 客户名称 */
|
||||
@Excel(name = "客户名称")
|
||||
private String customername;
|
||||
|
||||
/** 明细UUID */
|
||||
@Excel(name = "明细UUID")
|
||||
private String detailuuid;
|
||||
|
||||
/** 专供号代码 */
|
||||
@Excel(name = "专供号代码")
|
||||
private String specialcode;
|
||||
|
||||
/** 单据类型(入库、红冲、退库) */
|
||||
@Excel(name = "单据类型", readConverterExp = "入=库、红冲、退库")
|
||||
private String billstatus;
|
||||
|
||||
/** 仓储日期 */
|
||||
@Excel(name = "仓储日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date storedate;
|
||||
|
||||
/** 数量 */
|
||||
@Excel(name = "可用数量")
|
||||
private Double availableamount;
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setAccountdate(Date accountdate)
|
||||
{
|
||||
this.accountdate = accountdate;
|
||||
}
|
||||
|
||||
public Date getAccountdate()
|
||||
{
|
||||
return accountdate;
|
||||
}
|
||||
public void setBillnumber(String billnumber)
|
||||
{
|
||||
this.billnumber = billnumber;
|
||||
}
|
||||
|
||||
public String getBillnumber()
|
||||
{
|
||||
return billnumber;
|
||||
}
|
||||
public void setCompanyuuid(String companyuuid)
|
||||
{
|
||||
this.companyuuid = companyuuid;
|
||||
}
|
||||
|
||||
public String getCompanyuuid()
|
||||
{
|
||||
return companyuuid;
|
||||
}
|
||||
public void setCompanyid(String companyid)
|
||||
{
|
||||
this.companyid = companyid;
|
||||
}
|
||||
|
||||
public String getCompanyid()
|
||||
{
|
||||
return companyid;
|
||||
}
|
||||
public void setCompanyname(String companyname)
|
||||
{
|
||||
this.companyname = companyname;
|
||||
}
|
||||
|
||||
public String getCompanyname()
|
||||
{
|
||||
return companyname;
|
||||
}
|
||||
public void setFactoryuuid(String factoryuuid)
|
||||
{
|
||||
this.factoryuuid = factoryuuid;
|
||||
}
|
||||
|
||||
public String getFactoryuuid()
|
||||
{
|
||||
return factoryuuid;
|
||||
}
|
||||
public void setFactoryid(String factoryid)
|
||||
{
|
||||
this.factoryid = factoryid;
|
||||
}
|
||||
|
||||
public String getFactoryid()
|
||||
{
|
||||
return factoryid;
|
||||
}
|
||||
public void setFactoryname(String factoryname)
|
||||
{
|
||||
this.factoryname = factoryname;
|
||||
}
|
||||
|
||||
public String getFactoryname()
|
||||
{
|
||||
return factoryname;
|
||||
}
|
||||
public void setWarehouseuuid(String warehouseuuid)
|
||||
{
|
||||
this.warehouseuuid = warehouseuuid;
|
||||
}
|
||||
|
||||
public String getWarehouseuuid()
|
||||
{
|
||||
return warehouseuuid;
|
||||
}
|
||||
public void setWarehouseid(String warehouseid)
|
||||
{
|
||||
this.warehouseid = warehouseid;
|
||||
}
|
||||
|
||||
public String getWarehouseid()
|
||||
{
|
||||
return warehouseid;
|
||||
}
|
||||
public void setWarehousename(String warehousename)
|
||||
{
|
||||
this.warehousename = warehousename;
|
||||
}
|
||||
|
||||
public String getWarehousename()
|
||||
{
|
||||
return warehousename;
|
||||
}
|
||||
public void setLocationuuid(String locationuuid)
|
||||
{
|
||||
this.locationuuid = locationuuid;
|
||||
}
|
||||
|
||||
public String getLocationuuid()
|
||||
{
|
||||
return locationuuid;
|
||||
}
|
||||
public void setLocationid(String locationid)
|
||||
{
|
||||
this.locationid = locationid;
|
||||
}
|
||||
|
||||
public String getLocationid()
|
||||
{
|
||||
return locationid;
|
||||
}
|
||||
public void setLocationname(String locationname)
|
||||
{
|
||||
this.locationname = locationname;
|
||||
}
|
||||
|
||||
public String getLocationname()
|
||||
{
|
||||
return locationname;
|
||||
}
|
||||
public void setGooduuid(String gooduuid)
|
||||
{
|
||||
this.gooduuid = gooduuid;
|
||||
}
|
||||
|
||||
public String getGooduuid()
|
||||
{
|
||||
return gooduuid;
|
||||
}
|
||||
public void setGoodid(String goodid)
|
||||
{
|
||||
this.goodid = goodid;
|
||||
}
|
||||
|
||||
public String getGoodid()
|
||||
{
|
||||
return goodid;
|
||||
}
|
||||
public void setGoodname(String goodname)
|
||||
{
|
||||
this.goodname = goodname;
|
||||
}
|
||||
|
||||
public String getGoodname()
|
||||
{
|
||||
return goodname;
|
||||
}
|
||||
public void setUnitname(String unitname)
|
||||
{
|
||||
this.unitname = unitname;
|
||||
}
|
||||
|
||||
public String getUnitname()
|
||||
{
|
||||
return unitname;
|
||||
}
|
||||
public void setStandard(String standard)
|
||||
{
|
||||
this.standard = standard;
|
||||
}
|
||||
|
||||
public String getStandard()
|
||||
{
|
||||
return standard;
|
||||
}
|
||||
public void setInamount(Double inamount)
|
||||
{
|
||||
this.inamount = inamount;
|
||||
}
|
||||
|
||||
public Double getInamount()
|
||||
{
|
||||
return inamount;
|
||||
}
|
||||
public void setOutamount(Double outamount)
|
||||
{
|
||||
this.outamount = outamount;
|
||||
}
|
||||
|
||||
public Double getOutamount()
|
||||
{
|
||||
return outamount;
|
||||
}
|
||||
public void setAmount(Double amount)
|
||||
{
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public Double getAmount()
|
||||
{
|
||||
return amount;
|
||||
}
|
||||
public void setFreezeamount(Double freezeamount)
|
||||
{
|
||||
this.freezeamount = freezeamount;
|
||||
}
|
||||
|
||||
public Double getFreezeamount()
|
||||
{
|
||||
return freezeamount;
|
||||
}
|
||||
public void setIsbatch(Integer isbatch)
|
||||
{
|
||||
this.isbatch = isbatch;
|
||||
}
|
||||
|
||||
public Integer getIsbatch()
|
||||
{
|
||||
return isbatch;
|
||||
}
|
||||
public void setBatchbillnumber(String batchbillnumber)
|
||||
{
|
||||
this.batchbillnumber = batchbillnumber;
|
||||
}
|
||||
|
||||
public String getBatchbillnumber()
|
||||
{
|
||||
return batchbillnumber;
|
||||
}
|
||||
public void setSpecialnumber(String specialnumber)
|
||||
{
|
||||
this.specialnumber = specialnumber;
|
||||
}
|
||||
|
||||
public String getSpecialnumber()
|
||||
{
|
||||
return specialnumber;
|
||||
}
|
||||
public void setType(String type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
public void setBilltype(String billtype)
|
||||
{
|
||||
this.billtype = billtype;
|
||||
}
|
||||
|
||||
public String getBilltype()
|
||||
{
|
||||
return billtype;
|
||||
}
|
||||
public void setCreateuserid(String createuserid)
|
||||
{
|
||||
this.createuserid = createuserid;
|
||||
}
|
||||
|
||||
public String getCreateuserid()
|
||||
{
|
||||
return createuserid;
|
||||
}
|
||||
public void setCreateusername(String createusername)
|
||||
{
|
||||
this.createusername = createusername;
|
||||
}
|
||||
|
||||
public String getCreateusername()
|
||||
{
|
||||
return createusername;
|
||||
}
|
||||
public void setBilltypename(String billtypename)
|
||||
{
|
||||
this.billtypename = billtypename;
|
||||
}
|
||||
|
||||
public String getBilltypename()
|
||||
{
|
||||
return billtypename;
|
||||
}
|
||||
public void setTypename(String typename)
|
||||
{
|
||||
this.typename = typename;
|
||||
}
|
||||
|
||||
public String getTypename()
|
||||
{
|
||||
return typename;
|
||||
}
|
||||
public void setProductdate(Date productdate)
|
||||
{
|
||||
this.productdate = productdate;
|
||||
}
|
||||
|
||||
public Date getProductdate()
|
||||
{
|
||||
return productdate;
|
||||
}
|
||||
public void setSalebillnumber(String salebillnumber)
|
||||
{
|
||||
this.salebillnumber = salebillnumber;
|
||||
}
|
||||
|
||||
public String getSalebillnumber()
|
||||
{
|
||||
return salebillnumber;
|
||||
}
|
||||
public void setProductionarea(String productionarea)
|
||||
{
|
||||
this.productionarea = productionarea;
|
||||
}
|
||||
|
||||
public String getProductionarea()
|
||||
{
|
||||
return productionarea;
|
||||
}
|
||||
public void setVersionnumber(String versionnumber)
|
||||
{
|
||||
this.versionnumber = versionnumber;
|
||||
}
|
||||
|
||||
public String getVersionnumber()
|
||||
{
|
||||
return versionnumber;
|
||||
}
|
||||
public void setCustomeruuid(String customeruuid)
|
||||
{
|
||||
this.customeruuid = customeruuid;
|
||||
}
|
||||
|
||||
public String getCustomeruuid()
|
||||
{
|
||||
return customeruuid;
|
||||
}
|
||||
public void setCustomerid(String customerid)
|
||||
{
|
||||
this.customerid = customerid;
|
||||
}
|
||||
|
||||
public String getCustomerid()
|
||||
{
|
||||
return customerid;
|
||||
}
|
||||
public void setCustomername(String customername)
|
||||
{
|
||||
this.customername = customername;
|
||||
}
|
||||
|
||||
public String getCustomername()
|
||||
{
|
||||
return customername;
|
||||
}
|
||||
public void setDetailuuid(String detailuuid)
|
||||
{
|
||||
this.detailuuid = detailuuid;
|
||||
}
|
||||
|
||||
public String getDetailuuid()
|
||||
{
|
||||
return detailuuid;
|
||||
}
|
||||
public void setSpecialcode(String specialcode)
|
||||
{
|
||||
this.specialcode = specialcode;
|
||||
}
|
||||
|
||||
public String getSpecialcode()
|
||||
{
|
||||
return specialcode;
|
||||
}
|
||||
public void setBillstatus(String billstatus)
|
||||
{
|
||||
this.billstatus = billstatus;
|
||||
}
|
||||
|
||||
public String getBillstatus()
|
||||
{
|
||||
return billstatus;
|
||||
}
|
||||
public void setStoredate(Date storedate)
|
||||
{
|
||||
this.storedate = storedate;
|
||||
}
|
||||
|
||||
public Date getStoredate()
|
||||
{
|
||||
return storedate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("accountdate", getAccountdate())
|
||||
.append("billnumber", getBillnumber())
|
||||
.append("companyuuid", getCompanyuuid())
|
||||
.append("companyid", getCompanyid())
|
||||
.append("companyname", getCompanyname())
|
||||
.append("factoryuuid", getFactoryuuid())
|
||||
.append("factoryid", getFactoryid())
|
||||
.append("factoryname", getFactoryname())
|
||||
.append("warehouseuuid", getWarehouseuuid())
|
||||
.append("warehouseid", getWarehouseid())
|
||||
.append("warehousename", getWarehousename())
|
||||
.append("locationuuid", getLocationuuid())
|
||||
.append("locationid", getLocationid())
|
||||
.append("locationname", getLocationname())
|
||||
.append("gooduuid", getGooduuid())
|
||||
.append("goodid", getGoodid())
|
||||
.append("goodname", getGoodname())
|
||||
.append("unitname", getUnitname())
|
||||
.append("standard", getStandard())
|
||||
.append("inamount", getInamount())
|
||||
.append("outamount", getOutamount())
|
||||
.append("amount", getAmount())
|
||||
.append("freezeamount", getFreezeamount())
|
||||
.append("isbatch", getIsbatch())
|
||||
.append("batchbillnumber", getBatchbillnumber())
|
||||
.append("specialnumber", getSpecialnumber())
|
||||
.append("type", getType())
|
||||
.append("billtype", getBilltype())
|
||||
.append("remark", getRemark())
|
||||
.append("createuserid", getCreateuserid())
|
||||
.append("createusername", getCreateusername())
|
||||
.append("createtime", getCreatetime())
|
||||
.append("billtypename", getBilltypename())
|
||||
.append("typename", getTypename())
|
||||
.append("productdate", getProductdate())
|
||||
.append("salebillnumber", getSalebillnumber())
|
||||
.append("productionarea", getProductionarea())
|
||||
.append("versionnumber", getVersionnumber())
|
||||
.append("customeruuid", getCustomeruuid())
|
||||
.append("customerid", getCustomerid())
|
||||
.append("customername", getCustomername())
|
||||
.append("detailuuid", getDetailuuid())
|
||||
.append("specialcode", getSpecialcode())
|
||||
.append("billstatus", getBillstatus())
|
||||
.append("storedate", getStoredate())
|
||||
.append("availableamount", getAvailableamount())
|
||||
.toString();
|
||||
}
|
||||
|
||||
public String getCreatetime() {
|
||||
return createtime;
|
||||
}
|
||||
|
||||
public void setCreatetime(String createtime) {
|
||||
this.createtime = createtime;
|
||||
}
|
||||
|
||||
public Double getAvailableamount() {
|
||||
return availableamount;
|
||||
}
|
||||
|
||||
public void setAvailableamount(Double availableamount) {
|
||||
this.availableamount = availableamount;
|
||||
}
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package com.ruoyi.project.mr.data.mapper;
|
||||
|
||||
import com.ruoyi.project.mr.data.domain.DataCurrentinventory;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 当前库存存储Mapper接口
|
||||
*
|
||||
* @author mr
|
||||
* @date 2020-01-14
|
||||
*/
|
||||
public interface DataCurrentinventoryMapper
|
||||
{
|
||||
/**
|
||||
* 查询当前库存存储
|
||||
*
|
||||
* @param id 当前库存存储ID
|
||||
* @return 当前库存存储
|
||||
*/
|
||||
public DataCurrentinventory selectDataCurrentinventoryById(String id);
|
||||
|
||||
/**
|
||||
* 查询当前库存存储列表
|
||||
*
|
||||
* @param dataCurrentinventory 当前库存存储
|
||||
* @return 当前库存存储集合
|
||||
*/
|
||||
public List<DataCurrentinventory> selectDataCurrentinventoryList(DataCurrentinventory dataCurrentinventory);
|
||||
|
||||
/**
|
||||
* 查询当前库存存储整合列表
|
||||
*
|
||||
* @param dataCurrentinventory 当前库存存储整合
|
||||
* @return 当前库存存储集合
|
||||
*/
|
||||
public List<DataCurrentinventory> selectDataCurrentinventorySum(DataCurrentinventory dataCurrentinventory);
|
||||
|
||||
/**
|
||||
* 新增当前库存存储
|
||||
*
|
||||
* @param dataCurrentinventory 当前库存存储
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDataCurrentinventory(DataCurrentinventory dataCurrentinventory);
|
||||
|
||||
/**
|
||||
* 修改当前库存存储
|
||||
*
|
||||
* @param dataCurrentinventory 当前库存存储
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDataCurrentinventory(DataCurrentinventory dataCurrentinventory);
|
||||
|
||||
/**
|
||||
* 删除当前库存存储
|
||||
*
|
||||
* @param id 当前库存存储ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDataCurrentinventoryById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除当前库存存储
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDataCurrentinventoryByIds(String[] ids);
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package com.ruoyi.project.mr.data.service;
|
||||
|
||||
import com.ruoyi.project.mr.data.domain.DataCurrentinventory;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 当前库存存储Service接口
|
||||
*
|
||||
* @author mr
|
||||
* @date 2020-01-14
|
||||
*/
|
||||
public interface IDataCurrentinventoryService
|
||||
{
|
||||
/**
|
||||
* 查询当前库存存储
|
||||
*
|
||||
* @param id 当前库存存储ID
|
||||
* @return 当前库存存储
|
||||
*/
|
||||
public DataCurrentinventory selectDataCurrentinventoryById(String id);
|
||||
|
||||
/**
|
||||
* 查询当前库存存储列表
|
||||
*
|
||||
* @param dataCurrentinventory 当前库存存储
|
||||
* @return 当前库存存储集合
|
||||
*/
|
||||
public List<DataCurrentinventory> selectDataCurrentinventoryList(DataCurrentinventory dataCurrentinventory);
|
||||
|
||||
/**
|
||||
* 查询当前库存存储整合
|
||||
*
|
||||
* @param dataCurrentinventory 当前库存存储
|
||||
* @return 当前库存存储集合
|
||||
*/
|
||||
public List<DataCurrentinventory> selectDataCurrentinventorySum(DataCurrentinventory dataCurrentinventory);
|
||||
|
||||
/**
|
||||
* 新增当前库存存储
|
||||
*
|
||||
* @param dataCurrentinventory 当前库存存储
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDataCurrentinventory(DataCurrentinventory dataCurrentinventory);
|
||||
|
||||
/**
|
||||
* 修改当前库存存储
|
||||
*
|
||||
* @param dataCurrentinventory 当前库存存储
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDataCurrentinventory(DataCurrentinventory dataCurrentinventory);
|
||||
|
||||
/**
|
||||
* 批量删除当前库存存储
|
||||
*
|
||||
* @param ids 需要删除的当前库存存储ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDataCurrentinventoryByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除当前库存存储信息
|
||||
*
|
||||
* @param id 当前库存存储ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDataCurrentinventoryById(String id);
|
||||
}
|
@ -0,0 +1,106 @@
|
||||
package com.ruoyi.project.mr.data.service.impl;
|
||||
|
||||
import com.ruoyi.project.mr.data.domain.DataCurrentinventory;
|
||||
import com.ruoyi.project.mr.data.mapper.DataCurrentinventoryMapper;
|
||||
import com.ruoyi.project.mr.data.service.IDataCurrentinventoryService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 当前库存存储Service业务层处理
|
||||
*
|
||||
* @author mr
|
||||
* @date 2020-01-14
|
||||
*/
|
||||
@Service
|
||||
public class DataCurrentinventoryServiceImpl implements IDataCurrentinventoryService
|
||||
{
|
||||
@Autowired
|
||||
private DataCurrentinventoryMapper dataCurrentinventoryMapper;
|
||||
|
||||
/**
|
||||
* 查询当前库存存储
|
||||
*
|
||||
* @param id 当前库存存储ID
|
||||
* @return 当前库存存储
|
||||
*/
|
||||
@Override
|
||||
public DataCurrentinventory selectDataCurrentinventoryById(String id)
|
||||
{
|
||||
return dataCurrentinventoryMapper.selectDataCurrentinventoryById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当前库存存储列表
|
||||
*
|
||||
* @param dataCurrentinventory 当前库存存储
|
||||
* @return 当前库存存储
|
||||
*/
|
||||
@Override
|
||||
public List<DataCurrentinventory> selectDataCurrentinventoryList(DataCurrentinventory dataCurrentinventory)
|
||||
{
|
||||
return dataCurrentinventoryMapper.selectDataCurrentinventoryList(dataCurrentinventory);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当前库存存储整合
|
||||
*
|
||||
* @param dataCurrentinventory 当前库存存储
|
||||
* @return 当前库存存储
|
||||
*/
|
||||
@Override
|
||||
public List<DataCurrentinventory> selectDataCurrentinventorySum(DataCurrentinventory dataCurrentinventory)
|
||||
{
|
||||
return dataCurrentinventoryMapper.selectDataCurrentinventorySum(dataCurrentinventory);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增当前库存存储
|
||||
*
|
||||
* @param dataCurrentinventory 当前库存存储
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertDataCurrentinventory(DataCurrentinventory dataCurrentinventory)
|
||||
{
|
||||
return dataCurrentinventoryMapper.insertDataCurrentinventory(dataCurrentinventory);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改当前库存存储
|
||||
*
|
||||
* @param dataCurrentinventory 当前库存存储
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateDataCurrentinventory(DataCurrentinventory dataCurrentinventory)
|
||||
{
|
||||
return dataCurrentinventoryMapper.updateDataCurrentinventory(dataCurrentinventory);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除当前库存存储
|
||||
*
|
||||
* @param ids 需要删除的当前库存存储ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDataCurrentinventoryByIds(String[] ids)
|
||||
{
|
||||
return dataCurrentinventoryMapper.deleteDataCurrentinventoryByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除当前库存存储信息
|
||||
*
|
||||
* @param id 当前库存存储ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteDataCurrentinventoryById(String id)
|
||||
{
|
||||
return dataCurrentinventoryMapper.deleteDataCurrentinventoryById(id);
|
||||
}
|
||||
}
|
@ -23,8 +23,8 @@ public class TestController extends BaseController
|
||||
{
|
||||
private final static Map<Integer, UserEntity> users = new LinkedHashMap<Integer, UserEntity>();
|
||||
{
|
||||
users.put(1, new UserEntity(1, "admin", "admin123", "15888888888"));
|
||||
users.put(2, new UserEntity(2, "ry", "admin123", "15666666666"));
|
||||
users.put(1, new UserEntity(1, "admin", "admin123", "15888888888","头像1"));
|
||||
users.put(2, new UserEntity(2, "ry", "admin123", "15666666666","头像2"));
|
||||
}
|
||||
|
||||
@ApiOperation("获取用户列表")
|
||||
@ -111,17 +111,21 @@ class UserEntity
|
||||
@ApiModelProperty("用户手机")
|
||||
private String mobile;
|
||||
|
||||
@ApiModelProperty("用户头像")
|
||||
private String avatar;
|
||||
|
||||
public UserEntity()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public UserEntity(Integer userId, String username, String password, String mobile)
|
||||
public UserEntity(Integer userId, String username, String password, String mobile,String avatar)
|
||||
{
|
||||
this.userId = userId;
|
||||
this.username = username;
|
||||
this.password = password;
|
||||
this.mobile = mobile;
|
||||
this.avatar = avatar;
|
||||
}
|
||||
|
||||
public Integer getUserId()
|
||||
@ -163,4 +167,12 @@ class UserEntity
|
||||
{
|
||||
this.mobile = mobile;
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public void setAvatar(String avatar) {
|
||||
this.avatar = avatar;
|
||||
}
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ xss:
|
||||
# 排除链接(多个用逗号分隔)
|
||||
excludes: /system/notice/*
|
||||
# 匹配链接
|
||||
urlPatterns: /system/*,/monitor/*,/tool/*,/base/*
|
||||
urlPatterns: /system/*,/monitor/*,/tool/*,/base/*,/data/*
|
||||
|
||||
# 代码生成
|
||||
gen:
|
||||
|
@ -0,0 +1,267 @@
|
||||
<?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.project.mr.data.mapper.DataCurrentinventoryMapper">
|
||||
|
||||
<resultMap type="DataCurrentinventory" id="DataCurrentinventoryResult">
|
||||
<result property="id" column="ID" />
|
||||
<result property="accountdate" column="AccountDate" />
|
||||
<result property="billnumber" column="Billnumber" />
|
||||
<result property="companyuuid" column="CompanyUUID" />
|
||||
<result property="companyid" column="CompanyID" />
|
||||
<result property="companyname" column="CompanyName" />
|
||||
<result property="factoryuuid" column="FactoryUUID" />
|
||||
<result property="factoryid" column="FactoryID" />
|
||||
<result property="factoryname" column="FactoryName" />
|
||||
<result property="warehouseuuid" column="WarehouseUUID" />
|
||||
<result property="warehouseid" column="WarehouseID" />
|
||||
<result property="warehousename" column="WarehouseName" />
|
||||
<result property="locationuuid" column="LocationUUID" />
|
||||
<result property="locationid" column="LocationID" />
|
||||
<result property="locationname" column="LocationName" />
|
||||
<result property="gooduuid" column="GoodUUID" />
|
||||
<result property="goodid" column="GoodID" />
|
||||
<result property="goodname" column="GoodName" />
|
||||
<result property="unitname" column="UnitName" />
|
||||
<result property="standard" column="Standard" />
|
||||
<result property="inamount" column="InAmount" />
|
||||
<result property="outamount" column="OutAmount" />
|
||||
<result property="amount" column="Amount" />
|
||||
<result property="freezeamount" column="FreezeAmount" />
|
||||
<result property="isbatch" column="IsBatch" />
|
||||
<result property="batchbillnumber" column="BatchBillnumber" />
|
||||
<result property="specialnumber" column="SpecialNumber" />
|
||||
<result property="type" column="Type" />
|
||||
<result property="billtype" column="BillType" />
|
||||
<result property="remark" column="Remark" />
|
||||
<result property="createuserid" column="CreateUserID" />
|
||||
<result property="createusername" column="CreateUserName" />
|
||||
<result property="createtime" column="CreateTime" />
|
||||
<result property="billtypename" column="BillTypeName" />
|
||||
<result property="typename" column="TypeName" />
|
||||
<result property="productdate" column="ProductDate" />
|
||||
<result property="salebillnumber" column="SaleBillnumber" />
|
||||
<result property="productionarea" column="ProductionArea" />
|
||||
<result property="versionnumber" column="VersionNumber" />
|
||||
<result property="customeruuid" column="CustomerUUID" />
|
||||
<result property="customerid" column="CustomerID" />
|
||||
<result property="customername" column="CustomerName" />
|
||||
<result property="detailuuid" column="DetailUUID" />
|
||||
<result property="specialcode" column="SpecialCode" />
|
||||
<result property="billstatus" column="BillStatus" />
|
||||
<result property="storedate" column="StoreDate" />
|
||||
<result property="availableamount" column="AvailableAmount" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDataCurrentinventoryVo">
|
||||
select ID, AccountDate, Billnumber, CompanyUUID, CompanyID, CompanyName, FactoryUUID, FactoryID, FactoryName, WarehouseUUID, WarehouseID, WarehouseName, LocationUUID, LocationID, LocationName, GoodUUID, GoodID, GoodName, UnitName, Standard, InAmount, OutAmount, Amount, FreezeAmount, IsBatch, BatchBillnumber, SpecialNumber, Type, BillType, Remark, CreateUserID, CreateUserName, CreateTime, BillTypeName, TypeName, ProductDate, SaleBillnumber, ProductionArea, VersionNumber, CustomerUUID, CustomerID, CustomerName, DetailUUID, SpecialCode, BillStatus, StoreDate from data_currentinventory
|
||||
</sql>
|
||||
|
||||
<select id="selectDataCurrentinventoryList" parameterType="DataCurrentinventory" resultMap="DataCurrentinventoryResult">
|
||||
<include refid="selectDataCurrentinventoryVo"/>
|
||||
<where>
|
||||
<if test="params.beginAccountdate != null and params.beginAccountdate != '' and params.endAccountdate != null and params.endAccountdate != ''"> and AccountDate between #{params.beginAccountdate} and #{params.endAccountdate}</if>
|
||||
<if test="billnumber != null and billnumber != ''"> and Billnumber = #{billnumber}</if>
|
||||
<if test="companyname != null and companyname != ''"> and CompanyName like concat('%', #{companyname}, '%')</if>
|
||||
<if test="factoryname != null and factoryname != ''"> and FactoryName like concat('%', #{factoryname}, '%')</if>
|
||||
<if test="warehousename != null and warehousename != ''"> and WarehouseName like concat('%', #{warehousename}, '%')</if>
|
||||
<if test="locationname != null and locationname != ''"> and LocationName like concat('%', #{locationname}, '%')</if>
|
||||
<if test="goodname != null and goodname != ''"> and GoodName like concat('%', #{goodname}, '%')</if>
|
||||
<if test="batchbillnumber != null and batchbillnumber != ''"> and BatchBillnumber like concat('%', #{batchbillnumber}, '%')</if>
|
||||
<if test="specialnumber != null and specialnumber != ''"> and SpecialNumber like concat('%', #{specialnumber}, '%')</if>
|
||||
<if test="remark != null and remark != ''"> and Remark like concat('%', #{remark}, '%')</if>
|
||||
<if test="typename != null and typename != ''"> and TypeName = #{typename}</if>
|
||||
<if test="customername != null and customername != ''"> and CustomerName like concat('%', #{customername}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!-- 当前库存整合数据 -->
|
||||
<select id="selectDataCurrentinventorySum" parameterType="DataCurrentinventory" resultMap="DataCurrentinventoryResult">
|
||||
select MAX(ID) ID,MAX(WarehouseName) WarehouseName,MAX(GoodID) GoodID, MAX(GoodName) GoodName, MAX(UnitName) UnitName, MAX(Standard) Standard, SUM(Amount) Amount, SUM(FreezeAmount) FreezeAmount,SUM(Amount) - SUM(FreezeAmount) AS AvailableAmount from data_currentinventory
|
||||
<where>
|
||||
<if test="params.beginAccountdate != null and params.beginAccountdate != '' and params.endAccountdate != null and params.endAccountdate != ''"> and AccountDate between #{params.beginAccountdate} and #{params.endAccountdate}</if>
|
||||
<if test="billnumber != null and billnumber != ''"> and Billnumber = #{billnumber}</if>
|
||||
<if test="companyname != null and companyname != ''"> and CompanyName like concat('%', #{companyname}, '%')</if>
|
||||
<if test="factoryname != null and factoryname != ''"> and FactoryName like concat('%', #{factoryname}, '%')</if>
|
||||
<if test="warehousename != null and warehousename != ''"> and WarehouseName like concat('%', #{warehousename}, '%')</if>
|
||||
<if test="locationname != null and locationname != ''"> and LocationName like concat('%', #{locationname}, '%')</if>
|
||||
<if test="goodname != null and goodname != ''"> and GoodName like concat('%', #{goodname}, '%')</if>
|
||||
<if test="batchbillnumber != null and batchbillnumber != ''"> and BatchBillnumber like concat('%', #{batchbillnumber}, '%')</if>
|
||||
<if test="specialnumber != null and specialnumber != ''"> and SpecialNumber like concat('%', #{specialnumber}, '%')</if>
|
||||
<if test="remark != null and remark != ''"> and Remark like concat('%', #{remark}, '%')</if>
|
||||
<if test="typename != null and typename != ''"> and TypeName = #{typename}</if>
|
||||
<if test="customername != null and customername != ''"> and CustomerName like concat('%', #{customername}, '%')</if>
|
||||
</where>
|
||||
group by WarehouseUUID,GoodUUID
|
||||
</select>
|
||||
|
||||
<select id="selectDataCurrentinventoryById" parameterType="String" resultMap="DataCurrentinventoryResult">
|
||||
<include refid="selectDataCurrentinventoryVo"/>
|
||||
where ID = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertDataCurrentinventory" parameterType="DataCurrentinventory">
|
||||
insert into data_currentinventory
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">ID,</if>
|
||||
<if test="accountdate != null ">AccountDate,</if>
|
||||
<if test="billnumber != null and billnumber != ''">Billnumber,</if>
|
||||
<if test="companyuuid != null and companyuuid != ''">CompanyUUID,</if>
|
||||
<if test="companyid != null and companyid != ''">CompanyID,</if>
|
||||
<if test="companyname != null and companyname != ''">CompanyName,</if>
|
||||
<if test="factoryuuid != null and factoryuuid != ''">FactoryUUID,</if>
|
||||
<if test="factoryid != null and factoryid != ''">FactoryID,</if>
|
||||
<if test="factoryname != null and factoryname != ''">FactoryName,</if>
|
||||
<if test="warehouseuuid != null and warehouseuuid != ''">WarehouseUUID,</if>
|
||||
<if test="warehouseid != null and warehouseid != ''">WarehouseID,</if>
|
||||
<if test="warehousename != null and warehousename != ''">WarehouseName,</if>
|
||||
<if test="locationuuid != null and locationuuid != ''">LocationUUID,</if>
|
||||
<if test="locationid != null and locationid != ''">LocationID,</if>
|
||||
<if test="locationname != null and locationname != ''">LocationName,</if>
|
||||
<if test="gooduuid != null and gooduuid != ''">GoodUUID,</if>
|
||||
<if test="goodid != null and goodid != ''">GoodID,</if>
|
||||
<if test="goodname != null and goodname != ''">GoodName,</if>
|
||||
<if test="unitname != null and unitname != ''">UnitName,</if>
|
||||
<if test="standard != null and standard != ''">Standard,</if>
|
||||
<if test="inamount != null ">InAmount,</if>
|
||||
<if test="outamount != null ">OutAmount,</if>
|
||||
<if test="amount != null ">Amount,</if>
|
||||
<if test="freezeamount != null ">FreezeAmount,</if>
|
||||
<if test="isbatch != null ">IsBatch,</if>
|
||||
<if test="batchbillnumber != null and batchbillnumber != ''">BatchBillnumber,</if>
|
||||
<if test="specialnumber != null and specialnumber != ''">SpecialNumber,</if>
|
||||
<if test="type != null and type != ''">Type,</if>
|
||||
<if test="billtype != null and billtype != ''">BillType,</if>
|
||||
<if test="remark != null and remark != ''">Remark,</if>
|
||||
<if test="createuserid != null and createuserid != ''">CreateUserID,</if>
|
||||
<if test="createusername != null and createusername != ''">CreateUserName,</if>
|
||||
<if test="createtime != null ">CreateTime,</if>
|
||||
<if test="billtypename != null and billtypename != ''">BillTypeName,</if>
|
||||
<if test="typename != null and typename != ''">TypeName,</if>
|
||||
<if test="productdate != null ">ProductDate,</if>
|
||||
<if test="salebillnumber != null and salebillnumber != ''">SaleBillnumber,</if>
|
||||
<if test="productionarea != null and productionarea != ''">ProductionArea,</if>
|
||||
<if test="versionnumber != null and versionnumber != ''">VersionNumber,</if>
|
||||
<if test="customeruuid != null and customeruuid != ''">CustomerUUID,</if>
|
||||
<if test="customerid != null and customerid != ''">CustomerID,</if>
|
||||
<if test="customername != null and customername != ''">CustomerName,</if>
|
||||
<if test="detailuuid != null and detailuuid != ''">DetailUUID,</if>
|
||||
<if test="specialcode != null and specialcode != ''">SpecialCode,</if>
|
||||
<if test="billstatus != null and billstatus != ''">BillStatus,</if>
|
||||
<if test="storedate != null ">StoreDate,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">#{id},</if>
|
||||
<if test="accountdate != null ">#{accountdate},</if>
|
||||
<if test="billnumber != null and billnumber != ''">#{billnumber},</if>
|
||||
<if test="companyuuid != null and companyuuid != ''">#{companyuuid},</if>
|
||||
<if test="companyid != null and companyid != ''">#{companyid},</if>
|
||||
<if test="companyname != null and companyname != ''">#{companyname},</if>
|
||||
<if test="factoryuuid != null and factoryuuid != ''">#{factoryuuid},</if>
|
||||
<if test="factoryid != null and factoryid != ''">#{factoryid},</if>
|
||||
<if test="factoryname != null and factoryname != ''">#{factoryname},</if>
|
||||
<if test="warehouseuuid != null and warehouseuuid != ''">#{warehouseuuid},</if>
|
||||
<if test="warehouseid != null and warehouseid != ''">#{warehouseid},</if>
|
||||
<if test="warehousename != null and warehousename != ''">#{warehousename},</if>
|
||||
<if test="locationuuid != null and locationuuid != ''">#{locationuuid},</if>
|
||||
<if test="locationid != null and locationid != ''">#{locationid},</if>
|
||||
<if test="locationname != null and locationname != ''">#{locationname},</if>
|
||||
<if test="gooduuid != null and gooduuid != ''">#{gooduuid},</if>
|
||||
<if test="goodid != null and goodid != ''">#{goodid},</if>
|
||||
<if test="goodname != null and goodname != ''">#{goodname},</if>
|
||||
<if test="unitname != null and unitname != ''">#{unitname},</if>
|
||||
<if test="standard != null and standard != ''">#{standard},</if>
|
||||
<if test="inamount != null ">#{inamount},</if>
|
||||
<if test="outamount != null ">#{outamount},</if>
|
||||
<if test="amount != null ">#{amount},</if>
|
||||
<if test="freezeamount != null ">#{freezeamount},</if>
|
||||
<if test="isbatch != null ">#{isbatch},</if>
|
||||
<if test="batchbillnumber != null and batchbillnumber != ''">#{batchbillnumber},</if>
|
||||
<if test="specialnumber != null and specialnumber != ''">#{specialnumber},</if>
|
||||
<if test="type != null and type != ''">#{type},</if>
|
||||
<if test="billtype != null and billtype != ''">#{billtype},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createuserid != null and createuserid != ''">#{createuserid},</if>
|
||||
<if test="createusername != null and createusername != ''">#{createusername},</if>
|
||||
<if test="createtime != null ">#{createtime},</if>
|
||||
<if test="billtypename != null and billtypename != ''">#{billtypename},</if>
|
||||
<if test="typename != null and typename != ''">#{typename},</if>
|
||||
<if test="productdate != null ">#{productdate},</if>
|
||||
<if test="salebillnumber != null and salebillnumber != ''">#{salebillnumber},</if>
|
||||
<if test="productionarea != null and productionarea != ''">#{productionarea},</if>
|
||||
<if test="versionnumber != null and versionnumber != ''">#{versionnumber},</if>
|
||||
<if test="customeruuid != null and customeruuid != ''">#{customeruuid},</if>
|
||||
<if test="customerid != null and customerid != ''">#{customerid},</if>
|
||||
<if test="customername != null and customername != ''">#{customername},</if>
|
||||
<if test="detailuuid != null and detailuuid != ''">#{detailuuid},</if>
|
||||
<if test="specialcode != null and specialcode != ''">#{specialcode},</if>
|
||||
<if test="billstatus != null and billstatus != ''">#{billstatus},</if>
|
||||
<if test="storedate != null ">#{storedate},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDataCurrentinventory" parameterType="DataCurrentinventory">
|
||||
update data_currentinventory
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="accountdate != null ">AccountDate = #{accountdate},</if>
|
||||
<if test="billnumber != null and billnumber != ''">Billnumber = #{billnumber},</if>
|
||||
<if test="companyuuid != null and companyuuid != ''">CompanyUUID = #{companyuuid},</if>
|
||||
<if test="companyid != null and companyid != ''">CompanyID = #{companyid},</if>
|
||||
<if test="companyname != null and companyname != ''">CompanyName = #{companyname},</if>
|
||||
<if test="factoryuuid != null and factoryuuid != ''">FactoryUUID = #{factoryuuid},</if>
|
||||
<if test="factoryid != null and factoryid != ''">FactoryID = #{factoryid},</if>
|
||||
<if test="factoryname != null and factoryname != ''">FactoryName = #{factoryname},</if>
|
||||
<if test="warehouseuuid != null and warehouseuuid != ''">WarehouseUUID = #{warehouseuuid},</if>
|
||||
<if test="warehouseid != null and warehouseid != ''">WarehouseID = #{warehouseid},</if>
|
||||
<if test="warehousename != null and warehousename != ''">WarehouseName = #{warehousename},</if>
|
||||
<if test="locationuuid != null and locationuuid != ''">LocationUUID = #{locationuuid},</if>
|
||||
<if test="locationid != null and locationid != ''">LocationID = #{locationid},</if>
|
||||
<if test="locationname != null and locationname != ''">LocationName = #{locationname},</if>
|
||||
<if test="gooduuid != null and gooduuid != ''">GoodUUID = #{gooduuid},</if>
|
||||
<if test="goodid != null and goodid != ''">GoodID = #{goodid},</if>
|
||||
<if test="goodname != null and goodname != ''">GoodName = #{goodname},</if>
|
||||
<if test="unitname != null and unitname != ''">UnitName = #{unitname},</if>
|
||||
<if test="standard != null and standard != ''">Standard = #{standard},</if>
|
||||
<if test="inamount != null ">InAmount = #{inamount},</if>
|
||||
<if test="outamount != null ">OutAmount = #{outamount},</if>
|
||||
<if test="amount != null ">Amount = #{amount},</if>
|
||||
<if test="freezeamount != null ">FreezeAmount = #{freezeamount},</if>
|
||||
<if test="isbatch != null ">IsBatch = #{isbatch},</if>
|
||||
<if test="batchbillnumber != null and batchbillnumber != ''">BatchBillnumber = #{batchbillnumber},</if>
|
||||
<if test="specialnumber != null and specialnumber != ''">SpecialNumber = #{specialnumber},</if>
|
||||
<if test="type != null and type != ''">Type = #{type},</if>
|
||||
<if test="billtype != null and billtype != ''">BillType = #{billtype},</if>
|
||||
<if test="remark != null and remark != ''">Remark = #{remark},</if>
|
||||
<if test="createuserid != null and createuserid != ''">CreateUserID = #{createuserid},</if>
|
||||
<if test="createusername != null and createusername != ''">CreateUserName = #{createusername},</if>
|
||||
<if test="createtime != null ">CreateTime = #{createtime},</if>
|
||||
<if test="billtypename != null and billtypename != ''">BillTypeName = #{billtypename},</if>
|
||||
<if test="typename != null and typename != ''">TypeName = #{typename},</if>
|
||||
<if test="productdate != null ">ProductDate = #{productdate},</if>
|
||||
<if test="salebillnumber != null and salebillnumber != ''">SaleBillnumber = #{salebillnumber},</if>
|
||||
<if test="productionarea != null and productionarea != ''">ProductionArea = #{productionarea},</if>
|
||||
<if test="versionnumber != null and versionnumber != ''">VersionNumber = #{versionnumber},</if>
|
||||
<if test="customeruuid != null and customeruuid != ''">CustomerUUID = #{customeruuid},</if>
|
||||
<if test="customerid != null and customerid != ''">CustomerID = #{customerid},</if>
|
||||
<if test="customername != null and customername != ''">CustomerName = #{customername},</if>
|
||||
<if test="detailuuid != null and detailuuid != ''">DetailUUID = #{detailuuid},</if>
|
||||
<if test="specialcode != null and specialcode != ''">SpecialCode = #{specialcode},</if>
|
||||
<if test="billstatus != null and billstatus != ''">BillStatus = #{billstatus},</if>
|
||||
<if test="storedate != null ">StoreDate = #{storedate},</if>
|
||||
</trim>
|
||||
where ID = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDataCurrentinventoryById" parameterType="String">
|
||||
delete from data_currentinventory where ID = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDataCurrentinventoryByIds" parameterType="String">
|
||||
delete from data_currentinventory where ID in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
Loading…
x
Reference in New Issue
Block a user