Commit 5ba8a834bf6668eaf62e91e1bc939eb040fee442
Merge branch 'develop' of http://www.huahengrobot.com:90/wms/wms4 into develop
Showing
8 changed files
with
63 additions
and
14 deletions
ant-design-vue-jeecg/src/components/page/GlobalHeader.vue
... | ... | @@ -154,6 +154,7 @@ export default { |
154 | 154 | downWord(){ |
155 | 155 | var fileName='华恒WMS4操作说明书.doc'; |
156 | 156 | return downFile(this.url.downLoad, fileName).then((data) => { |
157 | + debugger | |
157 | 158 | this.$message.info("华恒WMS4操作说明书开始下载...."); |
158 | 159 | if (!data || data.size === 0) { |
159 | 160 | this.$message.error("文件下载失败"); |
... | ... |
ant-design-vue-jeecg/src/views/system/monitor/locationStatus.vue
... | ... | @@ -277,14 +277,14 @@ export default { |
277 | 277 | let container_code = ''; |
278 | 278 | let list_qty = 0; |
279 | 279 | if (list_info[i].containerCode) { |
280 | - container_code = "\n容器编码:" + list_info[i].containerCode + ""; | |
280 | + container_code = "\n容器编码:" + list_info[i].containerCode + ""; | |
281 | 281 | if (list_info[i].materialName) { |
282 | 282 | for (let j = 0; j < list_info[i].materialName.length; j++) { |
283 | 283 | let list_batch = list_info[i].batch[j] === null ? "无" : list_info[i].batch[j] === "" ? "无" : list_info[i].batch[j]; |
284 | 284 | list_qty += list_info[i].qty[j]; |
285 | 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 | 292 | } |
293 | 293 | } |
294 | 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 | 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 | 488 | for (let j = 0; j < list_info[i].materialName.length; j++) { |
489 | 489 | list_batch = list_info[i].batch[j] === null ? "无" : list_info[i].batch[j] === "" ? "无" : list_info[i].batch[j]; |
490 | 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 | 493 | if (j == list_info[i].materialName.length - 1) { |
494 | 494 | $("#material").append("<option>" + str_info + "</option>"); |
495 | 495 | } |
... | ... |
ant-design-vue-jeecg/src/views/system/receipt/ReceiveHeaderList.vue
... | ... | @@ -163,7 +163,6 @@ |
163 | 163 | <a @click="handleEdit(record)"> |
164 | 164 | <a-button type="primary">编辑</a-button><a-divider type="vertical"/> |
165 | 165 | </a> |
166 | - <a-divider type="vertical" /> | |
167 | 166 | <a-dropdown> |
168 | 167 | <a class="ant-dropdown-link">更多 <a-icon type="down" /></a> |
169 | 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 | 2 | |
3 | 3 | import java.io.*; |
4 | 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 | 9 | import java.util.Arrays; |
6 | 10 | |
11 | +import javax.annotation.Resource; | |
7 | 12 | import javax.servlet.ServletOutputStream; |
8 | 13 | import javax.servlet.http.HttpServletRequest; |
9 | 14 | import javax.servlet.http.HttpServletResponse; |
10 | 15 | import javax.servlet.http.HttpSession; |
11 | 16 | |
17 | +import net.bytebuddy.implementation.bytecode.Throw; | |
12 | 18 | import org.jeecg.common.api.vo.Result; |
13 | 19 | import org.jeecg.common.constant.CommonConstant; |
14 | 20 | import org.jeecg.common.exception.JeecgBootException; |
... | ... | @@ -17,11 +23,16 @@ import org.jeecg.common.util.CommonUtils; |
17 | 23 | import org.jeecg.common.util.RestUtil; |
18 | 24 | import org.jeecg.common.util.TokenUtils; |
19 | 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 | 29 | import org.jeecg.utils.support.ApiLogger; |
21 | 30 | import org.springframework.beans.factory.annotation.Autowired; |
22 | 31 | import org.springframework.beans.factory.annotation.Value; |
32 | +import org.springframework.core.io.ClassPathResource; | |
23 | 33 | import org.springframework.http.HttpHeaders; |
24 | 34 | import org.springframework.http.HttpMethod; |
35 | +import org.springframework.http.MediaType; | |
25 | 36 | import org.springframework.http.ResponseEntity; |
26 | 37 | import org.springframework.http.server.ServletServerHttpRequest; |
27 | 38 | import org.springframework.util.AntPathMatcher; |
... | ... | @@ -56,6 +67,9 @@ public class CommonController { |
56 | 67 | @Autowired |
57 | 68 | private ISysBaseAPI sysBaseAPI; |
58 | 69 | |
70 | + @Resource | |
71 | + private IParameterConfigurationService parameterConfigurationService; | |
72 | + | |
59 | 73 | @Value(value = "${jeecg.path.upload}") |
60 | 74 | private String uploadpath; |
61 | 75 | |
... | ... | @@ -71,6 +85,7 @@ public class CommonController { |
71 | 85 | @Value(value = "${jeecg.uploadFileType}") |
72 | 86 | private String uploadFileType; |
73 | 87 | |
88 | + | |
74 | 89 | /** |
75 | 90 | * @Author 政辉 |
76 | 91 | * @return |
... | ... | @@ -149,7 +164,7 @@ public class CommonController { |
149 | 164 | |
150 | 165 | /** |
151 | 166 | * 本地文件上传 |
152 | - * @param 文件 | |
167 | + * @param | |
153 | 168 | * @param bizPath 自定义路径 |
154 | 169 | * @return |
155 | 170 | */ |
... | ... | @@ -404,12 +419,16 @@ public class CommonController { |
404 | 419 | return Result.error(e.getMessage()); |
405 | 420 | } |
406 | 421 | } |
422 | + | |
407 | 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 | 430 | ServletOutputStream out = null; |
411 | 431 | FileInputStream ips = null; |
412 | - | |
413 | 432 | try { |
414 | 433 | //获取文件存放的路径 |
415 | 434 | File file = new File(path); |
... | ... | @@ -441,7 +460,7 @@ public class CommonController { |
441 | 460 | } |
442 | 461 | } |
443 | 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 | 3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
4 | 4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
5 | 5 | import io.swagger.annotations.Api; |
6 | +import lombok.extern.slf4j.Slf4j; | |
6 | 7 | import org.jeecg.common.api.vo.Result; |
7 | 8 | import org.jeecg.modules.wms.api.mobile.entity.TvTaskVo; |
9 | +import org.jeecg.modules.wms.config.parameterConfiguration.service.IParameterConfigurationService; | |
8 | 10 | import org.jeecg.modules.wms.task.taskHeader.entity.TaskDetail; |
9 | 11 | import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader; |
10 | 12 | import org.jeecg.modules.wms.task.taskHeader.service.impl.TaskDetailServiceImpl; |
... | ... | @@ -17,6 +19,7 @@ import org.springframework.web.bind.annotation.RequestMapping; |
17 | 19 | import org.springframework.web.bind.annotation.RestController; |
18 | 20 | |
19 | 21 | import javax.annotation.Resource; |
22 | +import javax.servlet.http.HttpServletResponse; | |
20 | 23 | import java.util.ArrayList; |
21 | 24 | import java.util.Arrays; |
22 | 25 | import java.util.HashMap; |
... | ... | @@ -27,6 +30,7 @@ import java.util.List; |
27 | 30 | @Api(tags = "Mobile") |
28 | 31 | @RestController |
29 | 32 | @RequestMapping("/api/tv") |
33 | +@Slf4j | |
30 | 34 | public class TvController { |
31 | 35 | |
32 | 36 | @Value(value = "${server.servlet.context-path}") |
... | ... | @@ -36,10 +40,15 @@ public class TvController { |
36 | 40 | private TaskHeaderServiceImpl taskHeaderService; |
37 | 41 | |
38 | 42 | @Resource |
43 | + private IParameterConfigurationService parameterConfigurationService; | |
44 | + | |
45 | + @Resource | |
39 | 46 | private TaskDetailServiceImpl taskDetailService; |
40 | 47 | |
41 | 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 | 52 | List<String> stationList = new ArrayList<>(); |
44 | 53 | if (StringUtils.isNotEmpty(code)) { |
45 | 54 | stationList = Arrays.asList(code.split(",")); |
... | ... | @@ -86,4 +95,19 @@ public class TvController { |
86 | 95 | } |
87 | 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 | 329 | break; |
330 | 330 | case QuantityConstant.TASK_TYPE_WHOLERECEIPT: |
331 | 331 | case QuantityConstant.TASK_TYPE_EMPTYRECEIPT: |
332 | + case QuantityConstant.TASK_TYPE_OVER_STATION: | |
332 | 333 | case QuantityConstant.TASK_TYPE_MANY_EMPTYRECEIPT: |
333 | 334 | direction = true; |
334 | 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<TaskHeaderMapper, TaskHea |
218 | 218 | } |
219 | 219 | Location toLocation = locationService.getLocationByCode(toLocationCode, warehouseCode); |
220 | 220 | if (toLocation == null) { |
221 | - return Result.error("创建移库任务时,目标库位:" + toLocation + "未找到"); | |
221 | + return Result.error("创建移库任务时,目标库位:" + toLocationCode + "未找到"); | |
222 | 222 | } |
223 | 223 | String containerCode = fromLocation.getContainerCode(); |
224 | 224 | // 这里增加组盘校验,如果此托盘存在未完成的组盘数据,则不能移库 |
... | ... | @@ -405,6 +405,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
405 | 405 | if (toPort == null) { |
406 | 406 | return Result.error("创建跨站任务时,目标站台为空"); |
407 | 407 | } |
408 | + if (fromPortCode.equals(toPortCode)) { | |
409 | + return Result.error("创建跨站任务时,起始站台和目标站台不能相同"); | |
410 | + } | |
408 | 411 | Result result = taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_OVER_STATION, containerCode, QuantityConstant.EMPTY_STRING, |
409 | 412 | QuantityConstant.EMPTY_STRING, warehouseCode); |
410 | 413 | if (!result.isSuccess()) { |
... | ... |
huaheng-wms-core/src/main/java/org/jeecg/utils/constant/QuantityConstant.java
... | ... | @@ -493,6 +493,8 @@ public class QuantityConstant { |
493 | 493 | public static final String RULE_DOCUMEMT_AUDIT_FLOW = "documentAduitFlow"; |
494 | 494 | public static final String EMPTY_ROADWAY_DEFAULT = "emptyRoadWayDefault"; |
495 | 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 | 499 | public static final int DOUBLE_FORK = 1; |
498 | 500 | public static final int SINGLE_FORK = 0; |
... | ... |