TCL电子猫眼
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user