package com.youchain.utils;

import com.youchain.modules.system.service.ApiDictService;
import com.youchain.modules.system.service.impl.ApiDictServiceImpl;

public class UrlApi {
    private static RedisUtils redisUtils = SpringContextHolder.getBean(RedisUtils.class);
    private static ApiDictServiceImpl apiDictServiceImpl = SpringContextHolder.getBean(ApiDictServiceImpl.class);

    public static String  getByKey(String key){
        String re= (String)redisUtils.get(key);
        if(re==null||re.length()<=0||"".equals(re.trim())){
            apiDictServiceImpl.queryAllToSave();
            re= (String)redisUtils.get(key);
        }
        return re;
    };



    public static String submitMission(){
        return (String)getByKey("submitMission"+"_url");
    }

    public static String containerIn(){
        return (String)getByKey("containerIn"+"_url");
    }

    public static String containerOut(){
        return (String)getByKey("containerOut"+"_url");
    }

    public static String containerQuery(){
        return (String)getByKey("containerQuery"+"_url");
    }
    public static String querypoint(){
        return (String)getByKey("querypoint"+"_url");
    }
    public static String QueryCount(){
        return (String)getByKey("QueryCount"+"_url");
    }

   /* *//**
     * 料箱任务下发
     *//*
    public static String submitMission = "http://10.177.202.230:10870/interfaces/api/amr/submitMission";

    *//**
     * 容器入场
     *//*
    public static String containerIn = "http://10.177.202.230:10870/interfaces/api/amr/containerIn";

    *//**
     * 容器相关操作，出场
     *//*
    public static String containerOut = "http://10.177.202.230:10870/interfaces/api/amr/containerOut";

    *//**
     * 容器相关操作，查询容器信息
     *//*
    public static String containerQuery = "http://10.177.202.230:10870/interfaces/api/amr/containerQuery";

    *//**
     * 输送线点位查询
     *//*
    public static String querypoint="http://10.177.188.11:4080/webapi/mes/querypoint";

    *//**
     * 输送线点位查询
     *//*
    public static String QueryCount="http://10.177.188.11:4080/webapi/mes/QueryCount";
*/

}
