diff --git a/.gitignore b/.gitignore
index 8cc181b..3e15906 100644
--- a/.gitignore
+++ b/.gitignore
@@ -47,3 +47,4 @@ ConsoleApplication1
ConsoleApplication666
ConsoleApplication666
ConsoleApplication1
+ConsoleApplication2
diff --git a/CommonEntity/CommonEntity.csproj b/CommonEntity/CommonEntity.csproj
index 1cdfe3b..9751c5e 100644
--- a/CommonEntity/CommonEntity.csproj
+++ b/CommonEntity/CommonEntity.csproj
@@ -59,6 +59,7 @@
+
diff --git a/CommonEntity/FangTaiData.cs b/CommonEntity/FangTaiData.cs
new file mode 100644
index 0000000..bd7453c
--- /dev/null
+++ b/CommonEntity/FangTaiData.cs
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Domain;
+
+namespace CommonEntity
+{
+ public class FangTaiData
+ {
+ public int hotelID { get; set; }
+ public RoomStatus roomStatus { get; set; }
+ public string RoomNUM { get; set; }
+ }
+}
diff --git a/ConsoleApplication2/ConsoleApplication2.csproj b/ConsoleApplication2/ConsoleApplication2.csproj
deleted file mode 100644
index 14396ee..0000000
--- a/ConsoleApplication2/ConsoleApplication2.csproj
+++ /dev/null
@@ -1,139 +0,0 @@
-
-
-
- Debug
- x86
- 8.0.30703
- 2.0
- {4646F920-6D41-4519-8E03-5528B64EC7FE}
- Exe
- Properties
- ConsoleApplication2
- ConsoleApplication2
- v4.0
-
-
- 512
- publish\
- true
- Disk
- false
- Foreground
- 7
- Days
- false
- false
- true
- 0
- 1.0.0.%2a
- false
- false
- true
-
-
- x86
- true
- full
- false
- bin\Debug\
- TRACE;DEBUG;AAA;BBB;CCC;
- prompt
- 4
-
-
- x86
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
-
- False
- ..\lib\Redis\CSRedisCore.dll
-
-
- ..\lib\taskschedule\FluentScheduler.dll
-
-
- ..\lib\jwt\jose-jwt.dll
-
-
- False
- ..\lib\Newtonsoft.Json.dll
-
-
- False
- ..\lib\RestSharp\RestSharp.dll
-
-
-
-
- ..\lib\Redis\System.ValueTuple.dll
-
-
-
-
-
-
-
-
-
-
-
-
-
- Designer
-
-
-
-
- {1D7073B2-4CC3-49F5-9F37-50A21D74A39D}
- CommonEntity
-
-
- {B3F29715-E925-4E56-9248-580F06C3BC11}
- Common
-
-
- {A42D287A-8EF4-48F6-B14C-7F9CA834F786}
- Domain
-
-
- {3AF4C628-0B47-412C-950A-DBC0161F2A7F}
- RCUHost
-
-
-
-
- False
- Microsoft .NET Framework 4 %28x86 和 x64%29
- true
-
-
- False
- .NET Framework 3.5 SP1 Client Profile
- false
-
-
- False
- .NET Framework 3.5 SP1
- false
-
-
- False
- Windows Installer 3.1
- true
-
-
-
-
-
\ No newline at end of file
diff --git a/ConsoleApplication2/ConsoleApplication2.csproj.user b/ConsoleApplication2/ConsoleApplication2.csproj.user
deleted file mode 100644
index e4e9363..0000000
--- a/ConsoleApplication2/ConsoleApplication2.csproj.user
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
- zh-CN
- false
-
-
\ No newline at end of file
diff --git a/ConsoleApplication2/Program.cs b/ConsoleApplication2/Program.cs
deleted file mode 100644
index 3fdfb6a..0000000
--- a/ConsoleApplication2/Program.cs
+++ /dev/null
@@ -1,784 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Jose;
-using System.Timers;
-using Common;
-using System.IO;
-using System.Threading.Tasks;
-using System.Threading;
-using FluentScheduler;
-using System.Xml;
-using System.Xml.Linq;
-using System.Collections;
-using System.Security.Cryptography.X509Certificates;
-using System.Diagnostics;
-using System.Runtime.InteropServices;
-using RCUHost.Protocols;
-using RestSharp;
-using Domain.IoTFerErEntity;
-using System.Net;
-using System.Collections.Concurrent;
-using RCUHost.Implement;
-using Domain;
-using Newtonsoft.Json;
-using CommonEntity;
-using Newtonsoft.Json.Linq;
-using CSRedis;
-
-namespace ConsoleApplication2
-{
- class Program
- {
-
- public static string NormalizeVersion(string version, int desiredParts = 3)
- {
- // 移除末尾的冗余点并分割
- var parts = version.TrimEnd('.').Split(new[] { '.' }, StringSplitOptions.RemoveEmptyEntries);
-
- // 补零到目标位数
- while (parts.Length < desiredParts)
- {
- parts = parts.Concat(new[] { "0" }).ToArray();
- }
-
- return string.Join(".", parts);
- }
-
-
- public struct A
- {
- public string id { get; set; }
- public string name { get; set; }
- }
- static System.Timers.Timer t = null;
-
-
-
- public enum Fruit
- {
- Apple, Bear
- }
- public class GA
- {
- public string NNN { get; set; }
- public Fruit FFF { get; set; }
- }
-
- public class GGG
- {
- public string Name { get; set; }
- }
-
- [DllImport("kernel32.dll")]
- private static extern void GetSystemTimePreciseAsFileTime(out long fileTime);
-
- // 将 FILETIME (long) 转换为 DateTime
- public static DateTime GetNowPrecise()
- {
- long fileTime;
- GetSystemTimePreciseAsFileTime(out fileTime);
- DateTime localTime = DateTime.FromFileTimeUtc(fileTime).ToLocalTime();
- return localTime;
- }
-
- static byte[] GetBytesFromString(string hexString)
- {
- byte[] bytes = new byte[hexString.Length / 2]; // 计算字节数组的长度
- for (int i = 0; i < bytes.Length; i++)
- {
- bytes[i] = Convert.ToByte(hexString.Substring(i * 2, 2), 16); // 每次取两个字符转换为字节
- }
- return bytes;
- }
-
- static void JieXi()
- {
-
- NewVersionLog s = new NewVersionLog();
- var nas = JsonConvert.SerializeObject(s);
- var data = Encoding.UTF8.GetBytes(nas);
-
- Encoding.UTF8.GetString(data);
-
- string strnn1 = "AA 55 2F 00 54 33 53 41 02 34 80 EB 03 6B 24 34 D0 B8 11 6B 24 01 01 01 39 01 01 00 10 F0 55 E8 03 E8 03 00 00 E8 03 00 00 E8 03 00 00 9E 00";
-
-
- //AA 55 2F 00 54 33 53 41 02 34 80 EB 03 6B 24
- //34 D0 B8 11 6B 24
- //01 解析版本
- //01 取电
- //01 设备数量
- //39
- //01
- //01
- //00
- //10 ///长度
- //F0 55 //电压
- //E8 03 //电流
- //E8 03 00 00 功率
- //E8 03 00 00 能耗
- //E8 03 00 00 总能耗
- //9E 00
- byte[] nnnafd = GetBytesFromString(strnn1.Replace(" ", ""));
- byte[] Data = GetBytesFromString(strnn1.Replace(" ", ""));
- byte[] MAC = Data.Skip(15).Take(6).ToArray();
- byte Version = Data.Skip(21).Take(1).FirstOrDefault();
-
- //从第21个数据开始
- byte TakeCard = Data.Skip(22).Take(1).FirstOrDefault();
-
- //设备数量
- byte DeviceCount = Data.Skip(23).Take(1).FirstOrDefault();
- byte LeiXing = Data.Skip(24).Take(1).FirstOrDefault();
- byte Address = Data.Skip(25).Take(1).FirstOrDefault();
- byte[] Num = Data.Skip(26).Take(2).ToArray();
-
- List lll = new List();
- lll.Add(LeiXing);
- lll.Add(Address);
- lll.AddRange(Num);
-
- string address = new DeviceAddress(lll.ToArray()).ToString();
-
- byte Len = Data.Skip(28).Take(1).FirstOrDefault();
- byte[] DianYa = Data.Skip(29).Take(2).ToArray();
- byte[] DianLiu = Data.Skip(31).Take(2).ToArray();
- byte[] Power = Data.Skip(33).Take(4).ToArray();
- byte[] PowerUsed = Data.Skip(37).Take(4).ToArray();
- byte[] TotalPowerUsed = Data.Skip(41).Take(4).ToArray();
- int dianya = BitConverter.ToUInt16(DianYa, 0);
- int dianliu = BitConverter.ToInt16(DianLiu, 0);
- int gonglv = BitConverter.ToInt32(Power, 0);
-
- int nenghao = BitConverter.ToInt32(PowerUsed, 0);
- int zongnenghao = BitConverter.ToInt32(TotalPowerUsed, 0);
-
- int V = dianya * 10 / 1000;
- int A = dianliu * 10 / 1000;
- int P = gonglv * 10 / 1000;
-
- decimal KW_H = nenghao / 1000;
- decimal Sum_KW_H = zongnenghao / 1000;
- }
-
- public class VVV
- {
- public DateTime ddd { get; set; }
- public VVV()
- {
- this.ddd = DateTime.Now;
- }
- }
-
- public class AUser
- {
- public string username { get; set; }
- public string password { get; set; }
- public int oauth_id { get; set; }
- }
- public static void FCSLLL()
- {
- try
- {
- //ssl 协议不兼容
- var A = (SecurityProtocolType)48;
- var B = (SecurityProtocolType)192;
- var C = (SecurityProtocolType)768;
- var D = (SecurityProtocolType)3072;
- var E = (SecurityProtocolType)12288;
- ServicePointManager.SecurityProtocol = A | B | C | D | E;
- string FCSLoginUrl = "https://api.fcs1cloud.com";
- string FCSLoginUserName = "hb.rcu";
- string FCSLoginPassWord = "P@1234";
- var client1 = new RestClient(FCSLoginUrl);
- var request1 = new RestRequest("/api/security/authenticate", Method.POST);
- //request1.AddHeader("Content-Type", "application/json");
-
- AUser us = new AUser();
- us.username = FCSLoginUserName;
- us.password = FCSLoginPassWord;
- us.oauth_id = 1;
- request1.AddJsonBody(us);
-
- //request1.AddBody(Newtonsoft.Json.JsonConvert.SerializeObject(us), DataFormat.Json);
-
-
- var QQQ = client1.Execute(request1);
- var UUN = QQQ.Content;
- HttpStatusCode HHH = QQQ.StatusCode;
- if (HHH == HttpStatusCode.Created || HHH == HttpStatusCode.OK)
- {
- string ddd = QQQ.Content;
- }
- }
- catch (Exception ex)
- {
- }
- }
-
- public static ConcurrentQueue ssslist = new ConcurrentQueue();
- public class A1
- {
- public string id { get; set; }
- public string name { get; set; }
- }
- public struct Tiao
- {
- public string Nsa { get; set; }
-
- }
- public static void Data()
- {
- XuanZhuResponse resp = new XuanZhuResponse();
- resp.code = "1085";
- resp.roomNumber = "1001";
- resp.address = "";
- resp.name = "";
- resp.status = 1;
- if (resp.status == 1)
- {
- resp.brightness = 0;
- resp.currentTemp = 25;
- resp.settingTemp = 25;
- resp.mode = 1;
- resp.fanSpeed = 1;
- resp.valve = 0;
- }
- MyHttp.SendHttpData("http://f-xcx.blv-oa.com/rcu/report", resp);
- }
- static void RedisTest()
- {
- var redis_webchat = new CSRedisClient(string.Format("47.119.147.104:26379" + ",password={0},defaultDatabase=0", "1001^_^lool"));
- redis_webchat.HMSet("a", "b", "c");
- }
- static void AAA()
- {
- string nnn = "AA 55 30 00 54 33 53 41 0F 15 71 FF FF FF FF 05 07 01 00 00 00 80 07 02 00 00 00 80 07 03 00 00 00 80 07 04 00 00 00 80 07 05 00 00 00 80 CA 7C";
- var data = Tools.GetBytesFromString(nnn.Replace(" ", ""));
- string hostNumber = "233003055055";
- var cmdtype = data[8];
- var device_count = data[15];
- if (cmdtype == 0x0F)
- {
- byte[] framenolist = data.Skip(7).Take(2).ToArray();
- var zhenhao = BitConverter.ToUInt16(framenolist, 0);
- string RoomNUMBER = CSRedisCacheHelper.HMGet(5, CacheKey.RoomNumber_HostNumber, hostNumber)[0];
- if (!string.IsNullOrEmpty(RoomNUMBER))
- {
- var code = Tools.HostNumberToHotelCode(hostNumber);
- DeviceActionData d1 = new DeviceActionData();
- d1.ts_ms = Tools.GetUnixTime();
- d1.hotel_id = code.ToString();
- d1.room_id = RoomNUMBER;
- d1.device_id = hostNumber;
- d1.frame_id = zhenhao;
- d1.cmd_word = "0F";
- //d1.udp_raw = Tools.ByteToString(data);
- d1.udp_raw = data;
- d1.direction = "下发";
-
- List lll1 = new List();
- List lll2 = new List();
- List lll3 = new List();
-
- int skip = 16;
- for (int i = 1; i <= device_count; i++)
- {
- var t1 = data.Skip(skip + (i - 1) * 6).Take(6).ToArray();
- ts_controlitem ts = new ts_controlitem();
- ts.dev_addr = t1[0];
- ts.dev_type = t1[1];
- ts.dev_loop = t1[2];
- ts.type_h = t1[3];
- ts.type_l = BitConverter.ToInt16(new byte[] { t1[5], t1[4] }, 0);
- lll3.Add(ts);
- }
- d1.control_list = lll3;
- }
- }
- }
-
-
-
- static void Main(string[] args)
- {
- byte[] ss111= Base64Url.Decode("qlUuAFQzU0E01oL4CIZhAQIABgAgAAAAAAAA/wICBwEAAAIbKgcCAAACGyp4Ig==");
- var vv1= Tools.ByteToString(ss111);
-#if AAA
- Console.WriteLine("aaaaaaaaaaaaa");
-#endif
-
-
- var ggg= BitConverter.ToString(new byte[]{0xaa,0xcc});
- AAA();
- string aaa111 = "233003";
- var bj1 = aaa111.Substring(0, 3);
- var a1 = int.Parse(bj1);
- var a2 = int.Parse(aaa111.Substring(3, 3));
- var a3 = new byte[] { Convert.ToByte(a1), Convert.ToByte(a2) };
- var uuua = BitConverter.ToUInt16(a3, 0);
-
- BitArray bit_a = new BitArray(new byte[] { 0xAA });
-
- bool bfa = bit_a.Get(0);
- bool bfaa = bit_a.Get(1);
-
- var DDD = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffffff");
- Console.WriteLine(DDD);
- var qqqhj = CSRedisCacheHelper.Get_Partition("HostModalStatusReceiver_13_000000001");
- var qq223 = JsonConvert.DeserializeObject(File.ReadAllText("3.txt"));
- RedisTest();
- Data();
- Console.ReadLine();
- string uuawer = string.Concat("h", "eeeelll");
-
- string QQQQSSS = File.ReadAllText("3.txt", Encoding.UTF8);
- var FFF = JsonConvert.DeserializeObject(QQQQSSS);
-
- JObject jsonObject = JObject.Parse(QQQQSSS);
- var error = jsonObject.SelectToken("error");
- var JJJ = FFF.data.FirstOrDefault();
-
- if (JJJ != null)
- {
- string orderuuid = JJJ.job_uuid;
- FCS_OrderData f = new FCS_OrderData();
- f.OrderUUID = orderuuid;
- f.PropertyID = "";
- f.ItemType = "Clean";
- f.OrderNo = JJJ.job_no;
- f.ItemUUID = "";
- f.LocationUUID = "";
- f.HotelCode = "";
- f.RoomNUMBER = "";
- string fsa = Newtonsoft.Json.JsonConvert.SerializeObject(f);
- //这个是 供轮循的时候调用使用
- CSRedisCacheHelper.HMSet(3, 60 * 24, CacheKey.FCSOrder, "aaa", fsa);
-
- //这个是供 取消订单的时候使用的
- //这个只 支持 取消 清理
- //logger.Error("记录入循环:"+orderuuid);
- CSRedisCacheHelper.Set_PartitionWithTime(CacheKey.FCSRoom_Mapping_Order + "_" + "", orderuuid, 24 * 60, 3);
- }
-
- //string orderuuid = JJJ.job_uuid;
-
- AskRoomStatusChangedReceiver h = new AskRoomStatusChangedReceiver();
- RoomStatus vv = new RoomStatus();
- vv.ID = 0x10;
-
- h.SendRoomStatusSelfNew("123", "321", vv, new byte[] { 0xee, 0xff }, 0x70);
- string NNU11232 = Guid.NewGuid().ToString("N");
- List list112 = new List(){new A1{id="1",name="A"},
- new A1(){id="2",name="B"}};
- List flattenedList = list112.SelectMany(a => new[] { a.id, a.name }).ToList();
- string result3432432 = string.Join(",", flattenedList); // 输出 "1,A,2,B"
-
- CSRedisCacheHelper.HMSet(5, "UUU", "1", "333333", "2", "3434342");
-
-
- int afdfdsa = 1;
- string fdfd = afdfdsa.ToString("000");
-
- ssslist.Enqueue("aaaaaa");
-
- string wer = "233003112125";
- var nnha = Tools.HostNumberToHotelCode(wer);
- bool isNumeric = wer.All(char.IsDigit);
- byte Chaka = CSRedisCacheHelper.Get_Partition("NNNNNNNNNNN", 5);
- CSRedisCacheHelper.HMSet(5, "A", "1", "333333");
- CSRedisCacheHelper.HMSet(5, "A", "2", "2222222222");
- CSRedisCacheHelper.HMSet(5, "A", "3", "1111111111111");
- var nnafdssfd = CSRedisCacheHelper.HMGetAll(5, "A");
- var nnafdssfd1 = CSRedisCacheHelper.HMGet(5, "A", "3");
- var bb = new byte[] { 0x00, 0x01, 0x02, 0x03 };
- var KKKFFF = BitConverter.ToString(bb);
-
- VVV vva = new VVV();
- Console.WriteLine(vva.ddd);
-
- uint yua = 30;
- double ddaf = (double)yua / 1000;
-
- double dddjkl = Math.Round(13.722);
- System.Timers.Timer timer2 = new System.Timers.Timer(1000);//每20秒扫描一次
- timer2.Elapsed += new ElapsedEventHandler(timer2_Elapsed); ;//定时同步PMS房态
- timer2.Enabled = true;
- timer2.AutoReset = true;
-
- long lln = Tools.GetUnixTime();
- DateTime nd = Tools.GetTimeFromUnixTime(lln);
- // 小端数字节数组(低位在前,高位在后)
- byte[] littleEndianBytes = { 0xE8, 0x03, 0x00, 0x00 }; // 表示1000
-
- // 直接转换为int(BitConverter会自动处理端序)
- int result = BitConverter.ToInt32(littleEndianBytes, 0);
-
- JieXi();
-
- DateTime ddd = GetNowPrecise();
- string tii = ddd.ToString("yyyy-MM-dd HH:mm:ss.ffffff");
- Console.WriteLine(tii);
- Console.ReadLine();
-
- List lllus = new List();
- for (int i = 0; i < 10; i++)
- {
- GGG g = new GGG();
- g.Name = i.ToString();
-
- lllus.Add(g);
- }
- //Tuple> lllaf = new Tuple>(lllus);
- List newlist = lllus;
- foreach (var item in lllus)
- {
- Task.Factory.StartNew(() =>
- {
- Console.WriteLine(item.Name);
- });
- }
-
- Console.ReadLine();
-
- System.Collections.Concurrent.ConcurrentQueue NNA = new System.Collections.Concurrent.ConcurrentQueue();
-
- Task.Factory.StartNew(() =>
- {
- }).ContinueWith((mytask) =>
- {
-
- });
-
- string ti = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.ffffff");
- Console.WriteLine(ti);
- byte[] b1 = new byte[] { 0x01, 0x02, 0x03, 0x04 };
- byte[] b2 = new byte[] { 0x01, 0x02, 0x03, 0x04, 0x05 };
- bool bbbnfm = b1.SequenceEqual(b2);
- foreach (var name in Enum.GetNames(typeof(Domain.DeviceType)))
- {
- Console.WriteLine(name);
- }
- long lll = Tools.GetCurrentTimeStamp(DateTime.Now);
- DateTime ddf = Tools.GetCurrentDateTime(lll);
- var payload = new Dictionary()
- {
- //{ "sub", "mr.x@contoso.com" },
- //{ "exp", 1300819380 }
- //iss:发行人
- //exp:到期时间
- //sub:主题
- //aud:用户
- //nbf:在此之前不可用
- //iat:发布时间
- //jti:JWT ID用于标识该JWT
- };
-
- var secretKey = Encoding.UTF8.GetBytes("#myemqtt123");
-
- string token = Jose.JWT.Encode(payload, secretKey, JwsAlgorithm.HS256);
-
- token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJtci54QGNvbnRvc28uY29tIiwiZXhwIjoxMzAwODE5MzgwfQ.nch1wu8T_rsT_bywCOm2W-qO2jcv69RsrrmpWU6fdDE";
- //var MMU = Jose.JWT.DecodeBytes(token, secretKey, JwsAlgorithm.HS256);
- //var NNN = Jose.JWT.Decode(token, secretKey);
- //var n1 = Jose.JWT.Verify(token, secretKey);
-
-
- var privateKey = new X509Certificate2("mycert.p12", "123456").PrivateKey;
-
- string token3 = Jose.JWT.Encode(payload, privateKey, JwsAlgorithm.RS256);
-
- Console.WriteLine(token);
-
- GA gvb = new GA();
- gvb.NNN = "fdfdf";
- gvb.FFF = Fruit.Apple;
- string qwerty = Newtonsoft.Json.JsonConvert.SerializeObject(gvb);
-
- var QQR = Newtonsoft.Json.JsonConvert.DeserializeObject(qwerty);
- var JK = new A { id = "1", name = "1" };
- var JJ = new A { id = "1", name = "1" };
- Console.WriteLine(JK.Equals(JJ));
- List lla = new List() {
- new A{id="1",name="1"},
- new A{id="2",name="2"}
- };
-
- List llb = new List() {
- new A{id="1",name="1"},
- new A{id="3",name="3"},
- };
-
- var QQQ = llb.Except(lla).ToList();
-
-
-
- t = new System.Timers.Timer();
- t.Interval = 1000;
- t.Elapsed += new ElapsedEventHandler(t_Elapsed);
- t.Start();
- do
- {
- Console.WriteLine("输入时间");
- string nnn = Console.ReadLine();
- int a = int.Parse(nnn);
- t.Interval = a;
-
- } while (true);
- //XmlDocument xmlDoc = new XmlDocument();
- //XmlElement element = xmlDoc.CreateElement("item"); // 创建元素
- //element.SetAttribute("id", "1"); // 设置属性
- //element.InnerText = "示例文本"; // 设置文本内容
- //xmlDoc.DocumentElement.AppendChild(element); // 将元素添加到根元素下
- //xmlDoc.Save("example.xml"); // 保存XML文件
-
- XElement xelement = new XElement("interface",
- new XAttribute[]
- {
- new XAttribute("orderno",""),
- new XAttribute("cost",""),
- new XAttribute("roomtype",""),
- new XAttribute("breakfast",""),
- new XAttribute("occupancy",""),
- new XAttribute("deposit","")
- },
- new XElement("item",
- new XAttribute[]
- {
- new XAttribute("idtype", "1"),
- new XAttribute("idcard", "1"),
- new XAttribute("customer", "1"),
- new XAttribute("sex", "1"),
- new XAttribute("country", "1"),
- new XAttribute("checkindate", "1"),
- new XAttribute("checkoutdate", "1")
- },
- "示例文本")
- );
- string hhh = xelement.ToString();
-
- List lllg = new List();
- lllg = null;
- lllg.DefaultIfEmpty();
-
- double aaq = double.Parse("10.0");
- int gh = Convert.ToInt32(aaq);
- // 调用示例
- string input = "15.0.1";
- string output = NormalizeVersion(input); // 输出 "15.0.0"
-
- // 添加调度任务
- JobManager.AddJob(
- // 调度业务
- () => Console.WriteLine("5 minutes just passed."),
- // 触发时间
- s => s.ToRunEvery(5).Seconds()
- );
- //// 立即停止
- //JobManager.Stop();
- //// 在任务完成后等待或者停止
- //JobManager.StopAndBlock();
-
- Console.ReadLine();
- for (int i = 0; i < 10000; i++)
- {
- Task.Factory.StartNew(() =>
- {
- Thread.Sleep(5000);
- Console.WriteLine("iiiii");
- });
- }
-
- Console.ReadKey();
- string aaa = File.ReadAllText("1.txt", Encoding.UTF8);
- aaa = aaa.Replace("\\\\\\", "\\");
- int? bba1 = null;
- Console.WriteLine(bba1);
-
- bool bba = SmartRobotDisable();
-
- ChuangWeiCommandData mmm = new ChuangWeiCommandData();
- mmm.nlp_namespace = "hotelcontrol";
- mmm.nlp_name = "LocalDDD";
- mmm.query = "打开房灯";
- mmm.resourcePackage = new PackageData()
- {
- skillSource = "智能家居",
- domain = "iot",
- aiState = 0,
- voiceprint = "",
- skillTitle = "",
- tips = "你可以对我说,小度小度"
- };
-
-
- List c = new List();
- MessageData mc = new MessageData();
- mc.header = new header()
- {
- messageId = "3432423423",
- name = "",
- @namespace = "",
- payloadVersion = "0.1.1"
- };
- mc.payload = new payload()
- {
- accessToken = "33434343",
- appliance = new Appliance()
- {
- applianceId = "id",
- additionalApplianceDetails = new Device()
- {
- deviceId = "lightid_0_01",
- deviceName = "走廊灯",
- deviceType = "LIGHT",
- type = "Device"
- }
- }
- };
-
- c.Add(mc);
-
- chuangweidata c12 = new chuangweidata();
- c12.data = c;
- mmm.nlp_cmd = c12;
-
-
- var YU = Newtonsoft.Json.JsonConvert.SerializeObject(mmm);
-
-
-
-
-
- Console.ReadKey();
- }
-
- static void timer2_Elapsed(object sender, ElapsedEventArgs e)
- {
- Console.WriteLine("111111111111");
- }
- public static bool SmartRobotDisable()
- {
-
- string st = "23:00";
- string et = "08:00";
-
- string[] st_a = st.Split(':');
- string[] et_a = et.Split(':');
-
- int h_st = int.Parse(st_a[0]);
- int M_st = int.Parse(st_a[1]);
-
- int h_et = int.Parse(et_a[0]);
- int M_et = int.Parse(et_a[1]);
-
- int y = DateTime.Now.Year;
- int m = DateTime.Now.Month;
- int d = DateTime.Now.Day;
- int hh = DateTime.Now.Hour;
- int mm = DateTime.Now.Minute;
- int ss = DateTime.Now.Second;
- var t1 = new DateTime(y, m, d, h_st, M_st, ss);
- var t2 = new DateTime(y, m, d, h_et, M_et, ss);
-
- bool ShiJian = false;
- //正常逻辑
- if (t2 >= t1)
- {
- var ti = DateTime.Now;
- //如果当前时间大于 起 小于 至,就代表 确实是 禁用
- if (ti >= t1 && ti <= t2)
- {
- ShiJian = true;
- }
- }
- else
- {
- var ti = DateTime.Now;
- var zero_ti = new DateTime(y, m, d, 23, 59, 59);
- var zero_ti_0 = new DateTime(y, m, d, 0, 0, 0);
- //var t3 = t2.AddDays(1);
-
- //如果当前时间 小于0点
- //或者说 当前时间 大于
- if ((ti > t1 && ti < zero_ti) || ti >= zero_ti_0 && ti <= t2)
- {
- ShiJian = true;
- }
- }
-
-
- return ShiJian;
- }
- static void t_Elapsed(object sender, ElapsedEventArgs e)
- {
- Console.WriteLine("1111111111111");
- }
- static void t_Elapsed1(object sender, ElapsedEventArgs e)
- {
- Console.WriteLine("22222222222222");
- }
- }
-
- public class FFFA : IEquatable
- {
-
- public bool Equals(FFFA other)
- {
- throw new NotImplementedException();
- }
- }
-
- public class Device
- {
- public string deviceType { get; set; }
- public string type { get; set; }
- public string deviceId { get; set; }
- public string deviceName { get; set; }
- }
- public class Appliance
- {
- public string applianceId { get; set; }
- public Device additionalApplianceDetails { get; set; }
- }
- public class header
- {
- public string messageId { get; set; }
- public string @namespace { get; set; }
- public string name { get; set; }
- public string payloadVersion { get; set; }
- }
- public class payload
- {
- public string accessToken { get; set; }
- public Appliance appliance { get; set; }
- }
- public class MessageData
- {
- public header header { get; set; }
- public payload payload { get; set; }
- }
- public class chuangweidata
- {
- public List data { get; set; }
- }
- public class ChuangWeiCommandData
- {
- public string nlp_namespace { get; set; }
- public string nlp_name { get; set; }
- public string query { get; set; }
- public chuangweidata nlp_cmd { get; set; }
- public PackageData resourcePackage { get; set; }
- }
- public class PackageData
- {
- public string skillTitle { get; set; }
- public string domain { get; set; }
- public int aiState { get; set; }
- public string voiceprint { get; set; }
- public string skillSource { get; set; }
- public string tips { get; set; }
- }
-}
diff --git a/ConsoleApplication2/Properties/AssemblyInfo.cs b/ConsoleApplication2/Properties/AssemblyInfo.cs
deleted file mode 100644
index 970781f..0000000
--- a/ConsoleApplication2/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// 有关程序集的常规信息通过以下
-// 特性集控制。更改这些特性值可修改
-// 与程序集关联的信息。
-[assembly: AssemblyTitle("ConsoleApplication2")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("ConsoleApplication2")]
-[assembly: AssemblyCopyright("Copyright © 2025")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// 将 ComVisible 设置为 false 使此程序集中的类型
-// 对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型,
-// 则将该类型上的 ComVisible 特性设置为 true。
-[assembly: ComVisible(false)]
-
-// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
-[assembly: Guid("0ecfb694-a7eb-4ecc-8809-4cb705cceb73")]
-
-// 程序集的版本信息由下面四个值组成:
-//
-// 主版本
-// 次版本
-// 内部版本号
-// 修订号
-//
-// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
-// 方法是按如下所示使用“*”:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/ConsoleApplication2/app.config b/ConsoleApplication2/app.config
deleted file mode 100644
index e429e49..0000000
--- a/ConsoleApplication2/app.config
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ConsoleApplication2/gua.blv-oa.com.key b/ConsoleApplication2/gua.blv-oa.com.key
deleted file mode 100644
index dcd882c..0000000
--- a/ConsoleApplication2/gua.blv-oa.com.key
+++ /dev/null
@@ -1,27 +0,0 @@
------BEGIN RSA PRIVATE KEY-----
-MIIEogIBAAKCAQEA1EvziSvbI3eETULroiF71wbYze4aO/yj5A2LN2seiRZNTLKe
-lOnu4svMDwfpKizMfqYvXV9Z2NwUNdFsDd/FWl2Xfdravzwz4z5u8agQ4Qwd8fVT
-naFY5DQLv+6l3nAI01eUxaKHER/FpHSZ48o8CpH/VtzqeS/bA5+LTyMODdETI0fb
-futFQS4xUIjoifN2oeggL5grhk39udyKfnwc0WG6086yb9uzr39oA39vKJNKTQqL
-cDiuLzooBBOq8YuKQ8qnuIt14SdxTrKmeHQ+azKlgPykzA/exTboORPAHpFk99tz
-6vuMdJBgrx93wt+ljoM8uKV2/J/6CKAOQZzYUQIDAQABAoH/KS/oZQnHz28LO/IV
-Gl9kp1MCEkcfeoPenWADTRJ7L3LO4b0bBx5bj6Sk8kWWoZgPadgpWEl8z5XjAI32
-E2Wr5DGZh9FDSda5j7I30//HRoy97TNWBZRH//4Y9COuCnmx507BOOv58wM2/7D0
-1OdnaVA/OZr34osQ8qMBZAO+YO9/HKXRQ5FUuq2R7AdSHsXoDeJHa8L1lK/62VT/
-0XlSmyCpEiaoIrig/B64EeZQjdS70yFgWNlLUr8XDPK0dLtoucMW0tyi9rr+id0g
-N/zhcMo1E5zxsoAQK+bJ5Whai1RItir9Xc8RCVDWHQl9RJ0V1HbHkyIeeLVyx6Nv
-e7p9AoGBAPl2p1Sh46iGItr8nAu3b8Ri7WUV2KvGeGUBcmtjXUvxYD6OmYFl0bFA
-urHzXxXZcuCS9+GZoTKxZThaOvT3eoqQ7mrX56MT9gdUmKjGexxbaGLvLJK8xNT+
-hIuTp0HnVLd8VxFxa1A0MAQtFTLCjY0nylaU7JVISm0jp7Y2tDX/AoGBANnb/atm
-Nl8Q5265pSsWwWlBxzAUYnqMZL8wyx5U0MYnkG84b0sNPsRgmZEA6RrWG35mlewa
-J+9v4I0PBOyXmW0EcqtBG3AMlv/JAfL2HLOcp/6IbgfenQZQVBIXhrIB5DhwmNLV
-qX5WdaJ08ouW/BYdcsAkK9smnh/aNs33KhGvAoGAJX1gbkaaCQSHjnNyHAyoPlJD
-rPJYipAcHcnW4S6gob4Xoa8agKjFl6bLp9yUSJtSOU+88ul8oTqppIti2teqUdKw
-Edx6kjZ4vedHve1+KOfPyzZ4c2DtD7lkP/mjpDLYt253Q0bRQs9k++uuiN9WGIWH
-UfW1jEW98aLvHGIiOQ8CgYEA0MwqLAqTU7ukw5dDeK+fgNzdJfRzidZifGcsVQ6e
-5TtoD2B8Meco4BdhNvszblgEE7oIODe9TJriEO9zHboR/s0DhaSpwlMeqVmh95Tv
-XylmTOm+4uX1guacHJbVrmdnrrwji/XhM0d0CNai2yxCwINKxmIkci5p4EdIvVAE
-ztsCgYEA01lI/DHP3IYK5L2tV2svm/aoSxnAta3ZLoR5/SYmCPKbw0G1G3xIqKfe
-1lbmtju/czzbQQFIDeRPRavK24RtU1INQSUs4xS0YDYr43rOK2hIaW+xZtpiEHVP
-0i9SXCpM2H8Z2t8L/MHxkwYS1LmzmCj2p5JGvAoL5LuFZBYwIaE=
------END RSA PRIVATE KEY-----
diff --git a/ConsoleApplication2/gua.blv-oa.com.pem b/ConsoleApplication2/gua.blv-oa.com.pem
deleted file mode 100644
index 5b600c6..0000000
--- a/ConsoleApplication2/gua.blv-oa.com.pem
+++ /dev/null
@@ -1,61 +0,0 @@
------BEGIN CERTIFICATE-----
-MIIF9TCCBN2gAwIBAgIQDoWTGuJgNSPCq9HqcbGHuzANBgkqhkiG9w0BAQsFADBu
-MQswCQYD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m9vdEcyLmNybDBMBgNVHSAERTBDMDcGCWCGSAGG
-/WwBAjAqMCgGCCsGAQUFBwIBFhxodHRwczovL3d3dy5kaWdpY2VydC5jb20vQ1BT
-MAgGBmeBDAECATANBgkqhkiG9w0BAQsFAAOCAQEAoBs1eCLKakLtVRPFRjBIJ9LJ
-L0s8ZWum8U8/1TMVkQMBn+CPb5xnCD0GSA6L/V0ZFrMNqBirrr5B241OesECvxIi
-98bZ90h9+q/X5eMyOD35f8YTaEMpdnQCnawIwiHx06/0BfiTj+b/XQih+mqt3ZXe
-xNCJqKexdiB2IWGSKcgahPacWkk/BAQFisKIFYEqHzV974S3FAz/8LIfD58xnsEN
-GfzyIDkH3JrwYZ8caPTf6ZX9M1GrISN8HnWTtdNCH2xEajRa/h9ZBXjUyFKQrGk2
-n2hcLrfZSbynEC/pSw/ET7H5nWwckjmAJ1l9fcnbqkU/pf6uMQmnfl0JQjJNSg==
------END CERTIFICATE-----
diff --git a/ConsoleApplication2/mycert.p12 b/ConsoleApplication2/mycert.p12
deleted file mode 100644
index 52a9eb4..0000000
Binary files a/ConsoleApplication2/mycert.p12 and /dev/null differ
diff --git a/Dao/Implement/HostRepository.cs b/Dao/Implement/HostRepository.cs
index 8e43e20..bed40fc 100644
--- a/Dao/Implement/HostRepository.cs
+++ b/Dao/Implement/HostRepository.cs
@@ -788,7 +788,7 @@ namespace Dao.Implement
///
public IList LoadAllID_HostNumberMapping()
{
- 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();
+ return base.LoadAll().Where(A => A.IsDeleted == false).Select(A => new HostMappingData() { Id = A.ID, HostNumber = A.HostNumber,RoomTypeId=A.RoomType.ID }).ToList();
}
diff --git a/RCUHost/Implement/HostServer.cs b/RCUHost/Implement/HostServer.cs
index 9cb1293..60e61d3 100644
--- a/RCUHost/Implement/HostServer.cs
+++ b/RCUHost/Implement/HostServer.cs
@@ -1575,10 +1575,6 @@ namespace RCUHost.Implement
var VVV1 = string.Join("", KKK1);
var VVV2 = string.Join("", KKK2);
- //StringBuilder sb = new StringBuilder();
- //sb.Clear();
- //sb.Append(VVV1);
- //sb.Append(VVV2);
string sb = string.Concat(VVV1, VVV2);
string YiJingChuLiGuo = CacheKey.AllReadyDealWith0E_Prefix + "_" + HostNUMBER;
object data = MemoryCacheHelper.Get(YiJingChuLiGuo);
diff --git a/WebSite/Controllers/IoTController.cs b/WebSite/Controllers/IoTController.cs
index ed987e8..f7ad02b 100644
--- a/WebSite/Controllers/IoTController.cs
+++ b/WebSite/Controllers/IoTController.cs
@@ -137,6 +137,28 @@ namespace WebSite.Controllers
HttpContext.Cache.Remove(Key);
return Json(new { result = "success" }, JsonRequestBehavior.AllowGet);
}
+
+ public static string OldIOTServerUrl = "http://a.boonlive-rcu.com/";
+ public void ZhuanFa(T reqData, string ActionMethod)
+ {
+ try
+ {
+ //string nsa = JsonConvert.SerializeObject(reqData);
+ logger.Error("进入转发" );
+ logger.Error("进入转发" + ActionMethod);
+ var client1 = new RestClient(OldIOTServerUrl);
+ var request1 = new RestRequest("iot/" + ActionMethod, Method.POST);
+ request1.AddJsonBody(reqData);
+ var QQQ = client1.Execute(request1);
+ string HHH = QQQ.Content;
+ //logger.Error("转发结果:" + HHH);
+ }
+ catch (Exception ex)
+ {
+ logger.Error("转发出错:" + ex.Message);
+ //return Json("语音机器人转发:"+ex.Message, JsonRequestBehavior.AllowGet);
+ }
+ }
///
/// 小度对接
///
@@ -164,10 +186,16 @@ namespace WebSite.Controllers
byte[] reqBody = new byte[Request.InputStream.Length];
Request.InputStream.Read(reqBody, 0, reqBody.Length);
string reqData = System.Text.Encoding.UTF8.GetString(reqBody);
+
string platformName = "小度音箱";
try
{
Domain.IoTXiaoDuEntity.Request.AppliancesRequest request = JsonConvert.DeserializeObject(reqData);//得到小度请求
+
+ if (NewOrOld.IsNew)
+ {
+ ZhuanFa(request, "XiaoDu");
+ }
if (string.IsNullOrEmpty(request.payload.cuid))
{
//logger.Error("设备cuid不能为空:" + reqData + ",来自:" + GetClientIP());
@@ -606,7 +634,7 @@ namespace WebSite.Controllers
if (!is_online)
{
logger.Error(platformName + "当前访问酒店(" + host.SysHotel.Name + host.SysHotel.Code + ")客房rcu(" + host.RoomNumber + ")不在线");
- return Json(ReturnXiaoDuError(request.header, "TargetOfflineError"), JsonRequestBehavior.AllowGet);//当技能检测到目标设备没有连接到设备云或者设备云不在线时,会给DuerOS发送TargetOfflineError消息。
+ //return Json(ReturnXiaoDuError(request.header, "TargetOfflineError"), JsonRequestBehavior.AllowGet);//当技能检测到目标设备没有连接到设备云或者设备云不在线时,会给DuerOS发送TargetOfflineError消息。
}
@@ -3906,6 +3934,7 @@ namespace WebSite.Controllers
byte[] reqBody = new byte[Request.InputStream.Length];
Request.InputStream.Read(reqBody, 0, reqBody.Length);
string reqData = System.Text.Encoding.UTF8.GetString(reqBody);
+
//logger.Error(reqData);
string g_requestid = "";
int g_hotelcode = 0;
@@ -3916,6 +3945,10 @@ namespace WebSite.Controllers
{
Domain.IoTAliGenieEntity.Request req = JsonConvert.DeserializeObject(reqData);//得到天猫精灵请求
+ if (NewOrOld.IsNew)
+ {
+ ZhuanFa(req, "aligenie");
+ }
if (string.IsNullOrEmpty(req.baseInfo.hotelId) || string.IsNullOrEmpty(req.baseInfo.roomNo))
{
@@ -4183,7 +4216,7 @@ namespace WebSite.Controllers
if (!is_online)
{
logger.Error(platformName + "当前访问酒店(" + host.SysHotel.Name + host.SysHotel.Code + ")客房rcu(" + host.RoomNumber + ")不在线");
- return Json(ReturnAliGenieError("当前访问rcu主机不在线", req.baseInfo.requestId), JsonRequestBehavior.AllowGet);//当技能检测到目标设备没有连接到设备云或者设备云不在线时,会给DuerOS发送TargetOfflineError消息。
+ //return Json(ReturnAliGenieError("当前访问rcu主机不在线", req.baseInfo.requestId), JsonRequestBehavior.AllowGet);//当技能检测到目标设备没有连接到设备云或者设备云不在线时,会给DuerOS发送TargetOfflineError消息。
}
bool is_card_in = CheckGetPower(host);
@@ -5730,7 +5763,7 @@ namespace WebSite.Controllers
result.code = 0;
result.msg = "当前房间主机不在线,无法控制";
- return Json(result, JsonRequestBehavior.AllowGet);
+ //return Json(result, JsonRequestBehavior.AllowGet);
}
diff --git a/WebSite/Models/NewOrOld.cs b/WebSite/Models/NewOrOld.cs
new file mode 100644
index 0000000..018886b
--- /dev/null
+++ b/WebSite/Models/NewOrOld.cs
@@ -0,0 +1,12 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+
+namespace WebSite.Models
+{
+ public class NewOrOld
+ {
+ public static bool IsNew = false;
+ }
+}
\ No newline at end of file
diff --git a/WebSite/WebSite.csproj b/WebSite/WebSite.csproj
index ace090a..45ed565 100644
--- a/WebSite/WebSite.csproj
+++ b/WebSite/WebSite.csproj
@@ -31,7 +31,7 @@
pdbonly
true
bin\
- TRACE;DEBUG;SIMON
+ TRACE;DEBUG;SIMON;NEW;
prompt
4
false
@@ -223,6 +223,7 @@
+