bf
wxr
2023-07-30 3b28930e3537853b595350d7fe9fc0d8edb026e6
bf
5个文件已修改
168 ■■■■ 已修改文件
HDL_ON/DAL/Server/HttpUtil.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchP3EnergyPage.cs 63 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption_BrokenLine.cs 89 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SiriIntents/Server/HttpUtil.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/DAL/Server/HttpUtil.cs
@@ -18,8 +18,8 @@
        /// 固定域名,正式环境
        /// 公共域名就近解析
        /// </summary>
        public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
        //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";
        //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
        public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";
        const string APP_KEY = "HDL-HOME-APP-TEST";
        const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss";
        //public const string GlobalRequestHttpsHost = "http://59.41.255.150:7777";//mmmm
HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
@@ -37,10 +37,10 @@
                        MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                        break;
                    case SPK.AirSwitchP3:
                        //var airSwitchP3Page = new AirSwitchP3Page(function);
                        //MainPage.BasePageView.AddChidren(airSwitchP3Page);
                        //airSwitchP3Page.LoadPage(btnCollectionIcon, btnName, btnFromFloor);
                        //MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                        var airSwitchP3Page = new AirSwitchP3Page(function);
                        MainPage.BasePageView.AddChidren(airSwitchP3Page);
                        airSwitchP3Page.LoadPage(btnCollectionIcon, btnName, btnFromFloor);
                        MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1;
                        break;
                    case SPK.LightSwitch:
                        var relayView = new RelayPage(function);
HDL_ON/UI/UI2/FuntionControlView/Electrical/AirSwitchP3EnergyPage.cs
@@ -217,12 +217,8 @@
            historyDataView.AddChidren(myEchartsView_Line);
            //EnergyRow(energy, energyListView, index);
            new System.Threading.Thread(() =>
                {
                    Control.Ins.SendReadCommand(device);
                })
                { IsBackground = true }.Start();
            LoadMothed_GetHistoryData();
        }
