初始化
This commit is contained in:
29
.gitignore
vendored
Normal file
29
.gitignore
vendored
Normal 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
20
LICENSE
Normal 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
95
README.md
Normal 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>
|
||||
|
||||
## 平台简介
|
||||
|
||||
若依是一套全部开源的快速开发平台,毫无保留给个人及企业免费使用。
|
||||
|
||||
* 前端采用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)
|
||||
|
||||
## 内置功能
|
||||
|
||||
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群: [](https://jq.qq.com/?_wv=1027&k=5bVB1og) [](https://jq.qq.com/?_wv=1027&k=5eiA4DH) [](https://jq.qq.com/?_wv=1027&k=5AxMKlC) [](https://jq.qq.com/?_wv=1027&k=51G72yr) [](https://jq.qq.com/?_wv=1027&k=VvjN2nvu) [](https://jq.qq.com/?_wv=1027&k=5vYAqA05) [](https://jq.qq.com/?_wv=1027&k=kOIINEb5) [](https://jq.qq.com/?_wv=1027&k=UKtX5jhs) [](https://jq.qq.com/?_wv=1027&k=EI9an8lJ) [](https://jq.qq.com/?_wv=1027&k=SWCtLnMz) [](https://jq.qq.com/?_wv=1027&k=96Dkdq0k) [](https://jq.qq.com/?_wv=1027&k=0fsNiYZt) [](https://jq.qq.com/?_wv=1027&k=7xw4xUG1) [](https://jq.qq.com/?_wv=1027&k=eCx8eyoJ) [](https://jq.qq.com/?_wv=1027&k=SpyH2875) [](https://jq.qq.com/?_wv=1027&k=tKEt51dz) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=0vBbSb0ztbBgVtn3kJS-Q4HUNYwip89G&authKey=8irq5PhutrZmWIvsUsklBxhj57l%2F1nOZqjzigkXZVoZE451GG4JHPOqW7AW6cf0T&noverify=0&group_code=143961921) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=ZFAPAbp09S2ltvwrJzp7wGlbopsc0rwi&authKey=HB2cxpxP2yspk%2Bo3WKTBfktRCccVkU26cgi5B16u0KcAYrVu7sBaE7XSEqmMdFQp&noverify=0&group_code=174951577) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=Fn2aF5IHpwsy8j6VlalNJK6qbwFLFHat&authKey=uyIT%2B97x2AXj3odyXpsSpVaPMC%2Bidw0LxG5MAtEqlrcBcWJUA%2FeS43rsF1Tg7IRJ&noverify=0&group_code=161281055) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=XIzkm_mV2xTsUtFxo63bmicYoDBA6Ifm&authKey=dDW%2F4qsmw3x9govoZY9w%2FoWAoC4wbHqGal%2BbqLzoS6VBarU8EBptIgPKN%2FviyC8j&noverify=0&group_code=138988063) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=DkugnCg68PevlycJSKSwjhFqfIgrWWwR&authKey=pR1Pa5lPIeGF%2FFtIk6d%2FGB5qFi0EdvyErtpQXULzo03zbhopBHLWcuqdpwY241R%2F&noverify=0&group_code=151450850) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=F58bgRa-Dp-rsQJThiJqIYv8t4-lWfXh&authKey=UmUs4CVG5OPA1whvsa4uSespOvyd8%2FAr9olEGaWAfdLmfKQk%2FVBp2YU3u2xXXt76&noverify=0&group_code=224622315) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=Nxb2EQ5qozWa218Wbs7zgBnjLSNk_tVT&authKey=obBKXj6SBKgrFTJZx0AqQnIYbNOvBB2kmgwWvGhzxR67RoRr84%2Bus5OadzMcdJl5&noverify=0&group_code=287842588) [](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=numtK1M_I4eVd2Gvg8qtbuL8JgX42qNh&authKey=giV9XWMaFZTY%2FqPlmWbkB9g3fi0Ev5CwEtT9Tgei0oUlFFCQLDp4ozWRiVIzubIm&noverify=0&group_code=187944233) [](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
12
bin/clean.bat
Normal 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
12
bin/package.bat
Normal 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
14
bin/run.bat
Normal 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
|
||||
BIN
doc/若依环境使用手册.docx
Normal file
BIN
doc/若依环境使用手册.docx
Normal file
Binary file not shown.
300
pom.xml
Normal file
300
pom.xml
Normal 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
137
ruoyi-admin/pom.xml
Normal 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>
|
||||
26
ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java
Normal file
26
ruoyi-admin/src/main/java/com/ruoyi/RuoYiApplication.java
Normal 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系统启动成功 ლ(´ڡ`ლ)゙ ");
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
247
ruoyi-admin/src/main/java/com/ruoyi/api/domain/RequestLog.java
Normal file
247
ruoyi-admin/src/main/java/com/ruoyi/api/domain/RequestLog.java
Normal 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();
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.ruoyi.api.domain.agv.continueTask;
|
||||
|
||||
public class NextPositionCodeData {
|
||||
|
||||
/**
|
||||
* 位置编号
|
||||
*/
|
||||
private String positionCode;
|
||||
|
||||
/**
|
||||
* 对象类型定义
|
||||
* 00:代表nextPositionCode是一个位置
|
||||
* 02:代表nextPositionCode是一个策略
|
||||
*/
|
||||
private String type;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
131
ruoyi-admin/src/main/java/com/ruoyi/api/service/IApiService.java
Normal file
131
ruoyi-admin/src/main/java/com/ruoyi/api/service/IApiService.java
Normal file
@@ -0,0 +1,131 @@
|
||||
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);
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.ruoyi.api.service;
|
||||
|
||||
public interface ITestService {
|
||||
|
||||
boolean sendSsjData(Integer id);
|
||||
|
||||
boolean sendDdjData(Integer id);
|
||||
}
|
||||
@@ -0,0 +1,394 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
157
ruoyi-admin/src/main/java/com/ruoyi/bas/port/domain/WcsPort.java
Normal file
157
ruoyi-admin/src/main/java/com/ruoyi/bas/port/domain/WcsPort.java
Normal file
@@ -0,0 +1,157 @@
|
||||
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;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private String status;
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
29
ruoyi-admin/src/main/java/com/ruoyi/common/Constant.java
Normal file
29
ruoyi-admin/src/main/java/com/ruoyi/common/Constant.java
Normal 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;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
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_AGV = "1";
|
||||
/**
|
||||
* 任务执行阶段 入口输送机
|
||||
*/
|
||||
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";
|
||||
|
||||
}
|
||||
15
ruoyi-admin/src/main/java/com/ruoyi/common/TaskType.java
Normal file
15
ruoyi-admin/src/main/java/com/ruoyi/common/TaskType.java
Normal 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;
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
105
ruoyi-admin/src/main/java/com/ruoyi/common/domain/HslRead.java
Normal file
105
ruoyi-admin/src/main/java/com/ruoyi/common/domain/HslRead.java
Normal 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";
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
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;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.ruoyi.dynamicMonitoring.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.dynamicMonitoring.service.IDynamicMonitoringService;
|
||||
|
||||
/**
|
||||
* 大屏堆垛机数据Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/dynamicMonitoring/list")
|
||||
public class DynamicMonitoringController {
|
||||
@Autowired
|
||||
private IDynamicMonitoringService largeScreenDdjService;
|
||||
|
||||
/**
|
||||
* 查询堆垛机数据列表
|
||||
*/
|
||||
@GetMapping("/ddjList")
|
||||
public AjaxResult ddjList() {
|
||||
List<Map<String, Object>> list = largeScreenDdjService.queryDdjList();
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询输送机数据列表
|
||||
*/
|
||||
@GetMapping("/ssjList")
|
||||
public AjaxResult ssjList() {
|
||||
List<Map<String, Object>> list = largeScreenDdjService.querySsjList();
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询异常设备列表
|
||||
*/
|
||||
@GetMapping("/alarmList")
|
||||
public AjaxResult alarmList() {
|
||||
Map<String, Object> alarmData = largeScreenDdjService.queryAlarmList();
|
||||
AjaxResult result = new AjaxResult(200, "操作成功");
|
||||
result.put("alarm", alarmData.get("alarm"));
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.ruoyi.dynamicMonitoring.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 大屏堆垛机数据Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public interface IDynamicMonitoringService {
|
||||
/**
|
||||
* 查询堆垛机数据列表
|
||||
*
|
||||
* @return 堆垛机数据列表
|
||||
*/
|
||||
public List<Map<String, Object>> queryDdjList();
|
||||
|
||||
/**
|
||||
* 查询输送机数据列表
|
||||
*
|
||||
* @return 输送机数据列表
|
||||
*/
|
||||
public List<Map<String, Object>> querySsjList();
|
||||
|
||||
/**
|
||||
* 查询异常设备列表
|
||||
*
|
||||
* @return 异常设备列表
|
||||
*/
|
||||
public Map<String, Object> queryAlarmList();
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
package com.ruoyi.dynamicMonitoring.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
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.dynamicMonitoring.service.IDynamicMonitoringService;
|
||||
|
||||
/**
|
||||
* 大屏堆垛机数据Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Service
|
||||
public class DynamicMonitoringServiceImpl implements IDynamicMonitoringService {
|
||||
@Autowired
|
||||
private MsgDdjMapper msgDdjMapper;
|
||||
|
||||
@Autowired
|
||||
private DeviceSsjMapper deviceSsjMapper;
|
||||
|
||||
/**
|
||||
* 查询堆垛机数据列表
|
||||
*
|
||||
* @return 堆垛机数据列表
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> queryDdjList() {
|
||||
List<MsgDdj> ddjList = msgDdjMapper.selectMsgDdjList(null);
|
||||
List<Map<String, Object>> resultList = new ArrayList<>();
|
||||
|
||||
for (MsgDdj ddj : ddjList) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("id", ddj.getId().toString());
|
||||
map.put("name", ddj.getName());
|
||||
map.put("zxjd", ddj.getJdbz().toString());
|
||||
map.put("sbzt", ddj.getSbzt().toString());
|
||||
map.put("rwh", ddj.getRwh().toString());
|
||||
map.put("yp", ddj.getYph().toString());
|
||||
map.put("ywz", ddj.getYlh().toString());
|
||||
map.put("yc", ddj.getYch().toString());
|
||||
map.put("mbp", ddj.getMbph().toString());
|
||||
map.put("mbwz", ddj.getMblh().toString());
|
||||
map.put("mbc", ddj.getMbch().toString());
|
||||
resultList.add(map);
|
||||
}
|
||||
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询输送机数据列表
|
||||
*
|
||||
* @return 输送机数据列表
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> querySsjList() {
|
||||
List<DeviceSsj> ssjList = deviceSsjMapper.selectDeviceSsjList(null);
|
||||
List<Map<String, Object>> resultList = new ArrayList<>();
|
||||
|
||||
for (DeviceSsj ssj : ssjList) {
|
||||
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("rwh", String.valueOf(ssj.getTaskNo()));
|
||||
map.put("sbzt", ssj.getException());
|
||||
map.put("trayCode", ssj.getTrayCode());
|
||||
resultList.add(map);
|
||||
}
|
||||
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询异常设备列表
|
||||
*
|
||||
* @return 异常设备列表
|
||||
*/
|
||||
@Override
|
||||
public Map<String, Object> queryAlarmList() {
|
||||
List<Map<String, Object>> alarmList = new ArrayList<>();
|
||||
|
||||
// 查询堆垛机状态异常的设备(状态码>1000)
|
||||
List<MsgDdj> ddjList = msgDdjMapper.selectMsgDdjList(null);
|
||||
for (MsgDdj ddj : ddjList) {
|
||||
if (ddj.getSbzt() != null && ddj.getSbzt() > 1000) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("id", ddj.getId().toString());
|
||||
map.put("name", "堆垛机");
|
||||
map.put("code", ddj.getSbzt().toString());
|
||||
map.put("content", null);
|
||||
alarmList.add(map);
|
||||
}
|
||||
}
|
||||
|
||||
// 查询输送机状态异常的设备(状态码>3)
|
||||
List<DeviceSsj> ssjList = deviceSsjMapper.selectDeviceSsjList(null);
|
||||
for (DeviceSsj ssj : ssjList) {
|
||||
if (ssj.getException() > 3) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("id", ssj.getDeviceCode());
|
||||
map.put("name", "输送机");
|
||||
map.put("code", String.valueOf(ssj.getException()));
|
||||
map.put("content", null);
|
||||
alarmList.add(map);
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
result.put("alarm", alarmList);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,338 @@
|
||||
package com.ruoyi.index.controller;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.ruoyi.device.ddj.domain.MsgDdj;
|
||||
import com.ruoyi.device.ddj.service.IMsgDdjService;
|
||||
import com.ruoyi.job.domain.MydoJob;
|
||||
import com.ruoyi.job.service.IMydoJobService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.device.DeviceCar.service.IDeviceCarService;
|
||||
import com.ruoyi.queue.agv.service.IAgvQueueService;
|
||||
import com.ruoyi.queue.agv.service.IAgvQueueFinishService;
|
||||
import com.ruoyi.device.ssj.service.IDeviceSsjService;
|
||||
import com.ruoyi.device.DeviceCar.domain.DeviceCar;
|
||||
import com.ruoyi.queue.agv.domain.AgvQueue;
|
||||
import com.ruoyi.queue.agv.domain.AgvQueueFinish;
|
||||
import com.ruoyi.device.ssj.domain.DeviceSsj;
|
||||
|
||||
/**
|
||||
* 首页数据Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-08
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/index")
|
||||
public class IndexController extends BaseController {
|
||||
@Autowired
|
||||
private IDeviceCarService deviceCarService;
|
||||
|
||||
@Autowired
|
||||
private IAgvQueueService agvQueueService;
|
||||
|
||||
@Autowired
|
||||
private IAgvQueueFinishService agvQueueFinishService;
|
||||
|
||||
@Autowired
|
||||
private IDeviceSsjService deviceSsjService;
|
||||
|
||||
@Autowired
|
||||
private IMsgDdjService msgDdjService;
|
||||
|
||||
@Autowired
|
||||
private IMydoJobService mydoJobService;
|
||||
|
||||
|
||||
/**
|
||||
* 获取设备统计数据
|
||||
*/
|
||||
@GetMapping("/deviceStats")
|
||||
public AjaxResult getDeviceStats() {
|
||||
try {
|
||||
DeviceCar deviceCar = new DeviceCar();
|
||||
MsgDdj msgDdj = new MsgDdj();
|
||||
DeviceSsj deviceSsj = new DeviceSsj();
|
||||
List<DeviceCar> deviceList = deviceCarService.selectDeviceCarList(deviceCar);
|
||||
List<MsgDdj> msgDdjList = msgDdjService.selectMsgDdjList(msgDdj);
|
||||
List<DeviceSsj> deviceSsjList = deviceSsjService.selectDeviceSsjList(deviceSsj);
|
||||
|
||||
Map<String, Object> count = new HashMap<>();
|
||||
|
||||
count.put("agvCount", deviceList.size());
|
||||
count.put("ddjCount", msgDdjList.size());
|
||||
count.put("ssjCount", deviceSsjList.size());
|
||||
|
||||
return AjaxResult.success(count);
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.error("获取设备统计数据失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取任务统计数据
|
||||
*/
|
||||
@GetMapping("/taskStats")
|
||||
public AjaxResult getTaskStats() {
|
||||
try {
|
||||
MydoJob mydoJob = new MydoJob();
|
||||
AgvQueue agvQueue = new AgvQueue();
|
||||
List<AgvQueue> queueList = agvQueueService.selectAgvQueueList(agvQueue);
|
||||
List<MydoJob> mydoJobList = mydoJobService.selectMydoJobList(mydoJob);
|
||||
List<MydoJob> mydoJobFinishList = mydoJobService.selectMydoJobFinishList(mydoJob);
|
||||
|
||||
int pendingCount = 0;
|
||||
int runningCount = 0;
|
||||
int finishedCount = 0;
|
||||
|
||||
for (MydoJob job : mydoJobList) {
|
||||
String status = job.getStatus();
|
||||
if ("2".equals(status)) {
|
||||
pendingCount++;
|
||||
} else if ("3".equals(status)) {
|
||||
runningCount++;
|
||||
}
|
||||
}
|
||||
|
||||
for (MydoJob Fjob : mydoJobFinishList) {
|
||||
String status = Fjob.getStatus();
|
||||
if ("4".equals(status)) {
|
||||
finishedCount++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Map<String, Object> stats = new HashMap<>();
|
||||
stats.put("pendingCount", pendingCount);
|
||||
stats.put("runningCount", runningCount);
|
||||
stats.put("finishedCount", finishedCount);
|
||||
|
||||
return AjaxResult.success(stats);
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.error("获取任务统计数据失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前任务队列
|
||||
*/
|
||||
@GetMapping("/currentTasks")
|
||||
public AjaxResult getCurrentTasks() {
|
||||
try {
|
||||
MydoJob mydoJobParam = new MydoJob();
|
||||
mydoJobParam.setStatus("3");
|
||||
List<MydoJob> mydoJobList = mydoJobService.selectMydoJobList(mydoJobParam);
|
||||
return AjaxResult.success(mydoJobList);
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.error("获取当前任务队列失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取运行中的设备列表
|
||||
*/
|
||||
@GetMapping("/deviceList")
|
||||
public AjaxResult getDeviceList() {
|
||||
try {
|
||||
List<Map<String, Object>> runningDevices = new ArrayList<>();
|
||||
|
||||
// 查询运行中的AGV和CTU设备
|
||||
/*DeviceCar deviceCar = new DeviceCar();
|
||||
List<DeviceCar> deviceList = deviceCarService.selectDeviceCarList(deviceCar);
|
||||
|
||||
for (DeviceCar device : deviceList) {
|
||||
String taskNo = device.getTaskNo();
|
||||
// 判断是否为运行中设备:taskNo不为空且不为0
|
||||
if (taskNo != null && !taskNo.trim().isEmpty() && !"0".equals(taskNo.trim())) {
|
||||
Map<String, Object> deviceInfo = new HashMap<>();
|
||||
deviceInfo.put("deviceCode", device.getDeviceCode());
|
||||
deviceInfo.put("deviceName", device.getName());
|
||||
deviceInfo.put("deviceType", "AGV");
|
||||
deviceInfo.put("taskNo", device.getTaskNo());
|
||||
runningDevices.add(deviceInfo);
|
||||
}
|
||||
}*/
|
||||
|
||||
// 查询运行中的SSJ设备
|
||||
DeviceSsj deviceSsj = new DeviceSsj();
|
||||
List<DeviceSsj> ssjList = deviceSsjService.selectDeviceSsjList(deviceSsj);
|
||||
|
||||
for (DeviceSsj ssj : ssjList) {
|
||||
int taskNo = ssj.getTaskNo();
|
||||
// 判断是否为运行中设备:taskNo不为0
|
||||
if (taskNo != 0) {
|
||||
Map<String, Object> deviceInfo = new HashMap<>();
|
||||
deviceInfo.put("deviceCode", ssj.getDeviceCode());
|
||||
deviceInfo.put("deviceName", ssj.getName());
|
||||
deviceInfo.put("deviceType", "SSJ");
|
||||
deviceInfo.put("taskNo", String.valueOf(ssj.getTaskNo()));
|
||||
runningDevices.add(deviceInfo);
|
||||
}
|
||||
}
|
||||
|
||||
MsgDdj msgDdj = new MsgDdj();
|
||||
List<MsgDdj> msgDdjList = msgDdjService.selectMsgDdjList(msgDdj);
|
||||
|
||||
for (MsgDdj ddj : msgDdjList){
|
||||
Long taskNo = ddj.getRwh();
|
||||
if (taskNo != 0){
|
||||
HashMap<String, Object> deviceInfo = new HashMap<>();
|
||||
deviceInfo.put("deviceCode",ddj.getId());
|
||||
deviceInfo.put("deviceName", ddj.getName());
|
||||
deviceInfo.put("deviceType", "DDJ");
|
||||
deviceInfo.put("taskNo", ddj.getRwh());
|
||||
runningDevices.add(deviceInfo);
|
||||
}
|
||||
}
|
||||
|
||||
return AjaxResult.success(runningDevices);
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.error("获取运行中设备列表失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取任务类型分布数据
|
||||
*/
|
||||
@GetMapping("/taskTypeChart")
|
||||
public AjaxResult getTaskTypeChart() {
|
||||
try {
|
||||
MydoJob mydoJob = new MydoJob();
|
||||
List<MydoJob> mydoJobFinishList = mydoJobService.selectMydoJobFinishList(mydoJob);
|
||||
|
||||
Map<String, Integer> inOrOutCount = new HashMap<>();
|
||||
|
||||
// 统计完成任务的 inOrOut 类型
|
||||
for (MydoJob job : mydoJobFinishList) {
|
||||
String inOrOut = job.getInOrOut();
|
||||
if (inOrOut != null && !inOrOut.isEmpty()) {
|
||||
inOrOutCount.put(inOrOut, inOrOutCount.getOrDefault(inOrOut, 0) + 1);
|
||||
}
|
||||
}
|
||||
|
||||
List<Map<String, Object>> chartData = new ArrayList<>();
|
||||
for (Map.Entry<String, Integer> entry : inOrOutCount.entrySet()) {
|
||||
Map<String, Object> item = new HashMap<>();
|
||||
// 使用字典工具类获取字典标签
|
||||
String dictLabel = com.ruoyi.common.utils.DictUtils.getDictLabel("in_or_out", entry.getKey());
|
||||
// 如果没有找到对应的字典标签,则使用原始值
|
||||
item.put("name", dictLabel != null && !dictLabel.isEmpty() ? dictLabel : entry.getKey());
|
||||
item.put("value", entry.getValue());
|
||||
chartData.add(item);
|
||||
}
|
||||
|
||||
return AjaxResult.success(chartData);
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.error("获取任务类型分布数据失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备状态分布数据
|
||||
*/
|
||||
@GetMapping("/deviceStatusChart")
|
||||
public AjaxResult getDeviceStatusChart() {
|
||||
try {
|
||||
Map<String, Map<String, Integer>> statusCount = new HashMap<>();
|
||||
// statusCount.put("AGV", new HashMap<>());
|
||||
statusCount.put("DDJ", new HashMap<>());
|
||||
statusCount.put("SSJ", new HashMap<>());
|
||||
|
||||
// 查询DeviceCar数据(AGV)
|
||||
DeviceCar deviceCar = new DeviceCar();
|
||||
List<DeviceCar> deviceList = deviceCarService.selectDeviceCarList(deviceCar);
|
||||
|
||||
for (DeviceCar device : deviceList) {
|
||||
String taskNo = device.getTaskNo();
|
||||
String status = "其他";
|
||||
// 根据taskNo判断状态:不等于空或0时为运行状态
|
||||
if (taskNo != null && !taskNo.trim().isEmpty() && !"0".equals(taskNo.trim())) {
|
||||
status = "运行";
|
||||
}
|
||||
Map<String, Integer> typeStatusCount = statusCount.get("AGV");
|
||||
typeStatusCount.put(status, typeStatusCount.getOrDefault(status, 0) + 1);
|
||||
|
||||
}
|
||||
|
||||
// 查询DeviceSsj数据(SSJ)
|
||||
DeviceSsj deviceSsj = new DeviceSsj();
|
||||
List<DeviceSsj> ssjList = deviceSsjService.selectDeviceSsjList(deviceSsj);
|
||||
|
||||
for (DeviceSsj ssj : ssjList) {
|
||||
int taskNo = ssj.getTaskNo();
|
||||
String status = "其他";
|
||||
|
||||
// 根据taskNo判断状态:不等于空或0时为运行状态
|
||||
if (taskNo != 0) {
|
||||
status = "运行";
|
||||
}
|
||||
|
||||
Map<String, Integer> typeStatusCount = statusCount.get("SSJ");
|
||||
typeStatusCount.put(status, typeStatusCount.getOrDefault(status, 0) + 1);
|
||||
}
|
||||
|
||||
MsgDdj msgDdj = new MsgDdj();
|
||||
List<MsgDdj> msgDdjList = msgDdjService.selectMsgDdjList(msgDdj);
|
||||
|
||||
for (MsgDdj ddj : msgDdjList){
|
||||
Long taskNo = ddj.getRwh();
|
||||
String status = "其他";
|
||||
if (taskNo!=0){
|
||||
status = "运行";
|
||||
}
|
||||
Map<String,Integer> typeStatusCount = statusCount.get("DDJ");
|
||||
typeStatusCount.put(status,typeStatusCount.getOrDefault(status,0) + 1);
|
||||
}
|
||||
|
||||
return AjaxResult.success(statusCount);
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.error("获取设备状态分布数据失败");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取首页综合数据
|
||||
*/
|
||||
@GetMapping("/dashboard")
|
||||
public AjaxResult getDashboardData() {
|
||||
try {
|
||||
Map<String, Object> dashboardData = new HashMap<>();
|
||||
|
||||
// 获取设备统计
|
||||
AjaxResult deviceStatsResult = getDeviceStats();
|
||||
if (deviceStatsResult.get("code").equals(200)) {
|
||||
dashboardData.put("deviceStats", deviceStatsResult.get("data"));
|
||||
}
|
||||
|
||||
// 获取任务统计
|
||||
AjaxResult taskStatsResult = getTaskStats();
|
||||
if (taskStatsResult.get("code").equals(200)) {
|
||||
dashboardData.put("taskStats", taskStatsResult.get("data"));
|
||||
}
|
||||
|
||||
// 获取当前任务
|
||||
AjaxResult currentTasksResult = getCurrentTasks();
|
||||
if (currentTasksResult.get("code").equals(200)) {
|
||||
dashboardData.put("currentTasks", currentTasksResult.get("data"));
|
||||
}
|
||||
|
||||
// 获取设备列表
|
||||
AjaxResult deviceListResult = getDeviceList();
|
||||
if (deviceListResult.get("code").equals(200)) {
|
||||
dashboardData.put("deviceList", deviceListResult.get("data"));
|
||||
}
|
||||
|
||||
return AjaxResult.success(dashboardData);
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.error("获取首页数据失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
package com.ruoyi.job.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
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.job.domain.JobCallBack;
|
||||
import com.ruoyi.job.service.IJobCallBackService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 任务完成回传Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-09-25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/job/callBack")
|
||||
public class JobCallBackController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IJobCallBackService jobCallBackService;
|
||||
|
||||
/**
|
||||
* 查询任务完成回传列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:callBack:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(JobCallBack jobCallBack)
|
||||
{
|
||||
startPage();
|
||||
List<JobCallBack> list = jobCallBackService.selectJobCallBackList(jobCallBack);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出任务完成回传列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:callBack:export')")
|
||||
@Log(title = "任务完成回传", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, JobCallBack jobCallBack)
|
||||
{
|
||||
List<JobCallBack> list = jobCallBackService.selectJobCallBackList(jobCallBack);
|
||||
ExcelUtil<JobCallBack> util = new ExcelUtil<JobCallBack>(JobCallBack.class);
|
||||
util.exportExcel(response, list, "任务完成回传数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取任务完成回传详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:callBack:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(jobCallBackService.selectJobCallBackById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增任务完成回传
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:callBack:add')")
|
||||
@Log(title = "任务完成回传", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody JobCallBack jobCallBack)
|
||||
{
|
||||
return toAjax(jobCallBackService.insertJobCallBack(jobCallBack));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改任务完成回传
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:callBack:edit')")
|
||||
@Log(title = "任务完成回传", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody JobCallBack jobCallBack)
|
||||
{
|
||||
return toAjax(jobCallBackService.updateJobCallBack(jobCallBack));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除任务完成回传
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:callBack:remove')")
|
||||
@Log(title = "任务完成回传", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(jobCallBackService.deleteJobCallBackByIds(ids));
|
||||
}
|
||||
|
||||
@Scheduled(fixedDelay=1500)
|
||||
public void jobCallBack() {
|
||||
jobCallBackService.jobCallBack();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,125 @@
|
||||
package com.ruoyi.job.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.job.domain.MydoJob;
|
||||
import com.ruoyi.job.service.IMydoJobService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 作业信息Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-09-22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/job/mydoJob")
|
||||
public class MydoJobController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IMydoJobService mydoJobService;
|
||||
|
||||
/**
|
||||
* 查询作业信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:mydoJob:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(MydoJob mydoJob)
|
||||
{
|
||||
startPage();
|
||||
List<MydoJob> list = mydoJobService.selectMydoJobList(mydoJob);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询作业信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:mydoJob:list')")
|
||||
@GetMapping("/listFinish")
|
||||
public TableDataInfo listFinish(MydoJob mydoJob)
|
||||
{
|
||||
startPage();
|
||||
List<MydoJob> list = mydoJobService.selectMydoJobFinishList(mydoJob);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出作业信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:mydoJob:export')")
|
||||
@Log(title = "作业信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, MydoJob mydoJob)
|
||||
{
|
||||
List<MydoJob> list = mydoJobService.selectMydoJobList(mydoJob);
|
||||
ExcelUtil<MydoJob> util = new ExcelUtil<MydoJob>(MydoJob.class);
|
||||
util.exportExcel(response, list, "作业信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取作业信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:mydoJob:query')")
|
||||
@GetMapping(value = "/{jobId}")
|
||||
public AjaxResult getInfo(@PathVariable("jobId") String jobId)
|
||||
{
|
||||
return success(mydoJobService.selectMydoJobByJobId(jobId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增作业信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:mydoJob:add')")
|
||||
@Log(title = "作业信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody MydoJob mydoJob)
|
||||
{
|
||||
return toAjax(mydoJobService.insertMydoJob(mydoJob));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改作业信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:mydoJob:edit')")
|
||||
@Log(title = "作业信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody MydoJob mydoJob)
|
||||
{
|
||||
return toAjax(mydoJobService.updateMydoJob(mydoJob));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除作业信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('job:mydoJob:remove')")
|
||||
@Log(title = "作业信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{jobIds}")
|
||||
public AjaxResult remove(@PathVariable String[] jobIds)
|
||||
{
|
||||
return toAjax(mydoJobService.deleteMydoJobByJobIds(jobIds));
|
||||
}
|
||||
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('job:mydoJob:manualCallback')")
|
||||
@Log(title = "作业信息", businessType = BusinessType.UPDATE)
|
||||
@GetMapping("/manualCallback/{jobId}")
|
||||
public AjaxResult manualCallback(@PathVariable("jobId") String jobId)
|
||||
{
|
||||
return mydoJobService.manualCallback(jobId);
|
||||
}
|
||||
}
|
||||
143
ruoyi-admin/src/main/java/com/ruoyi/job/domain/JobCallBack.java
Normal file
143
ruoyi-admin/src/main/java/com/ruoyi/job/domain/JobCallBack.java
Normal file
@@ -0,0 +1,143 @@
|
||||
package com.ruoyi.job.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;
|
||||
|
||||
/**
|
||||
* 任务完成回传对象 job_call_back
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-09-25
|
||||
*/
|
||||
public class JobCallBack extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 类型 */
|
||||
@Excel(name = "类型")
|
||||
private String type;
|
||||
|
||||
/** 任务号 */
|
||||
@Excel(name = "任务号")
|
||||
private Long taskNo;
|
||||
|
||||
/** mydojob作业号 */
|
||||
@Excel(name = "mydojob作业号")
|
||||
private String mydojobId;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private String status;
|
||||
|
||||
/** 备用字段1 */
|
||||
@Excel(name = "备用字段1")
|
||||
private String spare1;
|
||||
|
||||
/** 备用字段2 */
|
||||
@Excel(name = "备用字段2")
|
||||
private String spare2;
|
||||
|
||||
/** 备用字段3 */
|
||||
@Excel(name = "备用字段3")
|
||||
private String spare3;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setType(String type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setTaskNo(Long taskNo)
|
||||
{
|
||||
this.taskNo = taskNo;
|
||||
}
|
||||
|
||||
public Long getTaskNo()
|
||||
{
|
||||
return taskNo;
|
||||
}
|
||||
|
||||
public void setMydojobId(String mydojobId)
|
||||
{
|
||||
this.mydojobId = mydojobId;
|
||||
}
|
||||
|
||||
public String getMydojobId()
|
||||
{
|
||||
return mydojobId;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("type", getType())
|
||||
.append("taskNo", getTaskNo())
|
||||
.append("mydojobId", getMydojobId())
|
||||
.append("status", getStatus())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("spare1", getSpare1())
|
||||
.append("spare2", getSpare2())
|
||||
.append("spare3", getSpare3())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
92
ruoyi-admin/src/main/java/com/ruoyi/job/domain/MydoJob.java
Normal file
92
ruoyi-admin/src/main/java/com/ruoyi/job/domain/MydoJob.java
Normal file
@@ -0,0 +1,92 @@
|
||||
package com.ruoyi.job.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;
|
||||
|
||||
/**
|
||||
* 作业信息对象 mydo_job_wcs
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-09-22
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@ToString
|
||||
public class MydoJob extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 任务ID */
|
||||
private String jobId;
|
||||
|
||||
/** 任务状态 */
|
||||
@Excel(name = "任务状态")
|
||||
private String status;
|
||||
|
||||
/** 任务号 */
|
||||
@Excel(name = "任务号")
|
||||
private String taskNo;
|
||||
|
||||
/** 巷道ID */
|
||||
@Excel(name = "巷道ID")
|
||||
private String roadwayId;
|
||||
|
||||
/** 货位ID */
|
||||
@Excel(name = "货位ID")
|
||||
private String cargoSpaceId;
|
||||
|
||||
/** 目标巷道ID */
|
||||
@Excel(name = "目标巷道ID")
|
||||
private String targetRoadwayId;
|
||||
|
||||
/** 目标货位ID */
|
||||
@Excel(name = "目标货位ID")
|
||||
private String targetCargoSpaceId;
|
||||
|
||||
/** 优先级 */
|
||||
@Excel(name = "优先级")
|
||||
private Long priority;
|
||||
|
||||
/** 执行阶段 */
|
||||
@Excel(name = "执行阶段")
|
||||
private String executionPhase;
|
||||
|
||||
/** 任务类型 */
|
||||
@Excel(name = "任务类型")
|
||||
private String inOrOut;
|
||||
|
||||
/** 开始时间 */
|
||||
@Excel(name = "开始时间")
|
||||
private String startTime;
|
||||
|
||||
/** 结束时间 */
|
||||
@Excel(name = "结束时间")
|
||||
private String finishTime;
|
||||
|
||||
/** 入口ID */
|
||||
@Excel(name = "入口ID")
|
||||
private String entranceId;
|
||||
|
||||
/** 出口ID */
|
||||
@Excel(name = "出口ID")
|
||||
private String exitId;
|
||||
|
||||
/** 仓库ID */
|
||||
@Excel(name = "仓库ID")
|
||||
private String warehouseId;
|
||||
|
||||
/** 重分标志 */
|
||||
@Excel(name = "重分标志")
|
||||
private String faultFlag;
|
||||
|
||||
private String trayCode;
|
||||
|
||||
private String inOut;
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.ruoyi.job.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.job.domain.JobCallBack;
|
||||
|
||||
/**
|
||||
* 任务完成回传Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-09-25
|
||||
*/
|
||||
public interface JobCallBackMapper
|
||||
{
|
||||
/**
|
||||
* 查询任务完成回传
|
||||
*
|
||||
* @param id 任务完成回传主键
|
||||
* @return 任务完成回传
|
||||
*/
|
||||
public JobCallBack selectJobCallBackById(Long id);
|
||||
|
||||
/**
|
||||
* 查询任务完成回传列表
|
||||
*
|
||||
* @param jobCallBack 任务完成回传
|
||||
* @return 任务完成回传集合
|
||||
*/
|
||||
public List<JobCallBack> selectJobCallBackList(JobCallBack jobCallBack);
|
||||
|
||||
/**
|
||||
* 新增任务完成回传
|
||||
*
|
||||
* @param jobCallBack 任务完成回传
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertJobCallBack(JobCallBack jobCallBack);
|
||||
|
||||
/**
|
||||
* 修改任务完成回传
|
||||
*
|
||||
* @param jobCallBack 任务完成回传
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateJobCallBack(JobCallBack jobCallBack);
|
||||
|
||||
/**
|
||||
* 删除任务完成回传
|
||||
*
|
||||
* @param id 任务完成回传主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteJobCallBackById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除任务完成回传
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteJobCallBackByIds(Long[] ids);
|
||||
|
||||
List<JobCallBack> selectJobCallBackListNoSuccess();
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package com.ruoyi.job.mapper;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import com.ruoyi.job.domain.MydoJob;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 作业信息Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-09-22
|
||||
*/
|
||||
public interface MydoJobMapper
|
||||
{
|
||||
/**
|
||||
* 查询作业信息
|
||||
*
|
||||
* @param jobId 作业信息主键
|
||||
* @return 作业信息
|
||||
*/
|
||||
public MydoJob selectMydoJobByJobId(String jobId);
|
||||
|
||||
/**
|
||||
* 查询作业信息列表
|
||||
*
|
||||
* @param mydoJob 作业信息
|
||||
* @return 作业信息集合
|
||||
*/
|
||||
public List<MydoJob> selectMydoJobList(MydoJob mydoJob);
|
||||
|
||||
/**
|
||||
* 新增作业信息
|
||||
*
|
||||
* @param mydoJob 作业信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMydoJob(MydoJob mydoJob);
|
||||
|
||||
/**
|
||||
* 修改作业信息
|
||||
*
|
||||
* @param mydoJob 作业信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMydoJob(MydoJob mydoJob);
|
||||
|
||||
/**
|
||||
* 按任务号查作业
|
||||
*/
|
||||
public MydoJob selectMydoJobByTaskNo(String taskNo);
|
||||
|
||||
/**
|
||||
* 删除作业信息
|
||||
*
|
||||
* @param jobId 作业信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMydoJobByJobId(String jobId);
|
||||
|
||||
/**
|
||||
* 批量删除作业信息
|
||||
*
|
||||
* @param jobIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMydoJobByJobIds(String[] jobIds);
|
||||
|
||||
void ddjTaskFinish(HashMap<String, Object> map);
|
||||
|
||||
void InvalidMydoJob(HashMap<String, Object> map);
|
||||
|
||||
MydoJob selectMydoJobByExitList(@Param("exitList") List<String> exitList);
|
||||
|
||||
void insertHistory(String jobId);
|
||||
|
||||
List<MydoJob> selectInOrOutMydoJobList(MydoJob mydoJob);
|
||||
|
||||
MydoJob selectMydoJobByEntranceList(@Param("entranceList") List<String> entranceList);
|
||||
|
||||
List<MydoJob> selectMydoJobFinishList(MydoJob mydoJob);
|
||||
|
||||
MydoJob selectRunningMydoJobByExitList(@Param("exitList") List<String> exitList);
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.ruoyi.job.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.job.domain.JobCallBack;
|
||||
|
||||
/**
|
||||
* 任务完成回传Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-09-25
|
||||
*/
|
||||
public interface IJobCallBackService
|
||||
{
|
||||
/**
|
||||
* 查询任务完成回传
|
||||
*
|
||||
* @param id 任务完成回传主键
|
||||
* @return 任务完成回传
|
||||
*/
|
||||
public JobCallBack selectJobCallBackById(Long id);
|
||||
|
||||
/**
|
||||
* 查询任务完成回传列表
|
||||
*
|
||||
* @param jobCallBack 任务完成回传
|
||||
* @return 任务完成回传集合
|
||||
*/
|
||||
public List<JobCallBack> selectJobCallBackList(JobCallBack jobCallBack);
|
||||
|
||||
/**
|
||||
* 新增任务完成回传
|
||||
*
|
||||
* @param jobCallBack 任务完成回传
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertJobCallBack(JobCallBack jobCallBack);
|
||||
|
||||
/**
|
||||
* 修改任务完成回传
|
||||
*
|
||||
* @param jobCallBack 任务完成回传
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateJobCallBack(JobCallBack jobCallBack);
|
||||
|
||||
/**
|
||||
* 批量删除任务完成回传
|
||||
*
|
||||
* @param ids 需要删除的任务完成回传主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteJobCallBackByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除任务完成回传信息
|
||||
*
|
||||
* @param id 任务完成回传主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteJobCallBackById(Long id);
|
||||
|
||||
void jobCallBack();
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package com.ruoyi.job.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.job.domain.MydoJob;
|
||||
|
||||
/**
|
||||
* 作业信息Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-09-22
|
||||
*/
|
||||
public interface IMydoJobService
|
||||
{
|
||||
/**
|
||||
* 查询作业信息
|
||||
*
|
||||
* @param jobId 作业信息主键
|
||||
* @return 作业信息
|
||||
*/
|
||||
public MydoJob selectMydoJobByJobId(String jobId);
|
||||
|
||||
/**
|
||||
* 查询作业信息列表
|
||||
*
|
||||
* @param mydoJob 作业信息
|
||||
* @return 作业信息集合
|
||||
*/
|
||||
public List<MydoJob> selectMydoJobList(MydoJob mydoJob);
|
||||
|
||||
/**
|
||||
* 新增作业信息
|
||||
*
|
||||
* @param mydoJob 作业信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMydoJob(MydoJob mydoJob);
|
||||
|
||||
/**
|
||||
* 修改作业信息
|
||||
*
|
||||
* @param mydoJob 作业信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMydoJob(MydoJob mydoJob);
|
||||
|
||||
/**
|
||||
* 批量删除作业信息
|
||||
*
|
||||
* @param jobIds 需要删除的作业信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMydoJobByJobIds(String[] jobIds);
|
||||
|
||||
/**
|
||||
* 删除作业信息信息
|
||||
*
|
||||
* @param jobId 作业信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMydoJobByJobId(String jobId);
|
||||
|
||||
MydoJob selectMydoJobByTaskNo(Long rwh);
|
||||
|
||||
boolean ddjTaskFinish(Long rwh, Integer id, Integer type);
|
||||
|
||||
boolean InvalidMydoJob(Long rwh, Integer id);
|
||||
|
||||
MydoJob selectMydoJobByExitList(List<String> exitList);
|
||||
|
||||
void insertHistory(String jobId);
|
||||
|
||||
List<MydoJob> selectInOrOutMydoJobList(MydoJob mydoJob);
|
||||
|
||||
MydoJob selectMydoJobByEntranceList(List<String> entranceList);
|
||||
|
||||
List<MydoJob> selectMydoJobFinishList(MydoJob mydoJob);
|
||||
|
||||
MydoJob selectRunningMydoJobByExitList(List<String> strings);
|
||||
|
||||
AjaxResult manualCallback(String jobId);
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
package com.ruoyi.job.service.impl;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.ruoyi.api.domain.RequestLog;
|
||||
import com.ruoyi.api.service.IApiService;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.job.domain.MydoJob;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.job.mapper.JobCallBackMapper;
|
||||
import com.ruoyi.job.domain.JobCallBack;
|
||||
import com.ruoyi.job.service.IJobCallBackService;
|
||||
|
||||
/**
|
||||
* 任务完成回传Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-09-25
|
||||
*/
|
||||
@Service
|
||||
public class JobCallBackServiceImpl implements IJobCallBackService
|
||||
{
|
||||
@Autowired
|
||||
private JobCallBackMapper jobCallBackMapper;
|
||||
@Autowired
|
||||
private IApiService apiService;
|
||||
|
||||
/**
|
||||
* 查询任务完成回传
|
||||
*
|
||||
* @param id 任务完成回传主键
|
||||
* @return 任务完成回传
|
||||
*/
|
||||
@Override
|
||||
public JobCallBack selectJobCallBackById(Long id)
|
||||
{
|
||||
return jobCallBackMapper.selectJobCallBackById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询任务完成回传列表
|
||||
*
|
||||
* @param jobCallBack 任务完成回传
|
||||
* @return 任务完成回传
|
||||
*/
|
||||
@Override
|
||||
public List<JobCallBack> selectJobCallBackList(JobCallBack jobCallBack)
|
||||
{
|
||||
return jobCallBackMapper.selectJobCallBackList(jobCallBack);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增任务完成回传
|
||||
*
|
||||
* @param jobCallBack 任务完成回传
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertJobCallBack(JobCallBack jobCallBack)
|
||||
{
|
||||
jobCallBack.setCreateTime(DateUtils.getNowDate());
|
||||
return jobCallBackMapper.insertJobCallBack(jobCallBack);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改任务完成回传
|
||||
*
|
||||
* @param jobCallBack 任务完成回传
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateJobCallBack(JobCallBack jobCallBack)
|
||||
{
|
||||
return jobCallBackMapper.updateJobCallBack(jobCallBack);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除任务完成回传
|
||||
*
|
||||
* @param ids 需要删除的任务完成回传主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteJobCallBackByIds(Long[] ids)
|
||||
{
|
||||
return jobCallBackMapper.deleteJobCallBackByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除任务完成回传信息
|
||||
*
|
||||
* @param id 任务完成回传主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteJobCallBackById(Long id)
|
||||
{
|
||||
return jobCallBackMapper.deleteJobCallBackById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void jobCallBack() {
|
||||
List<JobCallBack> jobCallBackList = jobCallBackMapper.selectJobCallBackListNoSuccess();
|
||||
for (JobCallBack jobCallBack : jobCallBackList) {
|
||||
Map<String, Object> param = new HashMap<>();
|
||||
param.put("jobId", jobCallBack.getMydojobId());
|
||||
param.put("taskNo", jobCallBack.getTaskNo());
|
||||
param.put("wmsType", jobCallBack.getType());
|
||||
RequestLog requestLog = apiService.finishMydoJob(param);
|
||||
if ("1".equals(requestLog.getIsSuccessful())){
|
||||
jobCallBack.setStatus("1");
|
||||
jobCallBackMapper.updateJobCallBack(jobCallBack);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,176 @@
|
||||
package com.ruoyi.job.service.impl;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.util.ObjUtil;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.job.mapper.MydoJobMapper;
|
||||
import com.ruoyi.job.domain.MydoJob;
|
||||
import com.ruoyi.job.service.IMydoJobService;
|
||||
|
||||
/**
|
||||
* 作业信息Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-09-22
|
||||
*/
|
||||
@Service
|
||||
public class MydoJobServiceImpl implements IMydoJobService
|
||||
{
|
||||
@Autowired
|
||||
private MydoJobMapper mydoJobMapper;
|
||||
|
||||
/**
|
||||
* 查询作业信息
|
||||
*
|
||||
* @param jobId 作业信息主键
|
||||
* @return 作业信息
|
||||
*/
|
||||
@Override
|
||||
public MydoJob selectMydoJobByJobId(String jobId)
|
||||
{
|
||||
return mydoJobMapper.selectMydoJobByJobId(jobId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询作业信息列表
|
||||
*
|
||||
* @param mydoJob 作业信息
|
||||
* @return 作业信息
|
||||
*/
|
||||
@Override
|
||||
public List<MydoJob> selectMydoJobList(MydoJob mydoJob)
|
||||
{
|
||||
return mydoJobMapper.selectMydoJobList(mydoJob);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增作业信息
|
||||
*
|
||||
* @param mydoJob 作业信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertMydoJob(MydoJob mydoJob)
|
||||
{
|
||||
mydoJob.setCreateTime(DateUtils.getNowDate());
|
||||
return mydoJobMapper.insertMydoJob(mydoJob);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改作业信息
|
||||
*
|
||||
* @param mydoJob 作业信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateMydoJob(MydoJob mydoJob)
|
||||
{
|
||||
return mydoJobMapper.updateMydoJob(mydoJob);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除作业信息
|
||||
*
|
||||
* @param jobIds 需要删除的作业信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMydoJobByJobIds(String[] jobIds)
|
||||
{
|
||||
return mydoJobMapper.deleteMydoJobByJobIds(jobIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除作业信息信息
|
||||
*
|
||||
* @param jobId 作业信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMydoJobByJobId(String jobId)
|
||||
{
|
||||
return mydoJobMapper.deleteMydoJobByJobId(jobId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MydoJob selectMydoJobByTaskNo(Long rwh) {
|
||||
String s = String.valueOf(rwh);
|
||||
return mydoJobMapper.selectMydoJobByTaskNo(s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean ddjTaskFinish(Long rwh, Integer id,Integer type) {
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("v_rwh", rwh);
|
||||
map.put("v_type",type);
|
||||
map.put("v_ddj_id", id);
|
||||
mydoJobMapper.ddjTaskFinish(map);
|
||||
if (Convert.toInt(map.get("v_result"))==10){
|
||||
return true;
|
||||
}else {
|
||||
throw new RuntimeException(map.get("v_result").toString());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean InvalidMydoJob(Long rwh, Integer id) {
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("v_rwh", rwh);
|
||||
map.put("v_ddj_id", id);
|
||||
mydoJobMapper.InvalidMydoJob(map);
|
||||
if (Convert.toInt(map.get("v_result"))==10){
|
||||
return true;
|
||||
}else {
|
||||
throw new RuntimeException(map.get("v_result").toString());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public MydoJob selectMydoJobByExitList(List<String> exitList) {
|
||||
return mydoJobMapper.selectMydoJobByExitList(exitList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertHistory(String jobId) {
|
||||
mydoJobMapper.insertHistory(jobId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MydoJob> selectInOrOutMydoJobList(MydoJob mydoJob) {
|
||||
return mydoJobMapper.selectInOrOutMydoJobList(mydoJob);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MydoJob selectMydoJobByEntranceList(List<String> entranceList) {
|
||||
return mydoJobMapper.selectMydoJobByEntranceList(entranceList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MydoJob> selectMydoJobFinishList(MydoJob mydoJob) {
|
||||
return mydoJobMapper.selectMydoJobFinishList(mydoJob);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MydoJob selectRunningMydoJobByExitList(List<String> exitList) {
|
||||
return mydoJobMapper.selectRunningMydoJobByExitList(exitList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult manualCallback(String jobId) {
|
||||
MydoJob mydoJob = mydoJobMapper.selectMydoJobByJobId(jobId);
|
||||
if (ObjUtil.isNull(mydoJob)){
|
||||
return AjaxResult.warn("作业不存在");
|
||||
}
|
||||
boolean b = ddjTaskFinish(Convert.toLong(mydoJob.getTaskNo()), Convert.toInt(mydoJob.getRoadwayId()), 1);
|
||||
if (b){
|
||||
return AjaxResult.success("手动回调成功");
|
||||
}
|
||||
return AjaxResult.error("手动回调失败");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.queue.agv.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.queue.agv.domain.AgvQueue;
|
||||
import com.ruoyi.queue.agv.service.IAgvQueueService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* AGV任务队列Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-03
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/agv/queue")
|
||||
public class AgvQueueController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IAgvQueueService agvQueueService;
|
||||
|
||||
/**
|
||||
* 查询AGV任务队列列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('agv:queue:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(AgvQueue agvQueue)
|
||||
{
|
||||
startPage();
|
||||
List<AgvQueue> list = agvQueueService.selectAgvQueueList(agvQueue);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出AGV任务队列列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('agv:queue:export')")
|
||||
@Log(title = "AGV任务队列", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, AgvQueue agvQueue)
|
||||
{
|
||||
List<AgvQueue> list = agvQueueService.selectAgvQueueList(agvQueue);
|
||||
ExcelUtil<AgvQueue> util = new ExcelUtil<AgvQueue>(AgvQueue.class);
|
||||
util.exportExcel(response, list, "AGV任务队列数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取AGV任务队列详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('agv:queue:query')")
|
||||
@GetMapping(value = "/{reqCode}")
|
||||
public AjaxResult getInfo(@PathVariable("reqCode") String reqCode)
|
||||
{
|
||||
return success(agvQueueService.selectAgvQueueByReqCode(reqCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增AGV任务队列
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('agv:queue:add')")
|
||||
@Log(title = "AGV任务队列", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody AgvQueue agvQueue)
|
||||
{
|
||||
return toAjax(agvQueueService.insertAgvQueue(agvQueue));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改AGV任务队列
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('agv:queue:edit')")
|
||||
@Log(title = "AGV任务队列", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody AgvQueue agvQueue)
|
||||
{
|
||||
return toAjax(agvQueueService.updateAgvQueue(agvQueue));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除AGV任务队列
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('agv:queue:remove')")
|
||||
@Log(title = "AGV任务队列", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{reqCodes}")
|
||||
public AjaxResult remove(@PathVariable String[] reqCodes)
|
||||
{
|
||||
return toAjax(agvQueueService.deleteAgvQueueByReqCodes(reqCodes));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.ruoyi.queue.agv.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.queue.agv.domain.AgvQueueFinish;
|
||||
import com.ruoyi.queue.agv.service.IAgvQueueFinishService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* agv历史队列Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-30
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/agv/queueFinish")
|
||||
public class AgvQueueFinishController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IAgvQueueFinishService agvQueueFinishService;
|
||||
|
||||
/**
|
||||
* 查询agv历史队列列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('agv:queueFinish:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(AgvQueueFinish agvQueueFinish)
|
||||
{
|
||||
startPage();
|
||||
List<AgvQueueFinish> list = agvQueueFinishService.selectAgvQueueFinishList(agvQueueFinish);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出agv历史队列列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('agv:queueFinish:export')")
|
||||
@Log(title = "agv历史队列", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, AgvQueueFinish agvQueueFinish)
|
||||
{
|
||||
List<AgvQueueFinish> list = agvQueueFinishService.selectAgvQueueFinishList(agvQueueFinish);
|
||||
ExcelUtil<AgvQueueFinish> util = new ExcelUtil<AgvQueueFinish>(AgvQueueFinish.class);
|
||||
util.exportExcel(response, list, "agv历史队列数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取agv历史队列详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('agv:queueFinish:query')")
|
||||
@GetMapping(value = "/{reqCode}")
|
||||
public AjaxResult getInfo(@PathVariable("reqCode") String reqCode)
|
||||
{
|
||||
return success(agvQueueFinishService.selectAgvQueueFinishByReqCode(reqCode));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增agv历史队列
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('agv:queueFinish:add')")
|
||||
@Log(title = "agv历史队列", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody AgvQueueFinish agvQueueFinish)
|
||||
{
|
||||
return toAjax(agvQueueFinishService.insertAgvQueueFinish(agvQueueFinish));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改agv历史队列
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('agv:queueFinish:edit')")
|
||||
@Log(title = "agv历史队列", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody AgvQueueFinish agvQueueFinish)
|
||||
{
|
||||
return toAjax(agvQueueFinishService.updateAgvQueueFinish(agvQueueFinish));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除agv历史队列
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('agv:queueFinish:remove')")
|
||||
@Log(title = "agv历史队列", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{reqCodes}")
|
||||
public AjaxResult remove(@PathVariable String[] reqCodes)
|
||||
{
|
||||
return toAjax(agvQueueFinishService.deleteAgvQueueFinishByReqCodes(reqCodes));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,277 @@
|
||||
package com.ruoyi.queue.agv.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;
|
||||
|
||||
/**
|
||||
* AGV任务队列对象 agv_queue
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-03
|
||||
*/
|
||||
public class AgvQueue extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 请求编号 */
|
||||
private String reqCode;
|
||||
|
||||
/** 请求时间截 yyyy-MM-dd HH:mm:ss */
|
||||
@Excel(name = "请求时间截 yyyy-MM-dd HH:mm:ss")
|
||||
private String reqTime;
|
||||
|
||||
/** 起点 */
|
||||
@Excel(name = "起点 ")
|
||||
private String positionCode1;
|
||||
|
||||
/** 终点 */
|
||||
@Excel(name = "终点")
|
||||
private String positionCode2;
|
||||
|
||||
/** 任务类型 */
|
||||
@Excel(name = "任务类型 ")
|
||||
private String taskType;
|
||||
|
||||
/** 容器类型 */
|
||||
@Excel(name = "容器类型")
|
||||
private String ctnrType;
|
||||
|
||||
/** 容器编号 */
|
||||
@Excel(name = "容器编号")
|
||||
private String ctnrCode;
|
||||
|
||||
/** 容器数量 */
|
||||
@Excel(name = "容器数量")
|
||||
private String ctnrNum;
|
||||
|
||||
/** 任务模式 */
|
||||
@Excel(name = "任务模式")
|
||||
private String taskMode;
|
||||
|
||||
/** 优先级 */
|
||||
@Excel(name = "优先级")
|
||||
private String priority;
|
||||
|
||||
/** 设备类型 */
|
||||
@Excel(name = "设备类型")
|
||||
private String agvType;
|
||||
|
||||
/** 继续请求 */
|
||||
@Excel(name = "继续请求")
|
||||
private String request;
|
||||
|
||||
/** 结束时间 yyyy-MM-dd HH:mm:ss */
|
||||
@Excel(name = "结束时间 yyyy-MM-dd HH:mm:ss")
|
||||
private String finishTime;
|
||||
|
||||
/** wms托盘码/容器码 */
|
||||
@Excel(name = "wms托盘码/容器码")
|
||||
private String wmsTraycode;
|
||||
|
||||
/** wms任务号 */
|
||||
@Excel(name = "wms任务号")
|
||||
private String wmsTaskNo;
|
||||
|
||||
private String status;
|
||||
|
||||
private String taskCode;
|
||||
|
||||
private String wmsTaskType;
|
||||
|
||||
public String getWmsTaskType() {
|
||||
return wmsTaskType;
|
||||
}
|
||||
|
||||
public void setWmsTaskType(String wmsTaskType) {
|
||||
this.wmsTaskType = wmsTaskType;
|
||||
}
|
||||
|
||||
public String getTaskCode() {
|
||||
return taskCode;
|
||||
}
|
||||
|
||||
public void setTaskCode(String taskCode) {
|
||||
this.taskCode = taskCode;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public void setReqCode(String reqCode)
|
||||
{
|
||||
this.reqCode = reqCode;
|
||||
}
|
||||
|
||||
public String getReqCode()
|
||||
{
|
||||
return reqCode;
|
||||
}
|
||||
|
||||
public void setReqTime(String reqTime)
|
||||
{
|
||||
this.reqTime = reqTime;
|
||||
}
|
||||
|
||||
public String getReqTime()
|
||||
{
|
||||
return reqTime;
|
||||
}
|
||||
|
||||
public void setPositionCode1(String positionCode1)
|
||||
{
|
||||
this.positionCode1 = positionCode1;
|
||||
}
|
||||
|
||||
public String getPositionCode1()
|
||||
{
|
||||
return positionCode1;
|
||||
}
|
||||
|
||||
public void setPositionCode2(String positionCode2)
|
||||
{
|
||||
this.positionCode2 = positionCode2;
|
||||
}
|
||||
|
||||
public String getPositionCode2()
|
||||
{
|
||||
return positionCode2;
|
||||
}
|
||||
|
||||
public void setTaskType(String taskType)
|
||||
{
|
||||
this.taskType = taskType;
|
||||
}
|
||||
|
||||
public String getTaskType()
|
||||
{
|
||||
return taskType;
|
||||
}
|
||||
|
||||
public void setCtnrType(String ctnrType)
|
||||
{
|
||||
this.ctnrType = ctnrType;
|
||||
}
|
||||
|
||||
public String getCtnrType()
|
||||
{
|
||||
return ctnrType;
|
||||
}
|
||||
|
||||
public void setCtnrCode(String ctnrCode)
|
||||
{
|
||||
this.ctnrCode = ctnrCode;
|
||||
}
|
||||
|
||||
public String getCtnrCode()
|
||||
{
|
||||
return ctnrCode;
|
||||
}
|
||||
|
||||
public void setCtnrNum(String ctnrNum)
|
||||
{
|
||||
this.ctnrNum = ctnrNum;
|
||||
}
|
||||
|
||||
public String getCtnrNum()
|
||||
{
|
||||
return ctnrNum;
|
||||
}
|
||||
|
||||
public void setTaskMode(String taskMode)
|
||||
{
|
||||
this.taskMode = taskMode;
|
||||
}
|
||||
|
||||
public String getTaskMode()
|
||||
{
|
||||
return taskMode;
|
||||
}
|
||||
|
||||
public void setPriority(String priority)
|
||||
{
|
||||
this.priority = priority;
|
||||
}
|
||||
|
||||
public String getPriority()
|
||||
{
|
||||
return priority;
|
||||
}
|
||||
|
||||
public void setAgvType(String agvType)
|
||||
{
|
||||
this.agvType = agvType;
|
||||
}
|
||||
|
||||
public String getAgvType()
|
||||
{
|
||||
return agvType;
|
||||
}
|
||||
|
||||
public void setRequest(String request)
|
||||
{
|
||||
this.request = request;
|
||||
}
|
||||
|
||||
public String getRequest()
|
||||
{
|
||||
return request;
|
||||
}
|
||||
|
||||
public void setFinishTime(String finishTime)
|
||||
{
|
||||
this.finishTime = finishTime;
|
||||
}
|
||||
|
||||
public String getFinishTime()
|
||||
{
|
||||
return finishTime;
|
||||
}
|
||||
|
||||
public void setWmsTraycode(String wmsTraycode)
|
||||
{
|
||||
this.wmsTraycode = wmsTraycode;
|
||||
}
|
||||
|
||||
public String getWmsTraycode()
|
||||
{
|
||||
return wmsTraycode;
|
||||
}
|
||||
|
||||
public void setWmsTaskNo(String wmsTaskNo)
|
||||
{
|
||||
this.wmsTaskNo = wmsTaskNo;
|
||||
}
|
||||
|
||||
public String getWmsTaskNo()
|
||||
{
|
||||
return wmsTaskNo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("reqCode", getReqCode())
|
||||
.append("reqTime", getReqTime())
|
||||
.append("positionCode1", getPositionCode1())
|
||||
.append("positionCode2", getPositionCode2())
|
||||
.append("taskType", getTaskType())
|
||||
.append("ctnrType", getCtnrType())
|
||||
.append("ctnrCode", getCtnrCode())
|
||||
.append("ctnrNum", getCtnrNum())
|
||||
.append("taskMode", getTaskMode())
|
||||
.append("priority", getPriority())
|
||||
.append("agvType", getAgvType())
|
||||
.append("request", getRequest())
|
||||
.append("finishTime", getFinishTime())
|
||||
.append("wmsTraycode", getWmsTraycode())
|
||||
.append("wmsTaskNo", getWmsTaskNo())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,292 @@
|
||||
package com.ruoyi.queue.agv.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;
|
||||
|
||||
/**
|
||||
* agv历史队列对象 agv_queue_finish
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-30
|
||||
*/
|
||||
public class AgvQueueFinish extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 请求编号 */
|
||||
private String reqCode;
|
||||
|
||||
/** 请求时间 */
|
||||
@Excel(name = "请求时间")
|
||||
private String reqTime;
|
||||
|
||||
/** 起点 */
|
||||
@Excel(name = "起点 ")
|
||||
private String positionCode1;
|
||||
|
||||
/** 终点 */
|
||||
@Excel(name = "终点")
|
||||
private String positionCode2;
|
||||
|
||||
/** 任务类型 */
|
||||
@Excel(name = "任务类型 ")
|
||||
private String taskType;
|
||||
|
||||
/** 容器类型 */
|
||||
@Excel(name = "容器类型")
|
||||
private String ctnrType;
|
||||
|
||||
/** 容器编号 */
|
||||
@Excel(name = "容器编号")
|
||||
private String ctnrCode;
|
||||
|
||||
/** 容器数量 */
|
||||
@Excel(name = "容器数量")
|
||||
private String ctnrNum;
|
||||
|
||||
/** 任务模式 */
|
||||
@Excel(name = "任务模式")
|
||||
private String taskMode;
|
||||
|
||||
/** 优先级 */
|
||||
@Excel(name = "优先级")
|
||||
private String priority;
|
||||
|
||||
/** 设备类型 */
|
||||
@Excel(name = "设备类型")
|
||||
private String agvType;
|
||||
|
||||
/** 继续请求 */
|
||||
@Excel(name = "继续请求")
|
||||
private String request;
|
||||
|
||||
/** 结束时间 */
|
||||
@Excel(name = "结束时间")
|
||||
private String finishTime;
|
||||
|
||||
/** wms托盘码/容器码 */
|
||||
@Excel(name = "wms托盘码/容器码")
|
||||
private String wmsTraycode;
|
||||
|
||||
/** wms任务号 */
|
||||
@Excel(name = "wms任务号")
|
||||
private String wmsTaskNo;
|
||||
|
||||
/** 任务单号 */
|
||||
@Excel(name = "任务单号")
|
||||
private String taskCode;
|
||||
|
||||
/** 任务状态 */
|
||||
@Excel(name = "任务状态")
|
||||
private String status;
|
||||
|
||||
/** wms任务类型 */
|
||||
@Excel(name = "wms任务类型")
|
||||
private String wmsTaskType;
|
||||
|
||||
public void setReqCode(String reqCode)
|
||||
{
|
||||
this.reqCode = reqCode;
|
||||
}
|
||||
|
||||
public String getReqCode()
|
||||
{
|
||||
return reqCode;
|
||||
}
|
||||
|
||||
public void setReqTime(String reqTime)
|
||||
{
|
||||
this.reqTime = reqTime;
|
||||
}
|
||||
|
||||
public String getReqTime()
|
||||
{
|
||||
return reqTime;
|
||||
}
|
||||
|
||||
public void setPositionCode1(String positionCode1)
|
||||
{
|
||||
this.positionCode1 = positionCode1;
|
||||
}
|
||||
|
||||
public String getPositionCode1()
|
||||
{
|
||||
return positionCode1;
|
||||
}
|
||||
|
||||
public void setPositionCode2(String positionCode2)
|
||||
{
|
||||
this.positionCode2 = positionCode2;
|
||||
}
|
||||
|
||||
public String getPositionCode2()
|
||||
{
|
||||
return positionCode2;
|
||||
}
|
||||
|
||||
public void setTaskType(String taskType)
|
||||
{
|
||||
this.taskType = taskType;
|
||||
}
|
||||
|
||||
public String getTaskType()
|
||||
{
|
||||
return taskType;
|
||||
}
|
||||
|
||||
public void setCtnrType(String ctnrType)
|
||||
{
|
||||
this.ctnrType = ctnrType;
|
||||
}
|
||||
|
||||
public String getCtnrType()
|
||||
{
|
||||
return ctnrType;
|
||||
}
|
||||
|
||||
public void setCtnrCode(String ctnrCode)
|
||||
{
|
||||
this.ctnrCode = ctnrCode;
|
||||
}
|
||||
|
||||
public String getCtnrCode()
|
||||
{
|
||||
return ctnrCode;
|
||||
}
|
||||
|
||||
public void setCtnrNum(String ctnrNum)
|
||||
{
|
||||
this.ctnrNum = ctnrNum;
|
||||
}
|
||||
|
||||
public String getCtnrNum()
|
||||
{
|
||||
return ctnrNum;
|
||||
}
|
||||
|
||||
public void setTaskMode(String taskMode)
|
||||
{
|
||||
this.taskMode = taskMode;
|
||||
}
|
||||
|
||||
public String getTaskMode()
|
||||
{
|
||||
return taskMode;
|
||||
}
|
||||
|
||||
public void setPriority(String priority)
|
||||
{
|
||||
this.priority = priority;
|
||||
}
|
||||
|
||||
public String getPriority()
|
||||
{
|
||||
return priority;
|
||||
}
|
||||
|
||||
public void setAgvType(String agvType)
|
||||
{
|
||||
this.agvType = agvType;
|
||||
}
|
||||
|
||||
public String getAgvType()
|
||||
{
|
||||
return agvType;
|
||||
}
|
||||
|
||||
public void setRequest(String request)
|
||||
{
|
||||
this.request = request;
|
||||
}
|
||||
|
||||
public String getRequest()
|
||||
{
|
||||
return request;
|
||||
}
|
||||
|
||||
public void setFinishTime(String finishTime)
|
||||
{
|
||||
this.finishTime = finishTime;
|
||||
}
|
||||
|
||||
public String getFinishTime()
|
||||
{
|
||||
return finishTime;
|
||||
}
|
||||
|
||||
public void setWmsTraycode(String wmsTraycode)
|
||||
{
|
||||
this.wmsTraycode = wmsTraycode;
|
||||
}
|
||||
|
||||
public String getWmsTraycode()
|
||||
{
|
||||
return wmsTraycode;
|
||||
}
|
||||
|
||||
public void setWmsTaskNo(String wmsTaskNo)
|
||||
{
|
||||
this.wmsTaskNo = wmsTaskNo;
|
||||
}
|
||||
|
||||
public String getWmsTaskNo()
|
||||
{
|
||||
return wmsTaskNo;
|
||||
}
|
||||
|
||||
public void setTaskCode(String taskCode)
|
||||
{
|
||||
this.taskCode = taskCode;
|
||||
}
|
||||
|
||||
public String getTaskCode()
|
||||
{
|
||||
return taskCode;
|
||||
}
|
||||
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setWmsTaskType(String wmsTaskType)
|
||||
{
|
||||
this.wmsTaskType = wmsTaskType;
|
||||
}
|
||||
|
||||
public String getWmsTaskType()
|
||||
{
|
||||
return wmsTaskType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("reqCode", getReqCode())
|
||||
.append("reqTime", getReqTime())
|
||||
.append("positionCode1", getPositionCode1())
|
||||
.append("positionCode2", getPositionCode2())
|
||||
.append("taskType", getTaskType())
|
||||
.append("ctnrType", getCtnrType())
|
||||
.append("ctnrCode", getCtnrCode())
|
||||
.append("ctnrNum", getCtnrNum())
|
||||
.append("taskMode", getTaskMode())
|
||||
.append("priority", getPriority())
|
||||
.append("agvType", getAgvType())
|
||||
.append("request", getRequest())
|
||||
.append("finishTime", getFinishTime())
|
||||
.append("wmsTraycode", getWmsTraycode())
|
||||
.append("wmsTaskNo", getWmsTaskNo())
|
||||
.append("taskCode", getTaskCode())
|
||||
.append("status", getStatus())
|
||||
.append("wmsTaskType", getWmsTaskType())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.queue.agv.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.queue.agv.domain.AgvQueueFinish;
|
||||
|
||||
/**
|
||||
* agv历史队列Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-30
|
||||
*/
|
||||
public interface AgvQueueFinishMapper
|
||||
{
|
||||
/**
|
||||
* 查询agv历史队列
|
||||
*
|
||||
* @param reqCode agv历史队列主键
|
||||
* @return agv历史队列
|
||||
*/
|
||||
public AgvQueueFinish selectAgvQueueFinishByReqCode(String reqCode);
|
||||
|
||||
/**
|
||||
* 查询agv历史队列列表
|
||||
*
|
||||
* @param agvQueueFinish agv历史队列
|
||||
* @return agv历史队列集合
|
||||
*/
|
||||
public List<AgvQueueFinish> selectAgvQueueFinishList(AgvQueueFinish agvQueueFinish);
|
||||
|
||||
/**
|
||||
* 新增agv历史队列
|
||||
*
|
||||
* @param agvQueueFinish agv历史队列
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertAgvQueueFinish(AgvQueueFinish agvQueueFinish);
|
||||
|
||||
/**
|
||||
* 修改agv历史队列
|
||||
*
|
||||
* @param agvQueueFinish agv历史队列
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateAgvQueueFinish(AgvQueueFinish agvQueueFinish);
|
||||
|
||||
/**
|
||||
* 删除agv历史队列
|
||||
*
|
||||
* @param reqCode agv历史队列主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAgvQueueFinishByReqCode(String reqCode);
|
||||
|
||||
/**
|
||||
* 批量删除agv历史队列
|
||||
*
|
||||
* @param reqCodes 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteAgvQueueFinishByReqCodes(String[] reqCodes);
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user