Compare commits

...

9 Commits

Author SHA1 Message Date
c13ab0cb56 增加一些功能,比如 修正重启后,队列消费会报错的问题 2026-04-02 15:16:13 +08:00
182186e1fb 增加电量报警模块
但是只是一部分功能
2026-03-30 17:55:55 +08:00
696144b2ff 修改一些可能在某些条件 下可能会触发的BUG 2026-03-26 14:18:52 +08:00
d0c626c189 修改长时间内存会炸 2026-03-25 17:51:43 +08:00
1840794f40 增加微信锁电量功能 2026-03-23 08:48:22 +08:00
e46b19016b 增加一系列功能
屏蔽 下位机 故障上报上报正常的数据。增加 日志系统的功能
2026-03-19 08:56:39 +08:00
a93c11fbfe 增加 升级功能的 日志监控 2026-03-17 15:58:22 +08:00
ddd4f5a6b4 修改 在线离线的判断逻辑 2026-03-16 13:57:23 +08:00
8ce4017100 增加新的功能 2026-03-13 19:28:17 +08:00
71 changed files with 1465 additions and 823 deletions

4
.gitignore vendored
View File

@@ -39,3 +39,7 @@
/WebSite/Logs
WebSite/welcomebgm
MvcApplication1
ConsoleApplication4
RCUHost内存泄漏分析报告.md
CRICS_V3_1124.suo
ConsoleApplication5

View File

@@ -33,6 +33,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MvcApplication1", "MvcAppli
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApplication4", "ConsoleApplication4\ConsoleApplication4.csproj", "{85BC55B1-083D-4AE9-8DE8-3DE59B654990}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleApplication5", "ConsoleApplication5\ConsoleApplication5.csproj", "{346B2008-1D95-4604-84A8-247D33FB8DED}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -203,6 +205,16 @@ Global
{85BC55B1-083D-4AE9-8DE8-3DE59B654990}.Release|Mixed Platforms.Build.0 = Release|x86
{85BC55B1-083D-4AE9-8DE8-3DE59B654990}.Release|x86.ActiveCfg = Release|x86
{85BC55B1-083D-4AE9-8DE8-3DE59B654990}.Release|x86.Build.0 = Release|x86
{346B2008-1D95-4604-84A8-247D33FB8DED}.Debug|Any CPU.ActiveCfg = Debug|x86
{346B2008-1D95-4604-84A8-247D33FB8DED}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{346B2008-1D95-4604-84A8-247D33FB8DED}.Debug|Mixed Platforms.Build.0 = Debug|x86
{346B2008-1D95-4604-84A8-247D33FB8DED}.Debug|x86.ActiveCfg = Debug|x86
{346B2008-1D95-4604-84A8-247D33FB8DED}.Debug|x86.Build.0 = Debug|x86
{346B2008-1D95-4604-84A8-247D33FB8DED}.Release|Any CPU.ActiveCfg = Release|x86
{346B2008-1D95-4604-84A8-247D33FB8DED}.Release|Mixed Platforms.ActiveCfg = Release|x86
{346B2008-1D95-4604-84A8-247D33FB8DED}.Release|Mixed Platforms.Build.0 = Release|x86
{346B2008-1D95-4604-84A8-247D33FB8DED}.Release|x86.ActiveCfg = Release|x86
{346B2008-1D95-4604-84A8-247D33FB8DED}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

Binary file not shown.

View File

@@ -12,10 +12,17 @@ namespace Common
public static PerformanceCounter cpuCounter = new PerformanceCounter("Processor", "% Processor Time", "_Total");
public static double GetCPU()
{
cpuCounter.NextValue(); // 初始化计数器,让它开始计数
System.Threading.Thread.Sleep(1000); // 等待一秒
double cpuUsage = cpuCounter.NextValue(); // 获取CPU使用率
return cpuUsage;
try
{
cpuCounter.NextValue(); // 初始化计数器,让它开始计数
System.Threading.Thread.Sleep(1000); // 等待一秒
double cpuUsage = cpuCounter.NextValue(); // 获取CPU使用率
return cpuUsage;
}
catch (Exception ex)
{
throw;
}
}
[DllImport("kernel32.dll")]
@@ -31,4 +38,50 @@ namespace Common
}
}
public class CpuMonitor
{
// 将静态初始化改为延迟加载,并将异常处理移至初始化时
private static PerformanceCounter _cpuCounter = null;
private static readonly object _lock = new object();
private static Exception _initException = null;
private static void InitializeCounter()
{
if (_initException != null) throw _initException;
if (_cpuCounter != null) return;
lock (_lock)
{
if (_cpuCounter != null) return;
try
{
// 尝试创建计数器
_cpuCounter = new PerformanceCounter("Processor", "% Processor Time", "_Total");
// 立即调用一次 NextValue 来初始化
_cpuCounter.NextValue();
}
catch (Exception ex)
{
throw _initException;
}
}
}
public static double GetCurrentCpuUsage()
{
try
{
CpuMonitor.InitializeCounter(); // 确保计数器已初始化
_cpuCounter.NextValue(); // 首次调用返回0用于初始化本次采样
System.Threading.Thread.Sleep(1000); // 等待采样间隔
return _cpuCounter.NextValue(); // 返回过去一秒内的平均使用率
}
catch
{
// 记录日志或返回一个错误标识值,例如 -1
return -1;
}
}
}
}

View File

@@ -21,6 +21,8 @@ namespace Common
public static CSRedisClient redis4;
public static CSRedisClient redis5;
public static CSRedisClient redis6;
public static CSRedisClient redis7;
public static CSRedisClient redis8;
public static CSRedisClient redis_webchat;
//private static readonly string[] redisHosts = null;
private static int SessionExpireMinutes = int.Parse(ConfigurationManager.AppSettings["session_expire_minutes"]);
@@ -59,6 +61,8 @@ namespace Common
redis4 = new CSRedisClient(redisHostStr + ",password=,defaultDatabase=4");
redis5 = new CSRedisClient(redisHostStr + ",password=,defaultDatabase=5");
redis6 = new CSRedisClient(redisHostStr + ",password=,defaultDatabase=6");
redis7 = new CSRedisClient(redisHostStr + ",password=,defaultDatabase=7");
redis8 = new CSRedisClient(redisHostStr + ",password=,defaultDatabase=8");
redis_webchat = new CSRedisClient(string.Format(webchat_redisstr + ",password={0},defaultDatabase=0",webchat_redis_pwd));
//Native subscribe
@@ -205,6 +209,14 @@ namespace Common
{
client = redis6;
}
else if (SliceNo == 7)
{
client = redis7;
}
else if (SliceNo == 8)
{
client = redis8;
}
else
{
client = redis;
@@ -324,7 +336,7 @@ namespace Common
CSRedisClient client = WhitchRedisSlice(SliceNo);
client.LPush(key, obj);
}
public static long MaxLen = 1000000;
public static long MaxLen = 500000;
public static void StreamAdd(int SliceNo, string key, string Value)
{
try

View File

@@ -484,6 +484,15 @@ namespace Common
}
return result.ToString();
}
public static string ByteToString_NoWhiteSpace(byte[] bytesData)
{
StringBuilder result = new StringBuilder();
foreach (byte r in bytesData)
{
result.Append(r.ToString("X2"));
}
return result.ToString();
}
/// <summary>
/// 把int32类型的数据转存到2个字节的byte数组中
/// </summary>
@@ -497,6 +506,22 @@ namespace Common
arry[1] = (byte)(data & 0xFF);
return arry;
}
// 方法B自定义字符数组判断
public static bool ContainsSpecialChars(string input)
{
// 定义特殊字符数组
char[] specialChars = {
'!', '@', '#', '$', '%', '^', '&', '*', '(', ')',
'+', '=', '[', ']', '{', '}', '|', '\\', ':', ';',
'"', '\'', '<', '>', ',', '.', '?', '/', '`', '~'
};
// 判断是否包含空白字符(空格、制表符、换行符等)
bool hasWhiteSpace = input.Any(char.IsWhiteSpace);
return input.Any(c => specialChars.Contains(c))&&hasWhiteSpace;
}
/// <summary>
/// 把int32类型的数据转存到2个字节的byte数组中小端
/// </summary>
@@ -772,6 +797,12 @@ namespace Common
long current_timestamp = Convert.ToInt64(ts.TotalSeconds);
return current_timestamp;
}
public static long GetCurrentTimeStamp_MS(DateTime dt)
{
TimeSpan ts = dt - new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Local);
long current_timestamp = Convert.ToInt64(ts.TotalMilliseconds);
return current_timestamp;
}
public static DateTime GetCurrentDateTime(long timestampMilliseconds)
{
DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Local);

View File

@@ -132,6 +132,11 @@ namespace CommonEntity
/// 济南同派 特殊处理
/// </summary>
public static string JiNan_TongPai_Spec = "jntp_spec";
/// <summary>
/// 微信 锁电量
/// </summary>
public static string DianLiang = "DL";
}
public class ChangLiangValue
{

View File

@@ -84,6 +84,7 @@
<Compile Include="NewDataSQL.cs" />
<Compile Include="NewRoomStatusPush.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="QuanJuVar.cs" />
<Compile Include="RedisTakeCardStatus.cs" />
<Compile Include="RedisTongJiData.cs" />
<Compile Include="RoomStatusRequest.cs" />

View File

@@ -270,6 +270,11 @@ namespace CommonEntity
/// </summary>
public int IdentityInfo { get; set; }
public int Bright_G { get; set; }
/// <summary>
/// 微信锁电量
/// </summary>
public int WeiXinSuo_DianLiang { get; set; }
}
/// <summary>
@@ -309,9 +314,9 @@ namespace CommonEntity
}
public class ts_faultitem
{
public short dev_type { get; set; }
public short dev_addr { get; set; }
public short dev_loop { get; set; }
public ushort dev_type { get; set; }
public ushort dev_addr { get; set; }
public ushort dev_loop { get; set; }
public short error_type { get; set; }
public int error_data { get; set; }
}
@@ -336,6 +341,7 @@ namespace CommonEntity
/// "上报" 或 "下发"
/// </summary>
public string direction { get; set; }
public string ip { get; set; }
public string cmd_word { get; set; }
public int frame_id { get; set; }

View File

@@ -228,7 +228,7 @@ namespace CommonEntity
};
fff.remark = remarkdata;
fff.assigned_to = "auto";
fff.user_type = 1;
fff.user_type = 2;
fff.get_details = true;

View File

