| | |
| | | import com.ruoyi.system.mapper.SysVisitorMachineMapper; |
| | | import com.ruoyi.system.service.EmployeeVerifyService; |
| | | import com.ruoyi.system.service.ISysVisitorMachineService; |
| | | import com.ruoyi.system.utils.EmployeePhoneCrypto; |
| | | import com.ruoyi.system.vo.SysVisitorMachineVO; |
| | | import com.ruoyi.web.controller.tool.ImageUtil; |
| | | import io.swagger.annotations.Api; |
| | |
| | | * 刷卡验证:现场读卡器读取卡号后调用本接口,与接待人绑定的卡号比对。 |
| | | */ |
| | | @PostMapping("/allEmployee") |
| | | @ApiOperation(value = "查询所有员工接口", notes = "必传设备ID") |
| | | public AjaxResult getAllEmployee(@RequestBody @Valid ApiVisitorMachineRequest request) { |
| | | SysVisitorMachine detail = visitorMachineMapper.checkDeviceIdUnique(request.getMachineId(),null); |
| | | if (detail == null || !detail.getEnabled()) { |
| | | throw new ServiceException("未找到有效设备"); |
| | | } |
| | | @ApiOperation(value = "查询所有员工接口") |
| | | public AjaxResult getAllEmployee() { |
| | | // SysVisitorMachine detail = visitorMachineMapper.checkDeviceIdUnique(request.getMachineId(),null); |
| | | // if (detail == null || !detail.getEnabled()) { |
| | | // throw new ServiceException("未找到有效设备"); |
| | | // } |
| | | |
| | | List<Employee> employees = employeeMapper.selectAllEnabled(); |
| | | if (employees == null || employees.isEmpty()) { |
| | |
| | | dto.setFaceImage(base64); |
| | | } |
| | | |
| | | if (StringUtils.isNotEmpty(employee.getContactPhoneCipher())) { |
| | | String phone = EmployeePhoneCrypto.decrypt(employee.getContactPhoneCipher()); |
| | | dto.setPhone(phone); |
| | | } |
| | | dto.setContactPhoneCipher(null); |
| | | |
| | | return dto; |
| | | }) |
| | | .collect(Collectors.toList()); |