* 生产环境 | * 生产环境 | ||||
*/ | */ | ||||
public static final String Urls = "https://qtzl.etcjz.cn"; | public static final String Urls = "https://qtzl.etcjz.cn"; | ||||
private String YDBaseUrl = "https://testydfw.etcjz.cn/";//异地测试环境 | |||||
// private String BaseUrl = "https://qtzl.etcjz.cn" + "/api/"; | |||||
private String BaseUrl = "https://qtzl.etcjz.cn" + "/dev/api/"; //111中台地址 | |||||
// private String YDBaseUrl = "https://testydfw.etcjz.cn/";//异地测试环境 | |||||
private String YDBaseUrl = "https://ydfw.etcjz.cn/";//异地测试环境 xzpt/ | |||||
private String BaseUrl = "https://qtzl.etcjz.cn" + "/api/"; | |||||
// private String BaseUrl = "https://qtzl.etcjz.cn" + "/dev/api/"; //111中台地址 | |||||
public static final String URL_DOWNLOAD_FILE = "https://qtzl.etcjz.cn/default-bucket/";//通行流水下载路径前缀 | public static final String URL_DOWNLOAD_FILE = "https://qtzl.etcjz.cn/default-bucket/";//通行流水下载路径前缀 | ||||
public static final String URL_APP_IMG = "https://qtzl.etcjz.cn";//APP图标路径前缀 | public static final String URL_APP_IMG = "https://qtzl.etcjz.cn";//APP图标路径前缀 | ||||
HashMap<String, String> params = new HashMap<>(); | HashMap<String, String> params = new HashMap<>(); | ||||
params.put("filename", YdCode.YDCODE_LOGIN); | params.put("filename", YdCode.YDCODE_LOGIN); | ||||
params.put("account", "14268812305"); | params.put("account", "14268812305"); | ||||
params.put("password", MD5Utils.ToMD5("14268812305S@8iWfr3")); | |||||
params.put("password", MD5Utils.ToMD5("14268812305wxnw@Aid_z982")); | |||||
MyRetrofit.ydNewInstance(YDPlatformLoginActivity.this, true, "", params, new MyRetrofit.ReturnResult() { | MyRetrofit.ydNewInstance(YDPlatformLoginActivity.this, true, "", params, new MyRetrofit.ReturnResult() { | ||||
@Override | @Override | ||||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | ||||
intent.putExtra("userType", getIntent().getStringExtra("userType"));//1个人 2单位 | intent.putExtra("userType", getIntent().getStringExtra("userType"));//1个人 2单位 | ||||
// intent.putExtra("productId", getIntent().getStringExtra("productId")); | // intent.putExtra("productId", getIntent().getStringExtra("productId")); | ||||
if ("1".equals(getIntent().getStringExtra("type"))){//写死的产品,上线需要改掉 | if ("1".equals(getIntent().getStringExtra("type"))){//写死的产品,上线需要改掉 | ||||
intent.putExtra("productId","520101000000000000002"); | |||||
intent.putExtra("productId","520101130000700000004"); | |||||
}else if ("2".equals(getIntent().getStringExtra("type"))){ | }else if ("2".equals(getIntent().getStringExtra("type"))){ | ||||
intent.putExtra("productId","520101110000060000016"); | |||||
intent.putExtra("productId","520101110000060000013"); | |||||
} | } | ||||
startActivity(intent); | startActivity(intent); | ||||
} else{ | } else{ |
if (bluetoothName.contains("JY")) { | if (bluetoothName.contains("JY")) { | ||||
//开始链接蓝牙设备d | //开始链接蓝牙设备d | ||||
mObuInterface.connectDevice(list.get(position) + "", mOnConnectCallback); | mObuInterface.connectDevice(list.get(position) + "", mOnConnectCallback); | ||||
} else if (bluetoothName.contains("CTSK")) { | |||||
} else if (bluetoothName.contains("CTSK") || bluetoothName.contains("JL")) { | |||||
mDialog.show(); | mDialog.show(); | ||||
new ConnectDeviceThread(list.get(position)).start(); | new ConnectDeviceThread(list.get(position)).start(); | ||||
} | } |
HashMap<String,String> params = new HashMap<>(); | HashMap<String,String> params = new HashMap<>(); | ||||
params.put("filename", YdCode.YDCODE_LOGIN); | params.put("filename", YdCode.YDCODE_LOGIN); | ||||
params.put("account","14268812305"); | params.put("account","14268812305"); | ||||
params.put("password", MD5Utils.ToMD5("14268812305S@8iWfr3")); | |||||
params.put("password", MD5Utils.ToMD5("14268812305wxnw@Aid_z982")); | |||||
MyRetrofit.ydNewInstance(true,"", params, new MyRetrofit.ReturnResult() { | MyRetrofit.ydNewInstance(true,"", params, new MyRetrofit.ReturnResult() { | ||||
@Override | @Override | ||||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { |
params.put("serviceType",serviceType); | params.put("serviceType",serviceType); | ||||
} | } | ||||
params.put("jobNum", MyShared.getInstance().get(MyShared.STAFFID,"")+""); | params.put("jobNum", MyShared.getInstance().get(MyShared.STAFFID,"")+""); | ||||
MyRetrofit.newInstance(getActivity(),IFCode.IFCODE_PERFORMANCE_QUERY, params, new MyRetrofit.ReturnResult() { | |||||
@Override | |||||
public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||||
if (bizContent.getData().size()>0&&yjlist.size()<Integer.parseInt(bizContent.totalCount)){ | |||||
yjlist.addAll(bizContent.getData()); | |||||
adapter.replaceData(yjlist); | |||||
showComplete(); | |||||
}else { | |||||
if (yjlist.size()>0){ | |||||
showComplete(); | |||||
}else { | |||||
showEmpty(); | |||||
} | |||||
} | |||||
} | |||||
@Override | |||||
public void onError(Response<Result> resp) { | |||||
MyRetrofit.ReturnResult.super.onError(resp); | |||||
if (yjlist.size()>0){ | |||||
showComplete(); | |||||
}else { | |||||
showEmpty(); | |||||
} | |||||
} | |||||
}); | |||||
// MyRetrofit.newInstance(getActivity(),IFCode.IFCODE_PERFORMANCE_QUERY, params, new MyRetrofit.ReturnResult() { | |||||
// @Override | |||||
// public void onSuccess(ResultBean resultBean, ResultBean.BizContent bizContent) { | |||||
// if (bizContent.getData().size()>0&&yjlist.size()<Integer.parseInt(bizContent.totalCount)){ | |||||
// yjlist.addAll(bizContent.getData()); | |||||
// adapter.replaceData(yjlist); | |||||
// showComplete(); | |||||
// }else { | |||||
// if (yjlist.size()>0){ | |||||
// showComplete(); | |||||
// }else { | |||||
// showEmpty(); | |||||
// } | |||||
// } | |||||
// } | |||||
// | |||||
// @Override | |||||
// public void onError(Response<Result> resp) { | |||||
// MyRetrofit.ReturnResult.super.onError(resp); | |||||
// if (yjlist.size()>0){ | |||||
// showComplete(); | |||||
// }else { | |||||
// showEmpty(); | |||||
// } | |||||
// } | |||||
// }); | |||||
} | } | ||||
BaseQuickAdapter<ResultBean.BizContent, BaseViewHolder> adapter = new BaseQuickAdapter<ResultBean.BizContent, BaseViewHolder>(R.layout.item_performance_layout) { | BaseQuickAdapter<ResultBean.BizContent, BaseViewHolder> adapter = new BaseQuickAdapter<ResultBean.BizContent, BaseViewHolder>(R.layout.item_performance_layout) { |