doum
6 小时以前 7746d3d26aeca6a674ed0bb23779528fbf9ba349
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncPushServiceImpl.java
@@ -6,8 +6,6 @@
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.config.DataSyncConfig;
import com.doumee.core.erp.model.openapi.response.erp.ERPApiResponse;
import com.doumee.core.erp.model.openapi.response.erp.ErpUserListResponse;
import com.doumee.core.haikang.model.HKConstants;
import com.doumee.core.haikang.model.param.BaseResponse;
import com.doumee.core.haikang.model.param.request.*;
@@ -15,11 +13,10 @@
import com.doumee.core.haikang.model.param.request.event.acs.EventAcsRequest;
import com.doumee.core.haikang.model.param.request.event.acs.EventDeviceDataRequest;
import com.doumee.core.haikang.model.param.request.event.base.EventBaseInfoRequest;
import com.doumee.core.haikang.model.param.request.event.base.EventBaseParamRequest;
import com.doumee.core.haikang.model.param.request.event.base.EventBaseRequest;
import com.doumee.core.haikang.model.param.request.event.parks.*;
import com.doumee.core.haikang.model.param.request.event.visit.*;
import com.doumee.core.haikang.model.param.respose.AuthResultPageDetailResponse;
import com.doumee.core.haikang.model.param.respose.AuthResultPageResponse;
import com.doumee.core.haikang.service.HKService;
import com.doumee.core.utils.*;
import com.doumee.dao.business.*;
@@ -33,7 +30,6 @@
import com.doumee.service.business.impl.JkCabinetGridServiceImpl;
import com.doumee.service.business.impl.PlatformWarnEventServiceImpl;
import com.doumee.service.business.third.TmsService;
import com.doumee.service.business.third.model.PageData;
import com.doumee.service.business.third.model.request.TmsOrderInfoRequest;
import com.doumee.service.business.third.model.response.TmsOrderInfoResponse;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
@@ -43,7 +39,6 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import javax.servlet.http.HttpServletResponse;
@@ -118,12 +113,6 @@
    private WarningRuleMapper warningRuleMapper;
    @Autowired
    private WarningPushMapper warningPushMapper;
    /**
     * 海康门禁事件推送
@@ -592,6 +581,13 @@
            Thread t1=new Thread(new Runnable() {
                @Override
                public void run() {
//                  EventBaseRequest submitParam = new EventBaseRequest();
//                  submitParam.setMethod(param.getMethod());
//                  submitParam.setParams(new EventBaseParamRequest());
//                  submitParam.getParams().setAbility(param.getParams().getAbility());
//                  submitParam.getParams().setQuids(param.getParams().getQuids());
//                  submitParam.getParams().setSendTime(param.getParams().getSendTime());
//                  submitParam.getParams().setEvents(new ArrayList<>());
                    //定制key
                   param.getParams().setEvents(new ArrayList<>());
                   int key = Constants.WarningConfig.AF_RYLG_CUSTOM.getKey();
@@ -626,18 +622,26 @@
                        if(StringUtils.equals(t.getEventId(),request.getEventId())){
                            continue;
                        }
                       request.getData().put("url",StringUtils.defaultString(request.getData().getString("url"),"")+","+StringUtils.defaultString(t.getData().getString("url"),""));
                       request.setSrcIndex(StringUtils.defaultString(request.getSrcIndex(),"")+","+StringUtils.defaultString(t.getSrcIndex(),""));
                       request.setSrcName(StringUtils.defaultString(request.getSrcName(),"")+","+StringUtils.defaultString(t.getSrcName(),""));
                       request.getData().getJSONObject("AIOPResultData").put("imageUrl",StringUtils.defaultString( request.getData().getJSONObject("AIOPResultData").getString("imageUrl"),"")
                               +","+StringUtils.defaultString( t.getData().getJSONObject("AIOPResultData").getString("imageUrl"),""));
                    }
                    JSONObject   img = new JSONObject();
                    img.put("imageUrl", request.getData().getJSONObject("AIOPResultData").getString("imageUrl"));
                    String url =  request.getData().getString("url");
                    request.setData(new JSONObject());
                    request.getData().put("AIOPResultData",img);
                    request.getData().put("url",url);
                    param.getParams().getEvents().add(request);
                    String thirdpath =systemDictDataBiz.queryByCode(Constants.HK_PARAM, Constants.HK_PUSH_THIRD_URL).getCode();
                    if(StringUtils.isNotBlank(thirdpath)){
                        log.error("========通知其他三方地址离岗事件已推送,参数:"+JSONObject.toJSONString(param));
                        String[] ss = thirdpath.split(";");
                        for(String s : ss){
                            String response =   HttpsUtil.postJson(s,JSONObject.toJSONString(param));
                            log.error("========通知其他三方地址离岗事件已推送,结果:"+response);
                            log.error("========通知其他三方地址离岗事件已推送,结果:"+s+"\n"+response);
                        }
                    }
                }