|
|
@@ -58,6 +58,7 @@ public class StartStopEtcActivity extends AppActivity { |
|
|
|
|
|
|
|
@Override |
|
|
|
protected void initView() { |
|
|
|
// 初始隐藏搜索结果区域,等待查询完成后显示 |
|
|
|
binding.LLSearchResult.setVisibility(View.GONE); |
|
|
|
binding.LLBottom.setVisibility(View.GONE); |
|
|
|
|
|
|
@@ -142,6 +143,8 @@ public class StartStopEtcActivity extends AppActivity { |
|
|
|
|
|
|
|
// 解析响应数据 |
|
|
|
VehicleQueryDeviceResponse response = parseVehicleQueryDeviceResponse(resultBean); |
|
|
|
|
|
|
|
LogUtils.i("车辆设备查询", "解析响应数据 response: " + new Gson().toJson(response)); |
|
|
|
|
|
|
|
if (response.getCode() == 0 && response.getData() != null) { |
|
|
|
// 成功,显示车辆详细信息 |
|
|
@@ -182,6 +185,8 @@ public class StartStopEtcActivity extends AppActivity { |
|
|
|
* 显示车辆详细信息 |
|
|
|
*/ |
|
|
|
private void showVehicleDetailInfo(VehicleQueryDeviceResponse.VehicleQueryDeviceData vehicleData) { |
|
|
|
LogUtils.i("显示车辆详情", "开始转换数据,原始数据: " + new Gson().toJson(vehicleData)); |
|
|
|
|
|
|
|
// 将响应数据转换为BizContent格式 |
|
|
|
curBizContent = new ResultBean.BizContent(); |
|
|
|
curBizContent.setName(vehicleData.getCustomerName()); |
|
|
@@ -197,26 +202,60 @@ public class StartStopEtcActivity extends AppActivity { |
|
|
|
curBizContent.setObuId(vehicleData.getObuId()); |
|
|
|
curBizContent.setObuStatus(vehicleData.getObuStatus()); |
|
|
|
|
|
|
|
LogUtils.i("显示车辆详情", "数据转换完成,curBizContent: " + new Gson().toJson(curBizContent)); |
|
|
|
LogUtils.i("显示车辆详情", "关键字段检查 - 用户名: " + curBizContent.getName() + |
|
|
|
", 证件号: " + curBizContent.getCustomerIdnum() + |
|
|
|
", 车牌: " + curBizContent.getVehiclePlate() + |
|
|
|
", 卡号: " + curBizContent.getCardId() + |
|
|
|
", OBU号: " + curBizContent.getObuId()); |
|
|
|
|
|
|
|
// 显示数据到界面 |
|
|
|
setDataToView(); |
|
|
|
} |
|
|
|
|
|
|
|
private void setDataToView(){ |
|
|
|
if (curBizContent == null) return; |
|
|
|
if (curBizContent == null) { |
|
|
|
LogUtils.e("显示数据", "curBizContent为null,无法显示数据"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
LogUtils.i("显示数据", "开始显示数据到界面,curBizContent: " + new Gson().toJson(curBizContent)); |
|
|
|
|
|
|
|
// 设置界面可见性 |
|
|
|
LogUtils.i("显示数据", "设置界面可见性 - 显示搜索结果区域"); |
|
|
|
binding.LLSearchResult.setVisibility(View.VISIBLE); |
|
|
|
binding.LLBottom.setVisibility(View.VISIBLE); |
|
|
|
binding.LLCardInfo.setVisibility(View.GONE); |
|
|
|
binding.LLObuInfo.setVisibility(View.GONE); |
|
|
|
|
|
|
|
LogUtils.i("显示数据", "界面可见性设置完成 - LLSearchResult: " + binding.LLSearchResult.getVisibility() + |
|
|
|
", LLBottom: " + binding.LLBottom.getVisibility() + |
|
|
|
", LLCardInfo: " + binding.LLCardInfo.getVisibility() + |
|
|
|
", LLObuInfo: " + binding.LLObuInfo.getVisibility()); |
|
|
|
|
|
|
|
// binding.tvOrderId.setText(curBizContent.getOrderId()); |
|
|
|
binding.tvUserName.setText(FunHelper.isEmpty(curBizContent.getName()) ? "" : curBizContent.getName()); |
|
|
|
binding.tvCardType.setText(FunHelper.isEmpty(curBizContent.idType) ? "" : EnumBean.backValue(curBizContent.idType,EnumBean.ID_TYPE)); |
|
|
|
// binding.tvCardNum.setText(FunHelper.isEmpty(curBizContent.getCustomerIdnum()) ? "" : curBizContent.getCustomerIdnum()); |
|
|
|
binding.tvCardNum.setText(FunHelper.isEmpty(curBizContent.idNum) ? "" : "**************"+curBizContent.idNum.substring(14)); |
|
|
|
binding.tvCardType.setText(FunHelper.isEmpty(curBizContent.getCustomerIdtype()) ? "" : EnumBean.backValue(curBizContent.getCustomerIdtype(),EnumBean.ID_TYPE)); |
|
|
|
binding.tvCardNum.setText(FunHelper.isEmpty(curBizContent.getCustomerIdnum()) ? "" : "**************"+curBizContent.getCustomerIdnum().substring(14)); |
|
|
|
binding.tvVehiclePlate.setText(FunHelper.isEmpty(curBizContent.getVehiclePlate()) ? "" : curBizContent.getVehiclePlate()); |
|
|
|
binding.tvColor.setText(FunHelper.isEmpty(curBizContent.getVehiclePlateColorStr()) ? "" : curBizContent.getVehiclePlateColorStr()); |
|
|
|
binding.tvCarType.setText(FunHelper.isEmpty(curBizContent.getType()) ? "" : EnumBean.backValue(curBizContent.getType(), EnumBean.CAR_TYPE)); |
|
|
|
|
|
|
|
LogUtils.i("显示数据", "基础信息显示完成 - 用户名: " + curBizContent.getName() + |
|
|
|
", 证件类型: " + curBizContent.getCustomerIdtype() + |
|
|
|
", 证件号: " + curBizContent.getCustomerIdnum() + |
|
|
|
", 车牌: " + curBizContent.getVehiclePlate() + |
|
|
|
", 车牌颜色: " + curBizContent.getVehiclePlateColorStr() + |
|
|
|
", 车型: " + curBizContent.getType()); |
|
|
|
|
|
|
|
// 检查界面元素是否正确设置 |
|
|
|
LogUtils.i("显示数据", "界面元素检查 - tvUserName: " + binding.tvUserName.getText() + |
|
|
|
", tvCardType: " + binding.tvCardType.getText() + |
|
|
|
", tvCardNum: " + binding.tvCardNum.getText() + |
|
|
|
", tvVehiclePlate: " + binding.tvVehiclePlate.getText() + |
|
|
|
", tvColor: " + binding.tvColor.getText() + |
|
|
|
", tvCarType: " + binding.tvCarType.getText()); |
|
|
|
|
|
|
|
if ("11".equals(curBizContent.getCardStatus())){//停用状态-需启用 |
|
|
|
binding.btnStart.setEnabled(true); |
|
|
|
binding.btnStop.setEnabled(false); |
|
|
@@ -231,8 +270,12 @@ public class StartStopEtcActivity extends AppActivity { |
|
|
|
if (!FunHelper.isEmpty(curBizContent.getCardId())){ |
|
|
|
binding.LLCardInfo.setVisibility(View.VISIBLE); |
|
|
|
binding.tvCardIdInfo.setText(FunHelper.isEmpty(curBizContent.getCardId()) ? "卡号:" : "卡号:" + curBizContent.getCardId()); |
|
|
|
binding.tvCardTypeInfo.setText(FunHelper.isEmpty(curBizContent.getIsValueCard()) ? "卡类型:" : "卡类型:" + (curBizContent.getIsValueCard().equals("2") ? "记账卡" : "储值卡")); |
|
|
|
binding.tvCardTypeInfo.setText(FunHelper.isEmpty(curBizContent.getIsValueCard()) ? "卡类型:" : "卡类型:" + (curBizContent.getIsValueCard().equals("CHARGE_CARD") ? "记账卡" : "储值卡")); |
|
|
|
binding.tvCardStatusInfo.setText(FunHelper.isEmpty(curBizContent.getCardStatus()) ? "卡状态:" : "卡状态:" + EnumBean.backValue(curBizContent.getCardStatus(), EnumBean.ETC_STATUS)); |
|
|
|
|
|
|
|
LogUtils.i("显示数据", "卡信息显示完成 - 卡号: " + curBizContent.getCardId() + |
|
|
|
", 卡类型: " + curBizContent.getIsValueCard() + |
|
|
|
", 卡状态: " + curBizContent.getCardStatus()); |
|
|
|
} |
|
|
|
|
|
|
|
//显示签信息 |
|
|
@@ -240,6 +283,25 @@ public class StartStopEtcActivity extends AppActivity { |
|
|
|
binding.LLObuInfo.setVisibility(View.VISIBLE); |
|
|
|
binding.tvOBUIdInfo.setText(FunHelper.isEmpty(curBizContent.getObuId()) ? "OBU:" : "OBU:" + curBizContent.getObuId()); |
|
|
|
binding.tvOBUTypeInfo.setText(FunHelper.isEmpty(curBizContent.getObuStatus()) ? "OBU状态:" : "OBU状态:" + EnumBean.backValue(curBizContent.getObuStatus(), EnumBean.OBU_STATUS)); |
|
|
|
|
|
|
|
LogUtils.i("显示数据", "OBU信息显示完成 - OBU号: " + curBizContent.getObuId() + |
|
|
|
", OBU状态: " + curBizContent.getObuStatus()); |
|
|
|
} |
|
|
|
|
|
|
|
LogUtils.i("显示数据", "所有数据显示完成"); |
|
|
|
|
|
|
|
// 强制刷新界面 |
|
|
|
binding.LLSearchResult.invalidate(); |
|
|
|
binding.LLSearchResult.requestLayout(); |
|
|
|
|
|
|
|
LogUtils.i("显示数据", "界面刷新完成,最终状态 - LLSearchResult可见性: " + binding.LLSearchResult.getVisibility() + |
|
|
|
", 内容: " + binding.LLSearchResult.getChildCount() + "个子元素"); |
|
|
|
|
|
|
|
// 验证界面是否正确显示 |
|
|
|
if (binding.LLSearchResult.getVisibility() == View.VISIBLE) { |
|
|
|
LogUtils.i("显示数据", "✅ 搜索结果区域已显示"); |
|
|
|
} else { |
|
|
|
LogUtils.e("显示数据", "❌ 搜索结果区域未显示,当前可见性: " + binding.LLSearchResult.getVisibility()); |
|
|
|
} |
|
|
|
} |
|
|
|
|