1
This commit is contained in:
@@ -1,21 +1,10 @@
|
||||
package org.dromara.property.controller.xcx;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.property.domain.bo.ServiceWorkOrdersTypeBo;
|
||||
import org.dromara.property.domain.vo.ServiceWorkOrdersTypeVo;
|
||||
import org.dromara.property.service.IServiceWorkOrdersTypeService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
@@ -1,39 +1,21 @@
|
||||
package org.dromara.property.controller.xcx;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.dev33.satoken.stp.StpUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.dromara.common.core.constant.GlobalConstants;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.redis.utils.RedisUtils;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.websocket.dto.WebSocketMessageDto;
|
||||
import org.dromara.common.websocket.holder.WebSocketSessionHolder;
|
||||
import org.dromara.common.websocket.utils.WebSocketUtils;
|
||||
import org.dromara.property.domain.bo.QrCodeInfo;
|
||||
import org.dromara.property.domain.bo.TbVisitorManagementBo;
|
||||
import org.dromara.property.domain.vo.TbVisitorManagementVo;
|
||||
import org.dromara.property.service.ITbVisitorManagementService;
|
||||
import org.dromara.system.api.RemoteConfigService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 访客管理
|
||||
@@ -104,10 +86,11 @@ public class XTbVisitorManagementController extends BaseController {
|
||||
*/
|
||||
@GetMapping("/qrCode/{id}")
|
||||
@SaCheckPermission("xcx:visitorManagement:getQrCode")
|
||||
public R<String> getQrCode(@NotNull(message = "主键不能为空")
|
||||
public R<Object> getQrCode(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
int code = Integer.parseInt(tbVisitorManagementService.getQrCodeByIdForXcx(id).get("code").toString());
|
||||
return code == 200 ? R.ok(tbVisitorManagementService.getQrCodeByIdForXcx(id).get("data").toString()) : R.fail(tbVisitorManagementService.getQrCodeByIdForXcx(id).get("data").toString());
|
||||
Map<String, Object> res = tbVisitorManagementService.getQrCodeByIdForXcx(id);
|
||||
int code = Integer.parseInt(res.get("code").toString());
|
||||
return code == 200 ? R.ok(res.get("data")) : R.fail(res.get("data"));
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -176,8 +176,13 @@ public class ResidentPersonServiceImpl implements IResidentPersonService {
|
||||
ResidentPerson update = MapstructUtils.convert(bo, ResidentPerson.class);
|
||||
assert update != null;
|
||||
|
||||
// 人脸照片存在时,才同步修改授权
|
||||
if (update.getAuthGroupId() != null && update.getAuthEndDate() != null && update.getImg() != null) {
|
||||
// 定义触发条件
|
||||
boolean shouldUpdateAuth = (update.getAuthGroupId() != null &&
|
||||
update.getAuthEndDate() != null &&
|
||||
update.getImg() != null) ||
|
||||
update.getState() != 1;
|
||||
|
||||
if (shouldUpdateAuth) {
|
||||
ResidentPersonVo vo = queryById(update.getId());
|
||||
Long e8Id = vo.getEEightId();
|
||||
|
||||
@@ -267,7 +272,7 @@ public class ResidentPersonServiceImpl implements IResidentPersonService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询已上传图片,未授权人员
|
||||
* 查询已上传图片,未授权人员(账号启用,且审核通过)
|
||||
*
|
||||
* @return List<ResidentPersonVo>
|
||||
*/
|
||||
@@ -276,6 +281,8 @@ public class ResidentPersonServiceImpl implements IResidentPersonService {
|
||||
LambdaQueryWrapper<ResidentPerson> lqw = Wrappers.lambdaQuery();
|
||||
lqw.isNotNull(ResidentPerson::getImg)
|
||||
.ne(ResidentPerson::getImg, "")
|
||||
.eq(ResidentPerson::getState, 1)
|
||||
.eq(ResidentPerson::getIsAudit, 1)
|
||||
.isNull(ResidentPerson::getEEightId);
|
||||
return baseMapper.selectVoList(lqw);
|
||||
}
|
||||
|
Reference in New Issue
Block a user