package com.fxy.net;

import android.content.Context;

import com.fxy.baselibrary.language.other.CommSharedUtil;
import com.fxy.BuildConfig;
import com.fxy.constant.SPCache;

/**
 * 服务端请求地址常量类
 * @author James.Jiang
 * @date 2020-01-05
 */
public class Urls {

    //oss 文件地址
    //public static final String OSS_HOST = BuildConfig.OSS_HOST;

    public static final String getEnv(){
        return BuildConfig.DEBUG ? "uat":"prod";
    }


    public static final String getOssHostPath(Context context){
        SPCache spCache = SPCache.getInstance(context);
        String resource_prefix = spCache.getResourcePrefix();
        if (resource_prefix.isEmpty()){
            resource_prefix =  BuildConfig.DEBUG ? "uat/fxy":"prod/fxy";
        }
        return spCache.getResourceHost()+"/"+resource_prefix;
    }

    //获取头程
    public static String getFmsHostUrl(Context context){
        return  getOssHostPath(context)+"/pda/apk/fxyHost.json";
    }



    /**
     * 服务地址
     * @return
     */
    public static String getServiceAddress(Context context){
        return CommSharedUtil.getInstance(context).getString("service_address");
    }


    /**
     * 获取版本更新地址
     * @return
     */
    public static final String getVersionUpdate(Context context){
        return getOssHostPath(context)+"/pda/apk/version_update.json" ;
    }


    /**
     * 获取扫码设置
     * @return
     */
    public static String getScanSetting(Context context){
        return getOssHostPath(context)+"/pda/scan/setScan.json" ;
    }


    //登录接口
    public static final String LOGIN = "/pda/Login/doLogin";

    //退出登陆
    public static final String LOGIN_OUT = "/pda/Login/LoginOut";

    //记录失败日志
    public static final String RECORD_LOG = "/pda/Basics/recordLog";

    //获取用户信息
    public static final String GET_USER_INFO = "/pda/User/getUserInfo";
    //获取用户信息
    public static final String GET_USER_BASE_INFO = "/pda/user/baseInfo";


    //检测服务是否可用
    public static final String CHECK_SERVICE = "/pda/Basics/index";
    //获取蓝牙配置
    public static final String GET_BLUES = "/pda/Basics/getBlues";

    /*返修易 -- start*/
    public static final String FXY_CHECK_PALLET = "/pda/inbound/scanPallet";
    public static final String FXY_PUT_IN = "/pda/inbound/scanTracking";
    //关闭托盘
    public static final String FXY_CLOSE_PALLET = "/pda/inbound/closePallet";


    //获取质检单号
    public static final String FXY_QUALITY_TRACKING_NUMBER = "/pda/inbound/qualityTrackingNumber";
    //质检提交
    public static final String FXY_QUALITY_SUBMIT = "/pda/inbound/qualitySubmit";
    //质检数据
    public static final String FXY_GET_QUALITY_ORDER = "/pda/inbound/getQualityOrder";

    //质检数据
    public static final String FXY_CHECK_QUALITY_PALLET = "/pda/inbound/checkQualityPallet";
    //质检完成
    public static final String FXY_FINISH_QUALITY = "/pda/inbound/finishQuality";

    // 获取出库单数据
    public static final String FXY_GET_OUTBOUND = "/pda/outbound/scanOutbound";
    // 删除
    public static final String FXY_ADD_OUTBOUND = "/pda/outbound/scanDoPallet";
    // 删除
    public static final String FXY_DEL_OUTBOUND = "/pda/outbound/scanDoPallet";
    //完成装柜
    public static final String FXY_FINISH_LOAD = "/pda/Outbound/finishLoad";
    //扫描跟踪单号
    public static final String FXY_SCAN_PALLET_TRACKING = "/pda/inbound/scanPalletTracking";

    //获取查验入库信息
    public static final String  FXY_OPEN_TRACKING_NUMBER = "/pda/inbound/openTrackingNumber";

    //获取查验入库信息
    public static final String  FXY_INBOUND_PACKAGE_GOODS = "/pda/inbound/getPackageGoods";

    //完成查验
    public static final String  FXY_FINISH_CHECK = "/pda/inbound/finishCheck";

