doum
2025-09-11 7298d5354963a88643a543b51b90192dc9fc934c
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/hksync/HkSyncNoticeServiceImpl.java
@@ -3,6 +3,7 @@
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.core.constants.ResponseStatus;
import com.doumee.core.exception.BusinessException;
import com.doumee.core.haikang.model.HKConstants;
@@ -22,6 +23,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.net.URLEncoder;
import java.util.*;
/**
@@ -34,6 +36,8 @@
public class HkSyncNoticeServiceImpl extends HkSyncBaseServiceImpl {
    @Autowired
    private NoticesJoinMapper noticesJoinMapper;
    @Autowired
    private SystemDictDataBiz systemDictDataBiz;
    @Autowired
    private MemberMapper memberMapper;
@@ -72,7 +76,7 @@
            while (hasNext){
                //分页遍历循环查询所有门禁设备数据
                GetTodoListRequest param = new GetTodoListRequest();
                param.setComId("dfe");
//                param.setComId("dfe");//接全部的代办
                param.setUserId(username);
                param.setStatus(1);//只查待处理的数据
                param.setPageNo(curPage);
@@ -94,9 +98,8 @@
                }
                curPage++;
            }
            if(allHkList!=null && allHkList.size()>0){
                String gotoUrl = systemDictDataBiz.queryByCode(Constants.HK_PARAM,Constants.HK_WEBSITE_DOMAIN_URL).getCode();
                 List<Notices> list = new ArrayList<>();
                for(GetTodoListResponse data :allHkList){
                   Member u = getFromUserList(data.getUserId(),userList);
@@ -105,13 +108,12 @@
                   }
                    userIds.add(u.getId());
                    JSONObject param = new JSONObject();
                    param.put("componentId","dfe");
                    param.put("msgType","tlnc");
                    param.put("componentMenuId", data.getMenuCode());
                    JSONObject c = new JSONObject();
                    c.put("method","dealTlncMsg");
                    c.put("argument",JSONObject.toJSONString(data));
                    c.put("argument", data);
                    param.put("callback",c);
                    Notices notices = new Notices();
                    notices.setCreateDate(DateUtil.getISO8601DateByStr(data.getMsgCreateTimeIso()));
@@ -130,6 +132,11 @@
                    notices.setParam3(data.getMsgCreateTime());
                    notices.setParam5(JSONObject.toJSONString(param));
                    notices.setType(Constants.noticesObjectType.hknotice);
//                  notices.setRemark(gotoUrl+"dps/web/wxAuth/loginV2?oaId=atwl&redirectId=index");
                    //https://atwl.ahzyssl.com/dps/web/wxAuth/loginV2?oaId=atwl&redirectUrl=encode(url)
                    String domainUrl = gotoUrl + HKConstants.InterfacePath.wxAuthUrl[0];
                    notices.setRemark(domainUrl+ URLEncoder.encode("/"+StringUtils.defaultString(data.getSegmentId(),"")
                            +StringUtils.defaultString(data.getH5Url(),""),"utf-8"));
                    list.add(notices);
                }
                 if(list.size()>0){