TCL电子猫眼
This commit is contained in:
Binary file not shown.
@@ -59,7 +59,7 @@ namespace CommonEntity
|
||||
/// <param name="skillid"></param>
|
||||
/// <param name="sceneCode"></param>
|
||||
/// <param name="count"></param>
|
||||
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<string,string> 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");
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace ConsoleApplication666
|
||||
static void Main(string[] args)
|
||||
{
|
||||
|
||||
|
||||
bool NewResult = true || false;
|
||||
BigInteger hugeNumber = BigInteger.Parse("1234567890123456789012345678901234567890");
|
||||
var H= hugeNumber.ToByteArray();
|
||||
|
||||
|
||||
@@ -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; }
|
||||
/// <summary>
|
||||
/// 电子门铃
|
||||
/// 视频流地址
|
||||
/// </summary>
|
||||
public virtual string EBell_RSTP { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 电子门铃在屏幕上的显示时间
|
||||
/// </summary>
|
||||
public virtual int EBell_TV_duration { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,5 +81,7 @@
|
||||
<property name="IsWelcomeDisableTime" column="IsWelcomeDisableTime" type="bool" />
|
||||
<property name="FCS_locationUUID" column="FCS_locationUUID" type="string" />
|
||||
<property name="HiWeiCUID" column="HiWeiCUID" type="string" />
|
||||
<property name="EBell_RSTP" column="EBell_RSTP" type="string" />
|
||||
<property name="EBell_TV_duration" column="EBell_TV_duration" type="int" />
|
||||
</class>
|
||||
</hibernate-mapping>
|
||||
|
||||
@@ -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<string, string> ddd = new Dictionary<string, string>();
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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<string, string> ddd = new Dictionary<string, string>();
|
||||
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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
//天猫的发现设备
|
||||
|
||||
@@ -47,16 +47,20 @@ namespace WebSite.Controllers
|
||||
/// <returns></returns>
|
||||
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<CommonEntity.DataTongJi.MTakeCardData>(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<HostModal> q1 = new List<HostModal>();
|
||||
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
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -133,5 +133,35 @@
|
||||
labelposition="left" value="<%= Model.DisableEndTime %>" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label for="idebell_rtsp">
|
||||
电子门铃视频流地址:</label>
|
||||
</th>
|
||||
<td colspan="3">
|
||||
<input id="idebell_rtsp" name="EBell_RSTP" class="easyui-validatebox textbox text"
|
||||
data-options="validType:length[0,300]" value="<%: Model.EBell_RSTP %>" style="width: 416px;" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<%--<td></td>--%>
|
||||
<td colspan="4">
|
||||
<label style="color: #808080;">
|
||||
e.g. rtsp://192.168.1.115:554/user=admin&password=&channel=1&stream=0.sdp?
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th>
|
||||
<label for="id_ebell_displaytime">
|
||||
门铃视频显示时间:</label>
|
||||
</th>
|
||||
<td colspan="2">
|
||||
<input id="id_ebell_displaytime" name="EBell_TV_duration" class="easyui-validatebox textbox text"
|
||||
value="<%: Model.EBell_TV_duration %>" style="width: 100px;" />毫秒
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user