refactor(sis): 1Vo 类,增加 DeviceInfo 内部类
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
- 注释掉 Sync
This commit is contained in:
parent
063b424b2b
commit
4f58aa9c1e
@ -159,12 +159,17 @@ public class SisElevatorInfoVo implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 呼梯摄像头
|
* 呼梯摄像头
|
||||||
*/
|
*/
|
||||||
private List<Long> remoteCallElevatorDeviceId;
|
private List<DeviceInfo> remoteCallElevatorDeviceId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 梯控摄像头
|
* 梯控摄像头
|
||||||
*/
|
*/
|
||||||
private Long elevatorControlDeviceId;
|
private DeviceInfo elevatorControlDeviceId;
|
||||||
|
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public static class DeviceInfo {
|
||||||
|
private Long deviceId;
|
||||||
|
private String deviceIp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package org.dromara.sis.mapper;
|
package org.dromara.sis.mapper;
|
||||||
|
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.dromara.sis.domain.SisElevatorInfo;
|
import org.dromara.sis.domain.SisElevatorInfo;
|
||||||
import org.dromara.sis.domain.vo.SisElevatorInfoVo;
|
import org.dromara.sis.domain.vo.SisElevatorInfoVo;
|
||||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
@ -8,8 +9,9 @@ import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
|||||||
* 电梯基本信息Mapper接口
|
* 电梯基本信息Mapper接口
|
||||||
*
|
*
|
||||||
* @author lxj
|
* @author lxj
|
||||||
* @date 2025-07-10
|
* @since 2025-07-10
|
||||||
*/
|
*/
|
||||||
|
@Mapper
|
||||||
public interface SisElevatorInfoMapper extends BaseMapperPlus<SisElevatorInfo, SisElevatorInfoVo> {
|
public interface SisElevatorInfoMapper extends BaseMapperPlus<SisElevatorInfo, SisElevatorInfoVo> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -22,13 +22,13 @@ import java.util.stream.Collectors;
|
|||||||
@Component
|
@Component
|
||||||
public class E8ApiUtil {
|
public class E8ApiUtil {
|
||||||
|
|
||||||
@Value("e8.url")
|
@Value("${E8Plat.url}")
|
||||||
private String BASE_URL;
|
private String BASE_URL;
|
||||||
|
|
||||||
@Value("e8.secretKey")
|
@Value("${E8Plat.secretKey}")
|
||||||
private String SECRET_KEY;
|
private String SECRET_KEY;
|
||||||
|
|
||||||
@Value("e8.key")
|
@Value("${E8Plat.key}")
|
||||||
private String KEY;
|
private String KEY;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -12,7 +12,7 @@ import java.util.List;
|
|||||||
* 电梯基本信息Service接口
|
* 电梯基本信息Service接口
|
||||||
*
|
*
|
||||||
* @author lxj
|
* @author lxj
|
||||||
* @date 2025-07-10
|
* @since 2025-07-10
|
||||||
*/
|
*/
|
||||||
public interface ISisElevatorInfoService {
|
public interface ISisElevatorInfoService {
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ import static org.dromara.common.core.constant.CodePrefixConstants.ELEVATOR_CONT
|
|||||||
* 电梯基本信息Service业务层处理
|
* 电梯基本信息Service业务层处理
|
||||||
*
|
*
|
||||||
* @author lxj
|
* @author lxj
|
||||||
* @date 2025-07-10
|
* @since 2025-07-10
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@ -57,20 +57,21 @@ public class SisElevatorInfoServiceImpl implements ISisElevatorInfoService {
|
|||||||
public SisElevatorInfoVo queryById(Long elevatorId) {
|
public SisElevatorInfoVo queryById(Long elevatorId) {
|
||||||
SisElevatorInfoVo sisElevatorInfoVo = baseMapper.selectVoById(elevatorId);
|
SisElevatorInfoVo sisElevatorInfoVo = baseMapper.selectVoById(elevatorId);
|
||||||
if (sisElevatorInfoVo == null) {
|
if (sisElevatorInfoVo == null) {
|
||||||
return sisElevatorInfoVo;
|
return null;
|
||||||
}
|
}
|
||||||
List<SisDeviceBindRef> ref = deviceBindRefService.queryByBindId(elevatorId);
|
List<SisDeviceBindRef> ref = deviceBindRefService.queryByBindId(elevatorId);
|
||||||
if (CollUtil.isNotEmpty(ref)) {
|
if (CollUtil.isNotEmpty(ref)) {
|
||||||
List<Long> remoteCallElevatorDeviceId = new ArrayList<>(ref.size());
|
List<SisElevatorInfoVo.DeviceInfo> remoteCallElevatorDeviceId = new ArrayList<>(ref.size());
|
||||||
Long elevatorControlDeviceId = null;
|
|
||||||
for (SisDeviceBindRef item : ref) {
|
for (SisDeviceBindRef item : ref) {
|
||||||
|
SisElevatorInfoVo.DeviceInfo deviceInfo = new SisElevatorInfoVo.DeviceInfo();
|
||||||
|
deviceInfo.setDeviceId(item.getDeviceId());
|
||||||
|
deviceInfo.setDeviceIp(item.getDeviceIp());
|
||||||
if (Objects.equals(item.getControlType(), ControlTypeEnum.REMOTE_CALL_ELEVATOR.getCode())) {
|
if (Objects.equals(item.getControlType(), ControlTypeEnum.REMOTE_CALL_ELEVATOR.getCode())) {
|
||||||
remoteCallElevatorDeviceId.add(item.getDeviceId());
|
remoteCallElevatorDeviceId.add(deviceInfo);
|
||||||
} else {
|
}else {
|
||||||
elevatorControlDeviceId = item.getDeviceId();
|
sisElevatorInfoVo.setElevatorControlDeviceId(deviceInfo);
|
||||||
}
|
}
|
||||||
sisElevatorInfoVo.setRemoteCallElevatorDeviceId(remoteCallElevatorDeviceId);
|
sisElevatorInfoVo.setRemoteCallElevatorDeviceId(remoteCallElevatorDeviceId);
|
||||||
sisElevatorInfoVo.setElevatorControlDeviceId(elevatorControlDeviceId);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return sisElevatorInfoVo;
|
return sisElevatorInfoVo;
|
||||||
@ -261,7 +262,7 @@ public class SisElevatorInfoServiceImpl implements ISisElevatorInfoService {
|
|||||||
* @return 列表
|
* @return 列表
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<SisElevatorInfoVo> queryListByIds(Collection<Long> ids){
|
public List<SisElevatorInfoVo> queryListByIds(Collection<Long> ids) {
|
||||||
return baseMapper.selectVoByIds(ids);
|
return baseMapper.selectVoByIds(ids);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ public class SyncLiftAuthTask {
|
|||||||
/**
|
/**
|
||||||
* 同步电梯权限
|
* 同步电梯权限
|
||||||
*/
|
*/
|
||||||
@Scheduled(cron = "*/5 * 6-22 * * ?")
|
// @Scheduled(cron = "*/5 * 6-22 * * ?")
|
||||||
public void syncLiftAuth() {
|
public void syncLiftAuth() {
|
||||||
QueryDto dto = new QueryDto();
|
QueryDto dto = new QueryDto();
|
||||||
dto.setPageIndex(1);
|
dto.setPageIndex(1);
|
||||||
|
Loading…
Reference in New Issue
Block a user