|
@@ -15,8 +15,10 @@ import com.yx.face.dao.*;
|
|
|
import com.yx.face.model.dto.WxInfoDTO;
|
|
|
import com.yx.face.model.entity.*;
|
|
|
import com.yx.face.model.query.QueryUser;
|
|
|
+import com.yx.face.model.vo.AdminVO;
|
|
|
import com.yx.face.model.vo.UserInfoVO;
|
|
|
import com.yx.face.netty_client.NettyClient;
|
|
|
+import com.yx.face.service.AdminService;
|
|
|
import com.yx.face.service.UserInfoService;
|
|
|
import com.yx.face.service.feign.TBDeviceFaceService;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -70,6 +72,8 @@ public class UserInfoServiceImpl implements UserInfoService {
|
|
|
private AsyncTriggerRetryImpl asyncTriggerRetryImpl;
|
|
|
@Autowired
|
|
|
private RedisUtil redisUtil;
|
|
|
+ @Autowired
|
|
|
+ private AdminService adminService;
|
|
|
|
|
|
// @Value("${wx.phone.url}")
|
|
|
private static final String wxUrl = "http://192.168.99.11:9810/winxin-fyzd/weiXin/getPhone";
|
|
@@ -204,7 +208,7 @@ public class UserInfoServiceImpl implements UserInfoService {
|
|
|
@Override
|
|
|
public Map<String, Object> doGetFacePass(Integer userId, String taskId) {
|
|
|
log.info("数据*************; " + userId + "*******************" + taskId);
|
|
|
- String admin = taskId.split("-")[0];
|
|
|
+ String admin = taskId;
|
|
|
//返回值
|
|
|
Map<String, Object> map = new HashMap<>(2);
|
|
|
// 人员类型
|
|
@@ -231,7 +235,7 @@ public class UserInfoServiceImpl implements UserInfoService {
|
|
|
}
|
|
|
//常客
|
|
|
UserWhitelist byPhoneAndId = userWhitelistdao.getByPhoneAndId(userInfo.getPhone(), null, Integer.valueOf(admin));
|
|
|
- // 访客
|
|
|
+ //访客
|
|
|
UserVisitorList userVisitorList = userVisitorListDao.getByPhoneAndId(userInfo.getPhone(), Integer.valueOf(admin));
|
|
|
//常客
|
|
|
if (byPhoneAndId != null) {
|
|
@@ -267,11 +271,13 @@ public class UserInfoServiceImpl implements UserInfoService {
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public void downFaceByTask(UserInfo userInfo, Date startTime, Date endTime, Integer type, String taskId, UserWhitelist byPhoneAndId, UserVisitorList userVisitorList) throws Exception {
|
|
|
//获取adminId
|
|
|
- String admin = taskId.split("-")[0];
|
|
|
+ //String admin = taskId.split("-")[0];
|
|
|
+ String admin = taskId;
|
|
|
//获取 adminId下的所有设备
|
|
|
//List<FaceDevice> snList = faceDeviceDao.getSnList(Integer.parseInt(admin));
|
|
|
//查询员工通道设备(type=2)
|
|
|
- List<FaceDevice> snList = faceDeviceDao.getByAdminAndType(Integer.parseInt(admin));
|
|
|
+ AdminVO adminVO = adminService.getInfo(Integer.valueOf(admin));
|
|
|
+ List<FaceDevice> snList = faceDeviceDao.getByAdminAndType(adminVO);
|
|
|
Map<String, Object> result;
|
|
|
//天波人脸服务请求日志表
|
|
|
FaceRequestLog requestLog;
|