@@ -9,6 +9,7 @@ namespace CommonEntity
{
public int Id { get; set; }
public string HostNumber { get; set; }
public int RoomTypeId { get; set; }
}
public class HostRoomNumberMapping
{

View File

@@ -67,7 +67,7 @@ namespace CommonEntity
public static ReturnInfo GetTokenData(string username)
{
DateTime dt = DateTime.Now.AddMonths(6);
DateTime dt = DateTime.Now.AddYears(20);
string ti = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
long l = Tools.GetCurrentTimeStamp(dt);
CommonEntity.JWTData j = new CommonEntity.JWTData();

View File

@@ -12,5 +12,26 @@ namespace CommonEntity
public string hotel_id { get; set; }
public string device_id { get; set; }
public string room_id { get; set; }
public string ip { get; set; }
}
public struct ShengJi_Log
{
public string hotel_id { get; set; }
public string device_id { get; set; }
public string room_id { get; set; }
public long ts_ms { get; set; }
public int is_send { get; set; }
public byte[] udp_raw { get; set; }
public object extra { get; set; }
public string remote_endpoint { get; set; }
public string md5 { get; set; }
public int partition { get; set; }
public int file_type { get; set; }
public string file_path { get; set; }
public int upgrade_state { get; set; }
public string app_version { get; set; }
}
}

View File

@@ -48,7 +48,7 @@ namespace CommonEntity
public string subnet_mask { get; set; }
public string gateway { get; set; }
public string dns { get; set; }
public string version { get; set; }
public string app_version { get; set; }
/// <summary>
/// RCU 时间,年月日 那种
/// </summary>
@@ -68,8 +68,8 @@ namespace CommonEntity
/// <summary>
/// 授权时间
/// </summary>
public long authorization_time { get; set; }
public long authorization_days { get; set; }
public string authorization_time { get; set; }
public string authorization_days { get; set; }
public string room_num_remark { get; set; }
public string room_type_remark { get; set; }
public string room_remark { get; set; }
@@ -78,5 +78,10 @@ namespace CommonEntity
public string central_control_name { get; set; }
public string configure_hotel_name { get; set; }
public string configure_room_type_name { get; set; }
/// <summary>
/// 最后一次升级时间
/// </summary>
public long upgrade_ts_ms { get; set; }
}
}

View File

@@ -28,6 +28,10 @@ namespace CommonEntity
var D = (SecurityProtocolType)3072;
var E = (SecurityProtocolType)12288;
ServicePointManager.SecurityProtocol = A | B | C | D | E;
// 或者方法3使用所有现代TLS协议
//ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Ssl3;
var client1 = new RestClient(Url);
var request1 = new RestRequest("", Method.POST);
//var jsa= Newtonsoft.Json.JsonConvert.SerializeObject(obj);

13
CommonEntity/QuanJuVar.cs Normal file
View File

@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Domain;
namespace CommonEntity
{
public class QuanJuVar
{
public static IList<RoomTypeModal> BaoJingUpLoad = new List<RoomTypeModal>();
}
}

View File

@@ -119,12 +119,6 @@ namespace CommonEntity
request1.AddHeader("Authorization", "Bearer " + T.data.access_token);
//Dictionary<string, string> dic = new Dictionary<string, string>();
//dic.Add("cuid", CUID);
//dic.Add("sceneCode", sceneCode);
//dic.Add("botId", skillid);
//dic.Add("params", Newtonsoft.Json.JsonConvert.SerializeObject(extra_params));
TCLBell tsa = new TCLBell();
tsa.cuid = CUID;
tsa.sceneCode = sceneCode;
@@ -139,15 +133,6 @@ namespace CommonEntity
var QQQ = client1.Execute(request1);
string ddd = QQQ.Content;
//string ti1 = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
//Dictionary<string, string> dicg1 = new Dictionary<string, string>();
//dicg1.Add("HotelCode", hotelcode);
//dicg1.Add("RoomNumber", roomnum);
//dicg1.Add("RequestId", ID);
//dicg1.Add("ResponseMsg", ddd);
//dicg1.Add("ResponseTime", ti1);
//LogRecorrd.WebAPI_DataSend(dicg1, "api/tcl_tv");
logger.Error("TCL 电视触发了 情景。返回数据为:" + ddd);

View File

