package cn.axzo.msg.center.inside.notices.service.impl;

import cn.axzo.msg.center.api.response.MessageNewRes;
import cn.axzo.msg.center.api.response.Message;
import cn.axzo.msg.center.domain.constant.CommonConstanst;
import cn.axzo.msg.center.domain.constant.MessageTypeConstant;
import cn.axzo.msg.center.domain.enums.MessageRouterEnum;
import cn.axzo.msg.center.domain.enums.MsgRouteTypeEnum;
import cn.axzo.msg.center.domain.request.MessageRes;
import cn.axzo.msg.center.inside.notices.service.IMessageService;
import com.google.common.collect.Maps;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * @author zhangPeng
 * @description
 * @date 2021/2/4 15:48
 */
@Slf4j
@Service
@RefreshScope
public class MessageServiceRouterImpl implements IMessageService {
  //管理路由跳转Map
  public static Map<Integer, Map<Integer, String>> uniformRouter = Maps.newHashMap();
  //需要语音播报Map
  public static Map<Integer, String> audio = Maps.newHashMap();

  static {
    //初始化需要语音播报map
    audio.put(MessageTypeConstant.CONST_TASK_CREATE_SUCCESS, "taskspeech01");
    audio.put(MessageTypeConstant.CONST_WORKER_TASK_AUTO_RECEIVE_SUCCESS, "taskspeech01");
//    audio.put(MessageTypeConstant.CONSTRUCTION_TASK_1, "taskspeech01");
    audio.put(MessageTypeConstant.CONSTRUCTION_TASK_11, "taskspeech01");
    audio.put(MessageTypeConstant.CONSTRUCTION_TASK_10, "taskspeech01");
    audio.put(MessageTypeConstant.CONST_WORKER_TASK_CONFIRM_SUCCESS, "taskspeech02");

    //项目公告路由
    Map<Integer, String> rojRouter = Maps.newHashMap();
    rojRouter.put(
        CommonConstanst.UNI_APP,
        CommonConstanst.UNI_PROJ_NOTICE + "#pages/detail");
    uniformRouter.put(MessageTypeConstant.ROJ_NOTICE, rojRouter);
    //申请加入班组
    Map<Integer, String> cmAPPlyTeamRouter = Maps.newHashMap();
    cmAPPlyTeamRouter.put(CommonConstanst.IOS,
        "AXTeamNewMembersController");
    cmAPPlyTeamRouter.put(CommonConstanst.ANDROID,
        "cn.axzo.app.ui.module.main.team.ApplyJoinListActivity");
    uniformRouter.put(MessageTypeConstant.CM_APPLY_JOIN_TEAM, cmAPPlyTeamRouter);

    //申请加入突击队
    Map<Integer, String> cmAPPlyCommandosRouter = Maps.newHashMap();
    cmAPPlyCommandosRouter.put(CommonConstanst.IOS,
        "AXCommandoApplyManageController");
    cmAPPlyCommandosRouter.put(CommonConstanst.ANDROID,
        "cn.axzo.app.ui.module.main.home.TempWorkerApplyListActivity");
    uniformRouter.put(MessageTypeConstant.CM_APPLY_JOIN_COMMANDOS, cmAPPlyCommandosRouter);

    //班组邀请加入
    Map<Integer, String> teamCmRouter = Maps.newHashMap();
    teamCmRouter.put(CommonConstanst.IOS, "AXTeamInfoController");
    teamCmRouter.put(CommonConstanst.ANDROID,
        "cn.axzo.app.ui.module.main.team.TeamRecordActivity");
    uniformRouter.put(MessageTypeConstant.TEAM_INVITES_CM, teamCmRouter);

    //项目邀请班组加入
    Map<Integer, String> projInviteTeamRouter = Maps.newHashMap();
    projInviteTeamRouter.put(CommonConstanst.IOS,
        "AXProjectInviteTeamController");
    projInviteTeamRouter.put(CommonConstanst.ANDROID,
        "cn.axzo.app.ui.module.main.project.ProjectInviteLeaderActivity");
    uniformRouter.put(MessageTypeConstant.CMP_INVITE_TEAM_JOIN_PROJ, projInviteTeamRouter);

    //班组邀请工人加入项目
    Map<Integer, String> teamInviteProjRouter = Maps.newHashMap();
    teamInviteProjRouter.put(CommonConstanst.IOS,
        "AXProjectInviteWorkerController");
    teamInviteProjRouter.put(CommonConstanst.ANDROID,
        "cn.axzo.app.ui.module.main.project.ProjectInviteWorkerActivity");
    uniformRouter.put(MessageTypeConstant.CMP_AGREE_WORKER_AUDIT, teamInviteProjRouter);

    //班组邀请工人合约补签
    Map<Integer, String> contractInviteRouter = Maps.newHashMap();
    contractInviteRouter.put(CommonConstanst.IOS,
        "AXProjectInviteInfoController");
    contractInviteRouter.put(CommonConstanst.ANDROID,
        "cn.axzo.app.ui.module.main.home.InviteWorkerSignContractActivity");
    uniformRouter.put(MessageTypeConstant.CM_WORKER_CONTRACT_INVITE, contractInviteRouter);

    //修改班组长发送通知信息
    Map<Integer, String> updateTeamOwnerRouter = Maps.newHashMap();
    updateTeamOwnerRouter.put(CommonConstanst.IOS,
        "AXProjectChangeTeamLeaderController");
    updateTeamOwnerRouter.put(CommonConstanst.ANDROID,
        "cn.axzo.app.ui.module.main.team.ChangeLeaderActivity");
    uniformRouter.put(MessageTypeConstant.UPDATE_TEAM_OWNER, updateTeamOwnerRouter);

    // 工人申请加入项目内班组
    Map<Integer, String> workerApplyJoinInTeamRouter = Maps.newHashMap();
    workerApplyJoinInTeamRouter.put(CommonConstanst.IOS,
        "AXProjectManagerController");
    workerApplyJoinInTeamRouter.put(CommonConstanst.ANDROID,
        "cn.axzo.app.ui.module.main.project.ProjectManagementActivity");
    uniformRouter.put(MessageTypeConstant.WORKER_APPLY_JOIN_IN_TEAM, workerApplyJoinInTeamRouter);

    //工人申请加入项目内班组
    Map<Integer, String> workerJoinProjectTeamRouter = Maps.newHashMap();
    workerJoinProjectTeamRouter.put(CommonConstanst.IOS,
        "AXProjectApplyController");
    workerJoinProjectTeamRouter.put(CommonConstanst.ANDROID,
        "cn.axzo.app.ui.module.main.project.ApplyJoinProjectActivity");
    uniformRouter.put(MessageTypeConstant.WORKER_JOIN_PROJECT_TEAM, workerJoinProjectTeamRouter);

    //合约工邀请信息即将过期
    Map<Integer, String> cmWorkerInvitationSoonExpire = Maps.newHashMap();
    cmWorkerInvitationSoonExpire.put(CommonConstanst.IOS,
        "AXProjectInviteQRListController");
    cmWorkerInvitationSoonExpire.put(CommonConstanst.ANDROID,
        "cn.axzo.app.ui.module.main.project.EntryQRListActivity");
    uniformRouter.put(MessageTypeConstant.CM_WORKER_INVITATION_SOON_EXPIRE,
        cmWorkerInvitationSoonExpire);
    //欠薪投诉处理
    Map<Integer, String> cmWorkerDealComplainInfo = Maps.newHashMap();
    cmWorkerDealComplainInfo.put(CommonConstanst.IOS,
        MessageRouterEnum.COMPLAIN_NO_DETAIL.getIosRoute());
    cmWorkerDealComplainInfo.put(CommonConstanst.ANDROID,
        MessageRouterEnum.COMPLAIN_NO_DETAIL.getAndroidRoute());
    uniformRouter.put(MessageTypeConstant.DEAL_COMPLAIN_INFO,
        cmWorkerDealComplainInfo);

    //工人申请加入项目内班组
    Map<Integer, String> laborExistWaitAuditRouter = Maps.newHashMap();
    laborExistWaitAuditRouter.put(CommonConstanst.UNI_APP,
        CommonConstanst.UNI_CMP_LABOR + "#pages/labour/index/index");
    uniformRouter.put(MessageTypeConstant.LABOR_EXIST_WAIT_AUDIT, laborExistWaitAuditRouter);

    //任务中心
    Map<Integer, String> taskCreateRouter = Maps.newHashMap();
    taskCreateRouter.put(
        CommonConstanst.UNI_APP,
        CommonConstanst.UNI_CONST_TEAM
            + "#pages/construction/detail/");
    uniformRouter.put(MessageTypeConstant.CONST_TASK_CREATE_SUCCESS, taskCreateRouter);

    Map<Integer, String> constructionRouter = Maps.newHashMap();
    constructionRouter.put(CommonConstanst.UNI_APP,
        CommonConstanst.UNI_CONST_TEAM + "#pages/construction/detail");
    uniformRouter.put(MessageTypeConstant.CONST_QUANTITY_CONFIRM_SUCCESS, constructionRouter);
    uniformRouter.put(MessageTypeConstant.CONST_QUANTITY_CONFIRM_REJECT, constructionRouter);
    uniformRouter.put(MessageTypeConstant.CONST_CHECK_SUCCESS, constructionRouter);
    uniformRouter.put(MessageTypeConstant.CONST_CHECK_REJECT, constructionRouter);
    uniformRouter.put(MessageTypeConstant.CONST_ACCEPTANCE_SUCCESS, constructionRouter);
    uniformRouter.put(MessageTypeConstant.CONST_ACCEPTANCE_REJECT, constructionRouter);
    uniformRouter.put(MessageTypeConstant.CONST_MODIFY_TASK, constructionRouter);

    //  工人收到新创建任务，自动接受任务
    Map<Integer, String> workTaskCreateRouter = Maps.newHashMap();
    workTaskCreateRouter.put(CommonConstanst.UNI_APP,
        CommonConstanst.UNI_CONST_WORKER
            + "#pages/construction/worker/detail");
    uniformRouter.put(MessageTypeConstant.CONST_WORKER_TASK_CREATE_SUCCESS, workTaskCreateRouter);
    uniformRouter
        .put(MessageTypeConstant.CONST_WORKER_TASK_AUTO_RECEIVE_SUCCESS, workTaskCreateRouter);
    uniformRouter.put(MessageTypeConstant.CONSTRUCTION_TASK_7, workTaskCreateRouter);
    uniformRouter.put(MessageTypeConstant.CONSTRUCTION_TASK_17, workTaskCreateRouter);

    Map<Integer, String> workTaskCreateCofirmRouter = Maps.newHashMap();
    workTaskCreateCofirmRouter.put(CommonConstanst.UNI_APP,
        CommonConstanst.UNI_CONST_WORKER
            + "#pages/construction/worker/detail");
    uniformRouter
        .put(MessageTypeConstant.CONST_WORKER_TASK_CONFIRM_SUCCESS, workTaskCreateCofirmRouter);

    Map<Integer, String> discloseCreateRouter = Maps.newHashMap();
    discloseCreateRouter
        .put(CommonConstanst.UNI_APP,
            CommonConstanst.UNI_DISCLOSE + "#pages/index/index");
    uniformRouter.put(MessageTypeConstant.DISCLOSE_CTEATE, discloseCreateRouter);

    Map<Integer, String> cmpConstRouter = Maps.newHashMap();
    cmpConstRouter
        .put(CommonConstanst.UNI_APP,
            CommonConstanst.UNI_CONST_CMP
                + "#pages/construction/detail");

    Map<Integer, String> cmpConstApproveRouter = Maps.newHashMap();
    cmpConstApproveRouter.put(CommonConstanst.UNI_APP,
        CommonConstanst.UNI_CONST_CMP + "#/pages/approve/detail");
    uniformRouter.put(MessageTypeConstant.CMP_CONST_REFUSE_BY_TEAM, cmpConstRouter);
    uniformRouter.put(MessageTypeConstant.TEAM_QUANTITY_CONFIRM_SUCCESS, cmpConstRouter);
    uniformRouter.put(MessageTypeConstant.TEAM_QUANTITY_CONFIRM_REJECT, cmpConstRouter);
    uniformRouter.put(MessageTypeConstant.CONST_WAIT_CONFIRM_QUANTITY, cmpConstRouter);
    uniformRouter.put(MessageTypeConstant.CONST_WAIT_ACCEPTANCE, cmpConstRouter);
    uniformRouter.put(MessageTypeConstant.CONST_NOTIFY_LEADER_CONFIRM, cmpConstRouter);
    uniformRouter.put(MessageTypeConstant.CMP_ACCOUNTING_ORDER_REJECT, cmpConstApproveRouter);
    //班组长待处理违规通报
    Map<Integer, String> violationCmpRouter = Maps.newHashMap();
    violationCmpRouter
        .put(CommonConstanst.UNI_APP,
            CommonConstanst.UNI_VIOLAtION + "#pages/team/detail");
    uniformRouter.put(MessageTypeConstant.VIOLATION_NOTIFY_LEADER_WAIT_DEAL, violationCmpRouter);

    Map<Integer, String> violationTeamRouter = Maps.newHashMap();
    violationTeamRouter
        .put(CommonConstanst.UNI_APP,
            CommonConstanst.UNI_VIOLAtION
                + "#pages/constructor/detail");
    uniformRouter.put(MessageTypeConstant.VIOLATION_NOTIFY_CMP, violationTeamRouter);

    //产业工人违规通报
    Map<Integer, String> violationCmRouter = Maps.newHashMap();
    violationCmRouter.put(CommonConstanst.UNI_APP,
        CommonConstanst.UNI_VIOLAtION);
    uniformRouter.put(MessageTypeConstant.VIOLATION_NOTIFY_CM, violationCmRouter);

    //----------------------产业工人-我的收入---------------------
    /**
     * 通知工人确认工资条
     */
    Map<Integer, String> cmWorkerTodoConfirm = Maps.newHashMap();
    cmWorkerTodoConfirm
        .put(CommonConstanst.UNI_APP,
            CommonConstanst.UNI_WORKER_WDSR + "#pages/slip/index");
    uniformRouter.put(MessageTypeConstant.CM_WORKER_TODO_CONFIRM, cmWorkerTodoConfirm);
    /**
     * 通知工人工资条未确认
     */
    Map<Integer, String> cmWorkerDelayConfirm = Maps.newHashMap();
    cmWorkerDelayConfirm
        .put(CommonConstanst.UNI_APP,
            CommonConstanst.UNI_WORKER_WDSR + "#pages/slip/index");
    uniformRouter.put(MessageTypeConstant.CM_WORKER_DELAY_CONFIRM, cmWorkerDelayConfirm);
    /**
     * 通知工人发薪成功/失败
     */
    Map<Integer, String> cmSalaryResult = Maps.newHashMap();
    cmSalaryResult
        .put(CommonConstanst.UNI_APP,
            CommonConstanst.UNI_WORKER_WDSR + "#pages/slip/index");
    uniformRouter.put(MessageTypeConstant.CM_SALARY_RESULT, cmSalaryResult);

    /**
     * 班组发起对账，工人进行记工确认
     */
    Map<Integer, String> workOrderToBeConfirmed = Maps.newHashMap();
    workOrderToBeConfirmed
        .put(CommonConstanst.UNI_APP,
            CommonConstanst.UNI_CONST_WORKER
                + "#/pages/quick/taskDetail");
    uniformRouter.put(MessageTypeConstant.CM_WORK_ORDER_TO_BE_CONFIRMED, workOrderToBeConfirmed);

    //----------------------产业工人-薪资管理---------------------
    /**
     * 提交企业待发薪申请
     */
    Map<Integer, String> cmApprFail = Maps.newHashMap();
    cmApprFail
        .put(CommonConstanst.UNI_APP,
            CommonConstanst.UNI_TEAM_XZGL + "#pages/apply/index");
    uniformRouter.put(MessageTypeConstant.CM_APPR, cmApprFail);
    /**
     * 发薪成功
     */
    Map<Integer, String> cmPaySucc = Maps.newHashMap();
    cmPaySucc
        .put(CommonConstanst.UNI_APP,
            CommonConstanst.UNI_TEAM_XZGL + "#pages/apply/index");
    uniformRouter.put(MessageTypeConstant.CM_PAY_SUCC, cmPaySucc);

    /**
     * 回款-发新成功 通知班组长
     */
    Map<Integer, String> cmLeaderPaySucc = Maps.newHashMap();
    cmLeaderPaySucc
        .put(CommonConstanst.UNI_APP,
            CommonConstanst.UNI_TEAM_XZGL + "#pages/advance/detail");
    uniformRouter.put(MessageTypeConstant.CM_LEADER_PAY_SUCC, cmLeaderPaySucc);

    /**
     * 回款-发新成功 通知班组长
     */
    Map<Integer, String> cmLeaderToConfirm = Maps.newHashMap();
    cmLeaderToConfirm
        .put(CommonConstanst.UNI_APP,
            CommonConstanst.UNI_TEAM_XZGL + "#pages/advance/detail");
    uniformRouter.put(MessageTypeConstant.CM_LEADER_TO_CONFIRM, cmLeaderToConfirm);

    /**
     * 提交班组垫资审核成功
     */
    Map<Integer, String> cmApprSuccTeam = Maps.newHashMap();
    cmApprSuccTeam
        .put(CommonConstanst.UNI_APP,
            CommonConstanst.UNI_TEAM_XZGL + "#pages/apply/index");
    uniformRouter.put(MessageTypeConstant.CM_APPR_SUCC_TEAM, cmApprSuccTeam);
    /**
     * 提交班组垫资发薪成功
     */
    Map<Integer, String> cmPaySuccTeam = Maps.newHashMap();
    cmPaySuccTeam
        .put(CommonConstanst.UNI_APP,
            CommonConstanst.UNI_TEAM_XZGL + "#pages/apply/index");
    uniformRouter.put(MessageTypeConstant.CM_PAY_SUCC_TEAM, cmPaySuccTeam);

    /**
     * 提醒班组进行记工调整 路由
     */
    Map<Integer, String> workOrderToBeAdjusted = Maps.newHashMap();
    workOrderToBeAdjusted
        .put(CommonConstanst.UNI_APP,
            CommonConstanst.UNI_CONST_TEAM
                + "#pages/quick/taskDetail");
    uniformRouter.put(MessageTypeConstant.CM_LEADER_WORK_ORDER_TO_BE_ADJUSTED,
        workOrderToBeAdjusted);

    //----------------------从业人员-薪资管理---------------------
    /**
     * 待处理代发薪申请
     */
    Map<Integer, String> cmpToAppr = Maps.newHashMap();
    cmpToAppr
        .put(CommonConstanst.UNI_APP,
            CommonConstanst.UNI_CMP_XZGL + "#pages/index");
    uniformRouter.put(MessageTypeConstant.CMP_TO_APPR, cmpToAppr);
    /**
     * 发薪成功
     */
    Map<Integer, String> cmpPaySucc = Maps.newHashMap();
    cmpPaySucc
        .put(CommonConstanst.UNI_APP,
            CommonConstanst.UNI_CMP_XZGL + "#pages/apply/index");
    uniformRouter.put(MessageTypeConstant.CMP_PAY_SUCC, cmpPaySucc);
    /**
     * 待处理班组垫资申请
     */
    Map<Integer, String> todoApprTeam = Maps.newHashMap();
    todoApprTeam
        .put(CommonConstanst.UNI_APP,
            CommonConstanst.UNI_CMP_XZGL + "#pages/apply/index");
    uniformRouter.put(MessageTypeConstant.TODO_APPR_TEAM, todoApprTeam);

    /**
     * 待处理班组垫资申请
     */
    Map<Integer, String> todoApprBackTeam = Maps.newHashMap();
    todoApprBackTeam
        .put(CommonConstanst.UNI_APP,
            CommonConstanst.UNI_CMP_XZGL + "#pages/index");
    uniformRouter.put(MessageTypeConstant.TODO_APPR_BACK_TEAM, todoApprBackTeam);

    //--------------------------------------------------------------------

    /**
     * 班组表扬
     */
    Map<Integer, String> teamPraise = Maps.newHashMap();
    teamPraise
        .put(CommonConstanst.UNI_APP,
            "https://guide.axzo.cn/#/pages/recognition/index");
    uniformRouter.put(MessageTypeConstant.TEAM_PRAISE, teamPraise);

    /**
     * 班组单价调整 相关路由
     */
    Map<Integer, String> teamPriceRouter = Maps.newHashMap();
    teamPriceRouter
        .put(CommonConstanst.UNI_APP,
            CommonConstanst.UNI_TEAM_PRICE + "#pages/teamPrice/index");
    uniformRouter.put(MessageTypeConstant.TEAM_PRICE_CHANGE_NOTIFY, teamPriceRouter);

    //----------------------------招工找活--------------------------------------
    /**
     * 个人中心-录用记录页 班组长
     */
    Map<Integer, String> employedLeaderRouter = Maps.newHashMap();
    employedLeaderRouter.put(CommonConstanst.UNI_APP,
        CommonConstanst.UNI_JOBS + "#/pages/mine/employRecord/index");
    uniformRouter.put(MessageTypeConstant.CM_LEADER_EMPLOYED, employedLeaderRouter);
    uniformRouter.put(MessageTypeConstant.CM_WORKER_EMPLOYED, employedLeaderRouter);

    /**
     * 个人中心-权益记录页 班组长
     */
    Map<Integer, String> equitiesLeaderRouter = Maps.newHashMap();
    equitiesLeaderRouter.put(CommonConstanst.UNI_APP,
        CommonConstanst.UNI_JOBS + "#/pages/mine/profitRecord");
    uniformRouter.put(MessageTypeConstant.CM_LEADER_BUY_NOTIFY, equitiesLeaderRouter);
    uniformRouter.put(MessageTypeConstant.CM_WORKER_BUY_NOTIFY, equitiesLeaderRouter);

    /**
     * 我的简历 班组长
     */
    Map<Integer, String> resumeLeaderRouter = Maps.newHashMap();
    resumeLeaderRouter.put(CommonConstanst.UNI_APP,
        CommonConstanst.UNI_JOBS + "#/pages/leader/teamInfo");
    uniformRouter.put(MessageTypeConstant.CM_TEAM_INFO_AUDIT_PASS, resumeLeaderRouter);
    uniformRouter.put(MessageTypeConstant.CM_TEAM_EXPERIENCE_AUDIT_PASS, resumeLeaderRouter);

    /**
     * 班组信息填写页 班组长
     */
    Map<Integer, String> teamInfoLeaderRouter = Maps.newHashMap();
    teamInfoLeaderRouter.put(CommonConstanst.UNI_APP,
        CommonConstanst.UNI_JOBS + "#/pages/leader/teamInfoEdit");
    uniformRouter.put(MessageTypeConstant.CM_TEAM_INFO_AUDIT_NO_PASS, teamInfoLeaderRouter);

    /**
     * 项目经验列表 班组长  个人项目经验列表工人
     */
    Map<Integer, String> projectExperienceLeaderRouter = Maps.newHashMap();
    projectExperienceLeaderRouter.put(CommonConstanst.UNI_APP,
        CommonConstanst.UNI_JOBS
            + "#/pages/public/experience?edit=true");
    uniformRouter.put(MessageTypeConstant.CM_TEAM_EXPERIENCE_AUDIT_NO_PASS,
        projectExperienceLeaderRouter);
    uniformRouter.put(MessageTypeConstant.CM_WORKER_EXPERIENCE_AUDIT_NO_PASS,
        projectExperienceLeaderRouter);

    /**
     * 招工信息列表页
     */
    Map<Integer, String> jobsInfoListRouter = Maps.newHashMap();
    jobsInfoListRouter.put(CommonConstanst.UNI_APP,
        CommonConstanst.UNI_JOBS
            + "#/pages/leader/index?activeIndex=1");
    uniformRouter.put(MessageTypeConstant.CM_JOBS_AUDIT_PASS, jobsInfoListRouter);
    uniformRouter.put(MessageTypeConstant.CM_JOBS_AUDIT_NO_PASS, jobsInfoListRouter);

    /**
     * 个人中心-沟通记录页 班组长
     */
    Map<Integer, String> communicationLeaderRouter = Maps.newHashMap();
    communicationLeaderRouter.put(CommonConstanst.UNI_APP,
        CommonConstanst.UNI_JOBS
            + "#/pages/mine/communicateRecord/index");
    uniformRouter.put(MessageTypeConstant.CM_WORKER_CALL_TEL, communicationLeaderRouter);
    uniformRouter.put(MessageTypeConstant.CM_LEADER_CALL_TEL, communicationLeaderRouter);

    /**
     * 我的简历页面 工人
     */
    Map<Integer, String> resumeWorkerRouter = Maps.newHashMap();
    resumeWorkerRouter.put(CommonConstanst.UNI_APP,
        CommonConstanst.UNI_JOBS + "#/pages/mine/resume");
    uniformRouter.put(MessageTypeConstant.CM_WORKER_INFO_AUDIT_PASS, resumeWorkerRouter);
    uniformRouter.put(MessageTypeConstant.CM_WORKER_EXPERIENCE_AUDIT_PASS, resumeWorkerRouter);
    uniformRouter.put(MessageTypeConstant.CM_WORKER_CERTIFICATE_AUDIT_PASS, resumeWorkerRouter);

    /**
     * 个人信息填写页 工人
     */
    Map<Integer, String> infoWorkerRouter = Maps.newHashMap();
    infoWorkerRouter.put(CommonConstanst.UNI_APP,
        CommonConstanst.UNI_JOBS + "#/pages/mine/resumeMore");
    uniformRouter.put(MessageTypeConstant.CM_WORKER_INFO_AUDIT_NO_PASS, infoWorkerRouter);

    /**
     * 个人技能证书列表页 工人
     */
    Map<Integer, String> certificateWorkerRouter = Maps.newHashMap();
    certificateWorkerRouter.put(CommonConstanst.UNI_APP,
        CommonConstanst.UNI_JOBS + "#/pages/mine/skillCerList");
    uniformRouter.put(MessageTypeConstant.CM_WORKER_CERTIFICATE_AUDIT_NO_PASS,
        certificateWorkerRouter);

    //--------------------------------劳务直聘----------------------------------------------------
    /**
     * 待处理代发薪申请
     */
    Map<Integer, String> bidding = Maps.newHashMap();
    bidding.put(CommonConstanst.UNI_APP,
        CommonConstanst.UNI_TEAM_BIDDING + "#/pages/bidding/index");
    uniformRouter.put(MessageTypeConstant.CM_LEADER_BIDDING_1, bidding);
    uniformRouter.put(MessageTypeConstant.CM_LEADER_BIDDING_2, bidding);
    uniformRouter.put(MessageTypeConstant.CM_LEADER_BIDDING_3, bidding);
    uniformRouter.put(MessageTypeConstant.CM_LEADER_BIDDING_4, bidding);
    uniformRouter.put(MessageTypeConstant.CM_LEADER_BIDDING_5, bidding);
    uniformRouter.put(MessageTypeConstant.CM_LEADER_BIDDING_6, bidding);
    uniformRouter.put(MessageTypeConstant.CM_LEADER_BIDDING_7, bidding);
    uniformRouter.put(MessageTypeConstant.CM_LEADER_BIDDING_8, bidding);
    uniformRouter.put(MessageTypeConstant.CM_LEADER_BIDDING_9, bidding);
    uniformRouter.put(MessageTypeConstant.CM_LEADER_BIDDING_10, bidding);
    uniformRouter.put(MessageTypeConstant.CM_LEADER_BIDDING_11, bidding);
    uniformRouter.put(MessageTypeConstant.CM_LEADER_BIDDING_12, bidding);
    uniformRouter.put(MessageTypeConstant.CM_LEADER_BIDDING_13, bidding);
    uniformRouter.put(MessageTypeConstant.CM_LEADER_BIDDING_14, bidding);
    uniformRouter.put(MessageTypeConstant.CM_LEADER_BIDDING_15, bidding);
    uniformRouter.put(MessageTypeConstant.CM_LEADER_BIDDING_16, bidding);
    uniformRouter.put(MessageTypeConstant.CM_LEADER_BIDDING_17, bidding);
    uniformRouter.put(MessageTypeConstant.CM_LEADER_BIDDING_18, bidding);
    uniformRouter.put(MessageTypeConstant.CM_LEADER_BIDDING_19, bidding);
    uniformRouter.put(MessageTypeConstant.CM_LEADER_BIDDING_20, bidding);
    uniformRouter.put(MessageTypeConstant.CM_LEADER_BIDDING_21, bidding);
    uniformRouter.put(MessageTypeConstant.CM_LEADER_BIDDING_22, bidding);
    uniformRouter.put(MessageTypeConstant.CM_LEADER_BIDDING_23, bidding);

    //--------------------------------施工任务----------------------------------------------------
    // 施工任务 路由
    Map<Integer, String> constructionTask = Maps.newHashMap();
    constructionTask.put(CommonConstanst.UNI_APP,
        CommonConstanst.UNI_CONST_TEAM
            + "#/pages/construction/detail");
    uniformRouter.put(MessageTypeConstant.CONSTRUCTION_TASK_16, constructionTask);

  }

