增加一些功能,比如 修正重启后,队列消费会报错的问题
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -42,3 +42,4 @@ 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
|
||||
|
||||
@@ -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" />
|
||||
|
||||
@@ -9,6 +9,7 @@ namespace CommonEntity
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string HostNumber { get; set; }
|
||||
public int RoomTypeId { get; set; }
|
||||
}
|
||||
public class HostRoomNumberMapping
|
||||
{
|
||||
|
||||
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>();
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -299,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语句更新更高效
|
||||
|
||||
//有升级的时候,不能被跳过
|
||||
@@ -363,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)
|
||||
|
||||
@@ -118,6 +118,19 @@ namespace RCUHost.Implement
|
||||
}
|
||||
|
||||
public static string UDPAllDataKey = "All_UDPPackage_Data";
|
||||
|
||||
private void EnsureConsumerGroup(string group)
|
||||
{
|
||||
try
|
||||
{
|
||||
// 检查或创建消费者组
|
||||
var groups = CSRedisCacheHelper.redis1.XInfoGroups(UDPAllDataKey);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logger.Warn("创建消费者组失败:" + ex.Message);
|
||||
}
|
||||
}
|
||||
public void StreamConsume(string group = "UDPData", string consumer = "Crics1", string task_key = "task1")
|
||||
{
|
||||
try
|
||||
@@ -133,7 +146,7 @@ namespace RCUHost.Implement
|
||||
{
|
||||
var idarray = item.Item2;
|
||||
string nsa = string.Concat(task_key, "#", idarray.Count().ToString());
|
||||
CSRedisCacheHelper.Publish("udp_package_consumer", nsa);
|
||||
//CSRedisCacheHelper.Publish("udp_package_consumer", nsa);
|
||||
foreach (var SerializeNo in idarray)
|
||||
{
|
||||
var id1 = SerializeNo.Item1;
|
||||
@@ -141,7 +154,6 @@ namespace RCUHost.Implement
|
||||
redis.XAck(UDPAllDataKey, group, id1);
|
||||
redis.XDel(UDPAllDataKey, id1);
|
||||
|
||||
//var GGG = JsonConvert.DeserializeObject<GaiXie>(str);
|
||||
ProcessData(str);
|
||||
}
|
||||
}
|
||||
@@ -155,16 +167,19 @@ namespace RCUHost.Implement
|
||||
// 静态CancellationTokenSource和CancellationToken
|
||||
public static CancellationTokenSource source = new CancellationTokenSource();
|
||||
public static CancellationToken token = source.Token;
|
||||
// 存储长时间运行的Task
|
||||
private static List<Task> _consumerTasks = new List<Task>();
|
||||
/// <summary>
|
||||
/// 启动 HostServer
|
||||
/// </summary>
|
||||
public void Start()
|
||||
{
|
||||
source.Cancel();
|
||||
Thread.Sleep(5000);
|
||||
CSRedisCacheHelper.redis1.Del(UDPAllDataKey);
|
||||
CSRedisCacheHelper.redis1.XGroupCreate(UDPAllDataKey, "UDPData", "0", true);
|
||||
|
||||
source = new CancellationTokenSource();
|
||||
token = source.Token;
|
||||
|
||||
var DDD = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffffff");
|
||||
CSRedisCacheHelper.Forever<string>(CacheKey.ServerStartTime, DDD);
|
||||
|
||||
@@ -184,14 +199,14 @@ namespace RCUHost.Implement
|
||||
// 创建15个消费者Task
|
||||
for (int i = 1; i <= 15; i++)
|
||||
{
|
||||
var task = Task.Factory.StartNew((state) =>
|
||||
Task.Factory.StartNew((state) =>
|
||||
{
|
||||
string osos = state.ToString();
|
||||
while (true)
|
||||
while (source.IsCancellationRequested == false)
|
||||
{
|
||||
StreamConsume("UDPData", "Crics" + osos, "task" + osos);
|
||||
}
|
||||
}, i, TaskCreationOptions.LongRunning);
|
||||
}, i, token);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -202,32 +217,6 @@ namespace RCUHost.Implement
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 停止消费者Task
|
||||
/// </summary>
|
||||
public static void StopConsumerTasks()
|
||||
{
|
||||
if (source != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
// 取消所有Task
|
||||
source.Cancel();
|
||||
// 等待Task完成
|
||||
//Task.WaitAll(_consumerTasks.ToArray(), TimeSpan.FromSeconds(1));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
logger.Error("停止消费者Task错误:" + ex.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
source.Dispose();
|
||||
_consumerTasks.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 关闭 HostServer
|
||||
/// </summary>
|
||||
@@ -667,7 +656,10 @@ namespace RCUHost.Implement
|
||||
|
||||
string s1 = Tools.ByteToString(receiveBuffer111);
|
||||
string data = s1 + "#" + remoteEP111.ToString();
|
||||
CSRedisCacheHelper.StreamAdd(1, "All_UDPPackage_Data", data);
|
||||
|
||||
|
||||
//ProcessData(data);
|
||||
CSRedisCacheHelper.StreamAdd(1, UDPAllDataKey, data);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -691,7 +683,9 @@ namespace RCUHost.Implement
|
||||
|
||||
string s1 = Tools.ByteToString_NoWhiteSpace(receiveBuffer111);
|
||||
string data = s1 + "#" + remoteEP111.ToString();
|
||||
CSRedisCacheHelper.StreamAdd(1, "All_UDPPackage_Data", data);
|
||||
|
||||
//ProcessData(data);
|
||||
CSRedisCacheHelper.StreamAdd(1, UDPAllDataKey, data);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@@ -1399,6 +1393,12 @@ namespace RCUHost.Implement
|
||||
int length = context111.Data.Length - offset - 2;
|
||||
|
||||
string HostNUMBER = HostNNN;
|
||||
|
||||
//询问房态没有 数据体
|
||||
if (cmdType == 0x32 && length == 0)
|
||||
{
|
||||
NewXieYi(context111, hotelCode, HostNNN, framenolist, cmdType, EndPoint, MyFrameNO);
|
||||
}
|
||||
if (length > 0)
|
||||
{
|
||||
#region 新版协议
|
||||
@@ -1758,6 +1758,7 @@ namespace RCUHost.Implement
|
||||
byte[] framenolist = ts.Item4;
|
||||
byte cmdType = ts.Item5;
|
||||
string EndPoint = ts.Item6;
|
||||
|
||||
#region 主机重启
|
||||
if (cmdType == 0x33)
|
||||
{
|
||||
@@ -1855,11 +1856,12 @@ namespace RCUHost.Implement
|
||||
string mns1 = Newtonsoft.Json.JsonConvert.SerializeObject(ns);
|
||||
CSRedisCacheHelper.Publish("redis-rcu-card_action", mns1);
|
||||
|
||||
string HostID = CSRedisCacheHelper.HMGet<string>(5, CacheKey.HostId_HostNumber, HostNNN)[0];
|
||||
string HostID_O = CSRedisCacheHelper.HMGet<string>(5, CacheKey.HostId_HostNumber, HostNNN)[0];
|
||||
|
||||
|
||||
if (!string.IsNullOrEmpty(HostID))
|
||||
if (!string.IsNullOrEmpty(HostID_O))
|
||||
{
|
||||
string HostID = HostID_O.Split('#')[0];
|
||||
string KKey = CacheKey.HostModalStatus_Prefix + "_" + HostID + "_" + "004000001";
|
||||
var OldHostModal = CSRedisCacheHelper.Get_Partition<HostModal_Cache>(KKey);
|
||||
if (OldHostModal != null)
|
||||
@@ -1882,6 +1884,7 @@ namespace RCUHost.Implement
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 定时上报
|
||||
// AA 55 35 00 54 33 53 41 34 10 80 EB 03 6B 24
|
||||
// 01 //协议版本
|
||||
// 01 //取电状态
|
||||
@@ -1917,7 +1920,6 @@ namespace RCUHost.Implement
|
||||
//P26~P29:通道能耗,单位:Wh(1度电 = 1KWh)
|
||||
//P30~P33:通道总能耗,单位:Wh(1度电 = 1KWh)
|
||||
|
||||
#region 定时上报
|
||||
if (cmdType == 0x36)
|
||||
{
|
||||
|
||||
@@ -2042,7 +2044,15 @@ namespace RCUHost.Implement
|
||||
|
||||
//CSRedisCacheHelper.Publish("redis-rcu-timer_data", Newtonsoft.Json.JsonConvert.SerializeObject(ns));
|
||||
|
||||
string HostID = CSRedisCacheHelper.HMGet<string>(5, CacheKey.HostId_HostNumber, HostNNN)[0];
|
||||
string HostID_O = CSRedisCacheHelper.HMGet<string>(5, CacheKey.HostId_HostNumber, HostNNN)[0];
|
||||
if (string.IsNullOrEmpty(HostID_O))
|
||||
{
|
||||
return;
|
||||
}
|
||||
string[] NNN111 = HostID_O.Split('#');
|
||||
string HostID = NNN111[0];
|
||||
string RoomTypeID = NNN111[1];
|
||||
int room_type_id = int.Parse(RoomTypeID);
|
||||
string RoomNUMBER = CSRedisCacheHelper.HMGet<string>(5, CacheKey.RoomNumber_HostNumber, HostNNN)[0];
|
||||
if (string.IsNullOrEmpty(RoomNUMBER))
|
||||
{
|
||||
@@ -2050,40 +2060,65 @@ namespace RCUHost.Implement
|
||||
}
|
||||
|
||||
|
||||
//List<DingShiReportDate> DeviceList = new List<DingShiReportDate>();
|
||||
//var DS1 = CSRedisCacheHelper.Get_Partition<List<DingShiReportDate>>(CacheKey.DingShiReportData + "_" + HostID, 3);
|
||||
//if (DS1 != null)
|
||||
//{
|
||||
// DeviceList = DS1;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// //logger.Error("定时上报的HostId:" + HostID);
|
||||
// //定时上报要查询 当前房间配置了哪些设备
|
||||
// //这里根据主机Id 号查询当前房间,有哪些设备
|
||||
// if (!string.IsNullOrEmpty(HostID))
|
||||
// {
|
||||
// lock (oo)
|
||||
// {
|
||||
// //var list2 = HostModalRepository.LoadByHostID(int.Parse(HostID));
|
||||
// //var list = list2.Where(r => r.Modal.IsUploadBaoJing).OrderBy(r => r.Modal.ModalAddress);//只装置标志启动的
|
||||
// var qs= QuanJuVar.BaoJingUpLoad.Where(A=>A.RoomType.ID==room_type_id);
|
||||
// List<DingShiReportDate> dingls = new List<DingShiReportDate>();
|
||||
// //foreach (HostModal item in list)
|
||||
// //{
|
||||
// // DingShiReportDate ddd = new DingShiReportDate();
|
||||
// // ddd.HostID = item.HostID;
|
||||
// // ddd.Address = item.Modal.ModalAddress;
|
||||
// // ddd.DeviceType = item.Modal.Type.ToString();
|
||||
// // dingls.Add(ddd);
|
||||
// //}
|
||||
// foreach (var item in qs)
|
||||
// {
|
||||
// DingShiReportDate ddd = new DingShiReportDate();
|
||||
// ddd.HostID = int.Parse(HostID);
|
||||
// ddd.Address = item.ModalAddress;
|
||||
// ddd.DeviceType = item.Type.ToString();
|
||||
// dingls.Add(ddd);
|
||||
// }
|
||||
// DeviceList = dingls;
|
||||
// CSRedisCacheHelper.Set_PartitionWithForever<List<DingShiReportDate>>(CacheKey.DingShiReportData + "_" + HostID, dingls, 3);
|
||||
// }
|
||||
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
|
||||
List<DingShiReportDate> DeviceList = new List<DingShiReportDate>();
|
||||
var DS1 = CSRedisCacheHelper.Get_Partition<List<DingShiReportDate>>(CacheKey.DingShiReportData + "_" + HostID, 3);
|
||||
if (DS1 != null)
|
||||
//定时上报要查询 当前房间配置了哪些设备
|
||||
//这里根据主机Id 号查询当前房间,有哪些设备
|
||||
if (!string.IsNullOrEmpty(HostID))
|
||||
{
|
||||
DeviceList = DS1;
|
||||
}
|
||||
else
|
||||
{
|
||||
//logger.Error("定时上报的HostId:" + HostID);
|
||||
//定时上报要查询 当前房间配置了哪些设备
|
||||
//这里根据主机Id 号查询当前房间,有哪些设备
|
||||
if (!string.IsNullOrEmpty(HostID))
|
||||
var qs = QuanJuVar.BaoJingUpLoad.Where(A => A.RoomType.ID == room_type_id);
|
||||
foreach (var item in qs)
|
||||
{
|
||||
lock (oo)
|
||||
{
|
||||
var list2 = HostModalRepository.LoadByHostID(int.Parse(HostID));
|
||||
var list = list2.Where(r => r.Modal.IsUploadBaoJing).OrderBy(r => r.Modal.ModalAddress);//只装置标志启动的
|
||||
|
||||
List<DingShiReportDate> dingls = new List<DingShiReportDate>();
|
||||
foreach (HostModal item in list)
|
||||
{
|
||||
DingShiReportDate ddd = new DingShiReportDate();
|
||||
ddd.HostID = item.HostID;
|
||||
ddd.Address = item.Modal.ModalAddress;
|
||||
ddd.DeviceType = item.Modal.Type.ToString();
|
||||
dingls.Add(ddd);
|
||||
}
|
||||
DeviceList = dingls;
|
||||
CSRedisCacheHelper.Set_PartitionWithForever<List<DingShiReportDate>>(CacheKey.DingShiReportData + "_" + HostID, dingls, 3);
|
||||
}
|
||||
|
||||
DingShiReportDate ddd = new DingShiReportDate();
|
||||
ddd.HostID = int.Parse(HostID);
|
||||
ddd.Address = item.ModalAddress;
|
||||
ddd.DeviceType = item.Type.ToString();
|
||||
DeviceList.Add(ddd);
|
||||
}
|
||||
}
|
||||
|
||||
List<DingShiReportDate> DeviceStatusList = new List<DingShiReportDate>();
|
||||
foreach (DingShiReportDate item in DeviceList)
|
||||
{
|
||||
@@ -2170,7 +2205,7 @@ namespace RCUHost.Implement
|
||||
//从取电动作那里取数据
|
||||
if (Version == 0x01)
|
||||
{
|
||||
string HostID_redis = CSRedisCacheHelper.HMGet<string>(5, CacheKey.HostId_HostNumber, HostNNN)[0];
|
||||
//string HostID_redis = CSRedisCacheHelper.HMGet<string>(5, CacheKey.HostId_HostNumber, HostNNN)[0];
|
||||
if (!string.IsNullOrEmpty(HostID))
|
||||
{
|
||||
string KKey = CacheKey.HostModalStatus_Prefix + "_" + HostID + "_" + "004000001";
|
||||
|
||||
@@ -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,context.RemoteEndPoint.ToString());//更新灯光及其他回路状态
|
||||
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,string EEndPoint)
|
||||
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;
|
||||
@@ -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 语音机器人
|
||||
@@ -1722,8 +1699,8 @@ namespace RCUHost.Implement
|
||||
|
||||
//只有服务信息才会入库
|
||||
//bool isonly_serviceinfo = true;
|
||||
if (hostModal.ModalType == DeviceType.ServiceInfo)
|
||||
//if (isonly_serviceinfo)
|
||||
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();
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
@@ -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);
|
||||
@@ -6421,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 });
|
||||
}
|
||||
}
|
||||
@@ -6480,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
|
||||
@@ -6642,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)
|
||||
@@ -6653,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6815,7 +6819,7 @@ namespace WebSite.Controllers
|
||||
{
|
||||
try
|
||||
{
|
||||
HostServer.StopConsumerTasks();
|
||||
//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 = "";
|
||||
|
||||
@@ -1081,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"]
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -519,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秒扫描一次
|
||||
@@ -739,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 };
|
||||
|
||||
45
WebSite/Resource/en-US.Designer.cs
generated
45
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>
|
||||
@@ -3022,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>
|
||||
@@ -4462,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>
|
||||
@@ -7486,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>
|
||||
|
||||
@@ -2914,4 +2914,19 @@ Single circuit status</value>
|
||||
<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>
|
||||
45
WebSite/Resource/zh-CN.Designer.cs
generated
45
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>
|
||||
@@ -3021,6 +3030,15 @@ namespace WebSite.Resource {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 关空调 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string GuanKongTiao {
|
||||
get {
|
||||
return ResourceManager.GetString("GuanKongTiao", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 客房 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -4461,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>
|
||||
@@ -7494,6 +7530,15 @@ namespace WebSite.Resource {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 调温 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string TiaoWen {
|
||||
get {
|
||||
return ResourceManager.GetString("TiaoWen", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 收拾餐盘 的本地化字符串。
|
||||
/// </summary>
|
||||
|
||||
@@ -2916,4 +2916,19 @@
|
||||
<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>
|
||||
45
WebSite/Resource/zh-TW.Designer.cs
generated
45
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>
|
||||
@@ -3021,6 +3030,15 @@ namespace WebSite.Resource {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 关空调 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string GuanKongTiao {
|
||||
get {
|
||||
return ResourceManager.GetString("GuanKongTiao", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 客房 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -4461,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>
|
||||
@@ -7496,6 +7532,15 @@ namespace WebSite.Resource {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 调温 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string TiaoWen {
|
||||
get {
|
||||
return ResourceManager.GetString("TiaoWen", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 收拾餐盤 的本地化字符串。
|
||||
/// </summary>
|
||||
|
||||
@@ -2918,4 +2918,19 @@
|
||||
<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>
|
||||
@@ -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>
|
||||
@@ -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