Commit 931ccbb74b5b467a7964a9229e4e1661c43c9438

Authored by 肖超群
1 parent c1b57ab7

生成补充入库时,选择分拣口,如果只有一个分拣口 那么默认选择那个分拣口

ant-design-vue-jeecg/src/views/system/receipt/ReceiptContainerHeaderList.vue
... ... @@ -166,7 +166,7 @@ import ReceiptContainerDetailList from './ReceiptContainerDetailList'
166 166 import {initDictOptions, filterMultiDictText} from '@/components/dict/JDictSelectUtil'
167 167 import '@/assets/less/TableExpand.less'
168 168 import '@/assets/less/TableExpand.less'
169   -import {createReceiptTask, createReceiptBatchTask} from '@/api/api'
  169 +import {createReceiptTask, createReceiptBatchTask, selectSupplePort} from '@/api/api'
170 170 import ReceiptContainerSelectModal from "./modules/ReceiptContainerSelectModal";
171 171 import ReceiptContainerFillSelectModal from "./modules/ReceiptContainerFillSelectModal";
172 172 import ReceiptContainerStatusSelectModal from "./modules/ReceiptContainerStatusSelectModal";
... ... @@ -366,8 +366,31 @@ export default {
366 366 });
367 367 },
368 368 selectPort(record) {
369   - this.$refs.modalForm2.edit(record);
370   - this.$refs.modalForm2.title = "选择分拣入库口";
  369 + const that = this;
  370 + that.model = Object.assign({}, record);
  371 + selectSupplePort(record).then((res) => {
  372 + if (res.success) {
  373 + var portList = res.result;
  374 + if (portList.length == 1) {
  375 + this.loading = true;
  376 + that.model.toPort = portList[0].code;
  377 + createReceiptTask(this.model).then((res) => {
  378 + this.loading = false;
  379 + if (res.success) {
  380 + this.$message.success(res.message);
  381 + } else {
  382 + this.$message.error(res.message);
  383 + }
  384 + this.searchQuery();
  385 + });
  386 + } else {
  387 + this.$refs.modalForm2.edit(record);
  388 + this.$refs.modalForm2.title = "选择分拣入库口";
  389 + }
  390 + } else {
  391 + this.$message.warning(res.message);
  392 + }
  393 + });
371 394 },
372 395 selectFillPort(record) {
373 396 this.$refs.modalForm3.edit(record);
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/WcsServiceImpl.java
... ... @@ -294,11 +294,11 @@ public class WcsServiceImpl implements WcsService {
294 294 throw new JeecgBootException("分配库位时,创建移库任务失败");
295 295 }
296 296 preTaskNo = result.getResult().getId();
297   - taskHeader.setPreTaskNo(preTaskNo);
298   - success = taskHeaderService.updatePreTaskNoById(preTaskNo, taskHeader.getId());
299   - if (!success) {
300   - throw new JeecgBootException("分配库位时,更新任务状态失败");
301   - }
  297 +// taskHeader.setPreTaskNo(preTaskNo);
  298 +// success = taskHeaderService.updatePreTaskNoById(preTaskNo, taskHeader.getId());
  299 +// if (!success) {
  300 +// throw new JeecgBootException("分配库位时,更新任务状态失败");
  301 +// }
302 302 }
303 303 } else {
304 304 Location outSideLocation = locationService.getOutSideNear(location);
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/port/controller/PortController.java
1 1 package org.jeecg.modules.wms.config.port.controller;
2 2  
3 3 import java.util.Arrays;
4   -import java.util.List;
5   -import java.util.Map;
6   -import java.util.stream.Collectors;
7   -import java.io.IOException;
8   -import java.io.UnsupportedEncodingException;
9   -import java.net.URLDecoder;
  4 +
10 5 import javax.servlet.http.HttpServletRequest;
11 6 import javax.servlet.http.HttpServletResponse;
12 7  
13 8 import org.apache.shiro.authz.annotation.RequiresPermissions;
14 9 import org.jeecg.common.api.vo.Result;
  10 +import org.jeecg.common.aspect.annotation.AutoLog;
  11 +import org.jeecg.common.system.base.controller.JeecgController;
15 12 import org.jeecg.common.system.query.QueryGenerator;
  13 +import org.jeecg.modules.wms.config.port.entity.Port;
  14 +import org.jeecg.modules.wms.config.port.service.IPortService;
16 15 import org.jeecg.utils.HuahengJwtUtil;
17   -import org.jeecg.common.util.oConvertUtils;
  16 +import org.springframework.beans.factory.annotation.Autowired;
  17 +import org.springframework.web.bind.annotation.*;
  18 +import org.springframework.web.servlet.ModelAndView;
18 19  
19 20 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
20 21 import com.baomidou.mybatisplus.core.metadata.IPage;
21 22 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
22   -import lombok.extern.slf4j.Slf4j;
23 23  
24   -import org.jeecg.modules.wms.config.port.entity.Port;
25   -import org.jeecg.modules.wms.config.port.service.IPortService;
26   -import org.jeecg.utils.StringUtils;
27   -import org.jeecgframework.poi.excel.ExcelImportUtil;
28   -import org.jeecgframework.poi.excel.def.NormalExcelConstants;
29   -import org.jeecgframework.poi.excel.entity.ExportParams;
30   -import org.jeecgframework.poi.excel.entity.ImportParams;
31   -import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
32   -import org.jeecg.common.system.base.controller.JeecgController;
33   -import org.springframework.beans.factory.annotation.Autowired;
34   -import org.springframework.web.bind.annotation.*;
35   -import org.springframework.web.multipart.MultipartFile;
36   -import org.springframework.web.multipart.MultipartHttpServletRequest;
37   -import org.springframework.web.servlet.ModelAndView;
38   -import com.alibaba.fastjson.JSON;
39 24 import io.swagger.annotations.Api;
40 25 import io.swagger.annotations.ApiOperation;
41   -import org.jeecg.common.aspect.annotation.AutoLog;
  26 +import lombok.extern.slf4j.Slf4j;
42 27  
43 28 /**
44 29 * @Description: 出入口
... ...
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/config/port/entity/Port.java
... ... @@ -6,9 +6,7 @@ import java.util.Date;
6 6 import org.jeecg.common.aspect.annotation.Dict;
7 7 import org.jeecgframework.poi.excel.annotation.Excel;
8 8  
9   -import com.baomidou.mybatisplus.annotation.IdType;
10   -import com.baomidou.mybatisplus.annotation.TableId;
11   -import com.baomidou.mybatisplus.annotation.TableName;
  9 +import com.baomidou.mybatisplus.annotation.*;
12 10  
13 11 import io.swagger.annotations.ApiModel;
14 12 import io.swagger.annotations.ApiModelProperty;
... ... @@ -58,7 +56,8 @@ public class Port implements Serializable {
58 56 /** 巷道 */
59 57 @Excel(name = "巷道", width = 15)
60 58 @ApiModelProperty(value = "巷道")
61   - private String roadWay;
  59 + @TableField(updateStrategy = FieldStrategy.IGNORED)
  60 + private Integer roadWay;
62 61 /** 备用字段1 */
63 62 @Excel(name = "备用字段1", width = 15)
64 63 @ApiModelProperty(value = "备用字段1")
... ...