diff --git a/ant-design-vue-jeecg/src/components/page/GlobalHeader.vue b/ant-design-vue-jeecg/src/components/page/GlobalHeader.vue index af8a0d2..e5df8c1 100644 --- a/ant-design-vue-jeecg/src/components/page/GlobalHeader.vue +++ b/ant-design-vue-jeecg/src/components/page/GlobalHeader.vue @@ -154,6 +154,7 @@ export default { downWord(){ var fileName='华恒WMS4操作说明书.doc'; return downFile(this.url.downLoad, fileName).then((data) => { + debugger this.$message.info("华恒WMS4操作说明书开始下载...."); if (!data || data.size === 0) { this.$message.error("文件下载失败"); diff --git a/ant-design-vue-jeecg/src/views/system/monitor/locationStatus.vue b/ant-design-vue-jeecg/src/views/system/monitor/locationStatus.vue index fa4b0fc..e9b328c 100644 --- a/ant-design-vue-jeecg/src/views/system/monitor/locationStatus.vue +++ b/ant-design-vue-jeecg/src/views/system/monitor/locationStatus.vue @@ -277,14 +277,14 @@ export default { let container_code = ''; let list_qty = 0; if (list_info[i].containerCode) { - container_code = "\n容器编码:" + list_info[i].containerCode + ""; + container_code = "\n容器编码:" + list_info[i].containerCode + ""; if (list_info[i].materialName) { for (let j = 0; j < list_info[i].materialName.length; j++) { let list_batch = list_info[i].batch[j] === null ? "无" : list_info[i].batch[j] === "" ? "无" : list_info[i].batch[j]; list_qty += list_info[i].qty[j]; if (j == list_info[i].materialName.length - 1) { - str_info = str_info + "\n批次:" + list_batch + ",物料名称:" + list_info[i].materialName[j] + ",物料编码:" + list_info[i].materialCode[j] + - ",数量:" + list_qty + "" + str_info = str_info + "\n物料信息:批次->" + list_batch + ",物料名称->" + list_info[i].materialName[j] + ",物料编码->" + list_info[i].materialCode[j] + + ",数量->" + list_qty + "" } @@ -292,7 +292,7 @@ export default { } } let code = list_info[i].code === null ? "无" : list_info[i].code; - $("[data-i='" + row + "']" + "[data-j='" + line + "']" + "[data-k='" + layers + "']").attr({"title": "第" + row + "行,第" + line + "列,第" + layers + "层\n库位:" + code + container_code + str_info}); + $("[data-i='" + row + "']" + "[data-j='" + line + "']" + "[data-k='" + layers + "']").attr({"title": "第" + row + "行,第" + line + "列,第" + layers + "层\n库位:" + code + container_code + str_info}); // Vue.prototype.$Jnotification.success({message: '系统提示', description: "第"+row+"行,第"+line+"列,第"+ layers +"层<br>库位:"+ code + container_code + str_info, duration: 4}) } @@ -488,8 +488,8 @@ export default { for (let j = 0; j < list_info[i].materialName.length; j++) { list_batch = list_info[i].batch[j] === null ? "无" : list_info[i].batch[j] === "" ? "无" : list_info[i].batch[j]; list_qty += list_info[i].qty[j]; - let str_info = "批次:" + list_batch + "/ 物料名称:" + list_info[i].materialName[j] + "/ 物料编码:" + list_info[i].materialCode[j] + - "/ 数量:" + list_qty + ""; + let str_info = "批次->" + list_batch + ",物料名称->" + list_info[i].materialName[j] + ",物料编码->" + list_info[i].materialCode[j] + + ",数量->" + list_qty + ""; if (j == list_info[i].materialName.length - 1) { $("#material").append("<option>" + str_info + "</option>"); } diff --git a/ant-design-vue-jeecg/src/views/system/receipt/ReceiveHeaderList.vue b/ant-design-vue-jeecg/src/views/system/receipt/ReceiveHeaderList.vue index 66a9d52..0600714 100644 --- a/ant-design-vue-jeecg/src/views/system/receipt/ReceiveHeaderList.vue +++ b/ant-design-vue-jeecg/src/views/system/receipt/ReceiveHeaderList.vue @@ -163,7 +163,6 @@ <a @click="handleEdit(record)"> <a-button type="primary">编辑</a-button><a-divider type="vertical"/> </a> - <a-divider type="vertical" /> <a-dropdown> <a class="ant-dropdown-link">更多 <a-icon type="down" /></a> <a-menu slot="overlay"> diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/system/controller/CommonController.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/system/controller/CommonController.java index 9ba8a45..0ef0b98 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/system/controller/CommonController.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/system/controller/CommonController.java @@ -2,13 +2,19 @@ package org.jeecg.modules.system.controller; import java.io.*; import java.net.URLDecoder; +import java.net.URLEncoder; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.StandardCopyOption; import java.util.Arrays; +import javax.annotation.Resource; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; +import net.bytebuddy.implementation.bytecode.Throw; import org.jeecg.common.api.vo.Result; import org.jeecg.common.constant.CommonConstant; import org.jeecg.common.exception.JeecgBootException; @@ -17,11 +23,16 @@ import org.jeecg.common.util.CommonUtils; import org.jeecg.common.util.RestUtil; import org.jeecg.common.util.TokenUtils; import org.jeecg.common.util.oConvertUtils; +import org.jeecg.modules.wms.config.parameterConfiguration.service.IParameterConfigurationService; +import org.jeecg.utils.StringUtils; +import org.jeecg.utils.constant.QuantityConstant; import org.jeecg.utils.support.ApiLogger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; +import org.springframework.core.io.ClassPathResource; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; +import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.http.server.ServletServerHttpRequest; import org.springframework.util.AntPathMatcher; @@ -56,6 +67,9 @@ public class CommonController { @Autowired private ISysBaseAPI sysBaseAPI; + @Resource + private IParameterConfigurationService parameterConfigurationService; + @Value(value = "${jeecg.path.upload}") private String uploadpath; @@ -71,6 +85,7 @@ public class CommonController { @Value(value = "${jeecg.uploadFileType}") private String uploadFileType; + /** * @Author 政辉 * @return @@ -149,7 +164,7 @@ public class CommonController { /** * 本地文件上传 - * @param 文件 + * @param * @param bizPath 自定义路径 * @return */ @@ -404,12 +419,16 @@ public class CommonController { return Result.error(e.getMessage()); } } + @RequestMapping("/downLoad") - public void downloadFile(HttpServletResponse response, HttpSession session) { - String path = this.getClass().getClassLoader().getResource("").getPath()+"/file/华恒WMS4操作说明书.doc"; + public void downloadFile(HttpServletResponse response) { + String path = parameterConfigurationService.getValueByCode(QuantityConstant.RULE_DOWN_ADDRESS); + if (StringUtils.isEmpty(path)){ + response.setStatus(400); + return; + } ServletOutputStream out = null; FileInputStream ips = null; - try { //获取文件存放的路径 File file = new File(path); @@ -441,7 +460,7 @@ public class CommonController { } } return; - } + } diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/tv/TvController.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/tv/TvController.java index f310b68..3b58b99 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/tv/TvController.java +++ b/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; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import io.swagger.annotations.Api; +import lombok.extern.slf4j.Slf4j; import org.jeecg.common.api.vo.Result; import org.jeecg.modules.wms.api.mobile.entity.TvTaskVo; +import org.jeecg.modules.wms.config.parameterConfiguration.service.IParameterConfigurationService; import org.jeecg.modules.wms.task.taskHeader.entity.TaskDetail; import org.jeecg.modules.wms.task.taskHeader.entity.TaskHeader; import org.jeecg.modules.wms.task.taskHeader.service.impl.TaskDetailServiceImpl; @@ -17,6 +19,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; @@ -27,6 +30,7 @@ import java.util.List; @Api(tags = "Mobile") @RestController @RequestMapping("/api/tv") +@Slf4j public class TvController { @Value(value = "${server.servlet.context-path}") @@ -36,10 +40,15 @@ public class TvController { private TaskHeaderServiceImpl taskHeaderService; @Resource + private IParameterConfigurationService parameterConfigurationService; + + @Resource private TaskDetailServiceImpl taskDetailService; @GetMapping("taskOfStation") - public Result<List<TvTaskVo>> importExcel(String code) { + public Result<List<TvTaskVo>> importExcel(String code, HttpServletResponse response) { + + addResponseHeader(response, QuantityConstant.TV_VERSION); List<String> stationList = new ArrayList<>(); if (StringUtils.isNotEmpty(code)) { stationList = Arrays.asList(code.split(",")); @@ -86,4 +95,19 @@ public class TvController { } return Result.OK("", list); } + + /** + * 添加前端版本号响应头 + * @param response + * @param key + */ + private void addResponseHeader(HttpServletResponse response, String key){ + try { + String version = parameterConfigurationService.getValueByCode(key); + response.setHeader(key, version); + response.setHeader("Access-Control-Expose-Headers",key); + }catch (Exception e){ + log.error("查找电视版本参数错误", e); + } + } } diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/WcsServiceImpl.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/WcsServiceImpl.java index c4dcce7..2700823 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/WcsServiceImpl.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/api/wcs/service/WcsServiceImpl.java @@ -329,6 +329,7 @@ public class WcsServiceImpl implements WcsService { break; case QuantityConstant.TASK_TYPE_WHOLERECEIPT: case QuantityConstant.TASK_TYPE_EMPTYRECEIPT: + case QuantityConstant.TASK_TYPE_OVER_STATION: case QuantityConstant.TASK_TYPE_MANY_EMPTYRECEIPT: direction = true; break; diff --git a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java b/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java index 20b657b..d5a7304 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/modules/wms/task/taskHeader/service/impl/TaskHeaderServiceImpl.java +++ b/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 } Location toLocation = locationService.getLocationByCode(toLocationCode, warehouseCode); if (toLocation == null) { - return Result.error("创建移库任务时,目标库位:" + toLocation + "未找到"); + return Result.error("创建移库任务时,目标库位:" + toLocationCode + "未找到"); } String containerCode = fromLocation.getContainerCode(); // 这里增加组盘校验,如果此托盘存在未完成的组盘数据,则不能移库 @@ -405,6 +405,9 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea if (toPort == null) { return Result.error("创建跨站任务时,目标站台为空"); } + if (fromPortCode.equals(toPortCode)) { + return Result.error("创建跨站任务时,起始站台和目标站台不能相同"); + } Result result = taskHeaderService.createTaskLockContainerAndLocation(QuantityConstant.TASK_TYPE_OVER_STATION, containerCode, QuantityConstant.EMPTY_STRING, QuantityConstant.EMPTY_STRING, warehouseCode); if (!result.isSuccess()) { diff --git a/huaheng-wms-core/src/main/java/org/jeecg/utils/constant/QuantityConstant.java b/huaheng-wms-core/src/main/java/org/jeecg/utils/constant/QuantityConstant.java index adf15b8..fd23ee1 100644 --- a/huaheng-wms-core/src/main/java/org/jeecg/utils/constant/QuantityConstant.java +++ b/huaheng-wms-core/src/main/java/org/jeecg/utils/constant/QuantityConstant.java @@ -493,6 +493,8 @@ public class QuantityConstant { public static final String RULE_DOCUMEMT_AUDIT_FLOW = "documentAduitFlow"; public static final String EMPTY_ROADWAY_DEFAULT = "emptyRoadWayDefault"; public static final String RULE_CANCEL_TASK = "cancelTask"; + public static final String RULE_DOWN_ADDRESS = "downAdress"; + public static final String TV_VERSION = "Tv-Ver"; public static final int DOUBLE_FORK = 1; public static final int SINGLE_FORK = 0;