wxr
2024-09-10 8e940d7f0c873cfedf7f6d8c885be98b96f1d046
金茂光伏,金茂热水器
20个文件已修改
1005 ■■■■ 已修改文件
HDL-ON_Android/Properties/AndroidManifest.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/AppDelegate.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/Info.plist 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/DriverLayer/Control.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/HttpUtil.cs 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/Function/Function.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Entity/Room.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/MainPage.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI1-Login/LoginPage.cs 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/1-HomePage/HomePage.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/2-Classification/RoomPage.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Acst/AcstParentPage.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Acst/AcstSubPage.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Acst/InverterJinmaoHistroyPage.cs 269 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Acst/InverterJinmaoPage.cs 230 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Acst/WaterHeaterJinmaoPage.cs 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Acst/WetarHeaterJinmaoHistoryPage.cs 273 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption_Histogram.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SiriIntents/Server/HttpUtil.cs 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Properties/AndroidManifest.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.5.0" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202409051">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.6.0" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202409101">
    <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" />
    <uses-permission android:name="android.permission.RECEIVE_SMS" />
    <!--程序可以读取设备外部存储空间(内置SDcard和外置SDCard)的文件,我的文件等-->
HDL-ON_iOS/AppDelegate.cs
@@ -271,14 +271,14 @@
            AppDomain.CurrentDomain.UnhandledException += (sender, e) => {
                if(e.ExceptionObject is Exception exception)
                {
                    MainPage.Log("error","未处理的异常:" + exception.Message);
                    MainPage.Log("error", "未处理的异常:" + exception.Message + "\r\nStackTrace: " + exception.StackTrace);
                }
            };
            TaskScheduler.UnobservedTaskException += (sender, e) => {
                if (e.Exception is Exception exception)
                {
                    MainPage.Log("error", "未处理的异常:" + exception.Message);
                    MainPage.Log("error", "未处理的异常:" + exception.Message + "\r\nStackTrace: " + exception.StackTrace);
                }
            };
            #endregion
HDL-ON_iOS/Info.plist
@@ -11,7 +11,7 @@
    <key>CFBundleName</key>
    <string>On Pro</string>
    <key>CFBundleShortVersionString</key>
    <string>2.5.0</string>
    <string>2.6.0</string>
    <key>CFBundleURLTypes</key>
    <array>
        <dict>
@@ -36,7 +36,7 @@
        </dict>
    </array>
    <key>CFBundleVersion</key>
    <string>2.5.0</string>
    <string>2.6.0</string>
    <key>LSApplicationQueriesSchemes</key>
    <array>
        <string>weixinULAPI</string>
HDL_ON/DAL/DriverLayer/Control.cs
@@ -1363,6 +1363,9 @@
                                AcstParentPage.UpdateAcstSubInfo(localFunction);
                                WaterHeaterJinmaoPage.UpdateStatus();
                                break;
                            case SPK.InverterJinmao:
                                InverterJinmaoPage.UpdateStatus(localFunction);
                                break;
                            case SPK.AirSwitch:
                                AirSwitchPage.UpdataState(localFunction);
                                if (localFunction.GetAttribute(FunctionAttributeKey.Power) != null)//如果是带电量的空开也要更新能源界面
HDL_ON/DAL/Server/HttpUtil.cs
@@ -18,13 +18,13 @@
        /// 固定域名,正式环境
        /// 公共域名就近解析
        /// </summary>
        public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
        public const string APP_KEY = "HDL-HOME-APP";
        public const string SECRET_KEY = "CPL345bn28gHnvi9G4tYbq3cTYkiHC";
        //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
        //public const string APP_KEY = "HDL-HOME-APP";
        //public const string SECRET_KEY = "CPL345bn28gHnvi9G4tYbq3cTYkiHC";
        //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";
        //public const string APP_KEY = "HDL-HOME-APP-TEST";
        //public const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss";
        public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";
        public const string APP_KEY = "HDL-HOME-APP-TEST";
        public const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss";
        //public const string GlobalRequestHttpsHost = "http://59.41.255.150:7777";//mmmm
        //const string APP_KEY = "CPEVRLRT";
HDL_ON/Entity/Function/Function.cs
@@ -296,6 +296,11 @@
        /// 设备spk
        /// </summary>
        public string spk = "";
        /// <summary>
        /// 扩展信息
        /// 字符串
        /// </summary>
        public string extend = "";
        private string _SpkCategory = string.Empty;
        /// <summary>
HDL_ON/Entity/Room.cs
@@ -285,7 +285,7 @@
                    }
                    catch (Exception ex)
                    {
                        MainPage.Log($"功能数据初始化失败:{ex.Message}");
                        MainPage.Log("Error",$"功能数据初始化失败:{ex.StackTrace}");
                    }
                }
                return rooms;
HDL_ON/UI/MainPage.cs
@@ -26,7 +26,7 @@
        /// <summary>
        /// 版本号
        /// </summary>
        public static string VersionString = "2.5.0";
        public static string VersionString = "2.6.0";
        ///// <summary>
        ///// 客户端类型
        ///// </summary>
@@ -149,6 +149,10 @@
                    _RoomNotSupportFunctionList.Add(SPK.ElectricEnergy);
                    _RoomNotSupportFunctionList.Add(SPK.OtherCommon);
                    _RoomNotSupportFunctionList.Add(SPK.SensorLight);
                    _RoomNotSupportFunctionList.Add(SPK.AcstParent);
                    _RoomNotSupportFunctionList.Add(SPK.AcstSub);
                    _RoomNotSupportFunctionList.Add(SPK.WaterHeaterJinmao);
                    _RoomNotSupportFunctionList.Add(SPK.InverterJinmao);
                    _RoomNotSupportFunctionList.AddRange(SPK.EnvironDeviceSpkList());
                    //_RoomNotSupportFunctionList.AddRange(SPK.ArmSensorSpkList());
                }
HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -319,7 +319,8 @@
                    //etAccount.Text = "18402017839";
                    //etAccount.Text = "18620993214";
                    //etAccount.Text = "13414984501";//吴晓聪
                    etAccount.Text = "13580507523";
                    etAccount.Text = "18475593023";
                }
                else
                {
@@ -342,7 +343,7 @@
                {
                    etPassword.Text = "hdl1985.";
                }
                else if (etAccount.Text == "13414984501")
                else if (etAccount.Text == "18475593023")
                {
                    etPassword.Text = "a123456";
                }
@@ -362,11 +363,10 @@
                {
                    etPassword.Text = "aa123456";
                }
                else if (etAccount.Text == "dcai.assist@gmail.com")
                else if (etAccount.Text == "13580507523")
                {
                    etPassword.Text = "GraniteTileS57";
                    etPassword.Text = "a123456";
                }
                //etPassword.Text = "Hdl85521566";
                btnLogin.IsSelected = true;
            };
#endif
@@ -1063,6 +1063,7 @@
                FunctionList.List.Functions.Add(new Function
                {
                    name = "测试-金茂光伏储能",
                    extend = "jinmaot1rue",
                    spk = SPK.InverterJinmao,
                    collect = true,
                    attributes = new List<FunctionAttributes>()
@@ -1080,9 +1081,9 @@
                        new FunctionAttributes(){key = InverterJinmao_AttrEnum.load_electricity_today.ToString(),value = new List<string>(){ "0" },curValue ="100",state = "100"},
                        new FunctionAttributes(){key = InverterJinmao_AttrEnum.load_electricity_month.ToString(),value = new List<string>(){ "0" },curValue ="200",state = "200"},
                        new FunctionAttributes(){key = InverterJinmao_AttrEnum.load_electricity.ToString(),value = new List<string>(){ "0" },curValue ="1000",state = "1000"},
                        new FunctionAttributes(){key = InverterJinmao_AttrEnum.coal.ToString(),value = new List<string>(){ "0" },curValue ="100",state = "100"},
                        new FunctionAttributes(){key = InverterJinmao_AttrEnum.co2.ToString(),value = new List<string>(){ "0" },curValue ="1000",state = "1000"},
                        new FunctionAttributes(){key = InverterJinmao_AttrEnum.trees.ToString(),value = new List<string>(){ "0" },curValue ="10",state = "10"},
                        new FunctionAttributes(){key = InverterJinmao_AttrEnum.coal.ToString(),value = new List<string>(){ "0" },curValue ="1021210",state = "1021210"},
                        new FunctionAttributes(){key = InverterJinmao_AttrEnum.co2.ToString(),value = new List<string>(){ "0" },curValue ="1031300",state = "1031300"},
                        new FunctionAttributes(){key = InverterJinmao_AttrEnum.trees.ToString(),value = new List<string>(){ "0" },curValue ="121310",state = "121310"},
                    }
                });
@@ -1090,6 +1091,7 @@
                {
                    name = "测试-空调科技系统总控",
                    spk = SPK.AcstParent,
                    extend = "jinmaotrue",
                    collect = true,
                    attributes = new List<FunctionAttributes>()
                    {
@@ -1200,15 +1202,15 @@
                    attributes = new List<FunctionAttributes>()
                    {
                        new FunctionAttributes(){ key = FunctionAttributeKey.OnOff ,curValue = "on",state = "on" },
                        new FunctionAttributes(){ key = WaterHeaterJinmao_AttrEnum.co2.ToString(),curValue = "52",state = "52" },
                        new FunctionAttributes(){ key = WaterHeaterJinmao_AttrEnum.energy_electricity.ToString(),curValue = "100",state = "100" },
                        new FunctionAttributes(){ key = WaterHeaterJinmao_AttrEnum.co2.ToString(),curValue = "522222",state = "522222" },
                        new FunctionAttributes(){ key = WaterHeaterJinmao_AttrEnum.energy_electricity.ToString(),curValue = "144400",state = "144400" },
                        new FunctionAttributes(){ key = WaterHeaterJinmao_AttrEnum.flow.ToString(),curValue = "2",state = "2" },
                        new FunctionAttributes(){ key = WaterHeaterJinmao_AttrEnum.mode.ToString(),curValue = "economic",state = "economic" },
                        new FunctionAttributes(){ key = WaterHeaterJinmao_AttrEnum.mode_free.ToString(),curValue = "true",state = "true" },
                        new FunctionAttributes(){ key = WaterHeaterJinmao_AttrEnum.recycl_volume.ToString(),curValue = "10",state = "10" },
                        new FunctionAttributes(){ key = WaterHeaterJinmao_AttrEnum.set_temp.ToString(),curValue = "25",state = "25" },
                        new FunctionAttributes(){ key = WaterHeaterJinmao_AttrEnum.temp.ToString(),curValue = "23",state = "23" },
                        new FunctionAttributes(){ key = WaterHeaterJinmao_AttrEnum.trees.ToString(),curValue = "8",state = "8" },
                        new FunctionAttributes(){ key = WaterHeaterJinmao_AttrEnum.trees.ToString(),curValue = "11228",state = "11228" },
                        new FunctionAttributes(){ key = WaterHeaterJinmao_AttrEnum.volume.ToString(),curValue = "100",state = "100" },
                    },
HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -1765,7 +1765,8 @@
            {
                X = Application.GetRealWidth(11),
                Y = Application.GetRealWidth(10),
                TextID = StringId.Acst,
                Text = function.name,
                //TextID = StringId.Acst,
                IsBold = true,
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextSize = CSS_FontSize.TextFontSize,
@@ -1784,6 +1785,22 @@
                Height = Application.GetRealHeight(37),
            };
            view.AddChidren(btnLogo);
            try
            {
                if (function.extend.Contains("jinmao") && function.extend.Contains("true"))
                {
                    btnLogo.Visible = true;
                }
                else
                {
                    btnLogo.Visible = false;
                }
            }
            catch (Exception ex)
            {
                MainPage.Log("Error", $"金茂logo显示处理异常:{ex.Message}");
            }
            Button btnFunctionViewBg;
            btnFunctionViewBg = new Button()
@@ -1805,7 +1822,7 @@
            }
            else if (function.spk == SPK.InverterJinmao)
            {
                btnName.TextID = StringId.NewEnergy;
                //btnName.TextID = StringId.NewEnergy;
                btnFunctionViewBg.MouseUpEventHandler = (sender, e) =>
                {
                    var page = new InverterJinmaoPage();
HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Security.Cryptography;
using HDL_ON.DAL.Server;
using HDL_ON.DriverLayer;
using HDL_ON.Entity;
@@ -1199,7 +1200,24 @@
                        if (item == ShowFunction.Acst)
                        {
                            btnName.TextID = StringId.Acst;
                            try
                            {
                                var acstFunction = FunctionList.List.GetAcstParentList()[0];
                                btnName.Text = acstFunction.name;
                                if (acstFunction.extend.Contains("jinmao") && acstFunction.extend.Contains("true"))
                                {
                                    btnJMLogo.Visible = true;
                                }
                                else
                                {
                                    btnJMLogo.Visible = false;
                                }
                            }
                            catch (Exception ex)
                            {
                                MainPage.Log("Error", $"加载金茂科技系统主控名称异常:{ex.Message}");
                            }
                            btnFunctionViewBg.MouseUpEventHandler = (sender, e) =>
                            {
                                var page = new AcstParentPage();
@@ -1211,6 +1229,23 @@
                        else if (item == ShowFunction.InverterJinmao)
                        {
                            btnName.TextID = StringId.NewEnergy;
                            try
                            {
                                var jinmaoInverterFunction = FunctionList.List.GetInverterJinmaoList()[0];
                                btnName.Text = jinmaoInverterFunction.name;
                                if (jinmaoInverterFunction.extend.Contains("jinmao") && jinmaoInverterFunction.extend.Contains("true"))
                                {
                                    btnJMLogo.Visible = true;
                                }
                                else
                                {
                                    btnJMLogo.Visible = false;
                                }
                            }
                            catch (Exception ex)
                            {
                                MainPage.Log("Error", $"加载金茂储能名称异常:{ex.Message}");
                            }
                            btnFunctionViewBg.MouseUpEventHandler = (sender, e) =>
                            {
                                var page = new InverterJinmaoPage();
HDL_ON/UI/UI2/2-Classification/RoomPage.cs
@@ -104,9 +104,6 @@
                {
                    continue;
                }
#if DEBUG
                //throw new ArgumentNullException();
#endif
                functionListView.AddChidren(new Button() { Height = Application.GetRealHeight(12) });
HDL_ON/UI/UI2/FuntionControlView/Acst/AcstParentPage.cs
@@ -1297,6 +1297,7 @@
            {
                X = Application.GetRealWidth(18 + 7),
                Y = Application.GetRealHeight(11),
                Width = Application.GetRealWidth(120),
                Height = Application.GetRealHeight(40),
                TextAlignment = TextAlignment.CenterLeft,
                TextColor = 0xFF1b3053,
HDL_ON/UI/UI2/FuntionControlView/Acst/AcstSubPage.cs
@@ -231,6 +231,8 @@
            contentView.AddChidren(btnSetTempValues);
#if __IOS__
            bodyView.btnSetTempValues.Width = bodyView.btnSetTempValues.GetTextWidth() + Application.GetRealWidth(10);
#else
            bodyView.btnSetTempValues.Width = bodyView.btnSetTempValues.GetTextWidth() + Application.GetRealWidth(5);
#endif
HDL_ON/UI/UI2/FuntionControlView/Acst/InverterJinmaoHistroyPage.cs
@@ -217,7 +217,7 @@
            echartOption1 = new EchartsOption_Histogram();
            echartOption1.xTitle = "时间";
            echartOption1.yTitle = "电量(kw)";
            echartOption1.yTitle = "电量(kwh)";
            //echartOption.InitXdataText(new List<string>()
            //{
            //    "21","22","23","24","25","26","26","27","28","29",
@@ -422,7 +422,7 @@
            echartOption2 = new EchartsOption_Histogram();
            echartOption2.xTitle = "时间";
            echartOption2.yTitle = "电量(kw)";
            echartOption2.yTitle = "电量(kwh)";
            //echartOption2.InitXdataText(new List<string>()
            //{
            //    "21","22","23","24","25","26","26","27","28","29",
@@ -615,6 +615,7 @@
                            Application.RunOnMainThread(() =>
                            {
                                var ddd = echartOption2.InitOption();
                                infoView2_EchartsView.ShowWithOption(echartOption2.InitOption());
                            });
                        }
@@ -647,7 +648,7 @@
                var pvElecQueryDate = new DateTime(queryTime_Year1, queryTime_Month1, queryTime_Day1);
                if (queryType1 == QueryType.day_hour)
                {
                    if (pvElecQueryDate.Year == 2023 && pvElecQueryDate.Month == 1 && pvElecQueryDate.Day == 1)
                    if (pvElecQueryDate.Year <= 2023 && pvElecQueryDate.Month == 1 && pvElecQueryDate.Day == 1)
                    {
                        return;
                    }
@@ -656,16 +657,17 @@
                }
                else if (queryType1 == QueryType.custom_month)
                {
                    if (pvElecQueryDate.Year == 2023 && pvElecQueryDate.Month == 1)
                    if (pvElecQueryDate.Year <= 2023 && pvElecQueryDate.Month == 1)
                    {
                        return;
                    }
                    pvElecQueryDate = pvElecQueryDate.AddMonths(-1);
                    queryTime_Day1 = pvElecQueryDate.Day;
                    infoView1_DateInfo_DateTextButton.Text = pvElecQueryDate.ToString("yyyy-MM");
                }
                else if (queryType1 == QueryType.custom_year)
                {
                    if (pvElecQueryDate.Year == 2023)
                    if (pvElecQueryDate.Year <= 2023)
                    {
                        return;
                    }
@@ -679,41 +681,38 @@
            };
            infoView1_DateInfo_NextClickButton.MouseUpEventHandler = (sender, e) =>
            {
                var tempQueryDate = new DateTime(queryTime_Year1, queryTime_Month1, queryTime_Day1);
                var pvElecQueryDate = new DateTime(queryTime_Year1, queryTime_Month1, queryTime_Day1);
                if (queryType1 == QueryType.day_hour)
                {
                    if (tempQueryDate.Year == DateTime.Now.Year && tempQueryDate.Month == DateTime.Now.Month && tempQueryDate.Day == DateTime.Now.Day)
                    if (pvElecQueryDate.Year == DateTime.Now.Year && pvElecQueryDate.Month == DateTime.Now.Month && pvElecQueryDate.Day == DateTime.Now.Day)
                    {
                        return;
                    }
                    tempQueryDate = tempQueryDate.AddDays(1);
                    infoView1_DateInfo_DateTextButton.Text = tempQueryDate.ToString("yyyy-MM-dd");
                    pvElecQueryDate = pvElecQueryDate.AddDays(1);
                    infoView1_DateInfo_DateTextButton.Text = pvElecQueryDate.ToString("yyyy-MM-dd");
                }
                else if (queryType1 == QueryType.custom_month)
                {
                    if (tempQueryDate.Year == DateTime.Now.Year && tempQueryDate.Month == DateTime.Now.Month)
                    if (pvElecQueryDate.Year == DateTime.Now.Year && pvElecQueryDate.Month == DateTime.Now.Month)
                    {
                        return;
                    }
                    tempQueryDate = tempQueryDate.AddMonths(1);
                    infoView1_DateInfo_DateTextButton.Text = tempQueryDate.ToString("yyyy-MM");
                    pvElecQueryDate = pvElecQueryDate.AddMonths(1);
                    queryTime_Day1 = pvElecQueryDate.Day;
                    infoView1_DateInfo_DateTextButton.Text = pvElecQueryDate.ToString("yyyy-MM");
                }
                else if (queryType1 == QueryType.custom_year)
                {
                    if (tempQueryDate.Year == 2023)
                    if (pvElecQueryDate.Year >= DateTime.Now.Year)
                    {
                        return;
                    }
                    if (tempQueryDate.Year == DateTime.Now.Year)
                    {
                        return;
                    pvElecQueryDate = pvElecQueryDate.AddYears(1);
                    infoView1_DateInfo_DateTextButton.Text = pvElecQueryDate.ToString("yyyy");
                    }
                    tempQueryDate = tempQueryDate.AddYears(1);
                    infoView1_DateInfo_DateTextButton.Text = tempQueryDate.ToString("yyyy");
                }
                queryTime_Year1 = tempQueryDate.Year;
                queryTime_Month1 = tempQueryDate.Month;
                queryTime_Day1 = tempQueryDate.Day;
                queryTime_Year1 = pvElecQueryDate.Year;
                queryTime_Month1 = pvElecQueryDate.Month;
                queryTime_Day1 = pvElecQueryDate.Day;
                getPvElectricityHistory();
            };
@@ -727,6 +726,12 @@
                infoView1_Date_Month.IsSelected = false;
                infoView1_Date_Year.IsSelected = false;
                queryType1 = QueryType.day_hour;
                if (DateTime.Now.Date < new DateTime(queryTime_Year1, queryTime_Month1, queryTime_Day1))
                {
                    queryTime_Year1 = DateTime.Now.Year;
                    queryTime_Month1 = DateTime.Now.Month;
                    queryTime_Day1 = DateTime.Now.Day;
                }
                infoView1_DateInfo_DateTextButton.Text = new DateTime(queryTime_Year1, queryTime_Month1, queryTime_Day1).ToString("yyyy-MM-dd");
                getPvElectricityHistory();
            };
@@ -740,6 +745,11 @@
                infoView1_Date_Month.IsSelected = true;
                infoView1_Date_Year.IsSelected = false;
                queryType1 = QueryType.custom_month;
                if (DateTime.Now.Date < new DateTime(queryTime_Year1, queryTime_Month1, queryTime_Day1))
                {
                    queryTime_Year1 = DateTime.Now.Year;
                    queryTime_Month1 = DateTime.Now.Month;
                }
                infoView1_DateInfo_DateTextButton.Text = new DateTime(queryTime_Year1, queryTime_Month1, queryTime_Day1).ToString("yyyy-MM");
                getPvElectricityHistory();
            };
@@ -766,7 +776,7 @@
                var waterQueryDate = new DateTime(queryTime_Year2, queryTime_Month2, queryTime_Day2);
                if (queryType2 == QueryType.day_hour)
                {
                    if (waterQueryDate.Year == 2023 && waterQueryDate.Month == 1 && waterQueryDate.Day == 1)
                    if (waterQueryDate.Year <= 2023 && waterQueryDate.Month == 1 && waterQueryDate.Day == 1)
                    {
                        return;
                    }
@@ -775,16 +785,17 @@
                }
                else if (queryType2 == QueryType.custom_month)
                {
                    if (waterQueryDate.Year == 2023 && waterQueryDate.Month == 1)
                    if (waterQueryDate.Year <= 2023 && waterQueryDate.Month == 1)
                    {
                        return;
                    }
                    waterQueryDate = waterQueryDate.AddMonths(-1);
                    queryTime_Day2 = waterQueryDate.Day;
                    infoView2_DateInfo_DateTextButton.Text = waterQueryDate.ToString("yyyy-MM");
                }
                else if (queryType2 == QueryType.custom_year)
                {
                    if (waterQueryDate.Year == 2023)
                    if (waterQueryDate.Year <= 2023)
                    {
                        return;
                    }
@@ -815,15 +826,12 @@
                        return;
                    }
                    waterQueryDate = waterQueryDate.AddMonths(1);
                    queryTime_Day2 = waterQueryDate.Day;
                    infoView2_DateInfo_DateTextButton.Text = waterQueryDate.ToString("yyyy-MM");
                }
                else if (queryType2 == QueryType.custom_year)
                {
                    if (waterQueryDate.Year == 2023)
                    {
                        return;
                    }
                    if (waterQueryDate.Year == DateTime.Now.Year)
                    if (waterQueryDate.Year >= DateTime.Now.Year)
                    {
                        return;
                    }
@@ -845,6 +853,12 @@
                infoView2_Date_Month.IsSelected = false;
                infoView2_Date_Year.IsSelected = false;
                queryType2 = QueryType.day_hour;
                if (DateTime.Now.Date < new DateTime(queryTime_Year2, queryTime_Month2, queryTime_Day2))
                {
                    queryTime_Year2 = DateTime.Now.Year;
                    queryTime_Month2 = DateTime.Now.Month;
                    queryTime_Day2 = DateTime.Now.Day;
                }
                infoView2_DateInfo_DateTextButton.Text = new DateTime(queryTime_Year2, queryTime_Month2, queryTime_Day2).ToString("yyyy-MM-dd");
                getLoadElectricityHistory();
            };
@@ -858,6 +872,11 @@
                infoView2_Date_Month.IsSelected = true;
                infoView2_Date_Year.IsSelected = false;
                queryType2 = QueryType.custom_month;
                if (DateTime.Now.Date < new DateTime(queryTime_Year2, queryTime_Month2, queryTime_Day2))
                {
                    queryTime_Year2 = DateTime.Now.Year;
                    queryTime_Month2 = DateTime.Now.Month;
                }
                infoView2_DateInfo_DateTextButton.Text = new DateTime(queryTime_Year2, queryTime_Month2, queryTime_Day2).ToString("yyyy-MM");
                getLoadElectricityHistory();
            };
@@ -990,6 +1009,19 @@
            };
            topView.AddChidren(btnConfrim);
            var btnToday = new Button()
            {
                X = Application.GetRealWidth(160 - 32) - btnConfrim.GetTextWidth(),
                Width = Application.GetRealWidth(160),
                TextAlignment = TextAlignment.CenterRight,
                TextColor = CSS_Color.MainColor,
                TextSize = CSS_FontSize.TextFontSize,
                Visible = false,
                Enable = false,
                Text = "今日",
            };
            topView.AddChidren(btnToday);
            UIPickerView uIPickerView = new UIPickerView()
            {
                Y = Application.GetRealHeight(40),
@@ -1015,6 +1047,10 @@
            };
            uIPickerView.OnSelectChangeEvent = (int1, int2, int3) =>
            {
                if (int1 < 0)
                {
                    int1 = 1;
                }
                if (pickerItems_Year[int1] != item1.ToString())
                {
                    int.TryParse(pickerItems_Year[int1], out item1);
@@ -1066,7 +1102,7 @@
                }
                if (pickerItems_Month != null)
                {
                    if (int2 > pickerItems_Month.Count)
                    if (int2 >= pickerItems_Month.Count || int2 < 0)
                    {
                        int2 = 0;
                    }
@@ -1093,16 +1129,22 @@
                                }
                            }
                        }
                        try
                        {
                        uIPickerView.setNPicker(pickerItems_Year, pickerItems_Month, pickerItems_Day);
                        uIPickerView.setCurrentItems(pickerItems_Year.IndexOf(item1.ToString()),
                            pickerItems_Month == null ? 0 : pickerItems_Month.IndexOf(item2.ToString()),
                            pickerItems_Day == null ? 0 : pickerItems_Day.IndexOf(item3.ToString()));
                    }
                        catch (Exception ex)
                        {
                            MainPage.Log("Error", $"金茂历史数据控件异常:{ex.Message}");
                        }
                    }
                }
                if (pickerItems_Day != null)
                {
                    if (int3 >= pickerItems_Day.Count)
                    if (int3 >= pickerItems_Day.Count || int3 < 0)
                    {
                        int3 = 0;
                    }
@@ -1123,7 +1165,7 @@
                    {
                        queryTime_Month1 = item2;
                    }
                    infoView1_DateInfo_DateTextButton.Text = new DateTime(queryTime_Year1, queryTime_Month1, queryTime_Day1).ToString("yyyy-MM");
                    infoView1_DateInfo_DateTextButton.Text = new DateTime(queryTime_Year1, queryTime_Month1, 1).ToString("yyyy-MM");
                    if (queryType1 == QueryType.day_hour)
                    {
                        if (item3 != queryTime_Day1)
@@ -1136,6 +1178,73 @@
                getPvElectricityHistory();
            };
            if (queryType1 == QueryType.day_hour)
            {
                try
                {
                    btnToday.Visible = btnToday.Enable = true;
                    btnToday.MouseUpEventHandler = (sender, e) =>
                    {
                        pickerItems_Year = new List<string>();
                        pickerItems_Year.Add("2023");
                        while (DateTime.Now.Year > 2022 + pickerItems_Year.Count)
                        {
                            pickerItems_Year.Add((2023 + pickerItems_Year.Count).ToString());
                        }
                        if (queryType1 == QueryType.custom_month || queryType1 == QueryType.day_hour)
                        {
                            pickerItems_Month = new List<string>();
                            if (queryTime_Year1 == DateTime.Now.Year)
                            {
                                int addMonth = 0;
                                while (DateTime.Now.Month > addMonth)
                                {
                                    addMonth++;
                                    pickerItems_Month.Add(addMonth.ToString());
                                }
                            }
                            else
                            {
                                for (var i = 1; i < 13; i++)
                                {
                                    pickerItems_Month.Add(i.ToString());
                                }
                            }
                            if (queryType1 == QueryType.day_hour)
                            {
                                pickerItems_Day = new List<string>();
                                if (queryTime_Month1 == DateTime.Now.Month)
                                {
                                    int addDay = 0;
                                    while (DateTime.Now.Day > addDay)
                                    {
                                        addDay++;
                                        pickerItems_Day.Add(addDay.ToString());
                                    }
                                }
                                else
                                {
                                    for (var i = 1; i <= DateTime.DaysInMonth(queryTime_Year1, queryTime_Month1); i++)
                                    {
                                        pickerItems_Day.Add(i.ToString());
                                    }
                                }
                            }
                        }
                        item3 = queryTime_Day1 = DateTime.Now.Day;
                        item2 = queryTime_Month1 = DateTime.Now.Month;
                        item1 = queryTime_Year1 = DateTime.Now.Year;
                        uIPickerView.setNPicker(pickerItems_Year, pickerItems_Month, pickerItems_Day);
                        uIPickerView.setCurrentItems(pickerItems_Year.IndexOf(queryTime_Year1.ToString()),
                            pickerItems_Month == null ? 0 : pickerItems_Month.IndexOf(queryTime_Month1.ToString()),
                            pickerItems_Day == null ? 0 : pickerItems_Day.IndexOf(queryTime_Day1.ToString()));
                    };
                }
                catch { }
            }
        }
        public void SetWaterQureyDateDialog()
@@ -1274,6 +1383,10 @@
            };
            uIPickerView.OnSelectChangeEvent = (int1, int2, int3) =>
            {
                if (int1 < 0)
                {
                    int1 = 0;
                }
                if (pickerItems_Year[int1] != item1.ToString())
                {
                    int.TryParse(pickerItems_Year[int1], out item1);
@@ -1325,7 +1438,7 @@
                }
                if (pickerItems_Month != null)
                {
                    if (int2 > pickerItems_Month.Count)
                    if (int2 > pickerItems_Month.Count || int2 < 0)
                    {
                        int2 = 0;
                    }
@@ -1361,7 +1474,7 @@
                }
                if (pickerItems_Day != null)
                {
                    if (int3 >= pickerItems_Day.Count)
                    if (int3 >= pickerItems_Day.Count || int3 < 0)
                    {
                        int3 = 0;
                    }
@@ -1382,7 +1495,7 @@
                    {
                        queryTime_Month2 = item2;
                    }
                    infoView2_DateInfo_DateTextButton.Text = new DateTime(queryTime_Year2, queryTime_Month2, queryTime_Day2).ToString("yyyy-MM");
                    infoView2_DateInfo_DateTextButton.Text = new DateTime(queryTime_Year2, queryTime_Month2, 1).ToString("yyyy-MM");
                    if (queryType2 == QueryType.day_hour)
                    {
                        if (item3 != queryTime_Day2)
@@ -1395,8 +1508,90 @@
                getLoadElectricityHistory();
            };
            var btnToday = new Button()
            {
                X = Application.GetRealWidth(160 - 32) - btnConfrim.GetTextWidth(),
                Width = Application.GetRealWidth(160),
                TextAlignment = TextAlignment.CenterRight,
                TextColor = CSS_Color.MainColor,
                TextSize = CSS_FontSize.TextFontSize,
                Visible = false,
                Enable = false,
                Text = "今日",
            };
            topView.AddChidren(btnToday);
            if (queryType2 == QueryType.day_hour)
            {
                try
                {
                    btnToday.Visible = btnToday.Enable = true;
                    btnToday.MouseUpEventHandler = (sender, e) =>
                    {
                        pickerItems_Year = new List<string>();
                        pickerItems_Year.Add("2023");
                        while (DateTime.Now.Year > 2022 + pickerItems_Year.Count)
                        {
                            pickerItems_Year.Add((2023 + pickerItems_Year.Count).ToString());
        }
                        if (queryType2 == QueryType.custom_month || queryType2 == QueryType.day_hour)
                        {
                            pickerItems_Month = new List<string>();
                            if (queryTime_Year2 == DateTime.Now.Year)
                            {
                                int addMonth = 0;
                                while (DateTime.Now.Month > addMonth)
                                {
                                    addMonth++;
                                    pickerItems_Month.Add(addMonth.ToString());
                                }
                            }
                            else
                            {
                                for (var i = 1; i < 13; i++)
                                {
                                    pickerItems_Month.Add(i.ToString());
                                }
                            }
                            if (queryType2 == QueryType.day_hour)
                            {
                                pickerItems_Day = new List<string>();
                                if (queryTime_Month2 == DateTime.Now.Month)
                                {
                                    int addDay = 0;
                                    while (DateTime.Now.Day > addDay)
                                    {
                                        addDay++;
                                        pickerItems_Day.Add(addDay.ToString());
                                    }
                                }
                                else
                                {
                                    for (var i = 1; i <= DateTime.DaysInMonth(queryTime_Year2, queryTime_Month2); i++)
                                    {
                                        pickerItems_Day.Add(i.ToString());
                                    }
                                }
                            }
                        }
                        item3 = queryTime_Day2 = DateTime.Now.Day;
                        item2 = queryTime_Month2 = DateTime.Now.Month;
                        item1 = queryTime_Year2 = DateTime.Now.Year;
                        uIPickerView.setNPicker(pickerItems_Year, pickerItems_Month, pickerItems_Day);
                        uIPickerView.setCurrentItems(pickerItems_Year.IndexOf(queryTime_Year2.ToString()),
                            pickerItems_Month == null ? 0 : pickerItems_Month.IndexOf(queryTime_Month2.ToString()),
                            pickerItems_Day == null ? 0 : pickerItems_Day.IndexOf(queryTime_Day2.ToString()));
                    };
                }
                catch { }
            }
        }
    }
