Commit 5ba8a834bf6668eaf62e91e1bc939eb040fee442

Authored by 肖超群
2 parents cb43e28b 2b905f77

Merge branch 'develop' of http://www.huahengrobot.com:90/wms/wms4 into develop

ant-design-vue-jeecg/src/components/page/GlobalHeader.vue
@@ -154,6 +154,7 @@ export default { @@ -154,6 +154,7 @@ export default {
154 downWord(){ 154 downWord(){
155 var fileName='华恒WMS4操作说明书.doc'; 155 var fileName='华恒WMS4操作说明书.doc';
156 return downFile(this.url.downLoad, fileName).then((data) => { 156 return downFile(this.url.downLoad, fileName).then((data) => {
  157 + debugger
157 this.$message.info("华恒WMS4操作说明书开始下载...."); 158 this.$message.info("华恒WMS4操作说明书开始下载....");
158 if (!data || data.size === 0) { 159 if (!data || data.size === 0) {
159 this.$message.error("文件下载失败"); 160 this.$message.error("文件下载失败");
ant-design-vue-jeecg/src/views/system/monitor/locationStatus.vue
@@ -277,14 +277,14 @@ export default { @@ -277,14 +277,14 @@ export default {
277 let container_code = ''; 277 let container_code = '';
278 let list_qty = 0; 278 let list_qty = 0;
279 if (list_info[i].containerCode) { 279 if (list_info[i].containerCode) {
280 - container_code = "\n容器编码:" + list_info[i].containerCode + ""; 280 + container_code = "\n容器编码" + list_info[i].containerCode + "";
281 if (list_info[i].materialName) { 281 if (list_info[i].materialName) {
282 for (let j = 0; j < list_info[i].materialName.length; j++) { 282 for (let j = 0; j < list_info[i].materialName.length; j++) {
283 let list_batch = list_info[i].batch[j] === null ? "无" : list_info[i].batch[j] === "" ? "无" : list_info[i].batch[j]; 283 let list_batch = list_info[i].batch[j] === null ? "无" : list_info[i].batch[j] === "" ? "无" : list_info[i].batch[j];
284 list_qty += list_info[i].qty[j]; 284 list_qty += list_info[i].qty[j];
285 if (j == list_info[i].materialName.length - 1) { 285 if (j == list_info[i].materialName.length - 1) {
286 - str_info = str_info + "\n批次:" + list_batch + ",物料名称:" + list_info[i].materialName[j] + ",物料编码:" + list_info[i].materialCode[j] +  
287 - ",数量:" + list_qty + "" 286 + str_info = str_info + "\n物料信息:批次->" + list_batch + ",物料名称->" + list_info[i].materialName[j] + ",物料编码->" + list_info[i].materialCode[j] +
  287 + ",数量->" + list_qty + ""
288 } 288 }
289 289
290 290
@@ -292,7 +292,7 @@ export default { @@ -292,7 +292,7 @@ export default {
292 } 292 }
293 } 293 }
294 let code = list_info[i].code === null ? "无" : list_info[i].code; 294 let code = list_info[i].code === null ? "无" : list_info[i].code;
295 - $("[data-i='" + row + "']" + "[data-j='" + line + "']" + "[data-k='" + layers + "']").attr({"title": "第" + row + "行,第" + line + "列,第" + layers + "层\n库位:" + code + container_code + str_info}); 295 + $("[data-i='" + row + "']" + "[data-j='" + line + "']" + "[data-k='" + layers + "']").attr({"title": "第" + row + "行,第" + line + "列,第" + layers + "层\n库位:" + code + container_code + str_info});
296 // Vue.prototype.$Jnotification.success({message: '系统提示', description: "第"+row+"行,第"+line+"列,第"+ layers +"层<br>库位:"+ code + container_code + str_info, duration: 4}) 296 // Vue.prototype.$Jnotification.success({message: '系统提示', description: "第"+row+"行,第"+line+"列,第"+ layers +"层<br>库位:"+ code + container_code + str_info, duration: 4})
297 297
298 } 298 }
@@ -488,8 +488,8 @@ export default { @@ -488,8 +488,8 @@ export default {
488 for (let j = 0; j < list_info[i].materialName.length; j++) { 488 for (let j = 0; j < list_info[i].materialName.length; j++) {
489 list_batch = list_info[i].batch[j] === null ? "无" : list_info[i].batch[j] === "" ? "无" : list_info[i].batch[j]; 489 list_batch = list_info[i].batch[j] === null ? "无" : list_info[i].batch[j] === "" ? "无" : list_info[i].batch[j];
490 list_qty += list_info[i].qty[j]; 490 list_qty += list_info[i].qty[j];
491 - let str_info = "批次:" + list_batch + "/ 物料名称:" + list_info[i].materialName[j] + "/ 物料编码:" + list_info[i].materialCode[j] +  
492 - "/ 数量:" + list_qty + ""; 491 + let str_info = "批次->" + list_batch + ",物料名称->" + list_info[i].materialName[j] + ",物料编码->" + list_info[i].materialCode[j] +
  492 + ",数量->" + list_qty + "";
493 if (j == list_info[i].materialName.length - 1) { 493 if (j == list_info[i].materialName.length - 1) {
494 $("#material").append("<option>" + str_info + "</option>"); 494 $("#material").append("<option>" + str_info + "</option>");
495 } 495 }
ant-design-vue-jeecg/src/views/system/receipt/ReceiveHeaderList.vue
@@ -163,7 +163,6 @@ @@ -163,7 +163,6 @@
163 <a @click="handleEdit(record)"> 163 <a @click="handleEdit(record)">
164 <a-button type="primary">编辑</a-button><a-divider type="vertical"/> 164 <a-button type="primary">编辑</a-button><a-divider type="vertical"/>
165 </a> 165 </a>
166 - <a-divider type="vertical" />  
167 <a-dropdown> 166 <a-dropdown>
168 <a class="ant-dropdown-link">更多 <a-icon type="down" /></a> 167 <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
169 <a-menu slot="overlay"> 168 <a-menu slot="overlay">
huaheng-wms-core/src/main/java/org/jeecg/modules/system/controller/CommonController.java
@@ -2,13 +2,19 @@ package org.jeecg.modules.system.controller; @@ -2,13 +2,19 @@ package org.jeecg.modules.system.controller;
2 2
3 import java.io.*; 3 import java.io.*;
4 import java.net.URLDecoder; 4 import java.net.URLDecoder;
  5 +import java.net.URLEncoder;
  6 +import java.nio.file.Files;
  7 +import java.nio.file.Path;
  8 +import java.nio.file.StandardCopyOption;
5 import java.util.Arrays; 9 import java.util.Arrays;
6 10
  11 +import javax.annotation.Resource;
7 import javax.servlet.ServletOutputStream; 12 import javax.servlet.ServletOutputStream;
8 import javax.servlet.http.HttpServletRequest; 13 import javax.servlet.http.HttpServletRequest;
9 import javax.servlet.http.HttpServletResponse; 14 import javax.servlet.http.HttpServletResponse;
10 import javax.servlet.http.HttpSession; 15 import javax.servlet.http.HttpSession;
11 16
  17 +import net.bytebuddy.implementation.bytecode.Throw;
12 import org.jeecg.common.api.vo.Result; 18 import org.jeecg.common.api.vo.Result;
13 import org.jeecg.common.constant.CommonConstant; 19 import org.jeecg.common.constant.CommonConstant;
14 import org.jeecg.common.exception.JeecgBootException; 20 import org.jeecg.common.exception.JeecgBootException;
@@ -17,11 +23,16 @@ import org.jeecg.common.util.CommonUtils; @@ -17,11 +23,16 @@ import org.jeecg.common.util.CommonUtils;
17 import org.jeecg.common.util.RestUtil; 23 import org.jeecg.common.util.RestUtil;
18 import org.jeecg.common.util.TokenUtils; 24 import org.jeecg.common.util.TokenUtils;
19 import org.jeecg.common.util.oConvertUtils; 25 import org.jeecg.common.util.oConvertUtils;
  26 +import org.jeecg.modules.wms.config.parameterConfiguration.service.IParameterConfigurationService;
  27 +import org.jeecg.utils.StringUtils;
  28 +import org.jeecg.utils.constant.QuantityConstant;
20 import org.jeecg.utils.support.ApiLogger; 29 import org.jeecg.utils.support.ApiLogger;
21 import org.springframework.beans.factory.annotation.Autowired; 30 import org.springframework.beans.factory.annotation.Autowired;
22 import org.springframework.beans.factory.annotation.Value; 31 import org.springframework.beans.factory.annotation.Value;
  32 +import org.springframework.core.io.ClassPathResource;
23 import org.springframework.http.HttpHeaders; 33 import org.springframework.http.HttpHeaders;
24 import org.springframework.http.HttpMethod; 34 import org.springframework.http.HttpMethod;
  35 +import org.springframework.http.MediaType;
25 import org.springframework.http.ResponseEntity; 36 import org.springframework.http.ResponseEntity;
26 import org.springframework.http.server.ServletServerHttpRequest; 37 import org.springframework.http.server.ServletServerHttpRequest;
27 import org.springframework.util.AntPathMatcher; 38 import org.springframework.util.AntPathMatcher;
@@ -56,6 +67,9 @@ public class CommonController { @@ -56,6 +67,9 @@ public class CommonController {
56 @Autowired 67 @Autowired
57 private ISysBaseAPI sysBaseAPI; 68 private ISysBaseAPI sysBaseAPI;
58 69
  70 + @Resource
  71 + private IParameterConfigurationService parameterConfigurationService;
  72 +
59 @Value(value = "${jeecg.path.upload}") 73 @Value(value = "${jeecg.path.upload}")
60 private String uploadpath; 74 private String uploadpath;
61 75
@@ -71,6 +85,7 @@ public class CommonController { @@ -71,6 +85,7 @@ public class CommonController {
71 @Value(value = "${jeecg.uploadFileType}") 85 @Value(value = "${jeecg.uploadFileType}")
72 private String uploadFileType; 86 private String uploadFileType;
73 87
  88 +
74 /** 89 /**
75 * @Author 政辉 90 * @Author 政辉
76 * @return 91 * @return
@@ -149,7 +164,7 @@ public class CommonController { @@ -149,7 +164,7 @@ public class CommonController {
149 164
150 /** 165 /**
151 * 本地文件上传 166 * 本地文件上传
152 - * @param 文件 167 + * @param
153 * @param bizPath 自定义路径 168 * @param bizPath 自定义路径
154 * @return 169 * @return
155 */ 170 */
@@ -404,12 +419,16 @@ public class CommonController { @@ -404,12 +419,16 @@ public class CommonController {
404 return Result.error(e.getMessage()); 419 return Result.error(e.getMessage());
405 } 420 }
406 } 421 }
  422 +
407 @RequestMapping("/downLoad") 423 @RequestMapping("/downLoad")
408 - public void downloadFile(HttpServletResponse response, HttpSession session) {  
409 - String path = this.getClass().getClassLoader().getResource("").getPath()+"/file/华恒WMS4操作说明书.doc"; 424 + public void downloadFile(HttpServletResponse response) {
  425 + String path = parameterConfigurationService.getValueByCode(QuantityConstant.RULE_DOWN_ADDRESS);
  426 + if (StringUtils.isEmpty(path)){
  427 + response.setStatus(400);
  428 + return;
  429 + }
410 ServletOutputStream out = null; 430 ServletOutputStream out = null;
411 FileInputStream ips = null; 431 FileInputStream ips = null;
412 -  
413 try { 432 try {
414 //获取文件存放的路径 433 //获取文件存放的路径
415 File file = new File(path); 434 File file = new File(path);
@@ -441,7 +460,7 @@ public class CommonController { @@ -441,7 +460,7 @@ public class CommonController {
441 } 460 }
442 } 461 }
443 return; 462 return;
444 -  
445 } 463 }
446 464
  465 +
447 } 466 }
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/tv/TvController.java
@@ -3,8 +3,10 @@ package org.jeecg.modules.wms.api.tv; @@ -3,8 +3,10 @@ package org.jeecg.modules.wms.api.tv;
3 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; 3 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
4 import com.baomidou.mybatisplus.core.toolkit.Wrappers; 4 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
5 import io.swagger.annotations.Api; 5 import io.swagger.annotations.Api;
  6 +import lombok.extern.slf4j.Slf4j;
6 import org.jeecg.common.api.vo.Result; 7 import org.jeecg.common.api.vo.Result;
7 import org.jeecg.modules.wms.api.mobile.entity.TvTaskVo; 8 import org.jeecg.modules.wms.api.mobile.entity.TvTaskVo;
  9 +import org.jeecg.modules.wms.config.parameterConfiguration.service.IParameterConfigurationService;
8 import org.jeecg.modules.wms.task.taskHeader.entity.TaskDetail; 10 import org.jeecg.modules.wms.task.taskHeader.entity.TaskDetail;
9 import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader; 11 import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader;
10 import org.jeecg.modules.wms.task.taskHeader.service.impl.TaskDetailServiceImpl; 12 import org.jeecg.modules.wms.task.taskHeader.service.impl.TaskDetailServiceImpl;
@@ -17,6 +19,7 @@ import org.springframework.web.bind.annotation.RequestMapping; @@ -17,6 +19,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
17 import org.springframework.web.bind.annotation.RestController; 19 import org.springframework.web.bind.annotation.RestController;
18 20
19 import javax.annotation.Resource; 21 import javax.annotation.Resource;
  22 +import javax.servlet.http.HttpServletResponse;
20 import java.util.ArrayList; 23 import java.util.ArrayList;
21 import java.util.Arrays; 24 import java.util.Arrays;
22 import java.util.HashMap; 25 import java.util.HashMap;
@@ -27,6 +30,7 @@ import java.util.List; @@ -27,6 +30,7 @@ import java.util.List;
27 @Api(tags = "Mobile") 30 @Api(tags = "Mobile")
28 @RestController 31 @RestController
29 @RequestMapping("/api/tv") 32 @RequestMapping("/api/tv")
  33 +@Slf4j
30 public class TvController { 34 public class TvController {
31 35
32 @Value(value = "${server.servlet.context-path}") 36 @Value(value = "${server.servlet.context-path}")
@@ -36,10 +40,15 @@ public class TvController { @@ -36,10 +40,15 @@ public class TvController {
36 private TaskHeaderServiceImpl taskHeaderService; 40 private TaskHeaderServiceImpl taskHeaderService;
37 41
38 @Resource 42 @Resource
  43 + private IParameterConfigurationService parameterConfigurationService;
  44 +
  45 + @Resource
39 private TaskDetailServiceImpl taskDetailService; 46 private TaskDetailServiceImpl taskDetailService;
40 47
41 @GetMapping("taskOfStation") 48 @GetMapping("taskOfStation")
42 - public Result<List<TvTaskVo>> importExcel(String code) { 49 + public Result<List<TvTaskVo>> importExcel(String code, HttpServletResponse response) {
  50 +
  51 + addResponseHeader(response, QuantityConstant.TV_VERSION);
43 List<String> stationList = new ArrayList<>(); 52 List<String> stationList = new ArrayList<>();
44 if (StringUtils.isNotEmpty(code)) { 53 if (StringUtils.isNotEmpty(code)) {
45 stationList = Arrays.asList(code.split(",")); 54 stationList = Arrays.asList(code.split(","));
@@ -86,4 +95,19 @@ public class TvController { @@ -86,4 +95,19 @@ public class TvController {
86 } 95 }
87 return Result.OK("", list); 96 return Result.OK("", list);
88 } 97 }
  98 +
  99 + /**
  100 + * 添加前端版本号响应头
  101 + * @param response
  102 + * @param key
  103 + */
  104 + private void addResponseHeader(HttpServletResponse response, String key){
  105 + try {
  106 + String version = parameterConfigurationService.getValueByCode(key);
  107 + response.setHeader(key, version);
  108 + response.setHeader("Access-Control-Expose-Headers",key);
  109 + }catch (Exception e){
  110 + log.error("查找电视版本参数错误", e);
  111 + }
  112 + }
89 } 113 }
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/WcsServiceImpl.java
@@ -329,6 +329,7 @@ public class WcsServiceImpl implements WcsService { @@ -329,6 +329,7 @@ public class WcsServiceImpl implements WcsService {
329 break; 329 break;
330 case QuantityConstant.TASK_TYPE_WHOLERECEIPT: 330 case QuantityConstant.TASK_TYPE_WHOLERECEIPT:
331 case QuantityConstant.TASK_TYPE_EMPTYRECEIPT: 331 case QuantityConstant.TASK_TYPE_EMPTYRECEIPT:
  332 + case QuantityConstant.TASK_TYPE_OVER_STATION:
332 case QuantityConstant.TASK_TYPE_MANY_EMPTYRECEIPT: 333 case QuantityConstant.TASK_TYPE_MANY_EMPTYRECEIPT:
333 direction = true; 334 direction = true;
334 break; 335 break;
huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java
@@ -218,7 +218,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -218,7 +218,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
218 } 218 }
219 Location toLocation = locationService.getLocationByCode(toLocationCode, warehouseCode); 219 Location toLocation = locationService.getLocationByCode(toLocationCode, warehouseCode);
220 if (toLocation == null) { 220 if (toLocation == null) {
221 - return Result.error("创建移库任务时,目标库位:" + toLocation + "未找到"); 221 + return Result.error("创建移库任务时,目标库位:" + toLocationCode + "未找到");
222 } 222 }
223 String containerCode = fromLocation.getContainerCode(); 223 String containerCode = fromLocation.getContainerCode();
224 // 这里增加组盘校验,如果此托盘存在未完成的组盘数据,则不能移库 224 // 这里增加组盘校验,如果此托盘存在未完成的组盘数据,则不能移库
@@ -405,6 +405,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea @@ -405,6 +405,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl&lt;TaskHeaderMapper, TaskHea
405 if (toPort == null) { 405 if (toPort == null) {
406 return Result.error("创建跨站任务时,目标站台为空"); 406 return Result.error("创建跨站任务时,目标站台为空");
407 } 407 }
  408 + if (fromPortCode.equals(toPortCode)) {
  409 + return Result.error("创建跨站任务时,起始站台和目标站台不能相同");
  410 + }
408 Result result = taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_OVER_STATION, containerCode, QuantityConstant.EMPTY_STRING, 411 Result result = taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_OVER_STATION, containerCode, QuantityConstant.EMPTY_STRING,
409 QuantityConstant.EMPTY_STRING, warehouseCode); 412 QuantityConstant.EMPTY_STRING, warehouseCode);
410 if (!result.isSuccess()) { 413 if (!result.isSuccess()) {
huaheng-wms-core/src/main/java/org/jeecg/utils/constant/QuantityConstant.java
@@ -493,6 +493,8 @@ public class QuantityConstant { @@ -493,6 +493,8 @@ public class QuantityConstant {
493 public static final String RULE_DOCUMEMT_AUDIT_FLOW = "documentAduitFlow"; 493 public static final String RULE_DOCUMEMT_AUDIT_FLOW = "documentAduitFlow";
494 public static final String EMPTY_ROADWAY_DEFAULT = "emptyRoadWayDefault"; 494 public static final String EMPTY_ROADWAY_DEFAULT = "emptyRoadWayDefault";
495 public static final String RULE_CANCEL_TASK = "cancelTask"; 495 public static final String RULE_CANCEL_TASK = "cancelTask";
  496 + public static final String RULE_DOWN_ADDRESS = "downAdress";
  497 + public static final String TV_VERSION = "Tv-Ver";
496 498
497 public static final int DOUBLE_FORK = 1; 499 public static final int DOUBLE_FORK = 1;
498 public static final int SINGLE_FORK = 0; 500 public static final int SINGLE_FORK = 0;