mac
2024-04-29 e40f505d8ea791b18387df3641154899ea629b68
2024年04月29日13:55:38

备份
4个文件已修改
49 ■■■■■ 已修改文件
app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/ui/home/CustomStyleChartComposer.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/ui/home/HomePageFragment.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/values/strings.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java
@@ -681,9 +681,9 @@
                        }
                        if (isBoolean) {
                            uniCallbackData(type, null, 0, "写入新驱动文件到内存成功", callback);
                            uniCallbackData(type, null, 0, HDLApp.getInstance().getString(R.string.writing_firmware_upgrade_memory_succeeded), callback);
                        } else {
                            uniCallbackData(type, null, -2, "下载固件升级文件失败", callback);
                            uniCallbackData(type, null, -2, HDLApp.getInstance().getString(R.string.download_firmware_upgrade_file_failed), callback);
                        }
                    }
                });
@@ -728,7 +728,7 @@
                            String firmwarePathFileName = HdlFileLogic.getInstance().getFirmwarePathFileName(oid, imageId, version);
                            byte[] data = HdlFileLogic.getInstance().readFileByte(firmwarePathFileName);
                            if (data == null || data.length == 0) {
                                uniCallbackData(type, null, -2, "本地找不到升级固件文件,请下载好固件文件,再重新升级.", callback);
                                uniCallbackData(type, null, -2, HDLApp.getInstance().getString(R.string.found_locally_firmware_upgrade_file), callback);
                                return;
                            }
                            String md5 = HDLMD5Utils.encodeMD5(data);//网关固件需要
@@ -743,14 +743,14 @@
                                @Override
                                public void onError(HDLLinkException e) {
                                    uniCallbackData(type, null, -2, "通知给网关升级固件文件地址失败,无法升级,", callback);
                                    uniCallbackData(type, null, -2, HDLApp.getInstance().getString(R.string.notify_gateway_firmware_upgrade_failed), callback);
                                }
                            });
                        }
                        @Override
                        public void onServiceDisconnected(ComponentName name) {
                            uniCallbackData(type, null, -2, "本地服务有异常失败,无法升级,", callback);
                            uniCallbackData(type, null, -2, HDLApp.getInstance().getString(R.string.local_service_fails), callback);
                        }
                    });
                } else {
@@ -934,9 +934,9 @@
                            HdlFileLogic.getInstance().deleteFile(drivePathFileName);//下载失败,删除不完整驱动文件;
                        }
                        if (isBoolean) {
                            uniCallbackData(type, null, 0, "写入新驱动文件到内存成功", callback);
                            uniCallbackData(type, null, 0, HDLApp.getInstance().getString(R.string.writing_drive_memory_succeeded), callback);
                        } else {
                            uniCallbackData(type, null, -2, "下载驱动升级文件失败", callback);
                            uniCallbackData(type, null, -2, HDLApp.getInstance().getString(R.string.download_drive_file_failed), callback);
                        }
                    }
                });
@@ -980,7 +980,7 @@
                            String drivePathFileName = HdlFileLogic.getInstance().getDrivePathFileName(driverCode, version);
                            byte[] data = HdlFileLogic.getInstance().readFileByte(drivePathFileName);
                            if (data == null || data.length == 0) {
                                uniCallbackData(type, null, -2, "本地找不到升级驱动文件,请下载好驱动文件,再重新升级.", callback);
                                uniCallbackData(type, null, -2, HDLApp.getInstance().getString(R.string.found_locally_drive_file), callback);
                                return;
                            }
                            String md5 = HDLMD5Utils.encodeMD5(data);//网关驱动需要