@@ -537,7 +537,7 @@ namespace ConsoleApplication1
UdpEndpoint u = new UdpEndpoint("127.0.0.1", 3350);
}
/// <summary>
/// 设置名单
/// 设置名单
/// </summary>
public static void SetBlockData()
{

View File

@@ -1,57 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{85BC55B1-083D-4AE9-8DE8-3DE59B654990}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ConsoleApplication4</RootNamespace>
<AssemblyName>ConsoleApplication4</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@@ -1,50 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Sockets;
using System.Net;
namespace ConsoleApplication4
{
internal class UdpState
{
private UdpClient udpClient;
public UdpState(UdpClient client)
{
this.udpClient = client;
}
public UdpClient UdpClient
{
get { return this.udpClient; }
}
}
class Program
{
static void Main(string[] args)
{
var udpClient = new UdpClient(3340);
udpClient.Client.ReceiveBufferSize = 3 * 1024 * 1024;
udpClient.BeginReceive(ReceiveCallback, new UdpState(udpClient));
Console.ReadLine();
}
public static void ReceiveCallback(IAsyncResult ar)
{
UdpState state = ar.AsyncState as UdpState;
// 1. 结束异步接收,获取数据和远程端点
IPEndPoint remoteEndPoint = new IPEndPoint(IPAddress.Any, 0);
byte[] receivedData = state.UdpClient.EndReceive(ar, ref remoteEndPoint);
state.UdpClient.BeginReceive(ReceiveCallback, state);
try
{
Console.WriteLine(11111111111111);
}
catch (Exception)
{
}
}
}
}

View File

@@ -1,36 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的常规信息通过以下
// 特性集控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("ConsoleApplication4")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ConsoleApplication4")]
[assembly: AssemblyCopyright("Copyright © 2026")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 使此程序集中的类型
// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
// 则将该类型上的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("3ac386f6-d433-4860-9b22-ee7e0dc298d4")]
// 程序集的版本信息由下面四个值组成:
//
// 主版本
// 次版本
// 内部版本号
// 修订号
//
// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>

View File

@@ -1,4 +0,0 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.0,Profile=Client", FrameworkDisplayName = ".NET Framework 4 Client Profile")]

View File

@@ -1,4 +0,0 @@
E:\tian\chongxin\NewGit\CRICS\CRICS_Web_Server_VS2010_Prod\ConsoleApplication4\bin\Debug\ConsoleApplication4.exe
E:\tian\chongxin\NewGit\CRICS\CRICS_Web_Server_VS2010_Prod\ConsoleApplication4\bin\Debug\ConsoleApplication4.pdb
E:\tian\chongxin\NewGit\CRICS\CRICS_Web_Server_VS2010_Prod\ConsoleApplication4\obj\x86\Debug\ConsoleApplication4.exe
E:\tian\chongxin\NewGit\CRICS\CRICS_Web_Server_VS2010_Prod\ConsoleApplication4\obj\x86\Debug\ConsoleApplication4.pdb

View File

@@ -25,6 +25,11 @@ namespace ConsoleApplication666
static void Main(string[] args)
{
ushort abb=0x6440;
var gs1= BitConverter.GetBytes(abb);
var f1= gs1[0];
var f2= gs1[1];
bool NewResult = true || false;
BigInteger hugeNumber = BigInteger.Parse("1234567890123456789012345678901234567890");
var H= hugeNumber.ToByteArray();

View File

@@ -788,7 +788,7 @@ namespace Dao.Implement
/// <returns></returns>
public IList<HostMappingData> LoadAllID_HostNumberMapping()
{
return base.LoadAll().Where(A => A.SysHotel.IsNewVersionProtocol == true && A.IsDeleted == false).Select(A => new HostMappingData() { Id = A.ID, HostNumber = A.HostNumber }).ToList();
return base.LoadAll().Where(A => A.SysHotel.IsNewVersionProtocol == true && A.IsDeleted == false).Select(A => new HostMappingData() { Id = A.ID, HostNumber = A.HostNumber,RoomTypeId=A.RoomType.ID }).ToList();
}

View File

@@ -383,6 +383,11 @@ namespace Domain
public virtual string FCS_MenCi_Close { get; set; }
public virtual string FCS_MenCi_Open { get; set; }
/// <summary>
/// 门锁电量
/// </summary>
public virtual string FCS_MenSuo_DianLiang { get; set; }
public virtual bool IsUseSkyworthTV
{

View File

@@ -64,6 +64,7 @@
<property name="FCS_RCU_Online" column="FCS_RCU_Online" type="string" />
<property name="FCS_MenCi_Close" column="FCS_MenCi_Close" type="string" />
<property name="FCS_MenCi_Open" column="FCS_MenCi_Open" type="string" />
<property name="FCS_MenSuo_DianLiang" column="FCS_MenSuo_DianLiang" type="string" />
<property name="IsUseSkyworthTV" column="IsUseSkyworthTV" type="bool" />

View File

@@ -175,7 +175,7 @@
<!--阿宝添加的-->
<!--<property name="dev_MonitorLogRepository" ref="Repository.dev_MonitorLogRepository" />-->
<property name="HostRepository" ref="Repository.Host" />
<property name="SysHotelRepository" ref="Repository.SysHotel" />
<!--<property name="SysHotelRepository" ref="Repository.SysHotel" />-->
<property name="HostModalRepository" ref="Repository.HostModal" />
<property name="SysOauth2Repository" ref="Repository.SysOauth2" />
</object>

View File

@@ -265,7 +265,7 @@ namespace RCUHost.Implement
}
d1.control_list = lll3;
d1.report_count = lll3.Count;
d1.ip = ipAndPort;
string sss = Newtonsoft.Json.JsonConvert.SerializeObject(d1);
CSRedisCacheHelper.Publish("redis-0X36-0X0F", sss);

View File

@@ -263,7 +263,7 @@ namespace RCUHost.Implement
RegisterInfo rsg = new RegisterInfo()
{
ts_ms=Tools.GetUnixTime_MS(),
ts_ms = Tools.GetUnixTime_MS(),
hotel_id = hotel_code,
room_id = host.RoomNumber,
device_id = HostNumberOnly,
@@ -276,7 +276,7 @@ namespace RCUHost.Implement
subnet_mask = subnet_mask,
gateway = gateway,
dns = dns,
version = software_version,
app_version = software_version,
rcu_time = rcuTime,
launcher_version = launcher_version,
mac = mac,
@@ -285,20 +285,29 @@ namespace RCUHost.Implement
room_status = room_status_id,
season = hostRCU.Season,
sys_lock_status = hostRCU.LockStatus,
authorization_time = set_expiration_time,
authorization_days = expiration_time,
//hostRCU.ExpireTime = TimeHelper.ToDateTime(expiration_time);
// hostRCU.SetExpireTime = TimeHelper.ToDateTime(set_expiration_time)
//string ti = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
authorization_time = set_expiration_time.ToString(),
authorization_days = expiration_time.ToString(),
room_num_remark = roomnumber,
room_type_remark = roomtype,
room_remark = room_remark,
mcu_name = core,
central_control_name = model,
configure_hotel_name = hotel_name,
configure_room_type_name = roomtype_remark
configure_room_type_name = roomtype_remark,
};
string N1N = Newtonsoft.Json.JsonConvert.SerializeObject(rsg);
CSRedisCacheHelper.Publish("redis-0XB1", N1N);
if (host.UpgradeTime.HasValue)
{
var upgrade_ts_ms = Tools.GetCurrentTimeStamp_MS(host.UpgradeTime.Value);
rsg.upgrade_ts_ms = upgrade_ts_ms;
}
HostRepository.SetModelAndLauncher(host, hostRCU.ConfigVersion, software_version, lan_ip, lan_port, model, launcher_version, hostRCU.ExpireTime, hostRCU.SetExpireTime);
@@ -306,6 +315,9 @@ namespace RCUHost.Implement
//logger.Error(string.Format("酒店({0})客房({1})主机已同步信息Model{2}Launcher{3}", host.SysHotel.Name + host.SysHotel.Code, host.RoomNumber, model, launcher_version));
string N1N = Newtonsoft.Json.JsonConvert.SerializeObject(rsg);
CSRedisCacheHelper.Publish("redis-0XB1", N1N);
#region
/*int count = reader.ReadByte();//个数
reader.ReadBytes(4);

View File

@@ -78,9 +78,7 @@ namespace RCUHost.Implement
StepTongJi.SendInfo(4, "注册命令Task内部开始执行", context.MessageID, context.IsMonitor);
//Reply(context);
string RoomNumber = "";
var OriginalByte = context.Data;
int lll = OriginalByte.Length;
var A1 = OriginalByte.Skip(15).Take(lll - 15 - 2).ToArray();
@@ -301,20 +299,6 @@ namespace RCUHost.Implement
}
else
{
//string KKK = "RegisterKey_" + hhostnumber;
//object OOO = MemoryCacheHelper.Get(KKK);
//if (OOO != null)
//{
// RCUHost.RCUHostCommon.tools.LanJieData(RegisterKey2, hotelCode);
//}
//else
//{
// string ti = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
// MemoryCacheHelper.Set(KKK, ti, DateTimeOffset.Now.AddMinutes(5));
// HostRepository.Update(sbSQL.ToString());//更新主机用sql语句更新更高效
// RCUHost.RCUHostCommon.tools.LanJieData(RegisterKey1, hotelCode);
//}
HostRepository.Update(sbSQL.ToString());//更新主机用sql语句更新更高效
//有升级的时候,不能被跳过
@@ -365,7 +349,7 @@ namespace RCUHost.Implement
string YiJingChuLiGuo = CacheKey.AllReadyDealWith01_Prefix + "_" + hostNumber;
MemoryCacheHelper.Set(YiJingChuLiGuo, A1, DateTimeOffset.Now.AddMinutes(5));
MemoryCacheHelper.Set(YiJingChuLiGuo, A1, DateTimeOffset.Now.AddSeconds(10));
StepTongJi.SendInfo(5, "注册命令Task内部执行完毕", context.MessageID, context.IsMonitor);
}
catch (Exception ex)

File diff suppressed because it is too large Load Diff

View File

@@ -123,7 +123,7 @@ namespace RCUHost.Implement
if (status.Devices != null && status.Devices.Count > 0)
{
//来一个数据,把所有的地址拼接起来
ProcessModal_NEW_NEW(host, status.Devices, isTriggerWelcomeMsg, context.MessageID, context.IsMonitor);//更新灯光及其他回路状态
ProcessModal_NEW_NEW(host, status.Devices, isTriggerWelcomeMsg, context.MessageID, context.IsMonitor, context.RemoteEndPoint.ToString());//更新灯光及其他回路状态
}
if (status.Faults != null && status.Faults.Count > 0)
@@ -183,7 +183,7 @@ namespace RCUHost.Implement
public static string Missionsys_Address = ConfigurationManager.AppSettings["missionsys_address"];
public static string MQTTInfo_report_url = ConfigurationManager.AppSettings["debug_log_report_url"].ToString();
private void ProcessModal_NEW_NEW(Host host, ConcurrentDictionary<string, Device> devices, bool IsTriggerWelcomeMsg, string ContextMessageId, bool ismonitor)
private void ProcessModal_NEW_NEW(Host host, ConcurrentDictionary<string, Device> devices, bool IsTriggerWelcomeMsg, string ContextMessageId, bool ismonitor, string EEndPoint)
{
string UUID = "9dc6a0ee-dcf1-4385-b05f-09cb463838cd";
UUID = host.FCS_locationUUID;
@@ -1146,27 +1146,49 @@ namespace RCUHost.Implement
//MemoryModal.Mode = mode;
break;
case DeviceType.WXLock://微信锁
status = device.Value.StatusReceiver & 0x00FF;
if (status == 1)//设备开
//status = device.Value.StatusReceiver & 0x00FF;
status = device.Value.StatusReceiver;
var gs1 = BitConverter.GetBytes(status);
var f1 = gs1[0];
var f2 = gs1[1];
if (f1 == 1)//设备开
{
if (hostModal.Status != 1)//设备有变化时才去更改状态
{
hostModal.Status = 1;
//sbSQL.Append("Status=1,");
//MemoryModal.Status = 1;
}
}
else//设备关
else if (f1 == 2)//设备关
{
if (hostModal.Status != 2)//设备有变化时才去更改状态
{
hostModal.Status = 2;
//sbSQL.Append("Status=2,");
//MemoryModal.Status = 2;
}
}
//2026-03-29 阿文说 电量上报动作和 开关动作分两包数据上报
else if (f1 == 0x40)
{
//杨格锁:
//P4:
//Bit7:
//门锁动作上报
//Bit6:
//门锁电量上报
//P5:
//门锁动作上报:
//0xE1防撬报警
//0xE2假锁
//0xE3反锁
//0xE4门磁
//0xE5钥匙开锁
//0xE6门锁常开
//门锁电量报警:
//电量0-100
ushort dianliang = (ushort)f2;
string DLKey = CacheKey.DianLiang + "_" + HOSTNUMBER;
CSRedisCacheHelper.Set_PartitionWithForever(DLKey,dianliang.ToString(),5);
}
//更新主机主表
if (hostModal.Modal.Sort == 1)//.ModalAddress == "020001000")
{
@@ -1204,9 +1226,9 @@ namespace RCUHost.Implement
}
CSRedisCacheHelper.Set_Partition<HostModal_Cache>(KKey, hostModal);
bool isonly_serviceinfo = true;
//if (hostModal.ModalType == DeviceType.ServiceInfo)
if (isonly_serviceinfo)
//bool isonly_serviceinfo = true;
if (hostModal.ModalType == DeviceType.ServiceInfo)
//if (isonly_serviceinfo)
{
int StatusFlag = hostModal.Status;
HostModal FinallyData = new HostModal();
@@ -1646,7 +1668,10 @@ namespace RCUHost.Implement
case 1://状态1离线,0在线
record.AbnormalStatus = fault.Value.Data;
record.StatusDate = now;
RR.FCS_PushData(FCS_RCU_Device_Offline, host.FCS_locationUUID, PropertyUUID, FCSLoginUrl, FCSLoginUserName, FCSLoginPassWord, host.SysHotel.Code, host.RoomNumber, devicename + "###" + deviceaddress);
if (fault.Value.Data == 1)
{
RR.FCS_PushData(FCS_RCU_Device_Offline, host.FCS_locationUUID, PropertyUUID, FCSLoginUrl, FCSLoginUserName, FCSLoginPassWord, host.SysHotel.Code, host.RoomNumber, devicename + "###" + deviceaddress);
}
//sbSQL.Append("AbnormalStatus=" + record.AbnormalStatus + ",StatusDate=GETDATE()");
break;
case 2://电量

View File

@@ -157,7 +157,7 @@ namespace RCUHost.Implement
//来一个数据,把所有的地址拼接起来
string YiJingChuLiGuo = CacheKey.AllReadyDealWith0E_Prefix + "_" + HostNumberOnly;
MemoryCacheHelper.Delete(YiJingChuLiGuo);
ProcessModal_NEW_NEW(host, status.Devices, isTriggerWelcomeMsg, context.MessageID, context.IsMonitor, context.Data, status);//更新灯光及其他回路状态
ProcessModal_NEW_NEW(host, status.Devices, isTriggerWelcomeMsg, context.MessageID, context.IsMonitor, context.Data, status, context.RemoteEndPoint.ToString());//更新灯光及其他回路状态
string nnn = VVV1 + VVV2;
if (!string.IsNullOrEmpty(nnn))
{
@@ -224,7 +224,7 @@ namespace RCUHost.Implement
public static string Missionsys_Address = ConfigurationManager.AppSettings["missionsys_address"];
public static string MQTTInfo_report_url = ConfigurationManager.AppSettings["debug_log_report_url"].ToString();
private void ProcessModal_NEW_NEW(Host host, ConcurrentDictionary<string, Device> devices, bool IsTriggerWelcomeMsg, string ContextMessageId, bool ismonitor, byte[] OriginalByteList, Status yuanshidata)
private void ProcessModal_NEW_NEW(Host host, ConcurrentDictionary<string, Device> devices, bool IsTriggerWelcomeMsg, string ContextMessageId, bool ismonitor, byte[] OriginalByteList, Status yuanshidata, string EEndPoint)
{
string UUID = "9dc6a0ee-dcf1-4385-b05f-09cb463838cd";
UUID = host.FCS_locationUUID;
@@ -639,8 +639,8 @@ namespace RCUHost.Implement
// }
//}
string ebell_rtsp = host.EBell_RSTP;
int du = host.EBell_TV_duration;
string ebell_rtsp = host.EBell_RSTP;
int du = host.EBell_TV_duration;
if (hostModal.Modal.ModalAddress.Equals("004000021"))
{
Dictionary<string, string> ddd = new Dictionary<string, string>();
@@ -747,83 +747,60 @@ namespace RCUHost.Implement
break;
case "004000001"://取电
#region
#region
//0关闭设备
//1打开设备且当前设备处于关闭状态
//取电
//CommonEntity.DataTongJi.MTakeCardData t = new DataTongJi.MTakeCardData();
//t.HostNUMBER = HOSTNUMBER;
//t.HotelCode = HOTEL_CODE;
//t.Status = Convert.ToByte(device.Value.StatusReceiver);
//t.LastUpdateTime = DateTime.Now;
////不管是断电还是取电都要记录
//if (flag == 1||flag==0)
//{
// string sss = Newtonsoft.Json.JsonConvert.SerializeObject(t);
// CSRedisCacheHelper.Publish("redis-takecard_change", sss);
//}
//断电
//if (flag == 0)
//{
// string sss = Newtonsoft.Json.JsonConvert.SerializeObject(t);
// CSRedisCacheHelper.Publish("redis-takecard_change", sss);
//}
#endregion
//拨卡操作
if (flag == 0 && host.RoomCard != null)
{
host.RoomCard = null;
HostRepository.SetRoomCard(host, null);//拔卡操作
//host.RoomCard = null;
//HostRepository.SetRoomCard(host, null);//拔卡操作
}
else if (flag == 1 && host.RoomCard == null)
{
//CSRedisCacheHelper.HMSet(CacheKey.TakeCardOnLine,host.SysHotel.Code+"###"+ host.RoomNumber);
RoomCardType roomCardType = null;
//RoomCardType roomCardType = null;
#region
string MemoryCardKey = "MemoryRoomCardPrefix_1";
object ooo = MemoryCacheHelper.Get(MemoryCardKey);
if (ooo != null)
{
roomCardType = ooo as RoomCardType;
}
else
{
roomCardType = RoomCardTypeRepository.Get(1);//获取有人房卡类型
MemoryCacheHelper.SlideSet(MemoryCardKey, roomCardType);
}
#endregion
//#region 获取有人房卡类
//string MemoryCardKey = "MemoryRoomCardPrefix_1";
//object ooo = MemoryCacheHelper.Get(MemoryCardKey);
//if (ooo != null)
//{
// roomCardType = ooo as RoomCardType;
//}
//else
//{
// roomCardType = RoomCardTypeRepository.Get(1);//获取有人房卡类型
// MemoryCacheHelper.SlideSet(MemoryCardKey, roomCardType);
//}
//#endregion
#region
RoomCard roomCard = null;
string GetRoomCardBy = "GetRoomCardBy_" + roomCardType.ID + "_" + host.SysHotel.ID;
object ooo1 = MemoryCacheHelper.Get(GetRoomCardBy);
if (ooo1 != null)
{
roomCard = ooo as RoomCard;
}
else
{
roomCard = RoomCardRepository.Get(roomCardType, host.SysHotel.ID);
if (roomCard != null)
{
MemoryCacheHelper.Set(GetRoomCardBy, roomCard);
}
}
#endregion
//#region 获取当前酒店独属 这个房间的
//RoomCard roomCard = null;
//string GetRoomCardBy = "GetRoomCardBy_" + roomCardType.ID + "_" + host.SysHotel.ID;
//object ooo1 = MemoryCacheHelper.Get(GetRoomCardBy);
//if (ooo1 != null)
//{
// roomCard = ooo as RoomCard;
//}
//else
//{
// roomCard = RoomCardRepository.Get(roomCardType, host.SysHotel.ID);
// if (roomCard != null)
// {
// MemoryCacheHelper.Set(GetRoomCardBy, roomCard);
// }
//}
//#endregion
if (roomCard == null)//如果该房卡类型未创建记录,自动创建
{
roomCard = new RoomCard();
roomCard.CardNumber = "1";
roomCard.RoomCardType = roomCardType;
roomCard.HotelID = host.SysHotel.ID;
RoomCardRepository.Save(roomCard);
}
host.RoomCard = roomCard;
HostRepository.SetRoomCard(host, roomCard);//插卡操作
//if (roomCard == null)//如果该房卡类型未创建记录,自动创建
//{
// roomCard = new RoomCard();
// roomCard.CardNumber = "1";
// roomCard.RoomCardType = roomCardType;
// roomCard.HotelID = host.SysHotel.ID;
// RoomCardRepository.Save(roomCard);
//}
//host.RoomCard = roomCard;
//HostRepository.SetRoomCard(host, roomCard);//插卡操作
}
#region
@@ -1721,9 +1698,9 @@ namespace RCUHost.Implement
CSRedisCacheHelper.Set_Partition<HostModal_Cache>(KKey, hostModal);
//只有服务信息才会入库
bool isonly_serviceinfo = true;
//if (hostModal.ModalType == DeviceType.ServiceInfo)
if (isonly_serviceinfo)
//bool isonly_serviceinfo = true;
bool bbbaaa = hostModal.Modal.Name.Contains("红外") || hostModal.Modal.Name.Contains("infrared") || hostModal.Modal.Name.Contains("雷达") || hostModal.Modal.Name.Contains("radar");
if (hostModal.ModalType == DeviceType.ServiceInfo && bbbaaa == false)
{
HostModal FinallyData = new HostModal();
@@ -1973,9 +1950,7 @@ namespace RCUHost.Implement
else
{
string NoKey = CacheKey.HostModalStatus_BoolFilterPrefix + "_" + host.ID + "_" + device.Value.Address;
//var expiredata = new Random().Next(10, 50);
CSRedisCacheHelper.Set_PartitionWithTime<int>(NoKey, 1, 30);
//logger.Error("内存和数据库都不见这条数据:" + KKey);
}
#endregion
}
@@ -2012,9 +1987,9 @@ namespace RCUHost.Implement
{
string dizhi = item.Value.FaultNo;
ts_faultitem t1 = new ts_faultitem();
t1.dev_type = short.Parse(dizhi.Substring(0, 3));
t1.dev_addr = short.Parse(dizhi.Substring(3, 3));
t1.dev_loop = short.Parse(dizhi.Substring(6, 3));
t1.dev_type = ushort.Parse(dizhi.Substring(0, 3));
t1.dev_addr = ushort.Parse(dizhi.Substring(3, 3));
t1.dev_loop = ushort.Parse(dizhi.Substring(6, 3));
t1.error_type = item.Value.Type;
t1.error_data = item.Value.Data;
exception_list.Add(t1);
@@ -2025,6 +2000,7 @@ namespace RCUHost.Implement
d1.fault_list = exception_list;
d1.report_count = shebei_changeaction_list.Count;
d1.fault_count = exception_list.Count;
d1.ip = EEndPoint;
string sss111 = Newtonsoft.Json.JsonConvert.SerializeObject(d1);
CSRedisCacheHelper.Publish("redis-0X36-0X0F", sss111);
@@ -2212,7 +2188,10 @@ namespace RCUHost.Implement
case 1://状态1离线,0在线
record.AbnormalStatus = fault.Value.Data;
record.StatusDate = now;
RR.FCS_PushData(FCS_RCU_Device_Offline, host.FCS_locationUUID, PropertyUUID, FCSLoginUrl, FCSLoginUserName, FCSLoginPassWord, host.SysHotel.Code, host.RoomNumber);
if (record.AbnormalStatus == 1)
{
RR.FCS_PushData(FCS_RCU_Device_Offline, host.FCS_locationUUID, PropertyUUID, FCSLoginUrl, FCSLoginUserName, FCSLoginPassWord, host.SysHotel.Code, host.RoomNumber);
}
//sbSQL.Append("AbnormalStatus=" + record.AbnormalStatus + ",StatusDate=GETDATE()");
break;
case 2://电量

View File

@@ -10,6 +10,7 @@ using Common;
using Dao;
using Domain;
using RCUHost.Protocols;
using CommonEntity;
namespace RCUHost.Implement
{
@@ -30,6 +31,7 @@ namespace RCUHost.Implement
public override void Process(ReceiverContext context)
{
int startIndex = StructConverter.SizeOf(context.SystemHeader);
var endpoint = context.RemoteEndPoint.ToString();
UpdateHostPacketReply? reply = DecodeUpdateHostPacketReply(context.Data, startIndex);
if (reply.HasValue)
{
@@ -67,6 +69,8 @@ namespace RCUHost.Implement
break;
}
BarData bbb = new BarData();
bbb.HostID = updateHostWorker.Host.ID;
bbb.Upgrade_status = Upgrade_Status;
@@ -97,6 +101,9 @@ namespace RCUHost.Implement
Upgrade_Status = "升级失败";
break;
}
BarData bbb = new BarData();
bbb.HostID = host.ID;
bbb.Upgrade_status = Upgrade_Status;

View File

@@ -10,6 +10,7 @@ using Common;
using Dao;
using Domain;
using RCUHost.Protocols;
using CommonEntity;
namespace RCUHost.Implement
{
@@ -23,6 +24,12 @@ namespace RCUHost.Implement
private IList<UpdateHostWorker> updateHostList = new List<UpdateHostWorker>();
/// <summary>
/// 升级
///
///
///
/// 升级 成功 或者失败会在这里上报,
///
/// 唯 一的在这里上报,别的地方不会
/// </summary>
/// <param name="hostUpdate"></param>
/// <param name="fileType"></param>
@@ -146,6 +153,27 @@ namespace RCUHost.Implement
bbb.Upgrade_status = "升级失败";
break;
}
string endpoint = context.RemoteEndPoint.ToString();
var host = updateHostWorker.Host;
ShengJi_Log s1 = new ShengJi_Log();
s1.hotel_id = host.SysHotel.Code;
s1.room_id = host.RoomNumber;
s1.device_id = host.HostNumber;
s1.is_send = 0;
s1.udp_raw = context.Data;
s1.remote_endpoint = endpoint;
s1.md5 = "";
s1.partition = 0;
s1.file_type = 0;
s1.file_path = "";
s1.upgrade_state = reply.Value.Status;
s1.app_version = reply.Value.Version;
CSRedisCacheHelper.Publish("redis-up", Newtonsoft.Json.JsonConvert.SerializeObject(s1));
UploadCurrentVersionReceiver.UP_Grade_Json(updateHostWorker.Host, bbb);
}
else
@@ -195,6 +223,27 @@ namespace RCUHost.Implement
updateHostList.Remove(updateHostWorker);
break;
}
var host = hostUpdateStatus.Host;
string endpoint = context.RemoteEndPoint.ToString();
ShengJi_Log s1 = new ShengJi_Log();
s1.hotel_id = host.SysHotel.Code;
s1.room_id = host.RoomNumber;
s1.device_id = host.HostNumber;
s1.is_send = 0;
s1.udp_raw = context.Data;
s1.remote_endpoint = endpoint;
s1.md5 = "";
s1.partition = 0;
s1.file_type = 0;
s1.file_path = "";
s1.upgrade_state = reply.Value.Status;
s1.app_version = reply.Value.Version;
CSRedisCacheHelper.Publish("redis-up", Newtonsoft.Json.JsonConvert.SerializeObject(s1));
bbb.Upgrade_DateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
UploadCurrentVersionReceiver.UP_Grade_Json(updateHostWorker.Host, bbb);
hostUpdateStatus.UpdatedTime = DateTime.Now;
@@ -221,6 +270,28 @@ namespace RCUHost.Implement
byte[] data = CreateUpdateRequestPacket(updateFileMd5, blockNum, fileType, fileName);
logger.Error("升级HostNumber为" + host.HostNumber);
logger.Error("升级指令为:" + Tools.ByteToString(data));
ShengJi_Log s1 = new ShengJi_Log();
s1.hotel_id = host.SysHotel.Code;
s1.room_id = host.RoomNumber;
s1.device_id = host.HostNumber;
s1.is_send = 1;
s1.udp_raw = data;
string ipAndPort = CSRedisCacheHelper.Get<string>(host.HostNumber, host.MAC);
if (!string.IsNullOrEmpty(ipAndPort))
{
s1.remote_endpoint = ipAndPort;
}
s1.md5 = updateFileMd5;
s1.partition = blockNum;
s1.file_type = fileType;
s1.file_path = fileName;
s1.upgrade_state = 0;
s1.app_version = host.Version;
CSRedisCacheHelper.Publish("redis-up", Newtonsoft.Json.JsonConvert.SerializeObject(s1));
Send(data, host.HostNumber, host.MAC);// host.IP, host.Port);
}
/// <summary>

View File

@@ -31,6 +31,12 @@ namespace Service
/// <param name="sourceType">-1全部删除0后台1宝易</param>
/// <returns></returns>
IList<RoomTypeModal> LoadAll(RoomType roomType, DeviceType deviceType, int sourceType);
/// <summary>
/// 宝镜上传数据
/// </summary>
/// <returns></returns>
IList<RoomTypeModal> LoadAllBaoJingUpload();
/// <summary>
/// 删除房型回路
/// </summary>

View File

@@ -126,6 +126,7 @@ namespace Service.Implement
device.MusicExecMode = status + (brightness << 12) + (mode << 8);//背景音乐执行方式和内容
//device.ColorTempExecMode = status + (brightness << 12) + (temperature << 8);//色温执行方式和内容
//DeviceControlReceiver.Send(host, device);//发送命令
var t = new Tuple<Host, Device>(host, device);
System.Threading.Tasks.Task.Factory.StartNew((state) =>
{

View File

@@ -38,6 +38,12 @@ namespace Service.Implement
}
}
public IList<RoomTypeModal> LoadAllBaoJingUpload()
{
return CurrentRepository.LoadAll().Where(r => r.IsUploadBaoJing == true).ToList();
}
public IList<RoomTypeModal> LoadAll(RoomType roomType, DeviceType deviceType, int sourceType)
{
if (sourceType == -1)

View File

@@ -801,7 +801,10 @@ namespace WebSite.Controllers
/// <returns></returns>
public ActionResult GetRoomSceneList(string jsonData)
{
if (string.IsNullOrEmpty(jsonData.Trim()))
{
return Json(new { IsSuccess = false, Result = "非法调用" }, JsonRequestBehavior.AllowGet);
}
Interlocked.Increment(ref WebAPI_TongJi.GetRoomSceneList);
string start_time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
try
@@ -4421,7 +4424,7 @@ namespace WebSite.Controllers
Request.InputStream.Read(byts, 0, byts.Length);
string jsonData = System.Text.Encoding.UTF8.GetString(byts);
JWTData JJJ = null;
int code = 0;
int code = 401;
string msg = "";
var dic = JsonConvert.DeserializeObject<Dictionary<string, string>>(jsonData);
if (dic != null)
@@ -5327,7 +5330,7 @@ namespace WebSite.Controllers
}
long jishu_error = Interlocked.Read(ref MvcApplication.UDPServerErrorCount);
if (jishu_error >= 3)
if (jishu_error >= 5)
{
logger.Error("重启了UDP服务器");
Interlocked.Exchange(ref MvcApplication.UDPServerErrorCount, 0);
@@ -6081,7 +6084,6 @@ namespace WebSite.Controllers
}
#region
/// <summary>
@@ -6385,6 +6387,9 @@ namespace WebSite.Controllers
{
try
{
//Host hostua = new Host() { HostNumber = "096008126073", MAC = "" };
//HostModal hostModal1 = new HostModal() { Modal = new RoomTypeModal() { ModalAddress = "007001000", Type = DeviceType.AirConditioner } };
//HostModalManager.SetDevice(hostua, hostModal1, 0, 0, 25, 0, 1, 0);
var dic = CSRedisCacheHelper.HMGetAll(5, CacheKey.JiNan_TongPai_Spec);
foreach (var item in dic)
@@ -6398,9 +6403,20 @@ namespace WebSite.Controllers
if (span.TotalSeconds >= 60 && span.TotalMinutes <= 75)
{
string[] h_a = k.Split('_');
Host host = new Host() { HostNumber = h_a[0], MAC = "" };
HostModal hostModal = new HostModal() { Modal = new RoomTypeModal() { ModalAddress = h_a[1], Type = DeviceType.AirConditioner } };
HostModalManager.SetDevice(host, hostModal, 0, 0, 0, 0);
var hostnumber = h_a[0];
var address = h_a[1];
var hostid = h_a[2];
Host host = new Host() { HostNumber = hostnumber, MAC = "" };
HostModal hostModal = new HostModal() { Modal = new RoomTypeModal() { ModalAddress = address, Type = DeviceType.AirConditioner } };
string KKey = CacheKey.HostModalStatus_Prefix + "_" + hostid + "_" + address;
var HHostModalData = CSRedisCacheHelper.Get_Partition<HostModal_Cache>(KKey);
var temp = HHostModalData.AirConditionData.SettingTemp;
var mode = HHostModalData.AirConditionData.Mode;
HostModalManager.SetDevice(host, hostModal, 0, 0, temp, 0, mode, 0);
}
}
}
@@ -6408,6 +6424,7 @@ namespace WebSite.Controllers
}
catch (Exception ex)
{
logger.Error("同派出错:" + ex.Message);
return Json(new { IsSuccess = false, Message = HttpContext.InnerLanguage("SaveFailedBecause") + ex.Message });
}
}
@@ -6466,13 +6483,14 @@ namespace WebSite.Controllers
foreach (Host host in hosts)//该房型下所有主机关联回路
{
//删除掉上报的
CSRedisCacheHelper.Del_Partition(CacheKey.DingShiReportData + "_" + host.ID, 3);
//CSRedisCacheHelper.Del_Partition(CacheKey.DingShiReportData + "_" + host.ID, 3);
var hostModal = HostModalManager.GetByModalAddress(host.ID, roomTypeModal.ModalAddress);
if (null == hostModal)
{
HostModalManager.Save(new HostModal { HostID = host.ID, Modal = roomTypeModal, Status = 2, Time = 0, UpdateTime = DateTime.Now });
}
}
QuanJuVar.BaoJingUpLoad = RoomTypeModalManager.LoadAllBaoJingUpload();
return true;
}
#endregion
@@ -6628,7 +6646,7 @@ namespace WebSite.Controllers
try
{
var qqq = HostManager.LoadAllID_HostNumberMapping();
var qqq1 = qqq.Select(a => new { a.HostNumber, a.Id }).ToList();
var qqq1 = qqq.Select(a => new { a.HostNumber, a.Id, a.RoomTypeId }).ToList();
if (qqq1.Count > 0)
@@ -6639,7 +6657,7 @@ namespace WebSite.Controllers
if (!string.IsNullOrEmpty(item.HostNumber))
{
//CSRedisCacheHelper.HMSet(5, CacheKey.RoomNumber_HostNumber, item.HostNumber, item.RoomNumber);
CSRedisCacheHelper.HMSet(5, CacheKey.HostId_HostNumber, item.HostNumber, item.Id);
CSRedisCacheHelper.HMSet(5, CacheKey.HostId_HostNumber, item.HostNumber, item.Id + "#" + item.RoomTypeId);
}
}
}
@@ -6801,6 +6819,7 @@ namespace WebSite.Controllers
{
try
{
//HostServer.StopConsumerTasks();
if (key.Equals("blw^_^wlb"))
{
var hostServer = (IHostServer)MvcApplication.cxt.GetObject("RCUHost.HostServer");

View File

@@ -35,10 +35,29 @@ namespace WebSite.Controllers
[Authorize]
public ActionResult Index()
{
//ViewData["Account"] = User.Identity.Name;
ViewData["Account"] = User.Identity.Name;
return View("SimonIndex");
}
public ActionResult III()
{
return View("DencyLogin");
}
public ActionResult Loo()
{
var name = Request.Form["username"].ToString();
var pwd = Request.Form["password"].ToString();
if (name.Equals("mima") && pwd.Equals("3dfc3922112f460e81c2b7b7221bd9ad"))
{
return View("LogOn");
}
else
{
return View("DencyLogin");
}
}
[Authorize]
public ActionResult MenuIndex()
{
@@ -114,6 +133,7 @@ namespace WebSite.Controllers
return Redirect("/");//Request.UrlReferrer.ToString());
}
[Authorize()]
public ActionResult LogOn()
{
string result = "";

View File

@@ -95,6 +95,10 @@ namespace WebSite.Controllers
if (hostModal != null)
{
item.Status = hostModal.Status;
if (hostModal.ModalType==DeviceType.AirConditioner)
{
item.Status = hostModal.AirConditionData.AirStatus;
}
item.Brightness = hostModal.Brightness;
var aaa = hostModal.AirConditionData;
item.CurrentTemp = aaa.CurrentTemp;

View File

@@ -1576,6 +1576,13 @@ namespace WebSite.Controllers
bool wendu1 = KongTiaoControlName.Equals("IncrementTemperatureRequest") || KongTiaoControlName.Equals("IncrementTemperatureRequest") || KongTiaoControlName.Equals("SetTemperatureRequest");
bool fengsu1 = KongTiaoControlName.Equals("SetFanSpeedRequest") || KongTiaoControlName.Equals("IncrementFanSpeedRequest") || KongTiaoControlName.Equals("DecrementFanSpeedRequest");
bool moshi1 = KongTiaoControlName.Equals("SetModeRequest");
string tiaowen = request.header.name;
if (tiaowen.Equals("IncrementTemperatureRequest") || tiaowen.Equals("DecrementTemperatureRequest"))
{
HostModalManager.SetDevice(host, hostModal, 1, 0, temperature, 0, 0, 0);
Thread.Sleep(50);
}
//特殊酒店
if (AssertFault(hotel_code))
{
@@ -1626,13 +1633,6 @@ namespace WebSite.Controllers
}
else
{
string tiaowen = request.header.name;
if (tiaowen.Equals("IncrementTemperatureRequest") || tiaowen.Equals("DecrementTemperatureRequest"))
{
HostModalManager.SetDevice(host, hostModal, 1, 0);
Thread.Sleep(50);
}
//对房间设备进行操作
HostModalManager.SetDevice(host, hostModal, status, brightness, temperature, fanSpeed, mode, valve);
}
@@ -5365,7 +5365,7 @@ namespace WebSite.Controllers
}
else
{
r.code = code;
r.code = 401;
r.msg = msg;
}
}
@@ -5413,7 +5413,7 @@ namespace WebSite.Controllers
}
else
{
r.code = code;
r.code = 401;
r.msg = msg;
}
r.data = list;
@@ -5637,9 +5637,10 @@ namespace WebSite.Controllers
var TuT = SignKeyCommon.TokenValidate(Token, out JJJ, out code, out msg);
if (!TuT)
{
code = 0;
code = 401;
result.code = code;
result.msg = "Token验证不通过";
logger.Error("chuangwei Token验证失败 " + AuthData);
return Json(result, JsonRequestBehavior.AllowGet);
}
}
@@ -6208,7 +6209,7 @@ namespace WebSite.Controllers
var TuT = SignKeyCommon.TokenValidate(Token, out JJJ, out code, out msg);
if (!TuT)
{
code = 0;
code = 401;
result.code = code;
result.msg = "Token验证不通过";
return Json(result, JsonRequestBehavior.AllowGet);
@@ -7460,7 +7461,7 @@ namespace WebSite.Controllers
var name = item.applianceName;
var area = item.area;
List<HostModal> q1 = new List<HostModal>();
if (name.Equals("灯"))
if (name.Equals("灯") || name.Equals("所有灯"))
{
q1 = hostModals.Where(A => A.Modal.Name.Contains("灯")).ToList();
}

View File

@@ -362,6 +362,22 @@ namespace WebSite.Controllers
var roomnum = room.RoomNumber;
var roomModel = new RoomModel();
#region
string DLKey = CacheKey.DianLiang + "_" + room.HostNumber;
string dianliang = CSRedisCacheHelper.Get_Partition<string>(DLKey, 5);
if (!string.IsNullOrEmpty(dianliang))
{
ushort usa = 0;
ushort.TryParse(dianliang, out usa);
roomModel.WeiXinSuo_DianLiang = usa.ToString();
}
else
{
roomModel.WeiXinSuo_DianLiang = "";
}
#endregion
#region
StringBuilder sb = new StringBuilder();
sb.Append(CacheKey.CarbonVIP_Prefix);
@@ -1065,10 +1081,16 @@ namespace WebSite.Controllers
//"Color": "#FF8C69",
//"Beep": false
string Address = row["Code"].ToString();
string Name1 = ReturnNameByLanguage(row["Name"].ToString(), row["EName"].ToString(), row["TWName"].ToString());
if (Name1.Contains("红外")||Name1.Contains("infrared")||Name1.Contains("雷达")||Name1.Contains("radar"))
{
continue;
}
services.Add(new
{
Code = row["Code"],
Name = ReturnNameByLanguage(row["Name"].ToString(), row["EName"].ToString(), row["TWName"].ToString()),// (bool)Session["isCN"] ? row["Name"] : row["EName"],
Name=Name1,
Value = row["Number"],
Color = row["Color"],
Beep = row["Beep"]

View File

@@ -1086,6 +1086,11 @@ namespace WebSite.Controllers
public ActionResult Save(string jsonData)
{
RoomType entity = Newtonsoft.Json.JsonConvert.DeserializeObject<RoomType>(jsonData);
if (Tools.ContainsSpecialChars(entity.Name) || Tools.ContainsSpecialChars(entity.HostName))
{
return Json(new { IsSuccess = false, Message = "房型名称不得包含特殊符号、空格,命名字数不得超过 N 个文字"});
}
RoomType existRoomType = RoomTypeManager.GetByCode(entity.Code, CurrentHotelID);
if (existRoomType != null)
{

View File

@@ -296,6 +296,7 @@ namespace WebSite.Controllers
sysHotel.FCS_RCU_Online = entity.FCS_RCU_Online;
sysHotel.FCS_MenCi_Close = entity.FCS_MenCi_Close;
sysHotel.FCS_MenCi_Open = entity.FCS_MenCi_Open;
sysHotel.FCS_MenSuo_DianLiang = entity.FCS_MenSuo_DianLiang;
sysHotel.IsUseSkyworthTV = entity.IsUseSkyworthTV;
@@ -387,6 +388,7 @@ namespace WebSite.Controllers
TakeOut.SysHotel.FCS_RCU_Online = entity.FCS_RCU_Online;
TakeOut.SysHotel.FCS_MenCi_Close = entity.FCS_MenCi_Close;
TakeOut.SysHotel.FCS_MenCi_Open = entity.FCS_MenCi_Open;
TakeOut.SysHotel.FCS_MenSuo_DianLiang = entity.FCS_MenSuo_DianLiang;
TakeOut.SysHotel.IsUseSkyworthTV = entity.IsUseSkyworthTV;//断电重置小度
TakeOut.SysHotel.IsUseTCLTV = entity.IsUseTCLTV;//断电重置小度

View File

@@ -47,9 +47,10 @@ namespace WebSite
private IRoomStatusManager RoomStatusManager;
private IDeviceControlReceiver DeviceControlReceiver;
private IOverviewManager OverviewManager { get; set; }
public IHostModalManager HostModalManager { get; set; }
private IHostModalManager HostModalManager { get; set; }
public static IHostServer hostServer { get; set; }
public IRoomTypeModalManager RoomTypeModalManager { get; set; }
//private IGroupManager GroupManager;
//private IHostRoomCardManager HostRoomCardManager;
private syncstatus.syncstatusSoapClient _client = null;//房态同步接口
@@ -95,6 +96,8 @@ namespace WebSite
}
protected override void Application_Start(object sender, EventArgs e)
{
//CSRedisCacheHelper.redis1.Del(UDPAllDataKey);
//CSRedisCacheHelper.redis1.XGroupCreate(UDPAllDataKey, "UDPData", "0", true);
logger.Error("Web重启了");
// 在应用程序启动时调用
PreHot();
@@ -122,10 +125,9 @@ namespace WebSite
}
catch { }
};
SetInitAccount();
StartHostServer();
//StartHostServerNew();
BLWMQTT.StartMqtt();
//if ("1" == send_to_debugger)
//{
// UDPLogServer.Init();
@@ -137,6 +139,10 @@ namespace WebSite
}
//HeartBeat();
QuanJuVar.BaoJingUpLoad = RoomTypeModalManager.LoadAllBaoJingUpload();
StartHostServer();
BLWMQTT.StartMqtt();
long ll1 = CSRedisCacheHelper.ForeverGet<long>(UDPLostKey);
@@ -160,7 +166,7 @@ namespace WebSite
{
RedisTongJiData tq1 = new RedisTongJiData();
tq1.url = "api/CaiJiData";
tq1.cron_exp = string.Format("*/{0} * * * *", 10);
tq1.cron_exp = string.Format("*/{0} * * * *", 1);
tq1.mission_key = MvcApplication.IntervalKey;
CSRedisCacheHelper.Forever<RedisTongJiData>(IntervalKey, tq1);
}
@@ -229,15 +235,11 @@ namespace WebSite
T.Stop();
double d = CPUData.GetCPU();
DataTongJi.CPU_Data.Add(d);
// 简单的上限保护,避免长期积累导致内存膨胀
//if (DataTongJi.CPU_Data.Count > 1000)
//{
// DataTongJi.CPU_Data = new System.Collections.Concurrent.ConcurrentBag<double>();
//}
}
catch (Exception ex)
{
logger.Error("CPU 数量统计出错了:" + ex.Message);
logger.Error("CPU 数量统计出错了:" + ex.StackTrace);
}
finally
{
@@ -523,6 +525,7 @@ namespace WebSite
DeviceControlReceiver = (IDeviceControlReceiver)cxt.GetObject("RCUHost.DeviceControlReceiver");
OverviewManager = (IOverviewManager)cxt.GetObject("Manager.Overview");
HostModalManager = (IHostModalManager)cxt.GetObject("Manager.HostModal");
RoomTypeModalManager = (IRoomTypeModalManager)cxt.GetObject("Manager.RoomTypeModal");
_client = new syncstatus.syncstatusSoapClient();
Timer timer2 = new Timer(20000);//每20秒扫描一次
@@ -743,7 +746,7 @@ namespace WebSite
int status_id16 = host.SysHotel.SwitchRoomStatus_PowerOff16;
if (status_id2 != 0 || status_id4 != 0 || status_id8 != 0 || status_id16 != 0)
{
if (status_id2 == roomStatus.ID||status_id4==roomStatus.ID||status_id8==roomStatus.ID||status_id16==roomStatus.ID)
if (status_id2 == roomStatus.ID || status_id4 == roomStatus.ID || status_id8 == roomStatus.ID || status_id16 == roomStatus.ID)
{
HostModal h1 = new HostModal();
h1.Modal = new RoomTypeModal() { ModalAddress = "004000001", Type = DeviceType.ServiceInfo };

View File

@@ -114,6 +114,11 @@ namespace WebSite.Models
/// </summary>
public string CarbonVIP { get; set; }
/// <summary>
/// 微信锁电量
/// </summary>
public string WeiXinSuo_DianLiang { get; set; }
/// <summary>
/// 功率
/// </summary>

View File

@@ -1312,6 +1312,15 @@ namespace WebSite.Resource {
}
}
/// <summary>
/// 查找类似 CheckIn 的本地化字符串。
/// </summary>
internal static string ChuZuHou {
get {
return ResourceManager.GetString("ChuZuHou", resourceCulture);
}
}
/// <summary>
/// 查找类似 Circuit 的本地化字符串。
/// </summary>
@@ -2725,6 +2734,15 @@ namespace WebSite.Resource {
}
}
/// <summary>
/// 查找类似 Doorlockbattery 的本地化字符串。
/// </summary>
internal static string FCS_MenSuo_DianLiang {
get {
return ResourceManager.GetString("FCS_MenSuo_DianLiang", resourceCulture);
}
}
/// <summary>
/// 查找类似 FCS_RCU_Device_Offline 的本地化字符串。
/// </summary>
@@ -3013,6 +3031,15 @@ namespace WebSite.Resource {
}
}
/// <summary>
/// 查找类似 Close air condition 的本地化字符串。
/// </summary>
internal static string GuanKongTiao {
get {
return ResourceManager.GetString("GuanKongTiao", resourceCulture);
}
}
/// <summary>
/// 查找类似 Guest Room 的本地化字符串。
/// </summary>
@@ -4453,6 +4480,24 @@ namespace WebSite.Resource {
}
}
/// <summary>
/// 查找类似 No Action 的本地化字符串。
/// </summary>
internal static string MeiDongZuo {
get {
return ResourceManager.GetString("MeiDongZuo", resourceCulture);
}
}
/// <summary>
/// 查找类似 Minute when nobody 的本地化字符串。
/// </summary>
internal static string MeiYouRen {
get {
return ResourceManager.GetString("MeiYouRen", resourceCulture);
}
}
/// <summary>
/// 查找类似 Menu 的本地化字符串。
/// </summary>
@@ -7477,6 +7522,15 @@ namespace WebSite.Resource {
}
}
/// <summary>
/// 查找类似 attemperation 的本地化字符串。
/// </summary>
internal static string TiaoWen {
get {
return ResourceManager.GetString("TiaoWen", resourceCulture);
}
}
/// <summary>
/// 查找类似 Tidy Up The Plate 的本地化字符串。
/// </summary>

