diff --git a/CRICS_V3_1124.suo b/CRICS_V3_1124.suo
index 923ba7d..0bb6121 100644
Binary files a/CRICS_V3_1124.suo and b/CRICS_V3_1124.suo differ
diff --git a/ConsoleApplication2/ConsoleApplication2.csproj b/ConsoleApplication2/ConsoleApplication2.csproj
index 132318b..7b21eb6 100644
--- a/ConsoleApplication2/ConsoleApplication2.csproj
+++ b/ConsoleApplication2/ConsoleApplication2.csproj
@@ -50,6 +50,10 @@
4
+
+ False
+ ..\lib\Redis\CSRedisCore.dll
+
..\lib\taskschedule\FluentScheduler.dll
@@ -66,6 +70,9 @@
+
+ ..\lib\Redis\System.ValueTuple.dll
+
diff --git a/ConsoleApplication2/Program.cs b/ConsoleApplication2/Program.cs
index ccc36ca..1c0c263 100644
--- a/ConsoleApplication2/Program.cs
+++ b/ConsoleApplication2/Program.cs
@@ -25,6 +25,7 @@ using Domain;
using Newtonsoft.Json;
using CommonEntity;
using Newtonsoft.Json.Linq;
+using CSRedis;
namespace ConsoleApplication2
{
@@ -241,8 +242,14 @@ namespace ConsoleApplication2
}
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 Main(string[] args)
{
+ RedisTest();
Data();
Console.ReadLine();
string uuawer = string.Concat("h", "eeeelll");
diff --git a/RCUHost/Implement/HostServer.cs b/RCUHost/Implement/HostServer.cs
index d7c67f3..2ee0457 100644
--- a/RCUHost/Implement/HostServer.cs
+++ b/RCUHost/Implement/HostServer.cs
@@ -1038,17 +1038,20 @@ namespace RCUHost.Implement
foreach (string cuid in a)//多个英文逗号隔开
{
- if (!string.IsNullOrEmpty(e))
- {
- string ffg = "https://www.boonlive-rcu.com/welcomebgm/" + e;
- TianMaoOperation.PostWebRequestToTianMao("PushWelcome",
- Newtonsoft.Json.JsonConvert.SerializeObject(new { HotelId = cuid.Split('&')[0], RoomNo = cuid.Split('&')[1], WelcomeText = b, MusicUrl = ffg }), c, d);//通知天猫精灵播放欢迎词
- }
- else
- {
- TianMaoOperation.PostWebRequestToTianMao("PushWelcome",
- Newtonsoft.Json.JsonConvert.SerializeObject(new { HotelId = cuid.Split('&')[0], RoomNo = cuid.Split('&')[1], WelcomeText = b }), c, d);//通知天猫精灵播放欢迎词
- }
+ //if (!string.IsNullOrEmpty(e))
+ //{
+ // string ffg = "https://www.boonlive-rcu.com/welcomebgm/" + e;
+ // TianMaoOperation.PostWebRequestToTianMao("PushWelcome",
+ // Newtonsoft.Json.JsonConvert.SerializeObject(new { HotelId = cuid.Split('&')[0], RoomNo = cuid.Split('&')[1], WelcomeText = b, MusicUrl = ffg }), c, d);//通知天猫精灵播放欢迎词
+ //}
+ //else
+ //{
+ // TianMaoOperation.PostWebRequestToTianMao("PushWelcome",
+ // Newtonsoft.Json.JsonConvert.SerializeObject(new { HotelId = cuid.Split('&')[0], RoomNo = cuid.Split('&')[1], WelcomeText = b }), c, d);//通知天猫精灵播放欢迎词
+ //}
+
+ TianMaoOperation.PostWebRequestToTianMao("PushWelcome",
+ Newtonsoft.Json.JsonConvert.SerializeObject(new { HotelId = cuid.Split('&')[0], RoomNo = cuid.Split('&')[1], WelcomeText = b }), c, d);//通知天猫精灵播放欢迎词
Interface3Log w1 = new Interface3Log();
w1.HotelCode = c;
diff --git a/RCUHost/Implement/New_RoomStatusReceiver.cs b/RCUHost/Implement/New_RoomStatusReceiver.cs
index b0ac43f..2b7c74a 100644
--- a/RCUHost/Implement/New_RoomStatusReceiver.cs
+++ b/RCUHost/Implement/New_RoomStatusReceiver.cs
@@ -1596,6 +1596,21 @@ namespace RCUHost.Implement
hostFaultRecords.Value = fault.Value.Data;
hostFaultRecords.Date = now;
HostFaultRecordsRepository.Save(hostFaultRecords);
+
+
+
+ XuanZhuResponse resp1 = new XuanZhuResponse()
+ {
+ code = host.SysHotel.Code,
+ roomNumber = host.RoomNumber,
+ address = hostModal.Modal.ModalAddress,
+ name = hostModal.Modal.Name,
+ status = hostModal.Status,
+ faultType = fault.Value.Type,
+ faultData = fault.Value.Data
+ };
+ string KKK = CacheKey.WebChatDeviceFault + "_" + resp1.code + "_" + resp1.roomNumber;
+ CSRedisCacheHelper.redis_webchat.HMSet(KKK, resp1.address, resp1);
//出现异常信息时上报
if (!string.IsNullOrEmpty(host.SysHotel.FaultPushURL))
{
diff --git a/RCUHost/Implement/RoomStatusReceiver.cs b/RCUHost/Implement/RoomStatusReceiver.cs
index 8c3c06a..d183ccf 100644
--- a/RCUHost/Implement/RoomStatusReceiver.cs
+++ b/RCUHost/Implement/RoomStatusReceiver.cs
@@ -968,25 +968,28 @@ namespace RCUHost.Implement
var b = hhh.SysHotel.WelcomeSpeech;
string bb = hhh.SysHotel.WelcomeBGM;
- if (!string.IsNullOrEmpty(bb))
- {
- bb = "https://www.boonlive-rcu.com/welcomebgm/" + bb;
- }
+ //if (!string.IsNullOrEmpty(bb))
+ //{
+ // bb = "https://www.boonlive-rcu.com/welcomebgm/" + bb;
+ //}
var c = hhh.SysHotel.Code;
var d = hhh.RoomNumber;
foreach (string cuid in a)//多个英文逗号隔开
{
- if (!string.IsNullOrEmpty(bb))
- {
- TianMaoOperation.PostWebRequestToTianMao("PushWelcome",
- Newtonsoft.Json.JsonConvert.SerializeObject(new { HotelId = cuid.Split('&')[0], RoomNo = cuid.Split('&')[1], WelcomeText = b, MusicUrl = bb }), c, d);//通知天猫精灵播放欢迎词
- }
- else
- {
+ //if (!string.IsNullOrEmpty(bb))
+ //{
+ // TianMaoOperation.PostWebRequestToTianMao("PushWelcome",
+ // Newtonsoft.Json.JsonConvert.SerializeObject(new { HotelId = cuid.Split('&')[0], RoomNo = cuid.Split('&')[1], WelcomeText = b, MusicUrl = bb }), c, d);//通知天猫精灵播放欢迎词
+ //}
+ //else
+ //{
+ // TianMaoOperation.PostWebRequestToTianMao("PushWelcome",
+ // Newtonsoft.Json.JsonConvert.SerializeObject(new { HotelId = cuid.Split('&')[0], RoomNo = cuid.Split('&')[1], WelcomeText = b }), c, d);//通知天猫精灵播放欢迎词
+ //}
+
TianMaoOperation.PostWebRequestToTianMao("PushWelcome",
Newtonsoft.Json.JsonConvert.SerializeObject(new { HotelId = cuid.Split('&')[0], RoomNo = cuid.Split('&')[1], WelcomeText = b }), c, d);//通知天猫精灵播放欢迎词
- }
Interface3Log w1 = new Interface3Log();
w1.HotelCode = c;
@@ -2121,6 +2124,20 @@ namespace RCUHost.Implement
hostFaultRecords.Value = fault.Value.Data;
hostFaultRecords.Date = now;
HostFaultRecordsRepository.Save(hostFaultRecords);
+
+
+ XuanZhuResponse resp1 = new XuanZhuResponse()
+ {
+ code = host.SysHotel.Code,
+ roomNumber = host.RoomNumber,
+ address = hostModal.Modal.ModalAddress,
+ name = hostModal.Modal.Name,
+ status = hostModal.Status,
+ faultType = fault.Value.Type,
+ faultData = fault.Value.Data
+ };
+ string KKK = CacheKey.WebChatDeviceFault + "_" + resp1.code + "_" + resp1.roomNumber;
+ CSRedisCacheHelper.redis_webchat.HMSet(KKK, resp1.address, resp1);
//出现异常信息时上报
if (!string.IsNullOrEmpty(host.SysHotel.FaultPushURL))
{
diff --git a/WebSite/Controllers/SysHotelController.cs b/WebSite/Controllers/SysHotelController.cs
index e346e87..a9c9c5d 100644
--- a/WebSite/Controllers/SysHotelController.cs
+++ b/WebSite/Controllers/SysHotelController.cs
@@ -172,6 +172,7 @@ namespace WebSite.Controllers
return Json(new { IsSuccess = true, Message = HttpContext.InnerLanguage("SaveSuccess") });
}
+
///
/// 上传BGM
///
@@ -215,6 +216,7 @@ namespace WebSite.Controllers
}
sysHotel.WelcomeBGM = NewFileName;
+
SysHotelManager.Update(sysHotel);
return Json(new { IsSuccess = true, FileName = NewFileName }, JsonRequestBehavior.AllowGet);
}
@@ -232,6 +234,22 @@ namespace WebSite.Controllers
+ [Authorize()]
+ public ActionResult DeleteBGM()
+ {
+ try
+ {
+ var sysHotel = SysHotelManager.Get(CurrentHotelID);
+ sysHotel.WelcomeBGM = "";
+ SysHotelManager.Update(sysHotel);
+ return Json(new { IsSuccess = true }, JsonRequestBehavior.AllowGet);
+ }
+ catch (Exception ex)
+ {
+ return Json(new { IsSuccess = false, Message = ex.Message }, JsonRequestBehavior.AllowGet);
+ }
+
+ }
///
/// 保存第三方对接信息
///
@@ -282,6 +300,12 @@ namespace WebSite.Controllers
//sysHotel.TCLAppSecret = entity.TCLAppSecret;
SysHotelManager.Update(sysHotel);
+ if (!string.IsNullOrEmpty(entity.WelcomeBGM))
+ {
+ string ffg = "https://www.boonlive-rcu.com/welcomebgm/" + entity.WelcomeBGM;
+ TianMaoOperation.PostWebRequestToTianMao("AddOrUpdateWelcomeText",
+ Newtonsoft.Json.JsonConvert.SerializeObject(new { HotelId = CurrentHotelID, MusicUrl = ffg, WelcomeText = entity.WelcomeSpeech }), CurrentHotelCode, "");//通知天猫精灵播放欢迎词
+ }
if (sysHotel.IsUseQianLiMa)
{
QianLiMa_PMS.QiYong(sysHotel.Code, "add");
diff --git a/WebSite/Scripts/host-index.js b/WebSite/Scripts/host-index.js
index 3a6627d..9755a66 100644
--- a/WebSite/Scripts/host-index.js
+++ b/WebSite/Scripts/host-index.js
@@ -712,7 +712,29 @@ function dockingInfo() {
.dialog({ title: lang.DockingInformation, width: 600, height: 380 })
.dialog("open");
}
-
+function deletemusic()
+{
+ $.ajax({
+ url: '/SysHotel/DeleteBGM/',
+ type: 'Post',
+ //contentType: 'application/x-www-form-urlencoded',
+ contentType: 'application/json',
+ //data: JSON.stringify(getdata),
+ data: {},
+ success: function(response) {
+ $("#welcomebgmid").val("");
+ },
+ error: function(xhr, status, error) {
+ console.log(error);
+ },
+ beforeSend: function(xhr) {
+ console.log('Sending request...');
+ },
+ complete: function(xhr, status) {
+ console.log('Request completed.');
+ }
+ });
+}
function uploadmusic()
{
var filename = $("#welcomebgm").val();
@@ -725,8 +747,10 @@ function uploadmusic()
secureuri: false,
fileElementId: "welcomebgm",
dataType: "json",
- success: function (data) {
-
+ success: function (response) {
+ console.log(response);
+ var fname= response.FileName;
+ $("#welcomebgmid").val(fname);
},
error: function (data, status, e) {
$("#msg").html(e);
diff --git a/WebSite/Views/SysHotel/EditDockingInfo.ascx b/WebSite/Views/SysHotel/EditDockingInfo.ascx
index 48ea0cc..dd0dc8a 100644
--- a/WebSite/Views/SysHotel/EditDockingInfo.ascx
+++ b/WebSite/Views/SysHotel/EditDockingInfo.ascx
@@ -80,8 +80,9 @@
|
-
+
Save
+ Remove
|