员工录入功能修改
This commit is contained in:
parent
2ed4de174b
commit
912a30fabb
@ -14,6 +14,9 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
|||||||
import com.github.yulichang.toolkit.SpringContentUtils;
|
import com.github.yulichang.toolkit.SpringContentUtils;
|
||||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.transaction.support.TransactionSynchronization;
|
||||||
|
import org.springframework.transaction.support.TransactionSynchronizationManager;
|
||||||
import org.springframework.web.socket.WebSocketSession;
|
import org.springframework.web.socket.WebSocketSession;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@ -40,6 +43,7 @@ public class AttendanceWebSocketMessageListener implements WebSocketMessageListe
|
|||||||
private AttendanceMachineApi attendanceMachineApi;
|
private AttendanceMachineApi attendanceMachineApi;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void onMessage(WebSocketSession session, AttendanceSendMessage message) {
|
public void onMessage(WebSocketSession session, AttendanceSendMessage message) {
|
||||||
|
|
||||||
StringRedisTemplate redisTemplate = SpringContentUtils.getBean(StringRedisTemplate.class);
|
StringRedisTemplate redisTemplate = SpringContentUtils.getBean(StringRedisTemplate.class);
|
||||||
@ -91,17 +95,24 @@ public class AttendanceWebSocketMessageListener implements WebSocketMessageListe
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (object1.get("cmd").equals(AttendanceConstants.CMD_TO_CLIENT)) {
|
if (object1.get("cmd").equals(AttendanceConstants.CMD_TO_CLIENT)) {
|
||||||
System.out.println("进来了"+ System.currentTimeMillis());
|
|
||||||
|
|
||||||
// 获取响应数据
|
// 获取响应数据
|
||||||
DeviceResponseDTO dto = JsonUtils.parseObject2(object1.get("data").toString(), DeviceResponseDTO.class);
|
DeviceResponseDTO dto = JsonUtils.parseObject2(object1.get("data").toString(), DeviceResponseDTO.class);
|
||||||
|
|
||||||
|
// 获取设备号
|
||||||
|
String deviceNo = object1.get("from").toString();
|
||||||
String requestId = object1.get("extra").toString().split("_")[0];
|
String requestId = object1.get("extra").toString().split("_")[0];
|
||||||
String userId = object1.get("extra").toString().split("_")[1];
|
String userId = object1.get("extra").toString().split("_")[1];
|
||||||
if (dto != null) {
|
if (dto != null) {
|
||||||
|
|
||||||
// 更新下发数据
|
// 更新下发数据
|
||||||
AttendanceUpdateDTO attendanceUpdateDTO = new AttendanceUpdateDTO();
|
AttendanceUpdateDTO attendanceUpdateDTO = new AttendanceUpdateDTO();
|
||||||
|
|
||||||
|
// 在事务提交后,更新下发记录,
|
||||||
|
TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronization() {
|
||||||
|
@Override
|
||||||
|
public void afterCommit() {
|
||||||
|
|
||||||
List<DistributeRecordDTO> recordDTOs = new ArrayList<>();
|
List<DistributeRecordDTO> recordDTOs = new ArrayList<>();
|
||||||
|
|
||||||
// 更新下发记录表
|
// 更新下发记录表
|
||||||
@ -131,6 +142,8 @@ public class AttendanceWebSocketMessageListener implements WebSocketMessageListe
|
|||||||
|
|
||||||
// 更新下发记录表
|
// 更新下发记录表
|
||||||
attendanceMachineApi.updateDistributeRecord(recordDTOs);
|
attendanceMachineApi.updateDistributeRecord(recordDTOs);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// 响应失败的情况
|
// 响应失败的情况
|
||||||
if (dto.getCode() != 0) {
|
if (dto.getCode() != 0) {
|
||||||
@ -139,8 +152,8 @@ public class AttendanceWebSocketMessageListener implements WebSocketMessageListe
|
|||||||
webSocketMessageSender.sendObject(object1.get("to").toString(), "attendance-message-send", object1);
|
webSocketMessageSender.sendObject(object1.get("to").toString(), "attendance-message-send", object1);
|
||||||
}else {
|
}else {
|
||||||
|
|
||||||
redisTemplate.opsForValue().set(object1.get("from").toString() + "msg", dto.getCode() + "_" + dto.getMsg(), 30, TimeUnit.SECONDS);
|
redisTemplate.opsForValue().set(deviceNo + "msg", dto.getCode() + "_" + dto.getMsg(), 30, TimeUnit.SECONDS);
|
||||||
redisTemplate.opsForValue().set(object1.get("from").toString(), "false", 30, TimeUnit.SECONDS);
|
redisTemplate.opsForValue().set(deviceNo, "false", 30, TimeUnit.SECONDS);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@ -151,20 +164,20 @@ public class AttendanceWebSocketMessageListener implements WebSocketMessageListe
|
|||||||
case "addUserRet":
|
case "addUserRet":
|
||||||
// 更新设备绑定用户信息
|
// 更新设备绑定用户信息
|
||||||
attendanceUpdateDTO.setUserId(Collections.singletonList(Long.valueOf(dto.getUserId())));
|
attendanceUpdateDTO.setUserId(Collections.singletonList(Long.valueOf(dto.getUserId())));
|
||||||
attendanceUpdateDTO.setDeviceNo(object1.get("from").toString());
|
attendanceUpdateDTO.setDeviceNo(deviceNo);
|
||||||
attendanceUpdateDTO.setMethod(0);
|
attendanceUpdateDTO.setMethod(0);
|
||||||
|
|
||||||
// 更新设备绑定用户信息
|
// 更新设备绑定用户信息
|
||||||
attendanceMachineApi.updateAttendance(attendanceUpdateDTO);
|
attendanceMachineApi.updateAttendance(attendanceUpdateDTO);
|
||||||
break;
|
break;
|
||||||
case "delMultiUserRet":
|
case "delMultiUserRet":
|
||||||
List<String> userIds = JsonUtils.parseArray(redisTemplate.opsForValue().get(object1.get("from").toString()), String.class);
|
List<String> userIds = JsonUtils.parseArray(redisTemplate.opsForValue().get(deviceNo), String.class);
|
||||||
if (dto.getDelFailed() != null) {
|
if (dto.getDelFailed() != null) {
|
||||||
userIds.removeAll(convertList(dto.getDelFailed(), DeviceResponseDTO.DeleteUser::getUserId));
|
userIds.removeAll(convertList(dto.getDelFailed(), DeviceResponseDTO.DeleteUser::getUserId));
|
||||||
}
|
}
|
||||||
// 更新设备绑定用户信息
|
// 更新设备绑定用户信息
|
||||||
attendanceUpdateDTO.setUserId(userIds.stream().map(Long::valueOf).collect(Collectors.toList()));
|
attendanceUpdateDTO.setUserId(userIds.stream().map(Long::valueOf).collect(Collectors.toList()));
|
||||||
attendanceUpdateDTO.setDeviceNo(object1.get("from").toString());
|
attendanceUpdateDTO.setDeviceNo(deviceNo);
|
||||||
attendanceUpdateDTO.setMethod(1);
|
attendanceUpdateDTO.setMethod(1);
|
||||||
|
|
||||||
// 更新设备绑定用户信息
|
// 更新设备绑定用户信息
|
||||||
@ -172,20 +185,24 @@ public class AttendanceWebSocketMessageListener implements WebSocketMessageListe
|
|||||||
break;
|
break;
|
||||||
case "setPasswordRet":
|
case "setPasswordRet":
|
||||||
// 更新设备密码
|
// 更新设备密码
|
||||||
String value = redisTemplate.opsForValue().get(object1.get("from").toString());
|
String value = redisTemplate.opsForValue().get(deviceNo);
|
||||||
if (value != null) {
|
if (value != null) {
|
||||||
String oldPassword = value.split("-")[0];
|
String oldPassword = value.split("-")[0];
|
||||||
String newPassword = value.split("-")[1];
|
String newPassword = value.split("-")[1];
|
||||||
attendanceMachineApi.updateDevicePassword(object1.get("from").toString(), oldPassword, newPassword);
|
attendanceMachineApi.updateDevicePassword(deviceNo, oldPassword, newPassword);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
redisTemplate.delete(object1.get("from").toString());
|
redisTemplate.delete(deviceNo);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!object1.get("to").toString().isEmpty()) {
|
if (!object1.get("to").toString().isEmpty()) {
|
||||||
webSocketMessageSender.sendObject(object1.get("to").toString(), "attendance-message-send", object1);
|
webSocketMessageSender.sendObject(object1.get("to").toString(), "attendance-message-send", object1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
package cn.iocoder.yudao.module.system.service.equipment;
|
package cn.iocoder.yudao.module.system.service.equipment;
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||||
import cn.iocoder.yudao.module.system.dal.dataobject.equipment.DistributeRecordDO;
|
import cn.iocoder.yudao.module.system.dal.dataobject.equipment.DistributeRecordDO;
|
||||||
import cn.iocoder.yudao.module.system.dal.mysql.equipment.DistributeRecordMapper;
|
import cn.iocoder.yudao.module.system.dal.mysql.equipment.DistributeRecordMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
@ -34,8 +35,11 @@ public class DistributeRecordServiceImpl implements DistributeRecordService {
|
|||||||
|
|
||||||
for (DistributeRecordDO updateDO : updateReqVO) {
|
for (DistributeRecordDO updateDO : updateReqVO) {
|
||||||
|
|
||||||
distributeRecordMapper.update(updateDO,
|
DistributeRecordDO updateVO = BeanUtils.toBean(updateDO, DistributeRecordDO.class);
|
||||||
new LambdaQueryWrapperX<DistributeRecordDO>()
|
updateVO.setRequestId(null);
|
||||||
|
updateVO.setUserId(null);
|
||||||
|
distributeRecordMapper.update(updateVO,
|
||||||
|
new LambdaUpdateWrapper<DistributeRecordDO>()
|
||||||
.eq(DistributeRecordDO::getUserId, updateDO.getUserId())
|
.eq(DistributeRecordDO::getUserId, updateDO.getUserId())
|
||||||
.eq(DistributeRecordDO::getRequestId, updateDO.getRequestId()));
|
.eq(DistributeRecordDO::getRequestId, updateDO.getRequestId()));
|
||||||
}
|
}
|
||||||
|
@ -57,7 +57,7 @@ public interface UsersExtService {
|
|||||||
/**
|
/**
|
||||||
* 删除用户人脸信息
|
* 删除用户人脸信息
|
||||||
*/
|
*/
|
||||||
String deleteUser(Long userId);
|
void deleteUser(Long userId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得用户信息拓展
|
* 获得用户信息拓展
|
||||||
|
@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.system.service.equipment;
|
|||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import cn.hutool.core.io.IoUtil;
|
import cn.hutool.core.io.IoUtil;
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||||
import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
|
import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
|
||||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||||
@ -28,7 +29,9 @@ import cn.iocoder.yudao.module.system.service.user.AdminUserService;
|
|||||||
import cn.iocoder.yudao.module.system.service.websocket.WebsocketService;
|
import cn.iocoder.yudao.module.system.service.websocket.WebsocketService;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||||
|
import com.github.yulichang.toolkit.SpringContentUtils;
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
@ -197,7 +200,7 @@ public class UsersExtServiceImpl implements UsersExtService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String deleteUser(Long userId) {
|
public void deleteUser(Long userId) {
|
||||||
|
|
||||||
//校验 当前用户人脸信息是否已存在
|
//校验 当前用户人脸信息是否已存在
|
||||||
UsersExtDO usersExtDO = usersExtMapper.selectOne(UsersExtDO::getUserId, userId);
|
UsersExtDO usersExtDO = usersExtMapper.selectOne(UsersExtDO::getUserId, userId);
|
||||||
@ -214,18 +217,15 @@ public class UsersExtServiceImpl implements UsersExtService {
|
|||||||
.setCmd("delMultiUser")
|
.setCmd("delMultiUser")
|
||||||
.setUser_ids(new String[]{String.valueOf(usersExtDO.getUserId())});
|
.setUser_ids(new String[]{String.valueOf(usersExtDO.getUserId())});
|
||||||
|
|
||||||
try {
|
// 删除的用户Id 存在redis中
|
||||||
|
StringRedisTemplate redisTemplate = SpringContentUtils.getBean(StringRedisTemplate.class);
|
||||||
for (String deviceNo : deviceNos) {
|
for (String deviceNo : deviceNos) {
|
||||||
|
|
||||||
|
redisTemplate.opsForValue().set(deviceNo, new JSONObject(userVO).get("user_ids").toString());
|
||||||
websocketService.sendSn(deviceNo, userVO, 0);
|
websocketService.sendSn(deviceNo, userVO, 0);
|
||||||
}
|
}
|
||||||
} catch (RuntimeException ex) {
|
|
||||||
|
|
||||||
return ex.getMessage();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void validateUsersExtExists(Long userId) {
|
private void validateUsersExtExists(Long userId) {
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ import org.springframework.context.annotation.Lazy;
|
|||||||
import org.springframework.security.crypto.password.PasswordEncoder;
|
import org.springframework.security.crypto.password.PasswordEncoder;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -85,7 +86,7 @@ public class FactoryUserServiceImpl implements FactoryUserService{
|
|||||||
AdminUserDO user = BeanUtils.toBean(createReqVO, AdminUserDO.class);
|
AdminUserDO user = BeanUtils.toBean(createReqVO, AdminUserDO.class);
|
||||||
user.setDeptId(deptDO.getId());
|
user.setDeptId(deptDO.getId());
|
||||||
user.setStatus(CommonStatusEnum.ENABLE.getStatus()); // 默认开启
|
user.setStatus(CommonStatusEnum.ENABLE.getStatus()); // 默认开启
|
||||||
user.setPassword(encodePassword("123456")); // 设置默认密码
|
user.setPassword(encodePassword()); // 设置默认密码
|
||||||
user.setUserType(2); // 设置用户类型为 工厂用户
|
user.setUserType(2); // 设置用户类型为 工厂用户
|
||||||
userMapper.insert(user);
|
userMapper.insert(user);
|
||||||
|
|
||||||
@ -114,8 +115,10 @@ public class FactoryUserServiceImpl implements FactoryUserService{
|
|||||||
// 发送指令至 考勤设备 下发员工
|
// 发送指令至 考勤设备 下发员工
|
||||||
websocketService.sendSn(machineDO.getDeviceNo(), addUserVO, 1);
|
websocketService.sendSn(machineDO.getDeviceNo(), addUserVO, 1);
|
||||||
}
|
}
|
||||||
} catch (RuntimeException ex) {
|
} catch (Exception ex) {
|
||||||
|
|
||||||
|
// 手动回滚
|
||||||
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||||
return ex.getMessage();
|
return ex.getMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -183,8 +186,10 @@ public class FactoryUserServiceImpl implements FactoryUserService{
|
|||||||
// 发送指令至 考勤设备 修改员工信息
|
// 发送指令至 考勤设备 修改员工信息
|
||||||
websocketService.sendSn(machineDO.getDeviceNo(), addUserVO, 1);
|
websocketService.sendSn(machineDO.getDeviceNo(), addUserVO, 1);
|
||||||
}
|
}
|
||||||
}catch (RuntimeException ex) {
|
}catch (Exception ex) {
|
||||||
|
|
||||||
|
// 手动回滚
|
||||||
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||||
return ex.getMessage();
|
return ex.getMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -202,7 +207,16 @@ public class FactoryUserServiceImpl implements FactoryUserService{
|
|||||||
userMapper.deleteById(id);
|
userMapper.deleteById(id);
|
||||||
|
|
||||||
// 同步删除用户拓展信息
|
// 同步删除用户拓展信息
|
||||||
return usersExtService.deleteUser(id);
|
try {
|
||||||
|
|
||||||
|
usersExtService.deleteUser(id);
|
||||||
|
} catch (Exception ex) {
|
||||||
|
|
||||||
|
// 手动回滚
|
||||||
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||||
|
return ex.getMessage();
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void validateId(Long id) {
|
private void validateId(Long id) {
|
||||||
@ -215,10 +229,9 @@ public class FactoryUserServiceImpl implements FactoryUserService{
|
|||||||
/**
|
/**
|
||||||
* 对密码进行加密
|
* 对密码进行加密
|
||||||
*
|
*
|
||||||
* @param password 密码
|
|
||||||
* @return 加密后的密码
|
* @return 加密后的密码
|
||||||
*/
|
*/
|
||||||
private String encodePassword(String password) {
|
private String encodePassword() {
|
||||||
return passwordEncoder.encode(password);
|
return passwordEncoder.encode("123456");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package cn.iocoder.yudao.module.system.service.websocket;
|
package cn.iocoder.yudao.module.system.service.websocket;
|
||||||
|
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
|
import cn.iocoder.yudao.framework.common.util.json.JsonUtils;
|
||||||
import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder;
|
import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder;
|
||||||
import cn.iocoder.yudao.module.infra.api.websocket.WebSocketSenderApi;
|
import cn.iocoder.yudao.module.infra.api.websocket.WebSocketSenderApi;
|
||||||
@ -11,7 +12,6 @@ import com.xingyuv.http.util.StringUtil;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.util.StringUtils;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
@ -47,11 +47,13 @@ public class WebsocketServiceImpl implements WebsocketService{
|
|||||||
.setExtra(requestId + "_" + getLoginUserId())
|
.setExtra(requestId + "_" + getLoginUserId())
|
||||||
.setData(data);
|
.setData(data);
|
||||||
|
|
||||||
|
JSONObject dataJson = new JSONObject(data);
|
||||||
|
|
||||||
// 设置 设备下发记录
|
// 设置 设备下发记录
|
||||||
DistributeRecordDO recordDO = new DistributeRecordDO();
|
DistributeRecordDO recordDO = new DistributeRecordDO();
|
||||||
recordDO.setRequestId(requestId);
|
recordDO.setRequestId(requestId);
|
||||||
recordDO.setDeviceNo(deviceNo);
|
recordDO.setDeviceNo(deviceNo);
|
||||||
recordDO.setUserId(getLoginUserId());
|
recordDO.setUserId(dataJson.get("user_id") == null ? getLoginUserId() : Long.valueOf(dataJson.get("user_id").toString()));
|
||||||
recordDO.setType(type);
|
recordDO.setType(type);
|
||||||
recordDO.setResult("通讯失败");
|
recordDO.setResult("通讯失败");
|
||||||
|
|
||||||
@ -60,7 +62,10 @@ public class WebsocketServiceImpl implements WebsocketService{
|
|||||||
|
|
||||||
// 设备租户ID
|
// 设备租户ID
|
||||||
TenantContextHolder.setTenantId(1L);
|
TenantContextHolder.setTenantId(1L);
|
||||||
|
|
||||||
|
if (StringUtil.isEmpty(stringRedisTemplate.opsForValue().get(deviceNo))) {
|
||||||
stringRedisTemplate.opsForValue().set(deviceNo, "true");
|
stringRedisTemplate.opsForValue().set(deviceNo, "true");
|
||||||
|
}
|
||||||
// 发送修改密码命令给设备
|
// 发送修改密码命令给设备
|
||||||
webSocketSenderApi.sendSN(deviceNo, "attendance-message-send", JsonUtils.toJsonString(baseVO));
|
webSocketSenderApi.sendSN(deviceNo, "attendance-message-send", JsonUtils.toJsonString(baseVO));
|
||||||
|
|
||||||
@ -88,6 +93,7 @@ public class WebsocketServiceImpl implements WebsocketService{
|
|||||||
}
|
}
|
||||||
Long currentTime = System.currentTimeMillis();
|
Long currentTime = System.currentTimeMillis();
|
||||||
if (currentTime - startTime > 30000) {
|
if (currentTime - startTime > 30000) {
|
||||||
|
|
||||||
throw exception(REQUEST_FAILURE);
|
throw exception(REQUEST_FAILURE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user