代码优化

This commit is contained in:
xy
2025-01-14 11:47:40 +08:00
parent 1fb08ab66c
commit 40a6cd608c
3 changed files with 5 additions and 3 deletions

View File

@@ -94,7 +94,8 @@ public class AccessApplicationRunner implements ApplicationRunner {
//判断设备类型 便携式设备需要特殊处理 未注册的要先注册、再接入;已注册的直接重新接入
String code = dictTreeFeignClient.queryById(item.getDevType()).getData().getCode();
if (Objects.equals(code, DicDataEnum.PORTABLE.getCode()) && Objects.equals(item.getStatus(),1)) {
csDeviceService.wlDevRegister(item.getNdid());
//csDeviceService.wlDevRegister(item.getNdid());
log.info("请先手动注册、接入");
} else {
String version = csTopicService.getVersion(item.getNdid());
if (Objects.isNull(version)) {

View File

@@ -88,7 +88,8 @@ public class AutoAccessTimer implements ApplicationRunner {
//判断设备类型 便携式设备需要特殊处理 未注册的要先注册、再接入;已注册的直接重新接入
String code = dictTreeFeignClient.queryById(item.getDevType()).getData().getCode();
if (Objects.equals(code, DicDataEnum.PORTABLE.getCode()) && Objects.equals(item.getStatus(),1)) {
csDeviceService.wlDevRegister(item.getNdid());
//csDeviceService.wlDevRegister(item.getNdid());
log.info("请先手动注册、接入");
} else {
String version = csTopicService.getVersion(item.getNdid());
if (Objects.isNull(version)) {

View File

@@ -371,7 +371,7 @@ public class CsDeviceServiceImpl implements ICsDeviceService {
}
@Override
@Transactional(rollbackFor = Exception.class)
// @Transactional(rollbackFor = Exception.class)
public String wlDevRegister(String nDid) {
String result = "fail";
// 设备状态判断