装货回单(未测试),添加测试环境要素(安联,e签宝)

This commit is contained in:
lijia 2023-08-30 09:50:22 +08:00
parent c39513ce13
commit 205ea6aab8
10 changed files with 107 additions and 44 deletions

View File

@ -113,13 +113,15 @@ android {
productFlavors {
qa {
manifestPlaceholders = [CHANNEL_VALUE: "好运司机测试"]
buildConfigField("String", "OPEN_API_URL", "\"http://192.168.111.244:4009\"")
buildConfigField("String", "OPEN_AL_URL", "\"https://oapi-staging.alct56.com/api/v1/openapi/\"")
buildConfigField("String", "BASE_URL", "\"http://app.test.dahehuoyun.com/api/\"")
buildConfigField "boolean", "isTest", "true"
}
product {
manifestPlaceholders = [CHANNEL_VALUE: "大河好运司机"]
buildConfigField("String", "OPEN_API_URL", "\"https://oapi.alct56.com\"")
buildConfigField("String", "OPEN_AL_URL", "\"https://oapi.alct56.com\"")
buildConfigField("String", "BASE_URL", "\"http://app.dahehuoyun.com/api/\"")
buildConfigField "boolean", "isTest", "false"
}
}

View File

@ -57,7 +57,7 @@ public class App extends Application {
//安联初始化
if (context.getPackageName().equals(getCurrentProcessName(context))) {
//Log.e("--使用的测试环境--",BuildConfig.OPEN_API_URL);
MDPLocationCollectionManager.initialize(this, "https://oapi.alct56.com");
MDPLocationCollectionManager.initialize(this, BuildConfig.OPEN_AL_URL);
}
//在使用SDK各组件之前初始化context信息传入ApplicationContext
// 路由初始化

View File

@ -226,24 +226,24 @@ public class H5Activity extends AppCompatActivity {
Log.e("test", "要加载的地址:" + uri.getScheme() + " " + url + " ");
if (url.contains("callback")) {
// 实名认证结束 返回按钮/倒计时返回/暂不认证
boolean status = uri.getBooleanQueryParameter("passed", false);
if (status) {
new Handler().postDelayed(() -> {
FaceEvent he = new FaceEvent("刷脸成功");
EventBus.getDefault().post(he);
finish();
}, 4000);
}else{
if (mWebView.canGoBack()) {
mWebView.goBack();
}
Toast.makeText(H5Activity.this, "认证失败,请重新刷脸认证", Toast.LENGTH_SHORT).show();
}
return true;
}
// if (url.contains("callback")) {
// // 实名认证结束 返回按钮/倒计时返回/暂不认证
// boolean status = uri.getBooleanQueryParameter("passed", false);
// if (status) {
//
// new Handler().postDelayed(() -> {
// FaceEvent he = new FaceEvent("刷脸成功");
// EventBus.getDefault().post(he);
// finish();
// }, 4000);
// }else{
// if (mWebView.canGoBack()) {
// mWebView.goBack();
// }
// Toast.makeText(H5Activity.this, "认证失败,请重新刷脸认证", Toast.LENGTH_SHORT).show();
// }
// return true;
// }
if (uri.getScheme().equals("http") || uri.getScheme().equals("https")) {
view.loadUrl(url);
@ -312,6 +312,9 @@ public class H5Activity extends AppCompatActivity {
} else {
String tsignCode = uri.getQueryParameter("tsignCode");
if ("0".equals(tsignCode)) {
FaceEvent he = new FaceEvent("刷脸成功");
EventBus.getDefault().post(he);
finish();
tsignCode = "签署成功";
} else {
tsignCode = "签署失败";

View File

@ -0,0 +1,48 @@
package com.arpa.hndahesudintocctmsdriver.constant;
/**
* @ClassName HYConstant
* @Author 用户
* @Date 2023/8/29 09:32
* @Description TODO
*/
public class HYConstant {
//-------------安联---------------start
//企业代码
private static final String ENTERPRISE_CODE="E0019169";
//企业app的身份码
private static final String APP_IDENTITY="b4a472a025e443b383970cdd5465552e";
//企业app验证码
private static final String APP_KEY="b948efbb4c2a4ba0805c534f2fba0c89";
//企业代码-测试
private static final String ENTERPRISE_CODE_TEXT="E0019093";
//企业app的身份码-测试
private static final String APP_IDENTITY_TEXT="a15b4ba5bd2542cc9a6bea9bdadf9ef9";
//企业app验证码-测试
private static final String APP_KEY_TEXT="07a6256cad5642138ed6e962a5a157be";
//-------------安联---------------end
//-------------交通厅---------------start
public final static String JTT_DATA_NAME="jtt_data";
public final static String JTT_DATA_JTTORDER_KEY="JTT_order_key";
public final static String JTT_DATA_ORDER_KEY="order_key";
//-------------交通厅---------------end
//--------------E签宝--------------start
String key = "19ac0aa74338e487e45057faf7212401";
String license = "HF41uGxM/1i3CtW98DimoA97BlNTAnQ+DiEAihYmZ2jR1jqC4be253joEJbOJgFDIzp5aIoeuXSWWHFaDVfaHL2Pksbq5f8M8EqsVhP9q/i1xGYSYf6MJVlHdMAVLWgR0Kra+n8dVzkSDuZeyJuDsskAmZaGFQN1CqnWYCI1tmV1Tk4A57e9LQMed0U11QWjdshdU2DGqBXKmGE419PdW3NmIxOR2u9iB1OKBmvzCUT8RAYyBzSn/yhU++YJ25g5a8Pb5kOvi+eOh+PEFEcQL6oOp/CF4Iw5nadlsLhc+XEnVJpwL2myZBoSlVcKxrJKbRn1/DIgXBueKKnqhyHKdJlpqI9eghAlRF0p2Q4f23m89mWRZf4nhKzTeXGIjCTFO4TNVucrlGU7tyJcrRCDVdfV24fziH+hB3QGckpuYzzjefr7hZalLRJ/w8dPw/8dCY1wnWq3AJ3zw2g1PzMxl51q7AgdKvwc1ERcGBns0zb8PK6vGKCnJq3uHiJEnslbTI0MEosje+h+OPO7hf2QofErewjI19wHEOv4dTvuFLh3VmGFMObAmov5kI47705fjSxCvAPGATBrfUSwim+5EQ1hanc5IcXe0/nOTiRUNEpZ+x65zVydqAs7490yqQiIUQvPazEwcal7vH2OD54lCcgpxKxqdmGc5/bp5UnqB45+n+iuInV/Q9DMOQVk15uaVZmhS8VaCqH21CmfH/ZGLb9wiEpaRLrPZLKX3bK7MT9Z0/OlDnb2QUKU8LMMIhLuQQntzsf0Wn4kA/0e9QAJJQ==";
//-------------E签宝---------------end
//--------------交通厅--------------start
private final static String APPID="com.arpa.hndahesudintocctmsdriver";
private final static String APP_SECURITY="01e20fc6585a42738ac88a12321dc41bff473b4b20184aacbbcee7d7864359a6";
private final static String CODE="41110447";
private final static String ENVIRONMENT="release";
//-------------交通厅---------------end
}

View File

@ -9,6 +9,7 @@ import com.alct.mdp.callback.OnDownloadResultListener;
import com.alct.mdp.callback.OnResultListener;
import com.alct.mdp.model.Identity;
import com.arpa.hndahesudintocctmsdriver.App;
import com.arpa.hndahesudintocctmsdriver.BuildConfig;
import com.arpa.hndahesudintocctmsdriver.parts.AuthParts;
import com.arpa.hndahesudintocctmsdriver.util.MessageUtils;
import com.arpa.hndahesudintocctmsdriver.util.msg.MsgUtil;
@ -31,15 +32,23 @@ public class ALProcess {
//企业app验证码
private static final String APP_KEY="b948efbb4c2a4ba0805c534f2fba0c89";
//企业代码-测试
private static final String ENTERPRISE_CODE_TEXT="E0019093";
//企业app的身份码-测试
private static final String APP_IDENTITY_TEXT="07a6256cad5642138ed6e962a5a157be";
//企业app验证码-测试
private static final String APP_KEY_TEXT="a15b4ba5bd2542cc9a6bea9bdadf9ef9";
public static void verification(Context con){
DriverAuthDataBean auth= AuthParts.getAuth(con);
Identity idy=new Identity();
//企业代码
idy.setEnterpriseCode(ENTERPRISE_CODE);
idy.setEnterpriseCode(BuildConfig.isTest?ENTERPRISE_CODE_TEXT:ENTERPRISE_CODE);
//企业app的身份码
idy.setAppIdentity(APP_IDENTITY);
idy.setAppIdentity(BuildConfig.isTest?APP_IDENTITY_TEXT:APP_IDENTITY);
//企业app验证码
idy.setAppKey(APP_KEY);
idy.setAppKey(BuildConfig.isTest?APP_KEY_TEXT:APP_KEY);
//司机身份证
idy.setDriverIdentity(auth.getData().getIdcard());
//idy.setDriverIdentity("410725198311042012");
@ -82,7 +91,7 @@ public class ALProcess {
public static void applyFq(Context con,FqBean fb){
for (FqBean.Invoice driverInvoice : fb.getDriverInvoices()) {
MDPLocationCollectionManager.confirmInvoice(con, ENTERPRISE_CODE, driverInvoice.getDriverInvoiceCode(), new OnResultListener() {
MDPLocationCollectionManager.confirmInvoice(con, BuildConfig.isTest?ENTERPRISE_CODE_TEXT:ENTERPRISE_CODE, driverInvoice.getDriverInvoiceCode(), new OnResultListener() {
@Override
public void onSuccess() {
@ -103,7 +112,7 @@ public class ALProcess {
// @param enterpriseCode 企业号
// @param nfcId NFC id
// @param listener 回调函数
MDPLocationCollectionManager.checkNfc(con, shipmentCode,ENTERPRISE_CODE, nfcId, new OnResultListener() {
MDPLocationCollectionManager.checkNfc(con, shipmentCode,ENTERPRISE_CODE, nfcId, new OnResultListener() {
@Override
public void onSuccess() {
@ -121,18 +130,17 @@ public class ALProcess {
DriverAuthDataBean auth= AuthParts.getAuth(con);
Identity idy=new Identity();
//企业代码
idy.setEnterpriseCode(ENTERPRISE_CODE);
idy.setEnterpriseCode(BuildConfig.isTest?ENTERPRISE_CODE_TEXT:ENTERPRISE_CODE);
//企业app的身份码
idy.setAppIdentity(APP_IDENTITY);
idy.setAppIdentity(BuildConfig.isTest?APP_IDENTITY_TEXT:APP_IDENTITY);
//企业app验证码
idy.setAppKey(APP_KEY);
idy.setAppKey(BuildConfig.isTest?APP_KEY_TEXT:APP_KEY);
//司机身份证
idy.setDriverIdentity(auth.getData().getIdcard());
//idy.setDriverIdentity("410725198311042012");
MDPLocationCollectionManager.register(con, idy, new OnResultListener() {
@Override
public void onSuccess() {
MsgUtil.addHdMsgWatBody(hd, 1111,"认证成功");
Log.e("--success--","验证成功");
getFq(con);
}
@ -141,7 +149,7 @@ public class ALProcess {
public void onFailure(java.lang.String s, java.lang.String s1) {
Log.e("--error--",s+s1+"");
MsgUtil.addHdMsgWatBody(hd, 2222,s1);
new MessageUtils().showCenMessage(con,s1);
// new MessageUtils().showCenMessage(con,s1);
}
});
}

View File

@ -253,7 +253,7 @@ public class AuthQualificationActivity extends BaseAppCompatActivity {
if (!"".equals(id) && !"".equals(date) && !"".equals(url)) {
new AuthRequest().driverAuthQualification(con, hd, id, ub.getData().getId(), date);
} else {
Toast.makeText(con, "提交信息不完整", Toast.LENGTH_SHORT).show();
Toast.makeText(con, "请补充证件信息", Toast.LENGTH_SHORT).show();
}
} else {
if (!"".equals(url)) {

View File

@ -394,7 +394,7 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
case 2:
String s = value1.getText().toString();
if (TextUtils.isEmpty(s)) {
Toast.makeText(this, "完善证号", Toast.LENGTH_SHORT).show();
Toast.makeText(this, "补充证件信息", Toast.LENGTH_SHORT).show();
return;
}
new AuthRequest().saveCarRegisterNo(con,hd,carId,s);
@ -402,7 +402,7 @@ public class PhotoCarActivity extends BaseAppCompatActivity implements View.OnCl
case 3:
String s1 = value1.getText().toString();
if (TextUtils.isEmpty(s1)) {
Toast.makeText(this, "完善证号", Toast.LENGTH_SHORT).show();
Toast.makeText(this, "补充证件信息", Toast.LENGTH_SHORT).show();
return;
}
new AuthRequest().saveCarRoadLicenseNo(con,hd,carId,s1);

View File

@ -359,12 +359,16 @@ public class StartYunDanActivity extends BaseActivity {
Toast.makeText(con,"您还没有装货",Toast.LENGTH_SHORT).show();
}
}else if(sdw.getStatus()==1){//装货回单
Intent in=new Intent(con, ShangChuangImgActivity.class);
in.putExtra("type",2);
in.putExtra("wid",wid);
in.putExtra("h_type",type);
in.putExtra("sob",gson.toJson(sob));
startActivity(in);
if(type==0){
Intent in=new Intent(con, ShangChuangImgActivity.class);
in.putExtra("type",2);
in.putExtra("wid",wid);
in.putExtra("h_type",type);
in.putExtra("sob",gson.toJson(sob));
startActivity(in);
}else{
Toast.makeText(con,"您还没有上传回单信息",Toast.LENGTH_SHORT).show();
}
}else if(sdw.getStatus()==2){//上传收货单(卸货回单)
Intent in=new Intent(con, ShangChuangImgActivity.class);
in.putExtra("type",2);

View File

@ -185,9 +185,6 @@ public class ShangChuangImgActivity extends BaseAppCompatActivity {
// if(index==1 || index==2){
// new OCRRequest().OCRPlateLicense(con,hd,new File(path));
// }
// TODO: 2023/8/17 临时注释处理车牌号识别
// hyr.uploadFile(new File(path));
if (index == 0 || index == 1) {//装卸货车辆需要识别车牌号
new OCRRequest().OCRCarPlateLicense(con, hd, new File(path));
} else {

View File

@ -29,6 +29,7 @@ import androidx.cardview.widget.CardView;
import androidx.core.app.ActivityCompat;
import com.alct.mdp.MDPLocationCollectionManager;
import com.arpa.hndahesudintocctmsdriver.BuildConfig;
import com.arpa.hndahesudintocctmsdriver.bean.ImageConfig;
import com.arpa.hndahesudintocctmsdriver.parts.ConfigParts;
import com.arpa.hndahesudintocctmsdriver.report.JTTProcess;
@ -326,7 +327,7 @@ public class WelcomeActivity extends BaseAppCompatActivity {
//安联初始化
if (context.getPackageName().equals(getCurrentProcessName(context))) {
//Log.e("--使用的测试环境--",BuildConfig.OPEN_API_URL);
MDPLocationCollectionManager.initialize(getApplicationContext(), "https://oapi.alct56.com");
MDPLocationCollectionManager.initialize(getApplicationContext(), BuildConfig.OPEN_AL_URL);
}
//在使用SDK各组件之前初始化context信息传入ApplicationContext
// 路由初始化