瀏覽代碼

注销 - ETC设备 - fixed 2 - 指令执行失败

GZBranch
wufasong 18 小時之前
父節點
當前提交
4076977f53

+ 2
- 14
app/src/main/java/com/huntersun/vkyes/etcopencard/project/ui/activity/after/LogoutEtcStep3Activity.java 查看文件

Log.i(this.getClass().getSimpleName(), "指令总数: " + len); Log.i(this.getClass().getSimpleName(), "指令总数: " + len);
// 逐条执行指令
// 逐条执行指令,先收集所有结果
for (int i = 0; i < len; i++) { for (int i = 0; i < len; i++) {
Log.i(this.getClass().getSimpleName(), "执行第 " + (i + 1) + " 条指令: " + commands_arry[i]); Log.i(this.getClass().getSimpleName(), "执行第 " + (i + 1) + " 条指令: " + commands_arry[i]);
results[i] = resp_string.getServiceInfo(); results[i] = resp_string.getServiceInfo();
Log.i(this.getClass().getSimpleName(), "第 " + (i + 1) + " 条指令执行结果: " + results[i] + ", 状态码: " + resp_string.getServiceCode()); Log.i(this.getClass().getSimpleName(), "第 " + (i + 1) + " 条指令执行结果: " + results[i] + ", 状态码: " + resp_string.getServiceCode());
// 检查指令是否执行成功
if (resp_string.getServiceCode() != 0) {
Log.e(this.getClass().getSimpleName(), "第 " + (i + 1) + " 条指令执行失败,状态码: " + resp_string.getServiceCode());
throw new RuntimeException("第 " + (i + 1) + " 条指令执行失败,状态码: " + resp_string.getServiceCode());
}
} }
// 拼接结果 // 拼接结果
Log.i(this.getClass().getSimpleName(), "指令总数: " + len); Log.i(this.getClass().getSimpleName(), "指令总数: " + len);
// 逐条执行指令
// 逐条执行指令,先收集所有结果
for (int i = 0; i < len; i++) { for (int i = 0; i < len; i++) {
Log.i(this.getClass().getSimpleName(), "执行第 " + (i + 1) + " 条指令: " + commands_arry[i]); Log.i(this.getClass().getSimpleName(), "执行第 " + (i + 1) + " 条指令: " + commands_arry[i]);
results[i] = resp_string.getServiceInfo(); results[i] = resp_string.getServiceInfo();
Log.i(this.getClass().getSimpleName(), "第 " + (i + 1) + " 条指令执行结果: " + results[i] + ", 状态码: " + resp_string.getServiceCode()); Log.i(this.getClass().getSimpleName(), "第 " + (i + 1) + " 条指令执行结果: " + results[i] + ", 状态码: " + resp_string.getServiceCode());
// 检查指令是否执行成功
if (resp_string.getServiceCode() != 0) {
Log.e(this.getClass().getSimpleName(), "第 " + (i + 1) + " 条指令执行失败,状态码: " + resp_string.getServiceCode());
throw new RuntimeException("第 " + (i + 1) + " 条指令执行失败,状态码: " + resp_string.getServiceCode());
}
} }
// 拼接结果 // 拼接结果

Loading…
取消
儲存