parent
f71a108641
commit
60f392e1e8
@ -0,0 +1,63 @@
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
/**
|
||||
* 新增cmshelf
|
||||
* @param pram
|
||||
*/
|
||||
export function cmshelfCreateApi(data) {
|
||||
return request({
|
||||
url: `autogencode/cmshelf/save`,
|
||||
method: 'POST',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* cmshelf更新
|
||||
* @param pram
|
||||
*/
|
||||
export function cmshelfUpdateApi(data) {
|
||||
return request({
|
||||
url: `autogencode/cmshelf/update`,
|
||||
method: 'POST',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* cmshelf详情
|
||||
* @param pram
|
||||
*/
|
||||
export function cmshelfDetailApi(id) {
|
||||
return request({
|
||||
url: `autogencode/cmshelf/info/${id}`,
|
||||
method: 'GET'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* cmshelf批量删除
|
||||
* @param ids
|
||||
*/
|
||||
export function cmshelfDeleteApi(ids) {
|
||||
return request({
|
||||
url: `autogencode/cmshelf/delete`,
|
||||
method: 'POST',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* cmshelf列表
|
||||
* @param pram
|
||||
*/
|
||||
export function cmshelfListApi(params) {
|
||||
return request({
|
||||
url: `autogencode/cmshelf/list`,
|
||||
method: 'GET',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
@ -0,0 +1,63 @@
|
||||
|
||||
import request from '@/utils/request'
|
||||
|
||||
/**
|
||||
* 新增cmstoragelocation
|
||||
* @param pram
|
||||
*/
|
||||
export function cmstoragelocationCreateApi(data) {
|
||||
return request({
|
||||
url: `autogencode/cmstoragelocation/save`,
|
||||
method: 'POST',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* cmstoragelocation更新
|
||||
* @param pram
|
||||
*/
|
||||
export function cmstoragelocationUpdateApi(data) {
|
||||
return request({
|
||||
url: `autogencode/cmstoragelocation/update`,
|
||||
method: 'POST',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* cmstoragelocation详情
|
||||
* @param pram
|
||||
*/
|
||||
export function cmstoragelocationDetailApi(id) {
|
||||
return request({
|
||||
url: `autogencode/cmstoragelocation/info/${id}`,
|
||||
method: 'GET'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* cmstoragelocation批量删除
|
||||
* @param ids
|
||||
*/
|
||||
export function cmstoragelocationDeleteApi(ids) {
|
||||
return request({
|
||||
url: `autogencode/cmstoragelocation/delete`,
|
||||
method: 'POST',
|
||||
data: ids
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* cmstoragelocation列表
|
||||
* @param pram
|
||||
*/
|
||||
export function cmstoragelocationListApi(params) {
|
||||
return request({
|
||||
url: `autogencode/cmstoragelocation/list`,
|
||||
method: 'GET',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
@ -0,0 +1,87 @@
|
||||
<template>
|
||||
<!-- 基于 Element UI 新增和修改弹窗 -->
|
||||
<el-dialog
|
||||
:title="!dataForm.id ? '添加' : '修改'"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="visible">
|
||||
<!-- 新增和修改表单 -->
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataSubmit()" label-width="80px">
|
||||
<el-form-item label="货架代码" prop="shelfCode">
|
||||
<el-input v-model="dataForm.shelfCode" placeholder="货架代码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="货架名称" prop="shelfName">
|
||||
<el-input v-model="dataForm.shelfName" placeholder="货架名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="dataForm.remark" placeholder="备注" type="textarea" :rows="3"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataSubmit()">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as api from '@/api/cmshelf.js'
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
dataForm: {
|
||||
id: 0,
|
||||
shelfCode: '' ,
|
||||
shelfName: '' ,
|
||||
warehouseId: '' ,
|
||||
remark: '' ,
|
||||
},
|
||||
dataRule: {
|
||||
shelfCode: [
|
||||
{ required: true, message: '货架代码 为必填项', trigger: 'blur' }
|
||||
],
|
||||
shelfName: [
|
||||
{ required: true, message: '货架名称 为必填项', trigger: 'blur' }
|
||||
],
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init (id, warehouseId) { // 初始化表单验证规则
|
||||
this.dataForm.id = id || 0
|
||||
this.visible = true
|
||||
this.$nextTick(function() {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
api.cmshelfDetailApi(id).then(function(res) {
|
||||
this.dataForm = res;
|
||||
}.bind(this))
|
||||
} else if (warehouseId) {
|
||||
// 新增时自动设置仓库ID
|
||||
this.dataForm.warehouseId = warehouseId
|
||||
}
|
||||
}.bind(this))
|
||||
},
|
||||
// 表单数据提交
|
||||
dataSubmit () {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.dataForm.id) {
|
||||
api.cmshelfUpdateApi(this.dataForm).then(function(res) {
|
||||
this.$message.success('保存成功')
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}.bind(this));
|
||||
} else {
|
||||
api.cmshelfCreateApi(this.dataForm).then(function(res) {
|
||||
this.$message.success('新增成功')
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}.bind(this));
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -0,0 +1,88 @@
|
||||
<template>
|
||||
<!-- 基于 Element UI 新增和修改弹窗 -->
|
||||
<el-dialog
|
||||
:title="!dataForm.id ? '添加' : '修改'"
|
||||
:close-on-click-modal="false"
|
||||
:append-to-body="true"
|
||||
:visible.sync="visible">
|
||||
<!-- 新增和修改表单 -->
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataSubmit()" label-width="80px">
|
||||
<el-form-item label="货位代码" prop="storageLocationCode">
|
||||
<el-input v-model="dataForm.storageLocationCode" placeholder="货位代码"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="货位名称" prop="storageLocationName">
|
||||
<el-input v-model="dataForm.storageLocationName" placeholder="货位名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="dataForm.remark" placeholder="备注" type="textarea" :rows="3"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
<el-button type="primary" @click="dataSubmit()">确定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as api from '@/api/cmstoragelocation.js'
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
dataForm: {
|
||||
id: 0,
|
||||
storageLocationCode: '' ,
|
||||
storageLocationName: '' ,
|
||||
shelfId: '' ,
|
||||
remark: '' ,
|
||||
},
|
||||
dataRule: {
|
||||
storageLocationCode: [
|
||||
{ required: true, message: '货位代码 为必填项', trigger: 'blur' }
|
||||
],
|
||||
storageLocationName: [
|
||||
{ required: true, message: '货位名称 为必填项', trigger: 'blur' }
|
||||
],
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init (id, shelfId) { // 初始化表单验证规则
|
||||
this.dataForm.id = id || 0
|
||||
this.visible = true
|
||||
this.$nextTick(function() {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
if (this.dataForm.id) {
|
||||
api.cmstoragelocationDetailApi(id).then(function(res) {
|
||||
this.dataForm = res;
|
||||
}.bind(this))
|
||||
} else if (shelfId) {
|
||||
// 新增时自动设置货架ID
|
||||
this.dataForm.shelfId = shelfId
|
||||
}
|
||||
}.bind(this))
|
||||
},
|
||||
// 表单数据提交
|
||||
dataSubmit () {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.dataForm.id) {
|
||||
api.cmstoragelocationUpdateApi(this.dataForm).then(function(res) {
|
||||
this.$message.success('保存成功')
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}.bind(this));
|
||||
} else {
|
||||
api.cmstoragelocationCreateApi(this.dataForm).then(function(res) {
|
||||
this.$message.success('新增成功')
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}.bind(this));
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -0,0 +1,359 @@
|
||||
<template>
|
||||
<div>
|
||||
<div style="margin-bottom: 10px;">
|
||||
<el-button type="primary" size="small" @click="addShelf">新增货架</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
:data="dataList"
|
||||
border
|
||||
v-loading="dataListLoading"
|
||||
:row-key="'id'"
|
||||
style="width: 100%;">
|
||||
<el-table-column
|
||||
type="selection"
|
||||
header-align="center"
|
||||
align="center"
|
||||
width="50">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="shelfCode"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="货架代码">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="shelfName"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="货架名称">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="remark"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="备注">
|
||||
</el-table-column>
|
||||
<el-table-column header-align="center" fixed="right" align="center" width="200" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="editShelf(scope.row.id)">{{ '修改' }}</el-button>
|
||||
<el-button type="text" size="small" @click="viewLocations(scope.row.id, scope.row.shelfName)">{{ '查看货位' }}</el-button>
|
||||
<el-button type="text" size="small" @click="deleteShelf(scope.row.id)" style="color: #f56c6c;">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
v-if="showSearch"
|
||||
hide-on-single-page
|
||||
@size-change="sizeChangeHandle"
|
||||
@current-change="currentChangeHandle"
|
||||
:current-page="pageIndex"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
:page-size="pageSize"
|
||||
:total="totalPage"
|
||||
layout="total, sizes, prev, pager, next, jumper">
|
||||
</el-pagination>
|
||||
<!-- 货架弹窗 -->
|
||||
<ShelfAddOrUpdate
|
||||
ref="shelfAddOrUpdate"
|
||||
@refreshDataList="getDataList"
|
||||
></ShelfAddOrUpdate>
|
||||
<!-- 货位管理弹窗 -->
|
||||
<el-dialog
|
||||
:title="'货位管理 - ' + selectedShelfName"
|
||||
:close-on-click-modal="false"
|
||||
:visible.sync="locationDialogVisible"
|
||||
width="80%"
|
||||
:append-to-body="true"
|
||||
:before-close="handleLocationDialogClose">
|
||||
<div>
|
||||
<div style="margin-bottom: 10px;">
|
||||
<el-button type="primary" size="small" @click="addLocation">新增货位</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
:data="locationDataList"
|
||||
border
|
||||
v-loading="locationDataListLoading"
|
||||
:row-key="'id'"
|
||||
style="width: 100%;">
|
||||
<el-table-column
|
||||
type="selection"
|
||||
header-align="center"
|
||||
align="center"
|
||||
width="50">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="storageLocationCode"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="货位代码">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="storageLocationName"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="货位名称">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="remark"
|
||||
header-align="center"
|
||||
align="center"
|
||||
label="备注">
|
||||
</el-table-column>
|
||||
<el-table-column header-align="center" fixed="right" align="center" width="150" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="editLocation(scope.row.id)">{{ '修改' }}</el-button>
|
||||
<el-button type="text" size="small" @click="deleteLocation(scope.row.id)" style="color: #f56c6c;">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
v-if="showSearch"
|
||||
hide-on-single-page
|
||||
@size-change="locationSizeChangeHandle"
|
||||
@current-change="locationCurrentChangeHandle"
|
||||
:current-page="locationPageIndex"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
:page-size="locationPageSize"
|
||||
:total="locationTotalPage"
|
||||
layout="total, sizes, prev, pager, next, jumper">
|
||||
</el-pagination>
|
||||
</div>
|
||||
<!-- 货位表单弹窗, 新增数据和修改数据 -->
|
||||
<LocationAddOrUpdate
|
||||
ref="locationAddOrUpdate"
|
||||
@refreshDataList="getLocationDataList"
|
||||
></LocationAddOrUpdate>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as api from '@/api/cmshelf.js'
|
||||
import * as locationApi from '@/api/cmstoragelocation.js'
|
||||
import ShelfAddOrUpdate from '../shelf/cmshelf-add-and-update.vue'
|
||||
import LocationAddOrUpdate from '../storage/location/cmstoragelocation-add-and-update.vue'
|
||||
export default {
|
||||
components: {
|
||||
ShelfAddOrUpdate,
|
||||
LocationAddOrUpdate
|
||||
},
|
||||
props: {
|
||||
warehouseId: {
|
||||
type: [Number, String],
|
||||
required: true
|
||||
},
|
||||
showSearch: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dataForm: {
|
||||
shelfCode: '',
|
||||
shelfName: '',
|
||||
warehouseId: '',
|
||||
remark: ''
|
||||
},
|
||||
dataList: [],
|
||||
pageIndex: 1,
|
||||
pageSize: 10,
|
||||
totalPage: 0,
|
||||
dataListLoading: false,
|
||||
// 货位管理相关
|
||||
locationDialogVisible: false,
|
||||
selectedShelfId: null,
|
||||
selectedShelfName: '',
|
||||
locationDataList: [],
|
||||
locationPageIndex: 1,
|
||||
locationPageSize: 10,
|
||||
locationTotalPage: 0,
|
||||
locationDataListLoading: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// 监听仓库ID变化
|
||||
warehouseId(newVal) {
|
||||
this.getDataList()
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// 新增货架
|
||||
addShelf() {
|
||||
this.$emit('addShelf')
|
||||
if (this.$refs.shelfAddOrUpdate) {
|
||||
this.$refs.shelfAddOrUpdate.init(0, this.warehouseId)
|
||||
}
|
||||
},
|
||||
// 编辑货架
|
||||
editShelf(id) {
|
||||
this.$emit('editShelf', id)
|
||||
if (this.$refs.shelfAddOrUpdate) {
|
||||
this.$refs.shelfAddOrUpdate.init(id, this.warehouseId)
|
||||
}
|
||||
},
|
||||
// 删除货架
|
||||
deleteShelf(id) {
|
||||
this.$confirm('确定要删除这条货架记录吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
api.cmshelfDeleteApi([id]).then(() => {
|
||||
this.$message.success('删除成功')
|
||||
this.getDataList()
|
||||
}).catch(() => {
|
||||
// this.$message.error('删除失败')
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
// 重置表单
|
||||
resetForm() {
|
||||
this.dataForm = {
|
||||
shelfCode: '',
|
||||
shelfName: '',
|
||||
warehouseId: '',
|
||||
remark: ''
|
||||
}
|
||||
this.pageIndex = 1
|
||||
this.getDataList()
|
||||
},
|
||||
// 获取数据列表
|
||||
getDataList() {
|
||||
this.dataListLoading = true
|
||||
const params = {
|
||||
page: this.pageIndex,
|
||||
limit: this.pageSize,
|
||||
warehouseId: this.warehouseId
|
||||
}
|
||||
|
||||
// 将查询条件添加到参数中
|
||||
if (this.dataForm.shelfCode) params.shelfCode = this.dataForm.shelfCode
|
||||
if (this.dataForm.shelfName) params.shelfName = this.dataForm.shelfName
|
||||
if (this.dataForm.remark) params.remark = this.dataForm.remark
|
||||
|
||||
api.cmshelfListApi(params).then((res) => {
|
||||
this.dataListLoading = false
|
||||
if (res.data && 'list' in res.data) {
|
||||
this.dataList = res.data.list || []
|
||||
this.totalPage = res.data.total || 0
|
||||
} else if ('list' in res) {
|
||||
this.dataList = res.list || []
|
||||
this.totalPage = res.total || 0
|
||||
} else {
|
||||
// 其他格式
|
||||
this.dataList = []
|
||||
this.totalPage = 0
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.dataListLoading = false
|
||||
this.dataList = []
|
||||
this.totalPage = 0
|
||||
})
|
||||
},
|
||||
// 每页数
|
||||
sizeChangeHandle(val) {
|
||||
this.pageSize = val
|
||||
this.pageIndex = 1
|
||||
this.getDataList()
|
||||
},
|
||||
// 当前页
|
||||
currentChangeHandle(val) {
|
||||
this.pageIndex = val
|
||||
this.getDataList()
|
||||
},
|
||||
|
||||
// 查看货位
|
||||
viewLocations(shelfId, shelfName) {
|
||||
this.selectedShelfId = shelfId
|
||||
this.selectedShelfName = shelfName
|
||||
this.locationDialogVisible = true
|
||||
this.locationPageIndex = 1
|
||||
this.getLocationDataList()
|
||||
},
|
||||
|
||||
// 处理货位弹窗关闭
|
||||
handleLocationDialogClose(done) {
|
||||
this.locationDialogVisible = false
|
||||
},
|
||||
|
||||
// 新增货位
|
||||
addLocation() {
|
||||
if (this.$refs.locationAddOrUpdate) {
|
||||
this.$refs.locationAddOrUpdate.init(0, this.selectedShelfId)
|
||||
}
|
||||
},
|
||||
|
||||
// 编辑货位
|
||||
editLocation(id) {
|
||||
if (this.$refs.locationAddOrUpdate) {
|
||||
this.$refs.locationAddOrUpdate.init(id, this.selectedShelfId)
|
||||
}
|
||||
},
|
||||
|
||||
// 删除货位
|
||||
deleteLocation(id) {
|
||||
this.$confirm('确定要删除这条货位记录吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
locationApi.cmstoragelocationDeleteApi([id]).then(() => {
|
||||
this.$message.success('删除成功')
|
||||
this.getLocationDataList()
|
||||
}).catch(() => {
|
||||
this.$message.error('删除失败')
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
|
||||
// 获取货位数据列表
|
||||
getLocationDataList() {
|
||||
this.locationDataListLoading = true
|
||||
const params = {
|
||||
page: this.locationPageIndex,
|
||||
limit: this.locationPageSize,
|
||||
shelfId: this.selectedShelfId
|
||||
}
|
||||
|
||||
locationApi.cmstoragelocationListApi(params).then((res) => {
|
||||
this.locationDataListLoading = false
|
||||
if (res.data && 'list' in res.data) {
|
||||
this.locationDataList = res.data.list || []
|
||||
this.locationTotalPage = res.data.total || 0
|
||||
} else if ('list' in res) {
|
||||
this.locationDataList = res.list || []
|
||||
this.locationTotalPage = res.total || 0
|
||||
} else {
|
||||
// 其他格式
|
||||
this.locationDataList = []
|
||||
this.locationTotalPage = 0
|
||||
}
|
||||
}).catch((error) => {
|
||||
this.locationDataListLoading = false
|
||||
this.locationDataList = []
|
||||
this.locationTotalPage = 0
|
||||
})
|
||||
},
|
||||
|
||||
// 货位每页数
|
||||
locationSizeChangeHandle(val) {
|
||||
this.locationPageSize = val
|
||||
this.locationPageIndex = 1
|
||||
this.getLocationDataList()
|
||||
},
|
||||
|
||||
// 货位当前页
|
||||
locationCurrentChangeHandle(val) {
|
||||
this.locationPageIndex = val
|
||||
this.getLocationDataList()
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
@ -0,0 +1,13 @@
|
||||
package com.zbkj.modules.autogencode.dao;
|
||||
|
||||
import com.zbkj.modules.autogencode.entity.CmShelf;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 货架信息表 DAO 映射层
|
||||
*/
|
||||
@Mapper
|
||||
public interface CmShelfDao extends BaseMapper<CmShelf> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
package com.zbkj.modules.autogencode.dao;
|
||||
|
||||
import com.zbkj.modules.autogencode.entity.CmStorageLocation;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 货位信息表 DAO 映射层
|
||||
*/
|
||||
@Mapper
|
||||
public interface CmStorageLocationDao extends BaseMapper<CmStorageLocation> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package com.zbkj.modules.autogencode.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zbkj.modules.autogencode.entity.CmShelf;
|
||||
import com.zbkj.common.request.PageParamRequest;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 货架信息表 业务接口
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
public interface CmShelfService extends IService<CmShelf> {
|
||||
|
||||
/**
|
||||
* CmShelf 列表查询
|
||||
* @param pageParamRequest 分页参数对象
|
||||
* @return
|
||||
*/
|
||||
List<CmShelf> pageList(LambdaQueryWrapper<CmShelf> queryWrapper, PageParamRequest pageParamRequest);
|
||||
}
|
||||
|
||||
@ -0,0 +1,25 @@
|
||||
package com.zbkj.modules.autogencode.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.zbkj.modules.autogencode.entity.CmStorageLocation;
|
||||
import com.zbkj.common.request.PageParamRequest;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 货位信息表 业务接口
|
||||
* +----------------------------------------------------------------------
|
||||
*/
|
||||
public interface CmStorageLocationService extends IService<CmStorageLocation> {
|
||||
|
||||
/**
|
||||
* CmStorageLocation 列表查询
|
||||
* @param pageParamRequest 分页参数对象
|
||||
* @return
|
||||
*/
|
||||
List<CmStorageLocation> pageList(LambdaQueryWrapper<CmStorageLocation> queryWrapper, PageParamRequest pageParamRequest);
|
||||
}
|
||||
|
||||
@ -0,0 +1,42 @@
|
||||
package com.zbkj.modules.autogencode.service.impl;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.zbkj.modules.autogencode.dao.CmShelfDao;
|
||||
import com.zbkj.modules.autogencode.entity.CmShelf;
|
||||
import com.zbkj.modules.autogencode.service.CmShelfService;
|
||||
import com.zbkj.common.page.CommonPage;
|
||||
import com.zbkj.common.request.PageParamRequest;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Map;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Service("cmShelfService")
|
||||
public class CmShelfServiceImpl extends ServiceImpl<CmShelfDao, CmShelf> implements CmShelfService {
|
||||
|
||||
|
||||
@Resource
|
||||
private CmShelfDao dao;
|
||||
|
||||
|
||||
/**
|
||||
* 带分页参数的列表查询实现
|
||||
*/
|
||||
@Override
|
||||
public List<CmShelf> pageList(LambdaQueryWrapper<CmShelf> queryWrapper, PageParamRequest pageParamRequest) {
|
||||
|
||||
PageHelper.startPage(pageParamRequest.getPage(), pageParamRequest.getLimit());
|
||||
|
||||
return dao.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,42 @@
|
||||
package com.zbkj.modules.autogencode.service.impl;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.zbkj.modules.autogencode.dao.CmStorageLocationDao;
|
||||
import com.zbkj.modules.autogencode.entity.CmStorageLocation;
|
||||
import com.zbkj.modules.autogencode.service.CmStorageLocationService;
|
||||
import com.zbkj.common.page.CommonPage;
|
||||
import com.zbkj.common.request.PageParamRequest;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Map;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Service("cmStorageLocationService")
|
||||
public class CmStorageLocationServiceImpl extends ServiceImpl<CmStorageLocationDao, CmStorageLocation> implements CmStorageLocationService {
|
||||
|
||||
|
||||
@Resource
|
||||
private CmStorageLocationDao dao;
|
||||
|
||||
|
||||
/**
|
||||
* 带分页参数的列表查询实现
|
||||
*/
|
||||
@Override
|
||||
public List<CmStorageLocation> pageList(LambdaQueryWrapper<CmStorageLocation> queryWrapper, PageParamRequest pageParamRequest) {
|
||||
|
||||
PageHelper.startPage(pageParamRequest.getPage(), pageParamRequest.getLimit());
|
||||
|
||||
return dao.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
<?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.zbkj.modules.autogencode.dao.CmShelfDao">
|
||||
|
||||
<!-- 根据包名 模块名 以及类名 生成Mapper XML 配置文件 -->
|
||||
<resultMap type="com.zbkj.modules.autogencode.entity.CmShelf" id="cmShelfMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="shelfCode" column="shelf_code"/>
|
||||
<result property="shelfName" column="shelf_name"/>
|
||||
<result property="warehouseId" column="warehouse_id"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createDept" column="create_dept"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,23 @@
|
||||
<?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.zbkj.modules.autogencode.dao.CmStorageLocationDao">
|
||||
|
||||
<!-- 根据包名 模块名 以及类名 生成Mapper XML 配置文件 -->
|
||||
<resultMap type="com.zbkj.modules.autogencode.entity.CmStorageLocation" id="cmStorageLocationMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="storageLocationCode" column="storage_location_code"/>
|
||||
<result property="storageLocationName" column="storage_location_name"/>
|
||||
<result property="shelfId" column="shelf_id"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createDept" column="create_dept"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in new issue