入库整理多查询
parent
7552e44751
commit
1b90edfc1a
|
|
@ -45,7 +45,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "Home",
|
name: "Rukuzhengli",
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
user: JSON.parse(sessionStorage.getItem('user')),
|
user: JSON.parse(sessionStorage.getItem('user')),
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,568 @@
|
||||||
<script setup>
|
|
||||||
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
$END$
|
<div class="div1">
|
||||||
|
|
||||||
|
<div class="div2" style="padding-bottom: 10px">
|
||||||
|
|
||||||
|
<el-form ref="form" :model="param" label-width="80px">
|
||||||
|
|
||||||
|
<el-row :gutter="24">
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="采购单号:">
|
||||||
|
|
||||||
|
<el-input type="textarea" v-model="param.sourceId" :rows="1"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="收货凭证:" >
|
||||||
|
<el-input type="textarea" v-model="param.strBill7" :rows="1"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="料号:">
|
||||||
|
<el-input type="textarea" v-model="param.code" :rows="1"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="工厂:">
|
||||||
|
<el-select v-model="param.PROP_C9" multiple filterable placeholder="请选择工厂" style="width: 100%;">
|
||||||
|
<el-option
|
||||||
|
v-for="item in Plant"
|
||||||
|
:key="item.ID"
|
||||||
|
:label="item.PROP_C9"
|
||||||
|
:value="item.PROP_C9"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="LOC:">
|
||||||
|
<el-select v-model="param.PROP_C2" multiple filterable placeholder="请选择LOC" style="width: 100%;">
|
||||||
|
<el-option
|
||||||
|
v-for="item in LOCS"
|
||||||
|
:key="item.ID"
|
||||||
|
:label="item.PROP_C2"
|
||||||
|
:value="item.PROP_C2"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="批次号:">
|
||||||
|
<el-input type="textarea" v-model="param.PROP_C1" :rows="1"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row :gutter="24">
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="收货日期:">
|
||||||
|
<el-date-picker style="width: 325px"
|
||||||
|
v-model="param.ORDER_DATE"
|
||||||
|
type="daterange"
|
||||||
|
align="right"
|
||||||
|
unlink-panels
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
:picker-options="pickerOptions">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="整理日期:">
|
||||||
|
<el-date-picker style="width: 325px"
|
||||||
|
v-model="param.RECEIVE_DATE"
|
||||||
|
type="daterange"
|
||||||
|
align="right"
|
||||||
|
unlink-panels
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
:picker-options="pickerOptions">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="特殊标记:">
|
||||||
|
<el-input type="text" v-model="param.PROP_C3"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="SAP接口:">
|
||||||
|
<el-input type="text" v-model="param.CODE"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-row :gutter="24">
|
||||||
|
<el-col :span="4">
|
||||||
|
<el-form-item label="加急标记">
|
||||||
|
<el-input type="text" v-model="param.strBill11"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-checkbox v-model="checked" @change="Allquesr">是否显示全部</el-checkbox>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-button type="success" @click="find">查找</el-button>
|
||||||
|
<el-button type="success" @click="rest">重置</el-button>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
:header-cell-style="{background:'#000',color:'#fff'}"
|
||||||
|
:data="tableData"
|
||||||
|
id="educe-table"
|
||||||
|
ref="tableData"
|
||||||
|
style="width: 100%;">
|
||||||
|
<el-table-column
|
||||||
|
type="selection"
|
||||||
|
width="55">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
fixed
|
||||||
|
label="序号"
|
||||||
|
v-if="false"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span style="margin-left: 10px">{{ scope.row.id }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="ID"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div slot="reference" class="name-wrapper">
|
||||||
|
<span>{{ scope.row.id}}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="采购单号"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div slot="reference" class="name-wrapper">
|
||||||
|
<span>{{ scope.row.sourceId }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="凭证号"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div slot="reference" class="name-wrapper">
|
||||||
|
<span>{{ scope.row.strBill7 }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="行号"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div slot="reference" class="name-wrapper">
|
||||||
|
<span>{{ scope.row.strBill8 }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="料号"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div slot="reference" class="name-wrapper">
|
||||||
|
<span>{{ scope.row.code }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="描述"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div slot="reference" class="name-wrapper">
|
||||||
|
<span>{{ scope.row.name }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="单位"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div slot="reference" class="name-wrapper">
|
||||||
|
<span>{{ scope.row.unit }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="加急标记"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div slot="reference" class="name-wrapper">
|
||||||
|
<span>{{ scope.row.strBill11 }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="批次"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div slot="reference" class="name-wrapper">
|
||||||
|
<span>{{ scope.row.PROP_C1 }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="LOC"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div slot="reference" class="name-wrapper">
|
||||||
|
<span>{{ scope.row.PROP_C2 }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="特殊标记"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div slot="reference" class="name-wrapper">
|
||||||
|
<span>{{ scope.row.PROP_C3 }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="供应商编号"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div slot="reference" class="name-wrapper">
|
||||||
|
<span>{{ scope.row.PROP_C5 }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="区域"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div slot="reference" class="name-wrapper">
|
||||||
|
<span>{{ scope.row.PROP_C8 }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="工厂"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div slot="reference" class="name-wrapper">
|
||||||
|
<span>{{ scope.row.PROP_C9 }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="收货数量"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div slot="reference" class="name-wrapper">
|
||||||
|
<span>{{ scope.row.EXPECTED_QUANTITY }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="整理数量"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div slot="reference" class="name-wrapper">
|
||||||
|
<span>{{ scope.row.RECEIVED_QUANTITY }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="收货日期"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div slot="reference" class="name-wrapper">
|
||||||
|
<span>{{ new Date(scope.row.ORDER_DATE).toISOString().replace('T', ' ').substring(0, 10) }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="收货时间"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div slot="reference" class="name-wrapper">
|
||||||
|
<span>{{ new Date(scope.row.ORDER_DATE).toISOString().replace('T', ' ').substring(10,19)}}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="序列号"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div slot="reference" class="name-wrapper">
|
||||||
|
<span>{{ scope.row.strBill2 }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="整理日期"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div slot="reference" class="name-wrapper">
|
||||||
|
<span>{{ new Date(scope.row.RECEIVE_DATE).toISOString().replace('T','').substring(0,10) }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="整理时间"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div slot="reference" class="name-wrapper">
|
||||||
|
<span>{{ new Date(scope.row.RECEIVE_DATE).toISOString().replace('T','').substring(10,19)}}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="整理人"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div slot="reference" class="name-wrapper">
|
||||||
|
<span>{{ scope.row.USER_NAME }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
label="预入库日期"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div slot="reference" class="name-wrapper">
|
||||||
|
<span>{{ new Date(scope.row.DELIVERY_DATE).toISOString().replace('T','').substring(0,10) }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="预入库时间"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div slot="reference" class="name-wrapper">
|
||||||
|
<span>{{ new Date(scope.row.DELIVERY_DATE).toISOString().replace('T','').substring(10,19) }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="预入库操作人"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div slot="reference" class="name-wrapper">
|
||||||
|
<span>{{ scope.row.RELATED_BILL5 }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="备注"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div slot="reference" class="name-wrapper">
|
||||||
|
<span>{{ scope.row.description }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="是否质检"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div slot="reference" class="name-wrapper">
|
||||||
|
<span>{{ scope.row.BE_QUALITY }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="SAP接口号"
|
||||||
|
width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div slot="reference" class="name-wrapper">
|
||||||
|
<span>{{ scope.row.CODE }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-pagination
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
@current-change="handleCurrentChange"
|
||||||
|
:current-page="pageNum"
|
||||||
|
:page-sizes="[10, 50, 150, 200]"
|
||||||
|
:page-size="pageSize"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
:total="total">
|
||||||
|
</el-pagination>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "Rukuzhengli",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
pickerOptions: {
|
||||||
|
shortcuts: [{
|
||||||
|
text: '最近一周',
|
||||||
|
onClick(picker) {
|
||||||
|
const end = new Date();
|
||||||
|
const start = new Date();
|
||||||
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
||||||
|
picker.$emit('pick', [start, end]);
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
text: '最近一个月',
|
||||||
|
onClick(picker) {
|
||||||
|
const end = new Date();
|
||||||
|
const start = new Date();
|
||||||
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
||||||
|
picker.$emit('pick', [start, end]);
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
text: '最近三个月',
|
||||||
|
onClick(picker) {
|
||||||
|
const end = new Date();
|
||||||
|
const start = new Date();
|
||||||
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
|
||||||
|
picker.$emit('pick', [start, end]);
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
value1: '',
|
||||||
|
value2: '',
|
||||||
|
tableData: [],
|
||||||
|
pageSize: 10,
|
||||||
|
pageNum: 1,
|
||||||
|
total: 3,
|
||||||
|
param: {
|
||||||
|
sourceId: '',
|
||||||
|
strBill7: '',
|
||||||
|
code: '',
|
||||||
|
PROP_C1: '',
|
||||||
|
PROP_C3: '',
|
||||||
|
CODE: '',
|
||||||
|
PROP_C9: [],
|
||||||
|
PROP_C2: [],
|
||||||
|
//整理日期
|
||||||
|
RECEIVE_DATE: [],
|
||||||
|
//收货日期
|
||||||
|
ORDER_DATE: [],
|
||||||
|
},
|
||||||
|
Plant: [],
|
||||||
|
LOCS: [],
|
||||||
|
checked: false,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
,mounted() {
|
||||||
|
this.queryUser();
|
||||||
|
this.PlantS();
|
||||||
|
this.LOC();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleEdit(index, row) {
|
||||||
|
console.log(index, row);
|
||||||
|
},
|
||||||
|
handleDelete(index, row) {
|
||||||
|
console.log(index, row);
|
||||||
|
},
|
||||||
|
handleSizeChange(val) {
|
||||||
|
console.log(`每页 ${val} 条`);
|
||||||
|
this.pageNum = 1;
|
||||||
|
this.pageSize = val;
|
||||||
|
this.queryUser();
|
||||||
|
},
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
console.log(`当前页: ${val}`);
|
||||||
|
this.pageNum = val;
|
||||||
|
this.queryUser();
|
||||||
|
},
|
||||||
|
LOC(){
|
||||||
|
//LOC下拉列表数据加载
|
||||||
|
this.$axios.post(this.$httpUrl + '/Rukuzhengli/LOC', {
|
||||||
|
|
||||||
|
}).then(res => res.data)
|
||||||
|
.then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.LOCS = res.data;
|
||||||
|
} else {
|
||||||
|
this.$message.error('获取数据失败');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(function (err) {
|
||||||
|
console.log(err);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
PlantS(){
|
||||||
|
//工厂下拉列表数据加载
|
||||||
|
this.$axios.post(this.$httpUrl + '/Rukuzhengli/Plant', {
|
||||||
|
|
||||||
|
}).then(res => res.data)
|
||||||
|
.then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.Plant = res.data;
|
||||||
|
} else {
|
||||||
|
this.$message.error('获取数据失败');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(function (err) {
|
||||||
|
console.log(err);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
queryUser() {
|
||||||
|
//列表数据加载
|
||||||
|
this.$axios.post(this.$httpUrl + '/Rukuzhengli/queryUser', {
|
||||||
|
pageSize: this.pageSize,
|
||||||
|
pageNum: this.pageNum,
|
||||||
|
param: this.param,
|
||||||
|
}).then(res => res.data)
|
||||||
|
.then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.tableData = res.data
|
||||||
|
this.total = res.total
|
||||||
|
console.log(this.tableData)
|
||||||
|
} else {
|
||||||
|
this.$message.error('获取数据失败');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
|
.catch(function (err) {
|
||||||
|
console.log(err);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
find(){
|
||||||
|
if(this.checked){
|
||||||
|
this.checked=false;
|
||||||
|
}
|
||||||
|
this.queryUser();
|
||||||
|
},
|
||||||
|
Allquesr(){
|
||||||
|
//查询按钮
|
||||||
|
if(this.checked){
|
||||||
|
this.rest();
|
||||||
|
this.queryUser();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
rest() {
|
||||||
|
//表单重置
|
||||||
|
this.param={};
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -17,24 +17,25 @@ const routes=[
|
||||||
meta:{
|
meta:{
|
||||||
title:'首页'
|
title:'首页'
|
||||||
},
|
},
|
||||||
component: () => import('../components/duochaxun/demo1.vue')
|
component: () => import('../components/duochaxun/Rukuzhengli.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path:'/demo1',
|
path:'/Zhengliqingdan',
|
||||||
name:'demo1',
|
name:'Zhengliqingdan',
|
||||||
meta:{
|
meta:{
|
||||||
title:'测试1'
|
title:'整理完成未上架清单'
|
||||||
},
|
},
|
||||||
component: () => import('@/components/duochaxun/demo1.vue')
|
component: () => import('@/components/duochaxun/Zhengliqingdan.vue')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path:'/demo2',
|
path:'/Rukuzhengli',
|
||||||
name:'demo2',
|
name:'Rukuzhengli',
|
||||||
meta:{
|
meta:{
|
||||||
title:'测试2'
|
title:'整理完成未上架清单'
|
||||||
},
|
},
|
||||||
component: () => import('@/components/duochaxun/demo2.vue')
|
component: () => import('@/components/duochaxun/Rukuzhengli.vue')
|
||||||
}
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ package com.yc.wms.bean;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
public class DcxBean1 {
|
public class Rukuzhengli {
|
||||||
//工厂
|
//工厂
|
||||||
public String [] PROP_C9;
|
public String [] PROP_C9;
|
||||||
|
|
||||||
|
|
@ -34,9 +34,4 @@ public class DcxBean1 {
|
||||||
|
|
||||||
//加急标记
|
//加急标记
|
||||||
public String strBill11;
|
public String strBill11;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,5 @@
|
||||||
package com.yc.wms.bean;public class Zhengliqingdan {
|
package com.yc.wms.bean;
|
||||||
|
|
||||||
|
public class Zhengliqingdan {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,55 @@
|
||||||
package com.yc.wms.controller;public class RukuzhengliController {
|
package com.yc.wms.controller;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
|
import com.yc.wms.bean.Rukuzhengli;
|
||||||
|
import com.yc.wms.until.QueryPageUtil;
|
||||||
|
import com.yc.wms.until.Result;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@Slf4j
|
||||||
|
@RequestMapping("/Rukuzhengli")
|
||||||
|
public class RukuzhengliController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private com.yc.wms.service.Rukuzhengli dcxService;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return
|
||||||
|
* @param查询用户
|
||||||
|
*/
|
||||||
|
@PostMapping("/queryUser")
|
||||||
|
public Result queryUser(@RequestBody String json) {
|
||||||
|
|
||||||
|
QueryPageUtil query =new QueryPageUtil();
|
||||||
|
JSONObject jsonObject=JSONUtil.parseObj(json);
|
||||||
|
query.setPageSize((int)jsonObject.get("pageSize"));
|
||||||
|
query.setPageNum((int)jsonObject.get("pageNum"));
|
||||||
|
|
||||||
|
JSONObject param= (JSONObject)jsonObject.get("param");
|
||||||
|
|
||||||
|
Rukuzhengli rukuzhengli = JSONUtil.toBean(param.toString(), Rukuzhengli.class);
|
||||||
|
|
||||||
|
return dcxService.readJson(query, rukuzhengli);
|
||||||
|
}
|
||||||
|
|
||||||
|
//下拉列表工厂
|
||||||
|
@PostMapping("/Plant")
|
||||||
|
public Result Plant(){
|
||||||
|
return dcxService.Plant();
|
||||||
|
}
|
||||||
|
|
||||||
|
//下拉列表LOC
|
||||||
|
@PostMapping("/LOC")
|
||||||
|
public Result LOC(){
|
||||||
|
return dcxService.LOC();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
package com.yc.wms.controller;
|
package com.yc.wms.controller;
|
||||||
|
|
||||||
import cn.hutool.json.JSONUtil;
|
import com.yc.wms.service.Zhengliqingdan;
|
||||||
import com.yc.wms.bean.DcxBean1;
|
|
||||||
import com.yc.wms.service.DcxService;
|
|
||||||
import com.yc.wms.until.QueryPageUtil;
|
|
||||||
import com.yc.wms.until.Result;
|
import com.yc.wms.until.Result;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
@ -13,9 +10,6 @@ import org.springframework.web.bind.annotation.*;
|
||||||
import cn.hutool.json.JSONArray;
|
import cn.hutool.json.JSONArray;
|
||||||
import cn.hutool.json.JSONObject;
|
import cn.hutool.json.JSONObject;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 前端控制器
|
* 前端控制器
|
||||||
|
|
@ -29,11 +23,8 @@ import java.util.List;
|
||||||
@RequestMapping("/user")
|
@RequestMapping("/user")
|
||||||
public class UserController {
|
public class UserController {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private DcxService dcxService;
|
private Zhengliqingdan zhengliqingdan;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return
|
* @return
|
||||||
|
|
@ -57,23 +48,19 @@ public class UserController {
|
||||||
// return result;
|
// return result;
|
||||||
JSONArray array=new JSONArray();
|
JSONArray array=new JSONArray();
|
||||||
JSONObject data=new JSONObject();
|
JSONObject data=new JSONObject();
|
||||||
int menuCount=3;
|
int menuCount=2;
|
||||||
for (int i=1;i<=menuCount;i++){
|
for (int i=1;i<=menuCount;i++){
|
||||||
JSONObject menu=new JSONObject();
|
JSONObject menu=new JSONObject();
|
||||||
menu.put("id",i);
|
menu.put("id",i);
|
||||||
menu.put("menuCode",i);
|
menu.put("menuCode",i);
|
||||||
if(i==1) {
|
if(i==1) {
|
||||||
menu.put("menuName", "库存汇总查询");
|
menu.put("menuName", "整理完成未上架清单");
|
||||||
menu.put("menuComponent","/demo1");
|
menu.put("menuComponent","/Zhengliqingdan");
|
||||||
menu.put("menuClick","demo1");
|
menu.put("menuClick","Zhengliqingdan");
|
||||||
}else if(i==2) {
|
}else if(i==2) {
|
||||||
menu.put("menuName", "入库明细查询");
|
menu.put("menuName", "入库整理");
|
||||||
menu.put("menuComponent","/demo2");
|
menu.put("menuComponent","/Rukuzhengli");
|
||||||
menu.put("menuClick","demo2");
|
menu.put("menuClick","Rukuzhengli");
|
||||||
}else if(i==3) {
|
|
||||||
menu.put("menuName", "出库明细查询");
|
|
||||||
menu.put("menuComponent","/demo2");
|
|
||||||
menu.put("menuClick","demo2");
|
|
||||||
}
|
}
|
||||||
menu.put("menuLevel",i);
|
menu.put("menuLevel",i);
|
||||||
menu.put("menuParentCode",i);
|
menu.put("menuParentCode",i);
|
||||||
|
|
@ -98,38 +85,4 @@ public class UserController {
|
||||||
return Result.success(menuCount,data);
|
return Result.success(menuCount,data);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return
|
|
||||||
* @param查询用户
|
|
||||||
*/
|
|
||||||
@PostMapping("/queryUser")
|
|
||||||
public Result queryUser(@RequestBody String json) {
|
|
||||||
|
|
||||||
QueryPageUtil query =new QueryPageUtil();
|
|
||||||
|
|
||||||
System.out.println(json);
|
|
||||||
|
|
||||||
JSONObject jsonObject=JSONUtil.parseObj(json);
|
|
||||||
query.setPageSize((int)jsonObject.get("pageSize"));
|
|
||||||
query.setPageNum((int)jsonObject.get("pageNum"));
|
|
||||||
|
|
||||||
JSONObject param= (JSONObject)jsonObject.get("param");
|
|
||||||
DcxBean1 dcxBean1 = JSONUtil.toBean(param.toString(), DcxBean1.class);
|
|
||||||
|
|
||||||
|
|
||||||
for (String s:dcxBean1.PROP_C9) {
|
|
||||||
System.out.println("c9:"+s);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return dcxService.readJson(query,dcxBean1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,22 @@
|
||||||
package com.yc.wms.controller;public class ZhengliqingdanController {
|
package com.yc.wms.controller;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
|
import cn.hutool.json.JSONUtil;
|
||||||
|
import com.yc.wms.bean.Rukuzhengli;
|
||||||
|
import com.yc.wms.until.QueryPageUtil;
|
||||||
|
import com.yc.wms.until.Result;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@Slf4j
|
||||||
|
@RequestMapping("/ZhengliqingdanController")
|
||||||
|
public class ZhengliqingdanController {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
package com.yc.wms.service;
|
package com.yc.wms.service;
|
||||||
|
|
||||||
|
import com.yc.wms.until.QueryPageUtil;
|
||||||
import com.yc.wms.until.Result;
|
import com.yc.wms.until.Result;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -11,6 +12,10 @@ import com.yc.wms.until.Result;
|
||||||
* @since 2023-04-01
|
* @since 2023-04-01
|
||||||
*/
|
*/
|
||||||
public interface Rukuzhengli {
|
public interface Rukuzhengli {
|
||||||
|
|
||||||
|
//查询全部分页待条件
|
||||||
|
Result readJson(QueryPageUtil query, com.yc.wms.bean.Rukuzhengli rukuzhengli);
|
||||||
|
|
||||||
//查询下拉列表工厂
|
//查询下拉列表工厂
|
||||||
Result Plant();
|
Result Plant();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
package com.yc.wms.service;
|
package com.yc.wms.service;
|
||||||
|
|
||||||
|
|
||||||
import com.yc.wms.bean.Rukuzhengli;
|
|
||||||
import com.yc.wms.until.QueryPageUtil;
|
import com.yc.wms.until.QueryPageUtil;
|
||||||
import com.yc.wms.until.Result;
|
import com.yc.wms.until.Result;
|
||||||
|
|
||||||
|
|
@ -13,7 +12,7 @@ import com.yc.wms.until.Result;
|
||||||
* @author wms
|
* @author wms
|
||||||
* @since 2023-03-04
|
* @since 2023-03-04
|
||||||
*/
|
*/
|
||||||
public interface DcxService {
|
public interface Zhengliqingdan {
|
||||||
|
|
||||||
|
|
||||||
|
Result QueryJson(QueryPageUtil query, com.yc.wms.bean.Zhengliqingdan zlqd);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,148 @@
|
||||||
package com.yc.wms.service.impl;public class RukuzhengliImpl {
|
package com.yc.wms.service.impl;
|
||||||
|
|
||||||
|
import com.yc.wms.bean.Rukuzhengli;
|
||||||
|
import com.yc.wms.until.QueryPageUtil;
|
||||||
|
import com.yc.wms.until.Result;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@Slf4j
|
||||||
|
public class RukuzhengliImpl implements com.yc.wms.service.Rukuzhengli {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private NamedParameterJdbcTemplate jdbcTemplate;
|
||||||
|
|
||||||
|
public Result readJson(QueryPageUtil query, Rukuzhengli rukuzhengli) {
|
||||||
|
|
||||||
|
|
||||||
|
int pageNum = query.getPageNum();//当前页
|
||||||
|
int pageSize = query.getPageSize();//条数
|
||||||
|
|
||||||
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
|
||||||
|
|
||||||
|
String sql_bz = "SELECT ROW_NUMBER() OVER(ORDER BY ad.id) AS Row_Num,ad.id,ad.sourceId,ad.strBill7,\n" +
|
||||||
|
" ad.strBill8,i.code,i.name,i.unit,\n" +
|
||||||
|
" ad.strBill11,ad.PROP_C1,ad.PROP_C2,\n" +
|
||||||
|
"ad.PROP_C3,ad.PROP_C5,ad.PROP_C8,ad.PROP_C9,\n" +
|
||||||
|
"ad.EXPECTED_QUANTITY,ad.RECEIVED_QUANTITY,\n" +
|
||||||
|
"a.ORDER_DATE,ad.strBill2,ad.RECEIVE_DATE,\n" +
|
||||||
|
"a.USER_NAME,ad.DELIVERY_DATE,ad.RELATED_BILL5,\n" +
|
||||||
|
"ad.description,ad.BE_QUALITY,a.CODE a_CODE,\n" +
|
||||||
|
"ad.BE_INPUT\n" +
|
||||||
|
" from ASN_DETAIL ad \n" +
|
||||||
|
" left join asn a on a.id=ad.ASN_ID\n" +
|
||||||
|
" left join ITEM i on i.id=ad.ITEM_ID\n" +
|
||||||
|
" where 1=1";
|
||||||
|
|
||||||
|
|
||||||
|
//查询条件
|
||||||
|
//采购订单
|
||||||
|
if(rukuzhengli.sourceId!=null&&!rukuzhengli.sourceId.equals("")){
|
||||||
|
sql_bz+=" and ad.sourceId ="+"'"+ rukuzhengli.sourceId+"'";
|
||||||
|
}
|
||||||
|
//收货凭证
|
||||||
|
if(rukuzhengli.strBill7!=null&&!rukuzhengli.strBill7.equals("")){
|
||||||
|
sql_bz+=" and ad.strBill7 ="+"'"+ rukuzhengli.strBill7+"'";
|
||||||
|
}
|
||||||
|
//料号
|
||||||
|
if(rukuzhengli.code!=null&&!rukuzhengli.code.equals("")){
|
||||||
|
sql_bz+=" and i.code ="+"'"+ rukuzhengli.code+"'";
|
||||||
|
}
|
||||||
|
//收货日期
|
||||||
|
if(rukuzhengli.ORDER_DATE!=null&& rukuzhengli.ORDER_DATE.length>0){
|
||||||
|
String startDate = simpleDateFormat.format(rukuzhengli.ORDER_DATE[0]);
|
||||||
|
String endDate = simpleDateFormat.format(rukuzhengli.ORDER_DATE[1]);
|
||||||
|
sql_bz+=" and a.ORDER_DATE between "+"'"+startDate+"'"+" and "+ "'"+endDate+"'";
|
||||||
|
}
|
||||||
|
|
||||||
|
//整理日期
|
||||||
|
if(rukuzhengli.RECEIVE_DATE!=null&& rukuzhengli.RECEIVE_DATE.length>0){
|
||||||
|
String startDate = simpleDateFormat.format(rukuzhengli.RECEIVE_DATE[0]);
|
||||||
|
String endDate = simpleDateFormat.format(rukuzhengli.RECEIVE_DATE[1]);
|
||||||
|
sql_bz+=" and ad.RECEIVE_DATE between "+"'"+startDate+"'"+" and "+ "'"+endDate+"'";
|
||||||
|
|
||||||
|
}
|
||||||
|
//特殊标记
|
||||||
|
if(rukuzhengli.PROP_C3!=null&&!rukuzhengli.PROP_C3.equals("")){
|
||||||
|
sql_bz+=" and ad.PROP_C3 ="+"'"+ rukuzhengli.PROP_C3+"'";
|
||||||
|
}
|
||||||
|
|
||||||
|
//工厂
|
||||||
|
if(rukuzhengli.PROP_C9!=null&& rukuzhengli.PROP_C9.length>0){
|
||||||
|
StringBuffer sb = new StringBuffer();
|
||||||
|
for (int i = 0; i< rukuzhengli.PROP_C9.length; i++){
|
||||||
|
if(rukuzhengli.PROP_C9.length-1==i){
|
||||||
|
sb.append("'"+ rukuzhengli.PROP_C9[i]+"'");
|
||||||
|
}else {
|
||||||
|
sb.append("'"+ rukuzhengli.PROP_C9[i]+"'"+",");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sql_bz+=" and ad.PROP_C9 in ("+sb.toString()+")";
|
||||||
|
}
|
||||||
|
//LOC
|
||||||
|
if(rukuzhengli.PROP_C2!=null&& rukuzhengli.PROP_C2.length>0){
|
||||||
|
StringBuffer sb = new StringBuffer();
|
||||||
|
for (int i = 0; i< rukuzhengli.PROP_C2.length; i++){
|
||||||
|
if(rukuzhengli.PROP_C2.length-1==i){
|
||||||
|
sb.append("'"+ rukuzhengli.PROP_C2[i]+"'");
|
||||||
|
}else {
|
||||||
|
sb.append("'"+ rukuzhengli.PROP_C2[i]+"'"+",");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sql_bz+=" and ad.PROP_C2 in ("+sb.toString()+")";;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//SAP接口
|
||||||
|
if(rukuzhengli.CODE!=null&&!rukuzhengli.CODE.equals("")){
|
||||||
|
|
||||||
|
sql_bz+=" and a.CODE ="+"'"+ rukuzhengli.CODE+"'";
|
||||||
|
}
|
||||||
|
|
||||||
|
//加急标记
|
||||||
|
if(rukuzhengli.strBill11!=null&&!rukuzhengli.strBill11.equals("")){
|
||||||
|
|
||||||
|
sql_bz+=" and ad.strBill11 ="+"'"+ rukuzhengli.strBill11+"'";
|
||||||
|
}
|
||||||
|
|
||||||
|
String sqlCount = "select count(t.id) as nums from(" + sql_bz+") t";
|
||||||
|
String sqlFy = "select t.* from(" + sql_bz+") t";
|
||||||
|
|
||||||
|
// System.out.println(sqlFy);
|
||||||
|
|
||||||
|
sqlFy+= " WHERE Row_Num BETWEEN " + (pageNum-1) * pageSize + " AND " + (pageNum) * pageSize;
|
||||||
|
//查询单数据
|
||||||
|
Map<String,Object> listCount = jdbcTemplate.queryForMap(sqlCount, new HashMap<>());
|
||||||
|
//查询多条数据据
|
||||||
|
List<Map<String,Object>> maps = jdbcTemplate.queryForList(sqlFy, new HashMap<>());
|
||||||
|
|
||||||
|
return Result.success(Long.parseLong(listCount.get("nums").toString()),maps);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result Plant(){
|
||||||
|
String sql=" select DISTINCT PROP_C9 from ASN_DETAIL where PROP_C9!=''";
|
||||||
|
List<Map<String, Object>> list = jdbcTemplate.queryForList(sql,new HashMap<>());
|
||||||
|
|
||||||
|
return Result.success(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result LOC() {
|
||||||
|
String sql=" \n" +
|
||||||
|
" select DISTINCT PROP_C2 from ASN_DETAIL where PROP_C2!=''";
|
||||||
|
List<Map<String, Object>> list = jdbcTemplate.queryForList(sql,new HashMap<>());
|
||||||
|
|
||||||
|
return Result.success(list);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
package com.yc.wms.service.impl;
|
package com.yc.wms.service.impl;
|
||||||
|
|
||||||
import com.yc.wms.bean.Rukuzhengli;
|
import com.yc.wms.service.Zhengliqingdan;
|
||||||
import com.yc.wms.service.DcxService;
|
|
||||||
import com.yc.wms.until.QueryPageUtil;
|
import com.yc.wms.until.QueryPageUtil;
|
||||||
import com.yc.wms.until.Result;
|
import com.yc.wms.until.Result;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
@ -16,8 +15,32 @@ import java.util.Map;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class DcxServiceImpl implements DcxService {
|
public class ZhengliqingdanImpl implements Zhengliqingdan {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private NamedParameterJdbcTemplate jdbcTemplate;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Result QueryJson(QueryPageUtil query, com.yc.wms.bean.Zhengliqingdan zlqd) {
|
||||||
|
|
||||||
|
int pageNum = query.getPageNum();//当前页
|
||||||
|
int pageSize = query.getPageSize();//条数
|
||||||
|
|
||||||
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
|
||||||
|
String sql ="";
|
||||||
|
|
||||||
|
String sqlCount = "select count(t.id) as nums from(" + sql+") t";
|
||||||
|
String sqlFy = "select t.* from(" + sql+") t";
|
||||||
|
|
||||||
|
sqlFy+= " WHERE Row_Num BETWEEN " + (pageNum-1) * pageSize + " AND " + (pageNum) * pageSize;
|
||||||
|
//查询单数据
|
||||||
|
Map<String,Object> listCount = jdbcTemplate.queryForMap(sqlCount, new HashMap<>());
|
||||||
|
//查询多条数据据
|
||||||
|
List<Map<String,Object>> maps = jdbcTemplate.queryForList(sqlFy, new HashMap<>());
|
||||||
|
|
||||||
|
return Result.success(Long.parseLong(listCount.get("nums").toString()),maps);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ server:
|
||||||
|
|
||||||
spring:
|
spring:
|
||||||
datasource:
|
datasource:
|
||||||
url: jdbc:sqlserver://47.100.54.81:1433;DatabaseName=zwtest
|
url: jdbc:sqlserver://47.100.54.81:1433;DatabaseName=zwwms
|
||||||
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
|
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||||
username: super
|
username: super
|
||||||
password: 1K4QfD%ESd1fe@VJ
|
password: 1K4QfD%ESd1fe@VJ
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue