Admin
2021-04-12 7cdd460ba0184db1defe20e96db42358abcd8957
basesdat
1个文件已修改
42 ■■■■■ 已修改文件
app/src/main/java/safeluck/drive/evaluation/fragment/BaseDatasFragment.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/safeluck/drive/evaluation/fragment/BaseDatasFragment.java
@@ -162,6 +162,7 @@
                                        while (iterator.hasNext()){
                                            Map.Entry<BaseDataUIBean.TYPE_,MapInfoHead>entry = iterator.next();
                                            MapInfoHead mapInfoHead = entry.getValue();
                                            BaseDataUIBean.TYPE_ key = entry.getKey();
                                            Log.i(TAG,"key= " + entry.getKey() + " and value= " + entry.getValue());
                                            if (mapInfoHead!=null){
                                                String str = mapInfoHead.getStr();
@@ -170,20 +171,23 @@
                                                            entry.getKey()== BaseDataUIBean.TYPE_.car?"更新车辆模型":(entry.getKey()== BaseDataUIBean.TYPE_.road?"更新道路地图":"更新场地地图")
                                                            ,1, entry.getKey()));
                                                    if (str.contains("失败")){
                                                        showMannualMapCar();
                                                        showMannualMapCar(key);
                                                    }
                                                }else{
                                                    showMannualMapCar();
                                                    Log.i(TAG,"TextUtils.isEmpty(str)");
                                                    showMannualMapCar(key);
                                                }
                                            }else{
                                                showMannualMapCar();
                                                Log.i(TAG,"mapInfoHead == null");
                                                showMannualMapCar(key);
                                            }
                                        }
                                    }else{
                                        showMannualMapCar();
                                        Log.i(TAG,"hashMaps == null");
                                        showMannualMapCar(null);
                                    }
                                    gpsInfoAdapter.addAll(datas);
@@ -197,19 +201,31 @@
        }
    };
    private void showMannualMapCar() {
    private void showMannualMapCar(BaseDataUIBean.TYPE_ key) {
        String roadMapPath = ExamPlatformData.getInstance().getRoadMapPath();
        String MapPath = ExamPlatformData.getInstance().getMapPath();
        String carModelPath = ExamPlatformData.getInstance().getCarModelPath();
        if (!TextUtils.isEmpty(roadMapPath)){
            datas.add(new BaseDataUIBean(str2SpannableString("手动设置道路  "),R.mipmap.platform_pic,str2FouregourdSpannableString(roadMapPath),"",1,null));
        if (key == null){
            if (!TextUtils.isEmpty(roadMapPath)){
                datas.add(new BaseDataUIBean(str2SpannableString("手动设置道路  "),R.mipmap.platform_pic,str2FouregourdSpannableString(roadMapPath),"",1,null));
            }
            if (!TextUtils.isEmpty(MapPath)){
                datas.add(new BaseDataUIBean(str2SpannableString("手动设置场地  "),R.mipmap.platform_pic,str2FouregourdSpannableString(MapPath),"",1,null));
            }
            if (!TextUtils.isEmpty(carModelPath)){
                datas.add(new BaseDataUIBean(str2SpannableString("手动设置车辆  "),R.mipmap.platform_pic,str2FouregourdSpannableString(carModelPath),"",1,null));
            }
        }else{
            if (key == BaseDataUIBean.TYPE_.car){
                datas.add(new BaseDataUIBean(str2SpannableString("手动设置车辆  "),R.mipmap.platform_pic,str2FouregourdSpannableString(carModelPath),"",1,null));
            }   if (key == BaseDataUIBean.TYPE_.road){
                datas.add(new BaseDataUIBean(str2SpannableString("手动设置道路  "),R.mipmap.platform_pic,str2FouregourdSpannableString(roadMapPath),"",1,null));
            }   if (key == BaseDataUIBean.TYPE_.yard){
                datas.add(new BaseDataUIBean(str2SpannableString("手动设置场地  "),R.mipmap.platform_pic,str2FouregourdSpannableString(MapPath),"",1,null));
            }
        }
        if (!TextUtils.isEmpty(MapPath)){
            datas.add(new BaseDataUIBean(str2SpannableString("手动设置场地  "),R.mipmap.platform_pic,str2FouregourdSpannableString(MapPath),"",1,null));
        }
        if (!TextUtils.isEmpty(carModelPath)){
            datas.add(new BaseDataUIBean(str2SpannableString("手动设置车辆  "),R.mipmap.platform_pic,str2FouregourdSpannableString(carModelPath),"",1,null));
        }
    }