背景音乐和 故障上报 宝易系统

This commit is contained in:
2025-12-23 10:08:11 +08:00
parent 322685fbb8
commit 82ecc76d00
19 changed files with 200 additions and 50 deletions

Binary file not shown.

View File

@@ -20,6 +20,7 @@ namespace Common
public static CSRedisClient redis3;
public static CSRedisClient redis4;
public static CSRedisClient redis5;
public static CSRedisClient redis_webchat;
//private static readonly string[] redisHosts = null;
private static int SessionExpireMinutes = int.Parse(ConfigurationManager.AppSettings["session_expire_minutes"]);
private static int MonitorLogExpireMinutes = int.Parse(ConfigurationManager.AppSettings["monitor_log_expire_minutes"]);
@@ -40,6 +41,8 @@ namespace Common
static CSRedisCacheHelper()
{
var redisHostStr = ConfigurationManager.AppSettings["redis_server_session"];
var webchat_redisstr = ConfigurationManager.AppSettings["webchat_redisstr"];
var webchat_redis_pwd = ConfigurationManager.AppSettings["webchat_redis_pwd"];
if (!string.IsNullOrEmpty(redisHostStr))
{
redis = new CSRedisClient(redisHostStr);//+ ",password=,defaultDatabase=0,poolsize=500,ssl=false,writeBuffer=10240,prefix=");
@@ -54,6 +57,8 @@ namespace Common
redis4 = new CSRedisClient(redisHostStr + ",password=,defaultDatabase=4");
redis5 = new CSRedisClient(redisHostStr + ",password=,defaultDatabase=5");
redis5 = new CSRedisClient(redisHostStr + ",password=,defaultDatabase=5");
redis_webchat = new CSRedisClient(string.Format(webchat_redisstr + ",password={0},defaultDatabase=0",webchat_redis_pwd));
//Native subscribe
string channel = "__keyevent@0__:expired";

View File

@@ -120,6 +120,8 @@ namespace CommonEntity
public static string FCSRoom_Mapping_Order = "FCS_R_M_O";
public static string KongTiaoAlert = "KT#Alert";
public static string WebChatDeviceFault = "WXFault";
}
public class ChangLiangValue
{

View File

@@ -183,6 +183,15 @@ namespace Domain
get;
set;
}
/// <summary>
/// 背景音乐
/// </summary>
public virtual string WelcomeBGM
{
get;
set;
}
/// <summary>
/// 离房提示:拔卡结束提示语
/// </summary>

View File

@@ -25,6 +25,7 @@
<property name="AssociatedAccount" column="AssociatedAccount" type="string" />
<property name="IsAutoGetKey" column="IsAutoGetKey" type="bool" />
<property name="WelcomeSpeech" column="WelcomeSpeech" type="string" />
<property name="WelcomeBGM" column="WelcomeBGM" type="string" />
<property name="GoodbyeSpeech" column="GoodbyeSpeech" type="string" />
<property name="DomainUrl" column="DomainUrl" type="string" />
<property name="ValidateDate" column="ValidateDate" type="DateTime" />

View File

@@ -887,6 +887,7 @@ namespace RCUHost.Implement
//欢迎词
string WelcomeSpeech = host.SysHotel.WelcomeSpeech;
string WelcomeBGM = host.SysHotel.WelcomeBGM;
//欢送词
string GoodbyeSpeech = host.SysHotel.GoodbyeSpeech;
@@ -1023,21 +1024,31 @@ namespace RCUHost.Implement
#region
if (flag == 1 && !string.IsNullOrEmpty(WelcomeSpeech))//取电打开时,播放欢迎词
{
var TTT = new Tuple<string, string, string, string>(TianMaoCUID, WelcomeSpeech, hotelcode, roomnumber);
var TTT = new Tuple<string, string, string, string, string>(TianMaoCUID, WelcomeSpeech, hotelcode, roomnumber, WelcomeBGM);
Task.Factory.StartNew((state) =>
{
var hhh = state as Tuple<string, string, string, string>;
var hhh = state as Tuple<string, string, string, string, string>;
var a = hhh.Item1.Split(',');
var b = hhh.Item2;
var c = hhh.Item3;
var d = hhh.Item4;
var e = hhh.Item5;
foreach (string cuid in a)//多个英文逗号隔开
{
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);//通知天猫精灵播放欢迎词
}
Interface3Log w1 = new Interface3Log();
w1.HotelCode = c;
@@ -1395,7 +1406,7 @@ namespace RCUHost.Implement
//sb.Clear();
//sb.Append(VVV1);
//sb.Append(VVV2);
string sb = string.Concat(VVV1,VVV2);
string sb = string.Concat(VVV1, VVV2);
string YiJingChuLiGuo = CacheKey.AllReadyDealWith0E_Prefix + "_" + HostNUMBER;
object data = MemoryCacheHelper.Get(YiJingChuLiGuo);
if (data != null)

View File

@@ -967,13 +967,26 @@ namespace RCUHost.Implement
var a = hhh.TianMaoCUID.Split(',');
var b = hhh.SysHotel.WelcomeSpeech;
string bb = hhh.SysHotel.WelcomeBGM;
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)//多个英文逗号隔开
{
TianMaoOperation.PostWebRequestToTianMao("PushWelcome",
Newtonsoft.Json.JsonConvert.SerializeObject(new { HotelId = cuid.Split('&')[0], RoomNo = cuid.Split('&')[1], WelcomeText = b }), c, d);//通知天猫精灵播放欢迎词
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);//通知天猫精灵播放欢迎词
}
Interface3Log w1 = new Interface3Log();
w1.HotelCode = c;

View File

@@ -374,7 +374,7 @@ namespace WebSite.Controllers
{
string DKey = string.Format("DKey_{0}_{1}_{2}_{3}", CurrentHotelID, roomnum, "054000001", "054000100");
var ddd = HttpContext.Cache.Get(DKey);
List<SomeDeviceExistsData> takeOutdata = null;
List<SomeDeviceExistsData> takeOutdata = new List<SomeDeviceExistsData>();
if (ddd != null)
{
takeOutdata = ddd as List<SomeDeviceExistsData>;

View File

@@ -171,6 +171,67 @@ namespace WebSite.Controllers
SaveSystemLog(AuthorityID, action, entity.Name);
return Json(new { IsSuccess = true, Message = HttpContext.InnerLanguage("SaveSuccess") });
}
/// <summary>
/// 上传BGM
/// </summary>
/// <returns></returns>
[Authorize()]
public ActionResult UploadWebcomeBGM()
{
try
{
var sysHotel = SysHotelManager.Get(CurrentHotelID);
HttpFileCollection hfc = System.Web.HttpContext.Current.Request.Files;
if (hfc.Count < 1 || hfc[0].ContentLength <= 0 || String.IsNullOrEmpty(hfc[0].FileName))
{
return Json(new { IsSuccess = false, Message = HttpContext.InnerLanguage("PleaseSelectAuthorizationFile") });
}
string start_timeddd = DateTime.Now.ToString("yyyyMMddHHmmss");
string NewFileName = start_timeddd + hfc[0].FileName;
string file = string.Format(Tools.GetApplicationPath() + @"welcomebgm\{0}", NewFileName);
string path = Path.GetDirectoryName(file);
if (!Directory.Exists(path))
{
Directory.CreateDirectory(path);
}
hfc[0].SaveAs(file);
var LLL = HostManager.LoadAll(CurrentHotelID);
foreach (Host item in LLL)
{
Host TakeOut = null;
string HostNumberOnly = item.HostNumber;
string Key = CacheKey.HostInfo_Key_HostNumber + "_" + HostNumberOnly;
object obj = MemoryCacheHelper.Get(Key);
if (obj != null)
{
TakeOut = obj as Host;
TakeOut.SysHotel.WelcomeBGM = NewFileName;
}
}
sysHotel.WelcomeBGM = NewFileName;
SysHotelManager.Update(sysHotel);
return Json(new { IsSuccess = true, FileName = NewFileName }, JsonRequestBehavior.AllowGet);
}
catch (Exception ex)
{
if (logger.IsErrorEnabled)
{
logger.Error(ex);
}
return Json(new { IsSuccess = false, Message = ex.Message }, JsonRequestBehavior.AllowGet);
}
}
/// <summary>
/// 保存第三方对接信息
/// </summary>
@@ -499,7 +560,7 @@ namespace WebSite.Controllers
var T = JsonConvert.DeserializeObject<List<LingChenECO>>(reqData);
//T.ForEach(A => A.HotelCode = CurrentHotelCode);
string GGG = CacheKey.KT_Timer_Controller + "_" + CurrentHotelCode;
CSRedisCacheHelper.Set_PartitionWithForever<List<LingChenECO>>(GGG,T,5);
CSRedisCacheHelper.Set_PartitionWithForever<List<LingChenECO>>(GGG, T, 5);
var client1 = new RestClient(missionsys_address);
foreach (var item in T)
{

View File

@@ -1 +1 @@
HP6vcqAL58UjczRRQ7SpqppM9wczrgOic0weey1QcnOwxYcvTnrjb2iqkBsCPfbOxOYezdzkDroujE752nqi5UkychJq0szAj70/q3C0tG5fzXspn9ih9W67FbPxy50NTFAQd97KmH9k0bLIUdgv8rG3zicIc8yKZBkungptRjF8u7TWygG7BU/TuQqWd7xnzwjgIiqu/38AwpbY22XWlTLlsR89SrM682uO41AKBP2NqlUv16f/sfXpsLhJ9wec0dPGjspdpmpbWYIHhETbSzjiBIBI6+ik6fI563PT9HuwSloHJcH7eUan+SBArY4Nr7B+I/mRP+bdSTqBW9OuJgRPtxqDUkfngqkwORHmsA4GNBNDavZAQQ==
HP6vcqAL58UjczRRQ7SpqppM9wczrgOic0weey1QcnOwxYcvTnrjb2iqkBsCPfbOxOYezdzkDroujE752nqi5al/ZAfZmClht3PdyuLcoBy09L1PXHp8fnfXgbAEhvN+VrclVv2W1CCOwhuobej6tFAf4WUYOQf8xJNTJvpm71IXNzGeairfhWwbWVsfXq+9qMrJYNiAEkUaCACHP7jNWxyOjnUv5p1hdcoVfjGmAJdgGhzl3KUwGpuTDQ9s4QqYWF9sN+lae8Xd7E9ueRF0A/eTr2ksTqdqdCIr2TYOxPL+oG+TmYhorTEVuA6DKJSiMGGTSvUILfwjUka9Zva88HB7MxbhqUB3zlYu+uut/vNVjNdSBveYow==

View File

@@ -8125,6 +8125,15 @@ namespace WebSite.Resource {
}
}
/// <summary>
/// 查找类似 WelcomeBGM 的本地化字符串。
/// </summary>
internal static string WelcomeBGM {
get {
return ResourceManager.GetString("WelcomeBGM", resourceCulture);
}
}
/// <summary>
/// 查找类似 Time of Welcome ModeM 的本地化字符串。
/// </summary>

View File

@@ -2896,4 +2896,7 @@ Single circuit status</value>
<data name="TimerECO" xml:space="preserve">
<value>Timed ECO</value>
</data>
<data name="WelcomeBGM" xml:space="preserve">
<value>WelcomeBGM</value>
</data>
</root>

View File

@@ -8133,6 +8133,15 @@ namespace WebSite.Resource {
}
}
/// <summary>
/// 查找类似 欢迎背景乐 的本地化字符串。
/// </summary>
internal static string WelcomeBGM {
get {
return ResourceManager.GetString("WelcomeBGM", resourceCulture);
}
}
/// <summary>
/// 查找类似 欢迎模式时间(分) 的本地化字符串。
/// </summary>

View File

@@ -2898,4 +2898,7 @@
<data name="TimerECO" xml:space="preserve">
<value>定时调温</value>
</data>
<data name="WelcomeBGM" xml:space="preserve">
<value>欢迎背景乐</value>
</data>
</root>

View File

@@ -8135,6 +8135,15 @@ namespace WebSite.Resource {
}
}
/// <summary>
/// 查找类似 歡迎詞背景樂 的本地化字符串。
/// </summary>
internal static string WelcomeBGM {
get {
return ResourceManager.GetString("WelcomeBGM", resourceCulture);
}
}
/// <summary>
/// 查找类似 歡迎模式時間(分) 的本地化字符串。
/// </summary>

