Commit 3ceb4b88172a42c67fc5c8314e4b09761ec80c86
1 parent
5a3ed610
增加容器在库内还是库外的查询
Showing
4 changed files
with
50 additions
and
0 deletions
ant-design-vue-jeecg/src/views/system/config/ContainerList.vue
... | ... | @@ -46,6 +46,12 @@ |
46 | 46 | /> |
47 | 47 | </a-form-item> |
48 | 48 | </a-col> |
49 | + <a-col :xl="6" :lg="7" :md="8" :sm="24"> | |
50 | + <a-form-item label="位置"> | |
51 | + <j-dict-select-tag placeholder="请选择位置" v-model="queryParam.inLocation" | |
52 | + dictCode="inLocation"/> | |
53 | + </a-form-item> | |
54 | + </a-col> | |
49 | 55 | </template> |
50 | 56 | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
51 | 57 | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
... | ... | @@ -255,6 +261,11 @@ export default { |
255 | 261 | scopedSlots: {customRender: 'fillStatus_dictText'} |
256 | 262 | }, |
257 | 263 | { |
264 | + title: '位置', | |
265 | + align: 'center', | |
266 | + dataIndex: 'inLocation_dictText', | |
267 | + }, | |
268 | + { | |
258 | 269 | title: '任务总数', |
259 | 270 | align: "center", |
260 | 271 | dataIndex: 'taskTimes', |
... | ... | @@ -358,6 +369,7 @@ export default { |
358 | 369 | fieldList.push({type: 'string', value: 'containerTypeCode', text: '容器类型', dictCode: ''}) |
359 | 370 | fieldList.push({type: 'string', value: 'status', text: '容器状态', dictCode: 'container_status'}) |
360 | 371 | fieldList.push({type: 'string', value: 'fillStatus', text: '容器填充状态', dictCode: 'fill_status'}) |
372 | + fieldList.push({type: 'string', value: 'inLocation', text: '容器填充状态', dictCode: 'inLocation'}) | |
361 | 373 | fieldList.push({type: 'string', value: 'createBy', text: '创建人', dictCode: ''}) |
362 | 374 | fieldList.push({type: 'datetime', value: 'createTime', text: '创建日期'}) |
363 | 375 | fieldList.push({type: 'string', value: 'updateBy', text: '更新人', dictCode: ''}) |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/container/controller/ContainerController.java
... | ... | @@ -19,6 +19,7 @@ import org.jeecg.modules.wms.config.location.entity.Location; |
19 | 19 | import org.jeecg.modules.wms.config.location.service.ILocationService; |
20 | 20 | import org.jeecg.utils.HuahengJwtUtil; |
21 | 21 | import org.jeecg.utils.StringUtils; |
22 | +import org.jeecg.utils.constant.QuantityConstant; | |
22 | 23 | import org.springframework.beans.factory.annotation.Autowired; |
23 | 24 | import org.springframework.web.bind.annotation.*; |
24 | 25 | import org.springframework.web.servlet.ModelAndView; |
... | ... | @@ -62,8 +63,17 @@ public class ContainerController extends JeecgController<Container, IContainerSe |
62 | 63 | public Result<IPage<Container>> queryPageList(Container container, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
63 | 64 | @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, HttpServletRequest req) { |
64 | 65 | HuahengJwtUtil.setWarehouseCode(req, container); |
66 | + Integer inLocation = container.haveInLocation(); | |
67 | + container.setInLocation(null); | |
65 | 68 | QueryWrapper<Container> queryWrapper = QueryGenerator.initQueryWrapper(container, null); |
66 | 69 | LambdaQueryWrapper<Container> containerLambdaQueryWrapper = queryWrapper.lambda(); |
70 | + if (inLocation != null) { | |
71 | + if (inLocation == QuantityConstant.STATUS_LOCATION_OUT) { | |
72 | + containerLambdaQueryWrapper.eq(Container::getLocationCode, QuantityConstant.EMPTY_STRING); | |
73 | + } else if (inLocation == QuantityConstant.STATUS_LOCATION_IN) { | |
74 | + containerLambdaQueryWrapper.ne(Container::getLocationCode, QuantityConstant.EMPTY_STRING); | |
75 | + } | |
76 | + } | |
67 | 77 | containerLambdaQueryWrapper.orderByAsc(Container::getId); |
68 | 78 | Page<Container> page = new Page<Container>(pageNo, pageSize); |
69 | 79 | IPage<Container> pageList = containerService.page(page, containerLambdaQueryWrapper); |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/container/entity/Container.java
... | ... | @@ -4,9 +4,12 @@ import java.io.Serializable; |
4 | 4 | import java.util.Date; |
5 | 5 | |
6 | 6 | import org.jeecg.common.aspect.annotation.Dict; |
7 | +import org.jeecg.utils.StringUtils; | |
8 | +import org.jeecg.utils.constant.QuantityConstant; | |
7 | 9 | import org.jeecgframework.poi.excel.annotation.Excel; |
8 | 10 | |
9 | 11 | import com.baomidou.mybatisplus.annotation.IdType; |
12 | +import com.baomidou.mybatisplus.annotation.TableField; | |
10 | 13 | import com.baomidou.mybatisplus.annotation.TableId; |
11 | 14 | import com.baomidou.mybatisplus.annotation.TableName; |
12 | 15 | |
... | ... | @@ -71,6 +74,10 @@ public class Container implements Serializable { |
71 | 74 | private Integer taskTimes; |
72 | 75 | @ApiModelProperty(value = "移库任务数") |
73 | 76 | private Integer moveTaskTimes; |
77 | + @ApiModelProperty(value = "位置") | |
78 | + @TableField(exist = false) | |
79 | + @Dict(dicCode = "inLocation") | |
80 | + private Integer inLocation; | |
74 | 81 | /** 备用字段1 */ |
75 | 82 | @ApiModelProperty(value = "备用字段1") |
76 | 83 | private String userdef1; |
... | ... | @@ -92,4 +99,20 @@ public class Container implements Serializable { |
92 | 99 | /** 更新日期 */ |
93 | 100 | @ApiModelProperty(value = "更新日期") |
94 | 101 | private Date updateTime; |
102 | + | |
103 | + public Integer getInLocation() { | |
104 | + if (StringUtils.isNotEmpty(locationCode)) { | |
105 | + return QuantityConstant.STATUS_LOCATION_IN; | |
106 | + } else { | |
107 | + return QuantityConstant.STATUS_LOCATION_OUT; | |
108 | + } | |
109 | + } | |
110 | + | |
111 | + public void setInLocation(Integer inLocation) { | |
112 | + this.inLocation = inLocation; | |
113 | + } | |
114 | + | |
115 | + public Integer haveInLocation() { | |
116 | + return this.inLocation; | |
117 | + } | |
95 | 118 | } |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/utils/constant/QuantityConstant.java
... | ... | @@ -593,6 +593,11 @@ public class QuantityConstant { |
593 | 593 | /* 不可用 */ |
594 | 594 | public static final int STATUS_DISABLE = 0; |
595 | 595 | |
596 | + /* 在库外 */ | |
597 | + public static final int STATUS_LOCATION_OUT = 0; | |
598 | + /* 在库内 */ | |
599 | + public static final int STATUS_LOCATION_IN = 1; | |
600 | + | |
596 | 601 | /* 可用 */ |
597 | 602 | public static final int INVENTORY_DETAIL_STATUS_ENABLE = 0; |
598 | 603 | /* 受控 */ |
... | ... |