first commit
This commit is contained in:
31
.gitignore
vendored
Normal file
31
.gitignore
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
# ---> Java
|
||||
# Compiled class file
|
||||
*.class
|
||||
|
||||
# Log file
|
||||
*.log
|
||||
|
||||
# BlueJ files
|
||||
*.ctxt
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
/**/target/**
|
||||
.idea/**
|
||||
.workbuddy/**
|
||||
.claude/**
|
||||
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
*.war
|
||||
*.nar
|
||||
*.ear
|
||||
*.zip
|
||||
*.tar.gz
|
||||
*.rar
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
replay_pid*
|
||||
|
||||
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.
|
||||
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.
6
package-lock.json
generated
Normal file
6
package-lock.json
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "FT576-WCS",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {}
|
||||
}
|
||||
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>2.0.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>
|
||||
21
ruoyi-admin/src/main/java/com/ruoyi/MyStartupRunner.java
Normal file
21
ruoyi-admin/src/main/java/com/ruoyi/MyStartupRunner.java
Normal file
@@ -0,0 +1,21 @@
|
||||
package com.ruoyi;
|
||||
|
||||
import com.ruoyi.schedule.ScheduleThread;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.CommandLineRunner;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class MyStartupRunner implements CommandLineRunner {
|
||||
|
||||
@Autowired
|
||||
private ScheduleThread scheduleThread;
|
||||
|
||||
@Override
|
||||
public void run(String... args) throws Exception {
|
||||
// 这里编写项目启动后要执行的方法逻辑
|
||||
//System.out.println("项目启动成功后自动执行此方法");
|
||||
scheduleThread.startAllThread();
|
||||
scheduleThread.startAllThread2();
|
||||
}
|
||||
}
|
||||
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,303 @@
|
||||
package com.ruoyi.api.controller;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.device.ddj.domain.MsgDdj;
|
||||
import com.ruoyi.device.ddj.service.IMsgDdjService;
|
||||
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;
|
||||
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 java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 首页数据Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-01-08
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/index")
|
||||
public class IndexController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IDeviceSsjService deviceSsjService;
|
||||
|
||||
@Autowired
|
||||
private IMsgDdjService msgDdjService;
|
||||
|
||||
@Autowired
|
||||
private IMydoJobService mydoJobService;
|
||||
|
||||
|
||||
/**
|
||||
* 获取设备统计数据
|
||||
*/
|
||||
@GetMapping("/deviceStats")
|
||||
public AjaxResult getDeviceStats() {
|
||||
try {
|
||||
MsgDdj msgDdj = new MsgDdj();
|
||||
DeviceSsj deviceSsj = new DeviceSsj();
|
||||
List<MsgDdj> msgDdjList = msgDdjService.selectMsgDdjList(msgDdj);
|
||||
List<DeviceSsj> deviceSsjList = deviceSsjService.selectDeviceSsjList(deviceSsj);
|
||||
|
||||
Map<String, Object> count = new HashMap<>();
|
||||
|
||||
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();
|
||||
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){
|
||||
Integer 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<>());
|
||||
|
||||
// 查询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){
|
||||
Integer 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,99 @@
|
||||
package com.ruoyi.api.controller;
|
||||
|
||||
import com.ruoyi.api.domain.RequestLog;
|
||||
import com.ruoyi.api.service.IRequestLogService;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 接口记录Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-11
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/device/api")
|
||||
public class RequestLogController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRequestLogService requestLogService;
|
||||
|
||||
/**
|
||||
* 查询接口记录列表
|
||||
*/
|
||||
@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,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,22 @@
|
||||
package com.ruoyi.api.domain.wcs2wms;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class JobParam {
|
||||
private String trayCode;
|
||||
private BigDecimal weight;
|
||||
private Integer height;
|
||||
private String roadwayId;
|
||||
private Integer taskNo;
|
||||
private String warehouseId;
|
||||
private String location;
|
||||
private String stockinDetailId;
|
||||
private String trayType;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
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;
|
||||
private String warehouseId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
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);
|
||||
/**
|
||||
* 删除错误接口记录
|
||||
*/
|
||||
void deleteRequestLog(String format);
|
||||
}
|
||||
108
ruoyi-admin/src/main/java/com/ruoyi/api/service/IApiService.java
Normal file
108
ruoyi-admin/src/main/java/com/ruoyi/api/service/IApiService.java
Normal file
@@ -0,0 +1,108 @@
|
||||
package com.ruoyi.api.service;
|
||||
|
||||
import com.ruoyi.api.domain.RequestLog;
|
||||
import com.ruoyi.api.domain.wcs2wms.JobParam;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.job.domain.MydoJob;
|
||||
import com.ruoyi.queue.agv.domain.AgvQueue;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 接口记录Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-06-11
|
||||
*/
|
||||
public interface IApiService {
|
||||
/**
|
||||
* 任务到达拣选口
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
AjaxResult finishMydoJob(Map<String, Object> param);
|
||||
|
||||
/**
|
||||
* 出库任务清空货位
|
||||
*
|
||||
* @param param
|
||||
* @return
|
||||
*/
|
||||
AjaxResult cleanCargoSpace(Map<String, Object> param);
|
||||
|
||||
/**
|
||||
* 放货有货,重新分配货位
|
||||
*
|
||||
* @param jobParam
|
||||
* @return
|
||||
*/
|
||||
AjaxResult reAssign(JobParam jobParam);
|
||||
|
||||
/**
|
||||
* 取货无货,重新分配单据
|
||||
*
|
||||
* @param jobParam
|
||||
* @return
|
||||
*/
|
||||
AjaxResult reMaterial(JobParam jobParam);
|
||||
|
||||
/**
|
||||
* 获取入库任务
|
||||
*
|
||||
* @param jobParam
|
||||
* @return
|
||||
*/
|
||||
AjaxResult getInJob(JobParam jobParam);
|
||||
|
||||
/**
|
||||
* 获取入库货位
|
||||
*
|
||||
* @param jobParam
|
||||
* @return
|
||||
*/
|
||||
AjaxResult getInCargoSpace(JobParam jobParam);
|
||||
|
||||
/**
|
||||
* 获取出库任务
|
||||
*
|
||||
* @param jobParam
|
||||
* @return
|
||||
*/
|
||||
AjaxResult getOutJob(JobParam jobParam);
|
||||
|
||||
/**
|
||||
* 更新出库任务状态
|
||||
*
|
||||
* @param jobParam
|
||||
*/
|
||||
AjaxResult updateOutJobStatus(JobParam jobParam);
|
||||
|
||||
/**
|
||||
* 获取空托盘出库作业
|
||||
*/
|
||||
AjaxResult getKtpOutJob(JobParam jobParam);
|
||||
|
||||
/**
|
||||
* 请求机械手抓取
|
||||
*
|
||||
* @param jobParam
|
||||
* @return
|
||||
*/
|
||||
AjaxResult getJxsQueue(JobParam jobParam);
|
||||
|
||||
/**
|
||||
* 机械手放货成功
|
||||
*/
|
||||
public AjaxResult callJxsFinishIn(JobParam jobParam);
|
||||
|
||||
/**
|
||||
*出库确认
|
||||
*/
|
||||
public AjaxResult ckMakeSure(JobParam jobParam);
|
||||
|
||||
public AjaxResult addInJob(JobParam jobParam);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
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);
|
||||
|
||||
/**
|
||||
* 删除接口记录
|
||||
*/
|
||||
void deleteRequestLog();
|
||||
}
|
||||
@@ -0,0 +1,191 @@
|
||||
package com.ruoyi.api.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
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.wcs2wms.JobParam;
|
||||
import com.ruoyi.api.service.IApiService;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
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 com.ruoyi.queue.ddj.service.impl.DdjDeviceExecutionQueueServiceImpl;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
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 IMydoJobService mydoJobService;
|
||||
@Autowired
|
||||
private DdjDeviceExecutionQueueServiceImpl ddjDeviceExecutionQueueServiceImpl;
|
||||
@Autowired
|
||||
private IAgvQueueService agvQueueService;
|
||||
|
||||
|
||||
@Override
|
||||
public AjaxResult finishMydoJob(Map<String, Object> param) {
|
||||
RequestLog requestLog = requestLogService.getRequestLog(JOB_FINISH_URL, "任务结束", JSONUtil.toJsonStr(param));
|
||||
InterfaceReceive bean = JSONUtil.toBean(requestLog.getResponseBody(), InterfaceReceive.class);
|
||||
if ("1".equals(requestLog.getIsSuccessful())) {
|
||||
return AjaxResult.success(bean.getData());
|
||||
} else {
|
||||
return AjaxResult.error(bean.getMsg());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult cleanCargoSpace(Map<String, Object> param) {
|
||||
RequestLog requestLog = requestLogService.getRequestLog(CLEAN_SPACE_URL, "清空货位", JSONUtil.toJsonStr(param));
|
||||
InterfaceReceive bean = JSONUtil.toBean(requestLog.getResponseBody(), InterfaceReceive.class);
|
||||
if ("1".equals(requestLog.getIsSuccessful())) {
|
||||
return AjaxResult.success(bean.getData());
|
||||
} else {
|
||||
return AjaxResult.error(bean.getMsg());
|
||||
}
|
||||
}
|
||||
|
||||
@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();
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getInJob(JobParam jobParam) {
|
||||
RequestLog requestLog = requestLogService.getRequestLog(GET_IN_JOB_URL, "请求获取入库作业", JSONUtil.toJsonStr(jobParam));
|
||||
InterfaceReceive bean = JSONUtil.toBean(requestLog.getResponseBody(), InterfaceReceive.class);
|
||||
if ("1".equals(requestLog.getIsSuccessful())) {
|
||||
return AjaxResult.success(bean.getData());
|
||||
} else {
|
||||
return AjaxResult.error(bean.getMsg());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getInCargoSpace(JobParam jobParam) {
|
||||
RequestLog requestLog = requestLogService.getRequestLog(GET_IN_CARGO_SPACE_URL, "请求入库分配货位", JSONUtil.toJsonStr(jobParam));
|
||||
InterfaceReceive bean = JSONUtil.toBean(requestLog.getResponseBody(), InterfaceReceive.class);
|
||||
if ("1".equals(requestLog.getIsSuccessful())) {
|
||||
return AjaxResult.success(bean.getData());
|
||||
} else {
|
||||
return AjaxResult.error(bean.getMsg());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getOutJob(JobParam jobParam) {
|
||||
RequestLog requestLog = requestLogService.getRequestLog(GET_OUT_JOB_URL, "请求出库任务", JSONUtil.toJsonStr(jobParam));
|
||||
InterfaceReceive bean = JSONUtil.toBean(requestLog.getResponseBody(), InterfaceReceive.class);
|
||||
if ("1".equals(requestLog.getIsSuccessful())) {
|
||||
return AjaxResult.success(bean.getData());
|
||||
} else {
|
||||
return AjaxResult.error(bean.getMsg());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult updateOutJobStatus(JobParam jobParam) {
|
||||
RequestLog requestLog = requestLogService.getRequestLog(UPDATE_OUT_JOB_URL, "通知出库任务下发成功", JSONUtil.toJsonStr(jobParam));
|
||||
InterfaceReceive bean = JSONUtil.toBean(requestLog.getResponseBody(), InterfaceReceive.class);
|
||||
if ("1".equals(requestLog.getIsSuccessful())) {
|
||||
return AjaxResult.success(bean.getData());
|
||||
} else {
|
||||
return AjaxResult.error(bean.getMsg());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getKtpOutJob(JobParam jobParam) {
|
||||
RequestLog requestLog = requestLogService.getRequestLog(GET_KTP_OUT_JOB_URL, "请求生成空托盘出库任务", JSONUtil.toJsonStr(jobParam));
|
||||
InterfaceReceive bean = JSONUtil.toBean(requestLog.getResponseBody(), InterfaceReceive.class);
|
||||
if ("1".equals(requestLog.getIsSuccessful())) {
|
||||
return AjaxResult.success(bean.getData());
|
||||
} else {
|
||||
return AjaxResult.error(bean.getMsg());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult getJxsQueue(JobParam jobParam) {
|
||||
RequestLog requestLog = requestLogService.getRequestLog(GET_JXS_QUEUE_URL, "请求生成空托盘出库任务", JSONUtil.toJsonStr(jobParam));
|
||||
InterfaceReceive bean = JSONUtil.toBean(requestLog.getResponseBody(), InterfaceReceive.class);
|
||||
if ("1".equals(requestLog.getIsSuccessful())) {
|
||||
return AjaxResult.success(bean.getData());
|
||||
} else {
|
||||
return AjaxResult.error(bean.getMsg());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public AjaxResult callJxsFinishIn(JobParam jobParam) {
|
||||
RequestLog requestLog = requestLogService.getRequestLog(JXS_FINISH_IN, "机械手请求放货完成", JSONUtil.toJsonStr(jobParam));
|
||||
InterfaceReceive bean = JSONUtil.toBean(requestLog.getResponseBody(), InterfaceReceive.class);
|
||||
if ("1".equals(requestLog.getIsSuccessful())) {
|
||||
return AjaxResult.success(bean.getData());
|
||||
} else {
|
||||
return AjaxResult.error(bean.getMsg());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public AjaxResult ckMakeSure(JobParam jobParam) {
|
||||
RequestLog requestLog = requestLogService.getRequestLog(CK_MAKE_SURE, "出库确认", JSONUtil.toJsonStr(jobParam));
|
||||
InterfaceReceive bean = JSONUtil.toBean(requestLog.getResponseBody(), InterfaceReceive.class);
|
||||
if ("1".equals(requestLog.getIsSuccessful())) {
|
||||
return AjaxResult.success(bean.getData());
|
||||
} else {
|
||||
return AjaxResult.error(bean.getMsg());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AjaxResult addInJob(JobParam jobParam) {
|
||||
RequestLog requestLog = requestLogService.getRequestLog(ADD_IN_JOB, "生成入库作业", JSONUtil.toJsonStr(jobParam));
|
||||
InterfaceReceive bean = JSONUtil.toBean(requestLog.getResponseBody(), InterfaceReceive.class);
|
||||
if ("1".equals(requestLog.getIsSuccessful())) {
|
||||
return AjaxResult.success(bean.getData());
|
||||
} else {
|
||||
return AjaxResult.error(bean.getMsg());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,185 @@
|
||||
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;
|
||||
}*/
|
||||
return requestLogMapper.insertRequestLog(requestLog);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改接口记录
|
||||
*
|
||||
* @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;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除接口记录
|
||||
*/
|
||||
@Override
|
||||
public void deleteRequestLog() {
|
||||
//获取15天前的时间
|
||||
Date date = DateUtil.offsetDay(new Date(), -15);
|
||||
requestLogMapper.deleteRequestLog(DateUtil.format(date, "yyyy-MM-dd HH:mm:ss"));
|
||||
}
|
||||
}
|
||||
@@ -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,107 @@
|
||||
package com.ruoyi.bas.cargospace.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;
|
||||
|
||||
/**
|
||||
* 库存信息对象 bas_cargo_space
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-09-23
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
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 Integer thePlatoon;
|
||||
|
||||
/** 列(不允许为空) */
|
||||
@Excel(name = "列", readConverterExp = "不=允许为空")
|
||||
private Integer theColumn;
|
||||
|
||||
/** 层(不允许为空) */
|
||||
@Excel(name = "层", readConverterExp = "不=允许为空")
|
||||
private Integer 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;
|
||||
|
||||
private Double distance;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.ruoyi.bas.cargospace.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.bas.cargospace.domain.BasCargoSpace;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 库存信息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);
|
||||
|
||||
public int deleteBasCargoSpaceByCargoSpaceId(String cargoSpaceId);
|
||||
|
||||
public int deleteBasCargoSpaceByCargoSpaceIds(String[] cargoSpaceIds);
|
||||
|
||||
public BasCargoSpace selectBasCargoSpaceByWmsCargoSpaceId(String cargoSpaceId);
|
||||
|
||||
/**
|
||||
* 删除库存信息
|
||||
*
|
||||
* @param cargoSpaceId 库存信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* 批量删除库存信息
|
||||
*
|
||||
* @param cargoSpaceIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
|
||||
void updateStatusByCargoSpaceId(@Param("cargoSpaceId") String cargoSpaceId, @Param("status") String number);
|
||||
}
|
||||
@@ -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.fault.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.fault.domain.BasFaultRecord;
|
||||
import com.ruoyi.bas.fault.service.IBasFaultRecordService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 设备故障记录Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-16
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/bas/falut")
|
||||
public class BasFaultRecordController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IBasFaultRecordService basFaultRecordService;
|
||||
|
||||
/**
|
||||
* 查询设备故障记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bas:falut:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BasFaultRecord basFaultRecord)
|
||||
{
|
||||
startPage();
|
||||
List<BasFaultRecord> list = basFaultRecordService.selectBasFaultRecordList(basFaultRecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出设备故障记录列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bas:falut:export')")
|
||||
@Log(title = "设备故障记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BasFaultRecord basFaultRecord)
|
||||
{
|
||||
List<BasFaultRecord> list = basFaultRecordService.selectBasFaultRecordList(basFaultRecord);
|
||||
ExcelUtil<BasFaultRecord> util = new ExcelUtil<BasFaultRecord>(BasFaultRecord.class);
|
||||
util.exportExcel(response, list, "设备故障记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取设备故障记录详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bas:falut:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
return success(basFaultRecordService.selectBasFaultRecordById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备故障记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bas:falut:add')")
|
||||
@Log(title = "设备故障记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BasFaultRecord basFaultRecord)
|
||||
{
|
||||
return toAjax(basFaultRecordService.insertBasFaultRecord(basFaultRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备故障记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bas:falut:edit')")
|
||||
@Log(title = "设备故障记录", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BasFaultRecord basFaultRecord)
|
||||
{
|
||||
return toAjax(basFaultRecordService.updateBasFaultRecord(basFaultRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备故障记录
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bas:falut:remove')")
|
||||
@Log(title = "设备故障记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
return toAjax(basFaultRecordService.deleteBasFaultRecordByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,157 @@
|
||||
package com.ruoyi.bas.fault.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_fault_record
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-16
|
||||
*/
|
||||
public class BasFaultRecord extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id 主键 */
|
||||
private String id;
|
||||
|
||||
/** 设备id */
|
||||
@Excel(name = "设备id")
|
||||
private String deviceId;
|
||||
|
||||
/** 设备名称 */
|
||||
@Excel(name = "设备名称")
|
||||
private String deviceName;
|
||||
|
||||
/** 设备类型 */
|
||||
@Excel(name = "设备类型")
|
||||
private String deviceType;
|
||||
|
||||
/** 任务号 */
|
||||
@Excel(name = "任务号")
|
||||
private String taskNo;
|
||||
|
||||
/** 作业id */
|
||||
@Excel(name = "作业id ")
|
||||
private String jobId;
|
||||
|
||||
/** 报警信息 */
|
||||
@Excel(name = "报警信息")
|
||||
private String fault;
|
||||
|
||||
/** 报警开始时间 */
|
||||
@Excel(name = "报警开始时间")
|
||||
private String startTime;
|
||||
|
||||
/** 报警结束时间 */
|
||||
@Excel(name = "报警结束时间")
|
||||
private String finishTime;
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId)
|
||||
{
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public String getDeviceId()
|
||||
{
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceName(String deviceName)
|
||||
{
|
||||
this.deviceName = deviceName;
|
||||
}
|
||||
|
||||
public String getDeviceName()
|
||||
{
|
||||
return deviceName;
|
||||
}
|
||||
|
||||
public void setDeviceType(String deviceType)
|
||||
{
|
||||
this.deviceType = deviceType;
|
||||
}
|
||||
|
||||
public String getDeviceType()
|
||||
{
|
||||
return deviceType;
|
||||
}
|
||||
|
||||
public void setTaskNo(String taskNo)
|
||||
{
|
||||
this.taskNo = taskNo;
|
||||
}
|
||||
|
||||
public String getTaskNo()
|
||||
{
|
||||
return taskNo;
|
||||
}
|
||||
|
||||
public void setJobId(String jobId)
|
||||
{
|
||||
this.jobId = jobId;
|
||||
}
|
||||
|
||||
public String getJobId()
|
||||
{
|
||||
return jobId;
|
||||
}
|
||||
|
||||
public void setFault(String fault)
|
||||
{
|
||||
this.fault = fault;
|
||||
}
|
||||
|
||||
public String getFault()
|
||||
{
|
||||
return fault;
|
||||
}
|
||||
|
||||
public void setStartTime(String startTime)
|
||||
{
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public String getStartTime()
|
||||
{
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public void setFinishTime(String finishTime)
|
||||
{
|
||||
this.finishTime = finishTime;
|
||||
}
|
||||
|
||||
public String getFinishTime()
|
||||
{
|
||||
return finishTime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("deviceId", getDeviceId())
|
||||
.append("deviceName", getDeviceName())
|
||||
.append("deviceType", getDeviceType())
|
||||
.append("taskNo", getTaskNo())
|
||||
.append("jobId", getJobId())
|
||||
.append("fault", getFault())
|
||||
.append("startTime", getStartTime())
|
||||
.append("finishTime", getFinishTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.ruoyi.bas.fault.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.bas.fault.domain.BasFaultRecord;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 设备故障记录Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-16
|
||||
*/
|
||||
public interface BasFaultRecordMapper
|
||||
{
|
||||
/**
|
||||
* 查询设备故障记录
|
||||
*
|
||||
* @param id 设备故障记录主键
|
||||
* @return 设备故障记录
|
||||
*/
|
||||
public BasFaultRecord selectBasFaultRecordById(String id);
|
||||
|
||||
/**
|
||||
* 查询设备故障记录列表
|
||||
*
|
||||
* @param basFaultRecord 设备故障记录
|
||||
* @return 设备故障记录集合
|
||||
*/
|
||||
public List<BasFaultRecord> selectBasFaultRecordList(BasFaultRecord basFaultRecord);
|
||||
|
||||
/**
|
||||
* 新增设备故障记录
|
||||
*
|
||||
* @param basFaultRecord 设备故障记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBasFaultRecord(BasFaultRecord basFaultRecord);
|
||||
|
||||
/**
|
||||
* 修改设备故障记录
|
||||
*
|
||||
* @param basFaultRecord 设备故障记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBasFaultRecord(BasFaultRecord basFaultRecord);
|
||||
|
||||
/**
|
||||
* 删除设备故障记录
|
||||
*
|
||||
* @param id 设备故障记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasFaultRecordById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除设备故障记录
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasFaultRecordByIds(String[] ids);
|
||||
|
||||
List<BasFaultRecord> selectFaultRecord(@Param("deviceIds") List<String> deviceIds);
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.ruoyi.bas.fault.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.bas.fault.domain.BasFaultRecord;
|
||||
import com.ruoyi.job.domain.MydoJob;
|
||||
|
||||
/**
|
||||
* 设备故障记录Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-16
|
||||
*/
|
||||
public interface IBasFaultRecordService
|
||||
{
|
||||
/**
|
||||
* 查询设备故障记录
|
||||
*
|
||||
* @param id 设备故障记录主键
|
||||
* @return 设备故障记录
|
||||
*/
|
||||
public BasFaultRecord selectBasFaultRecordById(String id);
|
||||
|
||||
/**
|
||||
* 查询设备故障记录列表
|
||||
*
|
||||
* @param basFaultRecord 设备故障记录
|
||||
* @return 设备故障记录集合
|
||||
*/
|
||||
public List<BasFaultRecord> selectBasFaultRecordList(BasFaultRecord basFaultRecord);
|
||||
|
||||
/**
|
||||
* 新增设备故障记录
|
||||
*
|
||||
* @param basFaultRecord 设备故障记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBasFaultRecord(BasFaultRecord basFaultRecord);
|
||||
|
||||
/**
|
||||
* 修改设备故障记录
|
||||
*
|
||||
* @param basFaultRecord 设备故障记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBasFaultRecord(BasFaultRecord basFaultRecord);
|
||||
|
||||
/**
|
||||
* 批量删除设备故障记录
|
||||
*
|
||||
* @param ids 需要删除的设备故障记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasFaultRecordByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除设备故障记录信息
|
||||
*
|
||||
* @param id 设备故障记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBasFaultRecordById(String id);
|
||||
|
||||
List<BasFaultRecord> selectFaultRecord(String warehouseId, String type);
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
package com.ruoyi.bas.fault.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.ruoyi.job.domain.MydoJob;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.bas.fault.mapper.BasFaultRecordMapper;
|
||||
import com.ruoyi.bas.fault.domain.BasFaultRecord;
|
||||
import com.ruoyi.bas.fault.service.IBasFaultRecordService;
|
||||
|
||||
/**
|
||||
* 设备故障记录Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-01-16
|
||||
*/
|
||||
@Service
|
||||
public class BasFaultRecordServiceImpl implements IBasFaultRecordService
|
||||
{
|
||||
@Autowired
|
||||
private BasFaultRecordMapper basFaultRecordMapper;
|
||||
|
||||
/**
|
||||
* 查询设备故障记录
|
||||
*
|
||||
* @param id 设备故障记录主键
|
||||
* @return 设备故障记录
|
||||
*/
|
||||
@Override
|
||||
public BasFaultRecord selectBasFaultRecordById(String id)
|
||||
{
|
||||
return basFaultRecordMapper.selectBasFaultRecordById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备故障记录列表
|
||||
*
|
||||
* @param basFaultRecord 设备故障记录
|
||||
* @return 设备故障记录
|
||||
*/
|
||||
@Override
|
||||
public List<BasFaultRecord> selectBasFaultRecordList(BasFaultRecord basFaultRecord)
|
||||
{
|
||||
return basFaultRecordMapper.selectBasFaultRecordList(basFaultRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备故障记录
|
||||
*
|
||||
* @param basFaultRecord 设备故障记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBasFaultRecord(BasFaultRecord basFaultRecord)
|
||||
{
|
||||
return basFaultRecordMapper.insertBasFaultRecord(basFaultRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备故障记录
|
||||
*
|
||||
* @param basFaultRecord 设备故障记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBasFaultRecord(BasFaultRecord basFaultRecord)
|
||||
{
|
||||
return basFaultRecordMapper.updateBasFaultRecord(basFaultRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除设备故障记录
|
||||
*
|
||||
* @param ids 需要删除的设备故障记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBasFaultRecordByIds(String[] ids)
|
||||
{
|
||||
return basFaultRecordMapper.deleteBasFaultRecordByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备故障记录信息
|
||||
*
|
||||
* @param id 设备故障记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBasFaultRecordById(String id)
|
||||
{
|
||||
return basFaultRecordMapper.deleteBasFaultRecordById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BasFaultRecord> selectFaultRecord(String warehouseId, String type) {
|
||||
List<String> deviceIds = new ArrayList<>();
|
||||
if ("01".equals(warehouseId)) {
|
||||
deviceIds.add("1");
|
||||
deviceIds.add("2");
|
||||
deviceIds.add("3");
|
||||
if ("1".equals(type)){
|
||||
deviceIds.add("L2001");
|
||||
deviceIds.add("L2002");
|
||||
deviceIds.add("L2003");
|
||||
deviceIds.add("L2004");
|
||||
deviceIds.add("L2005");
|
||||
deviceIds.add("L2006");
|
||||
}else if ("2".equals(type)){
|
||||
deviceIds.add("L2007");
|
||||
deviceIds.add("L2008");
|
||||
deviceIds.add("L2009");
|
||||
deviceIds.add("L2010");
|
||||
deviceIds.add("L2011");
|
||||
deviceIds.add("L2012");
|
||||
}
|
||||
} else if ("02".equals(warehouseId)) {
|
||||
deviceIds.add("4");
|
||||
deviceIds.add("5");
|
||||
deviceIds.add("6");
|
||||
deviceIds.add("L1001");
|
||||
deviceIds.add("L1002");
|
||||
deviceIds.add("L1003");
|
||||
deviceIds.add("L1004");
|
||||
deviceIds.add("L1005");
|
||||
deviceIds.add("L1006");
|
||||
}
|
||||
if (CollUtil.isNotEmpty(deviceIds)){
|
||||
return basFaultRecordMapper.selectFaultRecord(deviceIds);
|
||||
}
|
||||
return new ArrayList<>();
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
184
ruoyi-admin/src/main/java/com/ruoyi/bas/jobId/BasJobId.java
Normal file
184
ruoyi-admin/src/main/java/com/ruoyi/bas/jobId/BasJobId.java
Normal file
@@ -0,0 +1,184 @@
|
||||
package com.ruoyi.bas.jobId;
|
||||
|
||||
public class BasJobId {
|
||||
private String id;
|
||||
private String type;
|
||||
private String job_id;
|
||||
private String job_detail;
|
||||
private String stock_id;
|
||||
private String order_id;
|
||||
private String Exorder_id;
|
||||
private String job_id_R;
|
||||
private String job_detail_R;
|
||||
private String job_id_C;
|
||||
private String job_detail_C;
|
||||
private String temp_order_id;
|
||||
private String lot_no;
|
||||
private String stockin_id;
|
||||
private String stockin_detail_id;
|
||||
private String stockout_id;
|
||||
private String stockout_detail_id;
|
||||
private String plan_id;
|
||||
private String job_id_y;
|
||||
private String job_id_s;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getJob_id() {
|
||||
return job_id;
|
||||
}
|
||||
|
||||
public void setJob_id(String job_id) {
|
||||
this.job_id = job_id;
|
||||
}
|
||||
|
||||
public String getJob_detail() {
|
||||
return job_detail;
|
||||
}
|
||||
|
||||
public void setJob_detail(String job_detail) {
|
||||
this.job_detail = job_detail;
|
||||
}
|
||||
|
||||
public String getStock_id() {
|
||||
return stock_id;
|
||||
}
|
||||
|
||||
public void setStock_id(String stock_id) {
|
||||
this.stock_id = stock_id;
|
||||
}
|
||||
|
||||
public String getOrder_id() {
|
||||
return order_id;
|
||||
}
|
||||
|
||||
public void setOrder_id(String order_id) {
|
||||
this.order_id = order_id;
|
||||
}
|
||||
|
||||
public String getExorder_id() {
|
||||
return Exorder_id;
|
||||
}
|
||||
|
||||
public void setExorder_id(String exorder_id) {
|
||||
Exorder_id = exorder_id;
|
||||
}
|
||||
|
||||
public String getJob_id_R() {
|
||||
return job_id_R;
|
||||
}
|
||||
|
||||
public void setJob_id_R(String job_id_R) {
|
||||
this.job_id_R = job_id_R;
|
||||
}
|
||||
|
||||
public String getJob_detail_R() {
|
||||
return job_detail_R;
|
||||
}
|
||||
|
||||
public void setJob_detail_R(String job_detail_R) {
|
||||
this.job_detail_R = job_detail_R;
|
||||
}
|
||||
|
||||
public String getJob_id_C() {
|
||||
return job_id_C;
|
||||
}
|
||||
|
||||
public void setJob_id_C(String job_id_C) {
|
||||
this.job_id_C = job_id_C;
|
||||
}
|
||||
|
||||
public String getJob_detail_C() {
|
||||
return job_detail_C;
|
||||
}
|
||||
|
||||
public void setJob_detail_C(String job_detail_C) {
|
||||
this.job_detail_C = job_detail_C;
|
||||
}
|
||||
|
||||
public String getTemp_order_id() {
|
||||
return temp_order_id;
|
||||
}
|
||||
|
||||
public void setTemp_order_id(String temp_order_id) {
|
||||
this.temp_order_id = temp_order_id;
|
||||
}
|
||||
|
||||
public String getLot_no() {
|
||||
return lot_no;
|
||||
}
|
||||
|
||||
public void setLot_no(String lot_no) {
|
||||
this.lot_no = lot_no;
|
||||
}
|
||||
|
||||
public String getStockin_id() {
|
||||
return stockin_id;
|
||||
}
|
||||
|
||||
public void setStockin_id(String stockin_id) {
|
||||
this.stockin_id = stockin_id;
|
||||
}
|
||||
|
||||
public String getStockin_detail_id() {
|
||||
return stockin_detail_id;
|
||||
}
|
||||
|
||||
public void setStockin_detail_id(String stockin_detail_id) {
|
||||
this.stockin_detail_id = stockin_detail_id;
|
||||
}
|
||||
|
||||
public String getStockout_id() {
|
||||
return stockout_id;
|
||||
}
|
||||
|
||||
public void setStockout_id(String stockout_id) {
|
||||
this.stockout_id = stockout_id;
|
||||
}
|
||||
|
||||
public String getStockout_detail_id() {
|
||||
return stockout_detail_id;
|
||||
}
|
||||
|
||||
public void setStockout_detail_id(String stockout_detail_id) {
|
||||
this.stockout_detail_id = stockout_detail_id;
|
||||
}
|
||||
|
||||
public String getPlan_id() {
|
||||
return plan_id;
|
||||
}
|
||||
|
||||
public void setPlan_id(String plan_id) {
|
||||
this.plan_id = plan_id;
|
||||
}
|
||||
|
||||
public String getJob_id_y() {
|
||||
return job_id_y;
|
||||
}
|
||||
|
||||
public void setJob_id_y(String job_id_y) {
|
||||
this.job_id_y = job_id_y;
|
||||
}
|
||||
|
||||
public String getJob_id_s() {
|
||||
return job_id_s;
|
||||
}
|
||||
|
||||
public void setJob_id_s(String job_id_s) {
|
||||
this.job_id_s = job_id_s;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.ruoyi.bas.jobId;
|
||||
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface BasJobIdMapper {
|
||||
|
||||
int insertBasJobId(BasJobId basJobId);
|
||||
|
||||
int deleteBasJobIdById(String id);
|
||||
|
||||
int updateBasJobId(BasJobId basJobId);
|
||||
|
||||
BasJobId selectBasJobIdById(String id);
|
||||
|
||||
List<BasJobId> selectBasJobIdList(BasJobId basJobId);
|
||||
|
||||
BasJobId selectByTypeForUpdate(String type);
|
||||
|
||||
int updateSerial(@Param("id") String id, @Param("jobId") String jobId,
|
||||
@Param("stockId") String stockId);
|
||||
|
||||
int updateSerialCompareAndSet(@Param("id") String id,
|
||||
@Param("oldJobId") String oldJobId,
|
||||
@Param("oldStockId") String oldStockId,
|
||||
@Param("jobId") String jobId,
|
||||
@Param("stockId") String stockId);
|
||||
}
|
||||
@@ -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,70 @@
|
||||
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);
|
||||
|
||||
List<WcsPort> selectWcsPortListByPortTypeAndStatus(WcsPort wcsPort);
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
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);
|
||||
|
||||
List<WcsPort> selectWcsPortListByPortTypeAndStatus(WcsPort wcsPort);
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
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);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WcsPort> selectWcsPortListByPortTypeAndStatus(WcsPort wcsPort) {
|
||||
return wcsPortMapper.selectWcsPortListByPortTypeAndStatus(wcsPort);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package com.ruoyi.bas.roadway.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ruoyi.bas.roadway.domain.BasRoadway;
|
||||
import com.ruoyi.bas.roadway.service.IBasRoadwayService;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
|
||||
/** 巷道Controller */
|
||||
@RestController
|
||||
@RequestMapping("/bas/roadway")
|
||||
public class BasRoadwayController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IBasRoadwayService basRoadwayService;
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('bas:roadway:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BasRoadway basRoadway)
|
||||
{
|
||||
startPage();
|
||||
List<BasRoadway> list = basRoadwayService.selectBasRoadwayList(basRoadway);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('bas:roadway:export')")
|
||||
@Log(title = "巷道", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BasRoadway basRoadway)
|
||||
{
|
||||
List<BasRoadway> list = basRoadwayService.selectBasRoadwayList(basRoadway);
|
||||
ExcelUtil<BasRoadway> util = new ExcelUtil<>(BasRoadway.class);
|
||||
util.exportExcel(response, list, "巷道数据");
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('bas:roadway:query')")
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult getInfo(@PathVariable Integer id)
|
||||
{
|
||||
return success(basRoadwayService.selectBasRoadwayById(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('bas:roadway:add')")
|
||||
@Log(title = "巷道", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BasRoadway basRoadway)
|
||||
{
|
||||
return toAjax(basRoadwayService.insertBasRoadway(basRoadway));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('bas:roadway:edit')")
|
||||
@Log(title = "巷道", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BasRoadway basRoadway)
|
||||
{
|
||||
return toAjax(basRoadwayService.updateBasRoadway(basRoadway));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('bas:roadway:remove')")
|
||||
@Log(title = "巷道", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Integer[] ids)
|
||||
{
|
||||
return toAjax(basRoadwayService.deleteBasRoadwayByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.ruoyi.bas.roadway.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/** 巷道对象 bas_roadway */
|
||||
@Data
|
||||
public class BasRoadway extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Integer id;
|
||||
|
||||
@Excel(name = "巷道编号")
|
||||
private String roadwayId;
|
||||
|
||||
@Excel(name = "仓库编号")
|
||||
private String warehouseId;
|
||||
|
||||
@Excel(name = "巷道名称")
|
||||
private String roadwayName;
|
||||
|
||||
@Excel(name = "设备编号")
|
||||
private String deviceId;
|
||||
|
||||
@Excel(name = "入库锁定标识")
|
||||
private String inLocked;
|
||||
|
||||
@Excel(name = "出库锁定标识")
|
||||
private String outLocked;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.ruoyi.bas.roadway.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.bas.roadway.domain.BasRoadway;
|
||||
|
||||
/** 巷道Mapper接口 */
|
||||
public interface BasRoadwayMapper
|
||||
{
|
||||
BasRoadway selectBasRoadwayById(Integer id);
|
||||
|
||||
List<BasRoadway> selectBasRoadwayList(BasRoadway basRoadway);
|
||||
|
||||
int insertBasRoadway(BasRoadway basRoadway);
|
||||
|
||||
int updateBasRoadway(BasRoadway basRoadway);
|
||||
|
||||
int deleteBasRoadwayById(Integer id);
|
||||
|
||||
int deleteBasRoadwayByIds(Integer[] ids);
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.ruoyi.bas.roadway.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.bas.roadway.domain.BasRoadway;
|
||||
|
||||
/** 巷道Service接口 */
|
||||
public interface IBasRoadwayService
|
||||
{
|
||||
BasRoadway selectBasRoadwayById(Integer id);
|
||||
|
||||
List<BasRoadway> selectBasRoadwayList(BasRoadway basRoadway);
|
||||
|
||||
int insertBasRoadway(BasRoadway basRoadway);
|
||||
|
||||
int updateBasRoadway(BasRoadway basRoadway);
|
||||
|
||||
int deleteBasRoadwayByIds(Integer[] ids);
|
||||
|
||||
int deleteBasRoadwayById(Integer id);
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.ruoyi.bas.roadway.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.bas.roadway.domain.BasRoadway;
|
||||
import com.ruoyi.bas.roadway.mapper.BasRoadwayMapper;
|
||||
import com.ruoyi.bas.roadway.service.IBasRoadwayService;
|
||||
|
||||
/** 巷道Service业务层处理 */
|
||||
@Service
|
||||
public class BasRoadwayServiceImpl implements IBasRoadwayService
|
||||
{
|
||||
@Autowired
|
||||
private BasRoadwayMapper basRoadwayMapper;
|
||||
|
||||
@Override
|
||||
public BasRoadway selectBasRoadwayById(Integer id)
|
||||
{
|
||||
return basRoadwayMapper.selectBasRoadwayById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BasRoadway> selectBasRoadwayList(BasRoadway basRoadway)
|
||||
{
|
||||
return basRoadwayMapper.selectBasRoadwayList(basRoadway);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertBasRoadway(BasRoadway basRoadway)
|
||||
{
|
||||
return basRoadwayMapper.insertBasRoadway(basRoadway);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateBasRoadway(BasRoadway basRoadway)
|
||||
{
|
||||
return basRoadwayMapper.updateBasRoadway(basRoadway);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteBasRoadwayByIds(Integer[] ids)
|
||||
{
|
||||
return basRoadwayMapper.deleteBasRoadwayByIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteBasRoadwayById(Integer id)
|
||||
{
|
||||
return basRoadwayMapper.deleteBasRoadwayById(id);
|
||||
}
|
||||
}
|
||||
50
ruoyi-admin/src/main/java/com/ruoyi/bas/stock/BasStock.java
Normal file
50
ruoyi-admin/src/main/java/com/ruoyi/bas/stock/BasStock.java
Normal file
@@ -0,0 +1,50 @@
|
||||
package com.ruoyi.bas.stock;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class BasStock implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String stockId;
|
||||
private String cargoSpaceId;
|
||||
private String stockStatus;
|
||||
private String productStatus;
|
||||
private String lotNo;
|
||||
private Date inDate;
|
||||
private Date backDate;
|
||||
private String productId;
|
||||
private String productName;
|
||||
private BigDecimal quantity;
|
||||
private String jobId;
|
||||
private String jobDetailId;
|
||||
private String trayCode;
|
||||
private BigDecimal outQuantity;
|
||||
private String stockinDetailId;
|
||||
private String stockinId;
|
||||
private String inType;
|
||||
private String warehouseId;
|
||||
private String warehouseName;
|
||||
private Integer userId;
|
||||
private String userName;
|
||||
private Integer deptId;
|
||||
private String deptName;
|
||||
private String supplierId;
|
||||
private String supplierName;
|
||||
private String materialScope;
|
||||
private String sourceBillType;
|
||||
private String sourceBillId;
|
||||
private String sourceBillNo;
|
||||
private String materialGrade;
|
||||
private String materialType;
|
||||
private String arrivalId;
|
||||
private BigDecimal singleWeight;
|
||||
private String photoUrl;
|
||||
private BigDecimal weight;
|
||||
private String executionStandard;
|
||||
private String roadwayId;
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.ruoyi.bas.stock;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/bas/stock")
|
||||
public class BasStockController extends BaseController {
|
||||
private final IBasStockService basStockService;
|
||||
|
||||
public BasStockController(IBasStockService basStockService) {
|
||||
this.basStockService = basStockService;
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('bas:stock:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BasStock basStock) {
|
||||
startPage();
|
||||
List<BasStock> list = basStockService.selectBasStockList(basStock);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('bas:stock:query')")
|
||||
@GetMapping("/{stockId}")
|
||||
public AjaxResult getInfo(@PathVariable String stockId) {
|
||||
return success(basStockService.selectBasStockByStockId(stockId));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('bas:stock:add')")
|
||||
@Log(title = "??", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BasStock basStock) {
|
||||
return toAjax(basStockService.insertBasStock(basStock));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('bas:stock:edit')")
|
||||
@Log(title = "??", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BasStock basStock) {
|
||||
return toAjax(basStockService.updateBasStock(basStock));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('bas:stock:remove')")
|
||||
@Log(title = "??", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{stockIds}")
|
||||
public AjaxResult remove(@PathVariable String[] stockIds) {
|
||||
return toAjax(basStockService.deleteBasStockByStockIds(stockIds));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.ruoyi.bas.stock;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface BasStockMapper {
|
||||
BasStock selectBasStockByStockId(@Param("stockId") String stockId);
|
||||
|
||||
List<BasStock> selectBasStockList(BasStock basStock);
|
||||
|
||||
int insertBasStock(BasStock basStock);
|
||||
|
||||
int updateBasStock(BasStock basStock);
|
||||
|
||||
int deleteBasStockByStockId(@Param("stockId") String stockId);
|
||||
|
||||
int deleteBasStockByStockIds(String[] stockIds);
|
||||
|
||||
BasStock selectByTpOut();
|
||||
|
||||
String selectByRoadwayId();
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.ruoyi.bas.stock;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class BasStockServiceImpl implements IBasStockService {
|
||||
private final BasStockMapper basStockMapper;
|
||||
|
||||
public BasStockServiceImpl(BasStockMapper basStockMapper) {
|
||||
this.basStockMapper = basStockMapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BasStock selectBasStockByStockId(String stockId) {
|
||||
return basStockMapper.selectBasStockByStockId(stockId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BasStock> selectBasStockList(BasStock basStock) {
|
||||
return basStockMapper.selectBasStockList(basStock);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertBasStock(BasStock basStock) {
|
||||
return basStockMapper.insertBasStock(basStock);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateBasStock(BasStock basStock) {
|
||||
return basStockMapper.updateBasStock(basStock);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteBasStockByStockId(String stockId) {
|
||||
return basStockMapper.deleteBasStockByStockId(stockId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteBasStockByStockIds(String[] stockIds) {
|
||||
return basStockMapper.deleteBasStockByStockIds(stockIds);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.ruoyi.bas.stock;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface IBasStockService {
|
||||
BasStock selectBasStockByStockId(String stockId);
|
||||
List<BasStock> selectBasStockList(BasStock basStock);
|
||||
int insertBasStock(BasStock basStock);
|
||||
int updateBasStock(BasStock basStock);
|
||||
int deleteBasStockByStockId(String stockId);
|
||||
int deleteBasStockByStockIds(String[] stockIds);
|
||||
}
|
||||
58
ruoyi-admin/src/main/java/com/ruoyi/bas/task/BasTaskNo.java
Normal file
58
ruoyi-admin/src/main/java/com/ruoyi/bas/task/BasTaskNo.java
Normal file
@@ -0,0 +1,58 @@
|
||||
package com.ruoyi.bas.task;
|
||||
|
||||
public class BasTaskNo {
|
||||
private String id;
|
||||
private String task_type;
|
||||
private String type_name;
|
||||
private Integer task_no;
|
||||
private Integer min_no;
|
||||
private Integer max_no;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getTask_type() {
|
||||
return task_type;
|
||||
}
|
||||
|
||||
public void setTask_type(String task_type) {
|
||||
this.task_type = task_type;
|
||||
}
|
||||
|
||||
public String getType_name() {
|
||||
return type_name;
|
||||
}
|
||||
|
||||
public void setType_name(String type_name) {
|
||||
this.type_name = type_name;
|
||||
}
|
||||
|
||||
public Integer getTask_no() {
|
||||
return task_no;
|
||||
}
|
||||
|
||||
public void setTask_no(Integer task_no) {
|
||||
this.task_no = task_no;
|
||||
}
|
||||
|
||||
public Integer getMin_no() {
|
||||
return min_no;
|
||||
}
|
||||
|
||||
public void setMin_no(Integer min_no) {
|
||||
this.min_no = min_no;
|
||||
}
|
||||
|
||||
public Integer getMax_no() {
|
||||
return max_no;
|
||||
}
|
||||
|
||||
public void setMax_no(Integer max_no) {
|
||||
this.max_no = max_no;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.ruoyi.bas.task;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface BasTaskNoMapper {
|
||||
|
||||
int insertBasTaskNo(BasTaskNo basTaskNo);
|
||||
|
||||
int deleteBasTaskNoById(String id);
|
||||
|
||||
int updateBasTaskNo(BasTaskNo basTaskNo);
|
||||
|
||||
BasTaskNo selectBasTaskNoById(@Param("taskType") String taskType);
|
||||
|
||||
List<BasTaskNo> selectBasTaskNoList(BasTaskNo basTaskNo);
|
||||
|
||||
/**
|
||||
* 行级锁查询,防止并发获取任务号时重复
|
||||
*/
|
||||
BasTaskNo selectByIdForUpdate(@Param("id") String id);
|
||||
|
||||
void updateBasTaskNoForType(@Param("taskType") String taskType,
|
||||
@Param("next") int next);
|
||||
|
||||
int updateTaskNoCompareAndSet(@Param("taskType") String taskType,
|
||||
@Param("oldTaskNo") int oldTaskNo,
|
||||
@Param("nextTaskNo") int nextTaskNo);
|
||||
}
|
||||
32
ruoyi-admin/src/main/java/com/ruoyi/common/Constant.java
Normal file
32
ruoyi-admin/src/main/java/com/ruoyi/common/Constant.java
Normal file
@@ -0,0 +1,32 @@
|
||||
package com.ruoyi.common;
|
||||
|
||||
|
||||
public class Constant {
|
||||
|
||||
public static final String WMS_BASE_URL = "http://172.16.4.71:8080/toWms/";
|
||||
public static final String RCS_BASE_URL = "http://127.0.0.1:8081/rcms-dps/rest/";
|
||||
|
||||
|
||||
public static final String GET_IN_JOB_URL = WMS_BASE_URL+"requestInJob";
|
||||
public static final String GET_IN_CARGO_SPACE_URL = WMS_BASE_URL+"sendCargoSpace";
|
||||
public static final String GET_OUT_JOB_URL = WMS_BASE_URL+"requestOutJob";
|
||||
public static final String JOB_FINISH_URL = WMS_BASE_URL+"ddjJobFinish";
|
||||
public static final String RE_ASSIGN_URL = WMS_BASE_URL+"requestCargoSpaceAgain";
|
||||
public static final String RE_MATERIAL_URL = WMS_BASE_URL+"noGoodsPickUp";
|
||||
public static final String CLEAN_SPACE_URL = WMS_BASE_URL+"ddjJobFinish";
|
||||
public static final String UPDATE_OUT_JOB_URL = WMS_BASE_URL+"updateOutJobStatus";
|
||||
//todo 没有接口
|
||||
public static final String GET_KTP_OUT_JOB_URL = WMS_BASE_URL+"updateOutJobStatus";
|
||||
public static final String GET_JXS_QUEUE_URL = WMS_BASE_URL+"requestGraspInfo";
|
||||
public static final String JXS_FINISH_IN = WMS_BASE_URL+"bindGraspInfoAndTrayLocation";
|
||||
public static final String CK_MAKE_SURE = WMS_BASE_URL+"outJobMakeSure";
|
||||
public static final String ADD_IN_JOB = WMS_BASE_URL+"addInJob";
|
||||
|
||||
|
||||
public static final String ROADWAY_ID_01 = "1";
|
||||
public static final String ROADWAY_ID_02 = "2";
|
||||
public static final String ROADWAY_ID_03 = "3";
|
||||
public static final String ROADWAY_ID_04 = "4";
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
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";
|
||||
|
||||
public static final String TASK_EP_CREATE = "0";
|
||||
public static final String TASK_EP_DDJ = "1";
|
||||
//2是堆垛机完成
|
||||
public static final String TASK_EP_CK_SMQ = "3";
|
||||
public static final String TASK_EP_JSX_SSJ_DW = "4";
|
||||
public static final String TASK_EP_JSX = "5";
|
||||
public static final String TASK_EP_JSX_FINISH = "6";
|
||||
public static final String TASK_EP_RK_SMQ = "7";
|
||||
|
||||
|
||||
}
|
||||
19
ruoyi-admin/src/main/java/com/ruoyi/common/TaskType.java
Normal file
19
ruoyi-admin/src/main/java/com/ruoyi/common/TaskType.java
Normal file
@@ -0,0 +1,19 @@
|
||||
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;
|
||||
|
||||
//job回调类型
|
||||
//1.入库
|
||||
public static final String JOB_CALL_BACK_TYPE1 = "1";
|
||||
//2.出库
|
||||
public static final String JOB_CALL_BACK_TYPE2 = "2";
|
||||
//3.出库清空货位
|
||||
public static final String JOB_CALL_BACK_TYPE3 = "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.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,114 @@
|
||||
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;
|
||||
|
||||
private String ip;
|
||||
|
||||
private String port;
|
||||
|
||||
/** 任务号 */
|
||||
@Excel(name = "任务号")
|
||||
private Integer 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 String spare1;
|
||||
|
||||
/** 备用字段2 */
|
||||
@Excel(name = "备用字段2")
|
||||
private String spare2;
|
||||
|
||||
/** 备用字段3 */
|
||||
@Excel(name = "备用字段3")
|
||||
private String spare3;
|
||||
|
||||
private String trayCode;
|
||||
|
||||
private String plcDbReadAddress;
|
||||
private String plcDbWriteAddress;
|
||||
|
||||
private Integer height;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.ruoyi.device.ddj.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.annotation.DataSource;
|
||||
import com.ruoyi.common.enums.DataSourceType;
|
||||
import com.ruoyi.device.ddj.domain.MsgDdj;
|
||||
|
||||
/**
|
||||
* 堆垛机状态表Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-09-22
|
||||
*/
|
||||
@DataSource(DataSourceType.MASTER)
|
||||
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.jxs.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.jxs.domain.MsgJxs;
|
||||
import com.ruoyi.device.jxs.service.IMsgJxsService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 机械手Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-06-22
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/device/jxs")
|
||||
public class MsgJxsController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IMsgJxsService msgJxsService;
|
||||
|
||||
/**
|
||||
* 查询机械手列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('device:jxs:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(MsgJxs msgJxs)
|
||||
{
|
||||
startPage();
|
||||
List<MsgJxs> list = msgJxsService.selectMsgJxsList(msgJxs);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出机械手列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('device:jxs:export')")
|
||||
@Log(title = "机械手", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, MsgJxs msgJxs)
|
||||
{
|
||||
List<MsgJxs> list = msgJxsService.selectMsgJxsList(msgJxs);
|
||||
ExcelUtil<MsgJxs> util = new ExcelUtil<MsgJxs>(MsgJxs.class);
|
||||
util.exportExcel(response, list, "机械手数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取机械手详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('device:jxs:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(msgJxsService.selectMsgJxsById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增机械手
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('device:jxs:add')")
|
||||
@Log(title = "机械手", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody MsgJxs msgJxs)
|
||||
{
|
||||
return toAjax(msgJxsService.insertMsgJxs(msgJxs));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改机械手
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('device:jxs:edit')")
|
||||
@Log(title = "机械手", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody MsgJxs msgJxs)
|
||||
{
|
||||
return toAjax(msgJxsService.updateMsgJxs(msgJxs));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除机械手
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('device:jxs:remove')")
|
||||
@Log(title = "机械手", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(msgJxsService.deleteMsgJxsByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,220 @@
|
||||
package com.ruoyi.device.jxs.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;
|
||||
|
||||
/**
|
||||
* 机械手对象 msg_jxs
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-06-22
|
||||
*/
|
||||
public class MsgJxs extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 编号 */
|
||||
private Integer id;
|
||||
|
||||
/** 名称 */
|
||||
@Excel(name = "名称")
|
||||
private String name;
|
||||
|
||||
/** 码垛取货完成信号:1表示本次码垛取货动作完成 */
|
||||
@Excel(name = "码垛取货位置")
|
||||
private int mdqhwc;
|
||||
|
||||
/** 码垛放货完成信号:1表示本次码垛任务执行完成 */
|
||||
@Excel(name = "码垛放货位置")
|
||||
private int mdfhwc;
|
||||
|
||||
/** 拆垛取货完成信号:1表示本次拆垛取货动作完成 */
|
||||
@Excel(name = "拆垛取货位置")
|
||||
private int cdqhwc;
|
||||
|
||||
/** 拆垛放货完成信号:1表示本次拆垛任务执行完成 */
|
||||
@Excel(name = "拆垛放货完成")
|
||||
private int cdfhwc;
|
||||
|
||||
/** 允许下发信号:1允许写入新任务,其他值禁止下发 */
|
||||
@Excel(name = "允许下发")
|
||||
private int yxxf;
|
||||
|
||||
/** 备用 */
|
||||
@Excel(name = "备用")
|
||||
private String spare1;
|
||||
|
||||
/** 备用 */
|
||||
@Excel(name = "备用")
|
||||
private String spare2;
|
||||
|
||||
/** 备用 */
|
||||
@Excel(name = "备用")
|
||||
private String spare3;
|
||||
|
||||
/** IP */
|
||||
@Excel(name = "IP")
|
||||
private String ip;
|
||||
|
||||
/** 端口 */
|
||||
@Excel(name = "端口")
|
||||
private String port;
|
||||
|
||||
/** PLC 状态信号读取地址 */
|
||||
@Excel(name = "读地址")
|
||||
private String plcDbReadAddress;
|
||||
|
||||
/** PLC 任务数据写入地址 */
|
||||
@Excel(name = "写地址")
|
||||
private String plcDbWriteAddress;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
public int getMdqhwc() {
|
||||
return mdqhwc;
|
||||
}
|
||||
|
||||
public void setMdqhwc(int mdqhwc) {
|
||||
this.mdqhwc = mdqhwc;
|
||||
}
|
||||
|
||||
public int getMdfhwc() {
|
||||
return mdfhwc;
|
||||
}
|
||||
|
||||
public void setMdfhwc(int mdfhwc) {
|
||||
this.mdfhwc = mdfhwc;
|
||||
}
|
||||
|
||||
public int getCdqhwc() {
|
||||
return cdqhwc;
|
||||
}
|
||||
|
||||
public void setCdqhwc(int cdqhwc) {
|
||||
this.cdqhwc = cdqhwc;
|
||||
}
|
||||
|
||||
public int getCdfhwc() {
|
||||
return cdfhwc;
|
||||
}
|
||||
|
||||
public void setCdfhwc(int cdfhwc) {
|
||||
this.cdfhwc = cdfhwc;
|
||||
}
|
||||
|
||||
public int getYxxf() {
|
||||
return yxxf;
|
||||
}
|
||||
|
||||
public void setYxxf(int yxxf) {
|
||||
this.yxxf = yxxf;
|
||||
}
|
||||
|
||||
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 setIp(String ip)
|
||||
{
|
||||
this.ip = ip;
|
||||
}
|
||||
|
||||
public String getIp()
|
||||
{
|
||||
return ip;
|
||||
}
|
||||
|
||||
public void setPort(String port)
|
||||
{
|
||||
this.port = port;
|
||||
}
|
||||
|
||||
public String getPort()
|
||||
{
|
||||
return port;
|
||||
}
|
||||
|
||||
public void setPlcDbReadAddress(String plcDbReadAddress)
|
||||
{
|
||||
this.plcDbReadAddress = plcDbReadAddress;
|
||||
}
|
||||
|
||||
public String getPlcDbReadAddress()
|
||||
{
|
||||
return plcDbReadAddress;
|
||||
}
|
||||
|
||||
public void setPlcDbWriteAddress(String plcDbWriteAddress)
|
||||
{
|
||||
this.plcDbWriteAddress = plcDbWriteAddress;
|
||||
}
|
||||
|
||||
public String getPlcDbWriteAddress()
|
||||
{
|
||||
return plcDbWriteAddress;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("mdqhwc", getMdqhwc())
|
||||
.append("mdfhwc", getMdfhwc())
|
||||
.append("cdqhwc", getCdqhwc())
|
||||
.append("cdfhwc", getCdfhwc())
|
||||
.append("yxxf", getYxxf())
|
||||
.append("spare1", getSpare1())
|
||||
.append("spare2", getSpare2())
|
||||
.append("spare3", getSpare3())
|
||||
.append("ip", getIp())
|
||||
.append("port", getPort())
|
||||
.append("plcDbReadAddress", getPlcDbReadAddress())
|
||||
.append("plcDbWriteAddress", getPlcDbWriteAddress())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package com.ruoyi.device.jxs.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.annotation.DataSource;
|
||||
import com.ruoyi.common.enums.DataSourceType;
|
||||
import com.ruoyi.device.jxs.domain.MsgJxs;
|
||||
|
||||
/**
|
||||
* 机械手Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-06-22
|
||||
*/
|
||||
@DataSource(DataSourceType.MASTER)
|
||||
public interface MsgJxsMapper
|
||||
{
|
||||
/**
|
||||
* 查询机械手
|
||||
*
|
||||
* @param id 机械手主键
|
||||
* @return 机械手
|
||||
*/
|
||||
public MsgJxs selectMsgJxsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询机械手列表
|
||||
*
|
||||
* @param msgJxs 机械手
|
||||
* @return 机械手集合
|
||||
*/
|
||||
public List<MsgJxs> selectMsgJxsList(MsgJxs msgJxs);
|
||||
|
||||
/**
|
||||
* 新增机械手
|
||||
*
|
||||
* @param msgJxs 机械手
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMsgJxs(MsgJxs msgJxs);
|
||||
|
||||
/**
|
||||
* 修改机械手
|
||||
*
|
||||
* @param msgJxs 机械手
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMsgJxs(MsgJxs msgJxs);
|
||||
|
||||
/**
|
||||
* 删除机械手
|
||||
*
|
||||
* @param id 机械手主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMsgJxsById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除机械手
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMsgJxsByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.device.jxs.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.device.jxs.domain.MsgJxs;
|
||||
|
||||
/**
|
||||
* 机械手Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-06-22
|
||||
*/
|
||||
public interface IMsgJxsService
|
||||
{
|
||||
/**
|
||||
* 查询机械手
|
||||
*
|
||||
* @param id 机械手主键
|
||||
* @return 机械手
|
||||
*/
|
||||
public MsgJxs selectMsgJxsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询机械手列表
|
||||
*
|
||||
* @param msgJxs 机械手
|
||||
* @return 机械手集合
|
||||
*/
|
||||
public List<MsgJxs> selectMsgJxsList(MsgJxs msgJxs);
|
||||
|
||||
/**
|
||||
* 新增机械手
|
||||
*
|
||||
* @param msgJxs 机械手
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertMsgJxs(MsgJxs msgJxs);
|
||||
|
||||
/**
|
||||
* 修改机械手
|
||||
*
|
||||
* @param msgJxs 机械手
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateMsgJxs(MsgJxs msgJxs);
|
||||
|
||||
/**
|
||||
* 批量删除机械手
|
||||
*
|
||||
* @param ids 需要删除的机械手主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMsgJxsByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除机械手信息
|
||||
*
|
||||
* @param id 机械手主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteMsgJxsById(Long id);
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
package com.ruoyi.device.jxs.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.device.jxs.mapper.MsgJxsMapper;
|
||||
import com.ruoyi.device.jxs.domain.MsgJxs;
|
||||
import com.ruoyi.device.jxs.service.IMsgJxsService;
|
||||
|
||||
/**
|
||||
* 机械手Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-06-22
|
||||
*/
|
||||
@Service
|
||||
public class MsgJxsServiceImpl implements IMsgJxsService
|
||||
{
|
||||
@Autowired
|
||||
private MsgJxsMapper msgJxsMapper;
|
||||
|
||||
/**
|
||||
* 查询机械手
|
||||
*
|
||||
* @param id 机械手主键
|
||||
* @return 机械手
|
||||
*/
|
||||
@Override
|
||||
public MsgJxs selectMsgJxsById(Long id)
|
||||
{
|
||||
return msgJxsMapper.selectMsgJxsById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询机械手列表
|
||||
*
|
||||
* @param msgJxs 机械手
|
||||
* @return 机械手
|
||||
*/
|
||||
@Override
|
||||
public List<MsgJxs> selectMsgJxsList(MsgJxs msgJxs)
|
||||
{
|
||||
return msgJxsMapper.selectMsgJxsList(msgJxs);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增机械手
|
||||
*
|
||||
* @param msgJxs 机械手
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertMsgJxs(MsgJxs msgJxs)
|
||||
{
|
||||
return msgJxsMapper.insertMsgJxs(msgJxs);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改机械手
|
||||
*
|
||||
* @param msgJxs 机械手
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateMsgJxs(MsgJxs msgJxs)
|
||||
{
|
||||
return msgJxsMapper.updateMsgJxs(msgJxs);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除机械手
|
||||
*
|
||||
* @param ids 需要删除的机械手主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMsgJxsByIds(Long[] ids)
|
||||
{
|
||||
return msgJxsMapper.deleteMsgJxsByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除机械手信息
|
||||
*
|
||||
* @param id 机械手主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteMsgJxsById(Long id)
|
||||
{
|
||||
return msgJxsMapper.deleteMsgJxsById(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.ruoyi.device.monitor.controller;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.device.ddj.domain.MsgDdj;
|
||||
import com.ruoyi.device.ddj.service.IMsgDdjService;
|
||||
import com.ruoyi.device.jxs.domain.MsgJxs;
|
||||
import com.ruoyi.device.jxs.service.IMsgJxsService;
|
||||
import com.ruoyi.device.rgv.domain.MsgRgv;
|
||||
import com.ruoyi.device.rgv.service.IMsgRgvService;
|
||||
import com.ruoyi.device.ssj.domain.DeviceSsj;
|
||||
import com.ruoyi.device.ssj.service.IDeviceSsjService;
|
||||
import com.ruoyi.schedule.plcRead.util.PlcSignalStore;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
/** 设备平面监控数据接口。 */
|
||||
@RestController
|
||||
@RequestMapping("/device/monitor")
|
||||
public class DeviceMonitorController extends BaseController {
|
||||
|
||||
private final IDeviceSsjService deviceSsjService;
|
||||
private final IMsgDdjService msgDdjService;
|
||||
private final IMsgJxsService msgJxsService;
|
||||
private final IMsgRgvService msgRgvService;
|
||||
private final PlcSignalStore signalStore;
|
||||
|
||||
public DeviceMonitorController(IDeviceSsjService deviceSsjService,
|
||||
IMsgDdjService msgDdjService,
|
||||
IMsgJxsService msgJxsService,
|
||||
IMsgRgvService msgRgvService,
|
||||
PlcSignalStore signalStore) {
|
||||
this.deviceSsjService = deviceSsjService;
|
||||
this.msgDdjService = msgDdjService;
|
||||
this.msgJxsService = msgJxsService;
|
||||
this.msgRgvService = msgRgvService;
|
||||
this.signalStore = signalStore;
|
||||
}
|
||||
|
||||
/**
|
||||
* PLC读取线程运行时优先返回内存中的实时信号;线程尚未连接时返回数据库状态,
|
||||
* 保证监控页面始终能够展示完整设备布局。
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('device:monitor:view')")
|
||||
@GetMapping("/overview")
|
||||
public AjaxResult overview() {
|
||||
List<DeviceSsj> conveyors = preferRealtime(
|
||||
signalStore.getDeviceSsjMap().values(),
|
||||
deviceSsjService.selectDeviceSsjList(new DeviceSsj()));
|
||||
List<MsgDdj> stackers = preferRealtime(
|
||||
signalStore.getDeviceDdjMap().values(),
|
||||
msgDdjService.selectMsgDdjList(new MsgDdj()));
|
||||
List<MsgRgv> rgvs = preferRealtime(
|
||||
signalStore.getDeviceRgvMap().values(),
|
||||
msgRgvService.selectMsgRgvList(new MsgRgv()));
|
||||
List<MsgJxs> robots = preferRealtime(
|
||||
signalStore.getDeviceJxsjMap().values(),
|
||||
msgJxsService.selectMsgJxsList(new MsgJxs()));
|
||||
|
||||
return success()
|
||||
.put("conveyors", conveyors)
|
||||
.put("stackers", stackers)
|
||||
.put("rgvs", rgvs)
|
||||
.put("robots", robots);
|
||||
}
|
||||
|
||||
private <T> List<T> preferRealtime(Collection<T> realtime, List<T> database) {
|
||||
return realtime == null || realtime.isEmpty() ? database : new ArrayList<>(realtime);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package com.ruoyi.device.rgv.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
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.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.device.rgv.domain.MsgRgv;
|
||||
import com.ruoyi.device.rgv.service.IMsgRgvService;
|
||||
|
||||
/** RGV状态Controller */
|
||||
@RestController
|
||||
@RequestMapping("/device/rgv")
|
||||
public class MsgRgvController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IMsgRgvService msgRgvService;
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('device:rgv:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(MsgRgv msgRgv)
|
||||
{
|
||||
startPage();
|
||||
List<MsgRgv> list = msgRgvService.selectMsgRgvList(msgRgv);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('device:rgv:export')")
|
||||
@Log(title = "RGV状态", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, MsgRgv msgRgv)
|
||||
{
|
||||
List<MsgRgv> list = msgRgvService.selectMsgRgvList(msgRgv);
|
||||
ExcelUtil<MsgRgv> util = new ExcelUtil<>(MsgRgv.class);
|
||||
util.exportExcel(response, list, "RGV状态数据");
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('device:rgv:query')")
|
||||
@GetMapping("/{id}")
|
||||
public AjaxResult getInfo(@PathVariable Integer id)
|
||||
{
|
||||
return success(msgRgvService.selectMsgRgvById(id));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('device:rgv:add')")
|
||||
@Log(title = "RGV状态", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody MsgRgv msgRgv)
|
||||
{
|
||||
return toAjax(msgRgvService.insertMsgRgv(msgRgv));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('device:rgv:edit')")
|
||||
@Log(title = "RGV状态", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody MsgRgv msgRgv)
|
||||
{
|
||||
return toAjax(msgRgvService.updateMsgRgv(msgRgv));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('device:rgv:remove')")
|
||||
@Log(title = "RGV状态", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Integer[] ids)
|
||||
{
|
||||
return toAjax(msgRgvService.deleteMsgRgvByIds(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.ruoyi.device.rgv.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* RGV状态对象 msg_rgv
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2026-07-24
|
||||
*/
|
||||
@Data
|
||||
public class MsgRgv extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 编号 */
|
||||
private Integer id;
|
||||
|
||||
/** 设备名称 */
|
||||
@Excel(name = "设备名称")
|
||||
private String devName;
|
||||
|
||||
/** 任务号 */
|
||||
@Excel(name = "任务号")
|
||||
private Integer rwh;
|
||||
|
||||
/** 操作方式 */
|
||||
@Excel(name = "操作方式")
|
||||
private Integer czfs;
|
||||
|
||||
/** 运行状态 */
|
||||
@Excel(name = "运行状态")
|
||||
private Integer yxzt;
|
||||
|
||||
/** 源地址 */
|
||||
@Excel(name = "源地址")
|
||||
private Integer ydz;
|
||||
|
||||
/** 目标地址 */
|
||||
@Excel(name = "目标地址")
|
||||
private Integer mbdz;
|
||||
|
||||
/** 报警信息 */
|
||||
@Excel(name = "报警信息")
|
||||
private Integer yczt;
|
||||
|
||||
/** 允许下发 */
|
||||
@Excel(name = "允许下发")
|
||||
private Integer yxxf;
|
||||
|
||||
/** 阶段标志 */
|
||||
@Excel(name = "阶段标志")
|
||||
private Integer jdbz;
|
||||
|
||||
/** PLC IP,非 msg_rgv 表字段 */
|
||||
private String ip;
|
||||
|
||||
/** PLC端口,非 msg_rgv 表字段 */
|
||||
private String port;
|
||||
|
||||
/** PLC读取地址,非 msg_rgv 表字段 */
|
||||
private String plcDbReadAddress;
|
||||
|
||||
/** PLC写入地址,非 msg_rgv 表字段 */
|
||||
private String plcDbWriteAddress;
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.ruoyi.device.rgv.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.annotation.DataSource;
|
||||
import com.ruoyi.common.enums.DataSourceType;
|
||||
import com.ruoyi.device.rgv.domain.MsgRgv;
|
||||
|
||||
/** RGV状态Mapper接口 */
|
||||
@DataSource(DataSourceType.MASTER)
|
||||
public interface MsgRgvMapper
|
||||
{
|
||||
MsgRgv selectMsgRgvById(Integer id);
|
||||
|
||||
List<MsgRgv> selectMsgRgvList(MsgRgv msgRgv);
|
||||
|
||||
int insertMsgRgv(MsgRgv msgRgv);
|
||||
|
||||
int updateMsgRgv(MsgRgv msgRgv);
|
||||
|
||||
int deleteMsgRgvById(Integer id);
|
||||
|
||||
int deleteMsgRgvByIds(Integer[] ids);
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.ruoyi.device.rgv.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.device.rgv.domain.MsgRgv;
|
||||
|
||||
/** RGV状态Service接口 */
|
||||
public interface IMsgRgvService
|
||||
{
|
||||
MsgRgv selectMsgRgvById(Integer id);
|
||||
|
||||
List<MsgRgv> selectMsgRgvList(MsgRgv msgRgv);
|
||||
|
||||
int insertMsgRgv(MsgRgv msgRgv);
|
||||
|
||||
int updateMsgRgv(MsgRgv msgRgv);
|
||||
|
||||
int deleteMsgRgvByIds(Integer[] ids);
|
||||
|
||||
int deleteMsgRgvById(Integer id);
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.ruoyi.device.rgv.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.device.rgv.domain.MsgRgv;
|
||||
import com.ruoyi.device.rgv.mapper.MsgRgvMapper;
|
||||
import com.ruoyi.device.rgv.service.IMsgRgvService;
|
||||
|
||||
/** RGV状态Service业务层处理 */
|
||||
@Service
|
||||
public class MsgRgvServiceImpl implements IMsgRgvService
|
||||
{
|
||||
@Autowired
|
||||
private MsgRgvMapper msgRgvMapper;
|
||||
|
||||
@Override
|
||||
public MsgRgv selectMsgRgvById(Integer id)
|
||||
{
|
||||
return msgRgvMapper.selectMsgRgvById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MsgRgv> selectMsgRgvList(MsgRgv msgRgv)
|
||||
{
|
||||
return msgRgvMapper.selectMsgRgvList(msgRgv);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertMsgRgv(MsgRgv msgRgv)
|
||||
{
|
||||
return msgRgvMapper.insertMsgRgv(msgRgv);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateMsgRgv(MsgRgv msgRgv)
|
||||
{
|
||||
return msgRgvMapper.updateMsgRgv(msgRgv);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteMsgRgvByIds(Integer[] ids)
|
||||
{
|
||||
return msgRgvMapper.deleteMsgRgvByIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteMsgRgvById(Integer id)
|
||||
{
|
||||
return msgRgvMapper.deleteMsgRgvById(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,566 @@
|
||||
package com.ruoyi.device.ssj.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 输送机消息对象,对应 WCS 数据库 msg_ssj 表。
|
||||
*/
|
||||
public class DeviceSsj extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private int id;
|
||||
@Excel(name = "位置")
|
||||
private Integer location;
|
||||
@Excel(name = "名称")
|
||||
private String name;
|
||||
@Excel(name = "到位状态")
|
||||
private Integer dw;
|
||||
@Excel(name = "空闲状态")
|
||||
private Integer kx;
|
||||
@Excel(name = "设备状态")
|
||||
private Integer sbzt;
|
||||
@Excel(name = "任务号")
|
||||
private Integer rwh;
|
||||
@Excel(name = "入库请求")
|
||||
private Integer rkqq;
|
||||
@Excel(name = "PLC读取地址")
|
||||
private String getDb;
|
||||
@Excel(name = "PLC写入地址")
|
||||
private String sendDb;
|
||||
@Excel(name = "托盘条码")
|
||||
private String tmfk;
|
||||
@Excel(name = "读取长度")
|
||||
private Integer length;
|
||||
@Excel(name = "所在层")
|
||||
private Integer floor;
|
||||
@Excel(name = "出入模式")
|
||||
private Integer rcms;
|
||||
@Excel(name = "高度")
|
||||
private Integer height;
|
||||
@Excel(name = "重量")
|
||||
private Integer weight;
|
||||
|
||||
private Integer dwFirst;
|
||||
private Integer dwLen;
|
||||
private Integer dwIsOpen;
|
||||
private Integer kxFirst;
|
||||
private Integer kxLen;
|
||||
private Integer kxIsOpen;
|
||||
private Integer sbztFirst;
|
||||
private Integer sbztLen;
|
||||
private Integer sbztIsOpen;
|
||||
private Integer rwhFirst;
|
||||
private Integer rwhLen;
|
||||
private Integer rwhIsOpen;
|
||||
private Integer rkqqFirst;
|
||||
private Integer rkqqLen;
|
||||
private Integer rkqqIsOpen;
|
||||
private Integer tmfkFirst;
|
||||
private Integer tmfkLen;
|
||||
private Integer tmfkIsOpen;
|
||||
private Integer rcmsFirst;
|
||||
private Integer rcmsLen;
|
||||
private Integer rcmsIsOpen;
|
||||
private Integer heightFirst;
|
||||
private Integer heightLen;
|
||||
private Integer heightIsOpen;
|
||||
private Integer weightFirst;
|
||||
private Integer weightLen;
|
||||
private Integer weightIsOpen;
|
||||
|
||||
/**
|
||||
* 非数据库字段,兼容监控和调度代码。
|
||||
*/
|
||||
private String deviceCode;
|
||||
private String type;
|
||||
private Integer model;
|
||||
private String ipAddress;
|
||||
private Integer exception;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
if (deviceCode == null) deviceCode = String.valueOf(id);
|
||||
}
|
||||
|
||||
public Integer getLocation() {
|
||||
return location;
|
||||
}
|
||||
|
||||
public void setLocation(Integer location) {
|
||||
this.location = location;
|
||||
this.model = location;
|
||||
this.type = location == null ? null : String.valueOf(location);
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Integer getDw() {
|
||||
return dw;
|
||||
}
|
||||
|
||||
public void setDw(Integer dw) {
|
||||
this.dw = dw;
|
||||
}
|
||||
|
||||
public Integer getKx() {
|
||||
return kx;
|
||||
}
|
||||
|
||||
public void setKx(Integer kx) {
|
||||
this.kx = kx;
|
||||
}
|
||||
|
||||
public Integer getSbzt() {
|
||||
return sbzt;
|
||||
}
|
||||
|
||||
public void setSbzt(Integer sbzt) {
|
||||
this.sbzt = sbzt;
|
||||
this.exception = sbzt != null && sbzt > 1000 ? sbzt : 0;
|
||||
}
|
||||
|
||||
public Integer getRwh() {
|
||||
return rwh;
|
||||
}
|
||||
|
||||
public void setRwh(Integer rwh) {
|
||||
this.rwh = rwh;
|
||||
}
|
||||
|
||||
public Integer getRkqq() {
|
||||
return rkqq;
|
||||
}
|
||||
|
||||
public void setRkqq(Integer rkqq) {
|
||||
this.rkqq = rkqq;
|
||||
}
|
||||
|
||||
public String getGetDb() {
|
||||
return getDb;
|
||||
}
|
||||
|
||||
public void setGetDb(String getDb) {
|
||||
this.getDb = getDb;
|
||||
}
|
||||
|
||||
public String getSendDb() {
|
||||
return sendDb;
|
||||
}
|
||||
|
||||
public void setSendDb(String sendDb) {
|
||||
this.sendDb = sendDb;
|
||||
}
|
||||
|
||||
public String getTmfk() {
|
||||
return tmfk;
|
||||
}
|
||||
|
||||
public void setTmfk(String tmfk) {
|
||||
this.tmfk = tmfk;
|
||||
}
|
||||
|
||||
public Integer getLength() {
|
||||
return length;
|
||||
}
|
||||
|
||||
public void setLength(Integer length) {
|
||||
this.length = length;
|
||||
}
|
||||
|
||||
public Integer getFloor() {
|
||||
return floor;
|
||||
}
|
||||
|
||||
public void setFloor(Integer floor) {
|
||||
this.floor = floor;
|
||||
}
|
||||
|
||||
public Integer getRcms() {
|
||||
return rcms;
|
||||
}
|
||||
|
||||
public void setRcms(Integer rcms) {
|
||||
this.rcms = rcms;
|
||||
}
|
||||
|
||||
public Integer getHeight() {
|
||||
return height;
|
||||
}
|
||||
|
||||
public void setHeight(Integer height) {
|
||||
this.height = height;
|
||||
}
|
||||
|
||||
public Integer getWeight() {
|
||||
return weight;
|
||||
}
|
||||
|
||||
public void setWeight(Integer weight) {
|
||||
this.weight = weight;
|
||||
}
|
||||
|
||||
public Integer getDwFirst() {
|
||||
return dwFirst;
|
||||
}
|
||||
|
||||
public void setDwFirst(Integer dwFirst) {
|
||||
this.dwFirst = dwFirst;
|
||||
}
|
||||
|
||||
public Integer getDwLen() {
|
||||
return dwLen;
|
||||
}
|
||||
|
||||
public void setDwLen(Integer dwLen) {
|
||||
this.dwLen = dwLen;
|
||||
}
|
||||
|
||||
public Integer getDwIsOpen() {
|
||||
return dwIsOpen;
|
||||
}
|
||||
|
||||
public void setDwIsOpen(Integer dwIsOpen) {
|
||||
this.dwIsOpen = dwIsOpen;
|
||||
}
|
||||
|
||||
public Integer getKxFirst() {
|
||||
return kxFirst;
|
||||
}
|
||||
|
||||
public void setKxFirst(Integer kxFirst) {
|
||||
this.kxFirst = kxFirst;
|
||||
}
|
||||
|
||||
public Integer getKxLen() {
|
||||
return kxLen;
|
||||
}
|
||||
|
||||
public void setKxLen(Integer kxLen) {
|
||||
this.kxLen = kxLen;
|
||||
}
|
||||
|
||||
public Integer getKxIsOpen() {
|
||||
return kxIsOpen;
|
||||
}
|
||||
|
||||
public void setKxIsOpen(Integer kxIsOpen) {
|
||||
this.kxIsOpen = kxIsOpen;
|
||||
}
|
||||
|
||||
public Integer getSbztFirst() {
|
||||
return sbztFirst;
|
||||
}
|
||||
|
||||
public void setSbztFirst(Integer sbztFirst) {
|
||||
this.sbztFirst = sbztFirst;
|
||||
}
|
||||
|
||||
public Integer getSbztLen() {
|
||||
return sbztLen;
|
||||
}
|
||||
|
||||
public void setSbztLen(Integer sbztLen) {
|
||||
this.sbztLen = sbztLen;
|
||||
}
|
||||
|
||||
public Integer getSbztIsOpen() {
|
||||
return sbztIsOpen;
|
||||
}
|
||||
|
||||
public void setSbztIsOpen(Integer sbztIsOpen) {
|
||||
this.sbztIsOpen = sbztIsOpen;
|
||||
}
|
||||
|
||||
public Integer getRwhFirst() {
|
||||
return rwhFirst;
|
||||
}
|
||||
|
||||
public void setRwhFirst(Integer rwhFirst) {
|
||||
this.rwhFirst = rwhFirst;
|
||||
}
|
||||
|
||||
public Integer getRwhLen() {
|
||||
return rwhLen;
|
||||
}
|
||||
|
||||
public void setRwhLen(Integer rwhLen) {
|
||||
this.rwhLen = rwhLen;
|
||||
}
|
||||
|
||||
public Integer getRwhIsOpen() {
|
||||
return rwhIsOpen;
|
||||
}
|
||||
|
||||
public void setRwhIsOpen(Integer rwhIsOpen) {
|
||||
this.rwhIsOpen = rwhIsOpen;
|
||||
}
|
||||
|
||||
public Integer getRkqqFirst() {
|
||||
return rkqqFirst;
|
||||
}
|
||||
|
||||
public void setRkqqFirst(Integer rkqqFirst) {
|
||||
this.rkqqFirst = rkqqFirst;
|
||||
}
|
||||
|
||||
public Integer getRkqqLen() {
|
||||
return rkqqLen;
|
||||
}
|
||||
|
||||
public void setRkqqLen(Integer rkqqLen) {
|
||||
this.rkqqLen = rkqqLen;
|
||||
}
|
||||
|
||||
public Integer getRkqqIsOpen() {
|
||||
return rkqqIsOpen;
|
||||
}
|
||||
|
||||
public void setRkqqIsOpen(Integer rkqqIsOpen) {
|
||||
this.rkqqIsOpen = rkqqIsOpen;
|
||||
}
|
||||
|
||||
public Integer getTmfkFirst() {
|
||||
return tmfkFirst;
|
||||
}
|
||||
|
||||
public void setTmfkFirst(Integer tmfkFirst) {
|
||||
this.tmfkFirst = tmfkFirst;
|
||||
}
|
||||
|
||||
public Integer getTmfkLen() {
|
||||
return tmfkLen;
|
||||
}
|
||||
|
||||
public void setTmfkLen(Integer tmfkLen) {
|
||||
this.tmfkLen = tmfkLen;
|
||||
}
|
||||
|
||||
public Integer getTmfkIsOpen() {
|
||||
return tmfkIsOpen;
|
||||
}
|
||||
|
||||
public void setTmfkIsOpen(Integer tmfkIsOpen) {
|
||||
this.tmfkIsOpen = tmfkIsOpen;
|
||||
}
|
||||
|
||||
public Integer getRcmsFirst() {
|
||||
return rcmsFirst;
|
||||
}
|
||||
|
||||
public void setRcmsFirst(Integer rcmsFirst) {
|
||||
this.rcmsFirst = rcmsFirst;
|
||||
}
|
||||
|
||||
public Integer getRcmsLen() {
|
||||
return rcmsLen;
|
||||
}
|
||||
|
||||
public void setRcmsLen(Integer rcmsLen) {
|
||||
this.rcmsLen = rcmsLen;
|
||||
}
|
||||
|
||||
public Integer getRcmsIsOpen() {
|
||||
return rcmsIsOpen;
|
||||
}
|
||||
|
||||
public void setRcmsIsOpen(Integer rcmsIsOpen) {
|
||||
this.rcmsIsOpen = rcmsIsOpen;
|
||||
}
|
||||
|
||||
public Integer getHeightFirst() {
|
||||
return heightFirst;
|
||||
}
|
||||
|
||||
public void setHeightFirst(Integer heightFirst) {
|
||||
this.heightFirst = heightFirst;
|
||||
}
|
||||
|
||||
public Integer getHeightLen() {
|
||||
return heightLen;
|
||||
}
|
||||
|
||||
public void setHeightLen(Integer heightLen) {
|
||||
this.heightLen = heightLen;
|
||||
}
|
||||
|
||||
public Integer getHeightIsOpen() {
|
||||
return heightIsOpen;
|
||||
}
|
||||
|
||||
public void setHeightIsOpen(Integer heightIsOpen) {
|
||||
this.heightIsOpen = heightIsOpen;
|
||||
}
|
||||
|
||||
public Integer getWeightFirst() {
|
||||
return weightFirst;
|
||||
}
|
||||
|
||||
public void setWeightFirst(Integer weightFirst) {
|
||||
this.weightFirst = weightFirst;
|
||||
}
|
||||
|
||||
public Integer getWeightLen() {
|
||||
return weightLen;
|
||||
}
|
||||
|
||||
public void setWeightLen(Integer weightLen) {
|
||||
this.weightLen = weightLen;
|
||||
}
|
||||
|
||||
public Integer getWeightIsOpen() {
|
||||
return weightIsOpen;
|
||||
}
|
||||
|
||||
public void setWeightIsOpen(Integer weightIsOpen) {
|
||||
this.weightIsOpen = weightIsOpen;
|
||||
}
|
||||
|
||||
public String getDeviceCode() {
|
||||
return deviceCode;
|
||||
}
|
||||
|
||||
public void setDeviceCode(String deviceCode) {
|
||||
this.deviceCode = deviceCode;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Integer getModel() {
|
||||
return model;
|
||||
}
|
||||
|
||||
public void setModel(Integer model) {
|
||||
this.model = model;
|
||||
}
|
||||
|
||||
public String getIpAddress() {
|
||||
return ipAddress;
|
||||
}
|
||||
|
||||
public void setIpAddress(String ipAddress) {
|
||||
this.ipAddress = ipAddress;
|
||||
}
|
||||
|
||||
public Integer getException() {
|
||||
return exception;
|
||||
}
|
||||
|
||||
public void setException(Integer exception) {
|
||||
this.exception = exception;
|
||||
}
|
||||
|
||||
public Integer getTaskNo() {
|
||||
return rwh;
|
||||
}
|
||||
|
||||
public void setTaskNo(Integer taskNo) {
|
||||
this.rwh = taskNo;
|
||||
}
|
||||
|
||||
public String getTrayCode() {
|
||||
return tmfk;
|
||||
}
|
||||
|
||||
public void setTrayCode(String trayCode) {
|
||||
this.tmfk = trayCode;
|
||||
}
|
||||
|
||||
public String getPlcDbReadAddress() {
|
||||
return getDb;
|
||||
}
|
||||
|
||||
public void setPlcDbReadAddress(String address) {
|
||||
this.getDb = address;
|
||||
}
|
||||
|
||||
public String getPlcDbWriteAddress() {
|
||||
return sendDb;
|
||||
}
|
||||
|
||||
public void setPlcDbWriteAddress(String address) {
|
||||
this.sendDb = address;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public int getRKDW() {
|
||||
return valueOrZero(dw);
|
||||
}
|
||||
|
||||
public void setRKDW(int value) {
|
||||
this.dw = value;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public int getSSKX() {
|
||||
return valueOrZero(kx);
|
||||
}
|
||||
|
||||
public void setSSKX(int value) {
|
||||
this.kx = value;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public int getRWH() {
|
||||
return valueOrZero(rwh);
|
||||
}
|
||||
|
||||
public void setRWH(int value) {
|
||||
this.rwh = value;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public int getRKQQ() {
|
||||
return valueOrZero(rkqq);
|
||||
}
|
||||
|
||||
public void setRKQQ(int value) {
|
||||
this.rkqq = value;
|
||||
}
|
||||
|
||||
@JsonIgnore
|
||||
public int getSBZT() {
|
||||
return valueOrZero(sbzt);
|
||||
}
|
||||
|
||||
public void setSBZT(int value) {
|
||||
setSbzt(value);
|
||||
}
|
||||
|
||||
public int getP() {
|
||||
return valueOrZero(location);
|
||||
}
|
||||
|
||||
public void setP(int value) {
|
||||
this.location = value;
|
||||
}
|
||||
|
||||
public int getDQC() {
|
||||
return valueOrZero(floor);
|
||||
}
|
||||
|
||||
public void setDQC(int value) {
|
||||
this.floor = value;
|
||||
}
|
||||
|
||||
private static int valueOrZero(Integer value) {
|
||||
return value == null ? 0 : value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.ruoyi.device.ssj.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.annotation.DataSource;
|
||||
import com.ruoyi.common.enums.DataSourceType;
|
||||
import com.ruoyi.device.ssj.domain.DeviceSsj;
|
||||
|
||||
/**
|
||||
* msg_ssj 输送机消息表Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-07-04
|
||||
*/
|
||||
@DataSource(DataSourceType.MASTER)
|
||||
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);
|
||||
|
||||
List<DeviceSsj> selectDeviceSsjListAll();
|
||||
}
|
||||
@@ -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,98 @@
|
||||
package com.ruoyi.device.ssj.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.annotation.DataSource;
|
||||
import com.ruoyi.common.enums.DataSourceType;
|
||||
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
|
||||
@DataSource(DataSourceType.MASTER)
|
||||
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,75 @@
|
||||
package com.ruoyi.device.warring.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.device.warring.domain.DeviceWarring;
|
||||
import com.ruoyi.device.warring.service.IDeviceWarringService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/** 设备报警管理接口。 */
|
||||
@RestController
|
||||
@RequestMapping("/device/warring")
|
||||
public class DeviceWarringController extends BaseController {
|
||||
private final IDeviceWarringService deviceWarringService;
|
||||
|
||||
public DeviceWarringController(IDeviceWarringService deviceWarringService) {
|
||||
this.deviceWarringService = deviceWarringService;
|
||||
}
|
||||
|
||||
/** 分页查询设备报警记录。 */
|
||||
@PreAuthorize("@ss.hasPermi('device:warring:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DeviceWarring deviceWarring) {
|
||||
startPage();
|
||||
List<DeviceWarring> list = deviceWarringService.selectDeviceWarringList(deviceWarring);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/** 导出设备报警记录。 */
|
||||
@PreAuthorize("@ss.hasPermi('device:warring:export')")
|
||||
@Log(title = "设备报警", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, DeviceWarring deviceWarring) {
|
||||
List<DeviceWarring> list = deviceWarringService.selectDeviceWarringList(deviceWarring);
|
||||
new ExcelUtil<>(DeviceWarring.class).exportExcel(response, list, "设备报警数据");
|
||||
}
|
||||
|
||||
/** 根据主键查询设备报警详情。 */
|
||||
@PreAuthorize("@ss.hasPermi('device:warring:query')")
|
||||
@GetMapping("/{uuid}")
|
||||
public AjaxResult getInfo(@PathVariable Integer uuid) {
|
||||
return success(deviceWarringService.selectDeviceWarringByUuid(uuid));
|
||||
}
|
||||
|
||||
/** 新增设备报警记录。 */
|
||||
@PreAuthorize("@ss.hasPermi('device:warring:add')")
|
||||
@Log(title = "设备报警", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody DeviceWarring deviceWarring) {
|
||||
return toAjax(deviceWarringService.insertDeviceWarring(deviceWarring));
|
||||
}
|
||||
|
||||
/** 修改设备报警记录。 */
|
||||
@PreAuthorize("@ss.hasPermi('device:warring:edit')")
|
||||
@Log(title = "设备报警", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody DeviceWarring deviceWarring) {
|
||||
return toAjax(deviceWarringService.updateDeviceWarring(deviceWarring));
|
||||
}
|
||||
|
||||
/** 批量删除设备报警记录。 */
|
||||
@PreAuthorize("@ss.hasPermi('device:warring:remove')")
|
||||
@Log(title = "设备报警", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{uuids}")
|
||||
public AjaxResult remove(@PathVariable Integer[] uuids) {
|
||||
return toAjax(deviceWarringService.deleteDeviceWarringByUuids(uuids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package com.ruoyi.device.warring.domain;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/** 设备报警对象,对应 device_warring 表。 */
|
||||
public class DeviceWarring extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 报警记录主键。 */
|
||||
private Integer uuid;
|
||||
|
||||
/** 设备ID,对应数据库字段 id。 */
|
||||
@Excel(name = "设备ID")
|
||||
private Integer deviceId;
|
||||
|
||||
/** 设备名称,对应数据库字段 name。 */
|
||||
@Excel(name = "设备名称")
|
||||
private String deviceName;
|
||||
|
||||
/** 报警开始时间,对应数据库字段 kssj。 */
|
||||
@Excel(name = "开始时间")
|
||||
private String startTime;
|
||||
|
||||
/** 报警结束时间,对应数据库字段 jssj。 */
|
||||
@Excel(name = "结束时间")
|
||||
private String endTime;
|
||||
|
||||
/** 报警代码,对应数据库字段 warring。 */
|
||||
@Excel(name = "报警代码")
|
||||
private String warringCode;
|
||||
|
||||
/** 报警名称。 */
|
||||
@Excel(name = "报警名称")
|
||||
private String warringName;
|
||||
|
||||
/** 设备类型,对应数据库字段 sb_lx。 */
|
||||
@Excel(name = "设备类型")
|
||||
private String deviceType;
|
||||
|
||||
/** 报警任务号。 */
|
||||
@Excel(name = "任务号")
|
||||
private Integer taskNo;
|
||||
|
||||
public Integer getUuid() { return uuid; }
|
||||
public void setUuid(Integer uuid) { this.uuid = uuid; }
|
||||
public Integer getDeviceId() { return deviceId; }
|
||||
public void setDeviceId(Integer deviceId) { this.deviceId = deviceId; }
|
||||
public String getDeviceName() { return deviceName; }
|
||||
public void setDeviceName(String deviceName) { this.deviceName = deviceName; }
|
||||
public String getStartTime() { return startTime; }
|
||||
public void setStartTime(String startTime) { this.startTime = startTime; }
|
||||
public String getEndTime() { return endTime; }
|
||||
public void setEndTime(String endTime) { this.endTime = endTime; }
|
||||
public String getWarringCode() { return warringCode; }
|
||||
public void setWarringCode(String warringCode) { this.warringCode = warringCode; }
|
||||
public String getWarringName() { return warringName; }
|
||||
public void setWarringName(String warringName) { this.warringName = warringName; }
|
||||
public String getDeviceType() { return deviceType; }
|
||||
public void setDeviceType(String deviceType) { this.deviceType = deviceType; }
|
||||
public Integer getTaskNo() { return taskNo; }
|
||||
public void setTaskNo(Integer taskNo) { this.taskNo = taskNo; }
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("uuid", getUuid())
|
||||
.append("deviceId", getDeviceId())
|
||||
.append("deviceName", getDeviceName())
|
||||
.append("startTime", getStartTime())
|
||||
.append("endTime", getEndTime())
|
||||
.append("warringCode", getWarringCode())
|
||||
.append("warringName", getWarringName())
|
||||
.append("deviceType", getDeviceType())
|
||||
.append("taskNo", getTaskNo())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.ruoyi.device.warring.mapper;
|
||||
|
||||
import com.ruoyi.common.annotation.DataSource;
|
||||
import com.ruoyi.common.enums.DataSourceType;
|
||||
import com.ruoyi.device.warring.domain.DeviceWarring;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/** device_warring 表数据访问接口。 */
|
||||
@DataSource(DataSourceType.MASTER)
|
||||
public interface DeviceWarringMapper {
|
||||
DeviceWarring selectDeviceWarringByUuid(Integer uuid);
|
||||
List<DeviceWarring> selectDeviceWarringList(DeviceWarring deviceWarring);
|
||||
int insertDeviceWarring(DeviceWarring deviceWarring);
|
||||
int updateDeviceWarring(DeviceWarring deviceWarring);
|
||||
int deleteDeviceWarringByUuid(Integer uuid);
|
||||
int deleteDeviceWarringByUuids(Integer[] uuids);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.ruoyi.device.warring.service;
|
||||
|
||||
import com.ruoyi.device.warring.domain.DeviceWarring;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/** 设备报警Service接口。 */
|
||||
public interface IDeviceWarringService {
|
||||
DeviceWarring selectDeviceWarringByUuid(Integer uuid);
|
||||
List<DeviceWarring> selectDeviceWarringList(DeviceWarring deviceWarring);
|
||||
int insertDeviceWarring(DeviceWarring deviceWarring);
|
||||
int updateDeviceWarring(DeviceWarring deviceWarring);
|
||||
int deleteDeviceWarringByUuids(Integer[] uuids);
|
||||
int deleteDeviceWarringByUuid(Integer uuid);
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.ruoyi.device.warring.service.impl;
|
||||
|
||||
import com.ruoyi.common.annotation.DataSource;
|
||||
import com.ruoyi.common.enums.DataSourceType;
|
||||
import com.ruoyi.device.warring.domain.DeviceWarring;
|
||||
import com.ruoyi.device.warring.mapper.DeviceWarringMapper;
|
||||
import com.ruoyi.device.warring.service.IDeviceWarringService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/** 设备报警Service业务层处理。 */
|
||||
@Service
|
||||
@DataSource(DataSourceType.MASTER)
|
||||
public class DeviceWarringServiceImpl implements IDeviceWarringService {
|
||||
private final DeviceWarringMapper deviceWarringMapper;
|
||||
|
||||
public DeviceWarringServiceImpl(DeviceWarringMapper deviceWarringMapper) {
|
||||
this.deviceWarringMapper = deviceWarringMapper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeviceWarring selectDeviceWarringByUuid(Integer uuid) {
|
||||
return deviceWarringMapper.selectDeviceWarringByUuid(uuid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DeviceWarring> selectDeviceWarringList(DeviceWarring deviceWarring) {
|
||||
return deviceWarringMapper.selectDeviceWarringList(deviceWarring);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertDeviceWarring(DeviceWarring deviceWarring) {
|
||||
return deviceWarringMapper.insertDeviceWarring(deviceWarring);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateDeviceWarring(DeviceWarring deviceWarring) {
|
||||
return deviceWarringMapper.updateDeviceWarring(deviceWarring);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteDeviceWarringByUuids(Integer[] uuids) {
|
||||
return deviceWarringMapper.deleteDeviceWarringByUuids(uuids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int deleteDeviceWarringByUuid(Integer uuid) {
|
||||
return deviceWarringMapper.deleteDeviceWarringByUuid(uuid);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.ruoyi.instockin.controller;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.instockin.domain.InStockInDetail;
|
||||
import com.ruoyi.instockin.service.IInStockInDetailService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/** 入库单明细管理接口。 */
|
||||
@RestController
|
||||
@RequestMapping("/instockin/detail")
|
||||
public class InStockInDetailController extends BaseController {
|
||||
private final IInStockInDetailService inStockInDetailService;
|
||||
|
||||
public InStockInDetailController(IInStockInDetailService inStockInDetailService) {
|
||||
this.inStockInDetailService = inStockInDetailService;
|
||||
}
|
||||
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list() {
|
||||
startPage();
|
||||
List<InStockInDetail> list = inStockInDetailService.selectAll();
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@GetMapping("/{stockinDetailId}")
|
||||
public AjaxResult getInfo(@PathVariable String stockinDetailId) {
|
||||
return success(inStockInDetailService.selectById(stockinDetailId));
|
||||
}
|
||||
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody InStockInDetail detail) {
|
||||
return toAjax(inStockInDetailService.insert(detail));
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody InStockInDetail detail) {
|
||||
return toAjax(inStockInDetailService.update(detail));
|
||||
}
|
||||
|
||||
@DeleteMapping("/{stockinDetailId}")
|
||||
public AjaxResult remove(@PathVariable String stockinDetailId) {
|
||||
return toAjax(inStockInDetailService.deleteById(stockinDetailId));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.ruoyi.instockin.domain;
|
||||
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
/** 入库单明细实体,对应 in_stock_in_detail 表。 */
|
||||
public class InStockInDetail extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String stockinDetailId;
|
||||
private String stockinId;
|
||||
private String lotNo;
|
||||
private String productId;
|
||||
private String productName;
|
||||
private String quantity;
|
||||
private String scanNum;
|
||||
private String assignNum;
|
||||
private String materialScope;
|
||||
private String sourceBillDetailId;
|
||||
private String totalWeight;
|
||||
private String scanWeight;
|
||||
private String assignWeight;
|
||||
private String arrivalId;
|
||||
private String materialGrade;
|
||||
private String materialType;
|
||||
|
||||
public String getStockinDetailId() { return stockinDetailId; }
|
||||
public void setStockinDetailId(String stockinDetailId) { this.stockinDetailId = stockinDetailId; }
|
||||
public String getStockinId() { return stockinId; }
|
||||
public void setStockinId(String stockinId) { this.stockinId = stockinId; }
|
||||
public String getLotNo() { return lotNo; }
|
||||
public void setLotNo(String lotNo) { this.lotNo = lotNo; }
|
||||
public String getProductId() { return productId; }
|
||||
public void setProductId(String productId) { this.productId = productId; }
|
||||
public String getProductName() { return productName; }
|
||||
public void setProductName(String productName) { this.productName = productName; }
|
||||
public String getQuantity() { return quantity; }
|
||||
public void setQuantity(String quantity) { this.quantity = quantity; }
|
||||
public String getScanNum() { return scanNum; }
|
||||
public void setScanNum(String scanNum) { this.scanNum = scanNum; }
|
||||
public String getAssignNum() { return assignNum; }
|
||||
public void setAssignNum(String assignNum) { this.assignNum = assignNum; }
|
||||
public String getMaterialScope() { return materialScope; }
|
||||
public void setMaterialScope(String materialScope) { this.materialScope = materialScope; }
|
||||
public String getSourceBillDetailId() { return sourceBillDetailId; }
|
||||
public void setSourceBillDetailId(String sourceBillDetailId) { this.sourceBillDetailId = sourceBillDetailId; }
|
||||
public String getTotalWeight() { return totalWeight; }
|
||||
public void setTotalWeight(String totalWeight) { this.totalWeight = totalWeight; }
|
||||
public String getScanWeight() { return scanWeight; }
|
||||
public void setScanWeight(String scanWeight) { this.scanWeight = scanWeight; }
|
||||
public String getAssignWeight() { return assignWeight; }
|
||||
public void setAssignWeight(String assignWeight) { this.assignWeight = assignWeight; }
|
||||
public String getArrivalId() { return arrivalId; }
|
||||
public void setArrivalId(String arrivalId) { this.arrivalId = arrivalId; }
|
||||
public String getMaterialGrade() { return materialGrade; }
|
||||
public void setMaterialGrade(String materialGrade) { this.materialGrade = materialGrade; }
|
||||
public String getMaterialType() { return materialType; }
|
||||
public void setMaterialType(String materialType) { this.materialType = materialType; }
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.ruoyi.instockin.mapper;
|
||||
|
||||
import com.ruoyi.common.annotation.DataSource;
|
||||
import com.ruoyi.common.enums.DataSourceType;
|
||||
import com.ruoyi.instockin.domain.InStockInDetail;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/** in_stock_in_detail 表数据访问接口。 */
|
||||
@DataSource(DataSourceType.MASTER)
|
||||
public interface InStockInDetailMapper {
|
||||
InStockInDetail selectById(String stockinDetailId);
|
||||
List<InStockInDetail> selectAll();
|
||||
int insert(InStockInDetail inStockInDetail);
|
||||
int update(InStockInDetail inStockInDetail);
|
||||
int deleteById(String stockinDetailId);
|
||||
|
||||
InStockInDetail selectInStockInDetail(String barCode);
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.ruoyi.instockin.service;
|
||||
|
||||
import com.ruoyi.instockin.domain.InStockInDetail;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/** 入库单明细Service接口。 */
|
||||
public interface IInStockInDetailService {
|
||||
InStockInDetail selectById(String stockinDetailId);
|
||||
List<InStockInDetail> selectAll();
|
||||
int insert(InStockInDetail inStockInDetail);
|
||||
int update(InStockInDetail inStockInDetail);
|
||||
int deleteById(String stockinDetailId);
|
||||
|
||||
InStockInDetail selectInStockInDetail(String barCode);
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.ruoyi.instockin.service.impl;
|
||||
|
||||
import com.ruoyi.common.annotation.DataSource;
|
||||
import com.ruoyi.common.enums.DataSourceType;
|
||||
import com.ruoyi.instockin.domain.InStockInDetail;
|
||||
import com.ruoyi.instockin.mapper.InStockInDetailMapper;
|
||||
import com.ruoyi.instockin.service.IInStockInDetailService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/** 入库单明细Service业务层处理。 */
|
||||
@Service
|
||||
@DataSource(DataSourceType.MASTER)
|
||||
public class InStockInDetailServiceImpl implements IInStockInDetailService {
|
||||
private final InStockInDetailMapper inStockInDetailMapper;
|
||||
|
||||
public InStockInDetailServiceImpl(InStockInDetailMapper inStockInDetailMapper) {
|
||||
this.inStockInDetailMapper = inStockInDetailMapper;
|
||||
}
|
||||
|
||||
@Override public InStockInDetail selectById(String stockinDetailId) { return inStockInDetailMapper.selectById(stockinDetailId); }
|
||||
@Override public List<InStockInDetail> selectAll() { return inStockInDetailMapper.selectAll(); }
|
||||
@Override public int insert(InStockInDetail inStockInDetail) { return inStockInDetailMapper.insert(inStockInDetail); }
|
||||
@Override public int update(InStockInDetail inStockInDetail) { return inStockInDetailMapper.update(inStockInDetail); }
|
||||
@Override public int deleteById(String stockinDetailId) { return inStockInDetailMapper.deleteById(stockinDetailId); }
|
||||
|
||||
@Override
|
||||
public InStockInDetail selectInStockInDetail(String barCode) {
|
||||
return inStockInDetailMapper.selectInStockInDetail(barCode);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
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));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.ruoyi.job.controller;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.job.domain.MydoJobDetail;
|
||||
import com.ruoyi.job.service.IMydoJobDetailService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/job/detail")
|
||||
public class MydoJobDetailController extends BaseController {
|
||||
private final IMydoJobDetailService mydoJobDetailService;
|
||||
|
||||
public MydoJobDetailController(IMydoJobDetailService mydoJobDetailService) {
|
||||
this.mydoJobDetailService = mydoJobDetailService;
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('job:detail:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(MydoJobDetail detail) {
|
||||
startPage();
|
||||
List<MydoJobDetail> list = mydoJobDetailService.selectMydoJobDetailList(detail);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('job:detail:query')")
|
||||
@GetMapping("/{jobDetailId}")
|
||||
public AjaxResult getInfo(@PathVariable String jobDetailId) {
|
||||
return success(mydoJobDetailService.selectMydoJobDetailById(jobDetailId));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('job:detail:add')")
|
||||
@Log(title = "????", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody MydoJobDetail detail) {
|
||||
return toAjax(mydoJobDetailService.insertMydoJobDetail(detail));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('job:detail:edit')")
|
||||
@Log(title = "????", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody MydoJobDetail detail) {
|
||||
return toAjax(mydoJobDetailService.updateMydoJobDetail(detail));
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('job:detail:remove')")
|
||||
@Log(title = "????", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{jobDetailIds}")
|
||||
public AjaxResult remove(@PathVariable String[] jobDetailIds) {
|
||||
return toAjax(mydoJobDetailService.deleteMydoJobDetailByIds(jobDetailIds));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.ruoyi.job.controller;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.job.domain.ViewDoubleOne;
|
||||
import com.ruoyi.job.service.IViewDoubleOneService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/job/viewDoubleOne")
|
||||
public class ViewDoubleOneController extends BaseController {
|
||||
private final IViewDoubleOneService viewDoubleOneService;
|
||||
|
||||
public ViewDoubleOneController(IViewDoubleOneService viewDoubleOneService) {
|
||||
this.viewDoubleOneService = viewDoubleOneService;
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('job:viewDoubleOne:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ViewDoubleOne viewDoubleOne) {
|
||||
startPage();
|
||||
List<ViewDoubleOne> list = viewDoubleOneService.selectViewDoubleOneList(viewDoubleOne);
|
||||
return getDataTable(list);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.ruoyi.job.controller;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.job.domain.ViewDoubleTwo;
|
||||
import com.ruoyi.job.service.IViewDoubleTwoService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/job/viewDoubleTwo")
|
||||
public class ViewDoubleTwoController extends BaseController {
|
||||
private final IViewDoubleTwoService viewDoubleTwoService;
|
||||
|
||||
public ViewDoubleTwoController(IViewDoubleTwoService viewDoubleTwoService) {
|
||||
this.viewDoubleTwoService = viewDoubleTwoService;
|
||||
}
|
||||
|
||||
@PreAuthorize("@ss.hasPermi('job:viewDoubleTwo:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ViewDoubleTwo viewDoubleTwo) {
|
||||
startPage();
|
||||
List<ViewDoubleTwo> list = viewDoubleTwoService.selectViewDoubleTwoList(viewDoubleTwo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user