k94314517
2024-09-30 4229bc67c2c0adf5603c7f68a1e55e480d011d75
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncPushServiceImpl.java
@@ -5,9 +5,6 @@
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.config.DataSyncConfig;
import com.doumee.config.SpringContextUtil;
import com.doumee.core.exception.BusinessException;
import com.doumee.core.haikang.model.HKConstants;
import com.doumee.core.haikang.model.param.BaseResponse;
import com.doumee.core.haikang.model.param.request.*;
import com.doumee.core.haikang.model.param.request.event.acs.EventAcsInfoRequest;
@@ -22,21 +19,14 @@
import com.doumee.dao.business.*;
import com.doumee.dao.business.join.VisitsJoinMapper;
import com.doumee.dao.business.model.*;
import com.doumee.dao.system.model.SystemUser;
import com.doumee.dao.web.reqeust.SavePlatformWarnEventDTO;
import com.doumee.service.business.DeviceEventService;
import com.doumee.service.business.InterfaceLogService;
import com.doumee.service.business.MemberService;
import com.doumee.service.business.impl.PlatformWarnEventServiceImpl;
import com.github.yulichang.interfaces.MPJBaseJoin;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.hikvision.artemis.sdk.config.ArtemisConfig;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.yaml.snakeyaml.scanner.Constant;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
@@ -135,7 +125,7 @@
                //再插入最新的在厂人员
                retentionMapper.insert(retentionList);
            }
            log.error("【海康门禁事件推送】========成功=======");
            log.info("【海康门禁事件推送】========成功=======");
        }catch (Exception e) {
            log.error("【海康门禁事件推送】========失败=======:\n" + e.getMessage());
        }finally {
@@ -325,7 +315,7 @@
                //再插入最新的在厂人员
                retentionMapper.insert(retentionList);
            }
            log.error("【海康访客事件推送】========成功=======");
            log.info("【海康访客事件推送】========成功=======");
        }catch (Exception e){
            log.error("【海康访客事件推送】========失败=======:\n"+e.getMessage());
@@ -379,7 +369,7 @@
                //再插入最新的在厂人员
                retentionMapper.insert(retentionList);
            }
            log.error("【海康访客事件推送】========成功=======");
            log.info("【海康访客事件推送】========成功=======");
        }catch (Exception e){
            log.error("【海康访客事件推送】========失败=======:\n"+e.getMessage());
        }
@@ -674,7 +664,7 @@
                //再插入最新的在厂人员
                retentionMapper.insert(retentionList);
            }
            log.error("【海康停车场事件推送】========成功=======");
            log.info("【海康停车场事件推送】========成功=======");
        }catch (Exception e){
            log.error("【海康停车场事件推送】========失败=======:\n"+e.getMessage());
@@ -735,7 +725,6 @@
            event.setReleaseResult(request.getData().getInResult().getRlsResult().getReleaseResult());
            event.setReleaseResultEx(request.getData().getInResult().getRlsResult().getReleaseResultEx());
        }
        if(request.getData().getPicUrl()!=null){
            //车辆和和车牌照片
            event.setVehiclePicUrl(getHkImgUrl(request.getData().getPicUrl().getVehiclePicUrl()));
@@ -770,9 +759,7 @@
                delRetentionList.add(event.getPlateNos());
            }
        }
        return event;
    }
    private Retention getRetentionModelByParkRequest(EventParkInfoRequest request) {
@@ -783,7 +770,6 @@
        retention.setType(Constants.THREE);
//        retention.setDeviceName(request.getSrcName());
//        retention.setDeviceIndex(request.getSrcIndex());
        return retention;
    }
@@ -843,7 +829,7 @@
                    }
            }
            result = "成功";
            log.error("【海康月台工作状态事件推送】========成功=======");
            log.info("【海康月台工作状态事件推送】========成功=======");
        }catch (Exception e) {
            result = "失败"+e.getMessage();
            log.error("【海康月台工作状态事件推送】========失败=======:\n" + e.getMessage());
@@ -941,7 +927,7 @@
                platformEventMapper.insert(eventList);
            }
            result = "成功";
            log.error("【海康月台车辆状态事件推送】========成功=======");
            log.info("【海康月台车辆状态事件推送】========成功=======");
        }catch (Exception e) {
            result = "失败"+e.getMessage();
            log.error("【海康月台车辆状态事件推送】========失败=======:\n" + e.getMessage());
@@ -1062,6 +1048,7 @@
        content = content.replace("${param2}",model.getCarCodeFront());
        List<String> broadcastList = new ArrayList<>();
        List<String> ledList = new ArrayList<>();
        String bNames = "";
        List<PlatformBroadcastLog> logList = new ArrayList<>();
        for(PlatformDevice device : deviceList){
            if(StringUtils.isNotBlank(device.getHkId())){
@@ -1075,6 +1062,7 @@
                log.setHkDate(new Date());
                log.setObjType(Constants.ONE);
                log.setIds(device.getHkNo());
                log.setRemark(device.getName());
                log.setInfo(content);
                log.setNum(Constants.ONE);
                BaseResponse response = dealLedContentBiz(device.getHkNo(),content,speed,1);
@@ -1091,6 +1079,7 @@
                ledList.add(device.getHkId());
            }else  if(Constants.equalsInteger(device.getType(),Constants.ZERO)){
                //如果是广播点
                bNames += device.getName()+";";
                broadcastList.add(device.getHkId());
            }
        }
@@ -1104,6 +1093,7 @@
            log.setHkDate(new Date());
            log.setObjType(Constants.ONE);
            log.setInfo(content1);
            log.setRemark(bNames);
            log.setNum(Constants.ONE);
            log.setIds(String.join(",",broadcastList));
            CustomBroadcastRequest request = new CustomBroadcastRequest();