rk
2026-06-09 c467370d8741bc05ca7c22d4253c58ac0a979ef5
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncPushServiceImpl.java
@@ -6,6 +6,7 @@
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.config.DataSyncConfig;
import com.doumee.core.dingTalk.DingTalk;
import com.doumee.core.haikang.model.HKConstants;
import com.doumee.core.haikang.model.param.BaseResponse;
import com.doumee.core.haikang.model.param.request.*;
@@ -38,6 +39,7 @@
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
@@ -46,6 +48,7 @@
import java.io.IOException;
import java.util.*;
import java.util.Date;
import java.util.concurrent.Executor;
import java.util.stream.Collectors;
/**
@@ -57,6 +60,9 @@
@Slf4j
public class HkSyncPushServiceImpl extends HkSyncBaseServiceImpl {
    @Autowired
    @Qualifier("asyncExecutor")
    private Executor asyncExecutor;
    @Autowired
    private InoutDayCountMapper inoutDayCountMapper;
    @Autowired
@@ -115,6 +121,8 @@
    private WarningRuleMapper warningRuleMapper;
    @Autowired
    private WarningPushMapper warningPushMapper;
    @Autowired
    private DingTalk dingTalk;
    /**
     * 海康门禁事件推送
@@ -530,7 +538,7 @@
                                    warningPush.setStatus(Constants.ZERO);
                                    warningPush.setPushType(Constants.ZERO);
                                    warningPush.setRegion( warningEvent.getRegion());
                                    if (com.github.xiaoymin.knife4j.core.util.CollectionUtils.isEmpty(memberList)) {
                                    if (com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(memberList)) {
                                        warningPush.setMemberIds(
                                                StringUtils.join(memberList.stream().map(i -> i.getId()).collect(Collectors.toList()), ",")
                                        );
@@ -538,16 +546,18 @@
                                        );
                                    }
                                     if(Constants.equalsInteger(warningRule.getMemberNotice(),Constants.ONE)){
//                            Boolean noticeFlag = dingTalk.workInfoOANotice(Long.valueOf(systemDictDataBiz.queryByCode(Constants.DD_TALK,Constants.AGENT_ID).getCode()),
//                                    StringUtils.join(memberList.stream().filter(i->StringUtils.isNotBlank(i.getDdId())).map(i->i.getDdId()).collect(Collectors.toList()),","),
//                                dingTalk.getAlarmNoticeMsg(warningPush.getRegion(),DateUtil.getCurrDateTime(),warningConfig.getInfo()));
//                                  warningPush.setStatus(noticeFlag?Constants.ONE:Constants.TWO);
                                        Boolean noticeFlag = false;
//                                             if (com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(memberList)) {
//                                                 noticeFlag = dingTalk.workInfoOANotice(Long.valueOf(systemDictDataBiz.queryByCode(Constants.DD_TALK,Constants.AGENT_ID).getCode()),
//                                                         StringUtils.join(memberList.stream().filter(i->StringUtils.isNotBlank(i.getDdId())).map(i->i.getDdId()).collect(Collectors.toList()),","),
//                                                         dingTalk.getAlarmNoticeMsg(warningPush.getRegion(),DateUtil.getCurrDateTime(),warningConfig.getInfo()));
//                                            }
                                          warningPush.setStatus(noticeFlag?Constants.ONE:Constants.TWO);
                                        List<String> ddUserIdList = memberList.stream().filter(i->StringUtils.isNotBlank(i.getDdId())).map(i->i.getDdId()).collect(Collectors.toList());
                                        if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(ddUserIdList)){
                                            for (String ddUserId:ddUserIdList) {
                                                impl.getJDYData(warningEvent,ddUserId,
                                                        systemDictDataBiz.queryByCode(Constants.JDY_CONFIG,Constants.JDY_ENTRY_ID).getCode()
                                                );
                                            }
                                        }
@@ -593,9 +603,7 @@
    private void dealNoticeTelecomEvent(EventBaseRequest param,EventBaseInfoRequest request ,List<WarningEvent> list) {
        try {
            log.error("========通知其他三方地址离岗事件开始:"+list.size());
            Thread t1=new Thread(new Runnable() {
                @Override
                public void run() {
            asyncExecutor.execute(() -> {
//                  EventBaseRequest submitParam = new EventBaseRequest();
//                  submitParam.setMethod(param.getMethod());
//                  submitParam.setParams(new EventBaseParamRequest());
@@ -659,11 +667,9 @@
                            log.error("========通知其他三方地址离岗事件已推送,结果:"+s+"\n"+response);
                        }
                    }
                }
            });
            t1.start();
                });
        }catch (Exception e){
            e.printStackTrace();
            log.error("dealNoticeTelecomEvent异常", e);
        }
    }