尝试提交
This commit is contained in:
parent
552d999e2b
commit
39b46765a2
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 50dff8130e8604b793483f84fbfb7c7091e5a865
|
||||
5
202504-Wms-MengYang-box/.idea/.gitignore
vendored
Normal file
5
202504-Wms-MengYang-box/.idea/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Environment-dependent path to Maven home directory
|
||||
/mavenHomeManager.xml
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
6
202504-Wms-MengYang-box/.idea/misc.xml
Normal file
6
202504-Wms-MengYang-box/.idea/misc.xml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
8
202504-Wms-MengYang-box/.idea/modules.xml
Normal file
8
202504-Wms-MengYang-box/.idea/modules.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/202504-Wms-MengYang-box.iml" filepath="$PROJECT_DIR$/.idea/202504-Wms-MengYang-box.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
7
202504-Wms-MengYang-box/.idea/vcs.xml
Normal file
7
202504-Wms-MengYang-box/.idea/vcs.xml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
23770
202504-Wms-MengYang-box/db/wms_mengyang_box.sql
Normal file
23770
202504-Wms-MengYang-box/db/wms_mengyang_box.sql
Normal file
File diff suppressed because it is too large
Load Diff
30
202504-Wms-MengYang-box/wms_serve_mengyang/.gitignore
vendored
Normal file
30
202504-Wms-MengYang-box/wms_serve_mengyang/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
# ---> Java
|
||||
# Compiled class file
|
||||
*.class
|
||||
|
||||
# Log file
|
||||
*.log
|
||||
|
||||
# BlueJ files
|
||||
*.ctxt
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
*.war
|
||||
*.nar
|
||||
*.ear
|
||||
*.zip
|
||||
*.tar.gz
|
||||
*.rar
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
replay_pid*
|
||||
|
||||
/target/
|
||||
/.idea/inspectionProfiles/Project_Default.xml
|
||||
/.idea/CoolRequestHistoryPersistent.xml
|
||||
/.idea/CoolRequestCookiePersistent.xml
|
||||
8
202504-Wms-MengYang-box/wms_serve_mengyang/.idea/.gitignore
vendored
Normal file
8
202504-Wms-MengYang-box/wms_serve_mengyang/.idea/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# 默认忽略的文件
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# 基于编辑器的 HTTP 客户端请求
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CommonStatePersistent">
|
||||
<option name="searchCache" value="Vechile" />
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CoolRequestCommonStatePersistent">
|
||||
<option name="searchCache" value="TAPPTaskBak" />
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,40 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CoolRequestSetting">
|
||||
<option name="serializePaths">
|
||||
<list>
|
||||
<option value="C:\Users\btoba\.config\.cool-request\request\serialize\0731597f11a84ef9a829b9c437031693" />
|
||||
<option value="C:\Users\btoba\.config\.cool-request\request\serialize\c2da60b5bb4f438da6ff954a1346b32a" />
|
||||
<option value="C:\Users\btoba\.config\.cool-request\request\serialize\85ec0988f8bb450badbde0c5045e6f4f" />
|
||||
<option value="C:\Users\btoba\.config\.cool-request\request\serialize\61490adb4d49462aaa40afbbac8699e6" />
|
||||
<option value="C:\Users\btoba\.config\.cool-request\request\serialize\76cdc0dbab984b13a97a0db9a3df6095" />
|
||||
<option value="C:\Users\btoba\.config\.cool-request\request\serialize\36536ff461cd40c988172b846eb25446" />
|
||||
<option value="C:\Users\btoba\.config\.cool-request\request\serialize\b6d54e66c7284e47989ca35b263db167" />
|
||||
<option value="C:\Users\btoba\.config\.cool-request\request\serialize\2be9aef4c51247b89ce2e1cd4b2df4fc" />
|
||||
<option value="C:\Users\btoba\.config\.cool-request\request\serialize\b3cc1afd501342d99c561026bce48d76" />
|
||||
<option value="C:\Users\btoba\.config\.cool-request\request\serialize\8fae6093623c4ac5a1c0365a4ded5536" />
|
||||
<option value="C:\Users\btoba\.config\.cool-request\request\serialize\acedef38ef5940a598c4ffe04e50c401" />
|
||||
<option value="C:\Users\btoba\.config\.cool-request\request\serialize\7ade37455d3e4d0ab3491e3a869f61f5" />
|
||||
<option value="C:\Users\btoba\.config\.cool-request\request\serialize\d15666989172454c805e3b2272e04141" />
|
||||
<option value="C:\Users\btoba\.config\.cool-request\request\serialize\d1888b44bae647b08e8125548c6bb98e" />
|
||||
<option value="C:\Users\btoba\.config\.cool-request\request\serialize\dff01454c888463d8f560f44f5704845" />
|
||||
<option value="C:\Users\btoba\.config\.cool-request\request\serialize\301bbc7b37a248a6854096f807d20d29" />
|
||||
<option value="C:\Users\btoba\.config\.cool-request\request\serialize\fee8eb3055c54e0ab41294f6f8d53bef" />
|
||||
<option value="C:\Users\btoba\.config\.cool-request\request\serialize\067a1c7afeb64b63aaf87483016a0581" />
|
||||
<option value="C:\Users\btoba\.config\.cool-request\request\serialize\bee22dfdeffc4d5998c22fdeddebae26" />
|
||||
<option value="C:\Users\btoba\.config\.cool-request\request\serialize\fa7cf9b8dcfb4c8f9a2f8b6397c8b561" />
|
||||
<option value="C:\Users\btoba\.config\.cool-request\request\serialize\969f157d209a4d95bd33fb4c78fbb865" />
|
||||
<option value="C:\Users\btoba\.config\.cool-request\request\serialize\1b50b1aa4d154b7d958596a91c09d973" />
|
||||
<option value="C:\Users\btoba\.config\.cool-request\request\serialize\60a6a267ee424dada8a2cc2013695964" />
|
||||
<option value="C:\Users\btoba\.config\.cool-request\request\serialize\e2629fff699d4beda8d0d9d21552856e" />
|
||||
<option value="C:\Users\btoba\.config\.cool-request\request\serialize\09af44f9079d463e9d2d962caeb47d24" />
|
||||
<option value="C:\Users\btoba\.config\.cool-request\request\serialize\68b9bda72d11450aa3f7dc61d37426cd" />
|
||||
<option value="C:\Users\btoba\.config\.cool-request\request\serialize\ca1c303e1c9240c8b279b02ea529b049" />
|
||||
<option value="C:\Users\btoba\.config\.cool-request\request\serialize\fb590408ed954d6f82ac99c73b3838ee" />
|
||||
<option value="C:\Users\btoba\.config\.cool-request\request\serialize\2f629eccee904dcb8da5d5a04d549c6d" />
|
||||
<option value="C:\Users\btoba\.config\.cool-request\request\serialize\949fb2693bfb4d649e246b767241ae51" />
|
||||
</list>
|
||||
</option>
|
||||
<option name="projectCachePath" value="project-b7ef1676-f3ff-4c1d-950c-a8cb1bbc2462" />
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<annotationProcessing>
|
||||
<profile default="true" name="Default" enabled="true" />
|
||||
<profile name="Maven default annotation processors profile" enabled="true">
|
||||
<sourceOutputDir name="target/generated-sources/annotations" />
|
||||
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
|
||||
<outputRelativeToContentRoot value="true" />
|
||||
<module name="dev_wms_serve" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
</component>
|
||||
<component name="JavacSettings">
|
||||
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
|
||||
<module name="dev_wms_serve" options="-parameters" />
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/src/main/java/com/wms_main/service/quartz_job/serviceImpl/JobServiceImpl.java" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RemoteRepositoriesConfiguration">
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Maven Central repository" />
|
||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="jboss.community" />
|
||||
<option name="name" value="JBoss Community repository" />
|
||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Central Repository" />
|
||||
<option name="url" value="https://maven.aliyun.com/repository/public" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
||||
12
202504-Wms-MengYang-box/wms_serve_mengyang/.idea/misc.xml
Normal file
12
202504-Wms-MengYang-box/wms_serve_mengyang/.idea/misc.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="MavenProjectsManager">
|
||||
<option name="originalFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="21" project-jdk-type="JavaSDK" />
|
||||
</project>
|
||||
7
202504-Wms-MengYang-box/wms_serve_mengyang/.idea/vcs.xml
Normal file
7
202504-Wms-MengYang-box/wms_serve_mengyang/.idea/vcs.xml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
138
202504-Wms-MengYang-box/wms_serve_mengyang/CLAUDE.md
Normal file
138
202504-Wms-MengYang-box/wms_serve_mengyang/CLAUDE.md
Normal file
|
|
@ -0,0 +1,138 @@
|
|||
# CLAUDE.md
|
||||
|
||||
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
||||
|
||||
## 项目概述
|
||||
|
||||
这是一个宝应梦阳WMS(仓库管理系统)后端项目,基于Spring Boot 3.3.5和Java 21开发,使用Maven构建。系统管理仓库的入库、出库、库存和任务调度等核心业务。
|
||||
|
||||
## 开发环境设置
|
||||
|
||||
### 构建和运行命令
|
||||
```bash
|
||||
# 编译项目
|
||||
mvn clean compile
|
||||
|
||||
# 打包项目
|
||||
mvn clean package
|
||||
|
||||
# 运行项目
|
||||
mvn spring-boot:run
|
||||
|
||||
# 跳过测试运行(默认配置)
|
||||
mvn clean package -Dmaven.test.skip=true
|
||||
```
|
||||
|
||||
### 数据库配置
|
||||
- 本地开发:MySQL `localhost:3306/wms_mengyang_box`
|
||||
- 生产环境:MySQL `10.18.58.21:3306/wms_yachi_nantong`
|
||||
- 用户名/密码:本地使用root/root,生产使用user/user
|
||||
|
||||
### 应用配置
|
||||
- 服务端口:12315
|
||||
- 应用名称:wms_main
|
||||
- 文件上传限制:单文件100MB,总计1000MB
|
||||
|
||||
## 核心架构
|
||||
|
||||
### 分层架构
|
||||
系统采用标准的MVC三层架构:
|
||||
- **Controller层**:REST API接口,包含mywms和wms两个模块
|
||||
- **Service层**:业务逻辑层,分为controller、business、api三个子模块
|
||||
- **DAO层**:数据访问层,使用MyBatis-Plus
|
||||
|
||||
### 核心业务模块
|
||||
|
||||
#### 1. MyWMS模块 (`controller/mywms/`)
|
||||
自定义WMS接口:
|
||||
- `POST /orderIn` - 入库订单接口
|
||||
- `POST /orderOut` - 出库订单接口
|
||||
- `POST /stock` - 库存查询接口
|
||||
|
||||
#### 2. 深度策略服务 (`service/business/DepthStrategyService`)
|
||||
核心算法模块,实现智能仓储策略:
|
||||
- 支持托盘库(TP)和料箱库(BOX)两种存储类型
|
||||
- 动态深度分析和出库优化策略
|
||||
|
||||
#### 3. 任务调度系统 (`service/quartz_job/`)
|
||||
基于Quartz的定时任务:
|
||||
- `WmsTaskExecutor` - WMS任务执行器
|
||||
- `MyOutExecutor` - 出库任务执行器
|
||||
- `WcsStackerTaskSender` - WCS任务发送器
|
||||
|
||||
#### 4. 设备集成 (`service/api/`)
|
||||
- `WcsApiService` - WCS系统集成
|
||||
- `ExternalApiService` - 外部系统API调用
|
||||
|
||||
### 数据模型结构
|
||||
- `po/` - 数据库实体对象(Persistent Object)
|
||||
- `dto/request/` - 请求数据传输对象
|
||||
- `dto/response/` - 响应数据传输对象
|
||||
- `bo/` - 业务对象(Business Object)
|
||||
- `vo/` - 视图对象(View Object)
|
||||
|
||||
### 常用枚举类 (`constant/enums/`)
|
||||
- `StorageTypeEnums` - 存储类型(托盘库TP/料箱库BOX)
|
||||
- `WmsDepthStrategyEnums` - 深度策略枚举
|
||||
- `WmsTaskTypeEnums` - 任务类型枚举
|
||||
- `OrderStatusEnum` - 订单状态枚举
|
||||
|
||||
## 技术栈
|
||||
|
||||
### 核心依赖
|
||||
- Spring Boot Web 3.3.5 - REST API框架
|
||||
- Spring Boot Quartz - 定时任务调度
|
||||
- MyBatis-Plus 3.5.7 - ORM框架
|
||||
- MySQL Connector - 数据库连接
|
||||
- Lombok - 代码简化
|
||||
|
||||
### 工具库
|
||||
- Hutool 5.8.33 - Java工具类库
|
||||
- FastJSON 2.0.21 - JSON处理
|
||||
- EasyExcel 4.0.3 & EasyPOI 4.5.0 - Excel处理
|
||||
- Apache HttpClient 4.5.13 - HTTP客户端
|
||||
- Google Guava 33.3.1 - 集合工具
|
||||
|
||||
## 开发注意事项
|
||||
|
||||
### 代码规范
|
||||
- 使用Lombok注解减少样板代码
|
||||
- 统一的API响应格式(WmsApiResponse)
|
||||
- 枚举类管理常量值
|
||||
- 接口-实现分离的服务层设计
|
||||
|
||||
### 数据库操作
|
||||
- 使用MyBatis-Plus进行ORM操作
|
||||
- 支持批量操作和事务处理
|
||||
- 驼峰命名自动映射
|
||||
- ID生成策略:assign_id
|
||||
|
||||
### 错误处理
|
||||
- 统一异常处理器:`WmsControllerExceptionHandler`
|
||||
- 标准化错误码:`WmsApiResponseCodeEnums`
|
||||
- 请求日志过滤器:`RequestLogFilter`
|
||||
|
||||
### Excel处理
|
||||
系统支持完整的Excel导入导出功能:
|
||||
- 货物信息、产品信息、库存信息等业务数据
|
||||
- 使用EasyExcel和EasyPOI双重支持
|
||||
- 模板位置:`excel/easypoi/excelTemplate/`
|
||||
|
||||
## 外部系统集成
|
||||
|
||||
### WCS系统集成
|
||||
- 堆垛机任务调度
|
||||
- 载具管理(托盘和料箱)
|
||||
- TCP/HTTP通信协议
|
||||
|
||||
### MES系统对接
|
||||
- 制造执行系统数据交换
|
||||
- 生产任务状态同步
|
||||
|
||||
## 测试说明
|
||||
|
||||
项目配置中跳过了单元测试执行(`maven-surefire-plugin.skip=true`),在开发新功能时建议:
|
||||
1. 先实现功能代码
|
||||
2. 使用Postman等工具进行API测试
|
||||
3. 检查数据库数据状态
|
||||
4. 验证定时任务执行情况
|
||||
3
202504-Wms-MengYang-box/wms_serve_mengyang/README.md
Normal file
3
202504-Wms-MengYang-box/wms_serve_mengyang/README.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# wms_serve_mengyang
|
||||
|
||||
宝应梦阳WMS后端
|
||||
259
202504-Wms-MengYang-box/wms_serve_mengyang/mvnw
vendored
Normal file
259
202504-Wms-MengYang-box/wms_serve_mengyang/mvnw
vendored
Normal file
|
|
@ -0,0 +1,259 @@
|
|||
#!/bin/sh
|
||||
# ----------------------------------------------------------------------------
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Apache Maven Wrapper startup batch script, version 3.3.2
|
||||
#
|
||||
# Optional ENV vars
|
||||
# -----------------
|
||||
# JAVA_HOME - location of a JDK home dir, required when download maven via java source
|
||||
# MVNW_REPOURL - repo url base for downloading maven distribution
|
||||
# MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven
|
||||
# MVNW_VERBOSE - true: enable verbose log; debug: trace the mvnw script; others: silence the output
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
set -euf
|
||||
[ "${MVNW_VERBOSE-}" != debug ] || set -x
|
||||
|
||||
# OS specific support.
|
||||
native_path() { printf %s\\n "$1"; }
|
||||
case "$(uname)" in
|
||||
CYGWIN* | MINGW*)
|
||||
[ -z "${JAVA_HOME-}" ] || JAVA_HOME="$(cygpath --unix "$JAVA_HOME")"
|
||||
native_path() { cygpath --path --windows "$1"; }
|
||||
;;
|
||||
esac
|
||||
|
||||
# set JAVACMD and JAVACCMD
|
||||
set_java_home() {
|
||||
# For Cygwin and MinGW, ensure paths are in Unix format before anything is touched
|
||||
if [ -n "${JAVA_HOME-}" ]; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ]; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
JAVACCMD="$JAVA_HOME/jre/sh/javac"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
JAVACCMD="$JAVA_HOME/bin/javac"
|
||||
|
||||
if [ ! -x "$JAVACMD" ] || [ ! -x "$JAVACCMD" ]; then
|
||||
echo "The JAVA_HOME environment variable is not defined correctly, so mvnw cannot run." >&2
|
||||
echo "JAVA_HOME is set to \"$JAVA_HOME\", but \"\$JAVA_HOME/bin/java\" or \"\$JAVA_HOME/bin/javac\" does not exist." >&2
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
else
|
||||
JAVACMD="$(
|
||||
'set' +e
|
||||
'unset' -f command 2>/dev/null
|
||||
'command' -v java
|
||||
)" || :
|
||||
JAVACCMD="$(
|
||||
'set' +e
|
||||
'unset' -f command 2>/dev/null
|
||||
'command' -v javac
|
||||
)" || :
|
||||
|
||||
if [ ! -x "${JAVACMD-}" ] || [ ! -x "${JAVACCMD-}" ]; then
|
||||
echo "The java/javac command does not exist in PATH nor is JAVA_HOME set, so mvnw cannot run." >&2
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# hash string like Java String::hashCode
|
||||
hash_string() {
|
||||
str="${1:-}" h=0
|
||||
while [ -n "$str" ]; do
|
||||
char="${str%"${str#?}"}"
|
||||
h=$(((h * 31 + $(LC_CTYPE=C printf %d "'$char")) % 4294967296))
|
||||
str="${str#?}"
|
||||
done
|
||||
printf %x\\n $h
|
||||
}
|
||||
|
||||
verbose() { :; }
|
||||
[ "${MVNW_VERBOSE-}" != true ] || verbose() { printf %s\\n "${1-}"; }
|
||||
|
||||
die() {
|
||||
printf %s\\n "$1" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
trim() {
|
||||
# MWRAPPER-139:
|
||||
# Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds.
|
||||
# Needed for removing poorly interpreted newline sequences when running in more
|
||||
# exotic environments such as mingw bash on Windows.
|
||||
printf "%s" "${1}" | tr -d '[:space:]'
|
||||
}
|
||||
|
||||
# parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties
|
||||
while IFS="=" read -r key value; do
|
||||
case "${key-}" in
|
||||
distributionUrl) distributionUrl=$(trim "${value-}") ;;
|
||||
distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;;
|
||||
esac
|
||||
done <"${0%/*}/.mvn/wrapper/maven-wrapper.properties"
|
||||
[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in ${0%/*}/.mvn/wrapper/maven-wrapper.properties"
|
||||
|
||||
case "${distributionUrl##*/}" in
|
||||
maven-mvnd-*bin.*)
|
||||
MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/
|
||||
case "${PROCESSOR_ARCHITECTURE-}${PROCESSOR_ARCHITEW6432-}:$(uname -a)" in
|
||||
*AMD64:CYGWIN* | *AMD64:MINGW*) distributionPlatform=windows-amd64 ;;
|
||||
:Darwin*x86_64) distributionPlatform=darwin-amd64 ;;
|
||||
:Darwin*arm64) distributionPlatform=darwin-aarch64 ;;
|
||||
:Linux*x86_64*) distributionPlatform=linux-amd64 ;;
|
||||
*)
|
||||
echo "Cannot detect native platform for mvnd on $(uname)-$(uname -m), use pure java version" >&2
|
||||
distributionPlatform=linux-amd64
|
||||
;;
|
||||
esac
|
||||
distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip"
|
||||
;;
|
||||
maven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;;
|
||||
*) MVN_CMD="mvn${0##*/mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;;
|
||||
esac
|
||||
|
||||
# apply MVNW_REPOURL and calculate MAVEN_HOME
|
||||
# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash>
|
||||
[ -z "${MVNW_REPOURL-}" ] || distributionUrl="$MVNW_REPOURL$_MVNW_REPO_PATTERN${distributionUrl#*"$_MVNW_REPO_PATTERN"}"
|
||||
distributionUrlName="${distributionUrl##*/}"
|
||||
distributionUrlNameMain="${distributionUrlName%.*}"
|
||||
distributionUrlNameMain="${distributionUrlNameMain%-bin}"
|
||||
MAVEN_USER_HOME="${MAVEN_USER_HOME:-${HOME}/.m2}"
|
||||
MAVEN_HOME="${MAVEN_USER_HOME}/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")"
|
||||
|
||||
exec_maven() {
|
||||
unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || :
|
||||
exec "$MAVEN_HOME/bin/$MVN_CMD" "$@" || die "cannot exec $MAVEN_HOME/bin/$MVN_CMD"
|
||||
}
|
||||
|
||||
if [ -d "$MAVEN_HOME" ]; then
|
||||
verbose "found existing MAVEN_HOME at $MAVEN_HOME"
|
||||
exec_maven "$@"
|
||||
fi
|
||||
|
||||
case "${distributionUrl-}" in
|
||||
*?-bin.zip | *?maven-mvnd-?*-?*.zip) ;;
|
||||
*) die "distributionUrl is not valid, must match *-bin.zip or maven-mvnd-*.zip, but found '${distributionUrl-}'" ;;
|
||||
esac
|
||||
|
||||
# prepare tmp dir
|
||||
if TMP_DOWNLOAD_DIR="$(mktemp -d)" && [ -d "$TMP_DOWNLOAD_DIR" ]; then
|
||||
clean() { rm -rf -- "$TMP_DOWNLOAD_DIR"; }
|
||||
trap clean HUP INT TERM EXIT
|
||||
else
|
||||
die "cannot create temp dir"
|
||||
fi
|
||||
|
||||
mkdir -p -- "${MAVEN_HOME%/*}"
|
||||
|
||||
# Download and Install Apache Maven
|
||||
verbose "Couldn't find MAVEN_HOME, downloading and installing it ..."
|
||||
verbose "Downloading from: $distributionUrl"
|
||||
verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName"
|
||||
|
||||
# select .zip or .tar.gz
|
||||
if ! command -v unzip >/dev/null; then
|
||||
distributionUrl="${distributionUrl%.zip}.tar.gz"
|
||||
distributionUrlName="${distributionUrl##*/}"
|
||||
fi
|
||||
|
||||
# verbose opt
|
||||
__MVNW_QUIET_WGET=--quiet __MVNW_QUIET_CURL=--silent __MVNW_QUIET_UNZIP=-q __MVNW_QUIET_TAR=''
|
||||
[ "${MVNW_VERBOSE-}" != true ] || __MVNW_QUIET_WGET='' __MVNW_QUIET_CURL='' __MVNW_QUIET_UNZIP='' __MVNW_QUIET_TAR=v
|
||||
|
||||
# normalize api auth
|
||||
case "${MVNW_PASSWORD:+has-password}" in
|
||||
'') MVNW_USERNAME='' MVNW_PASSWORD='' ;;
|
||||
has-password) [ -n "${MVNW_USERNAME-}" ] || MVNW_USERNAME='' MVNW_PASSWORD='' ;;
|
||||
esac
|
||||
|
||||
if [ -z "${MVNW_USERNAME-}" ] && command -v wget >/dev/null; then
|
||||
verbose "Found wget ... using wget"
|
||||
wget ${__MVNW_QUIET_WGET:+"$__MVNW_QUIET_WGET"} "$distributionUrl" -O "$TMP_DOWNLOAD_DIR/$distributionUrlName" || die "wget: Failed to fetch $distributionUrl"
|
||||
elif [ -z "${MVNW_USERNAME-}" ] && command -v curl >/dev/null; then
|
||||
verbose "Found curl ... using curl"
|
||||
curl ${__MVNW_QUIET_CURL:+"$__MVNW_QUIET_CURL"} -f -L -o "$TMP_DOWNLOAD_DIR/$distributionUrlName" "$distributionUrl" || die "curl: Failed to fetch $distributionUrl"
|
||||
elif set_java_home; then
|
||||
verbose "Falling back to use Java to download"
|
||||
javaSource="$TMP_DOWNLOAD_DIR/Downloader.java"
|
||||
targetZip="$TMP_DOWNLOAD_DIR/$distributionUrlName"
|
||||
cat >"$javaSource" <<-END
|
||||
public class Downloader extends java.net.Authenticator
|
||||
{
|
||||
protected java.net.PasswordAuthentication getPasswordAuthentication()
|
||||
{
|
||||
return new java.net.PasswordAuthentication( System.getenv( "MVNW_USERNAME" ), System.getenv( "MVNW_PASSWORD" ).toCharArray() );
|
||||
}
|
||||
public static void main( String[] args ) throws Exception
|
||||
{
|
||||
setDefault( new Downloader() );
|
||||
java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() );
|
||||
}
|
||||
}
|
||||
END
|
||||
# For Cygwin/MinGW, switch paths to Windows format before running javac and java
|
||||
verbose " - Compiling Downloader.java ..."
|
||||
"$(native_path "$JAVACCMD")" "$(native_path "$javaSource")" || die "Failed to compile Downloader.java"
|
||||
verbose " - Running Downloader.java ..."
|
||||
"$(native_path "$JAVACMD")" -cp "$(native_path "$TMP_DOWNLOAD_DIR")" Downloader "$distributionUrl" "$(native_path "$targetZip")"
|
||||
fi
|
||||
|
||||
# If specified, validate the SHA-256 sum of the Maven distribution zip file
|
||||
if [ -n "${distributionSha256Sum-}" ]; then
|
||||
distributionSha256Result=false
|
||||
if [ "$MVN_CMD" = mvnd.sh ]; then
|
||||
echo "Checksum validation is not supported for maven-mvnd." >&2
|
||||
echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2
|
||||
exit 1
|
||||
elif command -v sha256sum >/dev/null; then
|
||||
if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c >/dev/null 2>&1; then
|
||||
distributionSha256Result=true
|
||||
fi
|
||||
elif command -v shasum >/dev/null; then
|
||||
if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | shasum -a 256 -c >/dev/null 2>&1; then
|
||||
distributionSha256Result=true
|
||||
fi
|
||||
else
|
||||
echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." >&2
|
||||
echo "Please install either command, or disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2
|
||||
exit 1
|
||||
fi
|
||||
if [ $distributionSha256Result = false ]; then
|
||||
echo "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised." >&2
|
||||
echo "If you updated your Maven version, you need to update the specified distributionSha256Sum property." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# unzip and move
|
||||
if command -v unzip >/dev/null; then
|
||||
unzip ${__MVNW_QUIET_UNZIP:+"$__MVNW_QUIET_UNZIP"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -d "$TMP_DOWNLOAD_DIR" || die "failed to unzip"
|
||||
else
|
||||
tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar"
|
||||
fi
|
||||
printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/mvnw.url"
|
||||
mv -- "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME"
|
||||
|
||||
clean || :
|
||||
exec_maven "$@"
|
||||
149
202504-Wms-MengYang-box/wms_serve_mengyang/mvnw.cmd
vendored
Normal file
149
202504-Wms-MengYang-box/wms_serve_mengyang/mvnw.cmd
vendored
Normal file
|
|
@ -0,0 +1,149 @@
|
|||
<# : batch portion
|
||||
@REM ----------------------------------------------------------------------------
|
||||
@REM Licensed to the Apache Software Foundation (ASF) under one
|
||||
@REM or more contributor license agreements. See the NOTICE file
|
||||
@REM distributed with this work for additional information
|
||||
@REM regarding copyright ownership. The ASF licenses this file
|
||||
@REM to you under the Apache License, Version 2.0 (the
|
||||
@REM "License"); you may not use this file except in compliance
|
||||
@REM with the License. You may obtain a copy of the License at
|
||||
@REM
|
||||
@REM http://www.apache.org/licenses/LICENSE-2.0
|
||||
@REM
|
||||
@REM Unless required by applicable law or agreed to in writing,
|
||||
@REM software distributed under the License is distributed on an
|
||||
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
@REM KIND, either express or implied. See the License for the
|
||||
@REM specific language governing permissions and limitations
|
||||
@REM under the License.
|
||||
@REM ----------------------------------------------------------------------------
|
||||
|
||||
@REM ----------------------------------------------------------------------------
|
||||
@REM Apache Maven Wrapper startup batch script, version 3.3.2
|
||||
@REM
|
||||
@REM Optional ENV vars
|
||||
@REM MVNW_REPOURL - repo url base for downloading maven distribution
|
||||
@REM MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven
|
||||
@REM MVNW_VERBOSE - true: enable verbose log; others: silence the output
|
||||
@REM ----------------------------------------------------------------------------
|
||||
|
||||
@IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0)
|
||||
@SET __MVNW_CMD__=
|
||||
@SET __MVNW_ERROR__=
|
||||
@SET __MVNW_PSMODULEP_SAVE=%PSModulePath%
|
||||
@SET PSModulePath=
|
||||
@FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}"`) DO @(
|
||||
IF "%%A"=="MVN_CMD" (set __MVNW_CMD__=%%B) ELSE IF "%%B"=="" (echo %%A) ELSE (echo %%A=%%B)
|
||||
)
|
||||
@SET PSModulePath=%__MVNW_PSMODULEP_SAVE%
|
||||
@SET __MVNW_PSMODULEP_SAVE=
|
||||
@SET __MVNW_ARG0_NAME__=
|
||||
@SET MVNW_USERNAME=
|
||||
@SET MVNW_PASSWORD=
|
||||
@IF NOT "%__MVNW_CMD__%"=="" (%__MVNW_CMD__% %*)
|
||||
@echo Cannot start maven from wrapper >&2 && exit /b 1
|
||||
@GOTO :EOF
|
||||
: end batch / begin powershell #>
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
if ($env:MVNW_VERBOSE -eq "true") {
|
||||
$VerbosePreference = "Continue"
|
||||
}
|
||||
|
||||
# calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties
|
||||
$distributionUrl = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionUrl
|
||||
if (!$distributionUrl) {
|
||||
Write-Error "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties"
|
||||
}
|
||||
|
||||
switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) {
|
||||
"maven-mvnd-*" {
|
||||
$USE_MVND = $true
|
||||
$distributionUrl = $distributionUrl -replace '-bin\.[^.]*$',"-windows-amd64.zip"
|
||||
$MVN_CMD = "mvnd.cmd"
|
||||
break
|
||||
}
|
||||
default {
|
||||
$USE_MVND = $false
|
||||
$MVN_CMD = $script -replace '^mvnw','mvn'
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
# apply MVNW_REPOURL and calculate MAVEN_HOME
|
||||
# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-<version>,maven-mvnd-<version>-<platform>}/<hash>
|
||||
if ($env:MVNW_REPOURL) {
|
||||
$MVNW_REPO_PATTERN = if ($USE_MVND) { "/org/apache/maven/" } else { "/maven/mvnd/" }
|
||||
$distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace '^.*'+$MVNW_REPO_PATTERN,'')"
|
||||
}
|
||||
$distributionUrlName = $distributionUrl -replace '^.*/',''
|
||||
$distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$',''
|
||||
$MAVEN_HOME_PARENT = "$HOME/.m2/wrapper/dists/$distributionUrlNameMain"
|
||||
if ($env:MAVEN_USER_HOME) {
|
||||
$MAVEN_HOME_PARENT = "$env:MAVEN_USER_HOME/wrapper/dists/$distributionUrlNameMain"
|
||||
}
|
||||
$MAVEN_HOME_NAME = ([System.Security.Cryptography.MD5]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join ''
|
||||
$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME"
|
||||
|
||||
if (Test-Path -Path "$MAVEN_HOME" -PathType Container) {
|
||||
Write-Verbose "found existing MAVEN_HOME at $MAVEN_HOME"
|
||||
Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD"
|
||||
exit $?
|
||||
}
|
||||
|
||||
if (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) {
|
||||
Write-Error "distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl"
|
||||
}
|
||||
|
||||
# prepare tmp dir
|
||||
$TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile
|
||||
$TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path "$TMP_DOWNLOAD_DIR_HOLDER.dir"
|
||||
$TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null
|
||||
trap {
|
||||
if ($TMP_DOWNLOAD_DIR.Exists) {
|
||||
try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null }
|
||||
catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" }
|
||||
}
|
||||
}
|
||||
|
||||
New-Item -Itemtype Directory -Path "$MAVEN_HOME_PARENT" -Force | Out-Null
|
||||
|
||||
# Download and Install Apache Maven
|
||||
Write-Verbose "Couldn't find MAVEN_HOME, downloading and installing it ..."
|
||||
Write-Verbose "Downloading from: $distributionUrl"
|
||||
Write-Verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName"
|
||||
|
||||
$webclient = New-Object System.Net.WebClient
|
||||
if ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) {
|
||||
$webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD)
|
||||
}
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
$webclient.DownloadFile($distributionUrl, "$TMP_DOWNLOAD_DIR/$distributionUrlName") | Out-Null
|
||||
|
||||
# If specified, validate the SHA-256 sum of the Maven distribution zip file
|
||||
$distributionSha256Sum = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionSha256Sum
|
||||
if ($distributionSha256Sum) {
|
||||
if ($USE_MVND) {
|
||||
Write-Error "Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties."
|
||||
}
|
||||
Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash
|
||||
if ((Get-FileHash "$TMP_DOWNLOAD_DIR/$distributionUrlName" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) {
|
||||
Write-Error "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property."
|
||||
}
|
||||
}
|
||||
|
||||
# unzip and move
|
||||
Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null
|
||||
Rename-Item -Path "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" -NewName $MAVEN_HOME_NAME | Out-Null
|
||||
try {
|
||||
Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null
|
||||
} catch {
|
||||
if (! (Test-Path -Path "$MAVEN_HOME" -PathType Container)) {
|
||||
Write-Error "fail to move MAVEN_HOME"
|
||||
}
|
||||
} finally {
|
||||
try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null }
|
||||
catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" }
|
||||
}
|
||||
|
||||
Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD"
|
||||
169
202504-Wms-MengYang-box/wms_serve_mengyang/pom.xml
Normal file
169
202504-Wms-MengYang-box/wms_serve_mengyang/pom.xml
Normal file
|
|
@ -0,0 +1,169 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>3.3.5</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>com</groupId>
|
||||
<artifactId>dev_wms_serve</artifactId>
|
||||
<version>3.2</version>
|
||||
<name>dev_wms_serve</name>
|
||||
<description>dev_wms_serve</description>
|
||||
<url/>
|
||||
<licenses>
|
||||
<license/>
|
||||
</licenses>
|
||||
<developers>
|
||||
<developer/>
|
||||
</developers>
|
||||
<scm>
|
||||
<connection/>
|
||||
<developerConnection/>
|
||||
<tag/>
|
||||
<url/>
|
||||
</scm>
|
||||
<properties>
|
||||
<java.version>21</java.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-logging</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-quartz</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.mysql</groupId>
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
|
||||
<version>3.5.7</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.httpcomponents</groupId>
|
||||
<artifactId>httpclient</artifactId>
|
||||
<version>4.5.13</version>
|
||||
</dependency>
|
||||
|
||||
<!-- JSON工具类 -->
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/com.alibaba/fastjson -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>2.0.21</version>
|
||||
</dependency>
|
||||
|
||||
<!-- hutool工具 -->
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
<version>5.8.33</version>
|
||||
</dependency>
|
||||
|
||||
<!-- EXCEL -->
|
||||
<!-- https://mvnrepository.com/artifact/com.alibaba/easyexcel -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>easyexcel</artifactId>
|
||||
<version>4.0.3</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/cn.afterturn/easypoi-spring-boot-starter -->
|
||||
<dependency>
|
||||
<groupId>cn.afterturn</groupId>
|
||||
<artifactId>easypoi-spring-boot-starter</artifactId>
|
||||
<version>4.5.0</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/com.google.guava/guava -->
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>33.3.1-jre</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains</groupId>
|
||||
<artifactId>annotations</artifactId>
|
||||
<version>26.0.2</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- 添加或更新 commons-compress 依赖 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-compress</artifactId>
|
||||
<version>1.26.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/org.xmlunit/xmlunit-core -->
|
||||
<dependency>
|
||||
<groupId>org.xmlunit</groupId>
|
||||
<artifactId>xmlunit-core</artifactId>
|
||||
<version>2.10.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>wms-box-server</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.wms_main;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class WmsMainApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(WmsMainApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,150 @@
|
|||
package com.wms_main.app;
|
||||
|
||||
import com.wms_main.dao.ITAppConfigService;
|
||||
import com.wms_main.dao.ITAppGoodsService;
|
||||
import com.wms_main.dao.ITAppLocationService;
|
||||
import com.wms_main.model.po.TAppConfig;
|
||||
import com.wms_main.model.po.TAppGoods;
|
||||
import com.wms_main.model.po.TAppLocation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Application 共享
|
||||
*/
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class AppCommon {
|
||||
/**
|
||||
* 配置服务
|
||||
*/
|
||||
private final ITAppConfigService appConfigService;
|
||||
private final ITAppLocationService appLocationService;
|
||||
private final ITAppGoodsService appGoodsService;
|
||||
/**
|
||||
* 配置map
|
||||
*/
|
||||
public final Map<String, String> configMap = new HashMap<>();
|
||||
/**
|
||||
* 库位map
|
||||
*/
|
||||
public final Map<String, TAppLocation> instantLocationMap = new HashMap<>();
|
||||
/**
|
||||
* 物料信息Map
|
||||
*/
|
||||
private final Map<String, TAppGoods> instantGoodsMap = new HashMap<>();
|
||||
|
||||
/**
|
||||
* 根据key获取值
|
||||
* @param key 键
|
||||
* @return 值
|
||||
*/
|
||||
public String getConfigByKey(String key) {
|
||||
if (configMap.isEmpty()) {
|
||||
if (!initConfigMap()) {
|
||||
log.error("配置初始化失败,请尝试重启程序。");
|
||||
return "";
|
||||
}
|
||||
}
|
||||
return configMap.get(key);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新配置
|
||||
* @return 更新结果
|
||||
*/
|
||||
public boolean initConfigMap() {
|
||||
configMap.clear();// 清除配置值
|
||||
try {
|
||||
// 获取到所有的配置
|
||||
List<TAppConfig> configList = appConfigService.list();
|
||||
if (!configList.isEmpty()) {
|
||||
for (TAppConfig appConfig : configList) {
|
||||
configMap.put(appConfig.getConfigKey(), appConfig.getConfigValue());
|
||||
log.info("导入系统配置成功---{}:{}", appConfig.getConfigName(), appConfig.getConfigValue());
|
||||
}
|
||||
}
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据库位id获取库位信息
|
||||
* @param locationId 库位id
|
||||
* @return 库位详情
|
||||
*/
|
||||
public TAppLocation getInstantLocationByLocationId(String locationId) {
|
||||
if (instantLocationMap.isEmpty()) {
|
||||
if (!initInstantLocationMap()) {
|
||||
log.error("库位缓存失败,请尝试重启程序。");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return instantLocationMap.get(locationId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 初始化库位缓存map
|
||||
* @return 缓存结果
|
||||
*/
|
||||
public boolean initInstantLocationMap() {
|
||||
instantLocationMap.clear();
|
||||
try {
|
||||
// 获取到所有的配置
|
||||
List<TAppLocation> locationList = appLocationService.list();
|
||||
if (!locationList.isEmpty()) {
|
||||
for (TAppLocation appLocation : locationList) {
|
||||
instantLocationMap.put(appLocation.getLocationId(), appLocation);
|
||||
}
|
||||
}
|
||||
log.info("库位缓存成功。");
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据料号获取物料信息
|
||||
* @param goodsId 料号
|
||||
* @return 物料信息
|
||||
*/
|
||||
public TAppGoods getInstantGoodsByGoodsId(String goodsId) {
|
||||
if (instantGoodsMap.isEmpty()) {
|
||||
if (!initInstantGoodsMap()) {
|
||||
log.error("物料缓存失败,请尝试重启程序。");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return instantGoodsMap.get(goodsId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 缓存物料信息
|
||||
* @return 缓存结果
|
||||
*/
|
||||
public boolean initInstantGoodsMap() {
|
||||
instantGoodsMap.clear();
|
||||
try {
|
||||
// 获取到所有的配置
|
||||
List<TAppGoods> goodsList = appGoodsService.list();
|
||||
if (!goodsList.isEmpty()) {
|
||||
for (TAppGoods appGoods : goodsList) {
|
||||
instantGoodsMap.put(appGoods.getGoodsId(), appGoods);
|
||||
}
|
||||
}
|
||||
log.info("缓存物料信息成功。");
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
package com.wms_main.app;
|
||||
|
||||
import org.springframework.boot.CommandLineRunner;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class AppStartComplete implements CommandLineRunner {
|
||||
@Override
|
||||
public void run(String... args) {
|
||||
System.out.println("WMS启动完成......");
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
package com.wms_main.config;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.DbType;
|
||||
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
|
||||
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringBootConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
|
||||
/**
|
||||
* mp配置类
|
||||
*/
|
||||
@SpringBootConfiguration
|
||||
@MapperScan("com.wms_main.mapper")
|
||||
@EnableTransactionManagement
|
||||
public class MybatisPlusConfig {
|
||||
/**
|
||||
* 分页插件的控制
|
||||
* @return MybatisPlusInterceptor
|
||||
*/
|
||||
@Bean
|
||||
public MybatisPlusInterceptor mybatisPlusInterceptor() {
|
||||
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
|
||||
// 添加分页插件
|
||||
PaginationInnerInterceptor pageInnerInterceptor = new PaginationInnerInterceptor();
|
||||
pageInnerInterceptor.setDbType(DbType.MYSQL);
|
||||
pageInnerInterceptor.setMaxLimit(1000L);
|
||||
interceptor.addInnerInterceptor(pageInnerInterceptor);
|
||||
return interceptor;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.wms_main.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
@Configuration
|
||||
public class ResourceConfig implements WebMvcConfigurer {
|
||||
/**
|
||||
* 图片地址映射
|
||||
* @param registry 注册
|
||||
*/
|
||||
@Override
|
||||
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||
registry.addResourceHandler("/image/**").addResourceLocations("file:D:/image/");
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
package com.wms_main.config.advice;
|
||||
|
||||
import com.wms_main.model.dto.response.wms.BaseWmsApiResponse;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.http.converter.HttpMessageConversionException;
|
||||
import org.springframework.validation.FieldError;
|
||||
import org.springframework.web.bind.MethodArgumentNotValidException;
|
||||
import org.springframework.web.bind.annotation.ControllerAdvice;
|
||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
/**
|
||||
* WMS 接口异常处理类
|
||||
*/
|
||||
@ControllerAdvice(value = "com.wms_main.controller.wms")
|
||||
@ResponseBody
|
||||
@Slf4j
|
||||
public class WmsControllerExceptionHandler {
|
||||
|
||||
/**
|
||||
* 参数校验失败
|
||||
* @param ex 异常
|
||||
* @return 返回值
|
||||
*/
|
||||
@ExceptionHandler(value = MethodArgumentNotValidException.class)
|
||||
public BaseWmsApiResponse methodArgumentNotValidException(MethodArgumentNotValidException ex) {
|
||||
log.error("Wms接口请求参数错误:{}", ex.getMessage());
|
||||
String errMessage = "请求参数错误";
|
||||
FieldError fieldError = ex.getBindingResult().getFieldError();
|
||||
if(fieldError != null) {
|
||||
errMessage = fieldError.getDefaultMessage();
|
||||
}
|
||||
return BaseWmsApiResponse.error(errMessage);
|
||||
}
|
||||
|
||||
/**
|
||||
* 参数类型转换失败
|
||||
* @param ex 异常
|
||||
* @return 返回值
|
||||
*/
|
||||
@ExceptionHandler(HttpMessageConversionException.class)
|
||||
public BaseWmsApiResponse parameterTypeException(HttpMessageConversionException ex) {
|
||||
log.error("Wms接口请求参数格式错误:{}", ex.getMessage());
|
||||
String errorMessage = "请求参数格式错误,请参照接口文档";
|
||||
return BaseWmsApiResponse.error(errorMessage);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 捕获所有异常
|
||||
* @param e 异常
|
||||
* @return 返回值
|
||||
*/
|
||||
@ExceptionHandler(value = Exception.class)
|
||||
public BaseWmsApiResponse handleException(Exception e) {
|
||||
log.error("Wms接口异常:{}", e.getMessage());
|
||||
return BaseWmsApiResponse.error(String.format("发生异常:%s", e.getMessage()));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package com.wms_main.constant;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class AppConstant {
|
||||
/**
|
||||
* WMS 服务端专属编号,禁止修改,数值为 0 - 99 整数
|
||||
*/
|
||||
public static final short APP_ID = 1;
|
||||
/**
|
||||
* 根菜单ID
|
||||
*/
|
||||
public static final String ROOT_MENU_ID = "0";
|
||||
/**
|
||||
* 管理员角色
|
||||
*/
|
||||
public static final String ADMIN_ID = "0";
|
||||
/**
|
||||
* 空物料号
|
||||
*/
|
||||
public static final String EMPTY_GOODS_ID = "000000000";
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.wms_main.constant.enums.jobs;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 定时任务状态 枚举
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum JobStatusEnums {
|
||||
STOP(0, "停止"),
|
||||
RUN(1, "运行");
|
||||
|
||||
private final Integer status;
|
||||
private final String description;
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.wms_main.constant.enums.jobs;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum JobTimerTypeEnums {
|
||||
SIMPLE(1, "简单任务"),
|
||||
CRON(2, "cron表达式");
|
||||
|
||||
private final Integer type;
|
||||
private final String description;
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.wms_main.constant.enums.mywms;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
public enum OrderStatusEnum {
|
||||
RUNNING(1, "执行中"),
|
||||
COMPLETE(2, "任务完成"),
|
||||
EXCEPTION(3, "执行异常");
|
||||
|
||||
private Integer code;
|
||||
private String desc;
|
||||
|
||||
OrderStatusEnum(Integer code, String desc) {
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.wms_main.constant.enums.others;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum DbsStatusEnums {
|
||||
NEW(0, "未开始"),
|
||||
RUN(1, "已开始"),
|
||||
FINISH(2, "已完成");
|
||||
private final Integer value;
|
||||
private final String description;
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.wms_main.constant.enums.wcs;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum WcsApiResponseCodeEnums {
|
||||
SUCCESS(0, "成功"),
|
||||
FAIL(500, "失败"),
|
||||
ERROR(999, "错误");
|
||||
private final int code;
|
||||
private final String message;
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.wms_main.constant.enums.wcs;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* Wcs输送线任务类型
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum WcsConveyTaskTypeEnums {
|
||||
CONVEY_TASK_TYPE_PICK(1, "拣选"),
|
||||
CONVEY_TASK_TYPE_ADD(2, "补货"),
|
||||
CONVEY_TASK_TYPE_DELIVERY(3, "发货"),
|
||||
CONVEY_TASK_TYPE_CHECK(4, "复核");
|
||||
private final Integer code;
|
||||
private final String desc;
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
package com.wms_main.constant.enums.wcs;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* Wcs任务状态枚举
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum WcsStackerTaskStatusEnums {
|
||||
INIT(0, "任务初始化"),
|
||||
WAIT(1, "任务排队中"),
|
||||
RUN(2, "任务开始执行"),
|
||||
LEAVE(3, "任务已经离开初始位置"),
|
||||
MID(4, "任务到达中间点"),
|
||||
ARRIVE(5, "任务到达目的地"),
|
||||
FINISH(100, "任务完成"),
|
||||
CANCEL(998, "任务取消"),
|
||||
EXCEPTION(999, "任务异常");
|
||||
private final Integer code;
|
||||
private final String desc;
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.wms_main.constant.enums.wcs;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* Wcs任务类型枚举
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum WcsStackerTaskTypeEnums {
|
||||
IN(1, "入库"),
|
||||
OUT(2, "出库"),
|
||||
INVENTORY(3, "盘点"),
|
||||
TRANSFER(9, "移库");
|
||||
|
||||
private final Integer code;
|
||||
private final String desc;
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
package com.wms_main.constant.enums.wms;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 应用配置key枚举
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum AppConfigKeyEnums {
|
||||
WCS_STACKER_TASK_URL("WcsStackerTaskUrl", "发送堆垛机任务地址"),
|
||||
WCS_PICK_TASK_URL("WcsPickTaskUrl", "发送拣选任务地址"),
|
||||
WCS_CANCEL_PICK_TASK_URL("WcsCancelPickTaskUrl", "发送取消拣选任务地址"),
|
||||
WCS_RELEASE_BOX_URL("WcsReleaseBoxUrl", "发送释放站台箱子地址"),
|
||||
STAND_CAPACITY("StandCapacity", "站台容量"),
|
||||
IMAGE_IP("ImageIp", "图片存放ip"),
|
||||
EMPTY_BACK("EmptyBack", "空载具是否回库"),
|
||||
STOCK_WARNING_QTY("StockWarningQty", "库存预警数量"),
|
||||
MES_GET_GOODS_URL("MesGetGoodsUrl", "获取物料信息地址"),
|
||||
ERP_GET_VEHICLENO_DATA("ErpGetVehicleNoData", "根据托盘号查询简单生产入库单"),
|
||||
WMS_MANAGE_CALLBACK("WmsManageCallback", "场内WMS接受的入库出库执行后回调地址");
|
||||
|
||||
private final String key;
|
||||
private final String desc;
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.wms_main.constant.enums.wms;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
public enum OrderStatusEnum {
|
||||
|
||||
CREATE(0, "创建"),
|
||||
RUNNING(1, "运行中"),
|
||||
COMPLETE(2, "完成"),
|
||||
CANCEL(3, "取消"),
|
||||
ERROR(4, "错误");
|
||||
|
||||
private Integer code;
|
||||
private String desc;
|
||||
|
||||
OrderStatusEnum(Integer code, String desc) {
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.wms_main.constant.enums.wms;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
public enum StorageTypeEnums {
|
||||
TP(1, "托盘库"),
|
||||
BOX(2, "料箱库");
|
||||
|
||||
private final Integer code;
|
||||
private final String desc;
|
||||
|
||||
StorageTypeEnums(Integer code, String desc) {
|
||||
this.code = code;
|
||||
this.desc = desc;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package com.wms_main.constant.enums.wms;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum WmsApiResponseCodeEnums {
|
||||
SUCCESS(0, "成功"),
|
||||
WARNING(400, "警告"),
|
||||
FAIL(500, "失败"),
|
||||
ERROR(999, "错误");
|
||||
private final int code;
|
||||
private final String message;
|
||||
}
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
package com.wms_main.constant.enums.wms;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 深度处理策略枚举
|
||||
* 用于定义不同深度库存的出库策略
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum WmsDepthStrategyEnums {
|
||||
|
||||
/**
|
||||
* 直接出库策略
|
||||
* 适用于深度1的货物,无需移库操作
|
||||
*/
|
||||
DIRECT_OUT(1, "直接出库", "货物位于深度1,可直接出库"),
|
||||
|
||||
/**
|
||||
* 单层移库策略
|
||||
* 适用于深度2的货物,需要先移库深度1,再出深度2
|
||||
*/
|
||||
SINGLE_TRANSFER(2, "单层移库", "先移库深度1,再出深度2"),
|
||||
|
||||
/**
|
||||
* 双层移库策略
|
||||
* 适用于深度3的货物,需要先移库深度1和2,再出深度3
|
||||
*/
|
||||
DOUBLE_TRANSFER(3, "双层移库", "先移库深度1和2,再出深度3"),
|
||||
|
||||
/**
|
||||
* 复杂移库策略
|
||||
* 适用于复杂的深度组合情况
|
||||
*/
|
||||
COMPLEX_TRANSFER(4, "复杂移库", "多个深度混合的复杂移库策略"),
|
||||
|
||||
/**
|
||||
* 无需处理策略
|
||||
* 适用于无库存或其他特殊情况
|
||||
*/
|
||||
NO_ACTION(0, "无需处理", "无库存或其他特殊情况");
|
||||
|
||||
/**
|
||||
* 策略编码
|
||||
*/
|
||||
private final Integer code;
|
||||
|
||||
/**
|
||||
* 策略名称
|
||||
*/
|
||||
private final String name;
|
||||
|
||||
/**
|
||||
* 策略描述
|
||||
*/
|
||||
private final String description;
|
||||
|
||||
/**
|
||||
* 根据编码获取策略
|
||||
* @param code 策略编码
|
||||
* @return 对应的策略枚举
|
||||
*/
|
||||
public static WmsDepthStrategyEnums getByCode(Integer code) {
|
||||
if (code == null) {
|
||||
return NO_ACTION;
|
||||
}
|
||||
for (WmsDepthStrategyEnums strategy : values()) {
|
||||
if (strategy.getCode().equals(code)) {
|
||||
return strategy;
|
||||
}
|
||||
}
|
||||
return NO_ACTION;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.wms_main.constant.enums.wms;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 物料状态的枚举
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum WmsGoodsStatusEnums {
|
||||
OK(0, "正常"),
|
||||
BAD(1, "不合格"),
|
||||
OVER_DUE(2, "过期"),
|
||||
LONG_TIME_NO_USE(3, "长期未使用");
|
||||
private final Integer code;
|
||||
private final String desc;
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
package com.wms_main.constant.enums.wms;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum WmsLocationNumEnums {
|
||||
LOCATION_NUM_1(540, "1号库"),
|
||||
LOCATION_NUM_2(316, "2号库"),
|
||||
LOCATION_NUM_3(525, "3号库");
|
||||
|
||||
private final Integer code;
|
||||
private final String desc;
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.wms_main.constant.enums.wms;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 库位占用状态枚举
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum WmsLocationOccupyStatusEnums {
|
||||
EMPTY(0, "空闲"),
|
||||
OCCUPY(1, "占用");
|
||||
|
||||
private final Integer code;
|
||||
private final String desc;
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
package com.wms_main.constant.enums.wms;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 物料状态的枚举
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum WmsLocationTypeEnums {
|
||||
TYPE_500(0, "500尺寸"),
|
||||
TYPE_600(1, "600尺寸"),
|
||||
TYPE_EMPTY(2, "空木托"),
|
||||
TYPE_PRODUCT(3, "成品");
|
||||
private final Integer code;
|
||||
private final String desc;
|
||||
|
||||
public static WmsLocationTypeEnums getEnum(Integer code) {
|
||||
for (WmsLocationTypeEnums e : WmsLocationTypeEnums.values()) {
|
||||
if (e.getCode().equals(code)) {
|
||||
return e;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.wms_main.constant.enums.wms;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 锁定状态枚举
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum WmsLockEnums {
|
||||
UNLOCK(0, "未锁定"),
|
||||
LOCKED(1, "已锁定");
|
||||
|
||||
private final Integer code;
|
||||
private final String desc;
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.wms_main.constant.enums.wms;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* 出库类型 枚举
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum WmsOutTypeEnums {
|
||||
EMPTY(1, "空箱出库"),
|
||||
NORMAL(2, "普通出库"),
|
||||
ALL_OUT(4, "完整出库"),
|
||||
FOR_IN(5, "入库使用"),
|
||||
EMERGE(9, "紧急出库");
|
||||
private final Integer code;
|
||||
private final String desc;
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.wms_main.constant.enums.wms;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* Wms拣选任务状态枚举
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum WmsPickTaskStatusEnum {
|
||||
FOR_IN(-2, "入库用"),
|
||||
TEMP(-1, "暂存"),
|
||||
WAIT(0, "待下发"),
|
||||
SEND(1, "已下发"),
|
||||
RUN(2, "正在执行"),
|
||||
ARRIVE(3, "已到达"),
|
||||
LEAVE(4, "已离开"),
|
||||
CANCEL(5, "已取消");
|
||||
private final Integer code;
|
||||
private final String desc;
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
package com.wms_main.constant.enums.wms;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* Wms任务状态枚举
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum WmsStackerTaskStatusEnums {
|
||||
TEMP(-1, "暂存"),
|
||||
WAIT(0, "初始化"),
|
||||
EXECUTED(1, "已解析"),
|
||||
SEND(2, "已下发"),
|
||||
RUN(3, "正在执行"),
|
||||
FINISH(4, "执行完成"),
|
||||
CANCEL(98, "已取消"),
|
||||
EXCEPTION(99, "执行异常");
|
||||
private final Integer code;
|
||||
private final String desc;
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package com.wms_main.constant.enums.wms;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* Wms库存状态枚举
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum WmsStockStatusEnums {
|
||||
OK(0, "在库"),
|
||||
OUTING(1, "出库中"),
|
||||
OUTED(2, "已出库"),
|
||||
BACK(3, "回库中"),
|
||||
LOCK(9, "锁定");
|
||||
|
||||
private final Integer code;
|
||||
private final String desc;
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.wms_main.constant.enums.wms;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* Wms任务类型枚举
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum WmsTaskTypeEnums {
|
||||
IN(1, "入库"),
|
||||
OUT(2, "出库"),
|
||||
INVENTORY(3, "盘点"),
|
||||
TRANSFER(9, "移库");
|
||||
|
||||
private final Integer code;
|
||||
private final String desc;
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.wms_main.constant.enums.wms;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* wms可用状态枚举
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum WmsUsableStatusEnums {
|
||||
UNUSABLE(0, "不可用"),
|
||||
USABLE(1, "可用"),
|
||||
;
|
||||
|
||||
private final int code;
|
||||
private final String message;
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.wms_main.constant.enums.wms;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* Wms载具状态枚举
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum WmsVehicleStatusEnums {
|
||||
IN(1, "入库中"),
|
||||
ON(2, "在库"),
|
||||
OUT(3, "出库中"),
|
||||
LOCK(9, "锁定");
|
||||
private final Integer code;
|
||||
private final String desc;
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package com.wms_main.controller.mywms;
|
||||
|
||||
import com.wms_main.model.dto.request.mywms.OrderInReq;
|
||||
import com.wms_main.model.dto.request.mywms.OrderOutReq;
|
||||
import com.wms_main.model.dto.request.mywms.StockReq;
|
||||
import com.wms_main.model.dto.request.mywms.StockRespGoodsDetail;
|
||||
import com.wms_main.model.dto.response.mywms.MyWmsResponse;
|
||||
import com.wms_main.service.controller.IMyWmsControllerService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@ResponseBody
|
||||
@CrossOrigin
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/mywms")
|
||||
public class MyWmsController {
|
||||
|
||||
private final IMyWmsControllerService myWmsControllerService;
|
||||
|
||||
@PostMapping("/orderIn")
|
||||
public MyWmsResponse<Object> orderIn(@RequestBody OrderInReq request) {
|
||||
return myWmsControllerService.orderIn(request);
|
||||
}
|
||||
|
||||
@PostMapping("/orderOut")
|
||||
public MyWmsResponse<Object> orderOut(@RequestBody OrderOutReq request) {
|
||||
return myWmsControllerService.orderOut(request);
|
||||
}
|
||||
|
||||
@PostMapping("/stock")
|
||||
public MyWmsResponse<List<StockRespGoodsDetail>> stock(@RequestBody StockReq request) {
|
||||
return myWmsControllerService.stock(request);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,133 @@
|
|||
package com.wms_main.controller.wms;
|
||||
|
||||
import com.wms_main.excel.easypoi.service.IExportExcelEasyPoi;
|
||||
import com.wms_main.excel.easypoi.service.IImportExcelEasyPoi;
|
||||
import com.wms_main.model.dto.query.DbsQuery;
|
||||
import com.wms_main.model.dto.query.KittingBomQuery;
|
||||
import com.wms_main.model.dto.query.KittingBomRelationQuery;
|
||||
import com.wms_main.model.dto.response.wms.BaseWmsApiResponse;
|
||||
import com.wms_main.model.vo.others.FileVo;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* excel控制类
|
||||
*/
|
||||
@ResponseBody
|
||||
@RestController
|
||||
@CrossOrigin
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/wms/excel")
|
||||
public class ExcelController {
|
||||
/**
|
||||
* excel导入服务
|
||||
*/
|
||||
private final IImportExcelEasyPoi importExcelEasyPoi;
|
||||
/**
|
||||
* excel导出服务
|
||||
*/
|
||||
private final IExportExcelEasyPoi exportExcelEasyPoi;
|
||||
|
||||
/**
|
||||
* 导入基础物料数据
|
||||
* @param file 文件
|
||||
* @param fileVo 文件信息
|
||||
* @return 导入结果
|
||||
* @throws Exception 异常
|
||||
*/
|
||||
@PostMapping("/importBaseGoods")
|
||||
public BaseWmsApiResponse importBaseGoods(@RequestPart("file") MultipartFile file, @RequestPart("fileVo") FileVo fileVo) throws Exception {
|
||||
return importExcelEasyPoi.doImportBaseGoods(file, fileVo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入看板数据
|
||||
* @param file 文件
|
||||
* @param fileVo 文件信息
|
||||
* @return 导入结果
|
||||
* @throws Exception 异常
|
||||
*/
|
||||
@PostMapping("/importKanban")
|
||||
public BaseWmsApiResponse importKanban(@RequestPart("file") MultipartFile file, @RequestPart("fileVo") FileVo fileVo) throws Exception {
|
||||
return importExcelEasyPoi.doImportKanban(file, fileVo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入DBS计划数据
|
||||
* @param file 文件
|
||||
* @param fileVo 文件信息
|
||||
* @return 导入结果
|
||||
* @throws Exception 异常
|
||||
*/
|
||||
@PostMapping("/importDbs")
|
||||
public BaseWmsApiResponse importDbs(@RequestPart("file") MultipartFile file, @RequestPart("fileVo") FileVo fileVo) throws Exception {
|
||||
return importExcelEasyPoi.doImportDbs(file, fileVo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入配料单及图纸
|
||||
* @param file 文件
|
||||
* @param fileVo 文件信息
|
||||
* @return 导入结果
|
||||
* @throws Exception 异常
|
||||
*/
|
||||
@PostMapping("/importProduct")
|
||||
public BaseWmsApiResponse importProduct(@RequestPart("file") MultipartFile file, @RequestPart("fileVo") FileVo fileVo) throws Exception {
|
||||
return importExcelEasyPoi.doImportProduct(file, fileVo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入单片配料单及图纸
|
||||
* @param file 文件
|
||||
* @param fileVo 文件信息
|
||||
* @return 导入结果
|
||||
* @throws Exception 异常
|
||||
*/
|
||||
@PostMapping("/importSingleProduct")
|
||||
public BaseWmsApiResponse importSingleProduct(@RequestPart("file") MultipartFile file, @RequestPart("fileVo") FileVo fileVo) throws Exception {
|
||||
return importExcelEasyPoi.doImportSingleProduct(file, fileVo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入总成-单片对应关系
|
||||
* @param file 文件
|
||||
* @param fileVo 文件信息
|
||||
* @return 导入结果
|
||||
* @throws Exception 异常
|
||||
*/
|
||||
@PostMapping("/importProductExtend")
|
||||
public BaseWmsApiResponse importProductExtend(@RequestPart("file") MultipartFile file, @RequestPart("fileVo") FileVo fileVo) throws Exception {
|
||||
return importExcelEasyPoi.doImportProductExtend(file, fileVo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出DBS
|
||||
* @param dbsQuery 请求
|
||||
*/
|
||||
@PostMapping("/exportDbsWithExcel")
|
||||
public void exportDbsWithExcel(@RequestBody DbsQuery dbsQuery, HttpServletResponse response) throws IOException {
|
||||
exportExcelEasyPoi.doExportDbs(dbsQuery, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出配料单
|
||||
* @param kittingBomQuery 请求
|
||||
*/
|
||||
@PostMapping("/exportKittingBomWithExcel")
|
||||
public void exportKittingBomWithExcel(@RequestBody KittingBomQuery kittingBomQuery, HttpServletResponse response) throws IOException {
|
||||
exportExcelEasyPoi.doExportKittingBom(kittingBomQuery, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出配对关系
|
||||
* @param kittingBomRelationQuery 请求
|
||||
*/
|
||||
@PostMapping("/exportKittingBomRelationWithExcel")
|
||||
public void exportKittingBomRelationWithExcel(@RequestBody KittingBomRelationQuery kittingBomRelationQuery, HttpServletResponse response) throws IOException {
|
||||
exportExcelEasyPoi.doExportKittingBomRelations(kittingBomRelationQuery, response);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
package com.wms_main.controller.wms;
|
||||
|
||||
import com.wms_main.model.dto.query.GoodsQuery;
|
||||
import com.wms_main.model.vo.wms.GoodsVo;
|
||||
import com.wms_main.model.vo.wms.PageVo;
|
||||
import com.wms_main.model.dto.response.wms.WmsApiResponse;
|
||||
import com.wms_main.service.controller.IGoodsControllerService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 物料控制类
|
||||
*/
|
||||
@RestController
|
||||
@ResponseBody
|
||||
@CrossOrigin
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/wms/goods")
|
||||
public class GoodsController {
|
||||
private final IGoodsControllerService goodsControllerService;
|
||||
|
||||
/**
|
||||
* 根据条件查询物料信息---分页
|
||||
* @param goodsQuery 查询参数
|
||||
* @return 查询结果
|
||||
*/
|
||||
@PostMapping("/getGoodsInfoByPage")
|
||||
public WmsApiResponse<PageVo<GoodsVo>> getGoodsInfoByPage(@RequestBody GoodsQuery goodsQuery) {
|
||||
return goodsControllerService.getGoodsInfoByPage(goodsQuery);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.wms_main.controller.wms;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 定时类控制类
|
||||
*/
|
||||
@RestController
|
||||
@ResponseBody
|
||||
@CrossOrigin
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/wms/job")
|
||||
public class JobController {
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
package com.wms_main.controller.wms;
|
||||
|
||||
import com.wms_main.model.dto.query.LocationQuery;
|
||||
import com.wms_main.model.dto.response.wms.BaseWmsApiResponse;
|
||||
import com.wms_main.model.dto.response.wms.WmsApiResponse;
|
||||
import com.wms_main.model.po.TAppLocation;
|
||||
import com.wms_main.service.controller.ILocationControllerService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 卡特相关控制类
|
||||
*/
|
||||
@RestController
|
||||
@ResponseBody
|
||||
@CrossOrigin
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/wms/location")
|
||||
public class LocationController {
|
||||
private final ILocationControllerService locationControllerService;// 库位控制类服务
|
||||
|
||||
/**
|
||||
* 初始化库位
|
||||
* @param locationQuery 查询
|
||||
* @return 创建结果
|
||||
*/
|
||||
@PostMapping("/genLocations")
|
||||
public BaseWmsApiResponse genLocations(@RequestBody LocationQuery locationQuery) {
|
||||
return locationControllerService.genLocations(locationQuery);
|
||||
}
|
||||
|
||||
@GetMapping("/getUsedLocations")
|
||||
public WmsApiResponse<Long> getUsedLocations(@RequestParam(value = "equipmentId") Integer equipmentId, @RequestParam(value = "locationType") Integer locationType) {
|
||||
return locationControllerService.getUsedLocations(equipmentId, locationType);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,45 @@
|
|||
package com.wms_main.controller.wms;
|
||||
|
||||
import com.wms_main.model.dto.request.wms.LoginRequest;
|
||||
import com.wms_main.model.vo.wms.UserLoginVo;
|
||||
import com.wms_main.model.dto.response.wms.WmsApiResponse;
|
||||
import com.wms_main.service.controller.ILoginControllerService;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import static com.wms_main.repository.utils.StringUtils.getIpAddr;
|
||||
|
||||
/**
|
||||
* 登录控制类
|
||||
*/
|
||||
@RestController
|
||||
@ResponseBody
|
||||
@CrossOrigin
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/wms/login")
|
||||
public class LoginController {
|
||||
private final HttpServletRequest servletRequest;// 请求头部信息
|
||||
|
||||
private final ILoginControllerService loginControllerService;
|
||||
|
||||
/**
|
||||
* 带密码登录
|
||||
* @param request 请求
|
||||
* @return 登录结果
|
||||
*/
|
||||
@PostMapping("/loginWithAuth")
|
||||
public WmsApiResponse<UserLoginVo> loginWithAuth(@RequestBody LoginRequest request) {
|
||||
return loginControllerService.loginWithAuth(request.getLoginAccount(), request.getLoginPassword(), getIpAddr(servletRequest));
|
||||
}
|
||||
|
||||
/**
|
||||
* 无密码登录
|
||||
* @param request 请求
|
||||
* @return 登录结果
|
||||
*/
|
||||
@PostMapping("/loginWithOutAuth")
|
||||
public WmsApiResponse<UserLoginVo> loginWithOutAuth(@RequestBody LoginRequest request) {
|
||||
return loginControllerService.loginWithAuth(request.getLoginAccount(), request.getLoginPassword(), getIpAddr(servletRequest));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
package com.wms_main.controller.wms;
|
||||
|
||||
import com.wms_main.model.dto.query.StockQuery;
|
||||
import com.wms_main.model.dto.response.wms.WmsApiResponse;
|
||||
import com.wms_main.model.vo.wms.PageVo;
|
||||
import com.wms_main.model.vo.wms.StockVo;
|
||||
import com.wms_main.service.controller.IStockControllerService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 库存控制类
|
||||
*/
|
||||
@RestController
|
||||
@ResponseBody
|
||||
@CrossOrigin
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/wms/stock")
|
||||
public class StockController {
|
||||
/**
|
||||
* 库存控制类服务
|
||||
*/
|
||||
private final IStockControllerService stockControllerService;
|
||||
|
||||
/**
|
||||
* 分页查询库存
|
||||
* @param stockQuery 查询参数
|
||||
* @return 查询结果
|
||||
*/
|
||||
@PostMapping("/queryStocksByPage")
|
||||
public WmsApiResponse<PageVo<StockVo>> queryStocksByPage(@RequestBody StockQuery stockQuery)
|
||||
{
|
||||
return stockControllerService.queryStocksByPage(stockQuery);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
package com.wms_main.controller.wms;
|
||||
|
||||
import com.wms_main.model.dto.request.wcs.WcsTaskResultRequest;
|
||||
import com.wms_main.model.dto.request.wcs.WcsVehicleInRequest;
|
||||
import com.wms_main.model.dto.response.wcs.BaseWcsApiResponse;
|
||||
import com.wms_main.model.dto.response.wcs.WcsVehicleInResponse;
|
||||
import com.wms_main.service.controller.ITaskControllerService;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 任务控制类
|
||||
*/
|
||||
@RestController
|
||||
@ResponseBody
|
||||
@CrossOrigin
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/wms/task")
|
||||
public class TaskController {
|
||||
private final ITaskControllerService taskControllerService;
|
||||
|
||||
@PostMapping("/wcsRequestVehicleIn")
|
||||
public WcsVehicleInResponse requireInTask(@RequestBody WcsVehicleInRequest request) {
|
||||
return taskControllerService.requireInTask(request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 接收wcs反馈任务状态
|
||||
* @param wcsTaskResultRequest 请求信息
|
||||
* @return 处理结果
|
||||
*/
|
||||
@PostMapping("/sendTaskResult")
|
||||
public BaseWcsApiResponse sendTaskResult(@RequestBody WcsTaskResultRequest wcsTaskResultRequest) {
|
||||
return taskControllerService.sendTaskResult(wcsTaskResultRequest);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,99 @@
|
|||
package com.wms_main.controller.wms;
|
||||
|
||||
import com.wms_main.app.AppCommon;
|
||||
import com.wms_main.dao.ITSysMenuService;
|
||||
import com.wms_main.dao.ITSysPermissionService;
|
||||
import com.wms_main.dao.ITSysRoleService;
|
||||
import com.wms_main.dao.ITSysUserService;
|
||||
import com.wms_main.excel.easypoi.service.IImportExcelEasyPoi;
|
||||
import com.wms_main.model.dto.request.wms.BaseWmsRequest;
|
||||
import com.wms_main.model.dto.query.DbsQuery;
|
||||
import com.wms_main.model.dto.request.wms.InitKateWorkRequest;
|
||||
import com.wms_main.model.vo.others.FileVo;
|
||||
import com.wms_main.model.dto.response.wms.BaseWmsApiResponse;
|
||||
import com.wms_main.model.vo.wms.ImageVo;
|
||||
import com.wms_main.model.dto.response.wms.WmsApiResponse;
|
||||
import com.wms_main.repository.utils.UUIDUtils;
|
||||
import com.wms_main.service.controller.ITestControllerService;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.quartz.Scheduler;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 测试专用
|
||||
*/
|
||||
@RestController
|
||||
@ResponseBody
|
||||
@CrossOrigin
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/test")
|
||||
public class TestController {
|
||||
|
||||
private final AppCommon appCommon;
|
||||
private final Scheduler scheduler;
|
||||
private final IImportExcelEasyPoi importExcelEasyPoi;
|
||||
private final ITestControllerService testService;
|
||||
|
||||
private final ITSysUserService userService;// User服务
|
||||
private final ITSysRoleService roleService;// Role服务
|
||||
private final ITSysPermissionService permissionService;// Permission服务
|
||||
private final ITSysMenuService menuService;// Menu服务
|
||||
|
||||
@GetMapping(value = "/test")
|
||||
public String testApi() {
|
||||
return UUIDUtils.getNewUUID();
|
||||
}
|
||||
//
|
||||
//
|
||||
// @PostMapping(value = "/test2")
|
||||
// public WmsApiResponse<Object> testApiPost(@RequestBody String msg) {
|
||||
//
|
||||
// return WmsApiResponse.success("收到", "收到" + msg);
|
||||
// }
|
||||
//
|
||||
// @GetMapping(value = "/testQuartz")
|
||||
// public String testQuartz() {
|
||||
// JobUtils.createJob(scheduler, new JobBean(JobTest.class.getName(), JobTest.class, "0/2 * * * * ? *"));
|
||||
// return "创建定时任务成功。";
|
||||
// }
|
||||
//
|
||||
// @PostMapping("/testFilter")
|
||||
// public WmsApiResponse<WaveRequest> testFilter(@RequestBody WaveRequest originRequest) {
|
||||
// originRequest.setWavesId("new");
|
||||
// return WmsApiResponse.success("收到", originRequest);
|
||||
// }
|
||||
|
||||
@PostMapping("/testImportImage")
|
||||
public BaseWmsApiResponse testFilter(@RequestPart("file") MultipartFile file, @RequestPart("fileVo") FileVo fileVo) throws Exception {
|
||||
return importExcelEasyPoi.doImportDbs(file, fileVo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 测试前台向后台请求图片
|
||||
* @param request 请求
|
||||
* @return 结果
|
||||
*/
|
||||
@PostMapping("/testRequestImage")
|
||||
public WmsApiResponse<List<ImageVo>> testRequestImage(@RequestBody InitKateWorkRequest request) {
|
||||
return testService.testRequestImage(request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 测试导出
|
||||
* @param dbsQuery 请求
|
||||
*/
|
||||
@PostMapping("/testExport")
|
||||
public void testExport(@RequestBody DbsQuery dbsQuery, HttpServletResponse response) {
|
||||
try {
|
||||
testService.testExport(dbsQuery, response);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.wms_main.controller.wms;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.CrossOrigin;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 用户控制类
|
||||
*/
|
||||
@RestController
|
||||
@ResponseBody
|
||||
@CrossOrigin
|
||||
@RequiredArgsConstructor
|
||||
@RequestMapping("/wms/user")
|
||||
public class UserController {
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package com.wms_main.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.wms_main.model.po.TAppConfig;
|
||||
|
||||
/**
|
||||
* 应用配置表服务接口
|
||||
*/
|
||||
public interface ITAppConfigService extends IService<TAppConfig> {
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.wms_main.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.wms_main.model.po.TAppDbs;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* DBS服务接口
|
||||
*/
|
||||
public interface ITAppDbsService extends IService<TAppDbs> {
|
||||
/**
|
||||
* 根据查询条件查询DBS列表
|
||||
* @param dbsQuery 查询条件
|
||||
* @return 查询结果
|
||||
*/
|
||||
List<TAppDbs> selectList(TAppDbs dbsQuery);
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package com.wms_main.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.wms_main.model.po.TAppEquipment;
|
||||
|
||||
/**
|
||||
* 设备表服务
|
||||
*/
|
||||
public interface ITAppEquipmentService extends IService<TAppEquipment> {
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package com.wms_main.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.wms_main.model.po.TAppGoods;
|
||||
|
||||
/**
|
||||
* 物料表服务接口
|
||||
*/
|
||||
public interface ITAppGoodsService extends IService<TAppGoods> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.wms_main.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.wms_main.model.po.TAppDbs;
|
||||
import com.wms_main.model.po.TAppImage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* DBS服务接口
|
||||
*/
|
||||
public interface ITAppImageService extends IService<TAppImage> {
|
||||
List<TAppImage> selectAllList();
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package com.wms_main.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.wms_main.model.po.TAppJobs;
|
||||
import com.wms_main.quartz.config.JobBean;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Jobs服务
|
||||
*/
|
||||
public interface ITAppJobsService extends IService<TAppJobs> {
|
||||
/**
|
||||
* 查询job
|
||||
* @param jobQuery 查询条件
|
||||
* @return 查询结果,返回jobBean
|
||||
*/
|
||||
List<JobBean> getJobs(TAppJobs jobQuery);
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package com.wms_main.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.wms_main.model.po.TAppKanban;
|
||||
|
||||
/**
|
||||
* 看板服务接口
|
||||
*/
|
||||
public interface ITAppKanbanService extends IService<TAppKanban> {
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package com.wms_main.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.wms_main.model.po.TAppLocation;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 库位表服务接口
|
||||
*/
|
||||
public interface ITAppLocationService extends IService<TAppLocation> {
|
||||
|
||||
List<TAppLocation> getAllLocation(Integer equipmentId);
|
||||
|
||||
boolean updateLocationOccupy(String location, Integer occupy);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.wms_main.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.wms_main.constant.enums.wms.OrderStatusEnum;
|
||||
import com.wms_main.model.po.TAppOrderIn;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ITAppOrderInService extends IService<TAppOrderIn> {
|
||||
|
||||
List<TAppOrderIn> getWithTaskId(String taskId);
|
||||
|
||||
List<TAppOrderIn> getWithVehicleNoAndStatus(String vehicleNo, OrderStatusEnum status);
|
||||
|
||||
boolean updateStatusAndDestinationWithVehicleNo(String vehicleNo, OrderStatusEnum status, String destination);
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.wms_main.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.wms_main.model.po.TAppOrderOut;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ITAppOrderOutService extends IService<TAppOrderOut> {
|
||||
|
||||
List<TAppOrderOut> getWithTaskId(String taskId);
|
||||
|
||||
List<TAppOrderOut> getWithStatus(Integer status);
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
package com.wms_main.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.wms_main.model.po.TAppOutsRecord;
|
||||
|
||||
public interface ITAppOutsRecordService extends IService<TAppOutsRecord> {
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
package com.wms_main.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.wms_main.model.po.TAppOuts;
|
||||
|
||||
public interface ITAppOutsService extends IService<TAppOuts> {
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
package com.wms_main.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.wms_main.model.po.TAppPickPlan;
|
||||
|
||||
public interface ITAppPickPlanService extends IService<TAppPickPlan> {
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package com.wms_main.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.wms_main.model.po.TAppPickTaskBak;
|
||||
|
||||
/**
|
||||
* 拣选记录表服务接口
|
||||
*/
|
||||
public interface ITAppPickTaskBakService extends IService<TAppPickTaskBak> {
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package com.wms_main.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.wms_main.model.po.TAppPickTask;
|
||||
|
||||
/**
|
||||
* 拣选任务表服务接口
|
||||
*/
|
||||
public interface ITAppPickTaskService extends IService<TAppPickTask> {
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.wms_main.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.wms_main.model.po.TAppDbs;
|
||||
import com.wms_main.model.po.TAppProductExtend;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* DBS服务接口
|
||||
*/
|
||||
public interface ITAppProductExtendService extends IService<TAppProductExtend> {
|
||||
List<TAppProductExtend> selectAllList();
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.wms_main.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.wms_main.model.po.TAppDbs;
|
||||
import com.wms_main.model.po.TAppProduct;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* DBS服务接口
|
||||
*/
|
||||
public interface ITAppProductService extends IService<TAppProduct> {
|
||||
List<TAppProduct> selectAllList();
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
package com.wms_main.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.wms_main.model.po.TAppSingleProduct;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* DBS服务接口
|
||||
*/
|
||||
public interface ITAppSingleProductService extends IService<TAppSingleProduct> {
|
||||
List<TAppSingleProduct> selectAllList();
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package com.wms_main.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.wms_main.model.po.TAppStand;
|
||||
|
||||
/**
|
||||
* 站台表映射
|
||||
*/
|
||||
public interface ITAppStandService extends IService<TAppStand> {
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package com.wms_main.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.wms_main.model.po.TAppStand;
|
||||
import com.wms_main.model.po.TAppStandWork;
|
||||
|
||||
/**
|
||||
* 站台工作映射
|
||||
*/
|
||||
public interface ITAppStandWorkService extends IService<TAppStandWork> {
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
package com.wms_main.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.wms_main.model.po.TAppStock;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 库存表服务接口
|
||||
*/
|
||||
public interface ITAppStockService extends IService<TAppStock> {
|
||||
|
||||
public List<TAppStock> getWithEntity(TAppStock entity);
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
package com.wms_main.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.wms_main.model.po.TAppStockUpdate;
|
||||
|
||||
public interface ITAppStockUpdateService extends IService<TAppStockUpdate> {
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package com.wms_main.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.wms_main.model.po.TAppTaskBak;
|
||||
|
||||
/**
|
||||
* 任务记录表服务接口
|
||||
*/
|
||||
public interface ITAppTaskBakService extends IService<TAppTaskBak> {
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package com.wms_main.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.wms_main.model.po.TAppTask;
|
||||
|
||||
/**
|
||||
* 任务表服务接口
|
||||
*/
|
||||
public interface ITAppTaskService extends IService<TAppTask> {
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package com.wms_main.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.wms_main.model.po.TAppVehicle;
|
||||
|
||||
/**
|
||||
* 载具表服务接口
|
||||
*/
|
||||
public interface ITAppVehicleService extends IService<TAppVehicle> {
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package com.wms_main.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.wms_main.model.po.TAppWcsTaskBak;
|
||||
|
||||
/**
|
||||
* wcs任务记录表mapper
|
||||
*/
|
||||
public interface ITAppWcsTaskBakService extends IService<TAppWcsTaskBak> {
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.wms_main.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.wms_main.model.po.TAppWcsTask;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* wcs任务表服务
|
||||
*/
|
||||
public interface ITAppWcsTaskService extends IService<TAppWcsTask> {
|
||||
|
||||
public Boolean existsTaskWithLocation(String Location);
|
||||
|
||||
public Integer getEquipmentByLocation(String Location);
|
||||
|
||||
public Integer getDepthByLocation(String Location);
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
package com.wms_main.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.wms_main.model.po.TAppWork;
|
||||
import com.wms_main.model.po.TAppWorkRecord;
|
||||
|
||||
/**
|
||||
* work表服务
|
||||
*/
|
||||
public interface ITAppWorkRecordService extends IService<TAppWorkRecord> {
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package com.wms_main.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.wms_main.model.po.TAppWork;
|
||||
|
||||
/**
|
||||
* work表服务
|
||||
*/
|
||||
public interface ITAppWorkService extends IService<TAppWork> {
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
package com.wms_main.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.wms_main.model.po.TSysMenu;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Menu服务
|
||||
*/
|
||||
public interface ITSysMenuService extends IService<TSysMenu> {
|
||||
/**
|
||||
* 根据roleId获取到所有菜单
|
||||
* @param roleId 角色id
|
||||
* @return 查询结果
|
||||
*/
|
||||
List<TSysMenu> selMenuByRoleId(String roleId);
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package com.wms_main.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.wms_main.model.po.TSysPermission;
|
||||
|
||||
/**
|
||||
* Permission服务
|
||||
*/
|
||||
public interface ITSysPermissionService extends IService<TSysPermission> {
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
package com.wms_main.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.wms_main.model.po.TSysRole;
|
||||
|
||||
/**
|
||||
* Role服务
|
||||
*/
|
||||
public interface ITSysRoleService extends IService<TSysRole> {
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
package com.wms_main.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.wms_main.model.po.TSysUser;
|
||||
|
||||
/**
|
||||
* User服务
|
||||
*/
|
||||
public interface ITSysUserService extends IService<TSysUser> {
|
||||
/**
|
||||
* 获取用户信息---带验证
|
||||
* @param loginAccount 登录账号
|
||||
* @param loginPassword 登录密码
|
||||
* @return 用户信息
|
||||
*/
|
||||
TSysUser getUserWithAuth(String loginAccount, String loginPassword);
|
||||
|
||||
/**
|
||||
* 获取用户信息---无验证
|
||||
* @param loginAccount 登录账号
|
||||
* @return 结果
|
||||
*/
|
||||
TSysUser getUserWithOutAuth(String loginAccount);
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.wms_main.dao.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.wms_main.dao.ITAppConfigService;
|
||||
import com.wms_main.mapper.AppConfigMapper;
|
||||
import com.wms_main.model.po.TAppConfig;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 应用配置表服务实现
|
||||
*/
|
||||
@Service
|
||||
public class TAppConfigServiceImpl extends ServiceImpl<AppConfigMapper, TAppConfig> implements ITAppConfigService {
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
package com.wms_main.dao.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.wms_main.dao.ITAppDbsService;
|
||||
import com.wms_main.mapper.AppDbsMapper;
|
||||
import com.wms_main.model.po.TAppDbs;
|
||||
import com.wms_main.repository.utils.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* DBS服务实现
|
||||
*/
|
||||
@Service
|
||||
public class TAppDbsServiceImpl extends ServiceImpl<AppDbsMapper, TAppDbs> implements ITAppDbsService {
|
||||
/**
|
||||
* 实现
|
||||
* @param dbsQuery 查询条件
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public List<TAppDbs> selectList(TAppDbs dbsQuery) {
|
||||
if (dbsQuery == null) {
|
||||
return list();
|
||||
}
|
||||
LambdaQueryWrapper<TAppDbs> dbsQueryWrapper = new LambdaQueryWrapper<>();
|
||||
if (StringUtils.isNotEmpty(dbsQuery.getDbsId())) {
|
||||
// dbsId
|
||||
dbsQueryWrapper.eq(TAppDbs::getDbsId, dbsQuery.getDbsId());
|
||||
}
|
||||
if (StringUtils.isNotEmpty(dbsQuery.getWorkOrder())) {
|
||||
// workOrder
|
||||
dbsQueryWrapper.eq(TAppDbs::getWorkOrder, dbsQuery.getWorkOrder());
|
||||
}
|
||||
if (StringUtils.isNotEmpty(dbsQuery.getProductIdOrigin())) {
|
||||
// productIdOrigin
|
||||
dbsQueryWrapper.eq(TAppDbs::getProductIdOrigin, dbsQuery.getProductIdOrigin());
|
||||
}
|
||||
if (StringUtils.isNotEmpty(dbsQuery.getProductId())) {
|
||||
// productId
|
||||
dbsQueryWrapper.eq(TAppDbs::getProductId, dbsQuery.getProductId());
|
||||
}
|
||||
if (dbsQuery.getTestPlanStartDate() != null) {
|
||||
// planStartDate
|
||||
dbsQueryWrapper.eq(TAppDbs::getTestPlanStartDate, dbsQuery.getTestPlanStartDate());
|
||||
}
|
||||
if (dbsQuery.getPlanProduction() != null) {
|
||||
// planProduction
|
||||
dbsQueryWrapper.eq(TAppDbs::getPlanProduction, dbsQuery.getPlanProduction());
|
||||
}
|
||||
if (StringUtils.isNotEmpty(dbsQuery.getFamily())) {
|
||||
// family
|
||||
dbsQueryWrapper.eq(TAppDbs::getFamily, dbsQuery.getFamily());
|
||||
}
|
||||
if (StringUtils.isNotEmpty(dbsQuery.getTestNo())) {
|
||||
// testNo
|
||||
dbsQueryWrapper.eq(TAppDbs::getTestNo, dbsQuery.getTestNo());
|
||||
}
|
||||
if (dbsQuery.getDbsStatus() != null) {
|
||||
// dbsStatus
|
||||
dbsQueryWrapper.eq(TAppDbs::getDbsStatus, dbsQuery.getDbsStatus());
|
||||
}
|
||||
return list(dbsQueryWrapper);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package com.wms_main.dao.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.wms_main.dao.ITAppEquipmentService;
|
||||
import com.wms_main.mapper.AppEquipmentMapper;
|
||||
import com.wms_main.model.po.TAppEquipment;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 设备表服务实现
|
||||
*/
|
||||
@Service
|
||||
public class TAppEquipmentServiceImpl extends ServiceImpl<AppEquipmentMapper, TAppEquipment> implements ITAppEquipmentService {
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user