初始化
This commit is contained in:
24
Face.Web/Areas/App/AppAreaRegistration.cs
Normal file
24
Face.Web/Areas/App/AppAreaRegistration.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace Face.Web.Areas.App
|
||||
{
|
||||
public class AppAreaRegistration : AreaRegistration
|
||||
{
|
||||
public override string AreaName
|
||||
{
|
||||
get
|
||||
{
|
||||
return "App";
|
||||
}
|
||||
}
|
||||
|
||||
public override void RegisterArea(AreaRegistrationContext context)
|
||||
{
|
||||
context.MapRoute(
|
||||
"App_default",
|
||||
"App/{controller}/{action}/{id}",
|
||||
new { action = "Index", id = UrlParameter.Optional }
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
174
Face.Web/Areas/App/Controllers/BaseController.cs
Normal file
174
Face.Web/Areas/App/Controllers/BaseController.cs
Normal file
@@ -0,0 +1,174 @@
|
||||
using Face.Domain.Entities;
|
||||
using Face.Services;
|
||||
using Face.Services.DBUtility.Common;
|
||||
using Face.Services.Enums;
|
||||
using Face.Services.Extensions;
|
||||
using Face.Services.Manager;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using Newtonsoft.Json;
|
||||
using Face.Web.Areas.App.Models;
|
||||
|
||||
namespace Face.Web.Areas.App.Controllers
|
||||
{
|
||||
public class BaseController : Controller
|
||||
{
|
||||
public Accountentity Umodel { get; set; }
|
||||
public object ActPacket { get; set; }
|
||||
public string ActMessage { get; set; }
|
||||
|
||||
public string ActType { get; set; }
|
||||
|
||||
public int ActLevel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 在Action方法调用前使用,使用场景:如何验证登录等。
|
||||
/// </summary>
|
||||
/// <param name="filterContext"></param>
|
||||
protected override void OnActionExecuting(ActionExecutingContext filterContext)
|
||||
{
|
||||
practical practical = new practical();
|
||||
try
|
||||
{
|
||||
base.OnActionExecuting(filterContext);
|
||||
if (Session["username"] == null)
|
||||
{
|
||||
Logs.WriteLog("Sessionkeys:" + JsonConvert.SerializeObject(Session.Keys));
|
||||
filterContext.Result = new RedirectResult("/App/Login/Index");
|
||||
}
|
||||
else
|
||||
{
|
||||
Logs.WriteLog("username:" + JsonConvert.SerializeObject(Session["username"]));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelp.WriteExceptionLog(ex);
|
||||
//throw;
|
||||
}
|
||||
|
||||
|
||||
//校验用户是否已经登录
|
||||
//var model = UserLoginHelper.CurrentUser();
|
||||
//if (model != null)
|
||||
//{
|
||||
// //var db = new Uts_ManageEntities();
|
||||
// //Umodel = db.TBL_UTS_Manage_UserList.SingleOrDefault(x => x.ID == model.ID);
|
||||
// Umodel = model;
|
||||
|
||||
// if ((Umodel.IsValid)==1)
|
||||
// //if (Umodel.IsActivation!=true)
|
||||
// {
|
||||
// Response.Redirect("/App/Login/Index");
|
||||
// filterContext.Result = new EmptyResult();
|
||||
// }
|
||||
|
||||
// if (!string.IsNullOrEmpty(ActType))
|
||||
// {
|
||||
// }
|
||||
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// ContentResult Cr = new ContentResult
|
||||
// {
|
||||
// Content = string.Format("<script type='text/javascript'>top.location.hre f='{0}';</script>", "/App/Login/Index")
|
||||
// };
|
||||
// filterContext.Result = Cr;
|
||||
|
||||
// //Response.Redirect("/App/Login/Index");
|
||||
// //filterContext.Result = new EmptyResult();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 在Action方法调用后,result方法调用前执行,使用场景:异常处理。
|
||||
/// </summary>
|
||||
/// <param name="filterContext"></param>
|
||||
//protected override void OnActionExecuted(ActionExecutedContext filterContext)
|
||||
//{
|
||||
// base.OnActionExecuted(filterContext);
|
||||
// ViewBag.Title = ActMessage;
|
||||
|
||||
|
||||
// var model = UserLoginHelper.CurrentUser();
|
||||
// if (model != null)
|
||||
// {
|
||||
// Umodel = model;
|
||||
// if (!string.IsNullOrEmpty(ActMessage))
|
||||
// {
|
||||
// string controllerName = filterContext.RouteData.Values["controller"].ToString().ToLower();
|
||||
// string actionName = filterContext.RouteData.Values["action"].ToString().ToLower();
|
||||
|
||||
// if (ViewBag.mFormUrl != null)
|
||||
// ViewBag.FormUrl = ViewBag.mFormUrl;
|
||||
// else
|
||||
// {
|
||||
// if (Request.UrlReferrer != null)
|
||||
// ViewBag.FormUrl = Request.UrlReferrer.ToString();
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Response.Redirect("/App/Login/Index");
|
||||
// filterContext.Result = new EmptyResult();
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
//protected NameValueCollection FormatQueryString(NameValueCollection nameValues)
|
||||
//{
|
||||
// NameValueCollection nvcollection = new NameValueCollection();
|
||||
// foreach (var item in nameValues.AllKeys)
|
||||
// {
|
||||
// if (item.Equals("datefiled"))
|
||||
// {
|
||||
// if (!String.IsNullOrEmpty(nameValues["dateform"]) && !String.IsNullOrEmpty(nameValues["dateto"]))
|
||||
// {
|
||||
// string[] sd = nameValues["dateform"].Split('/');
|
||||
// string[] ed = nameValues["dateto"].Split('/');
|
||||
// string sd2 = sd[2] + "-" + sd[0] + "-" + sd[1];
|
||||
// string ed2 = ed[2] + "-" + ed[0] + "-" + ed[1];
|
||||
|
||||
// //DateTime startDate = DateTime.Parse(sd2).AddSeconds(-1);
|
||||
// //DateTime endDate = DateTime.Parse(ed2).ToDateTime();
|
||||
// //nvcollection.Add(nameValues[item] + ">", startDate.ToString());
|
||||
// //nvcollection.Add(nameValues[item] + "<", endDate.ToString());
|
||||
// DateTime startDate = DateTime.Parse(sd2).ToDateTime();
|
||||
// DateTime endDate = DateTime.Parse(ed2).ToDateTime();
|
||||
// nvcollection.Add(nameValues[item] + ">=", startDate.ToString());
|
||||
// nvcollection.Add(nameValues[item] + "<=", endDate.ToString());
|
||||
// }
|
||||
// }
|
||||
// else if (item.Equals("numberfiled"))
|
||||
// {
|
||||
// if (!String.IsNullOrEmpty(nameValues["numberform"]) && !String.IsNullOrEmpty(nameValues["numberto"]))
|
||||
// {
|
||||
// //double startNumber = nameValues["numberform"].ToDouble() - 0.0001;
|
||||
// //double endNumber = nameValues["numberto"].ToDouble() + 0.0001;
|
||||
// //nvcollection.Add(nameValues[item] + ">", startNumber.ToString());
|
||||
// //nvcollection.Add(nameValues[item] + "<", endNumber.ToString());
|
||||
// double startNumber = nameValues["numberform"].ToDouble();
|
||||
// double endNumber = nameValues["numberto"].ToDouble();
|
||||
// nvcollection.Add(nameValues[item] + ">=", startNumber.ToString());
|
||||
// nvcollection.Add(nameValues[item] + "<=", endNumber.ToString());
|
||||
// }
|
||||
// }
|
||||
// else if (item.Equals("keyfiled"))
|
||||
// {
|
||||
// if (!string.IsNullOrEmpty(nameValues["keyword"]))
|
||||
// nvcollection.Add(nameValues[item], nameValues["keyword"]);
|
||||
// }
|
||||
// }
|
||||
|
||||
// return nvcollection;
|
||||
//}
|
||||
}
|
||||
}
|
||||
120
Face.Web/Areas/App/Controllers/CheckinPmsController.cs
Normal file
120
Face.Web/Areas/App/Controllers/CheckinPmsController.cs
Normal file
@@ -0,0 +1,120 @@
|
||||
using Antlr.Runtime.Tree;
|
||||
using Face.Domain.Application;
|
||||
using Face.Domain.Entities;
|
||||
using Face.Web.Areas.App.Models;
|
||||
using ImageMagick;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using static Face.Web.Areas.App.Models.Roominfo;
|
||||
using WebServer;
|
||||
using AUTS.Services.Manager;
|
||||
using Face.Domain.Application.FaceAll;
|
||||
using System.Collections;
|
||||
using static Face.Web.Areas.App.Controllers.InterfaceController;
|
||||
using CheckinTest = Face.Domain.Entities.CheckinTest;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Face.Web.Areas.App.Controllers
|
||||
{
|
||||
public class CheckinPmsController : Controller
|
||||
{
|
||||
// GET: App/CheckinPms
|
||||
public ActionResult Checkin()
|
||||
{
|
||||
List<TBL_ROOM_BASIC_INFO> ZongRoominfo = (List<TBL_ROOM_BASIC_INFO>)Session["ZongRoominfo"];
|
||||
int id = 1;
|
||||
var roomlist= ZongRoominfo.Where(j => j.HOTEL_OLD_ID == id).ToList();
|
||||
return View(roomlist);
|
||||
}
|
||||
public ActionResult CheckinRoom(string Roomane)
|
||||
{
|
||||
ViewData["Roomane"]=Roomane;
|
||||
return View();
|
||||
}
|
||||
[HttpPost]
|
||||
public ActionResult Save(HttpPostedFileBase video)
|
||||
{
|
||||
// 处理上传的视频文件,保存到指定位置或进行其他处理
|
||||
if (video != null && video.ContentLength > 0)
|
||||
{
|
||||
var fileName = Path.GetFileName(video.FileName);
|
||||
var path = Path.Combine(Server.MapPath("~//Upload/Image/"), fileName);
|
||||
video.SaveAs(path);
|
||||
// 这里可以根据需要进行相应的处理,例如将视频文件保存到指定位置
|
||||
|
||||
if (video != null && video.ContentLength > 0)
|
||||
{
|
||||
byte[] fileBytes;
|
||||
using (var binaryReader = new BinaryReader(video.InputStream))
|
||||
{
|
||||
fileBytes = binaryReader.ReadBytes(video.ContentLength);
|
||||
}
|
||||
|
||||
string base64String = Convert.ToBase64String(fileBytes);
|
||||
|
||||
// 将 base64String 发送到前端或进行其他操作
|
||||
return Json(new { success = true, imgbase64String = base64String , imgpath = path });
|
||||
}
|
||||
}
|
||||
|
||||
return Json(new { success = false, imgbase64String = "", imgpath = "" });
|
||||
}
|
||||
|
||||
public ActionResult OpeningOperation(string roomid, string idNumber, string phoneNumber,string name,int sex,string phone,string picture)
|
||||
{
|
||||
string ftpURL = "auth.blv-oa.com:50/uts_Manager/oyl_FTP/Image";
|
||||
ImgServerController imgServerController = new ImgServerController();
|
||||
picture= imgServerController.FtpUploadsyn(picture, ftpURL);
|
||||
List<Result> relist = null;
|
||||
string HoteId = "1001";//测试酒店Code
|
||||
var code = int.Parse(HoteId);
|
||||
var hotellist = SqlSugarBase.authoriydb.Queryable<Hotels>().First(s => s.Code == code.ToString());
|
||||
if (hotellist == null)
|
||||
{
|
||||
return Json(false);
|
||||
}
|
||||
GetRoomInterface.test test = new GetRoomInterface.test
|
||||
{
|
||||
code = hotellist.Code.ToString(),
|
||||
creatDate = hotellist.CreateTime.ToString("yyyy-MM-dd")
|
||||
};
|
||||
Roominfo.Root asd = GetRoomInterface.Roomport(test);
|
||||
if (asd == null)
|
||||
{
|
||||
return Json(false);
|
||||
}
|
||||
if (asd.IsSuccess != true)
|
||||
{
|
||||
return Json(false);
|
||||
}
|
||||
relist = asd.Result;
|
||||
var sc = relist.FirstOrDefault(j => j.RoomNumber == roomid);
|
||||
if (sc == null)
|
||||
{
|
||||
return Json(false);
|
||||
}
|
||||
int state = 0;
|
||||
CheckinTest user = new CheckinTest() { testState = state, creationTime = DateTime.Now, predictCheckIn = DateTime.Now, checkInduration = 0, hotelid = hotellist.Id, Roomid = sc.ID };
|
||||
var Staty = SqlSugarBase.Db.Insertable(user).ExecuteReturnIdentity();
|
||||
bool isok = false;
|
||||
List<WebServer.UserInfo> users = new List<WebServer.UserInfo>();
|
||||
WebServer.UserInfo fo = new WebServer.UserInfo()
|
||||
{
|
||||
idcard = idNumber,
|
||||
customer = name,
|
||||
sex = sex == 1 ? "男" : "女",
|
||||
photoUrl = "http://face.blv-oa.com/ImgServer/FileImage?url=" + picture
|
||||
};
|
||||
users.Add(fo);
|
||||
isok = WebHelp.Send(new SendInfo { code = HoteId, roomNumber = roomid, idNumber = idNumber, phoneNumber = phoneNumber }, users.ToArray());
|
||||
|
||||
return Json(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
131
Face.Web/Areas/App/Controllers/ExpandController.cs
Normal file
131
Face.Web/Areas/App/Controllers/ExpandController.cs
Normal file
@@ -0,0 +1,131 @@
|
||||
using Face.Domain.Application;
|
||||
using Face.Domain.Application.FaceAll;
|
||||
using Face.Domain.Entities;
|
||||
using Face.Domain.ViewModels;
|
||||
using Face.Services.DBUtility.Custom;
|
||||
using Face.Services.Manager;
|
||||
using Face.Web.Areas.App.Models;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Hosting;
|
||||
using System.Web.Mvc;
|
||||
using static Face.Web.Areas.App.Models.Roominfo;
|
||||
|
||||
namespace Face.Web.Areas.App.Controllers
|
||||
{
|
||||
public class ExpandController : Controller
|
||||
{
|
||||
// GET: App/Expand
|
||||
public ActionResult ExpandIndex()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
private string connectionString = "Server=blv-cloud-db.mysql.rds.aliyuncs.com;Database=Face;Uid=blv_rcu;Pwd=fnadiaJDIJ7546;charset=utf8;port=3307;";
|
||||
|
||||
[HttpPost]
|
||||
public ActionResult Expandinsert(string name, int id_no,string idcode)
|
||||
{
|
||||
tb_HotelCode face = new tb_HotelCode();
|
||||
face.UserWX = true;
|
||||
face.Code = idcode;
|
||||
face.Remark = name;
|
||||
face.HotelID = id_no;
|
||||
if (SqlSugarBase.WuDb.Insertable(face).ExecuteCommand()>0)
|
||||
{
|
||||
return Json("200");
|
||||
}
|
||||
return Json("100");
|
||||
}
|
||||
|
||||
|
||||
public ActionResult UploadingAll()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
public ActionResult conditionFile()
|
||||
{
|
||||
|
||||
return View();
|
||||
}
|
||||
|
||||
|
||||
public ActionResult Dropdownlist(int Hoteid)
|
||||
{
|
||||
List<Result> relist = null;
|
||||
var ho = SqlSugarBase.authoriydb.Queryable<Hotels>().First(x => x.Id == Hoteid);
|
||||
GetRoomInterface.test test = new GetRoomInterface.test
|
||||
{
|
||||
code = ho.Code.ToString(),
|
||||
creatDate = ho.CreateTime.ToString("yyyy-MM-dd")
|
||||
};
|
||||
Roominfo.Root asd = GetRoomInterface.Roomport(test);
|
||||
if (asd.IsSuccess == true)
|
||||
{
|
||||
|
||||
relist = asd.Result;
|
||||
return Json(new
|
||||
{
|
||||
Data = relist,
|
||||
Status=200
|
||||
});
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
return Json(new
|
||||
{
|
||||
Data = "",
|
||||
Status = 50
|
||||
});
|
||||
}
|
||||
}
|
||||
public ActionResult Conditionfileawholelog(Condition data)
|
||||
{
|
||||
string strSql = "";
|
||||
using (MySql.Data.MySqlClient.MySqlConnection connection = new MySql.Data.MySqlClient.MySqlConnection(connectionString))
|
||||
{
|
||||
System.Data.DataSet dataSet = new System.Data.DataSet();
|
||||
strSql += "select * from fileawholelog where filetype=" + data.filetype;
|
||||
|
||||
if (data.HotelID != 0)
|
||||
{
|
||||
strSql += " and hotelid=" + data.HotelID;
|
||||
}
|
||||
if (data.roomid != 0)
|
||||
{
|
||||
strSql += " and roomid=" + data.HotelID;
|
||||
}
|
||||
string sqlnumber = strSql;
|
||||
var strCountSql = strSql.ToString();
|
||||
var countNum = new DALHelperCustom<fileawholelog>("TBL_ColorBoxList").SqlQueryGetList(strCountSql.ToString());
|
||||
if (countNum != null)
|
||||
{
|
||||
ViewBag.allpage = (countNum.Count / 20) + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
ViewBag.allpage = 0;
|
||||
}
|
||||
strSql += " ORDER BY `creationtime` DESC LIMIT " + (data.dataMin) + ",8;";
|
||||
|
||||
ViewData["tableData"] = null;
|
||||
//if (countNum[0].ID <= 0)
|
||||
// return PartialView("_NamedQueryData");
|
||||
//strSql.Append(" order by StartTime desc LIMIT " + data.Pages + ",20");
|
||||
|
||||
MySql.Data.MySqlClient.MySqlDataAdapter command = new MySql.Data.MySqlClient.MySqlDataAdapter(strSql.ToString(), connection);
|
||||
command.Fill(dataSet, "test");
|
||||
ViewData["tableDataimp"] = dataSet;
|
||||
return View();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
1803
Face.Web/Areas/App/Controllers/FaceController.cs
Normal file
1803
Face.Web/Areas/App/Controllers/FaceController.cs
Normal file
File diff suppressed because it is too large
Load Diff
45
Face.Web/Areas/App/Controllers/FaceRoomController.cs
Normal file
45
Face.Web/Areas/App/Controllers/FaceRoomController.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
using Face.Domain.Application;
|
||||
using Face.Domain.Entities;
|
||||
using Face.Web.Areas.App.Models;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using static Face.Web.Areas.App.Models.Roominfo;
|
||||
|
||||
namespace Face.Web.Areas.App.Controllers
|
||||
{
|
||||
public class FaceRoomController : Controller
|
||||
{
|
||||
[HttpPost]
|
||||
public ActionResult RoomIdbyRoom(string RoomNum, int HotelId)
|
||||
{
|
||||
|
||||
using (SqlSugarClient db = SqlSugarBase.GesmartDb())
|
||||
{
|
||||
|
||||
var HotelsList = db.Queryable<DeviceManage>().Where(x => x.HotelCode.Equals(HotelId)).ToList();
|
||||
|
||||
var tbl_room_basic_info = SqlSugarBase.Gesmartblv_rcu_db().Queryable<tbl_room_basic_info>().Where(A=>A.ROOM_NUMBER.Equals(RoomNum)).ToList();
|
||||
var FaceResult = from s in tbl_room_basic_info
|
||||
join d in HotelsList on s.ROOM_OLD_ID equals d.RoomId
|
||||
select new
|
||||
{
|
||||
d.Facelid,
|
||||
d.SerialNo,
|
||||
d.CreatedDate,
|
||||
d.RoomId,
|
||||
d.Status,
|
||||
d.bindingStatus,
|
||||
//d.maintainStatus,
|
||||
maintainStatus = 0,
|
||||
s.ROOM_NUMBER
|
||||
};
|
||||
return Json(FaceResult);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
330
Face.Web/Areas/App/Controllers/GeneratePasswordController.cs
Normal file
330
Face.Web/Areas/App/Controllers/GeneratePasswordController.cs
Normal file
@@ -0,0 +1,330 @@
|
||||
using Face.Domain.Application.FaceAll;
|
||||
using Face.Domain.Entities;
|
||||
using Face.Domain.ViewModels;
|
||||
using Face.Web.Areas.App.Models;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing.Printing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net.NetworkInformation;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Optimization;
|
||||
using System.Web.UI;
|
||||
using System.Xml.Linq;
|
||||
using static Face.Web.Areas.App.Controllers.GeneratePasswordController;
|
||||
using static Face.Web.Areas.App.Controllers.InterfaceController;
|
||||
using static Face.Web.Areas.App.Models.Roominfo;
|
||||
using static System.Runtime.CompilerServices.RuntimeHelpers;
|
||||
using static WebSocketToolsConsole.Entity;
|
||||
|
||||
namespace Face.Web.Areas.App.Controllers
|
||||
{
|
||||
|
||||
public class GeneratePasswordController : BaseController
|
||||
{
|
||||
|
||||
// GET: App/GeneratePassword
|
||||
public ActionResult GeneratePassword()
|
||||
{
|
||||
|
||||
return View();
|
||||
}
|
||||
public ActionResult Bing()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
/// <summary>
|
||||
/// 页面查看人脸机key
|
||||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <returns></returns>
|
||||
public ActionResult selectSPassword(Condition data)
|
||||
{
|
||||
//List<tbl_face_key> tfk = SqlSugarBase.GesmartDb().Queryable<tbl_face_key>().ToList();
|
||||
int totalCount = 0;
|
||||
List<tbl_face_key> page = new List<tbl_face_key>();
|
||||
if (!string.IsNullOrEmpty(data.FaceName))
|
||||
{
|
||||
page = SqlSugarBase.GesmartDb().Queryable<tbl_face_key>().Where(x => x.SN == data.FaceName).ToPageList(data.Pages, 10, ref totalCount);
|
||||
}
|
||||
else
|
||||
{
|
||||
page = SqlSugarBase.GesmartDb().Queryable<tbl_face_key>().ToPageList(data.Pages, 10, ref totalCount);
|
||||
}
|
||||
if (page.Count != 0)
|
||||
{
|
||||
ViewBag.count = page;
|
||||
ViewBag.allpage = (totalCount + 10 - 1) / 10;
|
||||
}
|
||||
else
|
||||
{
|
||||
page = null;
|
||||
}
|
||||
return PartialView("selectSPassword");
|
||||
}
|
||||
[HttpPost]
|
||||
public ActionResult AddPassword(string Sn)
|
||||
{
|
||||
tbl_face_key tfk = SqlSugarBase.GesmartDb().Queryable<tbl_face_key>().First(x => x.SN == Sn);
|
||||
tbl_face_key gettfk = new tbl_face_key();
|
||||
if (tfk != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(tfk.Key))
|
||||
{
|
||||
var json = new
|
||||
{
|
||||
ErrCode = 3009,
|
||||
ErrMsg = "人脸机:" + Sn + "数据已经存在了,不要重复创建key,它的key是:" + tfk.Key
|
||||
};
|
||||
return Json(json);
|
||||
}
|
||||
else
|
||||
{
|
||||
string key = AesEncryptionExample.Randomnumber();
|
||||
gettfk.Id = tfk.Id;
|
||||
gettfk.MsgID = tfk.MsgID;
|
||||
gettfk.Key = key;
|
||||
gettfk.RequstCnt = tfk.RequstCnt + 1;
|
||||
gettfk.CreateDateTime = DateTime.Now;
|
||||
gettfk.AppKey = "10001";
|
||||
gettfk.ReqType = 1;
|
||||
gettfk.SN = Sn;
|
||||
gettfk.Remark = "网页生成人脸机key";
|
||||
long unixTimestamp = (long)(DateTime.Now.ToUniversalTime().Subtract(new DateTime(1970, 1, 1))).TotalSeconds;
|
||||
gettfk.TimeStamp = unixTimestamp.ToString();
|
||||
int counts = SqlSugarBase.GesmartDb().Updateable(gettfk).Where(x => x.Id == tfk.Id).ExecuteCommand();
|
||||
if (counts > 0)
|
||||
{
|
||||
var json = new
|
||||
{
|
||||
ErrCode = 200,
|
||||
ErrMsg = "修改成功"
|
||||
};
|
||||
return Json(json);
|
||||
}
|
||||
else
|
||||
{
|
||||
var json = new
|
||||
{
|
||||
ErrCode = 3005,
|
||||
ErrMsg = "修改失败"
|
||||
};
|
||||
return Json(json);
|
||||
}
|
||||
}
|
||||
}
|
||||
//创建
|
||||
else
|
||||
{
|
||||
string key = AesEncryptionExample.Randomnumber();
|
||||
gettfk.Key = key;
|
||||
gettfk.RequstCnt = 1;
|
||||
gettfk.CreateDateTime = DateTime.Now;
|
||||
gettfk.AppKey = "10001";
|
||||
gettfk.ReqType = 1;
|
||||
gettfk.SN = Sn;
|
||||
gettfk.Remark = "网页生成人脸机key";
|
||||
long unixTimestamp = (long)(DateTime.Now.ToUniversalTime().Subtract(new DateTime(1970, 1, 1))).TotalSeconds;
|
||||
gettfk.TimeStamp = unixTimestamp.ToString();
|
||||
int counts = SqlSugarBase.GesmartDb().Insertable(gettfk).ExecuteCommand();
|
||||
if (counts > 0)
|
||||
{
|
||||
var json = new
|
||||
{
|
||||
ErrCode = 200,
|
||||
ErrMsg = "添加成功"
|
||||
};
|
||||
return Json(json);
|
||||
}
|
||||
else
|
||||
{
|
||||
var json = new
|
||||
{
|
||||
ErrCode = 3003,
|
||||
ErrMsg = "添加失败"
|
||||
};
|
||||
return Json(json);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class Getdata
|
||||
{
|
||||
public string MsgID { get; set; }
|
||||
public string AppKey { get; set; }
|
||||
public string Timestamp { get; set; }
|
||||
public GetContent Content { get; set; }
|
||||
}
|
||||
public class GetContent
|
||||
{
|
||||
public string HotelID { get; set; }
|
||||
public int RoomID { get; set; }
|
||||
}
|
||||
|
||||
public class returnminfo
|
||||
{
|
||||
public string MsgID { get; set; }
|
||||
public string ErrCode { get; set; }
|
||||
public string ErrMsg { get; set; }
|
||||
public maes Contents { get; set; }
|
||||
|
||||
public returnminfo()
|
||||
{
|
||||
Contents = new maes();
|
||||
}
|
||||
}
|
||||
public class maes
|
||||
{
|
||||
public string HotelID { set; get; }
|
||||
public int RoomID { set; get; }
|
||||
public string DeviceBrand { set; get; }
|
||||
public string DeviceSN { set; get; }
|
||||
public string Key { set; get; }
|
||||
}
|
||||
public class Returnmessage
|
||||
{
|
||||
|
||||
public string MsgID { get; set; }
|
||||
public string ErrCode { get; set; }
|
||||
public string ErrMsg { get; set; }
|
||||
public mages Contents { get; set; }
|
||||
|
||||
public Returnmessage()
|
||||
{
|
||||
Contents = new mages();
|
||||
}
|
||||
|
||||
}
|
||||
public class mages
|
||||
{
|
||||
public string SN { get; set; }
|
||||
public string Key { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
public class Alldata
|
||||
{
|
||||
public string MsgID { get; set; }
|
||||
public string AppKey { get; set; }
|
||||
public string Timestamp { get; set; }
|
||||
public Content Content { get; set; }
|
||||
|
||||
}
|
||||
public class Content
|
||||
{
|
||||
public string SN { get; set; }
|
||||
public int ReqType { get; set; }
|
||||
}
|
||||
public class AesEncryptionExample
|
||||
{
|
||||
|
||||
|
||||
public static string Getip()
|
||||
{
|
||||
string ip = "";
|
||||
|
||||
#region 获取网络ip地址
|
||||
NetworkInterface[] interfaces = NetworkInterface.GetAllNetworkInterfaces();
|
||||
foreach (NetworkInterface networkInterface in interfaces)
|
||||
{
|
||||
IPInterfaceProperties ipProperties = networkInterface.GetIPProperties();
|
||||
UnicastIPAddressInformationCollection ipAddresses = ipProperties.UnicastAddresses;
|
||||
foreach (UnicastIPAddressInformation ipAddress in ipAddresses)
|
||||
{
|
||||
if (ipAddress.Address.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork)
|
||||
{
|
||||
|
||||
if (ipAddress.Address.ToString() != "127.0.0.1")
|
||||
{
|
||||
ip = ipAddress.Address.ToString();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
return ip;
|
||||
}
|
||||
|
||||
|
||||
public static string Randomnumber()
|
||||
{
|
||||
#region 随机产生的key
|
||||
int seed = (int)DateTime.Now.Ticks;
|
||||
Random random = new Random(seed);
|
||||
long number1 = random.Next(); // 随机的第一个long类型数字
|
||||
long number2 = random.Next(); // 随机的第二个long类型数字
|
||||
byte[] bytes1 = BitConverter.GetBytes(number1);
|
||||
byte[] bytes2 = BitConverter.GetBytes(number2);
|
||||
byte[] resultBytes = new byte[8];
|
||||
Buffer.BlockCopy(bytes1, 0, resultBytes, 0, 4); // 将第一个long的4个字节复制到结果数组
|
||||
Buffer.BlockCopy(bytes2, 0, resultBytes, 4, 4); // 将第二个long的4个字节复制到结果数组
|
||||
string result = BitConverter.ToString(resultBytes).Replace("-", string.Empty);
|
||||
return result;
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// AES 加密
|
||||
/// </summary>
|
||||
/// <param name="str">明文(待加密)</param>
|
||||
/// <param name="key">密文</param>
|
||||
/// <returns></returns>
|
||||
public static string AesEncrypt(string str, string key)
|
||||
{
|
||||
if (string.IsNullOrEmpty(str)) return null;
|
||||
Byte[] toEncryptArray = Encoding.UTF8.GetBytes(str);
|
||||
|
||||
RijndaelManaged rm = new RijndaelManaged
|
||||
{
|
||||
Key = Encoding.UTF8.GetBytes(key),
|
||||
Mode = CipherMode.ECB,
|
||||
Padding = PaddingMode.PKCS7
|
||||
};
|
||||
|
||||
ICryptoTransform cTransform = rm.CreateEncryptor();
|
||||
Byte[] resultArray = cTransform.TransformFinalBlock(toEncryptArray, 0, toEncryptArray.Length);
|
||||
return Convert.ToBase64String(resultArray);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// AES 解密
|
||||
/// </summary>
|
||||
/// <param name="str">明文(待解密)</param>
|
||||
/// <param name="key">密文</param>
|
||||
/// <returns></returns>
|
||||
public static string AesDecrypt(string str, string key)
|
||||
{
|
||||
if (string.IsNullOrEmpty(str)) return null;
|
||||
Byte[] toEncryptArray = Convert.FromBase64String(str);
|
||||
|
||||
RijndaelManaged rm = new RijndaelManaged
|
||||
{
|
||||
Key = Encoding.UTF8.GetBytes(key),
|
||||
Mode = CipherMode.ECB,
|
||||
Padding = PaddingMode.PKCS7
|
||||
};
|
||||
|
||||
ICryptoTransform cTransform = rm.CreateDecryptor();
|
||||
Byte[] resultArray = cTransform.TransformFinalBlock(toEncryptArray, 0, toEncryptArray.Length);
|
||||
|
||||
return Encoding.UTF8.GetString(resultArray);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
1059
Face.Web/Areas/App/Controllers/GroupController.cs
Normal file
1059
Face.Web/Areas/App/Controllers/GroupController.cs
Normal file
File diff suppressed because it is too large
Load Diff
205
Face.Web/Areas/App/Controllers/HomeController.cs
Normal file
205
Face.Web/Areas/App/Controllers/HomeController.cs
Normal file
@@ -0,0 +1,205 @@
|
||||
using AUTS.Services.Manager;
|
||||
using Face.Domain.Entities;
|
||||
using Face.Domain.ViewModels;
|
||||
using Face.Services.Cache;
|
||||
using Face.Services.DBUtility.Common;
|
||||
using Face.Web.Areas.App.Models;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Security;
|
||||
using System.Net.Sockets;
|
||||
using System.Runtime.Remoting.Lifetime;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace Face.Web.Areas.App.Controllers
|
||||
{
|
||||
public class HomeController : BaseController
|
||||
{
|
||||
// GET: App/Home
|
||||
public ActionResult Index()
|
||||
{
|
||||
ViewBag.errorcout = GetErrorcount();
|
||||
|
||||
return View();
|
||||
}
|
||||
public ActionResult SetCustomerID(int customerID)
|
||||
{
|
||||
//返回实体
|
||||
ReturnResult result = new ReturnResult();
|
||||
|
||||
#region 变更缓存
|
||||
//System.Web.HttpContext.Current.Session[onUserOperationSessionName] = customerID;
|
||||
|
||||
//CacheHelp.GetUserOperation(Umodel.UserName, customerID);
|
||||
|
||||
#endregion
|
||||
|
||||
result.Status = 200;
|
||||
result.Message = "变更数据库成功";
|
||||
return Json(result);
|
||||
}
|
||||
|
||||
public int GetErrorcount()
|
||||
{
|
||||
List<errormessagehandling> pmsinfo = SqlSugarBase.Db.Queryable<errormessagehandling>().ToList();
|
||||
|
||||
return pmsinfo.Count();
|
||||
}
|
||||
[HttpPost]
|
||||
public ActionResult closeProcess(Condition data)
|
||||
{
|
||||
//LogHelp.WriteExceptionLog("");
|
||||
Logs.WriteLog("重启服务");
|
||||
string art = process.GetProcessKill();
|
||||
return Json("closeProcess");
|
||||
}
|
||||
[HttpPost]
|
||||
public ActionResult openProcess(Condition data)
|
||||
{
|
||||
process.GetProcess();
|
||||
return Json("openProcess");
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
public static class process
|
||||
{
|
||||
//开启进程方法
|
||||
public static string GetProcess()
|
||||
{
|
||||
//找到所有进程
|
||||
Process[] ps = Process.GetProcesses();
|
||||
DataTable ProcessTable = new DataTable();
|
||||
ProcessTable.Columns.Add("Name", typeof(string));
|
||||
ProcessTable.Columns.Add("Start Time", typeof(DateTime));
|
||||
ProcessTable.Columns.Add("CPU %", typeof(TimeSpan));
|
||||
ProcessTable.Columns.Add("Threads", typeof(string));
|
||||
ProcessTable.Columns.Add("Session ID", typeof(int));
|
||||
ProcessTable.Columns.Add("Unique ID", typeof(int));
|
||||
ProcessTable.Columns.Add("RAM", typeof(float));
|
||||
ProcessTable.Columns.Add("Machine", typeof(string));
|
||||
ProcessTable.Columns.Add("Priority", typeof(int));
|
||||
foreach (Process Process in ps)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
//找到具有指定名称的进程
|
||||
// 换成你的exe名字 去掉exe
|
||||
if (!Process.ProcessName.ToUpper().Contains("TESTWEBSOCKET"))
|
||||
continue;
|
||||
string pName = Process.ProcessName;
|
||||
DateTime pStartTime = Process.StartTime;
|
||||
TimeSpan pProcTime = Process.TotalProcessorTime;
|
||||
string pThreads = Process.Threads.ToString();
|
||||
int pSessionId = Process.SessionId;
|
||||
int pId = Process.Id;
|
||||
long pRam = Process.VirtualMemorySize64;
|
||||
string pMachineName = Process.MachineName;
|
||||
int pPriority = Process.BasePriority;
|
||||
//杀死进程
|
||||
Process.Kill();
|
||||
ProcessTable.Rows.Add(pName
|
||||
, pStartTime
|
||||
, pProcTime
|
||||
, pThreads
|
||||
, pSessionId
|
||||
, pId
|
||||
, pRam
|
||||
, pMachineName
|
||||
, pPriority);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
// 换成你的exe路径
|
||||
//Process.Start(@"C:\FaceConsole\bin6\Release\TestWebSocket.exe");
|
||||
Process.Start(@"D:\NewGitRepos\TestWebSocket\TestWebSocket\bin\Release\TestWebSocket.exe");
|
||||
return JsonConvert.SerializeObject(ProcessTable);
|
||||
}
|
||||
/// <summary>
|
||||
/// 关闭进程
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static string GetProcessKill()
|
||||
{
|
||||
try
|
||||
{
|
||||
//找到所有进程
|
||||
Process[] ps = Process.GetProcesses();
|
||||
DataTable ProcessTable = new DataTable();
|
||||
ProcessTable.Columns.Add("Name", typeof(string));
|
||||
ProcessTable.Columns.Add("Start Time", typeof(DateTime));
|
||||
ProcessTable.Columns.Add("CPU %", typeof(TimeSpan));
|
||||
ProcessTable.Columns.Add("Threads", typeof(string));
|
||||
ProcessTable.Columns.Add("Session ID", typeof(int));
|
||||
ProcessTable.Columns.Add("Unique ID", typeof(int));
|
||||
ProcessTable.Columns.Add("RAM", typeof(float));
|
||||
ProcessTable.Columns.Add("Machine", typeof(string));
|
||||
ProcessTable.Columns.Add("Priority", typeof(int));
|
||||
foreach (Process Process in ps)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
//找到具有指定名称的进程
|
||||
// 换成你的exe名字 去掉exe
|
||||
if (!Process.ProcessName.ToUpper().Contains("FACESTEST"))
|
||||
continue;
|
||||
string pName = Process.ProcessName;
|
||||
DateTime pStartTime = Process.StartTime;
|
||||
TimeSpan pProcTime = Process.TotalProcessorTime;
|
||||
string pThreads = Process.Threads.ToString();
|
||||
int pSessionId = Process.SessionId;
|
||||
int pId = Process.Id;
|
||||
long pRam = Process.VirtualMemorySize64;
|
||||
string pMachineName = Process.MachineName;
|
||||
int pPriority = Process.BasePriority;
|
||||
//杀死进程
|
||||
Process.Kill();
|
||||
ProcessTable.Rows.Add(pName
|
||||
, pStartTime
|
||||
, pProcTime
|
||||
, pThreads
|
||||
, pSessionId
|
||||
, pId
|
||||
, pRam
|
||||
, pMachineName
|
||||
, pPriority);
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logs.WriteLog("重启服务错误" + e);
|
||||
}
|
||||
}
|
||||
// 换成你的exe路径
|
||||
|
||||
Process.Start(@"C:\FaceTest\bin\Release\FacesTest.exe");
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logs.WriteLog(e.ToString());
|
||||
}
|
||||
|
||||
|
||||
return JsonConvert.SerializeObject("ok");
|
||||
}
|
||||
|
||||
//Process.Start(@"D:\NewGitRepos\TestWebSocket\TestWebSocket\bin\Release\TestWebSocket.exe");
|
||||
}
|
||||
137
Face.Web/Areas/App/Controllers/HotelController.cs
Normal file
137
Face.Web/Areas/App/Controllers/HotelController.cs
Normal file
@@ -0,0 +1,137 @@
|
||||
using Face.Domain.Application;
|
||||
using Face.Domain.Entities;
|
||||
using Face.Services.Cache;
|
||||
using Face.Services.Manager;
|
||||
using Face.Web.Areas.App.Models;
|
||||
using Newtonsoft.Json;
|
||||
using PagedList;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.SqlClient;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using static Face.Web.Areas.App.Controllers.LoginController;
|
||||
using static Face.Web.Areas.App.Models.Roominfo;
|
||||
|
||||
namespace Face.Web.Areas.App.Controllers
|
||||
{
|
||||
public class HotelController : BaseController
|
||||
{
|
||||
private List<HotelGroups> GetHotelGroups//酒店项目缓存
|
||||
{
|
||||
get { return CacheHelp.GetHotelGroup(); }
|
||||
}
|
||||
// GET: App/Hotel
|
||||
|
||||
public ActionResult HotelInfo(int? page, string condition = null, string number = null)//酒店列表
|
||||
{
|
||||
List<int> lit = (List<int>)Session["list"];
|
||||
List<TBL_ROOM_BASIC_INFO> ZongRoominfo = (List<TBL_ROOM_BASIC_INFO>)Session["ZongRoominfo"];
|
||||
//CacheHelp.ClearRoomGroup();
|
||||
List<HotelGroups> hotelGroups = new List<HotelGroups>();
|
||||
try
|
||||
{
|
||||
using (SqlSugarClient db = SqlSugarBase.GesmartDb())
|
||||
{
|
||||
var dm= db.Queryable<DeviceManage>().ToList();
|
||||
ViewData["dmstate"] = dm.ToList();
|
||||
}
|
||||
var userList = SqlSugarBase.authoriydb.Queryable<Hotels>().OrderBy(e => e.Id).ToList();
|
||||
List<Hotels> li = new List<Hotels>();
|
||||
//第几页
|
||||
int pageNumber = page ?? 1;
|
||||
|
||||
//每页显示多少条
|
||||
int pageSize = 10;
|
||||
|
||||
for (int i = 0; i < lit.Count; i++)
|
||||
{
|
||||
var id = Convert.ToInt32(lit[i]);
|
||||
li.AddRange(userList.Where(x => x.Id == id).ToList());
|
||||
}
|
||||
|
||||
if (condition != "" && condition != null)
|
||||
{
|
||||
ViewData["condition"] = condition;
|
||||
li = li.Where(x => x.Name.Contains(condition)).ToList();
|
||||
}
|
||||
if (number != null && number != "")
|
||||
{
|
||||
li = li.Where(x => x.Id == int.Parse(number)).ToList();
|
||||
}
|
||||
IPagedList<Hotels> userPagedList = li.ToPagedList(pageNumber, pageSize);
|
||||
return View(userPagedList);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelp.WriteExceptionLog(ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
public ActionResult RoomInf(int? page, int hotelCode, string condition = "", string rommstate = null)//房间信息
|
||||
{
|
||||
List<int> lit = (List<int>)Session["list"];
|
||||
List<TBL_ROOM_BASIC_INFO> ZongRoominfo = (List<TBL_ROOM_BASIC_INFO>)Session["ZongRoominfo"];
|
||||
if (lit.IndexOf(hotelCode) < 0)
|
||||
{
|
||||
Response.Redirect("~/Html_Tools/Error_404.html", false);
|
||||
return null;
|
||||
}
|
||||
List<Result> relist = null;
|
||||
List<DeviceManage> dmlist = new List<DeviceManage>();
|
||||
int pageNumber = page ?? 1;
|
||||
int pageSize = 14;
|
||||
using (var data = SqlSugarBase.GesmartDb())
|
||||
{
|
||||
DateTime ser = Convert.ToDateTime("2000-01-01");
|
||||
var show = data.Queryable<CheckInInfo>().Where(x => x.checkOutTime == ser).ToList();
|
||||
var facelist = data.Queryable<DeviceManage>().ToList();
|
||||
dmlist = facelist.Where(x => x.HotelCode == hotelCode.ToString()).ToList();
|
||||
Session["Rommface"] = dmlist;
|
||||
ViewData["shop"] = show;
|
||||
}
|
||||
try
|
||||
{
|
||||
var ho = SqlSugarBase.authoriydb.Queryable<Hotels>().First(x => x.Id == hotelCode);
|
||||
GetRoomInterface.test test = new GetRoomInterface.test
|
||||
{
|
||||
code = ho.Code.ToString(),
|
||||
creatDate = ho.CreateTime.ToString("yyyy-MM-dd")
|
||||
};
|
||||
Roominfo.Root asd = GetRoomInterface.Roomport(test);
|
||||
if (asd.IsSuccess == true)
|
||||
{
|
||||
relist = asd.Result;
|
||||
ViewData["Roomsum"] = relist.Count();
|
||||
if (rommstate != "" && rommstate != null && rommstate != "-1")
|
||||
{
|
||||
ViewData["rommstate"] = rommstate;
|
||||
relist = relist.Where(s => s.RoomStatusID == int.Parse(rommstate)).ToList();
|
||||
|
||||
}
|
||||
ViewData["hotelCode"] = hotelCode;
|
||||
if (condition != null && condition != "")
|
||||
{
|
||||
ViewData["conditionShow"] = condition;
|
||||
relist = relist.Where(s => s.RoomNumber == condition).ToList();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
IPagedList<Result> userPagedList = relist.ToPagedList(pageNumber, pageSize);
|
||||
return View(userPagedList);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelp.WriteExceptionLog(ex);
|
||||
throw;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
1198
Face.Web/Areas/App/Controllers/ImgServerController.cs
Normal file
1198
Face.Web/Areas/App/Controllers/ImgServerController.cs
Normal file
File diff suppressed because it is too large
Load Diff
3948
Face.Web/Areas/App/Controllers/InterfaceController.cs
Normal file
3948
Face.Web/Areas/App/Controllers/InterfaceController.cs
Normal file
File diff suppressed because it is too large
Load Diff
338
Face.Web/Areas/App/Controllers/LodgerController.cs
Normal file
338
Face.Web/Areas/App/Controllers/LodgerController.cs
Normal file
@@ -0,0 +1,338 @@
|
||||
using Face.Domain.Application;
|
||||
using Face.Domain.Entities;
|
||||
using Face.Domain.ViewModels;
|
||||
using Face.Services.Cache;
|
||||
using Face.Services.DBUtility.Common;
|
||||
using Face.Services.Manager;
|
||||
using Face.Web.Areas.App.Models;
|
||||
using PagedList;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Hosting;
|
||||
using System.Web.Mvc;
|
||||
using System.Xml.Serialization;
|
||||
using static Face.Web.Areas.App.Models.Roominfo;
|
||||
|
||||
namespace Face.Web.Areas.App.Controllers
|
||||
{
|
||||
public class LodgerController : BaseController
|
||||
{
|
||||
|
||||
// GET: App/Lodger
|
||||
|
||||
public List<Hosts> GetRoomChecks//开房入住信息缓存
|
||||
{
|
||||
get { return CacheHelp.GetRoomCheck(); }
|
||||
}
|
||||
public List<Hosts> GetRoom//房间缓存
|
||||
{
|
||||
get { return CacheHelp.GetRoomGroup(); }
|
||||
}
|
||||
|
||||
public ActionResult LodgerInfo(int? page, string TiaoJian = null, string band = null)//住客信息
|
||||
{
|
||||
List<int> lit = (List<int>)Session["list"];
|
||||
List<TBL_ROOM_BASIC_INFO> ZongRoominfo = (List<TBL_ROOM_BASIC_INFO>)Session["ZongRoominfo"];
|
||||
|
||||
var hotellist = lit;
|
||||
IPagedList<Lodger> userPagedList = null;
|
||||
List<Lodger> lodgers = new List<Lodger>();
|
||||
|
||||
List<CheckInInfo> storage = new List<CheckInInfo>();
|
||||
try
|
||||
{
|
||||
using (SqlSugarClient db = SqlSugarBase.GesmartDb())
|
||||
{
|
||||
List<CheckInInfo> checkInInfos = new List<CheckInInfo>();
|
||||
var infoin =db.Queryable<CheckInInfo>().ToList();
|
||||
for (int i = 0; i < hotellist.Count; i++)
|
||||
{
|
||||
var id = hotellist[i];
|
||||
checkInInfos.AddRange(infoin.Where(x => x.HotelCode == id));
|
||||
}
|
||||
|
||||
ViewBag.inall = checkInInfos;
|
||||
var checkInInfo = db.Queryable<CheckInInfo>()
|
||||
.Where(it => hotellist.Contains(it.HotelCode.Value)).ToList()
|
||||
.GroupBy(x => x.IdNumber).ToList();
|
||||
for (var item = 0; item < checkInInfo.Count; item++)
|
||||
{
|
||||
storage.Add(checkInInfo[item].ToList()[0]);
|
||||
}
|
||||
ViewData["storage"] = storage;
|
||||
|
||||
|
||||
var lodge = db.Queryable<Lodger>().ToList();
|
||||
|
||||
for (int i = 0; i < storage.Count; i++)
|
||||
{
|
||||
List<Lodger> list = new List<Lodger>();
|
||||
var id = storage[i].IdNumber;
|
||||
list = lodge.Where(s => s.IDNumber == id).ToList();
|
||||
lodgers.AddRange(list);
|
||||
}
|
||||
|
||||
|
||||
|
||||
ViewData["storage"] = storage;
|
||||
//第几页
|
||||
int pageNumber = page ?? 1;
|
||||
|
||||
// //每页显示多少条
|
||||
int pageSize = 10;
|
||||
//根据ID升序排序
|
||||
lodgers = lodgers.OrderByDescending(x => x.LodgerId).ToList();
|
||||
|
||||
|
||||
if (TiaoJian != "" && TiaoJian != null)
|
||||
{
|
||||
ViewData["infose"] = TiaoJian;
|
||||
lodgers = lodgers.Where(x => x.LodgerNmae.Contains(TiaoJian)).ToList();
|
||||
}
|
||||
|
||||
// //通过ToPagedList扩展方法进行分页
|
||||
userPagedList = lodgers.ToPagedList(pageNumber, pageSize);
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelp.WriteExceptionLog(ex, Session["username"].ToString());
|
||||
throw;
|
||||
}
|
||||
// //将分页处理后的列表传给View
|
||||
return View(userPagedList);
|
||||
|
||||
}
|
||||
|
||||
public ActionResult Openhouse(int? page, string TiaoJian = null)//开房信息
|
||||
{
|
||||
List<int> lit = (List<int>)Session["list"];
|
||||
List<TBL_ROOM_BASIC_INFO> ZongRoominfo = (List<TBL_ROOM_BASIC_INFO>)Session["ZongRoominfo"];
|
||||
|
||||
List<CheckInInfo> li = new List<CheckInInfo>();
|
||||
using (SqlSugarClient db = SqlSugarBase.GesmartDb())
|
||||
{
|
||||
var userList = db.Queryable<CheckInInfo>().ToList();
|
||||
//第几页
|
||||
int pageNumber = page ?? 1;
|
||||
|
||||
//每页显示多少条
|
||||
int pageSize = 10;
|
||||
for (int i = 0; i < lit.Count; i++)
|
||||
{
|
||||
var id = Convert.ToInt32(lit[i]);
|
||||
li.AddRange(userList.Where(x => x.HotelCode == id).ToList());
|
||||
}
|
||||
li = li.Where(x => x.checkOutTime.Value.ToString("yyyy-MM-dd") == "2000-01-01").ToList();
|
||||
//根据ID升序排序
|
||||
li = li.OrderByDescending(x => x.id).ToList();
|
||||
|
||||
if (TiaoJian != "" && TiaoJian != null)
|
||||
{
|
||||
ViewData["infose2"] = TiaoJian;
|
||||
li = li.Where(x => x.Name.Contains(TiaoJian)).ToList();
|
||||
}
|
||||
//通过ToPagedList扩展方法进行分页
|
||||
IPagedList<CheckInInfo> userPagedList = li.ToPagedList(pageNumber, pageSize);
|
||||
|
||||
//CheckInfo r = DESerializer<CheckInfo>();
|
||||
|
||||
//将分页处理后的列表传给View
|
||||
return View(userPagedList);
|
||||
//反序列化
|
||||
|
||||
}
|
||||
}
|
||||
//public ActionResult Addedpersonnel()//添加人员信息
|
||||
//{
|
||||
// return View();
|
||||
//}
|
||||
public ActionResult AddCheckinfo()//添加入住人员信息
|
||||
{
|
||||
return View();
|
||||
}
|
||||
public ActionResult Addpeople(Lodger lr)//添加客户信息操作
|
||||
{
|
||||
ReturnResult result = new ReturnResult();
|
||||
if (string.IsNullOrEmpty(lr.IDNumber) | string.IsNullOrEmpty(lr.LodgerNmae) | string.IsNullOrEmpty(lr.phonenumber) | string.IsNullOrEmpty(lr.Sex.ToString()))
|
||||
{
|
||||
result.Status = 100;
|
||||
}
|
||||
else
|
||||
{
|
||||
lr.Sourcedian = 0;
|
||||
lr.CheckInDate = DateTime.Now;
|
||||
// if (SqlOperationsData.addClient(lr) != 0)
|
||||
// {
|
||||
// result.Status = 200;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// result.Status = 500;
|
||||
// }
|
||||
//}
|
||||
}
|
||||
return Json(result);
|
||||
}
|
||||
public ActionResult addcheckin(TestUser co)//添加入住信息操作
|
||||
{
|
||||
ReturnResult result = new ReturnResult();
|
||||
using (SqlSugarClient db = SqlSugarBase.GesmartDb())
|
||||
{
|
||||
TestUser test= db.Queryable<TestUser>().First(it => it.phone == co.phone);
|
||||
if (test!=null)
|
||||
{
|
||||
result.Status = 700;
|
||||
return Json(result);
|
||||
}
|
||||
TestUser tests = db.Queryable<TestUser>().First(it => it.idNumber == co.idNumber);
|
||||
if (tests != null)
|
||||
{
|
||||
result.Status = 800;
|
||||
return Json(result);
|
||||
}
|
||||
}
|
||||
if (string.IsNullOrEmpty(co.picture))
|
||||
{
|
||||
result.Status = 300;
|
||||
}
|
||||
else if (string.IsNullOrEmpty(co.idNumber) | string.IsNullOrEmpty(co.name))
|
||||
{
|
||||
result.Status = 100;
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
co.establish = Session["id"].ToString();
|
||||
co.creationTime = DateTime.Now;
|
||||
co.state = 1;
|
||||
using (SqlSugarClient db = SqlSugarBase.GesmartDb())
|
||||
{
|
||||
db.Insertable(co).ExecuteCommand();
|
||||
}
|
||||
result.Status = 200;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
result.Status = 100;
|
||||
LogHelp.WriteExceptionLog(e, Session["username"].ToString());
|
||||
throw;
|
||||
}
|
||||
|
||||
}
|
||||
return Json(result);
|
||||
}
|
||||
public ActionResult officialRoom(int hotelId)//房间下拉框
|
||||
{
|
||||
var geiRoomShow = GetRoom.Where(o => o.HotelID == hotelId).ToList();
|
||||
return Json(geiRoomShow);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 图像水平翻转
|
||||
/// </summary>
|
||||
/// <param name="bmp">原来图像</param>
|
||||
/// <returns></returns>
|
||||
//public bool HorizontalFlip(string orgimgsrc, string newimgsrc)
|
||||
//{
|
||||
// try
|
||||
// {
|
||||
|
||||
// using (Image originalImage = Image.FromFile(orgimgsrc))
|
||||
// {
|
||||
// using (Bitmap bitmap = new Bitmap(originalImage))
|
||||
// {
|
||||
|
||||
|
||||
|
||||
// var width = bitmap.Width;
|
||||
// var height = bitmap.Height;
|
||||
// Graphics g = Graphics.FromImage(bitmap);
|
||||
// Dictionary<string,Color> colorlist = new Dictionary<string, Color>();
|
||||
// for (int i = 0; i < width; i++)
|
||||
// {
|
||||
// for (int j = 0; j < height; j++)
|
||||
// {
|
||||
// colorlist.Add("_"+i+"_"+j,bitmap.GetPixel(i,j));
|
||||
// }
|
||||
// }
|
||||
// for (int i = 0; i < width; i++)
|
||||
// {
|
||||
// for (int j = 0; j < height; j++)
|
||||
// {
|
||||
// bitmap.SetPixel(i,j, colorlist["_" +(width-1- i) + "_" + (j)]);
|
||||
// }
|
||||
// }
|
||||
// //Rectangle rect = new Rectangle(0, 0, width, height);
|
||||
// //bitmap.RotateFlip(RotateFlipType.Rotate180FlipXY);
|
||||
// //g.DrawImage(bitmap, rect);
|
||||
// //if (System.IO.File.Exists(name))
|
||||
// //{
|
||||
// // System.IO.File.Delete(name);
|
||||
// //}
|
||||
// bitmap.Save(newimgsrc);
|
||||
// bitmap.Dispose();
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
|
||||
//}
|
||||
//public string Base64StringToImage()
|
||||
//{
|
||||
// try
|
||||
// {
|
||||
// string TimePath = HostingEnvironment.MapPath("~/Upload/Image/");//保存路径
|
||||
// TimePath += DateTime.Now.ToString("yyyy-MM-dd");
|
||||
// TimePath += "\\";
|
||||
// var oFile = Request.Files[0];//获得上传的文件
|
||||
// //获取后缀名
|
||||
// string ext = Path.GetExtension(Request.Files[0].FileName);
|
||||
// //string fullPath = Guid.NewGuid().ToString() + ext;
|
||||
// string fullPath = DateTime.Now.ToString("yyyy-MM-dd HH-mm-ss fff") + ext;
|
||||
// if (!Directory.Exists(TimePath))//判断文件夹是否存在
|
||||
// {
|
||||
// Directory.CreateDirectory(TimePath);//不存在则创建文件夹
|
||||
// }
|
||||
// oFile.SaveAs(TimePath + fullPath);
|
||||
// if(HorizontalFlip(TimePath + fullPath, TimePath + DateTime.Now.ToString("yyyy-MM-dd HH-mm-ss fff") + ext))
|
||||
// {
|
||||
// return TimePath + DateTime.Now.ToString("yyyy-MM-dd HH-mm-ss fff") + ext;
|
||||
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// return "";
|
||||
// }
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// return "";
|
||||
// }
|
||||
|
||||
//}
|
||||
//public string ConvertImageToBase64(Image file)
|
||||
//{
|
||||
// using (MemoryStream memoryStream = new MemoryStream())
|
||||
// {
|
||||
// file.Save(memoryStream, file.RawFormat);
|
||||
// byte[] imageBytes = memoryStream.ToArray();
|
||||
// return Convert.ToBase64String(imageBytes);
|
||||
// }
|
||||
//}
|
||||
}
|
||||
}
|
||||
1092
Face.Web/Areas/App/Controllers/LogController.cs
Normal file
1092
Face.Web/Areas/App/Controllers/LogController.cs
Normal file
File diff suppressed because it is too large
Load Diff
264
Face.Web/Areas/App/Controllers/LoginController.cs
Normal file
264
Face.Web/Areas/App/Controllers/LoginController.cs
Normal file
@@ -0,0 +1,264 @@
|
||||
using Face.Domain.Application;
|
||||
using Face.Domain.Entities;
|
||||
using Face.Domain.ViewModels;
|
||||
using Face.Services.Cache;
|
||||
using Face.Services.DBUtility.Common;
|
||||
using Face.Services.Enums;
|
||||
using Face.Services.Extensions;
|
||||
using Face.Services.Manager;
|
||||
using Face.Web.Areas.App.Models;
|
||||
using Newtonsoft.Json;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.ServiceModel.Channels;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Security;
|
||||
using static Face.Web.Areas.App.Models.Roominfo;
|
||||
|
||||
namespace Face.Web.Areas.App.Controllers
|
||||
{
|
||||
public class LoginController : Controller
|
||||
{
|
||||
[HttpPost]
|
||||
public ActionResult test(string data = "")
|
||||
{
|
||||
string z = data[115].ToString();
|
||||
portinfo ci = JsonConvert.DeserializeObject<portinfo>(data);
|
||||
return View();
|
||||
}
|
||||
public ActionResult Index()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
/// <summary>
|
||||
/// 计算密码 Hash值
|
||||
/// </summary>
|
||||
/// <param name="password"></param>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
private string ComputePasswordHash(string password, Accountentity ay)
|
||||
{
|
||||
return StringExtensions.ToMD5(ay.Uid.ToUpper() + password + ay.CreateTime.ToString("yyyy-MM-dd HH:mm:ss"));
|
||||
}
|
||||
/// <summary>
|
||||
/// 登录
|
||||
/// </summary>
|
||||
/// <param name="username">用户名</param>
|
||||
/// <param name="password">密码</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public ActionResult Login(string username, string password)
|
||||
{
|
||||
//记录数量
|
||||
Session["ullist"] = 0;
|
||||
Session["dp"] = 0;
|
||||
Session["fbcount"] = 0;
|
||||
Session["lodgeinfo"] = 0;
|
||||
Session["sum"] = 0;
|
||||
Session["li"] = 0;
|
||||
Session["quantity"] = 0;
|
||||
Session["pmslist"] = 0;
|
||||
Session["lasttimehotelID"] = "";
|
||||
|
||||
int sum = 0;
|
||||
List<TBL_ROOM_BASIC_INFO> ZongRoominfo=new List<TBL_ROOM_BASIC_INFO>();
|
||||
using (SqlSugarClient rcu = SqlSugarBase.Gesmartblv_rcu_db())
|
||||
{
|
||||
ZongRoominfo = rcu.Queryable<TBL_ROOM_BASIC_INFO>().ToList();
|
||||
}
|
||||
string ip = Services.Tool.IPHelper.GetIP();
|
||||
var result = new ReturnResult();
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrEmpty(username) | string.IsNullOrEmpty(password))
|
||||
throw new CustomException("用户名或密码不能为空");
|
||||
Models.Root judgedate = Denglv(username, password,ip);
|
||||
List<AuthItem> authItems=new List<AuthItem>();
|
||||
List<HotelsItem> Hotelslist =new List<HotelsItem>();
|
||||
List<int> lit = new List<int>();
|
||||
if (judgedate.Status == 200)
|
||||
{
|
||||
Session["judeg"] = judgedate.Data.Userinfo.HeadImg;
|
||||
Session["username"] = username;
|
||||
Session["id"] = judgedate.Data.Userinfo.Uid;
|
||||
|
||||
foreach (var item in judgedate.Data.HotelData)
|
||||
{
|
||||
foreach (var iten in item.Hotels)
|
||||
{
|
||||
int s = int.Parse(iten.HotelId.ToString());
|
||||
Hotelslist.Add(iten);
|
||||
lit.Add(s);//添加酒店权限id
|
||||
foreach (var ite in iten.Auth)
|
||||
{
|
||||
authItems.Add(ite);//添加操作权限
|
||||
}
|
||||
}
|
||||
}
|
||||
var HotelList = SqlSugarBase.authoriydb.Queryable<Hotels>().ToList();
|
||||
Session["HotelList"] = HotelList;
|
||||
Session["authItems"] = authItems;
|
||||
Task.Run(() =>
|
||||
{
|
||||
List<CheckInInfo> li = new List<CheckInInfo>();//获取在店住客总数
|
||||
List<DeviceManage> dm = new List<DeviceManage>();//获取人脸机总数
|
||||
List<Lodger> lr = new List<Lodger>();//获取住客总数
|
||||
List<FaceBinding> fb = new List<FaceBinding>();//获取绑定人脸机总数
|
||||
List<CheckInInfo> storage = new List<CheckInInfo>();
|
||||
List<Dailyoperation> dp = new List<Dailyoperation>();//获取住客总数
|
||||
List<pmsInterface> pms = new List<pmsInterface>();//获取住客总数
|
||||
List<ULog> ul = new List<ULog>();//获取总数
|
||||
SqlSugarBase.Db.Queryable<FaceBinding>().ToList();
|
||||
using (SqlSugarClient db = SqlSugarBase.GesmartDb())
|
||||
{
|
||||
var dmlist = db.Queryable<DeviceManage>().ToList();//查询所有
|
||||
var userList = db.Queryable<CheckInInfo>().ToList();//查询所有
|
||||
var Loderlist = db.Queryable<Lodger>().ToList();//查询所有
|
||||
var facelog =db.Queryable<FaceBinding>().ToList();//查询所有
|
||||
var pmslist = db.Queryable<pmsInterface>().ToList();//查询所有
|
||||
var dplist = db.Queryable<Dailyoperation>().ToList();//查询所有
|
||||
var ullist = db.Queryable<ULog>().ToList();//查询所有
|
||||
var hotellist = lit;
|
||||
var checkInInfo = db.Queryable<CheckInInfo>()
|
||||
.Where(it => hotellist.Contains(it.HotelCode.Value)).ToList()//包含关键字 可能有问题
|
||||
.GroupBy(x => x.IdNumber).ToList();
|
||||
for (var item = 0; item < checkInInfo.Count; item++)
|
||||
{
|
||||
storage.Add(checkInInfo[item].ToList()[0]);
|
||||
}
|
||||
ViewData["storage"] = storage;
|
||||
for (int i = 0; i < storage.Count; i++)
|
||||
{
|
||||
var id = storage[i].IdNumber;
|
||||
var lodge = db.Queryable<Lodger>().Where(s => s.IDNumber == id).ToList();
|
||||
lr.AddRange(lodge);
|
||||
}
|
||||
for (int i = 0; i < lit.Count; i++)
|
||||
{
|
||||
var id = Convert.ToInt32(lit[i]);
|
||||
dm.AddRange(dmlist.Where(x => x.HotelCode == id.ToString()).ToList());
|
||||
li.AddRange(userList.Where(x => x.HotelCode == id).ToList());
|
||||
fb.AddRange(facelog.Where(x => x.HotelCode == id).ToList());
|
||||
dp.AddRange(dplist.Where(x => x.hotelCode == id).ToList());
|
||||
ul.AddRange(ullist.Where(x => x.hotelcode == id).ToList());
|
||||
pms.AddRange(pmslist.Where(x => x.hotelid == id).ToList());
|
||||
}
|
||||
li = li.Where(x => x.checkOutTime.Value.ToString("yyyy-MM-dd") == "2000-01-01").ToList();
|
||||
for (int i = 0; i < authItems.Count; i++)
|
||||
{
|
||||
if (authItems[i].AuthotypeId == 5)
|
||||
{
|
||||
CacheHelp.Geiface(username + "pmslist", pms.Count());
|
||||
}
|
||||
if (authItems[i].AuthorityId == 3)
|
||||
{
|
||||
sum = 1;
|
||||
}
|
||||
}
|
||||
if (sum == 1)
|
||||
{
|
||||
dm.AddRange(dmlist.Where(x => x.HotelCode == null || x.HotelCode == "").ToList());
|
||||
}
|
||||
}
|
||||
CacheHelp.Geiface(username + "ullist", ul.Count());
|
||||
CacheHelp.Geiface(username + "dp", dp.Count());
|
||||
CacheHelp.Geiface(username + "fbcount", fb.Count());
|
||||
CacheHelp.Geiface(username + "lodgeinfo", lr.Count());
|
||||
CacheHelp.Geiface(username+"face", dm.Count());
|
||||
CacheHelp.Geiface(username + "li", li.Count());
|
||||
CacheHelp.Geiface(username + "quantity", lit.Count());
|
||||
});
|
||||
Session["list"] = lit;
|
||||
Session["qxHotels"] = Hotelslist;
|
||||
|
||||
string strlhID = "";
|
||||
int lastHotelID = 0;
|
||||
if (Request.Cookies["lastHotelId"] != null)
|
||||
{
|
||||
strlhID = Request.Cookies["lastHotelId"].Value;
|
||||
if (String.IsNullOrWhiteSpace(strlhID))
|
||||
lastHotelID = 0;
|
||||
else
|
||||
lastHotelID = Convert.ToInt32(strlhID);
|
||||
if (!lit.Contains(lastHotelID))
|
||||
lastHotelID = 0;
|
||||
}
|
||||
Session["defaultHotelId"] = lit.Count > 0 ? (lastHotelID!=0 ? lastHotelID : lit[0]) : 0;
|
||||
|
||||
Session["ZongRoominfo"] = ZongRoominfo;//总房间数
|
||||
result.Message = "/APP/Home/Index";
|
||||
result.Status = 200;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
throw new CustomException("用户名或密码错误");
|
||||
}
|
||||
}
|
||||
|
||||
catch (CustomException ex)
|
||||
{
|
||||
result.Message = ex.Message;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
var s = ex.Message;
|
||||
result.Message = "网络系统繁忙,请稍候再试!";
|
||||
LogHelp.WriteExceptionLog(ex, this.GetType().Name);
|
||||
//Logs.WriteErrorLog(HttpContext.Request.Url.ToString(), ex);
|
||||
}
|
||||
return Json(result, JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// API访问登录
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
/// <param name="pwd"></param>
|
||||
/// <returns></returns>
|
||||
public Models.Root Denglv(string name, string pwd,string ip)
|
||||
{
|
||||
|
||||
string url = "http://auth.blv-oa.com/OTApi/Login";
|
||||
string postData = string.Format("Uid={0}&Pwd={1}&appid=2", name, pwd);
|
||||
WebRequest request = WebRequest.Create(url);
|
||||
request.Method = "Post";
|
||||
request.ContentType = "application/x-www-form-urlencoded";
|
||||
StreamWriter sw = new StreamWriter(request.GetRequestStream());
|
||||
sw.Write(postData);
|
||||
sw.Flush();
|
||||
|
||||
WebResponse response = request.GetResponse();
|
||||
Stream s = response.GetResponseStream();
|
||||
StreamReader sr = new StreamReader(s, Encoding.GetEncoding("UTF-8"));
|
||||
string Show = sr.ReadToEnd();
|
||||
Models.Root info = JsonConvert.DeserializeObject<Models.Root>(Show);//josn转换实体类
|
||||
sw.Dispose();
|
||||
sw.Close();
|
||||
sr.Dispose();
|
||||
sr.Close();
|
||||
s.Dispose();
|
||||
s.Close();
|
||||
return info;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 刷新会话超时时间
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public ActionResult RefreshSessionTimeout()
|
||||
{
|
||||
// 设置会话超时时间为120分钟(2小时)
|
||||
Session.Timeout = 120;
|
||||
return Json(new { Session.Timeout });
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
77
Face.Web/Areas/App/Controllers/ProgramController.cs
Normal file
77
Face.Web/Areas/App/Controllers/ProgramController.cs
Normal file
@@ -0,0 +1,77 @@
|
||||
using AUTS.Services.Manager;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Web;
|
||||
using System.Web.Configuration;
|
||||
using System.Web.Mvc;
|
||||
namespace Face.Web.Areas.App.Controllers
|
||||
{
|
||||
public class ProgramController : Controller
|
||||
{
|
||||
// GET: App/Program
|
||||
public ActionResult Index()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
[HttpPost]
|
||||
public ActionResult Start(string programPath)
|
||||
{
|
||||
ProcessStartInfo startInfo = new ProcessStartInfo();
|
||||
if (string.IsNullOrEmpty(programPath))
|
||||
{
|
||||
ViewBag.Message = "No program path provided";
|
||||
return View("Index");
|
||||
}
|
||||
try
|
||||
{
|
||||
startInfo.UseShellExecute = true;
|
||||
startInfo.Verb = "runas"; //这行代码将提升权限
|
||||
//startInfo.FileName = Assembly.GetEntryAssembly().Location;
|
||||
startInfo.WorkingDirectory = Environment.CurrentDirectory;
|
||||
Process.Start(programPath);
|
||||
Logs.WriteLog("重新启动进成功");
|
||||
ViewBag.Message = "Program started successfully";
|
||||
//Process.Start(programPath);
|
||||
Environment.Exit(0);
|
||||
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
ViewBag.Message = $"Failed to start program: {ex.Message}";
|
||||
Logs.WriteLog("重新启动进成功"+ex);
|
||||
}
|
||||
|
||||
return View("Index");
|
||||
}
|
||||
[HttpPost]
|
||||
public ActionResult Stop(string programName)
|
||||
{
|
||||
if (string.IsNullOrEmpty(programName))
|
||||
{
|
||||
ViewBag.Message = "No program name provided";
|
||||
return View("Index");
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Process[] processes = Process.GetProcessesByName(programName);
|
||||
foreach (var process in processes)
|
||||
{
|
||||
process.Kill();
|
||||
Logs.WriteLog("关闭启动进成功");
|
||||
}
|
||||
ViewBag.Message = "Program stopped successfully";
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
ViewBag.Message = $"Failed to stop program: {ex.Message}";
|
||||
Logs.WriteLog("关闭启动进" + ex);
|
||||
}
|
||||
|
||||
return View("Index");
|
||||
}
|
||||
}
|
||||
}
|
||||
265
Face.Web/Areas/App/Controllers/PublicAreaSettingController.cs
Normal file
265
Face.Web/Areas/App/Controllers/PublicAreaSettingController.cs
Normal file
@@ -0,0 +1,265 @@
|
||||
using Face.Domain.Entities;
|
||||
using Face.Web.Areas.App.Models;
|
||||
using Microsoft.Ajax.Utilities;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Helpers;
|
||||
using System.Web.Mvc;
|
||||
using static Face.Web.Areas.App.Models.Roominfo;
|
||||
|
||||
namespace Face.Web.Areas.App.Controllers
|
||||
{
|
||||
public class PublicAreaSettingController : Controller
|
||||
{
|
||||
// GET: App/PublicAreaSetting
|
||||
public ActionResult AreaSetting()
|
||||
{
|
||||
ViewData["Hotelsp"] = SqlSugarBase.authoriydb.Queryable<Hotels>().ToList();
|
||||
return View();
|
||||
}
|
||||
public ActionResult officialHotel(int hotelId)//根据酒店id有人脸机的房间下拉框
|
||||
{
|
||||
List<Result> relist = null;
|
||||
Hotels hotel = new Hotels();
|
||||
|
||||
hotel = SqlSugarBase.authoriydb.Queryable<Hotels>().First(x => x.Id == hotelId);
|
||||
using (SqlSugarClient db = SqlSugarBase.GesmartDb())
|
||||
{
|
||||
var dm = db.Queryable<DeviceManage>().Where(x => x.RoomId != null).Select(x => x.RoomId).ToList();
|
||||
GetRoomInterface.test te = new GetRoomInterface.test();
|
||||
if (hotel != null)
|
||||
{
|
||||
te = new GetRoomInterface.test
|
||||
{
|
||||
code = hotel.Code.ToString(),
|
||||
creatDate = hotel.CreateTime.ToString("yyyy-MM-dd")
|
||||
};
|
||||
}
|
||||
|
||||
var geiRoomShow = GetRoomInterface.Roomport(te);
|
||||
if (geiRoomShow.IsSuccess == true)
|
||||
{
|
||||
relist = geiRoomShow.Result;
|
||||
//relist = relist./*Where(s => s.RoomStatusID == 16).*/Where(j => dm.IndexOf(j.ID) < 0).ToList();
|
||||
}
|
||||
string[] arrlist = new string[relist.Count];
|
||||
for (int i = 0; i < relist.Count; i++)
|
||||
{
|
||||
arrlist[i] = relist[i].HotelID;
|
||||
|
||||
}
|
||||
var rljilistm = db.Queryable<DeviceManage>().Where(x => arrlist.Contains(x.HotelCode)).ToList();
|
||||
var tbl_room_basic_info = SqlSugarBase.Gesmartblv_rcu_db().Queryable<tbl_room_basic_info>().Where(x => x.IsDel == 0 && arrlist.Contains(x.HOTEL_OLD_ID)).ToList();
|
||||
|
||||
return Json(tbl_room_basic_info);
|
||||
}
|
||||
}
|
||||
public ActionResult getPublicArea(int RoomId)
|
||||
{
|
||||
using (SqlSugarClient db = SqlSugarBase.GesmartDb())
|
||||
{
|
||||
//DeviceManage rljilistm = db.Queryable<DeviceManage>().First(x => x.RoomId == RoomId);
|
||||
tbl_room_basic_info tbl_room_basic_info = SqlSugarBase.Gesmartblv_rcu_db().Queryable<tbl_room_basic_info>().First(x=>x.ROOM_OLD_ID== RoomId);
|
||||
//rljilistm.isPublicArea = 1;
|
||||
tbl_room_basic_info.isPublicArea = 1;
|
||||
//int upint = db.Updateable(rljilistm).Where(x => x.RoomId == RoomId).ExecuteCommand();
|
||||
int uproom = SqlSugarBase.Gesmartblv_rcu_db().Updateable(tbl_room_basic_info).Where(x => x.ROOM_OLD_ID == RoomId).ExecuteCommand();
|
||||
bool folge = false;
|
||||
if (uproom > 0)
|
||||
{
|
||||
folge = true;
|
||||
return Json(folge);
|
||||
}
|
||||
else
|
||||
{
|
||||
return Json(folge);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public ActionResult CanclPublicArea(int RoomId)
|
||||
{
|
||||
using (SqlSugarClient db = SqlSugarBase.GesmartDb())
|
||||
{
|
||||
//DeviceManage rljilistm = db.Queryable<DeviceManage>().First(x => x.RoomId == RoomId);
|
||||
tbl_room_basic_info tbl_room_basic_info = SqlSugarBase.Gesmartblv_rcu_db().Queryable<tbl_room_basic_info>().First(x => x.ROOM_OLD_ID == RoomId);
|
||||
//rljilistm.isPublicArea = 0;
|
||||
tbl_room_basic_info.isPublicArea = 0;
|
||||
//int upint = db.Updateable(rljilistm).Where(x => x.RoomId == RoomId).ExecuteCommand();
|
||||
int uproom = SqlSugarBase.Gesmartblv_rcu_db().Updateable(tbl_room_basic_info).Where(x => x.ROOM_OLD_ID == RoomId).ExecuteCommand();
|
||||
bool folge = false;
|
||||
if (uproom > 0)
|
||||
{
|
||||
folge = true;
|
||||
return Json(folge);
|
||||
}
|
||||
else
|
||||
{
|
||||
return Json(folge);
|
||||
}
|
||||
}
|
||||
}
|
||||
public ActionResult RelevancePublicArea()
|
||||
{
|
||||
ViewData["Hotelsp"] = SqlSugarBase.authoriydb.Queryable<Hotels>().ToList();
|
||||
return View();
|
||||
}
|
||||
public ActionResult getHotel(int hotelId)//根据酒店id有人脸机的房间下拉框
|
||||
{
|
||||
List<Result> relist = null;
|
||||
Hotels hotel = new Hotels();
|
||||
|
||||
hotel = SqlSugarBase.authoriydb.Queryable<Hotels>().First(x => x.Id == hotelId);
|
||||
using (SqlSugarClient db = SqlSugarBase.GesmartDb())
|
||||
{
|
||||
var dm = db.Queryable<DeviceManage>().Where(x => x.RoomId != null).Select(x => x.RoomId).ToList();
|
||||
GetRoomInterface.test te = new GetRoomInterface.test();
|
||||
if (hotel != null)
|
||||
{
|
||||
te = new GetRoomInterface.test
|
||||
{
|
||||
code = hotel.Code.ToString(),
|
||||
creatDate = hotel.CreateTime.ToString("yyyy-MM-dd")
|
||||
};
|
||||
}
|
||||
|
||||
var geiRoomShow = GetRoomInterface.Roomport(te);
|
||||
if (geiRoomShow.IsSuccess == true)
|
||||
{
|
||||
relist = geiRoomShow.Result;
|
||||
//relist = relist./*Where(s => s.RoomStatusID == 16).*/Where(j => dm.IndexOf(j.ID) < 0).ToList();
|
||||
}
|
||||
string[] arrlist = new string[relist.Count];
|
||||
for (int i = 0; i < relist.Count; i++)
|
||||
{
|
||||
arrlist[i] = relist[i].HotelID;
|
||||
|
||||
}
|
||||
|
||||
var rljilistm = db.Queryable<DeviceManage>().Where(x => arrlist.Contains(x.HotelCode)).ToList();
|
||||
var tbl_room_basic_info = SqlSugarBase.Gesmartblv_rcu_db().Queryable<tbl_room_basic_info>().Where(x => x.IsDel == 0 && arrlist.Contains(x.HOTEL_OLD_ID)).ToList();
|
||||
var isok = tbl_room_basic_info.Where(x => x.isPublicArea == 1);
|
||||
var isno = tbl_room_basic_info.Where(x => x.isPublicArea != 1);
|
||||
var json = new
|
||||
{
|
||||
isokPublicArea = isok,
|
||||
isnoPublicArea = isno
|
||||
};
|
||||
return Json(json);
|
||||
//if (rljilistm.Count() > 0)
|
||||
//{
|
||||
// var isok = from s in tbl_room_basic_info
|
||||
// join d in rljilistm on s.ROOM_OLD_ID equals d.RoomId
|
||||
// where d.isPublicArea == 1
|
||||
// select new roominfo
|
||||
// {
|
||||
// Facelid = d.Facelid,
|
||||
// SerialNo = d.SerialNo,
|
||||
// CreatedDate = d.CreatedDate,
|
||||
// HotelCode = d.HotelCode,
|
||||
// RoomId = d.RoomId,
|
||||
// Factory = d.Factory,
|
||||
// Status = d.Status,
|
||||
// bindingDate = d.bindingDate,
|
||||
// bindingStatus = d.bindingStatus,
|
||||
// faceIp = d.faceIp,
|
||||
// faceAddress = d.faceAddress,
|
||||
// maintainStatus = d.maintainStatus,
|
||||
// ROOM_NUMBER = s.ROOM_NUMBER,
|
||||
// isPublicArea = d.isPublicArea
|
||||
// };
|
||||
// var isno = from s in tbl_room_basic_info
|
||||
// join d in rljilistm on s.ROOM_OLD_ID equals d.RoomId
|
||||
// where d.isPublicArea != 1
|
||||
// select new roominfo
|
||||
// {
|
||||
// Facelid = d.Facelid,
|
||||
// SerialNo = d.SerialNo,
|
||||
// CreatedDate = d.CreatedDate,
|
||||
// HotelCode = d.HotelCode,
|
||||
// RoomId = d.RoomId,
|
||||
// Factory = d.Factory,
|
||||
// Status = d.Status,
|
||||
// bindingDate = d.bindingDate,
|
||||
// bindingStatus = d.bindingStatus,
|
||||
// faceIp = d.faceIp,
|
||||
// faceAddress = d.faceAddress,
|
||||
// maintainStatus = d.maintainStatus,
|
||||
// ROOM_NUMBER = s.ROOM_NUMBER,
|
||||
// isPublicArea = d.isPublicArea
|
||||
// };
|
||||
// var json = new
|
||||
// {
|
||||
// isokPublicArea = isok,
|
||||
// isnoPublicArea = isno
|
||||
// };
|
||||
// return Json(json);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// var isok = tbl_room_basic_info.Where(x => x.isPublicArea == 1);
|
||||
// var isno = tbl_room_basic_info.Where(x => x.isPublicArea != 1);
|
||||
// var json = new
|
||||
// {
|
||||
// isokPublicArea = isok,
|
||||
// isnoPublicArea = isno
|
||||
// };
|
||||
// return Json(json);
|
||||
//}
|
||||
}
|
||||
}
|
||||
public ActionResult setHotel(int RoomId, string RoomidList)
|
||||
{
|
||||
using (SqlSugarClient db = SqlSugarBase.GesmartDb())
|
||||
{
|
||||
//DeviceManage rljilistm = db.Queryable<DeviceManage>().First(x => x.RoomId == RoomId);
|
||||
tbl_room_basic_info tbl_room_basic_info = SqlSugarBase.Gesmartblv_rcu_db().Queryable<tbl_room_basic_info>().First(x => x.ROOM_OLD_ID == RoomId);
|
||||
//rljilistm.AssociatedPublicArea = RoomidList;
|
||||
tbl_room_basic_info.AssociatedPublicArea = RoomidList;
|
||||
//int upint = db.Updateable(rljilistm).Where(x => x.RoomId == RoomId).ExecuteCommand();
|
||||
int uproom = SqlSugarBase.Gesmartblv_rcu_db().Updateable(tbl_room_basic_info).Where(x => x.ROOM_OLD_ID == RoomId).ExecuteCommand();
|
||||
bool folge = false;
|
||||
if (uproom > 0)
|
||||
{
|
||||
folge = true;
|
||||
return Json(folge);
|
||||
}
|
||||
else
|
||||
{
|
||||
return Json(folge);
|
||||
}
|
||||
}
|
||||
//return Json("ok");
|
||||
}
|
||||
|
||||
public ActionResult quxHotel(int RoomId)
|
||||
{
|
||||
using (SqlSugarClient db = SqlSugarBase.GesmartDb())
|
||||
{
|
||||
//DeviceManage rljilistm = db.Queryable<DeviceManage>().First(x => x.RoomId == RoomId);
|
||||
tbl_room_basic_info tbl_room_basic_info = SqlSugarBase.Gesmartblv_rcu_db().Queryable<tbl_room_basic_info>().First(x => x.ROOM_OLD_ID == RoomId);
|
||||
//rljilistm.AssociatedPublicArea = RoomidList;
|
||||
tbl_room_basic_info.AssociatedPublicArea = "";
|
||||
//int upint = db.Updateable(rljilistm).Where(x => x.RoomId == RoomId).ExecuteCommand();
|
||||
int uproom = SqlSugarBase.Gesmartblv_rcu_db().Updateable(tbl_room_basic_info).Where(x => x.ROOM_OLD_ID == RoomId).ExecuteCommand();
|
||||
bool folge = false;
|
||||
if (uproom > 0)
|
||||
{
|
||||
folge = true;
|
||||
return Json(folge);
|
||||
}
|
||||
else
|
||||
{
|
||||
return Json(folge);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
48
Face.Web/Areas/App/Controllers/QueryFaceStatusController.cs
Normal file
48
Face.Web/Areas/App/Controllers/QueryFaceStatusController.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
using Face.Domain.Entities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace Face.Web.Areas.App.Controllers
|
||||
{
|
||||
public class QueryFaceStatusController : Controller
|
||||
{
|
||||
// GET: App/QueryFaceStatus
|
||||
[HttpPost]
|
||||
public ActionResult QueryStatus(string HotelCode,string roomid,string key,string appid)
|
||||
{
|
||||
pmsLog list = new pmsLog();
|
||||
pmsLog listn = new pmsLog();
|
||||
//pmsLog pms= SqlSugarBase.Db.Insertable(log).ExecuteCommand();
|
||||
if (key== "blw_888")
|
||||
{
|
||||
list = SqlSugarBase.Db.Queryable<pmsLog>().OrderByDescending(x => x.Creationtime).First(x => x.HotelCode == HotelCode && x.roomid == roomid);
|
||||
if (list == null)
|
||||
{
|
||||
var json = new
|
||||
{
|
||||
Status = 100,
|
||||
message = "提供的酒店code和roomid没有查询到信息,请查看传递的信息是否有误!"
|
||||
};
|
||||
return Json(json);
|
||||
}
|
||||
listn = SqlSugarBase.Db.Queryable<pmsLog>().OrderByDescending(x => x.Creationtime).First(x => x.pmsid == list.pmsid);
|
||||
}
|
||||
else
|
||||
{
|
||||
var json = new
|
||||
{
|
||||
Status = 200,
|
||||
message = "提供的Key值有误!"
|
||||
};
|
||||
return Json(json);
|
||||
}
|
||||
|
||||
|
||||
|
||||
return Json(listn);
|
||||
}
|
||||
}
|
||||
}
|
||||
226
Face.Web/Areas/App/Controllers/RoomController.cs
Normal file
226
Face.Web/Areas/App/Controllers/RoomController.cs
Normal file
@@ -0,0 +1,226 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using Face.Domain.Entities;
|
||||
using Face.Services.Cache;
|
||||
using Face.Web.Areas.App.Models;
|
||||
using Face.Services.DBUtility.Custom;
|
||||
using Face.Domain.Application;
|
||||
using PagedList;
|
||||
using SqlSugar;
|
||||
using Face.Domain.ViewModels;
|
||||
using Face.Services.DBUtility.Common;
|
||||
using Face.Services.Manager;
|
||||
using static Face.Web.Areas.App.Controllers.FaceController;
|
||||
using static Face.Web.Areas.App.Controllers.InterfaceController;
|
||||
using static Face.Web.Areas.App.Models.Roominfo;
|
||||
|
||||
namespace Face.Web.Areas.App.Controllers
|
||||
{
|
||||
public class RoomController : Controller
|
||||
{
|
||||
public ActionResult TestRoomall(string Sn)
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public ActionResult InquireRoomall(Condition data)
|
||||
{
|
||||
List<int> lit = (List<int>)Session["list"];
|
||||
List<AuthItem> authItem = (List<AuthItem>)Session["authItems"];
|
||||
|
||||
string strSql = "";
|
||||
string strCntSql = "";
|
||||
//string selectSql = "select r.ROOM_ID as InnerRoomId, h.Id as HotelId, h.Name as HotelName, h.Code as ExternalHotelCode, r.ROOM_NUMBER as RoomNumber,d.* ";//d.bindingStatus, d.SerialNo, d.Status, d.maintainStatus ";
|
||||
string selectSql = "select r.ROOM_OLD_ID as InnerRoomId, h.Id as HotelId, h.Name as HotelName, h.Code as ExternalHotelCode, r.ROOM_NUMBER as RoomNumber, r.RoomStatusID as RoomCheckInStatus, ";
|
||||
selectSql += "d.Facelid, d.SerialNo, d.CreatedDate, d.HotelCode, d.RoomId, d.Factory, d.Status, d.bindingDate, d.bindingStatus, d.faceIp, d.faceAddress, d.maintainStatus ";
|
||||
string fromSql = "";
|
||||
string orderSql = "";
|
||||
string limitSql = "";
|
||||
string cond1Sql = "";
|
||||
string cond2Sql = "";
|
||||
string cond3Sql = "";
|
||||
string tbl1Sql = "";
|
||||
for (int i = 0; i < lit.Count; i++)
|
||||
{
|
||||
cond1Sql += (" Id=" + lit[i] + " or");
|
||||
}
|
||||
cond1Sql = cond1Sql.Substring(0, cond1Sql.Length - 2);
|
||||
if (authItem[0].AuthorityId == 3)
|
||||
{
|
||||
cond1Sql += " or Id=0 or Id is null ";
|
||||
}
|
||||
|
||||
//酒店id判断
|
||||
Session["defaultHotelId"] = data.HotelID;
|
||||
HttpCookie aCookie = new HttpCookie("lastHotelId");
|
||||
aCookie.Value = Convert.ToString(data.HotelID);
|
||||
aCookie.Expires = DateTime.Now.AddDays(7);
|
||||
Response.Cookies.Add(aCookie);
|
||||
|
||||
|
||||
if (data.HotelID == -1)
|
||||
{
|
||||
cond2Sql += " and (Id=0 or Id is null) ";
|
||||
}
|
||||
else if (data.HotelID != 0)
|
||||
{
|
||||
cond2Sql += " and Id=" + data.HotelID;
|
||||
}
|
||||
tbl1Sql = "(select * from authoritydb.hotels where 0=0 and (" + cond1Sql + ") " + cond2Sql + " ) h ";
|
||||
fromSql = "from " + tbl1Sql + "join blv_rcu_db.tbl_room_basic_info r on h.Id = r.HOTEL_OLD_ID ";
|
||||
fromSql += "left join face.devicemanage d on r.ROOM_OLD_ID=d.RoomId ";
|
||||
//-1代表全部房间
|
||||
if (data.Notbing != -1)
|
||||
{
|
||||
if(data.Notbing == 0)
|
||||
cond3Sql += "where d.bindingStatus=" + data.Notbing + " or d.bindingStatus is null "; //0 or null both means no binding
|
||||
else
|
||||
cond3Sql += "where d.bindingStatus=" + data.Notbing + " ";
|
||||
}
|
||||
if (data.FaceName != "" && data.FaceName != null)
|
||||
{
|
||||
if (cond3Sql.IndexOf("where") < 0)
|
||||
cond3Sql += "where ";
|
||||
else
|
||||
cond3Sql += "and ";
|
||||
cond3Sql += "d.SerialNo like '%" + data.FaceName + "%' ";
|
||||
}
|
||||
orderSql = "order by h.Name, r.ROOM_NUMBER ";
|
||||
limitSql = "LIMIT " + (data.dataMin) + ",8; ";
|
||||
|
||||
strSql = selectSql + fromSql + cond3Sql + orderSql + limitSql;
|
||||
List<InfoRoomall> allRooms = new DALHelperCustom<InfoRoomall>("DeviceManage").SqlQueryGetList(strSql);
|
||||
|
||||
strCntSql = "select COUNT(*) " + fromSql + cond3Sql + orderSql;
|
||||
DataSet dsCnt = Fasce.Services.DBUtility.Custom.DbHelperMySqlCustom.Query(strCntSql);
|
||||
int cnt = 0;
|
||||
int cntmode = 0;
|
||||
if (dsCnt != null && dsCnt.Tables.Count > 0)
|
||||
{
|
||||
DataRow dr = dsCnt.Tables[0].Rows[0];
|
||||
cnt = Convert.ToInt32(dr[0]);
|
||||
cntmode = cnt % 8;
|
||||
}
|
||||
if (allRooms != null && cnt != 0)
|
||||
{
|
||||
ViewBag.count = cnt;
|
||||
ViewBag.modcount = cntmode;
|
||||
ViewBag.curpagenum = data.Pages;
|
||||
ViewBag.allpage = cnt / 8 + (cntmode == 0 ? 0 : 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
allRooms = null;
|
||||
}
|
||||
|
||||
DateTime dt = Convert.ToDateTime("2000-01-01");
|
||||
var stillcheckin = SqlSugarBase.GesmartDb().Queryable<CheckInInfo>().Where(s => s.checkOutTime == dt).ToList();
|
||||
ViewData["sungo"] = stillcheckin;
|
||||
|
||||
return PartialView("InquireRoomall", allRooms);
|
||||
}
|
||||
|
||||
|
||||
|
||||
[HttpPost]
|
||||
public ActionResult BindFaceDeviceToRoom(obje obje)//房间绑定人脸机操作
|
||||
{
|
||||
ReturnResult result = new ReturnResult();
|
||||
try
|
||||
{
|
||||
if (SqlOperationsData.reviseRommFace(obje.hotel, obje.romm, obje.faceNo) != 0)
|
||||
{
|
||||
FaceBinding binding = new FaceBinding
|
||||
{
|
||||
bindingDate = DateTime.Now,
|
||||
HotelCode = int.Parse(obje.hotel),
|
||||
OperatorType = true,
|
||||
RoomId = obje.romm,
|
||||
SerialNo = obje.faceNo,
|
||||
Operator = Session["username"].ToString()
|
||||
|
||||
};
|
||||
if (SqlOperationsData.bindingState(binding) != 0)
|
||||
{
|
||||
result.Status = 200;
|
||||
result.Message = "为房间添加人脸机成功";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
result.Status = 500;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelp.WriteExceptionLog(ex, Session["username"].ToString());
|
||||
result.Status = 100;
|
||||
}
|
||||
|
||||
return Json(result);
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public ActionResult RemoveFaceDeviceFromRoom(obje hotelno)
|
||||
{
|
||||
ReturnResult result = new ReturnResult();
|
||||
try
|
||||
{
|
||||
if (SqlOperationsData.unbundleoperateRoom(hotelno.faceNo) != 0)
|
||||
{
|
||||
FaceBinding binding = new FaceBinding
|
||||
{
|
||||
bindingDate = DateTime.Now,
|
||||
HotelCode = int.Parse(hotelno.hotel),
|
||||
OperatorType = false,
|
||||
RoomId = hotelno.romm,
|
||||
SerialNo = hotelno.faceNo,
|
||||
Operator = Session["username"].ToString()
|
||||
|
||||
};
|
||||
if (SqlOperationsData.bindingState(binding) != 0)
|
||||
result.Status = 200;
|
||||
}
|
||||
else
|
||||
{
|
||||
result.Status = 500;
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelp.WriteExceptionLog(ex, Session["username"].ToString());
|
||||
result.Status = 100;
|
||||
|
||||
}
|
||||
return Json(result);
|
||||
}
|
||||
|
||||
|
||||
public class TwoRetDevList
|
||||
{
|
||||
public List<DeviceManage> allFreeOfHotel = new List<DeviceManage>();
|
||||
public List<DeviceManage> allFree = new List<DeviceManage>();
|
||||
}
|
||||
|
||||
|
||||
[HttpGet]
|
||||
public JsonResult GetFaceDeviceOfHotel(int hotelId)//根据酒店id有人脸机的房间下拉框
|
||||
{
|
||||
TwoRetDevList retObj = new TwoRetDevList();
|
||||
using (SqlSugarClient db = SqlSugarBase.GesmartDb())
|
||||
{
|
||||
var allfree = db.Queryable<DeviceManage>().Where(x => x.bindingStatus == false).Select(x => x).ToList();
|
||||
var allfreeofhotel = allfree.Where(y => Convert.ToInt32(y.HotelCode) == hotelId).ToList();
|
||||
retObj.allFree = allfree;
|
||||
retObj.allFreeOfHotel = allfreeofhotel;
|
||||
}
|
||||
return Json(retObj, JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
}
|
||||
}
|
||||
365
Face.Web/Areas/App/Controllers/SendmessageController.cs
Normal file
365
Face.Web/Areas/App/Controllers/SendmessageController.cs
Normal file
@@ -0,0 +1,365 @@
|
||||
|
||||
using Face.Domain.Application.FaceAll;
|
||||
using Face.Domain.Entities;
|
||||
using Face.Web.Areas.App.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
using System.Web.Mvc;
|
||||
using WebSocketToolsConsole;
|
||||
|
||||
namespace Face.Web.Areas.App.Controllers
|
||||
{
|
||||
public class SendmessageController : Controller
|
||||
{
|
||||
// GET: App/Sendmessage
|
||||
/// <summary>
|
||||
/// 新命令获取设备信息
|
||||
/// </summary>
|
||||
/// <param name="Serial">人脸机编号</param>
|
||||
/// <returns></returns>
|
||||
public ActionResult GetModelInfosas(string Serial)
|
||||
{
|
||||
|
||||
Entity.Rootinfo info = new Entity.Rootinfo();
|
||||
info.pmsid = -1;
|
||||
Entity.msgx msgx = new Entity.msgx();
|
||||
|
||||
StringBuilder sbperson = new StringBuilder();
|
||||
sbperson.Append("key=abcdef");
|
||||
msgx.msgid = Guid.NewGuid().ToString();
|
||||
msgx.sn = Serial;
|
||||
msgx.cmd = "GetModelInfo";//得到设备信息
|
||||
msgx.msg = System.Web.HttpUtility.HtmlDecode(sbperson.ToString());
|
||||
info.msgx = msgx;
|
||||
info.pmsid = -1;
|
||||
string sendMsg = Newtonsoft.Json.JsonConvert.SerializeObject(info);
|
||||
UdpCommunication.QueueSend(sendMsg);
|
||||
using (var db = SqlSugarBase.GesmartDb())
|
||||
{
|
||||
string sn = Serial;
|
||||
var dbt = db.Queryable<Domain.Application.FaceAll.DeviceManage>().First(x => x.SerialNo == sn);
|
||||
Domain.Application.FaceAll.ULog uLog = new Domain.Application.FaceAll.ULog
|
||||
{
|
||||
Uname = Session["username"].ToString(),
|
||||
faceSN = Serial,
|
||||
operatetype = "得到设备基本信息",
|
||||
hotelcode = int.Parse(Session["hotelCode"].ToString()),
|
||||
roomid = dbt.RoomId,
|
||||
Creationtime = DateTime.Now
|
||||
};
|
||||
SqlSugarBase.Db.Insertable(uLog).ExecuteCommand();
|
||||
}
|
||||
|
||||
return Json("成功", JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
/// <summary>
|
||||
/// 恢复出厂设置命令
|
||||
/// </summary>
|
||||
/// <param name="Serial">人脸机编号</param>
|
||||
/// <returns></returns>
|
||||
public ActionResult RestoreFactorySettinginfo(string Serial)
|
||||
{
|
||||
Entity.Rootinfo info = new Entity.Rootinfo();
|
||||
info.pmsid = -1;
|
||||
Entity.msgx msgx = new Entity.msgx();
|
||||
|
||||
StringBuilder sbperson = new StringBuilder();
|
||||
sbperson.Append("key=abcdef");
|
||||
msgx.msgid = Guid.NewGuid().ToString();
|
||||
msgx.sn = Serial;
|
||||
msgx.cmd = "RestoreFactorySetting";//恢复出场设置
|
||||
msgx.msg = System.Web.HttpUtility.HtmlDecode(sbperson.ToString());
|
||||
info.msgx = msgx;
|
||||
info.pmsid = -1;
|
||||
string sendMsg = Newtonsoft.Json.JsonConvert.SerializeObject(info);
|
||||
UdpCommunication.QueueSend(sendMsg);
|
||||
using (var db = SqlSugarBase.GesmartDb())
|
||||
{
|
||||
string sn = Serial;
|
||||
var dbt = db.Queryable<Domain.Application.FaceAll.DeviceManage>().First(x => x.SerialNo == sn);
|
||||
Domain.Application.FaceAll.ULog uLog = new Domain.Application.FaceAll.ULog
|
||||
{
|
||||
Uname = Session["username"].ToString(),
|
||||
faceSN = Serial,
|
||||
operatetype = "恢复出场设置",
|
||||
hotelcode = int.Parse(Session["hotelCode"].ToString()),
|
||||
roomid = dbt.RoomId,
|
||||
Creationtime = DateTime.Now
|
||||
};
|
||||
SqlSugarBase.Db.Insertable(uLog).ExecuteCommand();
|
||||
}
|
||||
|
||||
return Json("成功", JsonRequestBehavior.AllowGet);
|
||||
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 下发固件命令
|
||||
/// </summary>
|
||||
/// <param name="ApkName">固件名称</param>
|
||||
/// <param name="RoomidList">房间集合</param>
|
||||
/// <param name="DomainNmae">域名</param>
|
||||
/// <param name="FTPPort">端口</param>
|
||||
/// <param name="UserNmae">用户名称</param>
|
||||
/// <param name="pwd">密码</param>
|
||||
/// <param name="foder">路径</param>
|
||||
/// <returns></returns>
|
||||
public ActionResult UpdateApk(string ApkName, string RoomidList, string DomainNmae, string FTPPort, string UserNmae, string pwd, string foder)
|
||||
{
|
||||
List<string> arrlist = new List<string>();
|
||||
Domain.Application.FaceAll.DeviceManage hotel = SqlSugarBase.Db.Queryable<Domain.Application.FaceAll.DeviceManage>().First(x => x.RoomId == int.Parse(RoomidList));
|
||||
Entity.Rootinfo rootinfo = new Entity.Rootinfo();
|
||||
Entity.msgx msgx = new Entity.msgx();
|
||||
msgx.msgid = Guid.NewGuid().ToString();
|
||||
if (!arrlist.Contains(msgx.msgid)) { arrlist.Add(msgx.msgid); }
|
||||
msgx.sn = hotel.SerialNo;
|
||||
msgx.cmd = "updateAPK2";//操作
|
||||
StringBuilder sbperson = new StringBuilder();
|
||||
sbperson.Append("key=abcdef");
|
||||
sbperson.Append("&url=" + foder+"/"+ ApkName);
|
||||
sbperson.Append("&Hast=" + DomainNmae);
|
||||
sbperson.Append("&UserName=" + UserNmae);
|
||||
sbperson.Append("&Port=" + FTPPort);
|
||||
sbperson.Append("&PW=" + pwd);
|
||||
//sbperson.Append("&Folder=" + foder);
|
||||
msgx.msg = System.Web.HttpUtility.HtmlDecode(sbperson.ToString());
|
||||
rootinfo.msgx = msgx;
|
||||
rootinfo.pmsid = -1;
|
||||
string sendMsg = Newtonsoft.Json.JsonConvert.SerializeObject(rootinfo);
|
||||
UdpCommunication.QueueSend(sendMsg);
|
||||
return Json(new { isok = true, arr = arrlist });
|
||||
}
|
||||
/// <summary>
|
||||
/// 上传日志api
|
||||
/// </summary>
|
||||
/// <param name="Serial">人脸机编号</param>
|
||||
/// <param name="DomainNmae">域名</param>
|
||||
/// <param name="FTPPort">端口</param>
|
||||
/// <param name="UserNmae">用户名</param>
|
||||
/// <param name="pwd">密码</param>
|
||||
/// <param name="foder">路径</param>
|
||||
/// <returns></returns>
|
||||
public ActionResult UploadLogData(string Serial,string DomainNmae,string FTPPort,string UserNmae,string pwd,string foder)
|
||||
{
|
||||
|
||||
Entity.Rootinfo info = new Entity.Rootinfo();
|
||||
info.pmsid = -1;
|
||||
Entity.msgx msgx = new Entity.msgx();
|
||||
|
||||
StringBuilder sbperson = new StringBuilder();
|
||||
sbperson.Append("key=abcdef");
|
||||
msgx.msgid = Guid.NewGuid().ToString();
|
||||
msgx.sn = Serial;
|
||||
msgx.cmd = "UploadLogData";//上传日志
|
||||
sbperson.Append("&Hast="+ DomainNmae);
|
||||
sbperson.Append("&UserName=" + UserNmae);
|
||||
sbperson.Append("&Port=" + FTPPort);
|
||||
sbperson.Append("&PW=" + pwd);
|
||||
sbperson.Append("&Folder=" + foder);
|
||||
msgx.msg = System.Web.HttpUtility.HtmlDecode(sbperson.ToString());
|
||||
info.msgx = msgx;
|
||||
info.pmsid = -1;
|
||||
string sendMsg = Newtonsoft.Json.JsonConvert.SerializeObject(info);
|
||||
UdpCommunication.QueueSend(sendMsg);
|
||||
return Json("成功", JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
public ActionResult setPeopleinfov19(string Serial, string HotelID, string RoomID, string IC_NO, string Groupid, string npeople,string id,string kshitime,string jieshutime)
|
||||
{
|
||||
Entity.Rootinfo info = new Entity.Rootinfo();
|
||||
info.pmsid = -1;
|
||||
Entity.msgx msgx = new Entity.msgx();
|
||||
msgx.msgid = Guid.NewGuid().ToString();
|
||||
msgx.sn = Serial;
|
||||
msgx.cmd = "setPerson";
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("key=abc");
|
||||
if (npeople == "1")
|
||||
{
|
||||
sb.Append("&datatype=2");
|
||||
sb.Append("&id=432156782341123429");
|
||||
sb.Append("&name=KevinLu");
|
||||
sb.Append("&IC_NO=" + IC_NO);
|
||||
sb.Append("&ID_NO=432156782341123429");
|
||||
sb.Append("&photo=<http://face.blv-oa.com/upload/testimages/432156782341123429_661497.png>");
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.Append("&datatype=2");
|
||||
sb.Append("&id="+ id);
|
||||
sb.Append("&name=VellaLiu");
|
||||
sb.Append("&IC_NO="+ IC_NO);
|
||||
sb.Append("&ID_NO="+id);
|
||||
sb.Append("&photo=<http://face.blv-oa.com/upload/testimages/123456782341127777_612497.jpg>");
|
||||
}
|
||||
sb.Append("&startTs="+kshitime);
|
||||
sb.Append("&endTs="+jieshutime);
|
||||
sb.Append("&passCount=10000");
|
||||
sb.Append("&HotelID=" + HotelID);
|
||||
sb.Append("&RoomID=" + RoomID);
|
||||
sb.Append("&Groupid=" + Groupid);
|
||||
msgx.msg = System.Web.HttpUtility.HtmlDecode(sb.ToString());
|
||||
info.msgx = msgx;
|
||||
string sendMsg = Newtonsoft.Json.JsonConvert.SerializeObject(info);
|
||||
UdpCommunication.QueueSend(sendMsg);
|
||||
return Json("成功", JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
public ActionResult getPeopleData19(string Serial, string number, string offset, string Groupid)
|
||||
{
|
||||
Entity.Rootinfo info = new Entity.Rootinfo();
|
||||
info.pmsid = -1;
|
||||
Entity.msgx msgx = new Entity.msgx();
|
||||
StringBuilder sbperson = new StringBuilder();
|
||||
sbperson.Append("key=abc");
|
||||
sbperson.Append("&number=" + number);
|
||||
sbperson.Append("&offset="+ offset);
|
||||
sbperson.Append("&Groupid=" + Groupid);
|
||||
msgx.msgid = Guid.NewGuid().ToString();
|
||||
msgx.sn = Serial;
|
||||
msgx.cmd = "listPersonByNumber";//获取人员列表
|
||||
msgx.msg = System.Web.HttpUtility.HtmlDecode(sbperson.ToString());
|
||||
info.msgx = msgx;
|
||||
info.pmsid = -1;
|
||||
string sendMsg = Newtonsoft.Json.JsonConvert.SerializeObject(info);
|
||||
UdpCommunication.QueueSend(sendMsg);
|
||||
using (var db = SqlSugarBase.GesmartDb())
|
||||
{
|
||||
string sn = Serial;
|
||||
var dbt = db.Queryable<Domain.Application.FaceAll.DeviceManage>().First(x => x.SerialNo == sn);
|
||||
Domain.Application.FaceAll.ULog uLog = new Domain.Application.FaceAll.ULog
|
||||
{
|
||||
Uname = Session["username"].ToString(),
|
||||
faceSN = Serial,
|
||||
operatetype = "获取人员列表",
|
||||
hotelcode = int.Parse(Session["hotelCode"].ToString()),
|
||||
roomid = dbt.RoomId,
|
||||
Creationtime = DateTime.Now
|
||||
};
|
||||
SqlSugarBase.Db.Insertable(uLog).ExecuteCommand();
|
||||
}
|
||||
|
||||
return Json("成功", JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
public ActionResult selectPeopleData191(string Serial, string id, string Groupid)
|
||||
{
|
||||
Entity.Rootinfo info = new Entity.Rootinfo();
|
||||
info.pmsid = -1;
|
||||
Entity.msgx msgx = new Entity.msgx();
|
||||
msgx.msgid = Guid.NewGuid().ToString();
|
||||
msgx.sn = Serial;
|
||||
msgx.cmd = "getPerson";
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("key=abc");
|
||||
sb.Append("&id="+ id);
|
||||
sb.Append("&Groupid=" + Groupid);
|
||||
msgx.msg = System.Web.HttpUtility.HtmlDecode(sb.ToString());
|
||||
info.msgx = msgx;
|
||||
|
||||
|
||||
string sendMsg = Newtonsoft.Json.JsonConvert.SerializeObject(info);
|
||||
UdpCommunication.QueueSend(sendMsg);
|
||||
return Json("成功", JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
|
||||
public ActionResult rebootface191(string Serial, string id, string HotelID, string RoomID, string Groupid)
|
||||
{
|
||||
Entity.Rootinfo info = new Entity.Rootinfo();
|
||||
info.pmsid = -1;
|
||||
|
||||
Entity.msgx msgx = new Entity.msgx();
|
||||
msgx.msgid = Guid.NewGuid().ToString();
|
||||
msgx.sn = Serial;
|
||||
msgx.cmd = "removePerson";
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.Append("key=abc");
|
||||
builder.Append("&id="+id);
|
||||
builder.Append("&HotelID=" + HotelID);
|
||||
builder.Append("&RoomID=" + RoomID);
|
||||
builder.Append("&Groupid=" + Groupid);
|
||||
//if (isNew1Point6)
|
||||
//{
|
||||
// if (npeople == "1")
|
||||
// {
|
||||
// builder.Append("&id=[432156782341123429]");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// builder.Append("&id=[123456782341127777]");
|
||||
// }
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// if (npeople == "1")
|
||||
// {
|
||||
// builder.Append("&id=432156782341123429");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// builder.Append("&id=123456782341127777");
|
||||
// }
|
||||
//}
|
||||
|
||||
msgx.msg = System.Web.HttpUtility.HtmlDecode(builder.ToString());
|
||||
info.msgx = msgx;
|
||||
|
||||
string sendMsg = Newtonsoft.Json.JsonConvert.SerializeObject(info);
|
||||
UdpCommunication.QueueSend(sendMsg);
|
||||
return Json("成功", JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
public ActionResult removePeopleDataByGroup19(string Serial,string Groupid)
|
||||
{
|
||||
Entity.Rootinfo info = new Entity.Rootinfo();
|
||||
info.pmsid = -1;
|
||||
|
||||
Entity.msgx msgx = new Entity.msgx();
|
||||
msgx.msgid = Guid.NewGuid().ToString();
|
||||
msgx.sn = Serial;
|
||||
msgx.cmd = "removeGroup";
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.Append("key=abc");
|
||||
builder.Append("&Group=" + Groupid);
|
||||
msgx.msg = System.Web.HttpUtility.HtmlDecode(builder.ToString());
|
||||
info.msgx = msgx;
|
||||
|
||||
string sendMsg = Newtonsoft.Json.JsonConvert.SerializeObject(info);
|
||||
UdpCommunication.QueueSend(sendMsg);
|
||||
return Json("成功", JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
|
||||
public ActionResult GetSetAPKSandProgressData(List<string> ApkName)
|
||||
{
|
||||
Dictionary<String, List<Face.Domain.Application.FaceAll.facedevicerxtxinfo>> listdevprog = new Dictionary<String, List<Face.Domain.Application.FaceAll.facedevicerxtxinfo>>();
|
||||
|
||||
using (var db = SqlSugarBase.GesmartDb())
|
||||
{
|
||||
List<Face.Domain.Application.FaceAll.facedevicerxtxinfo> matchedList = db.Queryable<Face.Domain.Application.FaceAll.facedevicerxtxinfo>()
|
||||
.Where(x => x.msgid== ApkName[0] && x.direction == "Rx")
|
||||
.ToList();
|
||||
List<Face.Domain.Application.FaceAll.facedevicerxtxinfo> currMsgList = matchedList.Where(x => x.msgid == ApkName[0]).ToList();
|
||||
listdevprog.Add(ApkName[0], currMsgList);
|
||||
}
|
||||
return Json(listdevprog);
|
||||
}
|
||||
}
|
||||
public class GetDeviceinfo
|
||||
{
|
||||
public string Token { get; set; }
|
||||
public string ProtocolVersion { get; set; }
|
||||
|
||||
public string MsgID { get; set; }
|
||||
|
||||
public string DateTime { get; set; }
|
||||
public string Brand { get; set; }
|
||||
public string SN { get; set; }
|
||||
|
||||
public string CMD { get; set; }
|
||||
public Parainfo Para { get; set; }
|
||||
}
|
||||
public class Parainfo
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
152
Face.Web/Areas/App/Controllers/SetFaceController.cs
Normal file
152
Face.Web/Areas/App/Controllers/SetFaceController.cs
Normal file
File diff suppressed because one or more lines are too long
576
Face.Web/Areas/App/Controllers/TestController.cs
Normal file
576
Face.Web/Areas/App/Controllers/TestController.cs
Normal file
@@ -0,0 +1,576 @@
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
using Face.Domain.ViewModels;
|
||||
using Face.Services.Manager;
|
||||
using Face.Domain.Entities;
|
||||
using PagedList;
|
||||
using Face.Services.Cache;
|
||||
using System.Data.Entity.Infrastructure;
|
||||
using WebServer;
|
||||
using System.Threading.Tasks;
|
||||
using Face.Services.DBUtility.Common;
|
||||
using Face.Web.Areas.App.Models;
|
||||
using System.Data.Entity;
|
||||
using System.Threading;
|
||||
using static Face.Web.Areas.App.Models.Roominfo;
|
||||
using Face.Domain.Application;
|
||||
using SqlSugar;
|
||||
using System.Web.Hosting;
|
||||
using AUTS.Services.Manager;
|
||||
using LogHelp = Face.Services.Manager.LogHelp;
|
||||
using Logs = Face.Services.Manager.Logs;
|
||||
using WebSocketToolsConsole;
|
||||
using TencentCloud.Common.Profile;
|
||||
using TencentCloud.Common;
|
||||
using TencentCloud.Sms.V20210111;
|
||||
using TencentCloud.Sms.V20210111.Models;
|
||||
using System.Diagnostics;
|
||||
using System.Data;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
namespace Face.Web.Areas.App.Controllers
|
||||
{
|
||||
public class TestController : BaseController
|
||||
{
|
||||
|
||||
public ActionResult FaceOperate(int? page)
|
||||
{
|
||||
var HotelsList = SqlSugarBase.authoriydb.Queryable<Hotels>().ToList();
|
||||
return View(HotelsList);
|
||||
}
|
||||
public ActionResult IssueBJandLogandroomid()
|
||||
{
|
||||
Uiinfo ui = new Uiinfo();
|
||||
string issuetype = "";
|
||||
var Roonid = int.Parse(Request.Form["Roonid"]);//获得房间id
|
||||
var roomname = Request.Form["roomname"];//获得房间名称
|
||||
var photo = Request.Form["photo"];//背景图
|
||||
var photologo = Request.Form["photologo"];//获得logo
|
||||
ImgServerController imgServer = new ImgServerController();
|
||||
if (!string.IsNullOrEmpty(photo))
|
||||
{
|
||||
issuetype = "BkgPng";
|
||||
var img = imgServer.YHFileImage(issuetype + "/" + photo);
|
||||
ui.imageBj = "<" + issuetype + "/" + photo + ">";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(photologo))
|
||||
{
|
||||
issuetype = "Logo";
|
||||
|
||||
var img = imgServer.YHFileImage(issuetype + "/" + photologo);
|
||||
ui.imagelogo = "<" + issuetype + "/" + photologo + ">";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(roomname))
|
||||
{
|
||||
//Unicode编码房号,不转换字母和数字,
|
||||
//string sasd = Regex.Replace(roomname, @"(?![a-zA-Z0-9\s]).", match => "\\u" + ((int)match.Value[0]).ToString("x4"));
|
||||
//Unicode编码房号,所有的信息都进行编译
|
||||
char[] cs = roomname.ToCharArray();
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 0; i < cs.Length; i++)
|
||||
{
|
||||
sb.AppendFormat("\\u{0:x4}", (int)cs[i]);
|
||||
}
|
||||
ui.Roomname = sb.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.Roomname = "U+0020U+0020U+0020U+0020";
|
||||
}
|
||||
using (var db = SqlSugarBase.GesmartDb())
|
||||
{
|
||||
var Sn = db.Queryable<DeviceManage>().Where(s => s.RoomId == Roonid).ToList();
|
||||
StringBuilder sbperson = new StringBuilder();
|
||||
sbperson.Append("key=abcdef");
|
||||
string ImageInfo = Newtonsoft.Json.JsonConvert.SerializeObject(ui);
|
||||
sbperson.Append("&ImageInfo=" + ImageInfo);
|
||||
Entity.Rootinfo msgx = new Entity.Rootinfo();
|
||||
Entity.msgx msgxs = new Entity.msgx();
|
||||
msgxs.msgid = Guid.NewGuid().ToString();
|
||||
msgxs.sn = Sn[0].SerialNo;
|
||||
msgxs.cmd = "SetUI";//操作
|
||||
msgxs.msg = System.Web.HttpUtility.HtmlDecode(sbperson.ToString());
|
||||
msgx.msgx = msgxs;
|
||||
msgx.pmsid = -1;
|
||||
string sendMsg = Newtonsoft.Json.JsonConvert.SerializeObject(msgx);
|
||||
UdpCommunication.QueueSend(sendMsg);//下发数据给控制台
|
||||
}
|
||||
return Json("");
|
||||
}
|
||||
|
||||
public List<Hotels> GetHotel//酒店缓存
|
||||
{
|
||||
get { return CacheHelp.GetHotelslist(); }
|
||||
}
|
||||
|
||||
// GET: App/Test
|
||||
public ActionResult TestOpen()
|
||||
{
|
||||
using (SqlSugarClient db = SqlSugarBase.GesmartDb())
|
||||
{
|
||||
string name = Session["id"].ToString();
|
||||
var list = db.Queryable<TestUser>().Where(x => x.state == 1).Where(j => j.establish == name).ToList();
|
||||
ViewBag.clist = list;
|
||||
}
|
||||
ViewData["Hotelsp"] = SqlSugarBase.authoriydb.Queryable<Hotels>().ToList();
|
||||
return View();
|
||||
}
|
||||
public ActionResult visitinfo(string infoShow, string hotel, string room, string checkin, int shi)//开房测试
|
||||
{
|
||||
try
|
||||
{
|
||||
List<Result> relist = null;
|
||||
List<string> vs = infoShow.Split(',').ToList();
|
||||
DateTime date = Convert.ToDateTime(checkin);
|
||||
var code = int.Parse(hotel);
|
||||
//查询酒店
|
||||
var hotellist = SqlSugarBase.authoriydb.Queryable<Hotels>().First(s => s.Code == code.ToString());
|
||||
if (hotellist == null)
|
||||
{
|
||||
return Json(false);
|
||||
}
|
||||
GetRoomInterface.test test = new GetRoomInterface.test
|
||||
{
|
||||
code = hotellist.Code.ToString(),
|
||||
creatDate = hotellist.CreateTime.ToString("yyyy-MM-dd")
|
||||
};
|
||||
//查询房间
|
||||
Roominfo.Root asd = GetRoomInterface.Roomport(test);
|
||||
if (asd == null)
|
||||
{
|
||||
return Json(false);
|
||||
}
|
||||
if (asd.IsSuccess != true)
|
||||
{
|
||||
return Json(false);
|
||||
}
|
||||
relist = asd.Result;
|
||||
//查询房间的第一条数据
|
||||
var sc = relist.FirstOrDefault(j => j.RoomNumber == room);
|
||||
if (sc == null)
|
||||
{
|
||||
return Json(false);
|
||||
}
|
||||
int state = 0;
|
||||
CheckinTest user = new CheckinTest() { testState = state, creationTime = DateTime.Now, predictCheckIn = date, checkInduration = shi, hotelid = hotellist.Id, Roomid = sc.ID };
|
||||
//插入到数据库Face的表CheckinTest返回主键
|
||||
var Staty = SqlSugarBase.Db.Insertable(user).ExecuteReturnIdentity();
|
||||
//Logs.WriteTimingUDPLog("保存开房信息主表成功");
|
||||
int id = Staty;
|
||||
for (int i = 0; i < vs.Count; i++)
|
||||
{
|
||||
subtabulation su = new subtabulation() { masterid = id, Lodgerid = int.Parse(vs[i]) };
|
||||
//插入到数据库Face的表subtabulation返回主键
|
||||
SqlSugarBase.Db.Insertable(su).ExecuteCommand();
|
||||
}
|
||||
using (SqlSugarClient db = SqlSugarBase.GesmartDb())
|
||||
{
|
||||
//查询CheckinTest数据表对应的数据信息
|
||||
var OutRoom = db.Queryable<CheckinTest>().First(x => x.id == id);
|
||||
//添加时间处理
|
||||
var timeOut = DateTime.Parse(OutRoom.predictCheckIn.ToString()).AddMinutes(Convert.ToDouble(OutRoom.checkInduration.ToString()));
|
||||
var dqsj = timeOut - DateTime.Now;
|
||||
if (OutRoom.checkInduration != 0)
|
||||
{
|
||||
Thread S = new Thread(new ThreadStart(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
var time = (int)dqsj.TotalMilliseconds;
|
||||
|
||||
Thread.Sleep(time);
|
||||
using (var ar = SqlSugarBase.GesmartDb())
|
||||
{
|
||||
var Out = ar.Queryable<CheckinTest>().First(x => x.id == id);
|
||||
if (OutRoom.checkInduration != 0)//判断是否为永久开房
|
||||
{
|
||||
if (FJHelp.outinfos(id.ToString()))
|
||||
{
|
||||
//Logs.WriteTimingUDPLog("退房ok");
|
||||
}
|
||||
else
|
||||
{
|
||||
//Logs.WriteTimingUDPLog("退房no id" + id + ":" + Out);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logs.WriteLog("预退出错" + ex.ToString());
|
||||
}
|
||||
}));//到达时间的时候执行事件;
|
||||
S.Start();
|
||||
}
|
||||
//查询下发人员信息
|
||||
var select = SqlSugarBase.Db.Queryable<TestUser>().Where(x => vs.Contains(x.id.ToString())).ToList();
|
||||
List<WebServer.UserInfo> users = new List<WebServer.UserInfo>();
|
||||
|
||||
var nowok = true;
|
||||
bool isok = false;
|
||||
if (date <= DateTime.Now)
|
||||
{
|
||||
//Logs.WriteTimingUDPLog("立即开房");
|
||||
for (int i = 0; i < select.Count; i++)
|
||||
{
|
||||
WebServer.UserInfo fo = new WebServer.UserInfo()
|
||||
{
|
||||
idcard = select[i].idNumber,
|
||||
customer = select[i].name,
|
||||
sex = select[i].sex == 1 ? "男" : "女",
|
||||
photoUrl = "http://face.blv-oa.com/ImgServer/FileImage?url=" + select[i].picture,
|
||||
};
|
||||
users.Add(fo);
|
||||
int uid = int.Parse(vs[i]);
|
||||
var sm = SqlSugarBase.Db.Queryable<TestUser>().First(x => x.id == uid);
|
||||
isok = WebHelp.Send(new SendInfo { code = hotel, roomNumber = room, idNumber = sm.idNumber, phoneNumber = sm.phone }, users.ToArray());
|
||||
users.Clear();
|
||||
}
|
||||
int states = 3;
|
||||
if (isok)
|
||||
{
|
||||
states = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
nowok = false;
|
||||
}
|
||||
|
||||
SqlSugarBase.Db.Updateable<CheckinTest>().SetColumns(it => it.testState == states).Where(it => it.id == Staty).ExecuteCommand();
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
var dt = date - DateTime.Now;
|
||||
Thread thread = new Thread(new ThreadStart(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
List<WebServer.UserInfo> users1 = new List<WebServer.UserInfo>();
|
||||
var time = (int)dt.TotalMilliseconds;
|
||||
Thread.Sleep(time);
|
||||
for (int i = 0; i < select.Count; i++)
|
||||
{
|
||||
WebServer.UserInfo fo = new WebServer.UserInfo()
|
||||
{
|
||||
idcard = select[i].idNumber,
|
||||
customer = select[i].name,
|
||||
sex = select[i].sex == 1 ? "男" : "女",
|
||||
photoUrl = "http://face.blv-oa.com/ImgServer/FileImage?url=" + select[i].picture,
|
||||
};
|
||||
users1.Add(fo);
|
||||
int uid = int.Parse(vs[i]);
|
||||
var sm = SqlSugarBase.Db.Queryable<TestUser>().First(x => x.id == uid);
|
||||
isok = WebHelp.Send(new SendInfo { code = hotel, roomNumber = room, idNumber = sm.idNumber, phoneNumber = sm.phone }, users1.ToArray());
|
||||
users1.Clear();
|
||||
}
|
||||
int states = 3;
|
||||
if (isok)
|
||||
{
|
||||
states = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
nowok = false;
|
||||
}
|
||||
|
||||
SqlSugarBase.Db.Updateable<CheckinTest>().SetColumns(it => it.testState == states).Where(it => it.id == user.id).ExecuteCommand();
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
AUTS.Services.Manager.Logs.WriteTimingUDPLog("预开出错" + ex.ToString());
|
||||
}
|
||||
}));//到达时间的时候执行事件;
|
||||
thread.Start();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelp.WriteExceptionLog(ex);
|
||||
}
|
||||
}
|
||||
return Json(nowok);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelp.WriteExceptionLog(ex);
|
||||
return Json(false);
|
||||
}
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public ActionResult outinfos(string id)//退房信息
|
||||
{
|
||||
|
||||
return Json(FJHelp.outinfos(id));
|
||||
}
|
||||
|
||||
public ActionResult action(string str)
|
||||
{
|
||||
using (SqlSugarClient db = SqlSugarBase.GesmartDb())
|
||||
{
|
||||
var list = db.Queryable<CheckInInfo>().Where(s => s.IdNumber == str).ToList();
|
||||
return Json(list);
|
||||
}
|
||||
}
|
||||
public class OutClass
|
||||
{
|
||||
public string HotelCode { get; set; }
|
||||
public string roomid { get; set; }
|
||||
|
||||
public DateTime checkOutTime { get; set; }
|
||||
}
|
||||
public ActionResult testindent(int? page)//测试人员
|
||||
{
|
||||
int pageSize = 8;
|
||||
int pageNumber = page ?? 1;
|
||||
using (SqlSugarClient db = SqlSugarBase.GesmartDb())
|
||||
{
|
||||
string name = Session["id"].ToString();
|
||||
var testlist = db.Queryable<TestUser>().Where(s => s.establish == name).ToList();
|
||||
//ViewBag.testlist = testlist;
|
||||
IPagedList<TestUser> userPagedList = testlist.ToPagedList(pageNumber, pageSize);
|
||||
return View(userPagedList);
|
||||
}
|
||||
}
|
||||
public ActionResult freeze(string id)
|
||||
{
|
||||
ReturnResult result = new ReturnResult();
|
||||
if (SqlOperationsData.amendtestUser(id) != 0)
|
||||
{
|
||||
result.Status = 200;
|
||||
}
|
||||
else
|
||||
{
|
||||
result.Status = 100;
|
||||
}
|
||||
return Json(result);
|
||||
|
||||
}
|
||||
public ActionResult freeze1(string id)
|
||||
{
|
||||
ReturnResult result = new ReturnResult();
|
||||
if (SqlOperationsData.amendtestUser1(id) != 0)
|
||||
{
|
||||
result.Status = 200;
|
||||
}
|
||||
else
|
||||
{
|
||||
result.Status = 100;
|
||||
}
|
||||
return Json(result);
|
||||
|
||||
}
|
||||
public ActionResult retreatinfo(int? page)
|
||||
{
|
||||
List<int> lit = (List<int>)Session["list"];
|
||||
List<TBL_ROOM_BASIC_INFO> ZongRoominfo = (List<TBL_ROOM_BASIC_INFO>)Session["ZongRoominfo"];
|
||||
|
||||
List<CheckinTest> li = new List<CheckinTest>();
|
||||
try
|
||||
{
|
||||
//第几页
|
||||
int pageNumber = page ?? 1;
|
||||
if (page != null)
|
||||
{
|
||||
ViewData["page"] = page;
|
||||
}
|
||||
else
|
||||
{
|
||||
ViewData["page"] = 1;
|
||||
}
|
||||
//每页显示多少条
|
||||
int pageSize = 7;
|
||||
|
||||
//根据ID升序排序
|
||||
|
||||
using (SqlSugarClient ser = SqlSugarBase.GesmartDb())
|
||||
{
|
||||
var user = ser.Queryable<TestUser>().ToList();
|
||||
var se = ser.Queryable<subtabulation>().ToList();
|
||||
var userList = ser.Queryable<CheckinTest>().ToList();
|
||||
var dsae = ser.Queryable<CheckinTest>().ToList();
|
||||
for (int i = 0; i < lit.Count; i++)
|
||||
{
|
||||
var id = Convert.ToInt32(lit[i]);
|
||||
li.AddRange(userList.Where(x => x.hotelid == id).ToList());
|
||||
}
|
||||
ViewData["people"] = dsae;
|
||||
ViewBag.indent = li;
|
||||
ViewBag.se = se;
|
||||
ViewBag.user = user;
|
||||
}
|
||||
li = li.OrderByDescending(x => x.id).ToList();
|
||||
IPagedList<CheckinTest> userPagedList = li.ToPagedList(pageNumber, pageSize);
|
||||
//将分页处理后的列表传给View
|
||||
return View(userPagedList);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
AUTS.Services.Manager.LogHelp.WriteExceptionLog(ex);
|
||||
throw;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public ActionResult FaceTestOperate(int? page)
|
||||
{
|
||||
var HotelsList = SqlSugarBase.authoriydb.Queryable<Hotels>().ToList();
|
||||
return View(HotelsList);
|
||||
}
|
||||
public ActionResult IssueUiType()
|
||||
{
|
||||
string issuetype = "";
|
||||
var Roonid = int.Parse(Request.Form["Roonid"]);//获得房间id
|
||||
|
||||
|
||||
var type = int.Parse(Request.Form["type"]);//获得下发类型
|
||||
|
||||
var roomname = Request.Form["roomname"];//获得房间名称
|
||||
var photo = Request.Form["photo"];//获得上传的文件
|
||||
ImgServerController imgServer = new ImgServerController();
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case 2:
|
||||
issuetype = "BkgPng";
|
||||
break;
|
||||
case 3:
|
||||
issuetype = "Logo";
|
||||
break;
|
||||
}
|
||||
var img = imgServer.YHFileImage(issuetype + "/" + photo);
|
||||
|
||||
using (var db = SqlSugarBase.GesmartDb())
|
||||
{
|
||||
var Sn = db.Queryable<DeviceManage>().Where(s => s.RoomId == Roonid).ToList();
|
||||
switch (type)
|
||||
{
|
||||
case 2:
|
||||
StringBuilder sbperson = new StringBuilder();
|
||||
UiImg ui = new UiImg();
|
||||
ui.name = "uiname";
|
||||
ui.image = "<" + issuetype + "/" + photo + ">";
|
||||
ui.x = 0;
|
||||
ui.y = 0;
|
||||
ui.w = 0;
|
||||
ui.h = 0;
|
||||
sbperson.Append("key=abc");
|
||||
string ImageInfo = Newtonsoft.Json.JsonConvert.SerializeObject(ui);
|
||||
sbperson.Append("&ImageInfo=" + ImageInfo);
|
||||
Entity.Rootinfo msgx = new Entity.Rootinfo();
|
||||
Entity.msgx msgxs = new Entity.msgx();
|
||||
msgxs.msgid = Guid.NewGuid().ToString();
|
||||
msgxs.sn = Sn[0].SerialNo;
|
||||
msgxs.cmd = "updateMainPageBG";//操作
|
||||
msgxs.msg = System.Web.HttpUtility.HtmlDecode(sbperson.ToString());
|
||||
msgx.msgx = msgxs;
|
||||
msgx.pmsid = -1;
|
||||
string sendMsg = Newtonsoft.Json.JsonConvert.SerializeObject(msgx);
|
||||
UdpCommunication.QueueSend(sendMsg);//下发数据给控制台
|
||||
break;
|
||||
case 3:
|
||||
StringBuilder sbperson2 = new StringBuilder();
|
||||
//Unicode编码房号,不转换字母和数字,
|
||||
//string sasd = Regex.Replace(roomname, @"(?![a-zA-Z0-9\s]).", match => "\\u" + ((int)match.Value[0]).ToString("x4"));
|
||||
//Unicode编码房号,所有的信息都进行编译
|
||||
//char[] cs = roomname.ToCharArray();
|
||||
//StringBuilder sb = new StringBuilder();
|
||||
//for (int i = 0; i < cs.Length; i++)
|
||||
//{
|
||||
// sb.AppendFormat("\\u{0:x4}", (int)cs[i]);
|
||||
////}
|
||||
//string roominfo = sb.ToString();
|
||||
sbperson2.Append("key=abc");
|
||||
sbperson2.Append("&Roomnumber=" + roomname);
|
||||
sbperson2.Append("&Logo=" + "<" + issuetype + "/" + photo + ">");
|
||||
Entity.Rootinfo msgx2 = new Entity.Rootinfo();
|
||||
Entity.msgx msgxs2 = new Entity.msgx();
|
||||
msgxs2.msgid = Guid.NewGuid().ToString();
|
||||
msgxs2.sn = Sn[0].SerialNo;
|
||||
msgxs2.cmd = "updateLogoRoomNo";//操作
|
||||
msgxs2.msg = System.Web.HttpUtility.HtmlDecode(sbperson2.ToString());
|
||||
msgx2.msgx = msgxs2;
|
||||
msgx2.pmsid = -1;
|
||||
string sendMsg2 = Newtonsoft.Json.JsonConvert.SerializeObject(msgx2);
|
||||
UdpCommunication.QueueSend(sendMsg2);//下发数据给控制台
|
||||
break;
|
||||
}
|
||||
}
|
||||
return Json("");
|
||||
}
|
||||
public static class SMSinfo
|
||||
{
|
||||
public static Responsesd SMSNotify()
|
||||
{
|
||||
Responsesd shujiu = new Responsesd();
|
||||
try
|
||||
{
|
||||
// 实例化一个认证对象,入参需要传入腾讯云账户 SecretId 和 SecretKey,此处还需注意密钥对的保密
|
||||
// 代码泄露可能会导致 SecretId 和 SecretKey 泄露,并威胁账号下所有资源的安全性。以下代码示例仅供参考,建议采用更安全的方式来使用密钥,请参见:https://cloud.tencent.com/document/product/1278/85305
|
||||
// 密钥可前往官网控制台 https://console.cloud.tencent.com/cam/capi 进行获取
|
||||
Credential cred = new Credential
|
||||
{
|
||||
SecretId = "AKID99vRlvskQs52khPs78uQhkbKwaCkDeHo",
|
||||
SecretKey = " "
|
||||
};
|
||||
// 实例化一个client选项,可选的,没有特殊需求可以跳过
|
||||
ClientProfile clientProfile = new ClientProfile();
|
||||
// 实例化一个http选项,可选的,没有特殊需求可以跳过
|
||||
HttpProfile httpProfile = new HttpProfile();
|
||||
httpProfile.Endpoint = ("sms.tencentcloudapi.com");
|
||||
clientProfile.HttpProfile = httpProfile;
|
||||
|
||||
// 实例化要请求产品的client对象,clientProfile是可选的
|
||||
SmsClient client = new SmsClient(cred, "", clientProfile);
|
||||
// 实例化一个请求对象,每个接口都会对应一个request对象
|
||||
SendSmsRequest req = new SendSmsRequest();
|
||||
req.PhoneNumberSet = new string[] { "13509214696" };
|
||||
req.SmsSdkAppId = "1400871751";
|
||||
req.SignName = "东莞市英皓思科技有限公司";
|
||||
req.TemplateId = "2000581";
|
||||
// 返回的resp是一个SendSmsResponse的实例,与请求对象对应
|
||||
SendSmsResponse resp = client.SendSmsSync(req);
|
||||
var abs = AbstractModel.ToJsonString(resp);
|
||||
shujiu = JsonConvert.DeserializeObject<Responsesd>(abs);
|
||||
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine(e.ToString());
|
||||
}
|
||||
return shujiu;
|
||||
}
|
||||
}
|
||||
public class Responsesd
|
||||
{
|
||||
public SendStatusSetsdf SendStatusSet { get; set; }
|
||||
public string RequestId { get; set; }
|
||||
}
|
||||
public class SendStatusSetsdf
|
||||
{
|
||||
public string PhoneNumber { get; set; }
|
||||
public string SerialNo { get; set; }
|
||||
|
||||
public int Fee { get; set; }
|
||||
public string SessionContext { get; set; }
|
||||
public string Code { get; set; }
|
||||
public string Message { get; set; }
|
||||
public string IsoCode { get; set; }
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
1507
Face.Web/Areas/App/Controllers/WxTestController.cs
Normal file
1507
Face.Web/Areas/App/Controllers/WxTestController.cs
Normal file
File diff suppressed because it is too large
Load Diff
17
Face.Web/Areas/App/Models/CheckInfo.cs
Normal file
17
Face.Web/Areas/App/Models/CheckInfo.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace Face.Web.Areas.App.Models
|
||||
{
|
||||
public class CheckInfo
|
||||
{
|
||||
public string idtype { get; set; }
|
||||
public string idcard { get; set; }
|
||||
public string customer { get; set; }
|
||||
public string sex { get; set; }
|
||||
public string country { get; set; }
|
||||
public string checkindate { get; set; }
|
||||
}
|
||||
}
|
||||
89
Face.Web/Areas/App/Models/Condition.cs
Normal file
89
Face.Web/Areas/App/Models/Condition.cs
Normal file
@@ -0,0 +1,89 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace Face.Web.Areas.App.Models
|
||||
{
|
||||
public class Condition
|
||||
{
|
||||
/// <summary>
|
||||
/// 酒店ID
|
||||
/// </summary>
|
||||
public int HotelID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否绑定绑定房间
|
||||
/// </summary>
|
||||
public int Notbing { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 人脸机状态
|
||||
/// </summary>
|
||||
public int Status { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 人脸机名称
|
||||
/// </summary>
|
||||
public string FaceName { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 页数据最大
|
||||
/// </summary>
|
||||
public int dataMax { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 页数据最小
|
||||
/// </summary>
|
||||
public int dataMin { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 页
|
||||
/// </summary>
|
||||
public int Pages { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 房间状态
|
||||
/// </summary>
|
||||
public int RoomStatus { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 时间
|
||||
/// </summary>
|
||||
public DateTime RoomDate { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 时间
|
||||
/// </summary>
|
||||
public DateTime RoomMinDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 时间
|
||||
/// </summary>
|
||||
public DateTime RoomMaxDate { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 房间号
|
||||
/// </summary>
|
||||
public string RoomName { get; set; }
|
||||
|
||||
|
||||
public int filetype { get; set; } //1 升级文件 2 Logo 3背景图
|
||||
|
||||
|
||||
public int roomid { get; set; }
|
||||
|
||||
|
||||
// 默认不看进入S8状态的
|
||||
public int showS8 { get; set; }
|
||||
}
|
||||
}
|
||||
381
Face.Web/Areas/App/Models/Entity.cs
Normal file
381
Face.Web/Areas/App/Models/Entity.cs
Normal file
@@ -0,0 +1,381 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace WebSocketToolsConsole
|
||||
{
|
||||
public class Entity
|
||||
{
|
||||
public enum Factory
|
||||
{
|
||||
杭州锐颖 = 0,
|
||||
深圳实义德 = 1,
|
||||
深圳嘉禾兴 = 2
|
||||
}
|
||||
public class Rootinfo
|
||||
{
|
||||
public int pmsid { get; set; }
|
||||
|
||||
public msgx msgx { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 实义德人脸机传输数据类型
|
||||
/// </summary>
|
||||
public class msgx
|
||||
{
|
||||
/// <summary>
|
||||
/// 消息ID
|
||||
/// </summary>
|
||||
public string msgid { get; set; }
|
||||
/// <summary>
|
||||
/// 终端序列号
|
||||
/// </summary>
|
||||
public string sn { get; set; }
|
||||
/// <summary>
|
||||
/// 消息类型: setPerson/removePerson、open/reboot(开门重启)
|
||||
/// </summary>
|
||||
public string cmd { get; set; }
|
||||
/// <summary>
|
||||
/// 消息主体:Content-Type: application/x-www-formurlencoded
|
||||
/// </summary>
|
||||
public string msg { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 实义德人脸机返回结果
|
||||
/// </summary>
|
||||
public class msgx_response_msg
|
||||
{
|
||||
/// <summary>
|
||||
/// 状态码:0-成功,其他状态见状态码表
|
||||
/// </summary>
|
||||
public int status { get; set; }
|
||||
/// <summary>
|
||||
/// 状态描述:状态码的详细描述,比如:成功
|
||||
/// </summary>
|
||||
public string msg { get; set; }
|
||||
/// <summary>
|
||||
/// 返回数据:返回请求的数据,比如:请求人员列表,则data即为人员列表的json字符串
|
||||
/// </summary>
|
||||
public string data { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 实义德人脸机过闸人员结构
|
||||
/// </summary>
|
||||
public class msgx_person
|
||||
{
|
||||
/// <summary>
|
||||
/// 秘钥:终端设备的秘钥
|
||||
/// </summary>
|
||||
public string key { get; set; }
|
||||
/// <summary>
|
||||
/// 人员ID:ID,验证人员唯一性的字段,必填
|
||||
/// </summary>
|
||||
public string id { get; set; }
|
||||
/// <summary>
|
||||
/// 人员的名字
|
||||
/// </summary>
|
||||
public string name { get; set; }
|
||||
/// <summary>
|
||||
/// 卡号:作为维根号发送到闸机
|
||||
/// </summary>
|
||||
public string IC_NO { get; set; }
|
||||
/// <summary>
|
||||
/// 身份证号
|
||||
/// </summary>
|
||||
public string ID_NO { get; set; }
|
||||
/// <summary>
|
||||
/// 照片:JPG头像照片要求宽高640x480像素,转为Base64字符串传输,JPG 分辨率最大支持1080x1080
|
||||
/// </summary>
|
||||
public string photo { get; set; }
|
||||
/// <summary>
|
||||
/// 最大过闸次数:一共可以过闸的最大次数[0,10000);当此值设置等于10000时,代表可以无限次过闸,默认:10000
|
||||
/// </summary>
|
||||
public long passCount { get; set; }
|
||||
/// <summary>
|
||||
/// 起始时间:此时间之后拥有过闸权限,单位:秒(传-1表示无限制),默认无限制
|
||||
/// </summary>
|
||||
public double startTs { get; set; }
|
||||
/// <summary>
|
||||
/// 截止时间:此时间之后无过闸权限,单位:秒(传-1表示无限制),默认无限制
|
||||
/// </summary>
|
||||
public double endTs { get; set; }
|
||||
/// <summary>
|
||||
/// 访客:true-是访客,false-非访客,默认false
|
||||
/// </summary>
|
||||
public bool visitor { get; set; }
|
||||
/// <summary>
|
||||
/// 以周为单位设置每 天不同的时间段:有权限过闸多个时间段,可以周为单位设置每 天不同的时间段,也可以设置每天相同的时间 段,不支持进行缺省设置(时间段格式: “09:00-12:35”,不同时间段间用“;”分割)
|
||||
/// </summary>
|
||||
public string weekly { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 人员添加
|
||||
/// </summary>
|
||||
public class SavePersonRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// ID编号:回复id编号;成对出现,用来关联平台的发送和设备的回复
|
||||
/// </summary>
|
||||
public int id { get; set; }
|
||||
/// <summary>
|
||||
/// 方法:personnelData.savePersons
|
||||
/// </summary>
|
||||
public string method { get; set; }
|
||||
/// <summary>
|
||||
/// 人员信息列表
|
||||
/// </summary>
|
||||
public List<Params> @params { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 人员信息列表
|
||||
/// </summary>
|
||||
public class Params
|
||||
{
|
||||
/// <summary>
|
||||
/// 人员信息
|
||||
/// </summary>
|
||||
public Person Person { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 人员信息
|
||||
/// </summary>
|
||||
public class Person
|
||||
{
|
||||
/// <summary>
|
||||
/// 人员类型,1-内部员工,2-访客, 3-黑名单;必填
|
||||
/// </summary>
|
||||
public int Type { get; set; }
|
||||
/// <summary>
|
||||
/// 证件号,与CertificateType组合构成全局唯一人员标识,不允许更新,避免前端和平台端不一致。必填
|
||||
/// </summary>
|
||||
public string Code { get; set; }
|
||||
/// <summary>
|
||||
/// 默认权限组。必填
|
||||
/// </summary>
|
||||
public string GroupName { get; set; }
|
||||
/// <summary>
|
||||
/// 姓名必填
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
/// <summary>
|
||||
/// 性别必填
|
||||
/// </summary>
|
||||
public string Sex { get; set; }
|
||||
/// <summary>
|
||||
/// 出生日期必填
|
||||
/// </summary>
|
||||
public string Birthday { get; set; }
|
||||
/// <summary>
|
||||
/// 访客信息,人员类型是访客时有效(非访客不填)
|
||||
/// </summary>
|
||||
public GuestInfo GuestInfo { get; set; }
|
||||
/// <summary>
|
||||
/// 通过HTTP协议下载图片的地址;只支持JPG格式;
|
||||
/// </summary>
|
||||
public string URL { get; set; }
|
||||
/// <summary>
|
||||
/// Base64编码的图片数据,与URL字段互斥; base64数据不用带上格式信息如【data:image/jpg;base64,】
|
||||
/// </summary>
|
||||
public string Images { get; set; }
|
||||
/// <summary>
|
||||
/// 卡信息
|
||||
/// </summary>
|
||||
public Cards Cards { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 访客信息,人员类型是访客时有效(非访客不填)
|
||||
/// </summary>
|
||||
public class GuestInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// 单位
|
||||
/// </summary>
|
||||
public string Corp { get; set; }
|
||||
/// <summary>
|
||||
/// 电话
|
||||
/// </summary>
|
||||
public string Phone { get; set; }
|
||||
/// <summary>
|
||||
/// 车牌号码
|
||||
/// </summary>
|
||||
public string CarLicense { get; set; }
|
||||
/// <summary>
|
||||
/// 随行人数
|
||||
/// </summary>
|
||||
public int Partner { get; set; }
|
||||
/// <summary>
|
||||
/// 被访人
|
||||
/// </summary>
|
||||
public string Host { get; set; }
|
||||
/// <summary>
|
||||
/// 准入时间
|
||||
/// </summary>
|
||||
public AccessTime AccessTime { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 准入时间
|
||||
/// </summary>
|
||||
public class AccessTime
|
||||
{
|
||||
/// <summary>
|
||||
/// 开始时间
|
||||
/// </summary>
|
||||
public string from { get; set; }
|
||||
/// <summary>
|
||||
/// 结束时间
|
||||
/// </summary>
|
||||
public string to { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 卡信息
|
||||
/// </summary>
|
||||
public class Cards
|
||||
{
|
||||
/// <summary>
|
||||
/// 卡号
|
||||
/// </summary>
|
||||
public string ID { get; set; }
|
||||
/// <summary>
|
||||
/// 卡类型:1普通卡,2胁迫卡
|
||||
/// </summary>
|
||||
public int Type { get; set; }
|
||||
/// <summary>
|
||||
/// 有效期日期:开始日期yyyy-MM-dd,结束日期yyyy-MM-dd
|
||||
/// </summary>
|
||||
public string[] Validity { get; set; }
|
||||
/// <summary>
|
||||
/// 有效期时间(默认:00:00:00,23:59:59):开始时间HH:mm:ss,结束时间HH:mm:ss
|
||||
/// </summary>
|
||||
public string[] ValidityTime { get; set; }
|
||||
public Memo Memo { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// optional其他信息
|
||||
/// </summary>
|
||||
public class Memo
|
||||
{
|
||||
/// <summary>
|
||||
/// 门禁位置
|
||||
/// </summary>
|
||||
public string Entrance { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 人员添加设备回应
|
||||
/// </summary>
|
||||
public class Response
|
||||
{
|
||||
/// <summary>
|
||||
/// ID编号:回复id编号;成对出现,用来关联平台的发送和设备的回复
|
||||
/// </summary>
|
||||
public int id { get; set; }
|
||||
/// <summary>
|
||||
/// 方法:personnelData.savePersons,removePersons
|
||||
/// </summary>
|
||||
public string method { get; set; }
|
||||
/// <summary>
|
||||
/// 返回结果
|
||||
/// </summary>
|
||||
public bool result { get; set; }
|
||||
/// <summary>
|
||||
/// 人员信息列表
|
||||
/// </summary>
|
||||
public List<ParamsResponse> @params { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 响应人员信息
|
||||
/// </summary>
|
||||
public class ParamsResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 人员类型,1-内部员工,2-访客, 3-黑名单
|
||||
/// </summary>
|
||||
//public string CertificateType { get; set; }
|
||||
/// <summary>
|
||||
/// 证件号,与CertificateType组合构成全局唯一人员标识,不允许更新,避免前端和平台端不一致
|
||||
/// </summary>
|
||||
public string Code { get; set; }
|
||||
/// <summary>
|
||||
/// 当前人员是否添加成功,失败有错误码和错误信息
|
||||
/// </summary>
|
||||
public bool Result { get; set; }
|
||||
/// <summary>
|
||||
/// 错误码
|
||||
/// </summary>
|
||||
public int ErrorCode { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
//public string[] ErrorCodePic { get; set; }
|
||||
/// <summary>
|
||||
/// 错误信息
|
||||
/// </summary>
|
||||
//public string ErrorMessage { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 人员删除
|
||||
/// </summary>
|
||||
public class RemovePersonRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// ID编号:回复id编号;成对出现,用来关联平台的发送和设备的回复
|
||||
/// </summary>
|
||||
public int id { get; set; }
|
||||
/// <summary>
|
||||
/// 方法:personnelData.removePersons
|
||||
/// </summary>
|
||||
public string method { get; set; }
|
||||
/// <summary>
|
||||
/// 人员信息列表
|
||||
/// </summary>
|
||||
public List<RemoveParams> @params { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 人员信息列表
|
||||
/// </summary>
|
||||
public class RemoveParams
|
||||
{
|
||||
public string Code { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 人员删除设备回应
|
||||
/// </summary>
|
||||
//public class RemovePersonResponse
|
||||
//{
|
||||
// /// <summary>
|
||||
// /// ID编号:回复id编号;成对出现,用来关联平台的发送和设备的回复
|
||||
// /// </summary>
|
||||
// public int id { get; set; }
|
||||
// /// <summary>
|
||||
// /// 方法:personnelData.removePersons
|
||||
// /// </summary>
|
||||
// public string method { get; set; }
|
||||
// /// <summary>
|
||||
// /// 返回结果
|
||||
// /// </summary>
|
||||
// public bool result { get; set; }
|
||||
// /// <summary>
|
||||
// /// 人员信息列表
|
||||
// /// </summary>
|
||||
// public List<Response> @params { get; set; }
|
||||
//}
|
||||
/// <summary>
|
||||
/// 响应人员信息
|
||||
/// </summary>
|
||||
//public class RemoveParamsResponse
|
||||
//{
|
||||
// /// <summary>
|
||||
// /// 证件号,与CertificateType组合构成全局唯一人员标识,不允许更新,避免前端和平台端不一致
|
||||
// /// </summary>
|
||||
// public string Code { get; set; }
|
||||
// /// <summary>
|
||||
// /// 当前人员是否添加成功,失败有错误码和错误信息
|
||||
// /// </summary>
|
||||
// public bool Result { get; set; }
|
||||
// /// <summary>
|
||||
// /// 错误码
|
||||
// /// </summary>
|
||||
// public int ErrorCode { get; set; }
|
||||
//}
|
||||
}
|
||||
}
|
||||
123
Face.Web/Areas/App/Models/Errormessageinfo.cs
Normal file
123
Face.Web/Areas/App/Models/Errormessageinfo.cs
Normal file
@@ -0,0 +1,123 @@
|
||||
using Face.Domain.Entities;
|
||||
using Face.Web.Areas.App.Controllers;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Timers;
|
||||
using System.Web;
|
||||
|
||||
namespace Face.Web.Areas.App.Models
|
||||
{
|
||||
public class errormessagehandling
|
||||
{
|
||||
public int id { get; set; }
|
||||
public string ErrorNmae { get; set; }
|
||||
public string pmsids { get; set; }
|
||||
public string handlinginfo { get; set; }
|
||||
public DateTime creationdata { get; set; }
|
||||
public int isVerify { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class pmsinfo
|
||||
{
|
||||
public int pmsid { get; set; }
|
||||
public DateTime Creationtime { get; set; }
|
||||
public string data { get; set; }
|
||||
public int infotype { get; set; }
|
||||
public int hotelid { get; set; }
|
||||
public int room { get; set; }
|
||||
|
||||
}
|
||||
public class Errormessageinfo
|
||||
{
|
||||
private static int smsconts = 0;
|
||||
private static string arrpmsids = "";
|
||||
public void Errormessage(int pmsid,string message)
|
||||
{
|
||||
//检查10分钟内有没有s3s2错误的
|
||||
//DateTime date = DateTime.Now.AddMinutes(-10);
|
||||
//var pmsinfo = SqlSugarBase.Db.Queryable<pmsinfo>().Where(x => x.Creationtime >= date).ToList();
|
||||
//List<int> arrint = new List<int>();
|
||||
//for (int i = 0; i < pmsinfo.Count(); i++)
|
||||
//{
|
||||
// arrint.Add(pmsinfo[i].pmsid);
|
||||
//}
|
||||
//for (int i = 0; i < arrint.Count(); i++)
|
||||
//{
|
||||
// List<pmsLog> logspmssfs = SqlSugarBase.Db.Queryable<pmsLog>().Where(x => x.pmsid == arrint[i]).ToList();
|
||||
// if (logspmssfs.Count() <= 3)
|
||||
// {
|
||||
// smsconts += 1;
|
||||
// arrpmsids += arrint[i] + ",";
|
||||
// }
|
||||
//}
|
||||
TimerElapsed();
|
||||
//if (message== "已校验数据,准备向控制台发送")
|
||||
//{
|
||||
List<pmsLog> logspms = SqlSugarBase.Db.Queryable<pmsLog>().Where(x => x.pmsid == pmsid).ToList();
|
||||
if (logspms.Count() <= 6)
|
||||
{
|
||||
smsconts += 1;
|
||||
arrpmsids += pmsid + ",";
|
||||
}
|
||||
|
||||
string[] strarr=arrpmsids.Split(',');
|
||||
|
||||
if (strarr.Length>6)
|
||||
{
|
||||
arrpmsids = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if (smsconts == 5)
|
||||
{
|
||||
errormessagehandling log = SqlSugarBase.Db.Queryable<errormessagehandling>().First(x=> arrpmsids.Contains(x.pmsids));
|
||||
if (log==null)
|
||||
{
|
||||
Responsesd responsesd = SMSinfo.SMSNotify();
|
||||
errormessagehandling errormessage = new errormessagehandling();
|
||||
errormessage.ErrorNmae = "S2,S3,S22或S21错误,没有发送到控制台";
|
||||
errormessage.handlinginfo = "发送短信,重启控制台程序";
|
||||
errormessage.pmsids = arrpmsids;
|
||||
errormessage.creationdata = DateTime.Now;
|
||||
errormessage.isVerify = 0;
|
||||
SqlSugarBase.Db.Insertable(errormessage).ExecuteCommand();
|
||||
if (responsesd.SendStatusSet[0].Code == "ok" || responsesd.SendStatusSet[0].Code == "Ok")
|
||||
{
|
||||
smsconts = 0;
|
||||
arrpmsids = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//}
|
||||
}
|
||||
public static void TimerElapsed()
|
||||
{
|
||||
Timer timer = new Timer();
|
||||
timer.Interval = 120000; // 1000毫秒 = 1秒
|
||||
timer.AutoReset = false;
|
||||
//启动定时器
|
||||
timer.Start();
|
||||
//// 停止定时器
|
||||
//timer.Stop();
|
||||
}
|
||||
|
||||
public static void TimerElapseds()
|
||||
{
|
||||
Timer timer = new Timer();
|
||||
timer.Interval = 12000; // 1000毫秒 = 1秒
|
||||
timer.AutoReset = false;
|
||||
//启动定时器
|
||||
timer.Start();
|
||||
//// 停止定时器
|
||||
//timer.Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
20
Face.Web/Areas/App/Models/FileDetails.cs
Normal file
20
Face.Web/Areas/App/Models/FileDetails.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace Face.Web.Areas.App.Models
|
||||
{
|
||||
public class FileDetails
|
||||
{
|
||||
public string Filename { get; set; }
|
||||
public string FileSize { get; set; }
|
||||
public DateTime UploadDate { get; set; }
|
||||
public FileDetails(string filename, string fileSize, DateTime uploadDate)
|
||||
{
|
||||
Filename = filename;
|
||||
FileSize = fileSize;
|
||||
UploadDate = uploadDate;
|
||||
}
|
||||
}
|
||||
}
|
||||
56
Face.Web/Areas/App/Models/GetRoomInterface.cs
Normal file
56
Face.Web/Areas/App/Models/GetRoomInterface.cs
Normal file
@@ -0,0 +1,56 @@
|
||||
using Face.Services.Manager;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
|
||||
namespace Face.Web.Areas.App.Models
|
||||
{
|
||||
public static class GetRoomInterface
|
||||
{
|
||||
public static Roominfo.Root Roomport(test te)//房间api
|
||||
{
|
||||
try
|
||||
{
|
||||
string url = "https://www.boonlive-rcu.com/api/GetHostList";
|
||||
string date = $"jsonData={JsonConvert.SerializeObject(te)}";
|
||||
WebRequest request = WebRequest.Create(url);
|
||||
request.Method = "Post";
|
||||
request.ContentType = "application/x-www-form-urlencoded";
|
||||
StreamWriter sw = new StreamWriter(request.GetRequestStream());
|
||||
sw.Write(date);
|
||||
sw.Flush();
|
||||
|
||||
WebResponse response = request.GetResponse();
|
||||
Stream s = response.GetResponseStream();
|
||||
StreamReader sr = new StreamReader(s, Encoding.GetEncoding("UTF-8"));
|
||||
string Show = sr.ReadToEnd();
|
||||
Roominfo.Root info = JsonConvert.DeserializeObject<Roominfo.Root>(Show);//josn转换实体类
|
||||
sw.Dispose();
|
||||
sw.Close();
|
||||
sr.Dispose();
|
||||
sr.Close();
|
||||
s.Dispose();
|
||||
s.Close();
|
||||
return info;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelp.WriteExceptionLog(ex);
|
||||
Roominfo.Root info = new Roominfo.Root() { IsSuccess = false};//josn转换实体类
|
||||
return info;
|
||||
}
|
||||
}
|
||||
public class test
|
||||
{
|
||||
public string code { get; set; }
|
||||
public string creatDate { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
51
Face.Web/Areas/App/Models/InfoBody.cs
Normal file
51
Face.Web/Areas/App/Models/InfoBody.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace Face.Web.Areas.App.Models
|
||||
{
|
||||
public class InfoBody
|
||||
{
|
||||
/// <summary>
|
||||
/// //ID,验证人员唯一性的字段
|
||||
/// </summary>
|
||||
public string id { get; set; }
|
||||
/// <summary>
|
||||
/// //人员的名字
|
||||
/// </summary>
|
||||
public string name { get; set; }
|
||||
/// <summary>
|
||||
/// //作为维根号发送到闸机
|
||||
/// </summary>
|
||||
public string ic_no { get; set; }
|
||||
/// <summary>
|
||||
/// //员工身份证号
|
||||
/// </summary>
|
||||
public string id_no { get; set; }
|
||||
/// <summary>
|
||||
/// //JPG头像照片要求宽高640x480像素,转为Base64字符串传输,最大支持1080x1080
|
||||
/// </summary>
|
||||
public string photo { get; set; }
|
||||
/// <summary>
|
||||
/// 起始时间
|
||||
/// </summary>
|
||||
public string startTs { get; set; }
|
||||
/// <summary>
|
||||
/// 截止时间
|
||||
/// </summary>
|
||||
public string endTs { get; set; }
|
||||
/// <summary>
|
||||
/// //在有效时间戳内,最大过闸次数。当此值设置等于10000时,代表可以无限次过闸,默认:10000
|
||||
/// </summary>
|
||||
public string passCount { get; set; }
|
||||
/// <summary>
|
||||
/// //true-是访客,false-非访客,默认false;兼容以前协议
|
||||
/// </summary>
|
||||
public string visitor { get; set; }
|
||||
/// <summary>
|
||||
/// 以周为单位设置每 天不同的时间段
|
||||
/// </summary>
|
||||
public string weekly { get; set; }
|
||||
}
|
||||
}
|
||||
50
Face.Web/Areas/App/Models/InfoRoolall.cs
Normal file
50
Face.Web/Areas/App/Models/InfoRoolall.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace Face.Web.Areas.App.Models
|
||||
{
|
||||
public class InfoRoomall
|
||||
{
|
||||
/// <summary>
|
||||
/// //房间ID,内部数据库主键
|
||||
/// </summary>
|
||||
public string InnerRoomId { get; set; }
|
||||
/// <summary>
|
||||
/// //酒店的ID,内部数据库主键
|
||||
/// </summary>
|
||||
public string HotelId { get; set; }
|
||||
/// <summary>
|
||||
/// //酒店名字
|
||||
/// </summary>
|
||||
public string HotelName { get; set; }
|
||||
/// <summary>
|
||||
/// //酒店编码
|
||||
/// </summary>
|
||||
public string ExternalHotelCode { get; set; }
|
||||
/// <summary>
|
||||
/// //房间号码
|
||||
/// </summary>
|
||||
public string RoomNumber { get; set; }
|
||||
/// <summary>
|
||||
/// //开房状态
|
||||
/// </summary>
|
||||
public int RoomCheckInStatus { get; set; }
|
||||
|
||||
|
||||
public int Facelid { get; set; }
|
||||
public string SerialNo { get; set; }
|
||||
public Nullable<System.DateTime> CreatedDate { get; set; }
|
||||
public string HotelCode { get; set; }
|
||||
public Nullable<int> RoomId { get; set; }
|
||||
public string Factory { get; set; }
|
||||
public bool Status { get; set; }
|
||||
public Nullable<System.DateTime> bindingDate { get; set; }
|
||||
public bool bindingStatus { get; set; }
|
||||
public string faceIp { get; set; }
|
||||
public string faceAddress { get; set; }
|
||||
public Nullable<int> maintainStatus { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
53
Face.Web/Areas/App/Models/Interfacefield.cs
Normal file
53
Face.Web/Areas/App/Models/Interfacefield.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace Face.Web.Areas.App.Models
|
||||
{
|
||||
public class Interfacefield
|
||||
{
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
public string LodgerNmae { get; set; }
|
||||
/// <summary>
|
||||
/// 身份证
|
||||
/// </summary>
|
||||
public string IDNumber { get; set; }
|
||||
/// <summary>
|
||||
/// 性别 0女 1男
|
||||
/// </summary>
|
||||
public int Sex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 图片
|
||||
/// </summary>
|
||||
public string picture { get; set; }
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string remark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 酒店code
|
||||
/// </summary>
|
||||
public string HotelCode { get; set; }
|
||||
/// <summary>
|
||||
/// 房间号
|
||||
/// </summary>
|
||||
public string roomid { get; set; }
|
||||
/// <summary>
|
||||
/// 电话号码
|
||||
/// </summary>
|
||||
public string phonenumber { get; set; }
|
||||
/// <summary>
|
||||
/// 开房时间
|
||||
/// </summary>
|
||||
public DateTime CheckTime { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
13
Face.Web/Areas/App/Models/ProgramViewModel.cs
Normal file
13
Face.Web/Areas/App/Models/ProgramViewModel.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace Face.Web.Areas.App.Models
|
||||
{
|
||||
public class ProgramViewModel
|
||||
{
|
||||
public string ProgramPath { get; set; }
|
||||
public string ProgramName { get; set; }
|
||||
}
|
||||
}
|
||||
28
Face.Web/Areas/App/Models/RoomStatus.cs
Normal file
28
Face.Web/Areas/App/Models/RoomStatus.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace Face.Web.Areas.App.Models
|
||||
{
|
||||
enum Statiss
|
||||
{
|
||||
/// <summary>
|
||||
/// 出租
|
||||
/// </summary>
|
||||
lease,
|
||||
/// <summary>
|
||||
/// 待租
|
||||
/// </summary>
|
||||
forRent,
|
||||
/// <summary>
|
||||
/// 退房
|
||||
/// </summary>
|
||||
checkout,
|
||||
/// <summary>
|
||||
/// 空房
|
||||
/// </summary>
|
||||
vacantroom
|
||||
}
|
||||
|
||||
}
|
||||
142
Face.Web/Areas/App/Models/Roominfo.cs
Normal file
142
Face.Web/Areas/App/Models/Roominfo.cs
Normal file
@@ -0,0 +1,142 @@
|
||||
using Face.Domain.Entities;
|
||||
using Face.Services.Manager;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using WebServer;
|
||||
using static Face.Services.Cache.CacheHelp;
|
||||
using static Face.Web.Areas.App.Models.Roominfo;
|
||||
|
||||
namespace Face.Web.Areas.App.Models
|
||||
{
|
||||
public class Roominfo
|
||||
{
|
||||
public class Result
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int ID { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string HostNumber { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string RoomNumber { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime RegisterDate { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int RoomStatusID { get; set; }
|
||||
/// <summary>
|
||||
/// 空房
|
||||
/// </summary>
|
||||
public string RoomStatusName { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int RoomTypeID { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string RoomTypeName { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string MAC { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string IP { get; set; } = null;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Remark { get; set; }
|
||||
|
||||
public string HotelID { get; set; }
|
||||
}
|
||||
|
||||
public class Root
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool IsSuccess { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public List<Result> Result { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class FJHelp
|
||||
{
|
||||
public static bool outinfos(string id)//退房信息
|
||||
{
|
||||
List<Result> relist = null;
|
||||
CheckinTest sun;
|
||||
try
|
||||
{
|
||||
using (var db = SqlSugarBase.GesmartDb())
|
||||
{
|
||||
int dtid = int.Parse(id);
|
||||
sun = db.Queryable<CheckinTest>().First(x => x.id == dtid);
|
||||
}
|
||||
|
||||
var hotelcode = SqlSugarBase.authoriydb.Queryable<Hotels>().First(x => x.Id == sun.hotelid);
|
||||
var idi = int.Parse(sun.Roomid.ToString());
|
||||
|
||||
GetRoomInterface.test test = new GetRoomInterface.test
|
||||
{
|
||||
code = hotelcode.Code.ToString(),
|
||||
creatDate = hotelcode.CreateTime.ToString("yyyy-MM-dd")
|
||||
};
|
||||
Roominfo.Root asd = GetRoomInterface.Roomport(test);
|
||||
if (asd.IsSuccess == true)
|
||||
{
|
||||
relist = asd.Result;
|
||||
}
|
||||
var roomname = relist.FirstOrDefault(x => x.ID == idi).RoomNumber;
|
||||
bool fp = outinfo(new OutClass { HotelCode = hotelcode.Code.ToString(), roomid = roomname, checkOutTime = DateTime.Now });
|
||||
if (fp)
|
||||
{
|
||||
SqlSugarBase.Db.Updateable<CheckinTest>().SetColumns(it => it.testState == 2).Where(x => x.id == sun.id).ExecuteCommand();
|
||||
SqlSugarBase.Db.Updateable<CheckinTest>().SetColumns(it => it.CheckoutTime == DateTime.Now).Where(x => x.id == sun.id).ExecuteCommand();
|
||||
}
|
||||
else
|
||||
{
|
||||
SqlSugarBase.Db.Updateable<CheckinTest>().SetColumns(it => it.testState ==3).Where(x => x.id == sun.id).ExecuteCommand();
|
||||
//.Entry<CheckinTest>(sun).State = EntityState.Modified;
|
||||
}
|
||||
return fp ;
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelp.WriteExceptionLog(ex);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
public static bool outinfo(OutClass po)//退房测试
|
||||
{
|
||||
try
|
||||
{
|
||||
var whether = WebHelp.CheckOut(new CheckOutInfo { code = po.HotelCode, roomNumber = po.roomid });
|
||||
return whether;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelp.WriteExceptionLog(ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
183
Face.Web/Areas/App/Models/UdpCommunication.cs
Normal file
183
Face.Web/Areas/App/Models/UdpCommunication.cs
Normal file
@@ -0,0 +1,183 @@
|
||||
using Face.Domain.Entities;
|
||||
using Face.Services.Extensions;
|
||||
using Face.Services.Manager;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.Entity;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Web;
|
||||
using WebSocketToolsConsole;
|
||||
using System.Messaging;
|
||||
|
||||
namespace Face.Web.Areas.App.Models
|
||||
{
|
||||
public static class UdpCommunication
|
||||
{
|
||||
static object lockobject = new object();
|
||||
public static UdpClient client = null;
|
||||
public static IPEndPoint remotePoint = null;
|
||||
public static UdpClient client1 = null;
|
||||
public static IPEndPoint remotePoint1 = null;
|
||||
|
||||
|
||||
|
||||
//Queue for send message to console web socket server.
|
||||
public static string queueName = @".\private$\facesvrcmd";
|
||||
public static MessageQueue mq = null;
|
||||
|
||||
/// <summary>
|
||||
/// UDP传输发送数据到控制台
|
||||
/// </summary>
|
||||
/// <param name="str"></param>
|
||||
public static void UdpState(string str)
|
||||
{
|
||||
//Logs.WriteLog(str);
|
||||
try
|
||||
{
|
||||
byte[] sendData = null;//要发送的字节数组
|
||||
//IPAddress remoteIP = IPAddress.Parse("172.30.53.136");
|
||||
IPAddress remoteIP = IPAddress.Parse("127.0.0.1");
|
||||
int remotePort = 11001;
|
||||
remotePoint = new IPEndPoint(remoteIP, remotePort);//实例化一个远程端点
|
||||
sendData = Encoding.Default.GetBytes(str);
|
||||
client = new UdpClient();
|
||||
client.Send(sendData, sendData.Length, remotePoint);//将数据发送到远程端点
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new CustomException(ex.Message);
|
||||
}
|
||||
|
||||
//client.Close();//关闭连接
|
||||
}
|
||||
/// <summary>
|
||||
/// 接收控制台返回数据
|
||||
/// </summary>
|
||||
public static void UdpStateinfo()
|
||||
{
|
||||
Entity.msgx msgx = new Entity.msgx();
|
||||
while (true)
|
||||
{
|
||||
try
|
||||
{
|
||||
string receiveString = null;
|
||||
byte[] receiveData = null;
|
||||
//IPEndPoint remotePoint = new IPEndPoint(IPAddress.Any, 0);
|
||||
|
||||
//client.Client.ReceiveTimeout = 500;
|
||||
//client.Client.Blocking = false; //设置为非阻塞模式
|
||||
receiveData = client.Receive(ref remotePoint);//接收数据
|
||||
receiveString = Encoding.Default.GetString(receiveData);
|
||||
Entity.msgx Elist = JsonConvert.DeserializeObject<Entity.msgx>(receiveString);//josn转换实体类
|
||||
|
||||
using (var dr=SqlSugarBase.GesmartDb())
|
||||
{
|
||||
transferFace sx = dr.Queryable<transferFace>().First(x=>x.infoid==Elist.msgid);
|
||||
sx.faultState = int.Parse(Elist.cmd);
|
||||
FaceIssue issue = dr.Queryable<FaceIssue>().First(x => x.messageid == Elist.msgid);
|
||||
if (Elist.cmd == "2")
|
||||
{
|
||||
issue.issuestate = 2;
|
||||
var assed = dr.Queryable<DeviceManage>().First(x=>x.SerialNo==sx.faceSN);
|
||||
SqlSugarBase.Db.Updateable<DeviceManage>().SetColumns(it => it.maintainStatus == 1).Where(it => it.SerialNo == sx.faceSN).ExecuteCommand();
|
||||
SqlSugarBase.Db.Updateable<FaceIssue>().SetColumns(it => it.issuestate ==2).Where(x => x.messageid == Elist.msgid).ExecuteCommand();
|
||||
}
|
||||
SqlSugarBase.Db.Updateable<transferFace>().SetColumns(it => it.faultState == int.Parse(Elist.cmd)).Where(x => x.infoid == Elist.msgid).ExecuteCommand();
|
||||
}
|
||||
//client.Close();//关闭连接
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
//Logs.WriteTimingPlanLog(ex.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
public static void UdpState2(string str)
|
||||
{
|
||||
try
|
||||
{
|
||||
byte[] sendData = null;//要发送的字节数组
|
||||
IPAddress remoteIP = IPAddress.Parse("172.30.53.136");
|
||||
int remotePort = 11002;
|
||||
remotePoint1 = new IPEndPoint(remoteIP, remotePort);//实例化一个远程端点
|
||||
sendData = Encoding.Default.GetBytes(str);
|
||||
client1 = new UdpClient();
|
||||
client1.Send(sendData, sendData.Length, remotePoint1);//将数据发送到远程端点
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
throw new CustomException(ex.Message);
|
||||
throw;
|
||||
}
|
||||
|
||||
//client.Close();//关闭连接
|
||||
}
|
||||
//public static string UdpStateinfo2()
|
||||
//{
|
||||
// Entity.msgx msgx = new Entity.msgx();
|
||||
// while (true)
|
||||
// {
|
||||
// try
|
||||
// {
|
||||
// string receiveString = null;
|
||||
// byte[] receiveData = null;
|
||||
// //IPEndPoint remotePoint = new IPEndPoint(IPAddress.Any, 0);
|
||||
|
||||
// //client.Client.ReceiveTimeout = 500;
|
||||
// //client.Client.Blocking = false; //设置为非阻塞模式
|
||||
// receiveData = client1.Receive(ref remotePoint1);//接收数据
|
||||
// receiveString = Encoding.Default.GetString(receiveData);
|
||||
// //Entity.msgx_person Elist = JsonConvert.DeserializeObject<Entity.msgx_person>(receiveString);//josn转换实体类
|
||||
// //Logs.WriteLog(receiveString);
|
||||
// return receiveString;
|
||||
// //client.Close();//关闭连接
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// //Logs.WriteTimingPlanLog(ex.ToString());
|
||||
// //throw new CustomException(ex.Message);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
public static string QueueSend(string sendMsg)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (mq == null)
|
||||
{
|
||||
if (MessageQueue.Exists(queueName))
|
||||
{
|
||||
mq = new MessageQueue(queueName);
|
||||
}
|
||||
else
|
||||
{
|
||||
mq = MessageQueue.Create(queueName);
|
||||
}
|
||||
mq.SetPermissions("Administrator", MessageQueueAccessRights.FullControl);
|
||||
mq.SetPermissions("ANONYMOUS LOGON", MessageQueueAccessRights.FullControl);
|
||||
mq.SetPermissions("Everyone", MessageQueueAccessRights.FullControl);
|
||||
}
|
||||
|
||||
Message msgTx = new Message();
|
||||
msgTx.Body = sendMsg;
|
||||
msgTx.Formatter = new XmlMessageFormatter(new Type[] { typeof(string) });
|
||||
mq.Send(msgTx);
|
||||
return "Succeed push msg to MQ !";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
mq = null;
|
||||
|
||||
Logs.WriteErrorLog(ex);
|
||||
return ex.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
26
Face.Web/Areas/App/Models/UiImg.cs
Normal file
26
Face.Web/Areas/App/Models/UiImg.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace Face.Web.Areas.App.Models
|
||||
{
|
||||
public class UiImg
|
||||
{
|
||||
public string name;
|
||||
public string image;
|
||||
public int x;
|
||||
public int y;
|
||||
public int w;
|
||||
public int h;
|
||||
}
|
||||
|
||||
|
||||
public class Uiinfo
|
||||
{
|
||||
public string Roomname;
|
||||
public string imageBj;
|
||||
public string imagelogo;
|
||||
|
||||
}
|
||||
}
|
||||
121
Face.Web/Areas/App/Models/jurisdiction.cs
Normal file
121
Face.Web/Areas/App/Models/jurisdiction.cs
Normal file
@@ -0,0 +1,121 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace Face.Web.Areas.App.Models
|
||||
{
|
||||
public class Userinfo
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string HeadImg { get; set; }
|
||||
public string Uid { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class AuthItem
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int AuthotypeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int AuthorityId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 分配酒店
|
||||
/// </summary>
|
||||
public string AuthorityName { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public class HotelsItem
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public List<AuthItem> Auth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 默认酒店
|
||||
/// </summary>
|
||||
public string HotelName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int Code { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int HotelId { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public class HotelDataItem
|
||||
{
|
||||
/// <summary>
|
||||
/// 宝来威
|
||||
/// </summary>
|
||||
public string HotelGroupsName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int HotelGroupsId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public List<HotelsItem> Hotels { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public class Data
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public Userinfo Userinfo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public List<HotelDataItem> HotelData { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public class Root
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public Data Data { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 请求成功~
|
||||
/// </summary>
|
||||
public string Message { get; set; }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
35
Face.Web/Areas/App/Models/peopleInfo.cs
Normal file
35
Face.Web/Areas/App/Models/peopleInfo.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace Face.Web.Areas.App.Models
|
||||
{
|
||||
public static class peopleInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// 证件类型
|
||||
/// </summary>
|
||||
public static string idtype { get; set; }
|
||||
/// <summary>
|
||||
/// 身份证号码
|
||||
/// </summary>
|
||||
public static string idcard { get; set; }
|
||||
/// <summary>
|
||||
/// 顾客名字
|
||||
/// </summary>
|
||||
public static string customer { get; set; }
|
||||
/// <summary>
|
||||
/// 性别
|
||||
/// </summary>
|
||||
public static string sex { get; set; }
|
||||
/// <summary>
|
||||
/// 国家
|
||||
/// </summary>
|
||||
public static string country { get; set; }
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public static string checkindate { get; set; }
|
||||
}
|
||||
}
|
||||
17
Face.Web/Areas/App/Models/permissionStatic.cs
Normal file
17
Face.Web/Areas/App/Models/permissionStatic.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using Face.Domain.Application;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using static Face.Web.Areas.App.Models.Roominfo;
|
||||
|
||||
namespace Face.Web.Areas.App.Models
|
||||
{
|
||||
public static class permissionStatic
|
||||
{
|
||||
public static List<int> lit = new List<int>();
|
||||
public static string Portraits { get; set; }
|
||||
|
||||
public static List<TBL_ROOM_BASIC_INFO> ZongRoominfo = new List<TBL_ROOM_BASIC_INFO>();
|
||||
}
|
||||
}
|
||||
73
Face.Web/Areas/App/Models/portinfo.cs
Normal file
73
Face.Web/Areas/App/Models/portinfo.cs
Normal file
@@ -0,0 +1,73 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace Face.Web.Areas.App.Models
|
||||
{
|
||||
public class portinfo
|
||||
{
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
public string LodgerNmae { get; set; }
|
||||
/// <summary>
|
||||
/// 身份证
|
||||
/// </summary>
|
||||
public string IDNumber { get; set; }
|
||||
/// <summary>
|
||||
/// 性别 0女 1男
|
||||
/// </summary>
|
||||
public Nullable<int> Sex { get; set; }
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public Nullable<System.DateTime> CheckInDate { get; set; }
|
||||
/// <summary>
|
||||
/// 消息来源
|
||||
/// </summary>
|
||||
public int Sourcedian { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 图片
|
||||
/// </summary>
|
||||
public string picture { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string remark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 图片时间
|
||||
/// </summary>
|
||||
public Nullable<System.DateTime> pictureDate { get; set; }
|
||||
/// <summary>
|
||||
/// 酒店code
|
||||
/// </summary>
|
||||
public string HotelCode { get; set; }
|
||||
/// <summary>
|
||||
/// 房间号
|
||||
/// </summary>
|
||||
public string roomid { get; set; }
|
||||
/// <summary>
|
||||
/// 电话号码
|
||||
/// </summary>
|
||||
public string phonenumber { get; set; }
|
||||
/// <summary>
|
||||
/// 开房时间
|
||||
/// </summary>
|
||||
public DateTime CheckTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 退房时间
|
||||
/// </summary>
|
||||
public DateTime checkOutTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 密钥
|
||||
/// </summary>
|
||||
public string key { get; set; }
|
||||
public int pmsinfoid { get; set; }
|
||||
}
|
||||
}
|
||||
226
Face.Web/Areas/App/Models/practical.cs
Normal file
226
Face.Web/Areas/App/Models/practical.cs
Normal file
@@ -0,0 +1,226 @@
|
||||
using Face.Domain.ViewModels;
|
||||
using Face.Services.Manager;
|
||||
using Face.Web.Areas.App.Controllers;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Security;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using ImageMagick;
|
||||
using System.Web.Hosting;
|
||||
using static WebSocketToolsConsole.Entity;
|
||||
|
||||
namespace Face.Web.Areas.App.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// 图片处理类
|
||||
/// </summary>
|
||||
public class practical
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 网络图片保存到项目目录
|
||||
/// </summary>
|
||||
/// <param name="url"></param>
|
||||
/// <param name="dtnow"></param>
|
||||
public string Down(string url, string dtnow)
|
||||
{
|
||||
try
|
||||
{
|
||||
WebRequest wreq = WebRequest.Create(url);
|
||||
HttpWebResponse wresp = (HttpWebResponse)wreq.GetResponse();
|
||||
Stream s = wresp.GetResponseStream();
|
||||
System.Drawing.Image img;
|
||||
img = System.Drawing.Image.FromStream(s);
|
||||
string TimePath = HostingEnvironment.MapPath("~/Upload/Image/");//保存路径
|
||||
string TimePathMake = HostingEnvironment.MapPath("~/Upload/Img/");//小图
|
||||
img.Save(TimePath + dtnow + "_1" + ".jpg", ImageFormat.Jpeg);
|
||||
Task<string> res = MakeThumbnail(img, TimePathMake, 500, 500, "", dtnow);
|
||||
//System.IO.File.Delete(TimePath + "1" + name + ".jpg");
|
||||
res.Start();
|
||||
//MemoryStream ms = new MemoryStream();
|
||||
img.Dispose();
|
||||
string ftpURL = "auth.blv-oa.com:50/uts_Manager/oyl_FTP/Image";
|
||||
//string ftpURLTwo = "auth.blv-oa.com:50/uts_Manager/oyl_FTP/Img";
|
||||
//FtpUploadShow(TimePathMake + dtnow + ".jpg", ftpURLTwo);
|
||||
return FtpUploadShow(res.Result, ftpURL);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelp.WriteExceptionLog(ex, "图片");
|
||||
return "图片路径错误";
|
||||
}
|
||||
}
|
||||
public Task<string> MakeThumbnail(Image originalImage, string thumbnailPath, int width, int height, string mode, string name)
|
||||
{
|
||||
ReturnResult result = new ReturnResult();
|
||||
|
||||
|
||||
int towidth = width;
|
||||
int toheight = height;
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
int ow = originalImage.Width;
|
||||
int oh = originalImage.Height;
|
||||
if (mode == "")
|
||||
{
|
||||
if (ow > oh)
|
||||
{
|
||||
mode = "W";
|
||||
}
|
||||
else
|
||||
{
|
||||
mode = "H";
|
||||
}
|
||||
}
|
||||
switch (mode)
|
||||
{
|
||||
case "HW"://指定高宽缩放(可能变形)
|
||||
break;
|
||||
case "W"://指定宽,高按比例
|
||||
toheight = originalImage.Height * width / originalImage.Width;
|
||||
break;
|
||||
case "H"://指定高,宽按比例
|
||||
towidth = originalImage.Width * height / originalImage.Height;
|
||||
break;
|
||||
case "Cut"://指定高宽裁减(不变形)
|
||||
if ((double)originalImage.Width / (double)originalImage.Height > (double)towidth / (double)toheight)
|
||||
{
|
||||
oh = originalImage.Height;
|
||||
ow = originalImage.Height * towidth / toheight;
|
||||
y = 0;
|
||||
x = (originalImage.Width - ow) / 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
ow = originalImage.Width;
|
||||
oh = originalImage.Width * height / towidth;
|
||||
x = 0;
|
||||
y = (originalImage.Height - oh) / 2;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
//新建一个bmp图片
|
||||
Image bitmap = new System.Drawing.Bitmap(towidth, toheight);
|
||||
//新建一个画板
|
||||
Graphics g = System.Drawing.Graphics.FromImage(bitmap);
|
||||
//设置高质量插值法
|
||||
g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.High;
|
||||
//设置高质量,低速度呈现平滑程度
|
||||
g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
|
||||
//清空画布并以透明背景色填充
|
||||
g.Clear(Color.Transparent);
|
||||
//在指定位置并且按指定大小绘制原图片的指定部分
|
||||
g.DrawImage(originalImage, new Rectangle(0, 0, towidth, toheight),
|
||||
new Rectangle(x, y, ow, oh),
|
||||
GraphicsUnit.Pixel);
|
||||
try
|
||||
{
|
||||
|
||||
if (!Directory.Exists(thumbnailPath))
|
||||
{
|
||||
Directory.CreateDirectory(thumbnailPath);
|
||||
}
|
||||
//以jpg格式保存缩略图
|
||||
bitmap.Save(thumbnailPath + "2" + name + ".jpg");
|
||||
ImgServerController.CompressImage(thumbnailPath + "2" + name + ".jpg", thumbnailPath + name + ".jpg");
|
||||
//System.IO.File.Delete(thumbnailPath + "2" + name + ".jpg");
|
||||
return new Task<string>(() => thumbnailPath + name + ".jpg");
|
||||
//return thumbnailPath + info.Name;
|
||||
}
|
||||
catch (System.Exception e)
|
||||
{
|
||||
LogHelp.WriteExceptionLog(e, this.GetType().Name);
|
||||
return null;
|
||||
}
|
||||
finally
|
||||
{
|
||||
originalImage.Dispose();
|
||||
bitmap.Dispose();
|
||||
g.Dispose();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public string FtpUploadShow(string filename, string ftpServerIP)
|
||||
{
|
||||
//filename += ".jpg";
|
||||
string ftpUserID = "uts_manager";//ftp账号
|
||||
string ftpPassword = "uts_Inhaos@all";//ftp密码
|
||||
FileInfo fileInf = new FileInfo(filename);
|
||||
FtpWebRequest reqFTP;
|
||||
ServicePointManager.ServerCertificateValidationCallback =
|
||||
new RemoteCertificateValidationCallback(ValidateServerCertificate);
|
||||
try
|
||||
{
|
||||
// 根据uri创建FtpWebRequest对象
|
||||
reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri("ftp://" + ftpServerIP + "/" + fileInf.Name));
|
||||
string s = fileInf.Name;
|
||||
// ftp用户名和密码
|
||||
reqFTP.Credentials = new NetworkCredential(ftpUserID, ftpPassword);
|
||||
// 默认为true,连接不会被关闭
|
||||
// 在一个命令之后被执行
|
||||
reqFTP.KeepAlive = true;
|
||||
//如果要连接的 FTP 服务器要求凭据并支持安全套接字层 (SSL),则应将 EnableSsl 设置为 true。如果不写会报出421错误(服务不可用)
|
||||
reqFTP.EnableSsl = false;
|
||||
// 指定执行什么命令
|
||||
reqFTP.Method = WebRequestMethods.Ftp.UploadFile;
|
||||
// 指定数据传输类型
|
||||
reqFTP.UseBinary = true;
|
||||
// 上传文件时通知服务器文件的大小
|
||||
reqFTP.ContentLength = fileInf.Length;
|
||||
// 缓冲大小设置为 10kb
|
||||
int buffLength = 10480;
|
||||
byte[] buff = new byte[buffLength];
|
||||
int contentLen;
|
||||
// 打开一个文件流 (System.IO.FileStream) 去读上传的文件
|
||||
FileStream fs = fileInf.OpenRead();
|
||||
try
|
||||
{
|
||||
// 把上传的文件写入流
|
||||
Stream strm = reqFTP.GetRequestStream();
|
||||
// 每次读文件流的buffLength kb
|
||||
contentLen = fs.Read(buff, 0, buffLength);
|
||||
// 流内容没有结束
|
||||
while (contentLen != 0)
|
||||
{
|
||||
// 把内容从file stream 写入 upload stream
|
||||
strm.Write(buff, 0, contentLen);
|
||||
contentLen = fs.Read(buff, 0, buffLength);
|
||||
}
|
||||
// 关闭两个流
|
||||
strm.Close();
|
||||
fs.Close();
|
||||
return fileInf.Name;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogHelp.WriteExceptionLog(ex,"图片ftp错误"+ex.Message);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LogHelp.WriteExceptionLog(e, "图片ftp错误" + e.Message);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
public static bool ValidateServerCertificate
|
||||
(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
13
Face.Web/Areas/App/Models/stact.cs
Normal file
13
Face.Web/Areas/App/Models/stact.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Face.Domain.Entities;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace Face.Web.Areas.App.Models
|
||||
{
|
||||
public static class stact
|
||||
{
|
||||
public static FaceEntitiesShow context = new FaceEntitiesShow();
|
||||
}
|
||||
}
|
||||
23
Face.Web/Areas/App/Models/tbl_face_key.cs
Normal file
23
Face.Web/Areas/App/Models/tbl_face_key.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace Face.Web.Areas.App.Models
|
||||
{
|
||||
public class tbl_face_key
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public DateTime CreateDateTime { get; set; }
|
||||
public string MsgID { get; set; }
|
||||
public string AppKey { get; set; }
|
||||
public string TimeStamp { get; set; }
|
||||
public string SN { get; set; }
|
||||
public string Key { get; set; }
|
||||
public int ReqType { get; set; }
|
||||
public int RequstCnt { get; set; }
|
||||
public string Return { get; set; }
|
||||
public string Result { get; set; }
|
||||
public string Remark { get; set; }
|
||||
}
|
||||
}
|
||||
25
Face.Web/Areas/App/Models/tbl_face_key_assign_log.cs
Normal file
25
Face.Web/Areas/App/Models/tbl_face_key_assign_log.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace Face.Web.Areas.App.Models
|
||||
{
|
||||
public class tbl_face_key_assign_log
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string IP { get; set; }
|
||||
public DateTime CreateDateTime { get; set; }
|
||||
public string MsgID { get; set; }
|
||||
public string AppKey { get; set; }
|
||||
public string TimeStamp { get; set; }
|
||||
public string SN { get; set; }
|
||||
public string Key { get; set; }
|
||||
public int ReqType { get; set; }
|
||||
public int RequstCnt { get; set; }
|
||||
public string Return { get; set; }
|
||||
public string Result { get; set; }
|
||||
public string Remark { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
26
Face.Web/Areas/App/Models/tbl_face_key_request_log.cs
Normal file
26
Face.Web/Areas/App/Models/tbl_face_key_request_log.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace Face.Web.Areas.App.Models
|
||||
{
|
||||
public class tbl_face_key_request_log
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string IP { get; set; }
|
||||
public string MsgID { get; set; }
|
||||
public string AppKey { get; set; }
|
||||
public string TimeStamp { get; set; }
|
||||
public string HotelID { get; set; }
|
||||
public int RoomID { get; set; }
|
||||
public string DeviceSN { get; set; }
|
||||
public string DeviceBrand { get; set; }
|
||||
public string Key { get; set; }
|
||||
public int RequstCnt { get; set; }
|
||||
public string Return { get; set; }
|
||||
public string Result { get; set; }
|
||||
public string Remark { get; set; }
|
||||
public DateTime CreateDateTime { get; set; }
|
||||
}
|
||||
}
|
||||
22
Face.Web/Areas/App/Models/tbl_face_white_list.cs
Normal file
22
Face.Web/Areas/App/Models/tbl_face_white_list.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
namespace Face.Web.Areas.App.Models
|
||||
{
|
||||
public class tbl_face_white_list
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string ip { get; set; }
|
||||
|
||||
public string DOMAIN { get; set; }
|
||||
|
||||
public int Is_Avalable { get; set; }
|
||||
|
||||
public DateTime LastModified { get; set; }
|
||||
public DateTime CreateDateTime { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
121
Face.Web/Areas/App/Views/CheckinPms/Checkin.cshtml
Normal file
121
Face.Web/Areas/App/Views/CheckinPms/Checkin.cshtml
Normal file
@@ -0,0 +1,121 @@
|
||||
@model List<TBL_ROOM_BASIC_INFO>
|
||||
|
||||
@using Face.Domain.Application;
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Checkin";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
|
||||
|
||||
|
||||
<div class="content-wrapper">
|
||||
<section class="content" style="padding:0px;">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<!-- Default box -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<span style="font-size:30px">(<span class="info-box-icon bg-success"> </span>=空房/ <span class="info-box-icon bg-warning"> </span>=出租)</span>
|
||||
<div class="card-tools">
|
||||
<button type="button" class="btn btn-tool" data-card-widget="collapse" title="Collapse"></button>
|
||||
<button type="button" class="btn btn-tool" data-card-widget="remove" title="Remove">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
@if (Model != null)
|
||||
{
|
||||
foreach (var item in Model)
|
||||
{
|
||||
<div class="col-lg-1 col-3">
|
||||
<!-- small card -->
|
||||
@*<div class="@(item.RoomStatusID == 2 ? "small-box bg-warning" : "small-box bg-success")">*@
|
||||
@*<div class="inner">*@
|
||||
<div style="background-color: #00FF7F; width: 100%;">
|
||||
<div style="text-align: center; color: blue; font-size:23px;">@item.ROOM_NUMBER</div>
|
||||
</div>
|
||||
<div style="background-color: #98FB98; width: 100%;">
|
||||
<span style="text-align:center;">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" fill="currentColor" class="bi bi-person-fill" viewBox="0 0 16 16">
|
||||
<path d="M3 14s-1 0-1-1 1-4 6-4 6 3 6 4-1 1-1 1H3zm5-6a3 3 0 1 0 0-6 3 3 0 0 0 0 6z" />
|
||||
</svg>
|
||||
2
|
||||
</span>
|
||||
<span style="margin-left: 35%;">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" fill="currentColor" class="bi bi-card-image" viewBox="0 0 16 16">
|
||||
<path d="M6.002 5.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z" />
|
||||
<path d="M1.5 2A1.5 1.5 0 0 0 0 3.5v9A1.5 1.5 0 0 0 1.5 14h13a1.5 1.5 0 0 0 1.5-1.5v-9A1.5 1.5 0 0 0 14.5 2h-13zm13 1a.5.5 0 0 1 .5.5v6l-3.775-1.947a.5.5 0 0 0-.577.093l-3.71 3.71-2.66-1.772a.5.5 0 0 0-.63.062L1.002 12v.54A.505.505 0 0 1 1 12.5v-9a.5.5 0 0 1 .5-.5h13z" />
|
||||
</svg>
|
||||
2
|
||||
</span>
|
||||
|
||||
<div class="small-box-footer" style="width: 100%; margin-top: 10%; ">
|
||||
<a onclick="getBarCodeTestLogs('@item.ROOM_NUMBER')">
|
||||
开房
|
||||
</a>
|
||||
<a style="margin-left: 40%;">
|
||||
退房
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@*</div>*@
|
||||
@*</div>*@
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content" style="padding:0px;">
|
||||
<div class="modal inmodal" id="myModal" tabindex="-1" role="dialog" aria-hidden="false">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content animated fadeIn">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title" id="RoomName"></h4>
|
||||
<button type="button" class="close" data-dismiss="modal" onclick="closeLog()"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
||||
</div>
|
||||
<div class="modal-body" id="modal-body" style="padding:10px">
|
||||
</div>
|
||||
@*<div class="modal-footer">
|
||||
<button type="button" class="btn btn-white" data-dismiss="modal" onclick="closeLog()">关闭</button>
|
||||
</div>*@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- /.card -->
|
||||
<div class="col-sm-4" id="faceDetailsBox">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
function closeLog() {
|
||||
$("#myModal").css("display", "none");
|
||||
}
|
||||
function getBarCodeTestLogs(Roomane) {
|
||||
console.log(Roomane);
|
||||
$('#RoomName').html(Roomane);
|
||||
$("#myModal").css("display", "block");
|
||||
$("#modal-body").html("查询中...");
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "/app/CheckinPms/CheckinRoom",
|
||||
cache: false,
|
||||
data: { "Roomane": Roomane },
|
||||
success: function (res) {
|
||||
$("#modal-body").html(res);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
177
Face.Web/Areas/App/Views/CheckinPms/CheckinRoom.cshtml
Normal file
177
Face.Web/Areas/App/Views/CheckinPms/CheckinRoom.cshtml
Normal file
@@ -0,0 +1,177 @@
|
||||
@{
|
||||
Layout = null;
|
||||
string roomname = (string)ViewData["Roomane"];
|
||||
}
|
||||
<form class="form-horizontal" id="AddresidentFrom">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">客户名字</font></font></label>
|
||||
<input type="email" class="form-control" id="name" placeholder="输入名字">
|
||||
<p></p>
|
||||
<label for="exampleInputEmail1"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">客户身份证</font></font></label>
|
||||
<input type="email" class="form-control" id="id_no" placeholder="输入身份证">
|
||||
<p></p>
|
||||
<label for="exampleInputEmail1"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">客户电话号码</font></font></label>
|
||||
<input type="email" class="form-control" id="phones" placeholder="输入电话">
|
||||
<p></p>
|
||||
<label for="exampleInputEmail1"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">性别</font></font></label>
|
||||
<select class="form-control" id="OrgId" style=" float:left">
|
||||
<option value="1">
|
||||
男
|
||||
</option>
|
||||
<option value="0">
|
||||
女
|
||||
</option>
|
||||
</select>
|
||||
<p></p>
|
||||
<p><label for="exampleInputEmail1"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">客户人脸</font></font></label></p>
|
||||
<video id="videoElement" autoplay style="width:50%;"></video>
|
||||
<button class="btn btn-md btn-primary" id="captureButton">拍照</button>
|
||||
<img id="imageElement" style="width:50%; height:30%;" alt="" class="">
|
||||
<div></div>
|
||||
<div id="pictureShow"></div>
|
||||
<p></p>
|
||||
</div>
|
||||
<p></p>
|
||||
<div class="col-md-offset-3 col-md-9">
|
||||
<button class="btn btn-md btn-primary" type="button" id="btnAddShow" onclick="OpeningOperation()">开房</button>
|
||||
</div>
|
||||
<div style="display:none;" id="roomid">
|
||||
@roomname
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
const videoElement = document.getElementById('videoElement');
|
||||
const captureButton = document.getElementById('captureButton');
|
||||
|
||||
// 捕获视频帧并发送到后端
|
||||
captureButton.addEventListener('click', () => {
|
||||
event.preventDefault(); // 阻止默认的表单提交行为
|
||||
const imageElement = document.getElementById('imageElement'); // 添加一个 <img> 元素的引用
|
||||
const currentTime = new Date();
|
||||
const year = currentTime.getFullYear();
|
||||
const month = currentTime.getMonth() + 1; // 注意月份是从 0 开始的,因此需要加 1
|
||||
const day = currentTime.getDate();
|
||||
const hours = currentTime.getHours();
|
||||
const minutes = currentTime.getMinutes();
|
||||
const seconds = currentTime.getSeconds();
|
||||
const canvas = document.createElement('canvas');
|
||||
const context = canvas.getContext('2d');
|
||||
|
||||
canvas.width = videoElement.videoWidth;
|
||||
canvas.height = videoElement.videoHeight;
|
||||
|
||||
context.drawImage(videoElement, 0, 0, canvas.width, canvas.height);
|
||||
|
||||
canvas.toBlob((blob) => {
|
||||
const formData = new FormData();
|
||||
formData.append('video', blob, `${year}-${month}-${day}${hours}-${minutes}-${seconds}.png`);
|
||||
fetch('/CheckinPms/Save', {
|
||||
method: 'POST',
|
||||
body: formData
|
||||
})
|
||||
.then((response) => response.json())
|
||||
.then((data) => {
|
||||
const imageElement = document.getElementById('imageElement');
|
||||
imageElement.src = "data:image/png;base64," + data.imgbase64String;
|
||||
imageElement.className = data.imgpath;
|
||||
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Error saving video:', error);
|
||||
});
|
||||
}, 'video/webm');
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//const videoElement = document.getElementById('videoElement');
|
||||
//const captureButton = document.getElementById('captureButton');
|
||||
|
||||
//// 捕获视频帧并保存
|
||||
//captureButton.addEventListener('click', () => {
|
||||
// const canvas = document.createElement('canvas');
|
||||
// const context = canvas.getContext('2d');
|
||||
|
||||
// // 设置canvas的尺寸与视频宽高相同
|
||||
// canvas.width = videoElement.videoWidth;
|
||||
// canvas.height = videoElement.videoHeight;
|
||||
|
||||
// // 将当前视频帧绘制到canvas上
|
||||
// context.drawImage(videoElement, 0, 0, canvas.width, canvas.height);
|
||||
|
||||
// // 将canvas转换为图像数据URL
|
||||
// const imageDataURL = canvas.toDataURL('image/png');
|
||||
|
||||
// // 创建一个链接元素,并设置其下载属性
|
||||
// const link = document.createElement('a');
|
||||
// link.href = imageDataURL;
|
||||
// link.download = 'captured_image.png';
|
||||
|
||||
// // 模拟用户点击链接以触发下载
|
||||
// link.click();
|
||||
//});
|
||||
|
||||
|
||||
|
||||
//function Photograph() {
|
||||
// 获取video元素
|
||||
const video = document.getElementById('videoElement');
|
||||
// 检查浏览器是否支持getUserMedia
|
||||
if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
|
||||
// 请求访问摄像头
|
||||
navigator.mediaDevices.getUserMedia({ video: true })
|
||||
.then(function (stream) {
|
||||
// 将视频流附加到video元素
|
||||
video.srcObject = stream;
|
||||
video.play();
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.error('访问摄像头出错: ', error);
|
||||
});
|
||||
} else {
|
||||
console.error('浏览器不支持getUserMedia');
|
||||
}
|
||||
//}
|
||||
|
||||
|
||||
function OpeningOperation() {
|
||||
var name1 = $('#name').val();
|
||||
var id_no = $('#id_no').val();
|
||||
var element = document.getElementById('imageElement');
|
||||
var classes = element.className;
|
||||
var photo = classes;
|
||||
var sex1 = $('#OrgId').val();
|
||||
var roomid = $('#RoomName').html();
|
||||
console.log(roomid);
|
||||
var phone1 = $('#phones').val();
|
||||
var InfoBodyShow = {
|
||||
name: name1,
|
||||
idNumber: id_no,
|
||||
picture: photo,
|
||||
sex: sex1,
|
||||
phone: phone1,
|
||||
roomid: roomid
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "/app/CheckinPms/OpeningOperation",
|
||||
cache: false,
|
||||
data: InfoBodyShow ,
|
||||
success: function (res) {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
@if (ViewData["tableDataimp"] != null)
|
||||
{
|
||||
System.Data.DataSet datas = (System.Data.DataSet)ViewData["tableDataimp"];
|
||||
<input type="hidden" class="dataNum" value="@(ViewBag.dataNum)" />
|
||||
<div>
|
||||
@*<nav style="text-align:center;">
|
||||
<ul class="pagination" id="page">
|
||||
<li class="first" onclick="TestLogsData(1)"><a>首页</a></li>
|
||||
<li class="left"><a>…</a></li>
|
||||
@for (int i = 0; i < ViewBag.allpage; i++)
|
||||
{
|
||||
<li class="pages" onclick="TestLogsData(@(i + 1))"><a>@(i + 1)</a></li>
|
||||
}
|
||||
<li class="right"><a>…</a></li>
|
||||
<li class="finally"><a onclick="TestLogsData(@ViewBag.allpage)">尾页</a></li>
|
||||
</ul>
|
||||
</nav>*@
|
||||
</div>
|
||||
<table class="table table-striped table-bordered table-hover " id="editable">
|
||||
<thead>
|
||||
<tr>
|
||||
@for (int i = 0; i < datas.Tables[0].Columns.Count; i++)
|
||||
{
|
||||
<th>
|
||||
|
||||
@if (datas.Tables[0].Columns[i].ToString() == "filename")
|
||||
{
|
||||
<b> 文件名(后缀)</b>
|
||||
}
|
||||
else if (datas.Tables[0].Columns[i].ToString() == "creationtime")
|
||||
{
|
||||
<b> 创建时间</b>
|
||||
}
|
||||
else
|
||||
{
|
||||
<b>
|
||||
@datas.Tables[0].Columns[i].ToString()
|
||||
</b>
|
||||
}
|
||||
</th>
|
||||
}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@for (int row = 0; row < datas.Tables[0].Rows.Count; row++)
|
||||
{
|
||||
<tr>
|
||||
@for (int i = 0; i < datas.Tables[0].Columns.Count; i++)
|
||||
{
|
||||
<td>
|
||||
@if (datas.Tables[0].Rows[row][i].ToString() != "NULL")
|
||||
{
|
||||
@datas.Tables[0].Rows[row][i]
|
||||
}
|
||||
</td>
|
||||
}
|
||||
</tr>
|
||||
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
<h4>暂无数据</h4>
|
||||
}
|
||||
<script src="~/Plugin/allPages.js"></script>
|
||||
81
Face.Web/Areas/App/Views/Expand/ExpandIndex.cshtml
Normal file
81
Face.Web/Areas/App/Views/Expand/ExpandIndex.cshtml
Normal file
@@ -0,0 +1,81 @@
|
||||
|
||||
@{
|
||||
ViewBag.Title = "ExpandIndex";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
|
||||
<div class="content-wrapper">
|
||||
<section class="content" style="padding:0px;">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<!-- Default box -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
|
||||
@*<div class="card-tools">
|
||||
<button type="button" class="btn btn-tool" data-card-widget="collapse" title="Collapse"></button>
|
||||
|
||||
<button type="button" class="btn btn-tool" data-card-widget="remove" title="Remove">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>*@
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@*条件筛选*@<div><h4>新增酒店信息</h4></div>
|
||||
</div>
|
||||
@*内容筛选*@
|
||||
<div class="ibox-content" style="padding:0px;">
|
||||
<div id="project">
|
||||
<div class="card-body">
|
||||
<form class="form-horizontal" id="AddresidentFrom">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">酒店编码</font></font></label>
|
||||
<input type="email" class="form-control" id="idcode" placeholder="输入名字">
|
||||
<p></p>
|
||||
<label for="exampleInputEmail1"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">酒店名称</font></font></label>
|
||||
<input type="email" class="form-control" id="name" placeholder="输入身份证">
|
||||
<p></p>
|
||||
<label for="exampleInputEmail1"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">酒店ID</font></font></label>
|
||||
<input type="email" class="form-control" id="id_no" placeholder="输入电话">
|
||||
<p></p>
|
||||
</div>
|
||||
<div class="col-md-offset-3 col-md-9">
|
||||
<button class="btn btn-md btn-primary" type="button" id="btnAddShow" onclick="TiJ()">保存</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div id="btn" onclick="tip()"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function TiJ()
|
||||
{
|
||||
var name = $('#name').val();
|
||||
var id_no = $('#id_no').val();
|
||||
var idcode = $('#idcode').val();
|
||||
console.log(name);
|
||||
$.ajax({
|
||||
url: "/Expand/Expandinsert",
|
||||
data: { "name": name, "id_no": id_no, "idcode": idcode },
|
||||
type: "POST",
|
||||
success: function (data) {
|
||||
alert(data);
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
455
Face.Web/Areas/App/Views/Expand/UploadingAll.cshtml
Normal file
455
Face.Web/Areas/App/Views/Expand/UploadingAll.cshtml
Normal file
@@ -0,0 +1,455 @@
|
||||
@using PagedList.Mvc;
|
||||
@using Face.Web.Areas.App.Models;
|
||||
@using Face.Domain.Entities;
|
||||
@using Face.Domain.Application
|
||||
@{
|
||||
ViewBag.Title = "UploadingAll";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
List<Face.Domain.Entities.Hotels> Hotellist = SqlSugarBase.authoriydb.Queryable<Hotels>().ToList();
|
||||
}
|
||||
<style>
|
||||
.card-body label {
|
||||
display: inline-block;
|
||||
width: 20%;
|
||||
margin-right: 10px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.card-body select,
|
||||
.card-body input {
|
||||
display: inline-block;
|
||||
height: 35px;
|
||||
width: 75%;
|
||||
margin-bottom: 10px;
|
||||
padding: 5px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.custom-file-label {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.input-group-text {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.form-group {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.custom-file-input {
|
||||
height: 100%;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.custom-file-input:hover,
|
||||
.custom-file-input:focus {
|
||||
border-color: #000;
|
||||
box-shadow: none;
|
||||
}
|
||||
.custom-file-input:focus ~ .custom-file-label {
|
||||
border-color: #000;
|
||||
box-shadow: none;
|
||||
}
|
||||
.custom-file-label::before {
|
||||
display: inline-block;
|
||||
padding: 6px 12px;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
line-height: 1.5;
|
||||
color: #fff;
|
||||
background-color: #007bff;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.custom-file-label::after {
|
||||
content: "浏览";
|
||||
display: inline-block;
|
||||
padding: 6px 12px;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
line-height: 1.5;
|
||||
color: #fff;
|
||||
background-color: #28a745;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.input-group-text {
|
||||
cursor: pointer;
|
||||
background-color: #007bff;
|
||||
color: #fff;
|
||||
border-color: #007bff;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.input-group-text:hover,
|
||||
.input-group-text:focus {
|
||||
background-color: #0062cc;
|
||||
color: #fff;
|
||||
border-color: #005cbf;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.input-group-text:active {
|
||||
background-color: #005cbf;
|
||||
color: #fff;
|
||||
border-color: #005cbf;
|
||||
}
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<section class="content" style="padding:0px;">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<!-- Default box -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<span style="font-size:30px">上传文件</span>
|
||||
<div class="card-tools">
|
||||
<button type="button" class="btn btn-tool" data-card-widget="collapse" title="Collapse"></button>
|
||||
<button type="button" class="btn btn-tool" data-card-widget="remove" title="Remove">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body ">
|
||||
<label for="remark" style="display: inline-block; width: 20%; margin-right: 10px; text-align: right; ">上传类型:</label>
|
||||
<select class="form-control" id="OrgId" style="display: inline-block; height: 35px; width: 75%; ">
|
||||
<option value="3">
|
||||
人脸机背景图 (要求:格式:png, 尺寸:800x1280,大小 1MB以下)
|
||||
</option>
|
||||
<option value="2">
|
||||
酒店Logo(要求:格式:png, 尺寸:351x87,大小 1MB以下)
|
||||
</option>
|
||||
<option value="1">
|
||||
升级文件(文件太大,需要等待一段时间)
|
||||
</option>
|
||||
</select>
|
||||
<label for="remark" style="display: inline-block; width: 20%; margin-right: 10px; text-align: right;">酒店名称:</label>
|
||||
<select class="form-control" id="hoteid" style="display: inline-block; height: 35px; width: 75%; " onchange="GetstationList()">
|
||||
@{List<int> sum = (List<int>)Session["list"];
|
||||
foreach (int item in sum)
|
||||
{
|
||||
foreach (var iten in Hotellist)
|
||||
{
|
||||
if (iten.Id == item)
|
||||
{
|
||||
<option class="ComboBox" value="@iten.Id" )>
|
||||
@iten.Name
|
||||
</option>
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</select>
|
||||
<label for="remark" style="display: inline-block; width: 20%; margin-right: 10px; text-align: right;">房间名称:</label>
|
||||
<select class="form-control" id="roomid" style="display: inline-block; height: 35px; width: 75%; ">
|
||||
</select>
|
||||
<label for="remark" style="display: inline-block; width: 20%; margin-right: 10px; text-align: right;">备注:</label>
|
||||
<input class="form-control" type="text" placeholder="详细信息" name="username" style="display: inline-block; height: 35px; width: 75%;" id="remark">
|
||||
<label for="remark" style="display: inline-block; width: 20%; margin-right: 10px; text-align: right;">上传文件:</label>
|
||||
<div class="form-group" style="display: inline-block; height: 35px; width: 75%;">
|
||||
<div class="input-group">
|
||||
<div class="custom-file" style="display: inline-block; height: 35px;">
|
||||
<input type="file" onchange="uploadimg()" class=" custom-file-input" id="photo" style="width:80%">
|
||||
<label class="custom-file-label" id="exampleInputFile" style="width:80%"></label>
|
||||
</div>
|
||||
<div class=" input-group-append">
|
||||
<span class="input-group-text" onclick="uploads()" id="buttnShow">上传</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@*条件筛选*@
|
||||
@*内容筛选*@
|
||||
<div class="ibox-content" style="padding:0px;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card -->
|
||||
<div class="col-sm-4" id="faceDetailsBox">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<script>
|
||||
const selectOrgIdElement = document.getElementById("OrgId");
|
||||
const selecthoteidElement = document.getElementById("hoteid");
|
||||
const selectroomElement = document.getElementById("roomid");
|
||||
|
||||
|
||||
// 添加事件监听器
|
||||
selectOrgIdElement.addEventListener("change", function () {
|
||||
show();
|
||||
var name = $('#OrgId').val();
|
||||
//升级文件
|
||||
if (name == 1){
|
||||
const option1 = document.createElement("option");
|
||||
option1.value = "0";
|
||||
option1.text = "";
|
||||
selecthoteidElement.appendChild(option1);
|
||||
selectroomElement.appendChild(option1);
|
||||
selecthoteidElement.value = "0";
|
||||
selecthoteidElement.disabled = true;
|
||||
selectroomElement.value = "0";
|
||||
selectroomElement.disabled = true;
|
||||
}
|
||||
//酒店logo
|
||||
else if (name == 2)
|
||||
{
|
||||
|
||||
const option2 = document.createElement("option");
|
||||
option2.value = "0";
|
||||
option2.text = "";
|
||||
selectroomElement.appendChild(option2);
|
||||
selecthoteidElement.appendChild(option2);
|
||||
selectroomElement.disabled = true;
|
||||
selecthoteidElement.disabled = false;
|
||||
// 删除所有选项
|
||||
for (let i = selectroomElement.options.length - 1; i >= 0; i--) {
|
||||
selectroomElement.remove(i);
|
||||
}
|
||||
}
|
||||
//背景图
|
||||
else if (name == 3){
|
||||
|
||||
selecthoteidElement.disabled = false;
|
||||
selectroomElement.disabled = false;
|
||||
|
||||
}
|
||||
});
|
||||
selecthoteidElement.addEventListener("change", function () {
|
||||
show();
|
||||
});
|
||||
selectroomElement.addEventListener("change", function () {
|
||||
show();
|
||||
});
|
||||
|
||||
window.onload = GetstationList;
|
||||
function uploadimg(type) {
|
||||
let files = $("#photo").prop("files");
|
||||
if (files.length <= 0)
|
||||
return;
|
||||
$("#photo").closest(".input-group").find("label").html(files[0].name);
|
||||
if (type != 1)
|
||||
return;
|
||||
uploads();
|
||||
}
|
||||
function uploads() {
|
||||
if ($('#photo')[0].files[0] != undefined) {
|
||||
var name = $('#OrgId').val();//上传文件类型
|
||||
var remark = $('#remark').val(); //备注
|
||||
var houseid = $('#hoteid').val();//酒店号码
|
||||
var roomid = $('#roomid').val();//房间号码
|
||||
if (houseid == null) {
|
||||
houseid = 0
|
||||
}
|
||||
if (roomid == null) {
|
||||
roomid = 0
|
||||
}
|
||||
var formData = new FormData() //创建一个forData
|
||||
formData.append('img', $('#photo')[0].files[0])
|
||||
formData.append('type', name)
|
||||
formData.append('remark', remark)
|
||||
formData.append('houseid', houseid)
|
||||
formData.append('roomid', roomid)
|
||||
|
||||
if (name == "1") {
|
||||
uploadFile();//上传部件方法
|
||||
} else {
|
||||
$.ajax({
|
||||
url: "/ImgServer/judgeUpdate",
|
||||
data: formData,
|
||||
type: "POST",
|
||||
async: false,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
success: function (data) {
|
||||
if (data == "false") {
|
||||
var s = confirm("服务器已有此文件,是否替换")
|
||||
if (s == true) {
|
||||
$.ajax({
|
||||
url: "/ImgServer/UpdateYh",
|
||||
data: formData,
|
||||
type: "POST",
|
||||
async: false,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
success: function (data) {
|
||||
if (data.status == true) {
|
||||
alert("上传成功");
|
||||
show();
|
||||
}
|
||||
else {
|
||||
alert("上传失败 原因:" + data.data);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
alert("上传失败");
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
|
||||
$.ajax({
|
||||
url: "/ImgServer/UpdateYh",
|
||||
data: formData,
|
||||
type: "POST",
|
||||
async: false,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
success: function (data) {//成功
|
||||
if (data.status == true) {
|
||||
alert("上传成功");
|
||||
show();
|
||||
}
|
||||
else {
|
||||
alert("上传失败 原因:" + data.data);
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
alert("上传失败");
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
else {
|
||||
alert("请选择文件上传");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function GetstationList() {
|
||||
show();
|
||||
var name = $('#OrgId').val();
|
||||
if (name==3) {
|
||||
|
||||
var houseid = $('#hoteid').val();
|
||||
$("#roomid").html("");
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/APP/Expand/Dropdownlist",
|
||||
cache: false,
|
||||
data: { "Hoteid": houseid },
|
||||
success: function (data) {
|
||||
if (data.Status == 200) {
|
||||
for (var i = 0; i < data.Data.length; i++) {
|
||||
$("#roomid").append(` <option value="` + data.Data[i].ID + `">` + data.Data[i].RoomNumber + `</option>`);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
function show() {
|
||||
var name = $('#OrgId').val();
|
||||
var houseid = $('#hoteid').val();
|
||||
var roomid = $('#roomid').val();
|
||||
var datalist = {
|
||||
HotelID: houseid,
|
||||
roomid: roomid,
|
||||
filetype: name
|
||||
}
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/APP/Expand/Conditionfileawholelog",
|
||||
cache: false,
|
||||
data: datalist,
|
||||
success: function (data) {
|
||||
$(".ibox-content").html(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function uploadFile() {
|
||||
$('#buttnShow').html('上传中');
|
||||
var fileInput = document.getElementById('photo');
|
||||
var file = fileInput.files[0];
|
||||
|
||||
var chunkSize = 1024 * 1024; // 每个分片的大小,这里设置为 1MB
|
||||
var fileSize = file.size;
|
||||
console.log("文件大小时:" + Math.round(fileSize / chunkSize)+"Mb")
|
||||
debugger
|
||||
var totalChunks = Math.ceil(fileSize / chunkSize); // 总分片数
|
||||
var currentChunk = 0; // 当前上传的分片序号
|
||||
var remark = $('#remark').val();//获取备注
|
||||
|
||||
function uploadChunk(start, end) {
|
||||
var chunk = file.slice(start, end); // 获取当前分片的数据
|
||||
|
||||
var formData = new FormData();
|
||||
formData.append('file', chunk);
|
||||
formData.append('chunkIndex', currentChunk);
|
||||
formData.append('totalChunks', totalChunks);
|
||||
formData.append('fileName', file.name);
|
||||
|
||||
fetch('/ImgServer/UploadChunk', {
|
||||
method: 'POST',
|
||||
body: formData
|
||||
})
|
||||
.then(function (response) {
|
||||
if (response.ok) {
|
||||
// 分片上传成功
|
||||
currentChunk++;
|
||||
if (currentChunk < totalChunks) {
|
||||
// 继续上传下一个分片
|
||||
var start = currentChunk * chunkSize;
|
||||
var end = Math.min(start + chunkSize, fileSize);
|
||||
uploadChunk(start, end);
|
||||
} else {
|
||||
// 所有分片上传完成
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/APP/ImgServer/MergeChunks",
|
||||
cache: false,
|
||||
data: { "fileName": file.name, "totalChunks": totalChunks, "remark": remark },
|
||||
success: function (response) {
|
||||
if (response) {
|
||||
alert('文件上传成功!');
|
||||
$('#buttnShow').html('上传');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
// 分片上传失败
|
||||
console.log('分片上传失败:' + response.status);
|
||||
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
// 发生错误
|
||||
console.log('发生错误:' + error.message);
|
||||
});
|
||||
}
|
||||
|
||||
// 上传逻辑
|
||||
var start = 0;
|
||||
var end = Math.min(chunkSize, fileSize);
|
||||
uploadChunk(start, end);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
31
Face.Web/Areas/App/Views/Face/BackgroundImageAkp.cshtml
Normal file
31
Face.Web/Areas/App/Views/Face/BackgroundImageAkp.cshtml
Normal file
@@ -0,0 +1,31 @@
|
||||
@using Face.Web.Areas.App.Models;
|
||||
@{
|
||||
Layout = null;
|
||||
List<FileDetails> Akplist = (List<FileDetails>)ViewData["Akplists"];
|
||||
}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover ">
|
||||
<tbody>
|
||||
@if (Akplist.Count != 0)
|
||||
{
|
||||
|
||||
<tr class="table table-striped ">
|
||||
<td>文件名</td>
|
||||
<td>文件大小</td>
|
||||
<td>文件日期</td>
|
||||
|
||||
</tr>
|
||||
for (int i = 0; i < Akplist.Count; i++)
|
||||
{
|
||||
<tr onclick="OnShow('@Akplist[i].Filename')">
|
||||
<td><a>@Akplist[i].Filename</a></td>
|
||||
<td><a>@Akplist[i].FileSize</a></td>
|
||||
<td><a>@Akplist[i].UploadDate</a></td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<script>
|
||||
</script>
|
||||
94
Face.Web/Areas/App/Views/Face/Bing.cshtml
Normal file
94
Face.Web/Areas/App/Views/Face/Bing.cshtml
Normal file
@@ -0,0 +1,94 @@
|
||||
@using Face.Domain.Entities;
|
||||
@using Face.Web.Areas.App.Models
|
||||
@{
|
||||
Layout = null;
|
||||
//List<Face.Domain.Entities.Hotels> Hotellist = Face.Services.Cache.CacheHelp.GetHotelslist();
|
||||
}
|
||||
|
||||
|
||||
<style>
|
||||
#btnaddPLineShow {
|
||||
background-color: #008CBA;
|
||||
border: none;
|
||||
color: white;
|
||||
padding: 5px 20px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
}
|
||||
</style>
|
||||
<section class="content" style="padding:0px;">
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
|
||||
<div class="card-tools">
|
||||
|
||||
<button type="button" class="btn btn-tool" data-card-widget="remove" title="Remove">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5 id="SNno">人脸机sn号:@Session["StrNo"]</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link-partial">
|
||||
</a>
|
||||
<a class="close-link-partial">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<select class="form-control" id="OrgIds">
|
||||
@{List<HotelsItem> Hotellist = (List<HotelsItem>)Session["qxHotels"];}
|
||||
@foreach (var item in Hotellist)
|
||||
{
|
||||
<option class="ComboBox" value="@item.HotelId" )>
|
||||
@item.HotelName
|
||||
</option>
|
||||
}
|
||||
</select>
|
||||
<button class="btn btn-xs btn-success" id="btnaddPLineShow" onclick="accretion()">为酒店添加人脸机</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<script>
|
||||
function accretion() {
|
||||
var myType = document.getElementById("OrgIds");//获取select对象
|
||||
var index = myType.selectedIndex;//获取选项中的索引,selectIndex表示的是当前所选中的index
|
||||
var code = myType.options[index].value;//获取酒店编号
|
||||
var objects = {
|
||||
hotel: code,
|
||||
faceNo: "@Session["StrNo"]"
|
||||
};
|
||||
$.ajax({
|
||||
url: "/App/Face/addfacehotel",
|
||||
type: "post",
|
||||
data: objects,
|
||||
async: true,
|
||||
success: function (res) {
|
||||
if (res.Status == 200) {
|
||||
alert(res.Message)
|
||||
var link = "/App/Face/testFaceall";
|
||||
window.location.href = link;
|
||||
} else
|
||||
{
|
||||
alert('添加失败')
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
125
Face.Web/Areas/App/Views/Face/BingInfo.cshtml
Normal file
125
Face.Web/Areas/App/Views/Face/BingInfo.cshtml
Normal file
@@ -0,0 +1,125 @@
|
||||
|
||||
@{
|
||||
Layout = null;
|
||||
List<Face.Domain.Entities.Hotels> Hotellist = (List<Face.Domain.Entities.Hotels>)ViewData["hh"];
|
||||
}
|
||||
<style>
|
||||
#btnaddPLineShow {
|
||||
background-color: #008CBA;
|
||||
border: none;
|
||||
color: white;
|
||||
padding: 5px 20px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
}
|
||||
</style>
|
||||
<section class="content" style="padding:0px;">
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
|
||||
<div class="card-tools">
|
||||
|
||||
<button type="button" class="btn btn-tool" data-card-widget="remove" title="Remove">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5 id="SNno">人脸机sn号:@Session["SnoNO"]</h5>
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link-partial">
|
||||
</a>
|
||||
<a class="close-link-partial">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<select class="form-control" id="hotelShow" style="width:250px; height:35px;float:left">
|
||||
<option class="ComboBox" value="@Session["hotelcode"]" )>
|
||||
@Hotellist.Single(s => s.Id == int.Parse(Session["hotelcode"].ToString())).Name
|
||||
</option>
|
||||
|
||||
</select>
|
||||
<select class="form-control" id="RoomShow" style="width:250px; height:35px; float:left;display:none;">
|
||||
</select>
|
||||
<button class="btn btn-xs btn-success" id="btnaddPLineShow" onclick="accretion()">为房间添加人脸机</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<script>
|
||||
|
||||
$(function () {
|
||||
Show();
|
||||
})
|
||||
|
||||
function accretion() {
|
||||
var myType = document.getElementById("hotelShow");//获取select对象
|
||||
var index = myType.selectedIndex;//获取选项中的索引,selectIndex表示的是当前所选中的index
|
||||
var code = myType.options[index].value;//获取酒店编号
|
||||
if (code != 0) {
|
||||
var rommNo = document.getElementById("RoomShow").value;//获取房间号
|
||||
console.log(rommNo)
|
||||
|
||||
var objects = {
|
||||
hotel: code,
|
||||
romm: rommNo,
|
||||
faceNo: "@Session["SnoNO"]"
|
||||
};
|
||||
$.ajax({
|
||||
url: "/App/Face/addfaceroom",
|
||||
type: "post",
|
||||
data: objects,
|
||||
async: true,
|
||||
success: function (res) {
|
||||
if (res.Status == 200) {
|
||||
alert('添加成功')
|
||||
var link = "/App/Face/testFaceall";
|
||||
window.location.href = link;
|
||||
} else {
|
||||
alert('添加失败')
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
alert('请选择酒店')
|
||||
}
|
||||
}
|
||||
function Show() {
|
||||
var myType = document.getElementById("hotelShow");//获取select对象
|
||||
var index = myType.selectedIndex;//获取选项中的索引,selectIndex表示的是当前所选中的index
|
||||
var code = myType.options[index].value;//获取酒店编号
|
||||
document.getElementById('RoomShow').innerHTML = "";
|
||||
$.ajax({
|
||||
url: "/App/Face/officialHotel",
|
||||
type: "post",
|
||||
data: { "hotelId": code },
|
||||
success: function (res) {
|
||||
debugger
|
||||
res.forEach(x => {
|
||||
$('#RoomShow').append('<option value=' + x.ID + '>' + x.ROOM_NUMBER + '</option>')
|
||||
});
|
||||
}
|
||||
});
|
||||
$('#RoomShow').show();
|
||||
};
|
||||
|
||||
</script>
|
||||
96
Face.Web/Areas/App/Views/Face/ClientInformation.cshtml
Normal file
96
Face.Web/Areas/App/Views/Face/ClientInformation.cshtml
Normal file
@@ -0,0 +1,96 @@
|
||||
|
||||
@{
|
||||
ViewBag.Title = "ClientInformation";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
|
||||
}
|
||||
<style>
|
||||
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
#style-format {
|
||||
float: right;
|
||||
}
|
||||
|
||||
#btnaddPLine {
|
||||
float: right;
|
||||
}
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<section class="content" style="padding:0px;">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<!-- Default box -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div></div>
|
||||
<div class="card-tools">
|
||||
<button class="btn btn-md btn-primary" type="button" id="btnaddPLine" onclick="userDetailss()">添加管理员</button>
|
||||
<button type="button" class="btn btn-tool" data-card-widget="collapse" title="Collapse"></button>
|
||||
<button type="button" class="btn btn-tool" data-card-widget="remove" title="Remove">
|
||||
<i class="fas fa-times"></i>
|
||||
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@*条件筛选*@
|
||||
</div>
|
||||
@*内容筛选*@
|
||||
<div class="ibox-content" style="padding:0px;">
|
||||
|
||||
<div id="project">
|
||||
<table class="table dataTables-example" border="0">
|
||||
<tbody class="tbodyList">
|
||||
<tr>
|
||||
<td rowspan="5" style="margin:0px;padding:0px;width:75px">
|
||||
<input type="hidden" id="ID" value="2">
|
||||
<div class="lightBoxGallery">
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td style="text-align:left;width:60%;">编号:<span class="gray"></span></td>
|
||||
<td style="color:#6495ED;"><strong>asdas</strong></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="font-size:15px;">创建时间:<span class="gray">asd</span> </td>
|
||||
<td>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" style="font-size:15px;">
|
||||
属于部门:<span class="gray">asdasd)</span>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr></tr>
|
||||
<tr>
|
||||
<td rowspan="2" colspan="2" style="font-size:15px;">
|
||||
是否有效:<span class="gray">
|
||||
xsd
|
||||
</span>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card -->
|
||||
<div class="col-sm-4" id="userDetailsBox">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
7
Face.Web/Areas/App/Views/Face/DeletePeople.cshtml
Normal file
7
Face.Web/Areas/App/Views/Face/DeletePeople.cshtml
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
@{
|
||||
ViewBag.Title = "DeletePeople";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
@model List<Face.Domain.Entities.pmsLog>
|
||||
|
||||
|
||||
@if (Model != null)
|
||||
{
|
||||
foreach (var item in Model)
|
||||
{
|
||||
<tbody class="tbodyList">
|
||||
<tr>
|
||||
<td style="text-align:left;width:30%;">@(item.step==3? "Tx" : "Rx")时间:</td>
|
||||
<td style="">@(item.step==3? "Tx" : "Rx")内容:</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: left; width: 30%;"><span class="gray">@item.Creationtime</span></td>
|
||||
<td style="word-break: break-all;"><span style="color:#0094ff">@item.Data</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
}
|
||||
}
|
||||
596
Face.Web/Areas/App/Views/Face/Faceall.cshtml
Normal file
596
Face.Web/Areas/App/Views/Face/Faceall.cshtml
Normal file
@@ -0,0 +1,596 @@
|
||||
@model PagedList.IPagedList<Face.Domain.Entities.DeviceManage>
|
||||
@using PagedList.Mvc;
|
||||
@using Face.Web.Areas.App.Models;
|
||||
@using Face.Domain.Entities;
|
||||
@using Face.Domain.Application
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Faceall";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
List<Face.Domain.Entities.Hotels> Hotellist =(List<Face.Domain.Entities.Hotels>) Session["qxHotels"];
|
||||
List<AuthItem> authItem = (List<AuthItem>)Session["authItems"];
|
||||
List<TBL_ROOM_BASIC_INFO> ZongRoominfo = (List<TBL_ROOM_BASIC_INFO>)Session["ZongRoominfo"];
|
||||
}
|
||||
|
||||
@*<script src="~/Scripts/jquery-3.3.1.js"></script>*@
|
||||
<style>
|
||||
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
#order {
|
||||
border-top: solid 2px #ddd;
|
||||
}
|
||||
|
||||
.chaxun {
|
||||
text-indent: 5px;
|
||||
}
|
||||
|
||||
.PagedList-skipToLast page-item {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<section class="content" style="padding:0px;">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<!-- Default box -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<span style="font-size:30px">所有人脸机信息</span>
|
||||
<div class="card-tools">
|
||||
<button type="button" class="btn btn-tool" data-card-widget="collapse" title="Collapse"></button>
|
||||
<button type="button" class="btn btn-tool" data-card-widget="remove" title="Remove">
|
||||
<i class="fas fa-times"></i>
|
||||
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<input type="text" placeholder="人脸机筛选" name="username" style="height:35px;margin-left:5px;" id="txtOpname"><button class="btn btn-md btn-primary" id="Btnmodify" onclick="search()">搜索</button>
|
||||
@*<input type="text" placeholder="房间筛选" name="username" style="height:35px;margin-left:5px;" id="txtroom"><button class="btn btn-md btn-primary" id="Btnmodify" onclick="selectroom()">搜索</button>*@
|
||||
<select class="form-control" id="OrgId" style="width:300px; float:left">
|
||||
@if (ViewData["hotelson"] != null && int.Parse(ViewData["hotelson"].ToString()) != 0 && ViewData["hotelson"].ToString() != "-1")
|
||||
{
|
||||
<option value="@ViewData["hotelson"]">
|
||||
@(Hotellist.Single(s => s.Id == int.Parse(ViewData["hotelson"].ToString())).Name)
|
||||
</option>
|
||||
}
|
||||
<option value="0">
|
||||
所有酒店
|
||||
</option>
|
||||
@{
|
||||
List<int> sum = (List<int>)Session["list"];
|
||||
foreach (int item in sum)
|
||||
{
|
||||
foreach (var iten in Hotellist)
|
||||
{
|
||||
if (iten.Id == item)
|
||||
{
|
||||
if (ViewData["hotelson"] != null)
|
||||
{
|
||||
if (iten.Id != int.Parse(ViewData["hotelson"].ToString()))
|
||||
{
|
||||
|
||||
<option class="ComboBox" value="@iten.Id" )>
|
||||
@iten.Name
|
||||
</option>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<option class="ComboBox" value="@iten.Id" )>
|
||||
@iten.Name
|
||||
</option>
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < authItem.Count; i++)
|
||||
{
|
||||
if (authItem[i].AuthorityId == 3)
|
||||
{
|
||||
<option value="-1" @(ViewData["hotelson"] != null && ViewData["hotelson"].ToString() == "-1" ? "selected='selected'" : "")>
|
||||
未绑定酒店
|
||||
</option>
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</select>
|
||||
<select class="form-control" id="OrgId3" style="width:300px; float:left">
|
||||
<option value="-1" @(ViewData["states"] != null && int.Parse(ViewData["states"].ToString()) == -1 ? "selected='selected'" : "")>
|
||||
全部人脸机
|
||||
</option>
|
||||
<option value="1" @(ViewData["states"] != null && int.Parse(ViewData["states"].ToString()) == 1 ? "selected='selected'" : "")>在线</option>
|
||||
<option value="0" @(ViewData["states"] != null && int.Parse(ViewData["states"].ToString()) == 0 ? "selected='selected'" : "")>不在线</option>
|
||||
</select>
|
||||
|
||||
|
||||
<select class="form-control" id="OrgId2" style="width:300px; float:left">
|
||||
|
||||
<option value="0">
|
||||
全部房间
|
||||
</option>
|
||||
|
||||
<option value="1" @(ViewData["zhi"] != null && ViewData["zhi"].ToString() == "1" ? "selected='selected'" : "")>
|
||||
未绑定房间
|
||||
</option>
|
||||
<option value="3" @(ViewData["zhi"] != null && ViewData["zhi"].ToString() == "3" ? "selected='selected'" : "")>
|
||||
已绑定房间
|
||||
</option>
|
||||
|
||||
@{
|
||||
|
||||
}
|
||||
</select>
|
||||
|
||||
</div>
|
||||
@*条件筛选*@
|
||||
@*内容筛选*@
|
||||
<div class="ibox-content" style="padding:0px;">
|
||||
<div id="project">
|
||||
<table class="table dataTables-example" border="0" id="order">
|
||||
@if (Model != null && ZongRoominfo != null)
|
||||
{
|
||||
foreach (var item in Model)
|
||||
{
|
||||
|
||||
<tbody class="tbodyList" onclick="Show(this)">
|
||||
<tr>
|
||||
<td rowspan="5" style="margin:0px;padding:0px; ">
|
||||
<input type="hidden" id="ID" value="2">
|
||||
<div class="lightBoxGallery">
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td id="mobile" style="text-align:left; ">编号: @Html.DisplayFor(modelItem => item.Facelid)<span class="gray"></span></td>
|
||||
<td style="" id="mobile2">
|
||||
状态:<span style="color:#0094ff" id="@item.SerialNo">
|
||||
@{if (item.Status == true)
|
||||
{<strong>在线</strong>}
|
||||
else
|
||||
{<strong style="color:crimson">离线</strong>}
|
||||
}
|
||||
</span>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr></tr>
|
||||
<tr>
|
||||
<td>
|
||||
创建时间:
|
||||
@if (item.CreatedDate != null)
|
||||
{
|
||||
@item.CreatedDate.Value.ToString("yyyy/MM/dd")
|
||||
}
|
||||
</td>
|
||||
@{ TBL_ROOM_BASIC_INFO isok = ZongRoominfo.FirstOrDefault(s => s.ROOM_OLD_ID == item.RoomId); }
|
||||
<td>绑定房间: @(item.RoomId.ToString() != "" ? (isok == null ? "" : isok.ROOM_NUMBER) : "无房间") </td>
|
||||
@if (item.RoomId == null && item.RoomId.ToString() == "" && item.HotelCode != null && item.HotelCode != "")
|
||||
{
|
||||
<td><button class="btn btn-xs btn-success" id="btnaddPLine" onclick="addhotel('@item.SerialNo','@item.HotelCode')" style="background-color:cornflowerblue">绑定房间</button></td>
|
||||
}
|
||||
else if (item.RoomId != null && item.HotelCode != null)
|
||||
{
|
||||
<td><button class="btn btn-xs btn-success" id="btnaddPLine" onclick="unbundleBtn('@item.SerialNo','@item.HotelCode','@item.RoomId')" style="background-color:brown">解绑房间</button></td>
|
||||
|
||||
}
|
||||
</tr>
|
||||
<tr>
|
||||
<td>SN号:@Html.DisplayFor(modelItem => item.SerialNo)</td>
|
||||
<td>
|
||||
故障状态:
|
||||
@if (item.maintainStatus == 1)
|
||||
{
|
||||
<span style="color:crimson;cursor:hand" onclick="trouble(@item.Facelid)">故障</span>
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
<span style="color:#0094ff">正常</span>
|
||||
}
|
||||
|
||||
</td>
|
||||
|
||||
@{
|
||||
|
||||
for (int i = 0; i < authItem.Count; i++)
|
||||
{
|
||||
|
||||
if (authItem[i].AuthorityId == 4)
|
||||
{
|
||||
if (item.HotelCode != null && item.HotelCode != "")
|
||||
{
|
||||
if (item.Status == true)
|
||||
{
|
||||
|
||||
<td><a href="#asd"></a><button class="btn btn-xs btn-success" id="btnaddPLine" onclick="transfer('@item.SerialNo','@item.HotelCode')">测试操作</button></td>
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
绑定酒店: @(Html.DisplayFor(modelItem => item.HotelCode).ToString() != "" ? Hotellist.Single(s => s.Id == int.Parse(item.HotelCode)) != null ? Hotellist.Single(s => s.Id == int.Parse(item.HotelCode)).Name : "" : "")
|
||||
</td>
|
||||
@*<td>
|
||||
人脸数量:
|
||||
@{ int ser = 0;
|
||||
foreach (var info in ViewBag.sungo)
|
||||
{
|
||||
if (info.Roomid == item.RoomId)
|
||||
{
|
||||
ser++;
|
||||
}
|
||||
}
|
||||
}
|
||||
<span>@ser</span>
|
||||
</td>*@
|
||||
<td>
|
||||
开房状态:
|
||||
@if (item.RoomId != null && item.RoomId != 0)
|
||||
{
|
||||
if (isok != null && isok.ToString() != "")
|
||||
{
|
||||
if (isok.ROOM_TYPE_ID == 2)
|
||||
{
|
||||
<span> 出租 </span>
|
||||
}
|
||||
else if (isok.ROOM_TYPE_ID == 4)
|
||||
{
|
||||
<span> 待租 </span>
|
||||
}
|
||||
else if (isok.ROOM_TYPE_ID == 8)
|
||||
{
|
||||
<span> 退房 </span>
|
||||
}
|
||||
else if (isok.ROOM_TYPE_ID == 16)
|
||||
{
|
||||
<span> 空房 </span>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<span></span>
|
||||
}
|
||||
}
|
||||
</td>
|
||||
@if (item.HotelCode != "" && item.HotelCode != null)
|
||||
{
|
||||
<td><a href="@Url.Action("Facetest", "Face")"></a> <button class="btn btn-xs btn-success" id="btnaddPLine" onclick="Unlinkhotel('@item.SerialNo','@item.HotelCode','@item.RoomId')" style="background-color:red">解绑酒店</button></td>
|
||||
}
|
||||
else
|
||||
{
|
||||
<td><a href="@Url.Action("Facetest", "Face")"></a> <button class="btn btn-xs btn-success" id="btnaddPLine" style="background-color:cornflowerblue" onclick="bingdihotel('@item.SerialNo')">绑定酒店</button></td>
|
||||
}
|
||||
|
||||
</tr>
|
||||
|
||||
@{
|
||||
List<CheckInInfo> ci = (List<CheckInInfo>)ViewData["sungo"];
|
||||
foreach (var info in ci)
|
||||
{
|
||||
if (info.Roomid == item.RoomId)
|
||||
{
|
||||
|
||||
<tr class="acet" style="border-top: 1px solid #0b93d5;">
|
||||
<td></td>
|
||||
<td><img id="images" style="height:50px;" src="/ImgServer/FileImage?ftp=1&&url=@info.picture">@info.Name</td>
|
||||
@*<td>开房时间:@info.CheckTime</td>*@
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="acet">
|
||||
<td></td>
|
||||
<td>身份证:@info.IdNumber</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
}
|
||||
</tbody>
|
||||
}
|
||||
|
||||
}
|
||||
</table>
|
||||
|
||||
<div style="text-align:center" class="chaxun" id="asd">
|
||||
@*分页主要代码*@
|
||||
共 @Model.PageCount 页,当前第 @Model.PageNumber 页
|
||||
<nav aria-label="Contacts Page Navigation">
|
||||
<ul class="pagination justify-content-center m-0">
|
||||
|
||||
|
||||
@if (ViewData["TiaoJian"] != null)
|
||||
{
|
||||
string TiaoJian = ViewData["TiaoJian"].ToString();
|
||||
@Html.PagedListPager(Model, page => Url.Action("Faceall", new { page, TiaoJian }), new PagedListRenderOptions() { DisplayItemSliceAndTotal = false, MaximumPageNumbersToDisplay = 5 });
|
||||
}
|
||||
else if (ViewData["hotelson"] != null)
|
||||
{
|
||||
string hotelson = ViewData["hotelson"].ToString();
|
||||
@Html.PagedListPager(Model, page => Url.Action("Faceall", new { page, hotelson }), new PagedListRenderOptions() { DisplayItemSliceAndTotal = false, MaximumPageNumbersToDisplay = 5 })
|
||||
}
|
||||
else if (ViewData["notbing"] != null)
|
||||
{
|
||||
string notbing = ViewData["notbing"].ToString();
|
||||
@Html.PagedListPager(Model, page => Url.Action("Faceall", new { page, notbing }), new PagedListRenderOptions() { DisplayItemSliceAndTotal = false, MaximumPageNumbersToDisplay = 5 })
|
||||
}
|
||||
else if (ViewData["zhi"] != null)
|
||||
{
|
||||
int zhi = int.Parse(ViewData["zhi"].ToString());
|
||||
@Html.PagedListPager(Model, page => Url.Action("Faceall", new { page, zhi }), new PagedListRenderOptions() { DisplayItemSliceAndTotal = false, MaximumPageNumbersToDisplay = 5 })
|
||||
}
|
||||
else if (ViewData["states"] != null)
|
||||
{
|
||||
int state = int.Parse(ViewData["states"].ToString());
|
||||
@Html.PagedListPager(Model, page => Url.Action("Faceall", new { page, state }), new PagedListRenderOptions() { DisplayItemSliceAndTotal = false, MaximumPageNumbersToDisplay = 5 })
|
||||
}
|
||||
else
|
||||
{
|
||||
@Html.PagedListPager(Model, page => Url.Action("Faceall", new { page }), new PagedListRenderOptions() { DisplayItemSliceAndTotal = false, MaximumPageNumbersToDisplay = 5 })
|
||||
}
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div id="btn" onclick="tip()"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- /.card -->
|
||||
<div class="col-sm-4" id="faceDetailsBox">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$('.acet').hide();//隐藏
|
||||
|
||||
$(".pagination").addClass("pagination pagination-sm");
|
||||
$(".pagination").children("li").addClass("page-item");
|
||||
$(".page-item").children("a").addClass("page-link");
|
||||
|
||||
if ($(document).width() >= 764) {
|
||||
}
|
||||
else {
|
||||
$(".content-wrapper *").css("font-size", "10px");
|
||||
|
||||
}
|
||||
$(".pagination").addClass("pagination pagination-sm");
|
||||
//$(".pagination").children("li").addClass("page-item");//分页样式
|
||||
$(".page-item").children("a").addClass("page-link");
|
||||
|
||||
function transfer(sn, hotelcode) {
|
||||
event.stopPropagation()
|
||||
if ($(document).width() < 764)
|
||||
{
|
||||
$('html,body').animate({ scrollTop: $('#btn').offset().top }, 1); //页面滚动到底部
|
||||
}
|
||||
|
||||
var data = {
|
||||
faceNo: sn,
|
||||
hotel: hotelcode
|
||||
}
|
||||
//var t = document.body.clientHeight;
|
||||
//window.scroll({ top: t, left: 0, behavior: 'smooth' });
|
||||
$.ajax({
|
||||
url: "/App/Face/Facetest",
|
||||
data: { data }, // data为String类型,必须为 Key/Value 格式。
|
||||
type: "post", // 提交方式
|
||||
success: function (res) { // 请求成功后的回调函数,其中的参数data为controller返回的map,也就是说,然后通过data这个参数取JSON数据中的值
|
||||
$("#faceDetailsBox").html(res)
|
||||
}
|
||||
});
|
||||
};
|
||||
function addhotel(sn) {
|
||||
$.ajax({
|
||||
url: "/App/Face/BingInfo",
|
||||
data: { "sn": sn }, // data为String类型,必须为 Key/Value 格式。
|
||||
type: "post", // 提交方式
|
||||
success: function (res) { // 请求成功后的回调函数,其中的参数data为controller返回的map,也就是说,然后通过data这个参数取JSON数据中的值
|
||||
$("#faceDetailsBox").html(res)
|
||||
}
|
||||
});
|
||||
}
|
||||
function bingdihotel(sn) {
|
||||
$.ajax({
|
||||
url: "/App/Face/Bing",
|
||||
data: { "StrNo": sn }, // data为String类型,必须为 Key/Value 格式。
|
||||
type: "post", // 提交方式
|
||||
success: function (res) { // 请求成功后的回调函数,其中的参数data为controller返回的map,也就是说,然后通过data这个参数取JSON数据中的值
|
||||
$("#faceDetailsBox").html(res)
|
||||
}
|
||||
});
|
||||
}
|
||||
/////////////////////////////
|
||||
|
||||
function tip() {//更新状态
|
||||
$.ajax({
|
||||
url: "/App/Face/Status",
|
||||
type: "post", // 提交方式
|
||||
dataType: "json",
|
||||
success: function (res) {
|
||||
res.forEach(x => {
|
||||
$("#" + x.SerialNo).html(x.Status ? "<strong>在线</strong>" : "<strong>离线</strong>")
|
||||
$("#" + x.SerialNo).css("color", x.Status ? "#0094ff" : "crimson")
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
var myVar;
|
||||
function myFunction() {
|
||||
myVar = setInterval(function () {
|
||||
// IE浏览器
|
||||
if (document.all) {
|
||||
document.getElementById("btn").click();
|
||||
}
|
||||
// 其它浏览器
|
||||
else {
|
||||
var e = document.createEvent("MouseEvents");
|
||||
e.initEvent("click", true, true);
|
||||
document.getElementById("btn").dispatchEvent(e);
|
||||
}
|
||||
}, 20000);
|
||||
}
|
||||
function selectroom() {//查询房间号按钮
|
||||
|
||||
var src = document.getElementById("txtroom").value
|
||||
var link = "/App/Face/Faceall" + '?TiaoJian=' + src
|
||||
window.location.href = link;
|
||||
}
|
||||
function search() {//查询SN号按钮
|
||||
|
||||
var src = document.getElementById("txtOpname").value
|
||||
var link = "/App/Face/Faceall" + '?TiaoJian=' + src
|
||||
window.location.href = link;
|
||||
}
|
||||
myFunction();
|
||||
|
||||
$('#OrgId').change(function () {//查询酒店按钮
|
||||
|
||||
var myType = document.getElementById("OrgId");//获取select对象
|
||||
var index = myType.selectedIndex;//获取选项中的索引,selectIndex表示的是当前所选中的index
|
||||
var code = myType.options[index].value;//获取酒店编号
|
||||
var link = "/App/Face/Faceall" + '?hotelson=' + code
|
||||
window.location.href = link;
|
||||
})
|
||||
function notallocation() {//查询没有绑定酒店的人脸机
|
||||
var link = "/App/Face/Faceall" + '?notbing=' + 1
|
||||
window.location.href = link;
|
||||
}
|
||||
$('#OrgId2').change(function () {//查询酒店按钮
|
||||
var myType1 = document.getElementById("OrgId");//获取select对象
|
||||
var index1 = myType1.selectedIndex;//获取选项中的索引,selectIndex表示的是当前所选中的index
|
||||
var code1 = myType1.options[index1].value;//获取酒店编号
|
||||
var myType = document.getElementById("OrgId2");//获取select对象
|
||||
var index = myType.selectedIndex;//获取选项中的索引,selectIndex表示的是当前所选中的index
|
||||
var code = myType.options[index].value;//获取酒店编号
|
||||
if (code1 != 0) {
|
||||
var link = "/App/Face/Faceall" + '?zhi=' + code + '&hotelson=' + code1
|
||||
window.location.href = link;
|
||||
|
||||
} else {
|
||||
var link = "/App/Face/Faceall" + '?zhi=' + code
|
||||
window.location.href = link;
|
||||
}
|
||||
})
|
||||
$('#OrgId3').change(function () {//查询酒店按钮
|
||||
var myType1 = document.getElementById("OrgId");//获取select对象
|
||||
var index1 = myType1.selectedIndex;//获取选项中的索引,selectIndex表示的是当前所选中的index
|
||||
var code1 = myType1.options[index1].value;//获取酒店编号
|
||||
var myType = document.getElementById("OrgId3");//获取select对象
|
||||
var index = myType.selectedIndex;//获取选项中的索引,selectIndex表示的是当前所选中的index
|
||||
var code = myType.options[index].value;//获取状态
|
||||
var link = "/App/Face/Faceall" + '?state=' + code + '&hotelson=' + code1
|
||||
|
||||
window.location.href = link;
|
||||
})
|
||||
function addhotel(sn, jiu) {
|
||||
var t = document.body.clientHeight;
|
||||
window.scroll({ top: t, left: 0, behavior: 'smooth' });
|
||||
var inse = {
|
||||
faceNo: sn,
|
||||
hotel: jiu
|
||||
}
|
||||
$.ajax({
|
||||
url: "/App/Face/BingInfo",
|
||||
data: inse, // data为String类型,必须为 Key/Value 格式。
|
||||
type: "post", // 提交方式
|
||||
success: function (res) { // 请求成功后的回调函数,其中的参数data为controller返回的map,也就是说,然后通过data这个参数取JSON数据中的值
|
||||
$("#faceDetailsBox").html(res)
|
||||
}
|
||||
});
|
||||
}
|
||||
function unbundleBtn(sn, hotels, room) {
|
||||
var list = {
|
||||
faceNo: sn,
|
||||
romm: room,
|
||||
hotel: hotels
|
||||
}
|
||||
var srt = confirm("确定要解绑房间吗?")
|
||||
if (srt == true) {
|
||||
$.ajax({
|
||||
url: "/App/Face/unbundleoperate",
|
||||
data: list,
|
||||
type: "post",// 提交方式
|
||||
|
||||
success: function (res) {
|
||||
if (res.Status == 200) {
|
||||
console.log(res.Status)
|
||||
alert('解绑成功')
|
||||
var link = "/App/Face/Faceall" + '?page=' + @Session["page"];
|
||||
window.location.href = link;
|
||||
}
|
||||
else {
|
||||
alert('解绑失败请查看人脸机是否在线')
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
function Unlinkhotel(sn, hotels, room) {
|
||||
var list = {
|
||||
faceNo: sn,
|
||||
romm: room,
|
||||
hotel: hotels
|
||||
}
|
||||
var s = confirm("确定要解绑酒店?")
|
||||
if (s == true) {
|
||||
$.ajax({
|
||||
url: "/App/Face/unbundlehotel",
|
||||
data: list,
|
||||
type: "post",// 提交方式
|
||||
success: function (res) {
|
||||
if (res.Status == 200) {
|
||||
alert('解绑酒店成功')
|
||||
var link = "/App/Face/Faceall" + '?page=' + @Session["page"];
|
||||
window.location.href = link;
|
||||
}
|
||||
else {
|
||||
alert('解绑失败请查看人脸机是否在线')
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function trouble(id) {
|
||||
var s = confirm("确定人工修复?")
|
||||
if (s == true) {
|
||||
$.ajax({
|
||||
url: "/App/Face/faultmaintain",
|
||||
data: { 'id': id },
|
||||
type: "post",
|
||||
success: function (res) {
|
||||
if (res != null) {
|
||||
alert('已正常')
|
||||
var link = "/App/Face/Faceall" + '?page=' + @Session["page"];
|
||||
window.location.href = link;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function Show(that) {
|
||||
$(that).find('.acet').toggle();
|
||||
}
|
||||
</script>
|
||||
1414
Face.Web/Areas/App/Views/Face/Facetest.cshtml
Normal file
1414
Face.Web/Areas/App/Views/Face/Facetest.cshtml
Normal file
File diff suppressed because it is too large
Load Diff
103
Face.Web/Areas/App/Views/Face/InquireFaceLogAll.cshtml
Normal file
103
Face.Web/Areas/App/Views/Face/InquireFaceLogAll.cshtml
Normal file
@@ -0,0 +1,103 @@
|
||||
@model List<Face.Domain.Application.FaceAll.facedevicerxtxinfo>
|
||||
@using PagedList.Mvc;
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
<style>
|
||||
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
|
||||
padding: 3px;
|
||||
}
|
||||
#order {
|
||||
border-top: solid 2px #ddd;
|
||||
}
|
||||
.chaxun {
|
||||
text-indent: 5px;
|
||||
}
|
||||
|
||||
.PagedList-skipToLast page-item {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<div id="project">
|
||||
<table class="table dataTables-example" border="0" id="order" style="word-break: break-all;">
|
||||
@if (Model != null)
|
||||
{
|
||||
foreach (var item in Model)
|
||||
{
|
||||
|
||||
<tbody class="tbodyList">
|
||||
<tr>
|
||||
<td rowspan="5" style="margin:0px;padding:0px; ">
|
||||
<input type="hidden" id="ID" value="2">
|
||||
<div class="lightBoxGallery">
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td id="mobile" style="text-align:left; ">
|
||||
<span style="color:#0094ff;">
|
||||
@if (item.datatime != null)
|
||||
{
|
||||
@item.datatime.Value.ToString("yyyy/MM/dd HH:mm:ss")
|
||||
}
|
||||
</span>
|
||||
</td>
|
||||
<td style="" id="mobile2"><span style="color: darkgray;">序列号:</span><span style="color:#0094ff"><strong>@item.sn</strong></span> <span style="color: darkgray;">pmsid: @item.pmsid</span></td>
|
||||
</tr>
|
||||
<tr></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span style="color: darkgray;">命令: </span><span style="color:#0094ff;">@item.cmd</span>
|
||||
</td>
|
||||
<td>
|
||||
@{
|
||||
string colorfinal = "#28a745;";
|
||||
string strtext = "";
|
||||
if (item.trresult == 0 && item.direction == "Tx")
|
||||
{
|
||||
colorfinal = "crimson";
|
||||
strtext = "失败";
|
||||
}
|
||||
else
|
||||
{
|
||||
colorfinal = "#28a745;";
|
||||
strtext = "成功";
|
||||
}
|
||||
}
|
||||
<span style="color:@colorfinal">@item.direction</span><span style="color:@colorfinal">- @strtext</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" style="color:darkgray;font-size:smaller;">@item.data</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
}
|
||||
|
||||
}
|
||||
</table>
|
||||
@*<div id="btn" onclick="tip()"></div>*@
|
||||
<div>
|
||||
<nav style="text-align:center;">
|
||||
<ul class="pagination" id="page">
|
||||
<li class="first" onclick="firstPage16('/App/Face/InquireFaceLogAll')"><a>«</a></li>
|
||||
<li class="left"><a>…</a></li>
|
||||
@for (int i = 0; i < ViewBag.allpage; i++)
|
||||
{
|
||||
<li class="pages" onclick="SpecifyPage16('/App/Face/InquireFaceLogAll',@(i+1))"><a>@(i + 1)</a></li>
|
||||
}
|
||||
<li class="right"><a>…</a></li>
|
||||
<li class="finally"><a onclick="lastPage16('/App/Face/InquireFaceLogAll')">»</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
$(".pagination").addClass("pagination pagination-sm");
|
||||
$(".pagination").children("li").addClass("page-item");
|
||||
$(".page-item").children("a").addClass("page-link");
|
||||
|
||||
</script>
|
||||
358
Face.Web/Areas/App/Views/Face/InquireFaceall.cshtml
Normal file
358
Face.Web/Areas/App/Views/Face/InquireFaceall.cshtml
Normal file
@@ -0,0 +1,358 @@
|
||||
@model List<Face.Domain.Entities.DeviceManage>
|
||||
@using PagedList.Mvc;
|
||||
@using Face.Web.Areas.App.Models;
|
||||
@using Face.Domain.Entities;
|
||||
@using Face.Domain.Application
|
||||
@{
|
||||
List<Face.Domain.Entities.Hotels> Hotellist = SqlSugarBase.authoriydb.Queryable<Hotels>().ToList();
|
||||
List<AuthItem> authItem = (List<AuthItem>)Session["authItems"];
|
||||
List<TBL_ROOM_BASIC_INFO> ZongRoominfo = (List<TBL_ROOM_BASIC_INFO>)Session["ZongRoominfo"];
|
||||
}
|
||||
<style>
|
||||
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
#order {
|
||||
border-top: solid 2px #ddd;
|
||||
}
|
||||
|
||||
.chaxun {
|
||||
text-indent: 5px;
|
||||
}
|
||||
|
||||
.PagedList-skipToLast page-item {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<div id="project">
|
||||
<table class="table dataTables-example" border="0" id="order">
|
||||
@if (Model != null && ZongRoominfo != null)
|
||||
{
|
||||
foreach (var item in Model)
|
||||
{
|
||||
|
||||
<tbody class="tbodyList" onclick="Show(this)">
|
||||
<tr>
|
||||
<td rowspan="5" style="margin:0px;padding:0px; ">
|
||||
<input type="hidden" id="ID" value="2">
|
||||
<div class="lightBoxGallery">
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td id="mobile" style="text-align:left; ">编号: @item.Facelid<span class="gray"></span></td>
|
||||
<td style="" id="mobile2">
|
||||
状态:<span style="color:#0094ff" id="@item.SerialNo">
|
||||
@{if (item.Status == true)
|
||||
{<strong>在线</strong>}
|
||||
else
|
||||
{<strong style="color:crimson">离线</strong>}
|
||||
}
|
||||
</span>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr></tr>
|
||||
<tr>
|
||||
<td>
|
||||
创建时间:
|
||||
@if (item.CreatedDate != null)
|
||||
{
|
||||
@item.CreatedDate.Value.ToString("yyyy/MM/dd")
|
||||
}
|
||||
</td>
|
||||
@{ TBL_ROOM_BASIC_INFO isok = ZongRoominfo.FirstOrDefault(s => s.ROOM_OLD_ID == item.RoomId); }
|
||||
<td>绑定房间: @(item.RoomId.ToString() != ""&& item.RoomId.ToString() != "0" ? (isok == null ? "" : isok.ROOM_NUMBER) : "无房间") </td>
|
||||
@if ((item.RoomId == null || item.RoomId.ToString() == "" || item.RoomId.ToString() == "0") && item.HotelCode != null && item.HotelCode != "" && item.HotelCode != "0")
|
||||
{
|
||||
<td><button class="btn btn-xs btn-success" id="btnaddPLine" onclick="addhotel('@item.SerialNo','@item.HotelCode')" style="background-color:cornflowerblue">绑定房间</button></td>
|
||||
}
|
||||
else if (item.RoomId != null && item.HotelCode != null && item.RoomId != 0)
|
||||
{
|
||||
<td><button class="btn btn-xs btn-success" id="btnaddPLine" onclick="unbundleBtn('@item.SerialNo','@item.HotelCode','@item.RoomId')" style="background-color:brown">解绑房间</button></td>
|
||||
}
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
SN号:@item.SerialNo
|
||||
(REV:@if (item.APKVersion == " " || item.APKVersion == null)
|
||||
{
|
||||
<span>无,</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>@item.APKVersion,</span>
|
||||
|
||||
}
|
||||
厂牌:@if (item.Factory == " " || item.Factory == null)
|
||||
{
|
||||
<span>无</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>@item.Factory</span>
|
||||
|
||||
})
|
||||
</td>
|
||||
<td>
|
||||
故障状态:
|
||||
@if (item.maintainStatus == 1)
|
||||
{
|
||||
<span style="color:crimson;cursor:hand" onclick="trouble(@item.Facelid)">故障</span>
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
<span style="color:#0094ff">正常</span>
|
||||
}
|
||||
</td>
|
||||
@{
|
||||
for (int i = 0; i < authItem.Count; i++)
|
||||
{
|
||||
if (authItem[i].AuthorityId == 4)
|
||||
{
|
||||
if (item.HotelCode != null && item.HotelCode != "")
|
||||
{
|
||||
if (item.Status == true)
|
||||
{
|
||||
|
||||
<td><a href="#asd"></a><button class="btn btn-xs btn-success" id="btnaddPLine" onclick="transfer('@item.SerialNo','@item.HotelCode')">测试操作</button></td>
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@if (item.HotelCode != null && item.HotelCode != "0")
|
||||
{
|
||||
<td>
|
||||
绑定酒店: @(item.HotelCode.ToString() != "" && int.Parse(item.HotelCode) != 0 ? Hotellist.Single(s => s.Id == int.Parse(item.HotelCode)) != null ? Hotellist.Single(s => s.Id == int.Parse(item.HotelCode)).Name : "" : "")
|
||||
</td>
|
||||
|
||||
}
|
||||
<td>
|
||||
开房状态:
|
||||
@if (item.RoomId != null && item.RoomId != 0)
|
||||
{
|
||||
if (isok != null && isok.ToString() != "")
|
||||
{
|
||||
if (isok.RoomStatusID == 2)
|
||||
{
|
||||
<span> 出租 </span>
|
||||
}
|
||||
else if (isok.RoomStatusID == 4)
|
||||
{
|
||||
<span> 待租 </span>
|
||||
}
|
||||
else if (isok.RoomStatusID == 8)
|
||||
{
|
||||
<span> 退房 </span>
|
||||
}
|
||||
else if (isok.RoomStatusID == 16)
|
||||
{
|
||||
<span> 空房 </span>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<span></span>
|
||||
}
|
||||
}
|
||||
</td>
|
||||
@if (item.HotelCode != "" && item.HotelCode != null && item.HotelCode != "0")
|
||||
{
|
||||
<td><a href="@Url.Action("Facetest", "Face")"></a> <button class="btn btn-xs btn-success" id="btnaddPLine" onclick="Unlinkhotel('@item.SerialNo','@item.HotelCode','@item.RoomId')" style="background-color:red">解绑酒店</button></td>
|
||||
}
|
||||
else
|
||||
{
|
||||
<td><a href="@Url.Action("Facetest", "Face")"></a> <button class="btn btn-xs btn-success" id="btnaddPLine" style="background-color:cornflowerblue" onclick="bingdihotel('@item.SerialNo')">绑定酒店</button></td>
|
||||
}
|
||||
|
||||
</tr>
|
||||
|
||||
@{
|
||||
List<CheckInInfo> ci = (List<CheckInInfo>)ViewData["sungo"];
|
||||
foreach (var info in ci)
|
||||
{
|
||||
if (info.Roomid == item.RoomId)
|
||||
{
|
||||
|
||||
<tr class="acet" style="border-top: 1px solid #0b93d5;">
|
||||
<td></td>
|
||||
<td><img id="images" style="height:50px;" src="/ImgServer/FileImage?ftp=1&&url=@info.picture">@info.Name</td>
|
||||
@*<td>开房时间:@info.CheckTime</td>*@
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr class="acet">
|
||||
<td></td>
|
||||
<td>身份证:@info.IdNumber</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
}
|
||||
</tbody>
|
||||
}
|
||||
|
||||
}
|
||||
</table>
|
||||
@*<div id="btn" onclick="tip()"></div>*@
|
||||
<div>
|
||||
<nav style="text-align:center;">
|
||||
<ul class="pagination" id="page">
|
||||
<li class="first" onclick="firstPage('/App/Face/InquireFaceall')"><a>«</a></li>
|
||||
<li class="left"><a>…</a></li>
|
||||
@for (int i = 0; i < ViewBag.allpage; i++)
|
||||
{
|
||||
<li class="pages" onclick="SpecifyPage('/App/Face/InquireFaceall',@(i+1))"><a>@(i + 1)</a></li>
|
||||
}
|
||||
<li class="right"><a>…</a></li>
|
||||
<li class="finally"><a onclick="lastPage('/App/Face/InquireFaceall')">»</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
$(".pagination").addClass("pagination pagination-sm");
|
||||
$(".pagination").children("li").addClass("page-item");
|
||||
$(".page-item").children("a").addClass("page-link");
|
||||
|
||||
|
||||
|
||||
function bingdihotel(sn) {
|
||||
$.ajax({
|
||||
url: "/App/Face/Bing",
|
||||
data: { "StrNo": sn }, // data为String类型,必须为 Key/Value 格式。
|
||||
type: "post", // 提交方式
|
||||
success: function (res) { // 请求成功后的回调函数,其中的参数data为controller返回的map,也就是说,然后通过data这个参数取JSON数据中的值
|
||||
$("#faceDetailsBox").html(res)
|
||||
}
|
||||
});
|
||||
}
|
||||
$('.acet').hide();//隐藏
|
||||
|
||||
function transfer(sn, hotelcode) {
|
||||
event.stopPropagation();
|
||||
//if ($(document).width() < 764) {
|
||||
// $('html,body').animate({ scrollTop: $('#btn').offset().top }, 1); //页面滚动到底部
|
||||
//}
|
||||
var data = {
|
||||
faceNo: sn,
|
||||
hotel: hotelcode
|
||||
}
|
||||
$.ajax({
|
||||
url: "/App/Face/Facetest",
|
||||
data: { data }, // data为String类型,必须为 Key/Value 格式。
|
||||
type: "post", // 提交方式
|
||||
success: function (res) { // 请求成功后的回调函数,其中的参数data为controller返回的map,也就是说,然后通过data这个参数取JSON数据中的值
|
||||
$("#faceDetailsBox").html(res)
|
||||
}
|
||||
});
|
||||
};
|
||||
function Unlinkhotel(sn, hotels, room) {
|
||||
var list = {
|
||||
faceNo: sn,
|
||||
romm: room,
|
||||
hotel: hotels
|
||||
}
|
||||
var s = confirm("确定要解绑酒店?")
|
||||
if (s == true) {
|
||||
$.ajax({
|
||||
url: "/App/Face/unbundlehotel",
|
||||
data: list,
|
||||
type: "post",// 提交方式
|
||||
success: function (res) {
|
||||
if (res.Status == 200) {
|
||||
alert('解绑酒店成功');
|
||||
var link = "/App/Face/testFaceall";
|
||||
window.location.href = link;
|
||||
}
|
||||
else {
|
||||
alert('解绑失败请查看人脸机是否在线')
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function addhotel(sn, jiu) {
|
||||
var t = document.body.clientHeight;
|
||||
window.scroll({ top: t, left: 0, behavior: 'smooth' });
|
||||
var inse = {
|
||||
faceNo: sn,
|
||||
hotel: jiu
|
||||
}
|
||||
$.ajax({
|
||||
url: "/App/Face/BingInfo",
|
||||
data: inse, // data为String类型,必须为 Key/Value 格式。
|
||||
type: "post", // 提交方式
|
||||
success: function (res) { // 请求成功后的回调函数,其中的参数data为controller返回的map,也就是说,然后通过data这个参数取JSON数据中的值
|
||||
$("#faceDetailsBox").html(res)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function unbundleBtn(sn, hotels, room) {
|
||||
var list = {
|
||||
faceNo: sn,
|
||||
romm: room,
|
||||
hotel: hotels
|
||||
}
|
||||
var srt = confirm("确定要解绑房间吗?")
|
||||
if (srt == true) {
|
||||
$.ajax({
|
||||
url: "/App/Face/unbundleoperate",
|
||||
data: list,
|
||||
type: "post",// 提交方式
|
||||
|
||||
success: function (res) {
|
||||
if (res.Status == 200) {
|
||||
console.log(res.Status)
|
||||
alert('解绑成功')
|
||||
var link = "/App/Face/testFaceall";
|
||||
window.location.href = link;
|
||||
}
|
||||
else {
|
||||
alert('解绑失败请查看人脸机是否在线')
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function trouble(id) {
|
||||
var s = confirm("确定人工修复?")
|
||||
if (s == true) {
|
||||
$.ajax({
|
||||
url: "/App/Face/faultmaintain",
|
||||
data: { 'id': id },
|
||||
type: "post",
|
||||
success: function (res) {
|
||||
if (res != null) {
|
||||
alert('已正常')
|
||||
var link = "/App/Face/testFaceall";
|
||||
window.location.href = link;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function Show(that) {
|
||||
$(that).find('.acet').toggle();
|
||||
}
|
||||
</script>
|
||||
217
Face.Web/Areas/App/Views/Face/IssuedPeople.cshtml
Normal file
217
Face.Web/Areas/App/Views/Face/IssuedPeople.cshtml
Normal file
@@ -0,0 +1,217 @@
|
||||
|
||||
@{
|
||||
ViewBag.Title = "IssuedPeople";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
<link href="~/Theme/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
|
||||
<style>
|
||||
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
#order {
|
||||
border-top: solid 2px #ddd;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<section class="content" style="padding:0px;">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<!-- Default box -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div></div>
|
||||
<div class="card-tools">
|
||||
<button type="button" class="btn btn-tool" data-card-widget="collapse" title="Collapse"></button>
|
||||
<button type="button" class="btn btn-tool" data-card-widget="remove" title="Remove">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
</div>
|
||||
@*内容筛选*@
|
||||
<div style="display:none">人脸机的SN号:@ViewData["sn"] </div>
|
||||
<div class="ibox-content" style="padding:0px;">
|
||||
<div id="project">
|
||||
<div class="card-body">
|
||||
<form class="form-horizontal" id="AddresidentFrom">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">客户名字</font></font></label>
|
||||
<input type="email" class="form-control" id="name" placeholder="输入客户名字">
|
||||
<p></p>
|
||||
<label for="exampleInputEmail1"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">客户身份证</font></font></label>
|
||||
<input type="email" class="form-control" id="id_no" placeholder="输入客户身份证">
|
||||
<p></p>
|
||||
<label for="exampleInputFile"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">客户照片</font></font></label>
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<div class="custom-file">
|
||||
<input type="file" onchange="uploadimg()" class=" custom-file-input" accept="image/*" id="photo">
|
||||
<label class="custom-file-label" id="exampleInputFile"></label>
|
||||
</div>
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text" onclick="Upload()">上传</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="faceDetailsBox"> </div>
|
||||
<label for="exampleInputEmail1"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">开房时间至退房时间</font></font></label>
|
||||
<div class="col-sm-4 m-b-xs" id="data_ovform">
|
||||
<div class="input-group m-b">
|
||||
<div class="input-daterange input-group" id="datepicker">
|
||||
|
||||
<input type="text" class="input-sm form-control" readOnly id="startTs" />
|
||||
<span class="input-group-addon">to</span>
|
||||
<input type="text" class="input-sm form-control" readOnly id="endTs" />
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p></p>
|
||||
|
||||
<div class="col-md-offset-3 col-md-9">
|
||||
<button class="btn btn-md btn-primary" type="button" id="btnAddShow">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div id="btn" onclick="tip()"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card -->
|
||||
<div class="col-sm-4" id="faceDetailsBox">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<script src="~/Theme/js/plugins/datapicker/bootstrap-datepicker.js"></script>
|
||||
<script src="~/Theme/js/plugins/datapicker/locales/bootstrap-datepicker.zh-CN.js"></script>
|
||||
<script src="~/Theme/js/plugins/peity/jquery.peity.min.js"></script>
|
||||
<script src="~/Theme/js/plugins/pace/pace.min.js"></script>
|
||||
<script>
|
||||
var srclocation
|
||||
var url = "/Theme/js/jquery.form.min.js";
|
||||
$.getScript(url);
|
||||
|
||||
$('#data_ovform .input-daterange').datepicker({
|
||||
language: "zh-CN",//语言
|
||||
todayBtn: "linked",//今日按钮
|
||||
keyboardNavigation: false,
|
||||
forceParse: false,
|
||||
autoclose: true,
|
||||
format: "yyyy/mm/dd"//日期格式
|
||||
});
|
||||
|
||||
|
||||
function ToUploadPictures(file,back) {
|
||||
var reader = new FileReader();
|
||||
var AllowImgFileSize = 2100000; //上传图片最大值(单位字节)( 2 M = 2097152 B )超过2M上传失败
|
||||
var imgUrlBase64;
|
||||
if (file) {
|
||||
//将文件以Data URL形式读入页面
|
||||
imgUrlBase64 = reader.readAsDataURL(file);
|
||||
reader.onload = function (e) {
|
||||
var ImgFileSize = reader.result.substring(reader.result.indexOf(",") + 1);//截取base64码部分(可选可不选,需要与后台沟通)
|
||||
if (AllowImgFileSize != 0 && AllowImgFileSize < reader.result.length) {
|
||||
alert('上传失败,请上传不大于2M的图片!');
|
||||
return;
|
||||
} else {
|
||||
//执行上传操作
|
||||
console.log(ImgFileSize);
|
||||
back(ImgFileSize)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function uploadimg(type) {
|
||||
let files = $("#photo").prop("files");
|
||||
if (files.length <= 0)
|
||||
return;
|
||||
$("#photo").closest(".input-group").find("label").html(files[0].name);
|
||||
if (type != 1)
|
||||
return;
|
||||
console.log(files[0])
|
||||
upload();
|
||||
}
|
||||
//上传图片
|
||||
function Upload() {
|
||||
|
||||
upload();
|
||||
}
|
||||
|
||||
function upload() {
|
||||
var formData = new FormData() //创建一个forData
|
||||
formData.append('img', $('#photo')[0].files[0]) //把file添加进去 name命名为img
|
||||
$.ajax({
|
||||
url: "/ImgServer/Update",
|
||||
data: formData,
|
||||
type: "POST",
|
||||
async: false,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
success: function (data) {//成功
|
||||
srclocation = data.data.src;
|
||||
alert("上传成功");
|
||||
$("#faceDetailsBox").html('<img id="images" src="/ImgServer/FileImage?url=' + data.data.src + '">')
|
||||
},
|
||||
error: function () {
|
||||
alert("上传失败")
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
$("#btnAddShow").click(function () {
|
||||
var name = $('#name').val();
|
||||
var id_no = $('#id_no').val();
|
||||
var photo = srclocation;
|
||||
|
||||
//var photo = $('#photo')[0].files[0].name;
|
||||
|
||||
var startTs = $('#startTs').val();
|
||||
var endTs = $('#endTs').val();
|
||||
var InfoBodyShow = {
|
||||
name: name,
|
||||
id_no: id_no,
|
||||
photo: photo,
|
||||
startTs: startTs,
|
||||
endTs: endTs
|
||||
};
|
||||
$.ajax({
|
||||
url: "/App/Face/IssuedSandShow",
|
||||
type: "post",
|
||||
data: InfoBodyShow,
|
||||
async: true,
|
||||
success: function (res) {
|
||||
alert(res)
|
||||
}
|
||||
});
|
||||
|
||||
})
|
||||
function addLodger() {
|
||||
$.ajax({
|
||||
url: "/App/Lodger/Openhouse",
|
||||
|
||||
type: "post", // 提交方式
|
||||
success: function (res) { // 请求成功后的回调函数,其中的参数data为controller返回的map,也就是说,然后通过data这个参数取JSON数据中的值
|
||||
$("#faceDetailsBox").html(res)
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
167
Face.Web/Areas/App/Views/Face/Roomselect.cshtml
Normal file
167
Face.Web/Areas/App/Views/Face/Roomselect.cshtml
Normal file
@@ -0,0 +1,167 @@
|
||||
@model PagedList.IPagedList<Face.Domain.Entities.DeviceManage>
|
||||
@using PagedList.Mvc;
|
||||
@using Face.Web.Areas.App.Models
|
||||
@{
|
||||
ViewBag.Title = "Roomselect";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
List<Face.Domain.Entities.Hotels> Hotellist = (List<Face.Domain.Entities.Hotels>)ViewData["he"];
|
||||
List<Face.Domain.Entities.Hosts> Roomlist = Face.Services.Cache.CacheHelp.GetRoomCheck();
|
||||
int roomid = int.Parse(Session["roll"].ToString());
|
||||
List<Face.Domain.Entities.Hosts> hostslist = Face.Services.Cache.CacheHelp.GetRoomGroup();
|
||||
}
|
||||
<style>
|
||||
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
#order {
|
||||
border-top: solid 2px #ddd;
|
||||
}
|
||||
|
||||
.chaxun {
|
||||
text-indent: 5px;
|
||||
}
|
||||
|
||||
.PagedList-skipToLast page-item {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<section class="content" style="padding:0px;">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<!-- Default box -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<span style="font-size:30px">所有人脸机信息</span>
|
||||
|
||||
<div class="card-tools">
|
||||
<button type="button" class="btn btn-tool" data-card-widget="collapse" title="Collapse"></button>
|
||||
<button type="button" class="btn btn-tool" data-card-widget="remove" title="Remove">
|
||||
<i class="fas fa-times"></i>
|
||||
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<input type="text" placeholder="人脸机筛选" name="username" style="height:35px;margin-left:5px;" id="txtOpname"><button class="btn btn-md btn-primary" id="Btnmodify" onclick="search()">搜索</button>
|
||||
</div>
|
||||
@*条件筛选*@
|
||||
@*内容筛选*@
|
||||
<div class="ibox-content" style="padding:0px;">
|
||||
<div id="project">
|
||||
<table class="table dataTables-example" border="0" id="order">
|
||||
@if (Model != null)
|
||||
{
|
||||
foreach (var item in Model)
|
||||
{
|
||||
|
||||
<tbody class="tbodyList">
|
||||
<tr>
|
||||
<td rowspan="5" style="margin:0px;padding:0px; ">
|
||||
<input type="hidden" id="ID" value="2">
|
||||
<div class="lightBoxGallery">
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td id="mobile" style="text-align:left; ">编号: @Html.DisplayFor(modelItem => item.Facelid)<span class="gray"></span></td>
|
||||
<td style="" id="mobile2">
|
||||
状态:<span style="color:#0094ff" id="@item.SerialNo">
|
||||
@{if (item.Status == true)
|
||||
{<strong>在线</strong>}
|
||||
else
|
||||
{<strong style="color:crimson">离线</strong>}
|
||||
}
|
||||
</span>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr></tr>
|
||||
<tr>
|
||||
<td>
|
||||
创建时间: @if (item.CreatedDate != null)
|
||||
{
|
||||
@item.CreatedDate.Value.ToString("yyyy/MM/dd");
|
||||
}
|
||||
else
|
||||
{
|
||||
<span> 无</span>
|
||||
}
|
||||
</td>
|
||||
<td><button class="btn btn-xs btn-success" id="btnaddPLine" onclick="bingdingRoom('@item.SerialNo','@item.HotelCode','@Session["roll"]')" style="background-color:cornflowerblue" >绑定房间</button></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>SN号: @Html.DisplayFor(modelItem => item.SerialNo)</td>
|
||||
<td></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
绑定酒店: @(Html.DisplayFor(modelItem => item.HotelCode).ToString() != "" ? Hotellist.Single(s => s.Id == int.Parse(item.HotelCode)) != null ? Hotellist.Single(s => s.Id == int.Parse(item.HotelCode)).Name : "" : "")
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
}
|
||||
}
|
||||
</table>
|
||||
<div style="text-align:center" class="chaxun">
|
||||
@*分页主要代码*@
|
||||
共 @Model.PageCount 页,当前第 @Model.PageNumber 页
|
||||
<nav aria-label="Contacts Page Navigation">
|
||||
<ul class="pagination justify-content-center m-0">
|
||||
|
||||
|
||||
@if (Session["hoteloperation"].ToString() != "")
|
||||
{
|
||||
string hotel = Session["hoteloperation"].ToString();
|
||||
string roll = Session["roll"].ToString();
|
||||
@Html.PagedListPager(Model, page => Url.Action("Roomselect", new { page, hotel , roll }), new PagedListRenderOptions() { DisplayItemSliceAndTotal = false, MaximumPageNumbersToDisplay = 5 });
|
||||
}
|
||||
else
|
||||
{
|
||||
@Html.PagedListPager(Model, page => Url.Action("Roomselect", new { page }), new PagedListRenderOptions() { DisplayItemSliceAndTotal = false, MaximumPageNumbersToDisplay = 5 })
|
||||
}
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div id="btn" onclick="tip()"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- /.card -->
|
||||
<div class="col-sm-4" id="faceDetailsBox">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<script>
|
||||
function bingdingRoom(no1, hotel1, room1) {
|
||||
var list = {
|
||||
hotel: hotel1,
|
||||
romm: room1,
|
||||
faceNo: no1
|
||||
|
||||
}
|
||||
$.ajax({
|
||||
url: "/App/Face/bingdingRoomoperate",
|
||||
data: list,
|
||||
type: "post", // 提交方式
|
||||
success: function (res) { // 请求成功后的回调函数,其中的参数data为controller返回的map,也就是说,然后通过data这个参数取JSON数据中的值
|
||||
alert(res.Message)
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
133
Face.Web/Areas/App/Views/Face/TestFaceLogsAll.cshtml
Normal file
133
Face.Web/Areas/App/Views/Face/TestFaceLogsAll.cshtml
Normal file
@@ -0,0 +1,133 @@
|
||||
@model PagedList.IPagedList<Face.Domain.Entities.DeviceManage>
|
||||
@using PagedList.Mvc;
|
||||
@using Face.Web.Areas.App.Models;
|
||||
@using Face.Domain.Entities;
|
||||
@using Face.Domain.Application
|
||||
@{
|
||||
ViewBag.Title = "TestFaceall";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
<style>
|
||||
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
#order {
|
||||
border-top: solid 2px #ddd;
|
||||
}
|
||||
|
||||
.chaxun {
|
||||
text-indent: 5px;
|
||||
}
|
||||
|
||||
.PagedList-skipToLast page-item {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<link href="~/Theme/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
|
||||
<div class="content-wrapper">
|
||||
<section class="content" style="padding:0px;">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<!-- Default box -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<span style="font-size:30px">所有人脸机设备日志</span>
|
||||
<div class="card-tools">
|
||||
<button type="button" class="btn btn-tool" data-card-widget="collapse" title="Collapse"></button>
|
||||
<button type="button" class="btn btn-tool" data-card-widget="remove" title="Remove">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@*条件筛选放在card body部分*@
|
||||
<div class="card-body col-sm-12">
|
||||
<div class="form-horizontal">
|
||||
<div class="form-group row">
|
||||
<label for="txtOpname" class="col-md-2 col-sm-12 col-form-label">人脸机序列号</label>
|
||||
<div class="col-md-10 col-sm-12">
|
||||
<input type="text" class="form-control" id="txtOpname" placeholder="人脸机序列号">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="" class="col-md-2 col-sm-12 col-form-label">时间范围</label>
|
||||
<div class="col-md-10 col-sm-12">
|
||||
<div class="row">
|
||||
<div class="col-md-5 col-sm-12">
|
||||
<div class="input-group mb-3">
|
||||
<input type="text" class="input-sm form-control mytimer" name="start" id="startTs" readonly="">
|
||||
<span class="input-group-btn" style="width: 25%">
|
||||
<button class="btn default" type="button">
|
||||
<i class="fa fa-calendar-alt"></i>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2 col-sm-12">至</div>
|
||||
<div class="col-md-5 col-sm-12">
|
||||
<div class="input-group mb-3">
|
||||
<input type="text" class="input-sm form-control mytimer" name="end" id="endTs" readonly="">
|
||||
<span class="input-group-btn" style="width: 25%">
|
||||
<button class="btn default" type="button">
|
||||
<i class="fa fa-calendar-alt"></i>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-lg btn-default" onclick="search('/App/Face/InquireFaceLogAll')" style="float:right;">查询</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@*内容筛选*@
|
||||
<div class="ibox-content" style="padding:0px;">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<script src="~/Theme/js/plugins/datapicker/bootstrap-datepicker.js"></script>
|
||||
<script src="~/Theme/js/plugins/datapicker/locales/bootstrap-datepicker.zh-CN.js"></script>
|
||||
<script src="~/Plugin/allPages.js"></script>
|
||||
<script>
|
||||
$(function () {
|
||||
var inParam = getQueryVariable("sn");
|
||||
if (inParam) {
|
||||
$("#txtOpname").val = inParam
|
||||
search('/App/Face/InquireFaceLogAll', 0, 16, 1, {
|
||||
FaceName: inParam
|
||||
});
|
||||
}
|
||||
else {
|
||||
search('/App/Face/InquireFaceLogAll');
|
||||
}
|
||||
});
|
||||
if ($(document).width() >= 764) {
|
||||
}
|
||||
else {
|
||||
$(".content-wrapper *").css("font-size", "10px");
|
||||
}
|
||||
|
||||
$('.mytimer').datepicker({
|
||||
language: "zh-CN",//语言
|
||||
todayBtn: "linked",//今日按钮
|
||||
autoclose: true,//选择后关闭日期选择
|
||||
format: "yyyy-mm-dd",//日期格式
|
||||
});
|
||||
</script>
|
||||
157
Face.Web/Areas/App/Views/Face/TestFaceall.cshtml
Normal file
157
Face.Web/Areas/App/Views/Face/TestFaceall.cshtml
Normal file
@@ -0,0 +1,157 @@
|
||||
@model PagedList.IPagedList<Face.Domain.Entities.DeviceManage>
|
||||
@using PagedList.Mvc;
|
||||
@using Face.Web.Areas.App.Models;
|
||||
@using Face.Domain.Entities;
|
||||
@using Face.Domain.Application
|
||||
@{
|
||||
ViewBag.Title = "TestFaceall";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
List<Face.Domain.Entities.Hotels> Hotellist = SqlSugarBase.authoriydb.Queryable<Hotels>().ToList();
|
||||
List<AuthItem> authItem = (List<AuthItem>)Session["authItems"];
|
||||
List<TBL_ROOM_BASIC_INFO> ZongRoominfo = (List<TBL_ROOM_BASIC_INFO>)Session["ZongRoominfo"];
|
||||
}
|
||||
@*<script src="~/Scripts/jquery-3.3.1.js"></script>*@
|
||||
<style>
|
||||
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
#order {
|
||||
border-top: solid 2px #ddd;
|
||||
}
|
||||
|
||||
.chaxun {
|
||||
text-indent: 5px;
|
||||
}
|
||||
|
||||
.PagedList-skipToLast page-item {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<section class="content" style="padding:0px;">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<!-- Default box -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<span style="font-size:30px">所有人脸机信息</span>
|
||||
<div class="card-tools">
|
||||
<button type="button" class="btn btn-tool" data-card-widget="collapse" title="Collapse"></button>
|
||||
<button type="button" class="btn btn-tool" data-card-widget="remove" title="Remove">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@* <input type="text" placeholder="人脸机筛选" name="username" style="height:35px;margin-left:5px;" id="txtOpname"><button class="btn btn-md btn-primary" id="Btnmodify" onclick="search('/App/Face/InquireFaceall')">搜索</button>*@
|
||||
<select class="form-control" id="OrgId" style="width:300px; float:left">
|
||||
<option value="0">
|
||||
所有酒店
|
||||
</option>
|
||||
@{
|
||||
List<int> sum = (List<int>)Session["list"];
|
||||
foreach (int item in sum)
|
||||
{
|
||||
foreach (var iten in Hotellist)
|
||||
{
|
||||
if (iten.Id == item)
|
||||
{
|
||||
|
||||
<option class="ComboBox" value="@iten.Id" )>
|
||||
@iten.Name
|
||||
</option>
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < authItem.Count; i++)
|
||||
{
|
||||
if (authItem[i].AuthorityId == 3)
|
||||
{
|
||||
<option value="-1">
|
||||
未绑定酒店
|
||||
</option>
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
</select>
|
||||
<select class="form-control" id="OrgId3" style="width:300px; float:left">
|
||||
<option value="-1">
|
||||
全部人脸机
|
||||
</option>
|
||||
<option value="1">在线</option>
|
||||
<option value="0">不在线</option>
|
||||
</select>
|
||||
<select class="form-control" id="OrgId2" style="width:300px; float:left">
|
||||
|
||||
<option value="-1">
|
||||
全部房间
|
||||
</option>
|
||||
|
||||
<option value="0" )>
|
||||
未绑定房间
|
||||
</option>
|
||||
<option value="1">
|
||||
已绑定房间
|
||||
</option>
|
||||
|
||||
@{
|
||||
|
||||
}
|
||||
</select>
|
||||
|
||||
<div class="input-group " style="width:300px; float:left;">
|
||||
<input type="search" style="height:40px;" id="txtOpname" value="@ViewData["SnDing"]" class="form-control form-control-lg" placeholder="人脸机筛选">
|
||||
<div class="input-group-append">
|
||||
<button type="submit" class="btn btn-lg btn-default" onclick="search('/App/Face/InquireFaceall')" id=" ">
|
||||
<i class="fa fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@*条件筛选*@
|
||||
@*内容筛选*@
|
||||
<div class="ibox-content" style="padding:0px;">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- /.card -->
|
||||
<div class="col-sm-4" id="faceDetailsBox">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<script src="~/Plugin/allPages.js"></script>
|
||||
<script>
|
||||
$(function () {
|
||||
var inParamH = getQueryVariable("hotelid");
|
||||
var inParamS = getQueryVariable("sn");
|
||||
if (inParamH || inParamS) {
|
||||
search('/App/Face/InquireFaceall', 0, 8, 1, {
|
||||
HotelID: inParamH || 0,
|
||||
FaceName: inParamS
|
||||
});
|
||||
}
|
||||
else {
|
||||
search('/App/Face/InquireFaceall');
|
||||
}
|
||||
});
|
||||
if ($(document).width() >= 764) {
|
||||
}
|
||||
else {
|
||||
$(".content-wrapper *").css("font-size", "10px");
|
||||
}
|
||||
|
||||
</script>
|
||||
170
Face.Web/Areas/App/Views/Face/adminjurisdiction.cshtml
Normal file
170
Face.Web/Areas/App/Views/Face/adminjurisdiction.cshtml
Normal file
@@ -0,0 +1,170 @@
|
||||
@model PagedList.IPagedList<Face.Domain.Entities.DeviceManage>
|
||||
@using PagedList.Mvc;
|
||||
@using Face.Web.Areas.App.Models;
|
||||
@{
|
||||
ViewBag.Title = "adminjurisdiction";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
List<Face.Domain.Entities.DeviceManage> facellist = Face.Services.Cache.CacheHelp.GetFaceList();
|
||||
}
|
||||
<style>
|
||||
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
#order {
|
||||
border-top: solid 2px #ddd;
|
||||
}
|
||||
|
||||
.chaxun {
|
||||
text-indent: 5px;
|
||||
}
|
||||
|
||||
.PagedList-skipToLast page-item {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<section class="content" style="padding:0px;">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<!-- Default box -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<span style="font-size:30px">所有人脸机信息</span>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<input type="text" placeholder="人脸机筛选" name="username" style="height:35px;margin-left:5px;" id="txtOpname"><button class="btn btn-md btn-primary" id="Btnmodify" onclick="search()">搜索</button>
|
||||
<select class="form-control" id="OrgId" style="width:300px; float:left">
|
||||
@if (ViewData["location"] != null)
|
||||
{
|
||||
<option>
|
||||
@ViewData["location"]
|
||||
</option>
|
||||
}
|
||||
@foreach (var item in ViewData["groups"] as List<string>)
|
||||
{
|
||||
<option>
|
||||
@item
|
||||
</option>
|
||||
}
|
||||
|
||||
</select>
|
||||
|
||||
</div>
|
||||
@*条件筛选*@
|
||||
|
||||
@*内容筛选*@
|
||||
<div class="ibox-content" style="padding:0px;">
|
||||
<div id="project">
|
||||
<table class="table dataTables-example" border="0" id="order">
|
||||
@if (Model != null)
|
||||
{
|
||||
foreach (var item in Model)
|
||||
{
|
||||
|
||||
<tbody class="tbodyList">
|
||||
<tr>
|
||||
<td rowspan="5" style="margin:0px;padding:0px;width:40px">
|
||||
<input type="hidden" id="ID" value="2">
|
||||
<div class="lightBoxGallery">
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td style="text-align:left;width:60%;">编号: @Html.DisplayFor(modelItem => item.Facelid)<span class="gray"></span></td>
|
||||
<td style="width:200px;">
|
||||
状态:<span style="color:#0094ff" id="@item.SerialNo">
|
||||
@{if (item.Status == true)
|
||||
{<strong>在线</strong>}
|
||||
else
|
||||
{<strong>离线</strong> }
|
||||
}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr></tr>
|
||||
<tr>
|
||||
<td>地理位置:@Html.DisplayFor(modelItem => item.faceAddress)</td>
|
||||
<td>创建时间: @item.CreatedDate.Value.ToString("yyyy/MM/dd")</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td>SN号: @Html.DisplayFor(modelItem => item.SerialNo)</td>
|
||||
<td><button class="btn btn-xs btn-success" id="btnaddPLine" onclick="addhotel('@item.SerialNo')">绑定酒店</button></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
}
|
||||
}
|
||||
</table>
|
||||
<div style="text-align:center" class="chaxun">
|
||||
分页主要代码
|
||||
共 @Model.PageCount 页,当前第 @Model.PageNumber 页
|
||||
<nav aria-label="Contacts Page Navigation">
|
||||
<ul class="pagination justify-content-center m-0">
|
||||
@if (ViewData["location"] != null)
|
||||
{
|
||||
string tion = ViewData["location"].ToString();
|
||||
@Html.PagedListPager(Model, page => Url.Action("adminjurisdiction", new { page, tion }), new PagedListRenderOptions() { DisplayItemSliceAndTotal = false, MaximumPageNumbersToDisplay = 5 })
|
||||
}
|
||||
else
|
||||
{
|
||||
@Html.PagedListPager(Model, page => Url.Action("adminjurisdiction", new { page }), new PagedListRenderOptions() { DisplayItemSliceAndTotal = false, MaximumPageNumbersToDisplay = 5 })
|
||||
}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div id="btn" onclick="tip()"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- /.card -->
|
||||
<div class="col-sm-4" id="faceDetailsBox">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(".pagination").addClass("pagination pagination-sm");
|
||||
$(".pagination").children("li").addClass("page-item");
|
||||
$(".page-item").children("a").addClass("page-link");
|
||||
function addhotel(sn) {
|
||||
var t = document.body.clientHeight;
|
||||
window.scroll({ top: t, left: 0, behavior: 'smooth' });
|
||||
$.ajax({
|
||||
url: "/App/Face/Bing",
|
||||
data: { "StrNo": sn }, // data为String类型,必须为 Key/Value 格式。
|
||||
type: "post", // 提交方式
|
||||
success: function (res) { // 请求成功后的回调函数,其中的参数data为controller返回的map,也就是说,然后通过data这个参数取JSON数据中的值
|
||||
$("#faceDetailsBox").html(res)
|
||||
}
|
||||
});
|
||||
}
|
||||
$('#OrgId').change(function () {//查询酒店按钮
|
||||
var myType = document.getElementById("OrgId").value;//获取select对象
|
||||
console.log(myType);
|
||||
var link = "/App/Face/adminjurisdiction" + '?location=' + myType
|
||||
window.location.href = link;
|
||||
})
|
||||
function searcsh() {//查询SN号按钮
|
||||
var src = document.getElementById("txtOpname").value
|
||||
var link = "/App/Face/adminjurisdiction" + '?Sno=' + src
|
||||
window.location.href = link;
|
||||
}
|
||||
</script>
|
||||
189
Face.Web/Areas/App/Views/Face/bindingRoom.cshtml
Normal file
189
Face.Web/Areas/App/Views/Face/bindingRoom.cshtml
Normal file
@@ -0,0 +1,189 @@
|
||||
@model PagedList.IPagedList<Face.Domain.Entities.DeviceManage>
|
||||
@using PagedList.Mvc;
|
||||
@using Face.Web.Areas.App.Models
|
||||
@{
|
||||
ViewBag.Title = "bindingRoom";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
List<Face.Domain.Entities.Hotels> Hotellist = (List<Face.Domain.Entities.Hotels>)ViewData["hw"];
|
||||
List<Face.Domain.Entities.Hosts> Roomlist = Face.Services.Cache.CacheHelp.GetRoomCheck();
|
||||
}
|
||||
<style>
|
||||
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
#order {
|
||||
border-top: solid 2px #ddd;
|
||||
}
|
||||
|
||||
.chaxun {
|
||||
text-indent: 5px;
|
||||
}
|
||||
|
||||
.PagedList-skipToLast page-item {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<section class="content" style="padding:0px;">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<!-- Default box -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<span style="font-size:30px">绑定人脸机操作</span>
|
||||
<div class="card-tools">
|
||||
<button type="button" class="btn btn-tool" data-card-widget="collapse" title="Collapse"></button>
|
||||
<button type="button" class="btn btn-tool" data-card-widget="remove" title="Remove">
|
||||
<i class="fas fa-times"></i>
|
||||
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<input type="text" placeholder="根据人脸机SN号" name="username" style="height:35px;margin-left:5px;" id="txtOpname"><button class="btn btn-md btn-primary" id="Btnmodify" onclick="search()">搜索</button>
|
||||
</div>
|
||||
@*条件筛选*@
|
||||
|
||||
@*内容筛选*@
|
||||
<div class="ibox-content" style="padding:0px;">
|
||||
<div id="project">
|
||||
<table class="table dataTables-example" border="0" id="order">
|
||||
@if (Model != null)
|
||||
{
|
||||
foreach (var item in Model)
|
||||
{
|
||||
<tbody class="tbodyList">
|
||||
<tr>
|
||||
<td rowspan="5" style="margin:0px;padding:0px;width:40px">
|
||||
<input type="hidden" id="ID" value="2">
|
||||
<div class="lightBoxGallery">
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td style="text-align:left;width:60%;">编号 @Html.DisplayFor(modelItem => item.Facelid)<span class="gray"></span></td>
|
||||
<td style="width:200px;">
|
||||
状态: @if (item.bindingStatus == true)
|
||||
{
|
||||
<strong>已绑定</strong>
|
||||
}
|
||||
else
|
||||
{
|
||||
<strong>未绑定</strong>
|
||||
}
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr></tr>
|
||||
<tr>
|
||||
<td>SN号: @Html.DisplayFor(modelItem => item.SerialNo) </td>
|
||||
<td>
|
||||
绑定房间: @(item.RoomId.ToString() != "" ? Roomlist.Single(s => s.Id == item.RoomId).RoomNumber : "无")
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td>绑定酒店: @(Html.DisplayFor(modelItem => item.HotelCode).ToString() != "" ? Hotellist.Single(s => s.Id == int.Parse(item.HotelCode))!=null? Hotellist.Single(s => s.Id == int.Parse(item.HotelCode)).Name :"": "")</td>
|
||||
|
||||
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
@if (@item.bindingDate != null)
|
||||
{
|
||||
<td>绑定时间 @item.bindingDate.Value.ToString("yyyy/MM/dd")</td>
|
||||
}
|
||||
else
|
||||
{
|
||||
<td>绑定时间</td>}
|
||||
@{
|
||||
List<AuthItem> authItem = (List<AuthItem>)ViewData["authItems"];
|
||||
for (int i = 0; i < authItem.Count; i++)
|
||||
{
|
||||
|
||||
|
||||
if (authItem[i].AuthorityId == 8)
|
||||
{
|
||||
<td><button class="btn btn-xs btn-success" id="btnaddPLine" onclick="addhotel('@item.SerialNo','@item.HotelCode')">绑定房间</button></td>
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</table>
|
||||
<div style="text-align:center" class="chaxun">
|
||||
|
||||
共 @Model.PageCount 页,当前第 @Model.PageNumber 页
|
||||
<nav aria-label="Contacts Page Navigation">
|
||||
<ul class="pagination justify-content-center m-0">
|
||||
@if (ViewData["sun"] != null)
|
||||
{
|
||||
string sunn = ViewData["sun"].ToString();
|
||||
@Html.PagedListPager(Model, page => Url.Action("Faceall", new { page, sunn }), new PagedListRenderOptions() { DisplayItemSliceAndTotal = false, MaximumPageNumbersToDisplay = 5 });
|
||||
}
|
||||
else
|
||||
{ @Html.PagedListPager(Model, page => Url.Action("Faceall", new { page }), new PagedListRenderOptions() { DisplayItemSliceAndTotal = false, MaximumPageNumbersToDisplay = 5 })}
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div id="btn" onclick="tip()"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card -->
|
||||
<div class="col-sm-4" id="faceDetailsBox">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(".pagination").addClass("pagination pagination-sm");
|
||||
$(".pagination").children("li").addClass("page-item");
|
||||
$(".page-item").children("a").addClass("page-link");
|
||||
function addhotel(sn, jiu) {
|
||||
var t = document.body.clientHeight;
|
||||
|
||||
window.scroll({ top: t, left: 0, behavior: 'smooth' });
|
||||
var inse = {
|
||||
faceNo: sn,
|
||||
hotel: jiu
|
||||
}
|
||||
$.ajax({
|
||||
url: "/App/Face/BingInfo",
|
||||
data: inse, // data为String类型,必须为 Key/Value 格式。
|
||||
type: "post", // 提交方式
|
||||
success: function (res) { // 请求成功后的回调函数,其中的参数data为controller返回的map,也就是说,然后通过data这个参数取JSON数据中的值
|
||||
$("#faceDetailsBox").html(res)
|
||||
}
|
||||
});
|
||||
}
|
||||
function search() {//查询SN号按钮
|
||||
|
||||
var src = document.getElementById("txtOpname").value
|
||||
var link = "/App/Face/bindingRoom" + '?sun=' + src
|
||||
window.location.href = link;
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
94
Face.Web/Areas/App/Views/Face/bingHotel.cshtml
Normal file
94
Face.Web/Areas/App/Views/Face/bingHotel.cshtml
Normal file
@@ -0,0 +1,94 @@
|
||||
|
||||
@{
|
||||
Layout = null;
|
||||
List<Face.Domain.Entities.Hotels> Hotellist = Face.Services.Cache.CacheHelp.GetHotelslist();
|
||||
}
|
||||
<style>
|
||||
#btnaddPLineShow {
|
||||
background-color: #008CBA;
|
||||
border: none;
|
||||
color: white;
|
||||
padding: 5px 20px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
}
|
||||
</style>
|
||||
<section class="content" style="padding:0px;">
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
|
||||
<div class="card-tools">
|
||||
|
||||
<button type="button" class="btn btn-tool" data-card-widget="remove" title="Remove">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="ibox float-e-margins">
|
||||
<div class="ibox-title">
|
||||
<h5 id="SNno">人脸机sn号:@ViewData["no"]</h5>
|
||||
|
||||
<div class="ibox-tools">
|
||||
<a class="collapse-link-partial">
|
||||
</a>
|
||||
<a class="close-link-partial">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<select class="form-control" id="hotelShow" style="width:250px; height:35px;float:left">
|
||||
@foreach (var item in Hotellist)
|
||||
{
|
||||
<option class="ComboBox" value="@item.Id" )>
|
||||
@item.Name
|
||||
</option>
|
||||
}
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
<button class="btn btn-xs btn-success" id="btnaddPLineShow" onclick="addhotel()">为酒店添加人脸机</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<script>
|
||||
function addhotel() {
|
||||
var myType = document.getElementById("hotelShow");//获取select对象
|
||||
var index = myType.selectedIndex;//获取选项中的索引,selectIndex表示的是当前所选中的index
|
||||
var code = myType.options[index].value;//获取酒店编号
|
||||
var inse = {
|
||||
hotel: code,
|
||||
faceNo: "@ViewData["no"]"
|
||||
}
|
||||
console.log(inse)
|
||||
$.ajax({
|
||||
url: "/App/Face/addfacehotel",
|
||||
type: "post",
|
||||
data: inse,
|
||||
async: true,
|
||||
success: function (res) {
|
||||
if (res.Status == 200) {
|
||||
alert(res.Message)
|
||||
window.location.href = "/App/Face/Faceall";
|
||||
} else {
|
||||
alert('添加失败')
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
</script>
|
||||
109
Face.Web/Areas/App/Views/Face/selectpeople.cshtml
Normal file
109
Face.Web/Areas/App/Views/Face/selectpeople.cshtml
Normal file
@@ -0,0 +1,109 @@
|
||||
|
||||
@{
|
||||
ViewBag.Title = "selectpeople";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
<style>
|
||||
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
#order {
|
||||
border-top: solid 2px #ddd;
|
||||
}
|
||||
|
||||
.chaxun {
|
||||
text-indent: 5px;
|
||||
}
|
||||
|
||||
.PagedList-skipToLast page-item {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<section class="content" style="padding:0px;">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<!-- Default box -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<div></div>
|
||||
<div class="card-tools">
|
||||
<button type="button" class="btn btn-tool" data-card-widget="collapse" title="Collapse"></button>
|
||||
<button type="button" class="btn btn-tool" data-card-widget="remove" title="Remove">
|
||||
<i class="fas fa-times"></i>
|
||||
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<input type="text" placeholder="通过客户身份证查询" name="username" style="height:35px;margin-left:5px;" id="txtOpname"><button class="btn btn-md btn-primary" id="Btnmodify" onclick="search()">搜索</button>
|
||||
|
||||
</div>
|
||||
@*条件筛选*@
|
||||
|
||||
@*内容筛选*@
|
||||
<div class="ibox-content" style="padding:0px;">
|
||||
<div id="project">
|
||||
<table class="table dataTables-example" border="0" id="order">
|
||||
|
||||
|
||||
<tbody class="tbodyList">
|
||||
<tr>
|
||||
<td rowspan="5" style="margin:0px;padding:0px;width:40px">
|
||||
<input type="hidden" id="ID" value="2">
|
||||
<div class="lightBoxGallery">
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td style="text-align:left;width:60%;">客户名称:<span class="gray"></span></td>
|
||||
<td style="width:200px;">@*卡号:*@ </td>
|
||||
|
||||
</tr>
|
||||
<tr></tr>
|
||||
<tr>
|
||||
<td style="width:200px;">客户身份证: </td>
|
||||
<td>@*>过闸时间段:*@</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>入住时间:</td>
|
||||
<td> @*最大过闸次数:*@</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td>退房时间:</td>
|
||||
<td> @*是否为访客*@</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
<div style="text-align:center" class="chaxun">
|
||||
@*分页主要代码*@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- /.card -->
|
||||
<div class="col-sm-4" id="faceDetailsBox">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
function inquire() {
|
||||
|
||||
}
|
||||
</script>
|
||||
184
Face.Web/Areas/App/Views/Face/unbundle.cshtml
Normal file
184
Face.Web/Areas/App/Views/Face/unbundle.cshtml
Normal file
@@ -0,0 +1,184 @@
|
||||
@model PagedList.IPagedList<Face.Domain.Entities.DeviceManage>
|
||||
@using PagedList.Mvc;
|
||||
@using Face.Web.Areas.App.Models
|
||||
@{
|
||||
ViewBag.Title = "unbundle";
|
||||
List<Face.Domain.Entities.Hotels> Hotellist = (List<Face.Domain.Entities.Hotels>)ViewData["ho"];
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
<style>
|
||||
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
#order {
|
||||
border-top: solid 2px #ddd;
|
||||
}
|
||||
|
||||
.chaxun {
|
||||
text-indent: 5px;
|
||||
}
|
||||
|
||||
.PagedList-skipToLast page-item {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<section class="content" style="padding:0px;">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<!-- Default box -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<span style="font-size:30px">解绑人脸机操作</span>
|
||||
<div class="card-tools">
|
||||
<button type="button" class="btn btn-tool" data-card-widget="collapse" title="Collapse"></button>
|
||||
<button type="button" class="btn btn-tool" data-card-widget="remove" title="Remove">
|
||||
<i class="fas fa-times"></i>
|
||||
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<input type="text" placeholder="根据房间号查询" name="username" style="height:35px;margin-left:5px;" id="txtOpname"><button class="btn btn-md btn-primary" id="Btnmodify" onclick="search()">搜索</button>
|
||||
</div>
|
||||
@*条件筛选*@
|
||||
|
||||
@*内容筛选*@
|
||||
<div class="ibox-content" style="padding:0px;">
|
||||
<div id="project">
|
||||
<table class="table dataTables-example" border="0" id="order">
|
||||
@if (Model != null)
|
||||
{
|
||||
foreach (var item in Model)
|
||||
{
|
||||
<tbody class="tbodyList">
|
||||
<tr>
|
||||
<td rowspan="5" style="margin:0px;padding:0px;width:40px">
|
||||
<input type="hidden" id="ID" value="2">
|
||||
<div class="lightBoxGallery">
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td style="text-align:left;width:60%;">编号 @Html.DisplayFor(modelItem => item.Facelid)<span class="gray"></span></td>
|
||||
<td style="width:200px;">
|
||||
状态: @if (item.bindingStatus == true)
|
||||
{
|
||||
<strong>已绑定</strong>
|
||||
}
|
||||
else
|
||||
{
|
||||
<strong>未绑定</strong>
|
||||
}
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr></tr>
|
||||
<tr>
|
||||
<td>SN号: @Html.DisplayFor(modelItem => item.SerialNo) </td>
|
||||
<td>
|
||||
绑定房间: @(Html.DisplayFor(modelItem => item.RoomId) != null ? Hotellist.Single(s => s.Id == int.Parse(item.HotelCode)).Name : "")
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
绑定酒店: @(Html.DisplayFor(modelItem => item.HotelCode).ToString() != "" ? Hotellist.Single(s => s.Id == int.Parse(item.HotelCode)) != null ? Hotellist.Single(s => s.Id == int.Parse(item.HotelCode)).Name : "" : "")
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td>绑定时间 @(item.bindingDate)</td>
|
||||
@{
|
||||
List<AuthItem> authItem = (List<AuthItem>)ViewData["authItems"];
|
||||
for (int i = 0; i < authItem.Count; i++)
|
||||
{
|
||||
|
||||
|
||||
|
||||
<td><button class="btn btn-xs btn-success" id="btnaddPLine" onclick="unbundleBtn('@item.SerialNo','@item.HotelCode','@item.RoomId')">解绑房间</button></td>
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</table>
|
||||
<div style="text-align:center" class="chaxun">
|
||||
|
||||
共 @Model.PageCount 页,当前第 @Model.PageNumber 页
|
||||
<nav aria-label="Contacts Page Navigation">
|
||||
<ul class="pagination justify-content-center m-0">
|
||||
@if (ViewData["skip"] != null)
|
||||
{
|
||||
string skip = ViewData["skip"].ToString();
|
||||
@Html.PagedListPager(Model, page => Url.Action("Faceall", new { page, skip }), new PagedListRenderOptions() { DisplayItemSliceAndTotal = false, MaximumPageNumbersToDisplay = 5 });
|
||||
}
|
||||
else
|
||||
{ @Html.PagedListPager(Model, page => Url.Action("Faceall", new { page }), new PagedListRenderOptions() { DisplayItemSliceAndTotal = false, MaximumPageNumbersToDisplay = 5 })}
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div id="btn" onclick="tip()"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card -->
|
||||
<div class="col-sm-4" id="faceDetailsBox">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(".pagination").addClass("pagination pagination-sm");
|
||||
$(".pagination").children("li").addClass("page-item");
|
||||
$(".page-item").children("a").addClass("page-link");
|
||||
function unbundleBtn(sn, hotels, room) {
|
||||
var list = {
|
||||
faceNo: sn,
|
||||
romm: room,
|
||||
hotel: hotels
|
||||
}
|
||||
$.ajax({
|
||||
url: "/App/Face/unbundleoperate",
|
||||
data: list,
|
||||
type: "post",// 提交方式
|
||||
success: function (res) {
|
||||
if (res.Status == 200) {
|
||||
console.log(res.Status)
|
||||
alert('解绑成功')
|
||||
window.location.href = "/App/Face/unbundle";
|
||||
}
|
||||
else {
|
||||
alert('解绑失败请查看人脸机是否在线')
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
function search() {//查询房间号按钮
|
||||
|
||||
var src = document.getElementById("txtOpname").value
|
||||
var link = "/App/Face/unbundle" + '?skip=' + src
|
||||
window.location.href = link;
|
||||
}
|
||||
</script>
|
||||
44
Face.Web/Areas/App/Views/Face/updateAkp.cshtml
Normal file
44
Face.Web/Areas/App/Views/Face/updateAkp.cshtml
Normal file
@@ -0,0 +1,44 @@
|
||||
@using Face.Web.Areas.App.Models;
|
||||
@{
|
||||
Layout = null;
|
||||
List<FileDetails> Akplist = (List<FileDetails>)ViewData["Akplist"];
|
||||
}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover ">
|
||||
<tbody>
|
||||
@if (Akplist.Count != 0)
|
||||
{
|
||||
|
||||
<tr class="table table-striped ">
|
||||
<td>文件名</td>
|
||||
<td>文件大小</td>
|
||||
<td>文件日期</td>
|
||||
|
||||
</tr>
|
||||
for (int i = 0; i < Akplist.Count; i++)
|
||||
{
|
||||
<tr onclick="issueAKP('@Akplist[i].Filename')">
|
||||
<td ><a>@Akplist[i].Filename</a></td>
|
||||
<td ><a>@Akplist[i].FileSize</a></td>
|
||||
<td><a>@Akplist[i].UploadDate</a></td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<script>
|
||||
function issueAKP(Filename) {//下发固件
|
||||
var name = confirm('确定要下发固件名为' + Filename);
|
||||
if (name != null && name != "") {
|
||||
$.ajax({
|
||||
url: "/App/Face/SetAPKSand",
|
||||
type: "get",
|
||||
data: { "ApkName": Filename },
|
||||
success: function (res) {
|
||||
alert('更新固件中...')
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
64
Face.Web/Areas/App/Views/Face/updateAkps.cshtml
Normal file
64
Face.Web/Areas/App/Views/Face/updateAkps.cshtml
Normal file
@@ -0,0 +1,64 @@
|
||||
@using Face.Web.Areas.App.Models;
|
||||
@{
|
||||
Layout = null;
|
||||
List<FileDetails> Akplist = (List<FileDetails>)ViewData["Akplists"];
|
||||
|
||||
}
|
||||
@*<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover ">
|
||||
<tbody>*@
|
||||
@*<select class="form-control" id="gujianinfos" onchange="gujianinfo()">
|
||||
<option>
|
||||
请选择固件
|
||||
</option>
|
||||
@if (Akplist.Count != 0)
|
||||
{*@
|
||||
|
||||
@*<tr class="table table-striped ">
|
||||
<td>文件名</td>
|
||||
<td>文件大小</td>
|
||||
<td>文件日期</td>
|
||||
|
||||
|
||||
</tr>*@
|
||||
@*for (int i = 0; i < Akplist.Count; i++)
|
||||
{
|
||||
<option value="@Akplist[i].Filename">
|
||||
@Akplist[i].Filename
|
||||
</option>*@
|
||||
@*<tr onclick="OnShow('@Akplist[i].Filename')">
|
||||
<td><a>@Akplist[i].Filename</a></td>
|
||||
<td><a>@Math.Round(double.Parse(Akplist[i].FileSize) / (1024 * 1024))Mb</a></td>
|
||||
<td><a>@Akplist[i].UploadDate</a></td>
|
||||
|
||||
</tr>*@
|
||||
@*}
|
||||
}
|
||||
</select>*@
|
||||
@*</tbody>
|
||||
</table>
|
||||
</div>*@
|
||||
<script>
|
||||
//function gujianinfo() {
|
||||
// debugger
|
||||
// console.log("uhfyushfudhuyf")
|
||||
// var myType1 = document.getElementById("gujianinfo");//获取select对象
|
||||
// console.log(myType1)
|
||||
// var index1 = myType1.selectedIndex;//获取选项中的索引,selectIndex表示的是当前所选中的index
|
||||
// var code1 = myType1.options[index1].value;//获取固件名称
|
||||
// console.log(code1)
|
||||
//}
|
||||
//function issueAKP(Filename) {//下发固件
|
||||
// var name = confirm('确定要下发固件名为' + Filename);
|
||||
// if (name != null && name != "") {
|
||||
// $.ajax({
|
||||
// url: "/App/Face/BatchSetAPKSand",
|
||||
// type: "get",
|
||||
// data: { "ApkName": Filename },
|
||||
// success: function (res) {
|
||||
// alert('更新固件中...')
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
//}
|
||||
</script>
|
||||
38
Face.Web/Areas/App/Views/Face/updateBkgPngLogo.cshtml
Normal file
38
Face.Web/Areas/App/Views/Face/updateBkgPngLogo.cshtml
Normal file
@@ -0,0 +1,38 @@
|
||||
@using Face.Web.Areas.App.Models;
|
||||
@{
|
||||
Layout = null;
|
||||
List<FileDetails> Akplist = (List<FileDetails>)ViewData["Akplists"];
|
||||
}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover ">
|
||||
<tbody>
|
||||
@if (Akplist.Count != 0)
|
||||
{
|
||||
|
||||
<tr class="table table-striped ">
|
||||
<td>文件名</td>
|
||||
<td>文件大小</td>
|
||||
<td>文件日期</td>
|
||||
|
||||
</tr>
|
||||
for (int i = 0; i < Akplist.Count; i++)
|
||||
{
|
||||
<tr onclick="issueBkgPngLogo('@Akplist[i].Filename')">
|
||||
<td><a>@Akplist[i].Filename</a></td>
|
||||
<td><a>@Akplist[i].FileSize</a></td>
|
||||
<td><a>@Akplist[i].UploadDate</a></td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<script>
|
||||
function issueBkgPngLogo(Filename) {//下发固件
|
||||
var name = confirm('确定要下发图片名为' + Filename);
|
||||
if (name != null && name != "") {
|
||||
$("#photo").closest(".input-group").find("label").html(Filename);
|
||||
$("#myModal").css("display", "none");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
39
Face.Web/Areas/App/Views/Face/updateLogo.cshtml
Normal file
39
Face.Web/Areas/App/Views/Face/updateLogo.cshtml
Normal file
@@ -0,0 +1,39 @@
|
||||
|
||||
@using Face.Web.Areas.App.Models;
|
||||
@{
|
||||
Layout = null;
|
||||
List<FileDetails> Akplist = (List<FileDetails>)ViewData["Akplists"];
|
||||
}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover ">
|
||||
<tbody>
|
||||
@if (Akplist.Count != 0)
|
||||
{
|
||||
|
||||
<tr class="table table-striped ">
|
||||
<td>文件名</td>
|
||||
<td>文件大小</td>
|
||||
<td>文件日期</td>
|
||||
|
||||
</tr>
|
||||
for (int i = 0; i < Akplist.Count; i++)
|
||||
{
|
||||
<tr onclick="issueBkgPngLogo('@Akplist[i].Filename')">
|
||||
<td><a>@Akplist[i].Filename</a></td>
|
||||
<td><a>@Akplist[i].FileSize</a></td>
|
||||
<td><a>@Akplist[i].UploadDate</a></td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<script>
|
||||
function issueBkgPngLogo(Filename) {
|
||||
var name = confirm('确定要下发图片名为' + Filename);
|
||||
if (name != null && name != "") {
|
||||
$("#photologo").closest(".input-group").find("label").html(Filename);
|
||||
$("#myModal").css("display", "none");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
80
Face.Web/Areas/App/Views/GeneratePassword/Bing.cshtml
Normal file
80
Face.Web/Areas/App/Views/GeneratePassword/Bing.cshtml
Normal file
@@ -0,0 +1,80 @@
|
||||
@*@using Face.Domain.Entities;
|
||||
@using Face.Web.Areas.App.Models*@
|
||||
@{
|
||||
Layout = null;
|
||||
//List<Face.Domain.Entities.Hotels> Hotellist = Face.Services.Cache.CacheHelp.GetHotelslist();
|
||||
}
|
||||
|
||||
|
||||
<style>
|
||||
#btnaddPLineShow {
|
||||
background-color: #008CBA;
|
||||
border: none;
|
||||
color: white;
|
||||
padding: 5px 20px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
font-size: 16px;
|
||||
}
|
||||
</style>
|
||||
<section class="content" style="padding:0px;">
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
|
||||
<div class="card-tools">
|
||||
|
||||
<button type="button" class="btn btn-tool" data-card-widget="remove" title="Remove">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="col-md-6">
|
||||
<label for="exampleInputFile"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">人脸机序列号</font></font></label>
|
||||
<input type="text" class="form-control" id="Rlianjichanxis" aria-describedby="emailHelp" >
|
||||
</div>
|
||||
<button class="btn btn-success" id="btnaddPLineShow" onclick="accretion()" style="margin:10px;">获取key</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<script>
|
||||
function accretion() {
|
||||
var myType = document.getElementById("Rlianjichanxis").value;
|
||||
|
||||
console.log(myType)
|
||||
|
||||
|
||||
|
||||
var objects = {
|
||||
Sn: myType,
|
||||
@*faceNo: "@Session["StrNo"]"*@
|
||||
};
|
||||
$.ajax({
|
||||
url: "/App/GeneratePassword/AddPassword",
|
||||
type: "post",
|
||||
data: objects,
|
||||
async: true,
|
||||
success: function (res) {
|
||||
if (res.ErrCode == 200) {
|
||||
alert(res.ErrMsg)
|
||||
var link = "/App/GeneratePassword/GeneratePassword";
|
||||
window.location.href = link;
|
||||
} else
|
||||
{
|
||||
alert(res.ErrMsg)
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,128 @@
|
||||
@*@model PagedList.IPagedList<Face.Domain.Entities.DeviceManage>
|
||||
@using PagedList.Mvc;
|
||||
@using Face.Web.Areas.App.Models;
|
||||
@using Face.Domain.Entities;
|
||||
@using Face.Domain.Application*@
|
||||
@{
|
||||
ViewBag.Title = "GeneratePassword";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
//List<Face.Domain.Entities.Hotels> Hotellist = SqlSugarBase.authoriydb.Queryable<Hotels>().ToList();
|
||||
//List<AuthItem> authItem = (List<AuthItem>)Session["authItems"];
|
||||
//List<TBL_ROOM_BASIC_INFO> ZongRoominfo = (List<TBL_ROOM_BASIC_INFO>)Session["ZongRoominfo"];
|
||||
}
|
||||
@*<script src="~/Scripts/jquery-3.3.1.js"></script>*@
|
||||
<style>
|
||||
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
#order {
|
||||
border-top: solid 2px #ddd;
|
||||
}
|
||||
|
||||
.chaxun {
|
||||
text-indent: 5px;
|
||||
}
|
||||
|
||||
.PagedList-skipToLast page-item {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<section class="content" style="padding:0px;">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<!-- Default box -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<span style="font-size:30px">获取开门密钥</span>
|
||||
<div class="card-tools">
|
||||
<button type="button" class="btn btn-tool" data-card-widget="collapse" title="Collapse"></button>
|
||||
<button type="button" class="btn btn-tool" data-card-widget="remove" title="Remove">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@* <input type="text" placeholder="人脸机筛选" name="username" style="height:35px;margin-left:5px;" id="txtOpname"><button class="btn btn-md btn-primary" id="Btnmodify" onclick="search('/App/Face/InquireFaceall')">搜索</button>*@
|
||||
|
||||
<div class="input-group " style="width:300px; float:left;">
|
||||
<input type="search" style="height:40px;" id="txtOpname" @*value="@ViewData["SnDing"]"*@ class="form-control form-control-lg" placeholder="人脸机编号">
|
||||
<div class="input-group-append">
|
||||
<button type="submit" class="btn btn-lg btn-default" onclick="search('/App/GeneratePassword/selectSPassword')" id=" ">
|
||||
<i class="fa fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="input-group-append" style="float:right;">
|
||||
<button type="button" class="btn btn-lg btn-default" onclick="setpwd()" id=" ">
|
||||
设置人脸机密钥
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@*条件筛选*@
|
||||
@*内容筛选*@
|
||||
<div class="ibox-content" style="padding:0px;">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- /.card -->
|
||||
<div class="col-sm-4" id="faceDetailsBox">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<script src="~/Plugin/allPages.js"></script>
|
||||
<script>
|
||||
$(function () {
|
||||
var inParamH = getQueryVariable("hotelid");
|
||||
var inParamS = getQueryVariable("sn");
|
||||
if (inParamH || inParamS) {
|
||||
search('/App/GeneratePassword/selectSPassword', 0, 8, 1, {
|
||||
FaceName: inParamS
|
||||
});
|
||||
}
|
||||
else {
|
||||
search('/App/GeneratePassword/selectSPassword');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function setpwd() {
|
||||
|
||||
/* $("#faceDetailsBox").css("display","block") */
|
||||
|
||||
$.ajax({
|
||||
url: "/App/GeneratePassword/Bing",
|
||||
/* data: { "StrNo": sn }, // data为String类型,必须为 Key/Value 格式。*/
|
||||
type: "post", // 提交方式
|
||||
success: function (res) { // 请求成功后的回调函数,其中的参数data为controller返回的map,也就是说,然后通过data这个参数取JSON数据中的值
|
||||
$("#faceDetailsBox").html(res)
|
||||
}
|
||||
});
|
||||
}
|
||||
//if ($(document).width() >= 764) {
|
||||
//}
|
||||
//else {
|
||||
// $(".content-wrapper *").css("font-size", "10px");
|
||||
//}
|
||||
|
||||
</script>
|
||||
@@ -0,0 +1,85 @@
|
||||
@model List<Face.Domain.Entities.DeviceManage>
|
||||
@using PagedList.Mvc;
|
||||
@using Face.Web.Areas.App.Models;
|
||||
@using Face.Domain.Entities;
|
||||
@using Face.Domain.Application
|
||||
@{
|
||||
List<Face.Domain.Entities.Hotels> Hotellist = SqlSugarBase.authoriydb.Queryable<Hotels>().ToList();
|
||||
List<AuthItem> authItem = (List<AuthItem>)Session["authItems"];
|
||||
List<TBL_ROOM_BASIC_INFO> ZongRoominfo = (List<TBL_ROOM_BASIC_INFO>)Session["ZongRoominfo"];
|
||||
}
|
||||
<style>
|
||||
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
#order {
|
||||
border-top: solid 2px #ddd;
|
||||
}
|
||||
|
||||
.chaxun {
|
||||
text-indent: 5px;
|
||||
}
|
||||
|
||||
.PagedList-skipToLast page-item {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<div id="project">
|
||||
<table class="table dataTables-example" id="order">
|
||||
@foreach (var item in ViewBag.count)
|
||||
{
|
||||
<tbody class="tbodyList">
|
||||
<tr>
|
||||
<td id="mobile" style="text-align:left; ">编号: @item.Id<span class="gray"></span></td>
|
||||
<td id="mobile" style="text-align:left; ">sn: @item.SN<span class="gray"></span></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="mobile" style="text-align:left; ">密钥: @item.Key<span class="gray"></span></td>
|
||||
<td id="mobile" style="text-align:left; ">创建时间: @item.CreateDateTime<span class="gray"></span></td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<td id="mobile" style="text-align:left; ">MsgID: @item.MsgID<span class="gray"></span></td>
|
||||
<td id="mobile" style="text-align:left; ">请求类型: @(item.ReqType==0?"获取密钥":"重新生成密钥")<span class="gray"></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td id="mobile" style="text-align:left;" colspan="2">返回内容: @item.Return<span class="gray"></span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
}
|
||||
</table>
|
||||
|
||||
<div>
|
||||
<nav style="text-align:center;">
|
||||
<ul class="pagination" id="page">
|
||||
|
||||
<li class="first" onclick="firstPage('/App/GeneratePassword/selectSPassword')"><a>«</a></li>
|
||||
<li class="left"><a>…</a></li>
|
||||
@for (int i = 0; i < ViewBag.allpage; i++)
|
||||
{
|
||||
<li class="pages" onclick="SpecifyPage('/App/GeneratePassword/selectSPassword',@(i+1))"><a>@(i + 1)</a></li>
|
||||
}
|
||||
<li class="right"><a>…</a></li>
|
||||
<li class="finally"><a onclick="lastPage('/App/GeneratePassword/selectSPassword')">»</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
$(".pagination").addClass("pagination pagination-sm");
|
||||
$(".pagination").children("li").addClass("page-item");
|
||||
$(".page-item").children("a").addClass("page-link");
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
7
Face.Web/Areas/App/Views/Group/groupaddList.cshtml
Normal file
7
Face.Web/Areas/App/Views/Group/groupaddList.cshtml
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
@{
|
||||
ViewBag.Title = "groupaddList";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
|
||||
|
||||
210
Face.Web/Areas/App/Views/Home/Index.cshtml
Normal file
210
Face.Web/Areas/App/Views/Home/Index.cshtml
Normal file
@@ -0,0 +1,210 @@
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Index";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
@{
|
||||
int faceall = Face.Services.Cache.BaseCacheHelp.GetVaue<int>(Session["username"].ToString() + "face");
|
||||
int ullist = Face.Services.Cache.BaseCacheHelp.GetVaue<int>(Session["username"].ToString() + "ullist");
|
||||
int dp = Face.Services.Cache.BaseCacheHelp.GetVaue<int>(Session["username"].ToString() + "dp");
|
||||
int fbcount = Face.Services.Cache.BaseCacheHelp.GetVaue<int>(Session["username"].ToString() + "fbcount");
|
||||
int lodgeinfo = Face.Services.Cache.BaseCacheHelp.GetVaue<int>(Session["username"].ToString() + "lodgeinfo");
|
||||
int li = Face.Services.Cache.BaseCacheHelp.GetVaue<int>(Session["username"].ToString() + "li");
|
||||
int quantity = Face.Services.Cache.BaseCacheHelp.GetVaue<int>(Session["username"].ToString() + "quantity");
|
||||
int pmslist = Face.Services.Cache.BaseCacheHelp.GetVaue<int>(Session["username"].ToString() + "pmslist");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@using Face.Web.Areas.App.Models;
|
||||
|
||||
|
||||
|
||||
<script src="~/Plugin/user.js"></script>
|
||||
<link href="~/Theme/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="http://auth.blv-oa.com/Lib/plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="content-wrapper">
|
||||
<div class="card">
|
||||
<div class="card-header" style="padding:10px;">
|
||||
<h3 class="card-title">首页</h3>
|
||||
@*<div style="float: right;">
|
||||
if (Session["username"].ToString() == "oy")
|
||||
{
|
||||
<button class="btn btn-md btn-danger" onclick="closeProcess()"> 重启进程</button>
|
||||
}
|
||||
</div>*@
|
||||
|
||||
</div>
|
||||
<div class="card-body" style="padding:0;">
|
||||
<div class="row">
|
||||
<div class="col-2">
|
||||
<a class="link-black text-center" href="@Url.Action("HotelInfo", "Hotel")" style="padding:5px">
|
||||
<div>
|
||||
<i class="text-success link-black fa fa-university text-center" style="font-size:30px"></i>
|
||||
</div>
|
||||
<div class="text-gray link-black">
|
||||
<span style="font-size:16px" class="font-weight-bold">酒店</span>
|
||||
<br />(@quantity)
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-2 flex-column justify-content-center">
|
||||
<a href="@Url.Action("Faceall","Face")" class="link-black text-center" style="padding:5px">
|
||||
<div>
|
||||
<i class="text-warning link-black fa fa-mobile text-center" style="font-size:30px"></i>
|
||||
</div>
|
||||
<div class="text-gray link-black">
|
||||
<span style="font-size:16px" class="font-weight-bold">所有人脸机</span>
|
||||
<br />(@faceall)
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="col-2">
|
||||
<a class="link-black text-center" href="@Url.Action("Openhouse","Lodger")" style="padding:5px">
|
||||
<div>
|
||||
<i class="text-info link-black fa fa-users text-center" style="font-size:30px"></i>
|
||||
</div>
|
||||
<div class="text-gray link-black">
|
||||
<span style="font-size:16px" class="font-weight-bold">在店客户</span>
|
||||
<br />(@li)
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<a href="@Url.Action("operationLog","Log")" class="link-black text-center" style="padding:5px">
|
||||
<div>
|
||||
<i class="text-danger link-black fa fa-envelope text-center" style="font-size:30px"></i>
|
||||
</div>
|
||||
<div style="font-size:16px" class="text-gray link-black">
|
||||
<span class="font-weight-bold">日志</span>
|
||||
<br />(@fbcount)
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-2">
|
||||
<a href="@Url.Action("errormessagehandling","Log")" class="link-black text-center" style="padding:5px">
|
||||
<div>
|
||||
<i class="text-danger link-black fa fa-envelope text-center" style="font-size:30px"></i>
|
||||
</div>
|
||||
<div style="font-size:16px" class="text-gray link-black">
|
||||
<span class="font-weight-bold">错误报警日志</span>
|
||||
<br />(@ViewBag.errorcout)
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
@*<select class="form-control" id="OrgId" style="width:300px;">
|
||||
<option value="0">所有酒店</option>
|
||||
@{
|
||||
List<HotelsItem> Hotelslist = (List<HotelsItem>)Session["qxHotels"];
|
||||
for (int i = 0; i < Hotelslist.Count; i++)
|
||||
{
|
||||
<option value="@Hotelslist[i].HotelId">@Hotelslist[i].HotelName.Trim()</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
<input type="text" placeholder="查找酒店" onchange="setHotelDropDownLike();" name="findhotelbyinput" style="height:36px;" id="findhotelbynameinput">*@
|
||||
<div class="input-group m-b row" id="data_fromtoform">
|
||||
<div class="input-daterange input-group visible-xs-2 col-md-3">
|
||||
<input type="text" class="input-sm form-control mytimer" name="start" id="startTs" readonly />
|
||||
<span class="input-group-btn" style="width: 25%">
|
||||
<button class="btn default" type="button">
|
||||
<i class="fa fa-calendar-alt"></i>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
|
||||
|
||||
<span class="input-group-addon">至</span>
|
||||
</div>
|
||||
<div class="input-daterange input-group visible-xs-2 col-md-3">
|
||||
|
||||
|
||||
<input type="text" class="input-sm form-control mytimer" name="end" id="endTs" readonly />
|
||||
<span class="input-group-btn" style="width: 25%">
|
||||
<button class="btn default" type="button">
|
||||
<i class="fa fa-calendar-alt"></i>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn btn-md btn-primary" id="Btnmodify" onclick="search('/App/Log/InquirePmsMessageLoginfo');">搜索</button>
|
||||
</div>
|
||||
@*条件筛选 内容筛选*@
|
||||
<div class="ibox-content" style="padding:0px;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="~/Theme/js/plugins/pace/pace.min.js"></script>
|
||||
<script src="~/Theme/js/plugins/datapicker/bootstrap-datepicker.js"></script>
|
||||
<script src="~/Theme/js/plugins/datapicker/locales/bootstrap-datepicker.zh-CN.js"></script>
|
||||
<script src="~/Theme/js/plugins/peity/jquery.peity.min.js"></script>
|
||||
<script src="~/Plugin/allPages.js"></script>
|
||||
<script>
|
||||
$(function () {
|
||||
search('/App/Log/InquirePmsMessageLoginfo');
|
||||
});
|
||||
|
||||
$('.mytimer').datepicker({
|
||||
language: "zh-CN",//语言
|
||||
todayBtn: "linked",//今日按钮
|
||||
autoclose: true,//选择后关闭日期选择
|
||||
format: "yyyy-mm-dd",//日期格式
|
||||
});
|
||||
|
||||
function setHotelDropDownLike() {
|
||||
|
||||
var hotelliekName = $("#findhotelbynameinput").val();
|
||||
var matchedValue = 0;
|
||||
$("#OrgId option").each(function (index, it) {
|
||||
if ($(it).text().indexOf(hotelliekName) >= 0 && matchedValue == 0) {
|
||||
$(it).attr("selected", true);
|
||||
matchedValue = $(it).val();
|
||||
}
|
||||
else {
|
||||
$(it).attr("selected", false);
|
||||
}
|
||||
})
|
||||
$("#OrgId").val(matchedValue);
|
||||
}
|
||||
function openProcess() {
|
||||
$.ajax({
|
||||
url: "openProcess",
|
||||
/* data: data,*/
|
||||
type: "post", // 提交方式
|
||||
success: function (data) {
|
||||
console.log(data)
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
function closeProcess() {
|
||||
$.ajax({
|
||||
url: "closeProcess",
|
||||
/* data: data,*/
|
||||
type: "post", // 提交方式
|
||||
success: function (data) {
|
||||
|
||||
console.log(data)
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
226
Face.Web/Areas/App/Views/Hotel/HotelInfo.cshtml
Normal file
226
Face.Web/Areas/App/Views/Hotel/HotelInfo.cshtml
Normal file
@@ -0,0 +1,226 @@
|
||||
@model PagedList.IPagedList<Face.Domain.Entities.Hotels>
|
||||
@using PagedList.Mvc;
|
||||
@using Face.Domain.Entities;
|
||||
@using Face.Web.Areas.App.Models;
|
||||
@using Face.Domain.Application;
|
||||
@{
|
||||
ViewBag.Title = "HotelInfo";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
List<Face.Domain.Entities.HotelGroups> hglist = Face.Services.Cache.CacheHelp.GetHotelGroup2();
|
||||
List<TBL_ROOM_BASIC_INFO> ZongRoominfo = (List<TBL_ROOM_BASIC_INFO>)Session["ZongRoominfo"];
|
||||
List<TBL_ROOM_BASIC_INFO> roomlist = ZongRoominfo;
|
||||
}
|
||||
<style>
|
||||
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
#order {
|
||||
border-top: solid 2px #ddd;
|
||||
}
|
||||
|
||||
.chaxun {
|
||||
text-indent: 5px;
|
||||
}
|
||||
|
||||
.PagedList-skipToLast page-item {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<section class="content" style="padding:0px;">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<!-- Default box -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<span style="font-size:30px">酒店信息</span>
|
||||
|
||||
<div class="card-tools">
|
||||
<button type="button" class="btn btn-tool" data-card-widget="collapse" title="Collapse"></button>
|
||||
<button type="button" class="btn btn-tool" data-card-widget="remove" title="Remove">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body" >
|
||||
|
||||
<div class="input-group " style="width: 30%; float: left;" >
|
||||
<input type="search" id="txtOpname" class="form-control form-control-lg" placeholder="酒店名称筛选">
|
||||
<div class="input-group-append">
|
||||
<button type="submit" class="btn btn-lg btn-default" onclick="Hclick()" id="Btnmodify">
|
||||
<i class="fa fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group " style="width: 30%; float: left;">
|
||||
<input type="search" id="txtId" class="form-control form-control-lg" placeholder="酒店编号筛选">
|
||||
<div class="input-group-append">
|
||||
<button type="submit" class="btn btn-lg btn-default" onclick="Hid()" id="BtnmoID">
|
||||
<i class="fa fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@*<input type="text" placeholder="酒店名称筛选" name="username" style="height: 35px; " id="txtOpname"><button class="btn btn-md btn-primary" id="Btnmodify" onclick="Hclick()">搜索</button>*@
|
||||
@*<input type="text" placeholder="酒店编号筛选" name="username" style="height:35px;margin-left:5px;" id="txtId"><button class="btn btn-md btn-primary" id="BtnmoID" onclick="Hid()">搜索</button>*@
|
||||
</div>
|
||||
@*条件筛选*@
|
||||
|
||||
@*内容筛选*@
|
||||
<div class="ibox-content" style="padding:0px;">
|
||||
<div id="project">
|
||||
<table class="table dataTables-example" border="0" id="order">
|
||||
@if (Model != null)
|
||||
{
|
||||
foreach (var item in Model)
|
||||
{
|
||||
|
||||
<tbody class="tbodyList" id="handShow" style="cursor:hand" onclick="asd(this)">
|
||||
|
||||
<tr>
|
||||
<td rowspan="5" style="margin:0px;padding:0px;width:40px">
|
||||
<input type="hidden" id="ID" value="2">
|
||||
<div class="lightBoxGallery">
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td style="text-align:left;width:60%;">编号:@Html.DisplayFor(modelItem => item.Id)<span class="gray"></span></td>
|
||||
<td style="width:200px;">
|
||||
状态:<span style="color:#0094ff">
|
||||
@item.Status
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>酒店名称: @Html.DisplayFor(modelItem => item.Name)</td>
|
||||
@{
|
||||
if (item.GroupId != 0)
|
||||
{
|
||||
if (hglist.Single(s => s.Id == item.GroupId)!=null)
|
||||
{
|
||||
<td>项目组:@(hglist.Single(s => s.Id == item.GroupId).Name)</td>
|
||||
}
|
||||
else
|
||||
{
|
||||
<td>项目组:无</td>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<td>项目组:无</td>
|
||||
}
|
||||
}
|
||||
|
||||
</tr>
|
||||
<tr></tr>
|
||||
<tr>
|
||||
<td>
|
||||
创建时间: @item.CreateTime.ToString("yyyy/MM/dd")
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<a href="@Url.Action("Facetest", "Face")"></a> <button class="btn btn-xs btn-success" id="btnaddPLine" onclick="cun(@item.Id)">查看房间信息</button>
|
||||
</td>
|
||||
</tr>
|
||||
@{
|
||||
List<DeviceManage> hotellist = (List<DeviceManage>)ViewData["dmstate"];
|
||||
<tr class="entire"><td></td></tr>
|
||||
<tr class="entire">
|
||||
<td></td>
|
||||
<td>空房:@roomlist.Where(j => j.HOTEL_OLD_ID == int.Parse(item.Id.ToString())).Where(s => s.RoomStatusID == 16).Count()/(@roomlist.Where(j => j.HOTEL_OLD_ID == int.Parse(item.Id.ToString())).Count())</td>
|
||||
<td>出租中:@roomlist.Where(j => j.HOTEL_OLD_ID == int.Parse(item.Id.ToString())).Where(s => s.RoomStatusID == 2).Count()/(@roomlist.Where(j => j.HOTEL_OLD_ID == int.Parse(item.Id.ToString())).Count())</td>
|
||||
</tr>
|
||||
<tr class="entire">
|
||||
<td></td>
|
||||
<td>退房中:@roomlist.Where(j => j.HOTEL_OLD_ID == int.Parse(item.Id.ToString())).Where(s => s.RoomStatusID == 8).Count()/(@roomlist.Where(j => j.HOTEL_OLD_ID == int.Parse(item.Id.ToString())).Count())</td>
|
||||
|
||||
<td>在线人脸机:@hotellist.Where(x => x.HotelCode == item.Id.ToString()).Where(j => j.Status == true).Count()/(@hotellist.Where(x => x.HotelCode == item.Id.ToString()).Count())</td>
|
||||
</tr>
|
||||
<tr class="entire">
|
||||
<td></td>
|
||||
<td>待租中:@roomlist.Where(j => j.HOTEL_OLD_ID == int.Parse(item.Id.ToString())).Where(s => s.RoomStatusID == 4).Count()/(@roomlist.Where(j => j.HOTEL_OLD_ID == int.Parse(item.Id.ToString())).Count())</td>
|
||||
<td>不在线人脸机:@hotellist.Where(x => x.HotelCode == item.Id.ToString()).Where(j => j.Status == false).Count()/(@hotellist.Where(x => x.HotelCode == item.Id.ToString()).Count())</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
|
||||
}
|
||||
}
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<div style="text-align:center" class="chaxun">
|
||||
@*分页主要代码*@
|
||||
共 @Model.PageCount 页,当前第 @Model.PageNumber 页
|
||||
<nav aria-label="Contacts Page Navigation">
|
||||
<ul class="pagination justify-content-center m-0">
|
||||
|
||||
@if (ViewData["condition"] != null)
|
||||
{
|
||||
string TiaoJian = ViewData["condition"].ToString();
|
||||
@Html.PagedListPager(Model, page => Url.Action("HotelInfo", new { page, TiaoJian }), new PagedListRenderOptions() { DisplayItemSliceAndTotal = false, MaximumPageNumbersToDisplay = 5 });
|
||||
}
|
||||
else
|
||||
{
|
||||
@Html.PagedListPager(Model, page => Url.Action("HotelInfo", new { page }), new PagedListRenderOptions() { DisplayItemSliceAndTotal = false, MaximumPageNumbersToDisplay = 5 })
|
||||
}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div id="btn" onclick="tip()"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- /.card -->
|
||||
<div class="col-sm-4" id="faceDetailsBox">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(".pagination").addClass("pagination pagination-sm");
|
||||
$(".pagination").children("li").addClass("page-item");
|
||||
$(".page-item").children("a").addClass("page-link");
|
||||
|
||||
$('.entire').hide();
|
||||
function Hclick() {//查询酒店名称按钮
|
||||
var myType = document.getElementById("txtOpname").value//获取select对象
|
||||
|
||||
var link = "/App/Hotel/HotelInfo" + '?condition=' + myType
|
||||
window.location.href = link;
|
||||
}
|
||||
function Hid() {//查询酒店编号按钮
|
||||
var myType = document.getElementById("txtId").value//获取select对象
|
||||
|
||||
var link = "/App/Hotel/HotelInfo" + '?number=' + myType
|
||||
window.location.href = link;
|
||||
}
|
||||
function cun(str) {
|
||||
var link = "/App/Hotel/RoomInf" + '?hotelCode=' + str
|
||||
window.location.href = link;
|
||||
}
|
||||
function asd(that) {
|
||||
$(that).find('.entire').toggle();
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
274
Face.Web/Areas/App/Views/Hotel/RoomInf.cshtml
Normal file
274
Face.Web/Areas/App/Views/Hotel/RoomInf.cshtml
Normal file
@@ -0,0 +1,274 @@
|
||||
@model PagedList.IPagedList<Face.Web.Areas.App.Models.Roominfo.Result>
|
||||
@using PagedList.Mvc;
|
||||
@using Face.Domain.Entities;
|
||||
@{
|
||||
ViewBag.Title = "RoomInf";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
List<Face.Domain.Entities.HotelGroups> hglist = Face.Services.Cache.CacheHelp.GetHotelGroup();
|
||||
List<CheckInInfo> co = (List<CheckInInfo>)ViewData["shop"];
|
||||
}
|
||||
@*<script src="~/Scripts/jquery-3.3.1.js"></script>*@
|
||||
<style>
|
||||
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
#order {
|
||||
border-top: solid 2px #ddd;
|
||||
}
|
||||
|
||||
.chaxun {
|
||||
text-indent: 5px;
|
||||
}
|
||||
|
||||
.PagedList-skipToLast page-item {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<section class="content" style="padding:0px;">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<!-- Default box -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<span style="font-size:30px">房间信息(共 @ViewData["Roomsum"] 房间)</span>
|
||||
|
||||
<div class="card-tools">
|
||||
<button type="button" class="btn btn-tool" data-card-widget="collapse" title="Collapse"></button>
|
||||
<button type="button" class="btn btn-tool" data-card-widget="remove" title="Remove">
|
||||
<i class="fas fa-times"></i>
|
||||
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="input-group " style="width:300px; float:left;">
|
||||
<input type="search" style="height:40px;" id="txtOpname" class="form-control form-control-lg" placeholder="房间筛选">
|
||||
<div class="input-group-append">
|
||||
<button type="submit" class="btn btn-lg btn-default" onclick="HclickShow()" id="Btnmodify">
|
||||
<i class="fa fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="input-group " style="width:300px; float:left;">
|
||||
<input type="search" style="height:40px;" id="txtid" class="form-control form-control-lg" placeholder="房间编号筛选">
|
||||
<div class="input-group-append">
|
||||
<button type="submit" class="btn btn-lg btn-default" onclick="Hclic()" id="Btnmodify">
|
||||
<i class="fa fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@*<input type="text" placeholder="房间筛选" name="username" style="height:35px;margin-left:5px;" id="txtOpname"><button class="btn btn-md btn-primary" id="Btnmodify" onclick="HclickShow()">搜索</button>*@
|
||||
@*<input type="text" placeholder="房间编号筛选" name="username" style="height:35px;margin-left:5px;" id="txtid"><button class="btn btn-md btn-primary" onclick="Hclic()">搜索</button>*@
|
||||
<select class="form-control" id="OrgId" style="width:300px; float:left">
|
||||
<option value="-1">
|
||||
全部房间
|
||||
</option>
|
||||
<option value="16" @( ViewData["rommstate"] != null && ViewData["rommstate"].ToString() == "16" ? "selected='selected'" : "")>
|
||||
空房
|
||||
</option>
|
||||
<option value="4" @( ViewData["rommstate"] != null && ViewData["rommstate"].ToString() == "4" ? "selected='selected'" : "")>
|
||||
待租中
|
||||
</option>
|
||||
<option value="8" @( ViewData["rommstate"] != null && ViewData["rommstate"].ToString() == "8" ? "selected='selected'" : "")>
|
||||
退房中
|
||||
</option>
|
||||
<option value="2" @( ViewData["rommstate"] != null && ViewData["rommstate"].ToString() == "2" ? "selected='selected'" : "")>
|
||||
出租中
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
@*条件筛选*@
|
||||
|
||||
@*内容筛选*@
|
||||
<div class="ibox-content" style="padding:0px;">
|
||||
<div id="project">
|
||||
<table class="table dataTables-example" border="0" id="order">
|
||||
@if (Model != null)
|
||||
{
|
||||
foreach (var item in Model)
|
||||
{
|
||||
|
||||
<tbody class="tbodyList" id="handShow">
|
||||
|
||||
<tr>
|
||||
<td rowspan="5" style="margin:0px;padding:0px;width:40px">
|
||||
<input type="hidden" id="ID" value="2">
|
||||
<div class="lightBoxGallery">
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td style="text-align:left;width:60%;">编号: @Html.DisplayFor(modelItem => item.ID)<span class="gray"></span></td>
|
||||
<td style="width:200px;">
|
||||
状态:<span style="color:#0094ff">
|
||||
@if (item.RoomStatusID == 2)
|
||||
{
|
||||
<span>:出租中</span>
|
||||
}
|
||||
else if (item.RoomStatusID == 4)
|
||||
{
|
||||
<span>:待租中</span>
|
||||
}
|
||||
else if (item.RoomStatusID == 8)
|
||||
{
|
||||
<span>:退房中</span>
|
||||
}
|
||||
else if (item.RoomStatusID == 16)
|
||||
{
|
||||
<span>:空房</span>
|
||||
}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr></tr>
|
||||
<tr>
|
||||
<td>房间名称: @Html.DisplayFor(modelItem => item.RoomNumber)</td>
|
||||
@*<td>项目组: @(Html.DisplayFor(modelItem => item.GroupId).ToString() != "" ? hglist.Single(s => s.Id == item.GroupId).Name : "")</td>*@
|
||||
<td>
|
||||
@{
|
||||
int sun = 0;
|
||||
List<DeviceManage> deviceManages = (List<DeviceManage>)Session["Rommface"];
|
||||
foreach (var dmitem in deviceManages)
|
||||
{
|
||||
if (item.ID == dmitem.RoomId)
|
||||
{
|
||||
sun = 1;
|
||||
if (dmitem.Status == true)
|
||||
{
|
||||
<span style="cursor:hand; color:cornflowerblue" onclick="skip('@dmitem.SerialNo')">
|
||||
人脸机SN号:@dmitem.SerialNo
|
||||
(在线)
|
||||
|
||||
</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span style="cursor:hand; color:darkgrey" onclick="skip('@dmitem.SerialNo')">
|
||||
人脸机SN号:@dmitem.SerialNo
|
||||
(不在线)
|
||||
|
||||
</span>
|
||||
}
|
||||
}
|
||||
}
|
||||
if (sun == 0)
|
||||
{
|
||||
<button class="btn btn-xs btn-success" id="btnaddPLine" style="background-color:cornflowerblue" onclick="bing('@ViewData["hotelCode"]',@item.ID)">绑定人脸机</button>
|
||||
}
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
创建时间: @item.RegisterDate.ToString("yyyy-MM-dd")
|
||||
</td>
|
||||
<td>
|
||||
入住人数:
|
||||
@{
|
||||
int se = 0;
|
||||
foreach (var resident in co)
|
||||
{
|
||||
if (item.ID == resident.Roomid)
|
||||
{
|
||||
se++;
|
||||
|
||||
}
|
||||
}
|
||||
<span>@se</span>
|
||||
}
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</tbody>
|
||||
}
|
||||
}
|
||||
</table>
|
||||
|
||||
<div style="text-align:center" class="chaxun">
|
||||
@*分页主要代码*@
|
||||
共 @Model.PageCount 页,当前第 @Model.PageNumber 页
|
||||
<nav aria-label="Contacts Page Navigation">
|
||||
<ul class="pagination justify-content-center m-0">
|
||||
|
||||
@if (ViewData["conditionShow"] != null)
|
||||
{
|
||||
string TiaoJian = ViewData["conditionShow"].ToString();
|
||||
int hotelCode = int.Parse(ViewData["hotelCode"].ToString());
|
||||
@Html.PagedListPager(Model, page => Url.Action("RoomInf", new { page, hotelCode, TiaoJian }), new PagedListRenderOptions() { DisplayItemSliceAndTotal = false, MaximumPageNumbersToDisplay = 5 });
|
||||
}
|
||||
else if (ViewData["rommstate"] != null)
|
||||
{
|
||||
int hotelCode = int.Parse(ViewData["hotelCode"].ToString());
|
||||
string rommstate = ViewData["rommstate"].ToString();
|
||||
@Html.PagedListPager(Model, page => Url.Action("RoomInf", new { page, hotelCode, rommstate }), new PagedListRenderOptions() { DisplayItemSliceAndTotal = false, MaximumPageNumbersToDisplay = 5 });
|
||||
}
|
||||
else
|
||||
{
|
||||
int hotelCode = int.Parse(ViewData["hotelCode"].ToString());
|
||||
@Html.PagedListPager(Model, page => Url.Action("RoomInf", new { page, hotelCode }), new PagedListRenderOptions() { DisplayItemSliceAndTotal = false, MaximumPageNumbersToDisplay = 5 })
|
||||
}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<div id="btn" onclick="tip()"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-4" id="faceDetailsBox">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
<script>
|
||||
$(".pagination").addClass("pagination pagination-sm");
|
||||
$(".pagination").children("li").addClass("page-item");
|
||||
$(".page-item").children("a").addClass("page-link");
|
||||
|
||||
function HclickShow() {//查询房间名称按钮
|
||||
var txtName = document.getElementById("txttext")//获取select对象
|
||||
var myType = document.getElementById("txtOpname").value//获取select对象
|
||||
var link = "/App/Hotel/RoomInf" + '?hotelCode=' + @ViewData["hotelCode"] + '&condition=' + myType
|
||||
window.location.href = link;
|
||||
}
|
||||
function bing(hotel,room) {
|
||||
var link = "/App/Face/Roomselect" + '?hotel=' + hotel + '&room=' + room
|
||||
window.location.href = link;
|
||||
}
|
||||
function skip(ts) {
|
||||
var link = "/App/Face/TestFaceall" + '?Sn=' + ts
|
||||
window.location.href = link;
|
||||
}
|
||||
|
||||
|
||||
$('#OrgId').change(function () {//查询酒店按钮
|
||||
var myType1 = document.getElementById("OrgId");//获取select对象
|
||||
var index1 = myType1.selectedIndex;//获取选项中的索引,selectIndex表示的是当前所选中的index
|
||||
var code1 = myType1.options[index1].value;//获取酒店编号
|
||||
var link = "/App/Hotel/RoomInf" + '?hotelCode=' + @ViewData["hotelCode"] + '&rommstate=' + code1
|
||||
window.location.href = link;
|
||||
})
|
||||
|
||||
|
||||
function Hclic() {//查询房间编号按钮
|
||||
var myType = document.getElementById("txtid").value//获取select对象
|
||||
var link = "/App/Hotel/RoomInf" + '?hotelCode=' + @ViewData["hotelCode"] + '&roommid=' + myType
|
||||
window.location.href = link;
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
17
Face.Web/Areas/App/Views/ImgServer/Index.cshtml
Normal file
17
Face.Web/Areas/App/Views/ImgServer/Index.cshtml
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<title>View</title>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
296
Face.Web/Areas/App/Views/Lodger/AddCheckinfo.cshtml
Normal file
296
Face.Web/Areas/App/Views/Lodger/AddCheckinfo.cshtml
Normal file
@@ -0,0 +1,296 @@
|
||||
|
||||
@{
|
||||
ViewBag.Title = "AddCheckinfo";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
List<Face.Domain.Entities.Hotels> hllist = Face.Services.Cache.CacheHelp.GetHotelslist();
|
||||
}
|
||||
<link href="~/Theme/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
|
||||
<style>
|
||||
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
#order {
|
||||
border-top: solid 2px #ddd;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<section class="content" style="padding:0px;">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<!-- Default box -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@*条件筛选*@<div><h4>新增测试人员</h4></div>
|
||||
</div>
|
||||
@*内容筛选*@
|
||||
<div class="ibox-content" style="padding:0px;">
|
||||
<div id="project">
|
||||
<div class="card-body">
|
||||
<form class="form-horizontal" id="AddresidentFrom">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">测试人员名称</font></font></label>
|
||||
<input type="email" class="form-control" id="name" placeholder="输入名字">
|
||||
<p></p>
|
||||
<label for="exampleInputEmail1"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">测试人员身份证</font></font></label>
|
||||
<input type="email" class="form-control" id="id_no" placeholder="输入身份证">
|
||||
<p></p>
|
||||
<label for="exampleInputEmail1"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">测试人员电话号码</font></font></label>
|
||||
<input type="email" class="form-control" id="phones" placeholder="输入电话">
|
||||
<p></p>
|
||||
<label for="exampleInputEmail1"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">性别</font></font></label>
|
||||
<select class="form-control" id="OrgId" style=" float:left">
|
||||
<option value="1">
|
||||
男
|
||||
</option>
|
||||
<option value="0">
|
||||
女
|
||||
</option>
|
||||
</select>
|
||||
<p></p>
|
||||
|
||||
<label for="exampleInputFile"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">测试人员照片</font></font></label>
|
||||
<div class="form-group">
|
||||
<div class="input-group">
|
||||
<div class="custom-file">
|
||||
<input type="file" onchange="uploadimg()" class=" custom-file-input" accept="image/*" id="photo">
|
||||
<label class="custom-file-label" id="exampleInputFile"></label>
|
||||
</div>
|
||||
<div class="input-group-append">
|
||||
<span class="input-group-text" onclick="Upload()">上传</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div></div>
|
||||
<img id="img1" style="width:100px; height:100px; display:none" src=""alt="" />
|
||||
<div id="pictureShow"></div>
|
||||
<p></p>
|
||||
</div>
|
||||
<p></p>
|
||||
<div class="col-md-offset-3 col-md-9">
|
||||
<button class="btn btn-md btn-primary" type="button" id="btnAddShow">保存</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div id="btn" onclick="tip()"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card -->
|
||||
<div class="col-sm-4" id="faceDetailsBox">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<script src="~/Theme/js/plugins/datapicker/bootstrap-datepicker.js"></script>
|
||||
<script src="~/Theme/js/plugins/datapicker/locales/bootstrap-datepicker.zh-CN.js"></script>
|
||||
<script>
|
||||
var picturebase64;
|
||||
$(function () {
|
||||
$('#photo').on("change", function () {
|
||||
var file = this.files[0];
|
||||
if (this.files && file) {
|
||||
let reader = new FileReader();
|
||||
reader.onload = function (e) {
|
||||
console.log(e.target.result);
|
||||
$('#img1').attr('src', e.target.result);
|
||||
document.getElementById("img1").style.display = "inline";
|
||||
//document.getElementById("btnturn").style.display = "inline";
|
||||
|
||||
}
|
||||
reader.readAsDataURL(file);
|
||||
picturebase64 = file;
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
var srclocation;
|
||||
var url = "/Theme/js/jquery.form.min.js";
|
||||
$.getScript(url);
|
||||
$('#data_ovform .input-daterange').datepicker({
|
||||
language: "zh-CN",//语言
|
||||
todayBtn: "linked",//今日按钮
|
||||
keyboardNavigation: false,
|
||||
forceParse: false,
|
||||
autoclose: true,
|
||||
format: "yyyy/mm/dd"//日期格式
|
||||
});
|
||||
|
||||
function ToUploadPictures(file, back) {
|
||||
var reader = new FileReader();
|
||||
var AllowImgFileSize = 2100000; //上传图片最大值(单位字节)( 2 M = 2097152 B )超过2M上传失败
|
||||
var imgUrlBase64;
|
||||
if (file) {
|
||||
//将文件以Data URL形式读入页面
|
||||
imgUrlBase64 = reader.readAsDataURL(file);
|
||||
reader.onload = function (e) {
|
||||
var ImgFileSize = reader.result.substring(reader.result.indexOf(",") + 1);//截取base64码部分(可选可不选,需要与后台沟通)
|
||||
if (AllowImgFileSize != 0 && AllowImgFileSize < reader.result.length) {
|
||||
alert('上传失败,请上传不大于2M的图片!');
|
||||
return;
|
||||
} else {
|
||||
//执行上传操作
|
||||
console.log(ImgFileSize);
|
||||
back(ImgFileSize)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function uploadimg(type) {
|
||||
let files = $("#photo").prop("files");
|
||||
if (files.length <= 0)
|
||||
return;
|
||||
$("#photo").closest(".input-group").find("label").html(files[0].name);
|
||||
if (type != 1)
|
||||
return;
|
||||
uploads();
|
||||
}
|
||||
//上传图片
|
||||
function Upload() {
|
||||
uploads();
|
||||
}
|
||||
function uploads() {
|
||||
var formData = new FormData() //创建一个forData
|
||||
formData.append('img', $('#photo')[0].files[0]) //把file添加进去 name命名为img
|
||||
$.ajax({
|
||||
url: "/ImgServer/Update",
|
||||
data: formData,
|
||||
type: "POST",
|
||||
async: false,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
success: function (data) {//成功
|
||||
console.log(data.data.src);
|
||||
srclocation = data.data.src;
|
||||
alert("上传成功");
|
||||
//document.getElementById("btnturn").style.display = "none";
|
||||
$('#img1').remove();
|
||||
$("#pictureShow").html('<img id="images" src="/ImgServer/FileImage?url=' + data.data.src + '">')
|
||||
},
|
||||
error: function () {
|
||||
alert("上传失败")
|
||||
}
|
||||
})
|
||||
}
|
||||
$("#btnAddShow").click(function () {
|
||||
var name1 = $('#name').val();
|
||||
var id_no = $('#id_no').val();
|
||||
var photo = srclocation;
|
||||
var sex1 = $('#OrgId').val();
|
||||
var phone1 = $('#phones').val();
|
||||
if (name1 === null || name1 === undefined || name1 === "" ) {
|
||||
alert('用户名称不能为空值')
|
||||
return;
|
||||
}
|
||||
if (id_no === null || id_no === undefined || id_no === "") {
|
||||
alert('身份证号码不能为空值')
|
||||
return;
|
||||
}
|
||||
const reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
|
||||
if (!reg.test(id_no)) {
|
||||
alert('身份证号码格式不正确')
|
||||
return;
|
||||
}
|
||||
if (phone1 === null || phone1 === undefined || phone1 === "") {
|
||||
alert('手机号码不能为空值')
|
||||
return;
|
||||
}
|
||||
const regs = /^1[3-9]\d{9}$/;
|
||||
if (!regs.test(phone1)) {
|
||||
alert('手机号码格式不正确')
|
||||
return;
|
||||
}
|
||||
var InfoBodyShow = {
|
||||
name: name1,
|
||||
idNumber: id_no,
|
||||
picture: photo,
|
||||
sex: sex1,
|
||||
phone: phone1
|
||||
};
|
||||
$.ajax({
|
||||
url: "/App/Lodger/addcheckin",
|
||||
type: "post",
|
||||
data: InfoBodyShow,
|
||||
async: true,
|
||||
success: function (res) { //请求成功后的回调函数,其中的参数data为controller返回的map,也就是说,然后通过data这个参数取JSON数据中的值
|
||||
|
||||
if (res.Status == 200) {
|
||||
window.location.href = "/App/Test/TestOpen";
|
||||
alert('添加成功');
|
||||
} else if (res.Status == 300) {
|
||||
alert('请选择照片点击上传')
|
||||
}
|
||||
else if (res.Status == 700) {
|
||||
alert('手机号码重复了,请重新输入')
|
||||
}
|
||||
else if (res.Status == 800) {
|
||||
alert('身份证号码重复了,请重新输入')
|
||||
}
|
||||
else if (res.Status == 100) {
|
||||
alert('不可为空')
|
||||
} else {
|
||||
alert('添加失败')
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
$('#hotelShow').change(function () {
|
||||
var myType = document.getElementById("hotelShow");//获取select对象
|
||||
var index = myType.selectedIndex;//获取选项中的索引,selectIndex表示的是当前所选中的index
|
||||
var code = myType.options[index].value;//获取酒店编号
|
||||
document.getElementById('RoomShow').innerHTML = "";
|
||||
$.ajax({
|
||||
url: "/App/Lodger/officialRoom",
|
||||
type: "post",
|
||||
data: { "hotelId": code },
|
||||
success: function (res) {
|
||||
res.forEach(x => {
|
||||
$('#RoomShow').append('<option value=' + x.Id + '>' + x.RoomNumber + '</option>')
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
//function turn() {
|
||||
// var formData = new FormData() //创建一个forData
|
||||
// formData.append('img', $('#photo')[0].files[0]) //把file添加进去 name命名为img
|
||||
// $('#img1').css('webkit-transform', ' scaleX(-1)');
|
||||
// $.ajax({
|
||||
// url: "/App/Lodger/Base64StringToImage",
|
||||
// data: formData,
|
||||
// type: "POST",
|
||||
// async: false,
|
||||
// cache: false,
|
||||
// contentType: false,
|
||||
// processData: false,
|
||||
// success: function (res) {
|
||||
// console.log(res);
|
||||
// document.getElementById('photo').value = res;
|
||||
// alert("123")
|
||||
// }
|
||||
// });
|
||||
//}
|
||||
</script>
|
||||
|
||||
|
||||
209
Face.Web/Areas/App/Views/Lodger/Addedpersonnel.cshtml
Normal file
209
Face.Web/Areas/App/Views/Lodger/Addedpersonnel.cshtml
Normal file
@@ -0,0 +1,209 @@
|
||||
|
||||
@{
|
||||
ViewBag.Title = "Addedpersonnel";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
List<Face.Domain.Entities.Hotels> Hotellist = Face.Services.Cache.CacheHelp.GetHotelslist();
|
||||
}
|
||||
<style>
|
||||
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
#order {
|
||||
border-top: solid 2px #ddd;
|
||||
}
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<section class="content" style="padding:0px;">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<!-- Default box -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
|
||||
<div class="card-tools">
|
||||
<button type="button" class="btn btn-tool" data-card-widget="collapse" title="Collapse"></button>
|
||||
|
||||
<button type="button" class="btn btn-tool" data-card-widget="remove" title="Remove">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@*条件筛选*@<div><h4>新增住客信息</h4></div>
|
||||
</div>
|
||||
@*内容筛选*@
|
||||
<div class="ibox-content" style="padding:0px;">
|
||||
<div id="project">
|
||||
<div class="card-body">
|
||||
<form class="form-horizontal" id="AddresidentFrom">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputEmail1"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">选择酒店</font></font></label>
|
||||
<select class="form-control" id="OrgId">
|
||||
@{
|
||||
List<int> sum = (List<int>)Session["list"];
|
||||
foreach (int item in sum)
|
||||
{
|
||||
foreach (var iten in Hotellist)
|
||||
{
|
||||
if (iten.Id == item)
|
||||
{
|
||||
<option class="ComboBox" value="@iten.Id" )>
|
||||
@iten.Name
|
||||
</option>
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</select>
|
||||
<p></p>
|
||||
<label for="exampleInputEmail1"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">客户名字</font></font></label>
|
||||
<input type="email" class="form-control" id="name" placeholder="输入客户名字">
|
||||
<p></p>
|
||||
<label for="exampleInputEmail1"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">客户身份证</font></font></label>
|
||||
<input type="email" class="form-control" id="id_no" placeholder="输入客户身份证">
|
||||
<p></p>
|
||||
<label for="exampleInputEmail1"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;"> </font></font></label>
|
||||
<select class="form-control" id="Sex" style="width:300px; float:left">
|
||||
<option value="1">男</option>
|
||||
<option value="0">女</option>
|
||||
</select>
|
||||
<p></p>
|
||||
|
||||
<p></p>
|
||||
<label for="exampleInputEmail1"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">客户电话号码</font></font></label>
|
||||
<input type="email" class="form-control" id="weekly" placeholder="请输入客户电话号码">
|
||||
<p></p>
|
||||
<label for="exampleInputEmail1"><font style="vertical-align: inherit;"><font style="vertical-align: inherit;">备注</font></font></label>
|
||||
<input type="email" class="form-control" id="remark" placeholder="可不填">
|
||||
<p></p>
|
||||
<div class="col-md-offset-3 col-md-9">
|
||||
<button class="btn btn-md btn-primary" type="button" id="btnAddShow">保存</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div id="btn" onclick="tip()"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card-body -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- /.card -->
|
||||
<div class="col-sm-4" id="faceDetailsBox">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<script src="~/Scripts/jquery.js"></script>
|
||||
<script src="~/Scripts/jquery.datetimepicker.js"></script>
|
||||
|
||||
<script>
|
||||
var srclocation
|
||||
|
||||
function ToUploadPictures(file,back) {
|
||||
var reader = new FileReader();
|
||||
var AllowImgFileSize = 2100000; //上传图片最大值(单位字节)( 2 M = 2097152 B )超过2M上传失败
|
||||
var imgUrlBase64;
|
||||
if (file) {
|
||||
//将文件以Data URL形式读入页面
|
||||
imgUrlBase64 = reader.readAsDataURL(file);
|
||||
reader.onload = function (e) {
|
||||
var ImgFileSize = reader.result.substring(reader.result.indexOf(",") + 1);//截取base64码部分(可选可不选,需要与后台沟通)
|
||||
if (AllowImgFileSize != 0 && AllowImgFileSize < reader.result.length) {
|
||||
alert('上传失败,请上传不大于2M的图片!');
|
||||
return;
|
||||
} else {
|
||||
//执行上传操作
|
||||
console.log(ImgFileSize);
|
||||
back(ImgFileSize)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
function uploadimg(type) {
|
||||
let files = $("#photo").prop("files");
|
||||
if (files.length <= 0)
|
||||
return;
|
||||
$("#photo").closest(".input-group").find("label").html(files[0].name);
|
||||
if (type != 1)
|
||||
return;
|
||||
console.log(files[0])
|
||||
upload();
|
||||
}
|
||||
//上传图片
|
||||
function Upload() {
|
||||
|
||||
upload();
|
||||
}
|
||||
|
||||
function upload() {
|
||||
var formData = new FormData() //创建一个forData
|
||||
formData.append('img', $('#photo')[0].files[0]) //把file添加进去 name命名为img
|
||||
$.ajax({
|
||||
url: "/App/ImgServer/Update",
|
||||
data: formData,
|
||||
type: "POST",
|
||||
async: false,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
success: function (data) {//成功
|
||||
srclocation = data.data.src;
|
||||
alert("上传成功");
|
||||
$("#pictureShow").html('<img id="images" src="/ImgServer/FileImage?url=' + data.data.src + '">')
|
||||
},
|
||||
error: function () {
|
||||
alert("上传失败")
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$("#btnAddShow").click(function () {
|
||||
var name = $('#name').val();
|
||||
var hotelCode = $('#OrgId').val();
|
||||
var id_no = $('#id_no').val();
|
||||
var sex = $("#Sex").val();
|
||||
var photo = srclocation;
|
||||
var weekly = $('#weekly').val();
|
||||
var Remark = $("#remark").val();
|
||||
var InfoBodyShow = {
|
||||
LodgerNmae: name,
|
||||
IDNumber: id_no,
|
||||
Sex: sex,
|
||||
phonenumber: weekly,
|
||||
remark: Remark,
|
||||
HotelCode: hotelCode
|
||||
};
|
||||
$.ajax({
|
||||
url: "/App/Lodger/Addpeople",
|
||||
type: "post",
|
||||
data: InfoBodyShow,
|
||||
async: true,
|
||||
success: function (res) { // 请求成功后的回调函数,其中的参数data为controller返回的map,也就是说,然后通过data这个参数取JSON数据中的值
|
||||
console.log(res.Status)
|
||||
if (res.Status == 200) {
|
||||
alert('添加成功');
|
||||
var link = "/App/Lodger/LodgerInfo"
|
||||
window.location.href = link;
|
||||
} else if (res.Status == 300) {
|
||||
alert('请选择照片点击上传')
|
||||
} else if (res.Status == 100) {
|
||||
alert('不可为空')
|
||||
} else {
|
||||
alert('添加失败')
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
</script>
|
||||
217
Face.Web/Areas/App/Views/Lodger/LodgerInfo.cshtml
Normal file
217
Face.Web/Areas/App/Views/Lodger/LodgerInfo.cshtml
Normal file
@@ -0,0 +1,217 @@
|
||||
@model PagedList.IPagedList<Face.Domain.Entities.Lodger>
|
||||
@using PagedList.Mvc;
|
||||
@using Face.Domain.Entities;
|
||||
@using Face.Web.Areas.App.Models;
|
||||
@using Face.Domain.Application
|
||||
@{
|
||||
ViewBag.Title = "LodgerInfo";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
List<Hotels> hotels = (List<Hotels>)Session["HotelList"];
|
||||
List<Hosts> hosts = (List<Hosts>)Session["roomlist"];
|
||||
List<TBL_ROOM_BASIC_INFO> ZongRoominfo = (List<TBL_ROOM_BASIC_INFO>)Session["ZongRoominfo"];
|
||||
|
||||
}
|
||||
<script src="~/Plugin/user.js"></script>
|
||||
<style>
|
||||
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
#style-format {
|
||||
float: right;
|
||||
}
|
||||
|
||||
#btnaddPLine {
|
||||
float: right;
|
||||
}
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<section class="content" style="padding:0px;">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<!-- Default box -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<span style="font-size:30px">入住客户信息</span>
|
||||
@*<div class="card-tools">
|
||||
<button class="btn btn-md btn-primary" type="button" id="Hotelsearch">添加住客信息</button>
|
||||
</div>*@
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="input-group " style="width:300px; float:left;">
|
||||
<input type="search" style="height:40px;" id="txtOpname" class="form-control form-control-lg" placeholder="进行名字筛选">
|
||||
<div class="input-group-append">
|
||||
<button type="submit" class="btn btn-lg btn-default" onclick="search()" id="Btnmodify">
|
||||
<i class="fa fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@*<input type="text" placeholder="进行名字筛选" name="username" style="height:33px;" id="txtOpname"><button class="btn btn-md btn-primary" id="Btnmodify" onclick="search()">搜索</button>*@
|
||||
@*条件筛选*@
|
||||
</div>
|
||||
@*内容筛选*@
|
||||
<div class="ibox-content" style="padding:0px;">
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<div class="yhxx" onclick="Show(this)">
|
||||
<div class="info-box" style="padding: 0px; margin-bottom: 0.5rem; overflow-wrap: break-word;">
|
||||
<span class="info-box-icon" style="height:85px;overflow:hidden;">
|
||||
@if (ViewData["storage"] != null)
|
||||
{
|
||||
List<CheckInInfo> checkIns = (List<CheckInInfo>)ViewData["storage"];
|
||||
foreach (var ite in checkIns)
|
||||
{
|
||||
if (item.IDNumber == ite.IdNumber)
|
||||
{
|
||||
@*<img id="images" src="/ImgServer/FileImage?url=@ite.picture" style="width:50px;height:50px;">*@
|
||||
<img id="images" data-src="/ImgServer/FileImage?url=@ite.picture" src="~/Images/Project/tupian.jpg" width="85" style="margin:0px;">
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
</span>
|
||||
<div class="info-box-content" style="padding: 5px;">
|
||||
|
||||
<span class="text-bold" style="font-size: 17px; line-height: 2;">
|
||||
|
||||
@item.LodgerNmae
|
||||
</span>
|
||||
|
||||
<span style="line-height: 1;">
|
||||
身份证: <span>@item.IDNumber</span>
|
||||
</span>
|
||||
<span style="line-height: 1;">
|
||||
</span>
|
||||
<span style="line-height: 1;">
|
||||
注册日期: <span line-height: 1;">@item.CheckInDate.Value.ToString("yyyy/MM/dd")</span>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
<div class="info-box-content" style="padding: 0px;">
|
||||
<span style="line-height: 1;">
|
||||
性别
|
||||
@if (item.Sex != null)
|
||||
{
|
||||
if (item.Sex == 1)
|
||||
{
|
||||
<span style="color: rgb(169, 169, 169); line-height: 1;">男</span>
|
||||
}
|
||||
else if (item.Sex == 0)
|
||||
{
|
||||
<span style="color: rgb(169, 169, 169); line-height: 1;">女</span>
|
||||
}
|
||||
}
|
||||
</span>
|
||||
|
||||
<span style="line-height: 1;">
|
||||
备注:
|
||||
<span>@item.remark</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="acet">
|
||||
@foreach (var inall in ViewBag.inall)
|
||||
{
|
||||
if (item.IDNumber == inall.IdNumber)
|
||||
{
|
||||
<div style="margin-left:20px;">
|
||||
<span> 曾入住:@(hotels.FirstOrDefault(x => x.Id == inall.HotelCode).Name) /</span>
|
||||
@{TBL_ROOM_BASIC_INFO isok = ZongRoominfo.FirstOrDefault(s => s.ROOM_OLD_ID == inall.Roomid);
|
||||
<span>@(inall.Roomid.ToString() != "" ? (isok == null ? "" : isok.ROOM_NUMBER) : "") </span>
|
||||
}
|
||||
|
||||
<span>开房时间:@inall.CheckTime</span>
|
||||
<span>
|
||||
退房时间
|
||||
@if (Convert.ToDateTime(inall.checkOutTime) == Convert.ToDateTime("2000/1/1"))
|
||||
{
|
||||
<span>入住中</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>@inall.checkOutTime</span>
|
||||
}
|
||||
|
||||
</span>
|
||||
</div>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<!-- /.card -->
|
||||
|
||||
</div>
|
||||
<div style="text-align:center" class="chaxun">
|
||||
@*分页主要代码*@
|
||||
每页 @Model.PageSize 条记录,共 @Model.PageCount 页,当前第 @Model.PageNumber 页
|
||||
<nav aria-label="Contacts Page Navigation">
|
||||
<ul class="pagination justify-content-center m-0">
|
||||
@if (ViewData["infose"] != null)
|
||||
{
|
||||
string TiaoJian = ViewData["infose"].ToString();
|
||||
@Html.PagedListPager(Model, page => Url.Action("LodgerInfo", new { page, TiaoJian }), new PagedListRenderOptions() { DisplayItemSliceAndTotal = false, MaximumPageNumbersToDisplay = 5 });
|
||||
}
|
||||
else
|
||||
{ @Html.PagedListPager(Model, page => Url.Action("LodgerInfo", new { page }), new PagedListRenderOptions() { DisplayItemSliceAndTotal = false, MaximumPageNumbersToDisplay = 5 })}
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
$('.acet').hide();
|
||||
if ($(document).width() >= 764) {
|
||||
}
|
||||
else {
|
||||
$(".content-wrapper *").css("font-size", "11px");
|
||||
}
|
||||
function Show(that) {
|
||||
$(that).find('.acet').toggle();
|
||||
console.log(that);
|
||||
}
|
||||
//if ($(document).width() >= 764) {
|
||||
|
||||
//}
|
||||
//else {
|
||||
// $(".content-wrapper *").css("font-size", "13px");
|
||||
//}
|
||||
//$(".pagination").addClass("pagination pagination-sm");
|
||||
//$(".pagination").children("li").addClass("page-item");
|
||||
//$(".page-item").children("a").addClass("page-link");
|
||||
|
||||
$(".pagination").addClass("pagination pagination-sm");
|
||||
$(".pagination").children("li").addClass("page-item");
|
||||
$(".page-item").children("a").addClass("page-link");
|
||||
|
||||
function search() {//查询SN号按钮
|
||||
|
||||
var src = document.getElementById("txtOpname").value
|
||||
console.log(src);
|
||||
var link = "/App/Lodger/LodgerInfo" + '?TiaoJian=' + src
|
||||
window.location.href = link;
|
||||
}
|
||||
$("#Hotelsearch").click(function () {
|
||||
window.location.href = "/App/Lodger/Addedpersonnel";
|
||||
});
|
||||
</script>
|
||||
148
Face.Web/Areas/App/Views/Lodger/Openhouse.cshtml
Normal file
148
Face.Web/Areas/App/Views/Lodger/Openhouse.cshtml
Normal file
@@ -0,0 +1,148 @@
|
||||
@using PagedList.Mvc;
|
||||
@model PagedList.IPagedList<Face.Domain.Entities.CheckInInfo>
|
||||
@using PagedList.Mvc;
|
||||
@using Face.Domain.Application;
|
||||
@{
|
||||
ViewBag.Title = "Openhouse";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
List<Face.Domain.Entities.Hotels> hglist = Face.Services.Cache.CacheHelp.GetHotelslist();
|
||||
List<Face.Domain.Entities.Hosts> hostslist = Face.Services.Cache.CacheHelp.GetRoomGroup();
|
||||
List<TBL_ROOM_BASIC_INFO> ZongRoominfo = (List<TBL_ROOM_BASIC_INFO>)Session["ZongRoominfo"];
|
||||
|
||||
|
||||
}
|
||||
<script src="~/Plugin/user.js"></script>
|
||||
<style>
|
||||
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
#style-format {
|
||||
float: right;
|
||||
}
|
||||
|
||||
#btnaddPLine {
|
||||
float: right;
|
||||
}
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<section class="content" style="padding:0px;">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<!-- Default box -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<span style="font-size:30px">开房入住信息</span>
|
||||
<div class="card-tools">
|
||||
@*<button class="btn btn-md btn-primary" type="button" id="Hotelsearch">添加入住人员</button>*@
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="input-group " style="width:300px; float:left;">
|
||||
<input type="search" style="height:40px;" id="txtOpname" class="form-control form-control-lg" placeholder="进行名字筛选">
|
||||
<div class="input-group-append">
|
||||
<button type="submit" class="btn btn-lg btn-default" onclick="search()" id="Btnmodify">
|
||||
<i class="fa fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@*<input type="text" placeholder="进行名字筛选" name="username" style="height:33px;" id="txtOpname"><button class="btn btn-md btn-primary" id="Btnmodify" onclick="search()">搜索</button>*@
|
||||
@*条件筛选*@
|
||||
</div>
|
||||
@*内容筛选*@
|
||||
<div class="ibox-content" style="padding:10px;">
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<div class="yhxx" style="padding:5px;">
|
||||
<div class="info-box" style="padding: 0px; margin-bottom: 0.5rem; overflow-wrap: break-word;">
|
||||
<span class="info-box-icon" style="height:85px;overflow:hidden;"> <img id="images" src="/ImgServer/FileImage?url=@item.picture" style="width:50px; height:50px;"></span>
|
||||
<div class="info-box-content" style="padding: 7px;">
|
||||
|
||||
<span class="text-bold" style="font-size: 16px; line-height: 1;">
|
||||
@item.Name
|
||||
</span>
|
||||
|
||||
<span style="line-height: 1;">
|
||||
身份证: <span>@item.IdNumber</span>
|
||||
</span>
|
||||
<span style="line-height: 1;">
|
||||
</span>
|
||||
<span style="line-height: 1;">
|
||||
开房日期: <span line-height: 1;">@item.CheckTime.Value.ToString("yyyy/MM/dd hh:mm")</span>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
<div class="info-box-content" style="padding: 0px;">
|
||||
<span style="line-height: 1;">
|
||||
酒店: @(item.HotelCode.ToString() != "" ? (hglist.SingleOrDefault(s => s.Id == item.HotelCode)!=null? hglist.SingleOrDefault(s => s.Id == item.HotelCode).Name: ""): "")
|
||||
</span>
|
||||
<span style="line-height: 1;">
|
||||
房间:
|
||||
@{TBL_ROOM_BASIC_INFO isok = ZongRoominfo.FirstOrDefault(s => s.ROOM_OLD_ID == item.Roomid);
|
||||
<span>@(item.Roomid.ToString() != "" ? (isok == null ? "" : isok.ROOM_NUMBER) : "") </span>
|
||||
}
|
||||
</span>
|
||||
@*<span style="line-height: 1;">
|
||||
退房时间:
|
||||
<span>@item.checkOutTime.Value.ToString("yyyy/MM/dd")</span>
|
||||
</span>*@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<!-- /.card -->
|
||||
|
||||
</div>
|
||||
<div style="text-align:center" class="chaxun">
|
||||
@*分页主要代码*@
|
||||
每页 @Model.PageSize 条记录,共 @Model.PageCount 页,当前第 @Model.PageNumber 页
|
||||
<nav aria-label="Contacts Page Navigation">
|
||||
<ul class="pagination justify-content-center m-0">
|
||||
@if (ViewData["infose2"] != null)
|
||||
{
|
||||
string TiaoJian = ViewData["infose2"].ToString();
|
||||
@Html.PagedListPager(Model, page => Url.Action("Openhouse", new { page, TiaoJian }), new PagedListRenderOptions() { DisplayItemSliceAndTotal = false, MaximumPageNumbersToDisplay = 5 });
|
||||
}
|
||||
else
|
||||
{@Html.PagedListPager(Model, page => Url.Action("Openhouse", new { page }), new PagedListRenderOptions() { DisplayItemSliceAndTotal = false, MaximumPageNumbersToDisplay = 5 })}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(".pagination").addClass("pagination pagination-sm");
|
||||
$(".pagination").children("li").addClass("page-item");
|
||||
$(".page-item").children("a").addClass("page-link");
|
||||
if ($(document).width() >= 764) {
|
||||
}
|
||||
else {
|
||||
$(".content-wrapper *").css("font-size", "11px");
|
||||
}
|
||||
$("#Hotelsearch").click(function () {
|
||||
window.location.href = "/App/Lodger/AddCheckinfo";
|
||||
});
|
||||
function search() {
|
||||
|
||||
var src = document.getElementById("txtOpname").value
|
||||
console.log(src);
|
||||
var link = "/App/Lodger/Openhouse" + '?TiaoJian=' + src
|
||||
window.location.href = link;
|
||||
}
|
||||
</script>
|
||||
921
Face.Web/Areas/App/Views/Log/FaceStatusHistoryLog.cshtml
Normal file
921
Face.Web/Areas/App/Views/Log/FaceStatusHistoryLog.cshtml
Normal file
@@ -0,0 +1,921 @@
|
||||
@{
|
||||
ViewBag.Title = "FaceStatusHistoryLog";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
<style>
|
||||
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
#order {
|
||||
border-top: solid 2px #ddd;
|
||||
}
|
||||
|
||||
.chaxun {
|
||||
text-indent: 5px;
|
||||
}
|
||||
|
||||
.PagedList-skipToLast page-item {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<link href="~/Theme/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
|
||||
<div class="content-wrapper">
|
||||
<section class="content" style="padding:0px;">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<!-- Default box -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<span style="font-size:30px">所有人脸机在线状态变化历史</span>
|
||||
<div class="card-tools">
|
||||
<button type="button" class="btn btn-tool" data-card-widget="collapse" title="Collapse"></button>
|
||||
<button type="button" class="btn btn-tool" data-card-widget="remove" title="Remove">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@*条件筛选放在card body部分*@
|
||||
<div class="card-body col-sm-12">
|
||||
<div class="form-horizontal">
|
||||
|
||||
@*<div class="form-group row">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<div class="checkbox">
|
||||
<label class="checkbox-inline">
|
||||
<input type="checkbox" id="inlineStatusEventCheck0" name="StatusEventReasonCheck" value="0">第一次OnOpen
|
||||
</label>
|
||||
<label class="checkbox-inline">
|
||||
<input type="checkbox" id="inlineStatusEventCheck1" name="StatusEventReasonCheck" value="1">链路OnError
|
||||
</label>
|
||||
<label class="checkbox-inline">
|
||||
<input type="checkbox" id="inlineStatusEventCheck2" name="StatusEventReasonCheck" value="2">链路OnClose
|
||||
</label>
|
||||
<label class="checkbox-inline">
|
||||
<input type="checkbox" id="inlineStatusEventCheck3" name="StatusEventReasonCheck" value="3">链路重新OnOpen
|
||||
</label>
|
||||
<label class="checkbox-inline">
|
||||
<input type="checkbox" id="inlineStatusEventCheck4" name="StatusEventReasonCheck" value="4">Ping统计状态反转
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>*@
|
||||
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-md-10 col-sm-12">
|
||||
<div class="row">
|
||||
<div class="col-md-5 col-sm-12">
|
||||
<button type="button" class="btn btn-default" onclick="setDateRange(0);">今天</button>
|
||||
<button type="button" class="btn btn-default" onclick="setDateRange(1);">昨天</button>
|
||||
<button type="button" class="btn btn-default" onclick="setDateRange(2);">近三天</button>
|
||||
<button type="button" class="btn btn-default" onclick="setDateRange(3);">近一周</button>
|
||||
<button type="button" class="btn btn-default" onclick="setDateRange(4);">本月</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="" class="col-md-2 col-sm-12 col-form-label">时间范围</label>
|
||||
<div class="col-md-10 col-sm-12">
|
||||
<div class="row">
|
||||
<div class="col-md-5 col-sm-12">
|
||||
<div class="input-group mb-3">
|
||||
<input type="text" class="input-sm form-control mytimer" name="start" id="startTs" readonly="">
|
||||
<span class="input-group-btn" style="width: 25%">
|
||||
<button class="btn default" type="button">
|
||||
<i class="fa fa-calendar-alt"></i>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2 col-sm-12">至</div>
|
||||
<div class="col-md-5 col-sm-12">
|
||||
<div class="input-group mb-3">
|
||||
<input type="text" class="input-sm form-control mytimer" name="end" id="endTs" readonly="">
|
||||
<span class="input-group-btn" style="width: 25%">
|
||||
<button class="btn default" type="button">
|
||||
<i class="fa fa-calendar-alt"></i>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="txtOpname" class="col-md-2 col-sm-12 col-form-label">人脸机序列号</label>
|
||||
<div class="col-md-10 col-sm-12">
|
||||
<input type="text" class="form-control" id="txtOpname" placeholder="人脸机序列号">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-lg btn-default" onclick="refreshChart();" style="float:right;">查询</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@*内容筛选*@
|
||||
<div class="ibox-content" style="padding:0px;">
|
||||
<div class="col-sm-12 col-md-12">
|
||||
<div class="ibox float-e-margins ">
|
||||
<div class="ibox-title" style="padding: 5px 15px; min-height:auto;"></div>
|
||||
<div class="ibox-content " style="padding: 5px 15px;">
|
||||
|
||||
<div id="tableallrecordscontainer" style="overflow-y:auto;max-height:500px;">
|
||||
<table id="tableallrecordsforclick" class="table table-striped table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序列号</th>
|
||||
<th>酒店</th>
|
||||
<th>房间</th>
|
||||
<th>cnt</th>
|
||||
<th>当前状态</th>
|
||||
<th>在线时长</th>
|
||||
<th>离线时长</th>
|
||||
<th>离线时间比例</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tablebodyallrecordsforclick"></tbody>
|
||||
<tfoot></tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<div id="tablesinlerecordcontainer" style="overflow-y:auto;max-height:500px;">
|
||||
<table id="tablesinglerecordrawevents" class="table table-striped table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>序列号</th>
|
||||
<th>厂家</th>
|
||||
<th>触发后状态</th>
|
||||
<th>触发时间</th>
|
||||
<th>触发原因</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="tablebodysinglerecordrawevents"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="chartcanvassinglecounterperhourcontainer" class="chart">
|
||||
<canvas id="singleLineCounterPerHourChart" style="max-height:600px;" width="800" height="300"></canvas>
|
||||
</div>
|
||||
<div id="chartcanvassinglecontainer" class="chart">
|
||||
<canvas id="singleLineChart" style="max-height:300px;" width="800" height="200"></canvas>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<script src="~/Content/NewFrame/plugins/chart.js/Chart.js"></script>
|
||||
<script src="~/Theme/js/plugins/datapicker/bootstrap-datepicker.js"></script>
|
||||
<script src="~/Theme/js/plugins/datapicker/locales/bootstrap-datepicker.zh-CN.js"></script>
|
||||
<script src="~/Plugin/allPages.js"></script>
|
||||
<script>
|
||||
const sampleIntv = 1000;//1秒 //1000 * 60;//1分钟 //1000 * 60 * 6;//6分钟
|
||||
const hourIntv = 1000*60*60;//1小时
|
||||
|
||||
$(function () {
|
||||
var inParam = getQueryVariable("sn");
|
||||
if (inParam) {
|
||||
$("#txtOpname").val = inParam
|
||||
//search('/App/Face/InquireFaceLogAll', 0, 16, 1, {
|
||||
// FaceName: inParam
|
||||
//});
|
||||
}
|
||||
else {
|
||||
//search('/App/Face/InquireFaceLogAll');
|
||||
}
|
||||
});
|
||||
if ($(document).width() >= 764) {
|
||||
}
|
||||
else {
|
||||
$(".content-wrapper *").css("font-size", "10px");
|
||||
}
|
||||
|
||||
$('.mytimer').datepicker({
|
||||
language: "zh-CN",//语言
|
||||
todayBtn: "linked",//今日按钮
|
||||
autoclose: true,//选择后关闭日期选择
|
||||
format: "yyyy-mm-dd",//日期格式
|
||||
});
|
||||
|
||||
|
||||
//计数排序表
|
||||
var gCacheDataArray = [];//raw recs of counter
|
||||
|
||||
//单个事件表
|
||||
var gMySingleCounterPerHourChart = null;
|
||||
var gSingleCounterPerHourCacheDataArray = []; //raw recs of events
|
||||
var gSingleCounterPerHourCacheRangeArray = []; //range array of whole time period
|
||||
//单个事件表
|
||||
var gMySingleChart = null;
|
||||
var gSingleCacheRangeArray = []; //range array of selected time period
|
||||
var gSingleCacheChartLabelArray = [];
|
||||
var gSingleCacheChartDataArray = [];
|
||||
|
||||
function clearSinglelineCanvas() {
|
||||
gMySingleChart = null;
|
||||
var containerDom = document.querySelector("#chartcanvassinglecontainer");
|
||||
var canvasDom = document.querySelector("#singleLineChart");
|
||||
if (canvasDom) {
|
||||
containerDom.removeChild(canvasDom);
|
||||
containerDom.innerHTML = '<canvas id="singleLineChart" style="max-height:300px;" width="800" height="200"></canvas>';
|
||||
}
|
||||
};
|
||||
function clearSinglelineCounterPerHourCanvas() {
|
||||
gMySingleCounterPerHourChart = null;
|
||||
var containerDom = document.querySelector("#chartcanvassinglecounterperhourcontainer");
|
||||
var canvasDom = document.querySelector("#singleLineCounterPerHourChart");
|
||||
if (canvasDom) {
|
||||
containerDom.removeChild(canvasDom);
|
||||
containerDom.innerHTML = '<canvas id="singleLineCounterPerHourChart" style="max-height:800px;" width="800" height="600"></canvas>';
|
||||
}
|
||||
}
|
||||
|
||||
function refreshTableWithCacheData() {
|
||||
let tarTbody = document.querySelector("#tablebodyallrecordsforclick");
|
||||
tarTbody.innerHTML = "";
|
||||
|
||||
window.setTimeout(function () {
|
||||
let tarTB = document.querySelector("#tablebodyallrecordsforclick")
|
||||
let trs = '';
|
||||
for (let i = 0; i < gCacheDataArray.length; i++) {
|
||||
|
||||
if (gCacheDataArray[i].currentstatus === '离线') {
|
||||
trs += '<tr style="color:crimson;">';
|
||||
}
|
||||
else {
|
||||
trs += '<tr>';
|
||||
}
|
||||
|
||||
trs += '<td>' + '<a style="text-decoration:underline;cursor:hand;" onclick="onShowSingleSN(this);" data-target="' + gCacheDataArray[i].SN + '">'
|
||||
trs += gCacheDataArray[i].SN + '</a>';
|
||||
trs += '<div>' + gCacheDataArray[i].Factory + '</div>' + '</td>';
|
||||
|
||||
trs += '<td>' + gCacheDataArray[i].hotel + '</td>';
|
||||
trs += '<td>' + gCacheDataArray[i].room + '</td>';
|
||||
trs += '<td>' + gCacheDataArray[i].cnt + '</td>';
|
||||
|
||||
trs += '<td>' + gCacheDataArray[i].currentstatus + '</td>';
|
||||
|
||||
|
||||
trs += '<td>' + gCacheDataArray[i].onlinetime + '</td>';
|
||||
trs += '<td>' + gCacheDataArray[i].offlinetime + '</td>';
|
||||
trs += '<td>' + gCacheDataArray[i].offrateperc + '</td>';
|
||||
trs += '</tr>';
|
||||
}
|
||||
tarTB.innerHTML = trs;
|
||||
}, 0);
|
||||
}
|
||||
|
||||
function refreshSingleTableWithCacheData() {
|
||||
let tarTbody = document.querySelector("#tablebodysinglerecordrawevents");
|
||||
tarTbody.innerHTML = "";
|
||||
|
||||
window.setTimeout(function () {
|
||||
let tarTB = document.querySelector("#tablebodysinglerecordrawevents")
|
||||
let trs = '';
|
||||
for (let i = 0; i < gSingleCounterPerHourCacheDataArray.length; i++) {
|
||||
trs += '<tr>';
|
||||
trs += '<td>' + gSingleCounterPerHourCacheDataArray[i].ID + '</td>';
|
||||
trs += '<td>' + gSingleCounterPerHourCacheDataArray[i].SN + '</td>';
|
||||
trs += '<td>' + gSingleCounterPerHourCacheDataArray[i].Factory + '</td>';
|
||||
trs += '<td>' + gSingleCounterPerHourCacheDataArray[i].Status + '</td>';
|
||||
trs += '<td>' + convertMVCDateToString(gSingleCounterPerHourCacheDataArray[i].CreateTime) + '</td>';
|
||||
trs += '<td>' + gSingleCounterPerHourCacheDataArray[i].Reason + '</td>';
|
||||
trs += '</tr>';
|
||||
}
|
||||
tarTB.innerHTML = trs;
|
||||
}, 0);
|
||||
}
|
||||
|
||||
//选中一个设备,显示时间范围内的计数
|
||||
function onShowSingleSN(curDom) {
|
||||
var tarSn = curDom.dataset.target;
|
||||
|
||||
clearSinglelineCounterPerHourCanvas();
|
||||
|
||||
var stTime = $("#startTs").val();
|
||||
var edTime = $("#endTs").val();
|
||||
|
||||
var arrResons = [0,1,2,3,4];
|
||||
/*$('input[name="StatusEventReasonCheck"]:checked').each(function () {
|
||||
arrResons.push($(this).val());
|
||||
});*/
|
||||
|
||||
|
||||
let data = {
|
||||
sn: tarSn,
|
||||
st: stTime,
|
||||
ed: edTime,
|
||||
arrReason: arrResons,
|
||||
page: 0
|
||||
};
|
||||
|
||||
sendRequestSingleCounterPerHour(data, function () {
|
||||
//显示原始事件表格
|
||||
refreshSingleTableWithCacheData();
|
||||
|
||||
|
||||
//显示次数表
|
||||
const ctx = document.getElementById('singleLineCounterPerHourChart');
|
||||
|
||||
|
||||
var tmpStMsTime = 0, tmpEdMsTime = 0;
|
||||
var labelLen = 0;
|
||||
var tmpObj = getTimePeriodOfSingleData();
|
||||
tmpStMsTime = tmpObj.stMsTime;
|
||||
tmpEdMsTime = tmpObj.edMsTime;
|
||||
labelLen = Math.ceil((tmpEdMsTime - tmpStMsTime) / hourIntv) + 1; //24 range need 25 break point.
|
||||
|
||||
var rangeArr = [];
|
||||
var labelArr = [];
|
||||
for (let i = 0; i < labelLen; i++) {
|
||||
var tmpDt = new Date();
|
||||
var intTime = tmpStMsTime + i * hourIntv;
|
||||
tmpDt.setTime(intTime);
|
||||
labelArr.push(tmpDt.toLocaleString('zh-CN'));
|
||||
rangeArr.push({ pos: intTime, cnt: 0});
|
||||
}
|
||||
for (var i = 0; i < gSingleCounterPerHourCacheDataArray.length; i++) {
|
||||
var ptIntTime = convertMVCDateToInt(gSingleCounterPerHourCacheDataArray[i].CreateTime);
|
||||
|
||||
//对每一个记录,放到小时区间里面去添加触发次数
|
||||
let dupPos = -1;
|
||||
for (let k = 1; k < rangeArr.length; k++) {
|
||||
if (ptIntTime >= rangeArr[k - 1].pos && ptIntTime < rangeArr[k].pos) {
|
||||
rangeArr[k - 1].cnt++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var dataArr = rangeArr.map(x => x.cnt);
|
||||
gMySingleCounterPerHourChart = new Chart(ctx, {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: labelArr,
|
||||
datasets: [{
|
||||
label: tarSn + '设备历史事件次数',
|
||||
data: dataArr,
|
||||
fill: false,
|
||||
borderColor: 'rgb(75, 192, 192)',
|
||||
tension: 0.1
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
scales: {
|
||||
yAxes: [{
|
||||
ticks: {
|
||||
beginAtZero: true
|
||||
}
|
||||
}]
|
||||
},
|
||||
onClick: (e) => {
|
||||
const canvasPosition = Chart.helpers.getRelativePosition(e, gMySingleCounterPerHourChart);
|
||||
|
||||
// Substitute the appropriate scale IDs
|
||||
let dataX = gMySingleCounterPerHourChart.scales["x-axis-0"].getValueForPixel(canvasPosition.x);
|
||||
|
||||
let lowPos = dataX - 1;
|
||||
let highPos = dataX + 1;
|
||||
if (lowPos <= 0)
|
||||
lowPos = 0;
|
||||
if (highPos >= rangeArr.length)
|
||||
highPos = rangeArr.length;
|
||||
|
||||
clearSinglelineCanvas();
|
||||
|
||||
//截取老的range记录中某一段形成新的range记录
|
||||
gSingleCacheRangeArray = [];
|
||||
let lowPt = rangeArr[lowPos].pos;
|
||||
let highPt = rangeArr[highPos].pos;
|
||||
let lowStatus = 0;
|
||||
let highStatus = 0;
|
||||
//新range的第一个break point
|
||||
for (let i = 0; i < gSingleCounterPerHourCacheRangeArray.length; i++) {
|
||||
if (lowPt < gSingleCounterPerHourCacheRangeArray[i].brk) {
|
||||
lowStatus = gSingleCounterPerHourCacheRangeArray[i - 1].stat;
|
||||
break;
|
||||
}
|
||||
}
|
||||
gSingleCacheRangeArray.push({ brk: lowPt, stat: lowStatus });
|
||||
//新range的中间break point
|
||||
for (let j = 0; j < gSingleCounterPerHourCacheRangeArray.length; j++) {
|
||||
if (gSingleCounterPerHourCacheRangeArray[j].brk >= lowPt && gSingleCounterPerHourCacheRangeArray[j].brk <= highPt) {
|
||||
gSingleCacheRangeArray.push({
|
||||
brk: gSingleCounterPerHourCacheRangeArray[j].brk,
|
||||
stat: gSingleCounterPerHourCacheRangeArray[j].stat});
|
||||
}
|
||||
}
|
||||
//新range的最后一个break point
|
||||
for (let i = 0; i < gSingleCounterPerHourCacheRangeArray.length; i++) {
|
||||
if (highPt < gSingleCounterPerHourCacheRangeArray[i].brk) {
|
||||
highStatus = gSingleCounterPerHourCacheRangeArray[i - 1].stat;
|
||||
break;
|
||||
}
|
||||
}
|
||||
gSingleCacheRangeArray.push({ brk: highPt, stat: highStatus });
|
||||
|
||||
|
||||
//使用新的range来插值
|
||||
gSingleCacheChartLabelArray = [];
|
||||
gSingleCacheChartDataArray = [];
|
||||
var pointsLen = Math.floor((highPt - lowPt) / sampleIntv);
|
||||
for (let i = 0; i < pointsLen; i++) {
|
||||
var tmpDt = new Date();
|
||||
tmpDt.setTime(lowPt + i * 1000);
|
||||
gSingleCacheChartLabelArray.push(tmpDt.toLocaleString('zh-CN'));
|
||||
}
|
||||
for (let j = 0; j < pointsLen; j++) {
|
||||
let curVal = 0;
|
||||
let curPt = lowPt + j * 1000;
|
||||
for (let k = 1; k <= gSingleCacheRangeArray.length; k++) {
|
||||
if (curPt < gSingleCacheRangeArray[k].brk && curPt >= gSingleCacheRangeArray[k - 1].brk) {
|
||||
curVal = gSingleCacheRangeArray[k - 1].stat;
|
||||
break;
|
||||
}
|
||||
}
|
||||
gSingleCacheChartDataArray.push(curVal);
|
||||
}
|
||||
|
||||
|
||||
//使用插值数组来显示
|
||||
refreshWholeTimePeriodSingleChart(tarSn, 0, gSingleCacheChartDataArray.length);
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function getTimePeriodOfSingleData()
|
||||
{
|
||||
var tmpStMsTime = 0, tmpEdMsTime = 0;
|
||||
var spanMs = 0;
|
||||
var labelLen = 0;
|
||||
var stTime = $("#startTs").val();
|
||||
var edTime = $("#endTs").val();
|
||||
var stArr = stTime.split('-').map(it => parseInt(it, 10));
|
||||
var edArr = edTime.split('-').map(it => parseInt(it, 10));
|
||||
var tmpSt = new Date(stArr[0], stArr[1] - 1, stArr[2], 0, 0, 0, 0);
|
||||
var tmpEd = new Date(edArr[0], edArr[1] - 1, edArr[2], 23, 59, 59, 0);
|
||||
tmpStMsTime = tmpSt.getTime();
|
||||
tmpEdMsTime = tmpEd.getTime();
|
||||
spanMs = tmpEdMsTime - tmpStMsTime;
|
||||
labelLen = Math.floor(spanMs / sampleIntv);
|
||||
|
||||
return {
|
||||
stMsTime: tmpStMsTime,
|
||||
edMsTime: tmpEdMsTime,
|
||||
xLen: labelLen
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
function refreshWholeTimePeriodSingleChart(singleSn, low, high) {
|
||||
const ctx = document.getElementById('singleLineChart');
|
||||
|
||||
var labelArr = [];
|
||||
var dataArr = [];
|
||||
labelArr = gSingleCacheChartLabelArray;
|
||||
dataArr = gSingleCacheChartDataArray;
|
||||
|
||||
gMySingleChart = new Chart(ctx, {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: labelArr,
|
||||
datasets: [{
|
||||
label: singleSn + '设备在线历史状态',
|
||||
data: dataArr,
|
||||
fill: false,
|
||||
borderColor: 'rgb(75, 192, 192)',
|
||||
tension: 0.1
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
/*responsive: true,*/
|
||||
maintainAspectRatio:false,
|
||||
scales: {
|
||||
yAxes: [{
|
||||
ticks: {
|
||||
beginAtZero: true
|
||||
}
|
||||
}]
|
||||
},
|
||||
onClick: (e) => {
|
||||
const canvasPosition = Chart.helpers.getRelativePosition(e, gMySingleChart);
|
||||
|
||||
// Substitute the appropriate scale IDs
|
||||
dataX = gMySingleChart.scales["x-axis-0"].getValueForPixel(canvasPosition.x);
|
||||
|
||||
var newRangeLow = dataX - 1800;
|
||||
var newRangeHigh = dataX + 1800;
|
||||
if (newRangeLow <= 0)
|
||||
newRangeLow = 0;
|
||||
if (newRangeHigh >= gSingleCacheChartDataArray.length)
|
||||
newRangeHigh = gSingleCacheChartDataArray.length - 1;
|
||||
|
||||
clearSinglelineCanvas();
|
||||
|
||||
window.setTimeout(refreshOneHourSingleChart, 200, singleSn, newRangeLow, newRangeHigh);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function refreshOneHourSingleChart(singleSn, low, high) {
|
||||
const ctx = document.getElementById('singleLineChart');
|
||||
|
||||
var labelArr = [];
|
||||
var dataArr = [];
|
||||
labelArr = gSingleCacheChartLabelArray.slice(low, high);
|
||||
dataArr = gSingleCacheChartDataArray.slice(low,high);
|
||||
|
||||
gMySingleChart = new Chart(ctx, {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: labelArr,
|
||||
datasets: [{
|
||||
label: singleSn + '设备在线历史状态',
|
||||
data: dataArr,
|
||||
fill: false,
|
||||
borderColor: 'rgb(75, 192, 192)',
|
||||
tension: 0.1
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
maintainAspectRatio: false,
|
||||
scales: {
|
||||
yAxes: [{
|
||||
ticks: {
|
||||
beginAtZero: true
|
||||
}
|
||||
}]
|
||||
},
|
||||
onClick: (e) => {
|
||||
const canvasPosition = Chart.helpers.getRelativePosition(e, gMySingleChart);
|
||||
|
||||
// Substitute the appropriate scale IDs
|
||||
dataX = gMySingleChart.scales["x-axis-0"].getValueForPixel(canvasPosition.x);
|
||||
|
||||
var newRangeLow = dataX + low - 300;
|
||||
var newRangeHigh = dataX + low + 300;
|
||||
if (newRangeLow <= 0)
|
||||
newRangeLow = 0;
|
||||
if (newRangeHigh >= gSingleCacheChartDataArray.length)
|
||||
newRangeHigh = gSingleCacheChartDataArray.length - 1;
|
||||
|
||||
clearSinglelineCanvas();
|
||||
|
||||
window.setTimeout(refreshTenMintuesSingleChart, 200, singleSn, newRangeLow, newRangeHigh);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function refreshTenMintuesSingleChart(singleSn, low, high) {
|
||||
const ctx = document.getElementById('singleLineChart');
|
||||
|
||||
var labelArr = [];
|
||||
var dataArr = [];
|
||||
labelArr = gSingleCacheChartLabelArray.slice(low, high);
|
||||
dataArr = gSingleCacheChartDataArray.slice(low, high);
|
||||
|
||||
gMySingleChart = new Chart(ctx, {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: labelArr,
|
||||
datasets: [{
|
||||
label: singleSn + '设备在线历史状态',
|
||||
data: dataArr,
|
||||
fill: false,
|
||||
borderColor: 'rgb(75, 192, 192)',
|
||||
tension: 0.1
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
maintainAspectRatio: false,
|
||||
scales: {
|
||||
yAxes: [{
|
||||
ticks: {
|
||||
beginAtZero: true
|
||||
}
|
||||
}]
|
||||
},
|
||||
onClick: (e) => {
|
||||
const canvasPosition = Chart.helpers.getRelativePosition(e, gMySingleChart);
|
||||
|
||||
// Substitute the appropriate scale IDs
|
||||
dataX = gMySingleChart.scales["x-axis-0"].getValueForPixel(canvasPosition.x);
|
||||
|
||||
var newRangeLow = dataX + low - 60;
|
||||
var newRangeHigh = dataX + low + 60;
|
||||
if (newRangeLow <= 0)
|
||||
newRangeLow = 0;
|
||||
if (newRangeHigh >= gSingleCacheChartDataArray.length)
|
||||
newRangeHigh = gSingleCacheChartDataArray.length - 1;
|
||||
|
||||
clearSinglelineCanvas();
|
||||
|
||||
window.setTimeout(refreshTwoMintuesSingleChart, 200, singleSn, newRangeLow, newRangeHigh);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function refreshTwoMintuesSingleChart(singleSn, low, high) {
|
||||
const ctx = document.getElementById('singleLineChart');
|
||||
|
||||
var labelArr = [];
|
||||
var dataArr = [];
|
||||
labelArr = gSingleCacheChartLabelArray.slice(low, high);
|
||||
dataArr = gSingleCacheChartDataArray.slice(low, high);
|
||||
|
||||
gMySingleChart = new Chart(ctx, {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: labelArr,
|
||||
datasets: [{
|
||||
label: singleSn + '设备在线历史状态',
|
||||
data: dataArr,
|
||||
fill: false,
|
||||
borderColor: 'rgb(75, 192, 192)',
|
||||
tension: 0.1
|
||||
}]
|
||||
},
|
||||
options: {
|
||||
maintainAspectRatio: false,
|
||||
scales: {
|
||||
yAxes: [{
|
||||
ticks: {
|
||||
beginAtZero: true
|
||||
}
|
||||
}]
|
||||
},
|
||||
onClick: (e) => {
|
||||
|
||||
clearSinglelineCanvas();
|
||||
|
||||
window.setTimeout(refreshWholeTimePeriodSingleChart, 200, singleSn, 0, gSingleCacheChartDataArray.length);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function refreshChart() {
|
||||
|
||||
var curPageNum = 0;
|
||||
$("#faceDetailsBox").html("");//bug 操作页面清空
|
||||
var stTime = $("#startTs").val();
|
||||
var edTime = $("#endTs").val();
|
||||
var strSN = $("#txtOpname").val() || "";
|
||||
var arrResons = [0,1,2,3,4];
|
||||
|
||||
/*$('input[name="StatusEventReasonCheck"]:checked').each(function () {
|
||||
arrResons.push($(this).val());
|
||||
});*/
|
||||
|
||||
let data = {
|
||||
sn: strSN,
|
||||
st: stTime,
|
||||
ed: edTime,
|
||||
arrReason: arrResons,
|
||||
page: curPageNum
|
||||
};
|
||||
|
||||
sendRequest(data, function () {
|
||||
refreshTableWithCacheData();
|
||||
});
|
||||
}
|
||||
|
||||
function sendRequest(data, respFunc) {
|
||||
$.ajax({
|
||||
url: "/App/log/FaceStatusHistoryLogGetData",
|
||||
data: data,
|
||||
type: "post",
|
||||
success: function (dataArr) {
|
||||
gCacheDataArray = dataArr;
|
||||
|
||||
respFunc();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function sendRequestSingleCounterPerHour(data, respFunc) {
|
||||
$.ajax({
|
||||
url: "/App/log/FaceStatusHistoryLogGetDataSingle",
|
||||
data: data,
|
||||
type: "post",
|
||||
success: function (dataArr) {
|
||||
//初始化原始事件表
|
||||
gSingleCounterPerHourCacheDataArray = dataArr;
|
||||
|
||||
//初始化range表,全部使用毫秒数标志。
|
||||
gSingleCounterPerHourCacheRangeArray = [];
|
||||
var tmpStMsTime = 0, tmpEdMsTime = 0;
|
||||
var spanMs = 0;
|
||||
var stTime = $("#startTs").val();
|
||||
var edTime = $("#endTs").val();
|
||||
var stArr = stTime.split('-').map(it => parseInt(it, 10));
|
||||
var edArr = edTime.split('-').map(it => parseInt(it, 10));
|
||||
var tmpSt = new Date(stArr[0], stArr[1] - 1, stArr[2], 0, 0, 0, 0);
|
||||
var tmpEd = new Date(edArr[0], edArr[1] - 1, edArr[2], 23, 59, 59, 0);
|
||||
tmpStMsTime = tmpSt.getTime();
|
||||
tmpEdMsTime = tmpEd.getTime();
|
||||
//第一个break point
|
||||
if (gSingleCounterPerHourCacheDataArray[0].Status == 1) {
|
||||
gSingleCounterPerHourCacheRangeArray.push({ brk: tmpStMsTime, stat: 0 });
|
||||
}
|
||||
else {
|
||||
gSingleCounterPerHourCacheRangeArray.push({ brk: tmpStMsTime, stat: 1 });
|
||||
}
|
||||
//中间的break point
|
||||
for (let i = 0; i < gSingleCounterPerHourCacheDataArray.length; i++) {
|
||||
let ptPos = convertMVCDateToInt(gSingleCounterPerHourCacheDataArray[i].CreateTime);
|
||||
//如果同一时间多个触发,以最后一个为准
|
||||
let dupPos = -1;
|
||||
for (let k = 0; k < gSingleCounterPerHourCacheRangeArray.length; k++) {
|
||||
if (gSingleCounterPerHourCacheRangeArray[k].brk == ptPos) {
|
||||
dupPos = k;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (dupPos === -1) //新增一个位置
|
||||
gSingleCounterPerHourCacheRangeArray.push({ brk: ptPos, stat: gSingleCounterPerHourCacheDataArray[i].Status });
|
||||
else
|
||||
gSingleCounterPerHourCacheRangeArray[dupPos].stat = gSingleCounterPerHourCacheDataArray[i].Status;//同一时间保留最后一次更新
|
||||
}
|
||||
//最后一个break point
|
||||
if (gSingleCounterPerHourCacheRangeArray[gSingleCounterPerHourCacheRangeArray.length - 1].brk === tmpEdMsTime)//更新
|
||||
{
|
||||
//使用数据库的状态值。
|
||||
} else//添加
|
||||
{
|
||||
gSingleCounterPerHourCacheRangeArray.push({ brk: tmpEdMsTime, stat: gSingleCounterPerHourCacheDataArray[gSingleCounterPerHourCacheDataArray.length - 1].Status });
|
||||
}
|
||||
|
||||
//回调函数
|
||||
respFunc();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function setDateRange(range) {
|
||||
|
||||
var strSt = "";
|
||||
var strEd = "";
|
||||
var tmpDate = new Date();
|
||||
var yesDate = new Date();
|
||||
yesDate.setDate(yesDate.getDate() - 1);
|
||||
if (range === 0) {
|
||||
strSt = tmpDate.getFullYear() + "-";
|
||||
strSt += (tmpDate.getMonth() + 1) + "-";
|
||||
strSt += tmpDate.getDate();
|
||||
strEd = strSt;
|
||||
}
|
||||
else if (range === 1)//yesterday
|
||||
{
|
||||
strSt = yesDate.getFullYear() + "-";
|
||||
strSt += (yesDate.getMonth() + 1) + "-";
|
||||
strSt += yesDate.getDate();
|
||||
strEd = strSt;
|
||||
}
|
||||
else if (range === 2)//三天
|
||||
{
|
||||
let tday = new Date(tmpDate.getTime() - 72 * 60 * 60 * 1000);
|
||||
strSt += tday.getFullYear() + "-";
|
||||
strSt += (tday.getMonth() + 1) + "-";
|
||||
strSt += tday.getDate();
|
||||
strEd += tmpDate.getFullYear() + "-";
|
||||
strEd += (tmpDate.getMonth() + 1) + "-";
|
||||
strEd += tmpDate.getDate();
|
||||
}
|
||||
else if (range === 3)//一周
|
||||
{
|
||||
let tday = new Date(tmpDate.getTime() - 7 * 24 * 60 * 60 * 1000);
|
||||
strSt += tday.getFullYear() + "-";
|
||||
strSt += (tday.getMonth() + 1) + "-";
|
||||
strSt += tday.getDate();
|
||||
strEd += tmpDate.getFullYear() + "-";
|
||||
strEd += (tmpDate.getMonth() + 1) + "-";
|
||||
strEd += tmpDate.getDate();
|
||||
}
|
||||
else if (range === 4)//current month
|
||||
{
|
||||
strSt = tmpDate.getFullYear() + "-";
|
||||
strSt += (tmpDate.getMonth() + 1) + "-";
|
||||
strEd = strSt;
|
||||
strSt += "01";
|
||||
strEd += tmpDate.getDate();
|
||||
}
|
||||
|
||||
if (strSt.length > 0 && strEd.length > 0) {
|
||||
$("#startTs").val(strSt);
|
||||
$("#endTs").val(strEd);
|
||||
}
|
||||
}
|
||||
|
||||
function searchFaceStatusHistory(Pages) {//查询SN号按钮
|
||||
|
||||
var curPageNum = Pages || 0;
|
||||
|
||||
$("#faceDetailsBox").html("");//bug 操作页面清空
|
||||
var stTime = $("#startTs").val();
|
||||
var edTime = $("#endTs").val();
|
||||
var strSN = $("#txtOpname").val() || "";
|
||||
var arrResons = [];
|
||||
|
||||
/*$('input[name="StatusEventReasonCheck"]:checked').each(function () {
|
||||
arrResons.push($(this).val());
|
||||
});*/
|
||||
|
||||
let data = {
|
||||
sn: strSN,
|
||||
st: stTime,
|
||||
ed: edTime,
|
||||
arrReason: arrResons,
|
||||
page: curPageNum
|
||||
};
|
||||
|
||||
$(".ibox-content").html('');
|
||||
|
||||
$.ajax({
|
||||
url: "/App/log/FaceStatusHistoryLogGetData",
|
||||
data: data,
|
||||
type: "post", // 提交方式
|
||||
success: function (data) {
|
||||
console.log(data)
|
||||
$(".ibox-content").html(data);
|
||||
$("li.pages").hide();
|
||||
if (Pages >= 5) {
|
||||
var maxPages = Pages + 3
|
||||
var minPages = Pages - 3;
|
||||
for (var i = minPages; i < maxPages; i++) {
|
||||
$("li.pages").eq(i).show();//显示页数
|
||||
}
|
||||
} else {
|
||||
for (var i = 0; i < 5; i++) {
|
||||
$("li.pages").eq(i).show();//显示页数
|
||||
}
|
||||
}
|
||||
if ($("li.pages").length != 0) {
|
||||
var pages = $("li.pages").length - 3;//获取页数
|
||||
if (Pages >= pages) {
|
||||
$("li.right").hide();
|
||||
}
|
||||
if (Pages > 3) {
|
||||
$("li.left").show();
|
||||
} else {
|
||||
$("li.left").hide();
|
||||
}
|
||||
$("li.pages a").eq(Pages - 1).css("color", "white");//添加选中字体颜色
|
||||
$("li.pages a").eq(Pages - 1).css("background-color", "#00BFFF");//添加选中背景颜色
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function convertMVCDate(strMVCDate) {
|
||||
return new Date(parseInt(strMVCDate.replace('/Date(', '').replace(')/', ''),10))
|
||||
}
|
||||
function convertMVCDateToInt(strMVCDate) {
|
||||
return parseInt(strMVCDate.replace('/Date(', '').replace(')/', ''), 10);
|
||||
}
|
||||
function convertMVCDateToString(strMVCDate) {
|
||||
let a = new Date(parseInt(strMVCDate.replace('/Date(', '').replace(')/', ''), 10));
|
||||
return a.toLocaleString('chinese',{ hour12: false });
|
||||
}
|
||||
</script>
|
||||
@@ -0,0 +1,21 @@
|
||||
@model List<Face.Web.Areas.App.Controllers.countstatushistory>
|
||||
|
||||
@{
|
||||
string strData = "";
|
||||
foreach (var it in Model)
|
||||
{
|
||||
strData += (it.SN + "|");
|
||||
strData += it.cnt;
|
||||
strData += ";";
|
||||
}
|
||||
strData = strData.Substring(0, strData.Length - 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
</script>
|
||||
132
Face.Web/Areas/App/Views/Log/FacebindingMessage.cshtml
Normal file
132
Face.Web/Areas/App/Views/Log/FacebindingMessage.cshtml
Normal file
@@ -0,0 +1,132 @@
|
||||
@model PagedList.IPagedList<Face.Domain.Entities.FaceBinding>
|
||||
@using PagedList.Mvc;
|
||||
@using Face.Domain.Entities;
|
||||
@using Face.Web.Areas.App.Models
|
||||
@using Face.Domain.Application;
|
||||
@{
|
||||
ViewBag.Title = "FacebindingMessage";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
List<Hotels> hotels = (List<Hotels>)Session["HotelList"];
|
||||
List<Hosts> hosts = (List<Hosts>)Session["roomlist"];
|
||||
List<TBL_ROOM_BASIC_INFO> ZongRoominfo = (List<TBL_ROOM_BASIC_INFO>)Session["ZongRoominfo"];
|
||||
|
||||
}
|
||||
|
||||
<script src="~/Plugin/user.js"></script>
|
||||
<style>
|
||||
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
#style-format {
|
||||
float: right;
|
||||
}
|
||||
|
||||
#btnaddPLine {
|
||||
float: right;
|
||||
}
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<section class="content" style="padding:0px;">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<!-- Default box -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<span style="font-size:30px">人脸机绑定/解绑日志</span>
|
||||
<div class="card-tools">
|
||||
@*<button class="btn btn-md btn-primary" type="button" id="Hotelsearch">操作日志</button>*@
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@*<input type="text" placeholder="进行名字筛选" name="username" style="height:33px;" id="txtOpname"><button class="btn btn-md btn-primary" id="Btnmodify">搜索</button>*@
|
||||
@*条件筛选*@
|
||||
</div>
|
||||
@*内容筛选*@
|
||||
<div class="ibox-content" style="padding:0px;">
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<div class="yhxx">
|
||||
<div class="info-box" style="padding: 0px; margin-bottom: 0.5rem; overflow-wrap: break-word;">
|
||||
<span class="info-box-icon" style="height:85px;overflow:hidden;"></span>
|
||||
<div class="info-box-content" style="padding: 0px;">
|
||||
|
||||
<span class="text-bold" style="font-size: 16px; line-height: 1;">
|
||||
操作人:@item.Operator
|
||||
</span>
|
||||
|
||||
|
||||
<span style="line-height: 1;">
|
||||
|
||||
@(hotels.FirstOrDefault(x => x.Id == item.HotelCode).Name)
|
||||
</span>
|
||||
<span style="line-height: 1;">
|
||||
房间:@if (item.RoomId != null && item.RoomId != 0)
|
||||
{
|
||||
TBL_ROOM_BASIC_INFO isok = ZongRoominfo.FirstOrDefault(s => s.ROOM_OLD_ID == item.RoomId);
|
||||
<span> @( item.RoomId.ToString() != "" ? (isok == null ? "" : isok.ROOM_NUMBER) : "" )</span>
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>无房间</span>
|
||||
}
|
||||
</span>
|
||||
</div>
|
||||
<div class="info-box-content" style="padding: 0px;">
|
||||
<span style="line-height: 1;">
|
||||
@item.bindingDate.Value.ToString("yyyy/MM/dd hh:mm")
|
||||
</span>
|
||||
<span style="line-height: 1;">
|
||||
|
||||
操作类型:
|
||||
@if (item.OperatorType == false)
|
||||
{
|
||||
<span style="line-height: 1;">
|
||||
解绑
|
||||
</span>
|
||||
}
|
||||
else if (item.OperatorType == true)
|
||||
{
|
||||
<span style="line-height: 1;">
|
||||
绑定
|
||||
</span>
|
||||
}
|
||||
|
||||
</span>
|
||||
<span style="line-height: 1;"> SN:@item.SerialNo</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<!-- /.card -->
|
||||
|
||||
</div>
|
||||
<div style="text-align:center" class="chaxun">
|
||||
@*分页主要代码*@
|
||||
每页 @Model.PageSize 条记录,共 @Model.PageCount 页,当前第 @Model.PageNumber 页
|
||||
<nav aria-label="Contacts Page Navigation">
|
||||
<ul class="pagination justify-content-center m-0">
|
||||
@Html.PagedListPager(Model, page => Url.Action("FacebindingMessage", new { page }), new PagedListRenderOptions() { DisplayItemSliceAndTotal = false, MaximumPageNumbersToDisplay = 5 })
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<script>
|
||||
$(".pagination").addClass("pagination pagination-sm");
|
||||
$(".pagination").children("li").addClass("page-item");
|
||||
$(".page-item").children("a").addClass("page-link");
|
||||
</script>
|
||||
|
||||
618
Face.Web/Areas/App/Views/Log/InquirePmsMessageLog.cshtml
Normal file
618
Face.Web/Areas/App/Views/Log/InquirePmsMessageLog.cshtml
Normal file
@@ -0,0 +1,618 @@
|
||||
@model List<Face.Domain.Entities.pmsInterface>
|
||||
@using PagedList.Mvc;
|
||||
@using Face.Web.Areas.App.Models;
|
||||
@using Face.Domain.Entities;
|
||||
@using Face.Domain.Application
|
||||
|
||||
@{
|
||||
List<Face.Domain.Entities.Hotels> Hotellist = SqlSugarBase.authoriydb.Queryable<Hotels>().ToList();
|
||||
List<Face.Domain.Entities.Hosts> hostslist = Face.Services.Cache.CacheHelp.GetRoomGroup();
|
||||
List<FaceIssue> authItem = SqlSugarBase.GesmartDb().Queryable<FaceIssue>().ToList();
|
||||
List<TBL_ROOM_BASIC_INFO> ZongRoominfo = (List<TBL_ROOM_BASIC_INFO>)Session["ZongRoominfo"];
|
||||
List<Face.Domain.Entities.pmsLog> pmslog = (List<Face.Domain.Entities.pmsLog>)ViewData["pmsLog"];
|
||||
}
|
||||
@if (Model != null && Model.Count() > 0)
|
||||
{
|
||||
foreach (var item in Model)
|
||||
{
|
||||
<div class="yhxx" style="cursor:hand; font-size:0.8rem;" onclick="Show(this)">
|
||||
<div class="info-box" style="padding: 0px; margin-bottom: 0.5rem; overflow-wrap: break-word; min-height: auto;">
|
||||
|
||||
<div class="info-box-content" style="padding: 0px;">
|
||||
<span class="text-bold">
|
||||
<span style="font-weight:normal">@item.DateTime</span>
|
||||
</span>
|
||||
<span class="text-bold">
|
||||
@{TBL_ROOM_BASIC_INFO isok = ZongRoominfo.FirstOrDefault(s => s.ROOM_OLD_ID == item.room);
|
||||
<span> @( item.room.ToString() != "" ? (isok == null ? "无房间" : isok.ROOM_NUMBER) : "无房间" )</span>
|
||||
}
|
||||
<span>:</span>
|
||||
<span style="font-weight:normal">
|
||||
@if (item.pmstype == 1)
|
||||
{
|
||||
<span>开房</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>退房</span>
|
||||
}
|
||||
|
||||
@{
|
||||
|
||||
var messagesinfo = authItem.Where(x => x.pmsid == item.pmsId.ToString());
|
||||
if (messagesinfo != null)
|
||||
{
|
||||
foreach (var issue in messagesinfo)
|
||||
{
|
||||
|
||||
if (issue.Factory == " " || issue.Factory == null)
|
||||
{
|
||||
<span> </span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>(@issue.Factory,</span>
|
||||
|
||||
}
|
||||
if (issue.APKVersion == " " || issue.APKVersion == null)
|
||||
{
|
||||
<span> </span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>@issue.APKVersion)</span>
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</span>
|
||||
</span>
|
||||
|
||||
@{
|
||||
if (pmslog != null)
|
||||
{
|
||||
//pmsLog sun27 = pmslog.Find(x => x.pmsid == item.pmsId && x.step == 7 && x.Data != null);
|
||||
pmsLog sun27 = pmslog.Find(x => x.pmsid == item.pmsId && x.step == 550 && x.Data != null);
|
||||
if (sun27 != null)
|
||||
{
|
||||
var xxinxi = sun27.Data.Split(',');
|
||||
if (xxinxi.Length > 4)
|
||||
{
|
||||
var xinfo = xxinxi[4].Split(':');
|
||||
var xinfoss = xinfo[1].Split('"');
|
||||
<span class="text-bold">
|
||||
@if (xinfoss[1] == "OK" || xinfoss[1].Contains("成功"))
|
||||
{
|
||||
|
||||
<span style="font-weight: normal; color:#5cb85c;">@xinfoss[1]</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span style="font-weight: normal; color:crimson;">@xinfoss[1]</span>
|
||||
}
|
||||
|
||||
|
||||
</span>
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</div>
|
||||
<div class="info-box-content" style="padding: 0px;">
|
||||
<span class="text-bold">
|
||||
<span>@(item.hotelid.ToString() != "" ? (Hotellist.SingleOrDefault(s => s.Id == int.Parse(item.hotelid.ToString())) != null ? Hotellist.SingleOrDefault(s => s.Id == int.Parse(item.hotelid.ToString())).Name : "无酒店") : "无酒店")</span>
|
||||
<span>
|
||||
<a class="btn btn-default" href="/App/Face/TestFaceall?hotelid=@item.hotelid&sn=@item.faceSN" role="button" style="font-size:3px;">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-camera2" viewBox="0 0 16 16">
|
||||
<path d="M5 8c0-1.657 2.343-3 4-3V4a4 4 0 0 0-4 4z" />
|
||||
<path d="M12.318 3h2.015C15.253 3 16 3.746 16 4.667v6.666c0 .92-.746 1.667-1.667 1.667h-2.015A5.97 5.97 0 0 1 9 14a5.972 5.972 0 0 1-3.318-1H1.667C.747 13 0 12.254 0 11.333V4.667C0 3.747.746 3 1.667 3H2a1 1 0 0 1 1-1h1a1 1 0 0 1 1 1h.682A5.97 5.97 0 0 1 9 2c1.227 0 2.367.368 3.318 1zM2 4.5a.5.5 0 1 0-1 0 .5.5 0 0 0 1 0zM14 8A5 5 0 1 0 4 8a5 5 0 0 0 10 0z" />
|
||||
</svg>
|
||||
</a>
|
||||
</span>
|
||||
<span>
|
||||
<a class="btn btn-default" href="/App/Face/TestFaceLogsAll?sn=@item.faceSN" role="button" style="font-size:3px;">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
|
||||
<g fill="currentColor">
|
||||
<path d="M5 10.5a.5.5 0 0 1 .5-.5h2a.5.5 0 0 1 0 1h-2a.5.5 0 0 1-.5-.5zm0-2a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1-.5-.5zm0-2a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1-.5-.5zm0-2a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 0 1h-5a.5.5 0 0 1-.5-.5z" />
|
||||
<path d="M3 0h10a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2v-1h1v1a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1H3a1 1 0 0 0-1 1v1H1V2a2 2 0 0 1 2-2z" />
|
||||
<path d="M1 5v-.5a.5.5 0 0 1 1 0V5h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1H1zm0 3v-.5a.5.5 0 0 1 1 0V8h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1H1zm0 3v-.5a.5.5 0 0 1 1 0v.5h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1H1z" />
|
||||
</g>
|
||||
</svg>
|
||||
</a>
|
||||
</span>
|
||||
</span>
|
||||
<span>
|
||||
@{
|
||||
var sun01 = pmslog.Where(x => x.pmsid == item.pmsId).ToList();
|
||||
// 分离出step值
|
||||
var step1Item = sun01.Where(i => i.step == 1).ToList();
|
||||
var step25Item = sun01.Where(i => i.step == 25).ToList();
|
||||
var step26Item = sun01.Where(i => i.step == 26).ToList();
|
||||
var step27Item = sun01.Where(i => i.step == 27).ToList();
|
||||
// 分离出其他项
|
||||
var otherItem = sun01.Except(step1Item.Concat(step25Item).Concat(step26Item).Concat(step27Item)).ToList();
|
||||
|
||||
var sun0 = sun01;//step26Item.Concat(step27Item).Concat(step1Item).Concat(step25Item).Concat(otherItem).ToList();
|
||||
if (sun0.Count > 0)
|
||||
{
|
||||
var cl = "#0094ff";//蓝色
|
||||
switch (sun0[sun0.Count - 1].step)
|
||||
{
|
||||
case 291:
|
||||
cl = "#f0ad4e"; //错误1,无人脸机失败
|
||||
break;
|
||||
case 303:
|
||||
cl = "#5cb85c"; //成功1,无人脸机成功
|
||||
break;
|
||||
case 299:
|
||||
cl = "crimson"; //错误2,有人脸机失败
|
||||
break;
|
||||
case 304:
|
||||
cl = "crimson"; //错误2,有人脸机失败
|
||||
break;
|
||||
case 551:
|
||||
cl = "#5cb85c";//成功2,有人脸机成功
|
||||
break;
|
||||
case 506:
|
||||
cl = "#5cb85c";//成功2,有人脸机成功
|
||||
break;
|
||||
case 521:
|
||||
cl = "#5cb85c";//成功2,有人脸机成功
|
||||
break;
|
||||
case 110:
|
||||
if (sun0[sun0.Count - 1].Data == "true")
|
||||
{
|
||||
cl = "#5cb85c";
|
||||
}
|
||||
else
|
||||
{
|
||||
cl = "crimson";
|
||||
}
|
||||
break;
|
||||
case 111:
|
||||
if (sun0[sun0.Count - 1].Data == "true")
|
||||
{
|
||||
cl = "#5cb85c";
|
||||
}
|
||||
else
|
||||
{
|
||||
cl = "crimson";
|
||||
}
|
||||
break;
|
||||
case 116:
|
||||
if (sun0[sun0.Count - 1].Data == "true")
|
||||
{
|
||||
cl = "#5cb85c";
|
||||
}
|
||||
else
|
||||
{
|
||||
cl = "crimson";
|
||||
}
|
||||
break;
|
||||
case 114:
|
||||
if (sun0[sun0.Count - 1].Data == "true")
|
||||
{
|
||||
cl = "#5cb85c";
|
||||
}
|
||||
else
|
||||
{
|
||||
cl = "crimson";
|
||||
}
|
||||
break;
|
||||
case 130:
|
||||
if (sun0[sun0.Count - 1].Data == "true")
|
||||
{
|
||||
cl = "#5cb85c";
|
||||
}
|
||||
else
|
||||
{
|
||||
cl = "crimson";
|
||||
}
|
||||
break;
|
||||
case 131:
|
||||
if (sun0[sun0.Count - 1].Data == "true")
|
||||
{
|
||||
cl = "#5cb85c";
|
||||
}
|
||||
else
|
||||
{
|
||||
cl = "crimson";
|
||||
}
|
||||
break;
|
||||
case 132:
|
||||
if (sun0[sun0.Count - 1].Data == "true")
|
||||
{
|
||||
cl = "#5cb85c";
|
||||
}
|
||||
else
|
||||
{
|
||||
cl = "crimson";
|
||||
}
|
||||
break;
|
||||
case 133:
|
||||
if (sun0[sun0.Count - 1].Data == "true")
|
||||
{
|
||||
cl = "#5cb85c";
|
||||
}
|
||||
else
|
||||
{
|
||||
cl = "crimson";
|
||||
}
|
||||
break;
|
||||
case 134:
|
||||
if (sun0[sun0.Count - 1].Data == "true")
|
||||
{
|
||||
cl = "#5cb85c";
|
||||
}
|
||||
else
|
||||
{
|
||||
cl = "crimson";
|
||||
}
|
||||
break;
|
||||
case 136:
|
||||
if (sun0[sun0.Count - 1].Data == "true")
|
||||
{
|
||||
cl = "#5cb85c";
|
||||
}
|
||||
else
|
||||
{
|
||||
cl = "crimson";
|
||||
}
|
||||
break;
|
||||
case 103:
|
||||
cl = "#5cb85c";//成功
|
||||
break;
|
||||
default:
|
||||
cl = "crimson";//错误2,有人脸机失败到中间步骤
|
||||
break;
|
||||
}
|
||||
<span style="color:@cl;font-size:10px"> <i>S</i>@sun0[sun0.Count - 1].step.Value<i>:</i>@sun0[sun0.Count - 1].Creationtime.Value.ToString("yyyy-MM-dd HH:mm:ss") @sun0[sun0.Count - 1].message </span>
|
||||
}
|
||||
}
|
||||
</span>
|
||||
<span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="acet">
|
||||
@{
|
||||
var sunv = pmslog.Where(x => x.pmsid == item.pmsId).ToList();
|
||||
/*// 分离出step值
|
||||
var step1Items = sunv.Where(i => i.step == 1).ToList();
|
||||
var step25Items = sunv.Where(i => i.step == 25).ToList();
|
||||
var step26Items = sunv.Where(i => i.step == 26).ToList();
|
||||
var step27Items = sunv.Where(i => i.step == 27).ToList(); */
|
||||
// 分离出其他项
|
||||
//var otherItems = sunv.Except(step1Items.Concat(step25Items).Concat(step26Items).Concat(step27Items)).ToList();
|
||||
|
||||
//var sun = step26Items.Concat(step27Items).Concat(step1Items).Concat(step25Items).Concat(otherItems).ToList();
|
||||
var sun = sunv;
|
||||
|
||||
//var sunn = sun.Select((log, index) => { log.Num = index + 1; return log; }).ToList();
|
||||
|
||||
if (sun.Count != 0)
|
||||
{
|
||||
<span style="color:#0094ff"><i>PMSID:@sun[0].pmsid</i><br /></span>
|
||||
|
||||
var cl = "#0094ff";//蓝色
|
||||
switch (sun0[sun0.Count - 1].step)
|
||||
|
||||
{
|
||||
case 291:
|
||||
cl = "#f0ad4e"; //错误1,无人脸机失败
|
||||
break;
|
||||
case 303:
|
||||
cl = "#5cb85c"; //成功1,无人脸机成功
|
||||
break;
|
||||
case 299:
|
||||
cl = "crimson"; //错误2,有人脸机失败
|
||||
break;
|
||||
case 304:
|
||||
cl = "crimson"; //错误2,有人脸机失败
|
||||
break;
|
||||
case 551:
|
||||
cl = "#5cb85c";//成功2,有人脸机成功
|
||||
break;
|
||||
case 506:
|
||||
cl = "#5cb85c";//成功2,有人脸机成功
|
||||
break;
|
||||
case 521:
|
||||
cl = "#5cb85c";//成功2,有人脸机成功
|
||||
break;
|
||||
case 110:
|
||||
if (sun0[sun0.Count - 1].Data == "true")
|
||||
{
|
||||
cl = "#5cb85c";
|
||||
}
|
||||
else
|
||||
{
|
||||
cl = "crimson";
|
||||
}
|
||||
break;
|
||||
case 111:
|
||||
if (sun0[sun0.Count - 1].Data == "true")
|
||||
{
|
||||
cl = "#5cb85c";
|
||||
}
|
||||
else
|
||||
{
|
||||
cl = "crimson";
|
||||
}
|
||||
break;
|
||||
case 116:
|
||||
if (sun0[sun0.Count - 1].Data == "true")
|
||||
{
|
||||
cl = "#5cb85c";
|
||||
}
|
||||
else
|
||||
{
|
||||
cl = "crimson";
|
||||
}
|
||||
break;
|
||||
case 114:
|
||||
if (sun0[sun0.Count - 1].Data == "true")
|
||||
{
|
||||
cl = "#5cb85c";
|
||||
}
|
||||
else
|
||||
{
|
||||
cl = "crimson";
|
||||
}
|
||||
break;
|
||||
case 130:
|
||||
if (sun0[sun0.Count - 1].Data == "true")
|
||||
{
|
||||
cl = "#5cb85c";
|
||||
}
|
||||
else
|
||||
{
|
||||
cl = "crimson";
|
||||
}
|
||||
break;
|
||||
case 131:
|
||||
if (sun0[sun0.Count - 1].Data == "true")
|
||||
{
|
||||
cl = "#5cb85c";
|
||||
}
|
||||
else
|
||||
{
|
||||
cl = "crimson";
|
||||
}
|
||||
break;
|
||||
case 132:
|
||||
if (sun0[sun0.Count - 1].Data == "true")
|
||||
{
|
||||
cl = "#5cb85c";
|
||||
}
|
||||
else
|
||||
{
|
||||
cl = "crimson";
|
||||
}
|
||||
break;
|
||||
case 133:
|
||||
if (sun0[sun0.Count - 1].Data == "true")
|
||||
{
|
||||
cl = "#5cb85c";
|
||||
}
|
||||
else
|
||||
{
|
||||
cl = "crimson";
|
||||
}
|
||||
break;
|
||||
case 134:
|
||||
if (sun0[sun0.Count - 1].Data == "true")
|
||||
{
|
||||
cl = "#5cb85c";
|
||||
}
|
||||
else
|
||||
{
|
||||
cl = "crimson";
|
||||
}
|
||||
break;
|
||||
case 136:
|
||||
if (sun0[sun0.Count - 1].Data == "true")
|
||||
{
|
||||
cl = "#5cb85c";
|
||||
}
|
||||
else
|
||||
{
|
||||
cl = "crimson";
|
||||
}
|
||||
break;
|
||||
case 103:
|
||||
cl = "#5cb85c";//成功
|
||||
break;
|
||||
default:
|
||||
cl = "crimson";//错误2,有人脸机失败到中间步骤
|
||||
break;
|
||||
}
|
||||
/* {
|
||||
case 11:
|
||||
cl = "#f0ad4e"; //错误1,无人脸机失败
|
||||
break;
|
||||
case 10:
|
||||
cl = "#5cb85c"; //成功1,无人脸机成功
|
||||
break;
|
||||
case 9:
|
||||
cl = "crimson"; //错误2,有人脸机失败
|
||||
break;
|
||||
case 8:
|
||||
cl = "#5cb85c";//成功2,有人脸机成功
|
||||
break;
|
||||
case 6:
|
||||
cl = "#5cb85c";//成功2,有人脸机成功
|
||||
break;
|
||||
case 25:
|
||||
if (sun[sun.Count - 1].Data == "true")
|
||||
{
|
||||
cl = "#5cb85c";
|
||||
}
|
||||
else
|
||||
{
|
||||
cl = "crimson";
|
||||
}
|
||||
//cl = "#5cb85c";
|
||||
break;
|
||||
case 26:
|
||||
cl = "#5cb85c";//成功
|
||||
break;
|
||||
case 27:
|
||||
cl = "#5cb85c";//成功
|
||||
break;
|
||||
default:
|
||||
cl = "crimson";//错误2,有人脸机失败到中间步骤
|
||||
break;
|
||||
}*/
|
||||
string nueroomid = sun[0].roomid;
|
||||
for (int i = 0; i < sun.Count; i++)
|
||||
{
|
||||
|
||||
if (nueroomid != sun[i].roomid)
|
||||
{
|
||||
if (sun[i].roomid != null && sun[i].roomid != "" && sun[i].roomid != " ")
|
||||
{
|
||||
<span style="color: @cl; font-size: 10px; font-weight: 600; "><i> @sun[i].roomid</i></span>
|
||||
nueroomid = sun[i].roomid;
|
||||
<br />
|
||||
}
|
||||
}
|
||||
<span>
|
||||
<span style="color:#0094ff">
|
||||
<span style="color:#0094ff;font-size:10px;"> <i>S</i>@sun[i].step<i>:</i> @sun[i].Creationtime.Value.ToString("yyyy-MM-dd HH:mm:ss") @sun[i].message </span>
|
||||
</span>
|
||||
@if (!String.IsNullOrWhiteSpace(sun[i].Data))
|
||||
{
|
||||
<span style="font-weight: normal; font-size: 10px;"> @sun[i].Data</span>
|
||||
}
|
||||
|
||||
@*@if (sun[i].step == 4 && !String.IsNullOrWhiteSpace(sun[i].Data))
|
||||
{
|
||||
int sInd = sun[i].Data.IndexOf(",\"cmd\":") + 8;
|
||||
int eInd = sun[i].Data.IndexOf(",\"msg\":") - 1;
|
||||
if (eInd > 0 && sInd > 0)
|
||||
{
|
||||
<span style="color: #0094ff; font-size: 10px;"> 使用命令:@sun[i].Data.Substring(sInd, eInd - sInd) </span>
|
||||
}
|
||||
}
|
||||
|
||||
@if ((sun[i].step == 1 || sun[i].step == 7 || sun[i].step == 5) && !String.IsNullOrWhiteSpace(sun[i].Data))
|
||||
{
|
||||
<span style="font-weight: normal; font-size: 10px;"> @sun[i].Data</span>
|
||||
}
|
||||
@if ((sun[i].step == 1) && !String.IsNullOrWhiteSpace(sun[i].Ip))
|
||||
{
|
||||
<span style="font-weight: normal; font-size: 10px;"> @sun[i].Ip</span>
|
||||
}
|
||||
@if ((sun[i].step == 25) && !String.IsNullOrWhiteSpace(sun[i].Data))
|
||||
{
|
||||
<span style="font-weight: normal; font-size: 10px;"> @sun[i].Data</span>
|
||||
}
|
||||
@if ((sun[i].step == 26) && !String.IsNullOrWhiteSpace(sun[i].Data))
|
||||
{
|
||||
<span style="font-weight: normal; font-size: 10px;"> @sun[i].Data</span>
|
||||
}
|
||||
@if ((sun[i].step == 27) && !String.IsNullOrWhiteSpace(sun[i].Data))
|
||||
{
|
||||
<span style="font-weight: normal; font-size: 10px;"> @sun[i].Data</span>
|
||||
}*@
|
||||
</span><br />
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@{
|
||||
int individual = 1;
|
||||
var messages = authItem.Where(x => x.pmsid == item.pmsId.ToString());
|
||||
if (messages != null)
|
||||
{
|
||||
foreach (var issue in messages)
|
||||
{
|
||||
|
||||
<div style="width: 250px; height: 180px; font-size: 10px;">
|
||||
<div>@individual#下发时间:@issue.creationtime.ToString("yyyy/MM/dd HH:mm")</div>
|
||||
<div>
|
||||
SN:@issue.faceSn
|
||||
(
|
||||
@if (issue.Factory == " " || issue.Factory == null)
|
||||
{
|
||||
<span> </span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>@issue.Factory,</span>
|
||||
|
||||
}
|
||||
|
||||
|
||||
@if (issue.APKVersion == " " || issue.APKVersion == null)
|
||||
{
|
||||
<span> </span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>@issue.APKVersion</span>
|
||||
|
||||
}
|
||||
|
||||
)
|
||||
</div>
|
||||
<div>
|
||||
@{
|
||||
if (Session["username"]?.ToString()?.ToLower() == "momo")
|
||||
{
|
||||
|
||||
<div>下发人脸:<img style="width:50px; height:50px;" id="images" src="@issue.picture"></div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div>下发成功</div>
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
++individual;
|
||||
}
|
||||
}
|
||||
}
|
||||
@*<div style="margin-bottom: 0.5rem; font-size: 10px;"><span class="text-bold">pms内容:</span>@item.pmsContent</div>
|
||||
<div> </div>*@
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<div>没有数据了,请重新查询你的相关信息</div>
|
||||
}
|
||||
|
||||
<div>
|
||||
<nav style="text-align:center;">
|
||||
<ul class="pagination" id="page">
|
||||
<li class="first" onclick="firstPage16('/App/Log/InquirePmsMessageLog')"><a>«</a></li>
|
||||
<li class="left"><a>…</a></li>
|
||||
@for (int i = 0; i < ViewBag.allpage; i++)
|
||||
{
|
||||
<li class="pages" onclick="SpecifyPage16('/App/Log/InquirePmsMessageLog',@(i+1))"><a>@(i + 1)</a></li>
|
||||
}
|
||||
<li class="right"><a>…</a></li>
|
||||
<li class="finally"><a onclick="lastPage16('/App/Log/InquirePmsMessageLog')">»</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
<script>
|
||||
$('.acet').hide();
|
||||
$(".pagination").addClass("pagination pagination-sm");
|
||||
$(".pagination").children("li").addClass("page-item");
|
||||
$(".page-item").children("a").addClass("page-link");
|
||||
function Show(that) {
|
||||
|
||||
$(that).find('.acet').toggle();
|
||||
}
|
||||
|
||||
</script>
|
||||
133
Face.Web/Areas/App/Views/Log/InquirePmsMessageLoginfo.cshtml
Normal file
133
Face.Web/Areas/App/Views/Log/InquirePmsMessageLoginfo.cshtml
Normal file
@@ -0,0 +1,133 @@
|
||||
@*@model List<Face.Domain.Entities.pmsInterface>*@
|
||||
@using PagedList.Mvc;
|
||||
@using Face.Web.Areas.App.Models;
|
||||
@using Face.Domain.Entities;
|
||||
@using Face.Domain.Application
|
||||
@{
|
||||
//List<Face.Domain.Entities.Hotels> Hotellist = SqlSugarBase.authoriydb.Queryable<Hotels>().ToList();//所有酒店
|
||||
//List<Face.Domain.Entities.Hosts> hostslist = Face.Services.Cache.CacheHelp.GetRoomGroup();
|
||||
//List<Face.Domain.Entities.DeviceManage> devices = SqlSugarBase.Db.Queryable<DeviceManage>().ToList();
|
||||
//List<FaceIssue> authItem = SqlSugarBase.GesmartDb().Queryable<FaceIssue>().ToList();
|
||||
////List<TBL_ROOM_BASIC_INFO> ZongRoominfo = (List<TBL_ROOM_BASIC_INFO>)Session["ZongRoominfo"];
|
||||
//List<Face.Domain.Entities.pmsLog> pmslog = SqlSugarBase.Db.Queryable<pmsLog>().ToList();
|
||||
//List<pmsInterface> pmsint = SqlSugarBase.Db.Queryable<pmsInterface>().ToList();
|
||||
}
|
||||
@foreach (var item in ViewBag.info)
|
||||
{
|
||||
|
||||
<div class="yhxx" style="cursor:hand; font-size:0.8rem;" onclick="Show(this)">
|
||||
|
||||
<div class="info-box" id="judianinfo" style="padding: 0px; margin-bottom: 0.5rem; overflow-wrap: break-word; min-height: auto;">
|
||||
|
||||
<div class="info-box-content">
|
||||
<span class="text-bold">
|
||||
<span>
|
||||
@item.HotelName
|
||||
|
||||
</span>
|
||||
<span style="color:forestgreen">
|
||||
@*<i class="bi bi-share-fill"></i>*@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-share-fill" viewBox="0 0 16 16">
|
||||
<path d="M11 2.5a2.5 2.5 0 1 1 .603 1.628l-6.718 3.12a2.499 2.499 0 0 1 0 1.504l6.718 3.12a2.5 2.5 0 1 1-.488.876l-6.718-3.12a2.5 2.5 0 1 1 0-3.256l6.718-3.12A2.5 2.5 0 0 1 11 2.5z" />
|
||||
</svg>
|
||||
@item.onlinenumber
|
||||
</span>
|
||||
<span style="color: blue;">
|
||||
@*<i class="bi bi-x-diamond"></i>*@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-diamond" viewBox="0 0 16 16">
|
||||
<path d="M7.987 16a1.526 1.526 0 0 1-1.07-.448L.45 9.082a1.531 1.531 0 0 1 0-2.165L6.917.45a1.531 1.531 0 0 1 2.166 0l6.469 6.468A1.526 1.526 0 0 1 16 8.013a1.526 1.526 0 0 1-.448 1.07l-6.47 6.469A1.526 1.526 0 0 1 7.988 16zM7.639 1.17 4.766 4.044 8 7.278l3.234-3.234L8.361 1.17a.51.51 0 0 0-.722 0zM8.722 8l3.234 3.234 2.873-2.873c.2-.2.2-.523 0-.722l-2.873-2.873L8.722 8zM8 8.722l-3.234 3.234 2.873 2.873c.2.2.523.2.722 0l2.873-2.873L8 8.722zM7.278 8 4.044 4.766 1.17 7.639a.511.511 0 0 0 0 .722l2.874 2.873L7.278 8z" />
|
||||
</svg>
|
||||
@item.totalnumber
|
||||
</span>
|
||||
<span style="color:red;">
|
||||
@*<i class="bi bi-share"></i>*@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-share" viewBox="0 0 16 16">
|
||||
<path d="M13.5 1a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3zM11 2.5a2.5 2.5 0 1 1 .603 1.628l-6.718 3.12a2.499 2.499 0 0 1 0 1.504l6.718 3.12a2.5 2.5 0 1 1-.488.876l-6.718-3.12a2.5 2.5 0 1 1 0-3.256l6.718-3.12A2.5 2.5 0 0 1 11 2.5zm-8.5 4a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3zm11 5.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3z" />
|
||||
</svg>
|
||||
@item.offnumber
|
||||
</span>
|
||||
<span style="color:red;">
|
||||
@*<i class="bi bi-x-octagon"></i>*@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-x-octagon" viewBox="0 0 16 16">
|
||||
<path d="M4.54.146A.5.5 0 0 1 4.893 0h6.214a.5.5 0 0 1 .353.146l4.394 4.394a.5.5 0 0 1 .146.353v6.214a.5.5 0 0 1-.146.353l-4.394 4.394a.5.5 0 0 1-.353.146H4.893a.5.5 0 0 1-.353-.146L.146 11.46A.5.5 0 0 1 0 11.107V4.893a.5.5 0 0 1 .146-.353L4.54.146zM5.1 1 1 5.1v5.8L5.1 15h5.8l4.1-4.1V5.1L10.9 1H5.1z" />
|
||||
<path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z" />
|
||||
</svg>
|
||||
@item.probemnumber
|
||||
</span>
|
||||
@*<span style="font-weight:normal">@item.DateTime</span>*@
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="acet">
|
||||
<div class="info-box-content">
|
||||
|
||||
@{
|
||||
foreach (var itemd in item.Roomanddevname)
|
||||
{
|
||||
if (itemd.pmsidinfo.Count > 0)
|
||||
{
|
||||
<div>
|
||||
<span>@itemd.roomNmae</span>
|
||||
<span> @itemd.SN</span>
|
||||
<span> @itemd.LabelName</span>
|
||||
<span> @itemd.VersionNumber</span>
|
||||
|
||||
</div>
|
||||
@*<span> @itemd.pmsid</span>*@
|
||||
//var messagesinfo = authItem.Where(x => x.pmsid == item.pmsId.ToString());
|
||||
|
||||
foreach (var itemdd in itemd.pmsidinfo)
|
||||
{
|
||||
<a href="/App/Log/PmsMessageLog" style="font-weight: normal; color: blue;"> @itemdd.pmsid</a>
|
||||
<span style="font-weight: normal; color: black;">@itemdd.GetDateTime</span>
|
||||
<span style="font-weight: normal; color: pink;"> @itemdd.type</span>
|
||||
@*<span style="font-weight: normal; color: red;">@itemdd.Rremary</span>*@
|
||||
<span style="font-weight: normal; color: red;">@itemdd.errorcode:</span>
|
||||
<span style="font-weight: normal; color: red;">@itemdd.datainfo<br /></span>
|
||||
|
||||
|
||||
//rid.Rremary = items.remary;
|
||||
//rid.errorcode = items.errorcode;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<!-- Modal -->
|
||||
@*<div>
|
||||
<nav style="text-align:center;">
|
||||
<ul class="pagination" id="page">
|
||||
<li class="first" onclick="firstPage16('/App/Log/InquirePmsMessageLoginfo')"><a>«</a></li>
|
||||
<li class="left"><a>…</a></li>
|
||||
@for (int i = 0; i < ViewBag.allpage; i++)
|
||||
{
|
||||
<li class="pages" onclick="SpecifyPage16('/App/Log/InquirePmsMessageLoginfo',@(i+1))"><a>@(i + 1)</a></li>
|
||||
}
|
||||
<li class="right"><a>…</a></li>
|
||||
<li class="finally"><a onclick="lastPage16('/App/Log/InquirePmsMessageLoginfo')">»</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>*@
|
||||
<script>
|
||||
$('.acet').hide();
|
||||
$(".pagination").addClass("pagination pagination-sm");
|
||||
$(".pagination").children("li").addClass("page-item");
|
||||
$(".page-item").children("a").addClass("page-link");
|
||||
function Show(that) {
|
||||
console.log(that)
|
||||
//var lista = document.querySelector('#judianinfo')
|
||||
//var list = lista.parentNode;
|
||||
$(that).find('.acet').toggle();
|
||||
/* $("#xianinfo").Show();*/
|
||||
|
||||
// onclick="Show(XianShowinfo_)"
|
||||
}
|
||||
|
||||
</script>
|
||||
230
Face.Web/Areas/App/Views/Log/PmsMessage.cshtml
Normal file
230
Face.Web/Areas/App/Views/Log/PmsMessage.cshtml
Normal file
@@ -0,0 +1,230 @@
|
||||
@model PagedList.IPagedList<Face.Domain.Entities.pmsInterface>
|
||||
@using PagedList.Mvc;
|
||||
@using Face.Web.Areas.App.Models;
|
||||
@using Face.Domain.Entities;
|
||||
@using Face.Domain.Application
|
||||
@{
|
||||
ViewBag.Title = "PmsMessage";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
List<Face.Domain.Entities.Hotels> Hotellist = (List<Face.Domain.Entities.Hotels>)ViewData["hotelsS"];
|
||||
List<Face.Domain.Entities.Hosts> hostslist = Face.Services.Cache.CacheHelp.GetRoomGroup();
|
||||
List<FaceIssue> authItem = (List<FaceIssue>)ViewData["facemessage"];
|
||||
List<TBL_ROOM_BASIC_INFO> ZongRoominfo = (List<TBL_ROOM_BASIC_INFO>)Session["ZongRoominfo"];
|
||||
List<Face.Domain.Entities.pmsLog> pmslog = (List<Face.Domain.Entities.pmsLog>)ViewData["pmsLog"];
|
||||
}
|
||||
|
||||
<script src="~/Plugin/user.js"></script>
|
||||
<link href="~/Theme/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="http://auth.blv-oa.com/Lib/plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css">
|
||||
<style>
|
||||
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
|
||||
padding: 5px;
|
||||
}
|
||||
#style-format {
|
||||
float: right;
|
||||
}
|
||||
#btnaddPLine {
|
||||
float: right;
|
||||
}
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<section class="content" style="padding:0px;">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<!-- Default box -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<span style="font-size:30px">pms传输日志</span>
|
||||
<div class="card-tools">
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div id="data_ovform" style="width:200px;display: inline-block;">
|
||||
<div class="input-group m-b">
|
||||
<div class="input-daterange input-group" id="datepicker">
|
||||
@if (ViewData["pmsdate"] != null)
|
||||
{
|
||||
<input type="text" value="@ViewData["pmsdate"].ToString()" class="input-sm form-control" readOnly id="startTs" />
|
||||
}
|
||||
else
|
||||
{
|
||||
<input type="text" class="input-sm form-control" readOnly id="startTs" />
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<select class="form-control" id="OrgId" style="width:300px; float:left">
|
||||
<option value="3">
|
||||
所有房间
|
||||
</option>
|
||||
<option value="1" @(ViewData["pmsstate"] != null && ViewData["pmsstate"].ToString() == "1" ? "selected='selected'" : "")>
|
||||
开房
|
||||
</option>
|
||||
<option value="0" @(ViewData["pmsstate"] != null && ViewData["pmsstate"].ToString() == "0" ? "selected='selected'" : "")>
|
||||
退房
|
||||
</option>
|
||||
</select>
|
||||
<input type="text" placeholder="根据房间筛选" name="username" style="height:36px;" id="txtOpname">
|
||||
<button class="btn btn-md btn-primary" id="Btnmodify" onclick="selectShow()">搜索</button>
|
||||
@*条件筛选*@
|
||||
</div>
|
||||
@*内容筛选*@
|
||||
<div class="ibox-content" style="padding:0px;">
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<div class="yhxx" style="cursor:hand" onclick="Show(this)">
|
||||
<div class="info-box" style="padding: 0px; margin-bottom: 0.5rem; overflow-wrap: break-word;">
|
||||
|
||||
<div class="info-box-content" style="padding: 0px;">
|
||||
<span class="text-bold">
|
||||
<span style="font-weight:normal">@item.DateTime</span>
|
||||
</span>
|
||||
<span class="text-bold">
|
||||
操作类型:
|
||||
<span style="font-weight:normal">
|
||||
@if (item.pmstype == 1)
|
||||
{
|
||||
<span>开房</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>退房</span>
|
||||
}
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="info-box-content" style="padding: 0px;">
|
||||
<span class="text-bold">
|
||||
@(item.hotelid.ToString() != "" ? (Hotellist.SingleOrDefault(s => s.Id == int.Parse(item.hotelid.ToString())) != null ? Hotellist.SingleOrDefault(s => s.Id == int.Parse(item.hotelid.ToString())).Name : "无酒店") : "无酒店")
|
||||
</span>
|
||||
<span class="text-bold">
|
||||
@{TBL_ROOM_BASIC_INFO isok = ZongRoominfo.FirstOrDefault(s => s.ROOM_OLD_ID == item.room);
|
||||
<span> @( item.room.ToString() != "" ? (isok == null ? "无房间" : isok.ROOM_NUMBER) : "无房间" )</span>
|
||||
}
|
||||
</span>
|
||||
<span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="acet">
|
||||
@{
|
||||
var sun = pmslog.Where(x => x.pmsid == item.pmsId).ToList();
|
||||
if (sun.Count != 0)
|
||||
{
|
||||
<span style="color:#0094ff"><i>PMSID:@sun[0].pmsid</i></span>
|
||||
<br />
|
||||
|
||||
for (int i = 0; i < sun.Count; i++)
|
||||
{
|
||||
<span class="text-bold">
|
||||
<span style="color:#0094ff">
|
||||
<span style="color:#0094ff"> <i>S</i>@sun[i].step @sun[i].Creationtime.Value.ToString("yyyy-MM-dd HH:mm:ss") @sun[i].message </span>
|
||||
</span>
|
||||
</span>
|
||||
<br />
|
||||
}
|
||||
if (sun.Count == 2)
|
||||
{
|
||||
<span class="text-bold">
|
||||
<span style="color:#0094ff">
|
||||
<span style="color:#0094ff"> <i>S6 </i>@sun[sun.Count-1].Creationtime.Value.ToString("yyyy-MM-dd HH:mm:ss") 控制台接收失败</span>
|
||||
</span>
|
||||
</span>
|
||||
<br />
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@{
|
||||
int individual = 1;
|
||||
var messages = authItem.Where(x => x.pmsid == item.pmsId.ToString());
|
||||
if (messages != null)
|
||||
{
|
||||
foreach (var issue in messages)
|
||||
{
|
||||
|
||||
<div style="width:250px; height:180px;">
|
||||
<div>@individual#下发时间:@issue.creationtime.ToString("yyyy/MM/dd HH:mm")</div><div>SN号:@issue.faceSn</div>
|
||||
<div>
|
||||
<div>下发人脸:<img style="width:50px; height:50px;" id="images" src="@issue.picture"></div>
|
||||
</div>
|
||||
</div>
|
||||
++individual;
|
||||
}
|
||||
}
|
||||
}
|
||||
@*<div style="margin-bottom: 0.5rem; "><span class="text-bold">pms内容:</span>@item.pmsContent</div>*@
|
||||
@*<div> </div>*@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
}
|
||||
<!-- /.card -->
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</div>
|
||||
|
||||
<script src="~/Theme/js/plugins/pace/pace.min.js"></script>
|
||||
<script src="~/Theme/js/plugins/datapicker/bootstrap-datepicker.js"></script>
|
||||
<script src="~/Theme/js/plugins/datapicker/locales/bootstrap-datepicker.zh-CN.js"></script>
|
||||
<script src="~/Theme/js/plugins/peity/jquery.peity.min.js"></script>
|
||||
|
||||
<script>
|
||||
$('.acet').hide();
|
||||
$(".pagination").addClass("pagination pagination-sm");
|
||||
$(".pagination").children("li").addClass("page-item");
|
||||
$(".page-item").children("a").addClass("page-link");
|
||||
|
||||
|
||||
var url = "/Theme/js/jquery.form.min.js";
|
||||
$.getScript(url);
|
||||
|
||||
$('#data_ovform .input-daterange').datepicker({
|
||||
language: "zh-CN",//语言
|
||||
todayBtn: "linked",//今日按钮
|
||||
keyboardNavigation: false,
|
||||
forceParse: false,
|
||||
autoclose: true,
|
||||
format: "yyyy/mm/dd"//日期格式
|
||||
});
|
||||
function Show(that) {
|
||||
|
||||
$(that).find('.acet').toggle();
|
||||
}
|
||||
$('#startTs').change(function () {
|
||||
var shou = document.getElementById("startTs").value
|
||||
var link = "/App/Log/PmsMessage" + '?date=' + shou
|
||||
window.location.href = link;
|
||||
});
|
||||
|
||||
$('#OrgId').change(function () {//查询类型
|
||||
|
||||
var myType = document.getElementById("OrgId");//获取select对象
|
||||
var index = myType.selectedIndex;//获取选项中的索引,selectIndex表示的是当前所选中的index
|
||||
var code = myType.options[index].value;//获取酒店编号
|
||||
var link = "/App/Log/PmsMessage" + '?state=' + code
|
||||
window.location.href = link;
|
||||
});
|
||||
function selectShow() {
|
||||
var chaxun = document.getElementById('txtOpname').value
|
||||
var link = "/App/Log/PmsMessage" + '?roomname=' + chaxun
|
||||
window.location.href = link;
|
||||
}
|
||||
</script>
|
||||
158
Face.Web/Areas/App/Views/Log/PmsMessageLog.cshtml
Normal file
158
Face.Web/Areas/App/Views/Log/PmsMessageLog.cshtml
Normal file
@@ -0,0 +1,158 @@
|
||||
@using PagedList.Mvc;
|
||||
@using Face.Web.Areas.App.Models;
|
||||
@using Face.Domain.Entities;
|
||||
@using Face.Domain.Application
|
||||
@{
|
||||
ViewBag.Title = "PmsMessageLog";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
<script src="~/Plugin/user.js"></script>
|
||||
<link href="~/Theme/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="http://auth.blv-oa.com/Lib/plugins/tempusdominus-bootstrap-4/css/tempusdominus-bootstrap-4.min.css">
|
||||
|
||||
<div class="content-wrapper">
|
||||
<section class="content" style="padding:0px;">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<!-- Default box -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<span style="font-size:30px">pms传输日志</span>
|
||||
<div class="card-tools">
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<!--<div id="data_ovform" style="width:200px;display: inline-block;">
|
||||
<div class="input-group m-b">
|
||||
<div class="input-daterange input-group" id="datepicker">
|
||||
<input type="text" class="input-sm form-control" readOnly id="startTs" />
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
<select class="form-control" id="OrgId" style="width: 300px; ">
|
||||
<option value="0">所有酒店</option>
|
||||
@{
|
||||
List<HotelsItem> Hotelslist = (List<HotelsItem>)Session["qxHotels"];
|
||||
for (int i = 0; i < Hotelslist.Count; i++)
|
||||
{
|
||||
<option value="@Hotelslist[i].HotelId">@Hotelslist[i].HotelName.Trim()</option>
|
||||
}
|
||||
}
|
||||
</select>
|
||||
<input type="text" placeholder="查找酒店" onchange="setHotelDropDownLike();" name="findhotelbyinput" style="height:38px; width:300px; margin-top:5px;" id="findhotelbynameinput">
|
||||
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input id="pmslogHideS8" type="checkbox" checked /> 隐藏S9,S10状态
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="input-group m-b" id="data_fromtoform" style="width:300px">
|
||||
<div class="input-daterange input-group visible-xs-2" style="width: 300px">
|
||||
<i class="fa fa-calendar-alt" style="margin-top:10px;margin-left:6px;margin-right:8px"></i>
|
||||
<input type="text" class="input-sm form-control mytimer" name="start" id="startTs" readonly />
|
||||
@*<span class="input-group-btn" style="width: 45px">
|
||||
<button class="btn default" type="button">
|
||||
<i class="fa fa-calendar-alt"></i>
|
||||
</button>
|
||||
</span>*@
|
||||
<span style="margin-top: 6px; margin-right: 8px;margin-left:8px">至</span>
|
||||
<input type="text" class="input-sm form-control mytimer" name="end" id="endTs" readonly />
|
||||
@*<span class="input-group-btn" style="width: 45px">
|
||||
<button class="btn default" type="button">
|
||||
<i class="fa fa-calendar-alt"></i>
|
||||
</button>
|
||||
</span>*@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<select class="form-control" id="RoomStatus" style="width: 300px; margin-top: 5px;">
|
||||
<option value="3" selected>
|
||||
所有房间
|
||||
</option>
|
||||
<option value="1">
|
||||
开房
|
||||
</option>
|
||||
<option value="0">
|
||||
退房
|
||||
</option>
|
||||
</select>
|
||||
<input type="text" placeholder="根据房间筛选" name="username" style="height: 38px;width:230px; float: left; margin-top: 5px; " id="RoomName">
|
||||
<button class="btn btn-md btn-primary" style=" float: left; margin-top: 5px;margin-left:5px; width: 65px; " id="Btnmodify" onclick=" search('/App/Log/InquirePmsMessageLog');">搜索</button>
|
||||
|
||||
@*条件筛选*@
|
||||
</div>
|
||||
@*条件筛选*@
|
||||
@*内容筛选*@
|
||||
<div class="ibox-content" style="padding:0px;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- /.card -->
|
||||
<div class="col-sm-4" id="faceDetailsBox">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
<script src="~/Theme/js/plugins/pace/pace.min.js"></script>
|
||||
<script src="~/Theme/js/plugins/datapicker/bootstrap-datepicker.js"></script>
|
||||
<script src="~/Theme/js/plugins/datapicker/locales/bootstrap-datepicker.zh-CN.js"></script>
|
||||
<script src="~/Theme/js/plugins/peity/jquery.peity.min.js"></script>
|
||||
<script src="~/Plugin/allPages.js"></script>
|
||||
<script>
|
||||
$(function () {
|
||||
search('/App/Log/InquirePmsMessageLog');
|
||||
});
|
||||
//$('#data_ovform .input-daterange').datepicker({
|
||||
// language: "zh-CN",//语言
|
||||
// todayBtn: "linked",//今日按钮
|
||||
// keyboardNavigation: false,
|
||||
// forceParse: false,
|
||||
// autoclose: true,
|
||||
// format: "yyyy/mm/dd"//日期格式
|
||||
//});
|
||||
|
||||
$('.mytimer').datepicker({
|
||||
language: "zh-CN",//语言
|
||||
todayBtn: "linked",//今日按钮
|
||||
autoclose: true,//选择后关闭日期选择
|
||||
format: "yyyy-mm-dd",//日期格式
|
||||
});
|
||||
|
||||
function setHotelDropDownLike() {
|
||||
|
||||
var hotelliekName = $("#findhotelbynameinput").val();
|
||||
|
||||
|
||||
var matchedValue = 0;
|
||||
$("#OrgId option").each(function (index, it) {
|
||||
if ($(it).text().indexOf(hotelliekName) >= 0 && matchedValue == 0) {
|
||||
$(it).attr("selected", true);
|
||||
matchedValue = $(it).val();
|
||||
}
|
||||
else {
|
||||
$(it).attr("selected", false);
|
||||
}
|
||||
})
|
||||
$("#OrgId").val(matchedValue);
|
||||
}
|
||||
|
||||
|
||||
//监听input
|
||||
var input = document.getElementById('findhotelbynameinput'); // 获取输入框元素
|
||||
|
||||
input.addEventListener('input', function () {
|
||||
setHotelDropDownLike(); // 在输入框内容改变时,执行setHotelDropDownLike方法
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
170
Face.Web/Areas/App/Views/Log/errormessagehandling.cshtml
Normal file
170
Face.Web/Areas/App/Views/Log/errormessagehandling.cshtml
Normal file
@@ -0,0 +1,170 @@
|
||||
|
||||
@{
|
||||
ViewBag.Title = "errormessagehandling";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
<style>
|
||||
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
#order {
|
||||
border-top: solid 2px #ddd;
|
||||
}
|
||||
|
||||
.chaxun {
|
||||
text-indent: 5px;
|
||||
}
|
||||
|
||||
.PagedList-skipToLast page-item {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<link href="~/Theme/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
|
||||
<div class="content-wrapper">
|
||||
<section class="content" style="padding:0px;">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<!-- Default box -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<span style="font-size:30px">所有人脸机错误处理日志</span>
|
||||
<div class="card-tools">
|
||||
<button type="button" class="btn btn-tool" data-card-widget="collapse" title="Collapse"></button>
|
||||
<button type="button" class="btn btn-tool" data-card-widget="remove" title="Remove">
|
||||
<i class="fas fa-times"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@*条件筛选放在card body部分*@
|
||||
<div class="card-body col-sm-12">
|
||||
<div class="form-horizontal">
|
||||
<div class="form-group row">
|
||||
<label for="OrgId" class="col-md-2 col-sm-12 col-form-label">状态</label>
|
||||
<select class="form-control" id="OrgId" style="width:300px;">
|
||||
<option selected value="-1">全部</option>
|
||||
<option value="1">已处理</option>
|
||||
<option value="0">未处理</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="txtOpname" class="col-md-2 col-sm-12 col-form-label">错误信息</label>
|
||||
<input type="text" class="form-control" id="txtOpname" placeholder="请输入错误信息" style="width:300px;">
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="" class="col-md-2 col-sm-12 col-form-label">时间范围</label>
|
||||
<div class="col-md-10 col-sm-12">
|
||||
<div class="row">
|
||||
<div class="col-md-5 col-sm-12">
|
||||
<div class="input-group mb-3">
|
||||
<input type="text" class="input-sm form-control mytimer" name="start" id="startTs" readonly="">
|
||||
<span class="input-group-btn" style="width: 25%">
|
||||
<button class="btn default" type="button">
|
||||
<i class="fa fa-calendar-alt"></i>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2 col-sm-12">至</div>
|
||||
<div class="col-md-5 col-sm-12">
|
||||
<div class="input-group mb-3">
|
||||
<input type="text" class="input-sm form-control mytimer" name="end" id="endTs" readonly="">
|
||||
<span class="input-group-btn" style="width: 25%">
|
||||
<button class="btn default" type="button">
|
||||
<i class="fa fa-calendar-alt"></i>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-lg btn-default" onclick="search('/App/Log/geterrorinfo');" style="float:right;">查询</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@*内容筛选*@
|
||||
<div class="ibox-content" style="padding:0px;">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<script src="~/Theme/js/plugins/datapicker/bootstrap-datepicker.js"></script>
|
||||
<script src="~/Theme/js/plugins/datapicker/locales/bootstrap-datepicker.zh-CN.js"></script>
|
||||
<script src="~/Plugin/allPages.js"></script>
|
||||
|
||||
<script>
|
||||
$(".pagination").addClass("pagination pagination-sm");
|
||||
$(".pagination").children("li").addClass("page-item");
|
||||
$(".page-item").children("a").addClass("page-link");
|
||||
$(function () {
|
||||
$(function () {
|
||||
search('/App/Log/geterrorinfo');
|
||||
});
|
||||
})
|
||||
|
||||
$('.mytimer').datepicker({
|
||||
language: "zh-CN",//语言
|
||||
todayBtn: "linked",//今日按钮
|
||||
autoclose: true,//选择后关闭日期选择
|
||||
format: "yyyy-mm-dd",//日期格式
|
||||
});
|
||||
|
||||
//function errorinfo(errorcount) {
|
||||
// debugger
|
||||
// $.ajax({
|
||||
// url: "/App/Log/geterrorinfo",
|
||||
// /* data: "",*/
|
||||
// type: "Post", // 提交方式
|
||||
// success: function (data) {
|
||||
// debugger
|
||||
// //$(".ibox-content").html(data);
|
||||
// //$("li.pages").hide();
|
||||
// //if (Pages >= 5) {
|
||||
// // var maxPages = Pages + 3
|
||||
// // var minPages = Pages - 3;
|
||||
// // for (var i = minPages; i < maxPages; i++) {
|
||||
// // $("li.pages").eq(i).show();//显示页数
|
||||
// // }
|
||||
// //} else {
|
||||
// // for (var i = 0; i < 5; i++) {
|
||||
// // $("li.pages").eq(i).show();//显示页数
|
||||
// // }
|
||||
// //}
|
||||
// //if ($("li.pages").length != 0) {
|
||||
// // var pages = $("li.pages").length - 3;//获取页数
|
||||
// // if (Pages >= pages) {
|
||||
// // $("li.right").hide();
|
||||
// // }
|
||||
// // if (Pages > 3) {
|
||||
// // $("li.left").show();
|
||||
// // } else {
|
||||
// // $("li.left").hide();
|
||||
// // }
|
||||
// // $("li.pages a").eq(Pages - 1).css("color", "white");//添加选中字体颜色
|
||||
// // $("li.pages a").eq(Pages - 1).css("background-color", "#00BFFF");//添加选中背景颜色
|
||||
|
||||
// }
|
||||
// });
|
||||
|
||||
//}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
118
Face.Web/Areas/App/Views/Log/everydayLog.cshtml
Normal file
118
Face.Web/Areas/App/Views/Log/everydayLog.cshtml
Normal file
@@ -0,0 +1,118 @@
|
||||
@model PagedList.IPagedList<Face.Domain.Entities.Dailyoperation>
|
||||
@using PagedList.Mvc;
|
||||
@using Face.Web.Areas.App.Models
|
||||
@{
|
||||
ViewBag.Title = "everydayLog";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
List<Face.Domain.Entities.Hotels> Hotellist = Face.Services.Cache.CacheHelp.GetHotelslist();
|
||||
|
||||
}
|
||||
|
||||
<script src="~/Plugin/user.js"></script>
|
||||
<style>
|
||||
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
#style-format {
|
||||
float: right;
|
||||
}
|
||||
|
||||
#btnaddPLine {
|
||||
float: right;
|
||||
}
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<section class="content" style="padding:0px;">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<!-- Default box -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<span style="font-size:30px">日常操作日志</span>
|
||||
<div class="card-tools">
|
||||
@*<button class="btn btn-md btn-primary" type="button" id="Hotelsearch">操作日志</button>*@
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@*<input type="text" placeholder="进行名字筛选" name="username" style="height:33px;" id="txtOpname"><button class="btn btn-md btn-primary" id="Btnmodify">搜索</button>*@
|
||||
@*条件筛选*@
|
||||
</div>
|
||||
@*内容筛选*@
|
||||
<div class="ibox-content" style="padding:0px;">
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<div class="yhxx" style="cursor:hand" onclick="Show(this)">
|
||||
<div class="info-box" style="padding: 0px; margin-bottom: 0.5rem; overflow-wrap: break-word;">
|
||||
<span class="info-box-icon" style="height:85px;overflow:hidden;"></span>
|
||||
<div class="info-box-content" style="padding: 0px;">
|
||||
|
||||
<span class="text-bold" style="font-size: 16px; line-height: 1;">
|
||||
操作人:@item.Uname
|
||||
</span>
|
||||
|
||||
|
||||
<span style="line-height: 1;">
|
||||
|
||||
</span>
|
||||
<span style="line-height: 1;">
|
||||
操作时间:@item.Creationtime.ToString("yyyy/MM/yy")
|
||||
|
||||
</span>
|
||||
|
||||
</div>
|
||||
<div class="info-box-content" style="padding: 0px;">
|
||||
<span style="line-height: 1;">
|
||||
酒店:@(Html.DisplayFor(modelItem => item.hotelCode).ToString() != "" ? Hotellist.Single(s => s.Id == item.hotelCode).Name : "")
|
||||
|
||||
</span>
|
||||
|
||||
<span style="line-height: 1;">
|
||||
操作类型:@item.operatetype
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="acet">
|
||||
操作内容: @item.operatedata
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<!-- /.card -->
|
||||
|
||||
</div>
|
||||
<div style="text-align:center" class="chaxun">
|
||||
@*分页主要代码*@
|
||||
每页 @Model.PageSize 条记录,共 @Model.PageCount 页,当前第 @Model.PageNumber 页
|
||||
<nav aria-label="Contacts Page Navigation">
|
||||
<ul class="pagination justify-content-center m-0">
|
||||
@Html.PagedListPager(Model, page => Url.Action("everydayLog", new { page }), new PagedListRenderOptions() { DisplayItemSliceAndTotal = false, MaximumPageNumbersToDisplay = 5 })
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</div>
|
||||
<script>
|
||||
$(".pagination").addClass("pagination pagination-sm");
|
||||
$(".pagination").children("li").addClass("page-item");
|
||||
$(".page-item").children("a").addClass("page-link");
|
||||
|
||||
$('.acet').hide();
|
||||
|
||||
function Show(that) {
|
||||
console.log(that)
|
||||
$(that).find('.acet').toggle();
|
||||
}
|
||||
|
||||
</script>
|
||||
143
Face.Web/Areas/App/Views/Log/geterrorinfo.cshtml
Normal file
143
Face.Web/Areas/App/Views/Log/geterrorinfo.cshtml
Normal file
@@ -0,0 +1,143 @@
|
||||
|
||||
<style>
|
||||
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
#order {
|
||||
border-top: solid 2px #ddd;
|
||||
}
|
||||
|
||||
.chaxun {
|
||||
text-indent: 5px;
|
||||
}
|
||||
|
||||
.PagedList-skipToLast page-item {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
<div id="project">
|
||||
<table class="table dataTables-example" border="0" id="order" style="word-break: break-all;">
|
||||
@foreach (var item in ViewBag.errorinfos)
|
||||
{
|
||||
<tbody class="tbodyList">
|
||||
<tr>
|
||||
<td rowspan="5" style="margin:0px;padding:0px; ">
|
||||
<input type="hidden" id="ID" value="2">
|
||||
<div class="lightBoxGallery">
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td id="mobile" style="text-align:left; ">
|
||||
<span style="color:#0094ff;">
|
||||
@item.creationdata
|
||||
</span>
|
||||
</td>
|
||||
<td style="" id="mobile2"><span style="color: darkgray;">序号:</span><span style="color:#0094ff"><strong>@item.id</strong></span></td>
|
||||
</tr>
|
||||
<tr></tr>
|
||||
<tr>
|
||||
@if (item.isVerify == 0)
|
||||
{
|
||||
<td>
|
||||
<span style="color: darkgray;">错误信息: </span><span style="color:red;">@item.ErrorNmae</span>
|
||||
</td>
|
||||
}
|
||||
else
|
||||
{
|
||||
<td>
|
||||
<span style="color: darkgray;">错误信息: </span><span style="color: #0094ff;">@item.ErrorNmae</span>
|
||||
</td>
|
||||
}
|
||||
<td>
|
||||
<span style="color: darkgray;">pmsid:@item.pmsids</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="color:darkgray;font-size:smaller;">处理方法:@item.handlinginfo</td>
|
||||
@if (item.isVerify == 0)
|
||||
{
|
||||
|
||||
|
||||
<td style="display:block">
|
||||
@*<span style="color: darkgray;">pmsid:@item.pmsids</span>*@
|
||||
<button type="button" class="btn btn-xl btn-default" onclick="updateerror(@item.id)">
|
||||
确认
|
||||
</button>
|
||||
</td>
|
||||
}
|
||||
else
|
||||
{
|
||||
<td style="display:none">
|
||||
@*<span style="color: darkgray;">pmsid:@item.pmsids</span>*@
|
||||
<button type="button" class="btn btn-xl btn-default">
|
||||
确认
|
||||
</button>
|
||||
</td>
|
||||
}
|
||||
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
}
|
||||
</table>
|
||||
@*<div id="btn" onclick="tip()"></div>*@
|
||||
<div>
|
||||
<nav style="text-align:center;">
|
||||
<ul class="pagination" id="page">
|
||||
<li class="first" onclick="firstPage10('/App/Log/geterrorinfo',(@ViewBag.allpages-@ViewBag.allpages+1))"><a>«</a></li>
|
||||
<li class="left"><a>…</a></li>
|
||||
@for (int i = 0; i < ViewBag.allpages; i++)
|
||||
{
|
||||
<li class="pages" onclick="SpecifyPage10('/App/Log/geterrorinfo',@(i+1))"><a>@(i + 1)</a></li>
|
||||
}
|
||||
<li class="right"><a>…</a></li>
|
||||
<li class="finally"><a onclick="lastPage10('/App/Log/geterrorinfo',@ViewBag.allpages)">»</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
$(".pagination").addClass("pagination pagination-sm");
|
||||
$(".pagination").children("li").addClass("page-item");
|
||||
$(".page-item").children("a").addClass("page-link");
|
||||
//第一页
|
||||
function firstPage10(url, page) {
|
||||
search(url, page, page, page);
|
||||
|
||||
}
|
||||
//最后一页
|
||||
function lastPage10(url, page) {
|
||||
search(url, page, page, page);//起始显示,显示结束,页数背景色的下标
|
||||
}
|
||||
//选择页数
|
||||
function SpecifyPage10(url, page) {
|
||||
search(url, page, page, page);
|
||||
}
|
||||
function updateerror(errid) {
|
||||
$.ajax({
|
||||
url: "/App/Log/updateerrorinfo",
|
||||
data: {
|
||||
id: errid
|
||||
},
|
||||
type: "Post", // 提交方式
|
||||
success: function (data) {
|
||||
if (data > 0) {
|
||||
search('/App/Log/geterrorinfo')
|
||||
alert("处理成功");
|
||||
} else {
|
||||
search('/App/Log/geterrorinfo')
|
||||
alert("处理失败");
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
119
Face.Web/Areas/App/Views/Log/operationLog.cshtml
Normal file
119
Face.Web/Areas/App/Views/Log/operationLog.cshtml
Normal file
@@ -0,0 +1,119 @@
|
||||
@model PagedList.IPagedList<Face.Domain.Entities.ULog>
|
||||
@using PagedList.Mvc;
|
||||
@using Face.Domain.Entities;
|
||||
@using Face.Web.Areas.App.Models;
|
||||
@using Face.Domain.Application;
|
||||
@{
|
||||
ViewBag.Title = "operationLog";
|
||||
Layout = "~/Areas/App/Views/Shared/_Layout.cshtml";
|
||||
List<Hotels> hotels = (List<Hotels>)Session["HotelList"];
|
||||
List<Hosts> hosts = (List<Hosts>)Session["roomlist"];
|
||||
List<TBL_ROOM_BASIC_INFO> ZongRoominfo = (List<TBL_ROOM_BASIC_INFO>)Session["ZongRoominfo"];
|
||||
|
||||
}
|
||||
<script src="~/Plugin/user.js"></script>
|
||||
<style>
|
||||
.table > thead > tr > th, .table > tbody > tr > th, .table > tfoot > tr > th, .table > thead > tr > td, .table > tbody > tr > td, .table > tfoot > tr > td {
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
.table > tbody > tr > td, .table > tbody > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th, .table > thead > tr > td, .table > thead > tr > th {
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
#style-format {
|
||||
float: right;
|
||||
}
|
||||
|
||||
#btnaddPLine {
|
||||
float: right;
|
||||
}
|
||||
</style>
|
||||
<div class="content-wrapper">
|
||||
<section class="content" style="padding:0px;">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<!-- Default box -->
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<span style="font-size:30px">人脸机操作日志</span>
|
||||
<div class="card-tools">
|
||||
@*<button class="btn btn-md btn-primary" type="button" id="Hotelsearch">操作日志</button>*@
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
@*<input type="text" placeholder="进行名字筛选" name="username" style="height:33px;" id="txtOpname"><button class="btn btn-md btn-primary" id="Btnmodify">搜索</button>*@
|
||||
@*条件筛选*@
|
||||
</div>
|
||||
@*内容筛选*@
|
||||
<div class="ibox-content" style="padding:0px;">
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<div class="yhxx">
|
||||
<div class="info-box" style="padding: 0px; margin-bottom: 0.5rem; overflow-wrap: break-word;">
|
||||
<span class="info-box-icon" style="height:85px;overflow:hidden;"></span>
|
||||
<div class="info-box-content" style="padding: 0px;">
|
||||
|
||||
<span class="text-bold" style="font-size: 16px; line-height: 1;">
|
||||
操作人:@item.Uname
|
||||
</span>
|
||||
<span style="line-height: 1;">
|
||||
SN:@item.faceSN
|
||||
</span>
|
||||
|
||||
|
||||
<span style="line-height: 1;">
|
||||
@item.Creationtime.ToString("yyyy/MM/dd hh:mm")
|
||||
</span>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="info-box-content" style="padding: 0px;">
|
||||
<span style="line-height: 1;">
|
||||
@(hotels.FirstOrDefault(x => x.Id == item.hotelcode).Name)
|
||||
</span>
|
||||
<span style="line-height: 1;">
|
||||
@if (item.roomid != null && item.roomid != 0)
|
||||
{
|
||||
TBL_ROOM_BASIC_INFO isok = ZongRoominfo.FirstOrDefault(s => s.ROOM_OLD_ID == item.roomid);
|
||||
<span> @( item.roomid.ToString() != "" ? (isok == null ? "" : isok.ROOM_NUMBER) : "" )</span>
|
||||
}
|
||||
else
|
||||
{
|
||||
<span>无房间</span>
|
||||
}
|
||||
</span>
|
||||
<span style="line-height: 1;">
|
||||
@item.operatetype
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<!-- /.card -->
|
||||
|
||||
</div>
|
||||
<div style="text-align:center" class="chaxun">
|
||||
@*分页主要代码*@
|
||||
每页 @Model.PageSize 条记录,共 @Model.PageCount 页,当前第 @Model.PageNumber 页
|
||||
<nav aria-label="Contacts Page Navigation">
|
||||
<ul class="pagination justify-content-center m-0">
|
||||
@Html.PagedListPager(Model, page => Url.Action("operationLog", new { page }), new PagedListRenderOptions() { DisplayItemSliceAndTotal = false, MaximumPageNumbersToDisplay = 5 })
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</div>
|
||||
<script>
|
||||
$(".pagination").addClass("pagination pagination-sm");
|
||||
$(".pagination").children("li").addClass("page-item");
|
||||
$(".page-item").children("a").addClass("page-link");
|
||||
</script>
|
||||
104
Face.Web/Areas/App/Views/Login/Index.cshtml
Normal file
104
Face.Web/Areas/App/Views/Login/Index.cshtml
Normal file
@@ -0,0 +1,104 @@
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
<html style="height: 100%; width: 100%; overflow-y: hidden; overflow-x: hidden;">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<title>宝来威人脸机管理系统</title>
|
||||
<!-- Toastr -->
|
||||
<link href="~/Content/NewFrame/plugins/toastr/toastr.min.css" rel="stylesheet" />
|
||||
|
||||
|
||||
|
||||
<!-- Font Awesome -->
|
||||
<link href="~/Content/NewFrame/plugins/fontawesome-free/css/all.min.css" rel="stylesheet" />
|
||||
|
||||
<!-- SweetAlert2 -->
|
||||
<link href="~/Content/NewFrame/plugins/sweetalert2/sweetalert2.min.css" rel="stylesheet" />
|
||||
|
||||
<!-- <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ -->
|
||||
<link href="~/Content/NewFrame/dist/css/adminlte.min.css" rel="stylesheet" />
|
||||
<!-- Toastr -->
|
||||
<link href="~/Content/NewFrame/plugins/toastr/toastr.min.css" rel="stylesheet" />
|
||||
<!-- jQuery -->
|
||||
<script src="~/Content/NewFrame/plugins/jquery/jquery.min.js"></script>
|
||||
<!-- Bootstrap 4 -->
|
||||
<script src="~/Content/NewFrame/plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
|
||||
<!-- bs-custom-file-input -->
|
||||
<script src="~/Content/NewFrame/plugins/bs-custom-file-input/bs-custom-file-input.min.js"></script>
|
||||
<!-- AdminLTE App -->
|
||||
<script src="~/Content/NewFrame/dist/js/adminlte.min.js"></script>
|
||||
<!-- SweetAlert2 -->
|
||||
<link href="~/Content/NewFrame/plugins/sweetalert2-theme-bootstrap-4/bootstrap-4.min.css" rel="stylesheet" />
|
||||
<!-- Toastr -->
|
||||
<script src="~/Content/NewFrame/plugins/toastr/toastr.min.js"></script>
|
||||
<!-- 插件消息框样式 https://gitee.com/wispx/toastr -->
|
||||
<link href="~/Theme/css/plugins/toastr/toastr.min.css" rel="stylesheet">
|
||||
<script src="~/Theme/js/jquery-2.1.1.js"></script>
|
||||
<script src="~/Theme/js/bootstrap.min.js"></script>
|
||||
<script src="~/Theme/js/jquery.cookie.js"></script>
|
||||
<script src="~/Theme/js/jquery.form.min.js"></script>
|
||||
|
||||
</head>
|
||||
<body style="height:100%;width:100%">
|
||||
|
||||
<div class="row" id="content" style="box-sizing: border-box;">
|
||||
<div class="col-md-4">
|
||||
</div>
|
||||
<div class="wrapper col-md-4" style="padding:0">
|
||||
|
||||
<img src="~/Images/Project/0010.png" style=" margin: 10px; margin-left:20%; max-width:60%; text-align: center; " />
|
||||
<div class="card card-secondary ">
|
||||
<div class="card-header bg-info">
|
||||
<h3 class="card-title">宝来威人脸机管理系统</h3>
|
||||
</div>
|
||||
<form class="m-t" role="form" id="loginForm">
|
||||
<div class="card-body">
|
||||
<div class="form-group">
|
||||
<label for="Uid">用户名</label>
|
||||
<input type="text" class="form-control" name="username" id="username" autocomplete="off" placeholder="输入用户名">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="Pwd">密码</label>
|
||||
<input type="password" autocomplete="new-password" class="form-control" name="password" id="password" placeholder="密码">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="form-check">
|
||||
<input type="checkbox" class="form-check-input" id="remember">
|
||||
<label class="form-check-label" for="exampleCheck2">记住我</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<div class="row">
|
||||
<div class="col-4">
|
||||
<button type="button" id="btnlogin" class="btn btn-success ">登录</button>
|
||||
</div>
|
||||
<div class="col-4 "></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4"></div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
//居中
|
||||
$("body").css("margin-top", (($(window).height() / 4) - ($("#content").height() / 2)) < 0 ? 0 : (($(window).height() / 4) - ($("#content").height() / 2)) + "px");
|
||||
$("#btnlogin").click(function () { var a = $("#btnlogin").html(); $("#btnlogin").attr("disabled", "true"); $("#btnlogin").text("登录中..."); $("#loginForm").ajaxSubmit({ url: "/APP/Login/Login", type: "post", success: function (b) { if (b.Status == 200) { save_cookies(); $.toastr.success("登录成功", { position: "top-center", time: 350, callback: function () { location.href = "/APP/Home/Index" } }); $("#btnlogin").text(a); $("#btnlogin").removeAttr("disabled") } else { $.toastr.error("登录失败! <br />" + b.Message, { time: 3000, position: "top-center" }); $("#btnlogin").text(a); $("#btnlogin").removeAttr("disabled") } }, error: function (b) { $("#btnlogin").removeAttr("disabled"); alert(b) } }) }); function save_cookies() { if ($("#remember").prop("checked")) { var b = $("#username").val(); var a = $("#password").val(); $.cookie("remember", "true", { expires: 7 }); $.cookie("username", b, { expires: 7 }); $.cookie("password", a, { expires: 7 }) } else { $.cookie("remember", "false", { expires: -1 }); $.cookie("username", "", { expires: -1 }); $.cookie("password", "", { expires: -1 }) } };
|
||||
$(document).ready(function () {
|
||||
var rem = $.cookie('remember');
|
||||
if (rem) {
|
||||
$("#remember").prop("checked", true);
|
||||
$("#username").val($.cookie("username"));
|
||||
$("#password").val($.cookie("password"));
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
<script src="~/Theme/js/plugins/toastr/toastr.min.js"></script>
|
||||
24
Face.Web/Areas/App/Views/Program/Index.cshtml
Normal file
24
Face.Web/Areas/App/Views/Program/Index.cshtml
Normal file
@@ -0,0 +1,24 @@
|
||||
@*@model YourNamespace.Models.ProgramViewModel
|
||||
@{
|
||||
ViewBag.Title = "Program Control";
|
||||
}*@
|
||||
<div class="content-wrapper">
|
||||
<section class="content" style="padding:0px;">
|
||||
<h2>Program Control</h2>
|
||||
|
||||
<form action="/APP/Program/Start" method="post">
|
||||
<div>
|
||||
<label for="programPath">Program Path:</label>
|
||||
<input type="text" id="programPath" name="programPath" required value="C:\FaceTest\bin\Release\FacesTest.exe"/>
|
||||
</div>
|
||||
<div>
|
||||
<button type="submit">Start Program</button>
|
||||
</div>
|
||||
</form>
|
||||
@if (ViewBag.Message != null)
|
||||
{
|
||||
<p>@ViewBag.Message</p>
|
||||
}
|
||||
</section>
|
||||
|
||||
</div>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user