View File

@@ -2900,4 +2900,7 @@
<data name="TimerECO" xml:space="preserve">
<value>定時調溫</value>
</data>
<data name="WelcomeBGM" xml:space="preserve">
<value>歡迎詞背景樂</value>
</data>
</root>

View File

@@ -712,6 +712,28 @@ function dockingInfo() {
.dialog({ title: lang.DockingInformation, width: 600, height: 380 })
.dialog("open");
}
function uploadmusic()
{
var filename = $("#welcomebgm").val();
if (filename == "") {
return;
}
$.ajaxFileUpload({
url: "/SysHotel/UploadWebcomeBGM/",
type: "POST",
secureuri: false,
fileElementId: "welcomebgm",
dataType: "json",
success: function (data) {
},
error: function (data, status, e) {
$("#msg").html(e);
}
});
}
//保存酒店第三方对接信息
function saveDockingInfo() {
var form = $("#dialog").find("form");

View File

@@ -1,4 +1,5 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Domain.SysHotel>" %>
<script src="/Scripts/ajaxfileupload.js" type="text/javascript"></script>
<style type="text/css">
#roomCardForm table th
{
@@ -72,6 +73,17 @@
style="width: 416px;" value="<%: Model.WelcomeSpeech %>" />
</td>
</tr>
<tr>
<th align="right">
<label for="txtWelcomeSpeech">
<%: Html.Language("WelcomeBGM")%></label>
</th>
<td colspan="3">
<input id="welcomebgmid" name="welcomebgm" value="<%: Model.WelcomeBGM %>" readonly="readonly"/>
<input type="file" id="welcomebgm" name="file" size="30" />
<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-save'" onclick="uploadmusic();">Save</a>
</td>
</tr>
<tr>
<th align="right">
<label for="txtGoodbyeSpeech">
@@ -150,8 +162,6 @@
<%: Model.FCSPushEnable ? "checked='checked'" : "" %> />
</td>
</tr>
<tr>
<th align="right">
<label for="IsNewVersionProtocol">
@@ -162,39 +172,33 @@
<%: Model.IsNewVersionProtocol ? "checked='checked'" : "" %> />
</td>
</tr>
<tr>
<th align="right">
<label for="txtFCSPushEnable">
FCS PropertyUUID</label>
</th>
<td>
<input id="txt1" name="FCS_PropertyID" class="textbox text" value="<%: Model.FCS_PropertyID %>" />
<input id="txt1" name="FCS_PropertyID" class="textbox text" value="<%: Model.FCS_PropertyID %>" />
</td>
</tr>
<tr>
<tr>
<th align="right">
<label for="txt2">
FCS LoginUrl</label>
</th>
<td>
<input id="txt2" name="FCSLoginUrl" class="textbox text" value="<%: Model.FCSLoginUrl %>" />
<input id="txt2" name="FCSLoginUrl" class="textbox text" value="<%: Model.FCSLoginUrl %>" />
</td>
</tr>
<tr>
<tr>
<th align="right">
<label for="txt3">
FCS LoginUserName</label>
</th>
<td>
<input id="txt3" name="FCSLoginUserName" class="textbox text" value="<%: Model.FCSLoginUserName %>" />
<input id="txt3" name="FCSLoginUserName" class="textbox text" value="<%: Model.FCSLoginUserName %>" />
</td>
</tr>
<tr>
<th align="right">
<label for="txt4">
@@ -204,8 +208,6 @@
<input id="txt4" name="FCSLoginPassWord" class="textbox text" value="<%: Model.FCSLoginPassWord %>" />
</td>
</tr>
<tr>
<th align="right">
<label for="txt5">
@@ -215,7 +217,6 @@
<input id="txt5" name="FCS_Carbon_UUID" class="textbox text" value="<%: Model.FCS_Carbon_UUID %>" />
</td>
</tr>
<tr>
<th align="right">
<label for="txt6">
@@ -225,17 +226,15 @@
<input id="txt6" name="FCS_SOS_UUID" class="textbox text" value="<%: Model.FCS_SOS_UUID %>" />
</td>
</tr>
<tr>
<th align="right">
<label for="txt7">
<%: Html.Language("FCS_TouSu_UUID")%></label>
</th>
<td>
<input id="txt7" name="FCS_TouSu_UUID" class="textbox text" value="<%: Model.FCS_TouSu_UUID %>" />
<input id="txt7" name="FCS_TouSu_UUID" class="textbox text" value="<%: Model.FCS_TouSu_UUID %>" />
</td>
</tr>
<tr>
<th align="right">
<label for="txt8">
@@ -245,7 +244,6 @@
<input id="txt8" name="FCS_Clean_UUID" class="textbox text" value="<%: Model.FCS_Clean_UUID %>" />
</td>
</tr>
<tr>
<th align="right">
<label for="txt9">
@@ -255,18 +253,15 @@
<input id="txt9" name="FCS_TiSongWuPin" class="textbox text" value="<%: Model.FCS_TiSongWuPin %>" />
</td>
</tr>
<tr>
<th align="right">
<label for="txtFCSPushEnable">
<%: Html.Language("FCS_RCU_Device_Offline")%></label>
</th>
<td>
<input id="txt10" name="FCS_RCU_Device_Offline" class="textbox text" value="<%: Model.FCS_RCU_Device_Offline %>" />
<input id="txt10" name="FCS_RCU_Device_Offline" class="textbox text" value="<%: Model.FCS_RCU_Device_Offline %>" />
</td>
</tr>
<tr>
<th align="right">
<label for="txt11">
@@ -276,7 +271,6 @@
<input id="txt11" name="FCS_RCU_Offline" class="textbox text" value="<%: Model.FCS_RCU_Offline %>" />
</td>
</tr>
<tr>
<th align="right">
<label for="txt12">
@@ -286,7 +280,6 @@
<input id="txt12" name="FCS_RCU_Online" class="textbox text" value="<%: Model.FCS_RCU_Online %>" />
</td>
</tr>
<tr>
<th align="right">
<label for="txt13">
@@ -296,17 +289,15 @@
<input id="txt13" name="FCS_MenCi_Close" class="textbox text" value="<%: Model.FCS_MenCi_Close %>" />
</td>
</tr>
<tr>
<th align="right">
<label for="txtFCSPushEnable">
<%: Html.Language("FCS_MenCi_Open")%></label>
</th>
<td>
<input id="txt14" name="FCS_MenCi_Open" class="textbox text" value="<%: Model.FCS_MenCi_Open %>" />
<input id="txt14" name="FCS_MenCi_Open" class="textbox text" value="<%: Model.FCS_MenCi_Open %>" />
</td>
</tr>
<tr>
<th align="right">
<label for="isusechuangwei">
@@ -327,7 +318,6 @@
value="true" <%: Model.IsUseTCLTV ? "checked='checked'" : "" %> />
</td>
</tr>
<!--投诉反馈语音-->
<tr>
<th align="right">
@@ -350,7 +340,6 @@
style="width: 416px;" value="<%: Model.SkyworthTVauthCode %>" />
</td>
</tr>
<tr>
<th align="right">
<label for="ckQianLiMaPMS">
@@ -371,24 +360,23 @@
value="true" <%: Model.IsPushPMSData ? "checked='checked'" : "" %> />
</td>
</tr>
<tr>
<th align="right">
<label for="txtHeTongNumber">
<%: Html.Language("HeTongNumber")%></label>
</th>
<td>
<div style="display:inline;">
<input id="txtHeTongNumber" name="HeTongNumber" class="easyui-validatebox textbox text"
style="display:inline-block; width: 75px;" value="<%: Model.HeTongNumber %>" />
<a class="easyui-linkbutton dlg-btn-save" style="display:inline-block;" href="javascript:void(0)" onclick="FoundDeviceList();">
<%: Html.Language("FoundDevice")%></a>
<div style="display: inline;">
<input id="txtHeTongNumber" name="HeTongNumber" class="easyui-validatebox textbox text"
style="display: inline-block; width: 75px;" value="<%: Model.HeTongNumber %>" />
<a class="easyui-linkbutton dlg-btn-save" style="display: inline-block;" href="javascript:void(0)"
onclick="FoundDeviceList();">
<%: Html.Language("FoundDevice")%></a>
</div>
</td>
</tr>
<%-- TCL 功能--%>
<%-- <tr>
<%-- TCL 功能--%>
<%-- <tr>
<th align="right">
TCL AppId
</th>

View File

@@ -190,6 +190,8 @@
<!--Hi 喂-->
<add key="HiWeiAppId" value="wijsv8hf5izejkny"/>
<add key="HiWeiAppSecret" value="6c1014dab24c41369068d12e4f7e145c"/>
<add key="webchat_redisstr" value="47.119.147.104:26379"/>
<add key="webchat_redis_pwd" value="1001^_^lool"/>
</appSettings>
<connectionStrings>