HDL_ON/UI/UI2/FuntionControlView/Acst/InverterJinmaoPage.cs
@@ -10,7 +10,7 @@
{
    public class InverterJinmaoPage : FrameLayout
    {
        FrameLayout bodyView;
        static InverterJinmaoPage bodyView;
        Function function;
        /// <summary>
        /// 今日发电量数据按钮
@@ -39,7 +39,7 @@
        /// <summary>
        /// 光伏运行状态图标按钮
        /// </summary>
        Button pvRunStatus_IconButtonp;
        Button pvRunStatus_IconButton;
        /// <summary>
        /// 光伏运行状态文本按钮
        /// </summary>
@@ -63,7 +63,7 @@
        /// <summary>
        /// 光伏状态今日用电量数据按钮
        /// </summary>
        Button loadElec_TodayTextButton;
        Button powerUsage_TodayValuesButton;
        /// <summary>
        /// 光伏状态本月用电量数据按钮
        /// </summary>
@@ -203,7 +203,7 @@
#if __IOS__
            pvGenerate_TodayValuesButton.TextAlignment = TextAlignment.TopLeft;
            pvGenerate_TodayValuesButton.Width = pvGenerate_TodayValuesButton.GetTextWidth() + Application.GetRealWidth(6);
            pvGenerate_TodayValuesButton.Width = pvGenerate_TodayValuesButton.GetTextWidth() + Application.GetRealWidth(8);
#else
            pvGenerate_TodayValuesButton.TextAlignment = TextAlignment.BottomLeft;
            pvGenerate_TodayValuesButton.Y = Application.GetRealWidth(37);
@@ -213,12 +213,12 @@
            {
                Y = Application.GetRealWidth(43),
                Height = Application.GetRealWidth(17),
                Text = "kw",
                Text = "kwh",
                TextColor = CSS_Color.MainBackgroundColor,
                TextSize = 12,
                TextAlignment = TextAlignment.CenterLeft,
            };
            pvGenerate_todayUintButton.X = pvGenerate_TodayValuesButton.Right;
            pvGenerate_todayUintButton.X = pvGenerate_TodayValuesButton.Right - Application.GetRealWidth(2);
            electricityGenerationView.AddChidren(pvGenerate_todayUintButton);
            pvGenerate_TotalValuesButton = new Button()
@@ -276,7 +276,7 @@
            {
                Y = Application.GetRealWidth(43),
                Height = Application.GetRealWidth(17),
                Text = "kw",
                Text = "kwh",
                TextColor = CSS_Color.MainBackgroundColor,
                TextSize = 12,
                TextAlignment = TextAlignment.CenterRight,
@@ -377,7 +377,7 @@
            };
            pvEleGenerationInfoView.AddChidren(pvRunStatusInfoView);
            pvRunStatus_IconButtonp = new Button()
            pvRunStatus_IconButton = new Button()
            {
                X = Application.GetRealWidth(8 + 14),
                Gravity = Gravity.CenterVertical,
@@ -385,7 +385,7 @@
                Height = Application.GetRealWidth(12),
                UnSelectedImagePath = "FunctionIcon/Acst/Inverter/PvIconRun.png",
            };
            pvRunStatusInfoView.AddChidren(pvRunStatus_IconButtonp);
            pvRunStatusInfoView.AddChidren(pvRunStatus_IconButton);
            pvRunStatus_TextButton = new Button()
            {
@@ -417,12 +417,12 @@
                try
                {
                    int index = 1;
                    float pvPower = 0.00f;
                    while (index < 361)
                    {
                        if (function.GetAttrState(InverterJinmao_AttrEnum.pv_power.ToString()) == "0")
                        float.TryParse(function.GetAttrState(InverterJinmao_AttrEnum.pv_power.ToString()), out pvPower);
                        if (pvPower > 0.00f)
                        {
                            continue;
                        }
                        Application.RunOnMainThread(() =>
                        {
                            powerGenerationBg.SetRotation(1f * index++);
@@ -431,6 +431,7 @@
                        if (index == 361)
                        {
                            index = 1;
                            }
                        }
                    }
                }
@@ -465,7 +466,7 @@
                Y = Application.GetRealWidth(78),
                //Width = Application.GetRealWidth(100),
                Height = Application.GetRealWidth(25),
                Text = "实时发电功率 (kwh)",
                Text = "实时发电功率 (kw)",
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.TextualColor,
                TextSize = 12,
@@ -494,7 +495,7 @@
                Y = Application.GetRealWidth(220),
                Width = Application.GetRealWidth(100),
                Height = Application.GetRealWidth(17),
                Text = "今日发电量 (kw)",
                Text = "今日发电量 (kwh)",
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.TextualColor,
                TextSize = 12,
@@ -523,7 +524,7 @@
                Y = Application.GetRealWidth(220),
                Width = Application.GetRealWidth(100),
                Height = Application.GetRealWidth(17),
                Text = "本月发电量 (kw)",
                Text = "本月发电量 (kwh)",
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.TextualColor,
                TextSize = 12,
@@ -552,7 +553,7 @@
                Y = Application.GetRealWidth(220),
                Width = Application.GetRealWidth(100),
                Height = Application.GetRealWidth(17),
                Text = "本年发电量 (kw)",
                Text = "本年发电量 (kwh)",
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.TextualColor,
                TextSize = 12,
@@ -563,7 +564,7 @@
                try
                {
                    var revertObj = new HttpServerRequest().GetSensorHistory("custom_year",
                        function.deviceId, InverterJinmao_AttrEnum.load_electricity.ToString(), DateTime.Now.Year.ToString());
                        function.deviceId, InverterJinmao_AttrEnum.pv_electricity.ToString(), DateTime.Now.Year.ToString());
                    if (revertObj != null)
                    {
                        if (revertObj.Code == StateCode.SUCCESS)
@@ -643,12 +644,12 @@
                try
                {
                    int index = 1;
                    float loadPower = 0.00f;
                    while (index < 361)
                    {
                        if (function.GetAttrState(InverterJinmao_AttrEnum.load_active_power.ToString()) == "0")
                        float.TryParse(function.GetAttrState(InverterJinmao_AttrEnum.load_active_power.ToString()), out loadPower);
                        if (loadPower > 0.00f)
                        {
                            continue;
                        }
                        Application.RunOnMainThread(() =>
                        {
                            powerUsageBg.SetRotation(1f * index++);
@@ -657,6 +658,7 @@
                        if (index == 361)
                        {
                            index = 1;
                            }
                        }
                    }
                }
@@ -687,7 +689,7 @@
                Y = Application.GetRealWidth(78),
                //Width = Application.GetRealWidth(100),
                Height = Application.GetRealWidth(25),
                Text = "实时用电功率 (kwh)",
                Text = "实时用电功率 (kw)",
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.TextualColor,
                TextSize = 12,
@@ -695,7 +697,7 @@
            powerUsageView.AddChidren(powerUsage_TextButton);
            var powerUsage_TodayValuesButton = new Button()
            powerUsage_TodayValuesButton = new Button()
            {
                X = Application.GetRealWidth(16),
                Y = Application.GetRealWidth(191),
@@ -709,13 +711,13 @@
            };
            electricityUsageStatusView.AddChidren(powerUsage_TodayValuesButton);
            loadElec_TodayTextButton = new Button()
            var loadElec_TodayTextButton = new Button()
            {
                X = Application.GetRealWidth(16),
                Y = Application.GetRealWidth(220),
                Width = Application.GetRealWidth(100),
                Height = Application.GetRealWidth(17),
                Text = "今日用电量 (kw)",
                Text = "今日用电量 (kwh)",
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.TextualColor,
                TextSize = 12,
@@ -742,7 +744,7 @@
                Y = Application.GetRealWidth(220),
                Width = Application.GetRealWidth(100),
                Height = Application.GetRealWidth(17),
                Text = "本月用电量 (kw)",
                Text = "本月用电量 (kwh)",
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.TextualColor,
                TextSize = 12,
@@ -770,17 +772,64 @@
                Y = Application.GetRealWidth(220),
                Width = Application.GetRealWidth(100),
                Height = Application.GetRealWidth(17),
                Text = "本年用电量 (kw)",
                Text = "本年用电量 (kwh)",
                TextAlignment = TextAlignment.Center,
                TextColor = CSS_Color.TextualColor,
                TextSize = 12,
            };
            electricityUsageStatusView.AddChidren(powerUsage_YearTextButton);
            new System.Threading.Thread(() =>
            {
                try
                {
                    var revertObj = new HttpServerRequest().GetSensorHistory("custom_year",
                        function.deviceId, InverterJinmao_AttrEnum.load_electricity.ToString(), DateTime.Now.Year.ToString());
                    if (revertObj != null)
                    {
                        if (revertObj.Code == StateCode.SUCCESS)
                        {
                            var revertData = Newtonsoft.Json.JsonConvert.DeserializeObject<List<EnvironmentalSensorHistor>>(revertObj.Data.ToString());
                            double totalValues = 0.0;
                            double values = 0.0;
                            foreach (var data in revertData)
                            {
                                double.TryParse(data.fieldValue, out values);
                                totalValues += values;
                            }
                            Application.RunOnMainThread(() =>
                            {
                                powerUsage_YearValuesButton.Text = totalValues.ToString();
                                while (true)
                                {
                                    if (powerUsage_YearValuesButton.Width < powerUsage_YearValuesButton.GetTextWidth())
                                    {
                                        powerUsage_YearValuesButton.TextSize--;
                                    }
                                    else
                                    {
                                        break;
                                    }
                                }
                            });
                        }
                    }
                }
                catch (Exception ex)
                {
                    MainPage.Log("Error", "读取金茂本年发电量数据异常:" + ex.Message);
                }
            })
            { IsBackground = true }.Start();
            #endregion
            #endregion
            if (function.attributes.Find((obj) => obj.key == InverterJinmao_AttrEnum.ess_status.ToString()) != null)
            {
            contentView.AddChidren(new Button()
            {
                Height = Application.GetRealWidth(8)
@@ -907,7 +956,7 @@
                Y = Application.GetRealWidth(76),
                Height = Application.GetRealWidth(17),
                TextAlignment = TextAlignment.Center,
                Text = "实时充电功率(kwh)",
                    Text = "实时充电功率(kw)",
                TextColor = CSS_Color.TextualColor,
                TextSize = 12,
            };
@@ -948,11 +997,11 @@
            esRunStatus_DischargeValuesView.AddChidren(esRunStatus_DischargeTextButton);
            #endregion
            #endregion
            #endregion
            }
            contentView.AddChidren(new Button()
            {
@@ -1026,6 +1075,9 @@
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextAlignment = TextAlignment.BottomLeft,
            };
#if __IOS__
            socialContribution_Info1_UintButton.Y = Application.GetRealWidth(66);
#endif
            socialContribution_InfoView_1.AddChidren(socialContribution_Info1_UintButton);
            var socialContribution_Info1_TipButton = new Button()
@@ -1092,6 +1144,9 @@
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextAlignment = TextAlignment.BottomLeft,
            };
#if __IOS__
            socialContribution_Info2_UintButton.Y = Application.GetRealWidth(66);
#endif
            socialContribution_InfoView_2.AddChidren(socialContribution_Info2_UintButton);
            var socialContribution_Info2_TipButton = new Button()
@@ -1158,6 +1213,9 @@
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextAlignment = TextAlignment.BottomLeft,
            };
            #if __IOS__
            socialContribution_Info3_UintButton.Y = Application.GetRealWidth(66);
            #endif
            socialContribution_InfoView_3.AddChidren(socialContribution_Info3_UintButton);
            var socialContribution_Info3_TipButton = new Button()
@@ -1184,7 +1242,7 @@
        /// 更新界面数据
        /// </summary>
        /// <param name="temp"></param>
        public void UpdateStatus(Function temp)
        public static void UpdateStatus(Function temp)
        {
            if (bodyView == null)
            {
@@ -1195,38 +1253,38 @@
                try
                {
                    /// 更新今日发电量
                    upatePvGenerateTodayValues();
                    bodyView.upatePvGenerateTodayValues();
                    /// 更新累计发电量
                    upatePvGenerateTotalValues();
                    bodyView.upatePvGenerateTotalValues();
                    /// 更新今日用电量
                    upatePvLoadTodayValues();
                    bodyView.upatePvLoadTodayValues();
                    /// 更新累计用电量
                    upatePvLoadTotalValues();
                    bodyView.upatePvLoadTotalValues();
                    /// 更新光伏运行状态
                    upatePvRunStatus();
                    bodyView.upatePvRunStatus();
                    /// 更新光伏发电功率
                    updatePvPower();
                    bodyView.updatePvPower();
                    /// 更新光伏本月发电量
                    upatePvGenerateMonthValues();
                    bodyView.upatePvGenerateMonthValues();
                    /// 更新光伏用电功率
                    updateLoadElec();
                    bodyView.updateLoadElec();
                    ///更新光伏状态本月用电量
                    updateLoadElecMonthValues();
                    bodyView.updateLoadElecMonthValues();
                    //更新储能运行状态
                    updateEsRunStates();
                    bodyView.updateEsRunStates();
                    //更新储能电池百分比
                    updateEsBatterySoc();
                    bodyView.updateEsBatterySoc();
                    //更新储能实时充电状态
                    updateEsCharge();
                    bodyView.updateEsCharge();
                    //更新储能实时放电状态
                    updateEsDischarge();
                    updateSocialContribution1();
                    updateSocialContribution2();
                    updateSocialContribution3();
                    bodyView.updateEsDischarge();
                    bodyView.updateSocialContribution1();
                    bodyView.updateSocialContribution2();
                    bodyView.updateSocialContribution3();
                }
                catch (Exception ex)
                {
                    MainPage.Log("Error", $"金茂光伏更新异常:{ex.Message}");
                    MainPage.Log("Error", $"金茂光伏更新异常:{ex.StackTrace}");
                }
            });
        }
@@ -1251,14 +1309,14 @@
        /// </summary>
        private void upatePvGenerateTotalValues()
        {
            pvGenerate_TodayValuesButton.Text = "累计发电量:" + function.GetAttrState(InverterJinmao_AttrEnum.pv_electricity.ToString());
            pvGenerate_TotalValuesButton.Text = "累计发电量:" + function.GetAttrState(InverterJinmao_AttrEnum.pv_electricity.ToString());
        }
        /// <summary>
        /// 更新今日用电量
        /// </summary>
        private void upatePvLoadTodayValues()
        {
            pvLoad_TodayValuesButton.Text = loadElec_TodayTextButton.Text = function.GetAttrState(InverterJinmao_AttrEnum.load_electricity_today.ToString());
            pvLoad_TodayValuesButton.Text = powerUsage_TodayValuesButton.Text = function.GetAttrState(InverterJinmao_AttrEnum.load_electricity_today.ToString());
        }
        /// <summary>
        /// 更新本月用电量
@@ -1284,19 +1342,19 @@
            {
                case "run":
                    pvRunStatusInfoView.BackgroundColor = 0x154484F4;
                    pvRunStatus_IconButtonp.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/PvIconRun.png";
                    pvRunStatus_IconButton.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/PvIconRun.png";
                    pvRunStatus_TextButton.Text = "运行";
                    pvRunStatus_TextButton.TextColor = 0xFF4484F4;
                    break;
                case "fault":
                    pvRunStatusInfoView.BackgroundColor = 0x15FF4747;
                    pvRunStatus_IconButtonp.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/PvIconFault.png";
                    pvRunStatus_IconButton.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/PvIconFault.png";
                    pvRunStatus_TextButton.Text = "故障";
                    pvRunStatus_TextButton.TextColor = 0xFFFF4747;
                    break;
                case "standby":
                    pvRunStatusInfoView.BackgroundColor = 0x15798394;
                    pvRunStatus_IconButtonp.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/PvIconStandby.png";
                    pvRunStatus_IconButton.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/PvIconStandby.png";
                    pvRunStatus_TextButton.Text = "待机";
                    pvRunStatus_TextButton.TextColor = 0xFF798394;
                    break;
@@ -1322,11 +1380,13 @@
        /// </summary>
        private void updateEsRunStates()
        {
            if (function.attributes.Find((obj) => obj.key == InverterJinmao_AttrEnum.ess_status.ToString()) != null)
            {
            switch (function.GetAttrState(InverterJinmao_AttrEnum.ess_status.ToString()))
            {
                case "charge":
                    esStatus_InfoView.BackgroundColor = 0x1500C22D;
                    esRunStatus_BatteryValuesButton.TextColor = 0xFF00C22D;
                        esRunStatus_Info_TextButton.TextColor = esRunStatus_BatteryValuesButton.TextColor = 0xFF00C22D;
                    esRunStatus_Info_IconButton.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/EsIconCharg.png";
                    esRunStatus_Info_TextButton.Text = "充电";
                    esRunStatus_BatteryIconButton.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/BatteryIconCharg.png";
@@ -1334,7 +1394,7 @@
                    break;
                case "discharge":
                    esStatus_InfoView.BackgroundColor = 0x15FC9C04;
                    esRunStatus_BatteryValuesButton.TextColor = 0xFFFC9C04;
                        esRunStatus_Info_TextButton.TextColor = esRunStatus_BatteryValuesButton.TextColor = 0xFFFC9C04;
                    esRunStatus_Info_IconButton.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/EsIconDischarge.png";
                    esRunStatus_Info_TextButton.Text = "放电";
                    esRunStatus_BatteryIconButton.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/BatteryIconDischarg.png";
@@ -1342,7 +1402,7 @@
                    break;
                case "shutdown":
                    esStatus_InfoView.BackgroundColor = 0x15798394;
                    esRunStatus_BatteryValuesButton.TextColor = 0xFF798394;
                        esRunStatus_Info_TextButton.TextColor = esRunStatus_BatteryValuesButton.TextColor = 0xFF798394;
                    esRunStatus_Info_IconButton.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/EsIconShutdown.png";
                    esRunStatus_Info_TextButton.Text = "停机";
                    esRunStatus_BatteryIconButton.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/BatteryIconShutdown.png";
@@ -1350,7 +1410,7 @@
                    break;
                case "fault":
                    esStatus_InfoView.BackgroundColor = 0x15FF4747;
                    esRunStatus_BatteryValuesButton.TextColor = 0xFFFF4747;
                        esRunStatus_Info_TextButton.TextColor = esRunStatus_BatteryValuesButton.TextColor = 0xFFFF4747;
                    esRunStatus_Info_IconButton.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/EsIconFault.png";
                    esRunStatus_Info_TextButton.Text = "故障";
                    esRunStatus_BatteryIconButton.UnSelectedImagePath = "FunctionIcon/Acst/Inverter/BatteryIconFault.png";
@@ -1358,10 +1418,13 @@
                    break;
            }
        }
        }
        /// <summary>
        /// 更新储能电池百分比状态
        /// </summary>
        private void updateEsBatterySoc()
        {
            if (function.attributes.Find((obj) => obj.key == InverterJinmao_AttrEnum.ess_status.ToString()) != null)
        {
            esRunStatus_BatteryValuesButton.Text = function.GetAttrState(InverterJinmao_AttrEnum.battery_soc.ToString()) + "%";
            if(esRunStatus_BatteryIconButton.Text == "100%")
@@ -1369,56 +1432,65 @@
                esRunStatus_BatteryIconButton.IsSelected = true;
            }
        }
        }
        /// <summary>
        /// 更新储能实时充电状态
        /// </summary>
        private void updateEsCharge()
        {
            if (function.attributes.Find((obj) => obj.key == InverterJinmao_AttrEnum.ess_status.ToString()) != null)
            {
            esRunStatus_ChargeValuesButton.Text = function.GetAttrState(InverterJinmao_AttrEnum.ess_charge_power.ToString());
            }
        }
        /// <summary>
        /// 更新储能实时放电状态
        /// </summary>
        private void updateEsDischarge()
        {
            if (function.attributes.Find((obj) => obj.key == InverterJinmao_AttrEnum.ess_status.ToString()) != null)
            {
            esRunStatus_DischargeValuesButton.Text = function.GetAttrState(InverterJinmao_AttrEnum.ess_discharg_power.ToString());
        }
        }
        /// <summary>
        /// 更新社会贡献1数据UI
        /// </summary>
        private void updateSocialContribution1()
        {
            socialContribution_Info1_ValuesButton.Text = function.GetAttrState(InverterJinmao_AttrEnum.coal.ToString());
#if __IOS__
            socialContribution_Info1_ValuesButton.Width = socialContribution_Info1_ValuesButton.GetTextWidth() + Application.GetRealWidth(8);
#else
            socialContribution_Info1_ValuesButton.Width = socialContribution_Info1_ValuesButton.GetTextWidth();
#endif
            if (socialContribution_Info1_ValuesButton.Width > Application.GetRealWidth(61))
            {
                socialContribution_Info1_ValuesButton.TextSize = socialContribution_Info1_ValuesButton.TextSize - 4;
                socialContribution_Info1_ValuesButton.TextSize = 14;
                socialContribution_Info1_ValuesButton.Width = socialContribution_Info1_ValuesButton.GetTextWidth();
                socialContribution_Info1_UintButton.Height = Application.GetRealWidth(25);
            }
#if __IOS__
            socialContribution_Info1_ValuesButton.Width += Application.GetRealWidth(6);
            socialContribution_Info1_UintButton.X = socialContribution_Info1_ValuesButton.Right - Application.GetRealWidth(4);
#else
            socialContribution_Info1_UintButton.X = socialContribution_Info1_ValuesButton.Right +Application.GetRealWidth(2);
#endif
        }
        /// <summary>
        /// 更新社会贡2献数据UI
        /// </summary>
        private void updateSocialContribution2()
        {
            socialContribution_Info2_ValuesButton.Text = function.GetAttrState(InverterJinmao_AttrEnum.co2.ToString());
#if __IOS__
            socialContribution_Info2_ValuesButton.Width = socialContribution_Info2_ValuesButton.GetTextWidth() + Application.GetRealWidth(8);
#else
            socialContribution_Info2_ValuesButton.Text = function.GetAttrState(WaterHeaterJinmao_AttrEnum.co2.ToString());
            socialContribution_Info2_ValuesButton.Width = socialContribution_Info2_ValuesButton.GetTextWidth();
#endif
            if (socialContribution_Info2_UintButton.Width > Application.GetRealWidth(61))
            if (socialContribution_Info2_ValuesButton.Width > Application.GetRealWidth(61))
            {
                socialContribution_Info2_UintButton.TextSize = socialContribution_Info2_UintButton.TextSize - 4;
                socialContribution_Info2_ValuesButton.TextSize = 14;
                socialContribution_Info2_ValuesButton.Width = socialContribution_Info2_ValuesButton.GetTextWidth();
            }
#if __IOS__
            socialContribution_Info2_ValuesButton.Width += Application.GetRealWidth(6);
            socialContribution_Info2_UintButton.X = socialContribution_Info2_ValuesButton.Right - Application.GetRealWidth(4);
#else
            socialContribution_Info2_UintButton.X = socialContribution_Info2_ValuesButton.Right +Application.GetRealWidth(2);
#endif
        }
        /// <summary>
@@ -1426,18 +1498,20 @@
        /// </summary>
        private void updateSocialContribution3()
        {
            socialContribution_Info3_ValuesButton.Text = function.GetAttrState(InverterJinmao_AttrEnum.trees.ToString());
#if __IOS__
            socialContribution_Info3_ValuesButton.Width = socialContribution_Info3_ValuesButton.GetTextWidth() + Application.GetRealWidth(8);
#else
            socialContribution_Info3_ValuesButton.Text = function.GetAttrState(WaterHeaterJinmao_AttrEnum.trees.ToString());
            socialContribution_Info3_ValuesButton.Width = socialContribution_Info3_ValuesButton.GetTextWidth();
#endif
            if (socialContribution_Info3_ValuesButton.Width > Application.GetRealWidth(61))
            {
                socialContribution_Info3_ValuesButton.TextSize = socialContribution_Info3_ValuesButton.TextSize - 4;
                socialContribution_Info3_ValuesButton.TextSize = 14;
                socialContribution_Info3_ValuesButton.Width = socialContribution_Info3_ValuesButton.GetTextWidth();
                socialContribution_Info3_UintButton.Height = Application.GetRealWidth(25);
            }
#if __IOS__
            socialContribution_Info3_ValuesButton.Width += Application.GetRealWidth(6);
            socialContribution_Info3_UintButton.X = socialContribution_Info3_ValuesButton.Right - Application.GetRealWidth(4);
#else
            socialContribution_Info3_UintButton.X = socialContribution_Info3_ValuesButton.Right +Application.GetRealWidth(2);
#endif
        }
    }
}
HDL_ON/UI/UI2/FuntionControlView/Acst/WaterHeaterJinmaoPage.cs
@@ -180,9 +180,10 @@
            initContentView();
            initBottomView();
            initControlEvent();
            Control.Ins.SendReadCommand(function);
            UpdateStatus();
            Control.Ins.SendReadCommand(function);
        }
        /// <summary>
        /// 加载内容区域
@@ -505,6 +506,9 @@
            setTempView.AddChidren(setTemp_Temp_MaxValuesTextButton);
            #endregion
            if (function.attributes.Find((obj) => obj.key == WaterHeaterJinmao_AttrEnum.flow.ToString()) != null)
            {
            contentView.AddChidren(new Button()
            {
                Height = Application.GetRealWidth(12),
@@ -676,6 +680,7 @@
            flowView.AddChidren(flow_ElectricDriveValuesButton);
            #endregion
            }
            contentView.AddChidren(new Button()
            {
@@ -816,6 +821,9 @@
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextAlignment = TextAlignment.BottomLeft,
            };
#if __IOS__
            socialContribution_Info2_UintButton.Y = Application.GetRealWidth(66);
#endif
            socialContribution_InfoView_2.AddChidren(socialContribution_Info2_UintButton);
            var socialContribution_Info2_TipButton = new Button()
@@ -882,6 +890,9 @@
                TextColor = CSS_Color.FirstLevelTitleColor,
                TextAlignment = TextAlignment.BottomLeft,
            };
#if __IOS__
            socialContribution_Info3_UintButton.Y = Application.GetRealWidth(66);
#endif
            socialContribution_InfoView_3.AddChidren(socialContribution_Info3_UintButton);
            var socialContribution_Info3_TipButton = new Button()
@@ -991,7 +1002,12 @@
            setTemp_ValuesButton.Width = setTemp_ValuesButton.GetTextWidth();
#endif
                setTemp_ValuesButton.Gravity = Gravity.CenterHorizontal;
#if __IOS__
                setTemp_UintButton.X = setTemp_ValuesButton.Right - Application.GetRealWidth(4);
#else
                setTemp_UintButton.X = setTemp_ValuesButton.Right + Application.GetRealWidth(4);
#endif
                new System.Threading.Thread(() =>
                {
                    var dic = new Dictionary<string, string>();
@@ -1035,6 +1051,8 @@
            //免费热水
            Application.RunOnMainThread(() =>
            {
                try
                {
                bodyView.updateFreeMode();
                bodyView.updateTemp();
                bodyView.updateModeUI();
@@ -1045,6 +1063,10 @@
                bodyView.updateSocialContribution2();
                bodyView.updateSocialContribution3();
                bodyView.updatePowerButton();
                }catch  (Exception ex)
                {
                    MainPage.Log("Error", $"金茂热水控件更新异常:{ex.Message}");
                }
            });
        }
@@ -1084,8 +1106,11 @@
                btnTempValues.TextSize = 28;
            }
            btnTempValues.Gravity = Gravity.CenterHorizontal;
#if __IOS__
            btnTempValuesUint.X = btnTempValues.Right - Application.GetRealWidth(4);
#else
            btnTempValuesUint.X = btnTempValues.Right ;
#endif
        }
        /// <summary>
@@ -1137,8 +1162,11 @@
#endif
            setTemp_ValuesButton.Gravity = Gravity.CenterHorizontal;
#if __IOS__
            setTemp_UintButton.X = setTemp_ValuesButton.Right - Application.GetRealWidth(4);
#else
            setTemp_UintButton.X = setTemp_ValuesButton.Right + Application.GetRealWidth(4);
#endif
            double dd = 35;
            double.TryParse(function.GetAttrState(WaterHeaterJinmao_AttrEnum.set_temp.ToString(), "0"), out dd);
@@ -1151,7 +1179,10 @@
        /// </summary>
        private void updateFlow()
        {
            if (function.attributes.Find((obj) => obj.key == WaterHeaterJinmao_AttrEnum.flow.ToString()) != null)
            {
            flow_ValuesButton.Text = "热水流量:" + function.GetAttrState(WaterHeaterJinmao_AttrEnum.flow.ToString()) + "L/min";
            }
        }
        /// <summary>
@@ -1159,6 +1190,14 @@
        /// </summary>
        private void updateVolume()
        {
            if (function.attributes.Find((obj) => obj.key == WaterHeaterJinmao_AttrEnum.volume.ToString()) == null)
            {
                return;
            }
            if (function.attributes.Find((obj) => obj.key == WaterHeaterJinmao_AttrEnum.recycl_volume.ToString()) == null)
            {
                return;
            }
            volumeString = function.GetAttrState(WaterHeaterJinmao_AttrEnum.volume.ToString());
            recyclVolumeString = function.GetAttrState(WaterHeaterJinmao_AttrEnum.recycl_volume.ToString());
            volume = 0;
@@ -1183,23 +1222,16 @@
        private void updateSocialContribution1()
        {
            socialContribution_Info1_ValuesButton.Text = function.GetAttrState(WaterHeaterJinmao_AttrEnum.energy_electricity.ToString());
#if __IOS__
            socialContribution_Info1_ValuesButton.Width = socialContribution_Info1_ValuesButton.GetTextWidth() + Application.GetRealWidth(8);
#else
            socialContribution_Info1_ValuesButton.Width = socialContribution_Info1_ValuesButton.GetTextWidth();
#endif
            if (socialContribution_Info1_ValuesButton.Width > Application.GetRealWidth(61))
            {
                socialContribution_Info1_ValuesButton.TextSize = 14;
#if __IOS__
                socialContribution_Info1_ValuesButton.Width = socialContribution_Info1_ValuesButton.GetTextWidth() + Application.GetRealWidth(8);
#else
            socialContribution_Info1_ValuesButton.Width = socialContribution_Info1_ValuesButton.GetTextWidth();
#endif
                socialContribution_Info1_UintButton.Height = Application.GetRealWidth(25);
            }
#if __IOS__
            socialContribution_Info1_UintButton.X = socialContribution_Info1_ValuesButton.Right ;
            socialContribution_Info1_ValuesButton.Width += Application.GetRealWidth(6);
            socialContribution_Info1_UintButton.X = socialContribution_Info1_ValuesButton.Right - Application.GetRealWidth(4);
#else
            socialContribution_Info1_UintButton.X = socialContribution_Info1_ValuesButton.Right +Application.GetRealWidth(2);
#endif
@@ -1210,23 +1242,15 @@
        private void updateSocialContribution2()
        {
            socialContribution_Info2_ValuesButton.Text = function.GetAttrState(WaterHeaterJinmao_AttrEnum.co2.ToString());
#if __IOS__
            socialContribution_Info2_ValuesButton.Width = socialContribution_Info2_ValuesButton.GetTextWidth() + Application.GetRealWidth(8);
#else
            socialContribution_Info2_ValuesButton.Width = socialContribution_Info2_ValuesButton.GetTextWidth();
#endif
            if (socialContribution_Info2_ValuesButton.Width > Application.GetRealWidth(61))
            {
                socialContribution_Info2_ValuesButton.TextSize = 14;
#if __IOS__
                socialContribution_Info2_ValuesButton.Width = socialContribution_Info2_ValuesButton.GetTextWidth() + Application.GetRealWidth(8);
#else
            socialContribution_Info2_ValuesButton.Width = socialContribution_Info2_ValuesButton.GetTextWidth();
#endif
                socialContribution_Info2_UintButton.Y = socialContribution_Info2_UintButton.Y - Application.GetRealWidth(4);
            }
#if __IOS__
            socialContribution_Info2_UintButton.X = socialContribution_Info2_ValuesButton.Right;
            socialContribution_Info2_ValuesButton.Width += Application.GetRealWidth(6);
            socialContribution_Info2_UintButton.X = socialContribution_Info2_ValuesButton.Right - Application.GetRealWidth(4);
#else
            socialContribution_Info2_UintButton.X = socialContribution_Info2_ValuesButton.Right +Application.GetRealWidth(2);
#endif
@@ -1237,24 +1261,17 @@
        /// </summary>
        private void updateSocialContribution3()
        {
            socialContribution_Info3_ValuesButton.Text = function.GetAttrState(WaterHeaterJinmao_AttrEnum.trees.ToString());
#if __IOS__
            socialContribution_Info3_ValuesButton.Width = socialContribution_Info3_ValuesButton.GetTextWidth() + Application.GetRealWidth(8);
#else
            socialContribution_Info3_ValuesButton.Width = socialContribution_Info3_ValuesButton.GetTextWidth();
#endif
            if (socialContribution_Info3_ValuesButton.Width > Application.GetRealWidth(61))
            {
                socialContribution_Info3_ValuesButton.TextSize = 14;
#if __IOS__
                socialContribution_Info3_ValuesButton.Width = socialContribution_Info3_ValuesButton.GetTextWidth() + Application.GetRealWidth(8);
#else
            socialContribution_Info3_ValuesButton.Width = socialContribution_Info3_ValuesButton.GetTextWidth();
#endif
                //socialContribution_Info3_UintButton.Height = Application.GetRealWidth(23);
            }
#if __IOS__
            socialContribution_Info3_UintButton.X = socialContribution_Info3_ValuesButton.Right;
            socialContribution_Info3_ValuesButton.Width += Application.GetRealWidth(6);
            socialContribution_Info3_UintButton.X = socialContribution_Info3_ValuesButton.Right - Application.GetRealWidth(4);
#else
            socialContribution_Info3_UintButton.X = socialContribution_Info3_ValuesButton.Right +Application.GetRealWidth(2);
#endif
HDL_ON/UI/UI2/FuntionControlView/Acst/WetarHeaterJinmaoHistoryPage.cs
@@ -269,6 +269,9 @@
                Height = Application.GetRealWidth(16)
            });
            if (function.attributes.Find((obj) => obj.key == WaterHeaterJinmao_AttrEnum.volume.ToString()) != null)
            {
            #region 用水量
            infoView2 = new FrameLayout()
@@ -468,7 +471,7 @@
            #endregion
            }
            contentView.AddChidren(new Button()
            {
@@ -566,6 +569,10 @@
            {
                return;
            }
            if (function.attributes.Find((obj) => obj.key == WaterHeaterJinmao_AttrEnum.volume.ToString()) == null)
            {
                return;
            }
            var loadPage = new Loading()
            {
                LodingBackgroundColor = 0x88888888,
@@ -637,7 +644,8 @@
            {
                SetTempQureyDateDialog();
            };
            infoView1_DateInfo_PreClickButton.MouseUpEventHandler = (sender, e) => {
            infoView1_DateInfo_PreClickButton.MouseUpEventHandler = (sender, e) =>
            {
                var tempQueryDate = new DateTime(tempQueryTime_Year,tempQueryTime_Month,tempQueryTime_Day);
                if (tempQueryType == QueryType.day_hour)
                {
@@ -655,11 +663,12 @@
                        return;
                    }
                    tempQueryDate = tempQueryDate.AddMonths(-1);
                    tempQueryTime_Day = tempQueryDate.Day;
                infoView1_DateInfo_DateTextButton.Text = tempQueryDate.ToString("yyyy-MM");
                }
                else if(tempQueryType == QueryType.custom_year)
                {
                    if (tempQueryDate.Year == 2023)
                    if (tempQueryDate.Year <= 2023)
                    {
                        return;
                    }
@@ -671,11 +680,12 @@
                tempQueryTime_Day = tempQueryDate.Day;
                getTempHistory();
            };
            infoView1_DateInfo_NextClickButton.MouseUpEventHandler = (sender, e) => {
            infoView1_DateInfo_NextClickButton.MouseUpEventHandler = (sender, e) =>
            {
                var tempQueryDate = new DateTime(tempQueryTime_Year, tempQueryTime_Month, tempQueryTime_Day);
                if (tempQueryType == QueryType.day_hour)
                {
                    if (tempQueryDate.Year == DateTime.Now.Year && tempQueryDate.Month == DateTime.Now.Month && tempQueryDate.Day == DateTime.Now.Day)
                    if (tempQueryDate.Year >= DateTime.Now.Year && tempQueryDate.Month >= DateTime.Now.Month && tempQueryDate.Day >= DateTime.Now.Day)
                    {
                        return;
                    }
@@ -684,16 +694,17 @@
                }
                else if (tempQueryType == QueryType.custom_month)
                {
                    if (tempQueryDate.Year == DateTime.Now.Year && tempQueryDate.Month == DateTime.Now.Month )
                    if (tempQueryDate.Year >= DateTime.Now.Year && tempQueryDate.Month >= DateTime.Now.Month)
                    {
                        return;
                    }
                    tempQueryDate = tempQueryDate.AddMonths(1);
                    tempQueryTime_Day = tempQueryDate.Day;
                infoView1_DateInfo_DateTextButton.Text = tempQueryDate.ToString("yyyy-MM");
                }
                else if (tempQueryType == QueryType.custom_year)
                {
                    if (tempQueryDate.Year == DateTime.Now.Year)
                    if (tempQueryDate.Year >= DateTime.Now.Year)
                    {
                        return;
                    }
@@ -706,7 +717,8 @@
                getTempHistory();
            };
            infoView1_Date_Day.MouseUpEventHandler = (sender, e) => {
            infoView1_Date_Day.MouseUpEventHandler = (sender, e) =>
            {
                if (infoView1_Date_Day.IsSelected)
                {
                    return;
@@ -715,10 +727,17 @@
                infoView1_Date_Month.IsSelected = false;
                infoView1_Date_Year.IsSelected = false;
                tempQueryType = QueryType.day_hour;
                if (DateTime.Now.Date < new DateTime(tempQueryTime_Year, tempQueryTime_Month, tempQueryTime_Day))
                {
                    tempQueryTime_Year = DateTime.Now.Year;
                    tempQueryTime_Month = DateTime.Now.Month;
                    tempQueryTime_Day = DateTime.Now.Day;
                }
                infoView1_DateInfo_DateTextButton.Text = new DateTime(tempQueryTime_Year, tempQueryTime_Month, tempQueryTime_Day).ToString("yyyy-MM-dd");
                getTempHistory();
            };
            infoView1_Date_Month.MouseUpEventHandler = (sender, e) => {
            infoView1_Date_Month.MouseUpEventHandler = (sender, e) =>
            {
                if (infoView1_Date_Month.IsSelected)
                {
                    return;
@@ -727,10 +746,16 @@
                infoView1_Date_Month.IsSelected = true;
                infoView1_Date_Year.IsSelected = false;
                tempQueryType = QueryType.custom_month;
                if (DateTime.Now.Date < new DateTime(tempQueryTime_Year, tempQueryTime_Month, tempQueryTime_Day))
                {
                    tempQueryTime_Year = DateTime.Now.Year;
                    tempQueryTime_Month = DateTime.Now.Month;
                }
                infoView1_DateInfo_DateTextButton.Text = new DateTime(tempQueryTime_Year, tempQueryTime_Month, tempQueryTime_Day).ToString("yyyy-MM");
                getTempHistory();
            };
            infoView1_Date_Year.MouseUpEventHandler = (sender, e) => {
            infoView1_Date_Year.MouseUpEventHandler = (sender, e) =>
            {
                if (infoView1_Date_Year.IsSelected)
                {
                    return;
@@ -743,11 +768,15 @@
                getTempHistory();
            };
            //-----------用水
            if (function.attributes.Find((obj) => obj.key == WaterHeaterJinmao_AttrEnum.volume.ToString()) != null)
            {
            infoView2_DateInfo_DateTextButton.MouseUpEventHandler = (sender, e) =>
            {
                SetWaterQureyDateDialog();
            };
            infoView2_DateInfo_PreClickButton.MouseUpEventHandler = (sender, e) => {
                infoView2_DateInfo_PreClickButton.MouseUpEventHandler = (sender, e) =>
                {
                var waterQueryDate = new DateTime(waterQueryTime_Year, waterQueryTime_Month, waterQueryTime_Day);
                if (waterQueryType == QueryType.day_hour)
                {
@@ -765,11 +794,12 @@
                        return;
                    }
                    waterQueryDate = waterQueryDate.AddMonths(-1);
                        waterQueryTime_Day = waterQueryDate.Day;
                infoView2_DateInfo_DateTextButton.Text = waterQueryDate.ToString("yyyy-MM");
                }
                else if (waterQueryType == QueryType.custom_year)
                {
                    if (waterQueryDate.Year == 2023)
                        if (waterQueryDate.Year <= 2023)
                    {
                        return;
                    }
@@ -781,11 +811,12 @@
                waterQueryTime_Day = waterQueryDate.Day;
                getWaterHistory();
            };
            infoView2_DateInfo_NextClickButton.MouseUpEventHandler = (sender, e) => {
                infoView2_DateInfo_NextClickButton.MouseUpEventHandler = (sender, e) =>
                {
                var waterQueryDate = new DateTime(waterQueryTime_Year, waterQueryTime_Month, waterQueryTime_Day);
                if (waterQueryType == QueryType.day_hour)
                {
                    if (waterQueryDate.Year == 2023 && waterQueryDate.Month == 1 && waterQueryDate.Day == 2)
                        if (waterQueryDate.Year >= DateTime.Now.Year && waterQueryDate.Month >= DateTime.Now.Month && waterQueryDate.Day >= DateTime.Now.Day)
                    {
                        return;
                    }
@@ -799,11 +830,12 @@
                        return;
                    }
                    waterQueryDate = waterQueryDate.AddMonths(1);
                        waterQueryTime_Day = waterQueryDate.Day;
                infoView2_DateInfo_DateTextButton.Text = waterQueryDate.ToString("yyyy-MM");
                }
                else if (waterQueryType == QueryType.custom_year)
                {
                    if (waterQueryDate.Year == 2023)
                        if (waterQueryDate.Year >= DateTime.Now.Year)
                    {
                        return;
                    }
@@ -815,7 +847,8 @@
                waterQueryTime_Day = waterQueryDate.Day;
                getWaterHistory();
            };
            infoView2_Date_Day.MouseDownEventHandler = (sender, e) => {
                infoView2_Date_Day.MouseDownEventHandler = (sender, e) =>
                {
                if (infoView2_Date_Day.IsSelected)
                {
                    return;
@@ -824,10 +857,17 @@
                infoView2_Date_Month.IsSelected = false;
                infoView2_Date_Year.IsSelected = false;
                waterQueryType = QueryType.day_hour;
                    if (DateTime.Now.Date < new DateTime(waterQueryTime_Year, waterQueryTime_Month, waterQueryTime_Day))
                    {
                        waterQueryTime_Year = DateTime.Now.Year;
                        waterQueryTime_Month = DateTime.Now.Month;
                        waterQueryTime_Day = DateTime.Now.Day;
                    }
                infoView2_DateInfo_DateTextButton.Text = new DateTime(waterQueryTime_Year, waterQueryTime_Month, waterQueryTime_Day).ToString("yyyy-MM-dd");
                getWaterHistory();
            };
            infoView2_Date_Month.MouseDownEventHandler = (sender, e) => {
                infoView2_Date_Month.MouseDownEventHandler = (sender, e) =>
                {
                if (infoView2_Date_Month.IsSelected)
                {
                    return;
@@ -836,10 +876,16 @@
                infoView2_Date_Month.IsSelected = true;
                infoView2_Date_Year.IsSelected = false;
                waterQueryType = QueryType.custom_month;
                    if (DateTime.Now.Date < new DateTime(waterQueryTime_Year, waterQueryTime_Month, waterQueryTime_Day))
                    {
                        waterQueryTime_Year = DateTime.Now.Year;
                        waterQueryTime_Month = DateTime.Now.Month;
                    }
                infoView2_DateInfo_DateTextButton.Text = new DateTime(waterQueryTime_Year, waterQueryTime_Month, waterQueryTime_Day).ToString("yyyy-MM");
                getWaterHistory();
            };
            infoView2_Date_Year.MouseDownEventHandler = (sender, e) => {
                infoView2_Date_Year.MouseDownEventHandler = (sender, e) =>
                {
                if (infoView2_Date_Year.IsSelected)
                {
                    return;
@@ -851,7 +897,7 @@
                infoView2_DateInfo_DateTextButton.Text = waterQueryTime_Year.ToString();
                getWaterHistory();
            };
            }
        }
        /// <summary>
@@ -967,6 +1013,19 @@
            };
            topView.AddChidren(btnConfrim);
            var btnToday = new Button()
            {
                X = Application.GetRealWidth(160 - 32) - btnConfrim.GetTextWidth(),
                Width = Application.GetRealWidth(160),
                TextAlignment = TextAlignment.CenterRight,
                TextColor = CSS_Color.MainColor,
                TextSize = CSS_FontSize.TextFontSize,
                Visible = false,
                Enable = false,
                Text= "今日",
            };
            topView.AddChidren(btnToday);
            UIPickerView uIPickerView = new UIPickerView()
            {
                Y = Application.GetRealHeight(40),
@@ -992,6 +1051,10 @@
            };
            uIPickerView.OnSelectChangeEvent = (int1, int2, int3) =>
            {
                if (int1 < 0)
                {
                    int1 = 1;
                }
                if (pickerItems_Year[int1] != item1.ToString())
                {
                    int.TryParse(pickerItems_Year[int1], out item1);
@@ -1043,7 +1106,7 @@
                }
                if (pickerItems_Month != null)
                {
                    if (int2 > pickerItems_Month.Count)
                    if (int2 >= pickerItems_Month.Count || int2 < 0)
                    {
                        int2 = 0;
                    }
@@ -1070,16 +1133,21 @@
                                }
                            }
                        }
                        try
                        {
                        uIPickerView.setNPicker(pickerItems_Year, pickerItems_Month, pickerItems_Day);
                        uIPickerView.setCurrentItems(pickerItems_Year.IndexOf(item1.ToString()),
                            pickerItems_Month == null ? 0 : pickerItems_Month.IndexOf(item2.ToString()),
                            pickerItems_Day == null ? 0 : pickerItems_Day.IndexOf(item3.ToString()));
                        }catch(Exception ex)
                        {
                            MainPage.Log("Error", $"金茂历史数据控件异常:{ex.Message}");
                        }
                    }
                }
                if (pickerItems_Day != null)
                {
                    if (int3 >= pickerItems_Day.Count)
                    if (int3 >= pickerItems_Day.Count || int3 < 0)
                    {
                        int3 = 0;
                    }
@@ -1100,7 +1168,7 @@
                    {
                        tempQueryTime_Month = item2;
                    }
                    infoView1_DateInfo_DateTextButton.Text = new DateTime(tempQueryTime_Year, tempQueryTime_Month, tempQueryTime_Day).ToString("yyyy-MM");
                    infoView1_DateInfo_DateTextButton.Text = new DateTime(tempQueryTime_Year, tempQueryTime_Month, 1).ToString("yyyy-MM");
                    if (tempQueryType == QueryType.day_hour)
                    {
                        if (item3 != tempQueryTime_Day)
@@ -1113,6 +1181,73 @@
                getTempHistory();
            };
            if (tempQueryType == QueryType.day_hour)
            {
                try
                {
                    btnToday.Visible = btnToday.Enable = true;
                    btnToday.MouseUpEventHandler = (sender, e) =>
                    {
                        pickerItems_Year = new List<string>();
                        pickerItems_Year.Add("2023");
                        while (DateTime.Now.Year > 2022 + pickerItems_Year.Count)
                        {
                            pickerItems_Year.Add((2023 + pickerItems_Year.Count).ToString());
                        }
                        if (tempQueryType == QueryType.custom_month || tempQueryType == QueryType.day_hour)
                        {
                            pickerItems_Month = new List<string>();
                            if (tempQueryTime_Year == DateTime.Now.Year)
                            {
                                int addMonth = 0;
                                while (DateTime.Now.Month > addMonth)
                                {
                                    addMonth++;
                                    pickerItems_Month.Add(addMonth.ToString());
                                }
                            }
                            else
                            {
                                for (var i = 1; i < 13; i++)
                                {
                                    pickerItems_Month.Add(i.ToString());
                                }
                            }
                            if (tempQueryType == QueryType.day_hour)
                            {
                                pickerItems_Day = new List<string>();
                                if (tempQueryTime_Month == DateTime.Now.Month)
                                {
                                    int addDay = 0;
                                    while (DateTime.Now.Day > addDay)
                                    {
                                        addDay++;
                                        pickerItems_Day.Add(addDay.ToString());
                                    }
                                }
                                else
                                {
                                    for (var i = 1; i <= DateTime.DaysInMonth(tempQueryTime_Year, tempQueryTime_Month); i++)
                                    {
                                        pickerItems_Day.Add(i.ToString());
                                    }
                                }
                            }
                        }
                        item3 = tempQueryTime_Day = DateTime.Now.Day;
                        item2 = tempQueryTime_Month = DateTime.Now.Month;
                        item1 = tempQueryTime_Year = DateTime.Now.Year;
                        uIPickerView.setNPicker(pickerItems_Year, pickerItems_Month, pickerItems_Day);
                        uIPickerView.setCurrentItems(pickerItems_Year.IndexOf(tempQueryTime_Year.ToString()),
                            pickerItems_Month == null ? 0 : pickerItems_Month.IndexOf(tempQueryTime_Month.ToString()),
                            pickerItems_Day == null ? 0 : pickerItems_Day.IndexOf(tempQueryTime_Day.ToString()));
                    };
                }
                catch { }
            }
        }
        public void SetWaterQureyDateDialog()
@@ -1251,6 +1386,10 @@
            };
            uIPickerView.OnSelectChangeEvent = (int1, int2, int3) =>
            {
                if (int1 < 0)
                {
                    int1 = 0;
                }
                if (pickerItems_Year[int1] != item1.ToString())
                {
                    int.TryParse(pickerItems_Year[int1], out item1);
@@ -1302,7 +1441,7 @@
                }
                if (pickerItems_Month != null)
                {
                    if (int2 > pickerItems_Month.Count)
                    if (int2 > pickerItems_Month.Count || int2 < 0)
                    {
                        int2 = 0;
                    }
@@ -1338,7 +1477,7 @@
                }
                if (pickerItems_Day != null)
                {
                    if (int3 >= pickerItems_Day.Count)
                    if (int3 >= pickerItems_Day.Count || int3 < 0)
                    {
                        int3 = 0;
                    }
@@ -1359,7 +1498,7 @@
                    {
                        waterQueryTime_Month = item2;
                    }
                    infoView2_DateInfo_DateTextButton.Text = new DateTime(waterQueryTime_Year, waterQueryTime_Month, waterQueryTime_Day).ToString("yyyy-MM");
                    infoView2_DateInfo_DateTextButton.Text = new DateTime(waterQueryTime_Year, waterQueryTime_Month, 1).ToString("yyyy-MM");
                    if (waterQueryType == QueryType.day_hour)
                    {
                        if (item3 != waterQueryTime_Day)
@@ -1371,6 +1510,87 @@
                }
                getWaterHistory();
            };
            var btnToday = new Button()
            {
                X = Application.GetRealWidth(160 - 32) - btnConfrim.GetTextWidth(),
                Width = Application.GetRealWidth(160),
                TextAlignment = TextAlignment.CenterRight,
                TextColor = CSS_Color.MainColor,
                TextSize = CSS_FontSize.TextFontSize,
                Visible = false,
                Enable = false,
                Text = "今日",
            };
            topView.AddChidren(btnToday);
            if (waterQueryType == QueryType.day_hour)
            {
                try
                {
                    btnToday.Visible = btnToday.Enable = true;
                    btnToday.MouseUpEventHandler = (sender, e) =>
                    {
                        pickerItems_Year = new List<string>();
                        pickerItems_Year.Add("2023");
                        while (DateTime.Now.Year > 2022 + pickerItems_Year.Count)
                        {
                            pickerItems_Year.Add((2023 + pickerItems_Year.Count).ToString());
                        }
                        if (waterQueryType == QueryType.custom_month || waterQueryType == QueryType.day_hour)
                        {
                            pickerItems_Month = new List<string>();
                            if (waterQueryTime_Year == DateTime.Now.Year)
                            {
                                int addMonth = 0;
                                while (DateTime.Now.Month > addMonth)
                                {
                                    addMonth++;
                                    pickerItems_Month.Add(addMonth.ToString());
                                }
                            }
                            else
                            {
                                for (var i = 1; i < 13; i++)
                                {
                                    pickerItems_Month.Add(i.ToString());
                                }
                            }
                            if (waterQueryType == QueryType.day_hour)
                            {
                                pickerItems_Day = new List<string>();
                                if (waterQueryTime_Month == DateTime.Now.Month)
                                {
                                    int addDay = 0;
                                    while (DateTime.Now.Day > addDay)
                                    {
                                        addDay++;
                                        pickerItems_Day.Add(addDay.ToString());
                                    }
                                }
                                else
                                {
                                    for (var i = 1; i <= DateTime.DaysInMonth(waterQueryTime_Year, waterQueryTime_Month); i++)
                                    {
                                        pickerItems_Day.Add(i.ToString());
                                    }
                                }
                            }
                        }
                        item3 = waterQueryTime_Day = DateTime.Now.Day;
                        item2 = waterQueryTime_Month = DateTime.Now.Month;
                        item1 = waterQueryTime_Year = DateTime.Now.Year;
                        uIPickerView.setNPicker(pickerItems_Year, pickerItems_Month, pickerItems_Day);
                        uIPickerView.setCurrentItems(pickerItems_Year.IndexOf(waterQueryTime_Year.ToString()),
                            pickerItems_Month == null ? 0 : pickerItems_Month.IndexOf(waterQueryTime_Month.ToString()),
                            pickerItems_Day == null ? 0 : pickerItems_Day.IndexOf(waterQueryTime_Day.ToString()));
                    };
                }
                catch { }
            }
        }
@@ -1407,4 +1627,3 @@
        custom_year,
    }
}
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption_Histogram.cs
@@ -74,6 +74,14 @@
#if __ANDROID__
        public string optionString = @"{
                              tooltip: {
                                trigger: 'axis',
                                axisPointer: {
                                  crossStyle: {
                                    color: '#999'
                                  }
                                }
                              },
                              grid: {
                                    top: '10%',
                                    left: '15%',
@@ -140,6 +148,14 @@
#else
        public string optionString = @"{
                              tooltip: {
                                trigger: 'axis',
                                axisPointer: {
                                  crossStyle: {
                                    color: '#999'
                                  }
                                }
                              },
                              grid: {
                                    top: '10%',
                                    left: '10%',
SiriIntents/Server/HttpUtil.cs
@@ -16,13 +16,13 @@
        /// 固定域名,正式环境
        /// 公共域名就近解析
        /// </summary>
        public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
        const string APP_KEY = "HDL-HOME-APP";
        const string SECRET_KEY = "CPL345bn28gHnvi9G4tYbq3cTYkiHC";
        //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
        //const string APP_KEY = "HDL-HOME-APP";
        //const string SECRET_KEY = "CPL345bn28gHnvi9G4tYbq3cTYkiHC";
        //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";
        //public const string APP_KEY = "HDL-HOME-APP-TEST";
        //public const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss";
        public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";
        public const string APP_KEY = "HDL-HOME-APP-TEST";
        public const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss";
        //public const string GlobalRequestHttpsHost = "http://59.41.255.150:7777";//mmmm
        //const string APP_KEY = "CPEVRLRT";