初始化

This commit is contained in:
2025-11-25 17:41:24 +08:00
commit 4cdf0f0f85
3383 changed files with 1050962 additions and 0 deletions

View 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);
}
}
}