| | |
| | | .observeOn(Schedulers.io()).subscribe(inspectionBean -> { |
| | | fragment.mInspectionBean = inspectionBean; |
| | | // 查询当前未关闭的巡检记录下所有的坐标 |
| | | DaoSingleton.getAsynchInstance(fragment.getContext()).inspectionLocationDao().findByInspectId(inspectionBean.getmInspectId()).subscribeOn(Schedulers.io()) |
| | | DaoSingleton.getAsynchInstance(fragment.getContext()).inspectionLocationDao().findBymInspectId(inspectionBean.getmInspectId()).subscribeOn(Schedulers.io()) |
| | | .observeOn(AndroidSchedulers.mainThread()).subscribe(inspectionLocationBeans -> { |
| | | fragment.aginShowLocation(inspectionLocationBeans); |
| | | }); |
| | |
| | | .subscribe(strings -> { |
| | | //循环查询所有id |
| | | for (String data : strings) { |
| | | DaoSingleton.getAsynchInstance(context).inspectionDao().findBymInspectId(data) |
| | | .subscribeOn(Schedulers.io()) |
| | | .observeOn(Schedulers.io()) |
| | | .subscribe(inspectionBeans -> { |
| | | DaoSingleton.getAsynchInstance(context).inspectionLocationDao().findByNoPostAndInspectId(data) |
| | | .subscribeOn(Schedulers.io()) |
| | | .observeOn(Schedulers.io()) |
| | | .subscribe(inspectionLocationBeans -> { |
| | | if (inspectionLocationBeans != null && inspectionLocationBeans.size() > 0) { |
| | | postInspectionData(context, inspectionBeans, inspectionLocationBeans); |
| | | } |
| | | }); |
| | | }); |
| | | if (!TextUtils.isEmpty(data)) { |
| | | DaoSingleton.getAsynchInstance(context).inspectionDao().findBymInspectId(data) |
| | | .subscribeOn(Schedulers.io()) |
| | | .observeOn(Schedulers.io()) |
| | | .subscribe(inspectionBeans -> { |
| | | DaoSingleton.getAsynchInstance(context).inspectionLocationDao().findByNoPostAndInspectId(data) |
| | | .subscribeOn(Schedulers.io()) |
| | | .observeOn(Schedulers.io()) |
| | | .subscribe(inspectionLocationBeans -> { |
| | | if (inspectionLocationBeans != null && inspectionLocationBeans.size() > 0) { |
| | | postInspectionData(context, inspectionBeans, inspectionLocationBeans); |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | }); |