@@ -995,14 +995,14 @@
                                @Override
                                public void onError(HDLLinkException e) {
                                    uniCallbackData(type, null, -2, "通知给网关升级驱动文件地址失败,无法升级,", callback);
                                    uniCallbackData(type, null, -2, HDLApp.getInstance().getString(R.string.notify_gateway_drive_failed), callback);
                                }
                            });
                        }
                        @Override
                        public void onServiceDisconnected(ComponentName name) {
                            uniCallbackData(type, null, -2, "本地服务有异常失败,无法升级,", callback);
                            uniCallbackData(type, null, -2, HDLApp.getInstance().getString(R.string.local_service_fails), callback);
                        }
                    });
                } else {
@@ -1089,7 +1089,7 @@
     */
    private void uniCancelDownloadingUpgradeFile(String type, Object data, DCUniMPJSCallback callback) {
        HdlOtaLogic.getInstance().stopDownloadUpgradeFile();
        uniCallbackData(type, null, 0, "取消下载成功.", callback);
        uniCallbackData(type, null, 0, HDLApp.getInstance().getString(R.string.cancel_download_successfully), callback);
    }
    /**
app/src/main/java/com/hdl/photovoltaic/ui/home/CustomStyleChartComposer.java
@@ -184,7 +184,7 @@
    }
    public static AAChartModel configureColorfulColumnChart() {
    public static AAChartModel configureColorfulColumnChart(String tipSuspendName, String[] categories, Object[] data) {
        Object[][] stopsArr = {
                {1.00, "#38C494"},
        };//颜色字符串设置支持十六进制类型和 rgba 类型
@@ -197,8 +197,7 @@
                .chartType(AAChartType.Column)
                .backgroundColor("#EDEFF2")
                .colorsTheme(new String[]{"#38C494",})
                .categories(new String[]{"一月", "二月", "三月", "四月", "五月", "六月",
                        "七月", "八月", "九月", "十月", "十一月", "十二月", "十二月", "十二月", "十二月", "十二月", "十二月", "十二月", "十二月", "十二月", "十二月", "十二月", "十二月", "十二月", "十二月", "十二月", "十二月", "十二月", "十二月", "十二月", "十二月", "十二月", "十二月", "十二月",})
                .categories(categories)
                .xAxisLabelsEnabled(true)
                .zoomType(AAChartZoomType.XY)
                .legendEnabled(false)
@@ -206,7 +205,7 @@
                        new AASeriesElement()
//                                .color(linearGradientColor)
                                .name("东京")
                                .data(new Object[]{149.9, 171.5, 106.4, 129.2, 144.0, 176.0, 135.6, 188.5, 276.4, 214.1, 95.6, 54.4, 149.9, 171.5, 106.4, 129.2, 144.0, 176.0, 135.6, 188.5, 276.4, 214.1, 95.6, 149.9, 171.5, 106.4, 129.2, 144.0, 176.0, 135.6, 188.5, 276.4, 214.1, 95.6})
                                .data(data)
//                                .colorByPoint(true)
                                .tooltip(new AATooltip().style(new AAStyle().backgroundColor("#FFFFFF").fontSize(25)))
app/src/main/java/com/hdl/photovoltaic/ui/home/HomePageFragment.java
@@ -7,7 +7,7 @@
import android.text.TextUtils;
import android.view.View;
import androidx.annotation.RequiresPermission;
import androidx.appcompat.content.res.AppCompatResources;
import com.bigkoo.pickerview.builder.TimePickerBuilder;
@@ -17,7 +17,6 @@
import com.github.AAChartModel.AAChartCore.AAChartCreator.AAChartView;
import com.github.AAChartModel.AAChartCore.AAChartCreator.AAMoveOverEventMessageModel;
import com.hdl.linkpm.sdk.core.exception.HDLException;
import com.hdl.photovoltaic.HDLApp;
import com.hdl.photovoltaic.R;
import com.hdl.photovoltaic.base.CustomBaseFragment;
import com.hdl.photovoltaic.config.ConstantManage;
@@ -266,6 +265,7 @@
            }
        });
    }
    /**
     * 时间选择器
     */
@@ -334,7 +334,7 @@
        } else if (TimeType.month.equals(timeType)
                || TimeType.year.equals(timeType)
                || TimeType.all.equals(timeType)) {
            aaChartModel = configureColorfulColumnChart();
            aaChartModel = configureColorfulColumnChart("Pv发电功率", fieldNames, fieldValues);
        }
        aaChartView.aa_drawChartWithChartModel(aaChartModel);
    }
@@ -371,9 +371,6 @@
        viewBinding.homePageStationSelectTimeLl.setVisibility(View.VISIBLE);
        setUpAAChartView();//图表加载
    }
    @Override
app/src/main/res/values/strings.xml
@@ -247,6 +247,17 @@
    <string name="port_conflict">应用冲突,需要关闭onpro或者其它版本的调试软件然后再重新启动这个软件试试</string>
    <string name="cancel_download_successfully">取消下载成功.</string>
    <string name="writing_firmware_upgrade_memory_succeeded">写入新固件文件到内存成功.</string>
    <string name="download_firmware_upgrade_file_failed">下载固件升级文件失败.</string>
    <string name="found_locally_firmware_upgrade_file">本地找不到升级固件文件,请下载好固件文件,再重新升级.</string>
    <string name="notify_gateway_firmware_upgrade_failed">通知给网关升级固件文件地址失败,无法升级.</string>
    <string name="local_service_fails">本地服务有异常失败,无法升级.</string>
    <string name="writing_drive_memory_succeeded">写入新驱动文件到内存成功.</string>
    <string name="download_drive_file_failed">下载驱动升级文件失败.</string>
    <string name="found_locally_drive_file">本地找不到升级驱动文件,请下载好驱动文件,再重新升级.</string>
    <string name="notify_gateway_drive_failed">通知给网关升级驱动文件地址失败,无法升级.</string>
    <string name="time_selectd">时间选择</string>
    <string name="life_cycle">生命期</string>
    <string name="year">年</string>