Urls.java 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. package com.fxy.net;
  2. import android.content.Context;
  3. import com.fxy.baselibrary.language.other.CommSharedUtil;
  4. import com.fxy.BuildConfig;
  5. import com.fxy.constant.SPCache;
  6. /**
  7. * 服务端请求地址常量类
  8. * @author James.Jiang
  9. * @date 2020-01-05
  10. */
  11. public class Urls {
  12. //oss 文件地址
  13. //public static final String OSS_HOST = BuildConfig.OSS_HOST;
  14. public static final String getEnv(){
  15. return BuildConfig.DEBUG ? "uat":"prod";
  16. }
  17. public static final String getOssHostPath(Context context){
  18. SPCache spCache = SPCache.getInstance(context);
  19. String resource_prefix = spCache.getResourcePrefix();
  20. if (resource_prefix.isEmpty()){
  21. resource_prefix = BuildConfig.DEBUG ? "uat/fxy":"prod/fxy";
  22. }
  23. return spCache.getResourceHost()+"/"+resource_prefix;
  24. }
  25. //获取头程
  26. public static String getFmsHostUrl(Context context){
  27. return getOssHostPath(context)+"/pda/apk/fxyHost.json";
  28. }
  29. /**
  30. * 服务地址
  31. * @return
  32. */
  33. public static String getServiceAddress(Context context){
  34. return CommSharedUtil.getInstance(context).getString("service_address");
  35. }
  36. /**
  37. * 获取版本更新地址
  38. * @return
  39. */
  40. public static final String getVersionUpdate(Context context){
  41. return getOssHostPath(context)+"/pda/apk/version_update.json" ;
  42. }
  43. /**
  44. * 获取扫码设置
  45. * @return
  46. */
  47. public static String getScanSetting(Context context){
  48. return getOssHostPath(context)+"/pda/scan/setScan.json" ;
  49. }
  50. //登录接口
  51. public static final String LOGIN = "/pda/Login/doLogin";
  52. //退出登陆
  53. public static final String LOGIN_OUT = "/pda/Login/LoginOut";
  54. //记录失败日志
  55. public static final String RECORD_LOG = "/pda/Basics/recordLog";
  56. //获取用户信息
  57. public static final String GET_USER_INFO = "/pda/User/getUserInfo";
  58. //检测服务是否可用
  59. public static final String CHECK_SERVICE = "/pda/Basics/index";
  60. //获取蓝牙配置
  61. public static final String GET_BLUES = "/pda/Basics/getBlues";
  62. /*返修易 -- start*/
  63. public static final String FXY_CHECK_PALLET = "/pda/inbound/scanPallet";
  64. public static final String FXY_PUT_IN = "/pda/inbound/scanTracking";
  65. //关闭托盘
  66. public static final String FXY_CLOSE_PALLET = "/pda/inbound/closePallet";
  67. // 获取出库单数据
  68. public static final String FXY_GET_OUTBOUND = "/pda/outbound/scanOutbound";
  69. // 删除
  70. public static final String FXY_ADD_OUTBOUND = "/pda/outbound/scanDoPallet";
  71. // 删除
  72. public static final String FXY_DEL_OUTBOUND = "/pda/outbound/scanDoPallet";
  73. //完成装柜
  74. public static final String FXY_FINISH_LOAD = "/pda/Outbound/finishLoad";
  75. //扫描跟踪单号
  76. public static final String FXY_SCAN_PALLET_TRACKING = "/pda/inbound/scanPalletTracking";
  77. /*返修易 -- end*/
  78. /*
  79. 以下是头程
  80. */
  81. //获取搬运小组
  82. public static final String FMS_GET_HOST = "/pda/basics/getHost";
  83. //获取仓库
  84. public static final String FMS_GET_WAREHOUSE = "/pda/basics/getWarehouse";
  85. //获取搬运小组
  86. public static final String FMS_DOCKER_LIST = "/pda/Inbound/getDocker";
  87. //获取搬运小组
  88. public static final String FMS_CHECK_ORDER = "/pda/Inbound/checkOrder";
  89. //添加理货
  90. public static final String FMS_ADD_RECEIVE = "/pda/Inbound/receive";
  91. //上架
  92. public static final String FMS_PUT_AWAY = "/pda/Inbound/PutAway";
  93. //获取待检查列表
  94. public static final String FMS_GET_WAIT_CHECK_LIST = "/pda/Inbound/getWaitCheckList";
  95. //获取产品列表
  96. public static final String FMS_GET_PRODUCTS = "/pda/Inbound/getProducts";
  97. //获取商品列表
  98. public static final String FMS_GET_PACKAGE_GOODS = "/pda/Inbound/getPackageGoods";
  99. public static final String FMS_CHECK_OUTBOUND = "/pda/Outbound/checkOutbound";
  100. //查验货物
  101. public static final String FMS_FINISH_CHECK = "/pda/Inbound/finishCheck";
  102. //
  103. public static final String FMS_GET_ISSUE_LIST = "/pda/Inbound/getIssueList";
  104. //获取完成
  105. public static final String FMS_ADD_STORAGE = "/pda/Outbound/storage";
  106. //获取完成
  107. public static final String FMS_FINISH_STORAGE = "/pda/Outbound/finishStorage";
  108. //撤销装柜
  109. public static final String FMS_CANCEL_STORAGE = "/pda/Outbound/cancelStorage";
  110. //检查单号信息
  111. public static final String FMS_OUTBOUND_CHECK_ORDER = "/pda/Outbound/checkOrder";
  112. //
  113. public static final String FMS_GET_OUTBOUND_INFO = "/pda/Outbound/getOutboundCount";
  114. public static final String FMS_OUTBOUND_DETAIL = "/pda/Outbound/getOutboundDetail";
  115. public static final String FMS_UPLOAD_SIGN = "/pda/User/uploadSign";
  116. //获取搬运小组
  117. public static final String FMS_LOCATION_LIST = "/pda/Inbound/getPutAwayLocation";
  118. }