diff --git a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CustomerFeedbacksServiceImpl.java b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CustomerFeedbacksServiceImpl.java index 56b18650..82bc8d29 100644 --- a/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CustomerFeedbacksServiceImpl.java +++ b/ruoyi-modules/Property/src/main/java/org/dromara/property/service/impl/CustomerFeedbacksServiceImpl.java @@ -67,8 +67,8 @@ public class CustomerFeedbacksServiceImpl implements ICustomerFeedbacksService { public CustomerFeedbacksVo queryById(Long id) { CustomerFeedbacksVo customerFeedbacksVo = baseMapper.selectVoById(id); ServiceWorkOrdersType serviceWorkOrdersType = serviceWorkOrdersTypeMapper.selectById(customerFeedbacksVo.getFeedbackType()); - customerFeedbacksVo.setFeedbackTypeName(StringUtils.isNotBlank(serviceWorkOrdersType.getOrderTypeName()) ? serviceWorkOrdersType.getOrderTypeName() : null); - String nikName = remoteUserService.selectNicknameById(customerFeedbacksVo.getFeedbackPersion()); + customerFeedbacksVo.setFeedbackTypeName(ObjectUtil.isNotEmpty(serviceWorkOrdersType) ? serviceWorkOrdersType.getOrderTypeName() : null); + String nikName = remoteUserService.selectNicknameById(ObjectUtil.isNotEmpty(customerFeedbacksVo) ?customerFeedbacksVo.getFeedbackPersion():null); customerFeedbacksVo.setFeedbackPersionName(nikName); return customerFeedbacksVo; } @@ -115,11 +115,11 @@ public class CustomerFeedbacksServiceImpl implements ICustomerFeedbacksService { if (CollUtil.isNotEmpty(remoteUserVos)) { RemoteUserVo remoteUserVo = remoteUserVos.stream() .filter(vo -> vo.getUserId() != null && vo.getUserId().equals(customerFeedbacksVo.getFeedbackPersion())).findFirst().orElse(null); - customerFeedbacksVo.setFeedbackPersionName(ObjectUtil.isNotNull(remoteUserVo) ? remoteUserVo.getNickName() : null); + customerFeedbacksVo.setFeedbackPersionName(ObjectUtil.isNotEmpty(remoteUserVo) ? remoteUserVo.getNickName() : null); } if (CollUtil.isNotEmpty(serviceWorkOrdersTypes)) { ServiceWorkOrdersType serviceWorkOrdersType = serviceWorkOrdersTypes.stream().filter(vo -> vo.getId() != null && vo.getId().equals(customerFeedbacksVo.getFeedbackType())).findFirst().orElse(null); - customerFeedbacksVo.setFeedbackTypeName(ObjectUtil.isNotNull(serviceWorkOrdersType) ? serviceWorkOrdersType.getOrderTypeName() : null); + customerFeedbacksVo.setFeedbackTypeName(ObjectUtil.isNotEmpty(serviceWorkOrdersType) ? serviceWorkOrdersType.getOrderTypeName() : null); } } diff --git a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/controller/SisVisitorController.java b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/controller/SisVisitorController.java new file mode 100644 index 00000000..c0ce0a21 --- /dev/null +++ b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/controller/SisVisitorController.java @@ -0,0 +1,85 @@ +package org.dromara.sis.controller; + + +import cn.dev33.satoken.annotation.SaCheckPermission; +import cn.hutool.core.date.DateField; +import cn.hutool.core.date.DateUtil; +import lombok.RequiredArgsConstructor; +import org.dromara.common.mybatis.core.page.PageQuery; +import org.dromara.common.mybatis.core.page.TableDataInfo; +import org.dromara.sis.domain.bo.SisPersonLibImgBo; +import org.dromara.sis.domain.vo.SisPersonLibImgVo; +import org.dromara.sis.sdk.e8.E8PlatformApi; +import org.dromara.sis.sdk.e8.domain.QueryDto; +import org.dromara.sis.sdk.e8.domain.accessControl.req.AccessRecordFindReq; +import org.dromara.sis.sdk.e8.domain.accessControl.res.AccessRecordFindRes; +import org.dromara.sis.service.ISisPersonLibImgService; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * @author yuyongle + * @version 1.0 + * @description: + * @date 2025/8/27 15:57 + */ +@Validated +@RequiredArgsConstructor +@RestController +@RequestMapping("/visitor") +public class SisVisitorController { + private final E8PlatformApi e8PlatformApi; + + /** + * 查询人员通行记录 + */ + @GetMapping("/list") + public TableDataInfo list(QueryDto dto) { + + TableDataInfo tableDataInfo = new TableDataInfo(); + List accessRecordFindResList = new ArrayList<>(); + AccessRecordFindRes accessRecordFindRes = new AccessRecordFindRes(); + accessRecordFindRes.setDeviceName("4#岗亭09"); + accessRecordFindRes.setDoorName("4#岗亭09"); + accessRecordFindRes.setDeviceType(1102); + accessRecordFindRes.setReaderName(""); + accessRecordFindRes.setGatewayType(1); + accessRecordFindRes.setCustomerName("德隆吴鹏"); + accessRecordFindRes.setOrganFullPath("主楼11楼"); + accessRecordFindRes.setPictureUrl("https://bpic.588ku.com/back_list_pic/23/04/21/ef5e2a3dd5cfc336fdcf2fd000474f0f.jpg"); + accessRecordFindRes.setCardType(34); + accessRecordFindRes.setRecordType(2); + accessRecordFindRes.setActionTime(new Date()); + accessRecordFindResList.add(accessRecordFindRes); + tableDataInfo.setRows(accessRecordFindResList); + tableDataInfo.setTotal(1); + tableDataInfo.setCode(200); + return tableDataInfo; +// +// dto.setPageIndex(1); +// dto.setMaxResultCount(20); +// +// // 10秒内 +// String starTime = DateUtil.format(DateUtil.offset(new Date(), DateField.SECOND, -10), "yyyy-MM-dd HH:mm:ss"); +// String endTime = DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss"); +// +// AccessRecordFindReq lift = new AccessRecordFindReq(); +// lift.setStartTime(starTime); +// lift.setEndTime(endTime); +// lift.setRecordType(2); +// // 9号电梯 +// lift.setDeviceId(550757939925061L); +// dto.setQueryDto(lift); +//// TableDataInfo nineLiftList = e8PlatformApi.getPageAccessRecordList(dto); +// TableDataInfo pageAccessRecordList = new TableDataInfo(); +// +// return e8PlatformApi.getPageAccessRecordList(dto); + //如果pageAccessRecordList报错就捕获并封装 + } +} diff --git a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/rocketmq/RocketMqConstants.java b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/rocketmq/RocketMqConstants.java index a3a5a09b..1cfafe7a 100644 --- a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/rocketmq/RocketMqConstants.java +++ b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/rocketmq/RocketMqConstants.java @@ -9,11 +9,10 @@ public interface RocketMqConstants { // mq topic String TOPIC = "SmartParks"; - // mq GROUP - String GROUP = "SmartParks"; - - // meter Group - String METER_GROUP = "METER_GROUP"; + // 人比比对消费者组 + String COMPAREGROUP = "SmartParks-compare"; + // 人脸抓拍消费者组 + String CAPTUREGROUP = "SmartParks-capture"; /*-----------------------------------消息tag------------------------------------*/ String HIKADD = "ADD_HIK_DEVICE_TAG"; @@ -22,6 +21,4 @@ public interface RocketMqConstants { // 人脸比对 String FACECOMPARE = "FACE_COMPARE_REPORT"; - String METER_RECORD = "METER_RECORD_TAG"; - } diff --git a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/rocketmq/consumer/FaceCaptureConsumer.java b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/rocketmq/consumer/FaceCaptureConsumer.java index af0e3f47..6e25325c 100644 --- a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/rocketmq/consumer/FaceCaptureConsumer.java +++ b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/rocketmq/consumer/FaceCaptureConsumer.java @@ -9,7 +9,6 @@ import org.apache.rocketmq.spring.core.RocketMQListener; import org.dromara.sis.rocketmq.RocketMqConstants; import org.dromara.sis.rocketmq.domain.FaceCapture; import org.dromara.sis.service.IZeroSensationPassageService; -import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; /** @@ -23,9 +22,8 @@ import org.springframework.stereotype.Component; @RequiredArgsConstructor @RocketMQMessageListener( topic = RocketMqConstants.TOPIC, - consumerGroup = RocketMqConstants.GROUP, - selectorExpression = RocketMqConstants.FACECAPTURE, - nameServer = "${rocketmq.cluster1.name-server}" + consumerGroup = RocketMqConstants.CAPTUREGROUP, + selectorExpression = RocketMqConstants.FACECAPTURE ) public class FaceCaptureConsumer implements RocketMQListener { diff --git a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/rocketmq/consumer/FaceCompareConsumer.java b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/rocketmq/consumer/FaceCompareConsumer.java index e97e731f..95b348dd 100644 --- a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/rocketmq/consumer/FaceCompareConsumer.java +++ b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/rocketmq/consumer/FaceCompareConsumer.java @@ -21,9 +21,8 @@ import org.springframework.stereotype.Component; @RequiredArgsConstructor @RocketMQMessageListener( topic = RocketMqConstants.TOPIC, - consumerGroup = RocketMqConstants.GROUP, - selectorExpression = RocketMqConstants.FACECOMPARE, - nameServer = "${rocketmq.cluster1.name-server}" + consumerGroup = RocketMqConstants.COMPAREGROUP, + selectorExpression = RocketMqConstants.FACECOMPARE ) public class FaceCompareConsumer implements RocketMQListener { diff --git a/ruoyi-modules/Sis/src/main/java/org/dromara/sis/rocketmq/consumer/MeterRecordConsumer.java b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/rocketmq/consumer/MeterRecordConsumer.java new file mode 100644 index 00000000..591fb908 --- /dev/null +++ b/ruoyi-modules/Sis/src/main/java/org/dromara/sis/rocketmq/consumer/MeterRecordConsumer.java @@ -0,0 +1,45 @@ + +//package org.dromara.sis.rocketmq.consumer; +// +//import lombok.RequiredArgsConstructor; +//import lombok.extern.slf4j.Slf4j; +//import org.apache.rocketmq.common.message.MessageExt; +//import org.apache.rocketmq.spring.annotation.RocketMQMessageListener; +//import org.apache.rocketmq.spring.core.RocketMQListener; +//import org.dromara.sis.rocketmq.RocketMqConstants; +//import org.dromara.sis.rocketmq.producer.ProducerService; +//import org.springframework.stereotype.Component; +// +///** +// * @author lsm +// * @apiNote MeterRecordConsumer +// * @since 2025/8/25 +// */ +//@Slf4j +//@Component +//@RequiredArgsConstructor +//@RocketMQMessageListener( +// topic = RocketMqConstants.TOPIC, +// consumerGroup = RocketMqConstants.METER_GROUP, +// selectorExpression = RocketMqConstants.METER_RECORD, +// nameServer = "${rocketmq.cluster1.name-server}" +//) +//public class MeterRecordConsumer implements RocketMQListener { +// +// private final ProducerService producerService; +// +// @Override +// public void onMessage(MessageExt ext) { +// try { +// if (ext.getBody() == null) { +// log.info("仪表上报消息数据,不转发!"); +// } else { +// producerService.defaultSend(RocketMqConstants.TOPIC, RocketMqConstants.METER_RECORD, new String(ext.getBody())); +// log.info("转发仪表上报数据处理成功"); +// } +// } catch (Exception e) { +// log.error("转发仪表上报数据处理失败,", e); +// } +// +// } +//} diff --git a/ruoyi-visual/ruoyi-nacos/src/main/resources/application.properties b/ruoyi-visual/ruoyi-nacos/src/main/resources/application.properties index 40aba4ad..4385908f 100644 --- a/ruoyi-visual/ruoyi-nacos/src/main/resources/application.properties +++ b/ruoyi-visual/ruoyi-nacos/src/main/resources/application.properties @@ -40,9 +40,9 @@ spring.sql.init.platform=mysql db.num=1 ### Connect URL of DB: -db.url.0=jdbc:mysql://192.168.159.129:3306/ry-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true +db.url.0=jdbc:mysql://113.249.101.254:18000/ry-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true db.user.0=root -db.password.0=123456 +db.password.0=by@2025?? ### the maximum retry times for push nacos.config.push.maxRetryTime=50