排程编辑更新

This commit is contained in:
fengjignqi
2026-05-26 17:41:27 +08:00
parent 9ab6d134ab
commit f2b8062398
5 changed files with 23 additions and 42 deletions

View File

@@ -42,10 +42,10 @@ public class BindDeviceFragment extends BaseFragment<PlanBindDeviceLayoutBinding
@Override
public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
mAdapter.toggleSelection(position);
if(mDeviceList.get(position).getStatusX().equals("0")){
mDeviceList.get(position).setStatusX("1");
if(mDeviceList.get(position).getStatus().equals("0")){
mDeviceList.get(position).setStatus("1");
}else{
mDeviceList.get(position).setStatusX("0");
mDeviceList.get(position).setStatus("0");
}
// syncSelectedDevices();
}

View File

@@ -27,8 +27,8 @@ public class BindDeviceAdapter extends BaseQuickAdapter<WaterDeviceEntity.Device
@Override
protected void convert(BaseViewHolder helper, WaterDeviceEntity.DeviceListBean item) {
CheckBox checkBox = helper.getView(R.id.radio);
helper.setText(R.id.tv_device_name, item.getDeviceNameX());
helper.setText(R.id.tv_device_serial, item.getDeviceSnX());
helper.setText(R.id.tv_device_name, item.getDeviceName());
helper.setText(R.id.tv_device_serial, item.getDeviceSn());
checkBox.setChecked(mSelectedPositions.contains(helper.getLayoutPosition()));
}

View File

@@ -144,13 +144,13 @@ public class WaterPlanImpl implements WaterPlanContract.DataModel{
.subscribeOn(Schedulers.io())
.unsubscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(new Observer<BaseBean<WaterDeviceEntity.DeviceListBean>>() {
.subscribe(new Observer<BaseBean<WaterDeviceEntity>>() {
@Override
public void onSubscribe(@NonNull Disposable d) {
}
@Override
public void onNext(@NonNull BaseBean<WaterDeviceEntity.DeviceListBean> bean) {
public void onNext(@NonNull BaseBean<WaterDeviceEntity> bean) {
if (bean.getCode() == 200) {
callBack.success(bean.getData(),0);
}