| | |
| | | private String agentUrl; |
| | | //当前会话ID |
| | | private String conversationId; |
| | | //电站类型(INV = 逆变器电站;BMS = BMS电站) |
| | | private String powerStationType = "INV "; |
| | | |
| | | public String getAgentUrl() { |
| | | return agentUrl == null ? "" : agentUrl; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 电站类型(INV = 逆变器电站;BMS = BMS电站) |
| | | * @return 电站类型(INV = 逆变器电站;BMS = BMS电站) |
| | | */ |
| | | public String getPowerStationType() { |
| | | return powerStationType; |
| | | } |
| | | |
| | | public void setPowerStationType(String powerStationType) { |
| | | this.powerStationType = powerStationType; |
| | | } |
| | | |
| | | /** |
| | | * uni一级界面的安全距离背景颜色(0=电站详情界面,1=添加电站界面,2=设备调测界面) |
| | | * |
| | | * @return 值 |
| New file |
| | |
| | | package com.hdl.photovoltaic.enums; |
| | | |
| | | public @interface PowerStationType { |
| | | String All = "";//全部 |
| | | String INV = "INV";//逆变器电站 |
| | | String BMS = "BMS";//BMS电站 |
| | | } |
| | |
| | | * @param installedCapacityMax 最大组串容量(装机容量) |
| | | * @param debugStatus 调试状态(全部;调试中;调试完成;已交付;授权调试) |
| | | * @param powerStationStatus 电站状态 (全部 :"";1 : 正常;2 : 离线; 3 : 待接入;4 : 故障) |
| | | * @param powerStationType 电站类型(INV = 逆变器电站;BMS = BMS电站) |
| | | * @param pageNo 页码 |
| | | * @param pageSize 页数(一页多少数据) |
| | | */ |
| | | public void getResidenceIdList(String key, String keyValue, String installedCapacityMin, String installedCapacityMax, String debugStatus, String powerStationStatus, long pageNo, long pageSize, CloudCallBeak<HouseBeanClass> cloudCallBeak) { |
| | | public void getResidenceIdList(String key, String keyValue, String installedCapacityMin, String installedCapacityMax, String debugStatus, String powerStationStatus, String powerStationType, long pageNo, long pageSize, CloudCallBeak<HouseBeanClass> cloudCallBeak) { |
| | | |
| | | String requestUrl = HttpApi.POST_PowerStation_List; |
| | | JsonObject json = new JsonObject(); |
| | |
| | | try { |
| | | int value = Integer.parseInt(powerStationStatus); |
| | | json.addProperty("powerStationStatus", value); |
| | | } catch (Exception ignored) { |
| | | } |
| | | } |
| | | if (!TextUtils.isEmpty(powerStationType)) { |
| | | try { |
| | | json.addProperty("powerStationType", powerStationType); |
| | | } catch (Exception ignored) { |
| | | } |
| | | } |
| | |
| | | * @param debugStatus (调试状态:Debugging = 调试中,WAIT_DELIVERED = 调试完成,Delivered = 已交付,SECONDARY_DEBUGGIN = 授权调试) |
| | | * @param installedCapacityMin 最小组串容量(装机容量) |
| | | * @param installedCapacityMax 最大组串容量(装机容量) |
| | | * @param powerStationType 电站类型(逆变器,BMS) |
| | | */ |
| | | public void getStatusOverview(String debugStatus, String installedCapacityMin, String installedCapacityMax, CloudCallBeak<StatusOverviewBean> cloudCallBeak) { |
| | | public void getStatusOverview(String debugStatus, String installedCapacityMin, String installedCapacityMax,String powerStationType, CloudCallBeak<StatusOverviewBean> cloudCallBeak) { |
| | | String requestUrl = HttpApi.POST_statusOverview; |
| | | JsonObject json = new JsonObject(); |
| | | if (!TextUtils.isEmpty(installedCapacityMin)) { |
| | |
| | | } |
| | | if (!TextUtils.isEmpty(debugStatus)) { |
| | | json.addProperty("debugStatus", debugStatus); |
| | | } |
| | | |
| | | if (!TextUtils.isEmpty(powerStationType)) { |
| | | json.addProperty("powerStationType", powerStationType); |
| | | } |
| | | |
| | | |
| | |
| | | // HdlFileLogic.getInstance().deleteDirectory(HdlFileLogic.getInstance().getCurrentHomeRootPath()); |
| | | //重新设置住宅id |
| | | UserConfigManage.getInstance().setHomeId(houseIdBean.getHomeId()); |
| | | UserConfigManage.getInstance().setPowerStationType(houseIdBean.getPowerStationType()); |
| | | UserConfigManage.getInstance().setHomeName(houseIdBean.getHomeName()); |
| | | //重新设置本地通讯秘钥 |
| | | UserConfigManage.getInstance().setLocalSecret(houseIdBean.getLocalSecret()); |
| | |
| | | }); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | public static class HouseBeanClass { |
| | |
| | | private HouseInfoBean.Location location;//电站地址 |
| | | private String localSecret;//所属电站的本地密钥 |
| | | |
| | | private List<FwVersionBean> fwVersion = new ArrayList<>();//BMS设备才有的固件版本 |
| | | public List<FwVersionBean> getFwVersion() { |
| | | return fwVersion; |
| | | } |
| | | |
| | | public void setFwVersion(List<FwVersionBean> fwVersion) { |
| | | this.fwVersion = fwVersion; |
| | | } |
| | | |
| | | public boolean isActivate() { |
| | | return activate; |
| | | } |
| | |
| | | |
| | | private boolean activate;//是否激活设备(true:激活;false:未激活) |
| | | |
| | | private boolean popUpgrade;//改设备是否有弹窗升级 |
| | | private boolean subPopUpgrade;//下挂设备是否有弹窗升级 |
| | | private boolean popUpgrade;//改设备是否有弹窗升级 |
| | | private boolean subPopUpgrade;//下挂设备是否有弹窗升级 |
| | | |
| | | public boolean isSubPopUpgrade() { |
| | | return subPopUpgrade; |
| | |
| | | } |
| | | |
| | | public String getWorkStatusDesc() { |
| | | return workStatusDesc==null?"":this.workStatusDesc; |
| | | return workStatusDesc == null ? "" : this.workStatusDesc; |
| | | } |
| | | |
| | | public void setWorkStatusDesc(String workStatusDesc) { |
| New file |
| | |
| | | package com.hdl.photovoltaic.ui.bean; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * BMS设备固件版本 |
| | | */ |
| | | public class FwVersionBean implements Serializable { |
| | | private String fwModule; |
| | | private String version; |
| | | private boolean upgrade;//是否需要升级 |
| | | private boolean popUpgrade;//该设备是否有弹窗升级 |
| | | private String versionNew;//新版本号 |
| | | private String versionNewDesc;//新版本描述 |
| | | private long versionNewId;//新版本号id |
| | | private String versionNewFileUrl;//新版本下载地址(加密过的) |
| | | |
| | | public String getFwModule() { |
| | | return fwModule == null ? "" : fwModule; |
| | | } |
| | | |
| | | public void setFwModule(String module) { |
| | | this.fwModule = module; |
| | | } |
| | | |
| | | public String getVersion() { |
| | | return version == null ? "" : version; |
| | | } |
| | | |
| | | public void setVersion(String version) { |
| | | this.version = version; |
| | | } |
| | | |
| | | public boolean isUpgrade() { |
| | | return upgrade; |
| | | } |
| | | |
| | | public void setUpgrade(boolean upgrade) { |
| | | this.upgrade = upgrade; |
| | | } |
| | | |
| | | public boolean isPopUpgrade() { |
| | | return popUpgrade; |
| | | } |
| | | |
| | | public void setPopUpgrade(boolean popUpgrade) { |
| | | this.popUpgrade = popUpgrade; |
| | | } |
| | | |
| | | public String getVersionNew() { |
| | | return versionNew == null ? "" : versionNew; |
| | | } |
| | | |
| | | public void setVersionNew(String versionNew) { |
| | | this.versionNew = versionNew; |
| | | } |
| | | |
| | | public String getVersionNewDesc() { |
| | | return versionNewDesc == null ? "" : versionNewDesc; |
| | | } |
| | | |
| | | public void setVersionNewDesc(String versionNewDesc) { |
| | | this.versionNewDesc = versionNewDesc; |
| | | } |
| | | |
| | | public long getVersionNewId() { |
| | | return versionNewId == 0 ? 0 : versionNewId; |
| | | } |
| | | |
| | | public void setVersionNewId(long versionNewId) { |
| | | this.versionNewId = versionNewId; |
| | | } |
| | | |
| | | public String getVersionNewFileUrl() { |
| | | return versionNewFileUrl == null ? "" : versionNewFileUrl; |
| | | } |
| | | |
| | | public void setVersionNewFileUrl(String versionNewFileUrl) { |
| | | this.versionNewFileUrl = versionNewFileUrl; |
| | | } |
| | | } |
| | |
| | | */ |
| | | public class HouseIdBean implements Serializable { |
| | | private String homeId;//电站id |
| | | private String debugType="NORMAL";//调试类型(NORMAL =常规调试;SIMPLE =简易调试) |
| | | private String communityId="";//项目id |
| | | private String flowRecordContent="";//流转记录内容 |
| | | private String debugType = "NORMAL";//调试类型(NORMAL =常规调试;SIMPLE =简易调试) |
| | | private String communityId = "";//项目id |
| | | private String flowRecordContent = "";//流转记录内容 |
| | | private String powerStationImage;//电站图片 |
| | | private String homeName;//电站名称 |
| | | private String installedCapacity;//组串容量(创建电站时输入的组串容量) |
| | |
| | | * SECONDARY_DEBUGGIN = 授权调试 |
| | | */ |
| | | private String debugStatus; |
| | | /** |
| | | * 电站类型 |
| | | * INV = 逆变器电站 |
| | | * BMS = BMS电站 |
| | | */ |
| | | private String powerStationType = "INV"; |
| | | |
| | | public String getPowerStationType() { |
| | | return powerStationType; |
| | | } |
| | | |
| | | public void setPowerStationType(String powerStationType) { |
| | | this.powerStationType = powerStationType; |
| | | } |
| | | |
| | | public String getDebugType() { |
| | | return debugType; |
| | | } |
| | |
| | | public void setFlowRecordContent(String flowRecordContent) { |
| | | this.flowRecordContent = flowRecordContent; |
| | | } |
| | | |
| | | public String getDebugStatus() { |
| | | return debugStatus == null ? "" : debugStatus; |
| | | } |
| | |
| | | if (this.location == null) { |
| | | return this.getAddress(); |
| | | } |
| | | return this.location.getNationName() +" "+ this.location.getProvinceName() +" "+ this.location.getCityName() +" "+ this.getAddress(); |
| | | return this.location.getNationName() + " " + this.location.getProvinceName() + " " + this.location.getCityName() + " " + this.getAddress(); |
| | | } |
| | | } |
| | |
| | | private String latitude;//纬度 |
| | | private String longitude;//经度 |
| | | private String timezone;//时区 |
| | | private String powerStationType;//电站类型(DOMESTIC_ROOF:家用屋顶,COMMERCIAL_ROOF:商业用屋顶,INDUSTRIAL_ROOF:工业用屋顶,SURFACE_POWER_STATION:地面电站) |
| | | private String workMode;//工作模式(self_use:自发自用,peak_load_shifting:削峰填谷,battery_priority:电池优先,auto:智能模式) |
| | | private long productionTime;//投产日志 |
| | | private String monetaryUnit;//货币单位 |
| | |
| | | |
| | | public void setTimezone(String timezone) { |
| | | this.timezone = timezone; |
| | | } |
| | | |
| | | public String getPowerStationType() { |
| | | return powerStationType == null ? "" : powerStationType; |
| | | } |
| | | |
| | | public void setPowerStationType(String powerStationType) { |
| | | this.powerStationType = powerStationType; |
| | | } |
| | | |
| | | public String getWorkMode() { |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | * 电站状态概览 |
| | | */ |
| | | private void getStatusOverview() { |
| | | HdlResidenceLogic.getInstance().getStatusOverview("", "", "", new CloudCallBeak<StatusOverviewBean>() { |
| | | HdlResidenceLogic.getInstance().getStatusOverview("", "", "", "",new CloudCallBeak<StatusOverviewBean>() { |
| | | @Override |
| | | public void onSuccess(StatusOverviewBean statusOverviewBean) { |
| | | if (statusOverviewBean == null) { |
| | |
| | | import com.hdl.photovoltaic.enums.LogoutType; |
| | | import com.hdl.photovoltaic.enums.LowerTagType; |
| | | import com.hdl.photovoltaic.enums.PowerStationStatus; |
| | | import com.hdl.photovoltaic.enums.PowerStationType; |
| | | import com.hdl.photovoltaic.enums.ProjectOperation; |
| | | import com.hdl.photovoltaic.enums.ShowErrorMode; |
| | | import com.hdl.photovoltaic.enums.SortType; |
| | |
| | | private String installedCapacityMaxValue = "";//最大组串容量(装机容量) |
| | | private String screeningConditionStatus = DebugStatus.All;//筛选条件状态 |
| | | private String powerStationStatusValue = PowerStationStatus.All;//电站状态(全部 不传该过滤参数,1:正常(运行),2:离线,3:待接入,4:故障) |
| | | private String powerStationTypeValue = PowerStationType.All;//电站类型(INV = 逆变器电站;BMS = BMS电站) |
| | | |
| | | private final long pageSize = 100;//一页大小 |
| | | |
| | |
| | | installedCapacityMaxValue = ""; |
| | | screeningConditionStatus = DebugStatus.All; |
| | | powerStationStatusValue = PowerStationStatus.All; |
| | | powerStationTypeValue = PowerStationType.All; |
| | | } |
| | | |
| | | @Override |
| | |
| | | selectedTitleLabelStyle(); |
| | | initializationState(); |
| | | getStatusOverview(); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true); |
| | | |
| | | } |
| | | }); |
| | |
| | | powerStationStatusValue = PowerStationStatus.All; |
| | | stationStatusStyle(viewBinding.allLl, viewBinding.allDesTv); |
| | | getStatusOverview(); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true); |
| | | } |
| | | }); |
| | | //故障 |
| | |
| | | powerStationStatusValue = PowerStationStatus.malfunction; |
| | | stationStatusStyle(viewBinding.faultsLl, viewBinding.faultsDesTv); |
| | | getStatusOverview(); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true); |
| | | } |
| | | }); |
| | | //离线 |
| | |
| | | powerStationStatusValue = PowerStationStatus.off; |
| | | stationStatusStyle(viewBinding.offlineLl, viewBinding.offlineDesTv); |
| | | getStatusOverview(); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true); |
| | | } |
| | | }); |
| | | //待接入 |
| | |
| | | powerStationStatusValue = PowerStationStatus.connecting; |
| | | stationStatusStyle(viewBinding.connectedLl, viewBinding.connectedDesTv); |
| | | getStatusOverview(); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true); |
| | | } |
| | | }); |
| | | |
| | |
| | | public void onClick(View v) { |
| | | DefaultFilteringDialog defaultFilteringDialog = new DefaultFilteringDialog(_mActivity); |
| | | defaultFilteringDialog.show(); |
| | | defaultFilteringDialog.initState(installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus); |
| | | defaultFilteringDialog.initState(installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus,powerStationTypeValue); |
| | | defaultFilteringDialog.setOnClickListener(new DefaultFilteringDialog.OnClickListener() { |
| | | @Override |
| | | public void confirm(String min, String max, String state) { |
| | | public void confirm(String min, String max, String state, String powerStationType) { |
| | | installedCapacityMinValue = min;//最小组串容量(装机容量) |
| | | installedCapacityMaxValue = max;//最大组串容量(装机容量) |
| | | screeningConditionStatus = state;//调试状态(全部;调试中;调试完成;已交付;授权调试) |
| | | powerStationTypeValue = powerStationType;//电站类型(INV = 逆变器电站;BMS = BMS电站) |
| | | getStatusOverview(); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true); |
| | | } |
| | | }); |
| | | } |
| | |
| | | key = SortType.installedCapacitySort; |
| | | value = isSelected ? SortValue.ascending : SortValue.descending; |
| | | getStatusOverview(); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue,1, true); |
| | | } |
| | | }); |
| | | //额定功率筛选 |
| | |
| | | key = SortType.invPowerSort; |
| | | value = isSelected ? SortValue.ascending : SortValue.descending; |
| | | getStatusOverview(); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue,1, true); |
| | | } |
| | | }); |
| | | //电站电池容量筛选 |
| | |
| | | key = SortType.batteryCapacitySort; |
| | | value = isSelected ? SortValue.ascending : SortValue.descending; |
| | | getStatusOverview(); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue,1, true); |
| | | } |
| | | }); |
| | | //电站当日发电量筛选 |
| | |
| | | key = SortType.todayElectricitySort; |
| | | value = isSelected ? SortValue.ascending : SortValue.descending; |
| | | getStatusOverview(); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue,powerStationTypeValue, 1, true); |
| | | } |
| | | }); |
| | | //设备点击 |
| | |
| | | // MqttRecvClient.getInstance().removeAllTopic(); |
| | | // } |
| | | |
| | | loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); |
| | | loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue,powerStationTypeValue, 1, true); |
| | | } |
| | | } else if (HDLUniMP.UNI_EVENT_REPLY_DEVICE_LIST.equals(eventBus.getType())) { |
| | | // 取消粘性事件 |
| | |
| | | initializationState(); |
| | | stationStatusStyle(viewBinding.allLl, viewBinding.allDesTv); |
| | | getStatusOverview(); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue,powerStationTypeValue, 1, true); |
| | | } else if (eventBus.getType().equals(ConstantManage.station_page)) { |
| | | // 取消粘性事件 |
| | | EventBus.getDefault().removeStickyEvent(eventBus); |
| | |
| | | stationStatusStyle(viewBinding.connectedLl, viewBinding.connectedDesTv); |
| | | } |
| | | getStatusOverview(); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue,powerStationTypeValue, 1, true); |
| | | } else if (eventBus.getType().equals(ConstantManage.station_edit)) { |
| | | //编辑后更新一下住宅列表 |
| | | //loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true); |
| | |
| | | * 电站状态概览 |
| | | */ |
| | | private void getStatusOverview() { |
| | | HdlResidenceLogic.getInstance().getStatusOverview(screeningConditionStatus, installedCapacityMinValue, installedCapacityMaxValue, new CloudCallBeak<StatusOverviewBean>() { |
| | | HdlResidenceLogic.getInstance().getStatusOverview(screeningConditionStatus, installedCapacityMinValue, installedCapacityMaxValue,powerStationTypeValue, new CloudCallBeak<StatusOverviewBean>() { |
| | | @Override |
| | | public void onSuccess(StatusOverviewBean statusOverviewBean) { |
| | | if (statusOverviewBean == null) { |
| | |
| | | * @param installedCapacityMax 最大组串容量(装机容量) |
| | | * @param gridType 调试状态(全部;调试中;调试完成;已交付;授权调试) |
| | | * @param powerStationStatus 电站状态 (全部 :"";1 : 正常;2 : 离线; 3 : 待接入;4 : 故障) |
| | | * @param powerStationType 电站类型(INV = 逆变器电站;BMS = BMS电站) |
| | | * @param pageNo 页码 |
| | | * @param isClear 是否清除数据 |
| | | */ |
| | | private void loadNextPageHouseList(boolean isRefreshing, String key, String keyValue, String installedCapacityMin, String installedCapacityMax, String gridType, String powerStationStatus, long pageNo, boolean isClear) { |
| | | private void loadNextPageHouseList(boolean isRefreshing, String key, String keyValue, String installedCapacityMin, String installedCapacityMax, String gridType, String powerStationStatus, String powerStationType, long pageNo, boolean isClear) { |
| | | isReadData = true; |
| | | if (isClear) { |
| | | clearData(); |
| | |
| | | } |
| | | |
| | | //获取住宅(电站)ID列表 |
| | | HdlResidenceLogic.getInstance().getResidenceIdList(key, keyValue, installedCapacityMin, installedCapacityMax, gridType, powerStationStatus, pageNo, pageSize, new CloudCallBeak<HdlResidenceLogic.HouseBeanClass>() { |
| | | HdlResidenceLogic.getInstance().getResidenceIdList(key, keyValue, installedCapacityMin, installedCapacityMax, gridType, powerStationStatus, powerStationType, pageNo, pageSize, new CloudCallBeak<HdlResidenceLogic.HouseBeanClass>() { |
| | | @Override |
| | | public void onSuccess(HdlResidenceLogic.HouseBeanClass houseBeanClass) { |
| | | HdlThreadLogic.runMainThread(new Runnable() { |
| | |
| | | // 执行任务(如更新UI、跳转等) |
| | | viewBinding.fragmentHouseSrl.endRefreshing(); |
| | | //加载最新数据完成 |
| | | loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); |
| | | loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue,1, true); |
| | | getStatusOverview(); |
| | | } |
| | | }.execute(); |
| | |
| | | viewBinding.fragmentHouseSrl.endLoadingMore(); |
| | | if (!isHouseLoadingMore) { |
| | | // 滑动到了底部,执行相应的操作 |
| | | loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, ++currentHouseListPage, false); |
| | | loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue,powerStationTypeValue, ++currentHouseListPage, false); |
| | | } |
| | | } |
| | | }.execute(); |
| | |
| | | |
| | | //获取住宅(电站)ID列表 |
| | | HdlResidenceLogic.getInstance().getResidenceIdList(SortType.homeName, currSearchText, |
| | | "", "", "", "", |
| | | "", "", "", "","", |
| | | pageNo, 20, new CloudCallBeak<HdlResidenceLogic.HouseBeanClass>() { |
| | | @Override |
| | | public void onSuccess(HdlResidenceLogic.HouseBeanClass houseBeanClass) { |
| | |
| | | showLoading(getString(R.string.device_loading)); |
| | | } |
| | | //获取住宅(电站)ID列表 |
| | | HdlResidenceLogic.getInstance().getResidenceIdList("", "", "", "", "", "", 1, 200, new CloudCallBeak<HdlResidenceLogic.HouseBeanClass>() { |
| | | HdlResidenceLogic.getInstance().getResidenceIdList("", "", "", "", "", "","", 1, 200, new CloudCallBeak<HdlResidenceLogic.HouseBeanClass>() { |
| | | @Override |
| | | public void onSuccess(HdlResidenceLogic.HouseBeanClass houseBeanClass) { |
| | | HdlThreadLogic.runMainThread(new Runnable() { |
| | |
| | | import com.hdl.photovoltaic.databinding.DialogDefaultFilteringBinding; |
| | | import com.hdl.photovoltaic.enums.DebugStatus; |
| | | import com.hdl.photovoltaic.enums.GridType; |
| | | import com.hdl.photovoltaic.enums.PowerStationType; |
| | | import com.hdl.photovoltaic.enums.UnitType; |
| | | import com.hdl.photovoltaic.other.HdlThreadLogic; |
| | | |
| | |
| | | final String text8 = "500+"; |
| | | |
| | | |
| | | private String mStateValue = GridType.All; |
| | | private String mGridType = GridType.All; |
| | | /** |
| | | * 电站类型(INV = 逆变器电站;BMS = BMS电站) |
| | | */ |
| | | private String mPowerStationType = PowerStationType.All; |
| | | |
| | | public DefaultFilteringDialog(@NonNull Context context) { |
| | | super(context, R.style.Custom_Dialog); |
| | |
| | | if (Integer.parseInt(minValue) > Integer.parseInt(maxValue)) { |
| | | //最小值在前面 |
| | | if (mOnClickListener != null) { |
| | | mOnClickListener.confirm(maxValue, minValue, mStateValue); |
| | | mOnClickListener.confirm(maxValue, minValue, mGridType, mPowerStationType); |
| | | } |
| | | } else { |
| | | if (mOnClickListener != null) { |
| | | mOnClickListener.confirm(minValue, maxValue, mStateValue); |
| | | mOnClickListener.confirm(minValue, maxValue, mGridType, mPowerStationType); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | |
| | | |
| | | } else { |
| | | if (mOnClickListener != null) { |
| | | mOnClickListener.confirm(minValue, maxValue, mStateValue); |
| | | mOnClickListener.confirm(minValue, maxValue, mGridType, mPowerStationType); |
| | | } |
| | | } |
| | | dismiss(); |
| | |
| | | setBackgroundColor(null, TitleType.string_capacity); |
| | | setSelectedText(""); |
| | | setBackgroundColor(viewBinding.allTv, TitleType.debuggingState); |
| | | mStateValue = DebugStatus.All; |
| | | setBackgroundColor(viewBinding.powerStationTypeAllTv, TitleType.powerStationType); |
| | | mGridType = DebugStatus.All; |
| | | mPowerStationType = PowerStationType.All; |
| | | } |
| | | }); |
| | | viewBinding.text1Tv.setOnClickListener(new View.OnClickListener() { |
| | |
| | | @Override |
| | | public void onClick(View v) { |
| | | setBackgroundColor(viewBinding.allTv, TitleType.debuggingState); |
| | | mStateValue = DebugStatus.All; |
| | | mGridType = DebugStatus.All; |
| | | } |
| | | }); |
| | | //调试中 |
| | |
| | | @Override |
| | | public void onClick(View v) { |
| | | setBackgroundColor(viewBinding.beDebuggingTv, TitleType.debuggingState); |
| | | mStateValue = DebugStatus.Debugging; |
| | | mGridType = DebugStatus.Debugging; |
| | | } |
| | | }); |
| | | //调试完成 |
| | |
| | | @Override |
| | | public void onClick(View v) { |
| | | setBackgroundColor(viewBinding.debuggingcOmpletedTv, TitleType.debuggingState); |
| | | mStateValue = DebugStatus.WAIT_DELIVERED; |
| | | mGridType = DebugStatus.WAIT_DELIVERED; |
| | | } |
| | | }); |
| | | //已交付 |
| | |
| | | @Override |
| | | public void onClick(View v) { |
| | | setBackgroundColor(viewBinding.deliveredTv, TitleType.debuggingState); |
| | | mStateValue = DebugStatus.Delivered; |
| | | mGridType = DebugStatus.Delivered; |
| | | } |
| | | }); |
| | | //授权调试 |
| | |
| | | @Override |
| | | public void onClick(View v) { |
| | | setBackgroundColor(viewBinding.authorizationDebuggingTv, TitleType.debuggingState); |
| | | mStateValue = DebugStatus.SECONDARY_DEBUGGIN; |
| | | mGridType = DebugStatus.SECONDARY_DEBUGGIN; |
| | | } |
| | | }); |
| | | //电站类型--全部 |
| | | viewBinding.powerStationTypeAllTv.setOnClickListener(new View.OnClickListener() { |
| | | |
| | | @Override |
| | | public void onClick(View v) { |
| | | setBackgroundColor(viewBinding.powerStationTypeAllTv, TitleType.powerStationType); |
| | | mPowerStationType = PowerStationType.All; |
| | | } |
| | | }); |
| | | |
| | | //电站类型--逆变器 |
| | | viewBinding.powerStationTypeInvTv.setOnClickListener(new View.OnClickListener() { |
| | | |
| | | @Override |
| | | public void onClick(View v) { |
| | | setBackgroundColor(viewBinding.powerStationTypeInvTv, TitleType.powerStationType); |
| | | mPowerStationType = PowerStationType.INV; |
| | | } |
| | | }); |
| | | |
| | | //电站类型--BMS |
| | | viewBinding.powerStationTypeBmsTv.setOnClickListener(new View.OnClickListener() { |
| | | |
| | | @Override |
| | | public void onClick(View v) { |
| | | setBackgroundColor(viewBinding.powerStationTypeBmsTv, TitleType.powerStationType); |
| | | mPowerStationType = PowerStationType.BMS; |
| | | } |
| | | }); |
| | | |
| | |
| | | viewBinding.text6Tv.setBackground(AppCompatResources.getDrawable(mContext, R.drawable.config_129)); |
| | | viewBinding.text7Tv.setBackground(AppCompatResources.getDrawable(mContext, R.drawable.config_129)); |
| | | viewBinding.text8Tv.setBackground(AppCompatResources.getDrawable(mContext, R.drawable.config_129)); |
| | | } else if (titleType == TitleType.powerStationType) { |
| | | viewBinding.powerStationTypeAllTv.setBackground(AppCompatResources.getDrawable(mContext, R.drawable.config_129)); |
| | | viewBinding.powerStationTypeInvTv.setBackground(AppCompatResources.getDrawable(mContext, R.drawable.config_129)); |
| | | viewBinding.powerStationTypeBmsTv.setBackground(AppCompatResources.getDrawable(mContext, R.drawable.config_129)); |
| | | } else { |
| | | viewBinding.allTv.setBackground(AppCompatResources.getDrawable(mContext, R.drawable.config_129)); |
| | | viewBinding.beDebuggingTv.setBackground(AppCompatResources.getDrawable(mContext, R.drawable.config_129)); |
| | |
| | | |
| | | } |
| | | |
| | | public void initState(String min, String max, String stateValue) { |
| | | public void initState(String min, String max, String stateValue, String powerStationTypeValue) { |
| | | try { |
| | | mStateValue = stateValue; |
| | | mPowerStationType = powerStationTypeValue; |
| | | mGridType = stateValue; |
| | | viewBinding.minEt.setText(min); |
| | | viewBinding.maxEt.setText(max); |
| | | |
| | |
| | | break; |
| | | } |
| | | } |
| | | switch (powerStationTypeValue) { |
| | | case PowerStationType.All: |
| | | setBackgroundColor(viewBinding.powerStationTypeAllTv, TitleType.powerStationType); |
| | | break; |
| | | case PowerStationType.INV: |
| | | setBackgroundColor(viewBinding.powerStationTypeInvTv, TitleType.powerStationType); |
| | | break; |
| | | case PowerStationType.BMS: |
| | | setBackgroundColor(viewBinding.powerStationTypeBmsTv, TitleType.powerStationType); |
| | | break; |
| | | default: { |
| | | setBackgroundColor(viewBinding.powerStationTypeAllTv, TitleType.powerStationType); |
| | | break; |
| | | } |
| | | } |
| | | } catch (Exception ignored) { |
| | | } |
| | | |
| | |
| | | viewBinding.authorizationDebuggingTv.setTag(DebugStatus.SECONDARY_DEBUGGIN); |
| | | setBackgroundColor(null, TitleType.string_capacity); |
| | | setBackgroundColor(viewBinding.allTv, TitleType.debuggingState); |
| | | setBackgroundColor(viewBinding.powerStationTypeAllTv, TitleType.powerStationType); |
| | | } |
| | | |
| | | public void setOnClickListener(OnClickListener onClickListener) { |
| | |
| | | |
| | | |
| | | public interface OnClickListener { |
| | | void confirm(String min, String max, String state); |
| | | void confirm(String min, String max, String state, String powerStationType); |
| | | } |
| | | |
| | | public enum TitleType { |
| | | string_capacity,//组串容量 |
| | | debuggingState//调试状态 |
| | | debuggingState,//调试状态 |
| | | powerStationType//电站类型 |
| | | |
| | | } |
| | | |
| | |
| | | android:layout_height="match_parent" /> |
| | | </LinearLayout> |
| | | |
| | | <TextView |
| | | android:id="@+id/powerStationType_title_tv" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="@dimen/dp_23" |
| | | android:layout_marginStart="@dimen/dp_20" |
| | | android:layout_marginTop="37dp" |
| | | android:text="@string/power_station_type" |
| | | android:textColor="@color/text_FFACACAC" |
| | | android:textSize="@dimen/text_14" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintTop_toBottomOf="@+id/line5_ll" /> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/line6_ll" |
| | | android:layout_width="0dp" |
| | | android:layout_height="@dimen/dp_35" |
| | | android:layout_marginStart="@dimen/dp_20" |
| | | android:layout_marginTop="@dimen/dp_8" |
| | | android:layout_marginEnd="@dimen/dp_20" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintTop_toBottomOf="@+id/powerStationType_title_tv"> |
| | | |
| | | <!--全部--> |
| | | <TextView |
| | | android:id="@+id/powerStationType_all_tv" |
| | | android:layout_width="102dp" |
| | | android:layout_height="match_parent" |
| | | android:background="@drawable/config_129" |
| | | android:gravity="center" |
| | | android:text="@string/message_all" |
| | | android:textColor="@color/text_FFACACAC" |
| | | android:textSize="@dimen/text_12" /> |
| | | |
| | | <View |
| | | android:layout_width="0dp" |
| | | android:layout_height="match_parent" |
| | | android:layout_weight="1" /> |
| | | <!--逆变器--> |
| | | <TextView |
| | | android:id="@+id/powerStationType_inv_tv" |
| | | android:layout_width="102dp" |
| | | android:layout_height="match_parent" |
| | | android:background="@drawable/config_129" |
| | | android:gravity="center" |
| | | android:text="@string/alarm_all_device_inverter" |
| | | android:textColor="@color/text_FFACACAC" |
| | | android:textSize="@dimen/text_12" /> |
| | | |
| | | <View |
| | | android:layout_width="0dp" |
| | | android:layout_height="match_parent" |
| | | android:layout_weight="1" /> |
| | | <!--BMS--> |
| | | <TextView |
| | | android:id="@+id/powerStationType_bms_tv" |
| | | android:layout_width="102dp" |
| | | android:layout_height="match_parent" |
| | | android:background="@drawable/config_129" |
| | | android:gravity="center" |
| | | android:text="@string/bms" |
| | | android:textColor="@color/text_FFACACAC" |
| | | android:textSize="@dimen/text_12" /> |
| | | |
| | | </LinearLayout> |
| | | |
| | | <RelativeLayout |
| | | android:id="@+id/reset_rl" |
| | | android:layout_width="0dp" |
| | |
| | | android:background="@color/text_FF39383D" |
| | | app:layout_constraintEnd_toEndOf="parent" |
| | | app:layout_constraintStart_toStartOf="parent" |
| | | app:layout_constraintTop_toBottomOf="@+id/line5_ll"> |
| | | app:layout_constraintTop_toBottomOf="@+id/line6_ll"> |
| | | |
| | | <LinearLayout |
| | | android:layout_width="wrap_content" |
| | |
| | | <string name="exit">خروج</string> |
| | | <string name="bluetooth_not_enabled">البلوتوث لا يعمل</string> |
| | | <string name="write_failed">فشل في الكتابة</string> |
| | | <string name="power_station_type">نوع محطة الطاقة</string> |
| | | <string name="bms">BMS</string> |
| | | </resources> |
| | |
| | | <string name="exit">Exit</string> |
| | | <string name="bluetooth_not_enabled">Bluetooth is not enabled</string> |
| | | <string name="write_failed">Write failed</string> |
| | | <string name="power_station_type">Power station type</string> |
| | | <string name="bms">BMS</string> |
| | | |
| | | </resources> |
| | |
| | | <string name="exit">退出</string> |
| | | <string name="bluetooth_not_enabled">蓝牙没开启</string> |
| | | <string name="write_failed">写入失败</string> |
| | | <string name="power_station_type">电站类型</string> |
| | | <string name="bms">BMS</string> |
| | | </resources> |
| | |
| | | <string name="exit">Exit</string> |
| | | <string name="bluetooth_not_enabled">Bluetooth is not enabled</string> |
| | | <string name="write_failed">Write failed</string> |
| | | <string name="power_station_type">Power station type</string> |
| | | <string name="bms">BMS</string> |
| | | </resources> |