jiangping
2024-10-12 3d6cc6bf2bdad1714c98c820dc1805b89d594141
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncPushServiceImpl.java
@@ -394,8 +394,6 @@
        queryWrapper.last("limit 1");
        Visits visits = visitsMapper.selectJoinOne(Visits.class,queryWrapper);
        if(visits !=null){
            //如果人员信息存在,则删除之前的所有进场数据(无论此次推送是进厂还是出场推送事件)
            delRetentionLis.add(visits.getMemberId());
            if(dataSyncConfig.getOrgUserDataOrigin() == DataSyncConfig.origin.hk){
                //如果是伊利大屏项目,不做处理
                return;
@@ -404,7 +402,7 @@
            updateVistis.setId(visits.getId());
            if (Constants.formatIntegerNum(request.getEventType()) == HKConstants.EventTypes.VISIT_SIGN_ICCM_IN.getKey()) {
                //如果是访客登记,录入人员的在场数据记录
                retentionList.add(getRetentionModelByVisitRequest(visits, request.getHappenTime(),request.getSrcType()));
//                retentionList.add(getRetentionModelByVisitRequest(visits, request.getHappenTime(),request.getSrcType()));
                //来访时间
                updateVistis.setStatus(Constants.VisitStatus.signin);
                updateVistis.setInDate(DateUtil.getISO8601DateByStr(data.getBeginTime()));
@@ -422,7 +420,19 @@
                updateVistis.setOutType(Constants.ZERO);
                updateVistis.setOutInfo("访客正常签离");
            }else{
                //如果人员信息存在,切是访客通行,则删除之前的所有进场数据(无论此次推送是进厂还是出场推送事件)
                delRetentionLis.add(visits.getMemberId());
                //如果是访客通行
                if(request.getData()!=null&&request.getData().getParamValues()!=null &&
                        StringUtils.equals(request.getData().getParamValues().getInOrOut(),"1")){
                    //如果是访客登记,录入人员的在场数据记录
                    Retention r = getRetentionModelByVisitRequest(visits, request.getHappenTime(),request.getSrcType());
                    r.setCarNo(request.getData().getParamValues().getPlateNos());
                    r.setAccessType(request.getData().getParamValues().getAccessType());
                    r.setDeviceName(request.getData().getParamValues().getSrcName());
                    r.setDeviceIndex(request.getData().getParamValues().getSrcIndex());
                    retentionList.add(r);
                }
            }
            updateVistis.setEditDate(new Date());
            //更新访客来访或者签离时间信息
@@ -1086,7 +1096,7 @@
            }
            if(Constants.equalsInteger(device.getType(),Constants.ZERO)){
                //如果是LED
                PlatformBroadcastLog log = dealLedContentBiz(device.getHkNo(),device.getName(),content,speed,1);
                PlatformBroadcastLog log = dealLedContentBiz(model.getId(),device.getHkNo(),device.getName(),content,speed,1);
                logList.add(log);
                ledList.add(device.getHkId());
            }else  if(Constants.equalsInteger(device.getType(),Constants.TWO)){
@@ -1115,7 +1125,7 @@
    public static PlatformBroadcastLog dealBroadcastBiz(PlatformJob model, List<String> broadcastList,String bNames , String content1) {
        PlatformBroadcastLog log = new PlatformBroadcastLog();
        content1 = content1.replace("${param}",model.getCarCodeFront());
        log.setObjId(model.getId().toString());
        log.setCreateDate(new Date());
        log.setBizType(Constants.ONE);
        log.setHkDate(new Date());
@@ -1139,12 +1149,12 @@
            log.setHkInfo("请求成功");
            log.setHkStatus(Constants.TWO);
        }
        log.setDeviceType(Constants.ONE);
        log.setDeviceType(Constants.ZERO);
        log.setName("发送广播播报内容");
        return  log;
    }
    public static PlatformBroadcastLog dealLedContentBiz(String hkNo,String hkName, String content,int speed,int color) {
    public static PlatformBroadcastLog dealLedContentBiz(Integer platformId,String hkNo,String hkName, String content,int speed,int color) {
        PlatformBroadcastLog log = new PlatformBroadcastLog();
        log.setCreateDate(new Date());
        log.setBizType(Constants.ONE);
@@ -1154,6 +1164,7 @@
        log.setRemark(hkName);
        log.setInfo(content);
        log.setNum(Constants.ONE);
        log.setObjId(platformId.toString());
        TransparentChannelBodyRequest body = new TransparentChannelBodyRequest();
        TransparentChannelHeadRequest head = new TransparentChannelHeadRequest();