  @Override
  public void setNewRouter(MessageNewRes message, int system) {
    int tmpSystem = system;
    if(system==3){
      system = 2;
    }else if(system == 4){
      system = 1;
    }
    Map<Integer, String> systemRouter = uniformRouter.get(message.getOldTypeId());
    if (systemRouter != null) {
      String uniRouter = systemRouter.get(CommonConstanst.UNI_APP);
      if (StringUtils.isEmpty(uniRouter)) {
        message.setRouter(systemRouter.get(system));
        message.setRouterType(Message.ROUTER_TYPE_NATIVE);
      } else {
        if (message.getOldTypeId() == MessageTypeConstant.TEAM_PRAISE) {
          message.setRouter("https://guide.axzo.cn/#/pages/recognition/index");
          //H5
          message.setRouterType(3);
        } else if(message.getOldTypeId() == MessageTypeConstant.ROJ_NOTICE && tmpSystem == MsgRouteTypeEnum.WEB.getCode()) {
          //WEB端请求-项目公告固定跳转WEB
          message.setRouter("/digitalConstructionSite/scene/constructionAnnouncement");
          message.setRouterType(4);
        }else{
          message.setRouter(systemRouter.get(CommonConstanst.UNI_APP));
          message.setRouterType( Message.ROUTER_TYPE_UNIAPP);
        }
      }
    }
  }

  private void setRouter(MessageRes message, int system) {
    Map<Integer, String> systemRouter = uniformRouter.get(message.getType());
    if (systemRouter != null) {
      String uniRouter = systemRouter.get(CommonConstanst.UNI_APP);
      if (StringUtils.isEmpty(uniRouter)) {
        message.setRouter(systemRouter.get(system));
        message.setRouterType(String.valueOf(Message.ROUTER_TYPE_NATIVE));
      } else {
        if (message.getType() == MessageTypeConstant.TEAM_PRAISE) {
          message.setRouter("https://guide.axzo.cn/#/pages/recognition/index");
          message.setRouterType("3");
        } else {
          message.setRouter(systemRouter.get(CommonConstanst.UNI_APP));
          message.setRouterType(String.valueOf(Message.ROUTER_TYPE_UNIAPP));
        }
      }
    }
  }

}
