|
@@ -17,7 +17,9 @@ import com.usky.common.core.exception.BusinessException;
|
|
|
import com.usky.common.security.utils.SecurityUtils;
|
|
|
import com.usky.meeting.annotation.FaceLog;
|
|
|
import com.usky.meeting.domain.MeetingFace;
|
|
|
+import com.usky.meeting.domain.SysDept;
|
|
|
import com.usky.meeting.mapper.MeetingFaceMapper;
|
|
|
+import com.usky.meeting.mapper.SysDeptMapper;
|
|
|
import com.usky.meeting.repository.MeetingInfoRepository;
|
|
|
import com.usky.meeting.service.MeetingFaceService;
|
|
|
import com.usky.meeting.service.vo.DmpDeviceInfoVO;
|
|
@@ -59,6 +61,8 @@ public class MeetingFaceController {
|
|
|
MeetingInfoRepository meetingInfoRepository;
|
|
|
@Autowired
|
|
|
private MeetingFaceMapper meetingFaceMapper;
|
|
|
+ @Autowired
|
|
|
+ private SysDeptMapper sysDeptMapper;
|
|
|
|
|
|
@PostMapping("/vef")
|
|
|
@ApiOperation(value="人脸验证", notes="根据传入的base64编码和数据的base64编码进行对比")
|
|
@@ -75,21 +79,39 @@ public class MeetingFaceController {
|
|
|
@RequestParam(required = false) String faceName,
|
|
|
@RequestParam(required = false) String faceStatus,
|
|
|
@RequestParam(required = false) Integer fid,
|
|
|
- @RequestParam(required = false) Long userId
|
|
|
- ){
|
|
|
+ @RequestParam(required = false) Long userId,
|
|
|
+ @RequestParam(required = false) Integer deptId
|
|
|
+ ){
|
|
|
IPage<MeetingFace> page = faceService.page(new Page(current, size), new QueryWrapper<MeetingFace>()
|
|
|
.like(StrUtil.isNotBlank(faceName),"face_name",faceName)
|
|
|
.like(StrUtil.isNotBlank(faceStatus),"face_status",faceStatus)
|
|
|
.eq(fid != null,"fid",fid)
|
|
|
.eq(userId != null,"user_id",userId)
|
|
|
+ .eq(deptId != null,"dept_id",deptId)
|
|
|
.eq("tenant_id", SecurityUtils.getTenantId()));
|
|
|
if(page.getRecords().size() > 0){
|
|
|
- for (int i = 0; i < page.getRecords().size(); i++) {
|
|
|
- if(Objects.nonNull(page.getRecords().get(i).getBindDevice()) || StringUtils.isNotBlank(page.getRecords().get(i).getBindDevice())){
|
|
|
- String[] deviceIdStr = page.getRecords().get(i).getBindDevice().split(",");
|
|
|
- Integer[] deviceIds = Arrays.stream(deviceIdStr).map(Integer::parseInt).toArray(Integer[]::new);
|
|
|
- List<DmpDeviceInfoVO> list = meetingFaceMapper.getDeviceInfo(Arrays.asList(deviceIds));
|
|
|
- page.getRecords().get(i).setDeviceInfos(list);
|
|
|
+// for (int i = 0; i < page.getRecords().size(); i++) {
|
|
|
+// if(Objects.nonNull(page.getRecords().get(i).getBindDevice()) || StringUtils.isNotBlank(page.getRecords().get(i).getBindDevice())){
|
|
|
+// String[] deviceIdStr = page.getRecords().get(i).getBindDevice().split(",");
|
|
|
+// Integer[] deviceIds = Arrays.stream(deviceIdStr).map(Integer::parseInt).toArray(Integer[]::new);
|
|
|
+// List<DmpDeviceInfoVO> list = meetingFaceMapper.getDeviceInfo(Arrays.asList(deviceIds));
|
|
|
+// page.getRecords().get(i).setDeviceInfos(list);
|
|
|
+//
|
|
|
+// }
|
|
|
+// }
|
|
|
+
|
|
|
+ QueryWrapper<SysDept> queryWrapper = Wrappers.query();
|
|
|
+ queryWrapper.eq("del_flag",0).eq("tenant_id",SecurityUtils.getTenantId());
|
|
|
+ List<SysDept> sysDeptList = sysDeptMapper.selectList(queryWrapper);
|
|
|
+ if(sysDeptList.size() > 0){
|
|
|
+ for (int i = 0; i < page.getRecords().size(); i++) {
|
|
|
+ Integer deptId1 = page.getRecords().get(i).getDeptId();
|
|
|
+ for (int j = 0; j < sysDeptList.size(); j++) {
|
|
|
+ if(deptId1.equals(Integer.valueOf(sysDeptList.get(j).getDeptId().toString()))){
|
|
|
+ page.getRecords().get(i).setSysDept(sysDeptList.get(j));
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
}
|