View File

@@ -2911,4 +2911,22 @@ Single circuit status</value>
<data name="RoomStatusSwitch" xml:space="preserve">
<value>Switch RoomStatus To Power Off</value>
</data>
<data name="FCS_MenSuo_DianLiang" xml:space="preserve">
<value>Doorlockbattery</value>
</data>
<data name="ChuZuHou" xml:space="preserve">
<value>CheckIn</value>
</data>
<data name="GuanKongTiao" xml:space="preserve">
<value>Close air condition</value>
</data>
<data name="MeiDongZuo" xml:space="preserve">
<value>No Action</value>
</data>
<data name="MeiYouRen" xml:space="preserve">
<value>Minute when nobody</value>
</data>
<data name="TiaoWen" xml:space="preserve">
<value>attemperation</value>
</data>
</root>

View File

@@ -1311,6 +1311,15 @@ namespace WebSite.Resource {
}
}
/// <summary>
/// 查找类似 出租后 的本地化字符串。
/// </summary>
internal static string ChuZuHou {
get {
return ResourceManager.GetString("ChuZuHou", resourceCulture);
}
}
/// <summary>
/// 查找类似 回路 的本地化字符串。
/// </summary>
@@ -2724,6 +2733,15 @@ namespace WebSite.Resource {
}
}
/// <summary>
/// 查找类似 门锁电量 的本地化字符串。
/// </summary>
internal static string FCS_MenSuo_DianLiang {
get {
return ResourceManager.GetString("FCS_MenSuo_DianLiang", resourceCulture);
}
}
/// <summary>
/// 查找类似 RCU 设备断线 的本地化字符串。
/// </summary>
@@ -3012,6 +3030,15 @@ namespace WebSite.Resource {
}
}
/// <summary>
/// 查找类似 关空调 的本地化字符串。
/// </summary>
internal static string GuanKongTiao {
get {
return ResourceManager.GetString("GuanKongTiao", resourceCulture);
}
}
/// <summary>
/// 查找类似 客房 的本地化字符串。
/// </summary>
@@ -4452,6 +4479,24 @@ namespace WebSite.Resource {
}
}
/// <summary>
/// 查找类似 无动作 的本地化字符串。
/// </summary>
internal static string MeiDongZuo {
get {
return ResourceManager.GetString("MeiDongZuo", resourceCulture);
}
}
/// <summary>
/// 查找类似 分钟无人入住 的本地化字符串。
/// </summary>
internal static string MeiYouRen {
get {
return ResourceManager.GetString("MeiYouRen", resourceCulture);
}
}
/// <summary>
/// 查找类似 菜单 的本地化字符串。
/// </summary>
@@ -7485,6 +7530,15 @@ namespace WebSite.Resource {
}
}
/// <summary>
/// 查找类似 调温 的本地化字符串。
/// </summary>
internal static string TiaoWen {
get {
return ResourceManager.GetString("TiaoWen", resourceCulture);
}
}
/// <summary>
/// 查找类似 收拾餐盘 的本地化字符串。
/// </summary>