    //扫描跟踪号
    public static final String  FXY_WORK_TRACKING_NUMBER = "/pda/inbound/workTrackingNumber";
    //添加工单
    public static final String  FXY_ADD_WORK = "/pda/inbound/addWork";
    //处理完成
    public static final String  FXY_WORK_FINISH = "/pda/inbound/workFinish";

    //快递入库
    public static final String FXY_PICTURE_INBOUND = "/pda/inbound/pictureInbound";

    //托盘入库
    public static final String FXY_BATCH_PICTURE_INBOUND = "/pda/inbound/batchPictureInbound";



    //获取批次列表
    public static final String FXY_GET_BATCH_LIST = "/pda/tool/getBatchData";
    //获取批次详情
    public static final String FXY_GET_BATCH_DETAILS = "/pda/tool/getBatchDataDetail";
    //添加扫码结果
    public static final String FXY_ADD_SCAN_RESULT = "/pda/tool/scanLog";

    //入库分拣
    public static final String FXY_GROUP_PCS = "/pda/inbound/groupPcs";

    //香港入库操作
    public static final  String FXY_GK_INBOUND_PUTIN = "/pda/HongkongInbound/putin";
    //香港入库
    public static final String FXY_GK_INBOUND_PICTURE = "/pda/HongkongInbound/picture";

    /*开始检修功能*/

    //单箱入库
    public static final String FXY_DETECTION_PUTIN = "/pda/inbound/QcInbound";

    // 单箱上架 -- 查验库位
    public static final String FXY_DETECTION_CHECK_LOCATION = "/pda/inbound/QcBindLocation";
    // 单箱上架
    public static final String FXY_DETECTION_PUTAWAY = "/pda/inbound/QcBindLocation";

    //检查批次

    public static final String FXY_DETECTION_BOX_NUMBER = "/pda/inbound/QcScanBoxNumber";

    //确认商品
    public static final String FXY_DETECTION_CONFIRM_GOODS = "/pda/inbound/QcConfirmGoods";

    //点击主机差异
    public static final String FXY_DETECTION_DEAL_DIFF = "/pda/inbound/QcDealChayi";

    //装修完成
    public static final String FXY_DETECTION_COMPLETED = "/pda/Inbound/QcFinish";


    public static final String FXY_DETECTION_ASSIGN_DATA = "/pda/Inbound/getAssignData";

    //打托 - 扫托盘
    public static final String FXY_HK_CHECK_PALLET = "/pda/HongkongInbound/checkPallet";

    //打托 - 扫箱号
    public static final String FXY_HK_CHECK_CTN = "/pda/HongkongInbound/checkCtnNo";

    //打托 - 扫箱号
    public static final String FXY_HK_CTN_PHOTO = "/pda/HongkongInbound/ctnPhoto";

    //打托 - 扫描香港出库单号
    public static final String FXY_HK_CHECK_OUTBOUND = "/pda/HongkongOutbound/checkOutbound";

    //打托 - 扫描香港出库单号
    public static final String FXY_HK_CHECK_SCAN_PALLET = "/pda/HongkongOutbound/scanPallet";

    // 检查拣货 - 绑定库位
    public static final String FXY_HK_BIND_LOCATION = "/pda/HongkongInbound/bindLocation";

    // 拣货 - 扫拣货单 -- 扫码拣货单
    public static final String FXY_HK_SCAN_PICKUP = "/pda/HongkongOutbound/scanPickup";

    // 拣货 - 扫拣货单 -- 扫托盘
    public static final String FXY_HK_PICKUP_PALLET = "/pda/HongkongOutbound/pickupPallet";

    // 拣货 - 扫拣货单 -- 扫码扫箱号
    public static final String FXY_HK_PICKUP_CTNS = "/pda/HongkongOutbound/pickupCtns";

    //
    //快递入库
    public static final String FXY_PICTURE_CHECK = "/pda/inbound/pictureCheck";

    //快递入库
    public static final String FXY_PICTURE_CANCEL_SCAN_TRACKING = "/pda/inbound/cancelScanTracking";

    /*返修易 -- end*/


    public static final String FMS_UPLOAD_SIGN = "/pda/User/uploadSign";

}
