mac
2024-06-05 31de722a45e886eae89cfea2f1740c1f4d3b0216
app/src/main/java/com/hdl/photovoltaic/ui/newC/PowerStationsListEdit.java
@@ -65,7 +65,7 @@
    private void initEvent() {
        //返回按钮
        viewBinding.toolbarTopFragmentHouseListRl.topBackBtn.setOnClickListener(new View.OnClickListener() {
        viewBinding.toolbarTopFragmentHouseListRl.topBackLl.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (!is_edit) {
@@ -108,9 +108,13 @@
            houseListAdapter.setMoveOnclickListener(new HouseListAdapter.OnMoveClickListener() {
                @Override
                public void onMoveClick(int position, HouseIdBean houseIdBean) {
                    if (position == 0) {
                        HdlThreadLogic.toast(_mActivity, getString(R.string.already_the_first_one));
                        return;
                    }
                    String frontHomeId = "";
                    if (position > 0) {
                        frontHomeId = houseListBeanIDList.get(position - 1).getHomeId();
                    if (position > 1) {
                        frontHomeId = houseListBeanIDList.get(position - 2).getHomeId();
                    }
                    HdlResidenceLogic.getInstance().moveResidence(houseIdBean.getHomeId(), frontHomeId, new CloudCallBeak<Boolean>() {
                        @Override
@@ -118,6 +122,7 @@
                            //移动电站位置
                            HdlResidenceLogic.getInstance().moveHouseId(houseIdBean.getHomeId());
                            initData();//初始化缓存数据
                            setAllItemEdit(is_edit);
                            houseListAdapter.setList(houseListBeanIDList);//重新刷新列表
                            nullDataUpdateUi(houseListBeanIDList);//检测数据是否为空
                        }
@@ -153,7 +158,7 @@
    private void initView() {
        viewBinding.toolbarTopFragmentHouseListRl.getRoot().setBackgroundColor(getColor(R.color.text_FFFFFFFF));
        viewBinding.toolbarTopFragmentHouseListRl.topBackBtn.setVisibility(View.VISIBLE);
        viewBinding.toolbarTopFragmentHouseListRl.topBackLl.setVisibility(View.VISIBLE);
        viewBinding.toolbarTopFragmentHouseListRl.topLeftIv.setImageResource(R.drawable.back_c);
        viewBinding.toolbarTopFragmentHouseListRl.topTitleTv.setText(R.string.power_station_selection);
        viewBinding.toolbarTopFragmentHouseListRl.topMoreBtn.setVisibility(View.VISIBLE);
@@ -256,7 +261,7 @@
                JsonObject jsonObject = new JsonObject();
                jsonObject.addProperty("homeId", houseIdBean.getHomeId());
                jsonObject.addProperty("homeName", houseIdBean.getHomeName());
                jsonObject.addProperty("powerStationStatus", houseIdBean.getPowerStationStatus());
                jsonObject.addProperty("powerStationStatus", houseIdBean.getPowerStationStatus() + "");
                HDLUniMP.UniCallBackBaseBean uniCallBackBaseBean = new HDLUniMP.UniCallBackBaseBean();
                uniCallBackBaseBean.setType(HDLUniMP.UNI_EVENT_NOTIFICATION_DEVICE_REFRESH_DETAILS);
                uniCallBackBaseBean.setData(jsonObject);