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

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

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)
{