diff --git a/CRICS_V3_1124.suo b/CRICS_V3_1124.suo index a6f04f4..df7ac96 100644 Binary files a/CRICS_V3_1124.suo and b/CRICS_V3_1124.suo differ diff --git a/CommonEntity/TCLToken.cs b/CommonEntity/TCLToken.cs index aaabb25..d948f95 100644 --- a/CommonEntity/TCLToken.cs +++ b/CommonEntity/TCLToken.cs @@ -59,7 +59,7 @@ namespace CommonEntity /// /// /// - public static void SendData(string hotelcode, string roomnum, string CUID, string skillid, string sceneCode, int count = 0) + public static void SendData(string hotelcode, string roomnum, string CUID, string skillid, string sceneCode, int count = 0,Dictionary extra_params=null) { try { @@ -77,6 +77,7 @@ namespace CommonEntity dic1.Add("cuid", roomnum); dic1.Add("sceneCode", sceneCode); dic1.Add("botId", skillid); + dic1.Add("params",Newtonsoft.Json.JsonConvert.SerializeObject(extra_params)); logger.Error("TCL send data"); diff --git a/ConsoleApplication666/Program.cs b/ConsoleApplication666/Program.cs index b2d6def..c0927de 100644 --- a/ConsoleApplication666/Program.cs +++ b/ConsoleApplication666/Program.cs @@ -25,7 +25,7 @@ namespace ConsoleApplication666 static void Main(string[] args) { - + bool NewResult = true || false; BigInteger hugeNumber = BigInteger.Parse("1234567890123456789012345678901234567890"); var H= hugeNumber.ToByteArray(); diff --git a/Domain/Host.cs b/Domain/Host.cs index fa7e51b..838515b 100644 --- a/Domain/Host.cs +++ b/Domain/Host.cs @@ -659,5 +659,15 @@ namespace Domain public virtual bool IsWelcomeDisableTime { get; set; } public virtual string FCS_locationUUID { get; set; } public virtual string HiWeiCUID { get; set; } + /// + /// 电子门铃 + /// 视频流地址 + /// + public virtual string EBell_RSTP { get; set; } + + /// + /// 电子门铃在屏幕上的显示时间 + /// + public virtual int EBell_TV_duration { get; set; } } } diff --git a/Domain/Host.hbm.xml b/Domain/Host.hbm.xml index ac0dc54..dca6548 100644 --- a/Domain/Host.hbm.xml +++ b/Domain/Host.hbm.xml @@ -81,5 +81,7 @@ + + diff --git a/RCUHost/Implement/New_RoomStatusReceiver.cs b/RCUHost/Implement/New_RoomStatusReceiver.cs index 826bb12..4650c4d 100644 --- a/RCUHost/Implement/New_RoomStatusReceiver.cs +++ b/RCUHost/Implement/New_RoomStatusReceiver.cs @@ -407,12 +407,12 @@ namespace RCUHost.Implement { hostModal.Modal = new RoomTypeModalCache() { ModalAddress = device.Value.Address }; } - if (hostModal.Modal!=null) + if (hostModal.Modal != null) { if (string.IsNullOrEmpty(hostModal.Modal.ModalAddress)) { - hostModal.Modal.ModalAddress = device.Value.Address; - } + hostModal.Modal.ModalAddress = device.Value.Address; + } } } else @@ -549,6 +549,9 @@ namespace RCUHost.Implement string TCLcuid = host.TCLCUID; string skillid = host.TCLSkillID; + string ebell_rtsp = host.EBell_RSTP; + int du = host.EBell_TV_duration; + //如果是息屏 //004000022 if (device.Value.Address.Equals("004000022")) @@ -564,12 +567,26 @@ namespace RCUHost.Implement { TCLCommon.SendData(hotelcode, roomnum, TCLcuid, skillid, "SIP"); } - if (hotelcode.Equals("1085")) + + //if (hotelcode.Equals("1085")) + //{ + // if (hostModal.Modal.ModalAddress.Equals("004000021")) + // { + // TCLCommon.SendData(hotelcode, roomnum, TCLcuid, skillid, "ROMANTIC"); + // } + //} + + //这个是电子门铃 + if (hostModal.Modal.ModalAddress.Equals("004000021")) { - if (hostModal.Modal.ModalAddress.Equals("004000021")) + Dictionary ddd = new Dictionary(); + if (!string.IsNullOrEmpty(ebell_rtsp)) { - TCLCommon.SendData(hotelcode, roomnum, TCLcuid, skillid, "ROMANTIC"); + ddd.Add("url",ebell_rtsp); + ddd.Add("display_duration",du.ToString()); } + + TCLCommon.SendData(hotelcode, roomnum, TCLcuid, skillid, "DOORBELL",0,ddd); } } diff --git a/RCUHost/Implement/RoomStatusReceiver.cs b/RCUHost/Implement/RoomStatusReceiver.cs index 25c1091..98fac73 100644 --- a/RCUHost/Implement/RoomStatusReceiver.cs +++ b/RCUHost/Implement/RoomStatusReceiver.cs @@ -631,12 +631,26 @@ namespace RCUHost.Implement { TCLCommon.SendData(hotelcode, roomnum, TCLcuid, skillid, "SIP"); } - if (hotelcode.Equals("1085")) + //if (hotelcode.Equals("1085")) + //{ + // if (hostModal.Modal.ModalAddress.Equals("004000023")) + // { + // TCLCommon.SendData(hotelcode, roomnum, TCLcuid, skillid, "ROMANTIC"); + // } + //} + + string ebell_rtsp = host.EBell_RSTP; + int du = host.EBell_TV_duration; + if (hostModal.Modal.ModalAddress.Equals("004000021")) { - if (hostModal.Modal.ModalAddress.Equals("004000023")) + Dictionary ddd = new Dictionary(); + if (!string.IsNullOrEmpty(ebell_rtsp)) { - TCLCommon.SendData(hotelcode, roomnum, TCLcuid, skillid, "ROMANTIC"); + ddd.Add("url", ebell_rtsp); + ddd.Add("display_duration", du.ToString()); } + + TCLCommon.SendData(hotelcode, roomnum, TCLcuid, skillid, "DOORBELL", 0, ddd); } } #endregion diff --git a/Service/Implement/HostManager.cs b/Service/Implement/HostManager.cs index 4112966..d1285d8 100644 --- a/Service/Implement/HostManager.cs +++ b/Service/Implement/HostManager.cs @@ -356,6 +356,12 @@ namespace Service.Implement host.IsWelcomeDisableTime = entity.IsWelcomeDisableTime; host.DisableStartTime = entity.DisableStartTime; host.DisableEndTime = entity.DisableEndTime; + host.EBell_RSTP = entity.EBell_RSTP; + if (entity.EBell_TV_duration==0) + { + entity.EBell_TV_duration = 20000; + } + host.EBell_TV_duration = entity.EBell_TV_duration; //string Key = CacheKey.HostInfo_Key_HostNumber + "_" + host.HostNumber; //object obj = MemoryCacheHelper.Get(Key); diff --git a/WebSite/Controllers/HostController.cs b/WebSite/Controllers/HostController.cs index d0b4f8b..f9c5ac3 100644 --- a/WebSite/Controllers/HostController.cs +++ b/WebSite/Controllers/HostController.cs @@ -1185,6 +1185,8 @@ namespace WebSite.Controllers host_take.DisableStartTime = entity.DisableStartTime; host_take.DisableEndTime = entity.DisableEndTime; host_take.IsWelcomeDisableTime = entity.IsWelcomeDisableTime; + host_take.EBell_RSTP = entity.EBell_RSTP; + host_take.EBell_TV_duration = entity.EBell_TV_duration; } //天猫的发现设备 diff --git a/WebSite/Controllers/IoTController.cs b/WebSite/Controllers/IoTController.cs index db1be93..a11ae87 100644 --- a/WebSite/Controllers/IoTController.cs +++ b/WebSite/Controllers/IoTController.cs @@ -47,16 +47,20 @@ namespace WebSite.Controllers /// private bool CheckGetPower(Host host) { + bool JieGuo = false; bool Result = BBB(host); try { string KKK1 = CacheKey.TakeCardOnLine + "_" + host.HostNumber; CommonEntity.DataTongJi.MTakeCardData Chaka = CSRedisCacheHelper.Get_Partition(KKK1, 5); + + byte isChaKa = 0x02; if (Chaka != null) { string KeyFilter1 = "NEWDiff"; string KeyFilter2 = "OLDDiff"; + isChaKa = Chaka.Status; if (Chaka.Status == 0x01 && Result == false) { RCUHost.RCUHostCommon.tools.LanJieData(KeyFilter1, host.SysHotel.Code); @@ -67,18 +71,25 @@ namespace WebSite.Controllers RCUHost.RCUHostCommon.tools.LanJieData(KeyFilter2, host.SysHotel.Code); } - Result = Result || Chaka.Status == 0x01; - if (Result == true) - { - return true; - } + } + bool NewResult = Result || Chaka.Status == 0x01; + if (NewResult == true) + { + JieGuo = true; + return true; + } + else + { + JieGuo = false; + return false; } } catch (Exception ex) { + JieGuo = false; logger.Error("取电数据不同" + ex.Message); } - return Result; + return JieGuo; } public static bool BBB(Host host) { @@ -7433,7 +7444,7 @@ namespace WebSite.Controllers { var action = item.action; var name = item.applianceName; - //var area = item.area; + var area = item.area; List q1 = new List(); if (name.Equals("灯")) { @@ -7441,10 +7452,10 @@ namespace WebSite.Controllers } else { - //if (!string.IsNullOrEmpty(area)) - //{ - // name = area+ name; - //} + if (!string.IsNullOrEmpty(area)) + { + name = area + name; + } q1 = hostModals.Where(A => A.Modal.Name.Equals(name) || A.Modal.AliasName.Equals(name)).ToList(); } if (q1 != null && q1.Count > 0) @@ -7478,12 +7489,12 @@ namespace WebSite.Controllers { var action = item.action; var name = item.applianceName; - //var area = item.area; + var area = item.area; var value = item.value; - //if (!string.IsNullOrEmpty(area)) - //{ - // name = area + name; - //} + if (!string.IsNullOrEmpty(area)) + { + name = area + name; + } var q1 = hostModals.Where(A => A.Modal.Type == DeviceType.AirConditioner && (A.Modal.Name.Equals(name) || A.Modal.AliasName.Equals(name))); foreach (var item_inter in q1) @@ -7564,12 +7575,12 @@ namespace WebSite.Controllers { var action = item.action; var name = item.applianceName; - //var area = item.area; + var area = item.area; int hid = int.Parse(hotelid); - //if (!string.IsNullOrEmpty(area)) - //{ - // name = area + name; - //} + if (!string.IsNullOrEmpty(area)) + { + name = area + name; + } var scene = RoomTypeSceneManager.LoadAll().Where(A => A.HotelID == hid && A.Name.Equals(name)).FirstOrDefault(); if (scene != null) { @@ -7623,7 +7634,7 @@ namespace WebSite.Controllers public string action { get; set; } public string applianceName { get; set; } public string value { get; set; } - //public string area { get; set; } + public string area { get; set; } } public class TV_ResponseData { diff --git a/WebSite/Controllers/SysHotelController.cs b/WebSite/Controllers/SysHotelController.cs index 2a36927..69b8d6d 100644 --- a/WebSite/Controllers/SysHotelController.cs +++ b/WebSite/Controllers/SysHotelController.cs @@ -351,6 +351,8 @@ namespace WebSite.Controllers { Host TakeOut = null; string HostNumberOnly = item.HostNumber; + string XiaoDuKongZhiKey = CacheKey.XiaoDuYuYin + "_" + item.XiaoDuCUID; + HttpContext.Cache.Remove(XiaoDuKongZhiKey); string Key = CacheKey.HostInfo_Key_HostNumber + "_" + HostNumberOnly; object obj = MemoryCacheHelper.Get(Key); if (obj != null) diff --git a/WebSite/Views/Host/SmartVoiceBinding.ascx b/WebSite/Views/Host/SmartVoiceBinding.ascx index c514517..349228a 100644 --- a/WebSite/Views/Host/SmartVoiceBinding.ascx +++ b/WebSite/Views/Host/SmartVoiceBinding.ascx @@ -133,5 +133,35 @@ labelposition="left" value="<%= Model.DisableEndTime %>" /> + + + + + + + + + + + <%----%> + + + + + + + + + + + 毫秒 + +