@@ -251,27 +247,60 @@
                    });
                    var sensorType = device.spk.Split(".")[1];
                    var revertObj = new HttpServerRequest().GetSensorHistory(curQueryType, device.deviceId, "total_electricity");
                    var revertObj = new HttpServerRequest().GetSensorHistory(curQueryType, device.deviceId, "power_a");
                    if (revertObj != null)
                    {
                        if (revertObj.Code == StateCode.SUCCESS)
                        {
                            var revertData = Newtonsoft.Json.JsonConvert.DeserializeObject<List<EnvironmentalSensorHistor>>(revertObj.Data.ToString());
                            List<string> vs = new List<string>();
                            if (brokenLine.YvalueText == "")
                            {
                                foreach (var data in revertData)
                            if (revertData == null || revertData.Count == 0) {
#if DEBUG
                                List<string> vs = new List<string>() {
                                    "813","313","213","123",
                                    "113","213","183","133",
                                    "133","513","133","413",
                                };
                                    brokenLine.InitXdataText(vs);
                                revertData = new List<EnvironmentalSensorHistor>()
                                {
                                    vs.Add(data.fieldName);
                                    new EnvironmentalSensorHistor{ fieldValue = "100"},
                                    new EnvironmentalSensorHistor{ fieldValue = "200"},
                                    new EnvironmentalSensorHistor{ fieldValue = "300"},
                                    new EnvironmentalSensorHistor{ fieldValue = "400"},
                                    new EnvironmentalSensorHistor{ fieldValue = "500"},
                                    new EnvironmentalSensorHistor{ fieldValue = "400"},
                                    new EnvironmentalSensorHistor{ fieldValue = "100"},
                                    new EnvironmentalSensorHistor{ fieldValue = "200"},
                                    new EnvironmentalSensorHistor{ fieldValue = "300"},
                                    new EnvironmentalSensorHistor{ fieldValue = "400"},
                                    new EnvironmentalSensorHistor{ fieldValue = "500"},
                                    new EnvironmentalSensorHistor{ fieldValue = "400"},
                                };
                                if (device.GetAttribute("ydata") == null)
                                {
                                    device.attributes.Add(new FunctionAttributes() { key = "ydata" });
                                }
                                brokenLine.InitXdataText(vs);
                                device.SetAttrState("ydata", brokenLine.InitYdataText(device.name, revertData, "#5C62FE") + ", ");
#endif
                            }
                            if (device.GetAttribute("ydata") == null)
                            else
                            {
                                device.attributes.Add(new FunctionAttributes() { key = "ydata" });
                                List<string> vs = new List<string>();
                                if (brokenLine.YvalueText == "")
                                {
                                    foreach (var data in revertData)
                                    {
                                        vs.Add(data.fieldName);
                                    }
                                    brokenLine.InitXdataText(vs);
                                }
                                if (device.GetAttribute("ydata") == null)
                                {
                                    device.attributes.Add(new FunctionAttributes() { key = "ydata" });
                                }
                                device.SetAttrState("ydata", brokenLine.InitYdataText(device.name, revertData, "#5C62FE") + ", ");
                            }
                            device.SetAttrState("ydata", brokenLine.InitYdataText(device.name, revertData, device.GetAttrState("color")) + ",");
                        }
                    }
                    brokenLine.yTitle = Language.StringByID(StringId.EnergyConsumption) + "(kW)";
@@ -280,7 +309,7 @@
                    {
                        brokenLine.xTitle = Language.StringByID(StringId.Date);
                    }
                    var opString = brokenLine.InitOption();
                    var opString = brokenLine.InitOption(30);
                    Application.RunOnMainThread(() =>
                    {
HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EchartsOption_BrokenLine.cs
@@ -43,6 +43,23 @@
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="displayScale">显示比例 0-100,比如设置了30,只显示30%,可以左右拖动显示其他</param>
        /// <returns></returns>
        public string InitOption(int displayScale)
        {
            //组装Value
            var newstring = optionString2.Replace("{0}", XvalueText);
            newstring = newstring.Replace("{1}", YvalueText);
            newstring = newstring.Replace("{10}", xTitle);
            newstring = newstring.Replace("{20}", yTitle);
            newstring = newstring.Replace("{30}", displayScale.ToString());
            newstring = newstring.Replace(",,", ",");
            return newstring;
        }
        /// <summary>
        /// 组装x轴文本
        /// </summary>
        /// <param name="xData"></param>
@@ -208,6 +225,78 @@
            }";
#endif
#if __IOS__
        public string optionString2 = @"{
                 tooltip: {
                    trigger: 'axis'
                    },
                    grid: {
                         top: '10%',
                        left: '10%',
                        right: '10%',
                        bottom: '10%',
                    },
                    xAxis: {
                        name: '{10}',
                        type: 'category',
                        boundaryGap: false,
                        data: [{0}],
                        axisLabel : {
                            fontSize:30,
                        },
                    },
                    yAxis: {
                        name: '{20}',
                        type: 'value',
                        axisLabel : {
                            fontSize:30,
                        },
                    },
                    dataZoom: [{
                        type: 'inside',
                        xAxisIndex: 0,
                        start: 0,
                        end: {30}
                    }],
                    series: [
                        {1}
                    ]
            }";
#else
        public string optionString2 = @"{
                 tooltip: {
                    trigger: 'axis'
                    },
                    grid: {
                         top: '15%',
                        left: '13%',
                        right: '12%',
                        bottom: '10%',
                    },
                    xAxis: {
                        type: 'category',
                        boundaryGap: false,
                        data: [{0}],
                        name: '{10}'
                    },
                    yAxis: {
                        type: 'value',
                        name: '{20}'
                    },
                    dataZoom: [{
                        type: 'inside',
                        xAxisIndex: 0,
                        start: 0,
                        end: {30}
                    }],
                    series: [
                        {1}
                    ]
            }";
#endif
        /// <summary>
        /// 颜色列表
        /// </summary>
SiriIntents/Server/HttpUtil.cs
@@ -16,8 +16,8 @@
        /// 固定域名,正式环境
        /// 公共域名就近解析
        /// </summary>
        public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
        //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";
        //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com";
        public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com";
        const string APP_KEY = "HDL-HOME-APP-TEST";
        const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss";
        //public const string GlobalRequestHttpsHost = "http://59.41.255.150:7777";//mmmm