View File

@@ -2913,4 +2913,22 @@
<data name="TuiFang" xml:space="preserve">
<value>退房</value>
</data>
<data name="FCS_MenSuo_DianLiang" xml:space="preserve">
<value>门锁电量</value>
</data>
<data name="ChuZuHou" xml:space="preserve">
<value>出租后</value>
</data>
<data name="GuanKongTiao" xml:space="preserve">
<value>关空调</value>
</data>
<data name="MeiDongZuo" xml:space="preserve">
<value>无动作</value>
</data>
<data name="MeiYouRen" xml:space="preserve">
<value>分钟无人入住</value>
</data>
<data name="TiaoWen" xml:space="preserve">
<value>调温</value>
</data>
</root>

View File

@@ -1311,6 +1311,15 @@ namespace WebSite.Resource {
}
}
/// <summary>
/// 查找类似 出租后 的本地化字符串。
/// </summary>
internal static string ChuZuHou {
get {
return ResourceManager.GetString("ChuZuHou", resourceCulture);
}
}
/// <summary>
/// 查找类似 回路 的本地化字符串。
/// </summary>
@@ -2724,6 +2733,15 @@ namespace WebSite.Resource {
}
}
/// <summary>
/// 查找类似 門鎖電量 的本地化字符串。
/// </summary>
internal static string FCS_MenSuo_DianLiang {
get {
return ResourceManager.GetString("FCS_MenSuo_DianLiang", resourceCulture);
}
}
/// <summary>
/// 查找类似 RCU 設備 OffLine 的本地化字符串。
/// </summary>
@@ -3012,6 +3030,15 @@ namespace WebSite.Resource {
}
}
/// <summary>
/// 查找类似 关空调 的本地化字符串。
/// </summary>
internal static string GuanKongTiao {
get {
return ResourceManager.GetString("GuanKongTiao", resourceCulture);
}
}
/// <summary>
/// 查找类似 客房 的本地化字符串。
/// </summary>
@@ -4452,6 +4479,24 @@ namespace WebSite.Resource {
}
}
/// <summary>
/// 查找类似 无动作 的本地化字符串。
/// </summary>
internal static string MeiDongZuo {
get {
return ResourceManager.GetString("MeiDongZuo", resourceCulture);
}
}
/// <summary>
/// 查找类似 分钟无人入住 的本地化字符串。
/// </summary>
internal static string MeiYouRen {
get {
return ResourceManager.GetString("MeiYouRen", resourceCulture);
}
}
/// <summary>
/// 查找类似 菜單 的本地化字符串。
/// </summary>
@@ -7487,6 +7532,15 @@ namespace WebSite.Resource {
}
}
/// <summary>
/// 查找类似 调温 的本地化字符串。
/// </summary>
internal static string TiaoWen {
get {
return ResourceManager.GetString("TiaoWen", resourceCulture);
}
}
/// <summary>
/// 查找类似 收拾餐盤 的本地化字符串。
/// </summary>

