项目初始化

This commit is contained in:
liuhanqing
2025-12-03 16:05:57 +08:00
commit 4b66b5bc44
871 changed files with 130415 additions and 0 deletions

29
.gitignore vendored Normal file
View File

@@ -0,0 +1,29 @@
# 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*
# idea
/.idea/
**/target/
/log/

20
LICENSE Normal file
View File

@@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2018 RuoYi
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

95
README.md Normal file
View File

@@ -0,0 +1,95 @@
<p align="center">
<img alt="logo" src="https://oscimg.oschina.net/oscnet/up-d3d0a9303e11d522a06cd263f3079027715.png">
</p>
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">RuoYi v3.8.9</h1>
<h4 align="center">基于SpringBoot+Vue前后端分离的Java快速开发框架</h4>
<p align="center">
<a href="https://gitee.com/y_project/RuoYi-Vue/stargazers"><img src="https://gitee.com/y_project/RuoYi-Vue/badge/star.svg?theme=dark"></a>
<a href="https://gitee.com/y_project/RuoYi-Vue"><img src="https://img.shields.io/badge/RuoYi-v3.8.9-brightgreen.svg"></a>
<a href="https://gitee.com/y_project/RuoYi-Vue/blob/master/LICENSE"><img src="https://img.shields.io/github/license/mashape/apistatus.svg"></a>
</p>
## 平台简介11111
若依是一套全部开源的快速开发平台,毫无保留给个人及企业免费使用。
* 前端采用Vue、Element UI。
* 后端采用Spring Boot、Spring Security、Redis & Jwt。
* 权限认证使用Jwt,支持多终端认证系统。
* 支持加载动态权限菜单,多方式轻松权限控制。
* 高效率开发,使用代码生成器可以一键生成前后端代码。
* 提供了技术栈([Vue3](https://v3.cn.vuejs.org) [Element Plus](https://element-plus.org/zh-CN) [Vite](https://cn.vitejs.dev))版本[RuoYi-Vue3](https://gitcode.com/yangzongzhuan/RuoYi-Vue3),保持同步更新。
* 提供了单应用版本[RuoYi-Vue-fast](https://gitcode.com/yangzongzhuan/RuoYi-Vue-fast),Oracle版本[RuoYi-Vue-Oracle](https://gitcode.com/yangzongzhuan/RuoYi-Vue-Oracle),保持同步更新。
* 不分离版本,请移步[RuoYi](https://gitee.com/y_project/RuoYi),微服务版本,请移步[RuoYi-Cloud](https://gitee.com/y_project/RuoYi-Cloud)
* 阿里云折扣场:[点我进入](http://aly.ruoyi.vip),腾讯云秒杀场:[点我进入](http://txy.ruoyi.vip)&nbsp;&nbsp;
## 内置功能
1. 用户管理:用户是系统操作者,该功能主要完成系统用户配置。
2. 部门管理:配置系统组织机构(公司、部门、小组),树结构展现支持数据权限。
3. 岗位管理:配置系统用户所属担任职务。
4. 菜单管理:配置系统菜单,操作权限,按钮权限标识等。
5. 角色管理:角色菜单权限分配、设置角色按机构进行数据范围权限划分。
6. 字典管理:对系统中经常使用的一些较为固定的数据进行维护。
7. 参数管理:对系统动态配置常用参数。
8. 通知公告:系统通知公告信息发布维护。
9. 操作日志:系统正常操作日志记录和查询;系统异常信息日志记录和查询。
10. 登录日志:系统登录日志记录查询包含登录异常。
11. 在线用户:当前系统中活跃用户状态监控。
12. 定时任务:在线(添加、修改、删除)任务调度包含执行结果日志。
13. 代码生成:前后端代码的生成(java、html、xml、sql)支持CRUD下载 。
14. 系统接口:根据业务代码自动生成相关的api接口文档。
15. 服务监控:监视当前系统CPU、内存、磁盘、堆栈等相关信息。
16. 缓存监控:对系统的缓存信息查询,命令统计等。
17. 在线构建器:拖动表单元素生成相应的HTML代码。
18. 连接池监视:监视当前系统数据库连接池状态,可进行分析SQL找出系统性能瓶颈。
## 在线体验
- admin/admin123
- 陆陆续续收到一些打赏,为了更好的体验已用于演示服务器升级。谢谢各位小伙伴。
演示地址:http://vue.ruoyi.vip
文档地址:http://doc.ruoyi.vip
## 演示图
<table>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/cd1f90be5f2684f4560c9519c0f2a232ee8.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/1cbcf0e6f257c7d3a063c0e3f2ff989e4b3.jpg"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/up-8074972883b5ba0622e13246738ebba237a.png"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/up-9f88719cdfca9af2e58b352a20e23d43b12.png"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/up-39bf2584ec3a529b0d5a3b70d15c9b37646.png"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/up-936ec82d1f4872e1bc980927654b6007307.png"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/up-b2d62ceb95d2dd9b3fbe157bb70d26001e9.png"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/up-d67451d308b7a79ad6819723396f7c3d77a.png"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/5e8c387724954459291aafd5eb52b456f53.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/644e78da53c2e92a95dfda4f76e6d117c4b.jpg"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/up-8370a0d02977eebf6dbf854c8450293c937.png"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/up-49003ed83f60f633e7153609a53a2b644f7.png"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/up-d4fe726319ece268d4746602c39cffc0621.png"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/up-c195234bbcd30be6927f037a6755e6ab69c.png"/></td>
</tr>
<tr>
<td><img src="https://oscimg.oschina.net/oscnet/b6115bc8c31de52951982e509930b20684a.jpg"/></td>
<td><img src="https://oscimg.oschina.net/oscnet/up-5e4daac0bb59612c5038448acbcef235e3a.png"/></td>
</tr>
</table>
## 若依前后端分离交流群
QQ群: [![加入QQ群](https://img.shields.io/badge/已满-937441-blue.svg)](https://jq.qq.com/?_wv=1027&k=5bVB1og) [![加入QQ群](https://img.shields.io/badge/已满-887144332-blue.svg)](https://jq.qq.com/?_wv=1027&k=5eiA4DH) [![加入QQ群](https://img.shields.io/badge/已满-180251782-blue.svg)](https://jq.qq.com/?_wv=1027&k=5AxMKlC) [![加入QQ群](https://img.shields.io/badge/已满-104180207-blue.svg)](https://jq.qq.com/?_wv=1027&k=51G72yr) [![加入QQ群](https://img.shields.io/badge/已满-186866453-blue.svg)](https://jq.qq.com/?_wv=1027&k=VvjN2nvu) [![加入QQ群](https://img.shields.io/badge/已满-201396349-blue.svg)](https://jq.qq.com/?_wv=1027&k=5vYAqA05) [![加入QQ群](https://img.shields.io/badge/已满-101456076-blue.svg)](https://jq.qq.com/?_wv=1027&k=kOIINEb5) [![加入QQ群](https://img.shields.io/badge/已满-101539465-blue.svg)](https://jq.qq.com/?_wv=1027&k=UKtX5jhs) [![加入QQ群](https://img.shields.io/badge/已满-264312783-blue.svg)](https://jq.qq.com/?_wv=1027&k=EI9an8lJ) [![加入QQ群](https://img.shields.io/badge/已满-167385320-blue.svg)](https://jq.qq.com/?_wv=1027&k=SWCtLnMz) [![加入QQ群](https://img.shields.io/badge/已满-104748341-blue.svg)](https://jq.qq.com/?_wv=1027&k=96Dkdq0k) [![加入QQ群](https://img.shields.io/badge/已满-160110482-blue.svg)](https://jq.qq.com/?_wv=1027&k=0fsNiYZt) [![加入QQ群](https://img.shields.io/badge/已满-170801498-blue.svg)](https://jq.qq.com/?_wv=1027&k=7xw4xUG1) [![加入QQ群](https://img.shields.io/badge/已满-108482800-blue.svg)](https://jq.qq.com/?_wv=1027&k=eCx8eyoJ) [![加入QQ群](https://img.shields.io/badge/已满-101046199-blue.svg)](https://jq.qq.com/?_wv=1027&k=SpyH2875) [![加入QQ群](https://img.shields.io/badge/已满-136919097-blue.svg)](https://jq.qq.com/?_wv=1027&k=tKEt51dz) [![加入QQ群](https://img.shields.io/badge/已满-143961921-blue.svg)](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=0vBbSb0ztbBgVtn3kJS-Q4HUNYwip89G&authKey=8irq5PhutrZmWIvsUsklBxhj57l%2F1nOZqjzigkXZVoZE451GG4JHPOqW7AW6cf0T&noverify=0&group_code=143961921) [![加入QQ群](https://img.shields.io/badge/已满-174951577-blue.svg)](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=ZFAPAbp09S2ltvwrJzp7wGlbopsc0rwi&authKey=HB2cxpxP2yspk%2Bo3WKTBfktRCccVkU26cgi5B16u0KcAYrVu7sBaE7XSEqmMdFQp&noverify=0&group_code=174951577) [![加入QQ群](https://img.shields.io/badge/已满-161281055-blue.svg)](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=Fn2aF5IHpwsy8j6VlalNJK6qbwFLFHat&authKey=uyIT%2B97x2AXj3odyXpsSpVaPMC%2Bidw0LxG5MAtEqlrcBcWJUA%2FeS43rsF1Tg7IRJ&noverify=0&group_code=161281055) [![加入QQ群](https://img.shields.io/badge/已满-138988063-blue.svg)](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=XIzkm_mV2xTsUtFxo63bmicYoDBA6Ifm&authKey=dDW%2F4qsmw3x9govoZY9w%2FoWAoC4wbHqGal%2BbqLzoS6VBarU8EBptIgPKN%2FviyC8j&noverify=0&group_code=138988063) [![加入QQ群](https://img.shields.io/badge/已满-151450850-blue.svg)](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=DkugnCg68PevlycJSKSwjhFqfIgrWWwR&authKey=pR1Pa5lPIeGF%2FFtIk6d%2FGB5qFi0EdvyErtpQXULzo03zbhopBHLWcuqdpwY241R%2F&noverify=0&group_code=151450850) [![加入QQ群](https://img.shields.io/badge/已满-224622315-blue.svg)](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=F58bgRa-Dp-rsQJThiJqIYv8t4-lWfXh&authKey=UmUs4CVG5OPA1whvsa4uSespOvyd8%2FAr9olEGaWAfdLmfKQk%2FVBp2YU3u2xXXt76&noverify=0&group_code=224622315) [![加入QQ群](https://img.shields.io/badge/已满-287842588-blue.svg)](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=Nxb2EQ5qozWa218Wbs7zgBnjLSNk_tVT&authKey=obBKXj6SBKgrFTJZx0AqQnIYbNOvBB2kmgwWvGhzxR67RoRr84%2Bus5OadzMcdJl5&noverify=0&group_code=287842588) [![加入QQ群](https://img.shields.io/badge/已满-187944233-blue.svg)](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=numtK1M_I4eVd2Gvg8qtbuL8JgX42qNh&authKey=giV9XWMaFZTY%2FqPlmWbkB9g3fi0Ev5CwEtT9Tgei0oUlFFCQLDp4ozWRiVIzubIm&noverify=0&group_code=187944233) [![加入QQ群](https://img.shields.io/badge/228578329-blue.svg)](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=G6r5KGCaa3pqdbUSXNIgYloyb8e0_L0D&authKey=4w8tF1eGW7%2FedWn%2FHAypQksdrML%2BDHolQSx7094Agm7Luakj9EbfPnSTxSi2T1LQ&noverify=0&group_code=228578329) 点击按钮入群。

12
bin/clean.bat Normal file
View File

@@ -0,0 +1,12 @@
@echo off
echo.
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>target<65><74><EFBFBD><EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD>
echo.
%~d0
cd %~dp0
cd ..
call mvn clean
pause

12
bin/package.bat Normal file
View File

@@ -0,0 +1,12 @@
@echo off
echo.
echo [<5B><>Ϣ] <20><><EFBFBD><EFBFBD>Web<65><62><EFBFBD>̣<EFBFBD><CCA3><EFBFBD><EFBFBD><EFBFBD>war/jar<61><72><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD>
echo.
%~d0
cd %~dp0
cd ..
call mvn clean package -Dmaven.test.skip=true
pause

14
bin/run.bat Normal file
View File

@@ -0,0 +1,14 @@
@echo off
echo.
echo [<5B><>Ϣ] ʹ<><CAB9>Jar<61><72><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Web<65><62><EFBFBD>̡<EFBFBD>
echo.
cd %~dp0
cd ../ruoyi-admin/target
set JAVA_OPTS=-Xms256m -Xmx1024m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=512m
java -jar %JAVA_OPTS% ruoyi-admin.jar
cd bin
pause

Binary file not shown.

300
pom.xml Normal file
View File

@@ -0,0 +1,300 @@
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi</artifactId>
<version>3.8.9</version>
<name>ruoyi</name>
<url>http://www.ruoyi.vip</url>
<description>若依管理系统</description>
<properties>
<ruoyi.version>3.8.9</ruoyi.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
<spring-boot.version>2.5.15</spring-boot.version>
<druid.version>1.2.23</druid.version>
<bitwalker.version>1.21</bitwalker.version>
<swagger.version>3.0.0</swagger.version>
<kaptcha.version>2.3.3</kaptcha.version>
<pagehelper.boot.version>1.4.7</pagehelper.boot.version>
<fastjson.version>2.0.53</fastjson.version>
<oshi.version>6.6.5</oshi.version>
<commons.io.version>2.13.0</commons.io.version>
<poi.version>4.1.2</poi.version>
<velocity.version>2.3</velocity.version>
<jwt.version>0.9.1</jwt.version>
<!-- override dependency version -->
<tomcat.version>9.0.102</tomcat.version>
<logback.version>1.2.13</logback.version>
<spring-security.version>5.7.12</spring-security.version>
<spring-framework.version>5.3.39</spring-framework.version>
<hutool.version>5.8.27</hutool.version>
<lombok.version>1.18.30</lombok.version>
<HslCommunication.version>3.7.0</HslCommunication.version>
<mybatis-plus.version>3.5.2</mybatis-plus.version>
</properties>
<!-- 依赖声明 -->
<dependencyManagement>
<dependencies>
<!-- 覆盖SpringFramework的依赖配置-->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-framework-bom</artifactId>
<version>${spring-framework.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- 覆盖SpringSecurity的依赖配置-->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-bom</artifactId>
<version>${spring-security.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- SpringBoot的依赖配置-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!-- 覆盖logback的依赖配置-->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>${logback.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
</dependency>
<!-- 覆盖tomcat的依赖配置-->
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-core</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-el</artifactId>
<version>${tomcat.version}</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-websocket</artifactId>
<version>${tomcat.version}</version>
</dependency>
<!-- 阿里数据库连接池 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>${druid.version}</version>
</dependency>
<!-- 解析客户端操作系统、浏览器等 -->
<dependency>
<groupId>eu.bitwalker</groupId>
<artifactId>UserAgentUtils</artifactId>
<version>${bitwalker.version}</version>
</dependency>
<!-- pagehelper 分页插件 -->
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>${pagehelper.boot.version}</version>
</dependency>
<!-- 获取系统信息 -->
<dependency>
<groupId>com.github.oshi</groupId>
<artifactId>oshi-core</artifactId>
<version>${oshi.version}</version>
</dependency>
<!-- Swagger3依赖 -->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-boot-starter</artifactId>
<version>${swagger.version}</version>
<exclusions>
<exclusion>
<groupId>io.swagger</groupId>
<artifactId>swagger-models</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- io常用工具类 -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons.io.version}</version>
</dependency>
<!-- excel工具 -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>${poi.version}</version>
</dependency>
<!-- velocity代码生成使用模板 -->
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-engine-core</artifactId>
<version>${velocity.version}</version>
</dependency>
<!-- 阿里JSON解析器 -->
<dependency>
<groupId>com.alibaba.fastjson2</groupId>
<artifactId>fastjson2</artifactId>
<version>${fastjson.version}</version>
</dependency>
<!-- Token生成与解析-->
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>${jwt.version}</version>
</dependency>
<!-- 验证码 -->
<dependency>
<groupId>pro.fessional</groupId>
<artifactId>kaptcha</artifactId>
<version>${kaptcha.version}</version>
</dependency>
<!-- 定时任务-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-quartz</artifactId>
<version>${ruoyi.version}</version>
</dependency>
<!-- 代码生成-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-generator</artifactId>
<version>${ruoyi.version}</version>
</dependency>
<!-- 核心模块-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-framework</artifactId>
<version>${ruoyi.version}</version>
</dependency>
<!-- 系统模块-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-system</artifactId>
<version>${ruoyi.version}</version>
</dependency>
<!-- 通用工具-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common</artifactId>
<version>${ruoyi.version}</version>
</dependency>
<!--hutool工具包-->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>${hutool.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.github.dathlin/HslCommunication -->
<dependency>
<groupId>com.github.dathlin</groupId>
<artifactId>HslCommunication</artifactId>
<version>${HslCommunication.version}</version>
</dependency>
<!-- mybatis-plus -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>${mybatis-plus.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<modules>
<module>ruoyi-admin</module>
<module>ruoyi-framework</module>
<module>ruoyi-system</module>
<module>ruoyi-quartz</module>
<module>ruoyi-generator</module>
<module>ruoyi-common</module>
</modules>
<packaging>pom</packaging>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>public</id>
<name>aliyun nexus</name>
<url>https://maven.aliyun.com/repository/public</url>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>public</id>
<name>aliyun nexus</name>
<url>https://maven.aliyun.com/repository/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</project>

137
ruoyi-admin/pom.xml Normal file
View File

@@ -0,0 +1,137 @@
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>ruoyi</artifactId>
<groupId>com.ruoyi</groupId>
<version>3.8.9</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
<artifactId>ruoyi-admin</artifactId>
<description>
web服务入口
</description>
<dependencies>
<!-- spring-boot-devtools -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional> <!-- 表示依赖不会传递 -->
</dependency>
<!-- swagger3-->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-boot-starter</artifactId>
</dependency>
<!-- 防止进入swagger页面报类型转换错误,排除3.0.0中的引用,手动增加1.6.2版本 -->
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-models</artifactId>
<version>1.6.2</version>
</dependency>
<!-- Mysql驱动包 -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- sql server驱动包 -->
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
</dependency>
<!-- 核心模块-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-framework</artifactId>
</dependency>
<!-- 定时任务-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-quartz</artifactId>
</dependency>
<!-- 代码生成-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-generator</artifactId>
</dependency>
<!-- mybatis-plus-->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
</dependency>
<!-- lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<!-- plc连接库 -->
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4j-api</artifactId>
<version>0.9.0</version>
</dependency>
<dependency>
<groupId>org.apache.plc4x</groupId>
<artifactId>plc4j-driver-s7</artifactId>
<version>0.9.0</version>
</dependency>
<dependency>
<groupId>com.github.dathlin</groupId>
<artifactId>HslCommunication</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.5.15</version>
<configuration>
<fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<warName>${project.artifactId}</warName>
</configuration>
</plugin>
</plugins>
<finalName>${project.artifactId}</finalName>
</build>
</project>

View File

@@ -0,0 +1,26 @@
package com.ruoyi;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
/**
* 启动程序
*
* @author ruoyi
*/
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
@EnableScheduling
@EnableAsync
public class RuoYiApplication
{
public static void main(String[] args)
{
// System.setProperty("spring.devtools.restart.enabled", "false");
SpringApplication.run(RuoYiApplication.class, args);
System.out.println("(♥◠‿◠)ノ゙ 福来瑞达WCS系统启动成功 ლ(´ڡ`ლ)゙ ");
}
}

View File

@@ -0,0 +1,18 @@
package com.ruoyi;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
/**
* web容器中进行部署
*
* @author ruoyi
*/
public class RuoYiServletInitializer extends SpringBootServletInitializer
{
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application)
{
return application.sources(RuoYiApplication.class);
}
}

View File

@@ -0,0 +1,53 @@
package com.ruoyi.api.controller;
import com.ruoyi.api.domain.agv.agvCallback.AgvCallbackRequest;
import com.ruoyi.api.domain.agv.agvCallback.AgvCallbackResponse;
import com.ruoyi.api.service.IApiService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
* Agv操作请求
*/
@RestController
@RequestMapping("/agv/api")
@Slf4j
public class AgvController extends BaseController {
@Autowired
private IApiService apiService;
/**
* agv执行状态返回接口
* @param request
* @return
*/
@PostMapping("/agvCallback")
public AgvCallbackResponse agvCallback(@RequestBody AgvCallbackRequest request) {
return apiService.agvCallback(request);
}
/**
* agv搬运作业
* @param param{
* startPoint:起始点
* endPoint:结束点
* containerCode:容器编号
* taskNo:任务号
* }
* @return
*/
@PostMapping("/receiveAgvMoveJob")
public AjaxResult receiveAgvMoveJob(@RequestBody Map<String, String> param) {
return apiService.receiveAgvMoveJob(param);
}
}

View File

@@ -0,0 +1,120 @@
package com.ruoyi.api.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.api.domain.RequestLog;
import com.ruoyi.api.service.IRequestLogService;
import com.ruoyi.device.DeviceCar.domain.DeviceCar;
import com.ruoyi.device.DeviceCar.service.IDeviceCarService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 接口记录Controller
*
* @author ruoyi
* @date 2025-06-11
*/
@RestController
@RequestMapping("/device/api")
public class RequestLogController extends BaseController
{
@Autowired
private IRequestLogService requestLogService;
@Autowired
private IDeviceCarService deviceCarService;
/**
* 查询所有设备信息
*/
@GetMapping("/devicecar/list")
public AjaxResult listAllDeviceCar()
{
List<DeviceCar> list = deviceCarService.selectDeviceCarList(new DeviceCar());
return success(list);
}
/**
* 查询接口记录列表
*/
@PreAuthorize("@ss.hasPermi('device:api:list')")
@GetMapping("/list")
public TableDataInfo list(RequestLog requestLog)
{
startPage();
List<RequestLog> list = requestLogService.selectRequestLogList(requestLog);
return getDataTable(list);
}
/**
* 导出接口记录列表
*/
@PreAuthorize("@ss.hasPermi('device:api:export')")
@Log(title = "接口记录", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, RequestLog requestLog)
{
List<RequestLog> list = requestLogService.selectRequestLogList(requestLog);
ExcelUtil<RequestLog> util = new ExcelUtil<RequestLog>(RequestLog.class);
util.exportExcel(response, list, "接口记录数据");
}
/**
* 获取接口记录详细信息
*/
@PreAuthorize("@ss.hasPermi('device:api:query')")
@GetMapping(value = "/{requestId}")
public AjaxResult getInfo(@PathVariable("requestId") Long requestId)
{
return success(requestLogService.selectRequestLogByRequestId(requestId));
}
/**
* 新增接口记录
*/
@PreAuthorize("@ss.hasPermi('device:api:add')")
@Log(title = "接口记录", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody RequestLog requestLog)
{
return toAjax(requestLogService.insertRequestLog(requestLog));
}
/**
* 修改接口记录
*/
@PreAuthorize("@ss.hasPermi('device:api:edit')")
@Log(title = "接口记录", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody RequestLog requestLog)
{
return toAjax(requestLogService.updateRequestLog(requestLog));
}
/**
* 删除接口记录
*/
@PreAuthorize("@ss.hasPermi('device:api:remove')")
@Log(title = "接口记录", businessType = BusinessType.DELETE)
@DeleteMapping("/{requestIds}")
public AjaxResult remove(@PathVariable Long[] requestIds)
{
return toAjax(requestLogService.deleteRequestLogByRequestIds(requestIds));
}
}

View File

@@ -0,0 +1,124 @@
package com.ruoyi.api.controller;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.ruoyi.common.annotation.Anonymous;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.device.ssj.domain.DeviceSsj;
import com.ruoyi.device.ssj.service.IDeviceSsjService;
import com.ruoyi.job.domain.MydoJob;
import com.ruoyi.job.service.IMydoJobService;
/**
* 大屏接口Controller
*
* @author ruoyi
*/
@Anonymous
@RestController
@RequestMapping("/api/screen")
public class ScreenController extends BaseController {
@Autowired
private IDeviceSsjService deviceSsjService;
@Autowired
private IMydoJobService mydoJobService;
// 定义各区域输送机编号数组
private static final Map<Integer, List<String>> AREA_SSJ_CODES = new HashMap<>();
// 静态初始化输送机编号数组
static {
// 1区域输送机编号
AREA_SSJ_CODES.put(1, Arrays.asList(
"L2007","L2008","L2005","L2006","L2013"
));
// 2区域输送机编号
AREA_SSJ_CODES.put(2, Arrays.asList(
"L2003","L2004","L2012","L2001","L2002"
));
// 3区域输送机编号
AREA_SSJ_CODES.put(3, Arrays.asList(
"L1001","L1002","L1011"
));
// 4区域输送机编号
AREA_SSJ_CODES.put(4, Arrays.asList(
"L1003","L1004","L1012"
));
}
/**
* 根据区域编号查询输送机列表
*
* @param areaNum 区域编号(1-4)
* @return 输送机数据列表
*/
@PostMapping("/ssj/{areaNum}")
public AjaxResult getSsjListByArea(@PathVariable("areaNum") Integer areaNum) {
if (areaNum < 1 || areaNum > 4) {
return AjaxResult.error("区域编号必须在1-4之间");
}
// 获取该区域的输送机编号数组
List<String> ssjCodes = AREA_SSJ_CODES.get(areaNum);
if (ssjCodes == null || ssjCodes.isEmpty()) {
return AjaxResult.error("未找到该区域的输送机编号配置");
}
// 查询所有输送机
List<DeviceSsj> allSsjList = deviceSsjService.selectDeviceSsjList(null);
// 根据编号数组筛选输送机
List<DeviceSsj> filteredList = allSsjList.stream()
.filter(ssj -> ssj.getDeviceCode() != null && ssjCodes.contains(ssj.getDeviceCode().trim()))
.collect(Collectors.toList());
// 转换为前端需要的数据格式
List<Map<String, Object>> resultList = new ArrayList<>();
// 创建作业信息列表
List<MydoJob> jobList = new ArrayList<>();
for (DeviceSsj ssj : filteredList) {
Map<String, Object> map = new HashMap<>();
map.put("id", ssj.getDeviceCode());
map.put("name", ssj.getName());
map.put("kx", String.valueOf(ssj.getKx()));
map.put("dw", String.valueOf(ssj.getDw()));
map.put("sbzt", ssj.getException());
// map.put("trayCode", ssj.getTrayCode());
map.put("allowPut", String.valueOf(ssj.getAllowPut()));
map.put("traySize", String.valueOf(ssj.getTraySize()));
map.put("exception", String.valueOf(ssj.getException()));
map.put("taskNo", ssj.getTaskNo());
resultList.add(map);
// 如果taskNo大于0,查询对应的作业信息
if (ssj.getTaskNo()> 0) {
MydoJob job = mydoJobService.selectMydoJobByTaskNo(Long.valueOf(ssj.getTaskNo()));
if (job != null) {
jobList.add(job);
}
}
}
// 返回结果包含data和job两个字段
Map<String, Object> result = new HashMap<>();
result.put("ssj", resultList);
result.put("job", jobList);
return AjaxResult.success(result);
}
}

View File

@@ -0,0 +1,37 @@
package com.ruoyi.api.controller;
import com.ruoyi.api.service.ITestService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
@RestController
@RequestMapping("/test")
public class TestController {
@Resource
private ITestService testService;
@GetMapping("/sendSsjData")
public String sendSsjData(Integer id) {
boolean b = testService.sendSsjData(id);
if (!b) {
return "error";
}
return "success";
}
@GetMapping("/sendDdjData")
public String sendDdjData(Integer id) {
boolean b = testService.sendDdjData(id);
if (!b) {
return "error";
}
return "success";
}
}

View File

@@ -0,0 +1,56 @@
package com.ruoyi.api.controller;
import com.ruoyi.api.domain.wcs2wms.JobParam;
import com.ruoyi.api.domain.wcs2wms.ReceiveJob;
import com.ruoyi.api.service.IApiService;
import com.ruoyi.common.core.domain.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/wcs2Wms/api")
public class Wcs2WmsController {
@Autowired
private IApiService apiService;
/**
* 接收出库任务
*
* @param receiveOutJob
* @return
*/
@PostMapping("/receiveOutMydoJob")
public AjaxResult receiveOutMydoJob(@RequestBody ReceiveJob receiveOutJob) {
return apiService.receiveOutMydoJob(receiveOutJob);
}
/**
* 接收入库任务
*
* @param receiveInJob
* @return
*/
@PostMapping("/receiveInMydoJob")
public AjaxResult receiveInMydoJob(@RequestBody ReceiveJob receiveInJob) {
return apiService.receiveInMydoJob(receiveInJob);
}
/**
* wms取消任务
* @param jobParam
* @return
*/
@PostMapping("/cancelMydoJob")
public AjaxResult cancelMydoJob(@RequestBody JobParam jobParam) {
return apiService.cancelMydoJob(jobParam);
}
}

View File

@@ -0,0 +1,21 @@
package com.ruoyi.api.domain;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
/**
* 接口接收类
*/
@AllArgsConstructor
@NoArgsConstructor
@Data
@ToString
public class InterfaceReceive {
private Integer code;
private String msg;
private Object data;
}

View File

@@ -0,0 +1,247 @@
package com.ruoyi.api.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 接口记录对象 request_log
*
* @author ruoyi
* @date 2025-06-11
*/
public class RequestLog extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 请求id */
private Long requestId;
/** 请求时间 */
@Excel(name = "请求时间")
private String requestTime;
/** 来源系统 */
@Excel(name = "来源系统")
private String sourceSystem;
/** 目标系统 */
@Excel(name = "目标系统")
private String targetSystem;
/** 接口名称 */
@Excel(name = "接口名称")
private String endpoint;
/** url路径 */
@Excel(name = "url路径")
private String requestUrl;
/** 请求方式 */
@Excel(name = "请求方式")
private String requestMethod;
/** 请求头信息 */
@Excel(name = "请求头信息")
private String requestHeaders;
/** 请求参数 */
@Excel(name = "请求参数")
private String requestBody;
/** 响应时间 */
@Excel(name = "响应时间")
private String responseTime;
/** 响应主体 */
@Excel(name = "响应主体")
private String responseBody;
/** 响应状态 */
@Excel(name = "响应状态")
private String responseStatus;
/** 错误信息 */
@Excel(name = "错误信息")
private String errorDetails;
/** 耗时 */
@Excel(name = "耗时")
private String duration;
/** 是否成功 */
@Excel(name = "是否成功",dictType = "interface_status")
private String isSuccessful;
public void setRequestId(Long requestId)
{
this.requestId = requestId;
}
public Long getRequestId()
{
return requestId;
}
public void setRequestTime(String requestTime)
{
this.requestTime = requestTime;
}
public String getRequestTime()
{
return requestTime;
}
public void setSourceSystem(String sourceSystem)
{
this.sourceSystem = sourceSystem;
}
public String getSourceSystem()
{
return sourceSystem;
}
public void setTargetSystem(String targetSystem)
{
this.targetSystem = targetSystem;
}
public String getTargetSystem()
{
return targetSystem;
}
public void setEndpoint(String endpoint)
{
this.endpoint = endpoint;
}
public String getEndpoint()
{
return endpoint;
}
public void setRequestUrl(String requestUrl)
{
this.requestUrl = requestUrl;
}
public String getRequestUrl()
{
return requestUrl;
}
public void setRequestMethod(String requestMethod)
{
this.requestMethod = requestMethod;
}
public String getRequestMethod()
{
return requestMethod;
}
public void setRequestHeaders(String requestHeaders)
{
this.requestHeaders = requestHeaders;
}
public String getRequestHeaders()
{
return requestHeaders;
}
public void setRequestBody(String requestBody)
{
this.requestBody = requestBody;
}
public String getRequestBody()
{
return requestBody;
}
public void setResponseTime(String responseTime)
{
this.responseTime = responseTime;
}
public String getResponseTime()
{
return responseTime;
}
public void setResponseBody(String responseBody)
{
this.responseBody = responseBody;
}
public String getResponseBody()
{
return responseBody;
}
public void setResponseStatus(String responseStatus)
{
this.responseStatus = responseStatus;
}
public String getResponseStatus()
{
return responseStatus;
}
public void setErrorDetails(String errorDetails)
{
this.errorDetails = errorDetails;
}
public String getErrorDetails()
{
return errorDetails;
}
public void setDuration(String duration)
{
this.duration = duration;
}
public String getDuration()
{
return duration;
}
public void setIsSuccessful(String isSuccessful)
{
this.isSuccessful = isSuccessful;
}
public String getIsSuccessful()
{
return isSuccessful;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("requestId", getRequestId())
.append("requestTime", getRequestTime())
.append("sourceSystem", getSourceSystem())
.append("targetSystem", getTargetSystem())
.append("endpoint", getEndpoint())
.append("requestUrl", getRequestUrl())
.append("requestMethod", getRequestMethod())
.append("requestHeaders", getRequestHeaders())
.append("requestBody", getRequestBody())
.append("responseTime", getResponseTime())
.append("responseBody", getResponseBody())
.append("responseStatus", getResponseStatus())
.append("errorDetails", getErrorDetails())
.append("duration", getDuration())
.append("isSuccessful", getIsSuccessful())
.toString();
}
}

View File

@@ -0,0 +1,19 @@
package com.ruoyi.api.domain.agv;
import lombok.Data;
@Data
public class ResponseBase {
/**
* 返回码
*/
private Integer code;
/**
* 返回消息
*/
private String message;
/**
* 自定义返回
*/
private Object data;
}

View File

@@ -0,0 +1,126 @@
package com.ruoyi.api.domain.agv.agvCallback;
import lombok.Data;
@Data
public class AgvCallbackRequest {
/**
* 请求编号,每个请求都要一个唯一编号,同一个请求重复提交,使用同一编号
*/
private String reqCode;
/**
* 请求时间戳,格式: “yyyy-MM-dd HH:mm:ss”
*/
private String reqTime;
/**
* 地码 X 坐标(mm):任务完成时有值
*/
private Number cooX;
/**
* 地码 Y 坐标(mm):任务完成时有值
*/
private Number cooY;
/**
* 当前位置编号
* 任务开始:该位置为任务起点
* 走出储位:该位置为任务起点
* 任务单取消:该位置为工作位编号
* 任务结束:该位置为任务终点
* 取放申请:取放料箱的点
*/
private String currentPositionCode;
/**
* 自定义字段,不超过2000个字符
*/
private String data;
/**
* 地图编号
*/
private String mapCode;
/**
* 地码编号:任务完成时有值
*/
private String mapDataCode;
/**
* 仓位编号:叉车与CTU任务时有值
*/
private String stgBinCode;
/**
* 方法名, 可使用任务类型做为方法名
* 默认使用方式:
* start : 任务开始
* outbin : 走出储位
* end : 任务结束
* cancel : 任务单取消
* apply:CTU料箱取放申请
*/
private String method;
/**
* 货架编号:背货架时有值
*/
private String podCode;
/**
* 方向:“180”,”0”,”90”,”-90” 分别对应地图的”左”,”右”,”上”,”下”:任务完成时有值
*/
private String podDir;
/**
* 物料编号
*/
private String materialLot;
/**
* AGV编号(同 agvCode )
*/
private String robotCode;
/**
* 当前任务单号
*/
private String taskCode;
/**
* 工作位,与RCS-2000端配置的位置名称一致。任务完成时有值,与生成任务单接口中的wbCode一致。
*/
private String wbCode;
/**
* 容器编号
*/
private String ctnrCode;
/**
* 容器类型
*/
private String ctnrType;
/**
* 巷道编号
*/
private String roadWayCode;
/**
* 巷道内顺序号
* 巷道尾是0,到巷道头依次递增1
*/
private String seq;
/**
* 设备编号,如梳齿式工作站、输送线等,一般使用于CTU场景。
* 系统根据仓位定位到关联的设备编号。
*/
private String eqpCode;
}

View File

@@ -0,0 +1,27 @@
package com.ruoyi.api.domain.agv.agvCallback;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class AgvCallbackResponse {
/**
* 响应码
*/
private Integer code;
/**
* 响应信息
*/
private String message;
/**
* 请求编号
*/
private String reqCode;
}

View File

@@ -0,0 +1,68 @@
package com.ruoyi.api.domain.agv.cancelTask;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
/**
* 【取消任务】请求接口
*/
@Data
public class CancelTaskRequest {
/**
* 请求编号
*/
@NotBlank(message = "请求编号不能为空")
@Size(max = 32, message = "请求编号不能超过32位")
private String reqCode;
/**
* 请求时间戳
* 格式: “yyyy-MM-dd HH:mm:ss”
*/
@Size(max = 20, message = "请求时间格式应为 yyyy-MM-dd HH:mm:ss")
private String reqTime;
/**
* 客户端编号
*/
@Size(max = 16, message = "客户端编号不能超过16位")
private String clientCode;
/**
* 令牌号, 由调度系统颁发,由RCS-2000告知上层系统
*/
@Size(max = 64, message = "令牌号不能超过64位")
private String tokenCode;
/**
* 取消类型
* 0表示:取消后货架直接放地上
* 1表示:AGV仍然背着货架, 根据回库区域执行回库指令, 只有潜伏车和CTU车支持。
* 若不传值,默认的取消模式为0
*/
@Size(max = 16, message = "取消类型不能超过16位")
private String forceCancel;
/**
* forcecancel=1时有意义,
* 回库区域编号,
* 如果为空,采用货架配置的库区
*/
@Size(max = 16, message = "回库区域编号不能超过16位")
private String matterArea;
/**
* 取消该AGV正在执行的任务单
*/
@Size(max = 5, message = "AGV编号不能超过5位")
private String agvCode;
/**
* 任务单编号, 取消该任务单
*/
@Size(max = 64, message = "任务单编号不能超过64位")
private String taskCode;
}

View File

@@ -0,0 +1,13 @@
package com.ruoyi.api.domain.agv.cancelTask;
import com.ruoyi.api.domain.agv.ResponseBase;
import lombok.Data;
@Data
public class CancelTaskResponse extends ResponseBase {
/**
* 请求编号
*/
public String reqCode;
}

View File

@@ -0,0 +1,70 @@
package com.ruoyi.api.domain.agv.continueTask;
import lombok.Data;
/**
* 【继续执行任务】请求接口
*/
@Data
public class ContinueTaskRequest {
/**
* 请求编号
* 每个请求都要一个唯一编号,同一个请求重复提交,使用同一编号。
*/
private String reqCode;
/**
* 请求时间截
* 格式:"yyyy-MM-dd HH:mm:ss"
*/
private String reqTime;
/**
* 客户端编号
* 如PDA,HCWMS等。
*/
private String clientCode;
/**
* 令牌号
* 由调度系统颁发。
*/
private String tokenCode;
/**
* 工作位
* 与RCS-2000端配置的位置名称一致。
*/
private String wbCode;
/**
* 货架号
* 采用货架号触发的方式。
*/
private String podCode;
/**
* AGV编号
* 采用AGV编号触发的方式。
*/
private String agvCode;
/**
* 任务单号
* 选填,不填系统自动生成,必须为64位UUID。
*/
private String taskCode;
/**
* 下一个子任务的序列
* 指定第几个子任务开始执行,校验子任务执行是否正确。不填默认执行下一个子任务。
*/
private String taskSeq;
/**
* 下一个位置信息
* 在任务类型中配置外部设置时需要传入,否则不需要设置。待现场地图部署、配置完成后可获取。
*/
private NextPositionCodeData nextPositionCode;
}

View File

@@ -0,0 +1,13 @@
package com.ruoyi.api.domain.agv.continueTask;
import com.ruoyi.api.domain.agv.ResponseBase;
import lombok.Data;
@Data
public class ContinueTaskResponse extends ResponseBase {
/**
* 请求编号
*/
public String reqCode;
}

View File

@@ -0,0 +1,17 @@
package com.ruoyi.api.domain.agv.continueTask;
public class NextPositionCodeData {
/**
* 位置编号
*/
private String positionCode;
/**
* 对象类型定义
* 00:代表nextPositionCode是一个位置
* 02:代表nextPositionCode是一个策略
*/
private String type;
}

View File

@@ -0,0 +1,156 @@
package com.ruoyi.api.domain.agv.genAgvSchedulingTask;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.List;
import java.util.UUID;
/**
* 【生成AGV任务】请求接口
*/
@Data
public class GenAgvSchedulingTaskRequest {
/**
* 请求编号
* 同一个请求重复提交, 使用同一编号
*/
@NotNull
private String reqCode = UUID.randomUUID().toString();
/**
* 请求时间
* 格式: “yyyy-MM-dd HH:mm:ss”
*/
private String reqTime = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));
/**
* 客户端编号
* 客户端编号,如PDA,HCWMS等
*/
private String clientCode;
/**
* 令牌号
* 由调度系统颁发
*/
private String tokenCode;
/**
* 任务类型
* 内置任务类型:
* 厂内货架搬运: F01
* 厂内货架空满交换: F02
* 辊筒搬运接驳:F03
* 厂内货架出库AGV待命:F04
* 旋转货架: F05
* 厂内电梯任务: F06
* 以下为叉车专用任务类型
* 高位货架到工作台: F11
* 工作台到高位货架: F12
* 巷道到工作台: F13
* 工作台到巷道: F14
* 高位货架到工作台(接驳) : F15
* 工作台到高位货架 (接驳) : F16
* 巷道到工作台(接驳) : F17
* 工作台到巷道(接驳) : F18
* 叉车电梯主任务: F20
*/
@NotNull
private String taskTyp;
/**
* 容器类型(叉车/CTU专用) 叉车项目必传
*/
private String ctnrTyp;
/**
* 容器编号 (叉车/CTU专用)
*/
private String ctnrCode; //
/**
* 容器数量(叉车堆叠专用),默认值1,仅记录堆叠的数量不记录堆叠的每个容器号
*/
private String ctnrNum;
/**
* 任务模式
* 0-普通move 1-出库move 2-入库move 3-移库move
*/
private String taskMode;
/**
* 工作位
* 与RCS-2000端配置的位置名称一致, 工作位名称为字母\数字\或组合
*/
private String wbCode;
/**
* 位置路径
* AGV关键路径位置集合,与任务类型中模板配置的位置路径一一对应。待现场地图部署、配置完成后可获取
*/
private List<PositionCodeData> positionCodePath;
/**
* 货架编号
* 不指定货架可以为空
*/
private String podCode;
/**
* 货架方向
* “180”,”0”,”90”,”-90” 分别对应地图的”左”,”右”,”上”,”下”
* 不指定方向可以为空
* 如果终点不是工作台或工作台未配置操作方向则货架拣货方向podDir作为终点方向
* 如果工作台配有操作方向,则系统会根据货架拣货方向podDir和工作台操作方向计算货架终点方向
*/
private String podDir;
/**
* 货架类型, 传空时表示随机找个货架
* 找空货架传参方式如下:
* -1: 代表不关心货架类型, 找到空货架即可.
* -2: 代表从工作位获取关联货架类型, 如果未配置, 只找空货架.
* 货架类型编号: 只找该货架类型的空货架
*/
private String podTyp;
/**
* 物料批次
* 物料批次或货架上的物料唯一编码,生成任务单时,货架与物料直接绑定时使用. (通过同时传podCode和materialLot来绑定或通过 wbCode 找到位置上的货架和materialLot来绑定)
* 如果是区域/策略内查找货架,可以匹配对应物料批次的货架,支持以下值:
* 0:区域/策略内查找空货架
* 1:区域/策略内查找满货架
* 其他值:查找指定物料批次对应的货架
* 巷道任务通过该字段传入特征值
*/
private String materialLot;
/**
* 优先级
* 从(1~127)级,最大优先级最高。为空时,采用任务模板的优先级
*/
private String priority;
/**
* AGV编号
* 填写表示指定某一编号的AGV执行该任务
*/
private String agvCode;
/**
* 任务单号
* 选填, 不填系统自动生成
*/
private String taskCode;
/**
* 组编号
* CTU场景下用于按组出库,同组任务优先拼车。 如业务需要任务组间或组内按顺序出库,则需调用料箱顺序出库(CTU)接口。
* 潜伏式场景下,通过组号来管理顺序出库的顺序,组号小的优先出库。
*/
private String groupId;
/**
* 设备类型
*/
private String agvTyp;
/**
* 选择策略
* 区域/策略中挑选货架以及根据物料批次挑选货架时的先进先出规则,支持以下4个值:
* 1:按照货架到达储位的时间顺序,先进先出
* 2:按照货架到达储位的时间顺序,先进后出
* 9:按照货架绑定物料批次的时间顺序,先进先出
* 10:按照货架绑定物料批次的时间顺序,先进后出
*/
private String positionSelStrategy;
/**
* 自定义数据
*/
private String data;
}

View File

@@ -0,0 +1,14 @@
package com.ruoyi.api.domain.agv.genAgvSchedulingTask;
import com.ruoyi.api.domain.agv.ResponseBase;
import lombok.Data;
@Data
public class GenAgvSchedulingTaskResponse extends ResponseBase {
/**
* 请求编号
*/
public String reqCode;
}

View File

@@ -0,0 +1,35 @@
package com.ruoyi.api.domain.agv.genAgvSchedulingTask;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PositionCodeData {
/**
* 位置编号 - 单个编号不超过64位
*/
private String positionCode;
/**
* 类型
*
* 位置类型说明:
* 00表示:位置编号
* 01表示:物料批次号
* 02表示:策略编号(含多个区域) 如:第一个区域放不下, 可以放第二个区域
* 03表示:货架编号,通过货架编号找到货架所在位置
* 04表示:区域编号,在区域中查找可用位置
* 05表示:仓位编号(叉车/CTU专用)
* 06表示:巷道编号
* 07表示:容器编号
* 08表示:巷道策略
* 09表示:巷道区域
* 10表示:巷道仓位
* 11表示:输送线(机台)编号
* 12表示:CTU工作台(梳齿工作站)编号
* 13表示:搬运巷道指定货架出库
*/
private String type;
}

View File

@@ -0,0 +1,82 @@
package com.ruoyi.api.domain.agv.queryAgvStatus;
import lombok.Data;
import java.util.List;
@Data
public class AgvStatusData {
/**
* 机器人编号
*/
private String robotCode;
/**
* 机器人方向 (范围 -180~360度)
*/
private String robotDir;
/**
* 机器人IP
*/
private String robotIp;
/**
* 机器人电量, 范围: 0-100
*/
private String battery;
/**
* 机器人 x 坐标,单位:毫米
*/
private String posX;
/**
* 机器人 y 坐标,单位:毫米
*/
private String posY;
/**
* 机器人所在地图
*/
private String mapCode;
/**
* 机器人当前速度, 单位: mm/s
*/
private String speed;
/**
* 机器人状态
* AGV常见状态编号和描述见附件6.1
*/
private String status;
/**
* 是否已被排除,被排除后不接受新任务(1-排除,0-正常)
*/
private String exclType;
/**
* 是否暂停 0-否 1-是
*/
private String stop;
/**
* 背货架的编号
*/
private String podCode;
/**
* 背货架的方向
*/
private String podDir;
/**
* 执行路径,单位是毫米, 格式[x,y,dir]
* 示例:["[x,y,dir]","[x,y,dir]"]
*/
private List<String> path;
}

View File

@@ -0,0 +1,38 @@
package com.ruoyi.api.domain.agv.queryAgvStatus;
import lombok.Data;
/**
* 通过请求参数, 查询 AGV 状态信息,包括电池电量。
* 调用频次: 100车以下:5秒, 100~200车:10秒, 200 ~300车:15秒
* 调用路径示例: http://IP:8182/rcms-dps/rest/queryAgvStatus
*/
@Data
public class QueryAgvStatusRequest {
/**
* 请求编号,每个请求都要一个唯一编号,同一个请求重复提交,使用同一编号。
*/
private String reqCode;
/**
* 请求时间戳,格式: "yyyy-MM-dd HH:mm:ss"
*/
private String reqTime;
/**
* 客户端编号,如PDA,HCWMS等。
*/
private String clientCode;
/**
* 令牌号,由调度系统颁发。
*/
private String tokenCode;
/**
* 地图编号
*/
private String mapCode;
}

View File

@@ -0,0 +1,21 @@
package com.ruoyi.api.domain.agv.queryAgvStatus;
import com.ruoyi.api.domain.agv.ResponseBase;
import lombok.Data;
import java.util.List;
@Data
public class QueryAgvStatusResponse extends ResponseBase {
/**
* 请求编号
*/
public String reqCode;
/**
* 数据列表
*/
private List<AgvStatusData> data;
}

View File

@@ -0,0 +1,44 @@
package com.ruoyi.api.domain.agv.queryTaskStatus;
import com.ruoyi.common.utils.uuid.UUID;
import lombok.Data;
import java.util.List;
/**
* 通过任务编号查询任务当前执行状态,支持批量查询。
* 参数错误或者任务单未找到返回均为成功。
*/
@Data
public class QueryTaskStatusRequest {
/**
* 请求编号,每个请求都要一个唯一编号,同一个请求重复提交,使用同一编号。
*/
private String reqCode = UUID.randomUUID().toString();
/**
* 请求时间戳,格式: "yyyy-MM-dd HH:mm:ss"
*/
private String reqTime;
/**
* 客户端编号,如PDA,HCWMS等。
*/
private String clientCode;
/**
* 令牌号,由调度系统颁发。
*/
private String tokenCode;
/**
* AGV编号
*/
private String agvCode;
/**
* 任务单编号数组,任务单编号与AGV编号只能传其中之一
*/
private List<String> taskCodes;
}

View File

@@ -0,0 +1,20 @@
package com.ruoyi.api.domain.agv.queryTaskStatus;
import com.ruoyi.api.domain.agv.ResponseBase;
import lombok.Data;
import java.util.List;
@Data
public class QueryTaskStatusResponse extends ResponseBase {
/**
* 请求编号
*/
public String reqCode;
/**
* 数据列表
*/
private List<TaskStatusData> data;
}

View File

@@ -0,0 +1,26 @@
package com.ruoyi.api.domain.agv.queryTaskStatus;
import lombok.Data;
@Data
public class TaskStatusData {
/**
* 任务单编号
*/
private String taskCode;
/**
* 任务类型
*/
private String taskTyp;
/**
* 任务状态:1-已创建,2-正在执行,5-取消完成,9-已结束, 10-被打断
*/
private String taskStatus;
/**
* AGV编号, 任务分配车后有值
*/
private String agvCode;
}

View File

@@ -0,0 +1,14 @@
package com.ruoyi.api.domain.wcs2wms;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class JobParam {
private String jobId;
private String trayCode;
private String taskNo;
}

View File

@@ -0,0 +1,20 @@
package com.ruoyi.api.domain.wcs2wms;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ReceiveJob {
private String taskNo;
private String cargoSpaceId;
private String exitId;
private String trayCode;
private String entranceId;
private String inOrOut;
private String jobId;
private String roadwayId;
}

View File

@@ -0,0 +1,61 @@
package com.ruoyi.api.mapper;
import java.util.List;
import com.ruoyi.api.domain.RequestLog;
/**
* 接口记录Mapper接口
*
* @author ruoyi
* @date 2025-06-11
*/
public interface RequestLogMapper
{
/**
* 查询接口记录
*
* @param requestId 接口记录主键
* @return 接口记录
*/
public RequestLog selectRequestLogByRequestId(Long requestId);
/**
* 查询接口记录列表
*
* @param requestLog 接口记录
* @return 接口记录集合
*/
public List<RequestLog> selectRequestLogList(RequestLog requestLog);
/**
* 新增接口记录
*
* @param requestLog 接口记录
* @return 结果
*/
public int insertRequestLog(RequestLog requestLog);
/**
* 修改接口记录
*
* @param requestLog 接口记录
* @return 结果
*/
public int updateRequestLog(RequestLog requestLog);
/**
* 删除接口记录
*
* @param requestId 接口记录主键
* @return 结果
*/
public int deleteRequestLogByRequestId(Long requestId);
/**
* 批量删除接口记录
*
* @param requestIds 需要删除的数据主键集合
* @return 结果
*/
public int deleteRequestLogByRequestIds(Long[] requestIds);
}

View File

@@ -0,0 +1,133 @@
package com.ruoyi.api.service;
import com.ruoyi.api.domain.RequestLog;
import com.ruoyi.api.domain.agv.agvCallback.AgvCallbackRequest;
import com.ruoyi.api.domain.agv.agvCallback.AgvCallbackResponse;
import com.ruoyi.api.domain.agv.cancelTask.CancelTaskRequest;
import com.ruoyi.api.domain.agv.cancelTask.CancelTaskResponse;
import com.ruoyi.api.domain.agv.continueTask.ContinueTaskRequest;
import com.ruoyi.api.domain.agv.continueTask.ContinueTaskResponse;
import com.ruoyi.api.domain.agv.genAgvSchedulingTask.GenAgvSchedulingTaskRequest;
import com.ruoyi.api.domain.agv.genAgvSchedulingTask.GenAgvSchedulingTaskResponse;
import com.ruoyi.api.domain.wcs2wms.JobParam;
import com.ruoyi.api.domain.wcs2wms.ReceiveJob;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.job.domain.MydoJob;
import com.ruoyi.queue.agv.domain.AgvQueue;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 接口记录Service接口
*
* @author ruoyi
* @date 2025-06-11
*/
public interface IApiService
{
/**
* 生成agv队列
* @param code1 起点
* @param code2 终点
* @param wmsTrayCode 容器码 托盘料箱码/容器码
* @param wmsTaskNo mydojob 任务
* @param wmsTaskType 1-入库 2-出库 3-agv搬运
* @return
*/
public AgvQueue createAgvQueue(String code1,String code2,String wmsTrayCode,String taskCode,String wmsTaskType,String traySize,String wmsTaskNo);
/**
* 取消AGV任务
*
* @param cancelTaskRequest
* @return
*/
public CancelTaskResponse cancelTask(CancelTaskRequest cancelTaskRequest);
/**
* 继续AGV任务
* @param agvQueue
* @return
*/
public AjaxResult continueTask(AgvQueue agvQueue);
/**
* 生成AGV生成任务
*
* @param genAgvSchedulingTaskRequest
* @return
*/
public GenAgvSchedulingTaskResponse genAgvSchedulingTask(GenAgvSchedulingTaskRequest genAgvSchedulingTaskRequest);
/**
* agv任务状态推送
* @param request
* @return
*/
AgvCallbackResponse agvCallback(AgvCallbackRequest request);
/**
* agv搬运作业
*
* @param param
* @return
*/
AjaxResult receiveAgvMoveJob(Map<String, String> param);
/**
* 任务到达拣选口
* @param param
* @return
*/
RequestLog finishMydoJob(Map<String, Object> param);
/**
* 下发agv任务
* @param agvQueue
* @return
*/
public GenAgvSchedulingTaskResponse requestAgvQueue(AgvQueue agvQueue);
/**
* 取消ctu任务
* @param jobParam
* @return
*/
AjaxResult cancelMydoJob(JobParam jobParam);
/**
* 放货有货,重新分配货位
* @param jobParam
* @return
*/
AjaxResult reAssign(JobParam jobParam);
/**
* 取货无货,重新分配单据
* @param jobParam
* @return
*/
AjaxResult reMaterial(JobParam jobParam);
/**
* 入库请求生成作业
*/
public AjaxResult createInMydoJob(Map<String, Object> param);
public AjaxResult selectMydoJobByNoTrayCode(Map<String, Object> param);
AjaxResult receiveOutMydoJob(ReceiveJob receiveOutJob);
AjaxResult receiveInMydoJob(ReceiveJob receiveInJob);
AjaxResult selectMydoJobByTrayCodeAndEntranceId(HashMap<String, Object> paramMap);
AjaxResult allotSpace(JobParam jobParam);
}

View File

@@ -0,0 +1,78 @@
package com.ruoyi.api.service;
import java.util.List;
import com.ruoyi.api.domain.RequestLog;
/**
* 接口记录Service接口
*
* @author ruoyi
* @date 2025-06-11
*/
public interface IRequestLogService
{
/**
* 查询接口记录
*
* @param requestId 接口记录主键
* @return 接口记录
*/
public RequestLog selectRequestLogByRequestId(Long requestId);
/**
* 查询接口记录列表
*
* @param requestLog 接口记录
* @return 接口记录集合
*/
public List<RequestLog> selectRequestLogList(RequestLog requestLog);
/**
* 新增接口记录
*
* @param requestLog 接口记录
* @return 结果
*/
public int insertRequestLog(RequestLog requestLog);
/**
* 修改接口记录
*
* @param requestLog 接口记录
* @return 结果
*/
public int updateRequestLog(RequestLog requestLog);
/**
* 批量删除接口记录
*
* @param requestIds 需要删除的接口记录主键集合
* @return 结果
*/
public int deleteRequestLogByRequestIds(Long[] requestIds);
/**
* 删除接口记录信息
*
* @param requestId 接口记录主键
* @return 结果
*/
public int deleteRequestLogByRequestId(Long requestId);
/**
* 发送请求,并插入日志
* @param url
* @param param
* @param endPoint
* @return
*/
public RequestLog getRequestLog(String url, String param, String endPoint);
/**
* 接收请求,并插入日志
* @param url
* @param param
* @return
*/
public RequestLog getRequestLog(String url, String param);
}

View File

@@ -0,0 +1,8 @@
package com.ruoyi.api.service;
public interface ITestService {
boolean sendSsjData(Integer id);
boolean sendDdjData(Integer id);
}

View File

@@ -0,0 +1,399 @@
package com.ruoyi.api.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.json.JSONUtil;
import com.ruoyi.api.domain.InterfaceReceive;
import com.ruoyi.api.domain.RequestLog;
import com.ruoyi.api.domain.agv.agvCallback.AgvCallbackRequest;
import com.ruoyi.api.domain.agv.agvCallback.AgvCallbackResponse;
import com.ruoyi.api.domain.agv.cancelTask.CancelTaskRequest;
import com.ruoyi.api.domain.agv.cancelTask.CancelTaskResponse;
import com.ruoyi.api.domain.agv.continueTask.ContinueTaskRequest;
import com.ruoyi.api.domain.agv.genAgvSchedulingTask.GenAgvSchedulingTaskRequest;
import com.ruoyi.api.domain.agv.genAgvSchedulingTask.GenAgvSchedulingTaskResponse;
import com.ruoyi.api.domain.agv.genAgvSchedulingTask.PositionCodeData;
import com.ruoyi.api.domain.wcs2wms.JobParam;
import com.ruoyi.api.domain.wcs2wms.ReceiveJob;
import com.ruoyi.api.service.IApiService;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.job.domain.MydoJob;
import com.ruoyi.job.service.IMydoJobService;
import com.ruoyi.queue.agv.domain.AgvQueue;
import com.ruoyi.queue.agv.service.IAgvQueueService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import static com.ruoyi.common.Constant.*;
/**
* 接口记录Service业务层处理
*
* @author ruoyi
* @date 2025-06-11
*/
@Service
@Slf4j
public class ApiServiceImpl implements IApiService {
@Autowired
private RequestLogServiceImpl requestLogService;
@Autowired
private IAgvQueueService agvQueueService;
@Autowired
private IMydoJobService mydoJobService;
/**
* 下发agv编码
*
* @param genAgvSchedulingTaskRequest
* @return
*/
@Override
public GenAgvSchedulingTaskResponse genAgvSchedulingTask(GenAgvSchedulingTaskRequest genAgvSchedulingTaskRequest) {
RequestLog requestLog = requestLogService.getRequestLog(GEN_AGV_SCHEDULING_TASK, "生成AGV任务", JSONUtil.toJsonStr(genAgvSchedulingTaskRequest));
if ("1".equals(requestLog.getIsSuccessful())) {
return BeanUtil.toBean(requestLog.getResponseBody(), GenAgvSchedulingTaskResponse.class);
} else {
//todo 需要调试
GenAgvSchedulingTaskResponse response = new GenAgvSchedulingTaskResponse();
response.setCode(500);
response.setMessage("请求失败");
//todo 需要调试小车请求
response.setCode(0);
response.setMessage("模拟测试");
return response;
}
}
/**
* agv执行状态返回接口
*
* @param request
* @return
*/
@Override
@Transactional(rollbackFor = Exception.class)
public AgvCallbackResponse agvCallback(AgvCallbackRequest request) {
RequestLog requestLog = requestLogService.getRequestLog(JSONUtil.toJsonStr(request), "AGV任务执行通知");
AgvCallbackResponse response = new AgvCallbackResponse(0, "成功", "");
try {
agvCallbackInfo(request);
requestLog.setResponseBody(JSONUtil.toJsonStr(response));
requestLog.setResponseStatus("1");
requestLog.setIsSuccessful("1");
return new AgvCallbackResponse(0, "成功", "");
} catch (RuntimeException e) {
requestLog.setErrorDetails(e.getMessage());
requestLog.setIsSuccessful("0");
requestLog.setResponseBody(JSONUtil.toJsonStr(response));
requestLog.setResponseStatus("0");
return new AgvCallbackResponse(1, "失败", "");
} finally {
requestLogService.insertRequestLog(requestLog);
}
}
/**
* agv搬运作业
*
* @return
*/
@Override
public AjaxResult receiveAgvMoveJob(Map<String, String> param) {
String startPoint = param.get("startPoint");
String endPoint = param.get("endPoint");
String traySize = param.get("traySize");
String wmsTaskNo = param.get("wmsTaskNo");
AgvQueue agvQueue = createAgvQueue(startPoint, endPoint, param.get("trayCode"), param.get("taskNo"), "1", traySize, wmsTaskNo);
GenAgvSchedulingTaskResponse genAgvSchedulingTaskResponse = requestAgvQueue(agvQueue);
if (genAgvSchedulingTaskResponse.getCode() == 0) {
return AjaxResult.success();
}
return AjaxResult.error(genAgvSchedulingTaskResponse.getMessage());
}
/**
* 出库到达拣选口
*
* @param param
* @return
*/
@Override
public RequestLog finishMydoJob(Map<String, Object> param) {
return requestLogService.getRequestLog(JOB_FINISH_URL, "agv任务完成", JSONUtil.toJsonStr(param));
}
/**
* 处理agv状态返回
*
* @param request
*/
private void agvCallbackInfo(AgvCallbackRequest request) {
AgvQueue agvQueue = agvQueueService.selectAgvQueueByTaskCode(request.getTaskCode());
if (agvQueue != null) {
String method = request.getMethod();
switch (method) {
case "applyin":
agvQueue.setStatus("1");
agvQueueService.updateAgvQueue(agvQueue);
log.info("【AGV请求取货】任务号:{}", request.getTaskCode());
break;
case "start":
agvQueue.setStatus("3");
agvQueueService.updateAgvQueue(agvQueue);
log.info("【AGV任务开始】任务号:{}", request.getTaskCode());
break;
case "outbin":
agvQueue.setStatus("4");
agvQueueService.updateAgvQueue(agvQueue);
log.info("【AGV走出储位】任务号:{}", request.getTaskCode());
break;
case "applyout":
agvQueue.setStatus("5");
agvQueueService.updateAgvQueue(agvQueue);
log.info("【AGV请求放货】任务号:{}", request.getTaskCode());
break;
case "end":
agvQueue.setStatus("7");
agvQueueService.updateAgvQueue(agvQueue);
log.info("【AGV任务结束】任务号:{}", request.getTaskCode());
break;
default:
log.info("未知方法");
}
}
}
/**
* 取消任务
*
* @param jobParam
* @return
*/
@Override
public AjaxResult cancelMydoJob(JobParam jobParam) {
MydoJob mydoJob = mydoJobService.selectMydoJobByTaskNo(Convert.toLong(jobParam.getTaskNo()));
if(mydoJob==null){
return AjaxResult.error("任务不存在");
}
if("1".equals(mydoJob.getStatus())){
mydoJob.setStatus("5");
mydoJobService.insertHistory(mydoJob.getJobId());
mydoJobService.deleteMydoJobByJobId(mydoJob.getJobId());
return AjaxResult.success();
}else{
return AjaxResult.error("任务已开始");
}
}
@Override
public AjaxResult reAssign(JobParam jobParam) {
RequestLog requestLog = requestLogService.getRequestLog(RE_ASSIGN_URL, "重新分配货位", JSONUtil.toJsonStr(jobParam));
if ("1".equals(requestLog.getIsSuccessful())){
InterfaceReceive bean = JSONUtil.toBean(requestLog.getResponseBody(), InterfaceReceive.class);
MydoJob wmsMydoJob = BeanUtil.toBean(bean.getData(), MydoJob.class);
MydoJob mydoJob = mydoJobService.selectMydoJobByJobId(wmsMydoJob.getJobId());
mydoJob.setCargoSpaceId(wmsMydoJob.getCargoSpaceId());
mydoJobService.updateMydoJob(mydoJob);
return AjaxResult.success();
}
return AjaxResult.error();
}
@Override
public AjaxResult reMaterial(JobParam jobParam) {
RequestLog requestLog = requestLogService.getRequestLog(RE_MATERIAL_URL, "重新分配物料", JSONUtil.toJsonStr(jobParam));
if ("1".equals(requestLog.getIsSuccessful())){
return AjaxResult.success();
}
return AjaxResult.error();
}
/**
* 生成agv队列
*
* @param code1 起点
* @param code2 终点
* @param wmsTrayCode 容器码 托盘料箱码/容器码
* @param wmsTaskNo mydojob 任务
* @param wmsTaskType 1-入库 2-出库 3-agv搬运
* @return
*/
@Override
public AgvQueue createAgvQueue(String code1, String code2, String wmsTrayCode, String taskCode, String wmsTaskType, String traySize, String wmsTaskNo) {
//生成ctu执行队列
AgvQueue agvQueue = new AgvQueue();
String reqCode = IdUtil.fastSimpleUUID();
// String taskCode = IdUtil.fastSimpleUUID();
agvQueue.setReqCode(reqCode);
agvQueue.setReqTime(DateUtil.formatDateTime(DateUtil.date()));
agvQueue.setAgvType("AGV");
agvQueue.setPositionCode1(code1);
agvQueue.setPositionCode2(code2);
agvQueue.setTaskType("F01");
agvQueue.setCtnrType(traySize);
agvQueue.setCtnrCode("0");
agvQueue.setCtnrNum("0");
agvQueue.setTaskMode("0");
agvQueue.setPriority("10");
agvQueue.setRequest("0");
agvQueue.setWmsTraycode(wmsTrayCode);
agvQueue.setWmsTaskNo(wmsTaskNo);
agvQueue.setStatus("0");
agvQueue.setTaskCode(taskCode);
agvQueue.setWmsTaskType(wmsTaskType);
agvQueueService.insertAgvQueue(agvQueue);
return agvQueue;
}
/**
* 取消AGV任务
*
* @param cancelTaskRequest
* @return
*/
@Override
public CancelTaskResponse cancelTask(CancelTaskRequest cancelTaskRequest) {
RequestLog requestLog = requestLogService.getRequestLog(CANCEL_TASK_URL, "取消任务", JSONUtil.toJsonStr(cancelTaskRequest));
return BeanUtil.toBean(requestLog.getResponseBody(), CancelTaskResponse.class);
}
/**
* 继续agv任务
*
* @param agvQueue
* @return
*/
@Override
public AjaxResult continueTask(AgvQueue agvQueue) {
ContinueTaskRequest continueTaskRequest = new ContinueTaskRequest();
continueTaskRequest.setReqCode(IdUtil.fastSimpleUUID());
continueTaskRequest.setReqTime(DateUtil.formatDateTime(DateUtil.date()));
continueTaskRequest.setTaskCode(agvQueue.getTaskCode());
RequestLog requestLog = requestLogService.getRequestLog(CONTINUE_TASK_URL, "继续执行任务", JSONUtil.toJsonStr(continueTaskRequest));
if ("1".equals(requestLog.getIsSuccessful())) {
return AjaxResult.success();
} else {
return AjaxResult.error();
}
}
/**
* 请求海康生成agv任务,并修改wms任务状态
*
* @param agvQueue
*/
@Override
public GenAgvSchedulingTaskResponse requestAgvQueue(AgvQueue agvQueue) {
//todo 请求ctu
GenAgvSchedulingTaskRequest genAgvSchedulingTaskRequest = new GenAgvSchedulingTaskRequest();
genAgvSchedulingTaskRequest.setReqCode(agvQueue.getReqCode());
genAgvSchedulingTaskRequest.setTaskMode("0");
genAgvSchedulingTaskRequest.setPriority("10");
genAgvSchedulingTaskRequest.setTaskTyp("F01");
genAgvSchedulingTaskRequest.setCtnrCode("0");
genAgvSchedulingTaskRequest.setCtnrNum("0");
genAgvSchedulingTaskRequest.setTaskMode("0");
genAgvSchedulingTaskRequest.setTaskCode(agvQueue.getTaskCode());
genAgvSchedulingTaskRequest.setAgvTyp("AGV");
genAgvSchedulingTaskRequest.setPositionSelStrategy("0");
List<PositionCodeData> positionCodePath = new ArrayList<>();
positionCodePath.add(new PositionCodeData(agvQueue.getPositionCode1(), "0"));
positionCodePath.add(new PositionCodeData(agvQueue.getPositionCode2(), "0"));
genAgvSchedulingTaskRequest.setPositionCodePath(positionCodePath);
return genAgvSchedulingTask(genAgvSchedulingTaskRequest);
}
@Override
public AjaxResult createInMydoJob(Map<String, Object> param) {
RequestLog requestLog = requestLogService.getRequestLog(CREATE_IN_MYDO_JOB_URL, "入库请求生成作业", JSONUtil.toJsonStr(param));
if ("1".equals(requestLog.getIsSuccessful())) {
InterfaceReceive bean = JSONUtil.toBean(requestLog.getResponseBody(), InterfaceReceive.class);
return AjaxResult.success(bean.getData());
} else {
return AjaxResult.error();
}
}
@Override
public AjaxResult receiveOutMydoJob(ReceiveJob receiveOutJob) {
MydoJob mydoJob = new MydoJob();
mydoJob.setJobId(receiveOutJob.getJobId());
mydoJob.setTaskNo(receiveOutJob.getTaskNo());
mydoJob.setCargoSpaceId(receiveOutJob.getCargoSpaceId());
mydoJob.setExitId(receiveOutJob.getExitId());
mydoJob.setInOrOut(receiveOutJob.getInOrOut());
mydoJob.setStatus("1");
mydoJob.setTrayCode(receiveOutJob.getTrayCode());
mydoJob.setRoadwayId(receiveOutJob.getRoadwayId());
mydoJob.setCreateTime(DateUtils.getNowDate());
mydoJob.setExecutionPhase("0");
int i = mydoJobService.insertMydoJob(mydoJob);
if (i > 0) {
return AjaxResult.success();
}else{
return AjaxResult.error();
}
}
@Override
public AjaxResult receiveInMydoJob(ReceiveJob receiveInJob) {
return null;
}
@Override
public AjaxResult selectMydoJobByTrayCodeAndEntranceId(HashMap<String, Object> paramMap) {
RequestLog requestLog = requestLogService.getRequestLog(REQUEST_ENTER_URL, "请求获取入库作业", JSONUtil.toJsonStr(paramMap));
if ("1".equals(requestLog.getIsSuccessful())) {
InterfaceReceive bean = JSONUtil.toBean(requestLog.getResponseBody(), InterfaceReceive.class);
return AjaxResult.success(bean.getData());
} else {
return AjaxResult.error();
}
}
@Override
public AjaxResult selectMydoJobByNoTrayCode(Map<String, Object> param) {
RequestLog requestLog = requestLogService.getRequestLog(REQUEST_MYDO_JOB_URL, "入库请求补码作业", JSONUtil.toJsonStr(param));
if ("1".equals(requestLog.getIsSuccessful())) {
InterfaceReceive bean = JSONUtil.toBean(requestLog.getResponseBody(), InterfaceReceive.class);
return AjaxResult.success(bean.getData());
} else {
return AjaxResult.error();
}
}
@Override
public AjaxResult allotSpace(JobParam jobParam) {
return null;
}
}

View File

@@ -0,0 +1,174 @@
package com.ruoyi.api.service.impl;
import java.util.Date;
import java.util.List;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil;
import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSONUtil;
import com.ruoyi.api.domain.InterfaceReceive;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.api.mapper.RequestLogMapper;
import com.ruoyi.api.domain.RequestLog;
import com.ruoyi.api.service.IRequestLogService;
/**
* 接口记录Service业务层处理
*
* @author ruoyi
* @date 2025-06-11
*/
@Service
@Slf4j
public class RequestLogServiceImpl implements IRequestLogService
{
@Autowired
private RequestLogMapper requestLogMapper;
/**
* 查询接口记录
*
* @param requestId 接口记录主键
* @return 接口记录
*/
@Override
public RequestLog selectRequestLogByRequestId(Long requestId)
{
return requestLogMapper.selectRequestLogByRequestId(requestId);
}
/**
* 查询接口记录列表
*
* @param requestLog 接口记录
* @return 接口记录
*/
@Override
public List<RequestLog> selectRequestLogList(RequestLog requestLog)
{
return requestLogMapper.selectRequestLogList(requestLog);
}
/**
* 新增接口记录
*
* @param requestLog 接口记录
* @return 结果
*/
@Override
public int insertRequestLog(RequestLog requestLog)
{
if ("1".equals(requestLog.getIsSuccessful())){
return requestLogMapper.insertRequestLog(requestLog);
}else {
//log.error("请求失败:" + requestLog.getErrorDetails());
return 0;
}
}
/**
* 修改接口记录
*
* @param requestLog 接口记录
* @return 结果
*/
@Override
public int updateRequestLog(RequestLog requestLog)
{
return requestLogMapper.updateRequestLog(requestLog);
}
/**
* 批量删除接口记录
*
* @param requestIds 需要删除的接口记录主键
* @return 结果
*/
@Override
public int deleteRequestLogByRequestIds(Long[] requestIds)
{
return requestLogMapper.deleteRequestLogByRequestIds(requestIds);
}
/**
* 删除接口记录信息
*
* @param requestId 接口记录主键
* @return 结果
*/
@Override
public int deleteRequestLogByRequestId(Long requestId)
{
return requestLogMapper.deleteRequestLogByRequestId(requestId);
}
/**
* 插入请求日志
*
* @param url 请求url
* @param param 参数
* @return requestLog
*/
@Override
public RequestLog getRequestLog(String url, String endPoint,String param) {
RequestLog requestLog = new RequestLog();
Date requestTime = new Date();
requestLog.setRequestTime(DateUtil.format(requestTime, "yyyy-MM-dd HH:mm:ss"));
requestLog.setSourceSystem("wcs");
requestLog.setTargetSystem("wms");
requestLog.setEndpoint(endPoint);
requestLog.setRequestMethod("post");
requestLog.setRequestHeaders(null);
requestLog.setRequestBody(param);
requestLog.setRequestUrl(url);
try {
String resStr = HttpUtil.post(url, param);
requestLog.setResponseBody(resStr);
InterfaceReceive bean = JSONUtil.toBean(resStr, InterfaceReceive.class);
Date responseTime =new Date();
if (bean.getCode() == 200) {
requestLog.setResponseTime(DateUtil.format(responseTime, "yyyy-MM-dd HH:mm:ss"));
requestLog.setResponseStatus("1");
requestLog.setDuration(Convert.toStr(DateUtil.between(requestTime, responseTime, DateUnit.MS)));
requestLog.setIsSuccessful("1");
}else {
requestLog.setResponseStatus("0");
requestLog.setErrorDetails(bean.getMsg());
requestLog.setIsSuccessful("0");
}
} catch (Exception e) {
requestLog.setErrorDetails(e.getMessage());
requestLog.setIsSuccessful("0");
requestLog.setResponseStatus("0");
} finally {
insertRequestLog(requestLog);
}
return requestLog;
}
/**
* 插入请求日志
*
* @return requestLog
*/
@Override
public RequestLog getRequestLog(String param, String endPoint) {
RequestLog requestLog = new RequestLog();
Date requestTime = new Date();
requestLog.setRequestTime(DateUtil.format(requestTime, "yyyy-MM-dd HH:mm:ss"));
requestLog.setRequestBody(param);
requestLog.setSourceSystem("wms");
requestLog.setTargetSystem("wcs");
requestLog.setEndpoint(endPoint);
requestLog.setRequestMethod("post");
requestLog.setResponseTime(DateUtil.format(requestTime, "yyyy-MM-dd HH:mm:ss"));
requestLog.setDuration(Convert.toStr(DateUtil.between(requestTime, requestTime, DateUnit.MS)));
return requestLog;
}
}

View File

@@ -0,0 +1,69 @@
package com.ruoyi.api.service.impl;
import com.ruoyi.api.service.ITestService;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.domain.SendData;
import com.ruoyi.device.ddj.domain.MsgDdj;
import com.ruoyi.device.ddj.mapper.MsgDdjMapper;
import com.ruoyi.device.ssj.domain.DeviceSsj;
import com.ruoyi.device.ssj.mapper.DeviceSsjMapper;
import com.ruoyi.schedule.plcRead.ssj.PlcSsjRead;
import com.ruoyi.schedule.plcRead.util.Tools;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@Service
public class TestServiceImpl implements ITestService {
@Resource
private MsgDdjMapper msgDdjMapper;
@Resource
private DeviceSsjMapper deviceSsjMapper;
@Override
public boolean sendDdjData(Integer id) {
MsgDdj msgDdj = msgDdjMapper.selectSendData(id);
SendData czfs = new SendData(Tools.INT, msgDdj.getCzfs());
SendData sbzt = new SendData(Tools.INT, msgDdj.getSbzt());
SendData rwh = new SendData(Tools.DINT, Convert.toInt(msgDdj.getRwh()));
SendData hczt = new SendData(Tools.INT, msgDdj.getHczt());
SendData jdbz = new SendData(Tools.INT, msgDdj.getJdbz());
SendData yph = new SendData(Tools.INT, msgDdj.getYph());
SendData ylh = new SendData(Tools.INT, msgDdj.getYlh());
SendData ych = new SendData(Tools.INT, msgDdj.getYch());
SendData mbph = new SendData(Tools.INT, msgDdj.getMbph());
SendData mblh = new SendData(Tools.INT, msgDdj.getMblh());
SendData mbch = new SendData(Tools.INT, msgDdj.getMbch());
SendData yxxf = new SendData(Tools.INT, msgDdj.getYxxf());
SendData xtxh = new SendData(Tools.INT, msgDdj.getXtxh());
SendData trayCode = new SendData(Tools.INT, Convert.toInt(msgDdj.getSpare2()));
byte[] bytes = Tools.sendData(czfs, sbzt, rwh, hczt, jdbz, yph, ylh, ych, mbph, mblh, mbch, yxxf, xtxh, trayCode);
int i = PlcSsjRead.WriteToSSJ("DB41.0", bytes);
if (i == 1) {
System.out.println("写入成功");
return true;
}
return false;
}
@Override
public boolean sendSsjData(Integer id) {
DeviceSsj deviceSsj = deviceSsjMapper.selectSendData(id);
SendData kx = new SendData(Tools.INT, deviceSsj.getKx());
SendData dw = new SendData(Tools.INT, deviceSsj.getDw());
SendData rkqq = new SendData(Tools.INT, deviceSsj.getRkqq());
SendData taskNo = new SendData(Tools.DINT, deviceSsj.getTaskNo());
byte[] bytes = Tools.sendData(kx, dw, rkqq, taskNo);
int i = PlcSsjRead.WriteToSSJ(deviceSsj.getPlcDbReadAddress(), bytes);
if (i == 1) {
System.out.println("写入成功");
return true;
}
return false;
}
}

View File

@@ -0,0 +1,104 @@
package com.ruoyi.bas.cargospace.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.bas.cargospace.domain.BasCargoSpace;
import com.ruoyi.bas.cargospace.service.IBasCargoSpaceService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 库存信息Controller
*
* @author ruoyi
* @date 2025-09-23
*/
@RestController
@RequestMapping("/bas/cargoSpace")
public class BasCargoSpaceController extends BaseController
{
@Autowired
private IBasCargoSpaceService basCargoSpaceService;
/**
* 查询库存信息列表
*/
@PreAuthorize("@ss.hasPermi('bas:cargoSpace:list')")
@GetMapping("/list")
public TableDataInfo list(BasCargoSpace basCargoSpace)
{
startPage();
List<BasCargoSpace> list = basCargoSpaceService.selectBasCargoSpaceList(basCargoSpace);
return getDataTable(list);
}
/**
* 导出库存信息列表
*/
@PreAuthorize("@ss.hasPermi('bas:cargoSpace:export')")
@Log(title = "库存信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, BasCargoSpace basCargoSpace)
{
List<BasCargoSpace> list = basCargoSpaceService.selectBasCargoSpaceList(basCargoSpace);
ExcelUtil<BasCargoSpace> util = new ExcelUtil<BasCargoSpace>(BasCargoSpace.class);
util.exportExcel(response, list, "库存信息数据");
}
/**
* 获取库存信息详细信息
*/
@PreAuthorize("@ss.hasPermi('bas:cargoSpace:query')")
@GetMapping(value = "/{cargoSpaceId}")
public AjaxResult getInfo(@PathVariable("cargoSpaceId") String cargoSpaceId)
{
return success(basCargoSpaceService.selectBasCargoSpaceByCargoSpaceId(cargoSpaceId));
}
/**
* 新增库存信息
*/
@PreAuthorize("@ss.hasPermi('bas:cargoSpace:add')")
@Log(title = "库存信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody BasCargoSpace basCargoSpace)
{
return toAjax(basCargoSpaceService.insertBasCargoSpace(basCargoSpace));
}
/**
* 修改库存信息
*/
@PreAuthorize("@ss.hasPermi('bas:cargoSpace:edit')")
@Log(title = "库存信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody BasCargoSpace basCargoSpace)
{
return toAjax(basCargoSpaceService.updateBasCargoSpace(basCargoSpace));
}
/**
* 删除库存信息
*/
@PreAuthorize("@ss.hasPermi('bas:cargoSpace:remove')")
@Log(title = "库存信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{cargoSpaceIds}")
public AjaxResult remove(@PathVariable String[] cargoSpaceIds)
{
return toAjax(basCargoSpaceService.deleteBasCargoSpaceByCargoSpaceIds(cargoSpaceIds));
}
}

View File

@@ -0,0 +1,324 @@
package com.ruoyi.bas.cargospace.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 库存信息对象 bas_cargo_space
*
* @author ruoyi
* @date 2025-09-23
*/
public class BasCargoSpace extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 货位id 主键 */
private String cargoSpaceId;
/** 仓库id(不允许为空) */
@Excel(name = "仓库id", readConverterExp = "不=允许为空")
private String warehouseId;
/** 巷道id(允许为空) */
@Excel(name = "巷道id", readConverterExp = "允=许为空")
private String roadwayId;
/** 货区id(允许为空) */
@Excel(name = "货区id", readConverterExp = "允=许为空")
private String cargoAreaId;
/** 货位类型(允许为空) */
@Excel(name = "货位类型", readConverterExp = "允=许为空")
private String theType;
/** 货位类型名称 */
@Excel(name = "货位类型名称")
private String theTypeName;
/** 货位名称(不允许为空) */
@Excel(name = "货位名称", readConverterExp = "不=允许为空")
private String cargoSpaceName;
/** 排(不允许为空) */
@Excel(name = "排", readConverterExp = "不=允许为空")
private Long thePlatoon;
/** 列(不允许为空) */
@Excel(name = "列", readConverterExp = "不=允许为空")
private Long theColumn;
/** 层(不允许为空) */
@Excel(name = "层", readConverterExp = "不=允许为空")
private Long theFloor;
/** 货位状态1空2满 3入库分配 4出库分配 5入库盘点 6出库盘点 */
@Excel(name = "货位状态1空2满 3入库分配 4出库分配 5入库盘点 6出库盘点")
private String status;
/** 是否锁定(不允许为空)
Y锁、N开 */
@Excel(name = "是否锁定", readConverterExp = "不=允许为空")
private String locked;
/** 托盘条码(允许为空) */
@Excel(name = "托盘条码", readConverterExp = "允=许为空")
private String trayCode;
/** 货位高度 */
@Excel(name = "货位高度")
private String cargoHight;
/** 是否双伸 Y N */
@Excel(name = "是否双伸 Y N ")
private String issDouble;
/** 双货位分组编码(标识区分) */
@Excel(name = "双货位分组编码", readConverterExp = "标=识区分")
private String groupCodingNo;
/** 双货位分组编码1、2… */
@Excel(name = "双货位分组编码1、2… ")
private String groupCoding;
/** 双货位标识 0 外1内 */
@Excel(name = "双货位标识 0 外1内")
private String cargoSpaceLogo;
/** 本仓库区域 1--8 A
9--15 B */
@Excel(name = "本仓库区域")
private String thisCargoArea;
/** wms货位id */
@Excel(name = "wms货位id")
private String wmsCargoSpaceId;
public void setCargoSpaceId(String cargoSpaceId)
{
this.cargoSpaceId = cargoSpaceId;
}
public String getCargoSpaceId()
{
return cargoSpaceId;
}
public void setWarehouseId(String warehouseId)
{
this.warehouseId = warehouseId;
}
public String getWarehouseId()
{
return warehouseId;
}
public void setRoadwayId(String roadwayId)
{
this.roadwayId = roadwayId;
}
public String getRoadwayId()
{
return roadwayId;
}
public void setCargoAreaId(String cargoAreaId)
{
this.cargoAreaId = cargoAreaId;
}
public String getCargoAreaId()
{
return cargoAreaId;
}
public void setTheType(String theType)
{
this.theType = theType;
}
public String getTheType()
{
return theType;
}
public void setTheTypeName(String theTypeName)
{
this.theTypeName = theTypeName;
}
public String getTheTypeName()
{
return theTypeName;
}
public void setCargoSpaceName(String cargoSpaceName)
{
this.cargoSpaceName = cargoSpaceName;
}
public String getCargoSpaceName()
{
return cargoSpaceName;
}
public void setThePlatoon(Long thePlatoon)
{
this.thePlatoon = thePlatoon;
}
public Long getThePlatoon()
{
return thePlatoon;
}
public void setTheColumn(Long theColumn)
{
this.theColumn = theColumn;
}
public Long getTheColumn()
{
return theColumn;
}
public void setTheFloor(Long theFloor)
{
this.theFloor = theFloor;
}
public Long getTheFloor()
{
return theFloor;
}
public void setStatus(String status)
{
this.status = status;
}
public String getStatus()
{
return status;
}
public void setLocked(String locked)
{
this.locked = locked;
}
public String getLocked()
{
return locked;
}
public void setTrayCode(String trayCode)
{
this.trayCode = trayCode;
}
public String getTrayCode()
{
return trayCode;
}
public void setCargoHight(String cargoHight)
{
this.cargoHight = cargoHight;
}
public String getCargoHight()
{
return cargoHight;
}
public void setIssDouble(String issDouble)
{
this.issDouble = issDouble;
}
public String getIssDouble()
{
return issDouble;
}
public void setGroupCodingNo(String groupCodingNo)
{
this.groupCodingNo = groupCodingNo;
}
public String getGroupCodingNo()
{
return groupCodingNo;
}
public void setGroupCoding(String groupCoding)
{
this.groupCoding = groupCoding;
}
public String getGroupCoding()
{
return groupCoding;
}
public void setCargoSpaceLogo(String cargoSpaceLogo)
{
this.cargoSpaceLogo = cargoSpaceLogo;
}
public String getCargoSpaceLogo()
{
return cargoSpaceLogo;
}
public void setThisCargoArea(String thisCargoArea)
{
this.thisCargoArea = thisCargoArea;
}
public String getThisCargoArea()
{
return thisCargoArea;
}
public void setWmsCargoSpaceId(String wmsCargoSpaceId)
{
this.wmsCargoSpaceId = wmsCargoSpaceId;
}
public String getWmsCargoSpaceId()
{
return wmsCargoSpaceId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("cargoSpaceId", getCargoSpaceId())
.append("warehouseId", getWarehouseId())
.append("roadwayId", getRoadwayId())
.append("cargoAreaId", getCargoAreaId())
.append("theType", getTheType())
.append("theTypeName", getTheTypeName())
.append("cargoSpaceName", getCargoSpaceName())
.append("thePlatoon", getThePlatoon())
.append("theColumn", getTheColumn())
.append("theFloor", getTheFloor())
.append("status", getStatus())
.append("locked", getLocked())
.append("trayCode", getTrayCode())
.append("cargoHight", getCargoHight())
.append("issDouble", getIssDouble())
.append("groupCodingNo", getGroupCodingNo())
.append("groupCoding", getGroupCoding())
.append("cargoSpaceLogo", getCargoSpaceLogo())
.append("thisCargoArea", getThisCargoArea())
.append("wmsCargoSpaceId", getWmsCargoSpaceId())
.toString();
}
}

View File

@@ -0,0 +1,63 @@
package com.ruoyi.bas.cargospace.mapper;
import java.util.List;
import com.ruoyi.bas.cargospace.domain.BasCargoSpace;
/**
* 库存信息Mapper接口
*
* @author ruoyi
* @date 2025-09-23
*/
public interface BasCargoSpaceMapper
{
/**
* 查询库存信息
*
* @param cargoSpaceId 库存信息主键
* @return 库存信息
*/
public BasCargoSpace selectBasCargoSpaceByCargoSpaceId(String cargoSpaceId);
/**
* 查询库存信息列表
*
* @param basCargoSpace 库存信息
* @return 库存信息集合
*/
public List<BasCargoSpace> selectBasCargoSpaceList(BasCargoSpace basCargoSpace);
/**
* 新增库存信息
*
* @param basCargoSpace 库存信息
* @return 结果
*/
public int insertBasCargoSpace(BasCargoSpace basCargoSpace);
/**
* 修改库存信息
*
* @param basCargoSpace 库存信息
* @return 结果
*/
public int updateBasCargoSpace(BasCargoSpace basCargoSpace);
/**
* 删除库存信息
*
* @param cargoSpaceId 库存信息主键
* @return 结果
*/
public int deleteBasCargoSpaceByCargoSpaceId(String cargoSpaceId);
/**
* 批量删除库存信息
*
* @param cargoSpaceIds 需要删除的数据主键集合
* @return 结果
*/
public int deleteBasCargoSpaceByCargoSpaceIds(String[] cargoSpaceIds);
BasCargoSpace selectBasCargoSpaceByWmsCargoSpaceId(String cargoSpaceId);
}

View File

@@ -0,0 +1,63 @@
package com.ruoyi.bas.cargospace.service;
import java.util.List;
import com.ruoyi.bas.cargospace.domain.BasCargoSpace;
/**
* 库存信息Service接口
*
* @author ruoyi
* @date 2025-09-23
*/
public interface IBasCargoSpaceService
{
/**
* 查询库存信息
*
* @param cargoSpaceId 库存信息主键
* @return 库存信息
*/
public BasCargoSpace selectBasCargoSpaceByCargoSpaceId(String cargoSpaceId);
/**
* 查询库存信息列表
*
* @param basCargoSpace 库存信息
* @return 库存信息集合
*/
public List<BasCargoSpace> selectBasCargoSpaceList(BasCargoSpace basCargoSpace);
/**
* 新增库存信息
*
* @param basCargoSpace 库存信息
* @return 结果
*/
public int insertBasCargoSpace(BasCargoSpace basCargoSpace);
/**
* 修改库存信息
*
* @param basCargoSpace 库存信息
* @return 结果
*/
public int updateBasCargoSpace(BasCargoSpace basCargoSpace);
/**
* 批量删除库存信息
*
* @param cargoSpaceIds 需要删除的库存信息主键集合
* @return 结果
*/
public int deleteBasCargoSpaceByCargoSpaceIds(String[] cargoSpaceIds);
/**
* 删除库存信息信息
*
* @param cargoSpaceId 库存信息主键
* @return 结果
*/
public int deleteBasCargoSpaceByCargoSpaceId(String cargoSpaceId);
BasCargoSpace selectBasCargoSpaceByWmsCargoSpaceId(String cargoSpaceId);
}

View File

@@ -0,0 +1,98 @@
package com.ruoyi.bas.cargospace.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bas.cargospace.mapper.BasCargoSpaceMapper;
import com.ruoyi.bas.cargospace.domain.BasCargoSpace;
import com.ruoyi.bas.cargospace.service.IBasCargoSpaceService;
/**
* 库存信息Service业务层处理
*
* @author ruoyi
* @date 2025-09-23
*/
@Service
public class BasCargoSpaceServiceImpl implements IBasCargoSpaceService
{
@Autowired
private BasCargoSpaceMapper basCargoSpaceMapper;
/**
* 查询库存信息
*
* @param cargoSpaceId 库存信息主键
* @return 库存信息
*/
@Override
public BasCargoSpace selectBasCargoSpaceByCargoSpaceId(String cargoSpaceId)
{
return basCargoSpaceMapper.selectBasCargoSpaceByCargoSpaceId(cargoSpaceId);
}
/**
* 查询库存信息列表
*
* @param basCargoSpace 库存信息
* @return 库存信息
*/
@Override
public List<BasCargoSpace> selectBasCargoSpaceList(BasCargoSpace basCargoSpace)
{
return basCargoSpaceMapper.selectBasCargoSpaceList(basCargoSpace);
}
/**
* 新增库存信息
*
* @param basCargoSpace 库存信息
* @return 结果
*/
@Override
public int insertBasCargoSpace(BasCargoSpace basCargoSpace)
{
return basCargoSpaceMapper.insertBasCargoSpace(basCargoSpace);
}
/**
* 修改库存信息
*
* @param basCargoSpace 库存信息
* @return 结果
*/
@Override
public int updateBasCargoSpace(BasCargoSpace basCargoSpace)
{
return basCargoSpaceMapper.updateBasCargoSpace(basCargoSpace);
}
/**
* 批量删除库存信息
*
* @param cargoSpaceIds 需要删除的库存信息主键
* @return 结果
*/
@Override
public int deleteBasCargoSpaceByCargoSpaceIds(String[] cargoSpaceIds)
{
return basCargoSpaceMapper.deleteBasCargoSpaceByCargoSpaceIds(cargoSpaceIds);
}
/**
* 删除库存信息信息
*
* @param cargoSpaceId 库存信息主键
* @return 结果
*/
@Override
public int deleteBasCargoSpaceByCargoSpaceId(String cargoSpaceId)
{
return basCargoSpaceMapper.deleteBasCargoSpaceByCargoSpaceId(cargoSpaceId);
}
@Override
public BasCargoSpace selectBasCargoSpaceByWmsCargoSpaceId(String cargoSpaceId) {
return basCargoSpaceMapper.selectBasCargoSpaceByWmsCargoSpaceId(cargoSpaceId);
}
}

View File

@@ -0,0 +1,104 @@
package com.ruoyi.bas.fluent.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.bas.fluent.domain.BasFluentFrame;
import com.ruoyi.bas.fluent.service.IBasFluentFrameService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 流利架位置管理Controller
*
* @author ruoyi
* @date 2025-07-08
*/
@RestController
@RequestMapping("/bas/fluent")
public class BasFluentFrameController extends BaseController
{
@Autowired
private IBasFluentFrameService basFluentFrameService;
/**
* 查询流利架位置管理列表
*/
@PreAuthorize("@ss.hasPermi('bas:fluent:list')")
@GetMapping("/list")
public TableDataInfo list(BasFluentFrame basFluentFrame)
{
startPage();
List<BasFluentFrame> list = basFluentFrameService.selectBasFluentFrameList(basFluentFrame);
return getDataTable(list);
}
/**
* 导出流利架位置管理列表
*/
@PreAuthorize("@ss.hasPermi('bas:fluent:export')")
@Log(title = "流利架位置管理", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, BasFluentFrame basFluentFrame)
{
List<BasFluentFrame> list = basFluentFrameService.selectBasFluentFrameList(basFluentFrame);
ExcelUtil<BasFluentFrame> util = new ExcelUtil<BasFluentFrame>(BasFluentFrame.class);
util.exportExcel(response, list, "流利架位置管理数据");
}
/**
* 获取流利架位置管理详细信息
*/
@PreAuthorize("@ss.hasPermi('bas:fluent:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(basFluentFrameService.selectBasFluentFrameById(id));
}
/**
* 新增流利架位置管理
*/
@PreAuthorize("@ss.hasPermi('bas:fluent:add')")
@Log(title = "流利架位置管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody BasFluentFrame basFluentFrame)
{
return toAjax(basFluentFrameService.insertBasFluentFrame(basFluentFrame));
}
/**
* 修改流利架位置管理
*/
@PreAuthorize("@ss.hasPermi('bas:fluent:edit')")
@Log(title = "流利架位置管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody BasFluentFrame basFluentFrame)
{
return toAjax(basFluentFrameService.updateBasFluentFrame(basFluentFrame));
}
/**
* 删除流利架位置管理
*/
@PreAuthorize("@ss.hasPermi('bas:fluent:remove')")
@Log(title = "流利架位置管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(basFluentFrameService.deleteBasFluentFrameByIds(ids));
}
}

View File

@@ -0,0 +1,142 @@
package com.ruoyi.bas.fluent.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 流利架位置管理对象 bas_fluent_frame
*
* @author ruoyi
* @date 2025-07-08
*/
public class BasFluentFrame extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** id */
private Long id;
/** 位置名称 */
@Excel(name = "位置名称")
private String locationName;
/** 货位类型 1-放货点 2-取货点 */
@Excel(name = "货位类型 1-放货点 2-取货点")
private String type;
/** 流利架id */
@Excel(name = "流利架id")
private String frameId;
/** 当前的箱子数量 */
@Excel(name = "当前的箱子数量 ")
private Long boxNum;
/** 当前位置的箱码 类型2专用 */
@Excel(name = "当前位置的箱码 类型2专用")
private String trayCode;
/** 组号 */
@Excel(name = "组号")
private String groupId;
/** 当前位置分配数量 */
@Excel(name = "当前位置分配数量")
private Long allotNum;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setLocationName(String locationName)
{
this.locationName = locationName;
}
public String getLocationName()
{
return locationName;
}
public void setType(String type)
{
this.type = type;
}
public String getType()
{
return type;
}
public void setFrameId(String frameId)
{
this.frameId = frameId;
}
public String getFrameId()
{
return frameId;
}
public void setBoxNum(Long boxNum)
{
this.boxNum = boxNum;
}
public Long getBoxNum()
{
return boxNum;
}
public void setTrayCode(String trayCode)
{
this.trayCode = trayCode;
}
public String getTrayCode()
{
return trayCode;
}
public void setGroupId(String groupId)
{
this.groupId = groupId;
}
public String getGroupId()
{
return groupId;
}
public void setAllotNum(Long allotNum)
{
this.allotNum = allotNum;
}
public Long getAllotNum()
{
return allotNum;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("locationName", getLocationName())
.append("type", getType())
.append("frameId", getFrameId())
.append("boxNum", getBoxNum())
.append("trayCode", getTrayCode())
.append("groupId", getGroupId())
.append("allotNum", getAllotNum())
.toString();
}
}

View File

@@ -0,0 +1,63 @@
package com.ruoyi.bas.fluent.mapper;
import java.util.List;
import com.ruoyi.bas.fluent.domain.BasFluentFrame;
/**
* 流利架位置管理Mapper接口
*
* @author ruoyi
* @date 2025-07-08
*/
public interface BasFluentFrameMapper
{
/**
* 查询流利架位置管理
*
* @param id 流利架位置管理主键
* @return 流利架位置管理
*/
public BasFluentFrame selectBasFluentFrameById(Long id);
/**
* 查询流利架位置管理列表
*
* @param basFluentFrame 流利架位置管理
* @return 流利架位置管理集合
*/
public List<BasFluentFrame> selectBasFluentFrameList(BasFluentFrame basFluentFrame);
/**
* 新增流利架位置管理
*
* @param basFluentFrame 流利架位置管理
* @return 结果
*/
public int insertBasFluentFrame(BasFluentFrame basFluentFrame);
/**
* 修改流利架位置管理
*
* @param basFluentFrame 流利架位置管理
* @return 结果
*/
public int updateBasFluentFrame(BasFluentFrame basFluentFrame);
/**
* 删除流利架位置管理
*
* @param id 流利架位置管理主键
* @return 结果
*/
public int deleteBasFluentFrameById(Long id);
/**
* 批量删除流利架位置管理
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteBasFluentFrameByIds(Long[] ids);
BasFluentFrame selectBasFluentFrameOrderByAllotNum(String exitId);
}

View File

@@ -0,0 +1,68 @@
package com.ruoyi.bas.fluent.service;
import java.util.List;
import com.ruoyi.bas.fluent.domain.BasFluentFrame;
/**
* 流利架位置管理Service接口
*
* @author ruoyi
* @date 2025-07-08
*/
public interface IBasFluentFrameService
{
/**
* 查询流利架位置管理
*
* @param id 流利架位置管理主键
* @return 流利架位置管理
*/
public BasFluentFrame selectBasFluentFrameById(Long id);
/**
* 查询流利架位置管理列表
*
* @param basFluentFrame 流利架位置管理
* @return 流利架位置管理集合
*/
public List<BasFluentFrame> selectBasFluentFrameList(BasFluentFrame basFluentFrame);
/**
* 新增流利架位置管理
*
* @param basFluentFrame 流利架位置管理
* @return 结果
*/
public int insertBasFluentFrame(BasFluentFrame basFluentFrame);
/**
* 修改流利架位置管理
*
* @param basFluentFrame 流利架位置管理
* @return 结果
*/
public int updateBasFluentFrame(BasFluentFrame basFluentFrame);
/**
* 批量删除流利架位置管理
*
* @param ids 需要删除的流利架位置管理主键集合
* @return 结果
*/
public int deleteBasFluentFrameByIds(Long[] ids);
/**
* 删除流利架位置管理信息
*
* @param id 流利架位置管理主键
* @return 结果
*/
public int deleteBasFluentFrameById(Long id);
/**
* 获取分配数量最少得流利架货位
* @param exitId
* @return
*/
BasFluentFrame selectBasFluentFrameOrderByAllotNum(String exitId);
}

View File

@@ -0,0 +1,98 @@
package com.ruoyi.bas.fluent.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bas.fluent.mapper.BasFluentFrameMapper;
import com.ruoyi.bas.fluent.domain.BasFluentFrame;
import com.ruoyi.bas.fluent.service.IBasFluentFrameService;
/**
* 流利架位置管理Service业务层处理
*
* @author ruoyi
* @date 2025-07-08
*/
@Service
public class BasFluentFrameServiceImpl implements IBasFluentFrameService
{
@Autowired
private BasFluentFrameMapper basFluentFrameMapper;
/**
* 查询流利架位置管理
*
* @param id 流利架位置管理主键
* @return 流利架位置管理
*/
@Override
public BasFluentFrame selectBasFluentFrameById(Long id)
{
return basFluentFrameMapper.selectBasFluentFrameById(id);
}
/**
* 查询流利架位置管理列表
*
* @param basFluentFrame 流利架位置管理
* @return 流利架位置管理
*/
@Override
public List<BasFluentFrame> selectBasFluentFrameList(BasFluentFrame basFluentFrame)
{
return basFluentFrameMapper.selectBasFluentFrameList(basFluentFrame);
}
/**
* 新增流利架位置管理
*
* @param basFluentFrame 流利架位置管理
* @return 结果
*/
@Override
public int insertBasFluentFrame(BasFluentFrame basFluentFrame)
{
return basFluentFrameMapper.insertBasFluentFrame(basFluentFrame);
}
/**
* 修改流利架位置管理
*
* @param basFluentFrame 流利架位置管理
* @return 结果
*/
@Override
public int updateBasFluentFrame(BasFluentFrame basFluentFrame)
{
return basFluentFrameMapper.updateBasFluentFrame(basFluentFrame);
}
/**
* 批量删除流利架位置管理
*
* @param ids 需要删除的流利架位置管理主键
* @return 结果
*/
@Override
public int deleteBasFluentFrameByIds(Long[] ids)
{
return basFluentFrameMapper.deleteBasFluentFrameByIds(ids);
}
/**
* 删除流利架位置管理信息
*
* @param id 流利架位置管理主键
* @return 结果
*/
@Override
public int deleteBasFluentFrameById(Long id)
{
return basFluentFrameMapper.deleteBasFluentFrameById(id);
}
@Override
public BasFluentFrame selectBasFluentFrameOrderByAllotNum(String exitId) {
return basFluentFrameMapper.selectBasFluentFrameOrderByAllotNum(exitId);
}
}

View File

@@ -0,0 +1,104 @@
package com.ruoyi.bas.port.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.bas.port.domain.WcsPort;
import com.ruoyi.bas.port.service.IWcsPortService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 点位管理Controller
*
* @author ruoyi
* @date 2025-06-11
*/
@RestController
@RequestMapping("/bas/port")
public class WcsPortController extends BaseController
{
@Autowired
private IWcsPortService wcsPortService;
/**
* 查询点位管理列表
*/
@PreAuthorize("@ss.hasPermi('bas:port:list')")
@GetMapping("/list")
public TableDataInfo list(WcsPort wcsPort)
{
startPage();
List<WcsPort> list = wcsPortService.selectWcsPortList(wcsPort);
return getDataTable(list);
}
/**
* 导出点位管理列表
*/
@PreAuthorize("@ss.hasPermi('bas:port:export')")
@Log(title = "点位管理", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, WcsPort wcsPort)
{
List<WcsPort> list = wcsPortService.selectWcsPortList(wcsPort);
ExcelUtil<WcsPort> util = new ExcelUtil<WcsPort>(WcsPort.class);
util.exportExcel(response, list, "点位管理数据");
}
/**
* 获取点位管理详细信息
*/
@PreAuthorize("@ss.hasPermi('bas:port:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(wcsPortService.selectWcsPortById(id));
}
/**
* 新增点位管理
*/
@PreAuthorize("@ss.hasPermi('bas:port:add')")
@Log(title = "点位管理", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody WcsPort wcsPort)
{
return toAjax(wcsPortService.insertWcsPort(wcsPort));
}
/**
* 修改点位管理
*/
@PreAuthorize("@ss.hasPermi('bas:port:edit')")
@Log(title = "点位管理", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody WcsPort wcsPort)
{
return toAjax(wcsPortService.updateWcsPort(wcsPort));
}
/**
* 删除点位管理
*/
@PreAuthorize("@ss.hasPermi('bas:port:remove')")
@Log(title = "点位管理", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(wcsPortService.deleteWcsPortByIds(ids));
}
}

View File

@@ -0,0 +1,176 @@
package com.ruoyi.bas.port.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 点位管理对象 wcs_port
*
* @author ruoyi
* @date 2025-06-11
*/
public class WcsPort extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 点位编码 */
@Excel(name = "点位编码")
private String portCode;
/** 点位名称 */
@Excel(name = "点位名称")
private String portName;
/** 点位类型 */
@Excel(name = "点位类型")
private String portType;
/** 点位区域 */
@Excel(name = "点位区域")
private String portRegion;
/** 备用字段 */
@Excel(name = "备用字段")
private String spare1;
/** 备用字段 */
@Excel(name = "备用字段")
private String spare2;
/** 备用字段 */
@Excel(name = "备用字段")
private String spare3;
private String spare4;
private String spare5;
/** 状态 */
@Excel(name = "状态")
private String status;
public String getSpare5() {
return spare5;
}
public void setSpare5(String spare5) {
this.spare5 = spare5;
}
public String getSpare4() {
return spare4;
}
public void setSpare4(String spare4) {
this.spare4 = spare4;
}
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setPortCode(String portCode)
{
this.portCode = portCode;
}
public String getPortCode()
{
return portCode;
}
public void setPortName(String portName)
{
this.portName = portName;
}
public String getPortName()
{
return portName;
}
public void setPortType(String portType)
{
this.portType = portType;
}
public String getPortType()
{
return portType;
}
public void setPortRegion(String portRegion)
{
this.portRegion = portRegion;
}
public String getPortRegion()
{
return portRegion;
}
public void setSpare1(String spare1)
{
this.spare1 = spare1;
}
public String getSpare1()
{
return spare1;
}
public void setSpare2(String spare2)
{
this.spare2 = spare2;
}
public String getSpare2()
{
return spare2;
}
public void setSpare3(String spare3)
{
this.spare3 = spare3;
}
public String getSpare3()
{
return spare3;
}
public void setStatus(String status)
{
this.status = status;
}
public String getStatus()
{
return status;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("portCode", getPortCode())
.append("portName", getPortName())
.append("portType", getPortType())
.append("portRegion", getPortRegion())
.append("spare1", getSpare1())
.append("spare2", getSpare2())
.append("spare3", getSpare3())
.append("status", getStatus())
.toString();
}
}

View File

@@ -0,0 +1,68 @@
package com.ruoyi.bas.port.mapper;
import java.util.List;
import com.ruoyi.bas.port.domain.WcsPort;
/**
* 点位管理Mapper接口
*
* @author ruoyi
* @date 2025-06-11
*/
public interface WcsPortMapper
{
/**
* 查询点位管理
*
* @param id 点位管理主键
* @return 点位管理
*/
public WcsPort selectWcsPortById(Long id);
/**
* 查询点位管理列表
*
* @param wcsPort 点位管理
* @return 点位管理集合
*/
public List<WcsPort> selectWcsPortList(WcsPort wcsPort);
/**
* 新增点位管理
*
* @param wcsPort 点位管理
* @return 结果
*/
public int insertWcsPort(WcsPort wcsPort);
/**
* 修改点位管理
*
* @param wcsPort 点位管理
* @return 结果
*/
public int updateWcsPort(WcsPort wcsPort);
/**
* 删除点位管理
*
* @param id 点位管理主键
* @return 结果
*/
public int deleteWcsPortById(Long id);
/**
* 批量删除点位管理
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteWcsPortByIds(Long[] ids);
/**
* 根据code查询点位
* @param point
* @return
*/
WcsPort selectWcsPortByPortCode(String point);
}

View File

@@ -0,0 +1,68 @@
package com.ruoyi.bas.port.service;
import java.util.List;
import com.ruoyi.bas.port.domain.WcsPort;
/**
* 点位管理Service接口
*
* @author ruoyi
* @date 2025-06-11
*/
public interface IWcsPortService
{
/**
* 查询点位管理
*
* @param id 点位管理主键
* @return 点位管理
*/
public WcsPort selectWcsPortById(Long id);
/**
* 查询点位管理列表
*
* @param wcsPort 点位管理
* @return 点位管理集合
*/
public List<WcsPort> selectWcsPortList(WcsPort wcsPort);
/**
* 新增点位管理
*
* @param wcsPort 点位管理
* @return 结果
*/
public int insertWcsPort(WcsPort wcsPort);
/**
* 修改点位管理
*
* @param wcsPort 点位管理
* @return 结果
*/
public int updateWcsPort(WcsPort wcsPort);
/**
* 批量删除点位管理
*
* @param ids 需要删除的点位管理主键集合
* @return 结果
*/
public int deleteWcsPortByIds(Long[] ids);
/**
* 删除点位管理信息
*
* @param id 点位管理主键
* @return 结果
*/
public int deleteWcsPortById(Long id);
/**
* 根据点位代码查询点位名称
* @param startPoint
* @return
*/
WcsPort selectWcsPortByPortCode(String startPoint);
}

View File

@@ -0,0 +1,98 @@
package com.ruoyi.bas.port.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bas.port.mapper.WcsPortMapper;
import com.ruoyi.bas.port.domain.WcsPort;
import com.ruoyi.bas.port.service.IWcsPortService;
/**
* 点位管理Service业务层处理
*
* @author ruoyi
* @date 2025-06-11
*/
@Service
public class WcsPortServiceImpl implements IWcsPortService
{
@Autowired
private WcsPortMapper wcsPortMapper;
/**
* 查询点位管理
*
* @param id 点位管理主键
* @return 点位管理
*/
@Override
public WcsPort selectWcsPortById(Long id)
{
return wcsPortMapper.selectWcsPortById(id);
}
/**
* 查询点位管理列表
*
* @param wcsPort 点位管理
* @return 点位管理
*/
@Override
public List<WcsPort> selectWcsPortList(WcsPort wcsPort)
{
return wcsPortMapper.selectWcsPortList(wcsPort);
}
/**
* 新增点位管理
*
* @param wcsPort 点位管理
* @return 结果
*/
@Override
public int insertWcsPort(WcsPort wcsPort)
{
return wcsPortMapper.insertWcsPort(wcsPort);
}
/**
* 修改点位管理
*
* @param wcsPort 点位管理
* @return 结果
*/
@Override
public int updateWcsPort(WcsPort wcsPort)
{
return wcsPortMapper.updateWcsPort(wcsPort);
}
/**
* 批量删除点位管理
*
* @param ids 需要删除的点位管理主键
* @return 结果
*/
@Override
public int deleteWcsPortByIds(Long[] ids)
{
return wcsPortMapper.deleteWcsPortByIds(ids);
}
/**
* 删除点位管理信息
*
* @param id 点位管理主键
* @return 结果
*/
@Override
public int deleteWcsPortById(Long id)
{
return wcsPortMapper.deleteWcsPortById(id);
}
@Override
public WcsPort selectWcsPortByPortCode(String point) {
return wcsPortMapper.selectWcsPortByPortCode(point);
}
}

View File

@@ -0,0 +1,104 @@
package com.ruoyi.bas.srgvmap.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.bas.srgvmap.domain.WcsSrgvMap;
import com.ruoyi.bas.srgvmap.service.IWcsSrgvMapService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 小车点位地图表Controller
*
* @author ruoyi
* @date 2025-11-21
*/
@RestController
@RequestMapping("/bas/srgvMap")
public class WcsSrgvMapController extends BaseController
{
@Autowired
private IWcsSrgvMapService wcsSrgvMapService;
/**
* 查询小车点位地图表列表
*/
@PreAuthorize("@ss.hasPermi('bas:srgvMap:list')")
@GetMapping("/list")
public TableDataInfo list(WcsSrgvMap wcsSrgvMap)
{
startPage();
List<WcsSrgvMap> list = wcsSrgvMapService.selectWcsSrgvMapList(wcsSrgvMap);
return getDataTable(list);
}
/**
* 导出小车点位地图表列表
*/
@PreAuthorize("@ss.hasPermi('bas:srgvMap:export')")
@Log(title = "小车点位地图表", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, WcsSrgvMap wcsSrgvMap)
{
List<WcsSrgvMap> list = wcsSrgvMapService.selectWcsSrgvMapList(wcsSrgvMap);
ExcelUtil<WcsSrgvMap> util = new ExcelUtil<WcsSrgvMap>(WcsSrgvMap.class);
util.exportExcel(response, list, "小车点位地图表数据");
}
/**
* 获取小车点位地图表详细信息
*/
@PreAuthorize("@ss.hasPermi('bas:srgvMap:query')")
@GetMapping(value = "/{guid}")
public AjaxResult getInfo(@PathVariable("guid") String guid)
{
return success(wcsSrgvMapService.selectWcsSrgvMapByGuid(guid));
}
/**
* 新增小车点位地图表
*/
@PreAuthorize("@ss.hasPermi('bas:srgvMap:add')")
@Log(title = "小车点位地图表", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody WcsSrgvMap wcsSrgvMap)
{
return toAjax(wcsSrgvMapService.insertWcsSrgvMap(wcsSrgvMap));
}
/**
* 修改小车点位地图表
*/
@PreAuthorize("@ss.hasPermi('bas:srgvMap:edit')")
@Log(title = "小车点位地图表", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody WcsSrgvMap wcsSrgvMap)
{
return toAjax(wcsSrgvMapService.updateWcsSrgvMap(wcsSrgvMap));
}
/**
* 删除小车点位地图表
*/
@PreAuthorize("@ss.hasPermi('bas:srgvMap:remove')")
@Log(title = "小车点位地图表", businessType = BusinessType.DELETE)
@DeleteMapping("/{guids}")
public AjaxResult remove(@PathVariable String[] guids)
{
return toAjax(wcsSrgvMapService.deleteWcsSrgvMapByGuids(guids));
}
}

View File

@@ -0,0 +1,113 @@
package com.ruoyi.bas.srgvmap.domain;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import javax.validation.constraints.NotNull;
/**
* 小车点位地图表对象 wcs_srgv_map
*
* @author ruoyi
* @date 2025-11-21
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class WcsSrgvMap extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 唯一id */
@Excel(name = "唯一id")
private String guid;
/** 二维数组纵轴(从上至下) */
@Excel(name = "二维数组纵轴(从上至下)")
private Integer x;
/** 二维数组横轴(从左至右) */
@Excel(name = "二维数组横轴(从左至右)")
private Integer y;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private Integer z;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String axy;
/** 值 */
@Excel(name = "值")
private Integer value;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private Integer ux;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private Integer uy;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private Integer uz;
/** (0,0)表示墙体和墙体对应主通道 */
@Excel(name = "(0,0)表示墙体和墙体对应主通道")
private String uxy;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String spaceName;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String cargoSpaceId;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private Integer theRow;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private Integer theColumn;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private Integer theLayer;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private String siteId;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private Integer plcRow;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private Integer plcColumn;
/** $column.columnComment */
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
private Integer plcLayer;
/** 仓库 */
@Excel(name = "仓库")
private String warehouse;
/** 区域 */
@Excel(name = "区域")
private String spaceArea;
}

View File

@@ -0,0 +1,65 @@
package com.ruoyi.bas.srgvmap.mapper;
import java.util.List;
import com.ruoyi.bas.srgvmap.domain.WcsSrgvMap;
/**
* 小车点位地图表Mapper接口
*
* @author ruoyi
* @date 2025-11-21
*/
public interface WcsSrgvMapMapper
{
/**
* 查询小车点位地图表
*
* @param guid 小车点位地图表主键
* @return 小车点位地图表
*/
public WcsSrgvMap selectWcsSrgvMapByGuid(String guid);
public WcsSrgvMap selectWcsSrgvMapBySiteId(String siteId);
/**
* 查询小车点位地图表列表
*
* @param wcsSrgvMap 小车点位地图表
* @return 小车点位地图表集合
*/
public List<WcsSrgvMap> selectWcsSrgvMapList(WcsSrgvMap wcsSrgvMap);
/**
* 新增小车点位地图表
*
* @param wcsSrgvMap 小车点位地图表
* @return 结果
*/
public int insertWcsSrgvMap(WcsSrgvMap wcsSrgvMap);
/**
* 修改小车点位地图表
*
* @param wcsSrgvMap 小车点位地图表
* @return 结果
*/
public int updateWcsSrgvMap(WcsSrgvMap wcsSrgvMap);
/**
* 删除小车点位地图表
*
* @param guid 小车点位地图表主键
* @return 结果
*/
public int deleteWcsSrgvMapByGuid(String guid);
/**
* 批量删除小车点位地图表
*
* @param guids 需要删除的数据主键集合
* @return 结果
*/
public int deleteWcsSrgvMapByGuids(String[] guids);
}

View File

@@ -0,0 +1,65 @@
package com.ruoyi.bas.srgvmap.service;
import java.util.List;
import com.ruoyi.bas.srgvmap.domain.WcsSrgvMap;
/**
* 小车点位地图表Service接口
*
* @author ruoyi
* @date 2025-11-21
*/
public interface IWcsSrgvMapService
{
/**
* 查询小车点位地图表
*
* @param guid 小车点位地图表主键
* @return 小车点位地图表
*/
public WcsSrgvMap selectWcsSrgvMapByGuid(String guid);
public WcsSrgvMap selectWcsSrgvMapBySiteId(String siteId);
/**
* 查询小车点位地图表列表
*
* @param wcsSrgvMap 小车点位地图表
* @return 小车点位地图表集合
*/
public List<WcsSrgvMap> selectWcsSrgvMapList(WcsSrgvMap wcsSrgvMap);
/**
* 新增小车点位地图表
*
* @param wcsSrgvMap 小车点位地图表
* @return 结果
*/
public int insertWcsSrgvMap(WcsSrgvMap wcsSrgvMap);
/**
* 修改小车点位地图表
*
* @param wcsSrgvMap 小车点位地图表
* @return 结果
*/
public int updateWcsSrgvMap(WcsSrgvMap wcsSrgvMap);
/**
* 批量删除小车点位地图表
*
* @param guids 需要删除的小车点位地图表主键集合
* @return 结果
*/
public int deleteWcsSrgvMapByGuids(String[] guids);
/**
* 删除小车点位地图表信息
*
* @param guid 小车点位地图表主键
* @return 结果
*/
public int deleteWcsSrgvMapByGuid(String guid);
}

View File

@@ -0,0 +1,34 @@
package com.ruoyi.bas.srgvmap.service;
import com.ruoyi.bas.srgvmap.domain.WcsSrgvMap;
import com.ruoyi.device.srgv.domain.DeviceSrgv;
import java.util.List;
import java.util.Map;
public interface RoadCacheService {
/**
* 获取指定楼层的缓存
* @param floor 楼层
* @return
*/
Map<String,WcsSrgvMap> getArrByRoadSite(Integer floor);
/**
* 处理地图
* @param arrByRoadSite
* @param deviceSrgv
* @return
*/
int[][] handleMap(Map<String, WcsSrgvMap> arrByRoadSite, DeviceSrgv deviceSrgv);
/**
* 根据x y z 获取指定位置的缓存
* @param x
* @param y
* @param z
* @return
*/
WcsSrgvMap selectRoadSiteByArr(int x, int y, int z);
}

View File

@@ -0,0 +1,155 @@
package com.ruoyi.bas.srgvmap.service.impl;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.ruoyi.bas.srgvmap.domain.WcsSrgvMap;
import com.ruoyi.bas.srgvmap.mapper.WcsSrgvMapMapper;
import com.ruoyi.bas.srgvmap.service.RoadCacheService;
import com.ruoyi.device.srgv.domain.DeviceSrgv;
import com.ruoyi.device.srgv.service.IDeviceSrgvService;
import com.ruoyi.queue.srgv.domain.WcsSrgvQueue;
import com.ruoyi.queue.srgv.service.IWcsSrgvQueueService;
import com.ruoyi.schedule.plcRead.srgv.PlcSrgvRead;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.*;
import java.util.stream.Collectors;
@Service
@Slf4j
public class RoadCacheServiceImpl implements RoadCacheService {
@Autowired
private WcsSrgvMapMapper wcsSrgvMapMapper;
@Autowired
private IWcsSrgvQueueService wcsSrgvQueueService;
@Autowired
private IDeviceSrgvService deviceSrgvService;
@Override
public Map<String, WcsSrgvMap> getArrByRoadSite(Integer floor) {
WcsSrgvMap param = new WcsSrgvMap();
param.setZ(floor);
List<WcsSrgvMap> wcsSrgvMaps = wcsSrgvMapMapper.selectWcsSrgvMapList(param);
HashMap<String, WcsSrgvMap> maps = new HashMap<>();
for (WcsSrgvMap wcsSrgvMap : wcsSrgvMaps) {
maps.put(wcsSrgvMap.getSiteId(), wcsSrgvMap);
}
param.setAxy("7,7");
List<WcsSrgvMap> tsjMap = wcsSrgvMapMapper.selectWcsSrgvMapList(param);
for (WcsSrgvMap wcsSrgvMap : tsjMap) {
maps.put("tsj",wcsSrgvMap);
}
return maps;
}
@Override
public int[][] handleMap(Map<String, WcsSrgvMap> maps, DeviceSrgv deviceSrgv) {
//1.锁定其他车任务路径
lockedOtherCarQueuePath(maps, deviceSrgv);
//2.锁定无任务小车当前位置
lockedOtherCarCurrSite(maps, deviceSrgv);
//3.锁定离线小车当前位置
lockedOfflineCarCurrSite(maps, deviceSrgv);
int[][] mapsInt = new int[29][11];
for (String site : maps.keySet()) {
WcsSrgvMap wcsSrgvMap = maps.get(site);
mapsInt[wcsSrgvMap.getX()][wcsSrgvMap.getY()] = wcsSrgvMap.getValue();
}
return mapsInt;
}
@Override
public WcsSrgvMap selectRoadSiteByArr(int x, int y, int z) {
WcsSrgvMap param = new WcsSrgvMap();
param.setX(x);
param.setY(y);
param.setZ(z);
List<WcsSrgvMap> wcsSrgvMaps = wcsSrgvMapMapper.selectWcsSrgvMapList(param);
if (CollUtil.isNotEmpty(wcsSrgvMaps)){
return wcsSrgvMaps.get(0);
}
return null;
}
/**
* 锁定离线小车当前位置
*
* @param maps
* @param deviceSrgv
*/
private void lockedOfflineCarCurrSite(Map<String, WcsSrgvMap> maps, DeviceSrgv deviceSrgv) {
//获取所有小车状态
List<DeviceSrgv> deviceSrgvs = deviceSrgvService.selectDeviceSrgvList(new DeviceSrgv());
//获取其他小车离线站点
List<DeviceSrgv> offlineSrgvList = deviceSrgvs.stream().filter(x ->
!x.getDeviceId().equals(deviceSrgv.getDeviceId()) &&
StrUtil.isNotEmpty(x.getOfflineSite())
).collect(Collectors.toList());
//锁定离线小车站点
if (CollUtil.isNotEmpty(offlineSrgvList)) {
for (DeviceSrgv offlineSrgv : offlineSrgvList) {
if (maps.containsKey(offlineSrgv.getOfflineSite())) {
maps.get(offlineSrgv.getOfflineSite()).setValue(0);
}
}
}
}
/**
* 锁定无任务小车当前位置
*
* @param arrByRoadSite
* @param deviceSrgv
*/
private void lockedOtherCarCurrSite(Map<String, WcsSrgvMap> arrByRoadSite, DeviceSrgv deviceSrgv) {
//锁定其他车当前位置
for (String sRgv : PlcSrgvRead.deviceSrgvMap.keySet()) {
if (!sRgv.equals(deviceSrgv.getDeviceId().toString())) {
DeviceSrgv otherCar = PlcSrgvRead.deviceSrgvMap.get(sRgv);
String currSite = otherCar.getCurrSite();
if (arrByRoadSite.containsKey(currSite)) {
arrByRoadSite.get(currSite).setValue(0);
}
}
}
}
/**
* 锁定其他车任务路径
*
* @param maps
* @param deviceSrgv
*/
private void lockedOtherCarQueuePath(Map<String, WcsSrgvMap> maps, DeviceSrgv deviceSrgv) {
//查询所有小车作业
List<WcsSrgvQueue> wcsSrgvQueues = wcsSrgvQueueService.selectWcsSrgvQueueList(new WcsSrgvQueue());
if (CollUtil.isNotEmpty(wcsSrgvQueues)) {
//筛选其他小车队列
List<WcsSrgvQueue> otherCarQueue = wcsSrgvQueues.stream().filter(x -> !x.getAgvId().equals(deviceSrgv.getDeviceId().toString())).collect(Collectors.toList());
if (CollUtil.isNotEmpty(otherCarQueue)) {
//添加其他小车路径列表
HashSet<String> otherCarSiteList = new HashSet<>();
for (WcsSrgvQueue wcsSrgvQueue : otherCarQueue) {
otherCarSiteList.addAll(Arrays.asList(wcsSrgvQueue.getPathInfo().split(",")));
}
//锁定其他小车路径
if (CollUtil.isNotEmpty(otherCarSiteList)) {
for (String siteId : otherCarSiteList) {
if (maps.containsKey(siteId)) {
maps.get(siteId).setValue(0);
}
}
}
}
}
}
}

View File

@@ -0,0 +1,98 @@
package com.ruoyi.bas.srgvmap.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.bas.srgvmap.mapper.WcsSrgvMapMapper;
import com.ruoyi.bas.srgvmap.domain.WcsSrgvMap;
import com.ruoyi.bas.srgvmap.service.IWcsSrgvMapService;
/**
* 小车点位地图表Service业务层处理
*
* @author ruoyi
* @date 2025-11-21
*/
@Service
public class WcsSrgvMapServiceImpl implements IWcsSrgvMapService
{
@Autowired
private WcsSrgvMapMapper wcsSrgvMapMapper;
/**
* 查询小车点位地图表
*
* @param guid 小车点位地图表主键
* @return 小车点位地图表
*/
@Override
public WcsSrgvMap selectWcsSrgvMapByGuid(String guid)
{
return wcsSrgvMapMapper.selectWcsSrgvMapByGuid(guid);
}
@Override
public WcsSrgvMap selectWcsSrgvMapBySiteId(String siteId) {
return wcsSrgvMapMapper.selectWcsSrgvMapBySiteId(siteId);
}
/**
* 查询小车点位地图表列表
*
* @param wcsSrgvMap 小车点位地图表
* @return 小车点位地图表
*/
@Override
public List<WcsSrgvMap> selectWcsSrgvMapList(WcsSrgvMap wcsSrgvMap)
{
return wcsSrgvMapMapper.selectWcsSrgvMapList(wcsSrgvMap);
}
/**
* 新增小车点位地图表
*
* @param wcsSrgvMap 小车点位地图表
* @return 结果
*/
@Override
public int insertWcsSrgvMap(WcsSrgvMap wcsSrgvMap)
{
return wcsSrgvMapMapper.insertWcsSrgvMap(wcsSrgvMap);
}
/**
* 修改小车点位地图表
*
* @param wcsSrgvMap 小车点位地图表
* @return 结果
*/
@Override
public int updateWcsSrgvMap(WcsSrgvMap wcsSrgvMap)
{
return wcsSrgvMapMapper.updateWcsSrgvMap(wcsSrgvMap);
}
/**
* 批量删除小车点位地图表
*
* @param guids 需要删除的小车点位地图表主键
* @return 结果
*/
@Override
public int deleteWcsSrgvMapByGuids(String[] guids)
{
return wcsSrgvMapMapper.deleteWcsSrgvMapByGuids(guids);
}
/**
* 删除小车点位地图表信息
*
* @param guid 小车点位地图表主键
* @return 结果
*/
@Override
public int deleteWcsSrgvMapByGuid(String guid)
{
return wcsSrgvMapMapper.deleteWcsSrgvMapByGuid(guid);
}
}

View File

@@ -0,0 +1,29 @@
package com.ruoyi.common;
public class Constant {
public static final String WMS_BASE_URL = "http://localhost:8080/api2wms/";
public static final String RCS_BASE_URL = "http://127.0.0.1:8081/rcms-dps/rest/";
public static final String JOB_FINISH_URL = WMS_BASE_URL+"jobFinish";
public static final String CONTINUE_TASK_URL = RCS_BASE_URL+"continueTask";
public static final String CANCEL_TASK_URL = RCS_BASE_URL+"queryAgvStatus";;
public static final String GEN_AGV_SCHEDULING_TASK = RCS_BASE_URL+"genAgvSchedulingTask";;
public static final String CREATE_IN_MYDO_JOB_URL = WMS_BASE_URL+"requestEnterByTrayCode";
public static final String REQUEST_MYDO_JOB_URL = WMS_BASE_URL+"requestByNoTrayCode";
public static final String RE_ASSIGN_URL = WMS_BASE_URL+"reAssign";
public static final String RE_MATERIAL_URL = WMS_BASE_URL+"reMaterial";
public static final String REQUEST_ENTER_URL = WMS_BASE_URL+"requestEnterByTrayCodeAndEntranceId";
public static final String WAREHOUSE_01 = "01";
public static final String WAREHOUSE_02 = "02";
public static final int ROADWAY_ID_01 = 1;
public static final int ROADWAY_ID_02 = 2;
public static final int ROADWAY_ID_03 = 3;
}

View File

@@ -0,0 +1,67 @@
package com.ruoyi.common;
/**
* 任务执行状态
*/
public class TaskStatusCode {
/**
* 任务状态-待执行
*/
public static final String TASK_STATUS_CREATE = "1";
/**
* 任务状态-待执行
*/
public static final String TASK_STATUS_PENDING = "2";
/**
* 任务状态-正执行
*/
public static final String TASK_STATUS_RUNNING = "3";
/**
* 任务状态-已完成
*/
public static final String TASK_STATUS_FINISH = "4";
/**
* 任务状态-作废
*/
public static final String TASK_STATUS_INVALID = "5";
/**
* 任务执行阶段 AGV
*/
public static final String TASK_EP_SRGV_KC_TSJ_RK = "1";
public static final String TASK_EP_TJS_KC_UNLOAD = "2";
public static final String TASK_EP_SRGV_KC_TSJ = "3";
public static final String TASK_EP_TJS_KC_LOAD = "4";
public static final String TASK_EP_SRGV_KC_TSJ_CK = "5";
public static final String TASK_EP_SRGV_QH = "6";
public static final String TASK_EP_SRGV_MC_TSJ_RK = "7";
public static final String TASK_EP_TJS_MC_UNLOAD = "8";
public static final String TASK_EP_SRGV_MC_TSJ = "9";
public static final String TASK_EP_TJS_MC_LOAD = "10";
public static final String TASK_EP_SRGV_MC_TSJ_CK = "11";
public static final String TASK_EP_SRGV_FH = "12";
public static final String TASK_EP_CK = "14";
/**
* 任务执行阶段 入口输送机
*/
public static final String TASK_EP_SSJ = "2";
/**
* 任务执行阶段 巷道口
*/
public static final String TASK_EP_ROADWAY_SSJ = "3";
/**
* 任务执行阶段 堆垛机
*/
public static final String TASK_EP_DDJ = "4";
/**
* 任务执行阶段 回传wms完成
*/
public static final String TASK_EP_WMS_FINISH = "5";
}

View File

@@ -0,0 +1,15 @@
package com.ruoyi.common;
public class TaskType {
/**
* 堆垛机任务类型
*/
//入库取货扫码
public static final int DDJ_RWLX_1 = 1;
//入库放货
public static final int DDJ_RWLX_2 = 2;
//出库
public static final int DDJ_RWLX_3 = 3;
}

View File

@@ -0,0 +1,13 @@
package com.ruoyi.common.domain;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CustomThread<T> {
public Thread thread;
public T runnable;
}

View File

@@ -0,0 +1,105 @@
package com.ruoyi.common.domain;
import HslCommunication.BasicFramework.SoftBasic;
import HslCommunication.Core.Net.IReadWriteNet;
import HslCommunication.Core.Types.OperateResult;
import HslCommunication.Core.Types.OperateResultExOne;
import javax.swing.*;
import java.awt.*;
import java.text.SimpleDateFormat;
import java.util.Date;
public class HslRead {
private static SimpleDateFormat dateFormat = new SimpleDateFormat("[HH:mm:ss] ");
/**
* 将结果信息显示出来,在界面里进行显示
* @param result 等待显示的结果信息
* @param x
* @param address 读取的地址数据
* @param textBox 显示结果的文本框
* @param scrollPane 支持滚动条的控件
* @param <T> 类型对象
* @return
* @return
* @return
* @return
* @return
*/
public static <T> T ReadResultRender(OperateResultExOne<T> result ) {
T x = null ;
if (result.IsSuccess) {
if (result.Content.getClass().isArray()) {
} else {
x= (T) result.Content;
}
} else {
JOptionPane.showMessageDialog(
null,
dateFormat.format(new Date()) + "] Read Failed\r\nReason:" + result.ToMessageShowString(),
"Result",
JOptionPane.WARNING_MESSAGE);
}
return x;
}
public static int WriteResultRender(OperateResult result, String address ) { //void
int x=0;
if (result.IsSuccess) {
// JOptionPane.showMessageDialog(
// null,
// dateFormat.format(new Date()) + "[" + address + "] Write Success",
// "Result",
// JOptionPane.PLAIN_MESSAGE);
x=1;
} else {
// JOptionPane.showMessageDialog(
// null,
// dateFormat.format(new Date()) + "[" + address + "] Write Failed\r\nReason:" + result.ToMessageShowString(),
// "Result",
// JOptionPane.WARNING_MESSAGE);
x=2;
}
return x;
}
public static void BulkReadRenderResult(IReadWriteNet readWrite, JTextField addTextBox, JTextField lengthTextBox, JTextArea resultTextBox ) {
try {
OperateResultExOne<byte[]> read = readWrite.Read(addTextBox.getText(), Short.parseShort(lengthTextBox.getText()));
if (read.IsSuccess) {
resultTextBox.setText("Result:" + SoftBasic.ByteToHexString(read.Content));
} else {
JOptionPane.showMessageDialog(null, "Read Failed:" + read.ToMessageShowString(), "Result", JOptionPane.WARNING_MESSAGE);
}
} catch (Exception ex) {
JOptionPane.showMessageDialog(null, "Read Failed:" + ex.getMessage(), "Result", JOptionPane.ERROR_MESSAGE);
}
}
public static void SetPanelEnabled(JPanel panel, boolean enable) {
Component[] components = panel.getComponents();
//System.out.println("Component Length:" + components.length);
for (Component component : components) {
if (component instanceof JPanel) {
SetPanelEnabled((JPanel) component, enable);
} else {
component.setEnabled(enable);
}
}
}
public static String IpAddressInputWrong = "IpAddress input wrong";
public static String PortInputWrong = "Port input wrong";
public static String SlotInputWrong = "Slot input wrong";
public static String BaudRateInputWrong = "Baud rate input wrong";
public static String DataBitsInputWrong = "Data bit input wrong";
public static String StopBitInputWrong = "Stop bit input wrong";
}

View File

@@ -0,0 +1,14 @@
package com.ruoyi.common.domain;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@AllArgsConstructor
@NoArgsConstructor
@Data
public class PlcConnectInfo {
private String ip;
private Integer port;
}

View File

@@ -0,0 +1,39 @@
package com.ruoyi.common.domain;
/**
* 发送数据的实体类
* @num 长度
* @num2 值
*/
public class SendData {
private static final int DINT = 4;
private static final int INT = 2;
private int num;
private int num2;
public SendData(int num, int num2) {
this.num = num;
this.num2 = num2;
}
public SendData(int num, String num2) {
this.num = num;
this.num2 = Integer.parseInt(num2);
}
public int getNum() {
return num;
}
public void setNum(int num) {
this.num = num;
}
public int getNum2() {
return num2;
}
public void setNum2(int num2) {
this.num2 = num2;
}
}

View File

@@ -0,0 +1,37 @@
package com.ruoyi.common.domain;
public class SendData2 {
private String address;
private String data ;
private int type;//1单字 2双字 3字符串
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getData() {
return data;
}
public void setData(String data) {
this.data = data;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
}

View File

@@ -0,0 +1,104 @@
package com.ruoyi.device.DeviceCar.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.device.DeviceCar.domain.DeviceCar;
import com.ruoyi.device.DeviceCar.service.IDeviceCarService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 设备信息Controller
*
* @author ruoyi
* @date 2025-06-12
*/
@RestController
@RequestMapping("/device/DeviceCar")
public class DeviceCarController extends BaseController
{
@Autowired
private IDeviceCarService deviceCarService;
/**
* 查询设备信息列表
*/
@PreAuthorize("@ss.hasPermi('device:DeviceCar:list')")
@GetMapping("/list")
public TableDataInfo list(DeviceCar deviceCar)
{
startPage();
List<DeviceCar> list = deviceCarService.selectDeviceCarList(deviceCar);
return getDataTable(list);
}
/**
* 导出设备信息列表
*/
@PreAuthorize("@ss.hasPermi('device:DeviceCar:export')")
@Log(title = "设备信息", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, DeviceCar deviceCar)
{
List<DeviceCar> list = deviceCarService.selectDeviceCarList(deviceCar);
ExcelUtil<DeviceCar> util = new ExcelUtil<DeviceCar>(DeviceCar.class);
util.exportExcel(response, list, "设备信息数据");
}
/**
* 获取设备信息详细信息
*/
@PreAuthorize("@ss.hasPermi('device:DeviceCar:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(deviceCarService.selectDeviceCarById(id));
}
/**
* 新增设备信息
*/
@PreAuthorize("@ss.hasPermi('device:DeviceCar:add')")
@Log(title = "设备信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DeviceCar deviceCar)
{
return toAjax(deviceCarService.insertDeviceCar(deviceCar));
}
/**
* 修改设备信息
*/
@PreAuthorize("@ss.hasPermi('device:DeviceCar:edit')")
@Log(title = "设备信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DeviceCar deviceCar)
{
return toAjax(deviceCarService.updateDeviceCar(deviceCar));
}
/**
* 删除设备信息
*/
@PreAuthorize("@ss.hasPermi('device:DeviceCar:remove')")
@Log(title = "设备信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(deviceCarService.deleteDeviceCarByIds(ids));
}
}

View File

@@ -0,0 +1,233 @@
package com.ruoyi.device.DeviceCar.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 设备信息对象 device_car
*
* @author ruoyi
* @date 2025-06-12
*/
public class DeviceCar extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 设备唯一编码 */
@Excel(name = "设备唯一编码")
private String deviceCode ;
/** 设备名称 */
@Excel(name = "设备名称")
private String name ;
/** 1-AGV 2-CTU*/
@Excel(name = "1-AGV 2-CTU")
private String type;
/** 设备IP */
@Excel(name = "设备IP")
private String ipAddress;
/** 关联缓冲区 */
@Excel(name = "关联缓冲区")
private String bufferAreaId ;
/** 0-F 1-T */
@Excel(name = "0-F 1-T")
private String isActive;
/** 状态 */
@Excel(name = "状态")
private String status;
/** 备用字段 */
@Excel(name = "备用字段")
private String spare1;
/** 备用字段 */
@Excel(name = "备用字段")
private String spare2;
/** 备用字段 */
@Excel(name = "备用字段")
private String spare3;
/** 备用字段 */
@Excel(name = "备用字段")
private String spare4;
/** 任务号 */
@Excel(name = "任务号")
private String taskNo;
/** 执行阶段 */
@Excel(name = "执行阶段")
private String zxjd;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setDeviceCode (String deviceCode )
{
this.deviceCode = deviceCode ;
}
public String getDeviceCode ()
{
return deviceCode ;
}
public void setName (String name )
{
this.name = name ;
}
public String getName ()
{
return name ;
}
public void setType(String type)
{
this.type = type;
}
public String getType()
{
return type;
}
public void setIpAddress(String ipAddress)
{
this.ipAddress = ipAddress;
}
public String getIpAddress()
{
return ipAddress;
}
public void setBufferAreaId (String bufferAreaId )
{
this.bufferAreaId = bufferAreaId ;
}
public String getBufferAreaId ()
{
return bufferAreaId ;
}
public void setIsActive(String isActive)
{
this.isActive = isActive;
}
public String getIsActive()
{
return isActive;
}
public void setStatus(String status)
{
this.status = status;
}
public String getStatus()
{
return status;
}
public void setSpare1(String spare1)
{
this.spare1 = spare1;
}
public String getSpare1()
{
return spare1;
}
public void setSpare2(String spare2)
{
this.spare2 = spare2;
}
public String getSpare2()
{
return spare2;
}
public void setSpare3(String spare3)
{
this.spare3 = spare3;
}
public String getSpare3()
{
return spare3;
}
public void setSpare4(String spare4)
{
this.spare4 = spare4;
}
public String getSpare4()
{
return spare4;
}
public void setTaskNo(String taskNo)
{
this.taskNo = taskNo;
}
public String getTaskNo()
{
return taskNo;
}
public void setZxjd(String zxjd)
{
this.zxjd = zxjd;
}
public String getZxjd()
{
return zxjd;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("deviceCode ", getDeviceCode ())
.append("name ", getName ())
.append("type", getType())
.append("ipAddress", getIpAddress())
.append("bufferAreaId ", getBufferAreaId ())
.append("isActive", getIsActive())
.append("createTime", getCreateTime())
.append("status", getStatus())
.append("spare1", getSpare1())
.append("spare2", getSpare2())
.append("spare3", getSpare3())
.append("spare4", getSpare4())
.append("taskNo", getTaskNo())
.append("zxjd", getZxjd())
.toString();
}
}

View File

@@ -0,0 +1,61 @@
package com.ruoyi.device.DeviceCar.mapper;
import java.util.List;
import com.ruoyi.device.DeviceCar.domain.DeviceCar;
/**
* 设备信息Mapper接口
*
* @author ruoyi
* @date 2025-06-12
*/
public interface DeviceCarMapper
{
/**
* 查询设备信息
*
* @param id 设备信息主键
* @return 设备信息
*/
public DeviceCar selectDeviceCarById(Long id);
/**
* 查询设备信息列表
*
* @param deviceCar 设备信息
* @return 设备信息集合
*/
public List<DeviceCar> selectDeviceCarList(DeviceCar deviceCar);
/**
* 新增设备信息
*
* @param deviceCar 设备信息
* @return 结果
*/
public int insertDeviceCar(DeviceCar deviceCar);
/**
* 修改设备信息
*
* @param deviceCar 设备信息
* @return 结果
*/
public int updateDeviceCar(DeviceCar deviceCar);
/**
* 删除设备信息
*
* @param id 设备信息主键
* @return 结果
*/
public int deleteDeviceCarById(Long id);
/**
* 批量删除设备信息
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteDeviceCarByIds(Long[] ids);
}

View File

@@ -0,0 +1,61 @@
package com.ruoyi.device.DeviceCar.service;
import java.util.List;
import com.ruoyi.device.DeviceCar.domain.DeviceCar;
/**
* 设备信息Service接口
*
* @author ruoyi
* @date 2025-06-12
*/
public interface IDeviceCarService
{
/**
* 查询设备信息
*
* @param id 设备信息主键
* @return 设备信息
*/
public DeviceCar selectDeviceCarById(Long id);
/**
* 查询设备信息列表
*
* @param deviceCar 设备信息
* @return 设备信息集合
*/
public List<DeviceCar> selectDeviceCarList(DeviceCar deviceCar);
/**
* 新增设备信息
*
* @param deviceCar 设备信息
* @return 结果
*/
public int insertDeviceCar(DeviceCar deviceCar);
/**
* 修改设备信息
*
* @param deviceCar 设备信息
* @return 结果
*/
public int updateDeviceCar(DeviceCar deviceCar);
/**
* 批量删除设备信息
*
* @param ids 需要删除的设备信息主键集合
* @return 结果
*/
public int deleteDeviceCarByIds(Long[] ids);
/**
* 删除设备信息信息
*
* @param id 设备信息主键
* @return 结果
*/
public int deleteDeviceCarById(Long id);
}

View File

@@ -0,0 +1,95 @@
package com.ruoyi.device.DeviceCar.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.device.DeviceCar.mapper.DeviceCarMapper;
import com.ruoyi.device.DeviceCar.domain.DeviceCar;
import com.ruoyi.device.DeviceCar.service.IDeviceCarService;
/**
* 设备信息Service业务层处理
*
* @author ruoyi
* @date 2025-06-12
*/
@Service
public class DeviceCarServiceImpl implements IDeviceCarService
{
@Autowired
private DeviceCarMapper deviceCarMapper;
/**
* 查询设备信息
*
* @param id 设备信息主键
* @return 设备信息
*/
@Override
public DeviceCar selectDeviceCarById(Long id)
{
return deviceCarMapper.selectDeviceCarById(id);
}
/**
* 查询设备信息列表
*
* @param deviceCar 设备信息
* @return 设备信息
*/
@Override
public List<DeviceCar> selectDeviceCarList(DeviceCar deviceCar)
{
return deviceCarMapper.selectDeviceCarList(deviceCar);
}
/**
* 新增设备信息
*
* @param deviceCar 设备信息
* @return 结果
*/
@Override
public int insertDeviceCar(DeviceCar deviceCar)
{
deviceCar.setCreateTime(DateUtils.getNowDate());
return deviceCarMapper.insertDeviceCar(deviceCar);
}
/**
* 修改设备信息
*
* @param deviceCar 设备信息
* @return 结果
*/
@Override
public int updateDeviceCar(DeviceCar deviceCar)
{
return deviceCarMapper.updateDeviceCar(deviceCar);
}
/**
* 批量删除设备信息
*
* @param ids 需要删除的设备信息主键
* @return 结果
*/
@Override
public int deleteDeviceCarByIds(Long[] ids)
{
return deviceCarMapper.deleteDeviceCarByIds(ids);
}
/**
* 删除设备信息信息
*
* @param id 设备信息主键
* @return 结果
*/
@Override
public int deleteDeviceCarById(Long id)
{
return deviceCarMapper.deleteDeviceCarById(id);
}
}

View File

@@ -0,0 +1,104 @@
package com.ruoyi.device.cdz.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.device.cdz.domain.DeviceCdz;
import com.ruoyi.device.cdz.service.IDeviceCdzService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 充电桩设备Controller
*
* @author ruoyi
* @date 2025-11-27
*/
@RestController
@RequestMapping("/device/cdz")
public class DeviceCdzController extends BaseController
{
@Autowired
private IDeviceCdzService deviceCdzService;
/**
* 查询充电桩设备列表
*/
@PreAuthorize("@ss.hasPermi('device:cdz:list')")
@GetMapping("/list")
public TableDataInfo list(DeviceCdz deviceCdz)
{
startPage();
List<DeviceCdz> list = deviceCdzService.selectDeviceCdzList(deviceCdz);
return getDataTable(list);
}
/**
* 导出充电桩设备列表
*/
@PreAuthorize("@ss.hasPermi('device:cdz:export')")
@Log(title = "充电桩设备", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, DeviceCdz deviceCdz)
{
List<DeviceCdz> list = deviceCdzService.selectDeviceCdzList(deviceCdz);
ExcelUtil<DeviceCdz> util = new ExcelUtil<DeviceCdz>(DeviceCdz.class);
util.exportExcel(response, list, "充电桩设备数据");
}
/**
* 获取充电桩设备详细信息
*/
@PreAuthorize("@ss.hasPermi('device:cdz:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(deviceCdzService.selectDeviceCdzById(id));
}
/**
* 新增充电桩设备
*/
@PreAuthorize("@ss.hasPermi('device:cdz:add')")
@Log(title = "充电桩设备", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DeviceCdz deviceCdz)
{
return toAjax(deviceCdzService.insertDeviceCdz(deviceCdz));
}
/**
* 修改充电桩设备
*/
@PreAuthorize("@ss.hasPermi('device:cdz:edit')")
@Log(title = "充电桩设备", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DeviceCdz deviceCdz)
{
return toAjax(deviceCdzService.updateDeviceCdz(deviceCdz));
}
/**
* 删除充电桩设备
*/
@PreAuthorize("@ss.hasPermi('device:cdz:remove')")
@Log(title = "充电桩设备", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(deviceCdzService.deleteDeviceCdzByIds(ids));
}
}

View File

@@ -0,0 +1,84 @@
package com.ruoyi.device.cdz.domain;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 充电桩设备对象 device_cdz
*
* @author ruoyi
* @date 2025-11-27
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class DeviceCdz extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** id */
private Integer id;
/** 设备名称 */
@Excel(name = "设备名称")
private String name;
/** ip */
@Excel(name = "ip")
private String ip;
/** 端口 */
@Excel(name = "端口")
private String port;
/** plc读取地址 */
@Excel(name = "plc读取地址")
private String plcDbReadAddress;
/** plc写入地址 */
@Excel(name = "plc写入地址")
private String plcDbWriteAddress;
/** 任务号 */
@Excel(name = "任务号")
private Integer rwh;
/** 充电桩状态 */
@Excel(name = "充电桩状态")
private Integer status;
/** 心跳信号 */
@Excel(name = "心跳信号")
private Integer xtxh;
/** 层数 */
@Excel(name = "层数")
private Integer szcs;
/** 充电模式 */
@Excel(name = "充电模式")
private Integer model;
/** 站点 */
@Excel(name = "站点")
private String siteId;
/** 备用1 */
@Excel(name = "备用1")
private String spare1;
/** 备用2 */
@Excel(name = "备用2")
private String spare2;
/** 备用3 */
@Excel(name = "备用3")
private String spare3;
}

View File

@@ -0,0 +1,71 @@
package com.ruoyi.device.cdz.mapper;
import java.util.List;
import com.ruoyi.device.cdz.domain.DeviceCdz;
/**
* 充电桩设备Mapper接口
*
* @author ruoyi
* @date 2025-11-27
*/
public interface DeviceCdzMapper
{
/**
* 查询充电桩设备
*
* @param id 充电桩设备主键
* @return 充电桩设备
*/
public DeviceCdz selectDeviceCdzById(Long id);
/**
* 查询充电桩设备列表
*
* @param deviceCdz 充电桩设备
* @return 充电桩设备集合
*/
public List<DeviceCdz> selectDeviceCdzList(DeviceCdz deviceCdz);
/**
* 新增充电桩设备
*
* @param deviceCdz 充电桩设备
* @return 结果
*/
public int insertDeviceCdz(DeviceCdz deviceCdz);
/**
* 修改充电桩设备
*
* @param deviceCdz 充电桩设备
* @return 结果
*/
public int updateDeviceCdz(DeviceCdz deviceCdz);
/**
* 删除充电桩设备
*
* @param id 充电桩设备主键
* @return 结果
*/
public int deleteDeviceCdzById(Long id);
/**
* 批量删除充电桩设备
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteDeviceCdzByIds(Long[] ids);
/**
* 查询没有SRGV的充电桩设备
* @return
*/
List<DeviceCdz> selectDeviceCdzListNoSRgvId();
/**
* 获取有SRGV的充电桩设备
* @return
*/
List<DeviceCdz> selectDeviceCdzHasSRgvList();
}

View File

@@ -0,0 +1,71 @@
package com.ruoyi.device.cdz.service;
import java.util.List;
import com.ruoyi.device.cdz.domain.DeviceCdz;
/**
* 充电桩设备Service接口
*
* @author ruoyi
* @date 2025-11-27
*/
public interface IDeviceCdzService
{
/**
* 查询充电桩设备
*
* @param id 充电桩设备主键
* @return 充电桩设备
*/
public DeviceCdz selectDeviceCdzById(Long id);
/**
* 查询充电桩设备列表
*
* @param deviceCdz 充电桩设备
* @return 充电桩设备集合
*/
public List<DeviceCdz> selectDeviceCdzList(DeviceCdz deviceCdz);
/**
* 新增充电桩设备
*
* @param deviceCdz 充电桩设备
* @return 结果
*/
public int insertDeviceCdz(DeviceCdz deviceCdz);
/**
* 修改充电桩设备
*
* @param deviceCdz 充电桩设备
* @return 结果
*/
public int updateDeviceCdz(DeviceCdz deviceCdz);
/**
* 批量删除充电桩设备
*
* @param ids 需要删除的充电桩设备主键集合
* @return 结果
*/
public int deleteDeviceCdzByIds(Long[] ids);
/**
* 删除充电桩设备信息
*
* @param id 充电桩设备主键
* @return 结果
*/
public int deleteDeviceCdzById(Long id);
/**
* 查询没有SRgvId的充电桩设备列表
* @return
*/
List<DeviceCdz> selectDeviceCdzListNoSRgvId();
/**
* 查询有SRgvId的充电桩设备列表
* @return
*/
List<DeviceCdz> selectDeviceCdzHasSRgvList();
}

View File

@@ -0,0 +1,103 @@
package com.ruoyi.device.cdz.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.device.cdz.mapper.DeviceCdzMapper;
import com.ruoyi.device.cdz.domain.DeviceCdz;
import com.ruoyi.device.cdz.service.IDeviceCdzService;
/**
* 充电桩设备Service业务层处理
*
* @author ruoyi
* @date 2025-11-27
*/
@Service
public class DeviceCdzServiceImpl implements IDeviceCdzService
{
@Autowired
private DeviceCdzMapper deviceCdzMapper;
/**
* 查询充电桩设备
*
* @param id 充电桩设备主键
* @return 充电桩设备
*/
@Override
public DeviceCdz selectDeviceCdzById(Long id)
{
return deviceCdzMapper.selectDeviceCdzById(id);
}
/**
* 查询充电桩设备列表
*
* @param deviceCdz 充电桩设备
* @return 充电桩设备
*/
@Override
public List<DeviceCdz> selectDeviceCdzList(DeviceCdz deviceCdz)
{
return deviceCdzMapper.selectDeviceCdzList(deviceCdz);
}
/**
* 新增充电桩设备
*
* @param deviceCdz 充电桩设备
* @return 结果
*/
@Override
public int insertDeviceCdz(DeviceCdz deviceCdz)
{
return deviceCdzMapper.insertDeviceCdz(deviceCdz);
}
/**
* 修改充电桩设备
*
* @param deviceCdz 充电桩设备
* @return 结果
*/
@Override
public int updateDeviceCdz(DeviceCdz deviceCdz)
{
return deviceCdzMapper.updateDeviceCdz(deviceCdz);
}
/**
* 批量删除充电桩设备
*
* @param ids 需要删除的充电桩设备主键
* @return 结果
*/
@Override
public int deleteDeviceCdzByIds(Long[] ids)
{
return deviceCdzMapper.deleteDeviceCdzByIds(ids);
}
/**
* 删除充电桩设备信息
*
* @param id 充电桩设备主键
* @return 结果
*/
@Override
public int deleteDeviceCdzById(Long id)
{
return deviceCdzMapper.deleteDeviceCdzById(id);
}
@Override
public List<DeviceCdz> selectDeviceCdzListNoSRgvId() {
return deviceCdzMapper.selectDeviceCdzListNoSRgvId();
}
@Override
public List<DeviceCdz> selectDeviceCdzHasSRgvList() {
return deviceCdzMapper.selectDeviceCdzHasSRgvList();
}
}

View File

@@ -0,0 +1,104 @@
package com.ruoyi.device.ddj.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.device.ddj.domain.MsgDdj;
import com.ruoyi.device.ddj.service.IMsgDdjService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 堆垛机状态表Controller
*
* @author ruoyi
* @date 2025-09-22
*/
@RestController
@RequestMapping("/device/ddj")
public class MsgDdjController extends BaseController
{
@Autowired
private IMsgDdjService msgDdjService;
/**
* 查询堆垛机状态表列表
*/
@PreAuthorize("@ss.hasPermi('device:ddj:list')")
@GetMapping("/list")
public TableDataInfo list(MsgDdj msgDdj)
{
startPage();
List<MsgDdj> list = msgDdjService.selectMsgDdjList(msgDdj);
return getDataTable(list);
}
/**
* 导出堆垛机状态表列表
*/
@PreAuthorize("@ss.hasPermi('device:ddj:export')")
@Log(title = "堆垛机状态表", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, MsgDdj msgDdj)
{
List<MsgDdj> list = msgDdjService.selectMsgDdjList(msgDdj);
ExcelUtil<MsgDdj> util = new ExcelUtil<MsgDdj>(MsgDdj.class);
util.exportExcel(response, list, "堆垛机状态表数据");
}
/**
* 获取堆垛机状态表详细信息
*/
@PreAuthorize("@ss.hasPermi('device:ddj:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(msgDdjService.selectMsgDdjById(id));
}
/**
* 新增堆垛机状态表
*/
@PreAuthorize("@ss.hasPermi('device:ddj:add')")
@Log(title = "堆垛机状态表", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody MsgDdj msgDdj)
{
return toAjax(msgDdjService.insertMsgDdj(msgDdj));
}
/**
* 修改堆垛机状态表
*/
@PreAuthorize("@ss.hasPermi('device:ddj:edit')")
@Log(title = "堆垛机状态表", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody MsgDdj msgDdj)
{
return toAjax(msgDdjService.updateMsgDdj(msgDdj));
}
/**
* 删除堆垛机状态表
*/
@PreAuthorize("@ss.hasPermi('device:ddj:remove')")
@Log(title = "堆垛机状态表", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(msgDdjService.deleteMsgDdjByIds(ids));
}
}

View File

@@ -0,0 +1,111 @@
package com.ruoyi.device.ddj.domain;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 堆垛机状态表对象 msg_ddj
*
* @author ruoyi
* @date 2025-09-22
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class MsgDdj extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** id */
private Integer id;
/** 堆垛机名称 */
@Excel(name = "堆垛机名称")
private String name;
/** 任务号 */
@Excel(name = "任务号")
private Long rwh;
/** 阶段标志 */
@Excel(name = "阶段标志")
private Integer jdbz;
/** 状态 */
@Excel(name = "状态")
private Integer sbzt;
/** 操作方式 */
@Excel(name = "操作方式")
private Integer czfs;
/** 允许下发 */
@Excel(name = "允许下发")
private Integer yxxf;
/** 原排 */
@Excel(name = "原排")
private Integer yph;
/** 原列 */
@Excel(name = "原列")
private Integer ylh;
/** 原层 */
@Excel(name = "原层")
private Integer ych;
/** 目标排 */
@Excel(name = "目标排")
private Integer mbph;
/** 目标列 */
@Excel(name = "目标列")
private Integer mblh;
/** 目标层 */
@Excel(name = "目标层")
private Integer mbch;
/** 心跳信号 */
@Excel(name = "心跳信号")
private Integer xtxh;
/** 当前巷道 */
@Excel(name = "当前巷道")
private Integer dqxd;
/** 货叉状态 */
@Excel(name = "货叉状态")
private Integer hczt;
/** 备用字段1 */
@Excel(name = "备用字段1")
private Integer spare1;
/** 备用字段2 */
@Excel(name = "备用字段2")
private Integer spare2;
/** 备用字段3 */
@Excel(name = "备用字段3")
private Integer spare3;
private String trayCode;
private String plcDbReadAddress;
private String ip;
private String port;
}

View File

@@ -0,0 +1,63 @@
package com.ruoyi.device.ddj.mapper;
import java.util.List;
import com.ruoyi.device.ddj.domain.MsgDdj;
/**
* 堆垛机状态表Mapper接口
*
* @author ruoyi
* @date 2025-09-22
*/
public interface MsgDdjMapper
{
/**
* 查询堆垛机状态表
*
* @param id 堆垛机状态表主键
* @return 堆垛机状态表
*/
public MsgDdj selectMsgDdjById(Long id);
/**
* 查询堆垛机状态表列表
*
* @param msgDdj 堆垛机状态表
* @return 堆垛机状态表集合
*/
public List<MsgDdj> selectMsgDdjList(MsgDdj msgDdj);
/**
* 新增堆垛机状态表
*
* @param msgDdj 堆垛机状态表
* @return 结果
*/
public int insertMsgDdj(MsgDdj msgDdj);
/**
* 修改堆垛机状态表
*
* @param msgDdj 堆垛机状态表
* @return 结果
*/
public int updateMsgDdj(MsgDdj msgDdj);
/**
* 删除堆垛机状态表
*
* @param id 堆垛机状态表主键
* @return 结果
*/
public int deleteMsgDdjById(Long id);
/**
* 批量删除堆垛机状态表
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteMsgDdjByIds(Long[] ids);
MsgDdj selectSendData(Integer id);
}

View File

@@ -0,0 +1,61 @@
package com.ruoyi.device.ddj.service;
import java.util.List;
import com.ruoyi.device.ddj.domain.MsgDdj;
/**
* 堆垛机状态表Service接口
*
* @author ruoyi
* @date 2025-09-22
*/
public interface IMsgDdjService
{
/**
* 查询堆垛机状态表
*
* @param id 堆垛机状态表主键
* @return 堆垛机状态表
*/
public MsgDdj selectMsgDdjById(Long id);
/**
* 查询堆垛机状态表列表
*
* @param msgDdj 堆垛机状态表
* @return 堆垛机状态表集合
*/
public List<MsgDdj> selectMsgDdjList(MsgDdj msgDdj);
/**
* 新增堆垛机状态表
*
* @param msgDdj 堆垛机状态表
* @return 结果
*/
public int insertMsgDdj(MsgDdj msgDdj);
/**
* 修改堆垛机状态表
*
* @param msgDdj 堆垛机状态表
* @return 结果
*/
public int updateMsgDdj(MsgDdj msgDdj);
/**
* 批量删除堆垛机状态表
*
* @param ids 需要删除的堆垛机状态表主键集合
* @return 结果
*/
public int deleteMsgDdjByIds(Long[] ids);
/**
* 删除堆垛机状态表信息
*
* @param id 堆垛机状态表主键
* @return 结果
*/
public int deleteMsgDdjById(Long id);
}

View File

@@ -0,0 +1,93 @@
package com.ruoyi.device.ddj.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.device.ddj.mapper.MsgDdjMapper;
import com.ruoyi.device.ddj.domain.MsgDdj;
import com.ruoyi.device.ddj.service.IMsgDdjService;
/**
* 堆垛机状态表Service业务层处理
*
* @author ruoyi
* @date 2025-09-22
*/
@Service
public class MsgDdjServiceImpl implements IMsgDdjService
{
@Autowired
private MsgDdjMapper msgDdjMapper;
/**
* 查询堆垛机状态表
*
* @param id 堆垛机状态表主键
* @return 堆垛机状态表
*/
@Override
public MsgDdj selectMsgDdjById(Long id)
{
return msgDdjMapper.selectMsgDdjById(id);
}
/**
* 查询堆垛机状态表列表
*
* @param msgDdj 堆垛机状态表
* @return 堆垛机状态表
*/
@Override
public List<MsgDdj> selectMsgDdjList(MsgDdj msgDdj)
{
return msgDdjMapper.selectMsgDdjList(msgDdj);
}
/**
* 新增堆垛机状态表
*
* @param msgDdj 堆垛机状态表
* @return 结果
*/
@Override
public int insertMsgDdj(MsgDdj msgDdj)
{
return msgDdjMapper.insertMsgDdj(msgDdj);
}
/**
* 修改堆垛机状态表
*
* @param msgDdj 堆垛机状态表
* @return 结果
*/
@Override
public int updateMsgDdj(MsgDdj msgDdj)
{
return msgDdjMapper.updateMsgDdj(msgDdj);
}
/**
* 批量删除堆垛机状态表
*
* @param ids 需要删除的堆垛机状态表主键
* @return 结果
*/
@Override
public int deleteMsgDdjByIds(Long[] ids)
{
return msgDdjMapper.deleteMsgDdjByIds(ids);
}
/**
* 删除堆垛机状态表信息
*
* @param id 堆垛机状态表主键
* @return 结果
*/
@Override
public int deleteMsgDdjById(Long id)
{
return msgDdjMapper.deleteMsgDdjById(id);
}
}

View File

@@ -0,0 +1,104 @@
package com.ruoyi.device.srgv.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.device.srgv.domain.DeviceSrgv;
import com.ruoyi.device.srgv.service.IDeviceSrgvService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 四向小车设备表Controller
*
* @author ruoyi
* @date 2025-11-21
*/
@RestController
@RequestMapping("/device/srgv")
public class DeviceSrgvController extends BaseController
{
@Autowired
private IDeviceSrgvService deviceSrgvService;
/**
* 查询四向小车设备表列表
*/
@PreAuthorize("@ss.hasPermi('device:srgv:list')")
@GetMapping("/list")
public TableDataInfo list(DeviceSrgv deviceSrgv)
{
startPage();
List<DeviceSrgv> list = deviceSrgvService.selectDeviceSrgvList(deviceSrgv);
return getDataTable(list);
}
/**
* 导出四向小车设备表列表
*/
@PreAuthorize("@ss.hasPermi('device:srgv:export')")
@Log(title = "四向小车设备表", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, DeviceSrgv deviceSrgv)
{
List<DeviceSrgv> list = deviceSrgvService.selectDeviceSrgvList(deviceSrgv);
ExcelUtil<DeviceSrgv> util = new ExcelUtil<DeviceSrgv>(DeviceSrgv.class);
util.exportExcel(response, list, "四向小车设备表数据");
}
/**
* 获取四向小车设备表详细信息
*/
@PreAuthorize("@ss.hasPermi('device:srgv:query')")
@GetMapping(value = "/{guid}")
public AjaxResult getInfo(@PathVariable("guid") String guid)
{
return success(deviceSrgvService.selectDeviceSrgvByGuid(guid));
}
/**
* 新增四向小车设备表
*/
@PreAuthorize("@ss.hasPermi('device:srgv:add')")
@Log(title = "四向小车设备表", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DeviceSrgv deviceSrgv)
{
return toAjax(deviceSrgvService.insertDeviceSrgv(deviceSrgv));
}
/**
* 修改四向小车设备表
*/
@PreAuthorize("@ss.hasPermi('device:srgv:edit')")
@Log(title = "四向小车设备表", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DeviceSrgv deviceSrgv)
{
return toAjax(deviceSrgvService.updateDeviceSrgv(deviceSrgv));
}
/**
* 删除四向小车设备表
*/
@PreAuthorize("@ss.hasPermi('device:srgv:remove')")
@Log(title = "四向小车设备表", businessType = BusinessType.DELETE)
@DeleteMapping("/{guids}")
public AjaxResult remove(@PathVariable String[] guids)
{
return toAjax(deviceSrgvService.deleteDeviceSrgvByGuids(guids));
}
}

View File

@@ -0,0 +1,174 @@
package com.ruoyi.device.srgv.domain;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 四向小车设备表对象 device_srgv
*
* @author ruoyi
* @date 2025-11-21
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class DeviceSrgv extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 唯一id */
private String guid;
/** 设备id */
@Excel(name = "设备id")
private Integer deviceId;
/** 设备名称 */
@Excel(name = "设备名称")
private String deviceName;
/** ip */
@Excel(name = "ip")
private String ip;
/** 端口 */
@Excel(name = "端口")
private Integer port;
/** 类型 */
@Excel(name = "类型")
private String type;
/** 设置层 */
@Excel(name = "设置层")
private Integer setFloor;
/** 上次充电时间 */
@Excel(name = "上次充电时间")
private String powerTime;
/** 最后任务时间 */
@Excel(name = "最后任务时间")
private String lastTime;
/** 0 初始化 1正常 */
@Excel(name = "0 初始化 1正常")
private String agvStatus;
/** 任务号 */
@Excel(name = "任务号")
private Integer taskNo;
/** 原位置 */
@Excel(name = "原位置")
private String srcSite;
/** 目标位置 */
@Excel(name = "目标位置")
private String tarSite;
/** 当前位置 */
@Excel(name = "当前位置")
private String currSite;
/** 任务类型 */
@Excel(name = "任务类型")
private Integer taskType;
/** 电量 */
@Excel(name = "电量")
private Integer battery;
/** 工作模式 */
@Excel(name = "工作模式")
private Integer workMode;
/** 报警 */
@Excel(name = "报警")
private Integer alarm;
/** 车状态 */
@Excel(name = "车状态")
private Integer status;
/** 完成下发标志 */
@Excel(name = "完成下发标志")
private Integer finish;
/** 充电标志 */
@Excel(name = "充电标志")
private Integer chargeFlag;
/** 执行阶段 */
@Excel(name = "执行阶段")
private Integer workPhase;
/** 异常信息 */
@Excel(name = "异常信息")
private Integer errMsg;
/** 输送机请求 */
@Excel(name = "输送机请求")
private Integer ssjRequest;
/** 换层标志 */
@Excel(name = "换层标志")
private Integer changeLayer;
/** 载货标志 */
@Excel(name = "载货标志")
private Integer cargoFlag;
/** 手动充电 */
@Excel(name = "手动充电")
private Integer manualCharge;
/** 路径 */
@Excel(name = "路径")
private String path;
/** 允许下发 */
@Excel(name = "允许下发")
private Integer allowSend;
/** 当前层数 */
@Excel(name = "当前层数")
private Integer currFloor;
/** 离线站点 */
@Excel(name = "离线站点")
private String offlineSite;
/** 车辆锁 */
@Excel(name = "车辆锁")
private Integer locked;
/** */
@Excel(name = "")
private String spare1;
/** */
@Excel(name = "请求进入提升机 0-否 1-是")
private String spare2;
/** */
@Excel(name = "")
private String spare3;
/** */
@Excel(name = "")
private String spare4;
/** */
@Excel(name = "")
private String spare5;
}

View File

@@ -0,0 +1,61 @@
package com.ruoyi.device.srgv.mapper;
import java.util.List;
import com.ruoyi.device.srgv.domain.DeviceSrgv;
/**
* 四向小车设备表Mapper接口
*
* @author ruoyi
* @date 2025-11-21
*/
public interface DeviceSrgvMapper
{
/**
* 查询四向小车设备表
*
* @param guid 四向小车设备表主键
* @return 四向小车设备表
*/
public DeviceSrgv selectDeviceSrgvByGuid(String guid);
/**
* 查询四向小车设备表列表
*
* @param deviceSrgv 四向小车设备表
* @return 四向小车设备表集合
*/
public List<DeviceSrgv> selectDeviceSrgvList(DeviceSrgv deviceSrgv);
/**
* 新增四向小车设备表
*
* @param deviceSrgv 四向小车设备表
* @return 结果
*/
public int insertDeviceSrgv(DeviceSrgv deviceSrgv);
/**
* 修改四向小车设备表
*
* @param deviceSrgv 四向小车设备表
* @return 结果
*/
public int updateDeviceSrgv(DeviceSrgv deviceSrgv);
/**
* 删除四向小车设备表
*
* @param guid 四向小车设备表主键
* @return 结果
*/
public int deleteDeviceSrgvByGuid(String guid);
/**
* 批量删除四向小车设备表
*
* @param guids 需要删除的数据主键集合
* @return 结果
*/
public int deleteDeviceSrgvByGuids(String[] guids);
}

View File

@@ -0,0 +1,61 @@
package com.ruoyi.device.srgv.service;
import java.util.List;
import com.ruoyi.device.srgv.domain.DeviceSrgv;
/**
* 四向小车设备表Service接口
*
* @author ruoyi
* @date 2025-11-21
*/
public interface IDeviceSrgvService
{
/**
* 查询四向小车设备表
*
* @param guid 四向小车设备表主键
* @return 四向小车设备表
*/
public DeviceSrgv selectDeviceSrgvByGuid(String guid);
/**
* 查询四向小车设备表列表
*
* @param deviceSrgv 四向小车设备表
* @return 四向小车设备表集合
*/
public List<DeviceSrgv> selectDeviceSrgvList(DeviceSrgv deviceSrgv);
/**
* 新增四向小车设备表
*
* @param deviceSrgv 四向小车设备表
* @return 结果
*/
public int insertDeviceSrgv(DeviceSrgv deviceSrgv);
/**
* 修改四向小车设备表
*
* @param deviceSrgv 四向小车设备表
* @return 结果
*/
public int updateDeviceSrgv(DeviceSrgv deviceSrgv);
/**
* 批量删除四向小车设备表
*
* @param guids 需要删除的四向小车设备表主键集合
* @return 结果
*/
public int deleteDeviceSrgvByGuids(String[] guids);
/**
* 删除四向小车设备表信息
*
* @param guid 四向小车设备表主键
* @return 结果
*/
public int deleteDeviceSrgvByGuid(String guid);
}

View File

@@ -0,0 +1,93 @@
package com.ruoyi.device.srgv.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.device.srgv.mapper.DeviceSrgvMapper;
import com.ruoyi.device.srgv.domain.DeviceSrgv;
import com.ruoyi.device.srgv.service.IDeviceSrgvService;
/**
* 四向小车设备表Service业务层处理
*
* @author ruoyi
* @date 2025-11-21
*/
@Service
public class DeviceSrgvServiceImpl implements IDeviceSrgvService
{
@Autowired
private DeviceSrgvMapper deviceSrgvMapper;
/**
* 查询四向小车设备表
*
* @param guid 四向小车设备表主键
* @return 四向小车设备表
*/
@Override
public DeviceSrgv selectDeviceSrgvByGuid(String guid)
{
return deviceSrgvMapper.selectDeviceSrgvByGuid(guid);
}
/**
* 查询四向小车设备表列表
*
* @param deviceSrgv 四向小车设备表
* @return 四向小车设备表
*/
@Override
public List<DeviceSrgv> selectDeviceSrgvList(DeviceSrgv deviceSrgv)
{
return deviceSrgvMapper.selectDeviceSrgvList(deviceSrgv);
}
/**
* 新增四向小车设备表
*
* @param deviceSrgv 四向小车设备表
* @return 结果
*/
@Override
public int insertDeviceSrgv(DeviceSrgv deviceSrgv)
{
return deviceSrgvMapper.insertDeviceSrgv(deviceSrgv);
}
/**
* 修改四向小车设备表
*
* @param deviceSrgv 四向小车设备表
* @return 结果
*/
@Override
public int updateDeviceSrgv(DeviceSrgv deviceSrgv)
{
return deviceSrgvMapper.updateDeviceSrgv(deviceSrgv);
}
/**
* 批量删除四向小车设备表
*
* @param guids 需要删除的四向小车设备表主键
* @return 结果
*/
@Override
public int deleteDeviceSrgvByGuids(String[] guids)
{
return deviceSrgvMapper.deleteDeviceSrgvByGuids(guids);
}
/**
* 删除四向小车设备表信息
*
* @param guid 四向小车设备表主键
* @return 结果
*/
@Override
public int deleteDeviceSrgvByGuid(String guid)
{
return deviceSrgvMapper.deleteDeviceSrgvByGuid(guid);
}
}

View File

@@ -0,0 +1,104 @@
package com.ruoyi.device.ssj.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.device.ssj.domain.DeviceSsj;
import com.ruoyi.device.ssj.service.IDeviceSsjService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 输送机Controller
*
* @author ruoyi
* @date 2025-07-04
*/
@RestController
@RequestMapping("/device/ssj")
public class DeviceSsjController extends BaseController
{
@Autowired
private IDeviceSsjService deviceSsjService;
/**
* 查询输送机列表
*/
@PreAuthorize("@ss.hasPermi('device:ssj:list')")
@GetMapping("/list")
public TableDataInfo list(DeviceSsj deviceSsj)
{
startPage();
List<DeviceSsj> list = deviceSsjService.selectDeviceSsjList(deviceSsj);
return getDataTable(list);
}
/**
* 导出输送机列表
*/
@PreAuthorize("@ss.hasPermi('device:ssj:export')")
@Log(title = "输送机", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, DeviceSsj deviceSsj)
{
List<DeviceSsj> list = deviceSsjService.selectDeviceSsjList(deviceSsj);
ExcelUtil<DeviceSsj> util = new ExcelUtil<DeviceSsj>(DeviceSsj.class);
util.exportExcel(response, list, "输送机数据");
}
/**
* 获取输送机详细信息
*/
@PreAuthorize("@ss.hasPermi('device:ssj:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(deviceSsjService.selectDeviceSsjById(id));
}
/**
* 新增输送机
*/
@PreAuthorize("@ss.hasPermi('device:ssj:add')")
@Log(title = "输送机", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DeviceSsj deviceSsj)
{
return toAjax(deviceSsjService.insertDeviceSsj(deviceSsj));
}
/**
* 修改输送机
*/
@PreAuthorize("@ss.hasPermi('device:ssj:edit')")
@Log(title = "输送机", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DeviceSsj deviceSsj)
{
return toAjax(deviceSsjService.updateDeviceSsj(deviceSsj));
}
/**
* 删除输送机
*/
@PreAuthorize("@ss.hasPermi('device:ssj:remove')")
@Log(title = "输送机", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(deviceSsjService.deleteDeviceSsjByIds(ids));
}
}

View File

@@ -0,0 +1,89 @@
package com.ruoyi.device.ssj.domain;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 输送机对象 device_ssj
*
* @author ruoyi
* @date 2025-07-04
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class DeviceSsj extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 设备唯一编码 */
@Excel(name = "设备唯一编码")
private String deviceCode ;
/** 设备名称 */
@Excel(name = "设备名称")
private String name ;
/** 类型 */
@Excel(name = "类型")
private String type;
/** 设备IP */
@Excel(name = "设备IP")
private String ipAddress;
/** PLC读取地址 */
@Excel(name = "PLC读取地址")
private String plcDbReadAddress;
/** 0-F 1-T */
@Excel(name = "0-F 1-T")
private String isActive;
/** PLC写入地址 */
@Excel(name = "PLC写入地址")
private String plcDbWriteAddress;
/** 入库请求 */
@Excel(name = "入库请求")
private int rkqq;
/** 空闲 */
@Excel(name = "空闲")
private int kx;
/** 到位 */
@Excel(name = "到位")
private int dw;
/** 条码 */
@Excel(name = "条码")
private String trayCode;
/** 任务号 */
@Excel(name = "任务号")
private int taskNo;
@Excel(name = "异常")
private int exception;
@Excel(name = "托盘尺寸")
private int traySize;
@Excel(name="允许放货")
private int allowPut;
@Excel(name="输送线模式 1-入库 2-出库")
private int model;
}

View File

@@ -0,0 +1,63 @@
package com.ruoyi.device.ssj.mapper;
import java.util.List;
import com.ruoyi.device.ssj.domain.DeviceSsj;
/**
* 输送机Mapper接口
*
* @author ruoyi
* @date 2025-07-04
*/
public interface DeviceSsjMapper
{
/**
* 查询输送机
*
* @param id 输送机主键
* @return 输送机
*/
public DeviceSsj selectDeviceSsjById(Long id);
/**
* 查询输送机列表
*
* @param deviceSsj 输送机
* @return 输送机集合
*/
public List<DeviceSsj> selectDeviceSsjList(DeviceSsj deviceSsj);
/**
* 新增输送机
*
* @param deviceSsj 输送机
* @return 结果
*/
public int insertDeviceSsj(DeviceSsj deviceSsj);
/**
* 修改输送机
*
* @param deviceSsj 输送机
* @return 结果
*/
public int updateDeviceSsj(DeviceSsj deviceSsj);
/**
* 删除输送机
*
* @param id 输送机主键
* @return 结果
*/
public int deleteDeviceSsjById(Long id);
/**
* 批量删除输送机
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public int deleteDeviceSsjByIds(Long[] ids);
DeviceSsj selectSendData(Integer id);
}

View File

@@ -0,0 +1,61 @@
package com.ruoyi.device.ssj.service;
import java.util.List;
import com.ruoyi.device.ssj.domain.DeviceSsj;
/**
* 输送机Service接口
*
* @author ruoyi
* @date 2025-07-04
*/
public interface IDeviceSsjService
{
/**
* 查询输送机
*
* @param id 输送机主键
* @return 输送机
*/
public DeviceSsj selectDeviceSsjById(Long id);
/**
* 查询输送机列表
*
* @param deviceSsj 输送机
* @return 输送机集合
*/
public List<DeviceSsj> selectDeviceSsjList(DeviceSsj deviceSsj);
/**
* 新增输送机
*
* @param deviceSsj 输送机
* @return 结果
*/
public int insertDeviceSsj(DeviceSsj deviceSsj);
/**
* 修改输送机
*
* @param deviceSsj 输送机
* @return 结果
*/
public int updateDeviceSsj(DeviceSsj deviceSsj);
/**
* 批量删除输送机
*
* @param ids 需要删除的输送机主键集合
* @return 结果
*/
public int deleteDeviceSsjByIds(Long[] ids);
/**
* 删除输送机信息
*
* @param id 输送机主键
* @return 结果
*/
public int deleteDeviceSsjById(Long id);
}

View File

@@ -0,0 +1,95 @@
package com.ruoyi.device.ssj.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.device.ssj.mapper.DeviceSsjMapper;
import com.ruoyi.device.ssj.domain.DeviceSsj;
import com.ruoyi.device.ssj.service.IDeviceSsjService;
/**
* 输送机Service业务层处理
*
* @author ruoyi
* @date 2025-07-04
*/
@Service
public class DeviceSsjServiceImpl implements IDeviceSsjService
{
@Autowired
private DeviceSsjMapper deviceSsjMapper;
/**
* 查询输送机
*
* @param id 输送机主键
* @return 输送机
*/
@Override
public DeviceSsj selectDeviceSsjById(Long id)
{
return deviceSsjMapper.selectDeviceSsjById(id);
}
/**
* 查询输送机列表
*
* @param deviceSsj 输送机
* @return 输送机
*/
@Override
public List<DeviceSsj> selectDeviceSsjList(DeviceSsj deviceSsj)
{
return deviceSsjMapper.selectDeviceSsjList(deviceSsj);
}
/**
* 新增输送机
*
* @param deviceSsj 输送机
* @return 结果
*/
@Override
public int insertDeviceSsj(DeviceSsj deviceSsj)
{
deviceSsj.setCreateTime(DateUtils.getNowDate());
return deviceSsjMapper.insertDeviceSsj(deviceSsj);
}
/**
* 修改输送机
*
* @param deviceSsj 输送机
* @return 结果
*/
@Override
public int updateDeviceSsj(DeviceSsj deviceSsj)
{
return deviceSsjMapper.updateDeviceSsj(deviceSsj);
}
/**
* 批量删除输送机
*
* @param ids 需要删除的输送机主键
* @return 结果
*/
@Override
public int deleteDeviceSsjByIds(Long[] ids)
{
return deviceSsjMapper.deleteDeviceSsjByIds(ids);
}
/**
* 删除输送机信息
*
* @param id 输送机主键
* @return 结果
*/
@Override
public int deleteDeviceSsjById(Long id)
{
return deviceSsjMapper.deleteDeviceSsjById(id);
}
}

View File

@@ -0,0 +1,104 @@
package com.ruoyi.device.tsj.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.device.tsj.domain.DeviceTsj;
import com.ruoyi.device.tsj.service.IDeviceTsjService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 提升机设备Controller
*
* @author ruoyi
* @date 2025-11-19
*/
@RestController
@RequestMapping("/device/tsj")
public class DeviceTsjController extends BaseController
{
@Autowired
private IDeviceTsjService deviceTsjService;
/**
* 查询提升机设备列表
*/
@PreAuthorize("@ss.hasPermi('device:tsj:list')")
@GetMapping("/list")
public TableDataInfo list(DeviceTsj deviceTsj)
{
startPage();
List<DeviceTsj> list = deviceTsjService.selectDeviceTsjList(deviceTsj);
return getDataTable(list);
}
/**
* 导出提升机设备列表
*/
@PreAuthorize("@ss.hasPermi('device:tsj:export')")
@Log(title = "提升机设备", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, DeviceTsj deviceTsj)
{
List<DeviceTsj> list = deviceTsjService.selectDeviceTsjList(deviceTsj);
ExcelUtil<DeviceTsj> util = new ExcelUtil<DeviceTsj>(DeviceTsj.class);
util.exportExcel(response, list, "提升机设备数据");
}
/**
* 获取提升机设备详细信息
*/
@PreAuthorize("@ss.hasPermi('device:tsj:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return success(deviceTsjService.selectDeviceTsjById(id));
}
/**
* 新增提升机设备
*/
@PreAuthorize("@ss.hasPermi('device:tsj:add')")
@Log(title = "提升机设备", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DeviceTsj deviceTsj)
{
return toAjax(deviceTsjService.insertDeviceTsj(deviceTsj));
}
/**
* 修改提升机设备
*/
@PreAuthorize("@ss.hasPermi('device:tsj:edit')")
@Log(title = "提升机设备", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DeviceTsj deviceTsj)
{
return toAjax(deviceTsjService.updateDeviceTsj(deviceTsj));
}
/**
* 删除提升机设备
*/
@PreAuthorize("@ss.hasPermi('device:tsj:remove')")
@Log(title = "提升机设备", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(deviceTsjService.deleteDeviceTsjByIds(ids));
}
}

Some files were not shown because too many files have changed in this diff Show More