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;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.dromara.sis.domain.SisElevatorInfo;
|
||||
import org.dromara.sis.domain.vo.SisElevatorInfoVo;
|
||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
@ -8,8 +9,9 @@ import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||
* 电梯基本信息Mapper接口
|
||||
*
|
||||
* @author lxj
|
||||
* @date 2025-07-10
|
||||
* @since 2025-07-10
|
||||
*/
|
||||
@Mapper
|
||||
public interface SisElevatorInfoMapper extends BaseMapperPlus<SisElevatorInfo, SisElevatorInfoVo> {
|
||||
|
||||
}
|
||||
|
@ -22,13 +22,13 @@ import java.util.stream.Collectors;
|
||||
@Component
|
||||
public class E8ApiUtil {
|
||||
|
||||
@Value("e8.url")
|
||||
@Value("${E8Plat.url}")
|
||||
private String BASE_URL;
|
||||
|
||||
@Value("e8.secretKey")
|
||||
@Value("${E8Plat.secretKey}")
|
||||
private String SECRET_KEY;
|
||||
|
||||
@Value("e8.key")
|
||||
@Value("${E8Plat.key}")
|
||||
private String KEY;
|
||||
|
||||
/**
|
||||
|
@ -12,7 +12,7 @@ import java.util.List;
|
||||
* 电梯基本信息Service接口
|
||||
*
|
||||
* @author lxj
|
||||
* @date 2025-07-10
|
||||
* @since 2025-07-10
|
||||
*/
|
||||
public interface ISisElevatorInfoService {
|
||||
|
||||
|
@ -34,7 +34,7 @@ import static org.dromara.common.core.constant.CodePrefixConstants.ELEVATOR_CONT
|
||||
* 电梯基本信息Service业务层处理
|
||||
*
|
||||
* @author lxj
|
||||
* @date 2025-07-10
|
||||
* @since 2025-07-10
|
||||
*/
|
||||
@Slf4j
|
||||
@RequiredArgsConstructor
|
||||
@ -57,20 +57,21 @@ public class SisElevatorInfoServiceImpl implements ISisElevatorInfoService {
|
||||
public SisElevatorInfoVo queryById(Long elevatorId) {
|
||||
SisElevatorInfoVo sisElevatorInfoVo = baseMapper.selectVoById(elevatorId);
|
||||
if (sisElevatorInfoVo == null) {
|
||||
return sisElevatorInfoVo;
|
||||
return null;
|
||||
}
|
||||
List<SisDeviceBindRef> ref = deviceBindRefService.queryByBindId(elevatorId);
|
||||
if (CollUtil.isNotEmpty(ref)) {
|
||||
List<Long> remoteCallElevatorDeviceId = new ArrayList<>(ref.size());
|
||||
Long elevatorControlDeviceId = null;
|
||||
List<SisElevatorInfoVo.DeviceInfo> remoteCallElevatorDeviceId = new ArrayList<>(ref.size());
|
||||
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())) {
|
||||
remoteCallElevatorDeviceId.add(item.getDeviceId());
|
||||
} else {
|
||||
elevatorControlDeviceId = item.getDeviceId();
|
||||
remoteCallElevatorDeviceId.add(deviceInfo);
|
||||
}else {
|
||||
sisElevatorInfoVo.setElevatorControlDeviceId(deviceInfo);
|
||||
}
|
||||
sisElevatorInfoVo.setRemoteCallElevatorDeviceId(remoteCallElevatorDeviceId);
|
||||
sisElevatorInfoVo.setElevatorControlDeviceId(elevatorControlDeviceId);
|
||||
}
|
||||
}
|
||||
return sisElevatorInfoVo;
|
||||
@ -261,7 +262,7 @@ public class SisElevatorInfoServiceImpl implements ISisElevatorInfoService {
|
||||
* @return 列表
|
||||
*/
|
||||
@Override
|
||||
public List<SisElevatorInfoVo> queryListByIds(Collection<Long> ids){
|
||||
public List<SisElevatorInfoVo> queryListByIds(Collection<Long> 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() {
|
||||
QueryDto dto = new QueryDto();
|
||||
dto.setPageIndex(1);
|
||||
|
Loading…
Reference in New Issue
Block a user