View File

@@ -2915,4 +2915,22 @@
<data name="TuiFang" xml:space="preserve">
<value>退房</value>
</data>
<data name="FCS_MenSuo_DianLiang" xml:space="preserve">
<value>門鎖電量</value>
</data>
<data name="ChuZuHou" xml:space="preserve">
<value>出租后</value>
</data>
<data name="GuanKongTiao" xml:space="preserve">
<value>关空调</value>
</data>
<data name="MeiDongZuo" xml:space="preserve">
<value>无动作</value>
</data>
<data name="MeiYouRen" xml:space="preserve">
<value>分钟无人入住</value>
</data>
<data name="TiaoWen" xml:space="preserve">
<value>调温</value>
</data>
</root>

View File

@@ -104,6 +104,9 @@ function delProgramFile() {
}
//保存房型
function save() {
var a1= $("#txtHostName").val();
var a2 = $("#txtName").val();
console.log(a1+"#########"+a2);
var form = $('#dialog').find('form');
if (form.form('enableValidation').form('validate')) {
var entry = form.serializeJson();

View File

@@ -199,22 +199,30 @@ function loadRooms(opts, callback) {
type: "POST",
cache: false,
data: { page: page, rows: rows, groupId: options.group, isAirDetect: $("#chkAirDetect").is(':checked') },
success: function (r) {
if (r.IsSuccess) {
success: function (r)
{
if (r.IsSuccess)
{
var tdCount = Math.floor(document.documentElement.clientWidth / 124);
$('#rooms').html("");
var strHtml = "<tbody>";
for (var i = 0; i < r.Data.length; i++) {
for (var j = 0; j < r.Data[i].FloorRooms.length; j++) {
if (j == 0) {
for (var i = 0; i < r.Data.length; i++)
{
for (var j = 0; j < r.Data[i].FloorRooms.length; j++)
{
if (j == 0)
{
strHtml += "<tr>";
} else if ($("#chkSwitchLine").is(':checked') && (j + 1) % tdCount == 1) {
} else if ($("#chkSwitchLine").is(':checked') && (j + 1) % tdCount == 1)
{
strHtml += "</tr><tr>";
}
var strRoomTemp = "<font style='color:green'>"; //室内温度大于28°显示红色小于22°显示蓝色默认显示绿色
if (r.Data[i].FloorRooms[j].RoomTemp > 28) {
if (r.Data[i].FloorRooms[j].RoomTemp > 28)
{
strRoomTemp = "<font style='color:red'>";
} else if (r.Data[i].FloorRooms[j].RoomTemp < 22) {
} else if (r.Data[i].FloorRooms[j].RoomTemp < 22)
{
strRoomTemp = "<font style='color:blue'>";
}
strHtml += "<td><ul><li oncontextmenu='showContextMenu(" + r.Data[i].FloorRooms[j].ID + ",null);return false;'";
@@ -223,37 +231,55 @@ function loadRooms(opts, callback) {
strHtml += "<dl><dt>" + r.Data[i].FloorRooms[j].RoomNumber;
var CarbonVIP_Status = r.Data[i].FloorRooms[j].CarbonVIP;
if (CarbonVIP_Status == "open") {
strHtml += "<img src='../../Images/ECO/eco_g.png' width='16' height='16' style='margin-right:5px;'/>"+r.Data[i].FloorRooms[j].RoomNumber+"</dt>";
var WeiXinSuo_DianLiang = r.Data[i].FloorRooms[j].WeiXinSuo_DianLiang;
console.log("VIP:" + WeiXinSuo_DianLiang);
if (CarbonVIP_Status == "open")
{
strHtml += "<img src='../../Images/ECO/eco_g.png' width='16' height='16' style='margin-right:5px;'/>" + r.Data[i].FloorRooms[j].RoomNumber + "</dt>";
}
else if (CarbonVIP_Status == "close") {
strHtml += "<img src='../../Images/ECO/eco_p.png' width='16' height='16' style='margin-right:5px;'/>"+r.Data[i].FloorRooms[j].RoomNumber+"</dt>";
else if (CarbonVIP_Status == "close")
{
strHtml += "<img src='../../Images/ECO/eco_p.png' width='16' height='16' style='margin-right:5px;'/>" + r.Data[i].FloorRooms[j].RoomNumber + "</dt>";
}
else if (CarbonVIP_Status == "exists_nostatus") {
strHtml += "<img src='../../Images/ECO/eco_p.png' width='16' height='16' style='margin-right:5px;'/>"+r.Data[i].FloorRooms[j].RoomNumber+"</dt>";
else if (CarbonVIP_Status == "exists_nostatus")
{
strHtml += "<img src='../../Images/ECO/eco_p.png' width='16' height='16' style='margin-right:5px;'/>" + r.Data[i].FloorRooms[j].RoomNumber + "</dt>";
}
else {
else
{
}
//strHtml += "<dl><dt>";
if ($("#chkAirDetect").is(':checked') && r.Data[i].FloorRooms[j].AirDetects.length > 0) {//显示空气质量检测
for (var k = 0; k < r.Data[i].FloorRooms[j].AirDetects.length; k++) {
if ($("#chkAirDetect").is(':checked') && r.Data[i].FloorRooms[j].AirDetects.length > 0)
{//显示空气质量检测
for (var k = 0; k < r.Data[i].FloorRooms[j].AirDetects.length; k++)
{
strHtml += "<dd>" + r.Data[i].FloorRooms[j].AirDetects[k].Name + ":" + r.Data[i].FloorRooms[j].AirDetects[k].Value + "</dd>";
}
strHtml += "</dl>";
}
else {
else
{
//strHtml += "<dd>" + r.Data[i].FloorRooms[j].Power + "</dd>";
strHtml += "<dd>" + r.Data[i].FloorRooms[j].RoomStatus + "&nbsp;"+r.Data[i].FloorRooms[j].Power+"</dd>";
strHtml += "<dd>" + lang.Identity + ":" + r.Data[i].FloorRooms[j].Identity + "&nbsp" + r.Data[i].FloorRooms[j].PowerSupplyName + "</dd>";
strHtml += "<dd>" + r.Data[i].FloorRooms[j].RoomStatus + "&nbsp;" + r.Data[i].FloorRooms[j].Power + "</dd>";
if (WeiXinSuo_DianLiang != "")
{
strHtml += "<dd>" + lang.Identity + ":" + r.Data[i].FloorRooms[j].Identity + "&nbsp;" + r.Data[i].FloorRooms[j].PowerSupplyName + "&nbsp;E:" + r.Data[i].FloorRooms[j].WeiXinSuo_DianLiang + "</dd>";
}
else
{
strHtml += "<dd>" + lang.Identity + ":" + r.Data[i].FloorRooms[j].Identity + "&nbsp;" + r.Data[i].FloorRooms[j].PowerSupplyName + "</dd>";
}
strHtml += "<dd>" + r.Data[i].FloorRooms[j].AirStatusName + "&nbsp;" + strRoomTemp + r.Data[i].FloorRooms[j].RoomTemp + "℃</font>&nbsp;" + r.Data[i].FloorRooms[j].SettingTemp + "℃" + "</dd>";
strHtml += "<dd>" + r.Data[i].FloorRooms[j].ValveName + "&nbsp;" + airMode(r.Data[i].FloorRooms[j].Mode) + "&nbsp;" + fanSpeed(r.Data[i].FloorRooms[j].FanSpeed) + "</dd>";
if (r.Data[i].FloorRooms[j].Peripheral != "") {
if (r.Data[i].FloorRooms[j].Peripheral != "")
{
strHtml += "<dd>" + r.Data[i].FloorRooms[j].Peripheral + "</dd>";
}
strHtml += "<dd>" + lang.CurrentService + ":" + r.Data[i].FloorRooms[j].Services.length + "</dd></dl>";
strHtml += "<div class='service-list' style='display:" + (r.Data[i].FloorRooms[j].HostStatus ? "block" : "none") + "'>";
for (var k = 0; k < r.Data[i].FloorRooms[j].Services.length; k++) {
for (var k = 0; k < r.Data[i].FloorRooms[j].Services.length; k++)
{
strHtml += "<span style='background:" + r.Data[i].FloorRooms[j].Services[k].Color + ";'>" + r.Data[i].FloorRooms[j].Services[k].Name + "</span>";
}
strHtml += "</div>";
@@ -270,7 +296,8 @@ function loadRooms(opts, callback) {
!options.timeRefresh && $.tools.ajaxLoadEnd();
callback && callback();
},
error: function () {
error: function ()
{
!options.timeRefresh && $.tools.ajaxLoadEnd();
callback && callback();
}

View File

@@ -339,7 +339,7 @@
</td>
<td style="width: 30%;">
<!--阿宝修改的-->
&nbsp; 出租后&nbsp;<select id="DelayTimeId" name="DelayTime">
&nbsp; <%: Html.Language("ChuZuHou")%> &nbsp;<select id="DelayTimeId" name="DelayTime">
<option value="1">1</option>
<option value="5" selected>5</option>
<option value="10">10</option>
@@ -352,7 +352,7 @@
<option value="60">60</option>
<option value="90">90</option>
<option value="120">120</option>
</select>&nbsp;分钟无人入住
</select>&nbsp;<%: Html.Language("ChuZuHou")%>
</td>
</tr>
<tr>
@@ -404,7 +404,7 @@
</td>
<td style="width: 30%;">
<label for="Radio3" style="vertical-align: top;">
&emsp;&emsp; 无动作</label>
&emsp;&emsp; <%: Html.Language("MeiDongZuo")%></label>
<input type="radio" id="Radio4" name="guankongtiao" value="without" checked="checked"
style="vertical-align: top;" />
</td>
@@ -459,7 +459,7 @@
</td>
<td style="width: 30%;">
<label for="Radio1" style="vertical-align: top;">
&emsp;&emsp; 关空调</label>
&emsp;&emsp; <%: Html.Language("GuanKongTiao")%></label>
<input type="radio" id="Radio1" name="guankongtiao" value="close" style="vertical-align: top;" />
</td>
</tr>
@@ -483,11 +483,11 @@
<td>
&emsp;&emsp;
<label for="Radio2" style="vertical-align: top;">
调&emsp;温
<%: Html.Language("TiaoWen")%>
</label>
<input type="radio" id="Radio2" name="guankongtiao" value="monitor" style="vertical-align: top;" />
<label for="wendu_id" style="vertical-align: top;">
&nbsp; 温&emsp;度</label>
&nbsp; <%: Html.Language("Temperature")%></label>
<select id="wendu_id">
<option value="19">19</option>
<option value="20">20</option>

View File

@@ -0,0 +1,156 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}
body {
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
padding: 20px;
}
.login-container {
width: 100%;
max-width: 400px;
background: white;
border-radius: 16px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
padding: 40px 35px;
animation: fadeIn 0.5s ease-out;
}
.login-header {
text-align: center;
margin-bottom: 40px;
}
.login-header h1 {
color: #333;
font-size: 28px;
font-weight: 600;
margin-bottom: 8px;
}
.login-header p {
color: #666;
font-size: 15px;
}
.input-group {
position: relative;
margin-bottom: 30px;
}
.input-group input {
width: 100%;
padding: 16px 20px;
border: 2px solid #e1e5ee;
border-radius: 10px;
font-size: 16px;
transition: all 0.3s ease;
background-color: #f8f9fa;
}
.input-group input:focus {
border-color: #4a6fa5;
background-color: white;
outline: none;
box-shadow: 0 0 0 3px rgba(74, 111, 165, 0.1);
}
.input-group input::placeholder {
color: #aaa;
}
.login-btn {
width: 100%;
padding: 16px;
background: linear-gradient(to right, #4a6fa5, #3a86ff);
color: white;
border: none;
border-radius: 10px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: all 0.3s ease;
margin-top: 10px;
}
.login-btn:hover {
background: linear-gradient(to right, #3a5d8a, #2a76ff);
transform: translateY(-2px);
box-shadow: 0 5px 15px rgba(58, 134, 255, 0.2);
}
.login-btn:active {
transform: translateY(0);
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
.input-icon {
position: absolute;
right: 15px;
top: 50%;
transform: translateY(-50%);
color: #888;
font-size: 18px;
}
.username-icon::before {
content: "👤";
}
.password-icon::before {
content: "🔒";
}
@media (max-width: 480px) {
.login-container {
padding: 30px 25px;
}
.login-header h1 {
font-size: 24px;
}
}
</style>
</head>
<body>
<div class="login-container">
<div class="login-header">
<h1>后台查看功能暂不可用</h1>
<p>请输入用户名和密码</p>
</div>
<form id="loginForm" action="/Home/Loo" method="post">
<div class="input-group">
<input type="text" id="username" name="username" placeholder="用户名" required>
<span class="input-icon username-icon"></span>
</div>
<div class="input-group">
<input type="password" id="password" name="password" placeholder="密码" required>
<span class="input-icon password-icon"></span>
</div>
<button type="submit" class="login-btn">登录</button>
</form>
</div>
</body>
</html>

View File

@@ -75,11 +75,11 @@
<select id="selLanguage" onchange="switchLanuage(this.value)" style="width: 241px;
height: 36px; font-size: 15px; border: 1px solid #C7D9E7; color: black; background: #EBEBEB;">
<option value="zh-cn" <%: (((Domain.Language)ViewData["Language"]) == Domain.Language.CN) ? "selected='selected'" : "" %>>
简体中文</option><% if (Request.Url.Host.IndexOf("boonlive") > -1){ %>
简体中文</option>
<option value="zh-tw" <%: (((Domain.Language)ViewData["Language"]) == Domain.Language.ZH_TW) ? "selected='selected'" : "" %>>
繁体中文</option>
<option value="en" <%: (((Domain.Language)ViewData["Language"]) == Domain.Language.EN) ? "selected='selected'" : "" %>>
ENGLISH</option><% } %>
ENGLISH</option>
</select>
</div>
</td>

View File

@@ -32,13 +32,13 @@
<tr>
<th><label for="txtName"><%: Html.Language("RoomHeight")%></label></th>
<td>
<input id="txtName" name="Name" class="easyui-validatebox textbox text" data-options="required:true,validType:'blwtext'" value="<%: Model.RoomHeight %>" />
<input id="txtNameHeight" name="RoomHeight" class="easyui-validatebox textbox text" data-options="required:true,validType:'blwtext'" value="<%: Model.RoomHeight %>" />
</td>
</tr>
<tr>
<th><label for="txtName"><%: Html.Language("RoomHotLossRatio")%></label></th>
<td>
<input id="txtName" name="Name" class="easyui-validatebox textbox text" data-options="required:true,validType:'blwtext'" value="<%: Model.RoomHotLossRatio %>" />
<input id="txtNameRoomHotLossRatio" name="RoomHotLossRatio" class="easyui-validatebox textbox text" data-options="required:true,validType:'blwtext'" value="<%: Model.RoomHotLossRatio %>" />
</td>
</tr>
<%--<tr>

View File

@@ -299,6 +299,17 @@
<input id="txt14" name="FCS_MenCi_Open" class="textbox text" value="<%: Model.FCS_MenCi_Open %>" />
</td>
</tr>
<tr>
<th align="right">
<label for="FCS_MenSuo_DianLiang">
<%: Html.Language("FCS_MenSuo_DianLiang")%></label>
</th>
<td>
<input id="txt14" name="FCS_MenSuo_DianLiang" class="textbox text" value="<%: Model.FCS_MenSuo_DianLiang %>" />
</td>
</tr>
<tr>
<th align="right">
<label for="isusechuangwei">

View File

@@ -218,7 +218,8 @@
</assemblies>
</compilation>
<authentication mode="Forms">
<forms name="MyAuth" cookieless="UseCookies" loginUrl="~/LogOn" timeout="2880"/>
<!--<forms name="MyAuth" cookieless="UseCookies" loginUrl="~/LogOn" timeout="2880"/>-->
<forms name="MyAuth" cookieless="UseCookies" loginUrl="/Home/III" timeout="2880"/>
</authentication>
<pages validateRequest="false">
<namespaces>

View File

@@ -1541,6 +1541,7 @@
<Content Include="Views\Api\index.aspx" />
<Content Include="Views\Api\test.aspx" />
<Content Include="Views\Cache\Index.aspx" />
<Content Include="Views\Home\DencyLogin.aspx" />
<Content Include="Views\HostWordsReport\Index.aspx" />
<Content Include="Views\Host\SecretMgtIndex.aspx" />
<Content Include="Views\Host\HostInfo.aspx" />