add: 木箱库存查询
This commit is contained in:
@@ -35,6 +35,12 @@ public class BstIvtBoxinfoController {
|
||||
return new ResponseEntity<>(iBstIvtBoxinfoService.queryAll(whereJson, page), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@GetMapping("/boxivtquery")
|
||||
@Log("查询木箱库存信息")
|
||||
public ResponseEntity<Object> boxIvtQuery(@RequestParam Map whereJson, Pageable page) {
|
||||
return new ResponseEntity<>(iBstIvtBoxinfoService.boxIvtQuery(whereJson, page), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/saveBoxInfo")
|
||||
@Log("保存木箱信息")
|
||||
public ResponseEntity<Object> saveBoxInfo(@RequestBody JSONObject jsonObject) {
|
||||
|
||||
@@ -46,4 +46,11 @@ public interface IBstIvtBoxinfoService extends IService<BstIvtBoxinfo> {
|
||||
|
||||
BstIvtBoxinfo getBoxInfo(JSONObject jsonObject);
|
||||
|
||||
/**
|
||||
* 查询木箱库存信息
|
||||
* @param whereJson : 查询条件
|
||||
* @param page 分页组件
|
||||
* @return 木箱信息
|
||||
*/
|
||||
Object boxIvtQuery(Map whereJson, Pageable page);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.nl.b_lms.storage_manage.database.service.dao.mapper;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@@ -20,10 +21,18 @@ import java.util.Map;
|
||||
public interface BstIvtBoxinfoMapper extends BaseMapper<BstIvtBoxinfo> {
|
||||
|
||||
/**
|
||||
* 查询入库单
|
||||
* 查询木箱
|
||||
* @param query: 查询条件
|
||||
* @param pageQuery: 分页工具
|
||||
* @return List<Map>
|
||||
*/
|
||||
List<Map> getPageQuery(@Param("query") Map query, @Param("pageQuery") Pageable pageQuery);
|
||||
|
||||
/**
|
||||
* 查询木箱库存
|
||||
* @param query 查询条件
|
||||
* @param pageQuery 分页工具
|
||||
* @return List<Map>
|
||||
*/
|
||||
List<Map> getBoxIvtPage(@Param("query") Map query, @Param("pageQuery") Pageable pageQuery);
|
||||
}
|
||||
|
||||
@@ -29,4 +29,31 @@
|
||||
</where>
|
||||
|
||||
</select>
|
||||
|
||||
<select id="getBoxIvtPage" resultType="java.util.Map">
|
||||
SELECT
|
||||
box.*,
|
||||
attr.struct_code
|
||||
FROM
|
||||
bst_ivt_boxinfo box
|
||||
INNER JOIN st_ivt_structattr attr ON attr.storagevehicle_code = box.box_no
|
||||
<where>
|
||||
box.is_packing = '0'
|
||||
AND attr.lock_type = '1'
|
||||
|
||||
<if test="query.material_code != null and query.material_code != ''">
|
||||
AND box.material_code = #{query.material_code}
|
||||
</if>
|
||||
|
||||
<if test="query.material_name != null and query.material_name != ''">
|
||||
AND box.material_name LIKE '%${query.material_name}%'
|
||||
</if>
|
||||
|
||||
<if test="query.box_no != null and query.box_no != ''">
|
||||
AND box.box_no LIKE '%${query.box_no}%'
|
||||
</if>
|
||||
|
||||
</where>
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -7,11 +7,13 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import org.nl.b_lms.storage_manage.database.service.IBstIvtBoxinfoService;
|
||||
import org.nl.b_lms.storage_manage.database.service.IMdpbBoxtypeService;
|
||||
import org.nl.b_lms.storage_manage.database.service.dao.BstIvtBoxinfo;
|
||||
import org.nl.b_lms.storage_manage.database.service.dao.MdpbBoxtype;
|
||||
import org.nl.b_lms.storage_manage.database.service.dao.mapper.BstIvtBoxinfoMapper;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.utils.IdUtil;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
@@ -23,6 +25,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@@ -150,4 +153,15 @@ public class BstIvtBoxinfoServiceImpl extends ServiceImpl<BstIvtBoxinfoMapper, B
|
||||
}
|
||||
return boxinfo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object boxIvtQuery(Map query, Pageable pageQuery) {
|
||||
com.github.pagehelper.Page<Object> page = PageHelper.startPage(pageQuery.getPageNumber() + 1, pageQuery.getPageSize());
|
||||
|
||||
List<Map> mst_detail = this.baseMapper.getBoxIvtPage(query, pageQuery);
|
||||
|
||||
TableDataInfo<Map> build = TableDataInfo.build(mst_detail);
|
||||
build.setTotalElements(page.getTotal());
|
||||
return build;
|
||||
}
|
||||
}
|
||||
|
||||
127
lms/nladmin-ui/src/views/wms/stat/twoivtquery/boxivt.vue
Normal file
127
lms/nladmin-ui/src/views/wms/stat/twoivtquery/boxivt.vue
Normal file
@@ -0,0 +1,127 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<el-form
|
||||
:inline="true"
|
||||
class="demo-form-inline"
|
||||
label-position="right"
|
||||
label-width="90px"
|
||||
label-suffix=":"
|
||||
>
|
||||
<el-form-item label="木箱料号">
|
||||
<el-input
|
||||
v-model="query.material_code"
|
||||
clearable
|
||||
placeholder="输入木箱料号"
|
||||
style="width: 185px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="木箱描述">
|
||||
<el-input
|
||||
v-model="query.material_name"
|
||||
clearable
|
||||
placeholder="输入木箱描述"
|
||||
style="width: 185px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="木箱号">
|
||||
<el-input
|
||||
v-model="query.box_no"
|
||||
clearable
|
||||
placeholder="输入木箱号"
|
||||
style="width: 185px;"
|
||||
class="filter-item"
|
||||
@keyup.enter.native="crud.toQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<rrOperation :crud="crud"/>
|
||||
</el-form>
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<!--表格渲染-->
|
||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||
<el-table-column prop="box_no" label="木箱号" :min-width="flexWidth('box_no',crud.data,'木箱号')" />
|
||||
<el-table-column prop="material_code" label="木箱料号" :min-width="flexWidth('material_code',crud.data,'木箱料号')" />
|
||||
<el-table-column prop="material_name" label="木箱描述" :min-width="flexWidth('material_name',crud.data,'木箱描述')" />
|
||||
<el-table-column prop="num" label="最大子卷数" :min-width="flexWidth('num',crud.data,'最大子卷数')" />
|
||||
<el-table-column prop="box_length" label="木箱长度" :min-width="flexWidth('box_length',crud.data,'木箱长度')" />
|
||||
<el-table-column prop="box_width" label="木箱宽度" :min-width="flexWidth('box_width',crud.data,'木箱宽度')" />
|
||||
<el-table-column prop="box_high" label="木箱高度" :min-width="flexWidth('box_high',crud.data,'木箱高度')" />
|
||||
<el-table-column prop="vehicle_type" label="载具类型" :min-width="flexWidth('vehicle_type',crud.data,'载具类型')" :formatter="formattTwo" />
|
||||
<el-table-column prop="box_weight" label="木箱重量" :min-width="flexWidth('box_weight',crud.data,'木箱重量')" />
|
||||
<el-table-column prop="struct_code" label="仓位" :min-width="flexWidth('struct_code',crud.data,'所在仓位')" />
|
||||
</el-table>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudBoxinfo from '@/views/wms/basedata/st/boxInfo/boxinfo'
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
|
||||
export default {
|
||||
name: 'HotPointIvt',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
dicts: ['product_area', 'is_used', 'point_location', 'sch_hot_point_status'],
|
||||
mixins: [presenter(), header(), form(), crud()],
|
||||
cruds() {
|
||||
return CRUD({
|
||||
title: '烘烤区点位库存',
|
||||
url: 'api/boxinfo/boxivtquery',
|
||||
idField: 'box_no',
|
||||
sort: 'box_no,desc',
|
||||
crudMethod: { ...crudBoxinfo },
|
||||
optShow: {
|
||||
add: false,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
}
|
||||
})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permission: {},
|
||||
rules: {
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
hand(value) {
|
||||
this.crud.toQuery()
|
||||
},
|
||||
formattTwo(row) {
|
||||
if (row.vehicle_type === '1') {
|
||||
return '小托盘'
|
||||
}
|
||||
|
||||
if (row.vehicle_type === '2') {
|
||||
return '大托盘'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
26
lms/nladmin-ui/src/views/wms/stat/twoivtquery/index.vue
Normal file
26
lms/nladmin-ui/src/views/wms/stat/twoivtquery/index.vue
Normal file
@@ -0,0 +1,26 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-tabs type="border-card">
|
||||
<el-tab-pane>
|
||||
<span slot="label"><i class="el-icon-date" /> 木箱库存</span>
|
||||
<BoxIvt />
|
||||
</el-tab-pane>
|
||||
<!--<el-tab-pane>
|
||||
<span slot="label"><i class="el-icon-date" /> 载具库存</span>
|
||||
<BoxIvt />
|
||||
</el-tab-pane>-->
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BoxIvt from '@/views/wms/stat/twoivtquery/boxivt'
|
||||
export default {
|
||||
name: 'Twoivtquery',
|
||||
components: { BoxIvt }
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user