diff --git a/.gitee/ISSUE_TEMPLATE/bug.yml b/.gitee/ISSUE_TEMPLATE/bug.yml
index 0450013..1c52336 100644
--- a/.gitee/ISSUE_TEMPLATE/bug.yml
+++ b/.gitee/ISSUE_TEMPLATE/bug.yml
@@ -25,7 +25,7 @@ body:
attributes:
label: 这个问题是否已经存在?
options:
- - label: 我已经搜索过现有的问题 (https://gitee.com/dromara/RuoYi-Vue-Plus/issues)
+ - label: 我已经搜索过现有的问题
required: true
- type: textarea
attributes:
diff --git a/.gitee/ISSUE_TEMPLATE/config.yml b/.gitee/ISSUE_TEMPLATE/config.yml
index 9450a98..b2a229d 100644
--- a/.gitee/ISSUE_TEMPLATE/config.yml
+++ b/.gitee/ISSUE_TEMPLATE/config.yml
@@ -1,5 +1,5 @@
blank_issues_enabled: false
contact_links:
- - name: RuoYi-Vue-Plus 文档中心
+ - name: RFID 文档中心
url: https://plus-doc.dromara.org
- about: 提供 RuoYi-Vue-Plus 搭建使用指南、平台基本开发使用方式、介绍、基础知识和常见问题解答
+ about: 提供 RFID 搭建使用指南、平台基本开发使用方式、介绍、基础知识和常见问题解答
diff --git a/RFID.md b/RFID.md
index d23d115..563436a 100644
--- a/RFID.md
+++ b/RFID.md
@@ -58,6 +58,11 @@
# 业务逻辑
+# 位置树与设备
+- 位置树分为车间/机台/工位,共三级
+- 设备绑定在工位上
+- IP地址 deviceAddress 唯一校验
+- 端口号devicePort应该都是20108,创建的时候先默认这个,如果有需要再修改
## 设备记录
### 分页查询
- 分页查询逻辑参考rfid-middleware\ruoyi-modules\hw-rfid\ShardingQuery.md文档
diff --git a/pom.xml b/pom.xml
index b6baf1b..bcbd424 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,7 +10,7 @@
RuoYi-Vue-Plus
https://gitee.com/dromara/RuoYi-Vue-Plus
- Dromara RuoYi-Vue-Plus多租户管理系统
+ RFID多租户管理系统
5.5.1
diff --git a/ruoyi-admin/src/main/java/org/dromara/DromaraApplication.java b/ruoyi-admin/src/main/java/org/dromara/DromaraApplication.java
index 8ef33fe..bfd7ac5 100644
--- a/ruoyi-admin/src/main/java/org/dromara/DromaraApplication.java
+++ b/ruoyi-admin/src/main/java/org/dromara/DromaraApplication.java
@@ -17,7 +17,7 @@ public class DromaraApplication {
SpringApplication application = new SpringApplication(DromaraApplication.class);
application.setApplicationStartup(new BufferingApplicationStartup(2048));
application.run(args);
- System.out.println("(♥◠‿◠)ノ゙ RuoYi-Vue-Plus启动成功 ლ(´ڡ`ლ)゙");
+ System.out.println("(♥◠‿◠)ノ゙ RFID启动成功 ლ(´ڡ`ლ)゙");
}
}
diff --git a/ruoyi-admin/src/main/java/org/dromara/web/controller/AuthController.java b/ruoyi-admin/src/main/java/org/dromara/web/controller/AuthController.java
index 89b9ab6..2ab1da6 100644
--- a/ruoyi-admin/src/main/java/org/dromara/web/controller/AuthController.java
+++ b/ruoyi-admin/src/main/java/org/dromara/web/controller/AuthController.java
@@ -106,7 +106,7 @@ public class AuthController {
Long userId = LoginHelper.getUserId();
scheduledExecutorService.schedule(() -> {
SseMessageDto dto = new SseMessageDto();
- dto.setMessage("欢迎登录RuoYi-Vue-Plus后台管理系统");
+ dto.setMessage("欢迎登录RFID后台管理系统");
dto.setUserIds(List.of(userId));
SseMessageUtils.publishMessage(dto);
}, 5, TimeUnit.SECONDS);
diff --git a/ruoyi-modules/hw-rfid/src/main/java/org/dromara/rfid/domain/bo/RfidDeviceBo.java b/ruoyi-modules/hw-rfid/src/main/java/org/dromara/rfid/domain/bo/RfidDeviceBo.java
index e42dc54..e0abbb0 100644
--- a/ruoyi-modules/hw-rfid/src/main/java/org/dromara/rfid/domain/bo/RfidDeviceBo.java
+++ b/ruoyi-modules/hw-rfid/src/main/java/org/dromara/rfid/domain/bo/RfidDeviceBo.java
@@ -31,7 +31,7 @@ public class RfidDeviceBo extends BaseEntity {
/**
* 设备编号
*/
- @NotBlank(message = "设备编号不能为空", groups = { AddGroup.class, EditGroup.class })
+ // @NotBlank(message = "设备编号不能为空", groups = { AddGroup.class, EditGroup.class })
private String deviceCode;
/**
@@ -48,6 +48,7 @@ public class RfidDeviceBo extends BaseEntity {
/**
* 设备地址(IP等)
*/
+ @NotBlank(message = "设备地址不能为空", groups = { AddGroup.class, EditGroup.class })
private String deviceAddress;
/**
@@ -63,13 +64,13 @@ public class RfidDeviceBo extends BaseEntity {
/**
* 在线状态(0-离线;1-在线)
*/
- @NotBlank(message = "在线状态不能为空", groups = { AddGroup.class, EditGroup.class })
+ // @NotBlank(message = "在线状态不能为空", groups = { AddGroup.class, EditGroup.class })
private String onlineStatus;
/**
* 告警状态(0-正常;1-告警)
*/
- @NotBlank(message = "告警状态不能为空", groups = { AddGroup.class, EditGroup.class })
+ // @NotBlank(message = "告警状态不能为空", groups = { AddGroup.class, EditGroup.class })
private String alarmStatus;
/**
diff --git a/ruoyi-modules/hw-rfid/src/main/java/org/dromara/rfid/service/impl/RfidDeviceServiceImpl.java b/ruoyi-modules/hw-rfid/src/main/java/org/dromara/rfid/service/impl/RfidDeviceServiceImpl.java
index 056ec07..5cccf3a 100644
--- a/ruoyi-modules/hw-rfid/src/main/java/org/dromara/rfid/service/impl/RfidDeviceServiceImpl.java
+++ b/ruoyi-modules/hw-rfid/src/main/java/org/dromara/rfid/service/impl/RfidDeviceServiceImpl.java
@@ -153,12 +153,22 @@ public class RfidDeviceServiceImpl implements IRfidDeviceService {
*/
private void validEntityBeforeSave(RfidDevice entity){
// 业务编号 deviceCode 唯一校验
- if (StringUtils.isNotBlank(entity.getDeviceCode())) {
- boolean exists = baseMapper.existsRfidDevice(Wrappers.lambdaQuery()
- .eq(RfidDevice::getDeviceCode, entity.getDeviceCode())
+ // if (StringUtils.isNotBlank(entity.getDeviceCode())) {
+ // boolean exists = baseMapper.existsRfidDevice(Wrappers.lambdaQuery()
+ // .eq(RfidDevice::getDeviceCode, entity.getDeviceCode())
+ // .ne(entity.getId() != null, RfidDevice::getId, entity.getId()));
+ // if (exists) {
+ // throw new ServiceException("设备编号已存在");
+ // }
+ // }
+
+ // IP地址 deviceAddress 唯一校验
+ if (StringUtils.isNotBlank(entity.getDeviceAddress())) {
+ boolean existsAddress = baseMapper.existsRfidDevice(Wrappers.lambdaQuery()
+ .eq(RfidDevice::getDeviceAddress, entity.getDeviceAddress())
.ne(entity.getId() != null, RfidDevice::getId, entity.getId()));
- if (exists) {
- throw new ServiceException("设备编号已存在");
+ if (existsAddress) {
+ throw new ServiceException("设备地址已存在");
}
}