Compare commits
7 Commits
ddd4f5a6b4
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| c13ab0cb56 | |||
| 182186e1fb | |||
| 696144b2ff | |||
| d0c626c189 | |||
| 1840794f40 | |||
| e46b19016b | |||
| a93c11fbfe |
4
.gitignore
vendored
4
.gitignore
vendored
@@ -39,3 +39,7 @@
|
||||
/WebSite/Logs
|
||||
WebSite/welcomebgm
|
||||
MvcApplication1
|
||||
ConsoleApplication4
|
||||
RCUHost内存泄漏分析报告.md
|
||||
CRICS_V3_1124.suo
|
||||
ConsoleApplication5
|
||||
|
||||
@@ -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.
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -336,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
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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" />
|
||||
|
||||
@@ -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; }
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace CommonEntity
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string HostNumber { get; set; }
|
||||
public int RoomTypeId { get; set; }
|
||||
}
|
||||
public class HostRoomNumberMapping
|
||||
{
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
13
CommonEntity/QuanJuVar.cs
Normal 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>();
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
|
||||
|
||||
@@ -537,7 +537,7 @@ namespace ConsoleApplication1
|
||||
UdpEndpoint u = new UdpEndpoint("127.0.0.1", 3350);
|
||||
}
|
||||
/// <summary>
|
||||
/// 设置名单
|
||||
/// 设置黑名单
|
||||
/// </summary>
|
||||
public static void SetBlockData()
|
||||
{
|
||||
|
||||
@@ -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>
|
||||
@@ -1,130 +0,0 @@
|
||||
using System;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
|
||||
namespace ConsoleApplication4
|
||||
{
|
||||
internal class UdpState
|
||||
{
|
||||
public UdpClient UdpClient { get; set;}
|
||||
public IPEndPoint RemoteEndPoint { get; set; }
|
||||
|
||||
public UdpState(UdpClient client)
|
||||
{
|
||||
this.UdpClient = client;
|
||||
}
|
||||
}
|
||||
|
||||
class Program
|
||||
{
|
||||
private static bool _isRunning = true;
|
||||
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Console.CancelKeyPress += (sender, e) =>
|
||||
{
|
||||
_isRunning = false;
|
||||
e.Cancel = true;
|
||||
};
|
||||
|
||||
try
|
||||
{
|
||||
var udpClient = new UdpClient(3340);
|
||||
udpClient.Client.ReceiveBufferSize = 3 * 1024 * 1024;
|
||||
|
||||
// 开始接收
|
||||
udpClient.BeginReceive(ReceiveCallback, new UdpState(udpClient));
|
||||
|
||||
Console.WriteLine("UDP服务器已启动,按Ctrl+C停止...");
|
||||
|
||||
// 保持程序运行
|
||||
while (_isRunning)
|
||||
{
|
||||
Thread.Sleep(100);
|
||||
}
|
||||
|
||||
udpClient.Close();
|
||||
Console.WriteLine("服务器已停止");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"启动失败: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
public static void ReceiveCallback(IAsyncResult ar)
|
||||
{
|
||||
UdpState state = ar.AsyncState as UdpState;
|
||||
|
||||
try
|
||||
{
|
||||
// 1. 先获取接收到的数据
|
||||
IPEndPoint remoteEndPoint = new IPEndPoint(IPAddress.Any, 0);
|
||||
byte[] receivedData = state.UdpClient.EndReceive(ar, ref remoteEndPoint);
|
||||
|
||||
// 2. 立即开始下一次接收(不等待数据处理完成)
|
||||
state.UdpClient.BeginReceive(ReceiveCallback, state);
|
||||
|
||||
// 3. 异步处理数据,避免阻塞接收
|
||||
ThreadPool.QueueUserWorkItem(_ =>
|
||||
{
|
||||
ProcessData(receivedData, remoteEndPoint, state.UdpClient);
|
||||
});
|
||||
}
|
||||
catch (ObjectDisposedException)
|
||||
{
|
||||
// 正常关闭,忽略
|
||||
}
|
||||
catch (SocketException ex)
|
||||
{
|
||||
//Console.WriteLine($"网络错误: {ex.SocketErrorCode} - {ex.Message}");
|
||||
|
||||
//// 尝试重新开始接收
|
||||
//if (_isRunning && state?.UdpClient?.Client != null)
|
||||
//{
|
||||
// try
|
||||
// {
|
||||
// state.UdpClient.BeginReceive(ReceiveCallback, state);
|
||||
// }
|
||||
// catch { }
|
||||
//}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
//Console.WriteLine($"接收回调错误: {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
private static void ProcessData(byte[] data, IPEndPoint remoteEP, UdpClient udpClient)
|
||||
{
|
||||
try
|
||||
{
|
||||
//// 这里是您的数据处理逻辑
|
||||
//Console.WriteLine($"收到来自 {remoteEP} 的数据,长度: {data.Length} 字节");
|
||||
|
||||
//// 示例:解码为字符串
|
||||
//if (data.Length > 0)
|
||||
//{
|
||||
// string text = Encoding.UTF8.GetString(data);
|
||||
// Console.WriteLine($"内容: {text}");
|
||||
//}
|
||||
|
||||
//// 这里可以处理复杂的业务逻辑
|
||||
//// 例如:数据库操作、文件处理、复杂计算等
|
||||
|
||||
//// 如果需要回复
|
||||
//if (data.Length > 0)
|
||||
//{
|
||||
// byte[] response = Encoding.UTF8.GetBytes($"已收到: {data.Length} 字节");
|
||||
// udpClient.Send(response, response.Length, remoteEP);
|
||||
//}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
//Console.WriteLine($"数据处理失败: {ex.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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")]
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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>
|
||||
@@ -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")]
|
||||
Binary file not shown.
@@ -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
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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" />
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -308,8 +308,6 @@ namespace RCUHost.Implement
|
||||
}
|
||||
|
||||
|
||||
string N1N = Newtonsoft.Json.JsonConvert.SerializeObject(rsg);
|
||||
CSRedisCacheHelper.Publish("redis-0XB1", N1N);
|
||||
|
||||
HostRepository.SetModelAndLauncher(host, hostRCU.ConfigVersion, software_version, lan_ip, lan_port, model, launcher_version, hostRCU.ExpireTime, hostRCU.SetExpireTime);
|
||||
|
||||
@@ -317,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);
|
||||
|
||||
@@ -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
@@ -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://电量
|
||||
|
||||
@@ -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://电量
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -126,15 +126,15 @@ 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) =>
|
||||
//{
|
||||
// var t1 = state as Tuple<Host, Device>;
|
||||
// var host1 = t1.Item1;
|
||||
// var device1 = t1.Item2;
|
||||
// DeviceControlReceiver.Send(host1, device1);//发送命令
|
||||
//}, t, System.Threading.CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default);
|
||||
//DeviceControlReceiver.Send(host, device);//发送命令
|
||||
var t = new Tuple<Host, Device>(host, device);
|
||||
System.Threading.Tasks.Task.Factory.StartNew((state) =>
|
||||
{
|
||||
var t1 = state as Tuple<Host, Device>;
|
||||
var host1 = t1.Item1;
|
||||
var device1 = t1.Item2;
|
||||
DeviceControlReceiver.Send(host1, device1);//发送命令
|
||||
}, t, System.Threading.CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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>
|
||||
@@ -6422,7 +6424,7 @@ namespace WebSite.Controllers
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logger.Error("同派出错:"+ex.Message);
|
||||
logger.Error("同派出错:" + ex.Message);
|
||||
return Json(new { IsSuccess = false, Message = HttpContext.InnerLanguage("SaveFailedBecause") + ex.Message });
|
||||
}
|
||||
}
|
||||
@@ -6481,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
|
||||
@@ -6643,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)
|
||||
@@ -6654,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6816,6 +6819,7 @@ namespace WebSite.Controllers
|
||||
{
|
||||
try
|
||||
{
|
||||
//HostServer.StopConsumerTasks();
|
||||
if (key.Equals("blw^_^wlb"))
|
||||
{
|
||||
var hostServer = (IHostServer)MvcApplication.cxt.GetObject("RCUHost.HostServer");
|
||||
|
||||
@@ -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 = "";
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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"]
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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;//断电重置小度
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 };
|
||||
|
||||
@@ -114,6 +114,11 @@ namespace WebSite.Models
|
||||
/// </summary>
|
||||
public string CarbonVIP { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 微信锁电量
|
||||
/// </summary>
|
||||
public string WeiXinSuo_DianLiang { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 功率
|
||||
/// </summary>
|
||||
|
||||
54
WebSite/Resource/en-US.Designer.cs
generated
54
WebSite/Resource/en-US.Designer.cs
generated
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
54
WebSite/Resource/zh-CN.Designer.cs
generated
54
WebSite/Resource/zh-CN.Designer.cs
generated
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
54
WebSite/Resource/zh-TW.Designer.cs
generated
54
WebSite/Resource/zh-TW.Designer.cs
generated
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
@@ -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();
|
||||
|
||||
@@ -231,7 +231,8 @@ function loadRooms(opts, callback) {
|
||||
|
||||
strHtml += "<dl><dt>" + r.Data[i].FloorRooms[j].RoomNumber;
|
||||
var CarbonVIP_Status = r.Data[i].FloorRooms[j].CarbonVIP;
|
||||
console.log("VIP:"+CarbonVIP_Status);
|
||||
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>";
|
||||
@@ -261,7 +262,14 @@ function loadRooms(opts, callback) {
|
||||
{
|
||||
//strHtml += "<dd>" + r.Data[i].FloorRooms[j].Power + "</dd>";
|
||||
strHtml += "<dd>" + r.Data[i].FloorRooms[j].RoomStatus + " " + r.Data[i].FloorRooms[j].Power + "</dd>";
|
||||
strHtml += "<dd>" + lang.Identity + ":" + r.Data[i].FloorRooms[j].Identity + " " + r.Data[i].FloorRooms[j].PowerSupplyName + "</dd>";
|
||||
if (WeiXinSuo_DianLiang != "")
|
||||
{
|
||||
strHtml += "<dd>" + lang.Identity + ":" + r.Data[i].FloorRooms[j].Identity + " " + r.Data[i].FloorRooms[j].PowerSupplyName + " E:" + r.Data[i].FloorRooms[j].WeiXinSuo_DianLiang + "</dd>";
|
||||
}
|
||||
else
|
||||
{
|
||||
strHtml += "<dd>" + lang.Identity + ":" + r.Data[i].FloorRooms[j].Identity + " " + r.Data[i].FloorRooms[j].PowerSupplyName + "</dd>";
|
||||
}
|
||||
strHtml += "<dd>" + r.Data[i].FloorRooms[j].AirStatusName + " " + strRoomTemp + r.Data[i].FloorRooms[j].RoomTemp + "℃</font> " + r.Data[i].FloorRooms[j].SettingTemp + "℃" + "</dd>";
|
||||
strHtml += "<dd>" + r.Data[i].FloorRooms[j].ValveName + " " + airMode(r.Data[i].FloorRooms[j].Mode) + " " + fanSpeed(r.Data[i].FloorRooms[j].FanSpeed) + "</dd>";
|
||||
if (r.Data[i].FloorRooms[j].Peripheral != "")
|
||||
|
||||
@@ -339,7 +339,7 @@
|
||||
</td>
|
||||
<td style="width: 30%;">
|
||||
<!--阿宝修改的-->
|
||||
出租后 <select id="DelayTimeId" name="DelayTime">
|
||||
<%: Html.Language("ChuZuHou")%> <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> 分钟无人入住
|
||||
</select> <%: Html.Language("ChuZuHou")%>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -404,7 +404,7 @@
|
||||
</td>
|
||||
<td style="width: 30%;">
|
||||
<label for="Radio3" style="vertical-align: top;">
|
||||
   无动作</label>
|
||||
   <%: 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;">
|
||||
   关空调</label>
|
||||
   <%: Html.Language("GuanKongTiao")%></label>
|
||||
<input type="radio" id="Radio1" name="guankongtiao" value="close" style="vertical-align: top;" />
|
||||
</td>
|
||||
</tr>
|
||||
@@ -483,11 +483,11 @@
|
||||
<td>
|
||||
  
|
||||
<label for="Radio2" style="vertical-align: top;">
|
||||
调 温
|
||||
<%: 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;">
|
||||
温 度</label>
|
||||
<%: Html.Language("Temperature")%></label>
|
||||
<select id="wendu_id">
|
||||
<option value="19">19</option>
|
||||
<option value="20">20</option>
|
||||
|
||||
156
WebSite/Views/Home/DencyLogin.aspx
Normal file
156
WebSite/Views/Home/DencyLogin.aspx
Normal 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>
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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" />
|
||||
|
||||
Reference in New Issue
Block a user