From ef0c58df75c6ffdab43ea69be007c51699c7a69d Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Sun, 23 Feb 2025 16:30:47 +0800 Subject: [PATCH 01/24] standard name for all module. --- .../Business/Cash/CashService.cs | 52 ++--- .../Business/Cash/ICashService.cs | 8 +- .../Business/Customer/CustoService.cs | 218 +++++++++--------- .../Business/Customer/ICustoService.cs | 14 +- .../Business/Fonts/FontsService.cs | 8 +- .../Business/Fonts/IFontsService.cs | 2 +- .../HydroelectricityService.cs | 20 +- .../Business/Reser/ReserService.cs | 16 +- .../Business/Room/RoomService.cs | 108 ++++----- .../Business/Room/RoomTypeService.cs | 16 +- .../Business/Sellthing/SellService.cs | 44 ++-- .../Business/Spend/SpendService.cs | 98 ++++---- .../Util/IUtilService.cs | 2 +- .../Util/UtilService.cs | 14 +- .../Worker/Check/IWorkerCheckService.cs | 4 +- .../Worker/Check/WorkerCheckService.cs | 18 +- .../Worker/GoodBad/IWorkerGoodBadService.cs | 4 +- .../Worker/GoodBad/WorkerGoodBadService.cs | 24 +- .../Worker/History/IWorkerHistoryService.cs | 4 +- .../Worker/History/WorkerHistoryService.cs | 12 +- .../Worker/IWorkerService.cs | 16 +- .../Worker/Picture/IWorkerPicService.cs | 8 +- .../Worker/Picture/WorkerPicService.cs | 32 +-- .../Worker/WorkerService.cs | 188 +++++++-------- .../Zero/Admin/AdminService.cs | 90 ++++---- .../Zero/Admin/IAdminService.cs | 20 +- .../Zero/Base/BaseService.cs | 202 ++++++++-------- .../Zero/Base/IBaseService.cs | 46 ++-- .../Zero/CheckInfo/CheckInfoService.cs | 42 ++-- .../Zero/CheckInfo/ICheckInfoService.cs | 8 +- .../Zero/Menu/MenuService.cs | 12 +- .../Zero/Module/AdminModuleZeroService.cs | 66 +++--- .../Zero/Module/IAdminModuleZeroService.cs | 6 +- .../Zero/Notice/INoticeService.cs | 6 +- .../Zero/Notice/NoticeService.cs | 24 +- .../Zero/VipRule/IVipRuleAppService.cs | 10 +- .../Zero/VipRule/VipRuleAppService.cs | 42 ++-- EOM.TSHotelManagement.Common.Core/BaseDTO.cs | 2 +- .../Business/{Cash/Cash.cs => Asset/Asset.cs} | 59 +++-- .../Business/Customer/CustoType.cs | 14 +- .../Customer/{Custo.cs => Customer.cs} | 65 +++--- .../Customer/{SexType.cs => GenderType.cs} | 13 +- .../Business/Customer/PassPortType.cs | 4 +- .../Hydroelectricity/Hydroelectricity.cs | 43 ++-- .../PromotionContent.cs} | 13 +- .../Business/Reser/Reser.cs | 44 ++-- .../Business/Room/Room.cs | 97 ++++---- .../Business/Room/RoomState.cs | 16 +- .../Business/Room/RoomType.cs | 34 +-- .../Business/Sellthing/SellThing.cs | 42 ++-- .../Business/Spend/Spend.cs | 78 ++++--- .../Worker.cs => Employee/Employee.cs} | 146 +++++++----- .../EmployeeCheck.cs} | 40 ++-- .../EmployeeHistory.cs} | 33 ++- .../EmployeePhoto.cs} | 26 ++- .../EmployeeRewardPunishment.cs} | 53 +++-- .../{Worker => Employee}/GBType.cs | 20 +- .../Sys/NavBar/NavBar.cs | 46 ++-- .../Util/ApplicationVersion.cs | 18 +- .../Util/CardCode.cs | 48 ++++ .../Util/Cardcodes.cs | 46 ---- .../Util/OperationLog.cs | 66 +++--- .../Zero/{Admin.cs => Administrator.cs} | 64 +++-- .../{AdminType.cs => AdministratorType.cs} | 22 +- .../Zero/{Notice.cs => AppointmentNotice.cs} | 50 ++-- .../Zero/{Dept.cs => Department.cs} | 70 +++--- .../Zero/Education.cs | 25 +- .../Zero/Menu.cs | 58 +++-- .../Zero/MenuViewModel.cs | 21 +- .../Zero/Module.cs | 25 +- .../Zero/ModuleConsts.cs | 2 +- .../Zero/ModulePermission.cs | 36 +++ .../Zero/ModuleZero.cs | 31 --- .../Zero/Nation.cs | 25 +- ...{CheckInfo.cs => SupervisionStatistics.cs} | 56 +++-- .../Zero/{Base.cs => SystemInformation.cs} | 18 +- .../Zero/{VipRule.cs => VipLevelRule.cs} | 38 +-- .../Zero/position.cs | 25 +- .../Business/Cash/CashController.cs | 8 +- .../Business/Customer/CustoController.cs | 14 +- .../Business/Fonts/FontsController.cs | 2 +- .../Controllers/Util/AppController.cs | 2 +- .../Worker/Check/WorkerCheckController.cs | 4 +- .../Worker/GoodBad/WorkerGoodBadController.cs | 4 +- .../Worker/History/WorkerHistoryController.cs | 4 +- .../Worker/Picture/WorkerPictureController.cs | 10 +- .../Controllers/Worker/WorkerController.cs | 16 +- .../Controllers/Zero/Admin/AdminController.cs | 20 +- .../Controllers/Zero/Base/BaseController.cs | 51 ++-- .../Zero/CheckInfo/CheckInfoController.cs | 8 +- .../Zero/Module/ModuleController.cs | 6 +- .../Zero/Notice/NoticeController.cs | 6 +- .../Zero/VipRule/VipRuleController.cs | 10 +- 93 files changed, 1799 insertions(+), 1502 deletions(-) rename EOM.TSHotelManagement.Common.Core/Business/{Cash/Cash.cs => Asset/Asset.cs} (58%) rename EOM.TSHotelManagement.Common.Core/Business/Customer/{Custo.cs => Customer.cs} (73%) rename EOM.TSHotelManagement.Common.Core/Business/Customer/{SexType.cs => GenderType.cs} (81%) rename EOM.TSHotelManagement.Common.Core/Business/{Fonts/Fonts.cs => PromotionContent/PromotionContent.cs} (79%) rename EOM.TSHotelManagement.Common.Core/{Worker/Worker.cs => Employee/Employee.cs} (42%) rename EOM.TSHotelManagement.Common.Core/{Worker/WorkerCheck.cs => Employee/EmployeeCheck.cs} (63%) rename EOM.TSHotelManagement.Common.Core/{Worker/WorkerHistory.cs => Employee/EmployeeHistory.cs} (71%) rename EOM.TSHotelManagement.Common.Core/{Worker/WorkerPic.cs => Employee/EmployeePhoto.cs} (33%) rename EOM.TSHotelManagement.Common.Core/{Worker/WorkerGoodBad.cs => Employee/EmployeeRewardPunishment.cs} (57%) rename EOM.TSHotelManagement.Common.Core/{Worker => Employee}/GBType.cs (73%) create mode 100644 EOM.TSHotelManagement.Common.Core/Util/CardCode.cs delete mode 100644 EOM.TSHotelManagement.Common.Core/Util/Cardcodes.cs rename EOM.TSHotelManagement.Common.Core/Zero/{Admin.cs => Administrator.cs} (57%) rename EOM.TSHotelManagement.Common.Core/Zero/{AdminType.cs => AdministratorType.cs} (74%) rename EOM.TSHotelManagement.Common.Core/Zero/{Notice.cs => AppointmentNotice.cs} (61%) rename EOM.TSHotelManagement.Common.Core/Zero/{Dept.cs => Department.cs} (53%) create mode 100644 EOM.TSHotelManagement.Common.Core/Zero/ModulePermission.cs delete mode 100644 EOM.TSHotelManagement.Common.Core/Zero/ModuleZero.cs rename EOM.TSHotelManagement.Common.Core/Zero/{CheckInfo.cs => SupervisionStatistics.cs} (52%) rename EOM.TSHotelManagement.Common.Core/Zero/{Base.cs => SystemInformation.cs} (77%) rename EOM.TSHotelManagement.Common.Core/Zero/{VipRule.cs => VipLevelRule.cs} (64%) diff --git a/EOM.TSHotelManagement.Application/Business/Cash/CashService.cs b/EOM.TSHotelManagement.Application/Business/Cash/CashService.cs index d039526..89ae5d6 100644 --- a/EOM.TSHotelManagement.Application/Business/Cash/CashService.cs +++ b/EOM.TSHotelManagement.Application/Business/Cash/CashService.cs @@ -34,17 +34,17 @@ namespace EOM.TSHotelManagement.Application /// /// 资产信息 /// - private readonly GenericRepository cashRepository; + private readonly GenericRepository cashRepository; /// /// 部门 /// - private readonly GenericRepository deptRepository; + private readonly GenericRepository deptRepository; /// /// 员工 /// - private readonly GenericRepository workerRepository; + private readonly GenericRepository workerRepository; /// /// @@ -52,7 +52,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public CashService(GenericRepository cashRepository, GenericRepository deptRepository, GenericRepository workerRepository) + public CashService(GenericRepository cashRepository, GenericRepository deptRepository, GenericRepository workerRepository) { this.cashRepository = cashRepository; this.deptRepository = deptRepository; @@ -64,7 +64,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool AddCashInfo(Cash cash) + public bool AddCashInfo(Asset cash) { return cashRepository.Insert(cash); } @@ -73,24 +73,24 @@ namespace EOM.TSHotelManagement.Application /// 查询资产信息 /// /// - public List SelectCashInfoAll() + public List SelectCashInfoAll() { //查询所有部门信息 - List depts = new List(); + List depts = new List(); depts = deptRepository.GetList(a => a.IsDelete != 1); //查询所有员工信息 - List workers = new List(); + List workers = new List(); workers = workerRepository.GetList(a => a.IsDelete != 1); - List cs = new List(); + List cs = new List(); cs = cashRepository.GetList(a => a.IsDelete != 1); cs.ForEach(source => { - var dept = depts.FirstOrDefault(a => a.dept_no.Equals(source.CashClub)); - source.DeptName = dept == null ? "" : dept.dept_name; - var worker = workers.FirstOrDefault(a => a.WorkerId.Equals(source.CashPerson)); - source.PersonName = worker == null ? "" : worker.WorkerName; + var dept = depts.FirstOrDefault(a => a.DepartmentNumber.Equals(source.DepartmentCode)); + source.DepartmentName = dept == null ? "" : dept.DepartmentName; + var worker = workers.FirstOrDefault(a => a.EmployeeId.Equals(source.AcquiredByEmployeeId)); + source.AcquiredByEmployeeName = worker == null ? "" : worker.EmployeeName; - source.CashPriceStr = source.CashPrice == 0 ? "" : Decimal.Parse(source.CashPrice.ToString()).ToString("#,##0.00").ToString(); + source.AssetValueFormatted = source.AssetValue == 0 ? "" : Decimal.Parse(source.AssetValue.ToString()).ToString("#,##0.00").ToString(); }); return cs; @@ -101,20 +101,20 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool UpdCashInfo(Cash cash) + public bool UpdCashInfo(Asset cash) { - return cashRepository.Update(a => new Cash() + return cashRepository.Update(a => new Asset() { - CashName = cash.CashName, - CashClub = cash.CashClub, - CashSource = cash.CashSource, - CashPrice = cash.CashPrice, - CashTime = cash.CashTime, - CashPerson = cash.CashPerson, + AssetName = cash.AssetName, + DepartmentCode = cash.DepartmentCode, + AssetSource = cash.AssetSource, + AssetValue = cash.AssetValue, + AcquisitionDate = cash.AcquisitionDate, + AcquiredByEmployeeId = cash.AcquiredByEmployeeId, IsDelete = cash.IsDelete, DataChgUsr = cash.DataChgUsr, DataChgDate = cash.DataChgDate - }, a => a.CashNo == cash.CashNo); + }, a => a.AssetNumber == cash.AssetNumber); } /// @@ -122,13 +122,13 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool DelCashInfo(Cash cash) + public bool DelCashInfo(Asset cash) { - return cashRepository.Update(a => new Cash() + return cashRepository.Update(a => new Asset() { IsDelete = 1, DataChgUsr = cash.DataChgUsr - }, a => a.CashNo == cash.CashNo); + }, a => a.AssetNumber == cash.AssetNumber); } } } diff --git a/EOM.TSHotelManagement.Application/Business/Cash/ICashService.cs b/EOM.TSHotelManagement.Application/Business/Cash/ICashService.cs index 8774b9f..977bd8b 100644 --- a/EOM.TSHotelManagement.Application/Business/Cash/ICashService.cs +++ b/EOM.TSHotelManagement.Application/Business/Cash/ICashService.cs @@ -35,26 +35,26 @@ namespace EOM.TSHotelManagement.Application /// /// /// - bool AddCashInfo(Cash cash); + bool AddCashInfo(Asset cash); /// /// 查询资产信息 /// /// - List SelectCashInfoAll(); + List SelectCashInfoAll(); /// /// 更新资产信息 /// /// /// - bool UpdCashInfo(Cash cash); + bool UpdCashInfo(Asset cash); /// /// 删除资产信息 /// /// /// - bool DelCashInfo(Cash cash); + bool DelCashInfo(Asset cash); } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Application/Business/Customer/CustoService.cs b/EOM.TSHotelManagement.Application/Business/Customer/CustoService.cs index 7a80320..070d1bc 100644 --- a/EOM.TSHotelManagement.Application/Business/Customer/CustoService.cs +++ b/EOM.TSHotelManagement.Application/Business/Customer/CustoService.cs @@ -42,7 +42,7 @@ namespace EOM.TSHotelManagement.Application /// /// 客户信息 /// - private readonly GenericRepository custoRepository; + private readonly GenericRepository custoRepository; /// /// 消费情况 @@ -52,12 +52,12 @@ namespace EOM.TSHotelManagement.Application /// /// 性别类型 /// - private readonly GenericRepository sexTypeRepository; + private readonly GenericRepository sexTypeRepository; /// /// 证件类型 /// - private readonly GenericRepository passPortTypeRepository; + private readonly GenericRepository passPortTypeRepository; /// /// 客户类型 @@ -84,7 +84,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public CustoService(GenericRepository custoRepository, GenericRepository spendRepository, GenericRepository sexTypeRepository, GenericRepository passPortTypeRepository, GenericRepository custoTypeRepository, EncryptLib encrypt, IDataProtectionProvider dataProtectionProvider) + public CustoService(GenericRepository custoRepository, GenericRepository spendRepository, GenericRepository sexTypeRepository, GenericRepository passPortTypeRepository, GenericRepository custoTypeRepository, EncryptLib encrypt, IDataProtectionProvider dataProtectionProvider) { this.custoRepository = custoRepository; this.spendRepository = spendRepository; @@ -101,12 +101,12 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool InsertCustomerInfo(Custo custo) + public bool InsertCustomerInfo(Customer custo) { - string NewID = dataProtector.Protect(custo.CustoID); - string NewTel = dataProtector.Protect(custo.CustoTel); - custo.CustoID = NewID; - custo.CustoTel = NewTel; + string NewID = dataProtector.Protect(custo.PassportID); + string NewTel = dataProtector.Protect(custo.CustomerPhoneNumber); + custo.PassportID = NewID; + custo.CustomerPhoneNumber = NewTel; return custoRepository.Insert(custo); } #endregion @@ -116,25 +116,25 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool UpdCustomerInfo(Custo custo) + public bool UpdCustomerInfo(Customer custo) { - string NewID = dataProtector.Protect(custo.CustoID); - string NewTel = dataProtector.Protect(custo.CustoTel); - custo.CustoID = NewID; - custo.CustoTel = NewTel; - return custoRepository.Update(a => new Custo() + string NewID = dataProtector.Protect(custo.PassportID); + string NewTel = dataProtector.Protect(custo.CustomerPhoneNumber); + custo.PassportID = NewID; + custo.CustomerPhoneNumber = NewTel; + return custoRepository.Update(a => new Customer() { - CustoName = custo.CustoName, - CustoSex = custo.CustoSex, - CustoType = custo.CustoType, - CustoBirth = custo.CustoBirth, - CustoAddress = custo.CustoAddress, - CustoID = custo.CustoID, - CustoTel = custo.CustoTel, + CustomerName = custo.CustomerName, + CustomerGender = custo.CustomerGender, + CustomerType = custo.CustomerType, + DateOfBirth = custo.DateOfBirth, + CustomerAddress = custo.CustomerAddress, + PassportID = custo.PassportID, + CustomerPhoneNumber = custo.CustomerPhoneNumber, PassportType = custo.PassportType, DataChgUsr = custo.DataChgUsr, DataChgDate = custo.DataChgDate - }, a => a.CustoNo == custo.CustoNo); + }, a => a.CustomerNumber == custo.CustomerNumber); } /// @@ -142,22 +142,22 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool DelCustomerInfo(Custo custo) + public bool DelCustomerInfo(Customer custo) { var occupied = Convert.ToInt32(RoomStateConstant.Occupied.Code); - var isOccupied = custoRepository.Change().IsAny(a => a.CustoNo == custo.CustoNo && a.RoomStateId == occupied); - var haveUnSettle = custoRepository.Change().IsAny(a => a.CustoNo == custo.CustoNo && a.MoneyState == SpendConsts.UnSettle); + var isOccupied = custoRepository.Change().IsAny(a => a.CustomerNumber == custo.CustomerNumber && a.RoomStateId == occupied); + var haveUnSettle = custoRepository.Change().IsAny(a => a.CustomerNumber == custo.CustomerNumber && a.SettlementStatus == SpendConsts.UnSettle); if (isOccupied) return false; if (haveUnSettle) return false; - return custoRepository.Update(a => new Custo() + return custoRepository.Update(a => new Customer() { IsDelete = custo.IsDelete, DataChgUsr = custo.DataChgUsr, DataChgDate = custo.DataChgDate - }, a => a.CustoNo == custo.CustoNo); + }, a => a.CustomerNumber == custo.CustomerNumber); } /// @@ -168,10 +168,10 @@ namespace EOM.TSHotelManagement.Application /// public bool UpdCustomerTypeByCustoNo(string custoNo, int userType) { - return custoRepository.Update(a => new Custo() + return custoRepository.Update(a => new Customer() { - CustoType = userType - }, a => a.CustoNo.Equals(custoNo)); + CustomerType = userType + }, a => a.CustomerNumber.Equals(custoNo)); } /// @@ -181,19 +181,19 @@ namespace EOM.TSHotelManagement.Application public List SelectAllMoney() { List custoSpends = new List(); - var listSource = spendRepository.GetList(a => a.MoneyState.Equals(SpendConsts.Settled)).OrderBy(a => a.SpendTime).ToList(); + var listSource = spendRepository.GetList(a => a.SettlementStatus.Equals(SpendConsts.Settled)).OrderBy(a => a.ConsumptionTime).ToList(); var listDates = new List(); listSource.ForEach(source => { - var year = Convert.ToDateTime(source.SpendTime).ToString("yyyy"); + var year = Convert.ToDateTime(source.ConsumptionTime).ToString("yyyy"); if (!custoSpends.Select(a => a.Years).ToList().Contains(year)) { - var startDate = new DateTime(Convert.ToDateTime(source.SpendTime).Year, 1, 1, 0, 0, 0); - var endDate = new DateTime(Convert.ToDateTime(source.SpendTime).Year, 12, 31, 23, 59, 59); + var startDate = new DateTime(Convert.ToDateTime(source.ConsumptionTime).Year, 1, 1, 0, 0, 0); + var endDate = new DateTime(Convert.ToDateTime(source.ConsumptionTime).Year, 12, 31, 23, 59, 59); custoSpends.Add(new CustoSpend { Years = year, - Money = listSource.Where(a => a.SpendTime >= startDate && a.SpendTime <= endDate).Sum(a => a.SpendMoney) + Money = listSource.Where(a => a.ConsumptionTime >= startDate && a.ConsumptionTime <= endDate).Sum(a => a.ConsumptionAmount) }); } }); @@ -206,21 +206,21 @@ namespace EOM.TSHotelManagement.Application /// 查询所有客户信息 /// /// - public OSelectAllDto SelectCustoAll(int? pageIndex, int? pageSize, bool onlyVip = false) + public OSelectAllDto SelectCustoAll(int? pageIndex, int? pageSize, bool onlyVip = false) { - OSelectAllDto oSelectCustoAllDto = new OSelectAllDto(); + OSelectAllDto oSelectCustoAllDto = new OSelectAllDto(); //查询出所有性别类型 - List sexTypes = new List(); + List sexTypes = new List(); sexTypes = sexTypeRepository.GetList(); //查询出所有证件类型 - List passPortTypes = new List(); + List passPortTypes = new List(); passPortTypes = passPortTypeRepository.GetList(); //查询出所有客户类型 List custoTypes = new List(); custoTypes = custoTypeRepository.GetList(); //查询出所有客户信息 - List custos = new List(); + List custos = new List(); var count = 0; @@ -229,7 +229,7 @@ namespace EOM.TSHotelManagement.Application custos = custoRepository.AsQueryable().ToPageList((int)pageIndex, (int)pageSize, ref count); if (onlyVip) { - custos = custoRepository.AsQueryable().Where(a => a.CustoType != 0).ToPageList((int)pageIndex, (int)pageSize, ref count); + custos = custoRepository.AsQueryable().Where(a => a.CustomerType != 0).ToPageList((int)pageIndex, (int)pageSize, ref count); } } else @@ -242,26 +242,26 @@ namespace EOM.TSHotelManagement.Application try { //解密身份证号码 - var sourceStr = source.CustoID.Contains('·') ? encrypt.Decryption(source.CustoID) : dataProtector.Unprotect(source.CustoID); - source.CustoID = sourceStr; + var sourceStr = source.PassportID.Contains('·') ? encrypt.Decryption(source.PassportID) : dataProtector.Unprotect(source.PassportID); + source.PassportID = sourceStr; //解密联系方式 - var sourceTelStr = source.CustoTel.Contains('·') ? encrypt.Decryption(source.CustoTel) : dataProtector.Unprotect(source.CustoTel); - source.CustoTel = sourceTelStr; + var sourceTelStr = source.CustomerPhoneNumber.Contains('·') ? encrypt.Decryption(source.CustomerPhoneNumber) : dataProtector.Unprotect(source.CustomerPhoneNumber); + source.CustomerPhoneNumber = sourceTelStr; } catch (Exception) { - source.CustoID = source.CustoID; - source.CustoTel = source.CustoTel; + source.PassportID = source.PassportID; + source.CustomerPhoneNumber = source.CustomerPhoneNumber; } //性别类型 - var sexType = sexTypes.FirstOrDefault(a => a.sexId == source.CustoSex); - source.SexName = sexType.sexName.IsNullOrEmpty() ? "" : sexType.sexName; + var sexType = sexTypes.FirstOrDefault(a => a.GenderId == source.CustomerGender); + source.GenderName = sexType.GenderName.IsNullOrEmpty() ? "" : sexType.GenderName; //证件类型 var passPortType = passPortTypes.FirstOrDefault(a => a.PassportId == source.PassportType); - source.PassportName = passPortType.PassportName.IsNullOrEmpty() ? "" : passPortType.PassportName; + source.PassportTypeName = passPortType.PassportName.IsNullOrEmpty() ? "" : passPortType.PassportName; //客户类型 - var custoType = custoTypes.FirstOrDefault(a => a.UserType == source.CustoType); - source.typeName = custoType.TypeName.IsNullOrEmpty() ? "" : custoType.TypeName; + var custoType = custoTypes.FirstOrDefault(a => a.CustomerType == source.CustomerType); + source.CustomerTypeName = custoType.CustomerTypeName.IsNullOrEmpty() ? "" : custoType.CustomerTypeName; }); oSelectCustoAllDto.listSource = custos; @@ -274,43 +274,43 @@ namespace EOM.TSHotelManagement.Application /// 查询指定客户信息 /// /// - public OSelectAllDto SelectCustomers(Custo custo) + public OSelectAllDto SelectCustomers(Customer custo) { - var customers = new OSelectAllDto(); + var customers = new OSelectAllDto(); - var where = Expressionable.Create(); + var where = Expressionable.Create(); //查询出所有性别类型 - List sexTypes = new List(); + List sexTypes = new List(); sexTypes = sexTypeRepository.GetList(); //查询出所有证件类型 - List passPortTypes = new List(); + List passPortTypes = new List(); passPortTypes = passPortTypeRepository.GetList(); //查询出所有客户类型 List custoTypes = new List(); custoTypes = custoTypeRepository.GetList(); //查询出所有客户信息 - List custos = new List(); + List custos = new List(); - if (!custo.CustoNo.IsNullOrEmpty()) + if (!custo.CustomerNumber.IsNullOrEmpty()) { - where = where.And(a => a.CustoNo.Equals(custo.CustoNo)); + where = where.And(a => a.CustomerNumber.Equals(custo.CustomerNumber)); } - if (!custo.CustoName.IsNullOrEmpty()) + if (!custo.CustomerName.IsNullOrEmpty()) { - where = where.And(a => a.CustoName.Contains(custo.CustoName)); + where = where.And(a => a.CustomerName.Contains(custo.CustomerName)); } - if (!custo.CustoTel.IsNullOrEmpty()) + if (!custo.CustomerPhoneNumber.IsNullOrEmpty()) { - where = where.And(a => a.CustoTel.Contains(custo.CustoTel)); + where = where.And(a => a.CustomerPhoneNumber.Contains(custo.CustomerPhoneNumber)); } - if (!custo.CustoAddress.IsNullOrEmpty()) + if (!custo.CustomerAddress.IsNullOrEmpty()) { - where = where.And(a => a.CustoAddress.Contains(custo.CustoAddress)); + where = where.And(a => a.CustomerAddress.Contains(custo.CustomerAddress)); } - if (!custo.CustoID.IsNullOrEmpty()) + if (!custo.PassportID.IsNullOrEmpty()) { - where = where.And(a => a.CustoID.Contains(custo.CustoID)); + where = where.And(a => a.PassportID.Contains(custo.PassportID)); } if (!custo.IsDelete.IsNullOrEmpty()) { @@ -320,7 +320,7 @@ namespace EOM.TSHotelManagement.Application int totalCount = 0; if (custo.Page != 0 && custo.PageSize != 0) { - customers.listSource = custoRepository.AsQueryable().Where(where.ToExpression()).OrderBy(a => a.CustoNo) + customers.listSource = custoRepository.AsQueryable().Where(where.ToExpression()).OrderBy(a => a.CustomerNumber) .ToPageList((int)custo.Page, (int)custo.PageSize, ref totalCount); customers.total = totalCount; } @@ -330,26 +330,26 @@ namespace EOM.TSHotelManagement.Application try { //解密身份证号码 - var sourceStr = source.CustoID.Contains('·') ? encrypt.Decryption(source.CustoID) : dataProtector.Unprotect(source.CustoID); - source.CustoID = sourceStr; + var sourceStr = source.PassportID.Contains('·') ? encrypt.Decryption(source.PassportID) : dataProtector.Unprotect(source.PassportID); + source.PassportID = sourceStr; //解密联系方式 - var sourceTelStr = source.CustoTel.Contains('·') ? encrypt.Decryption(source.CustoTel) : dataProtector.Unprotect(source.CustoTel); - source.CustoTel = sourceTelStr; + var sourceTelStr = source.CustomerPhoneNumber.Contains('·') ? encrypt.Decryption(source.CustomerPhoneNumber) : dataProtector.Unprotect(source.CustomerPhoneNumber); + source.CustomerPhoneNumber = sourceTelStr; } catch (Exception) { - source.CustoID = source.CustoID; - source.CustoTel = source.CustoTel; + source.PassportID = source.PassportID; + source.CustomerPhoneNumber = source.CustomerPhoneNumber; } //性别类型 - var sexType = sexTypes.FirstOrDefault(a => a.sexId == source.CustoSex); - source.SexName = sexType.sexName.IsNullOrEmpty() ? "" : sexType.sexName; + var sexType = sexTypes.FirstOrDefault(a => a.GenderId == source.CustomerGender); + source.GenderName = sexType.GenderName.IsNullOrEmpty() ? "" : sexType.GenderName; //证件类型 var passPortType = passPortTypes.FirstOrDefault(a => a.PassportId == source.PassportType); - source.PassportName = passPortType.PassportName.IsNullOrEmpty() ? "" : passPortType.PassportName; + source.PassportTypeName = passPortType.PassportName.IsNullOrEmpty() ? "" : passPortType.PassportName; //客户类型 - var custoType = custoTypes.FirstOrDefault(a => a.UserType == source.CustoType); - source.typeName = custoType.TypeName.IsNullOrEmpty() ? "" : custoType.TypeName; + var custoType = custoTypes.FirstOrDefault(a => a.CustomerType == source.CustomerType); + source.CustomerTypeName = custoType.CustomerTypeName.IsNullOrEmpty() ? "" : custoType.CustomerTypeName; }); return customers; @@ -360,44 +360,44 @@ namespace EOM.TSHotelManagement.Application /// 查询指定客户信息 /// /// - public List SelectCustoByInfo(Custo custo) + public List SelectCustoByInfo(Customer custo) { //查询出所有性别类型 - List sexTypes = new List(); + List sexTypes = new List(); sexTypes = sexTypeRepository.GetList(); //查询出所有证件类型 - List passPortTypes = new List(); + List passPortTypes = new List(); passPortTypes = passPortTypeRepository.GetList(); //查询出所有客户类型 List custoTypes = new List(); custoTypes = custoTypeRepository.GetList(); //查询出所有客户信息 - List custos = new List(); - if (!custo.CustoNo.IsNullOrEmpty()) + List custos = new List(); + if (!custo.CustomerNumber.IsNullOrEmpty()) { - custos = custoRepository.GetList(a => a.CustoNo.Contains(custo.CustoNo)).OrderBy(a => a.CustoNo).ToList(); + custos = custoRepository.GetList(a => a.CustomerNumber.Contains(custo.CustomerNumber)).OrderBy(a => a.CustomerNumber).ToList(); } - if (!custo.CustoName.IsNullOrEmpty()) + if (!custo.CustomerName.IsNullOrEmpty()) { - custos = custoRepository.GetList(a => a.CustoName.Contains(custo.CustoName)).OrderBy(a => a.CustoNo).ToList(); + custos = custoRepository.GetList(a => a.CustomerName.Contains(custo.CustomerName)).OrderBy(a => a.CustomerNumber).ToList(); } custos.ForEach(source => { //解密身份证号码 - var sourceStr = source.CustoID.Contains("·") ? encrypt.Decryption(source.CustoID) : source.CustoID; - source.CustoID = sourceStr; + var sourceStr = source.PassportID.Contains("·") ? encrypt.Decryption(source.PassportID) : source.PassportID; + source.PassportID = sourceStr; //解密联系方式 - var sourceTelStr = source.CustoTel.Contains("·") ? encrypt.Decryption(source.CustoTel) : source.CustoTel; - source.CustoTel = sourceTelStr; + var sourceTelStr = source.CustomerPhoneNumber.Contains("·") ? encrypt.Decryption(source.CustomerPhoneNumber) : source.CustomerPhoneNumber; + source.CustomerPhoneNumber = sourceTelStr; //性别类型 - var sexType = sexTypes.FirstOrDefault(a => a.sexId == source.CustoSex); - source.SexName = sexType.sexName.IsNullOrEmpty() ? "" : sexType.sexName; + var sexType = sexTypes.FirstOrDefault(a => a.GenderId == source.CustomerGender); + source.GenderName = sexType.GenderName.IsNullOrEmpty() ? "" : sexType.GenderName; //证件类型 var passPortType = passPortTypes.FirstOrDefault(a => a.PassportId == source.PassportType); - source.PassportName = passPortType.PassportName.IsNullOrEmpty() ? "" : passPortType.PassportName; + source.PassportTypeName = passPortType.PassportName.IsNullOrEmpty() ? "" : passPortType.PassportName; //客户类型 - var custoType = custoTypes.FirstOrDefault(a => a.UserType == source.CustoType); - source.typeName = custoType.TypeName.IsNullOrEmpty() ? "" : custoType.TypeName; + var custoType = custoTypes.FirstOrDefault(a => a.CustomerType == source.CustomerType); + source.CustomerTypeName = custoType.CustomerTypeName.IsNullOrEmpty() ? "" : custoType.CustomerTypeName; }); return custos; } @@ -407,28 +407,28 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public Custo SelectCardInfoByCustoNo(string CustoNo) + public Customer SelectCardInfoByCustoNo(string CustoNo) { - Custo c = custoRepository.GetSingle(a => a.CustoNo.Equals(CustoNo)); + Customer c = custoRepository.GetSingle(a => a.CustomerNumber.Equals(CustoNo)); if (c.IsNullOrEmpty()) { return null; } //性别类型 - var sexType = sexTypeRepository.GetSingle(a => a.sexId == c.CustoSex); - c.SexName = sexType.sexName.IsNullOrEmpty() ? "" : sexType.sexName; + var sexType = sexTypeRepository.GetSingle(a => a.GenderId == c.CustomerGender); + c.GenderName = sexType.GenderName.IsNullOrEmpty() ? "" : sexType.GenderName; //证件类型 var passPortType = passPortTypeRepository.GetSingle(a => a.PassportId == c.PassportType); - c.PassportName = passPortType.PassportName.IsNullOrEmpty() ? "" : passPortType.PassportName; + c.PassportTypeName = passPortType.PassportName.IsNullOrEmpty() ? "" : passPortType.PassportName; //客户类型 - var custoType = custoTypeRepository.GetSingle(a => a.UserType == c.CustoType); - c.typeName = custoType.TypeName.IsNullOrEmpty() ? "" : custoType.TypeName; + var custoType = custoTypeRepository.GetSingle(a => a.CustomerType == c.CustomerType); + c.CustomerTypeName = custoType.CustomerTypeName.IsNullOrEmpty() ? "" : custoType.CustomerTypeName; //解密身份证号码 - var sourceStr = c.CustoID.Contains("·") ? encrypt.Decryption(c.CustoID) : c.CustoID; - c.CustoID = sourceStr; + var sourceStr = c.PassportID.Contains("·") ? encrypt.Decryption(c.PassportID) : c.PassportID; + c.PassportID = sourceStr; //解密联系方式 - var sourceTelStr = c.CustoTel.Contains("·") ? encrypt.Decryption(c.CustoTel) : c.CustoTel; - c.CustoTel = sourceTelStr; + var sourceTelStr = c.CustomerPhoneNumber.Contains("·") ? encrypt.Decryption(c.CustomerPhoneNumber) : c.CustomerPhoneNumber; + c.CustomerPhoneNumber = sourceTelStr; return c; } diff --git a/EOM.TSHotelManagement.Application/Business/Customer/ICustoService.cs b/EOM.TSHotelManagement.Application/Business/Customer/ICustoService.cs index 2afc742..6b7a2f7 100644 --- a/EOM.TSHotelManagement.Application/Business/Customer/ICustoService.cs +++ b/EOM.TSHotelManagement.Application/Business/Customer/ICustoService.cs @@ -35,21 +35,21 @@ namespace EOM.TSHotelManagement.Application /// /// /// - bool InsertCustomerInfo(Custo custo); + bool InsertCustomerInfo(Customer custo); /// /// 更新客户信息 /// /// /// - bool UpdCustomerInfo(Custo custo); + bool UpdCustomerInfo(Customer custo); /// /// 删除客户信息 /// /// /// - bool DelCustomerInfo(Custo custo); + bool DelCustomerInfo(Customer custo); /// /// 更新客户类型(即会员等级) @@ -69,26 +69,26 @@ namespace EOM.TSHotelManagement.Application /// 查询所有客户信息 /// /// - OSelectAllDto SelectCustoAll(int? pageIndex, int? pageSize, bool onlyVip = false); + OSelectAllDto SelectCustoAll(int? pageIndex, int? pageSize, bool onlyVip = false); /// /// 查询所有客户信息 /// /// - OSelectAllDto SelectCustomers(Custo custo); + OSelectAllDto SelectCustomers(Customer custo); /// /// 查询指定客户信息 /// /// - List SelectCustoByInfo(Custo custo); + List SelectCustoByInfo(Customer custo); /// /// 根据客户编号查询客户信息 /// /// /// - Custo SelectCardInfoByCustoNo(string CustoNo); + Customer SelectCardInfoByCustoNo(string CustoNo); } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Application/Business/Fonts/FontsService.cs b/EOM.TSHotelManagement.Application/Business/Fonts/FontsService.cs index e872c9c..cab64de 100644 --- a/EOM.TSHotelManagement.Application/Business/Fonts/FontsService.cs +++ b/EOM.TSHotelManagement.Application/Business/Fonts/FontsService.cs @@ -34,13 +34,13 @@ namespace EOM.TSHotelManagement.Application /// /// 跑马灯 /// - private readonly GenericRepository fontsRepository; + private readonly GenericRepository fontsRepository; /// /// /// /// - public FontsService(GenericRepository fontsRepository) + public FontsService(GenericRepository fontsRepository) { this.fontsRepository = fontsRepository; } @@ -49,9 +49,9 @@ namespace EOM.TSHotelManagement.Application /// 查询所有宣传联动内容(跑马灯) /// /// - public List SelectFontAll() + public List SelectFontAll() { - List fonts = new List(); + List fonts = new List(); fonts = fontsRepository.GetList(); return fonts; } diff --git a/EOM.TSHotelManagement.Application/Business/Fonts/IFontsService.cs b/EOM.TSHotelManagement.Application/Business/Fonts/IFontsService.cs index e6a2146..8d0aac8 100644 --- a/EOM.TSHotelManagement.Application/Business/Fonts/IFontsService.cs +++ b/EOM.TSHotelManagement.Application/Business/Fonts/IFontsService.cs @@ -34,6 +34,6 @@ namespace EOM.TSHotelManagement.Application /// 查询所有宣传联动内容(跑马灯) /// /// - List SelectFontAll(); + List SelectFontAll(); } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Application/Business/Hydroelectricity/HydroelectricityService.cs b/EOM.TSHotelManagement.Application/Business/Hydroelectricity/HydroelectricityService.cs index 517f3a9..a0f1156 100644 --- a/EOM.TSHotelManagement.Application/Business/Hydroelectricity/HydroelectricityService.cs +++ b/EOM.TSHotelManagement.Application/Business/Hydroelectricity/HydroelectricityService.cs @@ -66,12 +66,12 @@ namespace EOM.TSHotelManagement.Application if (!string.IsNullOrEmpty(roomNo)) { - where = where.And(a => a.RoomNo.Equals(roomNo)); + where = where.And(a => a.RoomNumber.Equals(roomNo)); } if (useDate.HasValue) { - where = where.And(a => a.UseDate >= useDate.Value); + where = where.And(a => a.StartDate >= useDate.Value); } if (endDate.HasValue) @@ -107,15 +107,15 @@ namespace EOM.TSHotelManagement.Application { return wtiRepository.Update(a => new Hydroelectricity() { - UseDate = w.UseDate, + StartDate = w.StartDate, EndDate = w.EndDate, - WaterUse = w.WaterUse, - PowerUse = w.PowerUse, - Record = w.Record, - CustoNo = w.CustoNo, + WaterUsage = w.WaterUsage, + PowerUsage = w.PowerUsage, + Recorder = w.Recorder, + CustomerNumber = w.CustomerNumber, DataChgUsr = w.DataChgUsr, - RoomNo = w.RoomNo - }, a => a.WtiNo == w.WtiNo); + RoomNumber = w.RoomNumber + }, a => a.InformationId == w.InformationId); } #endregion @@ -129,7 +129,7 @@ namespace EOM.TSHotelManagement.Application return wtiRepository.Update(a => new Hydroelectricity() { IsDelete = 1 - }, a => a.WtiNo == hydroelectricity.WtiNo); + }, a => a.InformationId == hydroelectricity.InformationId); } #endregion } diff --git a/EOM.TSHotelManagement.Application/Business/Reser/ReserService.cs b/EOM.TSHotelManagement.Application/Business/Reser/ReserService.cs index 3b7be81..bc30d35 100644 --- a/EOM.TSHotelManagement.Application/Business/Reser/ReserService.cs +++ b/EOM.TSHotelManagement.Application/Business/Reser/ReserService.cs @@ -64,8 +64,8 @@ namespace EOM.TSHotelManagement.Application rss.ForEach(source => { //解密联系方式 - var sourceTelStr = source.CustoTel.Contains("·") ? encrypt.Decryption(source.CustoTel) : source.CustoTel; - source.CustoTel = sourceTelStr; + var sourceTelStr = source.ReservationPhoneNumber.Contains("·") ? encrypt.Decryption(source.ReservationPhoneNumber) : source.ReservationPhoneNumber; + source.ReservationPhoneNumber = sourceTelStr; }); return rss; } @@ -78,10 +78,10 @@ namespace EOM.TSHotelManagement.Application public Reser SelectReserInfoByRoomNo(string no) { Reser res = null; - res = reserRepository.GetSingle(a => a.ReserRoom == no && a.IsDelete != 1); + res = reserRepository.GetSingle(a => a.ReservationRoomNumber == no && a.IsDelete != 1); //解密联系方式 - var sourceTelStr = res.CustoTel.Contains("·") ? encrypt.Decryption(res.CustoTel) : res.CustoTel; - res.CustoTel = sourceTelStr; + var sourceTelStr = res.ReservationPhoneNumber.Contains("·") ? encrypt.Decryption(res.ReservationPhoneNumber) : res.ReservationPhoneNumber; + res.ReservationPhoneNumber = sourceTelStr; return res; } @@ -96,7 +96,7 @@ namespace EOM.TSHotelManagement.Application { IsDelete = 1, DataChgUsr = string.Empty - }, a => a.ReserId == reser.ReserId); + }, a => a.ReservationId == reser.ReservationId); } @@ -107,8 +107,8 @@ namespace EOM.TSHotelManagement.Application /// public bool InserReserInfo(Reser r) { - var cryStr = encrypt.Encryption(r.CustoTel, EncryptionLevel.Enhanced); - r.CustoTel = cryStr; + var cryStr = encrypt.Encryption(r.ReservationPhoneNumber, EncryptionLevel.Enhanced); + r.ReservationPhoneNumber = cryStr; return reserRepository.Insert(r); } diff --git a/EOM.TSHotelManagement.Application/Business/Room/RoomService.cs b/EOM.TSHotelManagement.Application/Business/Room/RoomService.cs index fce77bc..a1e1e3a 100644 --- a/EOM.TSHotelManagement.Application/Business/Room/RoomService.cs +++ b/EOM.TSHotelManagement.Application/Business/Room/RoomService.cs @@ -50,7 +50,7 @@ namespace EOM.TSHotelManagement.Application /// /// 客户信息 /// - private readonly GenericRepository custoRepository; + private readonly GenericRepository custoRepository; /// /// @@ -59,7 +59,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public RoomService(GenericRepository roomRepository, GenericRepository roomStateRepository, GenericRepository roomTypeRepository, GenericRepository custoRepository) + public RoomService(GenericRepository roomRepository, GenericRepository roomStateRepository, GenericRepository roomTypeRepository, GenericRepository custoRepository) { this.roomRepository = roomRepository; this.roomStateRepository = roomStateRepository; @@ -80,13 +80,13 @@ namespace EOM.TSHotelManagement.Application List roomTypes = new List(); roomTypes = roomTypeRepository.GetList(a => a.IsDelete != 1); List rooms = new List(); - rooms = roomRepository.GetList(a => a.IsDelete != 1 && a.RoomStateId == stateid).OrderBy(a => a.RoomNo).ToList(); + rooms = roomRepository.GetList(a => a.IsDelete != 1 && a.RoomStateId == stateid).OrderBy(a => a.RoomNumber).ToList(); rooms.ForEach(source => { var roomState = roomStates.FirstOrDefault(a => a.RoomStateId == source.RoomStateId); source.RoomState = roomState.RoomStateName.IsNullOrEmpty() ? "" : roomState.RoomStateName; - var roomType = roomTypes.FirstOrDefault(a => a.Roomtype == source.RoomType); - source.RoomName = roomType.RoomName.IsNullOrEmpty() ? "" : roomType.RoomName; + var roomType = roomTypes.FirstOrDefault(a => a.RoomTypeId == source.RoomType); + source.RoomName = roomType.RoomTypeName.IsNullOrEmpty() ? "" : roomType.RoomTypeName; }); return rooms; } @@ -104,13 +104,13 @@ namespace EOM.TSHotelManagement.Application List roomTypes = new List(); roomTypes = roomTypeRepository.GetList(); List rooms = new List(); - rooms = roomRepository.GetList(a => a.IsDelete != 1 && a.RoomStateId == 0).OrderBy(a => a.RoomNo).ToList(); + rooms = roomRepository.GetList(a => a.IsDelete != 1 && a.RoomStateId == 0).OrderBy(a => a.RoomNumber).ToList(); rooms.ForEach(source => { var roomState = roomStates.FirstOrDefault(a => a.RoomStateId == source.RoomStateId); source.RoomState = roomState.RoomStateName.IsNullOrEmpty() ? "" : roomState.RoomStateName; - var roomType = roomTypes.FirstOrDefault(a => a.Roomtype == source.RoomType); - source.RoomName = roomType.RoomName.IsNullOrEmpty() ? "" : roomType.RoomName; + var roomType = roomTypes.FirstOrDefault(a => a.RoomTypeId == source.RoomType); + source.RoomName = roomType.RoomTypeName.IsNullOrEmpty() ? "" : roomType.RoomTypeName; }); return rooms; } @@ -128,23 +128,23 @@ namespace EOM.TSHotelManagement.Application List roomTypes = new List(); roomTypes = roomTypeRepository.GetList(); List rooms = new List(); - rooms = roomRepository.GetList(a => a.IsDelete != 1).OrderBy(a => a.RoomNo).ToList(); - var listCustoNo = rooms.Select(a => a.CustoNo).Distinct().ToList(); - List custos = new List(); - custos = custoRepository.GetList(a => listCustoNo.Contains(a.CustoNo)); + rooms = roomRepository.GetList(a => a.IsDelete != 1).OrderBy(a => a.RoomNumber).ToList(); + var listCustoNo = rooms.Select(a => a.CustomerNumber).Distinct().ToList(); + List custos = new List(); + custos = custoRepository.GetList(a => listCustoNo.Contains(a.CustomerNumber)); rooms.ForEach(source => { var roomState = roomStates.FirstOrDefault(a => a.RoomStateId == source.RoomStateId); source.RoomState = roomState.RoomStateName.IsNullOrEmpty() ? "" : roomState.RoomStateName; - var roomType = roomTypes.FirstOrDefault(a => a.Roomtype == source.RoomType); - source.RoomName = roomType.RoomName.IsNullOrEmpty() ? "" : roomType.RoomName; + var roomType = roomTypes.FirstOrDefault(a => a.RoomTypeId == source.RoomType); + source.RoomName = roomType.RoomTypeName.IsNullOrEmpty() ? "" : roomType.RoomTypeName; - var custo = custos.FirstOrDefault(a => a.CustoNo.Equals(source.CustoNo)); - source.CustoName = custo.IsNullOrEmpty() ? "" : custo.CustoName; + var custo = custos.FirstOrDefault(a => a.CustomerNumber.Equals(source.CustomerNumber)); + source.CustomerName = custo.IsNullOrEmpty() ? "" : custo.CustomerName; //把入住时间格式化 - source.CheckTimeFormat = (source.CheckTime + "").IsNullOrEmpty() ? "" - : Convert.ToDateTime(source.CheckTime).ToString("yyyy-MM-dd HH:mm"); + source.LastCheckInTimeFormatted = (source.LastCheckInTime + "").IsNullOrEmpty() ? "" + : Convert.ToDateTime(source.LastCheckInTime).ToString("yyyy-MM-dd HH:mm"); }); return rooms; @@ -161,22 +161,22 @@ namespace EOM.TSHotelManagement.Application List roomStates = new List(); roomStates = roomStateRepository.GetList(a => a.IsDelete != 1); List roomTypes = new List(); - roomTypes = roomTypeRepository.GetList(a => a.IsDelete != 1 && a.RoomName == TypeName); - var listTypes = roomTypes.Select(a => a.Roomtype).Distinct().ToList(); + roomTypes = roomTypeRepository.GetList(a => a.IsDelete != 1 && a.RoomTypeName == TypeName); + var listTypes = roomTypes.Select(a => a.RoomTypeId).Distinct().ToList(); List rooms = new List(); - rooms = roomRepository.GetList(a => a.IsDelete != 1 && listTypes.Contains(a.RoomType)).OrderBy(a => a.RoomNo).ToList(); - var listCustoNo = rooms.Select(a => a.CustoNo).Distinct().ToList(); - List custos = new List(); - custos = custoRepository.GetList(a => listCustoNo.Contains(a.CustoNo)); + rooms = roomRepository.GetList(a => a.IsDelete != 1 && listTypes.Contains(a.RoomType)).OrderBy(a => a.RoomNumber).ToList(); + var listCustoNo = rooms.Select(a => a.CustomerNumber).Distinct().ToList(); + List custos = new List(); + custos = custoRepository.GetList(a => listCustoNo.Contains(a.CustomerNumber)); rooms.ForEach(source => { var roomState = roomStates.FirstOrDefault(a => a.RoomStateId == source.RoomStateId); source.RoomState = roomState.RoomStateName.IsNullOrEmpty() ? "" : roomState.RoomStateName; - var roomType = roomTypes.FirstOrDefault(a => a.Roomtype == source.RoomType); - source.RoomName = roomType.RoomName.IsNullOrEmpty() ? "" : roomType.RoomName; + var roomType = roomTypes.FirstOrDefault(a => a.RoomTypeId == source.RoomType); + source.RoomName = roomType.RoomTypeName.IsNullOrEmpty() ? "" : roomType.RoomTypeName; - var custo = custos.FirstOrDefault(a => a.CustoNo.Equals(source.CustoNo)); - source.CustoName = custo.IsNullOrEmpty() ? "" : custo.CustoName; + var custo = custos.FirstOrDefault(a => a.CustomerNumber.Equals(source.CustomerNumber)); + source.CustomerName = custo.IsNullOrEmpty() ? "" : custo.CustomerName; }); return rooms; @@ -194,13 +194,13 @@ namespace EOM.TSHotelManagement.Application List roomStates = new List(); roomStates = roomStateRepository.GetList(a => a.IsDelete != 1); Room room = new Room(); - room = roomRepository.GetSingle(a => a.IsDelete != 1 && a.RoomNo == no); + room = roomRepository.GetSingle(a => a.IsDelete != 1 && a.RoomNumber == no); if (!room.IsNullOrEmpty()) { var roomSate = roomStates.FirstOrDefault(a => a.RoomStateId == room.RoomStateId); room.RoomState = roomSate.RoomStateName.IsNullOrEmpty() ? "" : roomSate.RoomStateName; - var roomType = roomTypeRepository.GetSingle(a => a.Roomtype == room.RoomType); - room.RoomName = roomType.RoomName.IsNullOrEmpty() ? "" : roomType.RoomName; + var roomType = roomTypeRepository.GetSingle(a => a.RoomTypeId == room.RoomType); + room.RoomName = roomType.RoomTypeName.IsNullOrEmpty() ? "" : roomType.RoomTypeName; } else { @@ -221,11 +221,11 @@ namespace EOM.TSHotelManagement.Application { return roomRepository.Update(a => new Room() { - CustoNo = null, - CheckTime = null, - CheckOutTime = DateTime.Now, + CustomerNumber = null, + LastCheckInTime = null, + LastCheckOutTime = DateTime.Now, RoomStateId = 3 - }, a => a.RoomNo == room); + }, a => a.RoomNumber == room); } #endregion @@ -237,7 +237,7 @@ namespace EOM.TSHotelManagement.Application /// public object DayByRoomNo(string roomno) { - return Math.Abs(((TimeSpan)(roomRepository.GetSingle(a => a.RoomNo == roomno).CheckTime - DateTime.Now)).Days); + return Math.Abs(((TimeSpan)(roomRepository.GetSingle(a => a.RoomNumber == roomno).LastCheckInTime - DateTime.Now)).Days); } #endregion @@ -251,10 +251,10 @@ namespace EOM.TSHotelManagement.Application { return roomRepository.Update(a => new Room() { - CheckTime = r.CheckTime, + LastCheckInTime = r.LastCheckInTime, RoomStateId = r.RoomStateId, - CustoNo = r.CustoNo - }, a => a.RoomNo == r.RoomNo); + CustomerNumber = r.CustomerNumber + }, a => a.RoomNumber == r.RoomNumber); } #endregion @@ -270,7 +270,7 @@ namespace EOM.TSHotelManagement.Application { RoomStateId = r.RoomStateId, DataChgUsr = r.DataChgUsr - }, a => a.RoomNo == r.RoomNo); + }, a => a.RoomNumber == r.RoomNumber); } #endregion @@ -281,7 +281,7 @@ namespace EOM.TSHotelManagement.Application /// public object SelectCanUseRoomAllByRoomState() { - return roomRepository.GetList(a => a.RoomStateId == 0 && a.IsDelete != 1).OrderBy(a => a.RoomNo).Count(); + return roomRepository.GetList(a => a.RoomStateId == 0 && a.IsDelete != 1).OrderBy(a => a.RoomNumber).Count(); } #endregion @@ -292,7 +292,7 @@ namespace EOM.TSHotelManagement.Application /// public object SelectNotUseRoomAllByRoomState() { - return roomRepository.GetList(a => a.RoomStateId == 1 && a.IsDelete != 1).OrderBy(a => a.RoomNo).Count(); + return roomRepository.GetList(a => a.RoomStateId == 1 && a.IsDelete != 1).OrderBy(a => a.RoomNumber).Count(); } #endregion @@ -303,7 +303,7 @@ namespace EOM.TSHotelManagement.Application /// public object SelectRoomByRoomPrice(string r) { - return roomRepository.GetSingle(a => a.RoomNo == r).RoomMoney; + return roomRepository.GetSingle(a => a.RoomNumber == r).RoomRent; } #endregion @@ -314,7 +314,7 @@ namespace EOM.TSHotelManagement.Application /// public object SelectNotClearRoomAllByRoomState() { - return roomRepository.GetList(a => a.RoomStateId == 3 && a.IsDelete != 1).OrderBy(a => a.RoomNo).Count(); + return roomRepository.GetList(a => a.RoomStateId == 3 && a.IsDelete != 1).OrderBy(a => a.RoomNumber).Count(); } #endregion @@ -325,7 +325,7 @@ namespace EOM.TSHotelManagement.Application /// public object SelectFixingRoomAllByRoomState() { - return roomRepository.GetList(a => a.RoomStateId == 2 && a.IsDelete != 1).OrderBy(a => a.RoomNo).Count(); + return roomRepository.GetList(a => a.RoomStateId == 2 && a.IsDelete != 1).OrderBy(a => a.RoomNumber).Count(); } #endregion @@ -336,7 +336,7 @@ namespace EOM.TSHotelManagement.Application /// public object SelectReseredRoomAllByRoomState() { - return roomRepository.GetList(a => a.RoomStateId == 4 && a.IsDelete != 1).OrderBy(a => a.RoomNo).Count(); + return roomRepository.GetList(a => a.RoomStateId == 4 && a.IsDelete != 1).OrderBy(a => a.RoomNumber).Count(); } #endregion @@ -352,7 +352,7 @@ namespace EOM.TSHotelManagement.Application return roomRepository.Update(a => new Room() { RoomStateId = stateid - }, a => a.RoomNo == roomno); + }, a => a.RoomNumber == roomno); } #endregion @@ -366,7 +366,7 @@ namespace EOM.TSHotelManagement.Application { try { - var isExist = roomRepository.IsAny(a => a.RoomNo == rn.RoomNo); + var isExist = roomRepository.IsAny(a => a.RoomNumber == rn.RoomNumber); if (isExist) return false; return roomRepository.Insert(rn); @@ -388,7 +388,7 @@ namespace EOM.TSHotelManagement.Application { try { - var isExist = roomRepository.IsAny(a => a.RoomNo == rn.RoomNo); + var isExist = roomRepository.IsAny(a => a.RoomNumber == rn.RoomNumber); if (!isExist) return false; return roomRepository.Update(rn); @@ -410,7 +410,7 @@ namespace EOM.TSHotelManagement.Application { try { - var isExist = roomRepository.IsAny(a => a.RoomNo == rn.RoomNo); + var isExist = roomRepository.IsAny(a => a.RoomNumber == rn.RoomNumber); if (!isExist) return false; rn.IsDelete = 1; @@ -437,13 +437,13 @@ namespace EOM.TSHotelManagement.Application List roomTypes = new List(); roomTypes = roomTypeRepository.GetList(a => a.IsDelete != 1); List rooms = new List(); - rooms = roomRepository.GetList(a => a.IsDelete != 1 && a.RoomStateId == 1).OrderBy(a => a.RoomNo).ToList(); + rooms = roomRepository.GetList(a => a.IsDelete != 1 && a.RoomStateId == 1).OrderBy(a => a.RoomNumber).ToList(); rooms.ForEach(source => { var roomState = roomStates.FirstOrDefault(a => a.RoomStateId == source.RoomStateId); source.RoomState = roomState.RoomStateName.IsNullOrEmpty() ? "" : roomState.RoomStateName; - var roomType = roomTypes.FirstOrDefault(a => a.Roomtype == source.RoomType); - source.RoomName = roomType.RoomName.IsNullOrEmpty() ? "" : roomType.RoomName; + var roomType = roomTypes.FirstOrDefault(a => a.RoomTypeId == source.RoomType); + source.RoomName = roomType.RoomTypeName.IsNullOrEmpty() ? "" : roomType.RoomTypeName; }); return rooms; } @@ -470,7 +470,7 @@ namespace EOM.TSHotelManagement.Application /// public object SelectRoomStateIdByRoomNo(string roomno) { - return roomRepository.GetSingle(a => a.RoomNo == roomno).RoomStateId; + return roomRepository.GetSingle(a => a.RoomNumber == roomno).RoomStateId; } #endregion } diff --git a/EOM.TSHotelManagement.Application/Business/Room/RoomTypeService.cs b/EOM.TSHotelManagement.Application/Business/Room/RoomTypeService.cs index 4d8531a..f973046 100644 --- a/EOM.TSHotelManagement.Application/Business/Room/RoomTypeService.cs +++ b/EOM.TSHotelManagement.Application/Business/Room/RoomTypeService.cs @@ -69,7 +69,7 @@ namespace EOM.TSHotelManagement.Application types = roomTypeRepository.GetList(); types.ForEach(t => { - t.DeleteMkNm = t.IsDelete == 0 ? "否" : "是"; + t.DeleteMarkDescription = t.IsDelete == 0 ? "否" : "是"; }); return types; } @@ -85,8 +85,8 @@ namespace EOM.TSHotelManagement.Application { RoomType roomtype = new RoomType(); Room room = new Room(); - room = roomRepository.GetSingle(a => a.RoomNo == no && a.IsDelete != 1); - roomtype.RoomName = roomTypeRepository.GetSingle(a => a.Roomtype == room.RoomType).RoomName; + room = roomRepository.GetSingle(a => a.RoomNumber == no && a.IsDelete != 1); + roomtype.RoomTypeName = roomTypeRepository.GetSingle(a => a.RoomTypeId == room.RoomType).RoomTypeName; return roomtype; } #endregion @@ -98,7 +98,7 @@ namespace EOM.TSHotelManagement.Application /// public RoomType SelectRoomTypeByType(int roomTypeId) { - var roomType = roomTypeRepository.GetSingle(a => a.Roomtype == roomTypeId); + var roomType = roomTypeRepository.GetSingle(a => a.RoomTypeId == roomTypeId); return roomType; } @@ -109,7 +109,7 @@ namespace EOM.TSHotelManagement.Application /// public bool InsertRoomType(RoomType roomType) { - var existRoomType = roomTypeRepository.IsAny(a => a.Roomtype == roomType.Roomtype); + var existRoomType = roomTypeRepository.IsAny(a => a.RoomTypeId == roomType.RoomTypeId); if (existRoomType) return false; return roomTypeRepository.Insert(roomType); @@ -124,13 +124,13 @@ namespace EOM.TSHotelManagement.Application { return roomTypeRepository.Update(a => new RoomType { - RoomName = roomType.RoomName, + RoomTypeName = roomType.RoomTypeName, RoomRent = roomType.RoomRent, RoomDeposit = roomType.RoomDeposit, IsDelete = roomType.IsDelete, DataChgUsr = roomType.DataChgUsr, DataChgDate = roomType.DataChgDate - }, a => a.Roomtype == roomType.Roomtype); + }, a => a.RoomTypeId == roomType.RoomTypeId); } /// @@ -143,7 +143,7 @@ namespace EOM.TSHotelManagement.Application return roomTypeRepository.Update(a => new RoomType { IsDelete = 1 - }, a => a.Roomtype == roomType.Roomtype); + }, a => a.RoomTypeId == roomType.RoomTypeId); } } } diff --git a/EOM.TSHotelManagement.Application/Business/Sellthing/SellService.cs b/EOM.TSHotelManagement.Application/Business/Sellthing/SellService.cs index cb1038b..32dd29f 100644 --- a/EOM.TSHotelManagement.Application/Business/Sellthing/SellService.cs +++ b/EOM.TSHotelManagement.Application/Business/Sellthing/SellService.cs @@ -68,25 +68,25 @@ namespace EOM.TSHotelManagement.Application sellThings = sellThingRepository.GetList(exp.ToExpression()); sellThings.ForEach(_sellThing => { - _sellThing.SellPriceStr = Decimal.Parse(_sellThing.SellPrice.ToString()).ToString("#,##0.00").ToString(); + _sellThing.ProductPriceFormatted = Decimal.Parse(_sellThing.ProductPrice.ToString()).ToString("#,##0.00").ToString(); }); } else { //商品编号 - if (!sellThing.SellNo.IsNullOrEmpty()) + if (!sellThing.ProductNumber.IsNullOrEmpty()) { - exp = exp.And(a => a.SellNo.Contains(sellThing.SellNo)); + exp = exp.And(a => a.ProductNumber.Contains(sellThing.ProductNumber)); } //商品名称 - if (!sellThing.SellName.IsNullOrEmpty()) + if (!sellThing.ProductName.IsNullOrEmpty()) { - exp = exp.Or(a => a.SellName.Contains(sellThing.SellName)); + exp = exp.Or(a => a.ProductName.Contains(sellThing.ProductName)); } sellThings = sellThingRepository.GetList(exp.ToExpression()); sellThings.ForEach(_sellThing => { - _sellThing.SellPriceStr = Decimal.Parse(_sellThing.SellPrice.ToString()).ToString("#,##0.00").ToString(); + _sellThing.ProductPriceFormatted = Decimal.Parse(_sellThing.ProductPrice.ToString()).ToString("#,##0.00").ToString(); }); } return sellThings; @@ -105,25 +105,25 @@ namespace EOM.TSHotelManagement.Application sellThings = sellThingRepository.GetList(exp.ToExpression()); sellThings.ForEach(_sellThing => { - _sellThing.SellPriceStr = Decimal.Parse(_sellThing.SellPrice.ToString()).ToString("#,##0.00").ToString(); + _sellThing.ProductPriceFormatted = Decimal.Parse(_sellThing.ProductPrice.ToString()).ToString("#,##0.00").ToString(); }); } else { //商品编号 - if (!sellThing.SellNo.IsNullOrEmpty()) + if (!sellThing.ProductNumber.IsNullOrEmpty()) { - exp = exp.And(a => a.SellNo.Contains(sellThing.SellNo)); + exp = exp.And(a => a.ProductNumber.Contains(sellThing.ProductNumber)); } //商品名称 - if (!sellThing.SellName.IsNullOrEmpty()) + if (!sellThing.ProductName.IsNullOrEmpty()) { - exp = exp.Or(a => a.SellName.Contains(sellThing.SellName)); + exp = exp.Or(a => a.ProductName.Contains(sellThing.ProductName)); } sellThings = sellThingRepository.GetList(exp.ToExpression()); sellThings.ForEach(_sellThing => { - _sellThing.SellPriceStr = Decimal.Parse(_sellThing.SellPrice.ToString()).ToString("#,##0.00").ToString(); + _sellThing.ProductPriceFormatted = Decimal.Parse(_sellThing.ProductPrice.ToString()).ToString("#,##0.00").ToString(); }); } return sellThings; @@ -141,7 +141,7 @@ namespace EOM.TSHotelManagement.Application { Stock = Convert.ToInt32(stock), DataChgDate = DateTime.Now - }, a => a.SellNo == sellNo); + }, a => a.ProductNumber == sellNo); } /// @@ -153,11 +153,11 @@ namespace EOM.TSHotelManagement.Application { return sellThingRepository.Update(a => new SellThing() { - SellName = sellThing.SellName, - SellPrice = sellThing.SellPrice, + ProductName = sellThing.ProductName, + ProductPrice = sellThing.ProductPrice, Stock = sellThing.Stock, - format = sellThing.format, - }, a => a.SellNo == sellThing.SellNo); + Specification = sellThing.Specification, + }, a => a.ProductNumber == sellThing.ProductNumber); } /// @@ -172,8 +172,8 @@ namespace EOM.TSHotelManagement.Application return spendRepository.Update(a => new Spend() { IsDelete = 1, - }, a => a.MoneyState.Equals(SpendConsts.UnSettle) && a.RoomNo == roomNo && a.CustoNo == custoNo - && a.SpendName == sellName); + }, a => a.SettlementStatus.Equals(SpendConsts.UnSettle) && a.RoomNumber == roomNo && a.CustomerNumber == custoNo + && a.ProductName == sellName); } @@ -187,7 +187,7 @@ namespace EOM.TSHotelManagement.Application return sellThingRepository.Update(a => new SellThing() { IsDelete = 1 - }, a => a.SellNo == sellNo); + }, a => a.ProductNumber == sellNo); } /// @@ -199,7 +199,7 @@ namespace EOM.TSHotelManagement.Application public SellThing SelectSellThingByNameAndPrice(string name, string price) { SellThing sellThing = null; - sellThing = sellThingRepository.GetSingle(a => a.SellName == name && a.SellPrice == Convert.ToDecimal(price)); + sellThing = sellThingRepository.GetSingle(a => a.ProductNumber == name && a.ProductPrice == Convert.ToDecimal(price)); return sellThing; } @@ -212,7 +212,7 @@ namespace EOM.TSHotelManagement.Application public SellThing SelectSellInfoBySellNo(string SellNo) { SellThing st = null; - st = sellThingRepository.GetSingle(a => a.SellNo == SellNo && a.IsDelete != 1); + st = sellThingRepository.GetSingle(a => a.ProductNumber == SellNo && a.IsDelete != 1); return st; } diff --git a/EOM.TSHotelManagement.Application/Business/Spend/SpendService.cs b/EOM.TSHotelManagement.Application/Business/Spend/SpendService.cs index 1b3f52a..f8c1d38 100644 --- a/EOM.TSHotelManagement.Application/Business/Spend/SpendService.cs +++ b/EOM.TSHotelManagement.Application/Business/Spend/SpendService.cs @@ -68,17 +68,17 @@ namespace EOM.TSHotelManagement.Application public List SelectSpendByCustoNo(string No) { List ls = new List(); - ls = spendRepository.GetList(a => a.CustoNo == No && a.MoneyState.Equals(SpendConsts.UnSettle) && a.IsDelete != 1); + ls = spendRepository.GetList(a => a.CustomerNumber == No && a.SettlementStatus.Equals(SpendConsts.UnSettle) && a.IsDelete != 1); ls.ForEach(source => { - source.SpendStateNm = source.MoneyState.IsNullOrEmpty() ? "" - : source.MoneyState.Equals(SpendConsts.Settled) ? "已结算" : "未结算"; + source.SettlementStatusDescription = source.SettlementStatus.IsNullOrEmpty() ? "" + : source.SettlementStatus.Equals(SpendConsts.Settled) ? "已结算" : "未结算"; - source.SpendPriceStr = (source.SpendPrice + "").IsNullOrEmpty() ? "" - : Decimal.Parse(source.SpendPrice.ToString()).ToString("#,##0.00").ToString(); + source.ProductPriceFormatted = (source.ProductPrice + "").IsNullOrEmpty() ? "" + : Decimal.Parse(source.ProductPrice.ToString()).ToString("#,##0.00").ToString(); - source.SpendMoneyStr = (source.SpendMoney + "").IsNullOrEmpty() ? "" - : Decimal.Parse(source.SpendMoney.ToString()).ToString("#,##0.00").ToString(); + source.ConsumptionAmountFormatted = (source.ConsumptionAmount + "").IsNullOrEmpty() ? "" + : Decimal.Parse(source.ConsumptionAmount.ToString()).ToString("#,##0.00").ToString(); }); return ls; } @@ -93,17 +93,17 @@ namespace EOM.TSHotelManagement.Application public List SeletHistorySpendInfoAll(string custoNo) { List ls = new List(); - ls = spendRepository.GetList(a => a.CustoNo == custoNo && a.MoneyState.Equals(SpendConsts.Settled) && a.IsDelete != 1); + ls = spendRepository.GetList(a => a.CustomerNumber == custoNo && a.SettlementStatus.Equals(SpendConsts.Settled) && a.IsDelete != 1); ls.ForEach(source => { - source.SpendStateNm = source.MoneyState.IsNullOrEmpty() ? "" - : source.MoneyState.Equals(SpendConsts.Settled) ? "已结算" : "未结算"; + source.SettlementStatusDescription = source.SettlementStatus.IsNullOrEmpty() ? "" + : source.SettlementStatus.Equals(SpendConsts.Settled) ? "已结算" : "未结算"; - source.SpendPriceStr = (source.SpendPrice + "").IsNullOrEmpty() ? "" - : Decimal.Parse(source.SpendPrice.ToString()).ToString("#,##0.00").ToString(); + source.ProductPriceFormatted = (source.ProductPrice + "").IsNullOrEmpty() ? "" + : Decimal.Parse(source.ProductPrice.ToString()).ToString("#,##0.00").ToString(); - source.SpendMoneyStr = (source.SpendMoney + "").IsNullOrEmpty() ? "" - : Decimal.Parse(source.SpendMoney.ToString()).ToString("#,##0.00").ToString(); + source.ConsumptionAmountFormatted = (source.ConsumptionAmount + "").IsNullOrEmpty() ? "" + : Decimal.Parse(source.ConsumptionAmount.ToString()).ToString("#,##0.00").ToString(); }); return ls; } @@ -118,17 +118,17 @@ namespace EOM.TSHotelManagement.Application public List SelectSpendByRoomNo(string No) { List ls = new List(); - ls = spendRepository.GetList(a => a.RoomNo == No && a.MoneyState.Equals(SpendConsts.UnSettle) && a.IsDelete != 1); + ls = spendRepository.GetList(a => a.RoomNumber == No && a.SettlementStatus.Equals(SpendConsts.UnSettle) && a.IsDelete != 1); ls.ForEach(source => { - source.SpendStateNm = source.MoneyState.IsNullOrEmpty() ? "" - : source.MoneyState.Equals(SpendConsts.Settled) ? "已结算" : "未结算"; + source.SettlementStatusDescription = source.SettlementStatus.IsNullOrEmpty() ? "" + : source.SettlementStatus.Equals(SpendConsts.Settled) ? "已结算" : "未结算"; - source.SpendPriceStr = (source.SpendPrice + "").IsNullOrEmpty() ? "" - : Decimal.Parse(source.SpendPrice.ToString()).ToString("#,##0.00").ToString(); + source.ProductPriceFormatted = (source.ProductPrice + "").IsNullOrEmpty() ? "" + : Decimal.Parse(source.ProductPrice.ToString()).ToString("#,##0.00").ToString(); - source.SpendMoneyStr = (source.SpendMoney + "").IsNullOrEmpty() ? "" - : Decimal.Parse(source.SpendMoney.ToString()).ToString("#,##0.00").ToString(); + source.ConsumptionAmountFormatted = (source.ConsumptionAmount + "").IsNullOrEmpty() ? "" + : Decimal.Parse(source.ConsumptionAmount.ToString()).ToString("#,##0.00").ToString(); }); return ls; } @@ -142,17 +142,17 @@ namespace EOM.TSHotelManagement.Application public List SelectSpendInfoAll() { List ls = new List(); - ls = spendRepository.GetList(a => a.IsDelete != 1).OrderByDescending(a => a.SpendTime).ToList(); + ls = spendRepository.GetList(a => a.IsDelete != 1).OrderByDescending(a => a.ConsumptionTime).ToList(); ls.ForEach(source => { - source.SpendStateNm = source.MoneyState.IsNullOrEmpty() ? "" - : source.MoneyState.Equals(SpendConsts.Settled) ? "已结算" : "未结算"; + source.SettlementStatusDescription = source.SettlementStatus.IsNullOrEmpty() ? "" + : source.SettlementStatus.Equals(SpendConsts.Settled) ? "已结算" : "未结算"; - source.SpendPriceStr = (source.SpendPrice + "").IsNullOrEmpty() ? "" - : Decimal.Parse(source.SpendPrice.ToString()).ToString("#,##0.00").ToString(); + source.ProductPriceFormatted = (source.ProductPrice + "").IsNullOrEmpty() ? "" + : Decimal.Parse(source.ProductPrice.ToString()).ToString("#,##0.00").ToString(); - source.SpendMoneyStr = (source.SpendMoney + "").IsNullOrEmpty() ? "" - : Decimal.Parse(source.SpendMoney.ToString()).ToString("#,##0.00").ToString(); + source.ConsumptionAmountFormatted = (source.ConsumptionAmount + "").IsNullOrEmpty() ? "" + : Decimal.Parse(source.ConsumptionAmount.ToString()).ToString("#,##0.00").ToString(); }); return ls; } @@ -166,17 +166,17 @@ namespace EOM.TSHotelManagement.Application public List SelectSpendInfoRoomNo(string RoomNo) { List ls = new List(); - ls = spendRepository.GetList(a => a.RoomNo == RoomNo && a.IsDelete != 1 && a.MoneyState.Equals(SpendConsts.UnSettle)); + ls = spendRepository.GetList(a => a.RoomNumber == RoomNo && a.IsDelete != 1 && a.SettlementStatus.Equals(SpendConsts.UnSettle)); ls.ForEach(source => { - source.SpendStateNm = source.MoneyState.IsNullOrEmpty() ? "" - : source.MoneyState.Equals(SpendConsts.Settled) ? "已结算" : "未结算"; + source.SettlementStatusDescription = source.SettlementStatus.IsNullOrEmpty() ? "" + : source.SettlementStatus.Equals(SpendConsts.Settled) ? "已结算" : "未结算"; - source.SpendPriceStr = (source.SpendPrice + "").IsNullOrEmpty() ? "" - : Decimal.Parse(source.SpendPrice.ToString()).ToString("#,##0.00").ToString(); + source.ProductPriceFormatted = (source.ProductPrice + "").IsNullOrEmpty() ? "" + : Decimal.Parse(source.ProductPrice.ToString()).ToString("#,##0.00").ToString(); - source.SpendMoneyStr = (source.SpendMoney + "").IsNullOrEmpty() ? "" - : Decimal.Parse(source.SpendMoney.ToString()).ToString("#,##0.00").ToString(); + source.ConsumptionAmountFormatted = (source.ConsumptionAmount + "").IsNullOrEmpty() ? "" + : Decimal.Parse(source.ConsumptionAmount.ToString()).ToString("#,##0.00").ToString(); }); return ls; } @@ -191,7 +191,7 @@ namespace EOM.TSHotelManagement.Application /// public object SelectMoneyByRoomNoAndTime(string roomno, string custono) { - return spendRepository.GetList(a => a.RoomNo == roomno && a.CustoNo == custono && a.MoneyState.Equals(SpendConsts.UnSettle)).Sum(a => a.SpendMoney); + return spendRepository.GetList(a => a.RoomNumber == roomno && a.CustomerNumber == custono && a.SettlementStatus.Equals(SpendConsts.UnSettle)).Sum(a => a.ConsumptionAmount); } #endregion @@ -206,8 +206,8 @@ namespace EOM.TSHotelManagement.Application { return spendRepository.Update(a => new Spend() { - MoneyState = SpendConsts.Settled - }, a => a.RoomNo == roomno && a.SpendTime >= Convert.ToDateTime(checktime) && a.SpendTime <= Convert.ToDateTime(DateTime.Now)); + SettlementStatus = SpendConsts.Settled + }, a => a.RoomNumber == roomno && a.ConsumptionTime >= Convert.ToDateTime(checktime) && a.ConsumptionTime <= Convert.ToDateTime(DateTime.Now)); } #endregion @@ -220,15 +220,15 @@ namespace EOM.TSHotelManagement.Application public bool UpdateSpendInfoByRoomNo(Spend spend) { //查询当前用户未结算的数据 - var listSpendId = spendRepository.GetList(a => a.CustoNo.Equals(spend.CustoNo) && a.MoneyState.Equals(SpendConsts.UnSettle)) - .Select(a => a.SpendName).ToList(); /*spends.Select(a => a.SpendName).Distinct().ToList();*/ + var listSpendId = spendRepository.GetList(a => a.CustomerNumber.Equals(spend.CustomerNumber) && a.SettlementStatus.Equals(SpendConsts.UnSettle)) + .Select(a => a.ProductName).ToList(); /*spends.Select(a => a.SpendName).Distinct().ToList();*/ return spendRepository.Update(a => new Spend() { - RoomNo = spend.RoomNo, + RoomNumber = spend.RoomNumber, DataChgUsr = spend.DataChgUsr - }, a => listSpendId.Contains(a.SpendName) && a.CustoNo.Equals(spend.CustoNo) && a.SpendTime >= Convert.ToDateTime(DateTime.Now) - && a.SpendTime <= Convert.ToDateTime(DateTime.Now)); + }, a => listSpendId.Contains(a.ProductName) && a.CustomerNumber.Equals(spend.CustomerNumber) && a.ConsumptionTime >= Convert.ToDateTime(DateTime.Now) + && a.ConsumptionTime <= Convert.ToDateTime(DateTime.Now)); } @@ -243,14 +243,14 @@ namespace EOM.TSHotelManagement.Application { return spendRepository.Update(a => new Spend() { - SpendAmount = spend.SpendAmount, - SpendMoney = spend.SpendMoney, + ConsumptionQuantity = spend.ConsumptionQuantity, + ConsumptionAmount = spend.ConsumptionAmount, DataChgDate = spend.DataChgDate, DataChgUsr = spend.DataChgUsr - }, a => a.MoneyState.Equals(SpendConsts.UnSettle) - && a.RoomNo.Equals(spend.RoomNo) - && a.CustoNo.Equals(spend.CustoNo) - && a.SpendName.Equals(spend.SpendName)); + }, a => a.SettlementStatus.Equals(SpendConsts.UnSettle) + && a.RoomNumber.Equals(spend.RoomNumber) + && a.CustomerNumber.Equals(spend.CustomerNumber) + && a.ProductName.Equals(spend.ProductName)); } } diff --git a/EOM.TSHotelManagement.Application/Util/IUtilService.cs b/EOM.TSHotelManagement.Application/Util/IUtilService.cs index b9fbaf7..bcfa11b 100644 --- a/EOM.TSHotelManagement.Application/Util/IUtilService.cs +++ b/EOM.TSHotelManagement.Application/Util/IUtilService.cs @@ -18,7 +18,7 @@ namespace EOM.TSHotelManagement.Application /// 检测版本号 /// /// - Applicationversion CheckBaseVersion(); + ApplicationVersion CheckBaseVersion(); /// /// 添加操作日志 diff --git a/EOM.TSHotelManagement.Application/Util/UtilService.cs b/EOM.TSHotelManagement.Application/Util/UtilService.cs index 78e373a..6a62f29 100644 --- a/EOM.TSHotelManagement.Application/Util/UtilService.cs +++ b/EOM.TSHotelManagement.Application/Util/UtilService.cs @@ -11,12 +11,12 @@ namespace EOM.TSHotelManagement.Application /// /// 卡片代码 /// - private readonly GenericRepository cardCodesRepository; + private readonly GenericRepository cardCodesRepository; /// /// 应用检测 /// - private readonly GenericRepository applicationRepository; + private readonly GenericRepository applicationRepository; /// /// 操作日志 @@ -29,7 +29,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public UtilService(GenericRepository cardCodesRepository, GenericRepository applicationRepository, GenericRepository operationLogRepository) + public UtilService(GenericRepository cardCodesRepository, GenericRepository applicationRepository, GenericRepository operationLogRepository) { this.cardCodesRepository = cardCodesRepository; this.applicationRepository = applicationRepository; @@ -45,7 +45,7 @@ namespace EOM.TSHotelManagement.Application { var cardid = identityCard.Substring(0, 6).ToString(); var pcd = string.Empty; - var cardcodes = cardCodesRepository.GetSingle(a => a.bm == cardid); + var cardcodes = cardCodesRepository.GetSingle(a => a.AreaCode == cardid); pcd = cardcodes == null ? "" : string.Join(",", cardcodes.Province + cardcodes.City + cardcodes.District); return pcd; } @@ -54,9 +54,9 @@ namespace EOM.TSHotelManagement.Application /// 检测版本号 /// /// - public Applicationversion CheckBaseVersion() + public ApplicationVersion CheckBaseVersion() { - return applicationRepository.GetSingle(a => a.base_versionId == 1); + return applicationRepository.GetSingle(a => a.ApplicationVersionId == 1); } /// @@ -88,7 +88,7 @@ namespace EOM.TSHotelManagement.Application operationLogs.listSource.ForEach(source => { - source.OperationLevelNm = source.OperationLevel == RecordLevel.Normal ? "常规操作" : source.OperationLevel == RecordLevel.Warning ? "敏感操作" : "严重操作"; + source.LogLevelName = source.LogLevel == LogLevel.Normal ? "常规操作" : source.LogLevel == LogLevel.Warning ? "敏感操作" : "严重操作"; }); operationLogs.total = count; diff --git a/EOM.TSHotelManagement.Application/Worker/Check/IWorkerCheckService.cs b/EOM.TSHotelManagement.Application/Worker/Check/IWorkerCheckService.cs index 836bd1f..01f3795 100644 --- a/EOM.TSHotelManagement.Application/Worker/Check/IWorkerCheckService.cs +++ b/EOM.TSHotelManagement.Application/Worker/Check/IWorkerCheckService.cs @@ -35,7 +35,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - List SelectCheckInfoByWorkerNo(string wid); + List SelectCheckInfoByWorkerNo(string wid); /// /// 查询员工签到天数 @@ -56,6 +56,6 @@ namespace EOM.TSHotelManagement.Application /// /// /// - bool AddCheckInfo(WorkerCheck workerCheck); + bool AddCheckInfo(EmployeeCheck workerCheck); } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Application/Worker/Check/WorkerCheckService.cs b/EOM.TSHotelManagement.Application/Worker/Check/WorkerCheckService.cs index 7477742..831ee61 100644 --- a/EOM.TSHotelManagement.Application/Worker/Check/WorkerCheckService.cs +++ b/EOM.TSHotelManagement.Application/Worker/Check/WorkerCheckService.cs @@ -34,13 +34,13 @@ namespace EOM.TSHotelManagement.Application /// /// 员工打卡 /// - private readonly GenericRepository workerCheckRepository; + private readonly GenericRepository workerCheckRepository; /// /// /// /// - public WorkerCheckService(GenericRepository workerCheckRepository) + public WorkerCheckService(GenericRepository workerCheckRepository) { this.workerCheckRepository = workerCheckRepository; } @@ -50,13 +50,13 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public List SelectCheckInfoByWorkerNo(string wid) + public List SelectCheckInfoByWorkerNo(string wid) { - List workerChecks = new List(); - workerChecks = workerCheckRepository.GetList(a => a.WorkerNo == wid && a.IsDelete != 1); + List workerChecks = new List(); + workerChecks = workerCheckRepository.GetList(a => a.EmployeeId == wid && a.IsDelete != 1); workerChecks.ForEach(source => { - source.CheckStateNm = source.CheckState == 0 ? "打卡成功" : "打卡失败"; + source.CheckStatusDescription = source.CheckStatus == 0 ? "打卡成功" : "打卡失败"; }); return workerChecks; } @@ -69,7 +69,7 @@ namespace EOM.TSHotelManagement.Application /// public object SelectWorkerCheckDaySumByWorkerNo(string wkn) { - return workerCheckRepository.GetList(a => a.WorkerNo == wkn && a.IsDelete != 1).Count; + return workerCheckRepository.GetList(a => a.EmployeeId == wkn && a.IsDelete != 1).Count; } @@ -81,7 +81,7 @@ namespace EOM.TSHotelManagement.Application public object SelectToDayCheckInfoByWorkerNo(string wkn) { //string sql = "select Count(*) from WORKERCHECK where WorkerNo = '"+wkn+ "' and DATEDIFF(CURRENT_DATE(),workercheck.CheckTime)"; - var listCheckInfo = workerCheckRepository.GetList(a => a.WorkerNo == wkn && a.IsDelete != 1); + var listCheckInfo = workerCheckRepository.GetList(a => a.EmployeeId == wkn && a.IsDelete != 1); var count = listCheckInfo.Where(a => a.CheckTime.ToShortDateString() == Convert.ToDateTime(DateTime.Now).ToShortDateString()).Count() > 0 ? 1 : 0; return count; } @@ -91,7 +91,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool AddCheckInfo(WorkerCheck workerCheck) + public bool AddCheckInfo(EmployeeCheck workerCheck) { return workerCheckRepository.Insert(workerCheck); } diff --git a/EOM.TSHotelManagement.Application/Worker/GoodBad/IWorkerGoodBadService.cs b/EOM.TSHotelManagement.Application/Worker/GoodBad/IWorkerGoodBadService.cs index bdb0674..7a0868d 100644 --- a/EOM.TSHotelManagement.Application/Worker/GoodBad/IWorkerGoodBadService.cs +++ b/EOM.TSHotelManagement.Application/Worker/GoodBad/IWorkerGoodBadService.cs @@ -35,13 +35,13 @@ namespace EOM.TSHotelManagement.Application /// /// /// - bool AddGoodBad(WorkerGoodBad goodBad); + bool AddGoodBad(EmployeeRewardPunishment goodBad); /// /// 根据工号查找所有的奖惩记录信息 /// /// /// - List SelectAllGoodBadByWorkNo(string wn); + List SelectAllGoodBadByWorkNo(string wn); } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Application/Worker/GoodBad/WorkerGoodBadService.cs b/EOM.TSHotelManagement.Application/Worker/GoodBad/WorkerGoodBadService.cs index 66a9886..46a833f 100644 --- a/EOM.TSHotelManagement.Application/Worker/GoodBad/WorkerGoodBadService.cs +++ b/EOM.TSHotelManagement.Application/Worker/GoodBad/WorkerGoodBadService.cs @@ -35,12 +35,12 @@ namespace EOM.TSHotelManagement.Application /// /// 员工奖惩记录 /// - private readonly GenericRepository workerGoogBadRepository; + private readonly GenericRepository workerGoogBadRepository; /// /// 管理员记录 /// - private readonly GenericRepository adminRepository; + private readonly GenericRepository adminRepository; /// /// 奖惩类型 @@ -53,7 +53,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public WorkerGoodBadService(GenericRepository workerGoogBadRepository, GenericRepository adminRepository, GenericRepository goodbadTypeRepository) + public WorkerGoodBadService(GenericRepository workerGoogBadRepository, GenericRepository adminRepository, GenericRepository goodbadTypeRepository) { this.workerGoogBadRepository = workerGoogBadRepository; this.adminRepository = adminRepository; @@ -65,7 +65,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool AddGoodBad(WorkerGoodBad goodBad) + public bool AddGoodBad(EmployeeRewardPunishment goodBad) { return workerGoogBadRepository.Insert(goodBad); } @@ -75,24 +75,24 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public List SelectAllGoodBadByWorkNo(string wn) + public List SelectAllGoodBadByWorkNo(string wn) { //查询所有超级管理员 - List admins = new List(); + List admins = new List(); admins = adminRepository.GetList(a => a.IsDelete != 1); List gBTypes = new List(); gBTypes = goodbadTypeRepository.GetList(a => a.IsDelete != 1); - List gb = new List(); - gb = workerGoogBadRepository.GetList(a => a.WorkNo == wn); + List gb = new List(); + gb = workerGoogBadRepository.GetList(a => a.EmployeeId == wn); gb.ForEach(source => { //奖惩类型 - var gbType = gBTypes.FirstOrDefault(a => a.GBTypeId == source.GBType); - source.TypeName = gbType.GBName.IsNullOrEmpty() ? "" : gbType.GBName; + var gbType = gBTypes.FirstOrDefault(a => a.RewardPunishmentTypeId == source.RewardPunishmentType); + source.TypeName = gbType.RewardPunishmentTypeName.IsNullOrEmpty() ? "" : gbType.RewardPunishmentTypeName; //操作人 - var admin = admins.FirstOrDefault(a => a.AdminAccount == source.GBOperation); - source.OperationName = admin.AdminName.IsNullOrEmpty() ? "" : admin.AdminName; + var admin = admins.FirstOrDefault(a => a.Account == source.RewardPunishmentOperator); + source.OperatorName = admin.Name.IsNullOrEmpty() ? "" : admin.Name; }); return gb; } diff --git a/EOM.TSHotelManagement.Application/Worker/History/IWorkerHistoryService.cs b/EOM.TSHotelManagement.Application/Worker/History/IWorkerHistoryService.cs index ebf19e3..77c7e43 100644 --- a/EOM.TSHotelManagement.Application/Worker/History/IWorkerHistoryService.cs +++ b/EOM.TSHotelManagement.Application/Worker/History/IWorkerHistoryService.cs @@ -35,13 +35,13 @@ namespace EOM.TSHotelManagement.Application /// /// /// - bool AddHistoryByWorkerId(WorkerHistory workerHistory); + bool AddHistoryByWorkerId(EmployeeHistory workerHistory); /// /// 根据工号查询履历信息 /// /// /// - List SelectHistoryByWorkerId(string wid); + List SelectHistoryByWorkerId(string wid); } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Application/Worker/History/WorkerHistoryService.cs b/EOM.TSHotelManagement.Application/Worker/History/WorkerHistoryService.cs index 56024ac..c706f30 100644 --- a/EOM.TSHotelManagement.Application/Worker/History/WorkerHistoryService.cs +++ b/EOM.TSHotelManagement.Application/Worker/History/WorkerHistoryService.cs @@ -34,13 +34,13 @@ namespace EOM.TSHotelManagement.Application /// /// 员工履历 /// - private readonly GenericRepository workerHistoryRepository; + private readonly GenericRepository workerHistoryRepository; /// /// /// /// - public WorkerHistoryService(GenericRepository workerHistoryRepository) + public WorkerHistoryService(GenericRepository workerHistoryRepository) { this.workerHistoryRepository = workerHistoryRepository; } @@ -50,7 +50,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool AddHistoryByWorkerId(WorkerHistory workerHistory) + public bool AddHistoryByWorkerId(EmployeeHistory workerHistory) { return workerHistoryRepository.Insert(workerHistory); } @@ -60,10 +60,10 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public List SelectHistoryByWorkerId(string wid) + public List SelectHistoryByWorkerId(string wid) { - List why = new List(); - why = workerHistoryRepository.GetList(a => a.IsDelete != 1 && a.WorkerId == wid); + List why = new List(); + why = workerHistoryRepository.GetList(a => a.IsDelete != 1 && a.EmployeeId == wid); return why; } } diff --git a/EOM.TSHotelManagement.Application/Worker/IWorkerService.cs b/EOM.TSHotelManagement.Application/Worker/IWorkerService.cs index 4f05fe1..a19efa0 100644 --- a/EOM.TSHotelManagement.Application/Worker/IWorkerService.cs +++ b/EOM.TSHotelManagement.Application/Worker/IWorkerService.cs @@ -36,7 +36,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - bool UpdateWorker(Worker worker); + bool UpdateWorker(Employee worker); #endregion /// @@ -44,7 +44,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - bool ManagerWorkerAccount(Worker worker); + bool ManagerWorkerAccount(Employee worker); /// /// 更新员工职位和部门 @@ -52,7 +52,7 @@ namespace EOM.TSHotelManagement.Application /// /// - bool UpdateWorkerPositionAndClub(Worker worker); + bool UpdateWorkerPositionAndClub(Employee worker); #region 添加员工信息 /// @@ -60,7 +60,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - bool AddWorker(Worker worker); + bool AddWorker(Employee worker); #endregion #region 获取所有工作人员信息 @@ -68,7 +68,7 @@ namespace EOM.TSHotelManagement.Application /// 获取所有工作人员信息 /// /// - List SelectWorkerAll(); + List SelectWorkerAll(); /// /// 检查指定部门下是否存在工作人员 @@ -84,7 +84,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - Worker SelectWorkerInfoByWorkerId(string workerId); + Employee SelectWorkerInfoByWorkerId(string workerId); #endregion #region 根据登录名称、密码查询员工信息 @@ -93,7 +93,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - Worker SelectWorkerInfoByWorkerIdAndWorkerPwd(Worker worker); + Employee SelectWorkerInfoByWorkerIdAndWorkerPwd(Employee worker); #endregion @@ -102,6 +102,6 @@ namespace EOM.TSHotelManagement.Application /// /// /// - bool UpdWorkerPwdByWorkNo(Worker worker); + bool UpdWorkerPwdByWorkNo(Employee worker); } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Application/Worker/Picture/IWorkerPicService.cs b/EOM.TSHotelManagement.Application/Worker/Picture/IWorkerPicService.cs index 1119d5d..855bc26 100644 --- a/EOM.TSHotelManagement.Application/Worker/Picture/IWorkerPicService.cs +++ b/EOM.TSHotelManagement.Application/Worker/Picture/IWorkerPicService.cs @@ -12,24 +12,24 @@ namespace EOM.TSHotelManagement.Application /// /// /// - WorkerPic WorkerPic(WorkerPic workerPic); + EmployeePhoto EmployeePhoto(EmployeePhoto workerPic); /// /// 添加员工照片 /// /// /// - bool InsertWorkerPic(WorkerPic workerPic); + bool InsertWorkerPic(EmployeePhoto workerPic); /// /// 删除员工照片 /// /// /// - bool DeleteWorkerPic(WorkerPic workerPic); + bool DeleteWorkerPic(EmployeePhoto workerPic); /// /// 更新员工照片 /// /// /// - bool UpdateWorkerPic(WorkerPic workerPic); + bool UpdateWorkerPic(EmployeePhoto workerPic); } } diff --git a/EOM.TSHotelManagement.Application/Worker/Picture/WorkerPicService.cs b/EOM.TSHotelManagement.Application/Worker/Picture/WorkerPicService.cs index 2190f3c..8e26cd2 100644 --- a/EOM.TSHotelManagement.Application/Worker/Picture/WorkerPicService.cs +++ b/EOM.TSHotelManagement.Application/Worker/Picture/WorkerPicService.cs @@ -12,7 +12,7 @@ namespace EOM.TSHotelManagement.Application /// /// 员工照片 /// - private readonly GenericRepository workerPicRepository; + private readonly GenericRepository workerPicRepository; /// /// 加密 @@ -24,7 +24,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public WorkerPicService(GenericRepository workerPicRepository, jvncorelib.EncryptorLib.EncryptLib encrypt) + public WorkerPicService(GenericRepository workerPicRepository, jvncorelib.EncryptorLib.EncryptLib encrypt) { this.workerPicRepository = workerPicRepository; this.encrypt = encrypt; @@ -35,15 +35,15 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public WorkerPic WorkerPic(WorkerPic workerPic) + public EmployeePhoto EmployeePhoto(EmployeePhoto workerPic) { - var workerPicSource = new WorkerPic(); + var workerPicSource = new EmployeePhoto(); - workerPicSource = workerPicRepository.GetSingle(a => a.WorkerId.Equals(workerPic.WorkerId)); + workerPicSource = workerPicRepository.GetSingle(a => a.EmployeeId.Equals(workerPic.EmployeeId)); if (workerPicSource.IsNullOrEmpty()) { - return new WorkerPic { Id = 0, Pic = "", WorkerId = workerPic.WorkerId }; + return new EmployeePhoto { Id = 0, PhotoPath = "", EmployeeId = workerPic.EmployeeId }; } return workerPicSource; @@ -53,12 +53,12 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool InsertWorkerPic(WorkerPic workerPic) + public bool InsertWorkerPic(EmployeePhoto workerPic) { - return workerPicRepository.Insert(new WorkerPic + return workerPicRepository.Insert(new EmployeePhoto { - WorkerId = workerPic.WorkerId, - Pic = workerPic.Pic + EmployeeId = workerPic.EmployeeId, + PhotoPath = workerPic.PhotoPath }); } @@ -67,9 +67,9 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool DeleteWorkerPic(WorkerPic workerPic) + public bool DeleteWorkerPic(EmployeePhoto workerPic) { - return workerPicRepository.Delete(a => a.WorkerId.Equals(workerPic.WorkerId)); + return workerPicRepository.Delete(a => a.EmployeeId.Equals(workerPic.EmployeeId)); } /// @@ -77,12 +77,12 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool UpdateWorkerPic(WorkerPic workerPic) + public bool UpdateWorkerPic(EmployeePhoto workerPic) { - return workerPicRepository.Update(a => new WorkerPic + return workerPicRepository.Update(a => new EmployeePhoto { - Pic = workerPic.Pic - }, a => a.WorkerId.Equals(workerPic.WorkerId)); + PhotoPath = workerPic.PhotoPath + }, a => a.EmployeeId.Equals(workerPic.EmployeeId)); } } } diff --git a/EOM.TSHotelManagement.Application/Worker/WorkerService.cs b/EOM.TSHotelManagement.Application/Worker/WorkerService.cs index a4baee6..f9c84d0 100644 --- a/EOM.TSHotelManagement.Application/Worker/WorkerService.cs +++ b/EOM.TSHotelManagement.Application/Worker/WorkerService.cs @@ -48,17 +48,17 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public class WorkerService(GenericRepository workerRepository, GenericRepository sexTypeRepository, GenericRepository educationRepository, GenericRepository nationRepository, GenericRepository deptRepository, GenericRepository positionRepository, EncryptLib encrypt, IJwtConfigFactory jwtConfigFactory) : IWorkerService + public class WorkerService(GenericRepository workerRepository, GenericRepository sexTypeRepository, GenericRepository educationRepository, GenericRepository nationRepository, GenericRepository deptRepository, GenericRepository positionRepository, EncryptLib encrypt, IJwtConfigFactory jwtConfigFactory) : IWorkerService { /// /// 员工信息 /// - private readonly GenericRepository workerRepository = workerRepository; + private readonly GenericRepository workerRepository = workerRepository; /// /// 性别类型 /// - private readonly GenericRepository sexTypeRepository = sexTypeRepository; + private readonly GenericRepository sexTypeRepository = sexTypeRepository; /// /// 学历类型 @@ -73,7 +73,7 @@ namespace EOM.TSHotelManagement.Application /// /// 部门 /// - private readonly GenericRepository deptRepository = deptRepository; + private readonly GenericRepository deptRepository = deptRepository; /// /// 职务 @@ -96,35 +96,35 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool UpdateWorker(Worker worker) + public bool UpdateWorker(Employee worker) { //加密联系方式 var sourceTelStr = string.Empty; - if (!worker.WorkerTel.IsNullOrEmpty()) + if (!worker.PhoneNumber.IsNullOrEmpty()) { - sourceTelStr = encrypt.Encryption(worker.WorkerTel, EncryptionLevel.Enhanced); + sourceTelStr = encrypt.Encryption(worker.PhoneNumber, EncryptionLevel.Enhanced); } //加密身份证 var sourceIdStr = string.Empty; - if (!worker.CardId.IsNullOrEmpty()) + if (!worker.IdCardNumber.IsNullOrEmpty()) { - sourceIdStr = encrypt.Encryption(worker.CardId, EncryptionLevel.Enhanced); + sourceIdStr = encrypt.Encryption(worker.IdCardNumber, EncryptionLevel.Enhanced); } - worker.WorkerTel = sourceTelStr; - worker.CardId = sourceIdStr; - return workerRepository.Update(a => new Worker() + worker.PhoneNumber = sourceTelStr; + worker.IdCardNumber = sourceIdStr; + return workerRepository.Update(a => new Employee() { - WorkerName = worker.WorkerName, - WorkerTel = worker.WorkerTel, - WorkerAddress = worker.WorkerAddress, - WorkerFace = worker.WorkerFace, - WorkerEducation = worker.WorkerEducation, - WorkerNation = worker.WorkerNation, - CardId = worker.CardId, - WorkerSex = worker.WorkerSex, - WorkerBirthday = worker.WorkerBirthday, + EmployeeName = worker.EmployeeName, + PhoneNumber = worker.PhoneNumber, + Address = worker.Address, + PoliticalAffiliation = worker.PoliticalAffiliation, + EducationLevel = worker.EducationLevel, + Ethnicity = worker.Ethnicity, + IdCardNumber = worker.IdCardNumber, + Gender = worker.Gender, + DateOfBirth = worker.DateOfBirth, DataChgUsr = worker.DataChgUsr - }, a => a.WorkerId.Equals(worker.WorkerId)); + }, a => a.EmployeeId.Equals(worker.EmployeeId)); } #endregion @@ -134,12 +134,12 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool ManagerWorkerAccount(Worker worker) + public bool ManagerWorkerAccount(Employee worker) { - return workerRepository.Update(a => new Worker() + return workerRepository.Update(a => new Employee() { IsDelete = worker.IsDelete - }, a => a.WorkerId == worker.WorkerId); + }, a => a.EmployeeId == worker.EmployeeId); } /// @@ -148,15 +148,15 @@ namespace EOM.TSHotelManagement.Application /// /// - public bool UpdateWorkerPositionAndClub(Worker worker) + public bool UpdateWorkerPositionAndClub(Employee worker) { - return workerRepository.Update(a => new Worker() + return workerRepository.Update(a => new Employee() { - WorkerClub = worker.WorkerClub, - WorkerPosition = worker.WorkerPosition, + Department = worker.Department, + Position = worker.Position, DataChgUsr = worker.DataChgUsr, DataChgDate = worker.DataChgDate - }, a => a.WorkerId == worker.WorkerId); + }, a => a.EmployeeId == worker.EmployeeId); } #region 添加员工信息 @@ -165,12 +165,12 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool AddWorker(Worker worker) + public bool AddWorker(Employee worker) { - string NewID = encrypt.Encryption(worker.CardId); - string NewTel = encrypt.Encryption(worker.WorkerTel); - worker.CardId = NewID; - worker.WorkerTel = NewTel; + string NewID = encrypt.Encryption(worker.IdCardNumber); + string NewTel = encrypt.Encryption(worker.PhoneNumber); + worker.IdCardNumber = NewID; + worker.PhoneNumber = NewTel; return workerRepository.Insert(worker); } #endregion @@ -180,9 +180,9 @@ namespace EOM.TSHotelManagement.Application /// 获取所有工作人员信息 /// /// - public List SelectWorkerAll() + public List SelectWorkerAll() { - var where = Expressionable.Create(); + var where = Expressionable.Create(); where = where.And(a => a.IsDelete != 1); @@ -190,44 +190,44 @@ namespace EOM.TSHotelManagement.Application List educations = new List(); educations = educationRepository.GetList(a => a.IsDelete != 1); //查询所有性别类型信息 - List sexTypes = new List(); + List sexTypes = new List(); sexTypes = sexTypeRepository.GetList(a => a.IsDelete != 1); //查询所有民族类型信息 List nations = new List(); nations = nationRepository.GetList(a => a.IsDelete != 1); //查询所有部门信息 - List depts = new List(); + List depts = new List(); depts = deptRepository.GetList(a => a.IsDelete != 1); //查询所有职位信息 List positions = new List(); positions = positionRepository.GetList(a => a.IsDelete != 1); //查询所有员工信息 - List workers = new List(); + List workers = new List(); workers = workerRepository.GetList(where.ToExpression()); workers.ForEach(source => { //解密身份证号码 - var sourceStr = source.CardId.Contains("·") ? encrypt.Decryption(source.CardId) : source.CardId; - source.CardId = sourceStr; + var sourceStr = source.IdCardNumber.Contains("·") ? encrypt.Decryption(source.IdCardNumber) : source.IdCardNumber; + source.IdCardNumber = sourceStr; //解密联系方式 - var sourceTelStr = source.WorkerTel.Contains("·") ? encrypt.Decryption(source.WorkerTel) : source.WorkerTel; - source.WorkerTel = sourceTelStr; + var sourceTelStr = source.PhoneNumber.Contains("·") ? encrypt.Decryption(source.PhoneNumber) : source.PhoneNumber; + source.PhoneNumber = sourceTelStr; //性别类型 - var sexType = sexTypes.FirstOrDefault(a => a.sexId == source.WorkerSex); - source.WorkerSexName = sexType.IsNullOrEmpty() ? "" : sexType.sexName; + var sexType = sexTypes.FirstOrDefault(a => a.GenderId == source.Gender); + source.GenderName = sexType.IsNullOrEmpty() ? "" : sexType.GenderName; //教育程度 - var eduction = educations.FirstOrDefault(a => a.education_no == source.WorkerEducation); - source.EducationName = eduction.IsNullOrEmpty() ? "" : eduction.education_name; + var eduction = educations.FirstOrDefault(a => a.EducationNumber == source.EducationLevel); + source.EducationLevelName = eduction.IsNullOrEmpty() ? "" : eduction.EducationName; //民族类型 - var nation = nations.FirstOrDefault(a => a.nation_no == source.WorkerNation); - source.NationName = nation.IsNullOrEmpty() ? "" : nation.nation_name; + var nation = nations.FirstOrDefault(a => a.NationNumber == source.Ethnicity); + source.EthnicityName = nation.IsNullOrEmpty() ? "" : nation.NationName; //部门 - var dept = depts.FirstOrDefault(a => a.dept_no == source.WorkerClub); - source.ClubName = dept.IsNullOrEmpty() ? "" : dept.dept_name; + var dept = depts.FirstOrDefault(a => a.DepartmentNumber == source.Department); + source.DepartmentName = dept.IsNullOrEmpty() ? "" : dept.DepartmentName; //职位 - var position = positions.FirstOrDefault(a => a.position_no == source.WorkerPosition); - source.PositionName = position.IsNullOrEmpty() ? "" : position.position_name; + var position = positions.FirstOrDefault(a => a.PositionNumber == source.Position); + source.PositionName = position.IsNullOrEmpty() ? "" : position.PositionName; }); return workers; @@ -240,7 +240,7 @@ namespace EOM.TSHotelManagement.Application /// public bool CheckWorkerBydepartment(string deptNo) { - var workers = workerRepository.Count(a => a.WorkerClub.Equals(deptNo)); + var workers = workerRepository.Count(a => a.Department.Equals(deptNo)); return workers > 0 ? true : false; } @@ -252,31 +252,31 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public Worker SelectWorkerInfoByWorkerId(string workerId) + public Employee SelectWorkerInfoByWorkerId(string workerId) { - Worker w = new Worker(); - w = workerRepository.GetSingle(a => a.WorkerId == workerId); + Employee w = new Employee(); + w = workerRepository.GetSingle(a => a.EmployeeId == workerId); //解密身份证号码 - var sourceStr = w.CardId.Contains("·") ? encrypt.Decryption(w.CardId) : w.CardId; - w.CardId = sourceStr; + var sourceStr = w.IdCardNumber.Contains("·") ? encrypt.Decryption(w.IdCardNumber) : w.IdCardNumber; + w.IdCardNumber = sourceStr; //解密联系方式 - var sourceTelStr = w.WorkerTel.Contains("·") ? encrypt.Decryption(w.WorkerTel) : w.WorkerTel; - w.WorkerTel = sourceTelStr; + var sourceTelStr = w.PhoneNumber.Contains("·") ? encrypt.Decryption(w.PhoneNumber) : w.PhoneNumber; + w.PhoneNumber = sourceTelStr; //性别类型 - var sexType = sexTypeRepository.GetSingle(a => a.sexId == w.WorkerSex); - w.WorkerSexName = sexType.sexName.IsNullOrEmpty() ? "" : sexType.sexName; + var sexType = sexTypeRepository.GetSingle(a => a.GenderId == w.Gender); + w.GenderName = sexType.GenderName.IsNullOrEmpty() ? "" : sexType.GenderName; //教育程度 - var eduction = educationRepository.GetSingle(a => a.education_no == w.WorkerEducation); - w.EducationName = eduction.education_name.IsNullOrEmpty() ? "" : eduction.education_name; + var eduction = educationRepository.GetSingle(a => a.EducationNumber == w.EducationLevel); + w.EducationLevelName = eduction.EducationName.IsNullOrEmpty() ? "" : eduction.EducationName; //民族类型 - var nation = nationRepository.GetSingle(a => a.nation_no == w.WorkerNation); - w.NationName = nation.nation_name.IsNullOrEmpty() ? "" : nation.nation_name; + var nation = nationRepository.GetSingle(a => a.NationNumber == w.Ethnicity); + w.EthnicityName = nation.NationName.IsNullOrEmpty() ? "" : nation.NationName; //部门 - var dept = deptRepository.GetSingle(a => a.dept_no == w.WorkerClub); - w.ClubName = dept.dept_name.IsNullOrEmpty() ? "" : dept.dept_name; + var dept = deptRepository.GetSingle(a => a.DepartmentNumber == w.Department); + w.DepartmentName = dept.DepartmentName.IsNullOrEmpty() ? "" : dept.DepartmentName; //职位 - var position = positionRepository.GetSingle(a => a.position_no == w.WorkerPosition); - w.PositionName = position.position_name.IsNullOrEmpty() ? "" : position.position_name; + var position = positionRepository.GetSingle(a => a.PositionNumber == w.Position); + w.PositionName = position.PositionName.IsNullOrEmpty() ? "" : position.PositionName; return w; } #endregion @@ -287,40 +287,40 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public Worker SelectWorkerInfoByWorkerIdAndWorkerPwd(Worker worker) + public Employee SelectWorkerInfoByWorkerIdAndWorkerPwd(Employee worker) { - Worker w = new Worker(); - w = workerRepository.GetSingle(a => a.WorkerId == worker.WorkerId); + Employee w = new Employee(); + w = workerRepository.GetSingle(a => a.EmployeeId == worker.EmployeeId); if (w == null) { w = null; return w; } - var frontEncryed = encrypt.Encryption(w.WorkerPwd, EncryptionLevel.Enhanced); - var backEncryed = encrypt.Encryption(worker.WorkerPwd, EncryptionLevel.Enhanced); + var frontEncryed = encrypt.Encryption(w.Password, EncryptionLevel.Enhanced); + var backEncryed = encrypt.Encryption(worker.Password, EncryptionLevel.Enhanced); if (!encrypt.Compare(frontEncryed, backEncryed)) { w = null; return w; } - w.WorkerPwd = ""; + w.Password = ""; //性别类型 - var sexType = sexTypeRepository.GetSingle(a => a.sexId == w.WorkerSex); - w.WorkerSexName = sexType.sexName.IsNullOrEmpty() ? "" : sexType.sexName; + var sexType = sexTypeRepository.GetSingle(a => a.GenderId == w.Gender); + w.GenderName = sexType.GenderName.IsNullOrEmpty() ? "" : sexType.GenderName; //教育程度 - var eduction = educationRepository.GetSingle(a => a.education_no == w.WorkerEducation); - w.EducationName = eduction.education_name.IsNullOrEmpty() ? "" : eduction.education_name; + var eduction = educationRepository.GetSingle(a => a.EducationNumber == w.EducationLevel); + w.EducationLevelName = eduction.EducationName.IsNullOrEmpty() ? "" : eduction.EducationName; //民族类型 - var nation = nationRepository.GetSingle(a => a.nation_no == w.WorkerNation); - w.NationName = nation.nation_name.IsNullOrEmpty() ? "" : nation.nation_name; + var nation = nationRepository.GetSingle(a => a.NationNumber == w.Ethnicity); + w.EthnicityName = nation.NationName.IsNullOrEmpty() ? "" : nation.NationName; //部门 - var dept = deptRepository.GetSingle(a => a.dept_no == w.WorkerClub); - w.ClubName = dept.dept_name.IsNullOrEmpty() ? "" : dept.dept_name; + var dept = deptRepository.GetSingle(a => a.DepartmentNumber == w.Department); + w.DepartmentName = dept.DepartmentName.IsNullOrEmpty() ? "" : dept.DepartmentName; //职位 - var position = positionRepository.GetSingle(a => a.position_no == w.WorkerPosition); - w.PositionName = position.position_name.IsNullOrEmpty() ? "" : position.position_name; + var position = positionRepository.GetSingle(a => a.PositionNumber == w.Position); + w.PositionName = position.PositionName.IsNullOrEmpty() ? "" : position.PositionName; //附带Token var jwtConfig = _jwtConfigFactory.GetJwtConfig(); @@ -330,7 +330,7 @@ namespace EOM.TSHotelManagement.Application { Subject = new ClaimsIdentity(new Claim[] { - new Claim(ClaimTypes.Name, w.WorkerId) + new Claim(ClaimTypes.Name, w.EmployeeId) }), Expires = DateTime.Now.AddMinutes(jwtConfig.ExpiryMinutes), SigningCredentials = new SigningCredentials(new SymmetricSecurityKey(key), SecurityAlgorithms.HmacSha256Signature), @@ -350,14 +350,14 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool UpdWorkerPwdByWorkNo(Worker worker) + public bool UpdWorkerPwdByWorkNo(Employee worker) { - string NewPwd = encrypt.Decryption(worker.WorkerPwd); - return workerRepository.Update(a => new Worker() + string NewPwd = encrypt.Decryption(worker.Password); + return workerRepository.Update(a => new Employee() { - WorkerPwd = NewPwd, + Password = NewPwd, DataChgUsr = worker.DataChgUsr - }, a => a.WorkerId == worker.WorkerId); + }, a => a.EmployeeId == worker.EmployeeId); } } diff --git a/EOM.TSHotelManagement.Application/Zero/Admin/AdminService.cs b/EOM.TSHotelManagement.Application/Zero/Admin/AdminService.cs index 5537151..0f4b3ef 100644 --- a/EOM.TSHotelManagement.Application/Zero/Admin/AdminService.cs +++ b/EOM.TSHotelManagement.Application/Zero/Admin/AdminService.cs @@ -42,12 +42,12 @@ namespace EOM.TSHotelManagement.Application /// /// 管理员 /// - private readonly GenericRepository adminRepository; + private readonly GenericRepository adminRepository; /// /// 管理员类型 /// - private readonly GenericRepository adminTypeRepository; + private readonly GenericRepository adminTypeRepository; /// /// 加密 @@ -66,7 +66,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public AdminService(GenericRepository adminRepository, GenericRepository adminTypeRepository, EncryptLib encrypt, JWTHelper jWTHelper) + public AdminService(GenericRepository adminRepository, GenericRepository adminTypeRepository, EncryptLib encrypt, JWTHelper jWTHelper) { this.adminRepository = adminRepository; this.adminTypeRepository = adminTypeRepository; @@ -80,30 +80,30 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public Admin SelectManagerByPass(Admin admin) + public Administrator SelectManagerByPass(Administrator admin) { if (admin == null) { throw new ArgumentNullException(nameof(admin)); } - var existingAdmin = adminRepository.GetSingle(a => a.AdminAccount == admin.AdminAccount); + var existingAdmin = adminRepository.GetSingle(a => a.Account == admin.Account); if (existingAdmin == null) { return null; } - string existingAdminPassword = existingAdmin.AdminPassword; + string existingAdminPassword = existingAdmin.Password; if (existingAdminPassword.Contains("·")) { - if (!encrypt.Compare(admin.AdminPassword, existingAdminPassword)) + if (!encrypt.Compare(admin.Password, existingAdminPassword)) { return null; } } - else if (!admin.AdminPassword.Equals(existingAdminPassword)) + else if (!admin.Password.Equals(existingAdminPassword)) { return null; } @@ -113,9 +113,9 @@ namespace EOM.TSHotelManagement.Application return null; } - existingAdmin.AdminPassword = string.Empty; + existingAdmin.Password = string.Empty; - existingAdmin.UserToken = jWTHelper.GenerateJWT(admin.AdminName); + existingAdmin.UserToken = jWTHelper.GenerateJWT(admin.Name); return existingAdmin; } @@ -125,14 +125,14 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public Admin Login(Admin admin) + public Administrator Login(Administrator admin) { if (admin == null) { throw new ArgumentNullException(nameof(admin)); } - var existingAdmin = adminRepository.GetSingle(a => a.AdminAccount == admin.AdminAccount); + var existingAdmin = adminRepository.GetSingle(a => a.Account == admin.Account); if (existingAdmin == null) { @@ -144,21 +144,21 @@ namespace EOM.TSHotelManagement.Application return null; } - var encrtptPwd = encrypt.Encryption(admin.AdminPassword, EncryptionLevel.Enhanced); + var encrtptPwd = encrypt.Encryption(admin.Password, EncryptionLevel.Enhanced); - if (encrtptPwd.IsNullOrEmpty() || existingAdmin.AdminPassword.IsNullOrEmpty()) + if (encrtptPwd.IsNullOrEmpty() || existingAdmin.Password.IsNullOrEmpty()) { return null; } - var passed = encrypt.Compare(encrtptPwd, existingAdmin.AdminPassword); + var passed = encrypt.Compare(encrtptPwd, existingAdmin.Password); if (!passed) { return null; } - existingAdmin.AdminPassword = string.Empty; - existingAdmin.UserToken = jWTHelper.GenerateJWT(admin.AdminAccount); + existingAdmin.Password = string.Empty; + existingAdmin.UserToken = jWTHelper.GenerateJWT(admin.Account); return existingAdmin; } @@ -170,10 +170,10 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public Admin SelectAdminPwdByAccount(string account) + public Administrator SelectAdminPwdByAccount(string account) { - Admin admin = new Admin(); - admin = adminRepository.GetSingle(a => a.AdminAccount == account); + Administrator admin = new Administrator(); + admin = adminRepository.GetSingle(a => a.Account == account); return admin; } #endregion @@ -182,20 +182,20 @@ namespace EOM.TSHotelManagement.Application /// 获取所有管理员列表 /// /// - public List GetAllAdminList() + public List GetAllAdminList() { var listAdmins = adminRepository.GetList(); var listAdminType = adminTypeRepository.GetList(a => a.IsDelete != 1); listAdmins.ForEach(admins => { - var isAdminType = admins.IsAdmin == 1 ? "是" : "否"; - admins.IsAdminNm = isAdminType; + var isAdminType = admins.IsSuperAdmin == 1 ? "是" : "否"; + admins.IsSuperAdminDescription = isAdminType; - var adminType = listAdminType.FirstOrDefault(a => a.type_id.Equals(admins.AdminType)); - admins.TypeName = adminType == null ? "" : adminType.type_name; + var adminType = listAdminType.FirstOrDefault(a => a.TypeId.Equals(admins.Type)); + admins.TypeName = adminType == null ? "" : adminType.TypeName; var adminDelete = admins.IsDelete == 1 ? "是" : "否"; - admins.DeleteNm = adminDelete; + admins.DeleteDescription = adminDelete; }); @@ -207,30 +207,30 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool UpdateNewPwdByOldPwd(Admin admin) + public bool UpdateNewPwdByOldPwd(Administrator admin) { - admin.AdminPassword = encrypt.Encryption(admin.AdminPassword, EncryptionLevel.Enhanced); - return adminRepository.Update(a => new Admin() + admin.Password = encrypt.Encryption(admin.Password, EncryptionLevel.Enhanced); + return adminRepository.Update(a => new Administrator() { - AdminPassword = admin.AdminPassword - }, a => a.AdminAccount == admin.AdminAccount); + Password = admin.Password + }, a => a.Account == admin.Account); } /// /// 获取管理员列表(已启用) /// /// - public List GetAllAdmin() + public List GetAllAdmin() { var listAdmin = adminRepository.GetList(a => a.IsDelete != 1); var listAdminType = adminTypeRepository.GetList(a => a.IsDelete != 1); listAdmin.ForEach(admin => { - var isAdminType = admin.IsAdmin == 1 ? "是" : "否"; - admin.IsAdminNm = isAdminType; + var isAdminType = admin.IsSuperAdmin == 1 ? "是" : "否"; + admin.IsSuperAdminDescription = isAdminType; - var adminType = listAdminType.FirstOrDefault(a => a.type_id.Equals(admin.AdminType)); - admin.TypeName = adminType == null ? "" : adminType.type_name; + var adminType = listAdminType.FirstOrDefault(a => a.TypeId.Equals(admin.Type)); + admin.TypeName = adminType == null ? "" : adminType.TypeName; }); return listAdmin; } @@ -240,9 +240,9 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool AddAdmin(Admin admin) + public bool AddAdmin(Administrator admin) { - admin.AdminPassword = encrypt.Encryption(admin.AdminPassword, EncryptionLevel.Enhanced); + admin.Password = encrypt.Encryption(admin.Password, EncryptionLevel.Enhanced); bool result = adminRepository.Insert(admin); return result; } @@ -252,13 +252,13 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public Admin GetAdminInfoByAdminAccount(Admin admin) + public Administrator GetAdminInfoByAdminAccount(Administrator admin) { - var adminInfo = adminRepository.GetSingle(a => a.AdminAccount.Equals(admin.AdminAccount)); + var adminInfo = adminRepository.GetSingle(a => a.Account.Equals(admin.Account)); if (adminInfo != null) { - var adminType = adminTypeRepository.GetSingle(a => a.type_id.Equals(adminInfo.AdminType)); - adminInfo.TypeName = adminType.type_name; + var adminType = adminTypeRepository.GetSingle(a => a.TypeId.Equals(adminInfo.Type)); + adminInfo.TypeName = adminType.TypeName; } return adminInfo; } @@ -267,7 +267,7 @@ namespace EOM.TSHotelManagement.Application /// 获取所有管理员类型 /// /// - public List GetAllAdminTypes() + public List GetAllAdminTypes() { var listAdminTypes = adminTypeRepository.GetList(a => a.IsDelete != 1); return listAdminTypes; @@ -278,10 +278,10 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool UpdAccount(Admin admins) + public bool UpdAccount(Administrator admins) { admins.IsDelete = admins.IsDelete == 0 ? 1 : 0; - return adminRepository.Update(a => new Admin() + return adminRepository.Update(a => new Administrator() { IsDelete = admins.IsDelete, DataChgDate = admins.DataChgDate diff --git a/EOM.TSHotelManagement.Application/Zero/Admin/IAdminService.cs b/EOM.TSHotelManagement.Application/Zero/Admin/IAdminService.cs index c82b090..ec74c43 100644 --- a/EOM.TSHotelManagement.Application/Zero/Admin/IAdminService.cs +++ b/EOM.TSHotelManagement.Application/Zero/Admin/IAdminService.cs @@ -37,14 +37,14 @@ namespace EOM.TSHotelManagement.Application /// /// /// - Admin SelectManagerByPass(Admin admin); + Administrator SelectManagerByPass(Administrator admin); /// /// 后台系统登录 /// /// /// - Admin Login(Admin admin); + Administrator Login(Administrator admin); #endregion #region 根据超管账号查询对应的密码 @@ -53,53 +53,53 @@ namespace EOM.TSHotelManagement.Application /// /// /// - Admin SelectAdminPwdByAccount(string account); + Administrator SelectAdminPwdByAccount(string account); #endregion /// /// 获取所有管理员列表 /// /// - List GetAllAdminList(); + List GetAllAdminList(); /// /// 修改密码 /// /// /// - bool UpdateNewPwdByOldPwd(Admin admin); + bool UpdateNewPwdByOldPwd(Administrator admin); /// /// 获取管理员列表 /// /// - List GetAllAdmin(); + List GetAllAdmin(); /// /// 添加管理员 /// /// /// - bool AddAdmin(Admin admin); + bool AddAdmin(Administrator admin); /// /// 获取管理员信息 /// /// /// - Admin GetAdminInfoByAdminAccount(Admin admin); + Administrator GetAdminInfoByAdminAccount(Administrator admin); /// /// 获取所有管理员类型 /// /// - List GetAllAdminTypes(); + List GetAllAdminTypes(); /// /// 批量更新管理员账户 /// /// /// - bool UpdAccount(Admin admins); + bool UpdAccount(Administrator admins); } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Application/Zero/Base/BaseService.cs b/EOM.TSHotelManagement.Application/Zero/Base/BaseService.cs index 29b3b17..f953f26 100644 --- a/EOM.TSHotelManagement.Application/Zero/Base/BaseService.cs +++ b/EOM.TSHotelManagement.Application/Zero/Base/BaseService.cs @@ -21,6 +21,7 @@ *SOFTWARE. * */ +using EOM.TSHotelManagement.Common; using EOM.TSHotelManagement.Common.Core; using EOM.TSHotelManagement.EntityFramework; using jvncorelib.EntityLib; @@ -37,12 +38,12 @@ namespace EOM.TSHotelManagement.Application /// /// 员工信息 /// - private readonly GenericRepository workerRepository; + private readonly GenericRepository workerRepository; /// /// 性别类型 /// - private readonly GenericRepository sexTypeRepository; + private readonly GenericRepository sexTypeRepository; /// /// 学历类型 @@ -57,7 +58,7 @@ namespace EOM.TSHotelManagement.Application /// /// 部门 /// - private readonly GenericRepository deptRepository; + private readonly GenericRepository deptRepository; /// /// 职务 @@ -67,7 +68,7 @@ namespace EOM.TSHotelManagement.Application /// /// 证件类型 /// - private readonly GenericRepository passPortTypeRepository; + private readonly GenericRepository passPortTypeRepository; /// /// 客户类型 @@ -82,7 +83,7 @@ namespace EOM.TSHotelManagement.Application /// /// 基础URL /// - private readonly GenericRepository baseRepository; + private readonly GenericRepository baseRepository; /// /// @@ -97,7 +98,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public BaseService(GenericRepository workerRepository, GenericRepository sexTypeRepository, GenericRepository educationRepository, GenericRepository nationRepository, GenericRepository deptRepository, GenericRepository positionRepository, GenericRepository passPortTypeRepository, GenericRepository custoTypeRepository, GenericRepository goodbadTypeRepository, GenericRepository baseRepository) + public BaseService(GenericRepository workerRepository, GenericRepository sexTypeRepository, GenericRepository educationRepository, GenericRepository nationRepository, GenericRepository deptRepository, GenericRepository positionRepository, GenericRepository passPortTypeRepository, GenericRepository custoTypeRepository, GenericRepository goodbadTypeRepository, GenericRepository baseRepository) { this.workerRepository = workerRepository; this.sexTypeRepository = sexTypeRepository; @@ -117,17 +118,17 @@ namespace EOM.TSHotelManagement.Application /// 查询所有性别类型 /// /// - public List SelectSexTypeAll(SexType sexType = null) + public List SelectSexTypeAll(GenderType sexType = null) { - var where = Expressionable.Create(); + var where = Expressionable.Create(); if (sexType != null && !sexType.IsDelete.IsNullOrEmpty()) { where = where.And(a => a.IsDelete == sexType.IsDelete); } - if (sexType != null && !sexType.sexName.IsNullOrEmpty()) + if (sexType != null && !sexType.GenderName.IsNullOrEmpty()) { - where = where.And(a => a.sexName.Contains(sexType.sexName)); + where = where.And(a => a.GenderName.Contains(sexType.GenderName)); } return sexTypeRepository.GetList(where.ToExpression()); } @@ -136,10 +137,10 @@ namespace EOM.TSHotelManagement.Application /// 查询性别类型 /// /// - public SexType SelectSexType(SexType sexType) + public GenderType SelectSexType(GenderType sexType) { - SexType sexTypes = new SexType(); - sexTypes = sexTypeRepository.GetSingle(a => a.sexId == sexType.sexId); + GenderType sexTypes = new GenderType(); + sexTypes = sexTypeRepository.GetSingle(a => a.GenderId == sexType.GenderId); return sexTypes; } @@ -148,7 +149,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool AddSexType(SexType sexType) + public bool AddSexType(GenderType sexType) { return sexTypeRepository.Insert(sexType); } @@ -158,13 +159,13 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool DelSexType(SexType sexType) + public bool DelSexType(GenderType sexType) { - return sexTypeRepository.Update(a => new SexType() + return sexTypeRepository.Update(a => new GenderType() { IsDelete = sexType.IsDelete, DataChgUsr = sexType.DataChgUsr - }, a => a.sexId == sexType.sexId); + }, a => a.GenderId == sexType.GenderId); } /// @@ -172,18 +173,36 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool UpdSexType(SexType sexType) + public bool UpdSexType(GenderType sexType) { - return sexTypeRepository.Update(a => new SexType() + return sexTypeRepository.Update(a => new GenderType() { - sexName = sexType.sexName, + GenderName = sexType.GenderName, DataChgUsr = sexType.DataChgUsr, DataChgDate = sexType.DataChgDate - }, a => a.sexId == sexType.sexId); + }, a => a.GenderId == sexType.GenderId); } #endregion + #region 面貌模块 + + /// + /// 查询所有面貌类型 + /// + /// + public List SelectWorkerFeatureAll() + { + var listWorkerFeatures = new List(); + var workerFeatures = WorkerFeaturesConstant.GetAll().ToList(); + foreach (var item in workerFeatures) + { + listWorkerFeatures.Add(new WorkerFeatures { Code = item.Code, Description = item.Description }); + } + return listWorkerFeatures; + } + #endregion + #region 职位模块 /// @@ -198,9 +217,9 @@ namespace EOM.TSHotelManagement.Application { where = where.And(a => a.IsDelete == position.IsDelete); } - if (position != null && !position.position_name.IsNullOrEmpty()) + if (position != null && !position.PositionName.IsNullOrEmpty()) { - where = where.And(a => a.position_name.Contains(position.position_name)); + where = where.And(a => a.PositionName.Contains(position.PositionName)); } return positionRepository.GetList(where.ToExpression()); } @@ -212,7 +231,7 @@ namespace EOM.TSHotelManagement.Application public Position SelectPosition(Position position) { Position position1 = new Position(); - position1 = positionRepository.GetSingle(a => a.position_no == position.position_no); + position1 = positionRepository.GetSingle(a => a.PositionNumber == position.PositionNumber); return position1; } @@ -238,7 +257,7 @@ namespace EOM.TSHotelManagement.Application IsDelete = position.IsDelete, DataChgUsr = position.DataChgUsr, DataChgDate = position.DataChgDate - }, a => a.position_no == position.position_no); + }, a => a.PositionNumber == position.PositionNumber); } /// @@ -250,10 +269,10 @@ namespace EOM.TSHotelManagement.Application { return positionRepository.Update(a => new Position() { - position_name = position.position_name, + PositionNumber = position.PositionNumber, DataChgUsr = position.DataChgUsr, DataChgDate = position.DataChgDate - }, a => a.position_no == position.position_no); + }, a => a.PositionNumber == position.PositionNumber); } #endregion @@ -270,9 +289,9 @@ namespace EOM.TSHotelManagement.Application where = where.And(a => a.IsDelete == nation.IsDelete); - if (nation != null && !nation.nation_name.IsNullOrEmpty()) + if (nation != null && !nation.NationName.IsNullOrEmpty()) { - where = where.And(a => a.nation_name.Contains(nation.nation_name)); + where = where.And(a => a.NationName.Contains(nation.NationName)); } return nationRepository.GetList(where.ToExpression()); } @@ -284,7 +303,7 @@ namespace EOM.TSHotelManagement.Application public Nation SelectNation(Nation nation) { Nation nation1 = new Nation(); - nation1 = nationRepository.GetSingle(a => a.nation_no.Equals(nation.nation_no)); + nation1 = nationRepository.GetSingle(a => a.NationNumber.Equals(nation.NationNumber)); return nation1; } @@ -310,7 +329,7 @@ namespace EOM.TSHotelManagement.Application IsDelete = nation.IsDelete ?? 1, DataChgUsr = nation.DataChgUsr, DataChgDate = nation.DataChgDate - }, a => a.nation_no.Equals(nation.nation_no)); + }, a => a.NationNumber.Equals(nation.NationNumber)); } @@ -323,10 +342,10 @@ namespace EOM.TSHotelManagement.Application { return nationRepository.Update(a => new Nation() { - nation_name = nation.nation_name, + NationNumber = nation.NationNumber, DataChgUsr = nation.DataChgUsr, DataChgDate = nation.DataChgDate - }, a => a.nation_no.Equals(nation.nation_no)); + }, a => a.NationNumber.Equals(nation.NationNumber)); } #endregion @@ -345,9 +364,9 @@ namespace EOM.TSHotelManagement.Application { where = where.And(a => a.IsDelete == education.IsDelete); } - if (education != null && !education.education_name.IsNullOrEmpty()) + if (education != null && !education.EducationName.IsNullOrEmpty()) { - where = where.And(a => a.education_name.Contains(education.education_name)); + where = where.And(a => a.EducationName.Contains(education.EducationName)); } return educationRepository.GetList(where.ToExpression()); } @@ -359,7 +378,7 @@ namespace EOM.TSHotelManagement.Application public Education SelectEducation(Education education) { Education education1 = new Education(); - education1 = educationRepository.GetSingle(a => a.education_no == education.education_no); + education1 = educationRepository.GetSingle(a => a.EducationNumber == education.EducationNumber); return education1; } @@ -385,7 +404,7 @@ namespace EOM.TSHotelManagement.Application IsDelete = education.IsDelete ?? 1, DataChgUsr = education.DataChgUsr, DataChgDate = education.DataChgDate - }, a => a.education_no == education.education_no); + }, a => a.EducationNumber == education.EducationNumber); } /// @@ -397,10 +416,10 @@ namespace EOM.TSHotelManagement.Application { return educationRepository.Update(a => new Education() { - education_name = education.education_name, + EducationName = education.EducationName, DataChgUsr = education.DataChgUsr, DataChgDate = education.DataChgDate - }, a => a.education_no == education.education_no); + }, a => a.EducationNumber == education.EducationNumber); } #endregion @@ -411,23 +430,23 @@ namespace EOM.TSHotelManagement.Application /// 查询所有部门类型(可用) /// /// - public List SelectDeptAllCanUse() + public List SelectDeptAllCanUse() { - List workers = new List(); + List workers = new List(); workers = workerRepository.GetList(a => a.IsDelete != 1); - List depts = new List(); + List depts = new List(); depts = deptRepository.GetList(a => a.IsDelete != 1); depts.ForEach(source => { - if (!source.dept_parent.IsNullOrEmpty()) + if (!source.ParentDepartmentNumber.IsNullOrEmpty()) { - var dept = depts.FirstOrDefault(a => a.dept_no == source.dept_parent); - source.parent_name = dept == null || dept.dept_name.IsNullOrEmpty() ? "无" : dept.dept_name; + var dept = depts.FirstOrDefault(a => a.DepartmentNumber == source.ParentDepartmentNumber); + source.ParentDepartmentName = dept == null || dept.DepartmentName.IsNullOrEmpty() ? "无" : dept.DepartmentName; } - if (!source.dept_leader.IsNullOrEmpty()) + if (!source.DepartmentLeader.IsNullOrEmpty()) { - var leader = workers.FirstOrDefault(a => a.WorkerId == source.dept_leader); - source.leader_name = leader == null || leader.WorkerName.IsNullOrEmpty() ? "无" : leader.WorkerName; + var leader = workers.FirstOrDefault(a => a.EmployeeId == source.DepartmentLeader); + source.LeaderName = leader == null || leader.EmployeeName.IsNullOrEmpty() ? "无" : leader.EmployeeName; } }); @@ -438,18 +457,18 @@ namespace EOM.TSHotelManagement.Application /// 查询所有部门类型 /// /// - public List SelectDeptAll() + public List SelectDeptAll() { - List workers = new List(); + List workers = new List(); workers = workerRepository.GetList(a => a.IsDelete != 1); - List depts = new List(); + List depts = new List(); depts = deptRepository.GetList(a => a.IsDelete != 1); depts.ForEach(source => { - var dept = depts.FirstOrDefault(a => a.dept_no == source.dept_parent); - source.parent_name = dept == null ? "" : dept.dept_name; - var leader = workers.FirstOrDefault(a => source.dept_leader != null && a.WorkerId == source.dept_leader); - source.leader_name = leader == null ? "" : leader.WorkerName; + var dept = depts.FirstOrDefault(a => a.DepartmentNumber == source.ParentDepartmentNumber); + source.ParentDepartmentNumber = dept == null ? "" : dept.DepartmentName; + var leader = workers.FirstOrDefault(a => source.DepartmentLeader != null && a.EmployeeId == source.DepartmentLeader); + source.LeaderName = leader == null ? "" : leader.EmployeeName; }); return depts; } @@ -458,10 +477,10 @@ namespace EOM.TSHotelManagement.Application /// 查询部门类型 /// /// - public Dept SelectDept(Dept dept) + public Department SelectDept(Department dept) { - Dept dept1 = new Dept(); - dept1 = deptRepository.GetSingle(a => a.dept_no.Equals(dept.dept_no)); + Department dept1 = new Department(); + dept1 = deptRepository.GetSingle(a => a.DepartmentNumber.Equals(dept.DepartmentNumber)); return dept1; } @@ -470,7 +489,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool AddDept(Dept dept) + public bool AddDept(Department dept) { return deptRepository.Insert(dept); } @@ -480,18 +499,18 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool DelDept(Dept dept) + public bool DelDept(Department dept) { if (dept.IsNullOrEmpty()) { return false; } - return deptRepository.Update(a => new Dept() + return deptRepository.Update(a => new Department() { IsDelete = dept.IsDelete, DataChgUsr = dept.DataChgUsr, DataChgDate = dept.DataChgDate - }, a => a.dept_no == dept.dept_no); + }, a => a.DepartmentNumber == dept.DepartmentNumber); } /// @@ -499,17 +518,18 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool UpdDept(Dept dept) + public bool UpdDept(Department dept) { - return deptRepository.Update(a => new Dept() + return deptRepository.Update(a => new Department() { - dept_name = dept.dept_name, - dept_desc = dept.dept_desc, - dept_leader = dept.dept_leader, - dept_parent = dept.dept_parent, + DepartmentName = dept.DepartmentName, + DepartmentDescription = dept.DepartmentDescription, + DepartmentLeader = dept.DepartmentLeader, + ParentDepartmentNumber = dept.ParentDepartmentNumber, + DepartmentCreationDate = dept.DepartmentCreationDate, DataChgUsr = dept.DataChgUsr, DataChgDate = dept.DataChgDate - }, a => a.dept_no == dept.dept_no); + }, a => a.DepartmentNumber == dept.DepartmentNumber); } #endregion @@ -546,7 +566,7 @@ namespace EOM.TSHotelManagement.Application public CustoType SelectCustoTypeByTypeId(CustoType custoType) { CustoType custoTypes = new CustoType(); - custoType = custoTypeRepository.GetSingle(a => a.UserType == custoType.UserType && a.IsDelete != 1); + custoType = custoTypeRepository.GetSingle(a => a.CustomerType == custoType.CustomerType && a.IsDelete != 1); return custoTypes; } @@ -571,7 +591,7 @@ namespace EOM.TSHotelManagement.Application { IsDelete = 1, DataChgUsr = custoType.DataChgUsr - }, a => a.UserType == custoType.UserType); + }, a => a.CustomerType == custoType.CustomerType); } /// @@ -583,10 +603,10 @@ namespace EOM.TSHotelManagement.Application { return custoTypeRepository.Update(a => new CustoType() { - TypeName = custoType.TypeName, + CustomerTypeName = custoType.CustomerTypeName, DataChgUsr = custoType.DataChgUsr, DataChgDate = custoType.DataChgDate - }, a => a.UserType == custoType.UserType); + }, a => a.CustomerType == custoType.CustomerType); } #endregion @@ -597,9 +617,9 @@ namespace EOM.TSHotelManagement.Application /// 查询所有证件类型(可用) /// /// - public List SelectPassPortTypeAllCanUse() + public List SelectPassPortTypeAllCanUse() { - List passPortTypes = new List(); + List passPortTypes = new List(); passPortTypes = passPortTypeRepository.GetList(a => a.IsDelete != 1); return passPortTypes; } @@ -608,9 +628,9 @@ namespace EOM.TSHotelManagement.Application /// 查询所有证件类型 /// /// - public List SelectPassPortTypeAll() + public List SelectPassPortTypeAll() { - List passPortTypes = new List(); + List passPortTypes = new List(); passPortTypes = passPortTypeRepository.GetList(); return passPortTypes; } @@ -620,9 +640,9 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public PassPortType SelectPassPortTypeByTypeId(PassPortType passPortType) + public PassportType SelectPassPortTypeByTypeId(PassportType passPortType) { - PassPortType passPortType1 = new PassPortType(); + PassportType passPortType1 = new PassportType(); passPortType1 = passPortTypeRepository.GetSingle(a => a.PassportId == passPortType.PassportId && a.IsDelete != 1); return passPortType1; } @@ -632,7 +652,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool InsertPassPortType(PassPortType passPortType) + public bool InsertPassPortType(PassportType passPortType) { return passPortTypeRepository.Insert(passPortType); } @@ -642,9 +662,9 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool DeletePassPortType(PassPortType portType) + public bool DeletePassPortType(PassportType portType) { - return passPortTypeRepository.Update(a => new PassPortType() + return passPortTypeRepository.Update(a => new PassportType() { IsDelete = 1, DataChgUsr = portType.DataChgUsr, @@ -656,9 +676,9 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool UpdatePassPortType(PassPortType portType) + public bool UpdatePassPortType(PassportType portType) { - return passPortTypeRepository.Update(a => new PassPortType() + return passPortTypeRepository.Update(a => new PassportType() { PassportName = portType.PassportName, DataChgUsr = portType.DataChgUsr, @@ -700,7 +720,7 @@ namespace EOM.TSHotelManagement.Application public GBType SelectGBTypeByTypeId(GBType gBType) { GBType gBType1 = new GBType(); - gBType1 = goodbadTypeRepository.GetSingle(a => a.GBTypeId == gBType.GBTypeId && a.IsDelete != 1); + gBType1 = goodbadTypeRepository.GetSingle(a => a.RewardPunishmentTypeId == gBType.RewardPunishmentTypeId && a.IsDelete != 1); return gBType1; } @@ -725,7 +745,7 @@ namespace EOM.TSHotelManagement.Application { IsDelete = 1, DataChgUsr = gBType.DataChgUsr, - }, a => a.GBTypeId == gBType.GBTypeId); + }, a => a.RewardPunishmentTypeId == gBType.RewardPunishmentTypeId); } /// @@ -737,10 +757,10 @@ namespace EOM.TSHotelManagement.Application { return goodbadTypeRepository.Update(a => new GBType() { - GBName = gBType.GBName, + RewardPunishmentTypeName = gBType.RewardPunishmentTypeName, DataChgUsr = gBType.DataChgUsr, DataChgDate = gBType.DataChgDate - }, a => a.GBTypeId == gBType.GBTypeId); + }, a => a.RewardPunishmentTypeId == gBType.RewardPunishmentTypeId); } #endregion @@ -750,11 +770,11 @@ namespace EOM.TSHotelManagement.Application /// 基础URL /// /// - public Base GetBase() + public SystemInformation GetBase() { - var baseTemp = new Base(); + var baseTemp = new SystemInformation(); - baseTemp = baseRepository.GetSingle(a => a.url_no == 1); + baseTemp = baseRepository.GetSingle(a => a.UrlNumber == 1); return baseTemp; } diff --git a/EOM.TSHotelManagement.Application/Zero/Base/IBaseService.cs b/EOM.TSHotelManagement.Application/Zero/Base/IBaseService.cs index 5ef87da..26f8f61 100644 --- a/EOM.TSHotelManagement.Application/Zero/Base/IBaseService.cs +++ b/EOM.TSHotelManagement.Application/Zero/Base/IBaseService.cs @@ -21,6 +21,7 @@ *SOFTWARE. * */ +using EOM.TSHotelManagement.Common; using EOM.TSHotelManagement.Common.Core; namespace EOM.TSHotelManagement.Application @@ -36,37 +37,46 @@ namespace EOM.TSHotelManagement.Application /// 查询所有性别类型 /// /// - List SelectSexTypeAll(SexType sexType = null); + List SelectSexTypeAll(GenderType sexType = null); /// /// 查询性别类型 /// /// - SexType SelectSexType(SexType sexType); + GenderType SelectSexType(GenderType sexType); /// /// 添加性别类型 /// /// /// - bool AddSexType(SexType sexType); + bool AddSexType(GenderType sexType); /// /// 删除性别类型 /// /// /// - bool DelSexType(SexType sexType); + bool DelSexType(GenderType sexType); /// /// 更新性别类型 /// /// /// - bool UpdSexType(SexType sexType); + bool UpdSexType(GenderType sexType); #endregion + #region 面貌模块 + + /// + /// 查询所有面貌类型 + /// + /// + List SelectWorkerFeatureAll(); + #endregion + #region 职位模块 /// @@ -184,40 +194,40 @@ namespace EOM.TSHotelManagement.Application /// 查询所有部门类型(可用) /// /// - List SelectDeptAllCanUse(); + List SelectDeptAllCanUse(); /// /// 查询所有部门类型 /// /// - List SelectDeptAll(); + List SelectDeptAll(); /// /// 查询部门类型 /// /// - Dept SelectDept(Dept dept); + Department SelectDept(Department dept); /// /// 添加部门类型 /// /// /// - bool AddDept(Dept dept); + bool AddDept(Department dept); /// /// 删除部门类型 /// /// /// - bool DelDept(Dept dept); + bool DelDept(Department dept); /// /// 更新部门类型 /// /// /// - bool UpdDept(Dept dept); + bool UpdDept(Department dept); #endregion @@ -271,41 +281,41 @@ namespace EOM.TSHotelManagement.Application /// 查询所有证件类型(可用) /// /// - List SelectPassPortTypeAllCanUse(); + List SelectPassPortTypeAllCanUse(); /// /// 查询所有证件类型 /// /// - List SelectPassPortTypeAll(); + List SelectPassPortTypeAll(); /// /// 根据证件类型ID查询类型名称 /// /// /// - PassPortType SelectPassPortTypeByTypeId(PassPortType passPortType); + PassportType SelectPassPortTypeByTypeId(PassportType passPortType); /// /// 添加证件类型 /// /// /// - bool InsertPassPortType(PassPortType passPortType); + bool InsertPassPortType(PassportType passPortType); /// /// 删除证件类型 /// /// /// - bool DeletePassPortType(PassPortType portType); + bool DeletePassPortType(PassportType portType); /// /// 更新证件类型 /// /// /// - bool UpdatePassPortType(PassPortType portType); + bool UpdatePassPortType(PassportType portType); #endregion @@ -358,7 +368,7 @@ namespace EOM.TSHotelManagement.Application /// 基础URL /// /// - Base GetBase(); + SystemInformation GetBase(); #endregion } } diff --git a/EOM.TSHotelManagement.Application/Zero/CheckInfo/CheckInfoService.cs b/EOM.TSHotelManagement.Application/Zero/CheckInfo/CheckInfoService.cs index 4a46bab..7603f59 100644 --- a/EOM.TSHotelManagement.Application/Zero/CheckInfo/CheckInfoService.cs +++ b/EOM.TSHotelManagement.Application/Zero/CheckInfo/CheckInfoService.cs @@ -35,13 +35,13 @@ namespace EOM.TSHotelManagement.Application /// /// 监管统计 /// - private readonly GenericRepository checkInfoRepository; + private readonly GenericRepository checkInfoRepository; /// /// /// /// - public CheckInfoService(GenericRepository checkInfoRepository) + public CheckInfoService(GenericRepository checkInfoRepository) { this.checkInfoRepository = checkInfoRepository; } @@ -50,16 +50,16 @@ namespace EOM.TSHotelManagement.Application /// 查询所有监管统计信息 /// /// - public List SelectCheckInfoAll() + public List SelectCheckInfoAll() { - List cif = new List(); + List cif = new List(); cif = checkInfoRepository.GetList(a => a.IsDelete != 1); - var deptId = cif.Select(a => a.CheckClub).ToList(); - var depts = checkInfoRepository.Change().GetList(a => deptId.Contains(a.dept_no)); + var deptId = cif.Select(a => a.SupervisingDepartment).ToList(); + var depts = checkInfoRepository.Change().GetList(a => deptId.Contains(a.DepartmentNumber)); cif.ForEach(c => { - var dept = depts.SingleOrDefault(a => a.dept_no == c.CheckClub); - c.CheckClubName = !dept.IsNullOrEmpty() ? dept.dept_name : string.Empty; + var dept = depts.SingleOrDefault(a => a.DepartmentNumber == c.SupervisingDepartment); + c.SupervisingDepartmentName = !dept.IsNullOrEmpty() ? dept.DepartmentName : string.Empty; }); return cif; } @@ -69,7 +69,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool InsertCheckInfo(CheckInfo checkInfo) + public bool InsertCheckInfo(SupervisionStatistics checkInfo) { return checkInfoRepository.Insert(checkInfo); } @@ -79,20 +79,20 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool UpdateCheckInfo(CheckInfo checkInfo) + public bool UpdateCheckInfo(SupervisionStatistics checkInfo) { - return checkInfoRepository.Update(a => new CheckInfo + return checkInfoRepository.Update(a => new SupervisionStatistics { - CheckClub = checkInfo.CheckClub, - CheckCash = checkInfo.CheckCash, - CheckScore = checkInfo.CheckScore, - CheckAdvice = checkInfo.CheckAdvice, - CheckPerson = checkInfo.CheckPerson, - CheckProgres = checkInfo.CheckProgres, + SupervisingDepartment = checkInfo.SupervisingDepartment, + SupervisionLoss = checkInfo.SupervisionLoss, + SupervisionScore = checkInfo.SupervisionScore, + SupervisionAdvice = checkInfo.SupervisionAdvice, + SupervisionStatistician = checkInfo.SupervisionStatistician, + SupervisionProgress = checkInfo.SupervisionProgress, IsDelete = 0, DataChgUsr = checkInfo.DataChgUsr, DataChgDate = checkInfo.DataChgDate - },a => a.CheckNo == checkInfo.CheckNo); + },a => a.StatisticsNumber == checkInfo.StatisticsNumber); } /// @@ -100,14 +100,14 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool DeleteCheckInfo(CheckInfo checkInfo) + public bool DeleteCheckInfo(SupervisionStatistics checkInfo) { - return checkInfoRepository.Update(a => new CheckInfo + return checkInfoRepository.Update(a => new SupervisionStatistics { IsDelete = 1, DataChgUsr = checkInfo.DataChgUsr, DataChgDate = checkInfo.DataChgDate - }, a => a.CheckNo == checkInfo.CheckNo); + }, a => a.StatisticsNumber == checkInfo.StatisticsNumber); } } } diff --git a/EOM.TSHotelManagement.Application/Zero/CheckInfo/ICheckInfoService.cs b/EOM.TSHotelManagement.Application/Zero/CheckInfo/ICheckInfoService.cs index b236270..5dd0526 100644 --- a/EOM.TSHotelManagement.Application/Zero/CheckInfo/ICheckInfoService.cs +++ b/EOM.TSHotelManagement.Application/Zero/CheckInfo/ICheckInfoService.cs @@ -34,27 +34,27 @@ namespace EOM.TSHotelManagement.Application /// 查询所有监管统计信息 /// /// - List SelectCheckInfoAll(); + List SelectCheckInfoAll(); /// /// 插入监管统计信息 /// /// /// - bool InsertCheckInfo(CheckInfo checkInfo); + bool InsertCheckInfo(SupervisionStatistics checkInfo); /// /// 更新监管统计信息 /// /// /// - bool UpdateCheckInfo(CheckInfo checkInfo); + bool UpdateCheckInfo(SupervisionStatistics checkInfo); /// /// 删除监管统计信息 /// /// /// - bool DeleteCheckInfo(CheckInfo checkInfo); + bool DeleteCheckInfo(SupervisionStatistics checkInfo); } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Application/Zero/Menu/MenuService.cs b/EOM.TSHotelManagement.Application/Zero/Menu/MenuService.cs index cfb2960..0c6cb9d 100644 --- a/EOM.TSHotelManagement.Application/Zero/Menu/MenuService.cs +++ b/EOM.TSHotelManagement.Application/Zero/Menu/MenuService.cs @@ -116,14 +116,14 @@ namespace EOM.TSHotelManagement.Application { MenuViewModel viewModel = new MenuViewModel { - key = menu.Key, - title = menu.Title, - path = menu.Path, - children = BuildMenuTree(menus, menu.Id) + Key = menu.Key, + Title = menu.Title, + Path = menu.Path, + Children = BuildMenuTree(menus, menu.Id) }; - if (viewModel.children.Count == 0) + if (viewModel.Children.Count == 0) { - viewModel.children = null; + viewModel.Children = null; } result.Add(viewModel); } diff --git a/EOM.TSHotelManagement.Application/Zero/Module/AdminModuleZeroService.cs b/EOM.TSHotelManagement.Application/Zero/Module/AdminModuleZeroService.cs index 5a00816..225d7e8 100644 --- a/EOM.TSHotelManagement.Application/Zero/Module/AdminModuleZeroService.cs +++ b/EOM.TSHotelManagement.Application/Zero/Module/AdminModuleZeroService.cs @@ -11,13 +11,13 @@ namespace EOM.TSHotelManagement.Application /// /// 模块权限 /// - private readonly GenericRepository moduleZeroRepository; + private readonly GenericRepository moduleZeroRepository; /// /// /// /// - public AdminModuleZeroService(GenericRepository moduleZeroRepository) + public AdminModuleZeroService(GenericRepository moduleZeroRepository) { this.moduleZeroRepository = moduleZeroRepository; } @@ -31,37 +31,37 @@ namespace EOM.TSHotelManagement.Application List modules = moduleZeroRepository.Change().GetList(); modules.ForEach(source => { - switch (source.module_name) + switch (source.ModuleName) { case ModuleConsts.BaseInfo: - source.module_name = ModuleConsts.BaseInfo + "||" + "基础信息"; + source.ModuleName = ModuleConsts.BaseInfo + "||" + "基础信息"; break; case ModuleConsts.CashInfo: - source.module_name = ModuleConsts.CashInfo + "||" + "财务信息"; + source.ModuleName = ModuleConsts.CashInfo + "||" + "财务信息"; break; case ModuleConsts.WtiInfo: - source.module_name = ModuleConsts.WtiInfo + "||" + "水电管理"; + source.ModuleName = ModuleConsts.WtiInfo + "||" + "水电管理"; break; - case ModuleConsts.CheckInfo: - source.module_name = ModuleConsts.CheckInfo + "||" + "监管统计"; + case ModuleConsts.SupervisionStatistics: + source.ModuleName = ModuleConsts.SupervisionStatistics + "||" + "监管统计"; break; case ModuleConsts.RoomManager: - source.module_name = ModuleConsts.RoomManager + "||" + "客房管理"; + source.ModuleName = ModuleConsts.RoomManager + "||" + "客房管理"; break; case ModuleConsts.CustomerManager: - source.module_name = ModuleConsts.CustomerManager + "||" + "客户管理"; + source.ModuleName = ModuleConsts.CustomerManager + "||" + "客户管理"; break; case ModuleConsts.HumanResourcesManager: - source.module_name = ModuleConsts.HumanResourcesManager + "||" + "人事管理"; + source.ModuleName = ModuleConsts.HumanResourcesManager + "||" + "人事管理"; break; case ModuleConsts.MaterialManager: - source.module_name = ModuleConsts.MaterialManager + "||" + "物资管理"; + source.ModuleName = ModuleConsts.MaterialManager + "||" + "物资管理"; break; case ModuleConsts.OperationLogManager: - source.module_name = ModuleConsts.OperationLogManager + "||" + "员工操作日志"; + source.ModuleName = ModuleConsts.OperationLogManager + "||" + "员工操作日志"; break; case ModuleConsts.AdminManager: - source.module_name = ModuleConsts.AdminManager + "||" + "系统管理"; + source.ModuleName = ModuleConsts.AdminManager + "||" + "系统管理"; break; } }); @@ -73,43 +73,43 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public List GetAllModuleByAdmin(Admin admin) + public List GetAllModuleByAdmin(Administrator admin) { - List moduleZeros = moduleZeroRepository.GetList(a => a.admin_account.Equals(admin.AdminAccount) - && a.module_enable == 1); + List moduleZeros = moduleZeroRepository.GetList(a => a.AdministratorAccount.Equals(admin.Account) + && a.ModuleEnabled == 1); moduleZeros.ForEach(source => { - switch (source.module_name) + switch (source.ModuleName) { case ModuleConsts.BaseInfo: - source.module_name = ModuleConsts.BaseInfo + "||" + "基础信息"; + source.ModuleName = ModuleConsts.BaseInfo + "||" + "基础信息"; break; case ModuleConsts.CashInfo: - source.module_name = ModuleConsts.CashInfo + "||" + "财务信息"; + source.ModuleName = ModuleConsts.CashInfo + "||" + "财务信息"; break; case ModuleConsts.WtiInfo: - source.module_name = ModuleConsts.WtiInfo + "||" + "水电管理"; + source.ModuleName = ModuleConsts.WtiInfo + "||" + "水电管理"; break; - case ModuleConsts.CheckInfo: - source.module_name = ModuleConsts.CheckInfo + "||" + "监管统计"; + case ModuleConsts.SupervisionStatistics: + source.ModuleName = ModuleConsts.SupervisionStatistics + "||" + "监管统计"; break; case ModuleConsts.RoomManager: - source.module_name = ModuleConsts.RoomManager + "||" + "客房管理"; + source.ModuleName = ModuleConsts.RoomManager + "||" + "客房管理"; break; case ModuleConsts.CustomerManager: - source.module_name = ModuleConsts.CustomerManager + "||" + "客户管理"; + source.ModuleName = ModuleConsts.CustomerManager + "||" + "客户管理"; break; case ModuleConsts.HumanResourcesManager: - source.module_name = ModuleConsts.HumanResourcesManager + "||" + "人事管理"; + source.ModuleName = ModuleConsts.HumanResourcesManager + "||" + "人事管理"; break; case ModuleConsts.MaterialManager: - source.module_name = ModuleConsts.MaterialManager + "||" + "物资管理"; + source.ModuleName = ModuleConsts.MaterialManager + "||" + "物资管理"; break; case ModuleConsts.OperationLogManager: - source.module_name = ModuleConsts.OperationLogManager + "||" + "员工操作日志"; + source.ModuleName = ModuleConsts.OperationLogManager + "||" + "员工操作日志"; break; case ModuleConsts.AdminManager: - source.module_name = ModuleConsts.AdminManager + "||" + "系统管理"; + source.ModuleName = ModuleConsts.AdminManager + "||" + "系统管理"; break; } }); @@ -121,11 +121,11 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool AddModuleZeroList(List moduleZeros) + public bool AddModuleZeroList(List moduleZeros) { moduleZeros.ForEach(moduleZero => { - moduleZero.module_name = moduleZero.module_name.Split('|', '|').FirstOrDefault().ToString(); + moduleZero.ModuleName = moduleZero.ModuleName.Split('|', '|').FirstOrDefault().ToString(); }); var result = moduleZeroRepository.InsertRange(moduleZeros); return result; @@ -136,9 +136,9 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool DelModuleZeroList(ModuleZero moduleZero) + public bool DelModuleZeroList(ModulePermission moduleZero) { - var result = moduleZeroRepository.Delete(a => a.admin_account.Equals(moduleZero.admin_account)); + var result = moduleZeroRepository.Delete(a => a.AdministratorAccount.Equals(moduleZero.AdministratorAccount)); return result; } diff --git a/EOM.TSHotelManagement.Application/Zero/Module/IAdminModuleZeroService.cs b/EOM.TSHotelManagement.Application/Zero/Module/IAdminModuleZeroService.cs index c92cf36..57172e8 100644 --- a/EOM.TSHotelManagement.Application/Zero/Module/IAdminModuleZeroService.cs +++ b/EOM.TSHotelManagement.Application/Zero/Module/IAdminModuleZeroService.cs @@ -18,21 +18,21 @@ namespace EOM.TSHotelManagement.Application /// /// /// - List GetAllModuleByAdmin(Admin admin); + List GetAllModuleByAdmin(Administrator admin); /// /// 批量添加模块 /// /// /// - bool AddModuleZeroList(List moduleZeros); + bool AddModuleZeroList(List moduleZeros); /// /// 批量删除模块 /// /// /// - bool DelModuleZeroList(ModuleZero moduleZero); + bool DelModuleZeroList(ModulePermission moduleZero); } } diff --git a/EOM.TSHotelManagement.Application/Zero/Notice/INoticeService.cs b/EOM.TSHotelManagement.Application/Zero/Notice/INoticeService.cs index 235d711..9197f10 100644 --- a/EOM.TSHotelManagement.Application/Zero/Notice/INoticeService.cs +++ b/EOM.TSHotelManagement.Application/Zero/Notice/INoticeService.cs @@ -35,7 +35,7 @@ namespace EOM.TSHotelManagement.Application /// 获取所有公告信息 /// /// - List SelectNoticeAll(); + List SelectNoticeAll(); #endregion /// @@ -43,7 +43,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - Notice SelectNoticeByNoticeNo(string noticeId); + AppointmentNotice SelectNoticeByNoticeNo(string noticeId); #region 上传公告信息 /// @@ -51,7 +51,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - bool InsertNotice(Notice notice); + bool InsertNotice(AppointmentNotice notice); #endregion } diff --git a/EOM.TSHotelManagement.Application/Zero/Notice/NoticeService.cs b/EOM.TSHotelManagement.Application/Zero/Notice/NoticeService.cs index d8df107..861bc6b 100644 --- a/EOM.TSHotelManagement.Application/Zero/Notice/NoticeService.cs +++ b/EOM.TSHotelManagement.Application/Zero/Notice/NoticeService.cs @@ -34,13 +34,13 @@ namespace EOM.TSHotelManagement.Application /// /// 公告 /// - private readonly GenericRepository noticeRepository; + private readonly GenericRepository noticeRepository; /// /// /// /// - public NoticeService(GenericRepository noticeRepository) + public NoticeService(GenericRepository noticeRepository) { this.noticeRepository = noticeRepository; } @@ -50,19 +50,19 @@ namespace EOM.TSHotelManagement.Application /// 获取所有公告信息 /// /// - public List SelectNoticeAll() + public List SelectNoticeAll() { - List ntc = new List(); + List ntc = new List(); ntc = noticeRepository.GetList(a => a.IsDelete != 1); ntc.ForEach(source => { switch (source.NoticeType) { case "PersonnelChanges": - source.NoticeTypeName = "人事变动"; + source.NoticeTypeDescription = "人事变动"; break; case "GeneralNotice": - source.NoticeTypeName = "普通公告"; + source.NoticeTypeDescription = "普通公告"; break; } }); @@ -75,17 +75,17 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public Notice SelectNoticeByNoticeNo(string noticeId) + public AppointmentNotice SelectNoticeByNoticeNo(string noticeId) { - Notice notice = new Notice(); - notice = noticeRepository.GetSingle(a => a.NoticeNo == noticeId); + AppointmentNotice notice = new AppointmentNotice(); + notice = noticeRepository.GetSingle(a => a.NoticeNumber == noticeId); switch (notice.NoticeType) { case "PersonnelChanges": - notice.NoticeTypeName = "人事变动"; + notice.NoticeTypeDescription = "人事变动"; break; case "GeneralNotice": - notice.NoticeTypeName = "普通公告"; + notice.NoticeTypeDescription = "普通公告"; break; } return notice; @@ -97,7 +97,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool InsertNotice(Notice notice) + public bool InsertNotice(AppointmentNotice notice) { return noticeRepository.Insert(notice); } diff --git a/EOM.TSHotelManagement.Application/Zero/VipRule/IVipRuleAppService.cs b/EOM.TSHotelManagement.Application/Zero/VipRule/IVipRuleAppService.cs index 62c5e21..2a9d9d2 100644 --- a/EOM.TSHotelManagement.Application/Zero/VipRule/IVipRuleAppService.cs +++ b/EOM.TSHotelManagement.Application/Zero/VipRule/IVipRuleAppService.cs @@ -35,34 +35,34 @@ namespace EOM.TSHotelManagement.Application /// 查询会员等级规则列表 /// /// - List SelectVipRuleList(); + List SelectVipRuleList(); /// /// 查询会员等级规则 /// /// /// - VipRule SelectVipRule(VipRule vipRule); + VipLevelRule SelectVipRule(VipLevelRule vipRule); /// /// 添加会员等级规则 /// /// /// - bool AddVipRule(VipRule vipRule); + bool AddVipRule(VipLevelRule vipRule); /// /// 删除会员等级规则 /// /// /// - bool DelVipRule(VipRule vipRule); + bool DelVipRule(VipLevelRule vipRule); /// /// 更新会员等级规则 /// /// /// - bool UpdVipRule(VipRule vipRule); + bool UpdVipRule(VipLevelRule vipRule); } } diff --git a/EOM.TSHotelManagement.Application/Zero/VipRule/VipRuleAppService.cs b/EOM.TSHotelManagement.Application/Zero/VipRule/VipRuleAppService.cs index 256dcca..a0a56c2 100644 --- a/EOM.TSHotelManagement.Application/Zero/VipRule/VipRuleAppService.cs +++ b/EOM.TSHotelManagement.Application/Zero/VipRule/VipRuleAppService.cs @@ -34,7 +34,7 @@ namespace EOM.TSHotelManagement.Application /// /// 会员等级规则 /// - private readonly GenericRepository vipRuleRepository; + private readonly GenericRepository vipRuleRepository; /// /// 客户类型 @@ -46,7 +46,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public VipRuleAppService(GenericRepository vipRuleRepository, GenericRepository custoTypeRepository) + public VipRuleAppService(GenericRepository vipRuleRepository, GenericRepository custoTypeRepository) { this.vipRuleRepository = vipRuleRepository; this.custoTypeRepository = custoTypeRepository; @@ -56,9 +56,9 @@ namespace EOM.TSHotelManagement.Application /// 查询会员等级规则列表 /// /// - public List SelectVipRuleList() + public List SelectVipRuleList() { - List vipRules = new List(); + List vipRules = new List(); var listSource = vipRuleRepository.GetList(a => a.IsDelete != 1); @@ -66,8 +66,8 @@ namespace EOM.TSHotelManagement.Application listSource.ForEach(source => { - var userType = listUserType.FirstOrDefault(a => a.UserType == source.TypeId); - source.TypeName = userType == null ? "" : userType.TypeName; + var userType = listUserType.FirstOrDefault(a => a.CustomerType == source.VipLevelId); + source.VipLevelName = userType == null ? "" : userType.CustomerTypeName; }); vipRules = listSource; @@ -80,14 +80,14 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public VipRule SelectVipRule(VipRule vipRule) + public VipLevelRule SelectVipRule(VipLevelRule vipRule) { - VipRule vipRule1 = new VipRule(); + VipLevelRule vipRule1 = new VipLevelRule(); - var source = vipRuleRepository.GetSingle(a => a.RuleId.Equals(vipRule.RuleId)); + var source = vipRuleRepository.GetSingle(a => a.RuleSerialNumber.Equals(vipRule.RuleSerialNumber)); - var userType = custoTypeRepository.GetSingle(a => a.UserType == source.TypeId); - source.TypeName = userType == null ? "" : userType.TypeName; + var userType = custoTypeRepository.GetSingle(a => a.CustomerType == source.VipLevelId); + source.VipLevelName = userType == null ? "" : userType.CustomerTypeName; vipRule1 = source; @@ -99,14 +99,14 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool AddVipRule(VipRule vipRule) + public bool AddVipRule(VipLevelRule vipRule) { - return vipRuleRepository.Insert(new VipRule() + return vipRuleRepository.Insert(new VipLevelRule() { - RuleId = vipRule.RuleId, + RuleSerialNumber = vipRule.RuleSerialNumber, RuleName = vipRule.RuleName, RuleValue = vipRule.RuleValue, - TypeId = vipRule.TypeId, + VipLevelId = vipRule.VipLevelId, IsDelete = 0, DataInsUsr = vipRule.DataInsUsr, }); @@ -117,13 +117,13 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool DelVipRule(VipRule vipRule) + public bool DelVipRule(VipLevelRule vipRule) { - return vipRuleRepository.Update(a => new VipRule + return vipRuleRepository.Update(a => new VipLevelRule { IsDelete = 1, DataChgUsr = vipRule.DataChgUsr, - }, a => a.RuleId == vipRule.RuleId); + }, a => a.RuleSerialNumber == vipRule.RuleSerialNumber); } /// @@ -131,16 +131,16 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool UpdVipRule(VipRule vipRule) + public bool UpdVipRule(VipLevelRule vipRule) { - return vipRuleRepository.Update(a => new VipRule + return vipRuleRepository.Update(a => new VipLevelRule { RuleName = vipRule.RuleName, RuleValue = vipRule.RuleValue, IsDelete = vipRule.IsDelete, DataChgUsr = vipRule.DataChgUsr, DataChgDate = vipRule.DataChgDate - }, a => a.RuleId == vipRule.RuleId); + }, a => a.RuleSerialNumber == vipRule.RuleSerialNumber); } } } diff --git a/EOM.TSHotelManagement.Common.Core/BaseDTO.cs b/EOM.TSHotelManagement.Common.Core/BaseDTO.cs index bd408d1..016e5cb 100644 --- a/EOM.TSHotelManagement.Common.Core/BaseDTO.cs +++ b/EOM.TSHotelManagement.Common.Core/BaseDTO.cs @@ -2,7 +2,7 @@ namespace EOM.TSHotelManagement.Common.Core { - public class BaseDTO + public class BaseDto { /// diff --git a/EOM.TSHotelManagement.Common.Core/Business/Cash/Cash.cs b/EOM.TSHotelManagement.Common.Core/Business/Asset/Asset.cs similarity index 58% rename from EOM.TSHotelManagement.Common.Core/Business/Cash/Cash.cs rename to EOM.TSHotelManagement.Common.Core/Business/Asset/Asset.cs index 370a0cd..12681fb 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Cash/Cash.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Asset/Asset.cs @@ -30,59 +30,76 @@ namespace EOM.TSHotelManagement.Common.Core /// 资产管理 /// [SqlSugar.SugarTable("cashinfo")] - public class Cash : BaseDTO + public class Asset : BaseDto { /// - /// 资产编号 + /// 资产编号 (Asset Number) /// + [SqlSugar.SugarColumn(ColumnName = "CashNo")] [NeedValid] - public string CashNo { get; set; } + public string AssetNumber { get; set; } + /// - /// 资产名称 + /// 资产名称 (Asset Name) /// + [SqlSugar.SugarColumn(ColumnName = "CashName")] [NeedValid] - public string CashName { get; set; } + public string AssetName { get; set; } + /// - /// 资产总值 + /// 资产总值 (Asset Value) /// + [SqlSugar.SugarColumn(ColumnName = "CashPrice")] [NeedValid] - public decimal CashPrice { get; set; } + public decimal AssetValue { get; set; } + /// - /// 资产总值描述 + /// 资产总值描述 (格式化后的字符串) (Asset Value Description - Formatted) /// [SqlSugar.SugarColumn(IsIgnore = true)] [NeedValid] - public string CashPriceStr { get; set; } + public string AssetValueFormatted { get; set; } + /// - /// 所属部门 + /// 所属部门代码 (Department Code) /// + [SqlSugar.SugarColumn(ColumnName = "CashClub")] [NeedValid] - public string CashClub { get; set; } + public string DepartmentCode { get; set; } + /// - /// 所属部门描述 + /// 所属部门名称 (Department Name) /// [SqlSugar.SugarColumn(IsIgnore = true)] - public string DeptName { get; set; } + public string DepartmentName { get; set; } + /// - /// 入库时间 + /// 入库时间 (购置日期) (Acquisition Date) /// + [SqlSugar.SugarColumn(ColumnName = "CashTime")] [NeedValid] - public DateTime CashTime { get; set; } + public DateTime AcquisitionDate { get; set; } + /// - /// 资产来源 + /// 资产来源 (Asset Source) /// + [SqlSugar.SugarColumn(ColumnName = "CashSource")] [NeedValid] - public string CashSource { get; set; } + public string AssetSource { get; set; } + /// - /// 资产经办人 + /// 资产经办人 (员工ID) (Acquired By - Employee ID) /// + [SqlSugar.SugarColumn(ColumnName = "CashPerson")] [NeedValid] - public string CashPerson { get; set; } + public string AcquiredByEmployeeId { get; set; } + /// - /// 资产经办人 + /// 资产经办人姓名 (Acquired By - Employee Name) /// [SqlSugar.SugarColumn(IsIgnore = true)] - public string PersonName { get; set; } + public string AcquiredByEmployeeName { get; set; } + } } diff --git a/EOM.TSHotelManagement.Common.Core/Business/Customer/CustoType.cs b/EOM.TSHotelManagement.Common.Core/Business/Customer/CustoType.cs index eb754d1..84d3ee1 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Customer/CustoType.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Customer/CustoType.cs @@ -28,15 +28,19 @@ namespace EOM.TSHotelManagement.Common.Core /// 客户类型 /// [SqlSugar.SugarTable("usertype")] - public class CustoType : BaseDTO + public class CustoType : BaseDto { /// - /// 客户类型 + /// 客户类型 (Customer Type) /// - public int UserType { get; set; } + [SqlSugar.SugarColumn(ColumnName = "UserType")] + public int CustomerType { get; set; } + /// - /// 类型名字 + /// 客户类型名称 (Customer Type Name) /// - public string TypeName { get; set; } + [SqlSugar.SugarColumn(ColumnName = "TypeName")] + public string CustomerTypeName { get; set; } + } } diff --git a/EOM.TSHotelManagement.Common.Core/Business/Customer/Custo.cs b/EOM.TSHotelManagement.Common.Core/Business/Customer/Customer.cs similarity index 73% rename from EOM.TSHotelManagement.Common.Core/Business/Customer/Custo.cs rename to EOM.TSHotelManagement.Common.Core/Business/Customer/Customer.cs index ba14baa..7b18a2e 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Customer/Custo.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Customer/Customer.cs @@ -31,82 +31,87 @@ namespace EOM.TSHotelManagement.Common.Core /// 客户信息 /// [SqlSugar.SugarTable("customer")] - public class Custo : BaseDTO + public class Customer : BaseDto { /// - /// 自增ID - /// - //[SqlSugar.SugarColumn(ColumnName = "id", IsPrimaryKey = true,IsIdentity = true)] - //public int Id { get; set; } - /// - /// 客户编号 + /// 客户编号 (Customer Number) /// [UIDisplay("客户编号")] [SqlSugar.SugarColumn(ColumnName = "custo_no", IsPrimaryKey = true)] - public string CustoNo { get; set; } + public string CustomerNumber { get; set; } + /// - /// 客户名称 + /// 客户名称 (Customer Name) /// [UIDisplay("客户名称")] [SqlSugar.SugarColumn(ColumnName = "custo_name", IsNullable = false)] - public string CustoName { get; set; } + public string CustomerName { get; set; } + /// - /// 客户性别 + /// 客户性别 (Customer Gender) /// [SqlSugar.SugarColumn(ColumnName = "custo_sex", IsNullable = true)] - public int? CustoSex { get; set; } + public int? CustomerGender { get; set; } + /// - /// 证件类型 + /// 证件类型 (Passport Type) /// [SqlSugar.SugarColumn(ColumnName = "passport_type", IsNullable = false)] public int PassportType { get; set; } + /// - /// 性别 + /// 性别 (Gender) /// [UIDisplay("性别")] [SqlSugar.SugarColumn(IsIgnore = true)] - public string SexName { get; set; } + public string GenderName { get; set; } + /// - /// 客户电话 + /// 客户电话 (Customer Phone Number) /// [UIDisplay("联系方式")] [SqlSugar.SugarColumn(ColumnName = "custo_tel", IsNullable = false)] - public string CustoTel { get; set; } + public string CustomerPhoneNumber { get; set; } + /// - /// 出生日期 + /// 出生日期 (Date of Birth) /// [UIDisplay("出生日期")] [SqlSugar.SugarColumn(ColumnName = "custo_birth", IsNullable = true)] - public DateTime CustoBirth { get; set; } + public DateTime DateOfBirth { get; set; } + /// - /// 客户类型 + /// 客户类型名称 (Customer Type Name) /// [UIDisplay("客户类型")] [SqlSugar.SugarColumn(IsIgnore = true)] - public string typeName { get; set; } + public string CustomerTypeName { get; set; } + /// - /// 证件类型 + /// 证件类型名称 (Passport Type Name) /// [UIDisplay("证件类型")] [SqlSugar.SugarColumn(IsIgnore = true)] - public string PassportName { get; set; } + public string PassportTypeName { get; set; } + /// - /// 证件号码 + /// 证件号码 (Passport ID) /// [UIDisplay("证件号码")] [SqlSugar.SugarColumn(ColumnName = "passport_id", IsNullable = false)] - public string CustoID { get; set; } + public string PassportID { get; set; } + /// - /// 居住地址 + /// 居住地址 (Customer Address) /// [UIDisplay("客户地址")] [SqlSugar.SugarColumn(ColumnName = "custo_address", IsNullable = true)] - public string CustoAddress { get; set; } + public string CustomerAddress { get; set; } + /// - /// 客户类型 + /// 客户类型 (Customer Type) /// [SqlSugar.SugarColumn(ColumnName = "custo_type", IsNullable = false)] - public int CustoType { get; set; } - + public int CustomerType { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/Business/Customer/SexType.cs b/EOM.TSHotelManagement.Common.Core/Business/Customer/GenderType.cs similarity index 81% rename from EOM.TSHotelManagement.Common.Core/Business/Customer/SexType.cs rename to EOM.TSHotelManagement.Common.Core/Business/Customer/GenderType.cs index d915185..9f80dd6 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Customer/SexType.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Customer/GenderType.cs @@ -28,16 +28,19 @@ namespace EOM.TSHotelManagement.Common.Core /// 性别 /// [SqlSugar.SugarTable("sextype")] - public class SexType : BaseDTO + public class GenderType : BaseDto { /// - /// 性别ID + /// 性别 ID (Gender ID) /// - public int sexId { get; set; } + [SqlSugar.SugarColumn(ColumnName = "sexId")] + public int GenderId { get; set; } /// - /// 性别名称 + /// 性别名称 (Gender Name) /// - public string sexName { get; set; } + [SqlSugar.SugarColumn(ColumnName = "sexName")] + public string GenderName { get; set; } + } } diff --git a/EOM.TSHotelManagement.Common.Core/Business/Customer/PassPortType.cs b/EOM.TSHotelManagement.Common.Core/Business/Customer/PassPortType.cs index 5c50029..10b9f71 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Customer/PassPortType.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Customer/PassPortType.cs @@ -28,16 +28,18 @@ namespace EOM.TSHotelManagement.Common.Core /// 证件类型 /// [SqlSugar.SugarTable("passporttype")] - public class PassPortType : BaseDTO + public class PassportType : BaseDto { /// /// 证件类型 /// + [SqlSugar.SugarColumn(ColumnName = "PassportId")] public int PassportId { get; set; } /// /// 证件名称 /// + [SqlSugar.SugarColumn(ColumnName = "PassportName")] public string PassportName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/Business/Hydroelectricity/Hydroelectricity.cs b/EOM.TSHotelManagement.Common.Core/Business/Hydroelectricity/Hydroelectricity.cs index 395ae3c..b3d690d 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Hydroelectricity/Hydroelectricity.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Hydroelectricity/Hydroelectricity.cs @@ -30,49 +30,54 @@ namespace EOM.TSHotelManagement.Common.Core /// 水电信息 /// [SqlSugar.SugarTable("wtinfo")] - public class Hydroelectricity : BaseDTO + public class Hydroelectricity : BaseDto { /// - /// 信息编号 + /// 信息编号 (Information ID) /// [SqlSugar.SugarColumn(ColumnName = "WtiNo", IsIdentity = true, IsPrimaryKey = true)] - public int WtiNo { get; set; } + public int InformationId { get; set; } + /// - /// 房间编号 + /// 房间编号 (Room Number) /// [SqlSugar.SugarColumn(ColumnName = "RoomNo")] - public string RoomNo { get; set; } + public string RoomNumber { get; set; } + /// - /// 开始使用时间 + /// 开始使用时间 (Start Date) /// [SqlSugar.SugarColumn(ColumnName = "UseDate")] - public DateTime UseDate { get; set; } + public DateTime StartDate { get; set; } + /// - /// 结束使用时间 + /// 结束使用时间 (End Date) /// [SqlSugar.SugarColumn(ColumnName = "EndDate")] public DateTime EndDate { get; set; } + /// - /// 水费 + /// 水费 (Water Usage) /// [SqlSugar.SugarColumn(ColumnName = "WaterUse")] - public decimal WaterUse { get; set; } + public decimal WaterUsage { get; set; } + /// - /// 电费 + /// 电费 (Power Usage) /// [SqlSugar.SugarColumn(ColumnName = "PowerUse")] - public decimal PowerUse { get; set; } + public decimal PowerUsage { get; set; } + /// - /// 记录员 + /// 记录员 (Recorder) /// - [SqlSugar.SugarColumn(ColumnName = "Record", DefaultValue = "Admin")] - public string Record { get; set; } + [SqlSugar.SugarColumn(ColumnName = "Record", DefaultValue = "Administrator")] + public string Recorder { get; set; } + /// - /// 客户编号 + /// 客户编号 (Customer Number) /// [SqlSugar.SugarColumn(ColumnName = "CustoNo")] - public string CustoNo { get; set; } - - + public string CustomerNumber { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/Business/Fonts/Fonts.cs b/EOM.TSHotelManagement.Common.Core/Business/PromotionContent/PromotionContent.cs similarity index 79% rename from EOM.TSHotelManagement.Common.Core/Business/Fonts/Fonts.cs rename to EOM.TSHotelManagement.Common.Core/Business/PromotionContent/PromotionContent.cs index ca5a7b8..9fbca95 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Fonts/Fonts.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/PromotionContent/PromotionContent.cs @@ -28,16 +28,19 @@ namespace EOM.TSHotelManagement.Common.Core /// 酒店宣传联动内容 /// [SqlSugar.SugarTable("fonts")] - public class Fonts + public class PromotionContent { /// - /// 宣传内容编号 + /// 宣传内容编号 (Promotion Content ID) /// - public int FontsId { get; set; } + [SqlSugar.SugarColumn(ColumnName = "FontsId")] + public int PromotionContentId { get; set; } /// - /// 宣传内容 + /// 宣传内容 (Promotion Content Message) /// - public string FontsMess { get; set; } + [SqlSugar.SugarColumn(ColumnName = "FontsMess")] + public string PromotionContentMessage { get; set; } + } } diff --git a/EOM.TSHotelManagement.Common.Core/Business/Reser/Reser.cs b/EOM.TSHotelManagement.Common.Core/Business/Reser/Reser.cs index e54371a..198298f 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Reser/Reser.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Reser/Reser.cs @@ -30,36 +30,48 @@ namespace EOM.TSHotelManagement.Common.Core /// 预约列表 /// [SqlSugar.SugarTable("reser")] - public class Reser : BaseDTO + public class Reser : BaseDto { /// - /// 预约编号 + /// 预约编号 (Reservation ID) /// - public string ReserId { get; set; } + [SqlSugar.SugarColumn(ColumnName = "ReserId")] + public string ReservationId { get; set; } + /// - /// 客户名称 + /// 客户名称 (Customer Name) /// - public string CustoName { get; set; } + [SqlSugar.SugarColumn(ColumnName = "CustoName")] + public string CustomerName { get; set; } + /// - /// 预约电话 + /// 预约电话 (Reservation Phone Number) /// - public string CustoTel { get; set; } + [SqlSugar.SugarColumn(ColumnName = "CustoTel")] + public string ReservationPhoneNumber { get; set; } + /// - /// 预约渠道 + /// 预约渠道 (Reservation Channel) /// - public string ReserWay { get; set; } + [SqlSugar.SugarColumn(ColumnName = "ReserWay")] + public string ReservationChannel { get; set; } + /// - /// 预约房号 + /// 预约房号 (Reservation Room Number) /// - public string ReserRoom { get; set; } + [SqlSugar.SugarColumn(ColumnName = "ReserRoom")] + public string ReservationRoomNumber { get; set; } + /// - /// 预约起始 + /// 预约起始日期 (Reservation Start Date) /// - public DateTime ReserDate { get; set; } + [SqlSugar.SugarColumn(ColumnName = "ReserDate")] + public DateTime ReservationStartDate { get; set; } + /// - /// 预约止日 + /// 预约结束日期 (Reservation End Date) /// - public DateTime ReserEndDay { get; set; } - + [SqlSugar.SugarColumn(ColumnName = "ReserEndDay")] + public DateTime ReservationEndDate { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/Business/Room/Room.cs b/EOM.TSHotelManagement.Common.Core/Business/Room/Room.cs index dd93a7c..487a74b 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Room/Room.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Room/Room.cs @@ -23,93 +23,106 @@ *模块说明:房间类 */ using EOM.TSHotelManagement.Common.Util; +using SqlSugar; using System; -//using System.ComponentModel.DataAnnotations.Schema; namespace EOM.TSHotelManagement.Common.Core { /// - /// 房间实体类 + /// 房间实体类 (Room Entity) /// - [SqlSugar.SugarTable("room")] - public class Room : BaseDTO + [SugarTable("room")] + public class Room : BaseDto { /// - /// 房间编号 + /// 房间编号 (Room Number) /// - [SqlSugar.SugarColumn(ColumnName = "room_no", IsPrimaryKey = true)] + [SugarColumn(ColumnName = "room_no", IsPrimaryKey = true)] [NeedValid] - public string RoomNo { get; set; } + public string RoomNumber { get; set; } + /// - /// 房间类型 + /// 房间类型 (Room Type) /// - [SqlSugar.SugarColumn(ColumnName = "room_type")] + [SugarColumn(ColumnName = "room_type")] [NeedValid] public int RoomType { get; set; } + /// - /// 客户编号 + /// 客户编号 (Customer Number) /// - [SqlSugar.SugarColumn(ColumnName = "custo_no")] - public string CustoNo { get; set; } + [SugarColumn(ColumnName = "custo_no")] + public string CustomerNumber { get; set; } + /// - /// 客户姓名 + /// 客户姓名 (Customer Name) /// - [SqlSugar.SugarColumn(IsIgnore = true)] - public string CustoName { get; set; } + [SugarColumn(IsIgnore = true)] + public string CustomerName { get; set; } + /// - /// 最后一次入住时间 + /// 最后一次入住时间 (Last Check-In Time) /// - [SqlSugar.SugarColumn(ColumnName = "check_in_time")] - public DateTime? CheckTime { get; set; } + [SugarColumn(ColumnName = "check_in_time")] + public DateTime? LastCheckInTime { get; set; } + /// - /// 最后一次退房时间 + /// 最后一次退房时间 (Last Check-Out Time) /// - [SqlSugar.SugarColumn(ColumnName = "check_out_time")] - public DateTime? CheckOutTime { get; set; } + [SugarColumn(ColumnName = "check_out_time")] + public DateTime? LastCheckOutTime { get; set; } + /// - /// 房间状态ID + /// 房间状态ID (Room State ID) /// - [SqlSugar.SugarColumn(ColumnName = "room_state_id")] + [SugarColumn(ColumnName = "room_state_id")] [NeedValid] public int RoomStateId { get; set; } + /// - /// 房间状态 + /// 房间状态 (Room State) /// - [SqlSugar.SugarColumn(IsIgnore = true)] + [SugarColumn(IsIgnore = true)] public string RoomState { get; set; } + /// - /// 房间单价 + /// 房间单价 (Room Rent) /// - [SqlSugar.SugarColumn(ColumnName = "room_rent")] + [SugarColumn(ColumnName = "room_rent")] [NeedValid] - public decimal RoomMoney { get; set; } + public decimal RoomRent { get; set; } + /// - /// 房间押金 + /// 房间押金 (Room Deposit) /// - [SqlSugar.SugarColumn(ColumnName = "room_deposit")] + [SugarColumn(ColumnName = "room_deposit")] [NeedValid] public decimal RoomDeposit { get; set; } + /// - /// 房间位置 + /// 房间位置 (Room Location) /// - [SqlSugar.SugarColumn(ColumnName = "room_position")] + [SugarColumn(ColumnName = "room_position")] [NeedValid] - public string RoomPosition { get; set; } + public string RoomLocation { get; set; } + /// - /// 客户类型名称 + /// 客户类型名称 (Customer Type Name) /// - [SqlSugar.SugarColumn(IsIgnore = true)] - public string typeName { get; set; } + [SugarColumn(IsIgnore = true)] + public string CustomerTypeName { get; set; } + /// - /// 房间名称 + /// 房间名称 (Room Name) /// - [SqlSugar.SugarColumn(IsIgnore = true)] + [SugarColumn(IsIgnore = true)] public string RoomName { get; set; } + /// - /// 最后一次入住时间 + /// 最后一次入住时间 (格式化后的字符串) (Last Check-In Time Formatted) /// - [SqlSugar.SugarColumn(IsIgnore = true)] - public string CheckTimeFormat { get; set; } - + [SugarColumn(IsIgnore = true)] + public string LastCheckInTimeFormatted { get; set; } } + } diff --git a/EOM.TSHotelManagement.Common.Core/Business/Room/RoomState.cs b/EOM.TSHotelManagement.Common.Core/Business/Room/RoomState.cs index e7a8b25..6441093 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Room/RoomState.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Room/RoomState.cs @@ -22,22 +22,26 @@ * *模块说明:房间状态类 */ +using SqlSugar; + namespace EOM.TSHotelManagement.Common.Core { /// - /// 房间状态 + /// 房间状态 (Room State) /// - [SqlSugar.SugarTable("roomstate")] - public class RoomState : BaseDTO + [SugarTable("roomstate")] + public class RoomState : BaseDto { /// - /// 房间状态编号 + /// 房间状态编号 (Room State ID) /// + [SugarColumn(ColumnName = "RoomStateId", IsPrimaryKey = true)] public int RoomStateId { get; set; } + /// - /// 房间状态 + /// 房间状态名称 (Room State Name) /// - [SqlSugar.SugarColumn(ColumnName = "RoomState")] + [SugarColumn(ColumnName = "RoomState")] public string RoomStateName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/Business/Room/RoomType.cs b/EOM.TSHotelManagement.Common.Core/Business/Room/RoomType.cs index baa60a4..e592a80 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Room/RoomType.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Room/RoomType.cs @@ -23,45 +23,49 @@ *模块说明:房间类型类 */ using EOM.TSHotelManagement.Common.Util; +using SqlSugar; namespace EOM.TSHotelManagement.Common.Core { /// - /// 房间类型 + /// 房间类型 (Room Type) /// - [SqlSugar.SugarTable("roomtype")] - public class RoomType : BaseDTO + [SugarTable("roomtype")] + public class RoomType : BaseDto { /// - /// 类型编号 + /// 类型编号 (Room Type ID) /// - [SqlSugar.SugarColumn(ColumnName = "RoomType")] + [SugarColumn(ColumnName = "RoomType", IsPrimaryKey = true)] [NeedValid] - public int Roomtype { get; set; } + public int RoomTypeId { get; set; } + /// - /// 房间类型 + /// 房间类型名称 (Room Type Name) /// + [SugarColumn(ColumnName = "RoomName")] [NeedValid] - public string RoomName { get; set; } + public string RoomTypeName { get; set; } /// - /// 房间租金 + /// 房间租金 (Room Rent) /// - [SqlSugar.SugarColumn(ColumnName = "room_rent", ColumnDataType = "decimal")] + [SugarColumn(ColumnName = "room_rent", ColumnDataType = "decimal")] [NeedValid] public decimal RoomRent { get; set; } /// - /// 房间押金 + /// 房间押金 (Room Deposit) /// - [SqlSugar.SugarColumn(ColumnName = "room_deposit")] + [SugarColumn(ColumnName = "room_deposit")] [NeedValid] public decimal RoomDeposit { get; set; } /// - /// 删除标记描述 + /// 删除标记描述 (Delete Mark Description) /// - [SqlSugar.SugarColumn(IsIgnore = true)] - public string DeleteMkNm { get; set; } + [SugarColumn(IsIgnore = true)] + public string DeleteMarkDescription { get; set; } } + } diff --git a/EOM.TSHotelManagement.Common.Core/Business/Sellthing/SellThing.cs b/EOM.TSHotelManagement.Common.Core/Business/Sellthing/SellThing.cs index b99a298..77fc2b9 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Sellthing/SellThing.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Sellthing/SellThing.cs @@ -25,44 +25,56 @@ //using System.ComponentModel.DataAnnotations.Schema; using EOM.TSHotelManagement.Common.Util; +using SqlSugar; namespace EOM.TSHotelManagement.Common.Core { /// - /// 商品信息 + /// 商品信息 (Product Information) /// - [SqlSugar.SugarTable("sellthing")] - public class SellThing : BaseDTO + [SugarTable("sellthing")] + public class SellThing : BaseDto { /// - /// 商品编号 + /// 商品编号 (Product Number) /// [UIDisplay("商品编号")] - public string SellNo { get; set; } + [SugarColumn(ColumnName = "SellNo", IsPrimaryKey = true)] + public string ProductNumber { get; set; } + /// - /// 商品名称 + /// 商品名称 (Product Name) /// [UIDisplay("商品名称")] - public string SellName { get; set; } + [SugarColumn(ColumnName = "SellName")] + public string ProductName { get; set; } + /// - /// 商品价格 + /// 商品价格 (Product Price) /// [UIDisplay("商品价格")] - public decimal SellPrice { get; set; } + [SugarColumn(ColumnName = "SellPrice")] + public decimal ProductPrice { get; set; } + /// - /// 商品价格描述 + /// 商品价格描述 (Product Price Description - Formatted) /// - [SqlSugar.SugarColumn(IsIgnore = true)] - public string SellPriceStr { get; set; } + [SugarColumn(IsIgnore = true)] + public string ProductPriceFormatted { get; set; } + /// - /// 规格型号 + /// 规格型号 (Specification) /// [UIDisplay("规格型号")] - public string format { get; set; } + [SugarColumn(ColumnName = "format")] + public string Specification { get; set; } + /// - /// 库存 + /// 库存 (Stock) /// [UIDisplay("库存")] + [SugarColumn(ColumnName = "Stock")] public decimal Stock { get; set; } } + } diff --git a/EOM.TSHotelManagement.Common.Core/Business/Spend/Spend.cs b/EOM.TSHotelManagement.Common.Core/Business/Spend/Spend.cs index 0867210..91dae50 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Spend/Spend.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Spend/Spend.cs @@ -24,68 +24,88 @@ */ using EOM.TSHotelManagement.Common.Util; using System; +using SqlSugar; namespace EOM.TSHotelManagement.Common.Core { /// - /// 消费信息 + /// 消费信息 (Consumption Information) /// - [SqlSugar.SugarTable("custospend")] - public class Spend : BaseDTO + [SugarTable("custospend")] + public class Spend : BaseDto { /// - /// 房间编号 + /// 房间编号 (Room Number) /// [UIDisplay("房间号")] - public string RoomNo { get; set; } + [SugarColumn(ColumnName = "RoomNo")] + public string RoomNumber { get; set; } + /// - /// 客户编号 + /// 客户编号 (Customer Number) /// [UIDisplay("客户编号")] - public string CustoNo { get; set; } + [SugarColumn(ColumnName = "CustoNo")] + public string CustomerNumber { get; set; } + /// - /// 商品名称 + /// 商品名称 (Product Name) /// [UIDisplay("商品名称")] - public string SpendName { get; set; } + [SugarColumn(ColumnName = "SpendName")] + public string ProductName { get; set; } + /// - /// 消费数量 + /// 消费数量 (Consumption Quantity) /// - [UIDisplay("消费数量",true)] - public int SpendAmount { get; set; } + [UIDisplay("消费数量", true)] + [SugarColumn(ColumnName = "SpendAmount")] + public int ConsumptionQuantity { get; set; } + /// - /// 商品单价 + /// 商品单价 (Product Price) /// [UIDisplay("商品单价")] - public decimal SpendPrice { get; set; } + [SugarColumn(ColumnName = "SpendPrice")] + public decimal ProductPrice { get; set; } + /// - /// 商品单价描述 + /// 商品单价描述 (Product Price Description - Formatted) /// - [SqlSugar.SugarColumn(IsIgnore = true)] - public string SpendPriceStr { get; set; } + [SugarColumn(IsIgnore = true)] + public string ProductPriceFormatted { get; set; } + /// - /// 消费金额 + /// 消费金额 (Consumption Amount) /// [UIDisplay("消费金额")] - public decimal SpendMoney { get; set; } + [SugarColumn(ColumnName = "SpendMoney")] + public decimal ConsumptionAmount { get; set; } + /// - /// 消费金额描述 + /// 消费金额描述 (Consumption Amount Description - Formatted) /// - [SqlSugar.SugarColumn(IsIgnore = true)] - public string SpendMoneyStr { get; set; } + [SugarColumn(IsIgnore = true)] + public string ConsumptionAmountFormatted { get; set; } + /// - /// 消费时间 + /// 消费时间 (Consumption Time) /// [UIDisplay("消费时间")] - public DateTime SpendTime { get; set; } + [SugarColumn(ColumnName = "SpendTime")] + public DateTime ConsumptionTime { get; set; } + /// - /// 结算状态 + /// 结算状态 (Settlement Status) /// - public string MoneyState { get; set; } + [SugarColumn(ColumnName = "MoneyState")] + public string SettlementStatus { get; set; } + /// - /// 结算状态描述 + /// 结算状态描述 (Settlement Status Description) /// - [SqlSugar.SugarColumn(IsIgnore = true)] - public string SpendStateNm { get; set; } + [SugarColumn(IsIgnore = true)] + public string SettlementStatusDescription { get; set; } } + } diff --git a/EOM.TSHotelManagement.Common.Core/Worker/Worker.cs b/EOM.TSHotelManagement.Common.Core/Employee/Employee.cs similarity index 42% rename from EOM.TSHotelManagement.Common.Core/Worker/Worker.cs rename to EOM.TSHotelManagement.Common.Core/Employee/Employee.cs index 94da923..c2d9958 100644 --- a/EOM.TSHotelManagement.Common.Core/Worker/Worker.cs +++ b/EOM.TSHotelManagement.Common.Core/Employee/Employee.cs @@ -22,117 +22,141 @@ * *模块说明:员工信息类 */ +using SqlSugar; using System; namespace EOM.TSHotelManagement.Common.Core { /// - /// 员工信息 + /// 员工信息 (Employee Information) /// - [SqlSugar.SugarTable("worker")] - public class Worker : BaseDTO + [SugarTable("worker")] + public class Employee : BaseDto { /// - /// 索引ID + /// 索引ID (Index ID) /// - [SqlSugar.SugarColumn(ColumnName = "Id",IsPrimaryKey = true,IsIdentity = true)] + [SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)] public int Id { get; set; } + /// - /// 员工账号/工号 + /// 员工账号/工号 (Employee Account/ID) /// - [SqlSugar.SugarColumn(ColumnName = "WorkerId", IsPrimaryKey = true)] - public string WorkerId { get; set; } + [SugarColumn(ColumnName = "WorkerId", IsPrimaryKey = true)] + public string EmployeeId { get; set; } + /// - /// 员工姓名 + /// 员工姓名 (Employee Name) /// - [SqlSugar.SugarColumn(ColumnName = "WorkerName")] - public string WorkerName { get; set; } + [SugarColumn(ColumnName = "WorkerName")] + public string EmployeeName { get; set; } + /// - /// 出生日期 + /// 出生日期 (Date of Birth) /// - [SqlSugar.SugarColumn(ColumnName = "WorkerBirthday")] - public DateTime WorkerBirthday { get; set; } + [SugarColumn(ColumnName = "WorkerBirthday")] + public DateTime DateOfBirth { get; set; } + /// - /// 员工性别 + /// 员工性别 (Employee Gender) /// - [SqlSugar.SugarColumn(ColumnName = "WorkerSex")] - public int WorkerSex { get; set; } + [SugarColumn(ColumnName = "WorkerSex")] + public int Gender { get; set; } + /// - /// 员工性别(名称描述) + /// 员工性别(名称描述) (Employee Gender (Name Description)) /// - [SqlSugar.SugarColumn(IsIgnore = true)] - public string WorkerSexName { get; set; } + [SugarColumn(IsIgnore = true)] + public string GenderName { get; set; } + /// - /// 民族类型 + /// 民族类型 (Ethnicity) /// - [SqlSugar.SugarColumn(ColumnName = "WorkerNation")] - public string WorkerNation { get; set; } + [SugarColumn(ColumnName = "WorkerNation")] + public string Ethnicity { get; set; } + /// - /// 民族名称 + /// 民族名称 (Ethnicity Name) /// - [SqlSugar.SugarColumn(IsIgnore = true)] - public string NationName { get; set; } + [SugarColumn(IsIgnore = true)] + public string EthnicityName { get; set; } + /// - /// 员工电话 + /// 员工电话 (Employee Phone Number) /// - [SqlSugar.SugarColumn(ColumnName = "WorkerTel")] - public string WorkerTel { get; set; } + [SugarColumn(ColumnName = "WorkerTel")] + public string PhoneNumber { get; set; } + /// - /// 所属部门 + /// 所属部门 (Department) /// - [SqlSugar.SugarColumn(ColumnName = "WorkerClub")] - public string WorkerClub { get; set; } + [SugarColumn(ColumnName = "WorkerClub")] + public string Department { get; set; } + /// - /// 部门名称 + /// 部门名称 (Department Name) /// - [SqlSugar.SugarColumn(IsIgnore = true)] - public string ClubName { get; set; } + [SugarColumn(IsIgnore = true)] + public string DepartmentName { get; set; } + /// - /// 居住地址 + /// 居住地址 (Residential Address) /// - [SqlSugar.SugarColumn(ColumnName = "WorkerAddress")] - public string WorkerAddress { get; set; } + [SugarColumn(ColumnName = "WorkerAddress")] + public string Address { get; set; } + /// - /// 员工职位 + /// 员工职位 (Employee Position) /// - [SqlSugar.SugarColumn(ColumnName = "WorkerPosition")] - public string WorkerPosition { get; set; } + [SugarColumn(ColumnName = "WorkerPosition")] + public string Position { get; set; } + /// - /// 职位名称 + /// 职位名称 (Position Name) /// - [SqlSugar.SugarColumn(IsIgnore = true)] + [SugarColumn(IsIgnore = true)] public string PositionName { get; set; } + /// - /// 证件号码 + /// 证件号码 (ID Card Number) /// - [SqlSugar.SugarColumn(ColumnName = "CardID")] - public string CardId { get; set; } + [SugarColumn(ColumnName = "CardID")] + public string IdCardNumber { get; set; } + /// - /// 员工密码 + /// 员工密码 (Employee Password) /// - [SqlSugar.SugarColumn(IsOnlyIgnoreInsert = true)] - public string WorkerPwd { get; set; } + [SugarColumn(/*IsOnlyIgnoreInsert = true*/)] + public string Password { get; set; } + /// - /// 员工入职时间 + /// 员工入职时间 (Hire Date) /// - public DateTime WorkerTime { get; set; } + [SugarColumn(ColumnName = "WorkerTime")] + public DateTime HireDate { get; set; } + /// - /// 员工面貌 + /// 员工面貌 (Political Affiliation) /// - public string WorkerFace { get; set; } + [SugarColumn(ColumnName = "WorkerFace")] + public string PoliticalAffiliation { get; set; } + /// - /// 群众面貌描述 + /// 群众面貌描述 (Political Affiliation Description) /// - [SqlSugar.SugarColumn(IsIgnore = true)] - public string FaceName { get; set; } + [SugarColumn(IsIgnore = true)] + public string PoliticalAffiliationName { get; set; } + /// - /// 教育程度 + /// 教育程度 (Education Level) /// - public string WorkerEducation { get; set; } + [SugarColumn(ColumnName = "WorkerEducation")] + public string EducationLevel { get; set; } + /// - /// 教育程度名称 + /// 教育程度名称 (Education Level Name) /// - [SqlSugar.SugarColumn(IsIgnore = true)] - public string EducationName { get; set; } + [SugarColumn(IsIgnore = true)] + public string EducationLevelName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/Worker/WorkerCheck.cs b/EOM.TSHotelManagement.Common.Core/Employee/EmployeeCheck.cs similarity index 63% rename from EOM.TSHotelManagement.Common.Core/Worker/WorkerCheck.cs rename to EOM.TSHotelManagement.Common.Core/Employee/EmployeeCheck.cs index d0b5c52..ee2fd22 100644 --- a/EOM.TSHotelManagement.Common.Core/Worker/WorkerCheck.cs +++ b/EOM.TSHotelManagement.Common.Core/Employee/EmployeeCheck.cs @@ -22,43 +22,51 @@ * *模块说明:打卡考勤类 */ +using SqlSugar; using System; namespace EOM.TSHotelManagement.Common.Core { /// - /// 员工打卡考勤 + /// 员工打卡考勤 (Employee Check-in/Check-out Record) /// - [SqlSugar.SugarTable("workercheck")] - public class WorkerCheck : BaseDTO + [SugarTable("workercheck")] + public class EmployeeCheck : BaseDto { /// - /// 编号 + /// 编号 (ID) /// - [SqlSugar.SugarColumn(IsOnlyIgnoreInsert = true, IsOnlyIgnoreUpdate = true)] + [SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)] public int Id { get; set; } + /// - /// 工号 + /// 员工工号 (Employee ID) /// - public string WorkerNo { get; set; } + [SugarColumn(ColumnName = "WorkerNo")] + public string EmployeeId { get; set; } + /// - /// 打卡时间 + /// 打卡时间 (Check-in/Check-out Time) /// + [SugarColumn(ColumnName = "CheckTime")] public DateTime CheckTime { get; set; } + /// - /// 打卡方式 + /// 打卡方式 (Check-in/Check-out Method) /// - public string CheckWay { get; set; } + [SugarColumn(ColumnName = "CheckWay")] + public string CheckMethod { get; set; } + /// - /// 打卡状态 + /// 打卡状态 (Check-in/Check-out Status) /// - public int CheckState { get; set; } + [SugarColumn(ColumnName = "CheckState")] + public int CheckStatus { get; set; } /// - /// 打卡状态 + /// 打卡状态描述 (Check-in/Check-out Status Description) /// - [SqlSugar.SugarColumn(IsIgnore = true)] - public string CheckStateNm { get; set; } - + [SugarColumn(IsIgnore = true)] + public string CheckStatusDescription { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/Worker/WorkerHistory.cs b/EOM.TSHotelManagement.Common.Core/Employee/EmployeeHistory.cs similarity index 71% rename from EOM.TSHotelManagement.Common.Core/Worker/WorkerHistory.cs rename to EOM.TSHotelManagement.Common.Core/Employee/EmployeeHistory.cs index 418850f..4d5790d 100644 --- a/EOM.TSHotelManagement.Common.Core/Worker/WorkerHistory.cs +++ b/EOM.TSHotelManagement.Common.Core/Employee/EmployeeHistory.cs @@ -22,40 +22,51 @@ * *模块说明:履历类 */ +using SqlSugar; using System; namespace EOM.TSHotelManagement.Common.Core { /// - /// 员工履历 + /// 员工履历 (Employee History) /// - [SqlSugar.SugarTable("workerhistory")] - public class WorkerHistory : BaseDTO + [SugarTable("workerhistory")] + public class EmployeeHistory : BaseDto { /// - /// 编号 + /// 编号 (ID) /// - [SqlSugar.SugarColumn(IsOnlyIgnoreInsert = true, IsOnlyIgnoreUpdate = true)] + [SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)] public int Id { get; set; } + /// - /// 工号 + /// 员工工号 (Employee ID) /// - public string WorkerId { get; set; } + [SugarColumn(ColumnName = "WorkerId")] + public string EmployeeId { get; set; } + /// - /// 开始时间 + /// 开始时间 (Start Date) /// + [SugarColumn(ColumnName = "StartDate")] public DateTime StartDate { get; set; } + /// - /// 结束时间 + /// 结束时间 (End Date) /// + [SugarColumn(ColumnName = "EndDate")] public DateTime EndDate { get; set; } + /// - /// 职位 + /// 职位 (Position) /// + [SugarColumn(ColumnName = "Position")] public string Position { get; set; } + /// - /// 公司 + /// 公司 (Company) /// + [SugarColumn(ColumnName = "Company")] public string Company { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/Worker/WorkerPic.cs b/EOM.TSHotelManagement.Common.Core/Employee/EmployeePhoto.cs similarity index 33% rename from EOM.TSHotelManagement.Common.Core/Worker/WorkerPic.cs rename to EOM.TSHotelManagement.Common.Core/Employee/EmployeePhoto.cs index 2fe0619..db4be01 100644 --- a/EOM.TSHotelManagement.Common.Core/Worker/WorkerPic.cs +++ b/EOM.TSHotelManagement.Common.Core/Employee/EmployeePhoto.cs @@ -1,27 +1,29 @@ -//using System.ComponentModel.DataAnnotations.Schema; +using SqlSugar; + namespace EOM.TSHotelManagement.Common.Core { /// - /// 员工照片 + /// 员工照片 (Employee Photo) /// - [SqlSugar.SugarTable("workerpic")] - public class WorkerPic + [SugarTable("workerpic")] + public class EmployeePhoto { /// - /// 自增长流水号 + /// 自增长流水号 (Auto-incrementing Sequence Number) /// - [SqlSugar.SugarColumn(IsIdentity = true, ColumnName = "Id", IsPrimaryKey = true)] + [SugarColumn(ColumnName = "Id", IsIdentity = true, IsPrimaryKey = true)] public int Id { get; set; } + /// - /// 工号 + /// 员工工号 (Employee ID) /// - [SqlSugar.SugarColumn(ColumnName = "WorkerId")] - public string WorkerId { get; set; } + [SugarColumn(ColumnName = "WorkerId")] + public string EmployeeId { get; set; } /// - /// 照片路径 + /// 照片路径 (Photo Path) /// - [SqlSugar.SugarColumn(ColumnName = "Pic")] - public string Pic { get; set; } + [SugarColumn(ColumnName = "Pic")] + public string PhotoPath { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/Worker/WorkerGoodBad.cs b/EOM.TSHotelManagement.Common.Core/Employee/EmployeeRewardPunishment.cs similarity index 57% rename from EOM.TSHotelManagement.Common.Core/Worker/WorkerGoodBad.cs rename to EOM.TSHotelManagement.Common.Core/Employee/EmployeeRewardPunishment.cs index aa8143b..2f9c2bd 100644 --- a/EOM.TSHotelManagement.Common.Core/Worker/WorkerGoodBad.cs +++ b/EOM.TSHotelManagement.Common.Core/Employee/EmployeeRewardPunishment.cs @@ -22,50 +22,63 @@ * *模块说明:员工奖惩类 */ +using SqlSugar; using System; namespace EOM.TSHotelManagement.Common.Core { /// - /// 员工奖罚 + /// 员工奖惩 (Employee Rewards/Punishments) /// - [SqlSugar.SugarTable("workergoodbad")] - public class WorkerGoodBad : BaseDTO + [SugarTable("workergoodbad")] + public class EmployeeRewardPunishment : BaseDto { /// - /// 编号 + /// 编号 (ID) /// - [SqlSugar.SugarColumn(IsOnlyIgnoreInsert = true, IsOnlyIgnoreUpdate = true)] + [SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)] public int Id { get; set; } + /// - /// 工号 + /// 员工工号 (Employee ID) /// - public string WorkNo { get; set; } + [SugarColumn(ColumnName = "WorkNo")] + public string EmployeeId { get; set; } + /// - /// 奖惩信息 + /// 奖惩信息 (Reward/Punishment Information) /// - public string GBInfo { get; set; } + [SugarColumn(ColumnName = "GBInfo")] + public string RewardPunishmentInformation { get; set; } + /// - /// 奖惩类型 + /// 奖惩类型 (Reward/Punishment Type) /// - public int GBType { get; set; } + [SugarColumn(ColumnName = "GBType")] + public int RewardPunishmentType { get; set; } + /// - /// 奖惩操作人 + /// 奖惩操作人 (Reward/Punishment Operator) /// - public string GBOperation { get; set; } + [SugarColumn(ColumnName = "GBOperation")] + public string RewardPunishmentOperator { get; set; } + /// - /// 奖惩操作人 + /// 操作人姓名 (Operator Name) /// - [SqlSugar.SugarColumn(IsIgnore = true)] - public string OperationName { get; set; } + [SugarColumn(IsIgnore = true)] + public string OperatorName { get; set; } + /// - /// 奖惩时间 + /// 奖惩时间 (Reward/Punishment Time) /// - public DateTime GBTime { get; set; } + [SugarColumn(ColumnName = "GBTime")] + public DateTime RewardPunishmentTime { get; set; } + /// - /// 类型名称 + /// 类型名称 (Type Name) /// - [SqlSugar.SugarColumn(IsIgnore = true)] + [SugarColumn(IsIgnore = true)] public string TypeName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/Worker/GBType.cs b/EOM.TSHotelManagement.Common.Core/Employee/GBType.cs similarity index 73% rename from EOM.TSHotelManagement.Common.Core/Worker/GBType.cs rename to EOM.TSHotelManagement.Common.Core/Employee/GBType.cs index 5553d56..6dfbd75 100644 --- a/EOM.TSHotelManagement.Common.Core/Worker/GBType.cs +++ b/EOM.TSHotelManagement.Common.Core/Employee/GBType.cs @@ -22,23 +22,27 @@ * *模块说明:奖惩类型类 */ -//using EOM.TSHotelManagement.Common.Core; + +using SqlSugar; + namespace EOM.TSHotelManagement.Common.Core { /// - /// 奖惩类型实体类 + /// 奖惩类型实体类 (Reward/Punishment Type Entity) /// - [SqlSugar.SugarTable("gbtype")] - public class GBType : BaseDTO + [SugarTable("gbtype")] + public class GBType : BaseDto { /// - /// 奖惩编号 + /// 奖惩类型编号 (Reward/Punishment Type ID) /// - public int GBTypeId { get; set; } + [SugarColumn(ColumnName = "GBTypeId", IsPrimaryKey = true)] + public int RewardPunishmentTypeId { get; set; } /// - /// 奖惩名称 + /// 奖惩类型名称 (Reward/Punishment Type Name) /// - public string GBName { get; set; } + [SugarColumn(ColumnName = "GBName")] + public string RewardPunishmentTypeName { get; set; } } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Common.Core/Sys/NavBar/NavBar.cs b/EOM.TSHotelManagement.Common.Core/Sys/NavBar/NavBar.cs index c6bac1a..4a67107 100644 --- a/EOM.TSHotelManagement.Common.Core/Sys/NavBar/NavBar.cs +++ b/EOM.TSHotelManagement.Common.Core/Sys/NavBar/NavBar.cs @@ -1,35 +1,47 @@ -namespace EOM.TSHotelManagement.Common.Core +using SqlSugar; + +namespace EOM.TSHotelManagement.Common.Core { /// - /// 导航控件实体类 + /// 导航控件实体类 (Navigation Bar Entity) /// - [SqlSugar.SugarTable("nav_bar")] - public class NavBar : BaseDTO + [SugarTable("nav_bar")] + public class NavBar : BaseDto { /// - /// 导航控件ID + /// 导航控件ID (Navigation Bar ID) /// - [SqlSugar.SugarColumn(IsIdentity = true)] - public int nav_id { get; set; } + [SugarColumn(IsIdentity = true, ColumnName = "nav_id", IsPrimaryKey = true)] + public int NavigationBarId { get; set; } + /// - /// 导航控件名称 + /// 导航控件名称 (Navigation Bar Name) /// - public string nav_name { get; set; } + [SugarColumn(ColumnName = "nav_name")] + public string NavigationBarName { get; set; } + /// - /// 导航控件排序 + /// 导航控件排序 (Navigation Bar Order) /// - public int nav_or { get; set; } + [SugarColumn(ColumnName = "nav_or")] + public int NavigationBarOrder { get; set; } + /// - /// 导航控件图片 + /// 导航控件图片 (Navigation Bar Image) /// - public string nav_pic { get; set; } + [SugarColumn(ColumnName = "nav_pic")] + public string NavigationBarImage { get; set; } + /// - /// 导航控件事件 + /// 导航控件事件 (Navigation Bar Event) /// - public string nav_event { get; set; } + [SugarColumn(ColumnName = "nav_event")] + public string NavigationBarEvent { get; set; } + /// - /// 导航控件事件 + /// 导航控件左边距 (Navigation Bar Margin Left) /// - public int margin_left { get; set; } + [SugarColumn(ColumnName = "margin_left")] + public int MarginLeft { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/Util/ApplicationVersion.cs b/EOM.TSHotelManagement.Common.Core/Util/ApplicationVersion.cs index 0640e23..6ca7e18 100644 --- a/EOM.TSHotelManagement.Common.Core/Util/ApplicationVersion.cs +++ b/EOM.TSHotelManagement.Common.Core/Util/ApplicationVersion.cs @@ -3,21 +3,21 @@ namespace EOM.TSHotelManagement.Common.Core { /// - /// 应用版本 + /// 应用版本 (Application Version) /// - [SqlSugar.SugarTable("applicationversion")] - public class Applicationversion + [SugarTable("applicationversion")] + public class ApplicationVersion { /// - /// 流水号 + /// 流水号 (Sequence Number) /// - [SugarColumn(ColumnName = "base_versionId")]//数据库是自增才配自增 - public int base_versionId { get; set; } + [SugarColumn(ColumnName = "base_versionId", IsIdentity = true, IsPrimaryKey = true)] + public int ApplicationVersionId { get; set; } /// - /// 版本号 + /// 版本号 (Version Number) /// - [SugarColumn(ColumnName = "base_version")]//数据库是自增才配自增 - public string base_version { get; set; } + [SugarColumn(ColumnName = "base_version")] + public string VersionNumber { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/Util/CardCode.cs b/EOM.TSHotelManagement.Common.Core/Util/CardCode.cs new file mode 100644 index 0000000..4c05592 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Core/Util/CardCode.cs @@ -0,0 +1,48 @@ +using SqlSugar; + +namespace EOM.TSHotelManagement.Common.Core +{ + /// + /// 卡片代码 (Card Codes) + /// + [SugarTable("cardcodes")] + public class CardCode + { + /// + /// 卡片代码 (Card Code) + /// + public CardCode() + { + } + + /// + /// 编号 (ID) + /// + [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)] + public long Id { get; set; } + + /// + /// 省份 (Province) + /// + [SugarColumn(ColumnName = "Province")] + public string Province { get; set; } + + /// + /// 城市 (City) + /// + [SugarColumn(ColumnName = "City")] + public string City { get; set; } + + /// + /// 地区 (District) + /// + [SugarColumn(ColumnName = "District")] + public string District { get; set; } + + /// + /// 地区识别码 (Area Code) + /// + [SugarColumn(ColumnName = "bm")] + public string AreaCode { get; set; } + } +} diff --git a/EOM.TSHotelManagement.Common.Core/Util/Cardcodes.cs b/EOM.TSHotelManagement.Common.Core/Util/Cardcodes.cs deleted file mode 100644 index 782a2e9..0000000 --- a/EOM.TSHotelManagement.Common.Core/Util/Cardcodes.cs +++ /dev/null @@ -1,46 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Core -{ - /// - /// 卡片代码 - /// - [SqlSugar.SugarTable("cardcodes")] - public class Cardcodes - { - /// - /// 卡片代码 - /// - public Cardcodes() - { - } - - private System.Int64 _id; - /// - /// 编号 - /// - public System.Int64 id { get { return this._id; } set { this._id = value; } } - - private System.String _Province; - /// - /// 省份 - /// - public System.String Province { get { return this._Province; } set { this._Province = value; } } - - private System.String _City; - /// - /// 城市 - /// - public System.String City { get { return this._City; } set { this._City = value; } } - - private System.String _District; - /// - /// 地区 - /// - public System.String District { get { return this._District; } set { this._District = value; } } - - private System.String _bm; - /// - /// 地区识别码 - /// - public System.String bm { get { return this._bm; } set { this._bm = value; } } - } -} diff --git a/EOM.TSHotelManagement.Common.Core/Util/OperationLog.cs b/EOM.TSHotelManagement.Common.Core/Util/OperationLog.cs index 32c8857..edd13a5 100644 --- a/EOM.TSHotelManagement.Common.Core/Util/OperationLog.cs +++ b/EOM.TSHotelManagement.Common.Core/Util/OperationLog.cs @@ -22,76 +22,84 @@ * *模块说明:操作日志类 */ +using SqlSugar; using System; namespace EOM.TSHotelManagement.Common.Core { /// - /// 日志等级 + /// 日志等级 (Log Level) /// - public enum RecordLevel + public enum LogLevel { /// - /// 普通警告 + /// 普通警告 (Normal Warning) /// Normal = 100, + /// - /// 严重警告 + /// 严重警告 (Serious Warning) /// Warning = 200, + /// - /// 危险警告 + /// 危险警告 (Critical Warning) /// - Danger = 300, + Critical = 300 } /// - /// 操作日志 + /// 操作日志 (Operation Log) /// - [SqlSugar.SugarTable("operationlog")] - public class OperationLog : BaseDTO + [SugarTable("operationlog")] + public class OperationLog : BaseDto { /// - /// 日志ID + /// 日志ID (Log ID) /// - [SqlSugar.SugarColumn(ColumnName = "OperationId", IsIdentity = true, IsPrimaryKey = true)] + [SugarColumn(ColumnName = "OperationId", IsIdentity = true, IsPrimaryKey = true)] public int OperationId { get; set; } + /// - /// 操作时间 + /// 操作时间 (Operation Time) /// - [SqlSugar.SugarColumn(ColumnName = "OperationTime")] + [SugarColumn(ColumnName = "OperationTime")] public DateTime OperationTime { get; set; } + /// - /// 操作信息 + /// 操作信息 (Log Content) /// - [SqlSugar.SugarColumn(ColumnName = "LogContent")] + [SugarColumn(ColumnName = "LogContent")] public string LogContent { get; set; } + /// - /// 操作账号 + /// 操作账号 (Operation Account) /// - [SqlSugar.SugarColumn(ColumnName = "OperationAccount")] + [SugarColumn(ColumnName = "OperationAccount")] public string OperationAccount { get; set; } + /// - /// 日志等级 + /// 日志等级 (Log Level) /// - [SqlSugar.SugarColumn(ColumnName = "OperationLevel")] - public RecordLevel OperationLevel { get; set; } + [SugarColumn(ColumnName = "OperationLevel")] + public LogLevel LogLevel { get; set; } + /// - /// 软件版本 + /// 软件版本 (Software Version) /// - [SqlSugar.SugarColumn(ColumnName = "SoftwareVersion")] + [SugarColumn(ColumnName = "SoftwareVersion")] public string SoftwareVersion { get; set; } + /// - /// 登录IP + /// 登录IP (Login IP Address) /// - [SqlSugar.SugarColumn(ColumnName = "login_ip")] - public string login_ip { get; set; } + [SugarColumn(ColumnName = "login_ip")] + public string LoginIpAddress { get; set; } /// - /// 日志等级 + /// 日志等级名称 (Log Level Name) /// - [SqlSugar.SugarColumn(IsIgnore = true)] - public string OperationLevelNm { get; set; } - + [SugarColumn(IsIgnore = true)] + public string LogLevelName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/Zero/Admin.cs b/EOM.TSHotelManagement.Common.Core/Zero/Administrator.cs similarity index 57% rename from EOM.TSHotelManagement.Common.Core/Zero/Admin.cs rename to EOM.TSHotelManagement.Common.Core/Zero/Administrator.cs index 6b9358a..988ba68 100644 --- a/EOM.TSHotelManagement.Common.Core/Zero/Admin.cs +++ b/EOM.TSHotelManagement.Common.Core/Zero/Administrator.cs @@ -23,84 +23,82 @@ *模块说明:管理员实体类 */ using EOM.TSHotelManagement.Common.Util; +using SqlSugar; namespace EOM.TSHotelManagement.Common.Core { /// - /// 管理员实体类 + /// 管理员实体类 (Administrator Entity) /// - [SqlSugar.SugarTable("admininfo")] - public class Admin : BaseDTO + [SugarTable("admininfo")] + public class Administrator : BaseDto { /// - /// 构造函数 + /// 构造函数 (Constructor) /// - public Admin() + public Administrator() { } /// - /// 编号 + /// 编号 (ID) /// - [SqlSugar.SugarColumn(IsPrimaryKey = true, IsIdentity = true)] + [SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)] public int Id { get; set; } - private string _AdminAccount; /// - /// 管理员账号 + /// 管理员账号 (Administrator Account) /// [UIDisplay("管理员账号")] - [SqlSugar.SugarColumn(IsPrimaryKey = true)] + [SugarColumn(ColumnName = "AdminAccount", IsNullable = false)] [NeedValid] - public string AdminAccount { get { return this._AdminAccount; } set { this._AdminAccount = value; } } + public string Account { get; set; } - private string _AdminPassword; /// - /// 管理员密码 + /// 管理员密码 (Administrator Password) /// + [SugarColumn(ColumnName = "AdminPassword", IsNullable = false)] [NeedValid] - public string AdminPassword { get { return this._AdminPassword; } set { this._AdminPassword = value; } } + public string Password { get; set; } - private string _AdminType; /// - /// 管理员类型 + /// 管理员类型 (Administrator Type) /// + [SugarColumn(ColumnName = "AdministratorType", IsNullable = false)] [NeedValid] - public string AdminType { get { return this._AdminType; } set { this._AdminType = value; } } + public string Type { get; set; } - private string _AdminName; /// - /// 管理员名称 + /// 管理员名称 (Administrator Name) /// [UIDisplay("管理员名称")] + [SugarColumn(ColumnName = "AdminName", IsNullable = false)] [NeedValid] - public string AdminName { get { return this._AdminName; } set { this._AdminName = value; } } + public string Name { get; set; } - private System.Int32 _IsAdmin; /// - /// 是否为超级管理员 + /// 是否为超级管理员 (Is Super Administrator) /// [UIDisplay("超级管理员?")] - [NeedValid] - public System.Int32 IsAdmin { get { return this._IsAdmin; } set { this._IsAdmin = value; } } + [SugarColumn(ColumnName = "IsAdmin")] + public int IsSuperAdmin { get; set; } /// - /// 管理员类型描述 + /// 是否为超级管理员描述 (Is Super Administrator Description) /// - [SqlSugar.SugarColumn(IsIgnore = true)] - public string IsAdminNm { get; set; } + [SugarColumn(IsIgnore = true)] + public string IsSuperAdminDescription { get; set; } /// - /// 管理员类型 + /// 管理员类型名称 (Administrator Type Name) /// - [SqlSugar.SugarColumn(IsIgnore = true)] + [SugarColumn(IsIgnore = true)] public string TypeName { get; set; } /// - /// 删除标记描述 + /// 删除标记描述 (Delete Flag Description) /// - [SqlSugar.SugarColumn(IsIgnore = true)] - public string DeleteNm { get; set; } - + [SugarColumn(IsIgnore = true)] + public string DeleteDescription { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/Zero/AdminType.cs b/EOM.TSHotelManagement.Common.Core/Zero/AdministratorType.cs similarity index 74% rename from EOM.TSHotelManagement.Common.Core/Zero/AdminType.cs rename to EOM.TSHotelManagement.Common.Core/Zero/AdministratorType.cs index 6762443..2a6c47b 100644 --- a/EOM.TSHotelManagement.Common.Core/Zero/AdminType.cs +++ b/EOM.TSHotelManagement.Common.Core/Zero/AdministratorType.cs @@ -22,28 +22,32 @@ * *模块说明:管理员类型 */ +using SqlSugar; + namespace EOM.TSHotelManagement.Common.Core { /// - /// 管理员类型 + /// 管理员类型 (Administrator Type) /// - [SqlSugar.SugarTable("admintype")] - public class AdminType : BaseDTO + [SugarTable("admintype")] + public class AdministratorType : BaseDto { /// - /// 编号 + /// 编号 (ID) /// + [SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)] public int Id { get; set; } /// - /// 管理员类型 + /// 类型编号 (Type ID) /// - public string type_id { get; set; } + [SugarColumn(ColumnName = "type_id")] + public string TypeId { get; set; } /// - /// 类型名称 + /// 类型名称 (Type Name) /// - public string type_name { get; set; } - + [SugarColumn(ColumnName = "type_name")] + public string TypeName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/Zero/Notice.cs b/EOM.TSHotelManagement.Common.Core/Zero/AppointmentNotice.cs similarity index 61% rename from EOM.TSHotelManagement.Common.Core/Zero/Notice.cs rename to EOM.TSHotelManagement.Common.Core/Zero/AppointmentNotice.cs index 9d45330..9c52618 100644 --- a/EOM.TSHotelManagement.Common.Core/Zero/Notice.cs +++ b/EOM.TSHotelManagement.Common.Core/Zero/AppointmentNotice.cs @@ -22,51 +22,57 @@ * *模块说明:任命公告类 */ +using SqlSugar; using System; namespace EOM.TSHotelManagement.Common.Core { /// - /// 任命公告 + /// 任命公告 (Appointment AppointmentNotice) /// - [SqlSugar.SugarTable("uploadinfo")] - public class Notice : BaseDTO + [SugarTable("uploadinfo")] + public class AppointmentNotice : BaseDto { /// - /// 公告编号 + /// 公告编号 (AppointmentNotice Number) /// - [SqlSugar.SugarColumn(ColumnName = "NoticeNo")] - public string NoticeNo { get; set; } + [SugarColumn(ColumnName = "NoticeNo", IsPrimaryKey = true)] + public string NoticeNumber { get; set; } + /// - /// 公告主题 + /// 公告主题 (AppointmentNotice Theme) /// - [SqlSugar.SugarColumn(ColumnName = "Noticetheme")] - public string Noticetheme { get; set; } + [SugarColumn(ColumnName = "Noticetheme")] + public string NoticeTheme { get; set; } + /// - /// 公告类型 + /// 公告类型 (AppointmentNotice Type) /// - [SqlSugar.SugarColumn(ColumnName = "NoticeType")] + [SugarColumn(ColumnName = "NoticeType")] public string NoticeType { get; set; } + /// - /// 公告类型(描述) + /// 公告类型(描述) (AppointmentNotice Type Description) /// - [SqlSugar.SugarColumn(IsIgnore = true)] - public string NoticeTypeName { get; set; } + [SugarColumn(IsIgnore = true)] + public string NoticeTypeDescription { get; set; } + /// - /// 公告时间 + /// 公告时间 (AppointmentNotice Time) /// - [SqlSugar.SugarColumn(ColumnName = "NoticeTime")] + [SugarColumn(ColumnName = "NoticeTime")] public DateTime NoticeTime { get; set; } + /// - /// 公告正文 + /// 公告正文 (AppointmentNotice Content) /// - [SqlSugar.SugarColumn(ColumnName = "NoticeContent")] + [SugarColumn(ColumnName = "NoticeContent")] public string NoticeContent { get; set; } + /// - /// 发文部门 + /// 发文部门 (Issuing Department) /// - [SqlSugar.SugarColumn(ColumnName = "NoticeClub")] - public string NoticeClub { get; set; } - + [SugarColumn(ColumnName = "NoticeClub")] + public string IssuingDepartment { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/Zero/Dept.cs b/EOM.TSHotelManagement.Common.Core/Zero/Department.cs similarity index 53% rename from EOM.TSHotelManagement.Common.Core/Zero/Dept.cs rename to EOM.TSHotelManagement.Common.Core/Zero/Department.cs index bf1bd07..8edba1e 100644 --- a/EOM.TSHotelManagement.Common.Core/Zero/Dept.cs +++ b/EOM.TSHotelManagement.Common.Core/Zero/Department.cs @@ -22,61 +22,69 @@ * *模块说明:部门实体类 */ +using SqlSugar; using System; namespace EOM.TSHotelManagement.Common.Core { /// - /// 部门表 + /// 部门表 (Department Table) /// - [SqlSugar.SugarTable("dept")] - public class Dept : BaseDTO + [SugarTable("dept")] + public class Department : BaseDto { /// - /// 索引ID + /// 索引ID (Index ID) /// - [SqlSugar.SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)] + [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)] public int Id { get; set; } + /// - /// 部门编号 - /// - [SqlSugar.SugarColumn(ColumnName = "dept_no")] - public string dept_no { get; set; } - /// - /// 部门名称 + /// 部门编号 (Department Number) /// - [SqlSugar.SugarColumn(ColumnName = "dept_name")] - public string dept_name { get; set; } + [SugarColumn(ColumnName = "dept_no")] + public string DepartmentNumber { get; set; } + /// - /// 部门描述 + /// 部门名称 (Department Name) /// - [SqlSugar.SugarColumn(ColumnName = "dept_desc")] - public string dept_desc { get; set; } + [SugarColumn(ColumnName = "dept_name")] + public string DepartmentName { get; set; } + /// - /// 创建时间(部门) + /// 部门描述 (Department Description) /// - [SqlSugar.SugarColumn(ColumnName = "dept_date")] - public DateTime dept_date { get; set; } + [SugarColumn(ColumnName = "dept_desc")] + public string DepartmentDescription { get; set; } + /// - /// 部门主管 + /// 创建时间(部门) (Department Creation Date) /// - [SqlSugar.SugarColumn(ColumnName = "dept_leader")] - public string dept_leader { get; set; } + [SugarColumn(ColumnName = "dept_date")] + public DateTime DepartmentCreationDate { get; set; } + /// - /// 部门主管 + /// 部门主管 (Department Leader) /// - [SqlSugar.SugarColumn(IsIgnore = true)] - public string leader_name { get; set; } + [SugarColumn(ColumnName = "dept_leader")] + public string DepartmentLeader { get; set; } + /// - /// 上级部门 + /// 部门主管姓名 (Department Leader Name) /// - [SqlSugar.SugarColumn(ColumnName = "dept_parent")] - public string dept_parent { get; set; } + [SugarColumn(IsIgnore = true)] + public string LeaderName { get; set; } + /// - /// 上级部门 + /// 上级部门编号 (Parent Department Number) /// - [SqlSugar.SugarColumn(IsIgnore = true)] - public string parent_name { get; set; } + [SugarColumn(ColumnName = "dept_parent")] + public string ParentDepartmentNumber { get; set; } + /// + /// 上级部门名称 (Parent Department Name) + /// + [SugarColumn(IsIgnore = true)] + public string ParentDepartmentName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/Zero/Education.cs b/EOM.TSHotelManagement.Common.Core/Zero/Education.cs index ac66ca6..f9b92de 100644 --- a/EOM.TSHotelManagement.Common.Core/Zero/Education.cs +++ b/EOM.TSHotelManagement.Common.Core/Zero/Education.cs @@ -22,27 +22,32 @@ * *模块说明:学历类 */ +using SqlSugar; + namespace EOM.TSHotelManagement.Common.Core { /// - /// 学历 + /// 学历 (Education) /// - [SqlSugar.SugarTable("education")] - public class Education : BaseDTO + [SugarTable("education")] + public class Education : BaseDto { /// - /// 索引ID + /// 索引ID (Index ID) /// - [SqlSugar.SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)] + [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)] public int Id { get; set; } + /// - /// 学历编号 + /// 学历编号 (Education Number) /// - public string education_no { get; set; } + [SugarColumn(ColumnName = "education_no")] + public string EducationNumber { get; set; } + /// - /// 学历名称 + /// 学历名称 (Education Name) /// - public string education_name { get; set; } - + [SugarColumn(ColumnName = "education_name")] + public string EducationName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/Zero/Menu.cs b/EOM.TSHotelManagement.Common.Core/Zero/Menu.cs index b8995b5..a43e842 100644 --- a/EOM.TSHotelManagement.Common.Core/Zero/Menu.cs +++ b/EOM.TSHotelManagement.Common.Core/Zero/Menu.cs @@ -29,47 +29,45 @@ using SqlSugar; namespace EOM.TSHotelManagement.Common.Core { /// - /// 菜单表 - /// + /// 菜单表 (Menu Table) + /// [SugarTable("menu")] - public class Menu: BaseDTO + public class Menu : BaseDto { /// - /// 备 注:自增长ID + /// 备 注:自增长ID (Auto-incrementing ID) /// 默认值: - /// - [SugarColumn(ColumnName="id" ,IsPrimaryKey = true) ] - public int Id { get; set; } - + /// + [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)] + public int Id { get; set; } + /// - /// 备 注:菜单键 + /// 备 注:菜单键 (Menu Key) /// 默认值: - /// - [SugarColumn(ColumnName="key" ) ] - public string? Key { get; set; } - + /// + [SugarColumn(ColumnName = "key")] + public string? Key { get; set; } + /// - /// 备 注:菜单标题 + /// 备 注:菜单标题 (Menu Title) /// 默认值: - /// - [SugarColumn(ColumnName="title" ) ] - public string Title { get; set; } = null!; - + /// + [SugarColumn(ColumnName = "title")] + public string Title { get; set; } = null!; + /// - /// 备 注:菜单路径 + /// 备 注:菜单路径 (Menu Path) /// 默认值: - /// - [SugarColumn(ColumnName="path" ) ] - public string? Path { get; set; } - + /// + [SugarColumn(ColumnName = "path")] + public string? Path { get; set; } + /// - /// 备 注:父级ID + /// 备 注:父级ID (Parent ID) /// 默认值: - /// - [SugarColumn(ColumnName="parent" ) ] - public int? Parent { get; set; } - - + /// + [SugarColumn(ColumnName = "parent")] + public int? Parent { get; set; } } - + } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Common.Core/Zero/MenuViewModel.cs b/EOM.TSHotelManagement.Common.Core/Zero/MenuViewModel.cs index a5021e5..6959174 100644 --- a/EOM.TSHotelManagement.Common.Core/Zero/MenuViewModel.cs +++ b/EOM.TSHotelManagement.Common.Core/Zero/MenuViewModel.cs @@ -7,25 +7,28 @@ using System.Threading.Tasks; namespace EOM.TSHotelManagement.Common.Core { /// - /// 菜单视图模型 + /// 菜单视图模型 (Menu View Model) /// public class MenuViewModel { /// - /// 菜单主键 + /// 菜单主键 (Menu Key) /// - public string key { get; set; } + public string Key { get; set; } + /// - /// 菜单标题 + /// 菜单标题 (Menu Title) /// - public string title { get; set; } + public string Title { get; set; } + /// - /// 菜单路径 + /// 菜单路径 (Menu Path) /// - public string path { get; set; } + public string Path { get; set; } + /// - /// 子菜单 + /// 子菜单 (Child Menus) /// - public List children { get; set; } + public List Children { get; set; } = new List(); } } diff --git a/EOM.TSHotelManagement.Common.Core/Zero/Module.cs b/EOM.TSHotelManagement.Common.Core/Zero/Module.cs index c33ab5e..1d5a722 100644 --- a/EOM.TSHotelManagement.Common.Core/Zero/Module.cs +++ b/EOM.TSHotelManagement.Common.Core/Zero/Module.cs @@ -1,24 +1,29 @@ -namespace EOM.TSHotelManagement.Common.Core +using SqlSugar; + +namespace EOM.TSHotelManagement.Common.Core { /// - /// 模块实体 + /// 模块实体 (Module Entity) /// - [SqlSugar.SugarTable("module")] - public class Module : BaseDTO + [SugarTable("module")] + public class Module : BaseDto { /// - /// 模块ID + /// 模块ID (Module ID) /// - public int module_id { get; set; } + [SugarColumn(ColumnName = "module_id", IsPrimaryKey = true)] + public int ModuleId { get; set; } /// - /// 模块名称 + /// 模块名称 (Module Name) /// - public string module_name { get; set; } + [SugarColumn(ColumnName = "module_name")] + public string ModuleName { get; set; } /// - /// 模块描述 + /// 模块描述 (Module Description) /// - public string module_desc { get; set; } + [SugarColumn(ColumnName = "module_desc")] + public string ModuleDescription { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/Zero/ModuleConsts.cs b/EOM.TSHotelManagement.Common.Core/Zero/ModuleConsts.cs index a36d5c0..91be7cd 100644 --- a/EOM.TSHotelManagement.Common.Core/Zero/ModuleConsts.cs +++ b/EOM.TSHotelManagement.Common.Core/Zero/ModuleConsts.cs @@ -44,7 +44,7 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 监管统计 /// - public const string CheckInfo = "CheckInfo"; + public const string SupervisionStatistics = "SupervisionStatistics"; /// /// 客房管理 /// diff --git a/EOM.TSHotelManagement.Common.Core/Zero/ModulePermission.cs b/EOM.TSHotelManagement.Common.Core/Zero/ModulePermission.cs new file mode 100644 index 0000000..cc55d4c --- /dev/null +++ b/EOM.TSHotelManagement.Common.Core/Zero/ModulePermission.cs @@ -0,0 +1,36 @@ +using SqlSugar; + +namespace EOM.TSHotelManagement.Common.Core +{ + + /// + /// 模块权限表 (Module Permission Table) + /// + [SugarTable("module_zero")] + public class ModulePermission + { + /// + /// 模块ID (Module ID) + /// + [SugarColumn(ColumnName = "module_id", IsIdentity = true)] + public int ModuleId { get; set; } + + /// + /// 管理员账号 (Administrator Account) + /// + [SugarColumn(ColumnName = "admin_account")] + public string AdministratorAccount { get; set; } + + /// + /// 模块名称 (Module Name) + /// + [SugarColumn(ColumnName = "module_name")] + public string ModuleName { get; set; } + + /// + /// 是否开启 (Is Enabled) + /// + [SugarColumn(ColumnName = "module_enable")] + public int ModuleEnabled { get; set; } + } +} diff --git a/EOM.TSHotelManagement.Common.Core/Zero/ModuleZero.cs b/EOM.TSHotelManagement.Common.Core/Zero/ModuleZero.cs deleted file mode 100644 index 89d71ae..0000000 --- a/EOM.TSHotelManagement.Common.Core/Zero/ModuleZero.cs +++ /dev/null @@ -1,31 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Core -{ - - /// - /// 模块权限表 - /// - [SqlSugar.SugarTable("module_zero")] - public class ModuleZero - { - /// - /// 模块ID - /// - [SqlSugar.SugarColumn(IsIdentity = true, ColumnName = "module_id")] - public int module_id { get; set; } - /// - /// 管理员账号 - /// - [SqlSugar.SugarColumn(ColumnName = "admin_account")] - public string admin_account { get; set; } - /// - /// 模块名称 - /// - [SqlSugar.SugarColumn(ColumnName = "module_name")] - public string module_name { get; set; } - /// - /// 是否开启 - /// - [SqlSugar.SugarColumn(ColumnName = "module_enable")] - public int module_enable { get; set; } - } -} diff --git a/EOM.TSHotelManagement.Common.Core/Zero/Nation.cs b/EOM.TSHotelManagement.Common.Core/Zero/Nation.cs index cfbdbc8..b0d64a3 100644 --- a/EOM.TSHotelManagement.Common.Core/Zero/Nation.cs +++ b/EOM.TSHotelManagement.Common.Core/Zero/Nation.cs @@ -22,27 +22,32 @@ * *模块说明:民族类 */ +using SqlSugar; + namespace EOM.TSHotelManagement.Common.Core { /// - /// 民族 + /// 民族 (Nation) /// - [SqlSugar.SugarTable("nation")] - public class Nation : BaseDTO + [SugarTable("nation")] + public class Nation : BaseDto { /// - /// 索引ID + /// 索引ID (Index ID) /// - [SqlSugar.SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)] + [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)] public int Id { get; set; } + /// - /// 民族编号 + /// 民族编号 (Nation Number) /// - public string nation_no { get; set; } + [SugarColumn(ColumnName = "nation_no")] + public string NationNumber { get; set; } + /// - /// 民族名称 + /// 民族名称 (Nation Name) /// - public string nation_name { get; set; } - + [SugarColumn(ColumnName = "nation_name")] + public string NationName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/Zero/CheckInfo.cs b/EOM.TSHotelManagement.Common.Core/Zero/SupervisionStatistics.cs similarity index 52% rename from EOM.TSHotelManagement.Common.Core/Zero/CheckInfo.cs rename to EOM.TSHotelManagement.Common.Core/Zero/SupervisionStatistics.cs index 495dafc..8188ef1 100644 --- a/EOM.TSHotelManagement.Common.Core/Zero/CheckInfo.cs +++ b/EOM.TSHotelManagement.Common.Core/Zero/SupervisionStatistics.cs @@ -22,46 +22,62 @@ * *模块说明:监管统计类 */ +using SqlSugar; + namespace EOM.TSHotelManagement.Common.Core { /// - /// 监管统计 + /// 监管统计 (Supervision Statistics) /// - [SqlSugar.SugarTable("checkinfo")] - public class CheckInfo : BaseDTO + [SugarTable("checkinfo")] + public class SupervisionStatistics : BaseDto { /// - /// 监管统计编号 + /// 监管统计编号 (Supervision Statistics Number) /// - public string CheckNo { get; set; } + [SugarColumn(ColumnName = "CheckNo", IsPrimaryKey = true)] + public string StatisticsNumber { get; set; } + /// - /// 本次监管部门 + /// 本次监管部门 (Supervising Department) /// - public string CheckClub { get; set; } + [SugarColumn(ColumnName = "CheckClub")] + public string SupervisingDepartment { get; set; } + /// - /// 本次监管部门名称 + /// 本次监管部门名称 (Supervising Department Name) /// - [SqlSugar.SugarColumn(IsIgnore = true)] - public string CheckClubName { get; set; } + [SugarColumn(IsIgnore = true)] + public string SupervisingDepartmentName { get; set; } + /// - /// 本次监管进度 + /// 本次监管进度 (Supervision Progress) /// - public string CheckProgres { get; set; } + [SugarColumn(ColumnName = "CheckProgres")] + public string SupervisionProgress { get; set; } + /// - /// 本次监管损失 + /// 本次监管损失 (Supervision Loss) /// - public string CheckCash { get; set; } + [SugarColumn(ColumnName = "CheckCash")] + public string SupervisionLoss { get; set; } + /// - /// 本次评分 + /// 本次评分 (Supervision Score) /// - public int CheckScore { get; set; } + [SugarColumn(ColumnName = "CheckScore")] + public int SupervisionScore { get; set; } + /// - /// 监管统计人 + /// 监管统计人 (Supervision Statistician) /// - public string CheckPerson { get; set; } + [SugarColumn(ColumnName = "CheckPerson")] + public string SupervisionStatistician { get; set; } + /// - /// 本次监管建议 + /// 本次监管建议 (Supervision Advice) /// - public string CheckAdvice { get; set; } + [SugarColumn(ColumnName = "CheckAdvice")] + public string SupervisionAdvice { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/Zero/Base.cs b/EOM.TSHotelManagement.Common.Core/Zero/SystemInformation.cs similarity index 77% rename from EOM.TSHotelManagement.Common.Core/Zero/Base.cs rename to EOM.TSHotelManagement.Common.Core/Zero/SystemInformation.cs index edd0059..b537ca7 100644 --- a/EOM.TSHotelManagement.Common.Core/Zero/Base.cs +++ b/EOM.TSHotelManagement.Common.Core/Zero/SystemInformation.cs @@ -22,22 +22,26 @@ * *模块说明:系统信息静态类 */ +using SqlSugar; + namespace EOM.TSHotelManagement.Common.Core { /// - /// 系统信息 + /// 系统信息 (System Information) /// - [SqlSugar.SugarTable("base")] - public class Base + [SugarTable("base")] + public class SystemInformation { /// - /// 地址编号 + /// 地址编号 (URL Number) /// - public int url_no { get; set; } + [SugarColumn(ColumnName = "url_no", IsPrimaryKey = true)] + public int UrlNumber { get; set; } /// - /// 地址 + /// 地址 (URL Address) /// - public string url_addr { get; set; } + [SugarColumn(ColumnName = "url_addr")] + public string UrlAddress { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/Zero/VipRule.cs b/EOM.TSHotelManagement.Common.Core/Zero/VipLevelRule.cs similarity index 64% rename from EOM.TSHotelManagement.Common.Core/Zero/VipRule.cs rename to EOM.TSHotelManagement.Common.Core/Zero/VipLevelRule.cs index 5e4536b..1f5b5bd 100644 --- a/EOM.TSHotelManagement.Common.Core/Zero/VipRule.cs +++ b/EOM.TSHotelManagement.Common.Core/Zero/VipLevelRule.cs @@ -22,48 +22,50 @@ * *模块说明:会员等级规则类 */ +using SqlSugar; + namespace EOM.TSHotelManagement.Common.Core { /// - /// 会员等级规则类 + /// 会员等级规则类 (VIP Level Rule Class) /// - [SqlSugar.SugarTable("vip_rule")] - public class VipRule : BaseDTO + [SugarTable("vip_rule")] + public class VipLevelRule : BaseDto { /// - /// 索引ID + /// 索引ID (Index ID) /// - [SqlSugar.SugarColumn(ColumnName = "id",IsIdentity = true,IsPrimaryKey = true)] + [SugarColumn(ColumnName = "id", IsIdentity = true)] public int Id { get; set; } /// - /// 会员规则流水号 + /// 会员规则流水号 (VIP Rule Serial Number) /// - [SqlSugar.SugarColumn(ColumnName = "rule_id", IsPrimaryKey = true)] - public string RuleId { get; set; } + [SugarColumn(ColumnName = "rule_id", IsPrimaryKey = true)] + public string RuleSerialNumber { get; set; } /// - /// 会员规则名称 + /// 会员规则名称 (VIP Rule Name) /// - [SqlSugar.SugarColumn(ColumnName = "rule_name")] + [SugarColumn(ColumnName = "rule_name")] public string RuleName { get; set; } /// - /// 预设数值(历史消费总额) + /// 预设数值(历史消费总额) (Preset Value - Total Historical Spending) /// - [SqlSugar.SugarColumn(ColumnName = "rule_value")] + [SugarColumn(ColumnName = "rule_value")] public decimal RuleValue { get; set; } /// - /// 会员等级 + /// 会员等级 (VIP Level) /// - [SqlSugar.SugarColumn(ColumnName = "type_id")] - public int TypeId { get; set; } + [SugarColumn(ColumnName = "type_id")] + public int VipLevelId { get; set; } /// - /// 会员等级描述 + /// 会员等级描述 (VIP Level Description) /// - [SqlSugar.SugarColumn(IsIgnore = true)] - public string TypeName { get; set; } + [SugarColumn(IsIgnore = true)] + public string VipLevelName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/Zero/position.cs b/EOM.TSHotelManagement.Common.Core/Zero/position.cs index e1780eb..8d72fc4 100644 --- a/EOM.TSHotelManagement.Common.Core/Zero/position.cs +++ b/EOM.TSHotelManagement.Common.Core/Zero/position.cs @@ -22,27 +22,32 @@ * *模块说明:职务类 */ +using SqlSugar; + namespace EOM.TSHotelManagement.Common.Core { /// - /// 职位 + /// 职位 (Position) /// - [SqlSugar.SugarTable("position")] - public class Position : BaseDTO + [SugarTable("position")] + public class Position : BaseDto { /// - /// 索引ID + /// 索引ID (Index ID) /// - [SqlSugar.SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)] + [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)] public int Id { get; set; } + /// - /// 职位编号 + /// 职位编号 (Position Number) /// - public string position_no { get; set; } + [SugarColumn(ColumnName = "position_no")] + public string PositionNumber { get; set; } + /// - /// 职位名称 + /// 职位名称 (Position Name) /// - public string position_name { get; set; } - + [SugarColumn(ColumnName = "position_name")] + public string PositionName { get; set; } } } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Cash/CashController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Business/Cash/CashController.cs index fbb6c38..f932599 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Cash/CashController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Business/Cash/CashController.cs @@ -30,7 +30,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool AddCashInfo([FromBody] Cash cash) + public bool AddCashInfo([FromBody] Asset cash) { return cashService.AddCashInfo(cash); } @@ -40,7 +40,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public List SelectCashInfoAll() + public List SelectCashInfoAll() { return cashService.SelectCashInfoAll(); } @@ -51,7 +51,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool UpdCashInfo([FromBody]Cash cash) + public bool UpdCashInfo([FromBody]Asset cash) { return cashService.UpdCashInfo(cash); } @@ -62,7 +62,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool DelCashInfo([FromBody]Cash cash) + public bool DelCashInfo([FromBody]Asset cash) { return cashService.DelCashInfo(cash); } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Customer/CustoController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Business/Customer/CustoController.cs index 629e2f2..d08cc64 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Customer/CustoController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Business/Customer/CustoController.cs @@ -30,7 +30,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool InsertCustomerInfo([FromBody] Custo custo) + public bool InsertCustomerInfo([FromBody] Customer custo) { return customerService.InsertCustomerInfo(custo); } @@ -41,7 +41,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool UpdCustomerInfo([FromBody] Custo custo) + public bool UpdCustomerInfo([FromBody] Customer custo) { return customerService.UpdCustomerInfo(custo); } @@ -52,7 +52,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool DelCustomerInfo([FromBody] Custo custo) + public bool DelCustomerInfo([FromBody] Customer custo) { return customerService.DelCustomerInfo(custo); } @@ -84,7 +84,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public OSelectAllDto SelectCustoAll([FromQuery] int pageIndex, int pageSize, bool onlyVip = false) + public OSelectAllDto SelectCustoAll([FromQuery] int pageIndex, int pageSize, bool onlyVip = false) { return customerService.SelectCustoAll(pageIndex, pageSize, onlyVip); } @@ -94,7 +94,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public OSelectAllDto SelectCustomers(Custo custo) + public OSelectAllDto SelectCustomers(Customer custo) { return customerService.SelectCustomers(custo); } @@ -104,7 +104,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public List SelectCustoByInfo([FromBody] Custo custo) + public List SelectCustoByInfo([FromBody] Customer custo) { return customerService.SelectCustoByInfo(custo); } @@ -115,7 +115,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public Custo SelectCardInfoByCustoNo([FromQuery] string CustoNo) + public Customer SelectCardInfoByCustoNo([FromQuery] string CustoNo) { return customerService.SelectCardInfoByCustoNo(CustoNo); } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Fonts/FontsController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Business/Fonts/FontsController.cs index df24ba3..bba815d 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Fonts/FontsController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Business/Fonts/FontsController.cs @@ -29,7 +29,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public List SelectFontAll() + public List SelectFontAll() { return fontsService.SelectFontAll(); } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Util/AppController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Util/AppController.cs index 8790bf9..84e7e6f 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Util/AppController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Util/AppController.cs @@ -41,7 +41,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// [HttpGet] [AllowAnonymous] - public Applicationversion CheckBaseVersion() + public ApplicationVersion CheckBaseVersion() { return utilService.CheckBaseVersion(); } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Worker/Check/WorkerCheckController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Worker/Check/WorkerCheckController.cs index fb475a2..24e57de 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Worker/Check/WorkerCheckController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Worker/Check/WorkerCheckController.cs @@ -30,7 +30,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public List SelectCheckInfoByWorkerNo([FromQuery] string wid) + public List SelectCheckInfoByWorkerNo([FromQuery] string wid) { return workerCheckService.SelectCheckInfoByWorkerNo(wid); } @@ -63,7 +63,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool AddCheckInfo([FromBody] WorkerCheck workerCheck) + public bool AddCheckInfo([FromBody] EmployeeCheck workerCheck) { return workerCheckService.AddCheckInfo(workerCheck); } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Worker/GoodBad/WorkerGoodBadController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Worker/GoodBad/WorkerGoodBadController.cs index 8d0dc26..990c44f 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Worker/GoodBad/WorkerGoodBadController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Worker/GoodBad/WorkerGoodBadController.cs @@ -30,7 +30,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool AddGoodBad([FromBody] WorkerGoodBad goodBad) + public bool AddGoodBad([FromBody] EmployeeRewardPunishment goodBad) { return workerGoodBadService.AddGoodBad(goodBad); } @@ -41,7 +41,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public List SelectAllGoodBadByWorkNo([FromQuery] string wn) + public List SelectAllGoodBadByWorkNo([FromQuery] string wn) { return workerGoodBadService.SelectAllGoodBadByWorkNo(wn); } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Worker/History/WorkerHistoryController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Worker/History/WorkerHistoryController.cs index 258aa98..540a08a 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Worker/History/WorkerHistoryController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Worker/History/WorkerHistoryController.cs @@ -30,7 +30,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool AddHistoryByWorkerId([FromBody] WorkerHistory workerHistory) + public bool AddHistoryByWorkerId([FromBody] EmployeeHistory workerHistory) { return workerHistoryService.AddHistoryByWorkerId(workerHistory); } @@ -41,7 +41,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public List SelectHistoryByWorkerId([FromQuery] string wid) + public List SelectHistoryByWorkerId([FromQuery] string wid) { return workerHistoryService.SelectHistoryByWorkerId(wid); } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Worker/Picture/WorkerPictureController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Worker/Picture/WorkerPictureController.cs index c7e1ac8..28c7177 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Worker/Picture/WorkerPictureController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Worker/Picture/WorkerPictureController.cs @@ -29,9 +29,9 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public WorkerPic WorkerPic([FromQuery] WorkerPic workerPic) + public EmployeePhoto EmployeePhoto([FromQuery] EmployeePhoto workerPic) { - return workerPicService.WorkerPic(workerPic); + return workerPicService.EmployeePhoto(workerPic); } /// @@ -40,7 +40,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool InsertWorkerPic([FromBody] WorkerPic workerPic) + public bool InsertWorkerPic([FromBody] EmployeePhoto workerPic) { return workerPicService.InsertWorkerPic(workerPic); } @@ -51,7 +51,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool DeleteWorkerPic([FromBody] WorkerPic workerPic) + public bool DeleteWorkerPic([FromBody] EmployeePhoto workerPic) { return workerPicService.DeleteWorkerPic(workerPic); } @@ -62,7 +62,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool UpdateWorkerPic([FromBody] WorkerPic workerPic) + public bool UpdateWorkerPic([FromBody] EmployeePhoto workerPic) { return workerPicService.UpdateWorkerPic(workerPic); } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Worker/WorkerController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Worker/WorkerController.cs index a82c6ad..2397368 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Worker/WorkerController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Worker/WorkerController.cs @@ -31,7 +31,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool UpdateWorker([FromBody] Worker worker) + public bool UpdateWorker([FromBody] Employee worker) { return workerService.UpdateWorker(worker); } @@ -42,7 +42,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool ManagerWorkerAccount([FromBody] Worker worker) + public bool ManagerWorkerAccount([FromBody] Employee worker) { return workerService.ManagerWorkerAccount(worker); } @@ -54,7 +54,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// [HttpPost] - public bool UpdateWorkerPositionAndClub([FromBody] Worker worker) + public bool UpdateWorkerPositionAndClub([FromBody] Employee worker) { return workerService.UpdateWorkerPositionAndClub(worker); } @@ -65,7 +65,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool AddWorker([FromBody] Worker worker) + public bool AddWorker([FromBody] Employee worker) { return workerService.AddWorker(worker); } @@ -75,7 +75,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public List SelectWorkerAll() + public List SelectWorkerAll() { return workerService.SelectWorkerAll(); } @@ -97,7 +97,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public Worker SelectWorkerInfoByWorkerId([FromQuery] string workerId) + public Employee SelectWorkerInfoByWorkerId([FromQuery] string workerId) { return workerService.SelectWorkerInfoByWorkerId(workerId); } @@ -109,7 +109,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// [HttpPost] [AllowAnonymous] - public Worker SelectWorkerInfoByWorkerIdAndWorkerPwd([FromBody] Worker worker) + public Employee SelectWorkerInfoByWorkerIdAndWorkerPwd([FromBody] Employee worker) { return workerService.SelectWorkerInfoByWorkerIdAndWorkerPwd(worker); } @@ -120,7 +120,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool UpdWorkerPwdByWorkNo([FromBody] Worker worker) + public bool UpdWorkerPwdByWorkNo([FromBody] Employee worker) { return workerService.UpdWorkerPwdByWorkNo(worker); } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Zero/Admin/AdminController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Zero/Admin/AdminController.cs index f58b5bd..379e36d 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Zero/Admin/AdminController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Zero/Admin/AdminController.cs @@ -32,7 +32,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// [HttpPost] [AllowAnonymous] - public Admin SelectManagerByPass([FromBody] Admin admin) + public Administrator SelectManagerByPass([FromBody] Administrator admin) { return adminService.SelectManagerByPass(admin); } @@ -44,7 +44,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// [HttpPost] [AllowAnonymous] - public Admin Login([FromBody] Admin admin) + public Administrator Login([FromBody] Administrator admin) { return adminService.Login(admin); } @@ -55,7 +55,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public Admin SelectAdminPwdByAccount([FromQuery] string account) + public Administrator SelectAdminPwdByAccount([FromQuery] string account) { return adminService.SelectAdminPwdByAccount(account); } @@ -65,7 +65,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public List GetAllAdminList() + public List GetAllAdminList() { return adminService.GetAllAdminList(); } @@ -76,7 +76,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool UpdateNewPwdByOldPwd([FromBody] Admin admin) + public bool UpdateNewPwdByOldPwd([FromBody] Administrator admin) { return adminService.UpdateNewPwdByOldPwd(admin); } @@ -86,7 +86,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public List GetAllAdmin() + public List GetAllAdmin() { return adminService.GetAllAdmin(); } @@ -97,7 +97,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool AddAdmin([FromBody] Admin admin) + public bool AddAdmin([FromBody] Administrator admin) { return adminService.AddAdmin(admin); } @@ -108,7 +108,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public Admin GetAdminInfoByAdminAccount([FromQuery] Admin admin) + public Administrator GetAdminInfoByAdminAccount([FromQuery] Administrator admin) { return adminService.GetAdminInfoByAdminAccount(admin); } @@ -118,7 +118,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public List GetAllAdminTypes() + public List GetAllAdminTypes() { return adminService.GetAllAdminTypes(); } @@ -129,7 +129,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool UpdAccount([FromBody] Admin admins) + public bool UpdAccount([FromBody] Administrator admins) { return adminService.UpdAccount(admins); } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Zero/Base/BaseController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Zero/Base/BaseController.cs index ded18fe..2c4619e 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Zero/Base/BaseController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Zero/Base/BaseController.cs @@ -1,6 +1,8 @@ using EOM.TSHotelManagement.Application; +using EOM.TSHotelManagement.Common; using EOM.TSHotelManagement.Common.Core; using Microsoft.AspNetCore.Mvc; +using System; using System.Collections.Generic; namespace EOM.TSHotelManagement.WebApi.Controllers @@ -31,7 +33,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public List SelectSexTypeAll([FromQuery] SexType sexType = null) + public List SelectSexTypeAll([FromQuery] GenderType sexType = null) { return baseService.SelectSexTypeAll(sexType); } @@ -41,7 +43,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public SexType SelectSexType([FromQuery] SexType sexType) + public GenderType SelectSexType([FromQuery] GenderType sexType) { return baseService.SelectSexType(sexType); } @@ -52,7 +54,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool AddSexType([FromBody] SexType sexType) + public bool AddSexType([FromBody] GenderType sexType) { return baseService.AddSexType(sexType); } @@ -63,7 +65,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool DelSexType([FromBody] SexType sexType) + public bool DelSexType([FromBody] GenderType sexType) { return baseService.DelSexType(sexType); } @@ -74,13 +76,26 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool UpdSexType([FromBody] SexType sexType) + public bool UpdSexType([FromBody] GenderType sexType) { return baseService.UpdSexType(sexType); } #endregion + #region 面貌模块 + + /// + /// 查询所有面貌类型 + /// + /// + [HttpGet] + public List SelectWorkerFeatureAll() + { + return baseService.SelectWorkerFeatureAll(); + } + #endregion + #region 职位模块 /// @@ -259,7 +274,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public List SelectDeptAllCanUse() + public List SelectDeptAllCanUse() { return baseService.SelectDeptAllCanUse(); } @@ -269,7 +284,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public List SelectDeptAll() + public List SelectDeptAll() { return baseService.SelectDeptAll(); } @@ -279,7 +294,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public Dept SelectDept([FromQuery] Dept dept) + public Department SelectDept([FromQuery] Department dept) { return baseService.SelectDept(dept); } @@ -290,7 +305,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool AddDept([FromBody] Dept dept) + public bool AddDept([FromBody] Department dept) { return baseService.AddDept(dept); } @@ -301,7 +316,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool DelDept([FromBody] Dept dept) + public bool DelDept([FromBody] Department dept) { return baseService.DelDept(dept); } @@ -312,7 +327,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool UpdDept([FromBody] Dept dept) + public bool UpdDept([FromBody] Department dept) { return baseService.UpdDept(dept); } @@ -394,7 +409,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public List SelectPassPortTypeAllCanUse() + public List SelectPassPortTypeAllCanUse() { return baseService.SelectPassPortTypeAllCanUse(); } @@ -404,7 +419,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public List SelectPassPortTypeAll() + public List SelectPassPortTypeAll() { return baseService.SelectPassPortTypeAll(); } @@ -415,7 +430,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public PassPortType SelectPassPortTypeByTypeId([FromQuery] PassPortType passPortType) + public PassportType SelectPassPortTypeByTypeId([FromQuery] PassportType passPortType) { return baseService.SelectPassPortTypeByTypeId(passPortType); } @@ -426,7 +441,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool InsertPassPortType([FromBody] PassPortType passPortType) + public bool InsertPassPortType([FromBody] PassportType passPortType) { return baseService.InsertPassPortType(passPortType); } @@ -437,7 +452,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool DeletePassPortType([FromBody] PassPortType portType) + public bool DeletePassPortType([FromBody] PassportType portType) { return baseService.DeletePassPortType(portType); } @@ -448,7 +463,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool UpdatePassPortType([FromBody] PassPortType portType) + public bool UpdatePassPortType([FromBody] PassportType portType) { return baseService.UpdatePassPortType(portType); } @@ -529,7 +544,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public Base GetBase() + public SystemInformation GetBase() { return baseService.GetBase(); } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Zero/CheckInfo/CheckInfoController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Zero/CheckInfo/CheckInfoController.cs index 5287a07..e5e2a76 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Zero/CheckInfo/CheckInfoController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Zero/CheckInfo/CheckInfoController.cs @@ -29,7 +29,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public List SelectCheckInfoAll() + public List SelectCheckInfoAll() { return checkInfoService.SelectCheckInfoAll(); } @@ -40,7 +40,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool InsertCheckInfo([FromBody]CheckInfo checkInfo) + public bool InsertCheckInfo([FromBody]SupervisionStatistics checkInfo) { return checkInfoService.InsertCheckInfo(checkInfo); } @@ -51,7 +51,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool UpdateCheckInfo([FromBody]CheckInfo checkInfo) + public bool UpdateCheckInfo([FromBody]SupervisionStatistics checkInfo) { return checkInfoService.UpdateCheckInfo(checkInfo); } @@ -62,7 +62,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool DeleteCheckInfo([FromBody] CheckInfo checkInfo) + public bool DeleteCheckInfo([FromBody] SupervisionStatistics checkInfo) { return checkInfoService.DeleteCheckInfo(checkInfo); } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Zero/Module/ModuleController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Zero/Module/ModuleController.cs index 836a7b5..bc36a0f 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Zero/Module/ModuleController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Zero/Module/ModuleController.cs @@ -40,7 +40,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public List GetAllModuleByAdmin([FromBody] Admin admin) + public List GetAllModuleByAdmin([FromBody] Administrator admin) { return adminModuleZeroService.GetAllModuleByAdmin(admin); } @@ -51,7 +51,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool AddModuleZeroList([FromBody] List moduleZeros) + public bool AddModuleZeroList([FromBody] List moduleZeros) { return adminModuleZeroService.AddModuleZeroList(moduleZeros); } @@ -62,7 +62,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool DelModuleZeroList([FromBody] ModuleZero moduleZero) + public bool DelModuleZeroList([FromBody] ModulePermission moduleZero) { return adminModuleZeroService.DelModuleZeroList(moduleZero); } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Zero/Notice/NoticeController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Zero/Notice/NoticeController.cs index f817a39..e226f1a 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Zero/Notice/NoticeController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Zero/Notice/NoticeController.cs @@ -30,7 +30,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public List SelectNoticeAll() + public List SelectNoticeAll() { return noticeService.SelectNoticeAll(); } @@ -42,7 +42,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public Notice SelectNoticeByNoticeNo([FromQuery] string noticeId) + public AppointmentNotice SelectNoticeByNoticeNo([FromQuery] string noticeId) { return noticeService.SelectNoticeByNoticeNo(noticeId); } @@ -54,7 +54,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool InsertNotice([FromBody] Notice notice) + public bool InsertNotice([FromBody] AppointmentNotice notice) { return noticeService.InsertNotice(notice); } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Zero/VipRule/VipRuleController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Zero/VipRule/VipRuleController.cs index 4dfe0fa..21d7334 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Zero/VipRule/VipRuleController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Zero/VipRule/VipRuleController.cs @@ -29,7 +29,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public List SelectVipRuleList() + public List SelectVipRuleList() { return vipRuleAppService.SelectVipRuleList(); } @@ -40,7 +40,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public VipRule SelectVipRule([FromQuery] VipRule vipRule) + public VipLevelRule SelectVipRule([FromQuery] VipLevelRule vipRule) { return vipRuleAppService.SelectVipRule(vipRule); } @@ -51,7 +51,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool AddVipRule([FromBody] VipRule vipRule) + public bool AddVipRule([FromBody] VipLevelRule vipRule) { return vipRuleAppService.AddVipRule(vipRule); } @@ -62,7 +62,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool DelVipRule([FromBody] VipRule vipRule) + public bool DelVipRule([FromBody] VipLevelRule vipRule) { return vipRuleAppService.DelVipRule(vipRule); } @@ -73,7 +73,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool UpdVipRule([FromBody] VipRule vipRule) + public bool UpdVipRule([FromBody] VipLevelRule vipRule) { return vipRuleAppService.UpdVipRule(vipRule); } -- Gitee From ee7dbab3e9aeed2ca8729037fc8229d8642361a9 Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Sun, 2 Mar 2025 14:28:31 +0800 Subject: [PATCH 02/24] Rename Service. Add AutoMapper component. --- .../CashService.cs => Asset/AssetService.cs} | 85 ++-- .../IAssetService.cs} | 11 +- .../{CustoService.cs => CustomerService.cs} | 414 ++++++++++-------- .../{ICustoService.cs => ICustomerService.cs} | 23 +- .../EnergyManagementService.cs} | 119 +++-- .../IEnergyManagementService.cs} | 17 +- .../IPromotionContentService.cs} | 11 +- .../PromotionContentService.cs} | 29 +- .../Business/Reser/IReserService.cs | 11 +- .../Business/Reser/ReserService.cs | 100 +++-- .../EOM.TSHotelManagement.Application.csproj | 1 + .../Util/IUtilService.cs | 5 +- .../Util/UtilService.cs | 7 +- .../BaseDto/BaseDto.cs | 12 + .../BaseDto/BaseInputDto.cs | 32 ++ .../BaseDto/BaseOutputDto.cs | 42 ++ .../BaseDto/ListInputDto.cs | 20 + .../BaseDto/ListOutputDto.cs | 7 +- .../BaseDto/SingleOutputDto.cs | 16 + .../BaseDto/StatusCodeConstants.cs | 20 + .../Asset/Dto/Asset/CreateAssetInputDto.cs | 14 + .../Asset/Dto/Asset/CreateAssetOutputDto.cs | 17 + .../Asset/Dto/Asset/DeleteAssetInputDto.cs | 8 + .../Asset/Dto/Asset/DeleteAssetOutputDto.cs | 8 + .../Asset/Dto/Asset/ReadAssetInputDto.cs | 8 + .../Asset/Dto/Asset/ReadAssetOutputDto.cs | 17 + .../Asset/Dto/Asset/UpdateAssetInputDto.cs | 14 + .../Asset/Dto/Asset/UpdateAssetOutputDto.cs | 17 + .../Dto/CustoType/CreateCustoTypeInputDto.cs | 9 + .../Dto/CustoType/CreateCustoTypeOutputDto.cs | 9 + .../Dto/CustoType/DeleteCustoTypeInputDto.cs | 8 + .../Dto/CustoType/DeleteCustoTypeOutputDto.cs | 8 + .../Dto/CustoType/ReadCustoTypeInputDto.cs | 8 + .../Dto/CustoType/ReadCustoTypeOutputDto.cs | 9 + .../Dto/CustoType/UpdateCustoTypeInputDto.cs | 9 + .../Dto/CustoType/UpdateCustoTypeOutputDto.cs | 9 + .../Dto/Customer/CreateCustomerInputDto.cs | 16 + .../Dto/Customer/CreateCustomerOutputDto.cs | 19 + .../Dto/Customer/DeleteCustomerInputDto.cs | 8 + .../Dto/Customer/DeleteCustomerOutputDto.cs | 8 + .../Dto/Customer/ReadCustomerInputDto.cs | 12 + .../Dto/Customer/ReadCustomerOutputDto.cs | 21 + .../Dto/Customer/UpdateCustomerInputDto.cs | 16 + .../Dto/Customer/UpdateCustomerOutputDto.cs | 19 + .../GenderType/CreateGenderTypeInputDto.cs | 8 + .../GenderType/CreateGenderTypeOutputDto.cs | 9 + .../GenderType/DeleteGenderTypeInputDto.cs | 8 + .../GenderType/DeleteGenderTypeOutputDto.cs | 8 + .../Dto/GenderType/ReadGenderTypeInputDto.cs | 8 + .../Dto/GenderType/ReadGenderTypeOutputDto.cs | 9 + .../GenderType/UpdateGenderTypeInputDto.cs | 9 + .../GenderType/UpdateGenderTypeOutputDto.cs | 9 + .../CreatePassportTypeInputDto.cs | 9 + .../CreatePassportTypeOutputDto.cs | 9 + .../DeletePassportTypeInputDto.cs | 8 + .../DeletePassportTypeOutputDto.cs | 8 + .../PassportType/ReadPassportTypeInputDto.cs | 8 + .../PassportType/ReadPassportTypeOutputDto.cs | 9 + .../UpdatePassportTypeInputDto.cs | 9 + .../UpdatePassportTypeOutputDto.cs | 9 + .../Dto/CreateEnergyManagementInputDto.cs | 14 + .../Dto/CreateEnergyManagementOutputDto.cs | 15 + .../Dto/DeleteEnergyManagementInputDto.cs | 8 + .../Dto/DeleteEnergyManagementOutputDto.cs | 8 + .../Dto/ReadEnergyManagementInputDto.cs | 11 + .../Dto/ReadEnergyManagementOutputDto.cs | 15 + .../Dto/UpdateEnergyManagementInputDto.cs | 15 + .../Dto/UpdateEnergyManagementOutputDto.cs | 15 + .../Dto/CreatePromotionContentInputDto.cs | 11 + .../Dto/CreatePromotionContentOutputDto.cs | 12 + .../Dto/DeletePromotionContentInputDto.cs | 8 + .../Dto/DeletePromotionContentOutputDto.cs | 8 + .../Dto/ReadPromotionContentInputDto.cs | 8 + .../Dto/ReadPromotionContentOutputDto.cs | 12 + .../Dto/UpdatePromotionContentInputDto.cs | 12 + .../Dto/UpdatePromotionContentOutputDto.cs | 12 + .../Business/Reser/Dto/CreateReserInputDto.cs | 13 + .../Reser/Dto/CreateReserOutputDto.cs | 14 + .../Business/Reser/Dto/DeleteReserInputDto.cs | 8 + .../Reser/Dto/DeleteReserOutputDto.cs | 8 + .../Business/Reser/Dto/ReadReserInputDto.cs | 9 + .../Business/Reser/Dto/ReadReserOutputDto.cs | 14 + .../Business/Reser/Dto/UpdateReserInputDto.cs | 14 + .../Reser/Dto/UpdateReserOutputDto.cs | 14 + .../Room/Dto/Room/CreateRoomInputDto.cs | 11 + .../Room/Dto/Room/CreateRoomOutputDto.cs | 12 + .../Room/Dto/Room/DeleteRoomInputDto.cs | 9 + .../Room/Dto/Room/DeleteRoomOutputDto.cs | 9 + .../Room/Dto/Room/ReadRoomInputDto.cs | 8 + .../Room/Dto/Room/ReadRoomOutputDto.cs | 12 + .../Room/Dto/Room/UpdateRoomInputDto.cs | 13 + .../Room/Dto/Room/UpdateRoomOutputDto.cs | 13 + .../Dto/RoomState/CreateRoomStateInputDto.cs | 9 + .../Dto/RoomState/CreateRoomStateOutputDto.cs | 10 + .../Dto/RoomState/DeleteRoomStateInputDto.cs | 9 + .../Dto/RoomState/DeleteRoomStateOutputDto.cs | 9 + .../Dto/RoomState/ReadRoomStateInputDto.cs | 9 + .../Dto/RoomState/ReadRoomStateOutputDto.cs | 10 + .../Dto/RoomState/UpdateRoomStateInputDto.cs | 10 + .../Dto/RoomState/UpdateRoomStateOutputDto.cs | 10 + .../Dto/RoomType/CreateRoomTypeInputDto.cs | 10 + .../Dto/RoomType/CreateRoomTypeOutputDto.cs | 11 + .../Dto/RoomType/DeleteRoomTypeInputDto.cs | 9 + .../Dto/RoomType/DeleteRoomTypeOutputDto.cs | 9 + .../Room/Dto/RoomType/ReadRoomTypeInputDto.cs | 9 + .../Dto/RoomType/ReadRoomTypeOutputDto.cs | 11 + .../Dto/RoomType/UpdateRoomTypeInputDto.cs | 11 + .../Dto/RoomType/UpdateRoomTypeOutputDto.cs | 11 + .../Sellthing/Dto/CreateSellThingInputDto.cs | 11 + .../Sellthing/Dto/CreateSellThingOutputDto.cs | 12 + .../Sellthing/Dto/DeleteSellThingInputDto.cs | 9 + .../Sellthing/Dto/DeleteSellThingOutputDto.cs | 9 + .../Sellthing/Dto/ReadSellThingInputDto.cs | 9 + .../Sellthing/Dto/ReadSellThingOutputDto.cs | 12 + .../Sellthing/Dto/UpdateSellThingInputDto.cs | 12 + .../Sellthing/Dto/UpdateSellThingOutputDto.cs | 12 + .../Spend/Dto/Spend/CreateSpendInputDto.cs | 15 + .../Spend/Dto/Spend/CreateSpendOutputDto.cs | 18 + .../Spend/Dto/Spend/DeleteSpendInputDto.cs | 9 + .../Spend/Dto/Spend/DeleteSpendOutputDto.cs | 9 + .../Spend/Dto/Spend/ReadSpendInputDto.cs | 9 + .../Spend/Dto/Spend/ReadSpendOutputDto.cs | 18 + .../Spend/Dto/Spend/UpdateSpendInputDto.cs | 15 + .../Spend/Dto/Spend/UpdateSpendOutputDto.cs | 18 + ...M.TSHotelManagement.Common.Contract.csproj | 26 ++ .../Dto/Employee/CreateEmployeeInputDto.cs | 15 + .../Dto/Employee/CreateEmployeeOutputDto.cs | 16 + .../Dto/Employee/DeleteEmployeeInputDto.cs | 9 + .../Dto/Employee/DeleteEmployeeOutputDto.cs | 9 + .../Dto/Employee/ReadEmployeeInputDto.cs | 9 + .../Dto/Employee/UpdateEmployeeInputDto.cs | 16 + .../Dto/Employee/UpdateEmployeeOutputDto.cs | 16 + .../CreateEmployeeCheckInputDto.cs | 11 + .../CreateEmployeeCheckOutputDto.cs | 12 + .../DeleteEmployeeCheckInputDto.cs | 9 + .../DeleteEmployeeCheckOutputDto.cs | 9 + .../ReadEmployeeCheckInputDto.cs | 9 + .../ReadEmployeeCheckOutputDto.cs | 12 + .../UpdateEmployeeCheckInputDto.cs | 12 + .../UpdateEmployeeCheckOutputDto.cs | 12 + .../CreateEmployeeHistoryInputDto.cs | 12 + .../CreateEmployeeHistoryOutputDto.cs | 13 + .../DeleteEmployeeHistoryInputDto.cs | 9 + .../DeleteEmployeeHistoryOutputDto.cs | 9 + .../ReadEmployeeHistoryInputDto.cs | 9 + .../ReadEmployeeHistoryOutputDto.cs | 13 + .../UpdateEmployeeHistoryInputDto.cs | 13 + .../UpdateEmployeeHistoryOutputDto.cs | 13 + .../CreateEmployeePhotoInputDto.cs | 10 + .../CreateEmployeePhotoOutputDto.cs | 11 + .../DeleteEmployeePhotoInputDto.cs | 9 + .../DeleteEmployeePhotoOutputDto.cs | 9 + .../ReadEmployeePhotoInputDto.cs | 9 + .../ReadEmployeePhotoOutputDto.cs | 11 + .../UpdateEmployeePhotoInputDto.cs | 11 + .../UpdateEmployeePhotoOutputDto.cs | 11 + .../CreateEmployeeRewardPunishmentInputDto.cs | 12 + ...CreateEmployeeRewardPunishmentOutputDto.cs | 13 + .../DeleteEmployeeRewardPunishmentInputDto.cs | 9 + ...DeleteEmployeeRewardPunishmentOutputDto.cs | 9 + .../ReadEmployeeRewardPunishmentInputDto.cs | 9 + .../ReadEmployeeRewardPunishmentOutputDto.cs | 13 + .../UpdateEmployeeRewardPunishmentInputDto.cs | 13 + ...UpdateEmployeeRewardPunishmentOutputDto.cs | 13 + .../CreateRewardPunishmentTypeInputDto.cs | 9 + .../CreateRewardPunishmentTypeOutputDto.cs | 10 + .../DeleteRewardPunishmentTypeInputDto.cs | 9 + .../DeleteRewardPunishmentTypeeOutputDto.cs | 9 + .../ReadRewardPunishmentTypeInputDto.cs | 9 + .../ReadRewardPunishmentTypeOutputDto.cs | 10 + .../UpdateRewardPunishmentTypeInputDto.cs | 10 + .../UpdateRewardPunishmentTypeOutputDto.cs | 10 + .../Sys/NavBar/Dto/CreateNavBarInputDto.cs | 12 + .../Sys/NavBar/Dto/CreateNavBarOutputDto.cs | 13 + .../Sys/NavBar/Dto/DeleteNavBarInputDto.cs | 8 + .../Sys/NavBar/Dto/DeleteNavBarOutputDto.cs | 8 + .../Sys/NavBar/Dto/ReadNavBarInputDto.cs | 8 + .../Sys/NavBar/Dto/ReadNavBarOutputDto.cs | 13 + .../Sys/NavBar/Dto/UpdateNavBarInputDto.cs | 13 + .../Sys/NavBar/Dto/UpdateNavBarOutputDto.cs | 13 + .../CreateApplicationVersionInputDto.cs | 12 + .../CreateApplicationVersionOutputDto.cs | 13 + .../DeleteApplicationVersionInputDto.cs | 10 + .../DeleteApplicationVersionOutputDto.cs | 10 + .../ReadApplicationVersionInputDto.cs | 10 + .../ReadApplicationVersionOutputDto.cs | 13 + .../UpdateApplicationVersionInputDto.cs | 13 + .../UpdateApplicationVersionOutputDto.cs | 13 + .../Dto/CardCode/CreateCardCodeInputDto.cs | 18 + .../Dto/CardCode/CreateCardCodeOutputDto.cs | 18 + .../Dto/CardCode/DeleteCardCodeInputDto.cs | 18 + .../Dto/CardCode/DeleteCardCodeOutputDto.cs | 18 + .../Util/Dto/CardCode/ReadCardCodeInputDto.cs | 18 + .../Dto/CardCode/ReadCardCodeOutputDto.cs | 18 + .../Dto/CardCode/UpdateCardCodeInputDto.cs | 18 + .../Dto/CardCode/UpdateCardCodeOutputDto.cs | 18 + .../CreateOperationLogInputDto.cs | 15 + .../CreateOperationLogOutputDto.cs | 17 + .../DeleteOperationLogInputDto.cs | 8 + .../DeleteOperationLogOutputDto.cs | 8 + .../OperationLog/ReadOperationLogInputDto.cs | 8 + .../OperationLog/ReadOperationLogOutputDto.cs | 17 + .../UpdateOperationLogInputDto.cs | 16 + .../UpdateOperationLogOutputDto.cs | 17 + .../CreateAdministratorInputDto.cs | 13 + .../CreateAdministratorOutputDto.cs | 14 + .../DeleteAdministratorInputDto.cs | 9 + .../DeleteAdministratorOutputDto.cs | 9 + .../ReadAdministratorInputDto.cs | 9 + .../ReadAdministratorOutputDto.cs | 14 + .../UpdateAdministratorInputDto.cs | 14 + .../UpdateAdministratorOutputDto.cs | 14 + .../CreateAdministratorTypeInputDto.cs | 9 + .../CreateAdministratorTypeOutputDto.cs | 10 + .../DeleteAdministratorTypeInputDto.cs | 8 + .../DeleteAdministratorTypeOutputDto.cs | 8 + .../ReadAdministratorTypeInputDto.cs | 8 + .../ReadAdministratorTypeOutputDto.cs | 10 + .../UpdateAdministratorTypeInputDto.cs | 10 + .../UpdateAdministratorTypeOutputDto.cs | 10 + .../CreateAppointmentNoticeInputDto.cs | 11 + .../CreateAppointmentNoticeOutputDto.cs | 12 + .../DeleteAppointmentNoticeInputDto.cs | 9 + .../DeleteAppointmentNoticeOutputDto.cs | 9 + .../ReadAppointmentNoticeInputDto.cs | 9 + .../ReadAppointmentNoticeOutputDto.cs | 12 + .../UpdateAppointmentNoticeInputDto.cs | 12 + .../UpdateAppointmentNoticeOutputDto.cs | 12 + .../Department/CreateDepartmentInputDto.cs | 10 + .../Department/CreateDepartmentOutputDto.cs | 11 + .../Department/DeleteDepartmentInputDto.cs | 9 + .../Department/DeleteDepartmentOutputDto.cs | 9 + .../Dto/Department/ReadDepartmentInputDto.cs | 9 + .../Dto/Department/ReadDepartmentOutputDto.cs | 11 + .../Department/UpdateDepartmentInputDto.cs | 11 + .../Department/UpdateDepartmentOutputDto.cs | 11 + .../Zero/Dto/Menu/CreateMenuInputDto.cs | 12 + .../Zero/Dto/Menu/CreateMenuOutputDto.cs | 13 + .../Zero/Dto/Menu/DeleteMenuInputDto.cs | 9 + .../Zero/Dto/Menu/DeleteMenuOutputDto.cs | 9 + .../Zero/Dto/Menu/MenuViewModel.cs | 34 ++ .../Zero/Dto/Menu/ModuleConsts.cs | 73 +++ .../Zero/Dto/Menu/ReadMenuInputDto.cs | 9 + .../Zero/Dto/Menu/ReadMenuOutputDto.cs | 13 + .../Zero/Dto/Menu/UpdateMenuInputDto.cs | 13 + .../Zero/Dto/Menu/UpdateMenuOutputDto.cs | 13 + .../Zero/Dto/Module/CreateModuleInputDto.cs | 10 + .../Zero/Dto/Module/CreateModuleOutputDto.cs | 11 + .../Zero/Dto/Module/DeleteModuleInputDto.cs | 10 + .../Zero/Dto/Module/DeleteModuleOutputDto.cs | 10 + .../Zero/Dto/Module/ReadModuleInputDto.cs | 9 + .../Zero/Dto/Module/ReadModuleOutputDto.cs | 11 + .../Zero/Dto/Module/UpdateModuleInputDto.cs | 12 + .../Zero/Dto/Module/UpdateModuleOutputDto.cs | 12 + .../CreateModulePermissionInputDto.cs | 12 + .../CreateModulePermissionOutputDto.cs | 13 + .../DeleteModulePermissionInputDto.cs | 10 + .../DeleteModulePermissionOutputDto.cs | 10 + .../ReadModulePermissionInputDto.cs | 10 + .../ReadModulePermissionOutputDto.cs | 13 + .../UpdateModulePermissionInputDto.cs | 13 + .../UpdateModulePermissionOutputDto.cs | 13 + .../Zero/Dto/Nation/CreateNationInputDto.cs | 10 + .../Zero/Dto/Nation/CreateNationOutputDto.cs | 11 + .../Zero/Dto/Nation/DeleteNationInputDto.cs | 10 + .../Zero/Dto/Nation/DeleteNationOutputDto.cs | 10 + .../Zero/Dto/Nation/ReadNationInputDto.cs | 10 + .../Zero/Dto/Nation/ReadNationOutputDto.cs | 11 + .../Zero/Dto/Nation/UpdateNationInputDto.cs | 11 + .../Zero/Dto/Nation/UpdateNationOutputDto.cs | 11 + .../Dto/Position/CreatePositionInputDto.cs | 11 + .../Dto/Position/CreatePositionOutputDto.cs | 12 + .../Dto/Position/DeletePositionInputDto.cs | 10 + .../Dto/Position/DeletePositionOutputDto.cs | 10 + .../Zero/Dto/Position/ReadPositionInputDto.cs | 10 + .../Dto/Position/ReadPositionOutputDto.cs | 12 + .../Dto/Position/UpdatePositionInputDto.cs | 12 + .../Dto/Position/UpdatePositionOutputDto.cs | 12 + .../Qualification/CreateEducationInputDto.cs | 9 + .../CreateQualificationOutputDto.cs | 10 + .../Qualification/DeleteEducationInputDto.cs | 9 + .../Qualification/DeleteEducationOutputDto.cs | 9 + .../Qualification/ReadEducationInputDto.cs | 9 + .../Qualification/ReadEducationOutputDto.cs | 10 + .../Qualification/UpdateEducationInputDto.cs | 10 + .../Qualification/UpdateEducationOutputDto.cs | 10 + .../CreateSupervisionStatisticsInputDto.cs | 11 + .../CreateSupervisionStatisticsOutputDto.cs | 12 + .../DeleteSupervisionStatisticsInputDto.cs | 10 + .../DeleteSupervisionStatisticsOutputDto.cs | 10 + .../ReadSupervisionStatisticsInputDto.cs | 10 + .../ReadSupervisionStatisticsOutputDto.cs | 12 + .../UpdateSupervisionStatisticsInputDto.cs | 12 + .../UpdateSupervisionStatisticsOutputDto.cs | 12 + .../CreateSystemInformationInputDto.cs | 12 + .../CreateSystemInformationOutputDto.cs | 13 + .../DeleteSystemInformationInputDto.cs | 10 + .../DeleteSystemInformationOutputDto.cs | 10 + .../ReadSystemInformationInputDto.cs | 10 + .../ReadSystemInformationOutputDto.cs | 13 + .../UpdateSystemInformationInputDto.cs | 13 + .../UpdateSystemInformationOutputDto.cs | 13 + .../CreateVipLevelRuleInputDto.cs | 13 + .../CreateVipLevelRuleOutputDto.cs | 14 + .../DeleteVipLevelRuleInputDto.cs | 10 + .../DeleteVipLevelRuleOutputDto.cs | 10 + .../VipLevelRule/ReadVipLevelRuleInputDto.cs | 10 + .../VipLevelRule/ReadVipLevelRuleOutputDto.cs | 14 + .../UpdateVipLevelRuleInputDto.cs | 14 + .../UpdateVipLevelRuleOutputDto.cs | 14 + .../Hydroelectricity/Hydroelectricity.cs | 2 +- .../EOM.TSHotelManagement.Common.Util.csproj | 8 + .../Helper/EntityMapper.cs | 63 +++ .../Helper/LocalizationHelper.cs | 30 ++ .../Helper/LogHelper.cs | 44 ++ .../AssetController.cs} | 33 +- ...stoController.cs => CustomerController.cs} | 48 +- .../EnergyManagementController.cs} | 31 +- .../FontsController.cs | 20 +- .../Business/Reser/ReserController.cs | 13 +- .../Controllers/Util/AppController.cs | 3 +- 321 files changed, 4249 insertions(+), 392 deletions(-) rename EOM.TSHotelManagement.Application/Business/{Cash/CashService.cs => Asset/AssetService.cs} (54%) rename EOM.TSHotelManagement.Application/Business/{Cash/ICashService.cs => Asset/IAssetService.cs} (87%) rename EOM.TSHotelManagement.Application/Business/Customer/{CustoService.cs => CustomerService.cs} (44%) rename EOM.TSHotelManagement.Application/Business/Customer/{ICustoService.cs => ICustomerService.cs} (75%) rename EOM.TSHotelManagement.Application/Business/{Hydroelectricity/HydroelectricityService.cs => EnergyManagement/EnergyManagementService.cs} (33%) rename EOM.TSHotelManagement.Application/Business/{Hydroelectricity/IHydroelectricityService.cs => EnergyManagement/IEnergyManagementService.cs} (77%) rename EOM.TSHotelManagement.Application/Business/{Fonts/IFontsService.cs => PromotionContent/IPromotionContentService.cs} (76%) rename EOM.TSHotelManagement.Application/Business/{Fonts/FontsService.cs => PromotionContent/PromotionContentService.cs} (57%) create mode 100644 EOM.TSHotelManagement.Common.Contract/BaseDto/BaseDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/BaseDto/BaseInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/BaseDto/BaseOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/BaseDto/ListInputDto.cs rename EOM.TSHotelManagement.Common.Core/OSelectAllDto.cs => EOM.TSHotelManagement.Common.Contract/BaseDto/ListOutputDto.cs (91%) create mode 100644 EOM.TSHotelManagement.Common.Contract/BaseDto/SingleOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/BaseDto/StatusCodeConstants.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/CreateAssetInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/CreateAssetOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/DeleteAssetInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/DeleteAssetOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/ReadAssetInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/ReadAssetOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/UpdateAssetInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/UpdateAssetOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/CreateCustoTypeInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/CreateCustoTypeOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/DeleteCustoTypeInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/DeleteCustoTypeOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/ReadCustoTypeInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/ReadCustoTypeOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/UpdateCustoTypeInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/UpdateCustoTypeOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/CreateCustomerInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/CreateCustomerOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/DeleteCustomerInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/DeleteCustomerOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/UpdateCustomerInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/UpdateCustomerOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/CreateGenderTypeInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/CreateGenderTypeOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/DeleteGenderTypeInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/DeleteGenderTypeOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/ReadGenderTypeInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/ReadGenderTypeOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/UpdateGenderTypeInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/UpdateGenderTypeOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/CreatePassportTypeInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/CreatePassportTypeOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/DeletePassportTypeInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/DeletePassportTypeOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/UpdatePassportTypeInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/UpdatePassportTypeOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/CreateEnergyManagementInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/CreateEnergyManagementOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/DeleteEnergyManagementInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/DeleteEnergyManagementOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/UpdateEnergyManagementInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/UpdateEnergyManagementOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/CreatePromotionContentInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/CreatePromotionContentOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/DeletePromotionContentInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/DeletePromotionContentOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/UpdatePromotionContentInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/UpdatePromotionContentOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/CreateReserInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/CreateReserOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/DeleteReserInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/DeleteReserOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/UpdateReserInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/UpdateReserOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/CreateRoomInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/CreateRoomOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/DeleteRoomInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/DeleteRoomOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/UpdateRoomInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/UpdateRoomOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/CreateRoomStateInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/CreateRoomStateOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/DeleteRoomStateInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/DeleteRoomStateOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/ReadRoomStateInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/ReadRoomStateOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/UpdateRoomStateInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/UpdateRoomStateOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/CreateRoomTypeInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/CreateRoomTypeOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/DeleteRoomTypeInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/DeleteRoomTypeOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/ReadRoomTypeInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/ReadRoomTypeOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/UpdateRoomTypeInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/UpdateRoomTypeOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/CreateSellThingInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/CreateSellThingOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/DeleteSellThingInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/DeleteSellThingOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/UpdateSellThingInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/UpdateSellThingOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/CreateSpendInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/CreateSpendOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/DeleteSpendInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/DeleteSpendOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/UpdateSpendInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/UpdateSpendOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/EOM.TSHotelManagement.Common.Contract.csproj create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/CreateEmployeeInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/CreateEmployeeOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/DeleteEmployeeInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/DeleteEmployeeOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/UpdateEmployeeInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/UpdateEmployeeOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/CreateEmployeeCheckInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/CreateEmployeeCheckOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/DeleteEmployeeCheckInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/DeleteEmployeeCheckOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/UpdateEmployeeCheckInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/UpdateEmployeeCheckOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/CreateEmployeeHistoryInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/CreateEmployeeHistoryOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/DeleteEmployeeHistoryInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/DeleteEmployeeHistoryOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/UpdateEmployeeHistoryInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/UpdateEmployeeHistoryOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/CreateEmployeePhotoInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/CreateEmployeePhotoOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/DeleteEmployeePhotoInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/DeleteEmployeePhotoOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/UpdateEmployeePhotoInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/UpdateEmployeePhotoOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/CreateEmployeeRewardPunishmentInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/CreateEmployeeRewardPunishmentOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/DeleteEmployeeRewardPunishmentInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/DeleteEmployeeRewardPunishmentOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/UpdateEmployeeRewardPunishmentInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/UpdateEmployeeRewardPunishmentOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/CreateRewardPunishmentTypeInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/CreateRewardPunishmentTypeOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/DeleteRewardPunishmentTypeInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/DeleteRewardPunishmentTypeeOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/UpdateRewardPunishmentTypeInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/UpdateRewardPunishmentTypeOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/CreateNavBarInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/CreateNavBarOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/DeleteNavBarInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/DeleteNavBarOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/ReadNavBarInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/ReadNavBarOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/UpdateNavBarInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/UpdateNavBarOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/CreateApplicationVersionInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/CreateApplicationVersionOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/DeleteApplicationVersionInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/DeleteApplicationVersionOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/ReadApplicationVersionInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/ReadApplicationVersionOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/UpdateApplicationVersionInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/UpdateApplicationVersionOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/CreateCardCodeInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/CreateCardCodeOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/DeleteCardCodeInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/DeleteCardCodeOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/ReadCardCodeInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/ReadCardCodeOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/UpdateCardCodeInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/UpdateCardCodeOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/CreateOperationLogInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/CreateOperationLogOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/DeleteOperationLogInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/DeleteOperationLogOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/UpdateOperationLogInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/UpdateOperationLogOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/CreateAdministratorInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/CreateAdministratorOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/DeleteAdministratorInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/DeleteAdministratorOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/ReadAdministratorInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/ReadAdministratorOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/UpdateAdministratorInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/UpdateAdministratorOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/CreateAdministratorTypeInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/CreateAdministratorTypeOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/DeleteAdministratorTypeInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/DeleteAdministratorTypeOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/ReadAdministratorTypeInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/ReadAdministratorTypeOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/UpdateAdministratorTypeInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/UpdateAdministratorTypeOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/CreateAppointmentNoticeInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/CreateAppointmentNoticeOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/DeleteAppointmentNoticeInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/DeleteAppointmentNoticeOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/ReadAppointmentNoticeInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/ReadAppointmentNoticeOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/UpdateAppointmentNoticeInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/UpdateAppointmentNoticeOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/CreateDepartmentInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/CreateDepartmentOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/DeleteDepartmentInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/DeleteDepartmentOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/ReadDepartmentInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/ReadDepartmentOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/UpdateDepartmentInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/UpdateDepartmentOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/CreateMenuInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/CreateMenuOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/DeleteMenuInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/DeleteMenuOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/MenuViewModel.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/ModuleConsts.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/ReadMenuInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/ReadMenuOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/UpdateMenuInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/UpdateMenuOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/CreateModuleInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/CreateModuleOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/DeleteModuleInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/DeleteModuleOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/ReadModuleInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/ReadModuleOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/UpdateModuleInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/UpdateModuleOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/CreateModulePermissionInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/CreateModulePermissionOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/DeleteModulePermissionInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/DeleteModulePermissionOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/ReadModulePermissionInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/ReadModulePermissionOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/UpdateModulePermissionInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/UpdateModulePermissionOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/CreateNationInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/CreateNationOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/DeleteNationInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/DeleteNationOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/ReadNationInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/ReadNationOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/UpdateNationInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/UpdateNationOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/CreatePositionInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/CreatePositionOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/DeletePositionInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/DeletePositionOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/ReadPositionInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/ReadPositionOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/UpdatePositionInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/UpdatePositionOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/CreateEducationInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/CreateQualificationOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/DeleteEducationInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/DeleteEducationOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/ReadEducationInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/ReadEducationOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/UpdateEducationInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/UpdateEducationOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/CreateSupervisionStatisticsInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/CreateSupervisionStatisticsOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/DeleteSupervisionStatisticsInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/DeleteSupervisionStatisticsOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/ReadSupervisionStatisticsInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/ReadSupervisionStatisticsOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/UpdateSupervisionStatisticsInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/UpdateSupervisionStatisticsOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/CreateSystemInformationInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/CreateSystemInformationOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/DeleteSystemInformationInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/DeleteSystemInformationOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/ReadSystemInformationInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/ReadSystemInformationOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/UpdateSystemInformationInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/UpdateSystemInformationOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/CreateVipLevelRuleInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/CreateVipLevelRuleOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/DeleteVipLevelRuleInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/DeleteVipLevelRuleOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/ReadVipLevelRuleInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/ReadVipLevelRuleOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/UpdateVipLevelRuleInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/UpdateVipLevelRuleOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Util/Helper/EntityMapper.cs create mode 100644 EOM.TSHotelManagement.Common.Util/Helper/LocalizationHelper.cs create mode 100644 EOM.TSHotelManagement.Common.Util/Helper/LogHelper.cs rename EOM.TSHotelManagement.WebApi/Controllers/Business/{Cash/CashController.cs => Asset/AssetController.cs} (53%) rename EOM.TSHotelManagement.WebApi/Controllers/Business/Customer/{CustoController.cs => CustomerController.cs} (61%) rename EOM.TSHotelManagement.WebApi/Controllers/Business/{Hydroelectricity/HydroelectricityController.cs => EnergyManagement/EnergyManagementController.cs} (58%) rename EOM.TSHotelManagement.WebApi/Controllers/Business/{Fonts => PromotionContent}/FontsController.cs (50%) diff --git a/EOM.TSHotelManagement.Application/Business/Cash/CashService.cs b/EOM.TSHotelManagement.Application/Business/Asset/AssetService.cs similarity index 54% rename from EOM.TSHotelManagement.Application/Business/Cash/CashService.cs rename to EOM.TSHotelManagement.Application/Business/Asset/AssetService.cs index 89ae5d6..f6e0940 100644 --- a/EOM.TSHotelManagement.Application/Business/Cash/CashService.cs +++ b/EOM.TSHotelManagement.Application/Business/Asset/AssetService.cs @@ -21,20 +21,22 @@ *SOFTWARE. * */ +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; using EOM.TSHotelManagement.EntityFramework; +using SqlSugar; namespace EOM.TSHotelManagement.Application { /// /// 资产信息接口实现类 /// - public class CashService : ICashService + public class AssetService : IAssetService { /// /// 资产信息 /// - private readonly GenericRepository cashRepository; + private readonly GenericRepository assetRepository; /// /// 部门 @@ -44,50 +46,61 @@ namespace EOM.TSHotelManagement.Application /// /// 员工 /// - private readonly GenericRepository workerRepository; + private readonly GenericRepository employeeRepository; /// /// /// - /// + /// /// - /// - public CashService(GenericRepository cashRepository, GenericRepository deptRepository, GenericRepository workerRepository) + /// + public AssetService(GenericRepository assetRepository, GenericRepository deptRepository, GenericRepository employeeRepository) { - this.cashRepository = cashRepository; + this.assetRepository = assetRepository; this.deptRepository = deptRepository; - this.workerRepository = workerRepository; + this.employeeRepository = employeeRepository; } /// /// 添加资产信息 /// - /// + /// /// - public bool AddCashInfo(Asset cash) + public bool AddAssetInfo(Asset asset) { - return cashRepository.Insert(cash); + return assetRepository.Insert(asset); } /// /// 查询资产信息 /// /// - public List SelectCashInfoAll() + public ListOutputDto SelectAssetInfoAll(Asset asset) { //查询所有部门信息 List depts = new List(); depts = deptRepository.GetList(a => a.IsDelete != 1); //查询所有员工信息 - List workers = new List(); - workers = workerRepository.GetList(a => a.IsDelete != 1); - List cs = new List(); - cs = cashRepository.GetList(a => a.IsDelete != 1); - cs.ForEach(source => + List employees = new List(); + employees = employeeRepository.GetList(a => a.IsDelete != 1); + + ListOutputDto cs = new ListOutputDto(); + + var where = Expressionable.Create(); + + int totalCount = 0; + if (asset.Page != 0 && asset.PageSize != 0) + { + cs.listSource = assetRepository.AsQueryable().Where(where.ToExpression()).OrderBy(a => a.AssetNumber) + .ToPageList((int)asset.Page, (int)asset.PageSize, ref totalCount); + cs.total = totalCount; + } + + cs.listSource.ForEach(source => { var dept = depts.FirstOrDefault(a => a.DepartmentNumber.Equals(source.DepartmentCode)); source.DepartmentName = dept == null ? "" : dept.DepartmentName; - var worker = workers.FirstOrDefault(a => a.EmployeeId.Equals(source.AcquiredByEmployeeId)); + var worker = employees.FirstOrDefault(a => a.EmployeeId.Equals(source.AcquiredByEmployeeId)); source.AcquiredByEmployeeName = worker == null ? "" : worker.EmployeeName; source.AssetValueFormatted = source.AssetValue == 0 ? "" : Decimal.Parse(source.AssetValue.ToString()).ToString("#,##0.00").ToString(); @@ -99,36 +112,36 @@ namespace EOM.TSHotelManagement.Application /// /// 更新资产信息 /// - /// + /// /// - public bool UpdCashInfo(Asset cash) + public bool UpdAssetInfo(Asset asset) { - return cashRepository.Update(a => new Asset() + return assetRepository.Update(a => new Asset() { - AssetName = cash.AssetName, - DepartmentCode = cash.DepartmentCode, - AssetSource = cash.AssetSource, - AssetValue = cash.AssetValue, - AcquisitionDate = cash.AcquisitionDate, - AcquiredByEmployeeId = cash.AcquiredByEmployeeId, - IsDelete = cash.IsDelete, - DataChgUsr = cash.DataChgUsr, - DataChgDate = cash.DataChgDate - }, a => a.AssetNumber == cash.AssetNumber); + AssetName = asset.AssetName, + DepartmentCode = asset.DepartmentCode, + AssetSource = asset.AssetSource, + AssetValue = asset.AssetValue, + AcquisitionDate = asset.AcquisitionDate, + AcquiredByEmployeeId = asset.AcquiredByEmployeeId, + IsDelete = asset.IsDelete, + DataChgUsr = asset.DataChgUsr, + DataChgDate = asset.DataChgDate + }, a => a.AssetNumber == asset.AssetNumber); } /// /// 删除资产信息 /// - /// + /// /// - public bool DelCashInfo(Asset cash) + public bool DelAssetInfo(Asset asset) { - return cashRepository.Update(a => new Asset() + return assetRepository.Update(a => new Asset() { IsDelete = 1, - DataChgUsr = cash.DataChgUsr - }, a => a.AssetNumber == cash.AssetNumber); + DataChgUsr = asset.DataChgUsr + }, a => a.AssetNumber == asset.AssetNumber); } } } diff --git a/EOM.TSHotelManagement.Application/Business/Cash/ICashService.cs b/EOM.TSHotelManagement.Application/Business/Asset/IAssetService.cs similarity index 87% rename from EOM.TSHotelManagement.Application/Business/Cash/ICashService.cs rename to EOM.TSHotelManagement.Application/Business/Asset/IAssetService.cs index 977bd8b..7004d26 100644 --- a/EOM.TSHotelManagement.Application/Business/Cash/ICashService.cs +++ b/EOM.TSHotelManagement.Application/Business/Asset/IAssetService.cs @@ -21,6 +21,7 @@ *SOFTWARE. * */ +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; namespace EOM.TSHotelManagement.Application @@ -28,33 +29,33 @@ namespace EOM.TSHotelManagement.Application /// /// 资产信息接口 /// - public interface ICashService + public interface IAssetService { /// /// 添加资产信息 /// /// /// - bool AddCashInfo(Asset cash); + bool AddAssetInfo(Asset cash); /// /// 查询资产信息 /// /// - List SelectCashInfoAll(); + ListOutputDto SelectAssetInfoAll(Asset asset); /// /// 更新资产信息 /// /// /// - bool UpdCashInfo(Asset cash); + bool UpdAssetInfo(Asset cash); /// /// 删除资产信息 /// /// /// - bool DelCashInfo(Asset cash); + bool DelAssetInfo(Asset cash); } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Application/Business/Customer/CustoService.cs b/EOM.TSHotelManagement.Application/Business/Customer/CustomerService.cs similarity index 44% rename from EOM.TSHotelManagement.Application/Business/Customer/CustoService.cs rename to EOM.TSHotelManagement.Application/Business/Customer/CustomerService.cs index 070d1bc..184906e 100644 --- a/EOM.TSHotelManagement.Application/Business/Customer/CustoService.cs +++ b/EOM.TSHotelManagement.Application/Business/Customer/CustomerService.cs @@ -31,13 +31,16 @@ using EOM.TSHotelManagement.Common; using Microsoft.AspNetCore.DataProtection; using jvncorelib.EncryptorLib; using NPOI.SS.Formula.Functions; +using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Common.Util; +using System.Linq; namespace EOM.TSHotelManagement.Application { /// /// 客户信息接口实现类 /// - public class CustoService : ICustoService + public class CustomerService : ICustomerService { /// /// 客户信息 @@ -84,7 +87,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public CustoService(GenericRepository custoRepository, GenericRepository spendRepository, GenericRepository sexTypeRepository, GenericRepository passPortTypeRepository, GenericRepository custoTypeRepository, EncryptLib encrypt, IDataProtectionProvider dataProtectionProvider) + public CustomerService(GenericRepository custoRepository, GenericRepository spendRepository, GenericRepository sexTypeRepository, GenericRepository passPortTypeRepository, GenericRepository custoTypeRepository, EncryptLib encrypt, IDataProtectionProvider dataProtectionProvider) { this.custoRepository = custoRepository; this.spendRepository = spendRepository; @@ -95,46 +98,58 @@ namespace EOM.TSHotelManagement.Application this.dataProtector = dataProtectionProvider.CreateProtector("CustomerInfoProtector"); } - #region 添加客户信息 /// /// 添加客户信息 /// /// - /// - public bool InsertCustomerInfo(Customer custo) + public BaseOutputDto InsertCustomerInfo(CreateCustomerInputDto custo) { string NewID = dataProtector.Protect(custo.PassportID); string NewTel = dataProtector.Protect(custo.CustomerPhoneNumber); custo.PassportID = NewID; custo.CustomerPhoneNumber = NewTel; - return custoRepository.Insert(custo); + try + { + var result = custoRepository.Insert(EntityMapper.Map(custo)); + } + catch (Exception ex) + { + LogHelper.LogError(LocalizationHelper.GetLocalizedString("Insert Customer Failed", "客户信息添加失败"), ex); + return new BaseOutputDto(StatusCodeConstants.InternalServerError, LocalizationHelper.GetLocalizedString("Insert Customer Failed", "客户信息添加失败")); + } + + return new BaseOutputDto(StatusCodeConstants.Success, LocalizationHelper.GetLocalizedString("Insert Customer Success", "客户信息添加成功")); } - #endregion /// /// 更新客户信息 /// /// /// - public bool UpdCustomerInfo(Customer custo) + public BaseOutputDto UpdCustomerInfo(UpdateCustomerInputDto custo) { string NewID = dataProtector.Protect(custo.PassportID); string NewTel = dataProtector.Protect(custo.CustomerPhoneNumber); custo.PassportID = NewID; custo.CustomerPhoneNumber = NewTel; - return custoRepository.Update(a => new Customer() + try { - CustomerName = custo.CustomerName, - CustomerGender = custo.CustomerGender, - CustomerType = custo.CustomerType, - DateOfBirth = custo.DateOfBirth, - CustomerAddress = custo.CustomerAddress, - PassportID = custo.PassportID, - CustomerPhoneNumber = custo.CustomerPhoneNumber, - PassportType = custo.PassportType, - DataChgUsr = custo.DataChgUsr, - DataChgDate = custo.DataChgDate - }, a => a.CustomerNumber == custo.CustomerNumber); + var result = custoRepository.Update(EntityMapper.Map(custo)); + + if (result) + { + return new BaseOutputDto(StatusCodeConstants.Success, LocalizationHelper.GetLocalizedString("Update Customer Success", "客户信息更新成功")); + } + else + { + return new BaseOutputDto(StatusCodeConstants.InternalServerError, LocalizationHelper.GetLocalizedString("Update Customer Failed", "客户信息更新失败")); + } + } + catch (Exception ex) + { + LogHelper.LogError(LocalizationHelper.GetLocalizedString("Update Customer Failed", "客户信息更新失败"), ex); + return new BaseOutputDto(StatusCodeConstants.InternalServerError, LocalizationHelper.GetLocalizedString("Update Customer Failed", "客户信息更新失败")); + } } /// @@ -142,40 +157,65 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool DelCustomerInfo(Customer custo) + public BaseOutputDto DelCustomerInfo(DeleteCustomerInputDto custo) { var occupied = Convert.ToInt32(RoomStateConstant.Occupied.Code); var isOccupied = custoRepository.Change().IsAny(a => a.CustomerNumber == custo.CustomerNumber && a.RoomStateId == occupied); var haveUnSettle = custoRepository.Change().IsAny(a => a.CustomerNumber == custo.CustomerNumber && a.SettlementStatus == SpendConsts.UnSettle); if (isOccupied) - return false; + return new BaseOutputDto(StatusCodeConstants.InternalServerError, LocalizationHelper.GetLocalizedString("Customer is currently occupying a room", "客户当前正在占用房间")); if (haveUnSettle) - return false; + return new BaseOutputDto(StatusCodeConstants.InternalServerError, LocalizationHelper.GetLocalizedString("Customer has unsettled bills", "客户有未结算的账单")); - return custoRepository.Update(a => new Customer() + var result = custoRepository.Update(a => new Customer() { IsDelete = custo.IsDelete, DataChgUsr = custo.DataChgUsr, DataChgDate = custo.DataChgDate }, a => a.CustomerNumber == custo.CustomerNumber); + + if (result) + { + return new BaseOutputDto(StatusCodeConstants.Success, LocalizationHelper.GetLocalizedString("Delete Customer Success", "客户信息删除成功")); + } + else + { + return new BaseOutputDto(StatusCodeConstants.InternalServerError, LocalizationHelper.GetLocalizedString("Delete Customer Failed", "客户信息删除失败")); + } } /// /// 更新客户类型(即会员等级) /// - /// - /// + /// /// - public bool UpdCustomerTypeByCustoNo(string custoNo, int userType) + public BaseOutputDto UpdCustomerTypeByCustoNo(UpdateCustomerInputDto updateCustomerInputDto) { - return custoRepository.Update(a => new Customer() + try { - CustomerType = userType - }, a => a.CustomerNumber.Equals(custoNo)); + var result = custoRepository.Update(a => new Customer() + { + CustomerType = updateCustomerInputDto.CustomerType + }, a => a.CustomerNumber.Equals(updateCustomerInputDto.CustomerNumber)); + + if (result) + { + return new BaseOutputDto(StatusCodeConstants.Success, LocalizationHelper.GetLocalizedString("Update Customer Type Success", "客户类型更新成功")); + } + else + { + return new BaseOutputDto(StatusCodeConstants.InternalServerError, LocalizationHelper.GetLocalizedString("Update Customer Type Failed", "客户类型更新失败")); + } + } + catch (Exception ex) + { + LogHelper.LogError(LocalizationHelper.GetLocalizedString("Update Customer Type Failed", "客户类型更新失败"), ex); + return new BaseOutputDto(StatusCodeConstants.InternalServerError, LocalizationHelper.GetLocalizedString("Update Customer Type Failed", "客户类型更新失败")); + } } /// - /// 查询酒店盈利情况 + /// 查询酒店盈利情况(用于报表) /// /// public List SelectAllMoney() @@ -206,9 +246,9 @@ namespace EOM.TSHotelManagement.Application /// 查询所有客户信息 /// /// - public OSelectAllDto SelectCustoAll(int? pageIndex, int? pageSize, bool onlyVip = false) + public ListOutputDto SelectCustomers(ReadCustomerInputDto readCustomerInputDto) { - OSelectAllDto oSelectCustoAllDto = new OSelectAllDto(); + ListOutputDto oSelectCustoAllDto = new ListOutputDto(); //查询出所有性别类型 List sexTypes = new List(); @@ -222,110 +262,37 @@ namespace EOM.TSHotelManagement.Application //查询出所有客户信息 List custos = new List(); - var count = 0; - - if (pageIndex != 0 && pageSize != 0) - { - custos = custoRepository.AsQueryable().ToPageList((int)pageIndex, (int)pageSize, ref count); - if (onlyVip) - { - custos = custoRepository.AsQueryable().Where(a => a.CustomerType != 0).ToPageList((int)pageIndex, (int)pageSize, ref count); - } - } - else - { - custos = custoRepository.AsQueryable().ToList(); - } - - custos.ForEach(source => - { - try - { - //解密身份证号码 - var sourceStr = source.PassportID.Contains('·') ? encrypt.Decryption(source.PassportID) : dataProtector.Unprotect(source.PassportID); - source.PassportID = sourceStr; - //解密联系方式 - var sourceTelStr = source.CustomerPhoneNumber.Contains('·') ? encrypt.Decryption(source.CustomerPhoneNumber) : dataProtector.Unprotect(source.CustomerPhoneNumber); - source.CustomerPhoneNumber = sourceTelStr; - } - catch (Exception) - { - source.PassportID = source.PassportID; - source.CustomerPhoneNumber = source.CustomerPhoneNumber; - } - //性别类型 - var sexType = sexTypes.FirstOrDefault(a => a.GenderId == source.CustomerGender); - source.GenderName = sexType.GenderName.IsNullOrEmpty() ? "" : sexType.GenderName; - //证件类型 - var passPortType = passPortTypes.FirstOrDefault(a => a.PassportId == source.PassportType); - source.PassportTypeName = passPortType.PassportName.IsNullOrEmpty() ? "" : passPortType.PassportName; - //客户类型 - var custoType = custoTypes.FirstOrDefault(a => a.CustomerType == source.CustomerType); - source.CustomerTypeName = custoType.CustomerTypeName.IsNullOrEmpty() ? "" : custoType.CustomerTypeName; - }); - - oSelectCustoAllDto.listSource = custos; - oSelectCustoAllDto.total = count; - - return oSelectCustoAllDto; - } - - /// - /// 查询指定客户信息 - /// - /// - public OSelectAllDto SelectCustomers(Customer custo) - { - var customers = new OSelectAllDto(); - var where = Expressionable.Create(); - //查询出所有性别类型 - List sexTypes = new List(); - sexTypes = sexTypeRepository.GetList(); - //查询出所有证件类型 - List passPortTypes = new List(); - passPortTypes = passPortTypeRepository.GetList(); - //查询出所有客户类型 - List custoTypes = new List(); - custoTypes = custoTypeRepository.GetList(); - //查询出所有客户信息 - List custos = new List(); - - if (!custo.CustomerNumber.IsNullOrEmpty()) + if (!readCustomerInputDto.CustomerNumber.IsNullOrEmpty()) { - where = where.And(a => a.CustomerNumber.Equals(custo.CustomerNumber)); + where = where.And(a => a.CustomerNumber.Equals(readCustomerInputDto.CustomerNumber)); } - if (!custo.CustomerName.IsNullOrEmpty()) + if (!readCustomerInputDto.CustomerName.IsNullOrEmpty()) { - where = where.And(a => a.CustomerName.Contains(custo.CustomerName)); + where = where.And(a => a.CustomerName.Contains(readCustomerInputDto.CustomerName)); } - if (!custo.CustomerPhoneNumber.IsNullOrEmpty()) + if (!readCustomerInputDto.CustomerPhoneNumber.IsNullOrEmpty()) { - where = where.And(a => a.CustomerPhoneNumber.Contains(custo.CustomerPhoneNumber)); + where = where.And(a => a.CustomerPhoneNumber.Contains(readCustomerInputDto.CustomerPhoneNumber)); } - if (!custo.CustomerAddress.IsNullOrEmpty()) + if (!readCustomerInputDto.PassportID.IsNullOrEmpty()) { - where = where.And(a => a.CustomerAddress.Contains(custo.CustomerAddress)); + where = where.And(a => a.PassportID.Contains(readCustomerInputDto.PassportID)); } - if (!custo.PassportID.IsNullOrEmpty()) + if (readCustomerInputDto.OnlyVip) { - where = where.And(a => a.PassportID.Contains(custo.PassportID)); - } - if (!custo.IsDelete.IsNullOrEmpty()) - { - where = where.And(a => a.IsDelete == custo.IsDelete); + where = where.And(a => a.CustomerType != 0); } - int totalCount = 0; - if (custo.Page != 0 && custo.PageSize != 0) - { - customers.listSource = custoRepository.AsQueryable().Where(where.ToExpression()).OrderBy(a => a.CustomerNumber) - .ToPageList((int)custo.Page, (int)custo.PageSize, ref totalCount); - customers.total = totalCount; - } + var count = 0; + + custos = custoRepository.AsQueryable().Where(where.ToExpression()).OrderBy(a => a.CustomerNumber) + .ToPageList((int)readCustomerInputDto.Page, (int)readCustomerInputDto.PageSize, ref count); - customers.listSource.ForEach(source => + var customerOutputDtos = EntityMapper.MapList(custos); + + customerOutputDtos.ForEach(source => { try { @@ -341,26 +308,117 @@ namespace EOM.TSHotelManagement.Application source.PassportID = source.PassportID; source.CustomerPhoneNumber = source.CustomerPhoneNumber; } + //性别类型 var sexType = sexTypes.FirstOrDefault(a => a.GenderId == source.CustomerGender); - source.GenderName = sexType.GenderName.IsNullOrEmpty() ? "" : sexType.GenderName; + var genderName = sexType?.GenderName ?? ""; + //证件类型 var passPortType = passPortTypes.FirstOrDefault(a => a.PassportId == source.PassportType); - source.PassportTypeName = passPortType.PassportName.IsNullOrEmpty() ? "" : passPortType.PassportName; + var passportTypeName = passPortType?.PassportName ?? ""; + //客户类型 var custoType = custoTypes.FirstOrDefault(a => a.CustomerType == source.CustomerType); - source.CustomerTypeName = custoType.CustomerTypeName.IsNullOrEmpty() ? "" : custoType.CustomerTypeName; + var customerTypeName = custoType?.CustomerTypeName ?? ""; }); - return customers; + oSelectCustoAllDto.listSource = customerOutputDtos; + oSelectCustoAllDto.total = count; + return oSelectCustoAllDto; } /// /// 查询指定客户信息 /// /// - public List SelectCustoByInfo(Customer custo) + //public ListOutputDto SelectCustomers(Customer custo) + //{ + // var customers = new ListOutputDto(); + + // var where = Expressionable.Create(); + + // //查询出所有性别类型 + // List sexTypes = new List(); + // sexTypes = sexTypeRepository.GetList(); + // //查询出所有证件类型 + // List passPortTypes = new List(); + // passPortTypes = passPortTypeRepository.GetList(); + // //查询出所有客户类型 + // List custoTypes = new List(); + // custoTypes = custoTypeRepository.GetList(); + // //查询出所有客户信息 + // List custos = new List(); + + // if (!custo.CustomerNumber.IsNullOrEmpty()) + // { + // where = where.And(a => a.CustomerNumber.Equals(custo.CustomerNumber)); + // } + // if (!custo.CustomerName.IsNullOrEmpty()) + // { + // where = where.And(a => a.CustomerName.Contains(custo.CustomerName)); + // } + // if (!custo.CustomerPhoneNumber.IsNullOrEmpty()) + // { + // where = where.And(a => a.CustomerPhoneNumber.Contains(custo.CustomerPhoneNumber)); + // } + // if (!custo.CustomerAddress.IsNullOrEmpty()) + // { + // where = where.And(a => a.CustomerAddress.Contains(custo.CustomerAddress)); + // } + // if (!custo.PassportID.IsNullOrEmpty()) + // { + // where = where.And(a => a.PassportID.Contains(custo.PassportID)); + // } + // if (!custo.IsDelete.IsNullOrEmpty()) + // { + // where = where.And(a => a.IsDelete == custo.IsDelete); + // } + + // int totalCount = 0; + // if (custo.Page != 0 && custo.PageSize != 0) + // { + // customers.listSource = custoRepository.AsQueryable().Where(where.ToExpression()).OrderBy(a => a.CustomerNumber) + // .ToPageList((int)custo.Page, (int)custo.PageSize, ref totalCount); + // customers.total = totalCount; + // } + + // customers.listSource.ForEach(source => + // { + // try + // { + // //解密身份证号码 + // var sourceStr = source.PassportID.Contains('·') ? encrypt.Decryption(source.PassportID) : dataProtector.Unprotect(source.PassportID); + // source.PassportID = sourceStr; + // //解密联系方式 + // var sourceTelStr = source.CustomerPhoneNumber.Contains('·') ? encrypt.Decryption(source.CustomerPhoneNumber) : dataProtector.Unprotect(source.CustomerPhoneNumber); + // source.CustomerPhoneNumber = sourceTelStr; + // } + // catch (Exception) + // { + // source.PassportID = source.PassportID; + // source.CustomerPhoneNumber = source.CustomerPhoneNumber; + // } + // //性别类型 + // var sexType = sexTypes.FirstOrDefault(a => a.GenderId == source.CustomerGender); + // source.GenderName = sexType.GenderName.IsNullOrEmpty() ? "" : sexType.GenderName; + // //证件类型 + // var passPortType = passPortTypes.FirstOrDefault(a => a.PassportId == source.PassportType); + // source.PassportTypeName = passPortType.PassportName.IsNullOrEmpty() ? "" : passPortType.PassportName; + // //客户类型 + // var custoType = custoTypes.FirstOrDefault(a => a.CustomerType == source.CustomerType); + // source.CustomerTypeName = custoType.CustomerTypeName.IsNullOrEmpty() ? "" : custoType.CustomerTypeName; + // }); + + // return customers; + + //} + + /// + /// 查询指定客户信息 + /// + /// + public SingleOutputDto SelectCustoByInfo(ReadCustomerInputDto custo) { //查询出所有性别类型 List sexTypes = new List(); @@ -372,34 +430,48 @@ namespace EOM.TSHotelManagement.Application List custoTypes = new List(); custoTypes = custoTypeRepository.GetList(); //查询出所有客户信息 - List custos = new List(); + SingleOutputDto singleOutputDto = new SingleOutputDto(); + + var where = Expressionable.Create(); + if (!custo.CustomerNumber.IsNullOrEmpty()) { - custos = custoRepository.GetList(a => a.CustomerNumber.Contains(custo.CustomerNumber)).OrderBy(a => a.CustomerNumber).ToList(); + where = where.And(a => a.CustomerNumber.Contains(custo.CustomerNumber)); } if (!custo.CustomerName.IsNullOrEmpty()) { - custos = custoRepository.GetList(a => a.CustomerName.Contains(custo.CustomerName)).OrderBy(a => a.CustomerNumber).ToList(); + where = where.And(a => a.CustomerName.Contains(custo.CustomerName)); } - custos.ForEach(source => + + var customer = custoRepository.AsQueryable().Where(where.ToExpression()).Single(); + + try { //解密身份证号码 - var sourceStr = source.PassportID.Contains("·") ? encrypt.Decryption(source.PassportID) : source.PassportID; - source.PassportID = sourceStr; + var sourceStr = customer.PassportID.Contains('·') ? encrypt.Decryption(customer.PassportID) : dataProtector.Unprotect(customer.PassportID); + customer.PassportID = sourceStr; //解密联系方式 - var sourceTelStr = source.CustomerPhoneNumber.Contains("·") ? encrypt.Decryption(source.CustomerPhoneNumber) : source.CustomerPhoneNumber; - source.CustomerPhoneNumber = sourceTelStr; - //性别类型 - var sexType = sexTypes.FirstOrDefault(a => a.GenderId == source.CustomerGender); - source.GenderName = sexType.GenderName.IsNullOrEmpty() ? "" : sexType.GenderName; - //证件类型 - var passPortType = passPortTypes.FirstOrDefault(a => a.PassportId == source.PassportType); - source.PassportTypeName = passPortType.PassportName.IsNullOrEmpty() ? "" : passPortType.PassportName; - //客户类型 - var custoType = custoTypes.FirstOrDefault(a => a.CustomerType == source.CustomerType); - source.CustomerTypeName = custoType.CustomerTypeName.IsNullOrEmpty() ? "" : custoType.CustomerTypeName; - }); - return custos; + var sourceTelStr = customer.CustomerPhoneNumber.Contains('·') ? encrypt.Decryption(customer.CustomerPhoneNumber) : dataProtector.Unprotect(customer.CustomerPhoneNumber); + customer.CustomerPhoneNumber = sourceTelStr; + } + catch (Exception) + { + customer.PassportID = customer.PassportID; + customer.CustomerPhoneNumber = customer.CustomerPhoneNumber; + } + //性别类型 + var sexType = sexTypes.FirstOrDefault(a => a.GenderId == customer.CustomerGender); + customer.GenderName = sexType.GenderName.IsNullOrEmpty() ? "" : sexType.GenderName; + //证件类型 + var passPortType = passPortTypes.FirstOrDefault(a => a.PassportId == customer.PassportType); + customer.PassportTypeName = passPortType.PassportName.IsNullOrEmpty() ? "" : passPortType.PassportName; + //客户类型 + var custoType = custoTypes.FirstOrDefault(a => a.CustomerType == customer.CustomerType); + customer.CustomerTypeName = custoType.CustomerTypeName.IsNullOrEmpty() ? "" : custoType.CustomerTypeName; + + singleOutputDto.Source = EntityMapper.Map(customer); + + return singleOutputDto; } /// @@ -407,30 +479,30 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public Customer SelectCardInfoByCustoNo(string CustoNo) - { - Customer c = custoRepository.GetSingle(a => a.CustomerNumber.Equals(CustoNo)); - if (c.IsNullOrEmpty()) - { - return null; - } - //性别类型 - var sexType = sexTypeRepository.GetSingle(a => a.GenderId == c.CustomerGender); - c.GenderName = sexType.GenderName.IsNullOrEmpty() ? "" : sexType.GenderName; - //证件类型 - var passPortType = passPortTypeRepository.GetSingle(a => a.PassportId == c.PassportType); - c.PassportTypeName = passPortType.PassportName.IsNullOrEmpty() ? "" : passPortType.PassportName; - //客户类型 - var custoType = custoTypeRepository.GetSingle(a => a.CustomerType == c.CustomerType); - c.CustomerTypeName = custoType.CustomerTypeName.IsNullOrEmpty() ? "" : custoType.CustomerTypeName; - //解密身份证号码 - var sourceStr = c.PassportID.Contains("·") ? encrypt.Decryption(c.PassportID) : c.PassportID; - c.PassportID = sourceStr; - //解密联系方式 - var sourceTelStr = c.CustomerPhoneNumber.Contains("·") ? encrypt.Decryption(c.CustomerPhoneNumber) : c.CustomerPhoneNumber; - c.CustomerPhoneNumber = sourceTelStr; - return c; - } + //public Customer SelectCardInfoByCustoNo(string CustoNo) + //{ + // Customer c = custoRepository.GetSingle(a => a.CustomerNumber.Equals(CustoNo)); + // if (c.IsNullOrEmpty()) + // { + // return null; + // } + // //性别类型 + // var sexType = sexTypeRepository.GetSingle(a => a.GenderId == c.CustomerGender); + // c.GenderName = sexType.GenderName.IsNullOrEmpty() ? "" : sexType.GenderName; + // //证件类型 + // var passPortType = passPortTypeRepository.GetSingle(a => a.PassportId == c.PassportType); + // c.PassportTypeName = passPortType.PassportName.IsNullOrEmpty() ? "" : passPortType.PassportName; + // //客户类型 + // var custoType = custoTypeRepository.GetSingle(a => a.CustomerType == c.CustomerType); + // c.CustomerTypeName = custoType.CustomerTypeName.IsNullOrEmpty() ? "" : custoType.CustomerTypeName; + // //解密身份证号码 + // var sourceStr = c.PassportID.Contains("·") ? encrypt.Decryption(c.PassportID) : c.PassportID; + // c.PassportID = sourceStr; + // //解密联系方式 + // var sourceTelStr = c.CustomerPhoneNumber.Contains("·") ? encrypt.Decryption(c.CustomerPhoneNumber) : c.CustomerPhoneNumber; + // c.CustomerPhoneNumber = sourceTelStr; + // return c; + //} } } diff --git a/EOM.TSHotelManagement.Application/Business/Customer/ICustoService.cs b/EOM.TSHotelManagement.Application/Business/Customer/ICustomerService.cs similarity index 75% rename from EOM.TSHotelManagement.Application/Business/Customer/ICustoService.cs rename to EOM.TSHotelManagement.Application/Business/Customer/ICustomerService.cs index 6b7a2f7..081e485 100644 --- a/EOM.TSHotelManagement.Application/Business/Customer/ICustoService.cs +++ b/EOM.TSHotelManagement.Application/Business/Customer/ICustomerService.cs @@ -21,6 +21,7 @@ *SOFTWARE. * */ +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; namespace EOM.TSHotelManagement.Application @@ -28,39 +29,37 @@ namespace EOM.TSHotelManagement.Application /// /// 客户信息接口 /// - public interface ICustoService + public interface ICustomerService { /// /// 添加客户信息 /// /// /// - bool InsertCustomerInfo(Customer custo); + BaseOutputDto InsertCustomerInfo(CreateCustomerInputDto custo); /// /// 更新客户信息 /// /// /// - bool UpdCustomerInfo(Customer custo); + BaseOutputDto UpdCustomerInfo(UpdateCustomerInputDto custo); /// /// 删除客户信息 /// /// /// - bool DelCustomerInfo(Customer custo); + BaseOutputDto DelCustomerInfo(DeleteCustomerInputDto custo); /// /// 更新客户类型(即会员等级) /// - /// - /// /// - bool UpdCustomerTypeByCustoNo(string custoNo, int userType); + BaseOutputDto UpdCustomerTypeByCustoNo(UpdateCustomerInputDto updateCustomerInputDto); /// - /// 查询酒店盈利情况 + /// 查询酒店盈利情况(用于报表) /// /// List SelectAllMoney(); @@ -69,26 +68,26 @@ namespace EOM.TSHotelManagement.Application /// 查询所有客户信息 /// /// - OSelectAllDto SelectCustoAll(int? pageIndex, int? pageSize, bool onlyVip = false); + //ListOutputDto SelectCustoAll(int? pageIndex, int? pageSize, bool onlyVip = false); /// /// 查询所有客户信息 /// /// - OSelectAllDto SelectCustomers(Customer custo); + ListOutputDto SelectCustomers(ReadCustomerInputDto custo); /// /// 查询指定客户信息 /// /// - List SelectCustoByInfo(Customer custo); + SingleOutputDto SelectCustoByInfo(ReadCustomerInputDto custo); /// /// 根据客户编号查询客户信息 /// /// /// - Customer SelectCardInfoByCustoNo(string CustoNo); + //SingleOutputDto SelectCardInfoByCustoNo(string CustoNo); } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Application/Business/Hydroelectricity/HydroelectricityService.cs b/EOM.TSHotelManagement.Application/Business/EnergyManagement/EnergyManagementService.cs similarity index 33% rename from EOM.TSHotelManagement.Application/Business/Hydroelectricity/HydroelectricityService.cs rename to EOM.TSHotelManagement.Application/Business/EnergyManagement/EnergyManagementService.cs index a0f1156..25f0d15 100644 --- a/EOM.TSHotelManagement.Application/Business/Hydroelectricity/HydroelectricityService.cs +++ b/EOM.TSHotelManagement.Application/Business/EnergyManagement/EnergyManagementService.cs @@ -21,8 +21,11 @@ *SOFTWARE. * */ +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Util; using EOM.TSHotelManagement.EntityFramework; +using jvncorelib.EntityLib; using SqlSugar; using System.Linq.Expressions; @@ -31,106 +34,134 @@ namespace EOM.TSHotelManagement.Application /// /// 水电信息接口实现类 /// - public class HydroelectricityService : IHydroelectricityService + public class EnergyManagementService : IEnergyManagementService { /// /// 水电信息 /// - private readonly GenericRepository wtiRepository; + private readonly GenericRepository wtiRepository; /// /// /// /// - public HydroelectricityService(GenericRepository wtiRepository) + public EnergyManagementService(GenericRepository wtiRepository) { this.wtiRepository = wtiRepository; } - #region 查询水电费信息 - /// /// 根据条件查询水电费信息 /// - /// 房间号(可选) - /// 使用开始时间(可选) - /// 使用结束时间(可选) + /// Dto /// 符合条件的水电费信息列表 - public List SelectWtiInfo(string roomNo = null, DateTime? useDate = null, DateTime? endDate = null) + public ListOutputDto SelectEnergyManagementInfo(ReadEnergyManagementInputDto readEnergyManagementInputDto) { var repository = wtiRepository; - var where = Expressionable.Create(); + var where = Expressionable.Create(); - where = where.And(a => a.IsDelete != 1); + if (!string.IsNullOrEmpty(readEnergyManagementInputDto.RoomNo)) + { + where = where.And(a => a.RoomNumber.Equals(readEnergyManagementInputDto.RoomNo)); + } - if (!string.IsNullOrEmpty(roomNo)) + if (!readEnergyManagementInputDto.UseDate.IsNullOrEmpty()) { - where = where.And(a => a.RoomNumber.Equals(roomNo)); + where = where.And(a => a.StartDate >= readEnergyManagementInputDto.UseDate.Value); } - if (useDate.HasValue) + if (!readEnergyManagementInputDto.EndDate.HasValue) { - where = where.And(a => a.StartDate >= useDate.Value); + where = where.And(a => a.EndDate >= readEnergyManagementInputDto.EndDate.Value); } - if (endDate.HasValue) + if (!readEnergyManagementInputDto.IsDelete.IsNullOrEmpty()) { - where = where.And(a => a.EndDate >= endDate.Value); + where = where.And(a => a.IsDelete == readEnergyManagementInputDto.IsDelete); } - var listSource = repository.GetList(where.ToExpression()); + var count = 0; + + var listSource = repository.AsQueryable() + .Where(where.ToExpression()).ToPageList(readEnergyManagementInputDto.Page,readEnergyManagementInputDto.PageSize,ref count); - return listSource; + var readEnergies = EntityMapper.MapList(listSource); + + return new ListOutputDto { listSource = readEnergies, total = count }; } - #endregion - #region 添加水电费信息 /// /// 添加水电费信息 /// /// /// - public bool InsertWtiInfo(Hydroelectricity w) + public BaseOutputDto InsertEnergyManagementInfo(CreateEnergyManagementInputDto w) { - return wtiRepository.Insert(w); + try + { + var result = wtiRepository.Insert(EntityMapper.Map(w)); + } + catch (Exception ex) + { + LogHelper.LogError(LocalizationHelper.GetLocalizedString("Insert Energy Management Failed", "水电信息添加失败"), ex); + return new BaseOutputDto(StatusCodeConstants.InternalServerError, LocalizationHelper.GetLocalizedString("Insert Energy Management Failed", "水电信息添加失败")); + } + + return new BaseOutputDto(StatusCodeConstants.Success, LocalizationHelper.GetLocalizedString("Insert Energy Management Success", "水电信息添加成功")); } - #endregion - #region 修改水电费信息 /// /// 修改水电费信息 /// - /// 包含要修改的数据,以及WtiNo作为查询条件 + /// 包含要修改的数据,以及EnergyManagementNo作为查询条件 /// - public bool UpdateWtiInfo(Hydroelectricity w) + public BaseOutputDto UpdateEnergyManagementInfo(UpdateEnergyManagementInputDto w) { - return wtiRepository.Update(a => new Hydroelectricity() + try + { + var result = wtiRepository.Update(EntityMapper.Map(w)); + + if (result) + { + return new BaseOutputDto(StatusCodeConstants.Success, LocalizationHelper.GetLocalizedString("Update Energy Management Success", "水电费信息更新成功")); + } + else + { + return new BaseOutputDto(StatusCodeConstants.InternalServerError, LocalizationHelper.GetLocalizedString("Update Energy Management Failed", "水电费信息更新失败")); + } + } + catch (Exception ex) { - StartDate = w.StartDate, - EndDate = w.EndDate, - WaterUsage = w.WaterUsage, - PowerUsage = w.PowerUsage, - Recorder = w.Recorder, - CustomerNumber = w.CustomerNumber, - DataChgUsr = w.DataChgUsr, - RoomNumber = w.RoomNumber - }, a => a.InformationId == w.InformationId); + LogHelper.LogError(LocalizationHelper.GetLocalizedString("Update Energy Management Failed", "水电费信息更新失败"), ex); + return new BaseOutputDto(StatusCodeConstants.InternalServerError, LocalizationHelper.GetLocalizedString("Update Energy Management Failed", "水电费信息更新失败")); + } } - #endregion - #region 根据房间编号、使用时间删除水电费信息 /// /// 根据房间编号、使用时间删除水电费信息 /// /// - public bool DeleteWtiInfo(Hydroelectricity hydroelectricity) + public BaseOutputDto DeleteEnergyManagementInfo(DeleteEnergyManagementInputDto hydroelectricity) { - return wtiRepository.Update(a => new Hydroelectricity() + try + { + var result = wtiRepository.Update(EntityMapper.Map(hydroelectricity)); + + if (result) + { + return new BaseOutputDto(StatusCodeConstants.Success, LocalizationHelper.GetLocalizedString("Delete Energy Management Success", "水电费信息删除成功")); + } + else + { + return new BaseOutputDto(StatusCodeConstants.InternalServerError, LocalizationHelper.GetLocalizedString("Delete Energy Management Failed", "水电费信息删除失败")); + } + } + catch (Exception ex) { - IsDelete = 1 - }, a => a.InformationId == hydroelectricity.InformationId); + LogHelper.LogError(LocalizationHelper.GetLocalizedString("Delete Energy Management Failed", "水电费信息删除失败"), ex); + return new BaseOutputDto(StatusCodeConstants.InternalServerError, LocalizationHelper.GetLocalizedString("Delete Energy Management Failed", "水电费信息删除失败")); + } } - #endregion } } diff --git a/EOM.TSHotelManagement.Application/Business/Hydroelectricity/IHydroelectricityService.cs b/EOM.TSHotelManagement.Application/Business/EnergyManagement/IEnergyManagementService.cs similarity index 77% rename from EOM.TSHotelManagement.Application/Business/Hydroelectricity/IHydroelectricityService.cs rename to EOM.TSHotelManagement.Application/Business/EnergyManagement/IEnergyManagementService.cs index 5f6a89a..ba981f7 100644 --- a/EOM.TSHotelManagement.Application/Business/Hydroelectricity/IHydroelectricityService.cs +++ b/EOM.TSHotelManagement.Application/Business/EnergyManagement/IEnergyManagementService.cs @@ -21,22 +21,21 @@ *SOFTWARE. * */ +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; /// /// 水电信息接口 /// -public interface IHydroelectricityService +public interface IEnergyManagementService { /// /// 根据条件查询水电费信息 /// 替换了 SelectWtiInfoByRoomNo, SelectWtiInfoByRoomNoAndTime, ListWtiInfoByRoomNo, SelectWtiInfoAll /// - /// 房间号(可选) - /// 使用开始时间(可选) - /// 使用结束时间(可选) + /// Dto /// 符合条件的水电费信息列表 - List SelectWtiInfo(string roomNo = null, DateTime? useDate = null, DateTime? endDate = null); + ListOutputDto SelectEnergyManagementInfo(ReadEnergyManagementInputDto readEnergyManagementInputDto); /// /// 添加水电费信息 @@ -44,7 +43,7 @@ public interface IHydroelectricityService /// /// /// - bool InsertWtiInfo(Hydroelectricity w); + BaseOutputDto InsertEnergyManagementInfo(CreateEnergyManagementInputDto w); /// /// 修改水电费信息 @@ -52,13 +51,13 @@ public interface IHydroelectricityService /// /// 包含要修改的数据,以及WtiNo作为查询条件 /// - bool UpdateWtiInfo(Hydroelectricity w); + BaseOutputDto UpdateEnergyManagementInfo(UpdateEnergyManagementInputDto w); /// /// 根据房间编号、使用时间删除水电费信息 /// 替换了 DeleteWtiInfoByRoomNoAndDateTime /// - /// + /// /// - bool DeleteWtiInfo(Hydroelectricity hydroelectricity); + BaseOutputDto DeleteEnergyManagementInfo(DeleteEnergyManagementInputDto deleteEnergyManagementInputDto); } diff --git a/EOM.TSHotelManagement.Application/Business/Fonts/IFontsService.cs b/EOM.TSHotelManagement.Application/Business/PromotionContent/IPromotionContentService.cs similarity index 76% rename from EOM.TSHotelManagement.Application/Business/Fonts/IFontsService.cs rename to EOM.TSHotelManagement.Application/Business/PromotionContent/IPromotionContentService.cs index 8d0aac8..fe52c39 100644 --- a/EOM.TSHotelManagement.Application/Business/Fonts/IFontsService.cs +++ b/EOM.TSHotelManagement.Application/Business/PromotionContent/IPromotionContentService.cs @@ -21,6 +21,7 @@ *SOFTWARE. * */ +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; namespace EOM.TSHotelManagement.Application @@ -28,12 +29,18 @@ namespace EOM.TSHotelManagement.Application /// /// 酒店宣传联动内容接口 /// - public interface IFontsService + public interface IPromotionContentService { + /// + /// 查询所有宣传联动内容 + /// + /// + ListOutputDto SelectPromotionContentAll(ReadPromotionContentInputDto readPromotionContentInputDto); + /// /// 查询所有宣传联动内容(跑马灯) /// /// - List SelectFontAll(); + ListOutputDto SelectPromotionContents(); } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Application/Business/Fonts/FontsService.cs b/EOM.TSHotelManagement.Application/Business/PromotionContent/PromotionContentService.cs similarity index 57% rename from EOM.TSHotelManagement.Application/Business/Fonts/FontsService.cs rename to EOM.TSHotelManagement.Application/Business/PromotionContent/PromotionContentService.cs index cab64de..82d4b40 100644 --- a/EOM.TSHotelManagement.Application/Business/Fonts/FontsService.cs +++ b/EOM.TSHotelManagement.Application/Business/PromotionContent/PromotionContentService.cs @@ -21,7 +21,9 @@ *SOFTWARE. * */ +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Util; using EOM.TSHotelManagement.EntityFramework; namespace EOM.TSHotelManagement.Application @@ -29,7 +31,7 @@ namespace EOM.TSHotelManagement.Application /// /// 酒店宣传联动内容接口实现类 /// - public class FontsService : IFontsService + public class PromotionContentService : IPromotionContentService { /// /// 跑马灯 @@ -40,19 +42,36 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public FontsService(GenericRepository fontsRepository) + public PromotionContentService(GenericRepository fontsRepository) { this.fontsRepository = fontsRepository; } + /// + /// 查询所有宣传联动内容 + /// + /// + public ListOutputDto SelectPromotionContentAll(ReadPromotionContentInputDto readPromotionContentInputDto) + { + ListOutputDto fonts = new ListOutputDto(); + var count = 0; + + var listSource = fontsRepository.AsQueryable().ToPageList(readPromotionContentInputDto.Page, readPromotionContentInputDto.PageSize, ref count); + + fonts.listSource = EntityMapper.MapList(listSource); + fonts.total = count; + return fonts; + } + /// /// 查询所有宣传联动内容(跑马灯) /// /// - public List SelectFontAll() + public ListOutputDto SelectPromotionContents() { - List fonts = new List(); - fonts = fontsRepository.GetList(); + ListOutputDto fonts = new ListOutputDto(); + var listSource = fontsRepository.AsQueryable().ToList(); + fonts.listSource = EntityMapper.MapList(listSource); return fonts; } } diff --git a/EOM.TSHotelManagement.Application/Business/Reser/IReserService.cs b/EOM.TSHotelManagement.Application/Business/Reser/IReserService.cs index 0405446..93cf386 100644 --- a/EOM.TSHotelManagement.Application/Business/Reser/IReserService.cs +++ b/EOM.TSHotelManagement.Application/Business/Reser/IReserService.cs @@ -21,6 +21,7 @@ *SOFTWARE. * */ +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; namespace EOM.TSHotelManagement.Application @@ -35,28 +36,28 @@ namespace EOM.TSHotelManagement.Application /// 获取所有预约信息 /// /// - List SelectReserAll(); + ListOutputDto SelectReserAll(ReadReserInputDto readReserInputDto); /// /// 根据房间编号获取预约信息 /// - /// + /// /// - Reser SelectReserInfoByRoomNo(string no); + SingleOutputDto SelectReserInfoByRoomNo(ReadReserInputDto readReserInputDto); /// /// 删除预约信息 /// /// /// - bool DeleteReserInfo(Reser reser); + BaseOutputDto DeleteReserInfo(DeleteReserInputDto reser); /// /// 添加预约信息 /// /// /// - bool InserReserInfo(Reser r); + BaseOutputDto InserReserInfo(CreateReserInputDto r); } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Application/Business/Reser/ReserService.cs b/EOM.TSHotelManagement.Application/Business/Reser/ReserService.cs index bc30d35..5e4ae49 100644 --- a/EOM.TSHotelManagement.Application/Business/Reser/ReserService.cs +++ b/EOM.TSHotelManagement.Application/Business/Reser/ReserService.cs @@ -21,9 +21,13 @@ *SOFTWARE. * */ +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Util; using EOM.TSHotelManagement.EntityFramework; using jvncorelib.EncryptorLib; +using Microsoft.AspNetCore.DataProtection; +using SqlSugar; namespace EOM.TSHotelManagement.Application { @@ -43,46 +47,68 @@ namespace EOM.TSHotelManagement.Application private readonly jvncorelib.EncryptorLib.EncryptLib encrypt; /// - /// + /// 数据保护 /// - /// - /// - public ReserService(GenericRepository reserRepository, jvncorelib.EncryptorLib.EncryptLib encrypt) + private readonly IDataProtector dataProtector; + + public ReserService(GenericRepository reserRepository, EncryptLib encrypt, IDataProtectionProvider dataProtectionProvider) { this.reserRepository = reserRepository; this.encrypt = encrypt; + this.dataProtector = dataProtectionProvider.CreateProtector("ReserInfoProtector"); } /// /// 获取所有预约信息 /// /// - public List SelectReserAll() + public ListOutputDto SelectReserAll(ReadReserInputDto readReserInputDto) { - List rss = new List(); - rss = reserRepository.GetList(a => a.IsDelete == 0); - rss.ForEach(source => + ListOutputDto rss = new ListOutputDto(); + + var where = Expressionable.Create(); + + where = where.And(a => a.IsDelete == readReserInputDto.IsDelete); + + var count = 0; + + var listSource = reserRepository.AsQueryable().Where(where.ToExpression()).ToPageList(readReserInputDto.Page,readReserInputDto.PageSize,ref count); + + listSource.ForEach(source => { - //解密联系方式 - var sourceTelStr = source.ReservationPhoneNumber.Contains("·") ? encrypt.Decryption(source.ReservationPhoneNumber) : source.ReservationPhoneNumber; - source.ReservationPhoneNumber = sourceTelStr; + try + { + //解密联系方式 + var sourceTelStr = source.ReservationPhoneNumber.Contains('·') ? encrypt.Decryption(source.ReservationPhoneNumber) : dataProtector.Unprotect(source.ReservationPhoneNumber); + source.ReservationPhoneNumber = sourceTelStr; + } + catch (Exception) + { + source.ReservationPhoneNumber = source.ReservationPhoneNumber; + } }); + + rss.listSource = EntityMapper.MapList(listSource); + rss.total = count; return rss; } /// /// 根据房间编号获取预约信息 /// - /// + /// /// - public Reser SelectReserInfoByRoomNo(string no) + public SingleOutputDto SelectReserInfoByRoomNo(ReadReserInputDto readReserInputDt) { Reser res = null; - res = reserRepository.GetSingle(a => a.ReservationRoomNumber == no && a.IsDelete != 1); + res = reserRepository.GetSingle(a => a.ReservationRoomNumber == readReserInputDt.RoomNo && a.IsDelete != 1); //解密联系方式 var sourceTelStr = res.ReservationPhoneNumber.Contains("·") ? encrypt.Decryption(res.ReservationPhoneNumber) : res.ReservationPhoneNumber; res.ReservationPhoneNumber = sourceTelStr; - return res; + + var outputReser = EntityMapper.Map(res); + + return new SingleOutputDto { Source = outputReser}; } /// @@ -90,14 +116,23 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool DeleteReserInfo(Reser reser) + public BaseOutputDto DeleteReserInfo(DeleteReserInputDto reser) { - return reserRepository.Update(a => new Reser() + var result = reserRepository.Update(a => new Reser() { - IsDelete = 1, - DataChgUsr = string.Empty + IsDelete = reser.IsDelete, + DataChgUsr = reser.DataChgUsr, + DataChgDate = reser.DataChgDate }, a => a.ReservationId == reser.ReservationId); + if (result) + { + return new BaseOutputDto(StatusCodeConstants.Success, LocalizationHelper.GetLocalizedString("Delete Reser Success", "预约信息删除成功")); + } + else + { + return new BaseOutputDto(StatusCodeConstants.InternalServerError, LocalizationHelper.GetLocalizedString("Delete Reser Failed", "预约信息删除失败")); + } } /// @@ -105,13 +140,28 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool InserReserInfo(Reser r) + public BaseOutputDto InserReserInfo(CreateReserInputDto r) { - var cryStr = encrypt.Encryption(r.ReservationPhoneNumber, EncryptionLevel.Enhanced); - r.ReservationPhoneNumber = cryStr; - return reserRepository.Insert(r); - } - + string NewTel = dataProtector.Protect(r.ReservationPhoneNumber); + r.ReservationPhoneNumber = NewTel; + try + { + var result = reserRepository.Update(EntityMapper.Map(r)); + if (result) + { + return new BaseOutputDto(StatusCodeConstants.Success, LocalizationHelper.GetLocalizedString("Update Customer Success", "预约信息添加成功")); + } + else + { + return new BaseOutputDto(StatusCodeConstants.InternalServerError, LocalizationHelper.GetLocalizedString("Update Customer Failed", "预约信息添加失败")); + } + } + catch (Exception ex) + { + LogHelper.LogError(LocalizationHelper.GetLocalizedString("Update Customer Failed", "预约信息添加失败"), ex); + return new BaseOutputDto(StatusCodeConstants.InternalServerError, LocalizationHelper.GetLocalizedString("Update Customer Failed", "预约信息添加失败")); + } + } } } diff --git a/EOM.TSHotelManagement.Application/EOM.TSHotelManagement.Application.csproj b/EOM.TSHotelManagement.Application/EOM.TSHotelManagement.Application.csproj index 3e57f0a..07786f8 100644 --- a/EOM.TSHotelManagement.Application/EOM.TSHotelManagement.Application.csproj +++ b/EOM.TSHotelManagement.Application/EOM.TSHotelManagement.Application.csproj @@ -32,6 +32,7 @@ + diff --git a/EOM.TSHotelManagement.Application/Util/IUtilService.cs b/EOM.TSHotelManagement.Application/Util/IUtilService.cs index bcfa11b..96bfd46 100644 --- a/EOM.TSHotelManagement.Application/Util/IUtilService.cs +++ b/EOM.TSHotelManagement.Application/Util/IUtilService.cs @@ -1,4 +1,5 @@ -using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Common.Core; namespace EOM.TSHotelManagement.Application { @@ -31,6 +32,6 @@ namespace EOM.TSHotelManagement.Application /// 查询所有操作日志 /// /// - OSelectAllDto SelectOperationlogAll(int? pageIndex, int? pageSize); + ListOutputDto SelectOperationlogAll(int? pageIndex, int? pageSize); } } diff --git a/EOM.TSHotelManagement.Application/Util/UtilService.cs b/EOM.TSHotelManagement.Application/Util/UtilService.cs index 6a62f29..8a20034 100644 --- a/EOM.TSHotelManagement.Application/Util/UtilService.cs +++ b/EOM.TSHotelManagement.Application/Util/UtilService.cs @@ -1,4 +1,5 @@ -using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Common.Core; using EOM.TSHotelManagement.EntityFramework; namespace EOM.TSHotelManagement.Application @@ -73,9 +74,9 @@ namespace EOM.TSHotelManagement.Application /// 查询所有操作日志 /// /// - public OSelectAllDto SelectOperationlogAll(int? pageIndex, int? pageSize) + public ListOutputDto SelectOperationlogAll(int? pageIndex, int? pageSize) { - OSelectAllDto operationLogs = new OSelectAllDto(); + ListOutputDto operationLogs = new ListOutputDto(); var count = 0; if (pageIndex != 0 && pageSize != 0) { diff --git a/EOM.TSHotelManagement.Common.Contract/BaseDto/BaseDto.cs b/EOM.TSHotelManagement.Common.Contract/BaseDto/BaseDto.cs new file mode 100644 index 0000000..d1afb15 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/BaseDto/BaseDto.cs @@ -0,0 +1,12 @@ +using System; + +namespace EOM.TSHotelManagement.Common.Contract +{ + public class BaseDto + { + /// + /// Token + /// + public string UserToken { get; set; } + } +} diff --git a/EOM.TSHotelManagement.Common.Contract/BaseDto/BaseInputDto.cs b/EOM.TSHotelManagement.Common.Contract/BaseDto/BaseInputDto.cs new file mode 100644 index 0000000..7448617 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/BaseDto/BaseInputDto.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EOM.TSHotelManagement.Common.Contract +{ + public class BaseInputDto: BaseDto + { + /// + /// 删除标识 + /// + public int? IsDelete { get; set; } + /// + /// 资料创建人 + /// + public string DataInsUsr { get; set; } + /// + /// 资料创建时间 + /// + public DateTime? DataInsDate { get; set; } + /// + /// 资料更新人 + /// + public string DataChgUsr { get; set; } + /// + /// 资料更新时间 + /// + public DateTime? DataChgDate { get; set; } + } +} diff --git a/EOM.TSHotelManagement.Common.Contract/BaseDto/BaseOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/BaseDto/BaseOutputDto.cs new file mode 100644 index 0000000..f1fa1fc --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/BaseDto/BaseOutputDto.cs @@ -0,0 +1,42 @@ +using EOM.TSHotelManagement.Common.Util; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EOM.TSHotelManagement.Common.Contract +{ + public class BaseOutputDto:BaseDto + { + /// + /// 状态码,例如 200 表示成功,500 表示服务器错误,400 表示客户端错误等 + /// + public int StatusCode { get; set; } = StatusCodeConstants.Success; + + /// + /// 返回消息,用于描述请求结果 + /// + public string Message { get; set; } = LocalizationHelper.GetLocalizedString("Success","成功"); + + /// + /// + /// + public BaseOutputDto() + { + StatusCode = 200; + Message = LocalizationHelper.GetLocalizedString("Success", "成功"); + } + + /// + /// 带状态码和消息的构造函数 + /// + /// 状态码 + /// 消息 + public BaseOutputDto(int statusCode, string message) + { + StatusCode = statusCode; + Message = message; + } + } +} diff --git a/EOM.TSHotelManagement.Common.Contract/BaseDto/ListInputDto.cs b/EOM.TSHotelManagement.Common.Contract/BaseDto/ListInputDto.cs new file mode 100644 index 0000000..3362a5a --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/BaseDto/ListInputDto.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ListInputDto:BaseInputDto + { + /// + /// 页数 + /// + public int Page { get; set; } = 0; + /// + /// 总数 + /// + public int PageSize { get; set; } = 10; + } +} diff --git a/EOM.TSHotelManagement.Common.Core/OSelectAllDto.cs b/EOM.TSHotelManagement.Common.Contract/BaseDto/ListOutputDto.cs similarity index 91% rename from EOM.TSHotelManagement.Common.Core/OSelectAllDto.cs rename to EOM.TSHotelManagement.Common.Contract/BaseDto/ListOutputDto.cs index 77a1d0f..f002b09 100644 --- a/EOM.TSHotelManagement.Common.Core/OSelectAllDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/BaseDto/ListOutputDto.cs @@ -23,13 +23,12 @@ */ using System.Collections.Generic; -namespace EOM.TSHotelManagement.Common.Core +namespace EOM.TSHotelManagement.Common.Contract { /// - /// 查询所有客户信息 - /// 输出DTO + /// 带总数的列表输出Dto /// - public class OSelectAllDto + public class ListOutputDto : BaseOutputDto { /// /// 数据源 diff --git a/EOM.TSHotelManagement.Common.Contract/BaseDto/SingleOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/BaseDto/SingleOutputDto.cs new file mode 100644 index 0000000..fa49ea7 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/BaseDto/SingleOutputDto.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EOM.TSHotelManagement.Common.Contract +{ + public class SingleOutputDto : BaseOutputDto + { + /// + /// 数据源 + /// + public T Source { get; set; } + } +} diff --git a/EOM.TSHotelManagement.Common.Contract/BaseDto/StatusCodeConstants.cs b/EOM.TSHotelManagement.Common.Contract/BaseDto/StatusCodeConstants.cs new file mode 100644 index 0000000..0310ee8 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/BaseDto/StatusCodeConstants.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EOM.TSHotelManagement.Common.Contract +{ + public static class StatusCodeConstants + { + public const int Success = 200; + public const int Created = 201; + public const int BadRequest = 400; + public const int Unauthorized = 401; + public const int Forbidden = 403; + public const int NotFound = 404; + public const int InternalServerError = 500; + } + +} diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/CreateAssetInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/CreateAssetInputDto.cs new file mode 100644 index 0000000..18ad7f1 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/CreateAssetInputDto.cs @@ -0,0 +1,14 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateAssetInputDto:BaseInputDto + { + public string AssetNumber { get; set; } + public string AssetName { get; set; } + public decimal AssetValue { get; set; } + public string DepartmentCode { get; set; } + public DateTime AcquisitionDate { get; set; } + public string AssetSource { get; set; } + public string AcquiredByEmployeeId { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/CreateAssetOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/CreateAssetOutputDto.cs new file mode 100644 index 0000000..660fcd3 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/CreateAssetOutputDto.cs @@ -0,0 +1,17 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateAssetOutputDto:BaseOutputDto + { + public string AssetNumber { get; set; } + public string AssetName { get; set; } + public decimal AssetValue { get; set; } + public string AssetValueFormatted { get; set; } + public string DepartmentCode { get; set; } + public string DepartmentName { get; set; } + public DateTime AcquisitionDate { get; set; } + public string AssetSource { get; set; } + public string AcquiredByEmployeeId { get; set; } + public string AcquiredByEmployeeName { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/DeleteAssetInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/DeleteAssetInputDto.cs new file mode 100644 index 0000000..9bd786c --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/DeleteAssetInputDto.cs @@ -0,0 +1,8 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteAssetInputDto: BaseInputDto + { + public string AssetNumber { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/DeleteAssetOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/DeleteAssetOutputDto.cs new file mode 100644 index 0000000..7e49c86 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/DeleteAssetOutputDto.cs @@ -0,0 +1,8 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteAssetOutputDto:BaseOutputDto + { + public string AssetNumber { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/ReadAssetInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/ReadAssetInputDto.cs new file mode 100644 index 0000000..cf8ffc9 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/ReadAssetInputDto.cs @@ -0,0 +1,8 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadAssetInputDto: ListInputDto + { + public string AssetNumber { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/ReadAssetOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/ReadAssetOutputDto.cs new file mode 100644 index 0000000..bfe2764 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/ReadAssetOutputDto.cs @@ -0,0 +1,17 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadAssetOutputDto:BaseOutputDto + { + public string AssetNumber { get; set; } + public string AssetName { get; set; } + public decimal AssetValue { get; set; } + public string AssetValueFormatted { get; set; } + public string DepartmentCode { get; set; } + public string DepartmentName { get; set; } + public DateTime AcquisitionDate { get; set; } + public string AssetSource { get; set; } + public string AcquiredByEmployeeId { get; set; } + public string AcquiredByEmployeeName { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/UpdateAssetInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/UpdateAssetInputDto.cs new file mode 100644 index 0000000..55b8f9d --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/UpdateAssetInputDto.cs @@ -0,0 +1,14 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateAssetInputDto: BaseInputDto + { + public string AssetNumber { get; set; } + public string AssetName { get; set; } + public decimal AssetValue { get; set; } + public string DepartmentCode { get; set; } + public DateTime AcquisitionDate { get; set; } + public string AssetSource { get; set; } + public string AcquiredByEmployeeId { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/UpdateAssetOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/UpdateAssetOutputDto.cs new file mode 100644 index 0000000..370d695 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/UpdateAssetOutputDto.cs @@ -0,0 +1,17 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateAssetOutputDto:BaseOutputDto + { + public string AssetNumber { get; set; } + public string AssetName { get; set; } + public decimal AssetValue { get; set; } + public string AssetValueFormatted { get; set; } + public string DepartmentCode { get; set; } + public string DepartmentName { get; set; } + public DateTime AcquisitionDate { get; set; } + public string AssetSource { get; set; } + public string AcquiredByEmployeeId { get; set; } + public string AcquiredByEmployeeName { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/CreateCustoTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/CreateCustoTypeInputDto.cs new file mode 100644 index 0000000..0da6174 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/CreateCustoTypeInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateCustoTypeInputDto: BaseInputDto + { + public int CustomerType { get; set; } + public string CustomerTypeName { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/CreateCustoTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/CreateCustoTypeOutputDto.cs new file mode 100644 index 0000000..b229202 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/CreateCustoTypeOutputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateCustoTypeOutputDto:BaseOutputDto + { + public int CustomerType { get; set; } + public string CustomerTypeName { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/DeleteCustoTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/DeleteCustoTypeInputDto.cs new file mode 100644 index 0000000..3eed652 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/DeleteCustoTypeInputDto.cs @@ -0,0 +1,8 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteCustoTypeInputDto: BaseInputDto + { + public int CustomerType { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/DeleteCustoTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/DeleteCustoTypeOutputDto.cs new file mode 100644 index 0000000..25cdb47 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/DeleteCustoTypeOutputDto.cs @@ -0,0 +1,8 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteCustoTypeOutputDto:BaseOutputDto + { + public int CustomerType { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/ReadCustoTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/ReadCustoTypeInputDto.cs new file mode 100644 index 0000000..a51fad3 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/ReadCustoTypeInputDto.cs @@ -0,0 +1,8 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadCustoTypeInputDto:ListInputDto + { + public int CustomerType { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/ReadCustoTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/ReadCustoTypeOutputDto.cs new file mode 100644 index 0000000..b8183d1 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/ReadCustoTypeOutputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadCustoTypeOutputDto:BaseOutputDto + { + public int CustomerType { get; set; } + public string CustomerTypeName { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/UpdateCustoTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/UpdateCustoTypeInputDto.cs new file mode 100644 index 0000000..41caac0 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/UpdateCustoTypeInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateCustoTypeInputDto: BaseInputDto + { + public int CustomerType { get; set; } + public string CustomerTypeName { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/UpdateCustoTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/UpdateCustoTypeOutputDto.cs new file mode 100644 index 0000000..ca53ad1 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/UpdateCustoTypeOutputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateCustoTypeOutputDto:BaseOutputDto + { + public int CustomerType { get; set; } + public string CustomerTypeName { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/CreateCustomerInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/CreateCustomerInputDto.cs new file mode 100644 index 0000000..c79d8ff --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/CreateCustomerInputDto.cs @@ -0,0 +1,16 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateCustomerInputDto:BaseInputDto + { + public string CustomerNumber { get; set; } + public string CustomerName { get; set; } + public int? CustomerGender { get; set; } + public int PassportType { get; set; } + public string CustomerPhoneNumber { get; set; } + public DateTime DateOfBirth { get; set; } + public string PassportID { get; set; } + public string CustomerAddress { get; set; } + public int CustomerType { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/CreateCustomerOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/CreateCustomerOutputDto.cs new file mode 100644 index 0000000..9038cbf --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/CreateCustomerOutputDto.cs @@ -0,0 +1,19 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateCustomerOutputDto:BaseOutputDto + { + public string CustomerNumber { get; set; } + public string CustomerName { get; set; } + public int? CustomerGender { get; set; } + public int PassportType { get; set; } + public string GenderName { get; set; } + public string CustomerPhoneNumber { get; set; } + public DateTime DateOfBirth { get; set; } + public string CustomerTypeName { get; set; } + public string PassportTypeName { get; set; } + public string PassportID { get; set; } + public string CustomerAddress { get; set; } + public int CustomerType { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/DeleteCustomerInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/DeleteCustomerInputDto.cs new file mode 100644 index 0000000..c78cf70 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/DeleteCustomerInputDto.cs @@ -0,0 +1,8 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteCustomerInputDto:BaseInputDto + { + public string CustomerNumber { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/DeleteCustomerOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/DeleteCustomerOutputDto.cs new file mode 100644 index 0000000..2101464 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/DeleteCustomerOutputDto.cs @@ -0,0 +1,8 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteCustomerOutputDto:BaseOutputDto + { + public string CustomerNumber { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerInputDto.cs new file mode 100644 index 0000000..6a9fd8a --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerInputDto.cs @@ -0,0 +1,12 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadCustomerInputDto:ListInputDto + { + public string CustomerName { get; set; } + public string CustomerNumber { get; set; } + public string CustomerPhoneNumber { get; set; } + public string PassportID { get; set; } + public bool OnlyVip { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs new file mode 100644 index 0000000..1e2b39c --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs @@ -0,0 +1,21 @@ +using EOM.TSHotelManagement.Common.Util; + +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadCustomerOutputDto:BaseOutputDto + { + public string CustomerNumber { get; set; } + public string CustomerName { get; set; } + public int? CustomerGender { get; set; } + public int PassportType { get; set; } + public string GenderName { get; set; } + public string CustomerPhoneNumber { get; set; } + public DateTime DateOfBirth { get; set; } + public string CustomerTypeName { get; set; } + public string PassportTypeName { get; set; } + public string PassportID { get; set; } + public string CustomerAddress { get; set; } + public int CustomerType { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/UpdateCustomerInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/UpdateCustomerInputDto.cs new file mode 100644 index 0000000..a22003e --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/UpdateCustomerInputDto.cs @@ -0,0 +1,16 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateCustomerInputDto: BaseInputDto + { + public string CustomerNumber { get; set; } + public string CustomerName { get; set; } + public int? CustomerGender { get; set; } + public int PassportType { get; set; } + public string CustomerPhoneNumber { get; set; } + public DateTime DateOfBirth { get; set; } + public string PassportID { get; set; } + public string CustomerAddress { get; set; } + public int CustomerType { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/UpdateCustomerOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/UpdateCustomerOutputDto.cs new file mode 100644 index 0000000..b7c443a --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/UpdateCustomerOutputDto.cs @@ -0,0 +1,19 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateCustomerOutputDto:BaseOutputDto + { + public string CustomerNumber { get; set; } + public string CustomerName { get; set; } + public int? CustomerGender { get; set; } + public int PassportType { get; set; } + public string GenderName { get; set; } + public string CustomerPhoneNumber { get; set; } + public DateTime DateOfBirth { get; set; } + public string CustomerTypeName { get; set; } + public string PassportTypeName { get; set; } + public string PassportID { get; set; } + public string CustomerAddress { get; set; } + public int CustomerType { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/CreateGenderTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/CreateGenderTypeInputDto.cs new file mode 100644 index 0000000..9315a2a --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/CreateGenderTypeInputDto.cs @@ -0,0 +1,8 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateGenderTypeInputDto: BaseInputDto + { + public string GenderName { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/CreateGenderTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/CreateGenderTypeOutputDto.cs new file mode 100644 index 0000000..98a8e63 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/CreateGenderTypeOutputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateGenderTypeOutputDto:BaseOutputDto + { + public int GenderId { get; set; } + public string GenderName { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/DeleteGenderTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/DeleteGenderTypeInputDto.cs new file mode 100644 index 0000000..1805d1c --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/DeleteGenderTypeInputDto.cs @@ -0,0 +1,8 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteGenderTypeInputDto: BaseInputDto + { + public int GenderId { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/DeleteGenderTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/DeleteGenderTypeOutputDto.cs new file mode 100644 index 0000000..ce401e9 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/DeleteGenderTypeOutputDto.cs @@ -0,0 +1,8 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteGenderTypeOutputDto:BaseOutputDto + { + public int GenderId { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/ReadGenderTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/ReadGenderTypeInputDto.cs new file mode 100644 index 0000000..398f953 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/ReadGenderTypeInputDto.cs @@ -0,0 +1,8 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadGenderTypeInputDto:ListInputDto + { + public int GenderId { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/ReadGenderTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/ReadGenderTypeOutputDto.cs new file mode 100644 index 0000000..2b446a1 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/ReadGenderTypeOutputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadGenderTypeOutputDto:BaseOutputDto + { + public int GenderId { get; set; } + public string GenderName { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/UpdateGenderTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/UpdateGenderTypeInputDto.cs new file mode 100644 index 0000000..eb173c9 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/UpdateGenderTypeInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateGenderTypeInputDto: BaseInputDto + { + public int GenderId { get; set; } + public string GenderName { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/UpdateGenderTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/UpdateGenderTypeOutputDto.cs new file mode 100644 index 0000000..b527d76 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/UpdateGenderTypeOutputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateGenderTypeOutputDto:BaseOutputDto + { + public int GenderId { get; set; } + public string GenderName { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/CreatePassportTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/CreatePassportTypeInputDto.cs new file mode 100644 index 0000000..df95dd1 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/CreatePassportTypeInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreatePassportTypeInputDto: BaseInputDto + { + public int PassportId { get; set; } + public string PassportName { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/CreatePassportTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/CreatePassportTypeOutputDto.cs new file mode 100644 index 0000000..1b32d9a --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/CreatePassportTypeOutputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreatePassportTypeOutputDto:BaseOutputDto + { + public int PassportId { get; set; } + public string PassportName { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/DeletePassportTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/DeletePassportTypeInputDto.cs new file mode 100644 index 0000000..f62c6fd --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/DeletePassportTypeInputDto.cs @@ -0,0 +1,8 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeletePassportTypeInputDto: BaseInputDto + { + public int PassportId { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/DeletePassportTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/DeletePassportTypeOutputDto.cs new file mode 100644 index 0000000..91c5193 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/DeletePassportTypeOutputDto.cs @@ -0,0 +1,8 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeletePassportTypeOutputDto:BaseOutputDto + { + public int PassportId { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeInputDto.cs new file mode 100644 index 0000000..f10f8fd --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeInputDto.cs @@ -0,0 +1,8 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadPassportTypeInputDto:ListInputDto + { + public int PassportId { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeOutputDto.cs new file mode 100644 index 0000000..1520146 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeOutputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadPassportTypeOutputDto:BaseOutputDto + { + public int PassportId { get; set; } + public string PassportName { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/UpdatePassportTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/UpdatePassportTypeInputDto.cs new file mode 100644 index 0000000..b027d5d --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/UpdatePassportTypeInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdatePassportTypeInputDto: BaseInputDto + { + public int PassportId { get; set; } + public string PassportName { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/UpdatePassportTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/UpdatePassportTypeOutputDto.cs new file mode 100644 index 0000000..a92dee9 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/UpdatePassportTypeOutputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdatePassportTypeOutputDto:BaseOutputDto + { + public int PassportId { get; set; } + public string PassportName { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/CreateEnergyManagementInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/CreateEnergyManagementInputDto.cs new file mode 100644 index 0000000..a50257e --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/CreateEnergyManagementInputDto.cs @@ -0,0 +1,14 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateEnergyManagementInputDto : BaseInputDto + { + public string RoomNumber { get; set; } + public string CustomerNumber { get; set; } + public DateTime StartDate { get; set; } + public DateTime EndDate { get; set; } + public decimal PowerUsage { get; set; } + public decimal WaterUsage { get; set; } + public string Recorder { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/CreateEnergyManagementOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/CreateEnergyManagementOutputDto.cs new file mode 100644 index 0000000..09e253e --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/CreateEnergyManagementOutputDto.cs @@ -0,0 +1,15 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateEnergyManagementOutputDto:BaseOutputDto + { + public int InformationId { get; set; } + public string RoomNumber { get; set; } + public string CustomerNumber { get; set; } + public DateTime StartDate { get; set; } + public DateTime EndDate { get; set; } + public decimal PowerUsage { get; set; } + public decimal WaterUsage { get; set; } + public string Recorder { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/DeleteEnergyManagementInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/DeleteEnergyManagementInputDto.cs new file mode 100644 index 0000000..85c2de8 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/DeleteEnergyManagementInputDto.cs @@ -0,0 +1,8 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteEnergyManagementInputDto: BaseInputDto + { + public int InformationId { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/DeleteEnergyManagementOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/DeleteEnergyManagementOutputDto.cs new file mode 100644 index 0000000..4b9b748 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/DeleteEnergyManagementOutputDto.cs @@ -0,0 +1,8 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteEnergyManagementOutputDto:BaseOutputDto + { + public int InformationId { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementInputDto.cs new file mode 100644 index 0000000..0254587 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementInputDto.cs @@ -0,0 +1,11 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadEnergyManagementInputDto:ListInputDto + { + public int InformationId { get; set; } + public string RoomNo { get; set; } + public DateTime? UseDate { get; set; } + public DateTime? EndDate { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementOutputDto.cs new file mode 100644 index 0000000..8787be1 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementOutputDto.cs @@ -0,0 +1,15 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadEnergyManagementOutputDto:BaseOutputDto + { + public int InformationId { get; set; } + public string RoomNumber { get; set; } + public string CustomerNumber { get; set; } + public DateTime StartDate { get; set; } + public DateTime EndDate { get; set; } + public decimal PowerUsage { get; set; } + public decimal WaterUsage { get; set; } + public string Recorder { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/UpdateEnergyManagementInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/UpdateEnergyManagementInputDto.cs new file mode 100644 index 0000000..171add6 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/UpdateEnergyManagementInputDto.cs @@ -0,0 +1,15 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateEnergyManagementInputDto: BaseInputDto + { + public int InformationId { get; set; } + public string RoomNumber { get; set; } + public string CustomerNumber { get; set; } + public DateTime StartDate { get; set; } + public DateTime EndDate { get; set; } + public decimal PowerUsage { get; set; } + public decimal WaterUsage { get; set; } + public string Recorder { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/UpdateEnergyManagementOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/UpdateEnergyManagementOutputDto.cs new file mode 100644 index 0000000..faa2530 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/UpdateEnergyManagementOutputDto.cs @@ -0,0 +1,15 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateEnergyManagementOutputDto:BaseOutputDto + { + public int InformationId { get; set; } + public string RoomNumber { get; set; } + public string CustomerNumber { get; set; } + public DateTime StartDate { get; set; } + public DateTime EndDate { get; set; } + public decimal PowerUsage { get; set; } + public decimal WaterUsage { get; set; } + public string Recorder { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/CreatePromotionContentInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/CreatePromotionContentInputDto.cs new file mode 100644 index 0000000..f911e22 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/CreatePromotionContentInputDto.cs @@ -0,0 +1,11 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreatePromotionContentInputDto: BaseInputDto + { + public string PromotionTitle { get; set; } + public string PromotionContent { get; set; } + public DateTime StartDate { get; set; } + public DateTime EndDate { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/CreatePromotionContentOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/CreatePromotionContentOutputDto.cs new file mode 100644 index 0000000..b3281a3 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/CreatePromotionContentOutputDto.cs @@ -0,0 +1,12 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreatePromotionContentOutputDto:BaseOutputDto + { + public int PromotionId { get; set; } + public string PromotionTitle { get; set; } + public string PromotionContent { get; set; } + public DateTime StartDate { get; set; } + public DateTime EndDate { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/DeletePromotionContentInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/DeletePromotionContentInputDto.cs new file mode 100644 index 0000000..2a91259 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/DeletePromotionContentInputDto.cs @@ -0,0 +1,8 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeletePromotionContentInputDto: BaseInputDto + { + public int PromotionId { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/DeletePromotionContentOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/DeletePromotionContentOutputDto.cs new file mode 100644 index 0000000..a9894ff --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/DeletePromotionContentOutputDto.cs @@ -0,0 +1,8 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeletePromotionContentOutputDto:BaseOutputDto + { + public int PromotionId { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentInputDto.cs new file mode 100644 index 0000000..8d89226 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentInputDto.cs @@ -0,0 +1,8 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadPromotionContentInputDto:ListInputDto + { + public int PromotionId { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentOutputDto.cs new file mode 100644 index 0000000..93dc23d --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentOutputDto.cs @@ -0,0 +1,12 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadPromotionContentOutputDto:BaseOutputDto + { + public int PromotionId { get; set; } + public string PromotionTitle { get; set; } + public string PromotionContent { get; set; } + public DateTime StartDate { get; set; } + public DateTime EndDate { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/UpdatePromotionContentInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/UpdatePromotionContentInputDto.cs new file mode 100644 index 0000000..327a636 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/UpdatePromotionContentInputDto.cs @@ -0,0 +1,12 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdatePromotionContentInputDto: BaseInputDto + { + public int PromotionId { get; set; } + public string PromotionTitle { get; set; } + public string PromotionContent { get; set; } + public DateTime StartDate { get; set; } + public DateTime EndDate { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/UpdatePromotionContentOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/UpdatePromotionContentOutputDto.cs new file mode 100644 index 0000000..33e0897 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/UpdatePromotionContentOutputDto.cs @@ -0,0 +1,12 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdatePromotionContentOutputDto:BaseOutputDto + { + public int PromotionId { get; set; } + public string PromotionTitle { get; set; } + public string PromotionContent { get; set; } + public DateTime StartDate { get; set; } + public DateTime EndDate { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/CreateReserInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/CreateReserInputDto.cs new file mode 100644 index 0000000..5a2f39b --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/CreateReserInputDto.cs @@ -0,0 +1,13 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateReserInputDto: BaseInputDto + { + public string CustomerNumber { get; set; } + public string ReservationPhoneNumber { get; set; } + public string ReservationRoomNumber { get; set; } + public DateTime ReservationStartDate { get; set; } + public DateTime ReservationEndDate { get; set; } + public string ReservationStatus { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/CreateReserOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/CreateReserOutputDto.cs new file mode 100644 index 0000000..4718a5c --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/CreateReserOutputDto.cs @@ -0,0 +1,14 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateReserOutputDto:BaseOutputDto + { + public string ReservationId { get; set; } + public string CustomerNumber { get; set; } + public string RoomNumber { get; set; } + public DateTime ReservationDate { get; set; } + public DateTime CheckInDate { get; set; } + public DateTime CheckOutDate { get; set; } + public string ReservationStatus { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/DeleteReserInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/DeleteReserInputDto.cs new file mode 100644 index 0000000..9e01050 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/DeleteReserInputDto.cs @@ -0,0 +1,8 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteReserInputDto:BaseInputDto + { + public string ReservationId { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/DeleteReserOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/DeleteReserOutputDto.cs new file mode 100644 index 0000000..65b4f30 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/DeleteReserOutputDto.cs @@ -0,0 +1,8 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteReserOutputDto:BaseOutputDto + { + public string ReservationId { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserInputDto.cs new file mode 100644 index 0000000..ee6f36f --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadReserInputDto:ListInputDto + { + public string ReservationId { get; set; } + public string RoomNo { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserOutputDto.cs new file mode 100644 index 0000000..fab7a58 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserOutputDto.cs @@ -0,0 +1,14 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadReserOutputDto:BaseOutputDto + { + public string ReservationId { get; set; } + public string CustomerNumber { get; set; } + public string RoomNumber { get; set; } + public DateTime ReservationDate { get; set; } + public DateTime CheckInDate { get; set; } + public DateTime CheckOutDate { get; set; } + public string ReservationStatus { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/UpdateReserInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/UpdateReserInputDto.cs new file mode 100644 index 0000000..94ad2d5 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/UpdateReserInputDto.cs @@ -0,0 +1,14 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateReserInputDto: BaseInputDto + { + public string ReservationId { get; set; } + public string CustomerNumber { get; set; } + public string RoomNumber { get; set; } + public DateTime ReservationDate { get; set; } + public DateTime CheckInDate { get; set; } + public DateTime CheckOutDate { get; set; } + public string ReservationStatus { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/UpdateReserOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/UpdateReserOutputDto.cs new file mode 100644 index 0000000..b8ce31d --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/UpdateReserOutputDto.cs @@ -0,0 +1,14 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateReserOutputDto:BaseOutputDto + { + public string ReservationId { get; set; } + public string CustomerNumber { get; set; } + public string RoomNumber { get; set; } + public DateTime ReservationDate { get; set; } + public DateTime CheckInDate { get; set; } + public DateTime CheckOutDate { get; set; } + public string ReservationStatus { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/CreateRoomInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/CreateRoomInputDto.cs new file mode 100644 index 0000000..caa4511 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/CreateRoomInputDto.cs @@ -0,0 +1,11 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateRoomInputDto : BaseInputDto + { + public string RoomType { get; set; } + public string RoomState { get; set; } + public decimal RoomPrice { get; set; } + public string RoomDescription { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/CreateRoomOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/CreateRoomOutputDto.cs new file mode 100644 index 0000000..b0313b0 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/CreateRoomOutputDto.cs @@ -0,0 +1,12 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateRoomOutputDto : BaseOutputDto + { + public string RoomNumber { get; set; } + public string RoomType { get; set; } + public string RoomState { get; set; } + public decimal RoomPrice { get; set; } + public string RoomDescription { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/DeleteRoomInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/DeleteRoomInputDto.cs new file mode 100644 index 0000000..8fd0dea --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/DeleteRoomInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteRoomInputDto : BaseInputDto + { + public string RoomNumber { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/DeleteRoomOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/DeleteRoomOutputDto.cs new file mode 100644 index 0000000..7cd344b --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/DeleteRoomOutputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteRoomOutputDto : BaseOutputDto + { + public string RoomNumber { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomInputDto.cs new file mode 100644 index 0000000..c665afa --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomInputDto.cs @@ -0,0 +1,8 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadRoomInputDto : ListInputDto + { + public string RoomNumber { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomOutputDto.cs new file mode 100644 index 0000000..ef29d89 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomOutputDto.cs @@ -0,0 +1,12 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadRoomOutputDto : BaseOutputDto + { + public string RoomNumber { get; set; } + public string RoomType { get; set; } + public string RoomState { get; set; } + public decimal RoomPrice { get; set; } + public string RoomDescription { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/UpdateRoomInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/UpdateRoomInputDto.cs new file mode 100644 index 0000000..a62e903 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/UpdateRoomInputDto.cs @@ -0,0 +1,13 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateRoomInputDto : BaseInputDto + { + public string RoomNumber { get; set; } + public string RoomType { get; set; } + public string RoomState { get; set; } + public decimal RoomPrice { get; set; } + public string RoomDescription { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/UpdateRoomOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/UpdateRoomOutputDto.cs new file mode 100644 index 0000000..1a92b9e --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/UpdateRoomOutputDto.cs @@ -0,0 +1,13 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateRoomOutputDto : BaseOutputDto + { + public string RoomNumber { get; set; } + public string RoomType { get; set; } + public string RoomState { get; set; } + public decimal RoomPrice { get; set; } + public string RoomDescription { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/CreateRoomStateInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/CreateRoomStateInputDto.cs new file mode 100644 index 0000000..67b3ef0 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/CreateRoomStateInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateRoomStateInputDto: BaseInputDto + { + public string RoomStateName { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/CreateRoomStateOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/CreateRoomStateOutputDto.cs new file mode 100644 index 0000000..7dc853e --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/CreateRoomStateOutputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateRoomStateOutputDto:BaseOutputDto + { + public int RoomStateId { get; set; } + public string RoomStateName { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/DeleteRoomStateInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/DeleteRoomStateInputDto.cs new file mode 100644 index 0000000..5d0d46f --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/DeleteRoomStateInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteRoomStateInputDto: BaseInputDto + { + public int RoomStateId { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/DeleteRoomStateOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/DeleteRoomStateOutputDto.cs new file mode 100644 index 0000000..65cb8c1 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/DeleteRoomStateOutputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteRoomStateOutputDto:BaseOutputDto + { + public int RoomStateId { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/ReadRoomStateInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/ReadRoomStateInputDto.cs new file mode 100644 index 0000000..0c192f5 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/ReadRoomStateInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadRoomStateInputDto:ListInputDto + { + public int RoomStateId { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/ReadRoomStateOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/ReadRoomStateOutputDto.cs new file mode 100644 index 0000000..20957eb --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/ReadRoomStateOutputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadRoomStateOutputDto:BaseOutputDto + { + public int RoomStateId { get; set; } + public string RoomStateName { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/UpdateRoomStateInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/UpdateRoomStateInputDto.cs new file mode 100644 index 0000000..a48eea3 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/UpdateRoomStateInputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateRoomStateInputDto: BaseInputDto + { + public int RoomStateId { get; set; } + public string RoomStateName { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/UpdateRoomStateOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/UpdateRoomStateOutputDto.cs new file mode 100644 index 0000000..7ea6394 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/UpdateRoomStateOutputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateRoomStateOutputDto:BaseOutputDto + { + public int RoomStateId { get; set; } + public string RoomStateName { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/CreateRoomTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/CreateRoomTypeInputDto.cs new file mode 100644 index 0000000..11b0e26 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/CreateRoomTypeInputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateRoomTypeInputDto: BaseInputDto + { + public string RoomTypeName { get; set; } + public decimal RoomTypePrice { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/CreateRoomTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/CreateRoomTypeOutputDto.cs new file mode 100644 index 0000000..1deef34 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/CreateRoomTypeOutputDto.cs @@ -0,0 +1,11 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateRoomTypeOutputDto:BaseOutputDto + { + public int RoomTypeId { get; set; } + public string RoomTypeName { get; set; } + public decimal RoomTypePrice { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/DeleteRoomTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/DeleteRoomTypeInputDto.cs new file mode 100644 index 0000000..046819c --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/DeleteRoomTypeInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteRoomTypeInputDto: BaseInputDto + { + public int RoomTypeId { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/DeleteRoomTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/DeleteRoomTypeOutputDto.cs new file mode 100644 index 0000000..95165f0a --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/DeleteRoomTypeOutputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteRoomTypeOutputDto:BaseOutputDto + { + public int RoomTypeId { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/ReadRoomTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/ReadRoomTypeInputDto.cs new file mode 100644 index 0000000..88e88c8 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/ReadRoomTypeInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadRoomTypeInputDto:ListInputDto + { + public int RoomTypeId { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/ReadRoomTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/ReadRoomTypeOutputDto.cs new file mode 100644 index 0000000..f60b2cd --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/ReadRoomTypeOutputDto.cs @@ -0,0 +1,11 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadRoomTypeOutputDto:BaseOutputDto + { + public int RoomTypeId { get; set; } + public string RoomTypeName { get; set; } + public decimal RoomTypePrice { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/UpdateRoomTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/UpdateRoomTypeInputDto.cs new file mode 100644 index 0000000..0999fd1 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/UpdateRoomTypeInputDto.cs @@ -0,0 +1,11 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateRoomTypeInputDto: BaseInputDto + { + public int RoomTypeId { get; set; } + public string RoomTypeName { get; set; } + public decimal RoomTypePrice { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/UpdateRoomTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/UpdateRoomTypeOutputDto.cs new file mode 100644 index 0000000..17e4122 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/UpdateRoomTypeOutputDto.cs @@ -0,0 +1,11 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateRoomTypeOutputDto:BaseOutputDto + { + public int RoomTypeId { get; set; } + public string RoomTypeName { get; set; } + public decimal RoomTypePrice { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/CreateSellThingInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/CreateSellThingInputDto.cs new file mode 100644 index 0000000..ab35d15 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/CreateSellThingInputDto.cs @@ -0,0 +1,11 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateSellThingInputDto: BaseInputDto + { + public string SellThingName { get; set; } + public decimal SellThingPrice { get; set; } + public string SellThingDescription { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/CreateSellThingOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/CreateSellThingOutputDto.cs new file mode 100644 index 0000000..105b3ce --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/CreateSellThingOutputDto.cs @@ -0,0 +1,12 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateSellThingOutputDto:BaseOutputDto + { + public int SellThingId { get; set; } + public string SellThingName { get; set; } + public decimal SellThingPrice { get; set; } + public string SellThingDescription { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/DeleteSellThingInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/DeleteSellThingInputDto.cs new file mode 100644 index 0000000..27337de --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/DeleteSellThingInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteSellThingInputDto: BaseInputDto + { + public int SellThingId { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/DeleteSellThingOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/DeleteSellThingOutputDto.cs new file mode 100644 index 0000000..376ab73 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/DeleteSellThingOutputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteSellThingOutputDto:BaseOutputDto + { + public int SellThingId { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingInputDto.cs new file mode 100644 index 0000000..bdb97b4 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadSellThingInputDto:ListInputDto + { + public int SellThingId { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingOutputDto.cs new file mode 100644 index 0000000..3a9dfbb --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingOutputDto.cs @@ -0,0 +1,12 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadSellThingOutputDto:BaseOutputDto + { + public int SellThingId { get; set; } + public string SellThingName { get; set; } + public decimal SellThingPrice { get; set; } + public string SellThingDescription { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/UpdateSellThingInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/UpdateSellThingInputDto.cs new file mode 100644 index 0000000..80355bc --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/UpdateSellThingInputDto.cs @@ -0,0 +1,12 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateSellThingInputDto: BaseInputDto + { + public int SellThingId { get; set; } + public string SellThingName { get; set; } + public decimal SellThingPrice { get; set; } + public string SellThingDescription { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/UpdateSellThingOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/UpdateSellThingOutputDto.cs new file mode 100644 index 0000000..8b94525 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/UpdateSellThingOutputDto.cs @@ -0,0 +1,12 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateSellThingOutputDto:BaseOutputDto + { + public int SellThingId { get; set; } + public string SellThingName { get; set; } + public decimal SellThingPrice { get; set; } + public string SellThingDescription { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/CreateSpendInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/CreateSpendInputDto.cs new file mode 100644 index 0000000..0476a0e --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/CreateSpendInputDto.cs @@ -0,0 +1,15 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateSpendInputDto: BaseInputDto + { + public string RoomNumber { get; set; } + public string CustomerNumber { get; set; } + public string ProductName { get; set; } + public int ConsumptionQuantity { get; set; } + public decimal ProductPrice { get; set; } + public decimal ConsumptionAmount { get; set; } + public DateTime ConsumptionTime { get; set; } + public string SettlementStatus { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/CreateSpendOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/CreateSpendOutputDto.cs new file mode 100644 index 0000000..9d14abb --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/CreateSpendOutputDto.cs @@ -0,0 +1,18 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateSpendOutputDto:BaseOutputDto + { + public string RoomNumber { get; set; } + public string CustomerNumber { get; set; } + public string ProductName { get; set; } + public int ConsumptionQuantity { get; set; } + public decimal ProductPrice { get; set; } + public string ProductPriceFormatted { get; set; } + public decimal ConsumptionAmount { get; set; } + public string ConsumptionAmountFormatted { get; set; } + public DateTime ConsumptionTime { get; set; } + public string SettlementStatus { get; set; } + public string SettlementStatusDescription { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/DeleteSpendInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/DeleteSpendInputDto.cs new file mode 100644 index 0000000..adcf726 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/DeleteSpendInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteSpendInputDto: BaseInputDto + { + public string RoomNumber { get; set; } + public string CustomerNumber { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/DeleteSpendOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/DeleteSpendOutputDto.cs new file mode 100644 index 0000000..d4f43ba --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/DeleteSpendOutputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteSpendOutputDto:BaseOutputDto + { + public string RoomNumber { get; set; } + public string CustomerNumber { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendInputDto.cs new file mode 100644 index 0000000..8e60bf5 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadSpendInputDto:ListInputDto + { + public string RoomNumber { get; set; } + public string CustomerNumber { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendOutputDto.cs new file mode 100644 index 0000000..8e1b40e --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendOutputDto.cs @@ -0,0 +1,18 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadSpendOutputDto:BaseOutputDto + { + public string RoomNumber { get; set; } + public string CustomerNumber { get; set; } + public string ProductName { get; set; } + public int ConsumptionQuantity { get; set; } + public decimal ProductPrice { get; set; } + public string ProductPriceFormatted { get; set; } + public decimal ConsumptionAmount { get; set; } + public string ConsumptionAmountFormatted { get; set; } + public DateTime ConsumptionTime { get; set; } + public string SettlementStatus { get; set; } + public string SettlementStatusDescription { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/UpdateSpendInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/UpdateSpendInputDto.cs new file mode 100644 index 0000000..22b6972 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/UpdateSpendInputDto.cs @@ -0,0 +1,15 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateSpendInputDto: BaseInputDto + { + public string RoomNumber { get; set; } + public string CustomerNumber { get; set; } + public string ProductName { get; set; } + public int ConsumptionQuantity { get; set; } + public decimal ProductPrice { get; set; } + public decimal ConsumptionAmount { get; set; } + public DateTime ConsumptionTime { get; set; } + public string SettlementStatus { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/UpdateSpendOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/UpdateSpendOutputDto.cs new file mode 100644 index 0000000..245fff3 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/UpdateSpendOutputDto.cs @@ -0,0 +1,18 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateSpendOutputDto:BaseOutputDto + { + public string RoomNumber { get; set; } + public string CustomerNumber { get; set; } + public string ProductName { get; set; } + public int ConsumptionQuantity { get; set; } + public decimal ProductPrice { get; set; } + public string ProductPriceFormatted { get; set; } + public decimal ConsumptionAmount { get; set; } + public string ConsumptionAmountFormatted { get; set; } + public DateTime ConsumptionTime { get; set; } + public string SettlementStatus { get; set; } + public string SettlementStatusDescription { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/EOM.TSHotelManagement.Common.Contract.csproj b/EOM.TSHotelManagement.Common.Contract/EOM.TSHotelManagement.Common.Contract.csproj new file mode 100644 index 0000000..11c470e --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/EOM.TSHotelManagement.Common.Contract.csproj @@ -0,0 +1,26 @@ + + + + net8.0 + enable + enable + + + + + + + + + + + + + + + + + + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/CreateEmployeeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/CreateEmployeeInputDto.cs new file mode 100644 index 0000000..f0e13ad --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/CreateEmployeeInputDto.cs @@ -0,0 +1,15 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateEmployeeInputDto: BaseInputDto + { + public string EmployeeName { get; set; } + public string EmployeeGender { get; set; } + public DateTime DateOfBirth { get; set; } + public string Department { get; set; } + public string Position { get; set; } + public DateTime HireDate { get; set; } + public decimal Salary { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/CreateEmployeeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/CreateEmployeeOutputDto.cs new file mode 100644 index 0000000..3110c00 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/CreateEmployeeOutputDto.cs @@ -0,0 +1,16 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateEmployeeOutputDto:BaseOutputDto + { + public string EmployeeId { get; set; } + public string EmployeeName { get; set; } + public string EmployeeGender { get; set; } + public DateTime DateOfBirth { get; set; } + public string Department { get; set; } + public string Position { get; set; } + public DateTime HireDate { get; set; } + public decimal Salary { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/DeleteEmployeeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/DeleteEmployeeInputDto.cs new file mode 100644 index 0000000..8e55f70 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/DeleteEmployeeInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteEmployeeInputDto: BaseInputDto + { + public string EmployeeId { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/DeleteEmployeeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/DeleteEmployeeOutputDto.cs new file mode 100644 index 0000000..669ecb6 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/DeleteEmployeeOutputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteEmployeeOutputDto:BaseOutputDto + { + public string EmployeeId { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeInputDto.cs new file mode 100644 index 0000000..8709d13 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadEmployeeInputDto:ListInputDto + { + public string EmployeeId { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/UpdateEmployeeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/UpdateEmployeeInputDto.cs new file mode 100644 index 0000000..99d19f1 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/UpdateEmployeeInputDto.cs @@ -0,0 +1,16 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateEmployeeInputDto: BaseInputDto + { + public string EmployeeId { get; set; } + public string EmployeeName { get; set; } + public string EmployeeGender { get; set; } + public DateTime DateOfBirth { get; set; } + public string Department { get; set; } + public string Position { get; set; } + public DateTime HireDate { get; set; } + public decimal Salary { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/UpdateEmployeeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/UpdateEmployeeOutputDto.cs new file mode 100644 index 0000000..61914fc --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/UpdateEmployeeOutputDto.cs @@ -0,0 +1,16 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateEmployeeOutputDto:BaseOutputDto + { + public string EmployeeId { get; set; } + public string EmployeeName { get; set; } + public string EmployeeGender { get; set; } + public DateTime DateOfBirth { get; set; } + public string Department { get; set; } + public string Position { get; set; } + public DateTime HireDate { get; set; } + public decimal Salary { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/CreateEmployeeCheckInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/CreateEmployeeCheckInputDto.cs new file mode 100644 index 0000000..2e1b963 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/CreateEmployeeCheckInputDto.cs @@ -0,0 +1,11 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateEmployeeCheckInputDto: BaseInputDto + { + public string EmployeeId { get; set; } + public DateTime CheckDate { get; set; } + public string CheckStatus { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/CreateEmployeeCheckOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/CreateEmployeeCheckOutputDto.cs new file mode 100644 index 0000000..c77b8f2 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/CreateEmployeeCheckOutputDto.cs @@ -0,0 +1,12 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateEmployeeCheckOutputDto:BaseOutputDto + { + public int CheckId { get; set; } + public string EmployeeId { get; set; } + public DateTime CheckDate { get; set; } + public string CheckStatus { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/DeleteEmployeeCheckInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/DeleteEmployeeCheckInputDto.cs new file mode 100644 index 0000000..86924e6 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/DeleteEmployeeCheckInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteEmployeeCheckInputDto: BaseInputDto + { + public int CheckId { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/DeleteEmployeeCheckOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/DeleteEmployeeCheckOutputDto.cs new file mode 100644 index 0000000..98f4078 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/DeleteEmployeeCheckOutputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteEmployeeCheckOutputDto:BaseOutputDto + { + public int CheckId { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckInputDto.cs new file mode 100644 index 0000000..1d71f6e --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadEmployeeCheckInputDto:ListInputDto + { + public int CheckId { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckOutputDto.cs new file mode 100644 index 0000000..abb30e6 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckOutputDto.cs @@ -0,0 +1,12 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadEmployeeCheckOutputDto:BaseOutputDto + { + public int CheckId { get; set; } + public string EmployeeId { get; set; } + public DateTime CheckDate { get; set; } + public string CheckStatus { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/UpdateEmployeeCheckInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/UpdateEmployeeCheckInputDto.cs new file mode 100644 index 0000000..2ffb398 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/UpdateEmployeeCheckInputDto.cs @@ -0,0 +1,12 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateEmployeeCheckInputDto: BaseInputDto + { + public int CheckId { get; set; } + public string EmployeeId { get; set; } + public DateTime CheckDate { get; set; } + public string CheckStatus { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/UpdateEmployeeCheckOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/UpdateEmployeeCheckOutputDto.cs new file mode 100644 index 0000000..a014273 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/UpdateEmployeeCheckOutputDto.cs @@ -0,0 +1,12 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateEmployeeCheckOutputDto:BaseOutputDto + { + public int CheckId { get; set; } + public string EmployeeId { get; set; } + public DateTime CheckDate { get; set; } + public string CheckStatus { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/CreateEmployeeHistoryInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/CreateEmployeeHistoryInputDto.cs new file mode 100644 index 0000000..d3e2aa6 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/CreateEmployeeHistoryInputDto.cs @@ -0,0 +1,12 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateEmployeeHistoryInputDto: BaseInputDto + { + public string EmployeeId { get; set; } + public DateTime ChangeDate { get; set; } + public string ChangeType { get; set; } + public string ChangeDescription { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/CreateEmployeeHistoryOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/CreateEmployeeHistoryOutputDto.cs new file mode 100644 index 0000000..a135215 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/CreateEmployeeHistoryOutputDto.cs @@ -0,0 +1,13 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateEmployeeHistoryOutputDto:BaseOutputDto + { + public int HistoryId { get; set; } + public string EmployeeId { get; set; } + public DateTime ChangeDate { get; set; } + public string ChangeType { get; set; } + public string ChangeDescription { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/DeleteEmployeeHistoryInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/DeleteEmployeeHistoryInputDto.cs new file mode 100644 index 0000000..efe9170 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/DeleteEmployeeHistoryInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteEmployeeHistoryInputDto: BaseInputDto + { + public int HistoryId { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/DeleteEmployeeHistoryOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/DeleteEmployeeHistoryOutputDto.cs new file mode 100644 index 0000000..f1bd9fe --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/DeleteEmployeeHistoryOutputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteEmployeeHistoryOutputDto:BaseOutputDto + { + public int HistoryId { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryInputDto.cs new file mode 100644 index 0000000..dfb5070 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadEmployeeHistoryInputDto:ListInputDto + { + public int HistoryId { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryOutputDto.cs new file mode 100644 index 0000000..5193b28 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryOutputDto.cs @@ -0,0 +1,13 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadEmployeeHistoryOutputDto:BaseOutputDto + { + public int HistoryId { get; set; } + public string EmployeeId { get; set; } + public DateTime ChangeDate { get; set; } + public string ChangeType { get; set; } + public string ChangeDescription { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/UpdateEmployeeHistoryInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/UpdateEmployeeHistoryInputDto.cs new file mode 100644 index 0000000..b8fb583 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/UpdateEmployeeHistoryInputDto.cs @@ -0,0 +1,13 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateEmployeeHistoryInputDto: BaseInputDto + { + public int HistoryId { get; set; } + public string EmployeeId { get; set; } + public DateTime ChangeDate { get; set; } + public string ChangeType { get; set; } + public string ChangeDescription { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/UpdateEmployeeHistoryOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/UpdateEmployeeHistoryOutputDto.cs new file mode 100644 index 0000000..bf16023 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/UpdateEmployeeHistoryOutputDto.cs @@ -0,0 +1,13 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateEmployeeHistoryOutputDto:BaseOutputDto + { + public int HistoryId { get; set; } + public string EmployeeId { get; set; } + public DateTime ChangeDate { get; set; } + public string ChangeType { get; set; } + public string ChangeDescription { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/CreateEmployeePhotoInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/CreateEmployeePhotoInputDto.cs new file mode 100644 index 0000000..c92e2b0 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/CreateEmployeePhotoInputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateEmployeePhotoInputDto: BaseInputDto + { + public string EmployeeId { get; set; } + public string PhotoUrl { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/CreateEmployeePhotoOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/CreateEmployeePhotoOutputDto.cs new file mode 100644 index 0000000..c1d79af --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/CreateEmployeePhotoOutputDto.cs @@ -0,0 +1,11 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateEmployeePhotoOutputDto:BaseOutputDto + { + public int PhotoId { get; set; } + public string EmployeeId { get; set; } + public string PhotoUrl { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/DeleteEmployeePhotoInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/DeleteEmployeePhotoInputDto.cs new file mode 100644 index 0000000..727c5fc --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/DeleteEmployeePhotoInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteEmployeePhotoInputDto:ListInputDto + { + public int PhotoId { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/DeleteEmployeePhotoOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/DeleteEmployeePhotoOutputDto.cs new file mode 100644 index 0000000..0a9d63d --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/DeleteEmployeePhotoOutputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteEmployeePhotoOutputDto:BaseOutputDto + { + public int PhotoId { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoInputDto.cs new file mode 100644 index 0000000..b790a0d --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadEmployeePhotoInputDto:ListInputDto + { + public int PhotoId { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoOutputDto.cs new file mode 100644 index 0000000..b2f0be4 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoOutputDto.cs @@ -0,0 +1,11 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadEmployeePhotoOutputDto:BaseOutputDto + { + public int PhotoId { get; set; } + public string EmployeeId { get; set; } + public string PhotoUrl { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/UpdateEmployeePhotoInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/UpdateEmployeePhotoInputDto.cs new file mode 100644 index 0000000..63674ec --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/UpdateEmployeePhotoInputDto.cs @@ -0,0 +1,11 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateEmployeePhotoInputDto: BaseInputDto + { + public int PhotoId { get; set; } + public string EmployeeId { get; set; } + public string PhotoUrl { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/UpdateEmployeePhotoOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/UpdateEmployeePhotoOutputDto.cs new file mode 100644 index 0000000..746eb01 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/UpdateEmployeePhotoOutputDto.cs @@ -0,0 +1,11 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateEmployeePhotoOutputDto:BaseOutputDto + { + public int PhotoId { get; set; } + public string EmployeeId { get; set; } + public string PhotoUrl { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/CreateEmployeeRewardPunishmentInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/CreateEmployeeRewardPunishmentInputDto.cs new file mode 100644 index 0000000..f6142c2 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/CreateEmployeeRewardPunishmentInputDto.cs @@ -0,0 +1,12 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateEmployeeRewardPunishmentInputDto: BaseInputDto + { + public string EmployeeId { get; set; } + public DateTime RewardPunishmentDate { get; set; } + public string RewardPunishmentType { get; set; } + public string RewardPunishmentDescription { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/CreateEmployeeRewardPunishmentOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/CreateEmployeeRewardPunishmentOutputDto.cs new file mode 100644 index 0000000..f9ce434 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/CreateEmployeeRewardPunishmentOutputDto.cs @@ -0,0 +1,13 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateEmployeeRewardPunishmentOutputDto:BaseOutputDto + { + public int RewardPunishmentId { get; set; } + public string EmployeeId { get; set; } + public DateTime RewardPunishmentDate { get; set; } + public string RewardPunishmentType { get; set; } + public string RewardPunishmentDescription { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/DeleteEmployeeRewardPunishmentInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/DeleteEmployeeRewardPunishmentInputDto.cs new file mode 100644 index 0000000..3c2c937 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/DeleteEmployeeRewardPunishmentInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteEmployeeRewardPunishmentInputDto: BaseInputDto + { + public int RewardPunishmentId { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/DeleteEmployeeRewardPunishmentOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/DeleteEmployeeRewardPunishmentOutputDto.cs new file mode 100644 index 0000000..3ce0af1 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/DeleteEmployeeRewardPunishmentOutputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteEmployeeRewardPunishmentOutputDto:BaseOutputDto + { + public int RewardPunishmentId { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentInputDto.cs new file mode 100644 index 0000000..aba3237 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadEmployeeRewardPunishmentInputDto:ListInputDto + { + public int RewardPunishmentId { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentOutputDto.cs new file mode 100644 index 0000000..423d53f --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentOutputDto.cs @@ -0,0 +1,13 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadEmployeeRewardPunishmentOutputDto:BaseOutputDto + { + public int RewardPunishmentId { get; set; } + public string EmployeeId { get; set; } + public DateTime RewardPunishmentDate { get; set; } + public string RewardPunishmentType { get; set; } + public string RewardPunishmentDescription { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/UpdateEmployeeRewardPunishmentInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/UpdateEmployeeRewardPunishmentInputDto.cs new file mode 100644 index 0000000..6300a4f --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/UpdateEmployeeRewardPunishmentInputDto.cs @@ -0,0 +1,13 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateEmployeeRewardPunishmentInputDto: BaseInputDto + { + public int RewardPunishmentId { get; set; } + public string EmployeeId { get; set; } + public DateTime RewardPunishmentDate { get; set; } + public string RewardPunishmentType { get; set; } + public string RewardPunishmentDescription { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/UpdateEmployeeRewardPunishmentOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/UpdateEmployeeRewardPunishmentOutputDto.cs new file mode 100644 index 0000000..13bf22a --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/UpdateEmployeeRewardPunishmentOutputDto.cs @@ -0,0 +1,13 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateEmployeeRewardPunishmentOutputDto:BaseOutputDto + { + public int RewardPunishmentId { get; set; } + public string EmployeeId { get; set; } + public DateTime RewardPunishmentDate { get; set; } + public string RewardPunishmentType { get; set; } + public string RewardPunishmentDescription { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/CreateRewardPunishmentTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/CreateRewardPunishmentTypeInputDto.cs new file mode 100644 index 0000000..d8f8673 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/CreateRewardPunishmentTypeInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateGBTypeInputDto: BaseInputDto + { + public string GBTypeName { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/CreateRewardPunishmentTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/CreateRewardPunishmentTypeOutputDto.cs new file mode 100644 index 0000000..cf5ff6b --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/CreateRewardPunishmentTypeOutputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateGBTypeOutputDto:BaseOutputDto + { + public int GBTypeId { get; set; } + public string GBTypeName { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/DeleteRewardPunishmentTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/DeleteRewardPunishmentTypeInputDto.cs new file mode 100644 index 0000000..6d36420 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/DeleteRewardPunishmentTypeInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteGBTypeInputDto: BaseInputDto + { + public int GBTypeId { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/DeleteRewardPunishmentTypeeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/DeleteRewardPunishmentTypeeOutputDto.cs new file mode 100644 index 0000000..18e0e4e --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/DeleteRewardPunishmentTypeeOutputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteGBTypeOutputDto:BaseOutputDto + { + public int GBTypeId { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeInputDto.cs new file mode 100644 index 0000000..cae4925 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadGBTypeInputDto:ListInputDto + { + public int GBTypeId { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeOutputDto.cs new file mode 100644 index 0000000..6675911 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeOutputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadGBTypeOutputDto:BaseOutputDto + { + public int GBTypeId { get; set; } + public string GBTypeName { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/UpdateRewardPunishmentTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/UpdateRewardPunishmentTypeInputDto.cs new file mode 100644 index 0000000..d2e817c --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/UpdateRewardPunishmentTypeInputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateGBTypeInputDto: BaseInputDto + { + public int GBTypeId { get; set; } + public string GBTypeName { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/UpdateRewardPunishmentTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/UpdateRewardPunishmentTypeOutputDto.cs new file mode 100644 index 0000000..0f1d5f2 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/UpdateRewardPunishmentTypeOutputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateGBTypeOutputDto:BaseOutputDto + { + public int GBTypeId { get; set; } + public string GBTypeName { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/CreateNavBarInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/CreateNavBarInputDto.cs new file mode 100644 index 0000000..ddf66db --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/CreateNavBarInputDto.cs @@ -0,0 +1,12 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateNavBarInputDto: BaseInputDto + { + public string NavigationBarName { get; set; } + public int NavigationBarOrder { get; set; } + public string NavigationBarImage { get; set; } + public string NavigationBarEvent { get; set; } + public int MarginLeft { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/CreateNavBarOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/CreateNavBarOutputDto.cs new file mode 100644 index 0000000..2c17ebd --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/CreateNavBarOutputDto.cs @@ -0,0 +1,13 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateNavBarOutputDto:BaseOutputDto + { + public int NavigationBarId { get; set; } + public string NavigationBarName { get; set; } + public int NavigationBarOrder { get; set; } + public string NavigationBarImage { get; set; } + public string NavigationBarEvent { get; set; } + public int MarginLeft { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/DeleteNavBarInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/DeleteNavBarInputDto.cs new file mode 100644 index 0000000..d3fd5f9 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/DeleteNavBarInputDto.cs @@ -0,0 +1,8 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteNavBarInputDto: BaseInputDto + { + public int NavigationBarId { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/DeleteNavBarOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/DeleteNavBarOutputDto.cs new file mode 100644 index 0000000..c3b9df9 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/DeleteNavBarOutputDto.cs @@ -0,0 +1,8 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteNavBarOutputDto:BaseOutputDto + { + public int NavigationBarId { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/ReadNavBarInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/ReadNavBarInputDto.cs new file mode 100644 index 0000000..2188ae5 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/ReadNavBarInputDto.cs @@ -0,0 +1,8 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadNavBarInputDto:ListInputDto + { + public int NavigationBarId { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/ReadNavBarOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/ReadNavBarOutputDto.cs new file mode 100644 index 0000000..26d6815 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/ReadNavBarOutputDto.cs @@ -0,0 +1,13 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadNavBarOutputDto:BaseOutputDto + { + public int NavigationBarId { get; set; } + public string NavigationBarName { get; set; } + public int NavigationBarOrder { get; set; } + public string NavigationBarImage { get; set; } + public string NavigationBarEvent { get; set; } + public int MarginLeft { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/UpdateNavBarInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/UpdateNavBarInputDto.cs new file mode 100644 index 0000000..94ebad3 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/UpdateNavBarInputDto.cs @@ -0,0 +1,13 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateNavBarInputDto: BaseInputDto + { + public int NavigationBarId { get; set; } + public string NavigationBarName { get; set; } + public int NavigationBarOrder { get; set; } + public string NavigationBarImage { get; set; } + public string NavigationBarEvent { get; set; } + public int MarginLeft { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/UpdateNavBarOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/UpdateNavBarOutputDto.cs new file mode 100644 index 0000000..47d39ea --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/UpdateNavBarOutputDto.cs @@ -0,0 +1,13 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateNavBarOutputDto:BaseOutputDto + { + public int NavigationBarId { get; set; } + public string NavigationBarName { get; set; } + public int NavigationBarOrder { get; set; } + public string NavigationBarImage { get; set; } + public string NavigationBarEvent { get; set; } + public int MarginLeft { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/CreateApplicationVersionInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/CreateApplicationVersionInputDto.cs new file mode 100644 index 0000000..fadba28 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/CreateApplicationVersionInputDto.cs @@ -0,0 +1,12 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateApplicationVersionInputDto: BaseInputDto + { + public string VersionNumber { get; set; } + public string VersionDescription { get; set; } + public DateTime ReleaseDate { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/CreateApplicationVersionOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/CreateApplicationVersionOutputDto.cs new file mode 100644 index 0000000..f12ff7f --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/CreateApplicationVersionOutputDto.cs @@ -0,0 +1,13 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateApplicationVersionOutputDto:BaseOutputDto + { + public int VersionId { get; set; } + public string VersionNumber { get; set; } + public string VersionDescription { get; set; } + public DateTime ReleaseDate { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/DeleteApplicationVersionInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/DeleteApplicationVersionInputDto.cs new file mode 100644 index 0000000..123f57a --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/DeleteApplicationVersionInputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteApplicationVersionInputDto: BaseInputDto + { + public int VersionId { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/DeleteApplicationVersionOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/DeleteApplicationVersionOutputDto.cs new file mode 100644 index 0000000..526c20e --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/DeleteApplicationVersionOutputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteApplicationVersionOutputDto:BaseOutputDto + { + public int VersionId { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/ReadApplicationVersionInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/ReadApplicationVersionInputDto.cs new file mode 100644 index 0000000..50812a3 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/ReadApplicationVersionInputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadApplicationVersionInputDto:ListInputDto + { + public int VersionId { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/ReadApplicationVersionOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/ReadApplicationVersionOutputDto.cs new file mode 100644 index 0000000..302c708 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/ReadApplicationVersionOutputDto.cs @@ -0,0 +1,13 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadApplicationVersionOutputDto:BaseOutputDto + { + public int VersionId { get; set; } + public string VersionNumber { get; set; } + public string VersionDescription { get; set; } + public DateTime ReleaseDate { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/UpdateApplicationVersionInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/UpdateApplicationVersionInputDto.cs new file mode 100644 index 0000000..d3c7ce9 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/UpdateApplicationVersionInputDto.cs @@ -0,0 +1,13 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateApplicationVersionInputDto: BaseInputDto + { + public int VersionId { get; set; } + public string VersionNumber { get; set; } + public string VersionDescription { get; set; } + public DateTime ReleaseDate { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/UpdateApplicationVersionOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/UpdateApplicationVersionOutputDto.cs new file mode 100644 index 0000000..40026eb --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/UpdateApplicationVersionOutputDto.cs @@ -0,0 +1,13 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateApplicationVersionOutputDto:BaseOutputDto + { + public int VersionId { get; set; } + public string VersionNumber { get; set; } + public string VersionDescription { get; set; } + public DateTime ReleaseDate { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/CreateCardCodeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/CreateCardCodeInputDto.cs new file mode 100644 index 0000000..ac5a8cc --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/CreateCardCodeInputDto.cs @@ -0,0 +1,18 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateCardCodeInputDto:BaseInputDto + { + public long Id { get; set; } + + public string Province { get; set; } + + public string City { get; set; } + + public string District { get; set; } + + public string AreaCode { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/CreateCardCodeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/CreateCardCodeOutputDto.cs new file mode 100644 index 0000000..364bf66 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/CreateCardCodeOutputDto.cs @@ -0,0 +1,18 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateCardCodeOutputDto:BaseOutputDto + { + public long Id { get; set; } + + public string Province { get; set; } + + public string City { get; set; } + + public string District { get; set; } + + public string AreaCode { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/DeleteCardCodeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/DeleteCardCodeInputDto.cs new file mode 100644 index 0000000..e134e62 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/DeleteCardCodeInputDto.cs @@ -0,0 +1,18 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteCardCodeInputDto: BaseInputDto + { + public long Id { get; set; } + + public string Province { get; set; } + + public string City { get; set; } + + public string District { get; set; } + + public string AreaCode { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/DeleteCardCodeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/DeleteCardCodeOutputDto.cs new file mode 100644 index 0000000..fd65401 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/DeleteCardCodeOutputDto.cs @@ -0,0 +1,18 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteCardCodeOutputDto:BaseOutputDto + { + public long Id { get; set; } + + public string Province { get; set; } + + public string City { get; set; } + + public string District { get; set; } + + public string AreaCode { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/ReadCardCodeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/ReadCardCodeInputDto.cs new file mode 100644 index 0000000..7fc6cdb --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/ReadCardCodeInputDto.cs @@ -0,0 +1,18 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadCardCodeInputDto:ListInputDto + { + public long Id { get; set; } + + public string Province { get; set; } + + public string City { get; set; } + + public string District { get; set; } + + public string AreaCode { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/ReadCardCodeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/ReadCardCodeOutputDto.cs new file mode 100644 index 0000000..4cdd39e --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/ReadCardCodeOutputDto.cs @@ -0,0 +1,18 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadCardCodeOutputDto:BaseOutputDto + { + public long Id { get; set; } + + public string Province { get; set; } + + public string City { get; set; } + + public string District { get; set; } + + public string AreaCode { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/UpdateCardCodeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/UpdateCardCodeInputDto.cs new file mode 100644 index 0000000..8959e9c --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/UpdateCardCodeInputDto.cs @@ -0,0 +1,18 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateCardCodeInputDto: BaseInputDto + { + public long Id { get; set; } + + public string Province { get; set; } + + public string City { get; set; } + + public string District { get; set; } + + public string AreaCode { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/UpdateCardCodeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/UpdateCardCodeOutputDto.cs new file mode 100644 index 0000000..944f443 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/UpdateCardCodeOutputDto.cs @@ -0,0 +1,18 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateCardCodeOutputDto:BaseOutputDto + { + public long Id { get; set; } + + public string Province { get; set; } + + public string City { get; set; } + + public string District { get; set; } + + public string AreaCode { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/CreateOperationLogInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/CreateOperationLogInputDto.cs new file mode 100644 index 0000000..e97dcaf --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/CreateOperationLogInputDto.cs @@ -0,0 +1,15 @@ +using EOM.TSHotelManagement.Common.Core; + +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateOperationLogInputDto: BaseInputDto + { + public DateTime OperationTime { get; set; } + public string LogContent { get; set; } + public string OperationAccount { get; set; } + public LogLevel LogLevel { get; set; } + public string SoftwareVersion { get; set; } + public string LoginIpAddress { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/CreateOperationLogOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/CreateOperationLogOutputDto.cs new file mode 100644 index 0000000..fd14d9b --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/CreateOperationLogOutputDto.cs @@ -0,0 +1,17 @@ +using EOM.TSHotelManagement.Common.Core; + +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateOperationLogOutputDto:BaseOutputDto + { + public int OperationId { get; set; } + public DateTime OperationTime { get; set; } + public string LogContent { get; set; } + public string OperationAccount { get; set; } + public LogLevel LogLevel { get; set; } + public string SoftwareVersion { get; set; } + public string LoginIpAddress { get; set; } + public string LogLevelName { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/DeleteOperationLogInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/DeleteOperationLogInputDto.cs new file mode 100644 index 0000000..97fdd2d --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/DeleteOperationLogInputDto.cs @@ -0,0 +1,8 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteOperationLogInputDto: BaseInputDto + { + public int OperationId { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/DeleteOperationLogOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/DeleteOperationLogOutputDto.cs new file mode 100644 index 0000000..b96f945 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/DeleteOperationLogOutputDto.cs @@ -0,0 +1,8 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteOperationLogOutputDto:BaseOutputDto + { + public int OperationId { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogInputDto.cs new file mode 100644 index 0000000..9c06aa8 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogInputDto.cs @@ -0,0 +1,8 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadOperationLogInputDto:ListInputDto + { + public int OperationId { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogOutputDto.cs new file mode 100644 index 0000000..9a1cc10 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogOutputDto.cs @@ -0,0 +1,17 @@ +using EOM.TSHotelManagement.Common.Core; + +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadOperationLogOutputDto:BaseOutputDto + { + public int OperationId { get; set; } + public DateTime OperationTime { get; set; } + public string LogContent { get; set; } + public string OperationAccount { get; set; } + public LogLevel LogLevel { get; set; } + public string SoftwareVersion { get; set; } + public string LoginIpAddress { get; set; } + public string LogLevelName { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/UpdateOperationLogInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/UpdateOperationLogInputDto.cs new file mode 100644 index 0000000..29e0fff --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/UpdateOperationLogInputDto.cs @@ -0,0 +1,16 @@ +using EOM.TSHotelManagement.Common.Core; + +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateOperationLogInputDto: BaseInputDto + { + public int OperationId { get; set; } + public DateTime OperationTime { get; set; } + public string LogContent { get; set; } + public string OperationAccount { get; set; } + public LogLevel LogLevel { get; set; } + public string SoftwareVersion { get; set; } + public string LoginIpAddress { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/UpdateOperationLogOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/UpdateOperationLogOutputDto.cs new file mode 100644 index 0000000..dd3bd6d --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/UpdateOperationLogOutputDto.cs @@ -0,0 +1,17 @@ +using EOM.TSHotelManagement.Common.Core; + +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateOperationLogOutputDto:BaseOutputDto + { + public int OperationId { get; set; } + public DateTime OperationTime { get; set; } + public string LogContent { get; set; } + public string OperationAccount { get; set; } + public LogLevel LogLevel { get; set; } + public string SoftwareVersion { get; set; } + public string LoginIpAddress { get; set; } + public string LogLevelName { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/CreateAdministratorInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/CreateAdministratorInputDto.cs new file mode 100644 index 0000000..5f32f9b --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/CreateAdministratorInputDto.cs @@ -0,0 +1,13 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateAdministratorInputDto: BaseInputDto + { + public string Account { get; set; } + public string Password { get; set; } + public string Type { get; set; } + public string Name { get; set; } + public int IsSuperAdmin { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/CreateAdministratorOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/CreateAdministratorOutputDto.cs new file mode 100644 index 0000000..0c439fb --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/CreateAdministratorOutputDto.cs @@ -0,0 +1,14 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateAdministratorOutputDto:BaseOutputDto + { + public int Id { get; set; } + public string Account { get; set; } + public string Password { get; set; } + public string Type { get; set; } + public string Name { get; set; } + public int IsSuperAdmin { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/DeleteAdministratorInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/DeleteAdministratorInputDto.cs new file mode 100644 index 0000000..bc7de82 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/DeleteAdministratorInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteAdministratorInputDto: BaseInputDto + { + public int Id { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/DeleteAdministratorOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/DeleteAdministratorOutputDto.cs new file mode 100644 index 0000000..045824e --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/DeleteAdministratorOutputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteAdministratorOutputDto:BaseOutputDto + { + public int Id { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/ReadAdministratorInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/ReadAdministratorInputDto.cs new file mode 100644 index 0000000..015a61e --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/ReadAdministratorInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadAdministratorInputDto:ListInputDto + { + public int Id { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/ReadAdministratorOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/ReadAdministratorOutputDto.cs new file mode 100644 index 0000000..6b8e908 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/ReadAdministratorOutputDto.cs @@ -0,0 +1,14 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadAdministratorOutputDto:BaseOutputDto + { + public int Id { get; set; } + public string Account { get; set; } + public string Password { get; set; } + public string Type { get; set; } + public string Name { get; set; } + public int IsSuperAdmin { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/UpdateAdministratorInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/UpdateAdministratorInputDto.cs new file mode 100644 index 0000000..843d88d --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/UpdateAdministratorInputDto.cs @@ -0,0 +1,14 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateAdministratorInputDto: BaseInputDto + { + public int Id { get; set; } + public string Account { get; set; } + public string Password { get; set; } + public string Type { get; set; } + public string Name { get; set; } + public int IsSuperAdmin { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/UpdateAdministratorOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/UpdateAdministratorOutputDto.cs new file mode 100644 index 0000000..bed2e1f --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/UpdateAdministratorOutputDto.cs @@ -0,0 +1,14 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateAdministratorOutputDto:BaseOutputDto + { + public int Id { get; set; } + public string Account { get; set; } + public string Password { get; set; } + public string Type { get; set; } + public string Name { get; set; } + public int IsSuperAdmin { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/CreateAdministratorTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/CreateAdministratorTypeInputDto.cs new file mode 100644 index 0000000..7721184 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/CreateAdministratorTypeInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateAdministratorTypeInputDto: BaseInputDto + { + public string TypeId { get; set; } + public string TypeName { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/CreateAdministratorTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/CreateAdministratorTypeOutputDto.cs new file mode 100644 index 0000000..4587e2a --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/CreateAdministratorTypeOutputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateAdministratorTypeOutputDto:BaseOutputDto + { + public int Id { get; set; } + public string TypeId { get; set; } + public string TypeName { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/DeleteAdministratorTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/DeleteAdministratorTypeInputDto.cs new file mode 100644 index 0000000..8242519 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/DeleteAdministratorTypeInputDto.cs @@ -0,0 +1,8 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteAdministratorTypeInputDto: BaseInputDto + { + public int Id { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/DeleteAdministratorTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/DeleteAdministratorTypeOutputDto.cs new file mode 100644 index 0000000..96b7bda --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/DeleteAdministratorTypeOutputDto.cs @@ -0,0 +1,8 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteAdministratorTypeOutputDto:BaseOutputDto + { + public int Id { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/ReadAdministratorTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/ReadAdministratorTypeInputDto.cs new file mode 100644 index 0000000..28dd5e6 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/ReadAdministratorTypeInputDto.cs @@ -0,0 +1,8 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadAdministratorTypeInputDto:ListInputDto + { + public int Id { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/ReadAdministratorTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/ReadAdministratorTypeOutputDto.cs new file mode 100644 index 0000000..8ddc99c --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/ReadAdministratorTypeOutputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadAdministratorTypeOutputDto:BaseOutputDto + { + public int Id { get; set; } + public string TypeId { get; set; } + public string TypeName { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/UpdateAdministratorTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/UpdateAdministratorTypeInputDto.cs new file mode 100644 index 0000000..0714a4d --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/UpdateAdministratorTypeInputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateAdministratorTypeInputDto: BaseInputDto + { + public int Id { get; set; } + public string TypeId { get; set; } + public string TypeName { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/UpdateAdministratorTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/UpdateAdministratorTypeOutputDto.cs new file mode 100644 index 0000000..8ae9548 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/UpdateAdministratorTypeOutputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateAdministratorTypeOutputDto:BaseOutputDto + { + public int Id { get; set; } + public string TypeId { get; set; } + public string TypeName { get; set; } + } +} + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/CreateAppointmentNoticeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/CreateAppointmentNoticeInputDto.cs new file mode 100644 index 0000000..b34a3e9 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/CreateAppointmentNoticeInputDto.cs @@ -0,0 +1,11 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateAppointmentNoticeInputDto: BaseInputDto + { + public string NoticeTitle { get; set; } + public string NoticeContent { get; set; } + public DateTime NoticeDate { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/CreateAppointmentNoticeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/CreateAppointmentNoticeOutputDto.cs new file mode 100644 index 0000000..babdc57 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/CreateAppointmentNoticeOutputDto.cs @@ -0,0 +1,12 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateAppointmentNoticeOutputDto:BaseOutputDto + { + public string NoticeId { get; set; } + public string NoticeTitle { get; set; } + public string NoticeContent { get; set; } + public DateTime NoticeDate { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/DeleteAppointmentNoticeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/DeleteAppointmentNoticeInputDto.cs new file mode 100644 index 0000000..5eaafae --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/DeleteAppointmentNoticeInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteAppointmentNoticeInputDto: BaseInputDto + { + public string NoticeId { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/DeleteAppointmentNoticeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/DeleteAppointmentNoticeOutputDto.cs new file mode 100644 index 0000000..7ceb62f --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/DeleteAppointmentNoticeOutputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteAppointmentNoticeOutputDto:BaseOutputDto + { + public string NoticeId { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/ReadAppointmentNoticeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/ReadAppointmentNoticeInputDto.cs new file mode 100644 index 0000000..6414969 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/ReadAppointmentNoticeInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadAppointmentNoticeInputDto:ListInputDto + { + public string NoticeId { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/ReadAppointmentNoticeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/ReadAppointmentNoticeOutputDto.cs new file mode 100644 index 0000000..052700d --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/ReadAppointmentNoticeOutputDto.cs @@ -0,0 +1,12 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadAppointmentNoticeOutputDto:BaseOutputDto + { + public string NoticeId { get; set; } + public string NoticeTitle { get; set; } + public string NoticeContent { get; set; } + public DateTime NoticeDate { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/UpdateAppointmentNoticeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/UpdateAppointmentNoticeInputDto.cs new file mode 100644 index 0000000..930e121 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/UpdateAppointmentNoticeInputDto.cs @@ -0,0 +1,12 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateAppointmentNoticeInputDto: BaseInputDto + { + public string NoticeId { get; set; } + public string NoticeTitle { get; set; } + public string NoticeContent { get; set; } + public DateTime NoticeDate { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/UpdateAppointmentNoticeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/UpdateAppointmentNoticeOutputDto.cs new file mode 100644 index 0000000..b37426b --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/UpdateAppointmentNoticeOutputDto.cs @@ -0,0 +1,12 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateAppointmentNoticeOutputDto:BaseOutputDto + { + public string NoticeId { get; set; } + public string NoticeTitle { get; set; } + public string NoticeContent { get; set; } + public DateTime NoticeDate { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/CreateDepartmentInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/CreateDepartmentInputDto.cs new file mode 100644 index 0000000..5eff887 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/CreateDepartmentInputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateDepartmentInputDto: BaseInputDto + { + public string DepartmentName { get; set; } + public string DepartmentDescription { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/CreateDepartmentOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/CreateDepartmentOutputDto.cs new file mode 100644 index 0000000..73ffd25 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/CreateDepartmentOutputDto.cs @@ -0,0 +1,11 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateDepartmentOutputDto:BaseOutputDto + { + public int DepartmentId { get; set; } + public string DepartmentName { get; set; } + public string DepartmentDescription { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/DeleteDepartmentInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/DeleteDepartmentInputDto.cs new file mode 100644 index 0000000..177a283 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/DeleteDepartmentInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteDepartmentInputDto: BaseInputDto + { + public int DepartmentId { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/DeleteDepartmentOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/DeleteDepartmentOutputDto.cs new file mode 100644 index 0000000..2bf7a83 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/DeleteDepartmentOutputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteDepartmentOutputDto:BaseOutputDto + { + public int DepartmentId { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/ReadDepartmentInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/ReadDepartmentInputDto.cs new file mode 100644 index 0000000..9f548ab --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/ReadDepartmentInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadDepartmentInputDto:ListInputDto + { + public int DepartmentId { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/ReadDepartmentOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/ReadDepartmentOutputDto.cs new file mode 100644 index 0000000..db3cde0 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/ReadDepartmentOutputDto.cs @@ -0,0 +1,11 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadDepartmentOutputDto:BaseOutputDto + { + public int DepartmentId { get; set; } + public string DepartmentName { get; set; } + public string DepartmentDescription { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/UpdateDepartmentInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/UpdateDepartmentInputDto.cs new file mode 100644 index 0000000..175f108 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/UpdateDepartmentInputDto.cs @@ -0,0 +1,11 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateDepartmentInputDto: BaseInputDto + { + public int DepartmentId { get; set; } + public string DepartmentName { get; set; } + public string DepartmentDescription { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/UpdateDepartmentOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/UpdateDepartmentOutputDto.cs new file mode 100644 index 0000000..46cf3bb --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/UpdateDepartmentOutputDto.cs @@ -0,0 +1,11 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateDepartmentOutputDto:BaseOutputDto + { + public int DepartmentId { get; set; } + public string DepartmentName { get; set; } + public string DepartmentDescription { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/CreateMenuInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/CreateMenuInputDto.cs new file mode 100644 index 0000000..64cfc38 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/CreateMenuInputDto.cs @@ -0,0 +1,12 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateMenuInputDto: BaseInputDto + { + public string Key { get; set; } + public string Title { get; set; } + public string Path { get; set; } + public int? Parent { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/CreateMenuOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/CreateMenuOutputDto.cs new file mode 100644 index 0000000..1c43682 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/CreateMenuOutputDto.cs @@ -0,0 +1,13 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateMenuOutputDto:BaseOutputDto + { + public int Id { get; set; } + public string Key { get; set; } + public string Title { get; set; } + public string Path { get; set; } + public int? Parent { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/DeleteMenuInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/DeleteMenuInputDto.cs new file mode 100644 index 0000000..316b62c --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/DeleteMenuInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteMenuInputDto: BaseInputDto + { + public int Id { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/DeleteMenuOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/DeleteMenuOutputDto.cs new file mode 100644 index 0000000..fa2eca7 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/DeleteMenuOutputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteMenuOutputDto:BaseOutputDto + { + public int Id { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/MenuViewModel.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/MenuViewModel.cs new file mode 100644 index 0000000..d5c5bb9 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/MenuViewModel.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EOM.TSHotelManagement.Common.Contract.Menu +{ + /// + /// 菜单视图模型 (Menu View Model) + /// + public class MenuViewModel + { + /// + /// 菜单主键 (Menu Key) + /// + public string Key { get; set; } + + /// + /// 菜单标题 (Menu Title) + /// + public string Title { get; set; } + + /// + /// 菜单路径 (Menu Path) + /// + public string Path { get; set; } + + /// + /// 子菜单 (Child Menus) + /// + public List Children { get; set; } = new List(); + } +} diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/ModuleConsts.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/ModuleConsts.cs new file mode 100644 index 0000000..11a2df1 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/ModuleConsts.cs @@ -0,0 +1,73 @@ +/* + * MIT License + *Copyright (c) 2021 易开元(Easy-Open-Meta) + + *Permission is hereby granted, free of charge, to any person obtaining a copy + *of this software and associated documentation files (the "Software"), to deal + *in the Software without restriction, including without limitation the rights + *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + *copies of the Software, and to permit persons to whom the Software is + *furnished to do so, subject to the following conditions: + + *The above copyright notice and this permission notice shall be included in all + *copies or substantial portions of the Software. + + *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + *SOFTWARE. + * + *模块说明:系统模块常量类 + */ +namespace EOM.TSHotelManagement.Common.Contract.Menu +{ + /// + /// 系统模块常量类 + /// + public class ModuleConsts + { + /// + /// 基础信息 + /// + public const string BaseInfo = "BaseInfo"; + /// + /// 财务信息 + /// + public const string CashInfo = "CashInfo"; + /// + /// 水电管理 + /// + public const string WtiInfo = "WtiInfo"; + /// + /// 监管统计 + /// + public const string SupervisionStatistics = "SupervisionStatistics"; + /// + /// 客房管理 + /// + public const string RoomManager = "RoomManager"; + /// + /// 客户管理 + /// + public const string CustomerManager = "CustomerManager"; + /// + /// 人事管理 + /// + public const string HumanResourcesManager = "HumanResourcesManager"; + /// + /// 物资管理 + /// + public const string MaterialManager = "MaterialManager"; + /// + /// 员工操作日志 + /// + public const string OperationLogManager = "OperationLogManager"; + /// + /// 系统管理 + /// + public const string AdminManager = "AdminManager"; + } +} diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/ReadMenuInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/ReadMenuInputDto.cs new file mode 100644 index 0000000..74cdff0 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/ReadMenuInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadMenuInputDto:ListInputDto + { + public int Id { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/ReadMenuOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/ReadMenuOutputDto.cs new file mode 100644 index 0000000..f98293c --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/ReadMenuOutputDto.cs @@ -0,0 +1,13 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadMenuOutputDto:BaseOutputDto + { + public int Id { get; set; } + public string Key { get; set; } + public string Title { get; set; } + public string Path { get; set; } + public int? Parent { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/UpdateMenuInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/UpdateMenuInputDto.cs new file mode 100644 index 0000000..9878b3e --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/UpdateMenuInputDto.cs @@ -0,0 +1,13 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateMenuInputDto: BaseInputDto + { + public int Id { get; set; } + public string Key { get; set; } + public string Title { get; set; } + public string Path { get; set; } + public int? Parent { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/UpdateMenuOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/UpdateMenuOutputDto.cs new file mode 100644 index 0000000..a22ccee --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/UpdateMenuOutputDto.cs @@ -0,0 +1,13 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateMenuOutputDto:BaseOutputDto + { + public int Id { get; set; } + public string Key { get; set; } + public string Title { get; set; } + public string Path { get; set; } + public int? Parent { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/CreateModuleInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/CreateModuleInputDto.cs new file mode 100644 index 0000000..634950e --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/CreateModuleInputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateModuleInputDto: BaseInputDto + { + public string ModuleName { get; set; } + public string ModuleDescription { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/CreateModuleOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/CreateModuleOutputDto.cs new file mode 100644 index 0000000..ebfeac6 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/CreateModuleOutputDto.cs @@ -0,0 +1,11 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateModuleOutputDto:BaseOutputDto + { + public int ModuleId { get; set; } + public string ModuleName { get; set; } + public string ModuleDescription { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/DeleteModuleInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/DeleteModuleInputDto.cs new file mode 100644 index 0000000..a3e3381 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/DeleteModuleInputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteModuleInputDto: BaseInputDto + { + public int ModuleId { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/DeleteModuleOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/DeleteModuleOutputDto.cs new file mode 100644 index 0000000..d116958 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/DeleteModuleOutputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteModuleOutputDto:BaseOutputDto + { + public int ModuleId { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/ReadModuleInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/ReadModuleInputDto.cs new file mode 100644 index 0000000..f96c696 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/ReadModuleInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadModuleInputDto:ListInputDto + { + public int ModuleId { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/ReadModuleOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/ReadModuleOutputDto.cs new file mode 100644 index 0000000..0a5727d --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/ReadModuleOutputDto.cs @@ -0,0 +1,11 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadModuleOutputDto:BaseOutputDto + { + public int ModuleId { get; set; } + public string ModuleName { get; set; } + public string ModuleDescription { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/UpdateModuleInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/UpdateModuleInputDto.cs new file mode 100644 index 0000000..1e69b29 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/UpdateModuleInputDto.cs @@ -0,0 +1,12 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateModuleInputDto: BaseInputDto + { + public int ModuleId { get; set; } + public string ModuleName { get; set; } + public string ModuleDescription { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/UpdateModuleOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/UpdateModuleOutputDto.cs new file mode 100644 index 0000000..61b015f --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/UpdateModuleOutputDto.cs @@ -0,0 +1,12 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateModuleOutputDto:BaseOutputDto + { + public int ModuleId { get; set; } + public string ModuleName { get; set; } + public string ModuleDescription { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/CreateModulePermissionInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/CreateModulePermissionInputDto.cs new file mode 100644 index 0000000..6798706 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/CreateModulePermissionInputDto.cs @@ -0,0 +1,12 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateModulePermissionInputDto: BaseInputDto + { + public int ModuleId { get; set; } + public string PermissionName { get; set; } + public string PermissionDescription { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/CreateModulePermissionOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/CreateModulePermissionOutputDto.cs new file mode 100644 index 0000000..a63cd2e --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/CreateModulePermissionOutputDto.cs @@ -0,0 +1,13 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateModulePermissionOutputDto:BaseOutputDto + { + public int PermissionId { get; set; } + public int ModuleId { get; set; } + public string PermissionName { get; set; } + public string PermissionDescription { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/DeleteModulePermissionInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/DeleteModulePermissionInputDto.cs new file mode 100644 index 0000000..9f18cd3 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/DeleteModulePermissionInputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteModulePermissionInputDto: BaseInputDto + { + public int PermissionId { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/DeleteModulePermissionOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/DeleteModulePermissionOutputDto.cs new file mode 100644 index 0000000..1ce8078 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/DeleteModulePermissionOutputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteModulePermissionOutputDto:BaseOutputDto + { + public int PermissionId { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/ReadModulePermissionInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/ReadModulePermissionInputDto.cs new file mode 100644 index 0000000..526fb6f --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/ReadModulePermissionInputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadModulePermissionInputDto:ListInputDto + { + public int PermissionId { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/ReadModulePermissionOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/ReadModulePermissionOutputDto.cs new file mode 100644 index 0000000..4312fca --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/ReadModulePermissionOutputDto.cs @@ -0,0 +1,13 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadModulePermissionOutputDto:BaseOutputDto + { + public int PermissionId { get; set; } + public int ModuleId { get; set; } + public string PermissionName { get; set; } + public string PermissionDescription { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/UpdateModulePermissionInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/UpdateModulePermissionInputDto.cs new file mode 100644 index 0000000..c306b90 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/UpdateModulePermissionInputDto.cs @@ -0,0 +1,13 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateModulePermissionInputDto: BaseInputDto + { + public int PermissionId { get; set; } + public int ModuleId { get; set; } + public string PermissionName { get; set; } + public string PermissionDescription { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/UpdateModulePermissionOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/UpdateModulePermissionOutputDto.cs new file mode 100644 index 0000000..8299276 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/UpdateModulePermissionOutputDto.cs @@ -0,0 +1,13 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateModulePermissionOutputDto:BaseOutputDto + { + public int PermissionId { get; set; } + public int ModuleId { get; set; } + public string PermissionName { get; set; } + public string PermissionDescription { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/CreateNationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/CreateNationInputDto.cs new file mode 100644 index 0000000..8d2655a --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/CreateNationInputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateNationInputDto: BaseInputDto + { + public string NationName { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/CreateNationOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/CreateNationOutputDto.cs new file mode 100644 index 0000000..6b721db --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/CreateNationOutputDto.cs @@ -0,0 +1,11 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateNationOutputDto:BaseOutputDto + { + public int NationId { get; set; } + public string NationName { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/DeleteNationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/DeleteNationInputDto.cs new file mode 100644 index 0000000..642783f --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/DeleteNationInputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteNationInputDto: BaseInputDto + { + public int NationId { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/DeleteNationOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/DeleteNationOutputDto.cs new file mode 100644 index 0000000..b2bd519 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/DeleteNationOutputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteNationOutputDto:BaseOutputDto + { + public int NationId { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/ReadNationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/ReadNationInputDto.cs new file mode 100644 index 0000000..61e0b14 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/ReadNationInputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadNationInputDto:ListInputDto + { + public int NationId { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/ReadNationOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/ReadNationOutputDto.cs new file mode 100644 index 0000000..74b16c4 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/ReadNationOutputDto.cs @@ -0,0 +1,11 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadNationOutputDto:BaseOutputDto + { + public int NationId { get; set; } + public string NationName { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/UpdateNationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/UpdateNationInputDto.cs new file mode 100644 index 0000000..6f80e42 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/UpdateNationInputDto.cs @@ -0,0 +1,11 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateNationInputDto: BaseInputDto + { + public int NationId { get; set; } + public string NationName { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/UpdateNationOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/UpdateNationOutputDto.cs new file mode 100644 index 0000000..3f93d3d --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/UpdateNationOutputDto.cs @@ -0,0 +1,11 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateNationOutputDto:BaseOutputDto + { + public int NationId { get; set; } + public string NationName { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/CreatePositionInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/CreatePositionInputDto.cs new file mode 100644 index 0000000..8d2ab36 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/CreatePositionInputDto.cs @@ -0,0 +1,11 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreatePositionInputDto: BaseInputDto + { + public string PositionName { get; set; } + public string PositionDescription { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/CreatePositionOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/CreatePositionOutputDto.cs new file mode 100644 index 0000000..c907311 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/CreatePositionOutputDto.cs @@ -0,0 +1,12 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreatePositionOutputDto:BaseOutputDto + { + public int PositionId { get; set; } + public string PositionName { get; set; } + public string PositionDescription { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/DeletePositionInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/DeletePositionInputDto.cs new file mode 100644 index 0000000..683be3b --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/DeletePositionInputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeletePositionInputDto: BaseInputDto + { + public int PositionId { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/DeletePositionOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/DeletePositionOutputDto.cs new file mode 100644 index 0000000..387b2c8 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/DeletePositionOutputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeletePositionOutputDto:BaseOutputDto + { + public int PositionId { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/ReadPositionInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/ReadPositionInputDto.cs new file mode 100644 index 0000000..1dfd61a --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/ReadPositionInputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadPositionInputDto:ListInputDto + { + public int PositionId { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/ReadPositionOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/ReadPositionOutputDto.cs new file mode 100644 index 0000000..261488f --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/ReadPositionOutputDto.cs @@ -0,0 +1,12 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadPositionOutputDto:BaseOutputDto + { + public int PositionId { get; set; } + public string PositionName { get; set; } + public string PositionDescription { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/UpdatePositionInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/UpdatePositionInputDto.cs new file mode 100644 index 0000000..9763452 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/UpdatePositionInputDto.cs @@ -0,0 +1,12 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdatePositionInputDto: BaseInputDto + { + public int PositionId { get; set; } + public string PositionName { get; set; } + public string PositionDescription { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/UpdatePositionOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/UpdatePositionOutputDto.cs new file mode 100644 index 0000000..6e1cce9 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/UpdatePositionOutputDto.cs @@ -0,0 +1,12 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdatePositionOutputDto:BaseOutputDto + { + public int PositionId { get; set; } + public string PositionName { get; set; } + public string PositionDescription { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/CreateEducationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/CreateEducationInputDto.cs new file mode 100644 index 0000000..9146b21 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/CreateEducationInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateEducationInputDto: BaseInputDto + { + public string EducationName { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/CreateQualificationOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/CreateQualificationOutputDto.cs new file mode 100644 index 0000000..1f2b260 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/CreateQualificationOutputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateEducationOutputDto:BaseOutputDto + { + public int EducationId { get; set; } + public string EducationName { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/DeleteEducationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/DeleteEducationInputDto.cs new file mode 100644 index 0000000..e7eb6ac --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/DeleteEducationInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteEducationInputDto: BaseInputDto + { + public int EducationId { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/DeleteEducationOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/DeleteEducationOutputDto.cs new file mode 100644 index 0000000..8fcb2f8 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/DeleteEducationOutputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteEducationOutputDto:BaseOutputDto + { + public int EducationId { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/ReadEducationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/ReadEducationInputDto.cs new file mode 100644 index 0000000..fbcfeb9 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/ReadEducationInputDto.cs @@ -0,0 +1,9 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadEducationInputDto:ListInputDto + { + public int EducationId { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/ReadEducationOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/ReadEducationOutputDto.cs new file mode 100644 index 0000000..194796b --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/ReadEducationOutputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadEducationOutputDto:BaseOutputDto + { + public int EducationId { get; set; } + public string EducationName { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/UpdateEducationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/UpdateEducationInputDto.cs new file mode 100644 index 0000000..52da1b8 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/UpdateEducationInputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateEducationInputDto: BaseInputDto + { + public int EducationId { get; set; } + public string EducationName { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/UpdateEducationOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/UpdateEducationOutputDto.cs new file mode 100644 index 0000000..69d07ce --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/UpdateEducationOutputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateEducationOutputDto:BaseOutputDto + { + public int EducationId { get; set; } + public string EducationName { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/CreateSupervisionStatisticsInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/CreateSupervisionStatisticsInputDto.cs new file mode 100644 index 0000000..5c04dc4 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/CreateSupervisionStatisticsInputDto.cs @@ -0,0 +1,11 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateSupervisionStatisticsInputDto: BaseInputDto + { + public string StatisticsName { get; set; } + public string StatisticsDescription { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/CreateSupervisionStatisticsOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/CreateSupervisionStatisticsOutputDto.cs new file mode 100644 index 0000000..e49d574 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/CreateSupervisionStatisticsOutputDto.cs @@ -0,0 +1,12 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateSupervisionStatisticsOutputDto:BaseOutputDto + { + public int StatisticsId { get; set; } + public string StatisticsName { get; set; } + public string StatisticsDescription { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/DeleteSupervisionStatisticsInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/DeleteSupervisionStatisticsInputDto.cs new file mode 100644 index 0000000..fd63130 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/DeleteSupervisionStatisticsInputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteSupervisionStatisticsInputDto: BaseInputDto + { + public int StatisticsId { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/DeleteSupervisionStatisticsOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/DeleteSupervisionStatisticsOutputDto.cs new file mode 100644 index 0000000..3c2298f --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/DeleteSupervisionStatisticsOutputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteSupervisionStatisticsOutputDto:BaseOutputDto + { + public int StatisticsId { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/ReadSupervisionStatisticsInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/ReadSupervisionStatisticsInputDto.cs new file mode 100644 index 0000000..a99e77d --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/ReadSupervisionStatisticsInputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadSupervisionStatisticsInputDto:ListInputDto + { + public int StatisticsId { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/ReadSupervisionStatisticsOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/ReadSupervisionStatisticsOutputDto.cs new file mode 100644 index 0000000..d0f54f6 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/ReadSupervisionStatisticsOutputDto.cs @@ -0,0 +1,12 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadSupervisionStatisticsOutputDto:BaseOutputDto + { + public int StatisticsId { get; set; } + public string StatisticsName { get; set; } + public string StatisticsDescription { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/UpdateSupervisionStatisticsInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/UpdateSupervisionStatisticsInputDto.cs new file mode 100644 index 0000000..7fe8ec6 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/UpdateSupervisionStatisticsInputDto.cs @@ -0,0 +1,12 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateSupervisionStatisticsInputDto: BaseInputDto + { + public int StatisticsId { get; set; } + public string StatisticsName { get; set; } + public string StatisticsDescription { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/UpdateSupervisionStatisticsOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/UpdateSupervisionStatisticsOutputDto.cs new file mode 100644 index 0000000..fa3e205 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/UpdateSupervisionStatisticsOutputDto.cs @@ -0,0 +1,12 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateSupervisionStatisticsOutputDto:BaseOutputDto + { + public int StatisticsId { get; set; } + public string StatisticsName { get; set; } + public string StatisticsDescription { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/CreateSystemInformationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/CreateSystemInformationInputDto.cs new file mode 100644 index 0000000..9cbc093 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/CreateSystemInformationInputDto.cs @@ -0,0 +1,12 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateSystemInformationInputDto: BaseInputDto + { + public string InformationTitle { get; set; } + public string InformationContent { get; set; } + public DateTime InformationDate { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/CreateSystemInformationOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/CreateSystemInformationOutputDto.cs new file mode 100644 index 0000000..9469750 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/CreateSystemInformationOutputDto.cs @@ -0,0 +1,13 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateSystemInformationOutputDto:BaseOutputDto + { + public int InformationId { get; set; } + public string InformationTitle { get; set; } + public string InformationContent { get; set; } + public DateTime InformationDate { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/DeleteSystemInformationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/DeleteSystemInformationInputDto.cs new file mode 100644 index 0000000..41f466b --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/DeleteSystemInformationInputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteSystemInformationInputDto: BaseInputDto + { + public int InformationId { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/DeleteSystemInformationOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/DeleteSystemInformationOutputDto.cs new file mode 100644 index 0000000..bc306d7 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/DeleteSystemInformationOutputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteSystemInformationOutputDto:BaseOutputDto + { + public int InformationId { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/ReadSystemInformationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/ReadSystemInformationInputDto.cs new file mode 100644 index 0000000..59c9316 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/ReadSystemInformationInputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadSystemInformationInputDto:ListInputDto + { + public int InformationId { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/ReadSystemInformationOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/ReadSystemInformationOutputDto.cs new file mode 100644 index 0000000..16cd677 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/ReadSystemInformationOutputDto.cs @@ -0,0 +1,13 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadSystemInformationOutputDto:BaseOutputDto + { + public int InformationId { get; set; } + public string InformationTitle { get; set; } + public string InformationContent { get; set; } + public DateTime InformationDate { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/UpdateSystemInformationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/UpdateSystemInformationInputDto.cs new file mode 100644 index 0000000..2c98104 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/UpdateSystemInformationInputDto.cs @@ -0,0 +1,13 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateSystemInformationInputDto: BaseInputDto + { + public int InformationId { get; set; } + public string InformationTitle { get; set; } + public string InformationContent { get; set; } + public DateTime InformationDate { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/UpdateSystemInformationOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/UpdateSystemInformationOutputDto.cs new file mode 100644 index 0000000..ac7f240 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/UpdateSystemInformationOutputDto.cs @@ -0,0 +1,13 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateSystemInformationOutputDto:BaseOutputDto + { + public int InformationId { get; set; } + public string InformationTitle { get; set; } + public string InformationContent { get; set; } + public DateTime InformationDate { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/CreateVipLevelRuleInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/CreateVipLevelRuleInputDto.cs new file mode 100644 index 0000000..df48193 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/CreateVipLevelRuleInputDto.cs @@ -0,0 +1,13 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateVipLevelRuleInputDto: BaseInputDto + { + public string RuleName { get; set; } + public string RuleDescription { get; set; } + public int Level { get; set; } + public decimal Discount { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/CreateVipLevelRuleOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/CreateVipLevelRuleOutputDto.cs new file mode 100644 index 0000000..ff49960 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/CreateVipLevelRuleOutputDto.cs @@ -0,0 +1,14 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateVipLevelRuleOutputDto:BaseOutputDto + { + public int RuleId { get; set; } + public string RuleName { get; set; } + public string RuleDescription { get; set; } + public int Level { get; set; } + public decimal Discount { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/DeleteVipLevelRuleInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/DeleteVipLevelRuleInputDto.cs new file mode 100644 index 0000000..bf73435 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/DeleteVipLevelRuleInputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteVipLevelRuleInputDto: BaseInputDto + { + public int RuleId { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/DeleteVipLevelRuleOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/DeleteVipLevelRuleOutputDto.cs new file mode 100644 index 0000000..3653c3d --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/DeleteVipLevelRuleOutputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteVipLevelRuleOutputDto:BaseOutputDto + { + public int RuleId { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/ReadVipLevelRuleInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/ReadVipLevelRuleInputDto.cs new file mode 100644 index 0000000..4c4626f --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/ReadVipLevelRuleInputDto.cs @@ -0,0 +1,10 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadVipLevelRuleInputDto:ListInputDto + { + public int RuleId { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/ReadVipLevelRuleOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/ReadVipLevelRuleOutputDto.cs new file mode 100644 index 0000000..83f6c72 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/ReadVipLevelRuleOutputDto.cs @@ -0,0 +1,14 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadVipLevelRuleOutputDto:BaseOutputDto + { + public int RuleId { get; set; } + public string RuleName { get; set; } + public string RuleDescription { get; set; } + public int Level { get; set; } + public decimal Discount { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/UpdateVipLevelRuleInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/UpdateVipLevelRuleInputDto.cs new file mode 100644 index 0000000..457b8eb --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/UpdateVipLevelRuleInputDto.cs @@ -0,0 +1,14 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateVipLevelRuleInputDto: BaseInputDto + { + public int RuleId { get; set; } + public string RuleName { get; set; } + public string RuleDescription { get; set; } + public int Level { get; set; } + public decimal Discount { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/UpdateVipLevelRuleOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/UpdateVipLevelRuleOutputDto.cs new file mode 100644 index 0000000..45a2381 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/UpdateVipLevelRuleOutputDto.cs @@ -0,0 +1,14 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateVipLevelRuleOutputDto:BaseOutputDto + { + public int RuleId { get; set; } + public string RuleName { get; set; } + public string RuleDescription { get; set; } + public int Level { get; set; } + public decimal Discount { get; set; } + } +} + + + diff --git a/EOM.TSHotelManagement.Common.Core/Business/Hydroelectricity/Hydroelectricity.cs b/EOM.TSHotelManagement.Common.Core/Business/Hydroelectricity/Hydroelectricity.cs index b3d690d..f863bea 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Hydroelectricity/Hydroelectricity.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Hydroelectricity/Hydroelectricity.cs @@ -30,7 +30,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 水电信息 /// [SqlSugar.SugarTable("wtinfo")] - public class Hydroelectricity : BaseDto + public class EnergyManagement : BaseDto { /// /// 信息编号 (Information ID) diff --git a/EOM.TSHotelManagement.Common.Util/EOM.TSHotelManagement.Common.Util.csproj b/EOM.TSHotelManagement.Common.Util/EOM.TSHotelManagement.Common.Util.csproj index 6468cee..c21f2bc 100644 --- a/EOM.TSHotelManagement.Common.Util/EOM.TSHotelManagement.Common.Util.csproj +++ b/EOM.TSHotelManagement.Common.Util/EOM.TSHotelManagement.Common.Util.csproj @@ -8,4 +8,12 @@ + + + + + + + + diff --git a/EOM.TSHotelManagement.Common.Util/Helper/EntityMapper.cs b/EOM.TSHotelManagement.Common.Util/Helper/EntityMapper.cs new file mode 100644 index 0000000..d2e68b9 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Util/Helper/EntityMapper.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +namespace EOM.TSHotelManagement.Common.Util +{ + public static class EntityMapper + { + /// + /// ӳ䵥ʵ + /// + /// Դ + /// Ŀ + /// Դ + /// Ŀ + public static TDestination Map(TSource source) + where TDestination : new() + { + if (source == null) + { + return default; + } + + var destination = new TDestination(); + var sourceProperties = typeof(TSource).GetProperties(); + var destinationProperties = typeof(TDestination).GetProperties(); + + foreach (var sourceProperty in sourceProperties) + { + var destinationProperty = destinationProperties.FirstOrDefault(p => string.Equals(p.Name, sourceProperty.Name, StringComparison.OrdinalIgnoreCase)); + if (destinationProperty != null && destinationProperty.CanWrite) + { + var sourceValue = sourceProperty.GetValue(source); + if (sourceValue != null && destinationProperty.PropertyType != sourceProperty.PropertyType) + { + sourceValue = Convert.ChangeType(sourceValue, Nullable.GetUnderlyingType(destinationProperty.PropertyType) ?? destinationProperty.PropertyType); + } + destinationProperty.SetValue(destination, sourceValue); + } + } + + return destination; + } + + /// + /// ӳʵб + /// + /// Դ + /// Ŀ + /// Դб + /// Ŀб + public static List MapList(List sourceList) + where TDestination : new() + { + if (sourceList == null) + { + return null; + } + + return sourceList.Select(Map).ToList(); + } + } +} diff --git a/EOM.TSHotelManagement.Common.Util/Helper/LocalizationHelper.cs b/EOM.TSHotelManagement.Common.Util/Helper/LocalizationHelper.cs new file mode 100644 index 0000000..8dba168 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Util/Helper/LocalizationHelper.cs @@ -0,0 +1,30 @@ +using System; +using System.Globalization; + +namespace EOM.TSHotelManagement.Common.Util +{ + public static class LocalizationHelper + { + /// + /// ȡػַ + /// + /// Ӣı + /// ı + /// ݵǰĻӦı + public static string GetLocalizedString(string englishText, string chineseText) + { + var culture = CultureInfo.CurrentCulture.Name; + return culture.StartsWith("zh", StringComparison.OrdinalIgnoreCase) ? chineseText : englishText; + } + + /// + /// õǰĻ + /// + /// Ļ + public static void SetCulture(string culture) + { + CultureInfo.CurrentCulture = new CultureInfo(culture); + CultureInfo.CurrentUICulture = new CultureInfo(culture); + } + } +} diff --git a/EOM.TSHotelManagement.Common.Util/Helper/LogHelper.cs b/EOM.TSHotelManagement.Common.Util/Helper/LogHelper.cs new file mode 100644 index 0000000..6f2793f --- /dev/null +++ b/EOM.TSHotelManagement.Common.Util/Helper/LogHelper.cs @@ -0,0 +1,44 @@ +using System; +using System.IO; + +namespace EOM.TSHotelManagement.Common.Util +{ + public static class LogHelper + { + private static readonly string logFilePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Logs", "ErrorLog.txt"); + + static LogHelper() + { + var logDirectory = Path.GetDirectoryName(logFilePath); + if (!Directory.Exists(logDirectory)) + { + Directory.CreateDirectory(logDirectory); + } + } + + /// + /// ¼CRUD־ + /// + /// Ϣ + /// 쳣 + public static void LogError(string message, Exception exception) + { + try + { + using (StreamWriter writer = new StreamWriter(logFilePath, true)) + { + writer.WriteLine("--------------------------------------------------"); + writer.WriteLine($"ʱ: {DateTime.Now}"); + writer.WriteLine($"Ϣ: {message}"); + writer.WriteLine($"쳣: {exception}"); + writer.WriteLine("--------------------------------------------------"); + writer.WriteLine(); + } + } + catch (Exception ex) + { + Console.WriteLine($"¼־ʱ쳣: {ex}"); + } + } + } +} diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Cash/CashController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Business/Asset/AssetController.cs similarity index 53% rename from EOM.TSHotelManagement.WebApi/Controllers/Business/Cash/CashController.cs rename to EOM.TSHotelManagement.WebApi/Controllers/Business/Asset/AssetController.cs index f932599..9be1f74 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Cash/CashController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Business/Asset/AssetController.cs @@ -1,4 +1,5 @@ using EOM.TSHotelManagement.Application; +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; using Microsoft.AspNetCore.Mvc; using System.Collections.Generic; @@ -8,31 +9,31 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// 资产信息控制器 /// - public class CashController : ControllerBase + public class AssetController : ControllerBase { /// /// 资产信息 /// - private readonly ICashService cashService; + private readonly IAssetService assetService; /// /// /// - /// - public CashController(ICashService cashService) + /// + public AssetController(IAssetService assetService) { - this.cashService = cashService; + this.assetService = assetService; } /// /// 添加资产信息 /// - /// + /// /// [HttpPost] - public bool AddCashInfo([FromBody] Asset cash) + public bool AddAssetInfo([FromBody] Asset asset) { - return cashService.AddCashInfo(cash); + return assetService.AddAssetInfo(asset); } /// @@ -40,31 +41,31 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public List SelectCashInfoAll() + public ListOutputDto SelectAssetInfoAll([FromQuery] Asset asset) { - return cashService.SelectCashInfoAll(); + return assetService.SelectAssetInfoAll(asset); } /// /// 更新资产信息 /// - /// + /// /// [HttpPost] - public bool UpdCashInfo([FromBody]Asset cash) + public bool UpdAssetInfo([FromBody]Asset asset) { - return cashService.UpdCashInfo(cash); + return assetService.UpdAssetInfo(asset); } /// /// 删除资产信息 /// - /// + /// /// [HttpPost] - public bool DelCashInfo([FromBody]Asset cash) + public bool DelAssetInfo([FromBody]Asset asset) { - return cashService.DelCashInfo(cash); + return assetService.DelAssetInfo(asset); } } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Customer/CustoController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Business/Customer/CustomerController.cs similarity index 61% rename from EOM.TSHotelManagement.WebApi/Controllers/Business/Customer/CustoController.cs rename to EOM.TSHotelManagement.WebApi/Controllers/Business/Customer/CustomerController.cs index d08cc64..3433a22 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Customer/CustoController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Business/Customer/CustomerController.cs @@ -1,4 +1,5 @@ using EOM.TSHotelManagement.Application; +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; using Microsoft.AspNetCore.Mvc; using System.Collections.Generic; @@ -8,18 +9,18 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// 用户信息控制器 /// - public class CustoController : ControllerBase + public class CustomerController : ControllerBase { /// /// 用户信息 /// - private readonly ICustoService customerService; + private readonly ICustomerService customerService; /// /// /// /// - public CustoController(ICustoService customerService) + public CustomerController(ICustomerService customerService) { this.customerService = customerService; } @@ -30,7 +31,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool InsertCustomerInfo([FromBody] Customer custo) + public BaseOutputDto InsertCustomerInfo([FromBody] CreateCustomerInputDto custo) { return customerService.InsertCustomerInfo(custo); } @@ -41,7 +42,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool UpdCustomerInfo([FromBody] Customer custo) + public BaseOutputDto UpdCustomerInfo([FromBody] UpdateCustomerInputDto custo) { return customerService.UpdCustomerInfo(custo); } @@ -52,7 +53,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool DelCustomerInfo([FromBody] Customer custo) + public BaseOutputDto DelCustomerInfo([FromBody] DeleteCustomerInputDto custo) { return customerService.DelCustomerInfo(custo); } @@ -60,17 +61,16 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// 更新客户类型(即会员等级) /// - /// - /// + /// /// - [HttpGet] - public bool UpdCustomerTypeByCustoNo([FromQuery] string custoNo, int userType) + [HttpPost] + public BaseOutputDto UpdCustomerTypeByCustoNo([FromBody]UpdateCustomerInputDto updateCustomerInputDto) { - return customerService.UpdCustomerTypeByCustoNo(custoNo, userType); + return customerService.UpdCustomerTypeByCustoNo(updateCustomerInputDto); } /// - /// 查询酒店盈利情况 + /// 查询酒店盈利情况(用于报表) /// /// [HttpGet] @@ -83,18 +83,18 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// 查询所有客户信息 /// /// - [HttpGet] - public OSelectAllDto SelectCustoAll([FromQuery] int pageIndex, int pageSize, bool onlyVip = false) - { - return customerService.SelectCustoAll(pageIndex, pageSize, onlyVip); - } + //[HttpGet] + //public ListOutputDto SelectCustoAll([FromQuery] int pageIndex, int pageSize, bool onlyVip = false) + //{ + // return customerService.SelectCustoAll(pageIndex, pageSize, onlyVip); + //} /// /// 查询所有客户信息 /// /// [HttpGet] - public OSelectAllDto SelectCustomers(Customer custo) + public ListOutputDto SelectCustomers(ReadCustomerInputDto custo) { return customerService.SelectCustomers(custo); } @@ -104,7 +104,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public List SelectCustoByInfo([FromBody] Customer custo) + public SingleOutputDto SelectCustoByInfo([FromBody] ReadCustomerInputDto custo) { return customerService.SelectCustoByInfo(custo); } @@ -114,11 +114,11 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// - [HttpGet] - public Customer SelectCardInfoByCustoNo([FromQuery] string CustoNo) - { - return customerService.SelectCardInfoByCustoNo(CustoNo); - } + //[HttpGet] + //public Customer SelectCardInfoByCustoNo([FromQuery] string CustoNo) + //{ + // return customerService.SelectCardInfoByCustoNo(CustoNo); + //} } } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Hydroelectricity/HydroelectricityController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Business/EnergyManagement/EnergyManagementController.cs similarity index 58% rename from EOM.TSHotelManagement.WebApi/Controllers/Business/Hydroelectricity/HydroelectricityController.cs rename to EOM.TSHotelManagement.WebApi/Controllers/Business/EnergyManagement/EnergyManagementController.cs index 905def7..e92dd00 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Hydroelectricity/HydroelectricityController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Business/EnergyManagement/EnergyManagementController.cs @@ -1,4 +1,5 @@ using EOM.TSHotelManagement.Application; +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; using Microsoft.AspNetCore.Mvc; using System; @@ -9,18 +10,18 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// 水电信息控制器 /// - public class HydroelectricityController : ControllerBase + public class EnergyManagementController : ControllerBase { /// /// 水电信息服务 /// - private readonly IHydroelectricityService hydroelectricPowerService; + private readonly IEnergyManagementService hydroelectricPowerService; /// /// 构造函数 /// /// - public HydroelectricityController(IHydroelectricityService hydroelectricPowerService) + public EnergyManagementController(IEnergyManagementService hydroelectricPowerService) { this.hydroelectricPowerService = hydroelectricPowerService; } @@ -29,14 +30,12 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// 根据条件查询水电费信息 /// 替换了 SelectWtiInfoByRoomNo, SelectWtiInfoByRoomNoAndTime, ListWtiInfoByRoomNo, SelectWtiInfoAll /// - /// 房间号(可选) - /// 使用开始时间(可选) - /// 使用结束时间(可选) + /// Dto /// 符合条件的水电费信息列表 [HttpGet] - public List SelectWtiInfo([FromQuery] string roomNo, [FromQuery] DateTime? useDate, [FromQuery] DateTime? endDate) + public ListOutputDto SelectEnergyManagementInfo([FromQuery]ReadEnergyManagementInputDto readEnergyManagementInputDto) { - return this.hydroelectricPowerService.SelectWtiInfo(roomNo, useDate, endDate); + return this.hydroelectricPowerService.SelectEnergyManagementInfo(readEnergyManagementInputDto); } /// @@ -46,9 +45,9 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool InsertWtiInfo([FromBody] Hydroelectricity w) + public BaseOutputDto InsertEnergyManagementInfo([FromBody] CreateEnergyManagementInputDto w) { - return this.hydroelectricPowerService.InsertWtiInfo(w); + return this.hydroelectricPowerService.InsertEnergyManagementInfo(w); } /// @@ -58,9 +57,9 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// 包含要修改的数据,以及WtiNo作为查询条件 /// [HttpPost] - public bool UpdateWtiInfo([FromBody] Hydroelectricity w) + public BaseOutputDto UpdateEnergyManagementInfo([FromBody] UpdateEnergyManagementInputDto w) { - return this.hydroelectricPowerService.UpdateWtiInfo(w); + return this.hydroelectricPowerService.UpdateEnergyManagementInfo(w); } @@ -68,14 +67,12 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// 根据房间编号、使用时间删除水电费信息 /// 替换了 DeleteWtiInfoByRoomNoAndDateTime /// - /// - /// - /// + /// /// [HttpPost] - public bool DeleteWtiInfo([FromBody] Hydroelectricity hydroelectricity) + public BaseOutputDto DeleteEnergyManagementInfo([FromBody] DeleteEnergyManagementInputDto deleteEnergyManagementInputDto) { - return this.hydroelectricPowerService.DeleteWtiInfo(hydroelectricity); + return this.hydroelectricPowerService.DeleteEnergyManagementInfo(deleteEnergyManagementInputDto); } } } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Fonts/FontsController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Business/PromotionContent/FontsController.cs similarity index 50% rename from EOM.TSHotelManagement.WebApi/Controllers/Business/Fonts/FontsController.cs rename to EOM.TSHotelManagement.WebApi/Controllers/Business/PromotionContent/FontsController.cs index bba815d..f1bfc6b 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Fonts/FontsController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Business/PromotionContent/FontsController.cs @@ -1,5 +1,7 @@ using EOM.TSHotelManagement.Application; +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Util; using Microsoft.AspNetCore.Mvc; using System.Collections.Generic; @@ -13,25 +15,35 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// 酒店宣传联动内容 /// - private readonly IFontsService fontsService; + private readonly IPromotionContentService fontsService; /// /// /// /// - public FontsController(IFontsService fontsService) + public FontsController(IPromotionContentService fontsService) { this.fontsService = fontsService; } + /// + /// 查询所有宣传联动内容 + /// + /// + [HttpGet] + public ListOutputDto SelectPromotionContentAll([FromQuery]ReadPromotionContentInputDto readPromotionContentInputDto) + { + return fontsService.SelectPromotionContentAll(readPromotionContentInputDto); + } + /// /// 查询所有宣传联动内容(跑马灯) /// /// [HttpGet] - public List SelectFontAll() + public ListOutputDto SelectPromotionContents() { - return fontsService.SelectFontAll(); + return fontsService.SelectPromotionContents(); } } } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Reser/ReserController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Business/Reser/ReserController.cs index e3b451a..e1e047f 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Reser/ReserController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Business/Reser/ReserController.cs @@ -1,4 +1,5 @@ using EOM.TSHotelManagement.Application; +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; using Microsoft.AspNetCore.Mvc; using System.Collections.Generic; @@ -29,9 +30,9 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public List SelectReserAll() + public ListOutputDto SelectReserAll(ReadReserInputDto readReserInputDto) { - return reserService.SelectReserAll(); + return reserService.SelectReserAll(readReserInputDto); } /// @@ -40,9 +41,9 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public Reser SelectReserInfoByRoomNo([FromQuery] string no) + public SingleOutputDto SelectReserInfoByRoomNo([FromQuery] ReadReserInputDto readReserInputDto) { - return reserService.SelectReserInfoByRoomNo(no); + return reserService.SelectReserInfoByRoomNo(readReserInputDto); } /// @@ -51,7 +52,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool DeleteReserInfo([FromBody] Reser reser) + public BaseOutputDto DeleteReserInfo([FromBody] DeleteReserInputDto reser) { return reserService.DeleteReserInfo(reser); } @@ -62,7 +63,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool InserReserInfo([FromBody] Reser r) + public BaseOutputDto InserReserInfo([FromBody] CreateReserInputDto r) { return reserService.InserReserInfo(r); } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Util/AppController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Util/AppController.cs index 84e7e6f..405b4ae 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Util/AppController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Util/AppController.cs @@ -1,4 +1,5 @@ using EOM.TSHotelManagement.Application; +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; @@ -62,7 +63,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public OSelectAllDto SelectOperationlogAll([FromQuery] int? pageIndex, int? pageSize) + public ListOutputDto SelectOperationlogAll([FromQuery] int? pageIndex, int? pageSize) { return utilService.SelectOperationlogAll(pageIndex, pageSize); } -- Gitee From cd1394551e9fc19c7b708e7121c37d1d0c92ae27 Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Sat, 8 Mar 2025 23:17:02 +0800 Subject: [PATCH 03/24] rename all controller. rename all appservice. rename all dto. --- .../Business/Asset/AssetService.cs | 50 +- .../Business/Asset/IAssetService.cs | 8 +- .../Business/Customer/CustomerService.cs | 5 +- .../Business/Room/IRoomService.cs | 48 +- .../Business/Room/IRoomTypeService.cs | 19 +- .../Business/Room/RoomService.cs | 194 +++++--- .../Business/Room/RoomTypeService.cs | 99 ++-- .../Business/Sellthing/ISellService.cs | 34 +- .../Business/Sellthing/SellService.cs | 143 ++++-- .../Business/Spend/ISpendService.cs | 37 +- .../Business/Spend/SpendService.cs | 139 ++++-- .../Check/EmployeeCheckService.cs} | 38 +- .../Check/IEmployeeCheckService.cs} | 11 +- .../EmployeeService.cs} | 249 +++++---- .../History/EmployeeHistoryService.cs} | 25 +- .../History/IEmployeeHistoryService.cs} | 8 +- .../IEmployeeService.cs} | 48 +- .../Photo/EmployeePhotoService.cs} | 70 ++- .../Photo/IEmployeePhotoService.cs} | 20 +- .../IRewardPunishmentService.cs} | 8 +- .../RewardPunishmentService.cs} | 39 +- .../Sys/NavBar/INavBarService.cs | 5 +- .../Sys/NavBar/NavBarService.cs | 14 +- .../Util/IUtilService.cs | 6 +- .../Util/UtilService.cs | 29 +- .../{Admin => Administrator}/AdminService.cs | 184 ++++--- .../{Admin => Administrator}/IAdminService.cs | 44 +- .../Zero/Base/BaseService.cs | 471 ++++++++++-------- .../Zero/Base/IBaseService.cs | 95 ++-- .../Zero/Menu/IMenuService.cs | 9 +- .../Zero/Menu/MenuService.cs | 58 ++- .../Zero/Module/AdminModuleZeroService.cs | 37 +- .../Zero/Module/IAdminModuleZeroService.cs | 11 +- .../Zero/Notice/INoticeService.cs | 11 +- .../Zero/Notice/NoticeService.cs | 53 +- .../ISupervisionStatisticsService.cs} | 11 +- .../SupervisionStatisticsService.cs} | 89 +++- .../Zero/VipRule/IVipRuleAppService.cs | 11 +- .../Zero/VipRule/VipRuleAppService.cs | 100 ++-- .../BaseDto/BaseOutputDto.cs | 2 +- .../BaseDto/ListInputDto.cs | 4 + .../BaseDto/ListOutputDto.cs | 2 +- .../Asset/Dto/Asset/CreateAssetOutputDto.cs | 17 - .../Asset/Dto/Asset/DeleteAssetOutputDto.cs | 8 - .../Asset/Dto/Asset/ReadAssetOutputDto.cs | 2 +- .../Asset/Dto/Asset/UpdateAssetOutputDto.cs | 17 - .../Dto/CustoType/CreateCustoTypeOutputDto.cs | 9 - .../Dto/CustoType/DeleteCustoTypeOutputDto.cs | 8 - .../Dto/CustoType/ReadCustoTypeOutputDto.cs | 2 +- .../Dto/CustoType/UpdateCustoTypeOutputDto.cs | 9 - .../Dto/Customer/CreateCustomerOutputDto.cs | 19 - .../Dto/Customer/DeleteCustomerOutputDto.cs | 8 - .../Dto/Customer/ReadCustomerOutputDto.cs | 3 +- .../Dto/Customer/UpdateCustomerOutputDto.cs | 19 - .../GenderType/CreateGenderTypeOutputDto.cs | 9 - .../GenderType/DeleteGenderTypeOutputDto.cs | 8 - .../Dto/GenderType/ReadGenderTypeInputDto.cs | 1 + .../Dto/GenderType/ReadGenderTypeOutputDto.cs | 2 +- .../GenderType/UpdateGenderTypeOutputDto.cs | 9 - .../CreatePassportTypeOutputDto.cs | 9 - .../DeletePassportTypeOutputDto.cs | 8 - .../PassportType/ReadPassportTypeOutputDto.cs | 2 +- .../UpdatePassportTypeOutputDto.cs | 9 - .../Dto/CreateEnergyManagementOutputDto.cs | 15 - .../Dto/DeleteEnergyManagementOutputDto.cs | 8 - .../Dto/ReadEnergyManagementOutputDto.cs | 2 +- .../Dto/UpdateEnergyManagementOutputDto.cs | 15 - .../Dto/CreatePromotionContentOutputDto.cs | 12 - .../Dto/DeletePromotionContentOutputDto.cs | 8 - .../Dto/ReadPromotionContentOutputDto.cs | 2 +- .../Dto/UpdatePromotionContentOutputDto.cs | 12 - .../Reser/Dto/CreateReserOutputDto.cs | 14 - .../Reser/Dto/DeleteReserOutputDto.cs | 8 - .../Business/Reser/Dto/ReadReserOutputDto.cs | 2 +- .../Reser/Dto/UpdateReserOutputDto.cs | 14 - .../Room/Dto/Room/CreateRoomInputDto.cs | 11 +- .../Room/Dto/Room/CreateRoomOutputDto.cs | 12 - .../Room/Dto/Room/DeleteRoomOutputDto.cs | 9 - .../Room/Dto/Room/ReadRoomInputDto.cs | 4 + .../Room/Dto/Room/ReadRoomOutputDto.cs | 12 +- .../Room/Dto/Room/UpdateRoomInputDto.cs | 10 +- .../Room/Dto/Room/UpdateRoomOutputDto.cs | 13 - .../Dto/RoomState/CreateRoomStateOutputDto.cs | 10 - .../Dto/RoomState/DeleteRoomStateOutputDto.cs | 9 - .../Dto/RoomState/ReadRoomStateOutputDto.cs | 2 +- .../Dto/RoomState/UpdateRoomStateOutputDto.cs | 10 - .../Dto/RoomType/CreateRoomTypeInputDto.cs | 4 +- .../Dto/RoomType/CreateRoomTypeOutputDto.cs | 11 - .../Dto/RoomType/DeleteRoomTypeOutputDto.cs | 9 - .../Room/Dto/RoomType/ReadRoomTypeInputDto.cs | 4 + .../Dto/RoomType/ReadRoomTypeOutputDto.cs | 2 +- .../Dto/RoomType/UpdateRoomTypeInputDto.cs | 6 +- .../Dto/RoomType/UpdateRoomTypeOutputDto.cs | 11 - .../Sellthing/Dto/CreateSellThingInputDto.cs | 8 +- .../Sellthing/Dto/CreateSellThingOutputDto.cs | 12 - .../Sellthing/Dto/DeleteSellThingInputDto.cs | 8 +- .../Sellthing/Dto/DeleteSellThingOutputDto.cs | 9 - .../Sellthing/Dto/ReadSellThingInputDto.cs | 6 +- .../Sellthing/Dto/ReadSellThingOutputDto.cs | 11 +- .../Sellthing/Dto/UpdateSellThingInputDto.cs | 9 +- .../Sellthing/Dto/UpdateSellThingOutputDto.cs | 12 - .../Spend/Dto/Spend/CreateSpendOutputDto.cs | 18 - .../Spend/Dto/Spend/DeleteSpendOutputDto.cs | 9 - .../Spend/Dto/Spend/ReadSpendInputDto.cs | 1 + .../Spend/Dto/Spend/ReadSpendOutputDto.cs | 2 +- .../Spend/Dto/Spend/UpdateSpendOutputDto.cs | 18 - .../Dto/Employee/CreateEmployeeInputDto.cs | 10 +- .../Dto/Employee/DeleteEmployeeOutputDto.cs | 9 - .../Dto/Employee/ReadEmployeeInputDto.cs | 12 + ...eOutputDto.cs => ReadEmployeeOutputDto.cs} | 19 +- .../Dto/Employee/UpdateEmployeeInputDto.cs | 10 +- .../Dto/Employee/UpdateEmployeeOutputDto.cs | 16 - .../CreateEmployeeCheckOutputDto.cs | 12 - .../DeleteEmployeeCheckOutputDto.cs | 9 - .../ReadEmployeeCheckInputDto.cs | 1 + .../ReadEmployeeCheckOutputDto.cs | 2 +- .../UpdateEmployeeCheckOutputDto.cs | 12 - .../CreateEmployeeHistoryOutputDto.cs | 13 - .../DeleteEmployeeHistoryOutputDto.cs | 9 - .../ReadEmployeeHistoryInputDto.cs | 1 + .../ReadEmployeeHistoryOutputDto.cs | 2 +- .../UpdateEmployeeHistoryOutputDto.cs | 13 - .../CreateEmployeePhotoOutputDto.cs | 11 - .../DeleteEmployeePhotoInputDto.cs | 1 + .../DeleteEmployeePhotoOutputDto.cs | 9 - .../ReadEmployeePhotoInputDto.cs | 1 + .../ReadEmployeePhotoOutputDto.cs | 2 +- .../UpdateEmployeePhotoOutputDto.cs | 11 - ...CreateEmployeeRewardPunishmentOutputDto.cs | 13 - ...DeleteEmployeeRewardPunishmentOutputDto.cs | 9 - .../ReadEmployeeRewardPunishmentInputDto.cs | 1 + .../ReadEmployeeRewardPunishmentOutputDto.cs | 2 +- ...UpdateEmployeeRewardPunishmentOutputDto.cs | 13 - .../CreateRewardPunishmentTypeInputDto.cs | 2 +- .../CreateRewardPunishmentTypeOutputDto.cs | 10 - .../DeleteRewardPunishmentTypeInputDto.cs | 2 +- .../DeleteRewardPunishmentTypeeOutputDto.cs | 9 - .../ReadRewardPunishmentTypeInputDto.cs | 2 +- .../ReadRewardPunishmentTypeOutputDto.cs | 2 +- .../UpdateRewardPunishmentTypeInputDto.cs | 2 +- .../UpdateRewardPunishmentTypeOutputDto.cs | 10 - .../Sys/NavBar/Dto/CreateNavBarOutputDto.cs | 13 - .../Sys/NavBar/Dto/DeleteNavBarOutputDto.cs | 8 - .../Sys/NavBar/Dto/ReadNavBarOutputDto.cs | 2 +- .../Sys/NavBar/Dto/UpdateNavBarOutputDto.cs | 13 - .../CreateApplicationVersionOutputDto.cs | 13 - .../DeleteApplicationVersionOutputDto.cs | 10 - .../ReadApplicationVersionOutputDto.cs | 4 +- .../UpdateApplicationVersionOutputDto.cs | 13 - .../Dto/CardCode/CreateCardCodeOutputDto.cs | 18 - .../Dto/CardCode/DeleteCardCodeOutputDto.cs | 18 - .../Dto/CardCode/ReadCardCodeOutputDto.cs | 2 +- .../Dto/CardCode/UpdateCardCodeOutputDto.cs | 18 - .../CreateOperationLogOutputDto.cs | 17 - .../DeleteOperationLogOutputDto.cs | 8 - .../OperationLog/ReadOperationLogOutputDto.cs | 2 +- .../UpdateOperationLogOutputDto.cs | 17 - .../CreateAdministratorOutputDto.cs | 14 - .../DeleteAdministratorOutputDto.cs | 9 - .../ReadAdministratorInputDto.cs | 5 + .../ReadAdministratorOutputDto.cs | 2 +- .../UpdateAdministratorOutputDto.cs | 14 - .../CreateAdministratorTypeOutputDto.cs | 10 - .../DeleteAdministratorTypeOutputDto.cs | 8 - .../ReadAdministratorTypeOutputDto.cs | 2 +- .../UpdateAdministratorTypeOutputDto.cs | 10 - .../CreateAppointmentNoticeInputDto.cs | 7 +- .../CreateAppointmentNoticeOutputDto.cs | 12 - .../DeleteAppointmentNoticeOutputDto.cs | 9 - .../ReadAppointmentNoticeInputDto.cs | 5 + .../ReadAppointmentNoticeOutputDto.cs | 8 +- .../UpdateAppointmentNoticeOutputDto.cs | 12 - .../Department/CreateDepartmentInputDto.cs | 7 + .../Department/CreateDepartmentOutputDto.cs | 11 - .../Department/DeleteDepartmentInputDto.cs | 10 +- .../Department/DeleteDepartmentOutputDto.cs | 9 - .../Dto/Department/ReadDepartmentInputDto.cs | 10 +- .../Dto/Department/ReadDepartmentOutputDto.cs | 10 +- .../Department/UpdateDepartmentInputDto.cs | 8 +- .../Department/UpdateDepartmentOutputDto.cs | 11 - .../Zero/Dto/Menu/CreateMenuOutputDto.cs | 13 - .../Zero/Dto/Menu/DeleteMenuOutputDto.cs | 9 - .../Zero/Dto/Menu/ReadMenuOutputDto.cs | 2 +- .../Zero/Dto/Menu/UpdateMenuOutputDto.cs | 13 - .../Zero/Dto/Module/CreateModuleOutputDto.cs | 11 - .../Zero/Dto/Module/DeleteModuleOutputDto.cs | 10 - .../Zero/Dto/Module/ReadModuleOutputDto.cs | 2 +- .../Zero/Dto/Module/UpdateModuleOutputDto.cs | 12 - .../CreateModulePermissionOutputDto.cs | 13 - .../DeleteModulePermissionInputDto.cs | 1 + .../DeleteModulePermissionOutputDto.cs | 10 - .../ReadModulePermissionInputDto.cs | 1 + .../ReadModulePermissionOutputDto.cs | 25 +- .../UpdateModulePermissionOutputDto.cs | 13 - .../Zero/Dto/Nation/CreateNationOutputDto.cs | 11 - .../Zero/Dto/Nation/DeleteNationOutputDto.cs | 10 - .../Zero/Dto/Nation/ReadNationOutputDto.cs | 4 +- .../Zero/Dto/Nation/UpdateNationOutputDto.cs | 11 - .../Dto/Position/CreatePositionInputDto.cs | 1 + .../Dto/Position/CreatePositionOutputDto.cs | 12 - .../Dto/Position/DeletePositionInputDto.cs | 2 +- .../Dto/Position/DeletePositionOutputDto.cs | 10 - .../Zero/Dto/Position/ReadPositionInputDto.cs | 2 + .../Dto/Position/ReadPositionOutputDto.cs | 6 +- .../Dto/Position/UpdatePositionInputDto.cs | 1 + .../Dto/Position/UpdatePositionOutputDto.cs | 12 - .../CreateQualificationOutputDto.cs | 10 - .../Qualification/DeleteEducationOutputDto.cs | 9 - .../Qualification/ReadEducationOutputDto.cs | 2 +- .../Qualification/UpdateEducationOutputDto.cs | 10 - .../CreateSupervisionStatisticsInputDto.cs | 10 +- .../CreateSupervisionStatisticsOutputDto.cs | 12 - .../DeleteSupervisionStatisticsInputDto.cs | 9 +- .../DeleteSupervisionStatisticsOutputDto.cs | 10 - .../ReadSupervisionStatisticsInputDto.cs | 9 +- .../ReadSupervisionStatisticsOutputDto.cs | 13 +- .../UpdateSupervisionStatisticsInputDto.cs | 11 +- .../UpdateSupervisionStatisticsOutputDto.cs | 12 - .../CreateSystemInformationOutputDto.cs | 13 - .../DeleteSystemInformationOutputDto.cs | 10 - .../ReadSystemInformationOutputDto.cs | 2 +- .../UpdateSystemInformationOutputDto.cs | 13 - .../CreateVipLevelRuleInputDto.cs | 13 +- .../CreateVipLevelRuleOutputDto.cs | 14 - .../DeleteVipLevelRuleInputDto.cs | 12 +- .../DeleteVipLevelRuleOutputDto.cs | 10 - .../VipLevelRule/ReadVipLevelRuleInputDto.cs | 1 + .../VipLevelRule/ReadVipLevelRuleOutputDto.cs | 16 +- .../UpdateVipLevelRuleInputDto.cs | 14 +- .../UpdateVipLevelRuleOutputDto.cs | 14 - .../{BaseDTO.cs => BaseEntity.cs} | 13 +- .../Business/Asset/Asset.cs | 2 +- .../Business/Customer/CustoType.cs | 2 +- .../Business/Customer/Customer.cs | 2 +- .../Business/Customer/GenderType.cs | 2 +- .../Business/Customer/PassPortType.cs | 2 +- .../Hydroelectricity.cs | 2 +- .../Business/Reser/Reser.cs | 2 +- .../Business/Room/Room.cs | 2 +- .../Business/Room/RoomState.cs | 2 +- .../Business/Room/RoomType.cs | 2 +- .../Business/Sellthing/SellThing.cs | 2 +- .../Business/Spend/Spend.cs | 2 +- .../Employee/Employee.cs | 2 +- .../Employee/EmployeeCheck.cs | 2 +- .../Employee/EmployeeHistory.cs | 2 +- .../Employee/EmployeeRewardPunishment.cs | 2 +- .../{GBType.cs => RewardPunishmentType.cs} | 2 +- .../Sys/NavBar/NavBar.cs | 2 +- .../Util/OperationLog.cs | 2 +- .../Zero/Administrator.cs | 4 +- .../Zero/AdministratorType.cs | 2 +- .../Zero/AppointmentNotice.cs | 2 +- .../Zero/Department.cs | 2 +- .../Zero/Education.cs | 2 +- .../Zero/Menu.cs | 2 +- .../Zero/Module.cs | 2 +- .../Zero/Nation.cs | 2 +- .../Zero/SupervisionStatistics.cs | 2 +- .../Zero/VipLevelRule.cs | 2 +- .../Zero/position.cs | 2 +- .../Helper/EntityMapper.cs | 2 +- .../Repository/GenericRepository.cs | 3 +- EOM.TSHotelManagement.Shared/JwtConfig.cs | 8 +- .../Business/Asset/AssetController.cs | 8 +- .../Business/Room/RoomController.cs | 98 ++-- .../Business/Room/RoomTypeController.cs | 45 +- .../Business/Sellthing/SellthingController.cs | 59 +-- .../Business/Spend/SpendController.cs | 65 ++- .../Check/EmployeeCheckController.cs} | 37 +- .../EmployeeController.cs} | 60 +-- .../History/EmployeeHistoryController.cs} | 24 +- .../Photo/EmployeePhotoController.cs} | 41 +- .../RewardPunishmentController.cs} | 15 +- .../Sys/NavBar/NavBarController.cs | 3 +- ...{AppController.cs => UtilityController.cs} | 19 +- .../AdminController.cs | 31 +- .../Controllers/Zero/Base/BaseController.cs | 340 +++---------- .../Controllers/Zero/Menu/MenuController.cs | 11 +- .../Zero/Module/ModuleController.cs | 18 +- .../Zero/Notice/NoticeController.cs | 29 +- .../SupervisionStatisticsController.cs} | 39 +- .../Zero/VipRule/VipRuleController.cs | 39 +- 283 files changed, 2278 insertions(+), 2998 deletions(-) rename EOM.TSHotelManagement.Application/{Worker/Check/WorkerCheckService.cs => Employee/Check/EmployeeCheckService.cs} (68%) rename EOM.TSHotelManagement.Application/{Worker/Check/IWorkerCheckService.cs => Employee/Check/IEmployeeCheckService.cs} (81%) rename EOM.TSHotelManagement.Application/{Worker/WorkerService.cs => Employee/EmployeeService.cs} (53%) rename EOM.TSHotelManagement.Application/{Worker/History/WorkerHistoryService.cs => Employee/History/EmployeeHistoryService.cs} (65%) rename EOM.TSHotelManagement.Application/{Worker/History/IWorkerHistoryService.cs => Employee/History/IEmployeeHistoryService.cs} (84%) rename EOM.TSHotelManagement.Application/{Worker/IWorkerService.cs => Employee/IEmployeeService.cs} (62%) rename EOM.TSHotelManagement.Application/{Worker/Picture/WorkerPicService.cs => Employee/Photo/EmployeePhotoService.cs} (34%) rename EOM.TSHotelManagement.Application/{Worker/Picture/IWorkerPicService.cs => Employee/Photo/IEmployeePhotoService.cs} (43%) rename EOM.TSHotelManagement.Application/{Worker/GoodBad/IWorkerGoodBadService.cs => Employee/RewardPunishment/IRewardPunishmentService.cs} (83%) rename EOM.TSHotelManagement.Application/{Worker/GoodBad/WorkerGoodBadService.cs => Employee/RewardPunishment/RewardPunishmentService.cs} (65%) rename EOM.TSHotelManagement.Application/Zero/{Admin => Administrator}/AdminService.cs (50%) rename EOM.TSHotelManagement.Application/Zero/{Admin => Administrator}/IAdminService.cs (60%) rename EOM.TSHotelManagement.Application/Zero/{CheckInfo/ICheckInfoService.cs => SupervisionStatistics/ISupervisionStatisticsService.cs} (77%) rename EOM.TSHotelManagement.Application/Zero/{CheckInfo/CheckInfoService.cs => SupervisionStatistics/SupervisionStatisticsService.cs} (45%) delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/CreateAssetOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/DeleteAssetOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/UpdateAssetOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/CreateCustoTypeOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/DeleteCustoTypeOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/UpdateCustoTypeOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/CreateCustomerOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/DeleteCustomerOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/UpdateCustomerOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/CreateGenderTypeOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/DeleteGenderTypeOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/UpdateGenderTypeOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/CreatePassportTypeOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/DeletePassportTypeOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/UpdatePassportTypeOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/CreateEnergyManagementOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/DeleteEnergyManagementOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/UpdateEnergyManagementOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/CreatePromotionContentOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/DeletePromotionContentOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/UpdatePromotionContentOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/CreateReserOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/DeleteReserOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/UpdateReserOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/CreateRoomOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/DeleteRoomOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/UpdateRoomOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/CreateRoomStateOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/DeleteRoomStateOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/UpdateRoomStateOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/CreateRoomTypeOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/DeleteRoomTypeOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/UpdateRoomTypeOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/CreateSellThingOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/DeleteSellThingOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/UpdateSellThingOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/CreateSpendOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/DeleteSpendOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/UpdateSpendOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/DeleteEmployeeOutputDto.cs rename EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/{CreateEmployeeOutputDto.cs => ReadEmployeeOutputDto.cs} (41%) delete mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/UpdateEmployeeOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/CreateEmployeeCheckOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/DeleteEmployeeCheckOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/UpdateEmployeeCheckOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/CreateEmployeeHistoryOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/DeleteEmployeeHistoryOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/UpdateEmployeeHistoryOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/CreateEmployeePhotoOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/DeleteEmployeePhotoOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/UpdateEmployeePhotoOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/CreateEmployeeRewardPunishmentOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/DeleteEmployeeRewardPunishmentOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/UpdateEmployeeRewardPunishmentOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/CreateRewardPunishmentTypeOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/DeleteRewardPunishmentTypeeOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/UpdateRewardPunishmentTypeOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/CreateNavBarOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/DeleteNavBarOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/UpdateNavBarOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/CreateApplicationVersionOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/DeleteApplicationVersionOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/UpdateApplicationVersionOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/CreateCardCodeOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/DeleteCardCodeOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/UpdateCardCodeOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/CreateOperationLogOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/DeleteOperationLogOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/UpdateOperationLogOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/CreateAdministratorOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/DeleteAdministratorOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/UpdateAdministratorOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/CreateAdministratorTypeOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/DeleteAdministratorTypeOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/UpdateAdministratorTypeOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/CreateAppointmentNoticeOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/DeleteAppointmentNoticeOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/UpdateAppointmentNoticeOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/CreateDepartmentOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/DeleteDepartmentOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/UpdateDepartmentOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/CreateMenuOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/DeleteMenuOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/UpdateMenuOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/CreateModuleOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/DeleteModuleOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/UpdateModuleOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/CreateModulePermissionOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/DeleteModulePermissionOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/UpdateModulePermissionOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/CreateNationOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/DeleteNationOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/UpdateNationOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/CreatePositionOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/DeletePositionOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/UpdatePositionOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/CreateQualificationOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/DeleteEducationOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/UpdateEducationOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/CreateSupervisionStatisticsOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/DeleteSupervisionStatisticsOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/UpdateSupervisionStatisticsOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/CreateSystemInformationOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/DeleteSystemInformationOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/UpdateSystemInformationOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/CreateVipLevelRuleOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/DeleteVipLevelRuleOutputDto.cs delete mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/UpdateVipLevelRuleOutputDto.cs rename EOM.TSHotelManagement.Common.Core/{BaseDTO.cs => BaseEntity.cs} (78%) rename EOM.TSHotelManagement.Common.Core/Business/{Hydroelectricity => EnergyManagement}/Hydroelectricity.cs (98%) rename EOM.TSHotelManagement.Common.Core/Employee/{GBType.cs => RewardPunishmentType.cs} (97%) rename EOM.TSHotelManagement.WebApi/Controllers/{Worker/Check/WorkerCheckController.cs => Employee/Check/EmployeeCheckController.cs} (66%) rename EOM.TSHotelManagement.WebApi/Controllers/{Worker/WorkerController.cs => Employee/EmployeeController.cs} (51%) rename EOM.TSHotelManagement.WebApi/Controllers/{Worker/History/WorkerHistoryController.cs => Employee/History/EmployeeHistoryController.cs} (59%) rename EOM.TSHotelManagement.WebApi/Controllers/{Worker/Picture/WorkerPictureController.cs => Employee/Photo/EmployeePhotoController.cs} (45%) rename EOM.TSHotelManagement.WebApi/Controllers/{Worker/GoodBad/WorkerGoodBadController.cs => Employee/RewardPunishment/RewardPunishmentController.cs} (58%) rename EOM.TSHotelManagement.WebApi/Controllers/Util/{AppController.cs => UtilityController.cs} (71%) rename EOM.TSHotelManagement.WebApi/Controllers/Zero/{Admin => Administrator}/AdminController.cs (69%) rename EOM.TSHotelManagement.WebApi/Controllers/Zero/{CheckInfo/CheckInfoController.cs => SupervisionStatistics/SupervisionStatisticsController.cs} (43%) diff --git a/EOM.TSHotelManagement.Application/Business/Asset/AssetService.cs b/EOM.TSHotelManagement.Application/Business/Asset/AssetService.cs index f6e0940..87b4025 100644 --- a/EOM.TSHotelManagement.Application/Business/Asset/AssetService.cs +++ b/EOM.TSHotelManagement.Application/Business/Asset/AssetService.cs @@ -23,6 +23,7 @@ */ using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Util; using EOM.TSHotelManagement.EntityFramework; using SqlSugar; @@ -66,16 +67,24 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool AddAssetInfo(Asset asset) + public BaseOutputDto AddAssetInfo(CreateAssetInputDto asset) { - return assetRepository.Insert(asset); + try + { + var result = assetRepository.Insert(EntityMapper.Map(asset)); + } + catch (Exception ex) + { + return new BaseOutputDto() { Message = LocalizationHelper.GetLocalizedString(ex.Message,ex.Message),StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } /// /// 查询资产信息 /// /// - public ListOutputDto SelectAssetInfoAll(Asset asset) + public ListOutputDto SelectAssetInfoAll(ReadAssetInputDto asset) { //查询所有部门信息 List depts = new List(); @@ -114,20 +123,17 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool UpdAssetInfo(Asset asset) + public BaseOutputDto UpdAssetInfo(UpdateAssetInputDto asset) { - return assetRepository.Update(a => new Asset() + try + { + assetRepository.Update(EntityMapper.Map(asset)); + } + catch (Exception ex) { - AssetName = asset.AssetName, - DepartmentCode = asset.DepartmentCode, - AssetSource = asset.AssetSource, - AssetValue = asset.AssetValue, - AcquisitionDate = asset.AcquisitionDate, - AcquiredByEmployeeId = asset.AcquiredByEmployeeId, - IsDelete = asset.IsDelete, - DataChgUsr = asset.DataChgUsr, - DataChgDate = asset.DataChgDate - }, a => a.AssetNumber == asset.AssetNumber); + return new BaseOutputDto() { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } /// @@ -135,13 +141,17 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool DelAssetInfo(Asset asset) + public BaseOutputDto DelAssetInfo(DeleteAssetInputDto asset) { - return assetRepository.Update(a => new Asset() + try { - IsDelete = 1, - DataChgUsr = asset.DataChgUsr - }, a => a.AssetNumber == asset.AssetNumber); + assetRepository.Update(EntityMapper.Map(asset)); + } + catch (Exception ex) + { + return new BaseOutputDto() { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } } } diff --git a/EOM.TSHotelManagement.Application/Business/Asset/IAssetService.cs b/EOM.TSHotelManagement.Application/Business/Asset/IAssetService.cs index 7004d26..66852f1 100644 --- a/EOM.TSHotelManagement.Application/Business/Asset/IAssetService.cs +++ b/EOM.TSHotelManagement.Application/Business/Asset/IAssetService.cs @@ -36,26 +36,26 @@ namespace EOM.TSHotelManagement.Application /// /// /// - bool AddAssetInfo(Asset cash); + BaseOutputDto AddAssetInfo(CreateAssetInputDto cash); /// /// 查询资产信息 /// /// - ListOutputDto SelectAssetInfoAll(Asset asset); + ListOutputDto SelectAssetInfoAll(ReadAssetInputDto asset); /// /// 更新资产信息 /// /// /// - bool UpdAssetInfo(Asset cash); + BaseOutputDto UpdAssetInfo(UpdateAssetInputDto cash); /// /// 删除资产信息 /// /// /// - bool DelAssetInfo(Asset cash); + BaseOutputDto DelAssetInfo(DeleteAssetInputDto cash); } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Application/Business/Customer/CustomerService.cs b/EOM.TSHotelManagement.Application/Business/Customer/CustomerService.cs index 184906e..b8294c8 100644 --- a/EOM.TSHotelManagement.Application/Business/Customer/CustomerService.cs +++ b/EOM.TSHotelManagement.Application/Business/Customer/CustomerService.cs @@ -193,10 +193,7 @@ namespace EOM.TSHotelManagement.Application { try { - var result = custoRepository.Update(a => new Customer() - { - CustomerType = updateCustomerInputDto.CustomerType - }, a => a.CustomerNumber.Equals(updateCustomerInputDto.CustomerNumber)); + var result = custoRepository.Update(EntityMapper.Map(updateCustomerInputDto)); if (result) { diff --git a/EOM.TSHotelManagement.Application/Business/Room/IRoomService.cs b/EOM.TSHotelManagement.Application/Business/Room/IRoomService.cs index a326b9c..6663878 100644 --- a/EOM.TSHotelManagement.Application/Business/Room/IRoomService.cs +++ b/EOM.TSHotelManagement.Application/Business/Room/IRoomService.cs @@ -21,6 +21,7 @@ *SOFTWARE. * */ +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; namespace EOM.TSHotelManagement.Application @@ -34,9 +35,9 @@ namespace EOM.TSHotelManagement.Application /// /// 根据房间状态获取相应状态的房间信息 /// - /// + /// /// - List SelectRoomByRoomState(int stateid); + ListOutputDto SelectRoomByRoomState(ReadRoomInputDto readRoomInputDto); #endregion #region 根据房间状态来查询可使用的房间 @@ -44,7 +45,7 @@ namespace EOM.TSHotelManagement.Application /// 根据房间状态来查询可使用的房间 /// /// - List SelectCanUseRoomAll(); + ListOutputDto SelectCanUseRoomAll(); #endregion #region 获取所有房间信息 @@ -52,7 +53,7 @@ namespace EOM.TSHotelManagement.Application /// 获取所有房间信息 /// /// - List SelectRoomAll(); + ListOutputDto SelectRoomAll(); #endregion #region 获取房间分区的信息 @@ -60,34 +61,34 @@ namespace EOM.TSHotelManagement.Application /// 获取房间分区的信息 /// /// - List SelectRoomByTypeName(string TypeName); + ListOutputDto SelectRoomByTypeName(ReadRoomInputDto TypeName); #endregion #region 根据房间编号查询房间信息 /// /// 根据房间编号查询房间信息 /// - /// + /// /// - Room SelectRoomByRoomNo(string no); + ReadRoomOutputDto SelectRoomByRoomNo(ReadRoomInputDto readRoomInputDto); #endregion #region 根据房间编号退房(退房) /// /// 根据房间编号退房(退房) /// - /// + /// /// - bool UpdateRoomByRoomNo(string room); + BaseOutputDto UpdateRoomByRoomNo(ReadRoomInputDto readRoomInputDto); #endregion #region 根据房间编号查询截止到今天住了多少天 /// /// 根据房间编号查询截止到今天住了多少天 /// - /// + /// /// - object DayByRoomNo(string roomno); + object DayByRoomNo(ReadRoomInputDto readRoomInputDto); #endregion #region 根据房间编号修改房间信息(入住) @@ -96,7 +97,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - bool UpdateRoomInfo(Room r); + BaseOutputDto UpdateRoomInfo(UpdateRoomInputDto r); #endregion #region 根据房间编号修改房间信息(预约) @@ -105,7 +106,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - bool UpdateRoomInfoWithReser(Room r); + BaseOutputDto UpdateRoomInfoWithReser(UpdateRoomInputDto r); #endregion #region 查询可入住房间数量 @@ -129,7 +130,7 @@ namespace EOM.TSHotelManagement.Application /// 根据房间编号查询房间价格 /// /// - object SelectRoomByRoomPrice(string r); + object SelectRoomByRoomPrice(ReadRoomInputDto readRoomInputDto); #endregion #region 查询脏房数量 @@ -160,10 +161,9 @@ namespace EOM.TSHotelManagement.Application /// /// 根据房间编号更改房间状态 /// - /// - /// + /// /// - bool UpdateRoomStateByRoomNo(string roomno, int stateid); + BaseOutputDto UpdateRoomStateByRoomNo(ReadRoomInputDto readRoomInputDto); #endregion #region 添加房间 @@ -172,7 +172,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - bool InsertRoom(Room rn); + BaseOutputDto InsertRoom(CreateRoomInputDto rn); #endregion #region 更新房间 @@ -181,7 +181,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - bool UpdateRoom(Room rn); + BaseOutputDto UpdateRoom(UpdateRoomInputDto rn); #endregion #region 删除房间 @@ -190,7 +190,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - bool DeleteRoom(Room rn); + BaseOutputDto DeleteRoom(DeleteRoomInputDto rn); #endregion #region 查询所有可消费(已住)房间 @@ -198,7 +198,7 @@ namespace EOM.TSHotelManagement.Application /// 查询所有可消费(已住)房间 /// /// - List SelectRoomByStateAll(); + ListOutputDto SelectRoomByStateAll(); #endregion #region 获取所有房间状态 @@ -206,16 +206,16 @@ namespace EOM.TSHotelManagement.Application /// 获取所有房间状态 /// /// - List SelectRoomStateAll(); + ListOutputDto SelectRoomStateAll(); #endregion #region 根据房间编号查询房间状态编号 /// /// 根据房间编号查询房间状态编号 /// - /// + /// /// - object SelectRoomStateIdByRoomNo(string roomno); + object SelectRoomStateIdByRoomNo(ReadRoomInputDto readRoomInputDto); #endregion } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Application/Business/Room/IRoomTypeService.cs b/EOM.TSHotelManagement.Application/Business/Room/IRoomTypeService.cs index 73393b1..b4b4765 100644 --- a/EOM.TSHotelManagement.Application/Business/Room/IRoomTypeService.cs +++ b/EOM.TSHotelManagement.Application/Business/Room/IRoomTypeService.cs @@ -21,6 +21,7 @@ *SOFTWARE. * */ +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; namespace EOM.TSHotelManagement.Application @@ -34,41 +35,41 @@ namespace EOM.TSHotelManagement.Application /// 获取所有房间类型 /// /// - List SelectRoomTypesAll(int? isDelete); + ListOutputDto SelectRoomTypesAll(ReadRoomTypeInputDto readRoomTypeInputDto); /// /// 根据房间编号查询房间类型名称 /// - /// + /// /// - RoomType SelectRoomTypeByRoomNo(string no); + ReadRoomTypeOutputDto SelectRoomTypeByRoomNo(ReadRoomTypeInputDto readRoomTypeInputDto); /// /// 根据房间类型查询类型配置 /// - /// + /// /// - RoomType SelectRoomTypeByType(int roomTypeId); + ReadRoomTypeOutputDto SelectRoomTypeByType(ReadRoomTypeInputDto readRoomTypeInputDto); /// /// 添加房间状态 /// - /// + /// /// - bool InsertRoomType(RoomType roomType); + BaseOutputDto InsertRoomType(CreateRoomTypeInputDto readRoomTypeInputDto); /// /// 更新房间状态 /// /// /// - bool UpdateRoomType(RoomType roomType); + BaseOutputDto UpdateRoomType(UpdateRoomTypeInputDto roomType); /// /// 删除房间状态 /// /// /// - bool DeleteRoomType(RoomType roomType); + BaseOutputDto DeleteRoomType(DeleteRoomTypeInputDto roomType); } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Application/Business/Room/RoomService.cs b/EOM.TSHotelManagement.Application/Business/Room/RoomService.cs index a1e1e3a..d20ea09 100644 --- a/EOM.TSHotelManagement.Application/Business/Room/RoomService.cs +++ b/EOM.TSHotelManagement.Application/Business/Room/RoomService.cs @@ -21,9 +21,12 @@ *SOFTWARE. * */ +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Util; using EOM.TSHotelManagement.EntityFramework; using jvncorelib.EntityLib; +using NPOI.SS.Formula.Functions; namespace EOM.TSHotelManagement.Application { @@ -71,16 +74,16 @@ namespace EOM.TSHotelManagement.Application /// /// 根据房间状态获取相应状态的房间信息 /// - /// + /// /// - public List SelectRoomByRoomState(int stateid) + public ListOutputDto SelectRoomByRoomState(ReadRoomInputDto readRoomInputDto) { List roomStates = new List(); roomStates = roomStateRepository.GetList(a => a.IsDelete != 1); List roomTypes = new List(); roomTypes = roomTypeRepository.GetList(a => a.IsDelete != 1); List rooms = new List(); - rooms = roomRepository.GetList(a => a.IsDelete != 1 && a.RoomStateId == stateid).OrderBy(a => a.RoomNumber).ToList(); + rooms = roomRepository.GetList(a => a.IsDelete != 1 && a.RoomStateId == readRoomInputDto.RoomStateId).OrderBy(a => a.RoomNumber).ToList(); rooms.ForEach(source => { var roomState = roomStates.FirstOrDefault(a => a.RoomStateId == source.RoomStateId); @@ -88,7 +91,10 @@ namespace EOM.TSHotelManagement.Application var roomType = roomTypes.FirstOrDefault(a => a.RoomTypeId == source.RoomType); source.RoomName = roomType.RoomTypeName.IsNullOrEmpty() ? "" : roomType.RoomTypeName; }); - return rooms; + + var listSource = EntityMapper.MapList(rooms); + + return new ListOutputDto { listSource = listSource }; } #endregion @@ -97,7 +103,7 @@ namespace EOM.TSHotelManagement.Application /// 根据房间状态来查询可使用的房间 /// /// - public List SelectCanUseRoomAll() + public ListOutputDto SelectCanUseRoomAll() { List roomStates = new List(); roomStates = roomStateRepository.GetList(); @@ -112,7 +118,10 @@ namespace EOM.TSHotelManagement.Application var roomType = roomTypes.FirstOrDefault(a => a.RoomTypeId == source.RoomType); source.RoomName = roomType.RoomTypeName.IsNullOrEmpty() ? "" : roomType.RoomTypeName; }); - return rooms; + + var listSource = EntityMapper.MapList(rooms); + + return new ListOutputDto { listSource = listSource }; } #endregion @@ -121,7 +130,7 @@ namespace EOM.TSHotelManagement.Application /// 获取所有房间信息 /// /// - public List SelectRoomAll() + public ListOutputDto SelectRoomAll() { List roomStates = new List(); roomStates = roomStateRepository.GetList(); @@ -147,7 +156,9 @@ namespace EOM.TSHotelManagement.Application : Convert.ToDateTime(source.LastCheckInTime).ToString("yyyy-MM-dd HH:mm"); }); - return rooms; + var listSource = EntityMapper.MapList(rooms); + + return new ListOutputDto { listSource = listSource }; } #endregion @@ -156,12 +167,12 @@ namespace EOM.TSHotelManagement.Application /// 获取房间分区的信息 /// /// - public List SelectRoomByTypeName(string TypeName) + public ListOutputDto SelectRoomByTypeName(ReadRoomInputDto readRoomInputDto) { List roomStates = new List(); roomStates = roomStateRepository.GetList(a => a.IsDelete != 1); List roomTypes = new List(); - roomTypes = roomTypeRepository.GetList(a => a.IsDelete != 1 && a.RoomTypeName == TypeName); + roomTypes = roomTypeRepository.GetList(a => a.IsDelete != 1 && a.RoomTypeName == readRoomInputDto.RoomTypeName); var listTypes = roomTypes.Select(a => a.RoomTypeId).Distinct().ToList(); List rooms = new List(); rooms = roomRepository.GetList(a => a.IsDelete != 1 && listTypes.Contains(a.RoomType)).OrderBy(a => a.RoomNumber).ToList(); @@ -179,7 +190,9 @@ namespace EOM.TSHotelManagement.Application source.CustomerName = custo.IsNullOrEmpty() ? "" : custo.CustomerName; }); - return rooms; + var listSource = EntityMapper.MapList(rooms); + + return new ListOutputDto { listSource = listSource }; } #endregion @@ -187,14 +200,14 @@ namespace EOM.TSHotelManagement.Application /// /// 根据房间编号查询房间信息 /// - /// + /// /// - public Room SelectRoomByRoomNo(string no) + public ReadRoomOutputDto SelectRoomByRoomNo(ReadRoomInputDto readRoomInputDto) { List roomStates = new List(); roomStates = roomStateRepository.GetList(a => a.IsDelete != 1); Room room = new Room(); - room = roomRepository.GetSingle(a => a.IsDelete != 1 && a.RoomNumber == no); + room = roomRepository.GetSingle(a => a.IsDelete != 1 && a.RoomNumber == readRoomInputDto.RoomNumber); if (!room.IsNullOrEmpty()) { var roomSate = roomStates.FirstOrDefault(a => a.RoomStateId == room.RoomStateId); @@ -207,7 +220,9 @@ namespace EOM.TSHotelManagement.Application room = new Room(); } - return room; + var Source = EntityMapper.Map(room); + + return Source; } #endregion @@ -217,15 +232,23 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool UpdateRoomByRoomNo(string room) + public BaseOutputDto UpdateRoomByRoomNo(ReadRoomInputDto room) { - return roomRepository.Update(a => new Room() + try { - CustomerNumber = null, - LastCheckInTime = null, - LastCheckOutTime = DateTime.Now, - RoomStateId = 3 - }, a => a.RoomNumber == room); + roomRepository.Update(a => new Room() + { + CustomerNumber = null, + LastCheckInTime = null, + LastCheckOutTime = DateTime.Now, + RoomStateId = 3 + }, a => a.RoomNumber == room.RoomNumber); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } #endregion @@ -233,11 +256,11 @@ namespace EOM.TSHotelManagement.Application /// /// 根据房间编号查询截止到今天住了多少天 /// - /// + /// /// - public object DayByRoomNo(string roomno) + public object DayByRoomNo(ReadRoomInputDto roomInputDto) { - return Math.Abs(((TimeSpan)(roomRepository.GetSingle(a => a.RoomNumber == roomno).LastCheckInTime - DateTime.Now)).Days); + return Math.Abs(((TimeSpan)(roomRepository.GetSingle(a => a.RoomNumber == roomInputDto.RoomNumber).LastCheckInTime - DateTime.Now)).Days); } #endregion @@ -247,14 +270,22 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool UpdateRoomInfo(Room r) + public BaseOutputDto UpdateRoomInfo(UpdateRoomInputDto r) { - return roomRepository.Update(a => new Room() + try { - LastCheckInTime = r.LastCheckInTime, - RoomStateId = r.RoomStateId, - CustomerNumber = r.CustomerNumber - }, a => a.RoomNumber == r.RoomNumber); + roomRepository.Update(a => new Room() + { + LastCheckInTime = r.LastCheckInTime, + RoomStateId = r.RoomStateId, + CustomerNumber = r.CustomerNumber + }, a => a.RoomNumber == r.RoomNumber); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } #endregion @@ -264,13 +295,21 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool UpdateRoomInfoWithReser(Room r) + public BaseOutputDto UpdateRoomInfoWithReser(UpdateRoomInputDto r) { - return roomRepository.Update(a => new Room() + try { - RoomStateId = r.RoomStateId, - DataChgUsr = r.DataChgUsr - }, a => a.RoomNumber == r.RoomNumber); + roomRepository.Update(a => new Room() + { + RoomStateId = r.RoomStateId, + DataChgUsr = r.DataChgUsr + }, a => a.RoomNumber == r.RoomNumber); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } #endregion @@ -301,9 +340,9 @@ namespace EOM.TSHotelManagement.Application /// 根据房间编号查询房间价格 /// /// - public object SelectRoomByRoomPrice(string r) + public object SelectRoomByRoomPrice(ReadRoomInputDto r) { - return roomRepository.GetSingle(a => a.RoomNumber == r).RoomRent; + return roomRepository.GetSingle(a => a.RoomNumber == r.RoomNumber).RoomRent; } #endregion @@ -344,15 +383,22 @@ namespace EOM.TSHotelManagement.Application /// /// 根据房间编号更改房间状态 /// - /// - /// + /// /// - public bool UpdateRoomStateByRoomNo(string roomno, int stateid) + public BaseOutputDto UpdateRoomStateByRoomNo(ReadRoomInputDto readRoomInputDto) { - return roomRepository.Update(a => new Room() + try { - RoomStateId = stateid - }, a => a.RoomNumber == roomno); + roomRepository.Update(a => new Room() + { + RoomStateId = readRoomInputDto.RoomStateId + }, a => a.RoomNumber == readRoomInputDto.RoomNumber); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } #endregion @@ -362,19 +408,22 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool InsertRoom(Room rn) + public BaseOutputDto InsertRoom(CreateRoomInputDto rn) { try { var isExist = roomRepository.IsAny(a => a.RoomNumber == rn.RoomNumber); if (isExist) - return false; - return roomRepository.Insert(rn); + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString("This room already exists.", "房间已存在。"),StatusCode = StatusCodeConstants.InternalServerError}; + + roomRepository.Insert(EntityMapper.Map(rn)); } - catch (Exception) + catch (Exception ex) { - return false; + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; } + + return new BaseOutputDto(); } #endregion @@ -384,19 +433,21 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool UpdateRoom(Room rn) + public BaseOutputDto UpdateRoom(UpdateRoomInputDto rn) { try { var isExist = roomRepository.IsAny(a => a.RoomNumber == rn.RoomNumber); if (!isExist) - return false; - return roomRepository.Update(rn); + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString("This room does not exist.", "房间不存在。"), StatusCode = StatusCodeConstants.InternalServerError }; + roomRepository.Update(EntityMapper.Map(rn)); } - catch (Exception) + catch (Exception ex) { - return false; + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; } + + return new BaseOutputDto(); } #endregion @@ -406,22 +457,21 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool DeleteRoom(Room rn) + public BaseOutputDto DeleteRoom(DeleteRoomInputDto rn) { try { var isExist = roomRepository.IsAny(a => a.RoomNumber == rn.RoomNumber); if (!isExist) - return false; - rn.IsDelete = 1; - rn.DataChgUsr = rn.DataChgUsr; - rn.DataChgDate = rn.DataChgDate; - return roomRepository.Update(rn); + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString("This room does not exist.", "房间不存在。"), StatusCode = StatusCodeConstants.InternalServerError }; + roomRepository.Update(EntityMapper.Map(rn)); } - catch (Exception) + catch (Exception ex) { - return false; + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; } + + return new BaseOutputDto(); } #endregion @@ -430,7 +480,7 @@ namespace EOM.TSHotelManagement.Application /// 查询所有可消费(已住)房间 /// /// - public List SelectRoomByStateAll() + public ListOutputDto SelectRoomByStateAll() { List roomStates = new List(); roomStates = roomStateRepository.GetList(a => a.IsDelete != 1); @@ -445,7 +495,10 @@ namespace EOM.TSHotelManagement.Application var roomType = roomTypes.FirstOrDefault(a => a.RoomTypeId == source.RoomType); source.RoomName = roomType.RoomTypeName.IsNullOrEmpty() ? "" : roomType.RoomTypeName; }); - return rooms; + + var listSource = EntityMapper.MapList(rooms); + + return new ListOutputDto { listSource = listSource }; } #endregion @@ -454,11 +507,14 @@ namespace EOM.TSHotelManagement.Application /// 获取所有房间状态 /// /// - public List SelectRoomStateAll() + public ListOutputDto SelectRoomStateAll() { List rs = new List(); rs = roomStateRepository.GetList(a => a.IsDelete != 1); - return rs; + + var listSource = EntityMapper.MapList(rs); + + return new ListOutputDto { listSource = listSource }; } #endregion @@ -466,11 +522,11 @@ namespace EOM.TSHotelManagement.Application /// /// 根据房间编号查询房间状态编号 /// - /// + /// /// - public object SelectRoomStateIdByRoomNo(string roomno) + public object SelectRoomStateIdByRoomNo(ReadRoomInputDto readRoomInputDto) { - return roomRepository.GetSingle(a => a.RoomNumber == roomno).RoomStateId; + return roomRepository.GetSingle(a => a.RoomNumber == readRoomInputDto.RoomNumber).RoomStateId; } #endregion } diff --git a/EOM.TSHotelManagement.Application/Business/Room/RoomTypeService.cs b/EOM.TSHotelManagement.Application/Business/Room/RoomTypeService.cs index f973046..9eff6e9 100644 --- a/EOM.TSHotelManagement.Application/Business/Room/RoomTypeService.cs +++ b/EOM.TSHotelManagement.Application/Business/Room/RoomTypeService.cs @@ -21,7 +21,9 @@ *SOFTWARE. * */ +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Util; using EOM.TSHotelManagement.EntityFramework; using jvncorelib.EntityLib; @@ -58,12 +60,12 @@ namespace EOM.TSHotelManagement.Application /// 获取所有房间类型 /// /// - public List SelectRoomTypesAll(int? isDelete) + public ListOutputDto SelectRoomTypesAll(ReadRoomTypeInputDto readRoomTypeInputDto) { List types = new List(); - if (!isDelete.IsNullOrEmpty()) + if (!readRoomTypeInputDto.IsDelete.IsNullOrEmpty()) { - types = roomTypeRepository.GetList(a => a.IsDelete == isDelete); + types = roomTypeRepository.GetList(a => a.IsDelete == readRoomTypeInputDto.IsDelete); } types = roomTypeRepository.GetList(); @@ -71,7 +73,14 @@ namespace EOM.TSHotelManagement.Application { t.DeleteMarkDescription = t.IsDelete == 0 ? "否" : "是"; }); - return types; + + var listSource = EntityMapper.MapList(types); + + return new ListOutputDto + { + listSource = listSource, + total = listSource.Count + }; } #endregion @@ -79,27 +88,33 @@ namespace EOM.TSHotelManagement.Application /// /// 根据房间编号查询房间类型名称 /// - /// + /// /// - public RoomType SelectRoomTypeByRoomNo(string no) + public ReadRoomTypeOutputDto SelectRoomTypeByRoomNo(ReadRoomTypeInputDto readRoomTypeInputDto) { RoomType roomtype = new RoomType(); Room room = new Room(); - room = roomRepository.GetSingle(a => a.RoomNumber == no && a.IsDelete != 1); + room = roomRepository.GetSingle(a => a.RoomNumber == readRoomTypeInputDto.RoomNumber && a.IsDelete != 1); roomtype.RoomTypeName = roomTypeRepository.GetSingle(a => a.RoomTypeId == room.RoomType).RoomTypeName; - return roomtype; + + var source = EntityMapper.Map(roomtype); + + return source; } #endregion /// /// 根据房间类型查询类型配置 /// - /// + /// /// - public RoomType SelectRoomTypeByType(int roomTypeId) + public ReadRoomTypeOutputDto SelectRoomTypeByType(ReadRoomTypeInputDto readRoomTypeInputDto) { - var roomType = roomTypeRepository.GetSingle(a => a.RoomTypeId == roomTypeId); - return roomType; + var roomType = roomTypeRepository.GetSingle(a => a.RoomTypeId == readRoomTypeInputDto.RoomTypeId); + + var source = EntityMapper.Map(roomType); + + return source; } /// @@ -107,12 +122,20 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool InsertRoomType(RoomType roomType) + public BaseOutputDto InsertRoomType(CreateRoomTypeInputDto roomType) { - var existRoomType = roomTypeRepository.IsAny(a => a.RoomTypeId == roomType.RoomTypeId); - if (existRoomType) - return false; - return roomTypeRepository.Insert(roomType); + try + { + var existRoomType = roomTypeRepository.IsAny(a => a.RoomTypeId == roomType.RoomTypeId); + if (existRoomType) + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString("This room state already exists.", "房间状态已存在。"), StatusCode = StatusCodeConstants.InternalServerError }; + roomTypeRepository.Insert(EntityMapper.Map(roomType)); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message,ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } /// @@ -120,17 +143,25 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool UpdateRoomType(RoomType roomType) + public BaseOutputDto UpdateRoomType(UpdateRoomTypeInputDto roomType) { - return roomTypeRepository.Update(a => new RoomType + try + { + roomTypeRepository.Update(a => new RoomType + { + RoomTypeName = roomType.RoomTypeName, + RoomRent = roomType.RoomRent, + RoomDeposit = roomType.RoomDeposit, + IsDelete = roomType.IsDelete, + DataChgUsr = roomType.DataChgUsr, + DataChgDate = roomType.DataChgDate + }, a => a.RoomTypeId == roomType.RoomTypeId); + } + catch (Exception ex) { - RoomTypeName = roomType.RoomTypeName, - RoomRent = roomType.RoomRent, - RoomDeposit = roomType.RoomDeposit, - IsDelete = roomType.IsDelete, - DataChgUsr = roomType.DataChgUsr, - DataChgDate = roomType.DataChgDate - }, a => a.RoomTypeId == roomType.RoomTypeId); + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } /// @@ -138,12 +169,20 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool DeleteRoomType(RoomType roomType) + public BaseOutputDto DeleteRoomType(DeleteRoomTypeInputDto roomType) { - return roomTypeRepository.Update(a => new RoomType + try + { + roomTypeRepository.Update(a => new RoomType + { + IsDelete = 1 + }, a => a.RoomTypeId == roomType.RoomTypeId); + } + catch (Exception ex) { - IsDelete = 1 - }, a => a.RoomTypeId == roomType.RoomTypeId); + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } } } diff --git a/EOM.TSHotelManagement.Application/Business/Sellthing/ISellService.cs b/EOM.TSHotelManagement.Application/Business/Sellthing/ISellService.cs index 4d9df18..5e9e868 100644 --- a/EOM.TSHotelManagement.Application/Business/Sellthing/ISellService.cs +++ b/EOM.TSHotelManagement.Application/Business/Sellthing/ISellService.cs @@ -21,7 +21,7 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Contract; namespace EOM.TSHotelManagement.Application { @@ -34,60 +34,56 @@ namespace EOM.TSHotelManagement.Application /// 查询所有商品 /// /// - List SelectSellThingAll(SellThing sellThing = null); + ListOutputDto SelectSellThingAll(ReadSellThingInputDto sellThing); /// /// 查询所有商品(包括库存为0/已删除) /// /// - List GetSellThings(SellThing sellThing = null); + ListOutputDto GetSellThings(ReadSellThingInputDto sellThing); /// /// 修改商品 /// - /// - /// + /// /// - bool UpdateSellThing(string stock, string sellNo); + BaseOutputDto UpdateSellThing(UpdateSellThingInputDto updateSellThingInputDto); /// /// 修改商品信息 /// /// /// - bool UpdateSellthingInfo(SellThing sellThing); + BaseOutputDto UpdateSellthingInfo(UpdateSellThingInputDto sellThing); /// /// 撤回客户消费信息 /// - /// - /// - /// + /// /// - bool DeleteSellThing(string roomNo, string custoNo, string sellName); + BaseOutputDto DeleteSellThing(DeleteSellThingInputDto deleteSellThingInputDto); /// /// 根据商品编号删除商品信息 /// - /// + /// /// - bool DeleteSellThingBySellNo(string sellNo); + BaseOutputDto DeleteSellThingBySellNo(DeleteSellThingInputDto deleteSellThingInputDto); /// /// 根据商品名称和价格查询商品编号 /// - /// - /// + /// /// - SellThing SelectSellThingByNameAndPrice(string name, string price); + ReadSellThingOutputDto SelectSellThingByNameAndPrice(ReadSellThingInputDto readSellThingInputDto); /// /// 根据商品编号查询商品信息 /// - /// + /// /// - SellThing SelectSellInfoBySellNo(string SellNo); + ReadSellThingOutputDto SelectSellInfoBySellNo(ReadSellThingInputDto readSellThingInputDto); #region 添加商品 /// @@ -95,7 +91,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - bool InsertSellThing(SellThing st); + BaseOutputDto InsertSellThing(CreateSellThingInputDto st); #endregion } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Application/Business/Sellthing/SellService.cs b/EOM.TSHotelManagement.Application/Business/Sellthing/SellService.cs index 32dd29f..4f65bf9 100644 --- a/EOM.TSHotelManagement.Application/Business/Sellthing/SellService.cs +++ b/EOM.TSHotelManagement.Application/Business/Sellthing/SellService.cs @@ -21,7 +21,9 @@ *SOFTWARE. * */ +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Util; using EOM.TSHotelManagement.EntityFramework; using EOM.TSHotelManagement.Shared; using jvncorelib.EntityLib; @@ -59,7 +61,7 @@ namespace EOM.TSHotelManagement.Application /// 查询所有商品 /// /// - public List SelectSellThingAll(SellThing sellThing = null) + public ListOutputDto SelectSellThingAll(ReadSellThingInputDto sellThing) { List sellThings = new List(); var exp = Expressionable.Create().And(a => a.IsDelete == 0 && a.Stock > 0); @@ -89,14 +91,21 @@ namespace EOM.TSHotelManagement.Application _sellThing.ProductPriceFormatted = Decimal.Parse(_sellThing.ProductPrice.ToString()).ToString("#,##0.00").ToString(); }); } - return sellThings; + + var listSource = EntityMapper.MapList(sellThings); + + return new ListOutputDto + { + listSource = listSource, + total = sellThings.Count + }; } /// /// 查询所有商品(包括库存为0/已删除) /// /// - public List GetSellThings(SellThing sellThing = null) + public ListOutputDto GetSellThings(ReadSellThingInputDto sellThing) { List sellThings = new List(); var exp = Expressionable.Create(); @@ -126,22 +135,36 @@ namespace EOM.TSHotelManagement.Application _sellThing.ProductPriceFormatted = Decimal.Parse(_sellThing.ProductPrice.ToString()).ToString("#,##0.00").ToString(); }); } - return sellThings; + + var listSource = EntityMapper.MapList(sellThings); + + return new ListOutputDto + { + listSource = listSource, + total = sellThings.Count + }; } /// /// 更新商品数量 /// - /// - /// + /// /// - public bool UpdateSellThing(string stock, string sellNo) + public BaseOutputDto UpdateSellThing(UpdateSellThingInputDto updateSellThingInputDto) { - return sellThingRepository.Update(a => new SellThing() + try { - Stock = Convert.ToInt32(stock), - DataChgDate = DateTime.Now - }, a => a.ProductNumber == sellNo); + sellThingRepository.Update(a => new SellThing() + { + Stock = Convert.ToInt32(updateSellThingInputDto.Stock), + DataChgDate = DateTime.Now + }, a => a.ProductNumber == updateSellThingInputDto.ProductNumber); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } /// @@ -149,71 +172,97 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool UpdateSellthingInfo(SellThing sellThing) + public BaseOutputDto UpdateSellthingInfo(UpdateSellThingInputDto sellThing) { - return sellThingRepository.Update(a => new SellThing() + try { - ProductName = sellThing.ProductName, - ProductPrice = sellThing.ProductPrice, - Stock = sellThing.Stock, - Specification = sellThing.Specification, - }, a => a.ProductNumber == sellThing.ProductNumber); + sellThingRepository.Update(a => new SellThing() + { + ProductName = sellThing.ProductName, + ProductPrice = sellThing.ProductPrice, + Stock = sellThing.Stock, + Specification = sellThing.Specification, + }, a => a.ProductNumber == sellThing.ProductNumber); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } /// /// 撤回客户消费信息 /// - /// - /// - /// + /// /// - public bool DeleteSellThing(string roomNo, string custoNo, string sellName) + public BaseOutputDto DeleteSellThing(DeleteSellThingInputDto deleteSellThingInputDto) { - return spendRepository.Update(a => new Spend() + try { - IsDelete = 1, - }, a => a.SettlementStatus.Equals(SpendConsts.UnSettle) && a.RoomNumber == roomNo && a.CustomerNumber == custoNo - && a.ProductName == sellName); - + spendRepository.Update(a => new Spend() + { + IsDelete = 1, + }, a => a.SettlementStatus.Equals(SpendConsts.UnSettle) && a.RoomNumber == deleteSellThingInputDto.RoomNumber && a.CustomerNumber == deleteSellThingInputDto.CustomerNumber + && a.ProductName == deleteSellThingInputDto.ProductName); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } /// /// 根据商品编号删除商品信息 /// - /// + /// /// - public bool DeleteSellThingBySellNo(string sellNo) + public BaseOutputDto DeleteSellThingBySellNo(DeleteSellThingInputDto deleteSellThingInputDto) { - return sellThingRepository.Update(a => new SellThing() + try { - IsDelete = 1 - }, a => a.ProductNumber == sellNo); + sellThingRepository.Update(a => new SellThing() + { + IsDelete = 1 + }, a => a.ProductNumber == deleteSellThingInputDto.ProductNumber); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } /// /// 根据商品名称和价格查询商品编号 /// - /// - /// + /// /// - public SellThing SelectSellThingByNameAndPrice(string name, string price) + public ReadSellThingOutputDto SelectSellThingByNameAndPrice(ReadSellThingInputDto readSellThingInputDto) { SellThing sellThing = null; - sellThing = sellThingRepository.GetSingle(a => a.ProductNumber == name && a.ProductPrice == Convert.ToDecimal(price)); - return sellThing; + sellThing = sellThingRepository.GetSingle(a => a.ProductNumber == readSellThingInputDto.ProductName && a.ProductPrice == Convert.ToDecimal(readSellThingInputDto.ProductPrice)); + + var source = EntityMapper.Map(sellThing); + + return source; } /// /// 根据商品编号查询商品信息 /// - /// + /// /// - public SellThing SelectSellInfoBySellNo(string SellNo) + public ReadSellThingOutputDto SelectSellInfoBySellNo(ReadSellThingInputDto readSellThingInputDto) { SellThing st = null; - st = sellThingRepository.GetSingle(a => a.ProductNumber == SellNo && a.IsDelete != 1); - return st; + st = sellThingRepository.GetSingle(a => a.ProductNumber == readSellThingInputDto.ProductNumber && a.IsDelete != 1); + + var source = EntityMapper.Map(st); + + return source; } #region 添加商品 @@ -222,9 +271,17 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool InsertSellThing(SellThing st) + public BaseOutputDto InsertSellThing(CreateSellThingInputDto st) { - return sellThingRepository.Insert(st); + try + { + sellThingRepository.Insert(EntityMapper.Map(st)); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } #endregion } diff --git a/EOM.TSHotelManagement.Application/Business/Spend/ISpendService.cs b/EOM.TSHotelManagement.Application/Business/Spend/ISpendService.cs index cd9f674..aa697fd 100644 --- a/EOM.TSHotelManagement.Application/Business/Spend/ISpendService.cs +++ b/EOM.TSHotelManagement.Application/Business/Spend/ISpendService.cs @@ -21,6 +21,7 @@ *SOFTWARE. * */ +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; namespace EOM.TSHotelManagement.Application @@ -36,34 +37,34 @@ namespace EOM.TSHotelManagement.Application /// /// /// - bool InsertSpendInfo(Spend s); + BaseOutputDto InsertSpendInfo(CreateSpendInputDto s); #endregion #region 根据客户编号查询消费信息 /// /// 根据客户编号查询消费信息 /// - /// + /// /// - List SelectSpendByCustoNo(string No); + ListOutputDto SelectSpendByCustoNo(ReadSpendInputDto readSpendInputDto); #endregion #region 根据房间编号查询消费信息 /// /// 根据房间编号查询消费信息 /// - /// + /// /// - List SelectSpendByRoomNo(string No); + ListOutputDto SelectSpendByRoomNo(ReadSpendInputDto readSpendInputDto); #endregion #region 根据客户编号查询历史消费信息 /// /// 根据客户编号查询历史消费信息 /// - /// + /// /// - List SeletHistorySpendInfoAll(string custoNo); + ListOutputDto SeletHistorySpendInfoAll(ReadSpendInputDto readSpendInputDto); #endregion #region 查询消费的所有信息 @@ -71,7 +72,7 @@ namespace EOM.TSHotelManagement.Application /// 查询消费的所有信息 /// /// - List SelectSpendInfoAll(); + ListOutputDto SelectSpendInfoAll(); #endregion #region 根据房间号查询消费的所有信息 @@ -79,43 +80,41 @@ namespace EOM.TSHotelManagement.Application /// 根据房间号查询消费的所有信息 /// /// - List SelectSpendInfoRoomNo(string RoomNo); + ListOutputDto SelectSpendInfoRoomNo(ReadSpendInputDto readSpendInputDto); #endregion #region 根据房间编号、入住时间到当前时间查询消费总金额 /// /// 根据房间编号、入住时间到当前时间查询消费总金额 /// - /// - /// + /// /// - object SelectMoneyByRoomNoAndTime(string roomno, string custono); + object SelectMoneyByRoomNoAndTime(ReadSpendInputDto readSpendInputDto); #endregion #region 根据房间编号、入住时间和当前时间修改结算状态 /// /// 根据房间编号、入住时间和当前时间修改结算状态 /// - /// - /// + /// /// - bool UpdateMoneyState(string roomno, string checktime); + BaseOutputDto UpdateMoneyState(UpdateSpendInputDto updateSpendInputDto); #endregion #region 将转房前的未结算记录一同转移到新房间 /// /// 将转房前的未结算记录一同转移到新房间 /// - /// + /// /// - bool UpdateSpendInfoByRoomNo(Spend spend); + BaseOutputDto UpdateSpendInfoByRoomNo(UpdateSpendInputDto updateSpendInputDto); #endregion /// /// 更新消费信息 /// - /// + /// /// - bool UpdSpenInfo(Spend spend); + BaseOutputDto UpdSpenInfo(UpdateSpendInputDto updateSpendInputDto); } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Application/Business/Spend/SpendService.cs b/EOM.TSHotelManagement.Application/Business/Spend/SpendService.cs index f8c1d38..dbe1e46 100644 --- a/EOM.TSHotelManagement.Application/Business/Spend/SpendService.cs +++ b/EOM.TSHotelManagement.Application/Business/Spend/SpendService.cs @@ -25,6 +25,8 @@ using EOM.TSHotelManagement.Common.Core; using EOM.TSHotelManagement.EntityFramework; using jvncorelib.EntityLib; using EOM.TSHotelManagement.Shared; +using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Common.Util; namespace EOM.TSHotelManagement.Application { @@ -53,9 +55,17 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool InsertSpendInfo(Spend s) + public BaseOutputDto InsertSpendInfo(CreateSpendInputDto s) { - return spendRepository.Insert(s); + try + { + spendRepository.Insert(EntityMapper.Map(s)); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } #endregion @@ -63,12 +73,12 @@ namespace EOM.TSHotelManagement.Application /// /// 根据客户编号查询消费信息 /// - /// + /// /// - public List SelectSpendByCustoNo(string No) + public ListOutputDto SelectSpendByCustoNo(ReadSpendInputDto readSpendInputDto) { List ls = new List(); - ls = spendRepository.GetList(a => a.CustomerNumber == No && a.SettlementStatus.Equals(SpendConsts.UnSettle) && a.IsDelete != 1); + ls = spendRepository.GetList(a => a.CustomerNumber == readSpendInputDto.CustomerNumber && a.SettlementStatus.Equals(SpendConsts.UnSettle) && a.IsDelete != 1); ls.ForEach(source => { source.SettlementStatusDescription = source.SettlementStatus.IsNullOrEmpty() ? "" @@ -80,7 +90,10 @@ namespace EOM.TSHotelManagement.Application source.ConsumptionAmountFormatted = (source.ConsumptionAmount + "").IsNullOrEmpty() ? "" : Decimal.Parse(source.ConsumptionAmount.ToString()).ToString("#,##0.00").ToString(); }); - return ls; + + var listSource = EntityMapper.MapList(ls); + + return new ListOutputDto { listSource = listSource }; } #endregion @@ -88,12 +101,12 @@ namespace EOM.TSHotelManagement.Application /// /// 根据客户编号查询历史消费信息 /// - /// + /// /// - public List SeletHistorySpendInfoAll(string custoNo) + public ListOutputDto SeletHistorySpendInfoAll(ReadSpendInputDto readSpendInputDto) { List ls = new List(); - ls = spendRepository.GetList(a => a.CustomerNumber == custoNo && a.SettlementStatus.Equals(SpendConsts.Settled) && a.IsDelete != 1); + ls = spendRepository.GetList(a => a.CustomerNumber == readSpendInputDto.CustomerNumber && a.SettlementStatus.Equals(SpendConsts.Settled) && a.IsDelete != 1); ls.ForEach(source => { source.SettlementStatusDescription = source.SettlementStatus.IsNullOrEmpty() ? "" @@ -105,7 +118,10 @@ namespace EOM.TSHotelManagement.Application source.ConsumptionAmountFormatted = (source.ConsumptionAmount + "").IsNullOrEmpty() ? "" : Decimal.Parse(source.ConsumptionAmount.ToString()).ToString("#,##0.00").ToString(); }); - return ls; + + var listSource = EntityMapper.MapList(ls); + + return new ListOutputDto { listSource = listSource }; } #endregion @@ -113,12 +129,12 @@ namespace EOM.TSHotelManagement.Application /// /// 根据房间编号查询消费信息 /// - /// + /// /// - public List SelectSpendByRoomNo(string No) + public ListOutputDto SelectSpendByRoomNo(ReadSpendInputDto readSpendInputDto) { List ls = new List(); - ls = spendRepository.GetList(a => a.RoomNumber == No && a.SettlementStatus.Equals(SpendConsts.UnSettle) && a.IsDelete != 1); + ls = spendRepository.GetList(a => a.RoomNumber == readSpendInputDto.RoomNumber && a.SettlementStatus.Equals(SpendConsts.UnSettle) && a.IsDelete != 1); ls.ForEach(source => { source.SettlementStatusDescription = source.SettlementStatus.IsNullOrEmpty() ? "" @@ -130,7 +146,10 @@ namespace EOM.TSHotelManagement.Application source.ConsumptionAmountFormatted = (source.ConsumptionAmount + "").IsNullOrEmpty() ? "" : Decimal.Parse(source.ConsumptionAmount.ToString()).ToString("#,##0.00").ToString(); }); - return ls; + + var listSource = EntityMapper.MapList(ls); + + return new ListOutputDto { listSource = listSource }; } #endregion @@ -139,7 +158,7 @@ namespace EOM.TSHotelManagement.Application /// 查询消费的所有信息 /// /// - public List SelectSpendInfoAll() + public ListOutputDto SelectSpendInfoAll() { List ls = new List(); ls = spendRepository.GetList(a => a.IsDelete != 1).OrderByDescending(a => a.ConsumptionTime).ToList(); @@ -154,7 +173,10 @@ namespace EOM.TSHotelManagement.Application source.ConsumptionAmountFormatted = (source.ConsumptionAmount + "").IsNullOrEmpty() ? "" : Decimal.Parse(source.ConsumptionAmount.ToString()).ToString("#,##0.00").ToString(); }); - return ls; + + var listSource = EntityMapper.MapList(ls); + + return new ListOutputDto { listSource = listSource }; } #endregion @@ -163,10 +185,10 @@ namespace EOM.TSHotelManagement.Application /// 根据房间号查询消费的所有信息 /// /// - public List SelectSpendInfoRoomNo(string RoomNo) + public ListOutputDto SelectSpendInfoRoomNo(ReadSpendInputDto readSpendInputDto) { List ls = new List(); - ls = spendRepository.GetList(a => a.RoomNumber == RoomNo && a.IsDelete != 1 && a.SettlementStatus.Equals(SpendConsts.UnSettle)); + ls = spendRepository.GetList(a => a.RoomNumber == readSpendInputDto.RoomNumber && a.IsDelete != 1 && a.SettlementStatus.Equals(SpendConsts.UnSettle)); ls.ForEach(source => { source.SettlementStatusDescription = source.SettlementStatus.IsNullOrEmpty() ? "" @@ -178,7 +200,10 @@ namespace EOM.TSHotelManagement.Application source.ConsumptionAmountFormatted = (source.ConsumptionAmount + "").IsNullOrEmpty() ? "" : Decimal.Parse(source.ConsumptionAmount.ToString()).ToString("#,##0.00").ToString(); }); - return ls; + + var listSource = EntityMapper.MapList(ls); + + return new ListOutputDto { listSource = listSource }; } #endregion @@ -186,12 +211,11 @@ namespace EOM.TSHotelManagement.Application /// /// 根据房间编号、入住时间到当前时间查询消费总金额 /// - /// - /// + /// /// - public object SelectMoneyByRoomNoAndTime(string roomno, string custono) + public object SelectMoneyByRoomNoAndTime(ReadSpendInputDto readSpendInputDto) { - return spendRepository.GetList(a => a.RoomNumber == roomno && a.CustomerNumber == custono && a.SettlementStatus.Equals(SpendConsts.UnSettle)).Sum(a => a.ConsumptionAmount); + return spendRepository.GetList(a => a.RoomNumber == readSpendInputDto.RoomNumber && a.CustomerNumber == readSpendInputDto.CustomerNumber && a.SettlementStatus.Equals(SpendConsts.UnSettle)).Sum(a => a.ConsumptionAmount); } #endregion @@ -199,15 +223,22 @@ namespace EOM.TSHotelManagement.Application /// /// 根据房间编号、入住时间和当前时间修改结算状态 /// - /// - /// + /// /// - public bool UpdateMoneyState(string roomno, string checktime) + public BaseOutputDto UpdateMoneyState(UpdateSpendInputDto updateSpendInputDto) { - return spendRepository.Update(a => new Spend() + try + { + spendRepository.Update(a => new Spend() + { + SettlementStatus = SpendConsts.Settled + }, a => a.RoomNumber == updateSpendInputDto.RoomNumber && a.ConsumptionTime >= Convert.ToDateTime(updateSpendInputDto.ConsumptionTime) && a.ConsumptionTime <= Convert.ToDateTime(DateTime.Now)); + } + catch (Exception ex) { - SettlementStatus = SpendConsts.Settled - }, a => a.RoomNumber == roomno && a.ConsumptionTime >= Convert.ToDateTime(checktime) && a.ConsumptionTime <= Convert.ToDateTime(DateTime.Now)); + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } #endregion @@ -217,20 +248,26 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool UpdateSpendInfoByRoomNo(Spend spend) + public BaseOutputDto UpdateSpendInfoByRoomNo(UpdateSpendInputDto spend) { //查询当前用户未结算的数据 var listSpendId = spendRepository.GetList(a => a.CustomerNumber.Equals(spend.CustomerNumber) && a.SettlementStatus.Equals(SpendConsts.UnSettle)) .Select(a => a.ProductName).ToList(); /*spends.Select(a => a.SpendName).Distinct().ToList();*/ - return spendRepository.Update(a => new Spend() + try { - RoomNumber = spend.RoomNumber, - DataChgUsr = spend.DataChgUsr - }, a => listSpendId.Contains(a.ProductName) && a.CustomerNumber.Equals(spend.CustomerNumber) && a.ConsumptionTime >= Convert.ToDateTime(DateTime.Now) - && a.ConsumptionTime <= Convert.ToDateTime(DateTime.Now)); - - + spendRepository.Update(a => new Spend() + { + RoomNumber = spend.RoomNumber, + DataChgUsr = spend.DataChgUsr + }, a => listSpendId.Contains(a.ProductName) && a.CustomerNumber.Equals(spend.CustomerNumber) && a.ConsumptionTime >= Convert.ToDateTime(DateTime.Now) + && a.ConsumptionTime <= Convert.ToDateTime(DateTime.Now)); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } #endregion @@ -239,18 +276,26 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool UpdSpenInfo(Spend spend) + public BaseOutputDto UpdSpenInfo(UpdateSpendInputDto spend) { - return spendRepository.Update(a => new Spend() + try + { + spendRepository.Update(a => new Spend() + { + ConsumptionQuantity = spend.ConsumptionQuantity, + ConsumptionAmount = spend.ConsumptionAmount, + DataChgDate = spend.DataChgDate, + DataChgUsr = spend.DataChgUsr + }, a => a.SettlementStatus.Equals(SpendConsts.UnSettle) + && a.RoomNumber.Equals(spend.RoomNumber) + && a.CustomerNumber.Equals(spend.CustomerNumber) + && a.ProductName.Equals(spend.ProductName)); + } + catch (Exception ex) { - ConsumptionQuantity = spend.ConsumptionQuantity, - ConsumptionAmount = spend.ConsumptionAmount, - DataChgDate = spend.DataChgDate, - DataChgUsr = spend.DataChgUsr - }, a => a.SettlementStatus.Equals(SpendConsts.UnSettle) - && a.RoomNumber.Equals(spend.RoomNumber) - && a.CustomerNumber.Equals(spend.CustomerNumber) - && a.ProductName.Equals(spend.ProductName)); + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } } diff --git a/EOM.TSHotelManagement.Application/Worker/Check/WorkerCheckService.cs b/EOM.TSHotelManagement.Application/Employee/Check/EmployeeCheckService.cs similarity index 68% rename from EOM.TSHotelManagement.Application/Worker/Check/WorkerCheckService.cs rename to EOM.TSHotelManagement.Application/Employee/Check/EmployeeCheckService.cs index 831ee61..e9342e3 100644 --- a/EOM.TSHotelManagement.Application/Worker/Check/WorkerCheckService.cs +++ b/EOM.TSHotelManagement.Application/Employee/Check/EmployeeCheckService.cs @@ -21,7 +21,9 @@ *SOFTWARE. * */ +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Util; using EOM.TSHotelManagement.EntityFramework; namespace EOM.TSHotelManagement.Application @@ -29,7 +31,7 @@ namespace EOM.TSHotelManagement.Application /// /// 员工打卡接口实现类 /// - public class WorkerCheckService : IWorkerCheckService + public class EmployeeCheckService : IEmployeeCheckService { /// /// 员工打卡 @@ -40,7 +42,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public WorkerCheckService(GenericRepository workerCheckRepository) + public EmployeeCheckService(GenericRepository workerCheckRepository) { this.workerCheckRepository = workerCheckRepository; } @@ -50,15 +52,21 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public List SelectCheckInfoByWorkerNo(string wid) + public ListOutputDto SelectCheckInfoByWorkerNo(ReadEmployeeCheckInputDto wid) { List workerChecks = new List(); - workerChecks = workerCheckRepository.GetList(a => a.EmployeeId == wid && a.IsDelete != 1); + workerChecks = workerCheckRepository.GetList(a => a.EmployeeId == wid.EmployeeId && a.IsDelete != 1); workerChecks.ForEach(source => { source.CheckStatusDescription = source.CheckStatus == 0 ? "打卡成功" : "打卡失败"; }); - return workerChecks; + var source = EntityMapper.MapList(workerChecks); + + return new ListOutputDto + { + listSource = source, + total = source.Count + }; } @@ -67,9 +75,9 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public object SelectWorkerCheckDaySumByWorkerNo(string wkn) + public object SelectWorkerCheckDaySumByWorkerNo(ReadEmployeeCheckInputDto wkn) { - return workerCheckRepository.GetList(a => a.EmployeeId == wkn && a.IsDelete != 1).Count; + return workerCheckRepository.GetList(a => a.EmployeeId == wkn.EmployeeId && a.IsDelete != 1).Count; } @@ -78,10 +86,10 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public object SelectToDayCheckInfoByWorkerNo(string wkn) + public object SelectToDayCheckInfoByWorkerNo(ReadEmployeeCheckInputDto wkn) { //string sql = "select Count(*) from WORKERCHECK where WorkerNo = '"+wkn+ "' and DATEDIFF(CURRENT_DATE(),workercheck.CheckTime)"; - var listCheckInfo = workerCheckRepository.GetList(a => a.EmployeeId == wkn && a.IsDelete != 1); + var listCheckInfo = workerCheckRepository.GetList(a => a.EmployeeId == wkn.EmployeeId && a.IsDelete != 1); var count = listCheckInfo.Where(a => a.CheckTime.ToShortDateString() == Convert.ToDateTime(DateTime.Now).ToShortDateString()).Count() > 0 ? 1 : 0; return count; } @@ -91,9 +99,17 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool AddCheckInfo(EmployeeCheck workerCheck) + public BaseOutputDto AddCheckInfo(CreateEmployeeCheckInputDto workerCheck) { - return workerCheckRepository.Insert(workerCheck); + try + { + workerCheckRepository.Insert(EntityMapper.Map(workerCheck)); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } } } diff --git a/EOM.TSHotelManagement.Application/Worker/Check/IWorkerCheckService.cs b/EOM.TSHotelManagement.Application/Employee/Check/IEmployeeCheckService.cs similarity index 81% rename from EOM.TSHotelManagement.Application/Worker/Check/IWorkerCheckService.cs rename to EOM.TSHotelManagement.Application/Employee/Check/IEmployeeCheckService.cs index 01f3795..ff61992 100644 --- a/EOM.TSHotelManagement.Application/Worker/Check/IWorkerCheckService.cs +++ b/EOM.TSHotelManagement.Application/Employee/Check/IEmployeeCheckService.cs @@ -21,6 +21,7 @@ *SOFTWARE. * */ +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; namespace EOM.TSHotelManagement.Application @@ -28,34 +29,34 @@ namespace EOM.TSHotelManagement.Application /// /// 员工打卡接口 /// - public interface IWorkerCheckService + public interface IEmployeeCheckService { /// /// 根据员工编号查询其所有的打卡记录 /// /// /// - List SelectCheckInfoByWorkerNo(string wid); + ListOutputDto SelectCheckInfoByWorkerNo(ReadEmployeeCheckInputDto wid); /// /// 查询员工签到天数 /// /// /// - object SelectWorkerCheckDaySumByWorkerNo(string wkn); + object SelectWorkerCheckDaySumByWorkerNo(ReadEmployeeCheckInputDto wkn); /// /// 查询今天员工是否已签到 /// /// /// - object SelectToDayCheckInfoByWorkerNo(string wkn); + object SelectToDayCheckInfoByWorkerNo(ReadEmployeeCheckInputDto wkn); /// /// 添加员工打卡数据 /// /// /// - bool AddCheckInfo(EmployeeCheck workerCheck); + BaseOutputDto AddCheckInfo(CreateEmployeeCheckInputDto workerCheck); } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Application/Worker/WorkerService.cs b/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs similarity index 53% rename from EOM.TSHotelManagement.Application/Worker/WorkerService.cs rename to EOM.TSHotelManagement.Application/Employee/EmployeeService.cs index f9c84d0..6c7c0f1 100644 --- a/EOM.TSHotelManagement.Application/Worker/WorkerService.cs +++ b/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs @@ -21,13 +21,17 @@ *SOFTWARE. * */ +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Util; using EOM.TSHotelManagement.EntityFramework; using EOM.TSHotelManagement.Shared; using jvncorelib.EncryptorLib; using jvncorelib.EntityLib; +using Microsoft.AspNetCore.DataProtection; using Microsoft.IdentityModel.Tokens; using SqlSugar; +using SqlSugar.DistributedSystem.Snowflake; using System.IdentityModel.Tokens.Jwt; using System.Security.Claims; using System.Text; @@ -48,7 +52,8 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public class WorkerService(GenericRepository workerRepository, GenericRepository sexTypeRepository, GenericRepository educationRepository, GenericRepository nationRepository, GenericRepository deptRepository, GenericRepository positionRepository, EncryptLib encrypt, IJwtConfigFactory jwtConfigFactory) : IWorkerService + /// + public class EmployeeService(GenericRepository workerRepository, GenericRepository sexTypeRepository, GenericRepository educationRepository, GenericRepository nationRepository, GenericRepository deptRepository, GenericRepository positionRepository, EncryptLib encrypt, IJwtConfigFactory jwtConfigFactory, IDataProtectionProvider dataProtectionProvider) : IEmployeeService { /// /// 员工信息 @@ -85,102 +90,146 @@ namespace EOM.TSHotelManagement.Application /// private readonly jvncorelib.EncryptorLib.EncryptLib encrypt = encrypt; + /// + /// 数据保护 + /// + private readonly IDataProtector dataProtector = dataProtectionProvider.CreateProtector("EmployeeInfoProtector"); + /// /// JWT加密 /// private readonly IJwtConfigFactory _jwtConfigFactory = jwtConfigFactory; - - #region 修改员工信息 + /// /// 修改员工信息 /// - /// + /// /// - public bool UpdateWorker(Employee worker) + public BaseOutputDto UpdateEmployee(UpdateEmployeeInputDto updateEmployeeInputDto) { - //加密联系方式 - var sourceTelStr = string.Empty; - if (!worker.PhoneNumber.IsNullOrEmpty()) + try { - sourceTelStr = encrypt.Encryption(worker.PhoneNumber, EncryptionLevel.Enhanced); + //加密联系方式 + var sourceTelStr = string.Empty; + if (!updateEmployeeInputDto.PhoneNumber.IsNullOrEmpty()) + { + sourceTelStr = dataProtector.Protect(updateEmployeeInputDto.PhoneNumber); + } + //加密身份证 + var sourceIdStr = string.Empty; + if (!updateEmployeeInputDto.IdCardNumber.IsNullOrEmpty()) + { + sourceIdStr = dataProtector.Protect(updateEmployeeInputDto.IdCardNumber); + } + updateEmployeeInputDto.PhoneNumber = sourceTelStr; + updateEmployeeInputDto.IdCardNumber = sourceIdStr; + + workerRepository.Update(a => new Employee() + { + EmployeeName = updateEmployeeInputDto.EmployeeName, + PhoneNumber = updateEmployeeInputDto.PhoneNumber, + Address = updateEmployeeInputDto.Address, + PoliticalAffiliation = updateEmployeeInputDto.PoliticalAffiliation, + EducationLevel = updateEmployeeInputDto.EducationLevel, + Ethnicity = updateEmployeeInputDto.Ethnicity, + IdCardNumber = updateEmployeeInputDto.IdCardNumber, + Gender = updateEmployeeInputDto.Gender, + DateOfBirth = updateEmployeeInputDto.DateOfBirth, + DataChgUsr = updateEmployeeInputDto.DataChgUsr + }, a => a.EmployeeId.Equals(updateEmployeeInputDto.EmployeeId)); } - //加密身份证 - var sourceIdStr = string.Empty; - if (!worker.IdCardNumber.IsNullOrEmpty()) + catch (Exception ex) { - sourceIdStr = encrypt.Encryption(worker.IdCardNumber, EncryptionLevel.Enhanced); + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; } - worker.PhoneNumber = sourceTelStr; - worker.IdCardNumber = sourceIdStr; - return workerRepository.Update(a => new Employee() - { - EmployeeName = worker.EmployeeName, - PhoneNumber = worker.PhoneNumber, - Address = worker.Address, - PoliticalAffiliation = worker.PoliticalAffiliation, - EducationLevel = worker.EducationLevel, - Ethnicity = worker.Ethnicity, - IdCardNumber = worker.IdCardNumber, - Gender = worker.Gender, - DateOfBirth = worker.DateOfBirth, - DataChgUsr = worker.DataChgUsr - }, a => a.EmployeeId.Equals(worker.EmployeeId)); + return new BaseOutputDto(); } - #endregion /// /// 员工账号禁/启用 /// - /// + /// /// - public bool ManagerWorkerAccount(Employee worker) + public BaseOutputDto ManagerEmployeeAccount(UpdateEmployeeInputDto updateEmployeeInputDto) { - return workerRepository.Update(a => new Employee() + try { - IsDelete = worker.IsDelete - }, a => a.EmployeeId == worker.EmployeeId); + workerRepository.Update(a => new Employee() + { + IsDelete = updateEmployeeInputDto.IsDelete + }, a => a.EmployeeId == updateEmployeeInputDto.EmployeeId); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } /// /// 更新员工职位和部门 /// - /// + /// /// - public bool UpdateWorkerPositionAndClub(Employee worker) + public BaseOutputDto UpdateEmployeePositionAndClub(UpdateEmployeeInputDto updateEmployeeInputDto) { - return workerRepository.Update(a => new Employee() + try { - Department = worker.Department, - Position = worker.Position, - DataChgUsr = worker.DataChgUsr, - DataChgDate = worker.DataChgDate - }, a => a.EmployeeId == worker.EmployeeId); + workerRepository.Update(a => new Employee() + { + Department = updateEmployeeInputDto.Department, + Position = updateEmployeeInputDto.Position, + DataChgUsr = updateEmployeeInputDto.DataChgUsr, + DataChgDate = updateEmployeeInputDto.DataChgDate + }, a => a.EmployeeId == updateEmployeeInputDto.EmployeeId); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } - #region 添加员工信息 /// /// 添加员工信息 /// - /// + /// /// - public bool AddWorker(Employee worker) + public BaseOutputDto AddEmployee(CreateEmployeeInputDto createEmployeeInputDto) { - string NewID = encrypt.Encryption(worker.IdCardNumber); - string NewTel = encrypt.Encryption(worker.PhoneNumber); - worker.IdCardNumber = NewID; - worker.PhoneNumber = NewTel; - return workerRepository.Insert(worker); + try + { + //加密联系方式 + var sourceTelStr = string.Empty; + if (!createEmployeeInputDto.PhoneNumber.IsNullOrEmpty()) + { + sourceTelStr = dataProtector.Protect(createEmployeeInputDto.PhoneNumber); + } + //加密身份证 + var sourceIdStr = string.Empty; + if (!createEmployeeInputDto.IdCardNumber.IsNullOrEmpty()) + { + sourceIdStr = dataProtector.Protect(createEmployeeInputDto.IdCardNumber); + } + createEmployeeInputDto.PhoneNumber = sourceTelStr; + createEmployeeInputDto.IdCardNumber = sourceIdStr; + + workerRepository.Insert(EntityMapper.Map(createEmployeeInputDto)); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } - #endregion - #region 获取所有工作人员信息 /// /// 获取所有工作人员信息 /// /// - public List SelectWorkerAll() + public ListOutputDto SelectEmployeeAll(ReadEmployeeInputDto readEmployeeInputDto) { var where = Expressionable.Create(); @@ -202,17 +251,27 @@ namespace EOM.TSHotelManagement.Application List positions = new List(); positions = positionRepository.GetList(a => a.IsDelete != 1); //查询所有员工信息 - List workers = new List(); + List employees = new List(); + + var count = 0; - workers = workerRepository.GetList(where.ToExpression()); - workers.ForEach(source => + employees = workerRepository.AsQueryable().Where(where.ToExpression()).ToPageList(readEmployeeInputDto.Page, readEmployeeInputDto.PageSize,ref count); + employees.ForEach(source => { - //解密身份证号码 - var sourceStr = source.IdCardNumber.Contains("·") ? encrypt.Decryption(source.IdCardNumber) : source.IdCardNumber; - source.IdCardNumber = sourceStr; - //解密联系方式 - var sourceTelStr = source.PhoneNumber.Contains("·") ? encrypt.Decryption(source.PhoneNumber) : source.PhoneNumber; - source.PhoneNumber = sourceTelStr; + try + { + //解密身份证号码 + var sourceStr = source.IdCardNumber.Contains('·') ? encrypt.Decryption(source.IdCardNumber) : dataProtector.Unprotect(source.IdCardNumber); + source.IdCardNumber = sourceStr; + //解密联系方式 + var sourceTelStr = source.PhoneNumber.Contains('·') ? encrypt.Decryption(source.PhoneNumber) : dataProtector.Unprotect(source.PhoneNumber); + source.PhoneNumber = sourceTelStr; + } + catch (Exception) + { + source.IdCardNumber = source.IdCardNumber; + source.PhoneNumber = source.PhoneNumber; + } //性别类型 var sexType = sexTypes.FirstOrDefault(a => a.GenderId == source.Gender); source.GenderName = sexType.IsNullOrEmpty() ? "" : sexType.GenderName; @@ -230,32 +289,32 @@ namespace EOM.TSHotelManagement.Application source.PositionName = position.IsNullOrEmpty() ? "" : position.PositionName; }); - return workers; + var listSource = EntityMapper.MapList(employees); + + return new ListOutputDto { listSource = listSource,total = count }; } /// /// 根据部门ID获取工作人员信息 /// - /// + /// /// - public bool CheckWorkerBydepartment(string deptNo) + public BaseOutputDto CheckEmployeeByDepartment(ReadEmployeeInputDto readEmployeeInputDto) { - var workers = workerRepository.Count(a => a.Department.Equals(deptNo)); + var workers = workerRepository.Count(a => a.Department.Equals(readEmployeeInputDto.Department)); - return workers > 0 ? true : false; + return new BaseOutputDto { Message = workers > 0 ? true.ToString() : false.ToString(), StatusCode = StatusCodeConstants.Success }; } - #endregion - #region 根据登录名称查询员工信息 /// /// 根据登录名称查询员工信息 /// - /// + /// /// - public Employee SelectWorkerInfoByWorkerId(string workerId) + public SingleOutputDto SelectEmployeeInfoByEmployeeId(ReadEmployeeInputDto readEmployeeInputDto) { Employee w = new Employee(); - w = workerRepository.GetSingle(a => a.EmployeeId == workerId); + w = workerRepository.GetSingle(a => a.EmployeeId == readEmployeeInputDto.EmployeeId); //解密身份证号码 var sourceStr = w.IdCardNumber.Contains("·") ? encrypt.Decryption(w.IdCardNumber) : w.IdCardNumber; w.IdCardNumber = sourceStr; @@ -277,33 +336,34 @@ namespace EOM.TSHotelManagement.Application //职位 var position = positionRepository.GetSingle(a => a.PositionNumber == w.Position); w.PositionName = position.PositionName.IsNullOrEmpty() ? "" : position.PositionName; - return w; + + var source = EntityMapper.Map(w); + + return new SingleOutputDto { Source = source}; } - #endregion - #region 根据登录名称、密码查询员工信息 /// /// 根据登录名称、密码查询员工信息 /// - /// + /// /// - public Employee SelectWorkerInfoByWorkerIdAndWorkerPwd(Employee worker) + public SingleOutputDto SelectEmployeeInfoByEmployeeIdAndEmployeePwd(ReadEmployeeInputDto readEmployeeInputDto) { Employee w = new Employee(); - w = workerRepository.GetSingle(a => a.EmployeeId == worker.EmployeeId); + w = workerRepository.GetSingle(a => a.EmployeeId == readEmployeeInputDto.EmployeeId); if (w == null) { w = null; - return w; + return new SingleOutputDto { Source = null }; } var frontEncryed = encrypt.Encryption(w.Password, EncryptionLevel.Enhanced); - var backEncryed = encrypt.Encryption(worker.Password, EncryptionLevel.Enhanced); + var backEncryed = encrypt.Encryption(w.Password, EncryptionLevel.Enhanced); if (!encrypt.Compare(frontEncryed, backEncryed)) { w = null; - return w; + return new SingleOutputDto { Source = EntityMapper.Map(w) }; } w.Password = ""; //性别类型 @@ -341,23 +401,32 @@ namespace EOM.TSHotelManagement.Application var token = tokenHandler.CreateToken(tokenDescriptor); w.UserToken = tokenHandler.WriteToken(token); - return w; + return new SingleOutputDto { Source = EntityMapper.Map(w) }; } - #endregion /// /// 根据员工编号和密码修改密码 /// - /// + /// /// - public bool UpdWorkerPwdByWorkNo(Employee worker) + public BaseOutputDto UpdEmployeePwdByWorkNo(UpdateEmployeeInputDto updateEmployeeInputDto) { - string NewPwd = encrypt.Decryption(worker.Password); - return workerRepository.Update(a => new Employee() + try { - Password = NewPwd, - DataChgUsr = worker.DataChgUsr - }, a => a.EmployeeId == worker.EmployeeId); + string NewPwd = dataProtector.Protect(updateEmployeeInputDto.Password); + + workerRepository.Update(a => new Employee() + { + Password = NewPwd, + DataChgUsr = updateEmployeeInputDto.DataChgUsr + }, a => a.EmployeeId == updateEmployeeInputDto.EmployeeId); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + + return new BaseOutputDto(); } } diff --git a/EOM.TSHotelManagement.Application/Worker/History/WorkerHistoryService.cs b/EOM.TSHotelManagement.Application/Employee/History/EmployeeHistoryService.cs similarity index 65% rename from EOM.TSHotelManagement.Application/Worker/History/WorkerHistoryService.cs rename to EOM.TSHotelManagement.Application/Employee/History/EmployeeHistoryService.cs index c706f30..440b293 100644 --- a/EOM.TSHotelManagement.Application/Worker/History/WorkerHistoryService.cs +++ b/EOM.TSHotelManagement.Application/Employee/History/EmployeeHistoryService.cs @@ -21,7 +21,9 @@ *SOFTWARE. * */ +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Util; using EOM.TSHotelManagement.EntityFramework; namespace EOM.TSHotelManagement.Application @@ -29,7 +31,7 @@ namespace EOM.TSHotelManagement.Application /// /// 员工履历接口实现类 /// - public class WorkerHistoryService : IWorkerHistoryService + public class EmployeeHistoryService : IEmployeeHistoryService { /// /// 员工履历 @@ -40,7 +42,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public WorkerHistoryService(GenericRepository workerHistoryRepository) + public EmployeeHistoryService(GenericRepository workerHistoryRepository) { this.workerHistoryRepository = workerHistoryRepository; } @@ -50,9 +52,17 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool AddHistoryByWorkerId(EmployeeHistory workerHistory) + public BaseOutputDto AddHistoryByWorkerId(CreateEmployeeHistoryInputDto workerHistory) { - return workerHistoryRepository.Insert(workerHistory); + try + { + workerHistoryRepository.Insert(EntityMapper.Map(workerHistory)); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } /// @@ -60,11 +70,12 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public List SelectHistoryByWorkerId(string wid) + public ListOutputDto SelectHistoryByWorkerId(ReadEmployeeHistoryInputDto wid) { List why = new List(); - why = workerHistoryRepository.GetList(a => a.IsDelete != 1 && a.EmployeeId == wid); - return why; + why = workerHistoryRepository.GetList(a => a.IsDelete != 1 && a.EmployeeId == wid.EmployeeId); + var source = EntityMapper.MapList(why); + return new ListOutputDto { listSource = source, total = source.Count }; } } } diff --git a/EOM.TSHotelManagement.Application/Worker/History/IWorkerHistoryService.cs b/EOM.TSHotelManagement.Application/Employee/History/IEmployeeHistoryService.cs similarity index 84% rename from EOM.TSHotelManagement.Application/Worker/History/IWorkerHistoryService.cs rename to EOM.TSHotelManagement.Application/Employee/History/IEmployeeHistoryService.cs index 77c7e43..3095353 100644 --- a/EOM.TSHotelManagement.Application/Worker/History/IWorkerHistoryService.cs +++ b/EOM.TSHotelManagement.Application/Employee/History/IEmployeeHistoryService.cs @@ -21,27 +21,27 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Contract; namespace EOM.TSHotelManagement.Application { /// /// 员工履历信息接口 /// - public interface IWorkerHistoryService + public interface IEmployeeHistoryService { /// /// 根据工号添加员工履历 /// /// /// - bool AddHistoryByWorkerId(EmployeeHistory workerHistory); + BaseOutputDto AddHistoryByWorkerId(CreateEmployeeHistoryInputDto workerHistory); /// /// 根据工号查询履历信息 /// /// /// - List SelectHistoryByWorkerId(string wid); + ListOutputDto SelectHistoryByWorkerId(ReadEmployeeHistoryInputDto wid); } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Application/Worker/IWorkerService.cs b/EOM.TSHotelManagement.Application/Employee/IEmployeeService.cs similarity index 62% rename from EOM.TSHotelManagement.Application/Worker/IWorkerService.cs rename to EOM.TSHotelManagement.Application/Employee/IEmployeeService.cs index a19efa0..8ba9459 100644 --- a/EOM.TSHotelManagement.Application/Worker/IWorkerService.cs +++ b/EOM.TSHotelManagement.Application/Employee/IEmployeeService.cs @@ -21,6 +21,7 @@ *SOFTWARE. * */ +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; namespace EOM.TSHotelManagement.Application @@ -28,80 +29,69 @@ namespace EOM.TSHotelManagement.Application /// /// 员工信息接口 /// - public interface IWorkerService + public interface IEmployeeService { - #region 修改员工信息 /// /// 修改员工信息 /// - /// + /// /// - bool UpdateWorker(Employee worker); - #endregion + BaseOutputDto UpdateEmployee(UpdateEmployeeInputDto updateEmployeeInputDto); /// /// 员工账号禁/启用 /// - /// + /// /// - bool ManagerWorkerAccount(Employee worker); + BaseOutputDto ManagerEmployeeAccount(UpdateEmployeeInputDto updateEmployeeInputDto); /// /// 更新员工职位和部门 /// - /// + /// /// - bool UpdateWorkerPositionAndClub(Employee worker); + BaseOutputDto UpdateEmployeePositionAndClub(UpdateEmployeeInputDto updateEmployeeInputDto); - #region 添加员工信息 /// /// 添加员工信息 /// - /// + /// /// - bool AddWorker(Employee worker); - #endregion + BaseOutputDto AddEmployee(CreateEmployeeInputDto createEmployeeInputDto); - #region 获取所有工作人员信息 /// /// 获取所有工作人员信息 /// /// - List SelectWorkerAll(); + ListOutputDto SelectEmployeeAll(ReadEmployeeInputDto readEmployeeInputDto); /// /// 检查指定部门下是否存在工作人员 /// - /// + /// /// - bool CheckWorkerBydepartment(string deptNo); - #endregion + BaseOutputDto CheckEmployeeByDepartment(ReadEmployeeInputDto readEmployeeInputDto); - #region 根据登录名称查询员工信息 /// /// 根据登录名称查询员工信息 /// - /// + /// /// - Employee SelectWorkerInfoByWorkerId(string workerId); - #endregion + SingleOutputDto SelectEmployeeInfoByEmployeeId(ReadEmployeeInputDto readEmployeeInputDto); - #region 根据登录名称、密码查询员工信息 /// /// 根据登录名称、密码查询员工信息 /// - /// + /// /// - Employee SelectWorkerInfoByWorkerIdAndWorkerPwd(Employee worker); - #endregion - + SingleOutputDto SelectEmployeeInfoByEmployeeIdAndEmployeePwd(ReadEmployeeInputDto readEmployeeInputDto); /// /// 根据员工编号和密码修改密码 /// - /// + /// /// - bool UpdWorkerPwdByWorkNo(Employee worker); + BaseOutputDto UpdEmployeePwdByWorkNo(UpdateEmployeeInputDto updateEmployeeInputDto); } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Application/Worker/Picture/WorkerPicService.cs b/EOM.TSHotelManagement.Application/Employee/Photo/EmployeePhotoService.cs similarity index 34% rename from EOM.TSHotelManagement.Application/Worker/Picture/WorkerPicService.cs rename to EOM.TSHotelManagement.Application/Employee/Photo/EmployeePhotoService.cs index 8e26cd2..be0ffd2 100644 --- a/EOM.TSHotelManagement.Application/Worker/Picture/WorkerPicService.cs +++ b/EOM.TSHotelManagement.Application/Employee/Photo/EmployeePhotoService.cs @@ -1,4 +1,6 @@ -using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Util; using EOM.TSHotelManagement.EntityFramework; using jvncorelib.EntityLib; @@ -7,7 +9,7 @@ namespace EOM.TSHotelManagement.Application /// /// 员工照片接口实现类 /// - public class WorkerPicService : IWorkerPicService + public class EmployeePhotoService : IEmployeePhotoService { /// /// 员工照片 @@ -24,7 +26,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public WorkerPicService(GenericRepository workerPicRepository, jvncorelib.EncryptorLib.EncryptLib encrypt) + public EmployeePhotoService(GenericRepository workerPicRepository, jvncorelib.EncryptorLib.EncryptLib encrypt) { this.workerPicRepository = workerPicRepository; this.encrypt = encrypt; @@ -33,56 +35,80 @@ namespace EOM.TSHotelManagement.Application /// /// 查询员工照片 /// - /// + /// /// - public EmployeePhoto EmployeePhoto(EmployeePhoto workerPic) + public ReadEmployeePhotoOutputDto EmployeePhoto(ReadEmployeePhotoInputDto readEmployeePhotoInputDto) { var workerPicSource = new EmployeePhoto(); - workerPicSource = workerPicRepository.GetSingle(a => a.EmployeeId.Equals(workerPic.EmployeeId)); + workerPicSource = workerPicRepository.GetSingle(a => a.EmployeeId.Equals(readEmployeePhotoInputDto.EmployeeId)); if (workerPicSource.IsNullOrEmpty()) { - return new EmployeePhoto { Id = 0, PhotoPath = "", EmployeeId = workerPic.EmployeeId }; + return new ReadEmployeePhotoOutputDto { PhotoId = 0, PhotoUrl = "", EmployeeId = readEmployeePhotoInputDto.EmployeeId }; } - return workerPicSource; + return EntityMapper.Map(workerPicSource); } /// /// 添加员工照片 /// - /// + /// /// - public bool InsertWorkerPic(EmployeePhoto workerPic) + public BaseOutputDto InsertWorkerPhoto(CreateEmployeePhotoInputDto createEmployeePhotoInputDto) { - return workerPicRepository.Insert(new EmployeePhoto + try { - EmployeeId = workerPic.EmployeeId, - PhotoPath = workerPic.PhotoPath - }); + workerPicRepository.Insert(new EmployeePhoto + { + EmployeeId = createEmployeePhotoInputDto.EmployeeId, + PhotoPath = createEmployeePhotoInputDto.PhotoUrl + }); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } /// /// 删除员工照片 /// - /// + /// /// - public bool DeleteWorkerPic(EmployeePhoto workerPic) + public BaseOutputDto DeleteWorkerPhoto(DeleteEmployeePhotoInputDto deleteEmployeePhotoInputDto) { - return workerPicRepository.Delete(a => a.EmployeeId.Equals(workerPic.EmployeeId)); + try + { + workerPicRepository.Delete(a => a.EmployeeId.Equals(deleteEmployeePhotoInputDto.EmployeeId)); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } /// /// 更新员工照片 /// - /// + /// /// - public bool UpdateWorkerPic(EmployeePhoto workerPic) + public BaseOutputDto UpdateWorkerPhoto(UpdateEmployeePhotoInputDto updateEmployeePhotoInputDto) { - return workerPicRepository.Update(a => new EmployeePhoto + try { - PhotoPath = workerPic.PhotoPath - }, a => a.EmployeeId.Equals(workerPic.EmployeeId)); + workerPicRepository.Update(a => new EmployeePhoto + { + PhotoPath = updateEmployeePhotoInputDto.PhotoUrl + }, a => a.EmployeeId.Equals(updateEmployeePhotoInputDto.EmployeeId)); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } } } diff --git a/EOM.TSHotelManagement.Application/Worker/Picture/IWorkerPicService.cs b/EOM.TSHotelManagement.Application/Employee/Photo/IEmployeePhotoService.cs similarity index 43% rename from EOM.TSHotelManagement.Application/Worker/Picture/IWorkerPicService.cs rename to EOM.TSHotelManagement.Application/Employee/Photo/IEmployeePhotoService.cs index 855bc26..bff614b 100644 --- a/EOM.TSHotelManagement.Application/Worker/Picture/IWorkerPicService.cs +++ b/EOM.TSHotelManagement.Application/Employee/Photo/IEmployeePhotoService.cs @@ -1,35 +1,35 @@ -using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Contract; namespace EOM.TSHotelManagement.Application { /// /// 员工照片模块接口 /// - public interface IWorkerPicService + public interface IEmployeePhotoService { /// /// 查询员工照片 /// - /// + /// /// - EmployeePhoto EmployeePhoto(EmployeePhoto workerPic); + ReadEmployeePhotoOutputDto EmployeePhoto(ReadEmployeePhotoInputDto readEmployeePhotoInputDto); /// /// 添加员工照片 /// - /// + /// /// - bool InsertWorkerPic(EmployeePhoto workerPic); + BaseOutputDto InsertWorkerPhoto(CreateEmployeePhotoInputDto createEmployeePhotoInputDto); /// /// 删除员工照片 /// - /// + /// /// - bool DeleteWorkerPic(EmployeePhoto workerPic); + BaseOutputDto DeleteWorkerPhoto(DeleteEmployeePhotoInputDto deleteEmployeePhotoInputDto); /// /// 更新员工照片 /// - /// + /// /// - bool UpdateWorkerPic(EmployeePhoto workerPic); + BaseOutputDto UpdateWorkerPhoto(UpdateEmployeePhotoInputDto updateEmployeePhotoInputDto); } } diff --git a/EOM.TSHotelManagement.Application/Worker/GoodBad/IWorkerGoodBadService.cs b/EOM.TSHotelManagement.Application/Employee/RewardPunishment/IRewardPunishmentService.cs similarity index 83% rename from EOM.TSHotelManagement.Application/Worker/GoodBad/IWorkerGoodBadService.cs rename to EOM.TSHotelManagement.Application/Employee/RewardPunishment/IRewardPunishmentService.cs index 7a0868d..2541f97 100644 --- a/EOM.TSHotelManagement.Application/Worker/GoodBad/IWorkerGoodBadService.cs +++ b/EOM.TSHotelManagement.Application/Employee/RewardPunishment/IRewardPunishmentService.cs @@ -21,27 +21,27 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Contract; namespace EOM.TSHotelManagement.Application { /// /// 员工奖惩信息接口 /// - public interface IWorkerGoodBadService + public interface IRewardPunishmentService { /// /// 添加员工奖惩记录 /// /// /// - bool AddGoodBad(EmployeeRewardPunishment goodBad); + BaseOutputDto AddRewardPunishment(CreateEmployeeRewardPunishmentInputDto goodBad); /// /// 根据工号查找所有的奖惩记录信息 /// /// /// - List SelectAllGoodBadByWorkNo(string wn); + ListOutputDto SelectAllRewardPunishmentByWorkNo(ReadEmployeeRewardPunishmentInputDto wn); } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Application/Worker/GoodBad/WorkerGoodBadService.cs b/EOM.TSHotelManagement.Application/Employee/RewardPunishment/RewardPunishmentService.cs similarity index 65% rename from EOM.TSHotelManagement.Application/Worker/GoodBad/WorkerGoodBadService.cs rename to EOM.TSHotelManagement.Application/Employee/RewardPunishment/RewardPunishmentService.cs index 46a833f..e75a079 100644 --- a/EOM.TSHotelManagement.Application/Worker/GoodBad/WorkerGoodBadService.cs +++ b/EOM.TSHotelManagement.Application/Employee/RewardPunishment/RewardPunishmentService.cs @@ -21,7 +21,9 @@ *SOFTWARE. * */ +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Util; using EOM.TSHotelManagement.EntityFramework; using jvncorelib.EntityLib; @@ -30,12 +32,12 @@ namespace EOM.TSHotelManagement.Application /// /// 员工奖惩记录接口实现类 /// - public class WorkerGoodBadService : IWorkerGoodBadService + public class RewardPunishmentService : IRewardPunishmentService { /// /// 员工奖惩记录 /// - private readonly GenericRepository workerGoogBadRepository; + private readonly GenericRepository rewardPunishmentRepository; /// /// 管理员记录 @@ -45,17 +47,17 @@ namespace EOM.TSHotelManagement.Application /// /// 奖惩类型 /// - private readonly GenericRepository goodbadTypeRepository; + private readonly GenericRepository goodbadTypeRepository; /// /// /// - /// + /// /// /// - public WorkerGoodBadService(GenericRepository workerGoogBadRepository, GenericRepository adminRepository, GenericRepository goodbadTypeRepository) + public RewardPunishmentService(GenericRepository rewardPunishmentRepository, GenericRepository adminRepository, GenericRepository goodbadTypeRepository) { - this.workerGoogBadRepository = workerGoogBadRepository; + this.rewardPunishmentRepository = rewardPunishmentRepository; this.adminRepository = adminRepository; this.goodbadTypeRepository = goodbadTypeRepository; } @@ -65,9 +67,17 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool AddGoodBad(EmployeeRewardPunishment goodBad) + public BaseOutputDto AddRewardPunishment(CreateEmployeeRewardPunishmentInputDto goodBad) { - return workerGoogBadRepository.Insert(goodBad); + try + { + rewardPunishmentRepository.Insert(EntityMapper.Map(goodBad)); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } /// @@ -75,15 +85,15 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public List SelectAllGoodBadByWorkNo(string wn) + public ListOutputDto SelectAllRewardPunishmentByWorkNo(ReadEmployeeRewardPunishmentInputDto wn) { //查询所有超级管理员 List admins = new List(); admins = adminRepository.GetList(a => a.IsDelete != 1); - List gBTypes = new List(); + List gBTypes = new List(); gBTypes = goodbadTypeRepository.GetList(a => a.IsDelete != 1); List gb = new List(); - gb = workerGoogBadRepository.GetList(a => a.EmployeeId == wn); + gb = rewardPunishmentRepository.GetList(a => a.EmployeeId == wn.EmployeeId); gb.ForEach(source => { //奖惩类型 @@ -94,7 +104,12 @@ namespace EOM.TSHotelManagement.Application var admin = admins.FirstOrDefault(a => a.Account == source.RewardPunishmentOperator); source.OperatorName = admin.Name.IsNullOrEmpty() ? "" : admin.Name; }); - return gb; + + return new ListOutputDto + { + listSource = EntityMapper.Map, List>(gb), + total = gb.Count + }; } } } diff --git a/EOM.TSHotelManagement.Application/Sys/NavBar/INavBarService.cs b/EOM.TSHotelManagement.Application/Sys/NavBar/INavBarService.cs index 45eaa38..f3c95ef 100644 --- a/EOM.TSHotelManagement.Application/Sys/NavBar/INavBarService.cs +++ b/EOM.TSHotelManagement.Application/Sys/NavBar/INavBarService.cs @@ -1,4 +1,5 @@ -using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Common.Core; namespace EOM.TSHotelManagement.Application { @@ -11,6 +12,6 @@ namespace EOM.TSHotelManagement.Application /// 导航控件列表 /// /// - List NavBarList(); + ListOutputDto NavBarList(); } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Application/Sys/NavBar/NavBarService.cs b/EOM.TSHotelManagement.Application/Sys/NavBar/NavBarService.cs index 02039d8..e541887 100644 --- a/EOM.TSHotelManagement.Application/Sys/NavBar/NavBarService.cs +++ b/EOM.TSHotelManagement.Application/Sys/NavBar/NavBarService.cs @@ -1,4 +1,6 @@ -using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Util; using EOM.TSHotelManagement.EntityFramework; namespace EOM.TSHotelManagement.Application @@ -26,11 +28,17 @@ namespace EOM.TSHotelManagement.Application /// 导航控件列表 /// /// - public List NavBarList() + public ListOutputDto NavBarList() { var navBarList = navBarRepository.GetList(a => a.IsDelete != 1); - return navBarList; + var listSource = EntityMapper.MapList(navBarList); + + return new ListOutputDto + { + listSource = listSource, + total = listSource.Count + }; } } } diff --git a/EOM.TSHotelManagement.Application/Util/IUtilService.cs b/EOM.TSHotelManagement.Application/Util/IUtilService.cs index 96bfd46..c13f3f3 100644 --- a/EOM.TSHotelManagement.Application/Util/IUtilService.cs +++ b/EOM.TSHotelManagement.Application/Util/IUtilService.cs @@ -19,19 +19,19 @@ namespace EOM.TSHotelManagement.Application /// 检测版本号 /// /// - ApplicationVersion CheckBaseVersion(); + ReadApplicationVersionOutputDto CheckBaseVersion(); /// /// 添加操作日志 /// /// /// - bool AddLog(OperationLog opr); + BaseOutputDto AddLog(CreateOperationLogInputDto opr); /// /// 查询所有操作日志 /// /// - ListOutputDto SelectOperationlogAll(int? pageIndex, int? pageSize); + ListOutputDto SelectOperationlogAll(ReadOperationLogInputDto readOperationLogInputDto); } } diff --git a/EOM.TSHotelManagement.Application/Util/UtilService.cs b/EOM.TSHotelManagement.Application/Util/UtilService.cs index 8a20034..19221b9 100644 --- a/EOM.TSHotelManagement.Application/Util/UtilService.cs +++ b/EOM.TSHotelManagement.Application/Util/UtilService.cs @@ -1,5 +1,6 @@ using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Util; using EOM.TSHotelManagement.EntityFramework; namespace EOM.TSHotelManagement.Application @@ -55,9 +56,11 @@ namespace EOM.TSHotelManagement.Application /// 检测版本号 /// /// - public ApplicationVersion CheckBaseVersion() + public ReadApplicationVersionOutputDto CheckBaseVersion() { - return applicationRepository.GetSingle(a => a.ApplicationVersionId == 1); + var source = EntityMapper.Map(applicationRepository.GetSingle(a => a.ApplicationVersionId == 1)); + + return source; } /// @@ -65,22 +68,30 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool AddLog(OperationLog opr) + public BaseOutputDto AddLog(CreateOperationLogInputDto opr) { - return operationLogRepository.Insert(opr); + try + { + operationLogRepository.Insert(EntityMapper.Map(opr)); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } /// /// 查询所有操作日志 /// /// - public ListOutputDto SelectOperationlogAll(int? pageIndex, int? pageSize) + public ListOutputDto SelectOperationlogAll(ReadOperationLogInputDto readOperationLogInputDto) { ListOutputDto operationLogs = new ListOutputDto(); var count = 0; - if (pageIndex != 0 && pageSize != 0) + if (readOperationLogInputDto.Page != 0 && readOperationLogInputDto.PageSize != 0) { - operationLogs.listSource = operationLogRepository.AsQueryable().OrderByDescending(a => a.OperationTime).ToPageList((int)pageIndex, (int)pageSize, ref count); + operationLogs.listSource = operationLogRepository.AsQueryable().OrderByDescending(a => a.OperationTime).ToPageList(readOperationLogInputDto.Page, readOperationLogInputDto.PageSize, ref count); } else { @@ -93,7 +104,9 @@ namespace EOM.TSHotelManagement.Application }); operationLogs.total = count; - return operationLogs; + var listSource = EntityMapper.MapList(operationLogs.listSource); + + return new ListOutputDto { listSource = listSource, total = operationLogs.total }; } } diff --git a/EOM.TSHotelManagement.Application/Zero/Admin/AdminService.cs b/EOM.TSHotelManagement.Application/Zero/Administrator/AdminService.cs similarity index 50% rename from EOM.TSHotelManagement.Application/Zero/Admin/AdminService.cs rename to EOM.TSHotelManagement.Application/Zero/Administrator/AdminService.cs index 0f4b3ef..84223d3 100644 --- a/EOM.TSHotelManagement.Application/Zero/Admin/AdminService.cs +++ b/EOM.TSHotelManagement.Application/Zero/Administrator/AdminService.cs @@ -21,6 +21,7 @@ *SOFTWARE. * */ +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; using EOM.TSHotelManagement.Common.Util; using EOM.TSHotelManagement.EntityFramework; @@ -28,6 +29,8 @@ using EOM.TSHotelManagement.Shared; using jvncorelib.EncryptorLib; using jvncorelib.EntityLib; using Microsoft.IdentityModel.Tokens; +using SqlSugar; +using System.ComponentModel; using System.IdentityModel.Tokens.Jwt; using System.Security.Claims; using System.Text; @@ -74,20 +77,19 @@ namespace EOM.TSHotelManagement.Application this.jWTHelper = jWTHelper; } - #region 根据超管密码查询员工类型和权限 /// /// 根据超管密码查询员工类型和权限 /// - /// + /// /// - public Administrator SelectManagerByPass(Administrator admin) + public SingleOutputDto SelectManagerByPass(ReadAdministratorInputDto readAdministratorInputDto) { - if (admin == null) + if (readAdministratorInputDto == null) { - throw new ArgumentNullException(nameof(admin)); + throw new ArgumentNullException(nameof(readAdministratorInputDto)); } - var existingAdmin = adminRepository.GetSingle(a => a.Account == admin.Account); + var existingAdmin = adminRepository.GetSingle(a => a.Account == readAdministratorInputDto.Account); if (existingAdmin == null) { @@ -98,41 +100,46 @@ namespace EOM.TSHotelManagement.Application if (existingAdminPassword.Contains("·")) { - if (!encrypt.Compare(admin.Password, existingAdminPassword)) + if (!encrypt.Compare(readAdministratorInputDto.Password, existingAdminPassword)) { return null; } } - else if (!admin.Password.Equals(existingAdminPassword)) + else if (!readAdministratorInputDto.Password.Equals(existingAdminPassword)) { return null; } - if (admin.IsDelete == 1) + if (readAdministratorInputDto.IsDelete == 1) { return null; } existingAdmin.Password = string.Empty; - existingAdmin.UserToken = jWTHelper.GenerateJWT(admin.Name); + existingAdmin.UserToken = jWTHelper.GenerateJWT(readAdministratorInputDto.Name); - return existingAdmin; + var source = EntityMapper.Map(existingAdmin); + + return new SingleOutputDto + { + Source = source + }; } /// /// 后台系统登录 /// - /// + /// /// - public Administrator Login(Administrator admin) + public SingleOutputDto Login(ReadAdministratorInputDto readAdministratorInputDto) { - if (admin == null) + if (readAdministratorInputDto == null) { - throw new ArgumentNullException(nameof(admin)); + throw new ArgumentNullException(nameof(readAdministratorInputDto)); } - var existingAdmin = adminRepository.GetSingle(a => a.Account == admin.Account); + var existingAdmin = adminRepository.GetSingle(a => a.Account == readAdministratorInputDto.Account); if (existingAdmin == null) { @@ -144,7 +151,7 @@ namespace EOM.TSHotelManagement.Application return null; } - var encrtptPwd = encrypt.Encryption(admin.Password, EncryptionLevel.Enhanced); + var encrtptPwd = encrypt.Encryption(readAdministratorInputDto.Password, EncryptionLevel.Enhanced); if (encrtptPwd.IsNullOrEmpty() || existingAdmin.Password.IsNullOrEmpty()) { @@ -158,33 +165,48 @@ namespace EOM.TSHotelManagement.Application } existingAdmin.Password = string.Empty; - existingAdmin.UserToken = jWTHelper.GenerateJWT(admin.Account); + existingAdmin.UserToken = jWTHelper.GenerateJWT(readAdministratorInputDto.Account); + + var source = EntityMapper.Map(existingAdmin); - return existingAdmin; + return new SingleOutputDto + { + Source = source + }; } - #endregion - #region 根据超管账号查询对应的密码 /// /// 根据超管账号查询对应的密码 /// - /// + /// /// - public Administrator SelectAdminPwdByAccount(string account) + public SingleOutputDto SelectAdminPwdByAccount(ReadAdministratorInputDto readAdministratorInputDto) { Administrator admin = new Administrator(); - admin = adminRepository.GetSingle(a => a.Account == account); - return admin; + admin = adminRepository.GetSingle(a => a.Account == readAdministratorInputDto.Account); + + var source = EntityMapper.Map(admin); + + return new SingleOutputDto + { + Source = source + }; } - #endregion /// /// 获取所有管理员列表 /// /// - public List GetAllAdminList() + public ListOutputDto GetAllAdminList(ReadAdministratorInputDto readAdministratorInputDto) { - var listAdmins = adminRepository.GetList(); + var where = Expressionable.Create(); + + if (!readAdministratorInputDto.IsDelete.IsNullOrEmpty()) + { + where = where.And(a => a.IsDelete == readAdministratorInputDto.IsDelete); + } + var count = 0; + var listAdmins = adminRepository.AsQueryable().Where(where.ToExpression()).ToPageList(readAdministratorInputDto.Page,readAdministratorInputDto.PageSize,ref count); var listAdminType = adminTypeRepository.GetList(a => a.IsDelete != 1); listAdmins.ForEach(admins => { @@ -199,95 +221,113 @@ namespace EOM.TSHotelManagement.Application }); - return listAdmins; - } + var listSouce = EntityMapper.MapList(listAdmins); - /// - /// 修改密码 - /// - /// - /// - public bool UpdateNewPwdByOldPwd(Administrator admin) - { - admin.Password = encrypt.Encryption(admin.Password, EncryptionLevel.Enhanced); - return adminRepository.Update(a => new Administrator() + return new ListOutputDto { - Password = admin.Password - }, a => a.Account == admin.Account); + listSource = listSouce, + total = count + }; } /// - /// 获取管理员列表(已启用) + /// 修改密码 /// + /// /// - public List GetAllAdmin() + public BaseOutputDto UpdateNewPwdByOldPwd(UpdateAdministratorInputDto updateAdministratorInputDto) { - var listAdmin = adminRepository.GetList(a => a.IsDelete != 1); - var listAdminType = adminTypeRepository.GetList(a => a.IsDelete != 1); - listAdmin.ForEach(admin => + try { - var isAdminType = admin.IsSuperAdmin == 1 ? "是" : "否"; - admin.IsSuperAdminDescription = isAdminType; + updateAdministratorInputDto.Password = encrypt.Encryption(updateAdministratorInputDto.Password, EncryptionLevel.Enhanced); - var adminType = listAdminType.FirstOrDefault(a => a.TypeId.Equals(admin.Type)); - admin.TypeName = adminType == null ? "" : adminType.TypeName; - }); - return listAdmin; + adminRepository.Update(a => new Administrator() + { + Password = updateAdministratorInputDto.Password + }, a => a.Account == updateAdministratorInputDto.Account); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } /// /// 添加管理员 /// - /// + /// /// - public bool AddAdmin(Administrator admin) + public BaseOutputDto AddAdmin(CreateAdministratorInputDto createAdministratorInputDto) { - admin.Password = encrypt.Encryption(admin.Password, EncryptionLevel.Enhanced); - bool result = adminRepository.Insert(admin); - return result; + try + { + createAdministratorInputDto.Password = encrypt.Encryption(createAdministratorInputDto.Password, EncryptionLevel.Enhanced); + adminRepository.Insert(EntityMapper.Map(createAdministratorInputDto)); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } /// /// 获取管理员信息 /// - /// + /// /// - public Administrator GetAdminInfoByAdminAccount(Administrator admin) + public SingleOutputDto GetAdminInfoByAdminAccount(ReadAdministratorInputDto readAdministratorInputDto) { - var adminInfo = adminRepository.GetSingle(a => a.Account.Equals(admin.Account)); + var adminInfo = adminRepository.GetSingle(a => a.Account.Equals(readAdministratorInputDto.Account)); if (adminInfo != null) { var adminType = adminTypeRepository.GetSingle(a => a.TypeId.Equals(adminInfo.Type)); adminInfo.TypeName = adminType.TypeName; } - return adminInfo; + + var source = EntityMapper.Map(adminInfo); + + return new SingleOutputDto { Source = source }; } /// /// 获取所有管理员类型 /// /// - public List GetAllAdminTypes() + public ListOutputDto GetAllAdminTypes(ReadAdministratorTypeInputDto readAdministratorTypeInputDto) { var listAdminTypes = adminTypeRepository.GetList(a => a.IsDelete != 1); - return listAdminTypes; + + var listSouce = EntityMapper.MapList(listAdminTypes); + + return new ListOutputDto + { + listSource = listSouce + }; } /// /// 更新管理员账户 /// - /// + /// /// - public bool UpdAccount(Administrator admins) + public BaseOutputDto UpdAccount(UpdateAdministratorInputDto updateAdministratorInputDto) { - admins.IsDelete = admins.IsDelete == 0 ? 1 : 0; - return adminRepository.Update(a => new Administrator() + try { - IsDelete = admins.IsDelete, - DataChgDate = admins.DataChgDate - }, a => a.Id == admins.Id); + updateAdministratorInputDto.IsDelete = updateAdministratorInputDto.IsDelete == 0 ? 1 : 0; + adminRepository.Update(a => new Administrator() + { + IsDelete = updateAdministratorInputDto.IsDelete, + DataChgDate = updateAdministratorInputDto.DataChgDate + }, a => a.Id == updateAdministratorInputDto.Id); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } - - } } diff --git a/EOM.TSHotelManagement.Application/Zero/Admin/IAdminService.cs b/EOM.TSHotelManagement.Application/Zero/Administrator/IAdminService.cs similarity index 60% rename from EOM.TSHotelManagement.Application/Zero/Admin/IAdminService.cs rename to EOM.TSHotelManagement.Application/Zero/Administrator/IAdminService.cs index ec74c43..2d1e474 100644 --- a/EOM.TSHotelManagement.Application/Zero/Admin/IAdminService.cs +++ b/EOM.TSHotelManagement.Application/Zero/Administrator/IAdminService.cs @@ -21,7 +21,7 @@ *SOFTWARE. * */ -using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Contract; namespace EOM.TSHotelManagement.Application { @@ -31,75 +31,65 @@ namespace EOM.TSHotelManagement.Application public interface IAdminService { - #region 根据超管密码查询员工类型和权限 /// /// 根据超管密码查询员工类型和权限 /// - /// + /// /// - Administrator SelectManagerByPass(Administrator admin); + SingleOutputDto SelectManagerByPass(ReadAdministratorInputDto readAdministratorInputDto); /// /// 后台系统登录 /// - /// + /// /// - Administrator Login(Administrator admin); - #endregion + SingleOutputDto Login(ReadAdministratorInputDto readAdministratorInputDto); - #region 根据超管账号查询对应的密码 /// /// 根据超管账号查询对应的密码 /// - /// + /// /// - Administrator SelectAdminPwdByAccount(string account); - #endregion + SingleOutputDto SelectAdminPwdByAccount(ReadAdministratorInputDto readAdministratorInputDto); /// /// 获取所有管理员列表 /// /// - List GetAllAdminList(); + ListOutputDto GetAllAdminList(ReadAdministratorInputDto readAdministratorInputDto); /// /// 修改密码 /// - /// + /// /// - bool UpdateNewPwdByOldPwd(Administrator admin); - - /// - /// 获取管理员列表 - /// - /// - List GetAllAdmin(); + BaseOutputDto UpdateNewPwdByOldPwd(UpdateAdministratorInputDto updateAdministratorInputDto); /// /// 添加管理员 /// - /// + /// /// - bool AddAdmin(Administrator admin); + BaseOutputDto AddAdmin(CreateAdministratorInputDto createAdministratorInputDto); /// /// 获取管理员信息 /// - /// + /// /// - Administrator GetAdminInfoByAdminAccount(Administrator admin); + SingleOutputDto GetAdminInfoByAdminAccount(ReadAdministratorInputDto readAdministratorInputDto); /// /// 获取所有管理员类型 /// /// - List GetAllAdminTypes(); + ListOutputDto GetAllAdminTypes(ReadAdministratorTypeInputDto readAdministratorTypeInputDto); /// /// 批量更新管理员账户 /// - /// + /// /// - bool UpdAccount(Administrator admins); + BaseOutputDto UpdAccount(UpdateAdministratorInputDto updateAdministratorInputDto); } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Application/Zero/Base/BaseService.cs b/EOM.TSHotelManagement.Application/Zero/Base/BaseService.cs index f953f26..fa5bc6b 100644 --- a/EOM.TSHotelManagement.Application/Zero/Base/BaseService.cs +++ b/EOM.TSHotelManagement.Application/Zero/Base/BaseService.cs @@ -22,7 +22,9 @@ * */ using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Util; using EOM.TSHotelManagement.EntityFramework; using jvncorelib.EntityLib; using SqlSugar; @@ -78,7 +80,7 @@ namespace EOM.TSHotelManagement.Application /// /// 奖惩类型 /// - private readonly GenericRepository goodbadTypeRepository; + private readonly GenericRepository goodbadTypeRepository; /// /// 基础URL @@ -98,7 +100,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public BaseService(GenericRepository workerRepository, GenericRepository sexTypeRepository, GenericRepository educationRepository, GenericRepository nationRepository, GenericRepository deptRepository, GenericRepository positionRepository, GenericRepository passPortTypeRepository, GenericRepository custoTypeRepository, GenericRepository goodbadTypeRepository, GenericRepository baseRepository) + public BaseService(GenericRepository workerRepository, GenericRepository sexTypeRepository, GenericRepository educationRepository, GenericRepository nationRepository, GenericRepository deptRepository, GenericRepository positionRepository, GenericRepository passPortTypeRepository, GenericRepository custoTypeRepository, GenericRepository goodbadTypeRepository, GenericRepository baseRepository) { this.workerRepository = workerRepository; this.sexTypeRepository = sexTypeRepository; @@ -118,69 +120,72 @@ namespace EOM.TSHotelManagement.Application /// 查询所有性别类型 /// /// - public List SelectSexTypeAll(GenderType sexType = null) + public ListOutputDto SelectGenderTypeAll(ReadGenderTypeInputDto genderTypeInputDto = null) { var where = Expressionable.Create(); - if (sexType != null && !sexType.IsDelete.IsNullOrEmpty()) + if (genderTypeInputDto != null && !genderTypeInputDto.IsDelete.IsNullOrEmpty()) { - where = where.And(a => a.IsDelete == sexType.IsDelete); + where = where.And(a => a.IsDelete == genderTypeInputDto.IsDelete); } - if (sexType != null && !sexType.GenderName.IsNullOrEmpty()) - { - where = where.And(a => a.GenderName.Contains(sexType.GenderName)); - } - return sexTypeRepository.GetList(where.ToExpression()); + var count = 0; + var genderTypes = sexTypeRepository.AsQueryable().Where(where.ToExpression()).ToPageList(genderTypeInputDto.Page,genderTypeInputDto.PageSize,ref count); + var result = EntityMapper.MapList(genderTypes); + return new ListOutputDto { listSource = result, total = count }; } /// /// 查询性别类型 /// /// - public GenderType SelectSexType(GenderType sexType) + public SingleOutputDto SelectGenderType(ReadGenderTypeInputDto genderTypeInputDto) { - GenderType sexTypes = new GenderType(); - sexTypes = sexTypeRepository.GetSingle(a => a.GenderId == sexType.GenderId); - return sexTypes; + var genderType = sexTypeRepository.GetSingle(a => a.GenderId == genderTypeInputDto.GenderId); + var result = EntityMapper.Map(genderType); + return new SingleOutputDto { Source = result }; } /// /// 添加性别类型 /// - /// + /// /// - public bool AddSexType(GenderType sexType) + public BaseOutputDto AddGenderType(CreateGenderTypeInputDto createGenderTypeInputDto) { - return sexTypeRepository.Insert(sexType); + var genderType = EntityMapper.Map(createGenderTypeInputDto); + var result = sexTypeRepository.Insert(genderType); + return new BaseOutputDto { StatusCode = result ? StatusCodeConstants.Success : StatusCodeConstants.InternalServerError }; } /// /// 删除性别类型 /// - /// + /// /// - public bool DelSexType(GenderType sexType) + public BaseOutputDto DelGenderType(DeleteGenderTypeInputDto deleteGenderTypeInputDto) { - return sexTypeRepository.Update(a => new GenderType() + var result = sexTypeRepository.Update(a => new GenderType() { - IsDelete = sexType.IsDelete, - DataChgUsr = sexType.DataChgUsr - }, a => a.GenderId == sexType.GenderId); + IsDelete = deleteGenderTypeInputDto.IsDelete, + DataChgUsr = deleteGenderTypeInputDto.DataChgUsr + }, a => a.GenderId == deleteGenderTypeInputDto.GenderId); + return new BaseOutputDto { StatusCode = result ? StatusCodeConstants.Success : StatusCodeConstants.InternalServerError }; } /// /// 更新性别类型 /// - /// + /// /// - public bool UpdSexType(GenderType sexType) + public BaseOutputDto UpdGenderType(UpdateGenderTypeInputDto updateGenderTypeInputDto) { - return sexTypeRepository.Update(a => new GenderType() + var result = sexTypeRepository.Update(a => new GenderType() { - GenderName = sexType.GenderName, - DataChgUsr = sexType.DataChgUsr, - DataChgDate = sexType.DataChgDate - }, a => a.GenderId == sexType.GenderId); + GenderName = updateGenderTypeInputDto.GenderName, + DataChgUsr = updateGenderTypeInputDto.DataChgUsr, + DataChgDate = updateGenderTypeInputDto.DataChgDate + }, a => a.GenderId == updateGenderTypeInputDto.GenderId); + return new BaseOutputDto { StatusCode = result ? StatusCodeConstants.Success : StatusCodeConstants.InternalServerError }; } #endregion @@ -209,70 +214,77 @@ namespace EOM.TSHotelManagement.Application /// 查询所有职位类型 /// /// - public List SelectPositionAll(Position position = null) + public ListOutputDto SelectPositionAll(ReadPositionInputDto positionInputDto = null) { var where = Expressionable.Create(); - if (position != null && !position.IsDelete.IsNullOrEmpty()) + if (positionInputDto != null && !positionInputDto.IsDelete.IsNullOrEmpty()) { - where = where.And(a => a.IsDelete == position.IsDelete); + where = where.And(a => a.IsDelete == positionInputDto.IsDelete); } - if (position != null && !position.PositionName.IsNullOrEmpty()) + if (positionInputDto != null && !positionInputDto.PositionName.IsNullOrEmpty()) { - where = where.And(a => a.PositionName.Contains(position.PositionName)); + where = where.And(a => a.PositionName.Contains(positionInputDto.PositionName)); } - return positionRepository.GetList(where.ToExpression()); + var count = 0; + var positions = positionRepository.AsQueryable().Where(where.ToExpression()).ToPageList(positionInputDto.Page, positionInputDto.PageSize, ref count); + var result = EntityMapper.MapList(positions); + return new ListOutputDto { listSource = result, total = count }; } /// /// 查询职位类型 /// /// - public Position SelectPosition(Position position) + public SingleOutputDto SelectPosition(ReadPositionInputDto positionInputDto) { - Position position1 = new Position(); - position1 = positionRepository.GetSingle(a => a.PositionNumber == position.PositionNumber); - return position1; + var position = positionRepository.GetSingle(a => a.Id == positionInputDto.PositionId); + var result = EntityMapper.Map(position); + return new SingleOutputDto { Source = result }; } /// /// 添加职位类型 /// - /// + /// /// - public bool AddPosition(Position position) + public BaseOutputDto AddPosition(CreatePositionInputDto createPositionInputDto) { - return positionRepository.Insert(position); + var position = EntityMapper.Map(createPositionInputDto); + var result = positionRepository.Insert(position); + return new BaseOutputDto { StatusCode = result ? StatusCodeConstants.Success : StatusCodeConstants.InternalServerError }; } /// /// 删除职位类型 /// - /// + /// /// - public bool DelPosition(Position position) + public BaseOutputDto DelPosition(DeletePositionInputDto deletePositionInputDto) { - return positionRepository.Update(a => new Position() + var result = positionRepository.Update(a => new Position() { - IsDelete = position.IsDelete, - DataChgUsr = position.DataChgUsr, - DataChgDate = position.DataChgDate - }, a => a.PositionNumber == position.PositionNumber); + IsDelete = deletePositionInputDto.IsDelete, + DataChgUsr = deletePositionInputDto.DataChgUsr, + DataChgDate = deletePositionInputDto.DataChgDate + }, a => a.PositionNumber == deletePositionInputDto.PositionNumber); + return new BaseOutputDto { StatusCode = result ? StatusCodeConstants.Success : StatusCodeConstants.InternalServerError }; } /// /// 更新职位类型 /// - /// + /// /// - public bool UpdPosition(Position position) + public BaseOutputDto UpdPosition(UpdatePositionInputDto updatePositionInputDto) { - return positionRepository.Update(a => new Position() + var result = positionRepository.Update(a => new Position() { - PositionNumber = position.PositionNumber, - DataChgUsr = position.DataChgUsr, - DataChgDate = position.DataChgDate - }, a => a.PositionNumber == position.PositionNumber); + PositionName = updatePositionInputDto.PositionName, + DataChgUsr = updatePositionInputDto.DataChgUsr, + DataChgDate = updatePositionInputDto.DataChgDate + }, a => a.PositionNumber == updatePositionInputDto.PositionNumber); + return new BaseOutputDto { StatusCode = result ? StatusCodeConstants.Success : StatusCodeConstants.InternalServerError }; } #endregion @@ -283,69 +295,73 @@ namespace EOM.TSHotelManagement.Application /// 查询所有民族类型 /// /// - public List SelectNationAll(Nation nation = null) + public ListOutputDto SelectNationAll(ReadNationInputDto nationInputDto = null) { var where = Expressionable.Create(); - where = where.And(a => a.IsDelete == nation.IsDelete); - - if (nation != null && !nation.NationName.IsNullOrEmpty()) + if (nationInputDto != null && !nationInputDto.IsDelete.IsNullOrEmpty()) { - where = where.And(a => a.NationName.Contains(nation.NationName)); + where = where.And(a => a.IsDelete == nationInputDto.IsDelete); } - return nationRepository.GetList(where.ToExpression()); + var count = 0; + var nations = nationRepository.AsQueryable().Where(where.ToExpression()).ToPageList(nationInputDto.Page,nationInputDto.PageSize,ref count); + var result = EntityMapper.MapList(nations); + return new ListOutputDto { listSource = result, total = count }; } /// /// 查询民族类型 /// /// - public Nation SelectNation(Nation nation) + public SingleOutputDto SelectNation(ReadNationInputDto nationInputDto) { - Nation nation1 = new Nation(); - nation1 = nationRepository.GetSingle(a => a.NationNumber.Equals(nation.NationNumber)); - return nation1; + var nation = nationRepository.GetSingle(a => a.Id == nationInputDto.NationId); + var result = EntityMapper.Map(nation); + return new SingleOutputDto { Source = result }; } /// /// 添加民族类型 /// - /// + /// /// - public bool AddNation(Nation nation) + public BaseOutputDto AddNation(CreateNationInputDto createNationInputDto) { - return nationRepository.Insert(nation); + var nation = EntityMapper.Map(createNationInputDto); + var result = nationRepository.Insert(nation); + return new BaseOutputDto { StatusCode = result ? StatusCodeConstants.Success : StatusCodeConstants.InternalServerError }; } /// /// 删除民族类型 /// - /// + /// /// - public bool DelNation(Nation nation) + public BaseOutputDto DelNation(DeleteNationInputDto deleteNationInputDto) { - return nationRepository.Update(a => new Nation() + var result = nationRepository.Update(a => new Nation() { - IsDelete = nation.IsDelete ?? 1, - DataChgUsr = nation.DataChgUsr, - DataChgDate = nation.DataChgDate - }, a => a.NationNumber.Equals(nation.NationNumber)); - + IsDelete = deleteNationInputDto.IsDelete, + DataChgUsr = deleteNationInputDto.DataChgUsr, + DataChgDate = deleteNationInputDto.DataChgDate + }, a => a.Id == deleteNationInputDto.NationId); + return new BaseOutputDto { StatusCode = result ? StatusCodeConstants.Success : StatusCodeConstants.InternalServerError }; } /// /// 更新民族类型 /// - /// + /// /// - public bool UpdNation(Nation nation) + public BaseOutputDto UpdNation(UpdateNationInputDto updateNationInputDto) { - return nationRepository.Update(a => new Nation() + var result = nationRepository.Update(a => new Nation() { - NationNumber = nation.NationNumber, - DataChgUsr = nation.DataChgUsr, - DataChgDate = nation.DataChgDate - }, a => a.NationNumber.Equals(nation.NationNumber)); + NationName = updateNationInputDto.NationName, + DataChgUsr = updateNationInputDto.DataChgUsr, + DataChgDate = updateNationInputDto.DataChgDate + }, a => a.Id == updateNationInputDto.NationId); + return new BaseOutputDto { StatusCode = result ? StatusCodeConstants.Success : StatusCodeConstants.InternalServerError }; } #endregion @@ -356,55 +372,57 @@ namespace EOM.TSHotelManagement.Application /// 查询所有学历类型 /// /// - public List SelectEducationAll(Education education = null) + public ListOutputDto SelectEducationAll(ReadEducationInputDto educationInputDto = null) { var where = Expressionable.Create(); - if (education != null && !education.IsDelete.IsNullOrEmpty()) + if (educationInputDto != null && !educationInputDto.IsDelete.IsNullOrEmpty()) { - where = where.And(a => a.IsDelete == education.IsDelete); + where = where.And(a => a.IsDelete == educationInputDto.IsDelete); } - if (education != null && !education.EducationName.IsNullOrEmpty()) - { - where = where.And(a => a.EducationName.Contains(education.EducationName)); - } - return educationRepository.GetList(where.ToExpression()); + var count = 0; + var educations = educationRepository.AsQueryable().Where(where.ToExpression()).ToPageList(educationInputDto.Page,educationInputDto.PageSize,ref count); + var result = EntityMapper.MapList(educations); + return new ListOutputDto { listSource = result, total = count }; } /// /// 查询学历类型 /// /// - public Education SelectEducation(Education education) + public SingleOutputDto SelectEducation(ReadEducationInputDto educationInputDto) { - Education education1 = new Education(); - education1 = educationRepository.GetSingle(a => a.EducationNumber == education.EducationNumber); - return education1; + var education = educationRepository.GetSingle(a => a.Id == educationInputDto.EducationId); + var result = EntityMapper.Map(education); + return new SingleOutputDto { Source = result }; } /// /// 添加学历类型 /// - /// + /// /// - public bool AddEducation(Education education) + public BaseOutputDto AddEducation(CreateEducationInputDto createEducationInputDto) { - return educationRepository.Insert(education); + var education = EntityMapper.Map(createEducationInputDto); + var result = educationRepository.Insert(education); + return new BaseOutputDto { StatusCode = result ? StatusCodeConstants.Success : StatusCodeConstants.InternalServerError }; } /// /// 删除学历类型 /// - /// + /// /// - public bool DelEducation(Education education) + public BaseOutputDto DelEducation(DeleteEducationInputDto deleteEducationInputDto) { - return educationRepository.Update(a => new Education() + var result = educationRepository.Update(a => new Education() { - IsDelete = education.IsDelete ?? 1, - DataChgUsr = education.DataChgUsr, - DataChgDate = education.DataChgDate - }, a => a.EducationNumber == education.EducationNumber); + IsDelete = deleteEducationInputDto.IsDelete, + DataChgUsr = deleteEducationInputDto.DataChgUsr, + DataChgDate = deleteEducationInputDto.DataChgDate + }, a => a.Id == deleteEducationInputDto.EducationId); + return new BaseOutputDto { StatusCode = result ? StatusCodeConstants.Success : StatusCodeConstants.InternalServerError }; } /// @@ -412,14 +430,15 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool UpdEducation(Education education) + public BaseOutputDto UpdEducation(UpdateEducationInputDto education) { - return educationRepository.Update(a => new Education() + var result = educationRepository.Update(a => new Education() { EducationName = education.EducationName, DataChgUsr = education.DataChgUsr, DataChgDate = education.DataChgDate - }, a => a.EducationNumber == education.EducationNumber); + }, a => a.Id == education.EducationId); + return new BaseOutputDto { StatusCode = result ? StatusCodeConstants.Success : StatusCodeConstants.InternalServerError }; } #endregion @@ -430,58 +449,39 @@ namespace EOM.TSHotelManagement.Application /// 查询所有部门类型(可用) /// /// - public List SelectDeptAllCanUse() + public ListOutputDto SelectDeptAllCanUse() { - List workers = new List(); - workers = workerRepository.GetList(a => a.IsDelete != 1); - List depts = new List(); - depts = deptRepository.GetList(a => a.IsDelete != 1); - depts.ForEach(source => - { - if (!source.ParentDepartmentNumber.IsNullOrEmpty()) - { - var dept = depts.FirstOrDefault(a => a.DepartmentNumber == source.ParentDepartmentNumber); - source.ParentDepartmentName = dept == null || dept.DepartmentName.IsNullOrEmpty() ? "无" : dept.DepartmentName; - } - if (!source.DepartmentLeader.IsNullOrEmpty()) - { - var leader = workers.FirstOrDefault(a => a.EmployeeId == source.DepartmentLeader); - source.LeaderName = leader == null || leader.EmployeeName.IsNullOrEmpty() ? "无" : leader.EmployeeName; - } - - }); - return depts; + var depts = deptRepository.GetList(a => a.IsDelete != 1); + var result = EntityMapper.MapList(depts); + return new ListOutputDto { listSource = result, total = result.Count }; } /// /// 查询所有部门类型 /// /// - public List SelectDeptAll() + public ListOutputDto SelectDeptAll(ReadDepartmentInputDto readDepartmentInputDto) { - List workers = new List(); - workers = workerRepository.GetList(a => a.IsDelete != 1); - List depts = new List(); - depts = deptRepository.GetList(a => a.IsDelete != 1); - depts.ForEach(source => + var where = Expressionable.Create(); + if (!readDepartmentInputDto.IsDelete.IsNullOrEmpty()) { - var dept = depts.FirstOrDefault(a => a.DepartmentNumber == source.ParentDepartmentNumber); - source.ParentDepartmentNumber = dept == null ? "" : dept.DepartmentName; - var leader = workers.FirstOrDefault(a => source.DepartmentLeader != null && a.EmployeeId == source.DepartmentLeader); - source.LeaderName = leader == null ? "" : leader.EmployeeName; - }); - return depts; + where = where.And(a => a.IsDelete == readDepartmentInputDto.IsDelete); + } + var count = 0; + var depts = deptRepository.AsQueryable().Where(where.ToExpression()).ToPageList(readDepartmentInputDto.Page,readDepartmentInputDto.PageSize,ref count); + var result = EntityMapper.MapList(depts); + return new ListOutputDto { listSource = result, total = count }; } /// /// 查询部门类型 /// /// - public Department SelectDept(Department dept) + public SingleOutputDto SelectDept(ReadDepartmentInputDto dept) { - Department dept1 = new Department(); - dept1 = deptRepository.GetSingle(a => a.DepartmentNumber.Equals(dept.DepartmentNumber)); - return dept1; + var department = deptRepository.GetSingle(a => a.Id == dept.Id); + var result = EntityMapper.Map(department); + return new SingleOutputDto { Source = result }; } /// @@ -489,9 +489,11 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool AddDept(Department dept) + public BaseOutputDto AddDept(CreateDepartmentInputDto dept) { - return deptRepository.Insert(dept); + var department = EntityMapper.Map(dept); + var result = deptRepository.Insert(department); + return new BaseOutputDto { StatusCode = result ? StatusCodeConstants.Success : StatusCodeConstants.InternalServerError }; } /// @@ -499,18 +501,15 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool DelDept(Department dept) + public BaseOutputDto DelDept(DeleteDepartmentInputDto dept) { - if (dept.IsNullOrEmpty()) - { - return false; - } - return deptRepository.Update(a => new Department() + var result = deptRepository.Update(a => new Department() { IsDelete = dept.IsDelete, DataChgUsr = dept.DataChgUsr, DataChgDate = dept.DataChgDate - }, a => a.DepartmentNumber == dept.DepartmentNumber); + }, a => a.Id == dept.Id); + return new BaseOutputDto { StatusCode = result ? StatusCodeConstants.Success : StatusCodeConstants.InternalServerError }; } /// @@ -518,9 +517,9 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool UpdDept(Department dept) + public BaseOutputDto UpdDept(UpdateDepartmentInputDto dept) { - return deptRepository.Update(a => new Department() + var result = deptRepository.Update(a => new Department() { DepartmentName = dept.DepartmentName, DepartmentDescription = dept.DepartmentDescription, @@ -530,6 +529,7 @@ namespace EOM.TSHotelManagement.Application DataChgUsr = dept.DataChgUsr, DataChgDate = dept.DataChgDate }, a => a.DepartmentNumber == dept.DepartmentNumber); + return new BaseOutputDto { StatusCode = result ? StatusCodeConstants.Success : StatusCodeConstants.InternalServerError }; } #endregion @@ -540,22 +540,28 @@ namespace EOM.TSHotelManagement.Application /// 查询所有客户类型(可用) /// /// - public List SelectCustoTypeAllCanUse() + public ListOutputDto SelectCustoTypeAllCanUse() { - List custoTypes = new List(); - custoTypes = custoTypeRepository.GetList(a => a.IsDelete != 1); - return custoTypes; + var custoTypes = custoTypeRepository.GetList(a => a.IsDelete != 1); + var result = EntityMapper.MapList(custoTypes); + return new ListOutputDto { listSource = result, total = result.Count }; } /// /// 查询所有客户类型 /// /// - public List SelectCustoTypeAll() + public ListOutputDto SelectCustoTypeAll(ReadCustoTypeInputDto readCustoTypeInputDto) { - List custoTypes = new List(); - custoTypes = custoTypeRepository.GetList(); - return custoTypes; + var where = Expressionable.Create(); + if (!readCustoTypeInputDto.IsDelete.IsNullOrEmpty()) + { + where = where.And(a => a.IsDelete == readCustoTypeInputDto.IsDelete); + } + var count = 0; + var custoTypes = custoTypeRepository.AsQueryable().Where(where.ToExpression()).ToPageList(readCustoTypeInputDto.Page, readCustoTypeInputDto.PageSize, ref count); + var result = EntityMapper.MapList(custoTypes); + return new ListOutputDto { listSource = result, total = count }; } /// @@ -563,11 +569,11 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public CustoType SelectCustoTypeByTypeId(CustoType custoType) + public SingleOutputDto SelectCustoTypeByTypeId(ReadCustoTypeInputDto custoType) { - CustoType custoTypes = new CustoType(); - custoType = custoTypeRepository.GetSingle(a => a.CustomerType == custoType.CustomerType && a.IsDelete != 1); - return custoTypes; + var custoTypeEntity = custoTypeRepository.GetSingle(a => a.CustomerType == custoType.CustomerType && a.IsDelete != 1); + var result = EntityMapper.Map(custoTypeEntity); + return new SingleOutputDto { Source = result }; } /// @@ -575,9 +581,11 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool InsertCustoType(CustoType custoType) + public BaseOutputDto InsertCustoType(CreateCustoTypeInputDto custoType) { - return custoTypeRepository.Insert(custoType); + var custoTypeEntity = EntityMapper.Map(custoType); + var result = custoTypeRepository.Insert(custoTypeEntity); + return new BaseOutputDto { StatusCode = result ? StatusCodeConstants.Success : StatusCodeConstants.InternalServerError }; } /// @@ -585,13 +593,14 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool DeleteCustoType(CustoType custoType) + public BaseOutputDto DeleteCustoType(DeleteCustoTypeInputDto custoType) { - return custoTypeRepository.Update(a => new CustoType() + var result = custoTypeRepository.Update(a => new CustoType() { IsDelete = 1, DataChgUsr = custoType.DataChgUsr }, a => a.CustomerType == custoType.CustomerType); + return new BaseOutputDto { StatusCode = result ? StatusCodeConstants.Success : StatusCodeConstants.InternalServerError }; } /// @@ -599,14 +608,15 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool UpdateCustoType(CustoType custoType) + public BaseOutputDto UpdateCustoType(UpdateCustoTypeInputDto custoType) { - return custoTypeRepository.Update(a => new CustoType() + var result = custoTypeRepository.Update(a => new CustoType() { CustomerTypeName = custoType.CustomerTypeName, DataChgUsr = custoType.DataChgUsr, DataChgDate = custoType.DataChgDate }, a => a.CustomerType == custoType.CustomerType); + return new BaseOutputDto { StatusCode = result ? StatusCodeConstants.Success : StatusCodeConstants.InternalServerError }; } #endregion @@ -617,22 +627,28 @@ namespace EOM.TSHotelManagement.Application /// 查询所有证件类型(可用) /// /// - public List SelectPassPortTypeAllCanUse() + public ListOutputDto SelectPassPortTypeAllCanUse() { - List passPortTypes = new List(); - passPortTypes = passPortTypeRepository.GetList(a => a.IsDelete != 1); - return passPortTypes; + var passPortTypes = passPortTypeRepository.GetList(a => a.IsDelete != 1); + var result = EntityMapper.MapList(passPortTypes); + return new ListOutputDto { listSource = result, total = result.Count }; } /// /// 查询所有证件类型 /// /// - public List SelectPassPortTypeAll() + public ListOutputDto SelectPassPortTypeAll(ReadPassportTypeInputDto readPassportTypeInputDto) { - List passPortTypes = new List(); - passPortTypes = passPortTypeRepository.GetList(); - return passPortTypes; + var where = Expressionable.Create(); + if (!readPassportTypeInputDto.IsDelete.IsNullOrEmpty()) + { + where = where.And(a => a.IsDelete == readPassportTypeInputDto.IsDelete); + } + var count = 0; + var passPortTypes = passPortTypeRepository.AsQueryable().Where(where.ToExpression()).ToPageList(readPassportTypeInputDto.Page, readPassportTypeInputDto.PageSize, ref count); + var result = EntityMapper.MapList(passPortTypes); + return new ListOutputDto { listSource = result, total = count }; } /// @@ -640,11 +656,11 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public PassportType SelectPassPortTypeByTypeId(PassportType passPortType) + public SingleOutputDto SelectPassPortTypeByTypeId(ReadPassportTypeInputDto passPortType) { - PassportType passPortType1 = new PassportType(); - passPortType1 = passPortTypeRepository.GetSingle(a => a.PassportId == passPortType.PassportId && a.IsDelete != 1); - return passPortType1; + var passPortTypeEntity = passPortTypeRepository.GetSingle(a => a.PassportId == passPortType.PassportId && a.IsDelete != 1); + var result = EntityMapper.Map(passPortTypeEntity); + return new SingleOutputDto { Source = result }; } /// @@ -652,9 +668,11 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool InsertPassPortType(PassportType passPortType) + public BaseOutputDto InsertPassPortType(CreatePassportTypeInputDto passPortType) { - return passPortTypeRepository.Insert(passPortType); + var passPortTypeEntity = EntityMapper.Map(passPortType); + var result = passPortTypeRepository.Insert(passPortTypeEntity); + return new BaseOutputDto { StatusCode = result ? StatusCodeConstants.Success : StatusCodeConstants.InternalServerError }; } /// @@ -662,13 +680,14 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool DeletePassPortType(PassportType portType) + public BaseOutputDto DeletePassPortType(DeletePassportTypeInputDto portType) { - return passPortTypeRepository.Update(a => new PassportType() + var result = passPortTypeRepository.Update(a => new PassportType() { IsDelete = 1, DataChgUsr = portType.DataChgUsr, }, a => a.PassportId == portType.PassportId); + return new BaseOutputDto { StatusCode = result ? StatusCodeConstants.Success : StatusCodeConstants.InternalServerError }; } /// @@ -676,14 +695,15 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool UpdatePassPortType(PassportType portType) + public BaseOutputDto UpdatePassPortType(UpdatePassportTypeInputDto portType) { - return passPortTypeRepository.Update(a => new PassportType() + var result = passPortTypeRepository.Update(a => new PassportType() { PassportName = portType.PassportName, DataChgUsr = portType.DataChgUsr, DataChgDate = portType.DataChgDate }, a => a.PassportId == portType.PassportId); + return new BaseOutputDto { StatusCode = result ? StatusCodeConstants.Success : StatusCodeConstants.InternalServerError }; } #endregion @@ -694,22 +714,28 @@ namespace EOM.TSHotelManagement.Application /// 查询所有奖惩类型(可用) /// /// - public List SelectGBTypeAllCanUse() + public ListOutputDto SelectRewardPunishmentTypeAllCanUse() { - List gBTypes = new List(); - gBTypes = goodbadTypeRepository.GetList(a => a.IsDelete != 1); - return gBTypes; + var gBTypes = goodbadTypeRepository.GetList(a => a.IsDelete != 1); + var result = EntityMapper.MapList(gBTypes); + return new ListOutputDto { listSource = result, total = result.Count }; } /// /// 查询所有奖惩类型 /// /// - public List SelectGBTypeAll() + public ListOutputDto SelectRewardPunishmentTypeAll(ReadRewardPunishmentTypeInputDto readRewardPunishmentTypeInputDto) { - List gBTypes = new List(); - gBTypes = goodbadTypeRepository.GetList(); - return gBTypes; + var where = Expressionable.Create(); + if (!readRewardPunishmentTypeInputDto.IsDelete.IsNullOrEmpty()) + { + where = where.And(a => a.IsDelete == readRewardPunishmentTypeInputDto.IsDelete); + } + var count = 0; + var gBTypes = goodbadTypeRepository.AsQueryable().Where(where.ToExpression()).ToPageList(readRewardPunishmentTypeInputDto.Page, readRewardPunishmentTypeInputDto.PageSize, ref count); + var result = EntityMapper.MapList(gBTypes); + return new ListOutputDto { listSource = result, total = count }; } /// @@ -717,11 +743,11 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public GBType SelectGBTypeByTypeId(GBType gBType) + public SingleOutputDto SelectRewardPunishmentTypeByTypeId(ReadRewardPunishmentTypeInputDto gBType) { - GBType gBType1 = new GBType(); - gBType1 = goodbadTypeRepository.GetSingle(a => a.RewardPunishmentTypeId == gBType.RewardPunishmentTypeId && a.IsDelete != 1); - return gBType1; + var gBTypeEntity = goodbadTypeRepository.GetSingle(a => a.RewardPunishmentTypeId == gBType.GBTypeId && a.IsDelete != 1); + var result = EntityMapper.Map(gBTypeEntity); + return new SingleOutputDto { Source = result }; } /// @@ -729,9 +755,11 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool InsertGBType(GBType gBType) + public BaseOutputDto InsertRewardPunishmentType(CreateRewardPunishmentTypeInputDto gBType) { - return goodbadTypeRepository.Insert(gBType); + var gBTypeEntity = EntityMapper.Map(gBType); + var result = goodbadTypeRepository.Insert(gBTypeEntity); + return new BaseOutputDto { StatusCode = result ? StatusCodeConstants.Success : StatusCodeConstants.InternalServerError }; } /// @@ -739,13 +767,14 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool DeleteGBType(GBType gBType) + public BaseOutputDto DeleteRewardPunishmentType(DeleteRewardPunishmentTypeInputDto gBType) { - return goodbadTypeRepository.Update(a => new GBType() + var result = goodbadTypeRepository.Update(a => new RewardPunishmentType() { IsDelete = 1, DataChgUsr = gBType.DataChgUsr, - }, a => a.RewardPunishmentTypeId == gBType.RewardPunishmentTypeId); + }, a => a.RewardPunishmentTypeId == gBType.GBTypeId); + return new BaseOutputDto { StatusCode = result ? StatusCodeConstants.Success : StatusCodeConstants.InternalServerError }; } /// @@ -753,31 +782,33 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool UpdateGBType(GBType gBType) + public BaseOutputDto UpdateRewardPunishmentType(UpdateRewardPunishmentTypeInputDto gBType) { - return goodbadTypeRepository.Update(a => new GBType() + var result = goodbadTypeRepository.Update(a => new RewardPunishmentType() { - RewardPunishmentTypeName = gBType.RewardPunishmentTypeName, + RewardPunishmentTypeName = gBType.GBTypeName, DataChgUsr = gBType.DataChgUsr, DataChgDate = gBType.DataChgDate - }, a => a.RewardPunishmentTypeId == gBType.RewardPunishmentTypeId); + }, a => a.RewardPunishmentTypeId == gBType.GBTypeId); + return new BaseOutputDto { StatusCode = result ? StatusCodeConstants.Success : StatusCodeConstants.InternalServerError }; } #endregion #region URL模块 + /// /// 基础URL /// /// - public SystemInformation GetBase() + public SingleOutputDto GetBase() { - var baseTemp = new SystemInformation(); - - baseTemp = baseRepository.GetSingle(a => a.UrlNumber == 1); - - return baseTemp; + var baseTemp = baseRepository.GetSingle(a => a.UrlNumber == 1); + var result = EntityMapper.Map(baseTemp); + return new SingleOutputDto { Source = result }; } + #endregion + } } diff --git a/EOM.TSHotelManagement.Application/Zero/Base/IBaseService.cs b/EOM.TSHotelManagement.Application/Zero/Base/IBaseService.cs index 26f8f61..9d3fa49 100644 --- a/EOM.TSHotelManagement.Application/Zero/Base/IBaseService.cs +++ b/EOM.TSHotelManagement.Application/Zero/Base/IBaseService.cs @@ -22,6 +22,7 @@ * */ using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; namespace EOM.TSHotelManagement.Application @@ -37,34 +38,34 @@ namespace EOM.TSHotelManagement.Application /// 查询所有性别类型 /// /// - List SelectSexTypeAll(GenderType sexType = null); + ListOutputDto SelectGenderTypeAll(ReadGenderTypeInputDto genderTypeInputDto = null); /// /// 查询性别类型 /// /// - GenderType SelectSexType(GenderType sexType); + SingleOutputDto SelectGenderType(ReadGenderTypeInputDto genderTypeInputDto); /// /// 添加性别类型 /// - /// + /// /// - bool AddSexType(GenderType sexType); + BaseOutputDto AddGenderType(CreateGenderTypeInputDto createGenderTypeInputDto); /// /// 删除性别类型 /// - /// + /// /// - bool DelSexType(GenderType sexType); + BaseOutputDto DelGenderType(DeleteGenderTypeInputDto deleteGenderTypeInputDto); /// /// 更新性别类型 /// /// /// - bool UpdSexType(GenderType sexType); + BaseOutputDto UpdGenderType(UpdateGenderTypeInputDto sexType); #endregion @@ -83,34 +84,34 @@ namespace EOM.TSHotelManagement.Application /// 查询所有职位类型 /// /// - List SelectPositionAll(Position position = null); + ListOutputDto SelectPositionAll(ReadPositionInputDto position = null); /// /// 查询职位类型 /// /// - Position SelectPosition(Position position); + SingleOutputDto SelectPosition(ReadPositionInputDto position); /// /// 添加职位类型 /// /// /// - bool AddPosition(Position position); + BaseOutputDto AddPosition(CreatePositionInputDto position); /// /// 删除职位类型 /// /// /// - bool DelPosition(Position position); + BaseOutputDto DelPosition(DeletePositionInputDto position); /// /// 更新职位类型 /// /// /// - bool UpdPosition(Position position); + BaseOutputDto UpdPosition(UpdatePositionInputDto position); #endregion @@ -120,34 +121,34 @@ namespace EOM.TSHotelManagement.Application /// 查询所有民族类型 /// /// - List SelectNationAll(Nation nation = null); + ListOutputDto SelectNationAll(ReadNationInputDto nation = null); /// /// 查询民族类型 /// /// - Nation SelectNation(Nation nation); + SingleOutputDto SelectNation(ReadNationInputDto nation); /// /// 添加民族类型 /// /// /// - bool AddNation(Nation nation); + BaseOutputDto AddNation(CreateNationInputDto nation); /// /// 删除民族类型 /// /// /// - bool DelNation(Nation nation); + BaseOutputDto DelNation(DeleteNationInputDto nation); /// /// 更新民族类型 /// /// /// - bool UpdNation(Nation nation); + BaseOutputDto UpdNation(UpdateNationInputDto nation); #endregion @@ -157,34 +158,34 @@ namespace EOM.TSHotelManagement.Application /// 查询所有学历类型 /// /// - List SelectEducationAll(Education education = null); + ListOutputDto SelectEducationAll(ReadEducationInputDto education = null); /// /// 查询学历类型 /// /// - Education SelectEducation(Education education); + SingleOutputDto SelectEducation(ReadEducationInputDto education); /// /// 添加学历类型 /// /// /// - bool AddEducation(Education education); + BaseOutputDto AddEducation(CreateEducationInputDto education); /// /// 删除学历类型 /// /// /// - bool DelEducation(Education education); + BaseOutputDto DelEducation(DeleteEducationInputDto education); /// /// 更新学历类型 /// /// /// - bool UpdEducation(Education education); + BaseOutputDto UpdEducation(UpdateEducationInputDto education); #endregion @@ -194,40 +195,40 @@ namespace EOM.TSHotelManagement.Application /// 查询所有部门类型(可用) /// /// - List SelectDeptAllCanUse(); + ListOutputDto SelectDeptAllCanUse(); /// /// 查询所有部门类型 /// /// - List SelectDeptAll(); + ListOutputDto SelectDeptAll(ReadDepartmentInputDto readDepartmentInputDto); /// /// 查询部门类型 /// /// - Department SelectDept(Department dept); + SingleOutputDto SelectDept(ReadDepartmentInputDto dept); /// /// 添加部门类型 /// /// /// - bool AddDept(Department dept); + BaseOutputDto AddDept(CreateDepartmentInputDto dept); /// /// 删除部门类型 /// /// /// - bool DelDept(Department dept); + BaseOutputDto DelDept(DeleteDepartmentInputDto dept); /// /// 更新部门类型 /// /// /// - bool UpdDept(Department dept); + BaseOutputDto UpdDept(UpdateDepartmentInputDto dept); #endregion @@ -237,41 +238,41 @@ namespace EOM.TSHotelManagement.Application /// 查询所有客户类型(可用) /// /// - List SelectCustoTypeAllCanUse(); + ListOutputDto SelectCustoTypeAllCanUse(); /// /// 查询所有客户类型 /// /// - List SelectCustoTypeAll(); + ListOutputDto SelectCustoTypeAll(ReadCustoTypeInputDto readCustoTypeInputDto); /// /// 根据客户类型ID查询类型名称 /// /// /// - CustoType SelectCustoTypeByTypeId(CustoType custoType); + SingleOutputDto SelectCustoTypeByTypeId(ReadCustoTypeInputDto custoType); /// /// 添加客户类型 /// /// /// - bool InsertCustoType(CustoType custoType); + BaseOutputDto InsertCustoType(CreateCustoTypeInputDto custoType); /// /// 删除客户类型 /// /// /// - bool DeleteCustoType(CustoType custoType); + BaseOutputDto DeleteCustoType(DeleteCustoTypeInputDto custoType); /// /// 更新客户类型 /// /// /// - bool UpdateCustoType(CustoType custoType); + BaseOutputDto UpdateCustoType(UpdateCustoTypeInputDto custoType); #endregion @@ -281,41 +282,41 @@ namespace EOM.TSHotelManagement.Application /// 查询所有证件类型(可用) /// /// - List SelectPassPortTypeAllCanUse(); + ListOutputDto SelectPassPortTypeAllCanUse(); /// /// 查询所有证件类型 /// /// - List SelectPassPortTypeAll(); + ListOutputDto SelectPassPortTypeAll(ReadPassportTypeInputDto readPassportTypeInputDto); /// /// 根据证件类型ID查询类型名称 /// /// /// - PassportType SelectPassPortTypeByTypeId(PassportType passPortType); + SingleOutputDto SelectPassPortTypeByTypeId(ReadPassportTypeInputDto passPortType); /// /// 添加证件类型 /// /// /// - bool InsertPassPortType(PassportType passPortType); + BaseOutputDto InsertPassPortType(CreatePassportTypeInputDto passPortType); /// /// 删除证件类型 /// /// /// - bool DeletePassPortType(PassportType portType); + BaseOutputDto DeletePassPortType(DeletePassportTypeInputDto portType); /// /// 更新证件类型 /// /// /// - bool UpdatePassPortType(PassportType portType); + BaseOutputDto UpdatePassPortType(UpdatePassportTypeInputDto portType); #endregion @@ -325,41 +326,41 @@ namespace EOM.TSHotelManagement.Application /// 查询所有证件类型(可用) /// /// - List SelectGBTypeAllCanUse(); + ListOutputDto SelectRewardPunishmentTypeAllCanUse(); /// /// 查询所有奖惩类型 /// /// - List SelectGBTypeAll(); + ListOutputDto SelectRewardPunishmentTypeAll(ReadRewardPunishmentTypeInputDto readRewardPunishmentTypeInputDto); /// /// 根据奖惩类型ID查询类型名称 /// /// /// - GBType SelectGBTypeByTypeId(GBType gBType); + SingleOutputDto SelectRewardPunishmentTypeByTypeId(ReadRewardPunishmentTypeInputDto gBType); /// /// 添加奖惩类型 /// /// /// - bool InsertGBType(GBType gBType); + BaseOutputDto InsertRewardPunishmentType(CreateRewardPunishmentTypeInputDto gBType); /// /// 删除奖惩类型 /// /// /// - bool DeleteGBType(GBType gBType); + BaseOutputDto DeleteRewardPunishmentType(DeleteRewardPunishmentTypeInputDto gBType); /// /// 更新奖惩类型 /// /// /// - bool UpdateGBType(GBType gBType); + BaseOutputDto UpdateRewardPunishmentType(UpdateRewardPunishmentTypeInputDto gBType); #endregion @@ -368,7 +369,7 @@ namespace EOM.TSHotelManagement.Application /// 基础URL /// /// - SystemInformation GetBase(); + SingleOutputDto GetBase(); #endregion } } diff --git a/EOM.TSHotelManagement.Application/Zero/Menu/IMenuService.cs b/EOM.TSHotelManagement.Application/Zero/Menu/IMenuService.cs index 20b2d67..7a57aec 100644 --- a/EOM.TSHotelManagement.Application/Zero/Menu/IMenuService.cs +++ b/EOM.TSHotelManagement.Application/Zero/Menu/IMenuService.cs @@ -21,6 +21,7 @@ *SOFTWARE. * */ +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; namespace EOM.TSHotelManagement.Application @@ -34,7 +35,7 @@ namespace EOM.TSHotelManagement.Application /// 查询所有菜单信息 /// /// - List SelectMenuAll(); + ListOutputDto SelectMenuAll(ReadMenuInputDto readMenuInputDto); /// /// 构建菜单树 @@ -47,20 +48,20 @@ namespace EOM.TSHotelManagement.Application /// /// /// - bool InsertMenu(Menu menu); + BaseOutputDto InsertMenu(CreateMenuInputDto menu); /// /// 更新菜单 /// /// /// - bool UpdateMenu(Menu menu); + BaseOutputDto UpdateMenu(UpdateMenuInputDto menu); /// /// 删除菜单 /// /// /// - bool DeleteMenu(Menu menu); + BaseOutputDto DeleteMenu(DeleteMenuInputDto menu); } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Application/Zero/Menu/MenuService.cs b/EOM.TSHotelManagement.Application/Zero/Menu/MenuService.cs index 0c6cb9d..164b836 100644 --- a/EOM.TSHotelManagement.Application/Zero/Menu/MenuService.cs +++ b/EOM.TSHotelManagement.Application/Zero/Menu/MenuService.cs @@ -21,9 +21,12 @@ *SOFTWARE. * */ +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Util; using EOM.TSHotelManagement.EntityFramework; using jvncorelib.EntityLib; +using SqlSugar; namespace EOM.TSHotelManagement.Application { @@ -63,11 +66,24 @@ namespace EOM.TSHotelManagement.Application /// 查询所有菜单信息 /// /// - public List SelectMenuAll() + public ListOutputDto SelectMenuAll(ReadMenuInputDto readMenuInputDto) { - List allMenus = menuRepository.GetList().ToList(); + var where = Expressionable.Create(); - return allMenus; + if (!readMenuInputDto.IsDelete.IsNullOrEmpty()) + { + where = where.And(a => a.IsDelete == readMenuInputDto.IsDelete); + } + var count = 0; + List allMenus = menuRepository.AsQueryable().Where(where.ToExpression()).ToPageList(readMenuInputDto.Page, readMenuInputDto.PageSize, ref count); + + List result = EntityMapper.MapList(allMenus); + + return new ListOutputDto + { + listSource = result, + total = count + }; } /// @@ -75,9 +91,17 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool InsertMenu(Menu menu) + public BaseOutputDto InsertMenu(CreateMenuInputDto menu) { - return menuRepository.Insert(menu); + try + { + menuRepository.Insert(EntityMapper.Map(menu)); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } /// @@ -85,9 +109,17 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool UpdateMenu(Menu menu) + public BaseOutputDto UpdateMenu(UpdateMenuInputDto menu) { - return menuRepository.Update(menu); + try + { + menuRepository.Update(EntityMapper.Map(menu)); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } /// @@ -95,9 +127,17 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool DeleteMenu(Menu menu) + public BaseOutputDto DeleteMenu(DeleteMenuInputDto menu) { - return menuRepository.Delete(menu); + try + { + menuRepository.Update(EntityMapper.Map(menu)); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } /// diff --git a/EOM.TSHotelManagement.Application/Zero/Module/AdminModuleZeroService.cs b/EOM.TSHotelManagement.Application/Zero/Module/AdminModuleZeroService.cs index 225d7e8..02603c2 100644 --- a/EOM.TSHotelManagement.Application/Zero/Module/AdminModuleZeroService.cs +++ b/EOM.TSHotelManagement.Application/Zero/Module/AdminModuleZeroService.cs @@ -1,4 +1,6 @@ -using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Util; using EOM.TSHotelManagement.EntityFramework; namespace EOM.TSHotelManagement.Application @@ -26,7 +28,7 @@ namespace EOM.TSHotelManagement.Application /// 获取所有模块 /// /// - public List GetAllModule() + public ListOutputDto GetAllModule() { List modules = moduleZeroRepository.Change().GetList(); modules.ForEach(source => @@ -65,7 +67,15 @@ namespace EOM.TSHotelManagement.Application break; } }); - return modules; + + var listSource = EntityMapper.MapList(modules); + + return new ListOutputDto + { + listSource = listSource, + total = listSource.Count + }; + } /// @@ -73,7 +83,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public List GetAllModuleByAdmin(Administrator admin) + public ListOutputDto GetAllModuleByAdmin(ReadModulePermissionInputDto admin) { List moduleZeros = moduleZeroRepository.GetList(a => a.AdministratorAccount.Equals(admin.Account) && a.ModuleEnabled == 1); @@ -113,7 +123,14 @@ namespace EOM.TSHotelManagement.Application break; } }); - return moduleZeros; + + var listSource = EntityMapper.MapList(moduleZeros); + + return new ListOutputDto + { + listSource = listSource, + total = listSource.Count + }; } /// @@ -121,14 +138,15 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool AddModuleZeroList(List moduleZeros) + public BaseOutputDto AddModuleZeroList(List moduleZeros) { moduleZeros.ForEach(moduleZero => { moduleZero.ModuleName = moduleZero.ModuleName.Split('|', '|').FirstOrDefault().ToString(); }); var result = moduleZeroRepository.InsertRange(moduleZeros); - return result; + + return new BaseOutputDto(); } /// @@ -136,10 +154,11 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool DelModuleZeroList(ModulePermission moduleZero) + public BaseOutputDto DelModuleZeroList(DeleteModulePermissionInputDto moduleZero) { var result = moduleZeroRepository.Delete(a => a.AdministratorAccount.Equals(moduleZero.AdministratorAccount)); - return result; + + return new BaseOutputDto(); } diff --git a/EOM.TSHotelManagement.Application/Zero/Module/IAdminModuleZeroService.cs b/EOM.TSHotelManagement.Application/Zero/Module/IAdminModuleZeroService.cs index 57172e8..a6a4fbf 100644 --- a/EOM.TSHotelManagement.Application/Zero/Module/IAdminModuleZeroService.cs +++ b/EOM.TSHotelManagement.Application/Zero/Module/IAdminModuleZeroService.cs @@ -1,4 +1,5 @@ -using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Common.Core; namespace EOM.TSHotelManagement.Application { @@ -11,28 +12,28 @@ namespace EOM.TSHotelManagement.Application /// 获取所有模块 /// /// - List GetAllModule(); + ListOutputDto GetAllModule(); /// /// 根据账号获取对应模块 /// /// /// - List GetAllModuleByAdmin(Administrator admin); + ListOutputDto GetAllModuleByAdmin(ReadModulePermissionInputDto admin); /// /// 批量添加模块 /// /// /// - bool AddModuleZeroList(List moduleZeros); + BaseOutputDto AddModuleZeroList(List moduleZeros); /// /// 批量删除模块 /// /// /// - bool DelModuleZeroList(ModulePermission moduleZero); + BaseOutputDto DelModuleZeroList(DeleteModulePermissionInputDto moduleZero); } } diff --git a/EOM.TSHotelManagement.Application/Zero/Notice/INoticeService.cs b/EOM.TSHotelManagement.Application/Zero/Notice/INoticeService.cs index 9197f10..c38abc0 100644 --- a/EOM.TSHotelManagement.Application/Zero/Notice/INoticeService.cs +++ b/EOM.TSHotelManagement.Application/Zero/Notice/INoticeService.cs @@ -21,6 +21,7 @@ *SOFTWARE. * */ +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; namespace EOM.TSHotelManagement.Application @@ -35,23 +36,23 @@ namespace EOM.TSHotelManagement.Application /// 获取所有公告信息 /// /// - List SelectNoticeAll(); + ListOutputDto SelectNoticeAll(ReadAppointmentNoticeInputDto readAppointmentNoticeInputDto); #endregion /// /// 查询公告 /// - /// + /// /// - AppointmentNotice SelectNoticeByNoticeNo(string noticeId); + ReadAppointmentNoticeOutputDto SelectNoticeByNoticeNo(ReadAppointmentNoticeInputDto readAppointmentNoticeInputDto); #region 上传公告信息 /// /// 上传公告信息 /// - /// + /// /// - bool InsertNotice(AppointmentNotice notice); + BaseOutputDto InsertNotice(CreateAppointmentNoticeInputDto createAppointmentNoticeInputDto); #endregion } diff --git a/EOM.TSHotelManagement.Application/Zero/Notice/NoticeService.cs b/EOM.TSHotelManagement.Application/Zero/Notice/NoticeService.cs index 861bc6b..c1882df 100644 --- a/EOM.TSHotelManagement.Application/Zero/Notice/NoticeService.cs +++ b/EOM.TSHotelManagement.Application/Zero/Notice/NoticeService.cs @@ -21,8 +21,12 @@ *SOFTWARE. * */ +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Util; using EOM.TSHotelManagement.EntityFramework; +using jvncorelib.EntityLib; +using SqlSugar; namespace EOM.TSHotelManagement.Application { @@ -50,10 +54,24 @@ namespace EOM.TSHotelManagement.Application /// 获取所有公告信息 /// /// - public List SelectNoticeAll() + public ListOutputDto SelectNoticeAll(ReadAppointmentNoticeInputDto readAppointmentNoticeInputDto) { List ntc = new List(); - ntc = noticeRepository.GetList(a => a.IsDelete != 1); + var where = Expressionable.Create(); + if (!string.IsNullOrEmpty(readAppointmentNoticeInputDto.NoticeTheme)) + { + where = where.And(a => a.NoticeTheme.Contains(readAppointmentNoticeInputDto.NoticeTheme)); + } + if (!string.IsNullOrEmpty(readAppointmentNoticeInputDto.NoticeType)) + { + where = where.And(a => a.NoticeType == readAppointmentNoticeInputDto.NoticeType); + } + if (!readAppointmentNoticeInputDto.IsDelete.IsNullOrEmpty()) + { + where = where.And(a => a.IsDelete == readAppointmentNoticeInputDto.IsDelete); + } + var count = 0; + ntc = noticeRepository.AsQueryable().Where(where.ToExpression()).ToPageList(readAppointmentNoticeInputDto.Page,readAppointmentNoticeInputDto.PageSize,ref count); ntc.ForEach(source => { switch (source.NoticeType) @@ -66,19 +84,26 @@ namespace EOM.TSHotelManagement.Application break; } }); - return ntc; + + var listSource = EntityMapper.MapList(ntc); + + return new ListOutputDto + { + listSource = listSource, + total = listSource.Count + }; } #endregion /// /// 根据公告编号查找公告信息 /// - /// + /// /// - public AppointmentNotice SelectNoticeByNoticeNo(string noticeId) + public ReadAppointmentNoticeOutputDto SelectNoticeByNoticeNo(ReadAppointmentNoticeInputDto readAppointmentNoticeInputDto) { AppointmentNotice notice = new AppointmentNotice(); - notice = noticeRepository.GetSingle(a => a.NoticeNumber == noticeId); + notice = noticeRepository.GetSingle(a => a.NoticeNumber == readAppointmentNoticeInputDto.NoticeId); switch (notice.NoticeType) { case "PersonnelChanges": @@ -88,7 +113,9 @@ namespace EOM.TSHotelManagement.Application notice.NoticeTypeDescription = "普通公告"; break; } - return notice; + var source = EntityMapper.Map(notice); + + return source; } #region 上传公告信息 @@ -97,9 +124,17 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool InsertNotice(AppointmentNotice notice) + public BaseOutputDto InsertNotice(CreateAppointmentNoticeInputDto notice) { - return noticeRepository.Insert(notice); + try + { + noticeRepository.Insert(EntityMapper.Map(notice)); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } #endregion diff --git a/EOM.TSHotelManagement.Application/Zero/CheckInfo/ICheckInfoService.cs b/EOM.TSHotelManagement.Application/Zero/SupervisionStatistics/ISupervisionStatisticsService.cs similarity index 77% rename from EOM.TSHotelManagement.Application/Zero/CheckInfo/ICheckInfoService.cs rename to EOM.TSHotelManagement.Application/Zero/SupervisionStatistics/ISupervisionStatisticsService.cs index 5dd0526..1b8c02f 100644 --- a/EOM.TSHotelManagement.Application/Zero/CheckInfo/ICheckInfoService.cs +++ b/EOM.TSHotelManagement.Application/Zero/SupervisionStatistics/ISupervisionStatisticsService.cs @@ -21,6 +21,7 @@ *SOFTWARE. * */ +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; namespace EOM.TSHotelManagement.Application @@ -28,33 +29,33 @@ namespace EOM.TSHotelManagement.Application /// /// 监管统计接口 /// - public interface ICheckInfoService + public interface ISupervisionStatisticsService { /// /// 查询所有监管统计信息 /// /// - List SelectCheckInfoAll(); + ListOutputDto SelectSupervisionStatisticsAll(ReadSupervisionStatisticsInputDto readSupervisionStatisticsInputDto); /// /// 插入监管统计信息 /// /// /// - bool InsertCheckInfo(SupervisionStatistics checkInfo); + BaseOutputDto InsertSupervisionStatistics(CreateSupervisionStatisticsInputDto checkInfo); /// /// 更新监管统计信息 /// /// /// - bool UpdateCheckInfo(SupervisionStatistics checkInfo); + BaseOutputDto UpdateSupervisionStatistics(UpdateSupervisionStatisticsInputDto checkInfo); /// /// 删除监管统计信息 /// /// /// - bool DeleteCheckInfo(SupervisionStatistics checkInfo); + BaseOutputDto DeleteSupervisionStatistics(DeleteSupervisionStatisticsInputDto checkInfo); } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Application/Zero/CheckInfo/CheckInfoService.cs b/EOM.TSHotelManagement.Application/Zero/SupervisionStatistics/SupervisionStatisticsService.cs similarity index 45% rename from EOM.TSHotelManagement.Application/Zero/CheckInfo/CheckInfoService.cs rename to EOM.TSHotelManagement.Application/Zero/SupervisionStatistics/SupervisionStatisticsService.cs index 7603f59..f87d071 100644 --- a/EOM.TSHotelManagement.Application/Zero/CheckInfo/CheckInfoService.cs +++ b/EOM.TSHotelManagement.Application/Zero/SupervisionStatistics/SupervisionStatisticsService.cs @@ -21,16 +21,19 @@ *SOFTWARE. * */ +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Util; using EOM.TSHotelManagement.EntityFramework; using jvncorelib.EntityLib; +using SqlSugar; namespace EOM.TSHotelManagement.Application { /// /// 监管统计接口实现类 /// - public class CheckInfoService : ICheckInfoService + public class SupervisionStatisticsService : ISupervisionStatisticsService { /// /// 监管统计 @@ -41,7 +44,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public CheckInfoService(GenericRepository checkInfoRepository) + public SupervisionStatisticsService(GenericRepository checkInfoRepository) { this.checkInfoRepository = checkInfoRepository; } @@ -50,10 +53,15 @@ namespace EOM.TSHotelManagement.Application /// 查询所有监管统计信息 /// /// - public List SelectCheckInfoAll() + public ListOutputDto SelectSupervisionStatisticsAll(ReadSupervisionStatisticsInputDto readSupervisionStatisticsInputDto) { List cif = new List(); - cif = checkInfoRepository.GetList(a => a.IsDelete != 1); + + var where = Expressionable.Create(); + + where = where.And(a => a.IsDelete == readSupervisionStatisticsInputDto.IsDelete); + var count = 0; + cif = checkInfoRepository.AsQueryable().Where(where.ToExpression()).ToPageList(readSupervisionStatisticsInputDto.Page,readSupervisionStatisticsInputDto.PageSize,ref count); var deptId = cif.Select(a => a.SupervisingDepartment).ToList(); var depts = checkInfoRepository.Change().GetList(a => deptId.Contains(a.DepartmentNumber)); cif.ForEach(c => @@ -61,7 +69,14 @@ namespace EOM.TSHotelManagement.Application var dept = depts.SingleOrDefault(a => a.DepartmentNumber == c.SupervisingDepartment); c.SupervisingDepartmentName = !dept.IsNullOrEmpty() ? dept.DepartmentName : string.Empty; }); - return cif; + + var listSource = EntityMapper.MapList(cif); + + return new ListOutputDto + { + listSource = listSource, + total = listSource.Count + }; } /// @@ -69,9 +84,17 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool InsertCheckInfo(SupervisionStatistics checkInfo) + public BaseOutputDto InsertSupervisionStatistics(CreateSupervisionStatisticsInputDto checkInfo) { - return checkInfoRepository.Insert(checkInfo); + try + { + checkInfoRepository.Insert(EntityMapper.Map(checkInfo)); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } /// @@ -79,20 +102,28 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool UpdateCheckInfo(SupervisionStatistics checkInfo) + public BaseOutputDto UpdateSupervisionStatistics(UpdateSupervisionStatisticsInputDto checkInfo) { - return checkInfoRepository.Update(a => new SupervisionStatistics + try { - SupervisingDepartment = checkInfo.SupervisingDepartment, - SupervisionLoss = checkInfo.SupervisionLoss, - SupervisionScore = checkInfo.SupervisionScore, - SupervisionAdvice = checkInfo.SupervisionAdvice, - SupervisionStatistician = checkInfo.SupervisionStatistician, - SupervisionProgress = checkInfo.SupervisionProgress, - IsDelete = 0, - DataChgUsr = checkInfo.DataChgUsr, - DataChgDate = checkInfo.DataChgDate - },a => a.StatisticsNumber == checkInfo.StatisticsNumber); + checkInfoRepository.Update(a => new SupervisionStatistics + { + SupervisingDepartment = checkInfo.SupervisingDepartment, + SupervisionLoss = checkInfo.SupervisionLoss, + SupervisionScore = checkInfo.SupervisionScore, + SupervisionAdvice = checkInfo.SupervisionAdvice, + SupervisionStatistician = checkInfo.SupervisionStatistician, + SupervisionProgress = checkInfo.SupervisionProgress, + IsDelete = 0, + DataChgUsr = checkInfo.DataChgUsr, + DataChgDate = checkInfo.DataChgDate + }, a => a.StatisticsNumber == checkInfo.StatisticsNumber); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } /// @@ -100,14 +131,22 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool DeleteCheckInfo(SupervisionStatistics checkInfo) + public BaseOutputDto DeleteSupervisionStatistics(DeleteSupervisionStatisticsInputDto checkInfo) { - return checkInfoRepository.Update(a => new SupervisionStatistics + try + { + checkInfoRepository.Update(a => new SupervisionStatistics + { + IsDelete = 1, + DataChgUsr = checkInfo.DataChgUsr, + DataChgDate = checkInfo.DataChgDate + }, a => a.StatisticsNumber == checkInfo.StatisticsNumber); + } + catch (Exception ex) { - IsDelete = 1, - DataChgUsr = checkInfo.DataChgUsr, - DataChgDate = checkInfo.DataChgDate - }, a => a.StatisticsNumber == checkInfo.StatisticsNumber); + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } } } diff --git a/EOM.TSHotelManagement.Application/Zero/VipRule/IVipRuleAppService.cs b/EOM.TSHotelManagement.Application/Zero/VipRule/IVipRuleAppService.cs index 2a9d9d2..96deb61 100644 --- a/EOM.TSHotelManagement.Application/Zero/VipRule/IVipRuleAppService.cs +++ b/EOM.TSHotelManagement.Application/Zero/VipRule/IVipRuleAppService.cs @@ -22,6 +22,7 @@ * *模块说明:会员等级规则功能模块接口 */ +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; namespace EOM.TSHotelManagement.Application @@ -35,34 +36,34 @@ namespace EOM.TSHotelManagement.Application /// 查询会员等级规则列表 /// /// - List SelectVipRuleList(); + ListOutputDto SelectVipRuleList(ReadVipLevelRuleInputDto readVipLevelRuleInputDto); /// /// 查询会员等级规则 /// /// /// - VipLevelRule SelectVipRule(VipLevelRule vipRule); + SingleOutputDto SelectVipRule(ReadVipLevelRuleInputDto vipRule); /// /// 添加会员等级规则 /// /// /// - bool AddVipRule(VipLevelRule vipRule); + BaseOutputDto AddVipRule(CreateVipLevelRuleInputDto vipRule); /// /// 删除会员等级规则 /// /// /// - bool DelVipRule(VipLevelRule vipRule); + BaseOutputDto DelVipRule(DeleteVipLevelRuleInputDto vipRule); /// /// 更新会员等级规则 /// /// /// - bool UpdVipRule(VipLevelRule vipRule); + BaseOutputDto UpdVipRule(UpdateVipLevelRuleInputDto vipRule); } } diff --git a/EOM.TSHotelManagement.Application/Zero/VipRule/VipRuleAppService.cs b/EOM.TSHotelManagement.Application/Zero/VipRule/VipRuleAppService.cs index a0a56c2..bf03702 100644 --- a/EOM.TSHotelManagement.Application/Zero/VipRule/VipRuleAppService.cs +++ b/EOM.TSHotelManagement.Application/Zero/VipRule/VipRuleAppService.cs @@ -21,8 +21,12 @@ *SOFTWARE. * */ +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Util; using EOM.TSHotelManagement.EntityFramework; +using jvncorelib.EntityLib; +using SqlSugar; namespace EOM.TSHotelManagement.Application { @@ -56,11 +60,16 @@ namespace EOM.TSHotelManagement.Application /// 查询会员等级规则列表 /// /// - public List SelectVipRuleList() + public ListOutputDto SelectVipRuleList(ReadVipLevelRuleInputDto readVipLevelRuleInputDto) { List vipRules = new List(); - - var listSource = vipRuleRepository.GetList(a => a.IsDelete != 1); + var where = Expressionable.Create(); + if (!readVipLevelRuleInputDto.IsDelete.IsNullOrEmpty()) + { + where = where.And(a => a.IsDelete == readVipLevelRuleInputDto.IsDelete); + } + var count = 0; + var listSource = vipRuleRepository.AsQueryable().Where(where.ToExpression()).ToPageList(readVipLevelRuleInputDto.Page, readVipLevelRuleInputDto.PageSize, ref count); var listUserType = custoTypeRepository.GetList(a => a.IsDelete != 1); @@ -70,9 +79,13 @@ namespace EOM.TSHotelManagement.Application source.VipLevelName = userType == null ? "" : userType.CustomerTypeName; }); - vipRules = listSource; + var viprules = EntityMapper.MapList(listSource); - return vipRules; + return new ListOutputDto + { + listSource = viprules, + total = count + }; } /// @@ -80,7 +93,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public VipLevelRule SelectVipRule(VipLevelRule vipRule) + public SingleOutputDto SelectVipRule(ReadVipLevelRuleInputDto vipRule) { VipLevelRule vipRule1 = new VipLevelRule(); @@ -89,9 +102,12 @@ namespace EOM.TSHotelManagement.Application var userType = custoTypeRepository.GetSingle(a => a.CustomerType == source.VipLevelId); source.VipLevelName = userType == null ? "" : userType.CustomerTypeName; - vipRule1 = source; + var vipLevel = EntityMapper.Map(source); - return vipRule1; + return new SingleOutputDto + { + Source = vipLevel + }; } /// @@ -99,17 +115,25 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool AddVipRule(VipLevelRule vipRule) + public BaseOutputDto AddVipRule(CreateVipLevelRuleInputDto vipRule) { - return vipRuleRepository.Insert(new VipLevelRule() + try { - RuleSerialNumber = vipRule.RuleSerialNumber, - RuleName = vipRule.RuleName, - RuleValue = vipRule.RuleValue, - VipLevelId = vipRule.VipLevelId, - IsDelete = 0, - DataInsUsr = vipRule.DataInsUsr, - }); + vipRuleRepository.Insert(new VipLevelRule() + { + RuleSerialNumber = vipRule.RuleSerialNumber, + RuleName = vipRule.RuleName, + RuleValue = vipRule.RuleValue, + VipLevelId = vipRule.VipLevelId, + IsDelete = 0, + DataInsUsr = vipRule.DataInsUsr, + }); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } /// @@ -117,13 +141,21 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool DelVipRule(VipLevelRule vipRule) + public BaseOutputDto DelVipRule(DeleteVipLevelRuleInputDto vipRule) { - return vipRuleRepository.Update(a => new VipLevelRule + try { - IsDelete = 1, - DataChgUsr = vipRule.DataChgUsr, - }, a => a.RuleSerialNumber == vipRule.RuleSerialNumber); + vipRuleRepository.Update(a => new VipLevelRule + { + IsDelete = 1, + DataChgUsr = vipRule.DataChgUsr, + }, a => a.RuleSerialNumber == vipRule.RuleSerialNumber); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } /// @@ -131,16 +163,24 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool UpdVipRule(VipLevelRule vipRule) + public BaseOutputDto UpdVipRule(UpdateVipLevelRuleInputDto vipRule) { - return vipRuleRepository.Update(a => new VipLevelRule + try + { + vipRuleRepository.Update(a => new VipLevelRule + { + RuleName = vipRule.RuleName, + RuleValue = vipRule.RuleValue, + IsDelete = vipRule.IsDelete, + DataChgUsr = vipRule.DataChgUsr, + DataChgDate = vipRule.DataChgDate + }, a => a.RuleSerialNumber == vipRule.RuleSerialNumber); + } + catch (Exception ex) { - RuleName = vipRule.RuleName, - RuleValue = vipRule.RuleValue, - IsDelete = vipRule.IsDelete, - DataChgUsr = vipRule.DataChgUsr, - DataChgDate = vipRule.DataChgDate - }, a => a.RuleSerialNumber == vipRule.RuleSerialNumber); + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); } } } diff --git a/EOM.TSHotelManagement.Common.Contract/BaseDto/BaseOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/BaseDto/BaseOutputDto.cs index f1fa1fc..7d1a380 100644 --- a/EOM.TSHotelManagement.Common.Contract/BaseDto/BaseOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/BaseDto/BaseOutputDto.cs @@ -7,7 +7,7 @@ using System.Threading.Tasks; namespace EOM.TSHotelManagement.Common.Contract { - public class BaseOutputDto:BaseDto + public class BaseOutputDto { /// /// 状态码,例如 200 表示成功,500 表示服务器错误,400 表示客户端错误等 diff --git a/EOM.TSHotelManagement.Common.Contract/BaseDto/ListInputDto.cs b/EOM.TSHotelManagement.Common.Contract/BaseDto/ListInputDto.cs index 3362a5a..8151c1f 100644 --- a/EOM.TSHotelManagement.Common.Contract/BaseDto/ListInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/BaseDto/ListInputDto.cs @@ -16,5 +16,9 @@ namespace EOM.TSHotelManagement.Common.Contract /// 总数 /// public int PageSize { get; set; } = 10; + /// + /// 忽略分页 + /// + public int IgnorePaging { get; set; } = 0; } } diff --git a/EOM.TSHotelManagement.Common.Contract/BaseDto/ListOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/BaseDto/ListOutputDto.cs index f002b09..28f017b 100644 --- a/EOM.TSHotelManagement.Common.Contract/BaseDto/ListOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/BaseDto/ListOutputDto.cs @@ -38,6 +38,6 @@ namespace EOM.TSHotelManagement.Common.Contract /// /// 总数 /// - public int total { get; set; } + public int total { get; set; } = 0; } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/CreateAssetOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/CreateAssetOutputDto.cs deleted file mode 100644 index 660fcd3..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/CreateAssetOutputDto.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class CreateAssetOutputDto:BaseOutputDto - { - public string AssetNumber { get; set; } - public string AssetName { get; set; } - public decimal AssetValue { get; set; } - public string AssetValueFormatted { get; set; } - public string DepartmentCode { get; set; } - public string DepartmentName { get; set; } - public DateTime AcquisitionDate { get; set; } - public string AssetSource { get; set; } - public string AcquiredByEmployeeId { get; set; } - public string AcquiredByEmployeeName { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/DeleteAssetOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/DeleteAssetOutputDto.cs deleted file mode 100644 index 7e49c86..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/DeleteAssetOutputDto.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class DeleteAssetOutputDto:BaseOutputDto - { - public string AssetNumber { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/ReadAssetOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/ReadAssetOutputDto.cs index bfe2764..9e5f8dd 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/ReadAssetOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/ReadAssetOutputDto.cs @@ -1,6 +1,6 @@ namespace EOM.TSHotelManagement.Common.Contract { - public class ReadAssetOutputDto:BaseOutputDto + public class ReadAssetOutputDto { public string AssetNumber { get; set; } public string AssetName { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/UpdateAssetOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/UpdateAssetOutputDto.cs deleted file mode 100644 index 370d695..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/Asset/Dto/Asset/UpdateAssetOutputDto.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class UpdateAssetOutputDto:BaseOutputDto - { - public string AssetNumber { get; set; } - public string AssetName { get; set; } - public decimal AssetValue { get; set; } - public string AssetValueFormatted { get; set; } - public string DepartmentCode { get; set; } - public string DepartmentName { get; set; } - public DateTime AcquisitionDate { get; set; } - public string AssetSource { get; set; } - public string AcquiredByEmployeeId { get; set; } - public string AcquiredByEmployeeName { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/CreateCustoTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/CreateCustoTypeOutputDto.cs deleted file mode 100644 index b229202..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/CreateCustoTypeOutputDto.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class CreateCustoTypeOutputDto:BaseOutputDto - { - public int CustomerType { get; set; } - public string CustomerTypeName { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/DeleteCustoTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/DeleteCustoTypeOutputDto.cs deleted file mode 100644 index 25cdb47..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/DeleteCustoTypeOutputDto.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class DeleteCustoTypeOutputDto:BaseOutputDto - { - public int CustomerType { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/ReadCustoTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/ReadCustoTypeOutputDto.cs index b8183d1..1c88010 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/ReadCustoTypeOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/ReadCustoTypeOutputDto.cs @@ -1,6 +1,6 @@ namespace EOM.TSHotelManagement.Common.Contract { - public class ReadCustoTypeOutputDto:BaseOutputDto + public class ReadCustoTypeOutputDto { public int CustomerType { get; set; } public string CustomerTypeName { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/UpdateCustoTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/UpdateCustoTypeOutputDto.cs deleted file mode 100644 index ca53ad1..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/UpdateCustoTypeOutputDto.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class UpdateCustoTypeOutputDto:BaseOutputDto - { - public int CustomerType { get; set; } - public string CustomerTypeName { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/CreateCustomerOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/CreateCustomerOutputDto.cs deleted file mode 100644 index 9038cbf..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/CreateCustomerOutputDto.cs +++ /dev/null @@ -1,19 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class CreateCustomerOutputDto:BaseOutputDto - { - public string CustomerNumber { get; set; } - public string CustomerName { get; set; } - public int? CustomerGender { get; set; } - public int PassportType { get; set; } - public string GenderName { get; set; } - public string CustomerPhoneNumber { get; set; } - public DateTime DateOfBirth { get; set; } - public string CustomerTypeName { get; set; } - public string PassportTypeName { get; set; } - public string PassportID { get; set; } - public string CustomerAddress { get; set; } - public int CustomerType { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/DeleteCustomerOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/DeleteCustomerOutputDto.cs deleted file mode 100644 index 2101464..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/DeleteCustomerOutputDto.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class DeleteCustomerOutputDto:BaseOutputDto - { - public string CustomerNumber { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs index 1e2b39c..a24601e 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs @@ -1,8 +1,7 @@ -using EOM.TSHotelManagement.Common.Util; namespace EOM.TSHotelManagement.Common.Contract { - public class ReadCustomerOutputDto:BaseOutputDto + public class ReadCustomerOutputDto { public string CustomerNumber { get; set; } public string CustomerName { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/UpdateCustomerOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/UpdateCustomerOutputDto.cs deleted file mode 100644 index b7c443a..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/UpdateCustomerOutputDto.cs +++ /dev/null @@ -1,19 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class UpdateCustomerOutputDto:BaseOutputDto - { - public string CustomerNumber { get; set; } - public string CustomerName { get; set; } - public int? CustomerGender { get; set; } - public int PassportType { get; set; } - public string GenderName { get; set; } - public string CustomerPhoneNumber { get; set; } - public DateTime DateOfBirth { get; set; } - public string CustomerTypeName { get; set; } - public string PassportTypeName { get; set; } - public string PassportID { get; set; } - public string CustomerAddress { get; set; } - public int CustomerType { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/CreateGenderTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/CreateGenderTypeOutputDto.cs deleted file mode 100644 index 98a8e63..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/CreateGenderTypeOutputDto.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class CreateGenderTypeOutputDto:BaseOutputDto - { - public int GenderId { get; set; } - public string GenderName { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/DeleteGenderTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/DeleteGenderTypeOutputDto.cs deleted file mode 100644 index ce401e9..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/DeleteGenderTypeOutputDto.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class DeleteGenderTypeOutputDto:BaseOutputDto - { - public int GenderId { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/ReadGenderTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/ReadGenderTypeInputDto.cs index 398f953..ad8dfb5 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/ReadGenderTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/ReadGenderTypeInputDto.cs @@ -3,6 +3,7 @@ namespace EOM.TSHotelManagement.Common.Contract public class ReadGenderTypeInputDto:ListInputDto { public int GenderId { get; set; } + public string GenderName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/ReadGenderTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/ReadGenderTypeOutputDto.cs index 2b446a1..3c5c99b 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/ReadGenderTypeOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/ReadGenderTypeOutputDto.cs @@ -1,6 +1,6 @@ namespace EOM.TSHotelManagement.Common.Contract { - public class ReadGenderTypeOutputDto:BaseOutputDto + public class ReadGenderTypeOutputDto { public int GenderId { get; set; } public string GenderName { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/UpdateGenderTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/UpdateGenderTypeOutputDto.cs deleted file mode 100644 index b527d76..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/GenderType/UpdateGenderTypeOutputDto.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class UpdateGenderTypeOutputDto:BaseOutputDto - { - public int GenderId { get; set; } - public string GenderName { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/CreatePassportTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/CreatePassportTypeOutputDto.cs deleted file mode 100644 index 1b32d9a..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/CreatePassportTypeOutputDto.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class CreatePassportTypeOutputDto:BaseOutputDto - { - public int PassportId { get; set; } - public string PassportName { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/DeletePassportTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/DeletePassportTypeOutputDto.cs deleted file mode 100644 index 91c5193..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/DeletePassportTypeOutputDto.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class DeletePassportTypeOutputDto:BaseOutputDto - { - public int PassportId { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeOutputDto.cs index 1520146..8d6c070 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeOutputDto.cs @@ -1,6 +1,6 @@ namespace EOM.TSHotelManagement.Common.Contract { - public class ReadPassportTypeOutputDto:BaseOutputDto + public class ReadPassportTypeOutputDto { public int PassportId { get; set; } public string PassportName { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/UpdatePassportTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/UpdatePassportTypeOutputDto.cs deleted file mode 100644 index a92dee9..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/UpdatePassportTypeOutputDto.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class UpdatePassportTypeOutputDto:BaseOutputDto - { - public int PassportId { get; set; } - public string PassportName { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/CreateEnergyManagementOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/CreateEnergyManagementOutputDto.cs deleted file mode 100644 index 09e253e..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/CreateEnergyManagementOutputDto.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class CreateEnergyManagementOutputDto:BaseOutputDto - { - public int InformationId { get; set; } - public string RoomNumber { get; set; } - public string CustomerNumber { get; set; } - public DateTime StartDate { get; set; } - public DateTime EndDate { get; set; } - public decimal PowerUsage { get; set; } - public decimal WaterUsage { get; set; } - public string Recorder { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/DeleteEnergyManagementOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/DeleteEnergyManagementOutputDto.cs deleted file mode 100644 index 4b9b748..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/DeleteEnergyManagementOutputDto.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class DeleteEnergyManagementOutputDto:BaseOutputDto - { - public int InformationId { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementOutputDto.cs index 8787be1..9c526a2 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/ReadEnergyManagementOutputDto.cs @@ -1,6 +1,6 @@ namespace EOM.TSHotelManagement.Common.Contract { - public class ReadEnergyManagementOutputDto:BaseOutputDto + public class ReadEnergyManagementOutputDto { public int InformationId { get; set; } public string RoomNumber { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/UpdateEnergyManagementOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/UpdateEnergyManagementOutputDto.cs deleted file mode 100644 index faa2530..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/UpdateEnergyManagementOutputDto.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class UpdateEnergyManagementOutputDto:BaseOutputDto - { - public int InformationId { get; set; } - public string RoomNumber { get; set; } - public string CustomerNumber { get; set; } - public DateTime StartDate { get; set; } - public DateTime EndDate { get; set; } - public decimal PowerUsage { get; set; } - public decimal WaterUsage { get; set; } - public string Recorder { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/CreatePromotionContentOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/CreatePromotionContentOutputDto.cs deleted file mode 100644 index b3281a3..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/CreatePromotionContentOutputDto.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class CreatePromotionContentOutputDto:BaseOutputDto - { - public int PromotionId { get; set; } - public string PromotionTitle { get; set; } - public string PromotionContent { get; set; } - public DateTime StartDate { get; set; } - public DateTime EndDate { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/DeletePromotionContentOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/DeletePromotionContentOutputDto.cs deleted file mode 100644 index a9894ff..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/DeletePromotionContentOutputDto.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class DeletePromotionContentOutputDto:BaseOutputDto - { - public int PromotionId { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentOutputDto.cs index 93dc23d..65c20bd 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentOutputDto.cs @@ -1,6 +1,6 @@ namespace EOM.TSHotelManagement.Common.Contract { - public class ReadPromotionContentOutputDto:BaseOutputDto + public class ReadPromotionContentOutputDto { public int PromotionId { get; set; } public string PromotionTitle { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/UpdatePromotionContentOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/UpdatePromotionContentOutputDto.cs deleted file mode 100644 index 33e0897..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/UpdatePromotionContentOutputDto.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class UpdatePromotionContentOutputDto:BaseOutputDto - { - public int PromotionId { get; set; } - public string PromotionTitle { get; set; } - public string PromotionContent { get; set; } - public DateTime StartDate { get; set; } - public DateTime EndDate { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/CreateReserOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/CreateReserOutputDto.cs deleted file mode 100644 index 4718a5c..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/CreateReserOutputDto.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class CreateReserOutputDto:BaseOutputDto - { - public string ReservationId { get; set; } - public string CustomerNumber { get; set; } - public string RoomNumber { get; set; } - public DateTime ReservationDate { get; set; } - public DateTime CheckInDate { get; set; } - public DateTime CheckOutDate { get; set; } - public string ReservationStatus { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/DeleteReserOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/DeleteReserOutputDto.cs deleted file mode 100644 index 65b4f30..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/DeleteReserOutputDto.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class DeleteReserOutputDto:BaseOutputDto - { - public string ReservationId { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserOutputDto.cs index fab7a58..b910764 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserOutputDto.cs @@ -1,6 +1,6 @@ namespace EOM.TSHotelManagement.Common.Contract { - public class ReadReserOutputDto:BaseOutputDto + public class ReadReserOutputDto { public string ReservationId { get; set; } public string CustomerNumber { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/UpdateReserOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/UpdateReserOutputDto.cs deleted file mode 100644 index b8ce31d..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/UpdateReserOutputDto.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class UpdateReserOutputDto:BaseOutputDto - { - public string ReservationId { get; set; } - public string CustomerNumber { get; set; } - public string RoomNumber { get; set; } - public DateTime ReservationDate { get; set; } - public DateTime CheckInDate { get; set; } - public DateTime CheckOutDate { get; set; } - public string ReservationStatus { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/CreateRoomInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/CreateRoomInputDto.cs index caa4511..908b9c6 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/CreateRoomInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/CreateRoomInputDto.cs @@ -2,10 +2,15 @@ namespace EOM.TSHotelManagement.Common.Contract { public class CreateRoomInputDto : BaseInputDto { + public string RoomNumber { get; set; } public string RoomType { get; set; } - public string RoomState { get; set; } - public decimal RoomPrice { get; set; } - public string RoomDescription { get; set; } + public string CustomerNumber { get; set; } + public DateTime? LastCheckInTime { get; set; } + public DateTime? LastCheckOutTime { get; set; } + public int RoomStateId { get; set; } + public decimal RoomRent { get; set; } + public decimal RoomDeposit { get; set; } + public string RoomLocation { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/CreateRoomOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/CreateRoomOutputDto.cs deleted file mode 100644 index b0313b0..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/CreateRoomOutputDto.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class CreateRoomOutputDto : BaseOutputDto - { - public string RoomNumber { get; set; } - public string RoomType { get; set; } - public string RoomState { get; set; } - public decimal RoomPrice { get; set; } - public string RoomDescription { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/DeleteRoomOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/DeleteRoomOutputDto.cs deleted file mode 100644 index 7cd344b..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/DeleteRoomOutputDto.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class DeleteRoomOutputDto : BaseOutputDto - { - public string RoomNumber { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomInputDto.cs index c665afa..d5a5277 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomInputDto.cs @@ -3,6 +3,10 @@ namespace EOM.TSHotelManagement.Common.Contract public class ReadRoomInputDto : ListInputDto { public string RoomNumber { get; set; } + public int RoomStateId { get; set; } + public string RoomTypeName { get; set; } + public DateTime LastCheckInTime { get; set; } + public string CustomerNumber { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomOutputDto.cs index ef29d89..4dcdfc7 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomOutputDto.cs @@ -1,12 +1,16 @@ namespace EOM.TSHotelManagement.Common.Contract { - public class ReadRoomOutputDto : BaseOutputDto + public class ReadRoomOutputDto { public string RoomNumber { get; set; } public string RoomType { get; set; } - public string RoomState { get; set; } - public decimal RoomPrice { get; set; } - public string RoomDescription { get; set; } + public string CustomerNumber { get; set; } + public DateTime? LastCheckInTime { get; set; } + public DateTime? LastCheckOutTime { get; set; } + public int RoomStateId { get; set; } + public decimal RoomRent { get; set; } + public decimal RoomDeposit { get; set; } + public string RoomLocation { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/UpdateRoomInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/UpdateRoomInputDto.cs index a62e903..e47369f 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/UpdateRoomInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/UpdateRoomInputDto.cs @@ -4,9 +4,13 @@ namespace EOM.TSHotelManagement.Common.Contract { public string RoomNumber { get; set; } public string RoomType { get; set; } - public string RoomState { get; set; } - public decimal RoomPrice { get; set; } - public string RoomDescription { get; set; } + public string CustomerNumber { get; set; } + public DateTime? LastCheckInTime { get; set; } + public DateTime? LastCheckOutTime { get; set; } + public int RoomStateId { get; set; } + public decimal RoomRent { get; set; } + public decimal RoomDeposit { get; set; } + public string RoomLocation { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/UpdateRoomOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/UpdateRoomOutputDto.cs deleted file mode 100644 index 1a92b9e..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/UpdateRoomOutputDto.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class UpdateRoomOutputDto : BaseOutputDto - { - public string RoomNumber { get; set; } - public string RoomType { get; set; } - public string RoomState { get; set; } - public decimal RoomPrice { get; set; } - public string RoomDescription { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/CreateRoomStateOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/CreateRoomStateOutputDto.cs deleted file mode 100644 index 7dc853e..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/CreateRoomStateOutputDto.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class CreateRoomStateOutputDto:BaseOutputDto - { - public int RoomStateId { get; set; } - public string RoomStateName { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/DeleteRoomStateOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/DeleteRoomStateOutputDto.cs deleted file mode 100644 index 65cb8c1..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/DeleteRoomStateOutputDto.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class DeleteRoomStateOutputDto:BaseOutputDto - { - public int RoomStateId { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/ReadRoomStateOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/ReadRoomStateOutputDto.cs index 20957eb..d9d96da 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/ReadRoomStateOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/ReadRoomStateOutputDto.cs @@ -1,6 +1,6 @@ namespace EOM.TSHotelManagement.Common.Contract { - public class ReadRoomStateOutputDto:BaseOutputDto + public class ReadRoomStateOutputDto { public int RoomStateId { get; set; } public string RoomStateName { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/UpdateRoomStateOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/UpdateRoomStateOutputDto.cs deleted file mode 100644 index 7ea6394..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomState/UpdateRoomStateOutputDto.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class UpdateRoomStateOutputDto:BaseOutputDto - { - public int RoomStateId { get; set; } - public string RoomStateName { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/CreateRoomTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/CreateRoomTypeInputDto.cs index 11b0e26..52d6783 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/CreateRoomTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/CreateRoomTypeInputDto.cs @@ -2,8 +2,10 @@ namespace EOM.TSHotelManagement.Common.Contract { public class CreateRoomTypeInputDto: BaseInputDto { + public int RoomTypeId { get; set; } public string RoomTypeName { get; set; } - public decimal RoomTypePrice { get; set; } + public decimal RoomRent { get; set; } + public decimal RoomDeposit { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/CreateRoomTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/CreateRoomTypeOutputDto.cs deleted file mode 100644 index 1deef34..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/CreateRoomTypeOutputDto.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class CreateRoomTypeOutputDto:BaseOutputDto - { - public int RoomTypeId { get; set; } - public string RoomTypeName { get; set; } - public decimal RoomTypePrice { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/DeleteRoomTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/DeleteRoomTypeOutputDto.cs deleted file mode 100644 index 95165f0a..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/DeleteRoomTypeOutputDto.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class DeleteRoomTypeOutputDto:BaseOutputDto - { - public int RoomTypeId { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/ReadRoomTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/ReadRoomTypeInputDto.cs index 88e88c8..e7fc121 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/ReadRoomTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/ReadRoomTypeInputDto.cs @@ -2,7 +2,11 @@ namespace EOM.TSHotelManagement.Common.Contract { public class ReadRoomTypeInputDto:ListInputDto { + public string RoomNumber { get; set; } public int RoomTypeId { get; set; } + public string RoomTypeName { get; set; } + public decimal RoomRent { get; set; } + public decimal RoomDeposit { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/ReadRoomTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/ReadRoomTypeOutputDto.cs index f60b2cd..b7999fd 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/ReadRoomTypeOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/ReadRoomTypeOutputDto.cs @@ -1,6 +1,6 @@ namespace EOM.TSHotelManagement.Common.Contract { - public class ReadRoomTypeOutputDto:BaseOutputDto + public class ReadRoomTypeOutputDto { public int RoomTypeId { get; set; } public string RoomTypeName { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/UpdateRoomTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/UpdateRoomTypeInputDto.cs index 0999fd1..96165ce 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/UpdateRoomTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/UpdateRoomTypeInputDto.cs @@ -1,10 +1,14 @@ +using EOM.TSHotelManagement.Common.Util; +using SqlSugar; + namespace EOM.TSHotelManagement.Common.Contract { public class UpdateRoomTypeInputDto: BaseInputDto { public int RoomTypeId { get; set; } public string RoomTypeName { get; set; } - public decimal RoomTypePrice { get; set; } + public decimal RoomRent { get; set; } + public decimal RoomDeposit { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/UpdateRoomTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/UpdateRoomTypeOutputDto.cs deleted file mode 100644 index 17e4122..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/UpdateRoomTypeOutputDto.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class UpdateRoomTypeOutputDto:BaseOutputDto - { - public int RoomTypeId { get; set; } - public string RoomTypeName { get; set; } - public decimal RoomTypePrice { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/CreateSellThingInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/CreateSellThingInputDto.cs index ab35d15..6ee8f74 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/CreateSellThingInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/CreateSellThingInputDto.cs @@ -2,9 +2,11 @@ namespace EOM.TSHotelManagement.Common.Contract { public class CreateSellThingInputDto: BaseInputDto { - public string SellThingName { get; set; } - public decimal SellThingPrice { get; set; } - public string SellThingDescription { get; set; } + public string ProductNumber { get; set; } + public string ProductName { get; set; } + public decimal ProductPrice { get; set; } + public string Specification { get; set; } + public decimal Stock { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/CreateSellThingOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/CreateSellThingOutputDto.cs deleted file mode 100644 index 105b3ce..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/CreateSellThingOutputDto.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class CreateSellThingOutputDto:BaseOutputDto - { - public int SellThingId { get; set; } - public string SellThingName { get; set; } - public decimal SellThingPrice { get; set; } - public string SellThingDescription { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/DeleteSellThingInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/DeleteSellThingInputDto.cs index 27337de..dc47ed7 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/DeleteSellThingInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/DeleteSellThingInputDto.cs @@ -2,7 +2,13 @@ namespace EOM.TSHotelManagement.Common.Contract { public class DeleteSellThingInputDto: BaseInputDto { - public int SellThingId { get; set; } + public string RoomNumber { get; set; } + public string CustomerNumber { get; set; } + public string ProductNumber { get; set; } + public string ProductName { get; set; } + public decimal ProductPrice { get; set; } + public string Specification { get; set; } + public decimal Stock { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/DeleteSellThingOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/DeleteSellThingOutputDto.cs deleted file mode 100644 index 376ab73..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/DeleteSellThingOutputDto.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class DeleteSellThingOutputDto:BaseOutputDto - { - public int SellThingId { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingInputDto.cs index bdb97b4..4d58b83 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingInputDto.cs @@ -2,7 +2,11 @@ namespace EOM.TSHotelManagement.Common.Contract { public class ReadSellThingInputDto:ListInputDto { - public int SellThingId { get; set; } + public string ProductNumber { get; set; } + public string ProductName { get; set; } + public decimal ProductPrice { get; set; } + public string Specification { get; set; } + public decimal Stock { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingOutputDto.cs index 3a9dfbb..fec36c7 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingOutputDto.cs @@ -1,11 +1,12 @@ namespace EOM.TSHotelManagement.Common.Contract { - public class ReadSellThingOutputDto:BaseOutputDto + public class ReadSellThingOutputDto { - public int SellThingId { get; set; } - public string SellThingName { get; set; } - public decimal SellThingPrice { get; set; } - public string SellThingDescription { get; set; } + public string ProductNumber { get; set; } + public string ProductName { get; set; } + public decimal ProductPrice { get; set; } + public string Specification { get; set; } + public decimal Stock { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/UpdateSellThingInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/UpdateSellThingInputDto.cs index 80355bc..6d824dd 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/UpdateSellThingInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/UpdateSellThingInputDto.cs @@ -2,10 +2,11 @@ namespace EOM.TSHotelManagement.Common.Contract { public class UpdateSellThingInputDto: BaseInputDto { - public int SellThingId { get; set; } - public string SellThingName { get; set; } - public decimal SellThingPrice { get; set; } - public string SellThingDescription { get; set; } + public string ProductNumber { get; set; } + public string ProductName { get; set; } + public decimal ProductPrice { get; set; } + public string Specification { get; set; } + public decimal Stock { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/UpdateSellThingOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/UpdateSellThingOutputDto.cs deleted file mode 100644 index 8b94525..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/UpdateSellThingOutputDto.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class UpdateSellThingOutputDto:BaseOutputDto - { - public int SellThingId { get; set; } - public string SellThingName { get; set; } - public decimal SellThingPrice { get; set; } - public string SellThingDescription { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/CreateSpendOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/CreateSpendOutputDto.cs deleted file mode 100644 index 9d14abb..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/CreateSpendOutputDto.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class CreateSpendOutputDto:BaseOutputDto - { - public string RoomNumber { get; set; } - public string CustomerNumber { get; set; } - public string ProductName { get; set; } - public int ConsumptionQuantity { get; set; } - public decimal ProductPrice { get; set; } - public string ProductPriceFormatted { get; set; } - public decimal ConsumptionAmount { get; set; } - public string ConsumptionAmountFormatted { get; set; } - public DateTime ConsumptionTime { get; set; } - public string SettlementStatus { get; set; } - public string SettlementStatusDescription { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/DeleteSpendOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/DeleteSpendOutputDto.cs deleted file mode 100644 index d4f43ba..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/DeleteSpendOutputDto.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class DeleteSpendOutputDto:BaseOutputDto - { - public string RoomNumber { get; set; } - public string CustomerNumber { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendInputDto.cs index 8e60bf5..08906a9 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendInputDto.cs @@ -4,6 +4,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public string RoomNumber { get; set; } public string CustomerNumber { get; set; } + public DateTime ConsumptionTime { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendOutputDto.cs index 8e1b40e..67d7668 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendOutputDto.cs @@ -1,6 +1,6 @@ namespace EOM.TSHotelManagement.Common.Contract { - public class ReadSpendOutputDto:BaseOutputDto + public class ReadSpendOutputDto { public string RoomNumber { get; set; } public string CustomerNumber { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/UpdateSpendOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/UpdateSpendOutputDto.cs deleted file mode 100644 index 245fff3..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/UpdateSpendOutputDto.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class UpdateSpendOutputDto:BaseOutputDto - { - public string RoomNumber { get; set; } - public string CustomerNumber { get; set; } - public string ProductName { get; set; } - public int ConsumptionQuantity { get; set; } - public decimal ProductPrice { get; set; } - public string ProductPriceFormatted { get; set; } - public decimal ConsumptionAmount { get; set; } - public string ConsumptionAmountFormatted { get; set; } - public DateTime ConsumptionTime { get; set; } - public string SettlementStatus { get; set; } - public string SettlementStatusDescription { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/CreateEmployeeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/CreateEmployeeInputDto.cs index f0e13ad..1eb8230 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/CreateEmployeeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/CreateEmployeeInputDto.cs @@ -2,13 +2,19 @@ namespace EOM.TSHotelManagement.Common.Contract { public class CreateEmployeeInputDto: BaseInputDto { + public string EmployeeId { get; set; } public string EmployeeName { get; set; } - public string EmployeeGender { get; set; } + public string Gender { get; set; } public DateTime DateOfBirth { get; set; } + public string Ethnicity { get; set; } + public string PhoneNumber { get; set; } public string Department { get; set; } + public string Address { get; set; } public string Position { get; set; } + public string IdCardNumber { get; set; } public DateTime HireDate { get; set; } - public decimal Salary { get; set; } + public string PoliticalAffiliation { get; set; } + public string EducationLevel { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/DeleteEmployeeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/DeleteEmployeeOutputDto.cs deleted file mode 100644 index 669ecb6..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/DeleteEmployeeOutputDto.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class DeleteEmployeeOutputDto:BaseOutputDto - { - public string EmployeeId { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeInputDto.cs index 8709d13..767f004 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeInputDto.cs @@ -3,6 +3,18 @@ namespace EOM.TSHotelManagement.Common.Contract public class ReadEmployeeInputDto:ListInputDto { public string EmployeeId { get; set; } + public string EmployeeName { get; set; } + public string Gender { get; set; } + public DateTime DateOfBirth { get; set; } + public string Ethnicity { get; set; } + public string PhoneNumber { get; set; } + public string Department { get; set; } + public string Address { get; set; } + public string Position { get; set; } + public string IdCardNumber { get; set; } + public DateTime HireDate { get; set; } + public string PoliticalAffiliation { get; set; } + public string EducationLevel { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/CreateEmployeeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs similarity index 41% rename from EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/CreateEmployeeOutputDto.cs rename to EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs index 3110c00..08d9be5 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/CreateEmployeeOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs @@ -1,16 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + namespace EOM.TSHotelManagement.Common.Contract { - public class CreateEmployeeOutputDto:BaseOutputDto + public class ReadEmployeeOutputDto { public string EmployeeId { get; set; } public string EmployeeName { get; set; } - public string EmployeeGender { get; set; } + public string Gender { get; set; } public DateTime DateOfBirth { get; set; } + public string Ethnicity { get; set; } + public string PhoneNumber { get; set; } public string Department { get; set; } + public string Address { get; set; } public string Position { get; set; } + public string IdCardNumber { get; set; } public DateTime HireDate { get; set; } - public decimal Salary { get; set; } + public string PoliticalAffiliation { get; set; } + public string EducationLevel { get; set; } } } - - diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/UpdateEmployeeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/UpdateEmployeeInputDto.cs index 99d19f1..217b87a 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/UpdateEmployeeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/UpdateEmployeeInputDto.cs @@ -4,12 +4,18 @@ namespace EOM.TSHotelManagement.Common.Contract { public string EmployeeId { get; set; } public string EmployeeName { get; set; } - public string EmployeeGender { get; set; } + public int Gender { get; set; } public DateTime DateOfBirth { get; set; } + public string Ethnicity { get; set; } + public string PhoneNumber { get; set; } public string Department { get; set; } + public string Address { get; set; } public string Position { get; set; } + public string IdCardNumber { get; set; } public DateTime HireDate { get; set; } - public decimal Salary { get; set; } + public string PoliticalAffiliation { get; set; } + public string EducationLevel { get; set; } + public string Password { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/UpdateEmployeeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/UpdateEmployeeOutputDto.cs deleted file mode 100644 index 61914fc..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/UpdateEmployeeOutputDto.cs +++ /dev/null @@ -1,16 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class UpdateEmployeeOutputDto:BaseOutputDto - { - public string EmployeeId { get; set; } - public string EmployeeName { get; set; } - public string EmployeeGender { get; set; } - public DateTime DateOfBirth { get; set; } - public string Department { get; set; } - public string Position { get; set; } - public DateTime HireDate { get; set; } - public decimal Salary { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/CreateEmployeeCheckOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/CreateEmployeeCheckOutputDto.cs deleted file mode 100644 index c77b8f2..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/CreateEmployeeCheckOutputDto.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class CreateEmployeeCheckOutputDto:BaseOutputDto - { - public int CheckId { get; set; } - public string EmployeeId { get; set; } - public DateTime CheckDate { get; set; } - public string CheckStatus { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/DeleteEmployeeCheckOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/DeleteEmployeeCheckOutputDto.cs deleted file mode 100644 index 98f4078..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/DeleteEmployeeCheckOutputDto.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class DeleteEmployeeCheckOutputDto:BaseOutputDto - { - public int CheckId { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckInputDto.cs index 1d71f6e..ac32f7e 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckInputDto.cs @@ -3,6 +3,7 @@ namespace EOM.TSHotelManagement.Common.Contract public class ReadEmployeeCheckInputDto:ListInputDto { public int CheckId { get; set; } + public string EmployeeId { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckOutputDto.cs index abb30e6..cf426de 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckOutputDto.cs @@ -1,6 +1,6 @@ namespace EOM.TSHotelManagement.Common.Contract { - public class ReadEmployeeCheckOutputDto:BaseOutputDto + public class ReadEmployeeCheckOutputDto { public int CheckId { get; set; } public string EmployeeId { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/UpdateEmployeeCheckOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/UpdateEmployeeCheckOutputDto.cs deleted file mode 100644 index a014273..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/UpdateEmployeeCheckOutputDto.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class UpdateEmployeeCheckOutputDto:BaseOutputDto - { - public int CheckId { get; set; } - public string EmployeeId { get; set; } - public DateTime CheckDate { get; set; } - public string CheckStatus { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/CreateEmployeeHistoryOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/CreateEmployeeHistoryOutputDto.cs deleted file mode 100644 index a135215..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/CreateEmployeeHistoryOutputDto.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class CreateEmployeeHistoryOutputDto:BaseOutputDto - { - public int HistoryId { get; set; } - public string EmployeeId { get; set; } - public DateTime ChangeDate { get; set; } - public string ChangeType { get; set; } - public string ChangeDescription { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/DeleteEmployeeHistoryOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/DeleteEmployeeHistoryOutputDto.cs deleted file mode 100644 index f1bd9fe..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/DeleteEmployeeHistoryOutputDto.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class DeleteEmployeeHistoryOutputDto:BaseOutputDto - { - public int HistoryId { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryInputDto.cs index dfb5070..85fb3d9 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryInputDto.cs @@ -3,6 +3,7 @@ namespace EOM.TSHotelManagement.Common.Contract public class ReadEmployeeHistoryInputDto:ListInputDto { public int HistoryId { get; set; } + public string EmployeeId { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryOutputDto.cs index 5193b28..ad8e312 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryOutputDto.cs @@ -1,6 +1,6 @@ namespace EOM.TSHotelManagement.Common.Contract { - public class ReadEmployeeHistoryOutputDto:BaseOutputDto + public class ReadEmployeeHistoryOutputDto { public int HistoryId { get; set; } public string EmployeeId { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/UpdateEmployeeHistoryOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/UpdateEmployeeHistoryOutputDto.cs deleted file mode 100644 index bf16023..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/UpdateEmployeeHistoryOutputDto.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class UpdateEmployeeHistoryOutputDto:BaseOutputDto - { - public int HistoryId { get; set; } - public string EmployeeId { get; set; } - public DateTime ChangeDate { get; set; } - public string ChangeType { get; set; } - public string ChangeDescription { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/CreateEmployeePhotoOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/CreateEmployeePhotoOutputDto.cs deleted file mode 100644 index c1d79af..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/CreateEmployeePhotoOutputDto.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class CreateEmployeePhotoOutputDto:BaseOutputDto - { - public int PhotoId { get; set; } - public string EmployeeId { get; set; } - public string PhotoUrl { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/DeleteEmployeePhotoInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/DeleteEmployeePhotoInputDto.cs index 727c5fc..37c2545 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/DeleteEmployeePhotoInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/DeleteEmployeePhotoInputDto.cs @@ -3,6 +3,7 @@ namespace EOM.TSHotelManagement.Common.Contract public class DeleteEmployeePhotoInputDto:ListInputDto { public int PhotoId { get; set; } + public string EmployeeId { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/DeleteEmployeePhotoOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/DeleteEmployeePhotoOutputDto.cs deleted file mode 100644 index 0a9d63d..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/DeleteEmployeePhotoOutputDto.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class DeleteEmployeePhotoOutputDto:BaseOutputDto - { - public int PhotoId { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoInputDto.cs index b790a0d..d8a3823 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoInputDto.cs @@ -3,6 +3,7 @@ namespace EOM.TSHotelManagement.Common.Contract public class ReadEmployeePhotoInputDto:ListInputDto { public int PhotoId { get; set; } + public string EmployeeId { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoOutputDto.cs index b2f0be4..1bbde2d 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoOutputDto.cs @@ -1,6 +1,6 @@ namespace EOM.TSHotelManagement.Common.Contract { - public class ReadEmployeePhotoOutputDto:BaseOutputDto + public class ReadEmployeePhotoOutputDto { public int PhotoId { get; set; } public string EmployeeId { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/UpdateEmployeePhotoOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/UpdateEmployeePhotoOutputDto.cs deleted file mode 100644 index 746eb01..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/UpdateEmployeePhotoOutputDto.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class UpdateEmployeePhotoOutputDto:BaseOutputDto - { - public int PhotoId { get; set; } - public string EmployeeId { get; set; } - public string PhotoUrl { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/CreateEmployeeRewardPunishmentOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/CreateEmployeeRewardPunishmentOutputDto.cs deleted file mode 100644 index f9ce434..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/CreateEmployeeRewardPunishmentOutputDto.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class CreateEmployeeRewardPunishmentOutputDto:BaseOutputDto - { - public int RewardPunishmentId { get; set; } - public string EmployeeId { get; set; } - public DateTime RewardPunishmentDate { get; set; } - public string RewardPunishmentType { get; set; } - public string RewardPunishmentDescription { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/DeleteEmployeeRewardPunishmentOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/DeleteEmployeeRewardPunishmentOutputDto.cs deleted file mode 100644 index 3ce0af1..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/DeleteEmployeeRewardPunishmentOutputDto.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class DeleteEmployeeRewardPunishmentOutputDto:BaseOutputDto - { - public int RewardPunishmentId { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentInputDto.cs index aba3237..9a58abc 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentInputDto.cs @@ -3,6 +3,7 @@ namespace EOM.TSHotelManagement.Common.Contract public class ReadEmployeeRewardPunishmentInputDto:ListInputDto { public int RewardPunishmentId { get; set; } + public string EmployeeId { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentOutputDto.cs index 423d53f..2fa6a66 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentOutputDto.cs @@ -1,6 +1,6 @@ namespace EOM.TSHotelManagement.Common.Contract { - public class ReadEmployeeRewardPunishmentOutputDto:BaseOutputDto + public class ReadEmployeeRewardPunishmentOutputDto { public int RewardPunishmentId { get; set; } public string EmployeeId { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/UpdateEmployeeRewardPunishmentOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/UpdateEmployeeRewardPunishmentOutputDto.cs deleted file mode 100644 index 13bf22a..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/UpdateEmployeeRewardPunishmentOutputDto.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class UpdateEmployeeRewardPunishmentOutputDto:BaseOutputDto - { - public int RewardPunishmentId { get; set; } - public string EmployeeId { get; set; } - public DateTime RewardPunishmentDate { get; set; } - public string RewardPunishmentType { get; set; } - public string RewardPunishmentDescription { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/CreateRewardPunishmentTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/CreateRewardPunishmentTypeInputDto.cs index d8f8673..d94e6e0 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/CreateRewardPunishmentTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/CreateRewardPunishmentTypeInputDto.cs @@ -1,6 +1,6 @@ namespace EOM.TSHotelManagement.Common.Contract { - public class CreateGBTypeInputDto: BaseInputDto + public class CreateRewardPunishmentTypeInputDto : BaseInputDto { public string GBTypeName { get; set; } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/CreateRewardPunishmentTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/CreateRewardPunishmentTypeOutputDto.cs deleted file mode 100644 index cf5ff6b..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/CreateRewardPunishmentTypeOutputDto.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class CreateGBTypeOutputDto:BaseOutputDto - { - public int GBTypeId { get; set; } - public string GBTypeName { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/DeleteRewardPunishmentTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/DeleteRewardPunishmentTypeInputDto.cs index 6d36420..e7ab59d 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/DeleteRewardPunishmentTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/DeleteRewardPunishmentTypeInputDto.cs @@ -1,6 +1,6 @@ namespace EOM.TSHotelManagement.Common.Contract { - public class DeleteGBTypeInputDto: BaseInputDto + public class DeleteRewardPunishmentTypeInputDto : BaseInputDto { public int GBTypeId { get; set; } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/DeleteRewardPunishmentTypeeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/DeleteRewardPunishmentTypeeOutputDto.cs deleted file mode 100644 index 18e0e4e..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/DeleteRewardPunishmentTypeeOutputDto.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class DeleteGBTypeOutputDto:BaseOutputDto - { - public int GBTypeId { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeInputDto.cs index cae4925..13408e8 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeInputDto.cs @@ -1,6 +1,6 @@ namespace EOM.TSHotelManagement.Common.Contract { - public class ReadGBTypeInputDto:ListInputDto + public class ReadRewardPunishmentTypeInputDto : ListInputDto { public int GBTypeId { get; set; } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeOutputDto.cs index 6675911..ca248f8 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeOutputDto.cs @@ -1,6 +1,6 @@ namespace EOM.TSHotelManagement.Common.Contract { - public class ReadGBTypeOutputDto:BaseOutputDto + public class ReadRewardPunishmentTypeOutputDto { public int GBTypeId { get; set; } public string GBTypeName { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/UpdateRewardPunishmentTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/UpdateRewardPunishmentTypeInputDto.cs index d2e817c..ddf736a 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/UpdateRewardPunishmentTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/UpdateRewardPunishmentTypeInputDto.cs @@ -1,6 +1,6 @@ namespace EOM.TSHotelManagement.Common.Contract { - public class UpdateGBTypeInputDto: BaseInputDto + public class UpdateRewardPunishmentTypeInputDto : BaseInputDto { public int GBTypeId { get; set; } public string GBTypeName { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/UpdateRewardPunishmentTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/UpdateRewardPunishmentTypeOutputDto.cs deleted file mode 100644 index 0f1d5f2..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/UpdateRewardPunishmentTypeOutputDto.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class UpdateGBTypeOutputDto:BaseOutputDto - { - public int GBTypeId { get; set; } - public string GBTypeName { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/CreateNavBarOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/CreateNavBarOutputDto.cs deleted file mode 100644 index 2c17ebd..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/CreateNavBarOutputDto.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class CreateNavBarOutputDto:BaseOutputDto - { - public int NavigationBarId { get; set; } - public string NavigationBarName { get; set; } - public int NavigationBarOrder { get; set; } - public string NavigationBarImage { get; set; } - public string NavigationBarEvent { get; set; } - public int MarginLeft { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/DeleteNavBarOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/DeleteNavBarOutputDto.cs deleted file mode 100644 index c3b9df9..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/DeleteNavBarOutputDto.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class DeleteNavBarOutputDto:BaseOutputDto - { - public int NavigationBarId { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/ReadNavBarOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/ReadNavBarOutputDto.cs index 26d6815..652c232 100644 --- a/EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/ReadNavBarOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/ReadNavBarOutputDto.cs @@ -1,6 +1,6 @@ namespace EOM.TSHotelManagement.Common.Contract { - public class ReadNavBarOutputDto:BaseOutputDto + public class ReadNavBarOutputDto { public int NavigationBarId { get; set; } public string NavigationBarName { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/UpdateNavBarOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/UpdateNavBarOutputDto.cs deleted file mode 100644 index 47d39ea..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Sys/NavBar/Dto/UpdateNavBarOutputDto.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class UpdateNavBarOutputDto:BaseOutputDto - { - public int NavigationBarId { get; set; } - public string NavigationBarName { get; set; } - public int NavigationBarOrder { get; set; } - public string NavigationBarImage { get; set; } - public string NavigationBarEvent { get; set; } - public int MarginLeft { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/CreateApplicationVersionOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/CreateApplicationVersionOutputDto.cs deleted file mode 100644 index f12ff7f..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/CreateApplicationVersionOutputDto.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class CreateApplicationVersionOutputDto:BaseOutputDto - { - public int VersionId { get; set; } - public string VersionNumber { get; set; } - public string VersionDescription { get; set; } - public DateTime ReleaseDate { get; set; } - } -} - - - diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/DeleteApplicationVersionOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/DeleteApplicationVersionOutputDto.cs deleted file mode 100644 index 526c20e..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/DeleteApplicationVersionOutputDto.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class DeleteApplicationVersionOutputDto:BaseOutputDto - { - public int VersionId { get; set; } - } -} - - - diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/ReadApplicationVersionOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/ReadApplicationVersionOutputDto.cs index 302c708..33cad54 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/ReadApplicationVersionOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/ReadApplicationVersionOutputDto.cs @@ -1,8 +1,8 @@ namespace EOM.TSHotelManagement.Common.Contract { - public class ReadApplicationVersionOutputDto:BaseOutputDto + public class ReadApplicationVersionOutputDto { - public int VersionId { get; set; } + public int ApplicationVersionId { get; set; } public string VersionNumber { get; set; } public string VersionDescription { get; set; } public DateTime ReleaseDate { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/UpdateApplicationVersionOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/UpdateApplicationVersionOutputDto.cs deleted file mode 100644 index 40026eb..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/ApplicationVersion/UpdateApplicationVersionOutputDto.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class UpdateApplicationVersionOutputDto:BaseOutputDto - { - public int VersionId { get; set; } - public string VersionNumber { get; set; } - public string VersionDescription { get; set; } - public DateTime ReleaseDate { get; set; } - } -} - - - diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/CreateCardCodeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/CreateCardCodeOutputDto.cs deleted file mode 100644 index 364bf66..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/CreateCardCodeOutputDto.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class CreateCardCodeOutputDto:BaseOutputDto - { - public long Id { get; set; } - - public string Province { get; set; } - - public string City { get; set; } - - public string District { get; set; } - - public string AreaCode { get; set; } - } -} - - - diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/DeleteCardCodeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/DeleteCardCodeOutputDto.cs deleted file mode 100644 index fd65401..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/DeleteCardCodeOutputDto.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class DeleteCardCodeOutputDto:BaseOutputDto - { - public long Id { get; set; } - - public string Province { get; set; } - - public string City { get; set; } - - public string District { get; set; } - - public string AreaCode { get; set; } - } -} - - - diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/ReadCardCodeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/ReadCardCodeOutputDto.cs index 4cdd39e..d7e18de 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/ReadCardCodeOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/ReadCardCodeOutputDto.cs @@ -1,6 +1,6 @@ namespace EOM.TSHotelManagement.Common.Contract { - public class ReadCardCodeOutputDto:BaseOutputDto + public class ReadCardCodeOutputDto { public long Id { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/UpdateCardCodeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/UpdateCardCodeOutputDto.cs deleted file mode 100644 index 944f443..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/UpdateCardCodeOutputDto.cs +++ /dev/null @@ -1,18 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class UpdateCardCodeOutputDto:BaseOutputDto - { - public long Id { get; set; } - - public string Province { get; set; } - - public string City { get; set; } - - public string District { get; set; } - - public string AreaCode { get; set; } - } -} - - - diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/CreateOperationLogOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/CreateOperationLogOutputDto.cs deleted file mode 100644 index fd14d9b..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/CreateOperationLogOutputDto.cs +++ /dev/null @@ -1,17 +0,0 @@ -using EOM.TSHotelManagement.Common.Core; - -namespace EOM.TSHotelManagement.Common.Contract -{ - public class CreateOperationLogOutputDto:BaseOutputDto - { - public int OperationId { get; set; } - public DateTime OperationTime { get; set; } - public string LogContent { get; set; } - public string OperationAccount { get; set; } - public LogLevel LogLevel { get; set; } - public string SoftwareVersion { get; set; } - public string LoginIpAddress { get; set; } - public string LogLevelName { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/DeleteOperationLogOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/DeleteOperationLogOutputDto.cs deleted file mode 100644 index b96f945..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/DeleteOperationLogOutputDto.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class DeleteOperationLogOutputDto:BaseOutputDto - { - public int OperationId { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogOutputDto.cs index 9a1cc10..be0768f 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogOutputDto.cs @@ -2,7 +2,7 @@ using EOM.TSHotelManagement.Common.Core; namespace EOM.TSHotelManagement.Common.Contract { - public class ReadOperationLogOutputDto:BaseOutputDto + public class ReadOperationLogOutputDto { public int OperationId { get; set; } public DateTime OperationTime { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/UpdateOperationLogOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/UpdateOperationLogOutputDto.cs deleted file mode 100644 index dd3bd6d..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/UpdateOperationLogOutputDto.cs +++ /dev/null @@ -1,17 +0,0 @@ -using EOM.TSHotelManagement.Common.Core; - -namespace EOM.TSHotelManagement.Common.Contract -{ - public class UpdateOperationLogOutputDto:BaseOutputDto - { - public int OperationId { get; set; } - public DateTime OperationTime { get; set; } - public string LogContent { get; set; } - public string OperationAccount { get; set; } - public LogLevel LogLevel { get; set; } - public string SoftwareVersion { get; set; } - public string LoginIpAddress { get; set; } - public string LogLevelName { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/CreateAdministratorOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/CreateAdministratorOutputDto.cs deleted file mode 100644 index 0c439fb..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/CreateAdministratorOutputDto.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class CreateAdministratorOutputDto:BaseOutputDto - { - public int Id { get; set; } - public string Account { get; set; } - public string Password { get; set; } - public string Type { get; set; } - public string Name { get; set; } - public int IsSuperAdmin { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/DeleteAdministratorOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/DeleteAdministratorOutputDto.cs deleted file mode 100644 index 045824e..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/DeleteAdministratorOutputDto.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class DeleteAdministratorOutputDto:BaseOutputDto - { - public int Id { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/ReadAdministratorInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/ReadAdministratorInputDto.cs index 015a61e..99482d8 100644 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/ReadAdministratorInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/ReadAdministratorInputDto.cs @@ -3,6 +3,11 @@ namespace EOM.TSHotelManagement.Common.Contract public class ReadAdministratorInputDto:ListInputDto { public int Id { get; set; } + public string Account { get; set; } + public string Password { get; set; } + public string Type { get; set; } + public string Name { get; set; } + public int IsSuperAdmin { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/ReadAdministratorOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/ReadAdministratorOutputDto.cs index 6b8e908..6e8d256 100644 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/ReadAdministratorOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/ReadAdministratorOutputDto.cs @@ -1,6 +1,6 @@ namespace EOM.TSHotelManagement.Common.Contract { - public class ReadAdministratorOutputDto:BaseOutputDto + public class ReadAdministratorOutputDto:BaseDto { public int Id { get; set; } public string Account { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/UpdateAdministratorOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/UpdateAdministratorOutputDto.cs deleted file mode 100644 index bed2e1f..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/UpdateAdministratorOutputDto.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class UpdateAdministratorOutputDto:BaseOutputDto - { - public int Id { get; set; } - public string Account { get; set; } - public string Password { get; set; } - public string Type { get; set; } - public string Name { get; set; } - public int IsSuperAdmin { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/CreateAdministratorTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/CreateAdministratorTypeOutputDto.cs deleted file mode 100644 index 4587e2a..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/CreateAdministratorTypeOutputDto.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class CreateAdministratorTypeOutputDto:BaseOutputDto - { - public int Id { get; set; } - public string TypeId { get; set; } - public string TypeName { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/DeleteAdministratorTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/DeleteAdministratorTypeOutputDto.cs deleted file mode 100644 index 96b7bda..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/DeleteAdministratorTypeOutputDto.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class DeleteAdministratorTypeOutputDto:BaseOutputDto - { - public int Id { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/ReadAdministratorTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/ReadAdministratorTypeOutputDto.cs index 8ddc99c..f810717 100644 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/ReadAdministratorTypeOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/ReadAdministratorTypeOutputDto.cs @@ -1,6 +1,6 @@ namespace EOM.TSHotelManagement.Common.Contract { - public class ReadAdministratorTypeOutputDto:BaseOutputDto + public class ReadAdministratorTypeOutputDto { public int Id { get; set; } public string TypeId { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/UpdateAdministratorTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/UpdateAdministratorTypeOutputDto.cs deleted file mode 100644 index 8ae9548..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/UpdateAdministratorTypeOutputDto.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class UpdateAdministratorTypeOutputDto:BaseOutputDto - { - public int Id { get; set; } - public string TypeId { get; set; } - public string TypeName { get; set; } - } -} - diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/CreateAppointmentNoticeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/CreateAppointmentNoticeInputDto.cs index b34a3e9..fcfc952 100644 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/CreateAppointmentNoticeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/CreateAppointmentNoticeInputDto.cs @@ -2,9 +2,12 @@ namespace EOM.TSHotelManagement.Common.Contract { public class CreateAppointmentNoticeInputDto: BaseInputDto { - public string NoticeTitle { get; set; } + public string NoticeId { get; set; } + public string NoticeTheme { get; set; } + public string NoticeType { get; set; } + public DateTime NoticeTime { get; set; } public string NoticeContent { get; set; } - public DateTime NoticeDate { get; set; } + public string IssuingDepartment { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/CreateAppointmentNoticeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/CreateAppointmentNoticeOutputDto.cs deleted file mode 100644 index babdc57..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/CreateAppointmentNoticeOutputDto.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class CreateAppointmentNoticeOutputDto:BaseOutputDto - { - public string NoticeId { get; set; } - public string NoticeTitle { get; set; } - public string NoticeContent { get; set; } - public DateTime NoticeDate { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/DeleteAppointmentNoticeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/DeleteAppointmentNoticeOutputDto.cs deleted file mode 100644 index 7ceb62f..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/DeleteAppointmentNoticeOutputDto.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class DeleteAppointmentNoticeOutputDto:BaseOutputDto - { - public string NoticeId { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/ReadAppointmentNoticeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/ReadAppointmentNoticeInputDto.cs index 6414969..90c995b 100644 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/ReadAppointmentNoticeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/ReadAppointmentNoticeInputDto.cs @@ -3,6 +3,11 @@ namespace EOM.TSHotelManagement.Common.Contract public class ReadAppointmentNoticeInputDto:ListInputDto { public string NoticeId { get; set; } + public string NoticeTheme { get; set; } + public string NoticeType { get; set; } + public DateTime NoticeTime { get; set; } + public string NoticeContent { get; set; } + public string IssuingDepartment { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/ReadAppointmentNoticeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/ReadAppointmentNoticeOutputDto.cs index 052700d..efeae8b 100644 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/ReadAppointmentNoticeOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/ReadAppointmentNoticeOutputDto.cs @@ -1,11 +1,13 @@ namespace EOM.TSHotelManagement.Common.Contract { - public class ReadAppointmentNoticeOutputDto:BaseOutputDto + public class ReadAppointmentNoticeOutputDto { public string NoticeId { get; set; } - public string NoticeTitle { get; set; } + public string NoticeTheme { get; set; } + public string NoticeType { get; set; } + public DateTime NoticeTime { get; set; } public string NoticeContent { get; set; } - public DateTime NoticeDate { get; set; } + public string IssuingDepartment { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/UpdateAppointmentNoticeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/UpdateAppointmentNoticeOutputDto.cs deleted file mode 100644 index b37426b..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/UpdateAppointmentNoticeOutputDto.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class UpdateAppointmentNoticeOutputDto:BaseOutputDto - { - public string NoticeId { get; set; } - public string NoticeTitle { get; set; } - public string NoticeContent { get; set; } - public DateTime NoticeDate { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/CreateDepartmentInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/CreateDepartmentInputDto.cs index 5eff887..e3faadf 100644 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/CreateDepartmentInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/CreateDepartmentInputDto.cs @@ -2,8 +2,15 @@ namespace EOM.TSHotelManagement.Common.Contract { public class CreateDepartmentInputDto: BaseInputDto { + public int Id { get; set; } + public string DepartmentNumber { get; set; } public string DepartmentName { get; set; } public string DepartmentDescription { get; set; } + public DateTime DepartmentCreationDate { get; set; } + public string DepartmentLeader { get; set; } + public string LeaderName { get; set; } + public string ParentDepartmentNumber { get; set; } + public string ParentDepartmentName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/CreateDepartmentOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/CreateDepartmentOutputDto.cs deleted file mode 100644 index 73ffd25..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/CreateDepartmentOutputDto.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class CreateDepartmentOutputDto:BaseOutputDto - { - public int DepartmentId { get; set; } - public string DepartmentName { get; set; } - public string DepartmentDescription { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/DeleteDepartmentInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/DeleteDepartmentInputDto.cs index 177a283..8be620d 100644 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/DeleteDepartmentInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/DeleteDepartmentInputDto.cs @@ -2,7 +2,15 @@ namespace EOM.TSHotelManagement.Common.Contract { public class DeleteDepartmentInputDto: BaseInputDto { - public int DepartmentId { get; set; } + public int Id { get; set; } + public string DepartmentNumber { get; set; } + public string DepartmentName { get; set; } + public string DepartmentDescription { get; set; } + public DateTime DepartmentCreationDate { get; set; } + public string DepartmentLeader { get; set; } + public string LeaderName { get; set; } + public string ParentDepartmentNumber { get; set; } + public string ParentDepartmentName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/DeleteDepartmentOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/DeleteDepartmentOutputDto.cs deleted file mode 100644 index 2bf7a83..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/DeleteDepartmentOutputDto.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class DeleteDepartmentOutputDto:BaseOutputDto - { - public int DepartmentId { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/ReadDepartmentInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/ReadDepartmentInputDto.cs index 9f548ab..5d773b3 100644 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/ReadDepartmentInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/ReadDepartmentInputDto.cs @@ -2,7 +2,15 @@ namespace EOM.TSHotelManagement.Common.Contract { public class ReadDepartmentInputDto:ListInputDto { - public int DepartmentId { get; set; } + public int Id { get; set; } + public string DepartmentNumber { get; set; } + public string DepartmentName { get; set; } + public string DepartmentDescription { get; set; } + public DateTime DepartmentCreationDate { get; set; } + public string DepartmentLeader { get; set; } + public string LeaderName { get; set; } + public string ParentDepartmentNumber { get; set; } + public string ParentDepartmentName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/ReadDepartmentOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/ReadDepartmentOutputDto.cs index db3cde0..a46119c 100644 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/ReadDepartmentOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/ReadDepartmentOutputDto.cs @@ -1,10 +1,16 @@ namespace EOM.TSHotelManagement.Common.Contract { - public class ReadDepartmentOutputDto:BaseOutputDto + public class ReadDepartmentOutputDto { - public int DepartmentId { get; set; } + public int Id { get; set; } + public string DepartmentNumber { get; set; } public string DepartmentName { get; set; } public string DepartmentDescription { get; set; } + public DateTime DepartmentCreationDate { get; set; } + public string DepartmentLeader { get; set; } + public string LeaderName { get; set; } + public string ParentDepartmentNumber { get; set; } + public string ParentDepartmentName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/UpdateDepartmentInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/UpdateDepartmentInputDto.cs index 175f108..26d6f1e 100644 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/UpdateDepartmentInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/UpdateDepartmentInputDto.cs @@ -2,9 +2,15 @@ namespace EOM.TSHotelManagement.Common.Contract { public class UpdateDepartmentInputDto: BaseInputDto { - public int DepartmentId { get; set; } + public int Id { get; set; } + public string DepartmentNumber { get; set; } public string DepartmentName { get; set; } public string DepartmentDescription { get; set; } + public DateTime DepartmentCreationDate { get; set; } + public string DepartmentLeader { get; set; } + public string LeaderName { get; set; } + public string ParentDepartmentNumber { get; set; } + public string ParentDepartmentName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/UpdateDepartmentOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/UpdateDepartmentOutputDto.cs deleted file mode 100644 index 46cf3bb..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/UpdateDepartmentOutputDto.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class UpdateDepartmentOutputDto:BaseOutputDto - { - public int DepartmentId { get; set; } - public string DepartmentName { get; set; } - public string DepartmentDescription { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/CreateMenuOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/CreateMenuOutputDto.cs deleted file mode 100644 index 1c43682..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/CreateMenuOutputDto.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class CreateMenuOutputDto:BaseOutputDto - { - public int Id { get; set; } - public string Key { get; set; } - public string Title { get; set; } - public string Path { get; set; } - public int? Parent { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/DeleteMenuOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/DeleteMenuOutputDto.cs deleted file mode 100644 index fa2eca7..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/DeleteMenuOutputDto.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class DeleteMenuOutputDto:BaseOutputDto - { - public int Id { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/ReadMenuOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/ReadMenuOutputDto.cs index f98293c..bcc3d7d 100644 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/ReadMenuOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/ReadMenuOutputDto.cs @@ -1,6 +1,6 @@ namespace EOM.TSHotelManagement.Common.Contract { - public class ReadMenuOutputDto:BaseOutputDto + public class ReadMenuOutputDto { public int Id { get; set; } public string Key { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/UpdateMenuOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/UpdateMenuOutputDto.cs deleted file mode 100644 index a22ccee..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/UpdateMenuOutputDto.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class UpdateMenuOutputDto:BaseOutputDto - { - public int Id { get; set; } - public string Key { get; set; } - public string Title { get; set; } - public string Path { get; set; } - public int? Parent { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/CreateModuleOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/CreateModuleOutputDto.cs deleted file mode 100644 index ebfeac6..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/CreateModuleOutputDto.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class CreateModuleOutputDto:BaseOutputDto - { - public int ModuleId { get; set; } - public string ModuleName { get; set; } - public string ModuleDescription { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/DeleteModuleOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/DeleteModuleOutputDto.cs deleted file mode 100644 index d116958..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/DeleteModuleOutputDto.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class DeleteModuleOutputDto:BaseOutputDto - { - public int ModuleId { get; set; } - } -} - - - diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/ReadModuleOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/ReadModuleOutputDto.cs index 0a5727d..1043e83 100644 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/ReadModuleOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/ReadModuleOutputDto.cs @@ -1,6 +1,6 @@ namespace EOM.TSHotelManagement.Common.Contract { - public class ReadModuleOutputDto:BaseOutputDto + public class ReadModuleOutputDto { public int ModuleId { get; set; } public string ModuleName { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/UpdateModuleOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/UpdateModuleOutputDto.cs deleted file mode 100644 index 61b015f..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/UpdateModuleOutputDto.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class UpdateModuleOutputDto:BaseOutputDto - { - public int ModuleId { get; set; } - public string ModuleName { get; set; } - public string ModuleDescription { get; set; } - } -} - - - diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/CreateModulePermissionOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/CreateModulePermissionOutputDto.cs deleted file mode 100644 index a63cd2e..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/CreateModulePermissionOutputDto.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class CreateModulePermissionOutputDto:BaseOutputDto - { - public int PermissionId { get; set; } - public int ModuleId { get; set; } - public string PermissionName { get; set; } - public string PermissionDescription { get; set; } - } -} - - - diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/DeleteModulePermissionInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/DeleteModulePermissionInputDto.cs index 9f18cd3..188e220 100644 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/DeleteModulePermissionInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/DeleteModulePermissionInputDto.cs @@ -3,6 +3,7 @@ namespace EOM.TSHotelManagement.Common.Contract public class DeleteModulePermissionInputDto: BaseInputDto { public int PermissionId { get; set; } + public string AdministratorAccount { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/DeleteModulePermissionOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/DeleteModulePermissionOutputDto.cs deleted file mode 100644 index 1ce8078..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/DeleteModulePermissionOutputDto.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class DeleteModulePermissionOutputDto:BaseOutputDto - { - public int PermissionId { get; set; } - } -} - - - diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/ReadModulePermissionInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/ReadModulePermissionInputDto.cs index 526fb6f..3074989 100644 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/ReadModulePermissionInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/ReadModulePermissionInputDto.cs @@ -3,6 +3,7 @@ namespace EOM.TSHotelManagement.Common.Contract public class ReadModulePermissionInputDto:ListInputDto { public int PermissionId { get; set; } + public string Account { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/ReadModulePermissionOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/ReadModulePermissionOutputDto.cs index 4312fca..4e97fcc 100644 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/ReadModulePermissionOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/ReadModulePermissionOutputDto.cs @@ -1,11 +1,28 @@ +using SqlSugar; + namespace EOM.TSHotelManagement.Common.Contract { - public class ReadModulePermissionOutputDto:BaseOutputDto + public class ReadModulePermissionOutputDto { - public int PermissionId { get; set; } + /// + /// ģID (Module ID) + /// public int ModuleId { get; set; } - public string PermissionName { get; set; } - public string PermissionDescription { get; set; } + + /// + /// Ա˺ (Administrator Account) + /// + public string AdministratorAccount { get; set; } + + /// + /// ģ (Module Name) + /// + public string ModuleName { get; set; } + + /// + /// Ƿ (Is Enabled) + /// + public int ModuleEnabled { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/UpdateModulePermissionOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/UpdateModulePermissionOutputDto.cs deleted file mode 100644 index 8299276..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/UpdateModulePermissionOutputDto.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class UpdateModulePermissionOutputDto:BaseOutputDto - { - public int PermissionId { get; set; } - public int ModuleId { get; set; } - public string PermissionName { get; set; } - public string PermissionDescription { get; set; } - } -} - - - diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/CreateNationOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/CreateNationOutputDto.cs deleted file mode 100644 index 6b721db..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/CreateNationOutputDto.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class CreateNationOutputDto:BaseOutputDto - { - public int NationId { get; set; } - public string NationName { get; set; } - } -} - - - diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/DeleteNationOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/DeleteNationOutputDto.cs deleted file mode 100644 index b2bd519..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/DeleteNationOutputDto.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class DeleteNationOutputDto:BaseOutputDto - { - public int NationId { get; set; } - } -} - - - diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/ReadNationOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/ReadNationOutputDto.cs index 74b16c4..9b6b61b 100644 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/ReadNationOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/ReadNationOutputDto.cs @@ -1,8 +1,8 @@ namespace EOM.TSHotelManagement.Common.Contract { - public class ReadNationOutputDto:BaseOutputDto + public class ReadNationOutputDto { - public int NationId { get; set; } + public string NationNumber { get; set; } public string NationName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/UpdateNationOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/UpdateNationOutputDto.cs deleted file mode 100644 index 3f93d3d..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/UpdateNationOutputDto.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class UpdateNationOutputDto:BaseOutputDto - { - public int NationId { get; set; } - public string NationName { get; set; } - } -} - - - diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/CreatePositionInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/CreatePositionInputDto.cs index 8d2ab36..c270309 100644 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/CreatePositionInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/CreatePositionInputDto.cs @@ -2,6 +2,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public class CreatePositionInputDto: BaseInputDto { + public string PositionNumber { get; set; } public string PositionName { get; set; } public string PositionDescription { get; set; } } diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/CreatePositionOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/CreatePositionOutputDto.cs deleted file mode 100644 index c907311..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/CreatePositionOutputDto.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class CreatePositionOutputDto:BaseOutputDto - { - public int PositionId { get; set; } - public string PositionName { get; set; } - public string PositionDescription { get; set; } - } -} - - - diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/DeletePositionInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/DeletePositionInputDto.cs index 683be3b..c805267 100644 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/DeletePositionInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/DeletePositionInputDto.cs @@ -2,7 +2,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public class DeletePositionInputDto: BaseInputDto { - public int PositionId { get; set; } + public string PositionNumber { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/DeletePositionOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/DeletePositionOutputDto.cs deleted file mode 100644 index 387b2c8..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/DeletePositionOutputDto.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class DeletePositionOutputDto:BaseOutputDto - { - public int PositionId { get; set; } - } -} - - - diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/ReadPositionInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/ReadPositionInputDto.cs index 1dfd61a..938b699 100644 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/ReadPositionInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/ReadPositionInputDto.cs @@ -3,6 +3,8 @@ namespace EOM.TSHotelManagement.Common.Contract public class ReadPositionInputDto:ListInputDto { public int PositionId { get; set; } + public string PositionName { get; set; } + public string PositionDescription { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/ReadPositionOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/ReadPositionOutputDto.cs index 261488f..dc7f24b 100644 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/ReadPositionOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/ReadPositionOutputDto.cs @@ -1,10 +1,10 @@ namespace EOM.TSHotelManagement.Common.Contract { - public class ReadPositionOutputDto:BaseOutputDto + public class ReadPositionOutputDto { - public int PositionId { get; set; } + public int Id { get; set; } + public string PositionNumber { get; set; } public string PositionName { get; set; } - public string PositionDescription { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/UpdatePositionInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/UpdatePositionInputDto.cs index 9763452..c8c9f05 100644 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/UpdatePositionInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/UpdatePositionInputDto.cs @@ -3,6 +3,7 @@ namespace EOM.TSHotelManagement.Common.Contract public class UpdatePositionInputDto: BaseInputDto { public int PositionId { get; set; } + public string PositionNumber { get; set; } public string PositionName { get; set; } public string PositionDescription { get; set; } } diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/UpdatePositionOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/UpdatePositionOutputDto.cs deleted file mode 100644 index 6e1cce9..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/UpdatePositionOutputDto.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class UpdatePositionOutputDto:BaseOutputDto - { - public int PositionId { get; set; } - public string PositionName { get; set; } - public string PositionDescription { get; set; } - } -} - - - diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/CreateQualificationOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/CreateQualificationOutputDto.cs deleted file mode 100644 index 1f2b260..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/CreateQualificationOutputDto.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class CreateEducationOutputDto:BaseOutputDto - { - public int EducationId { get; set; } - public string EducationName { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/DeleteEducationOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/DeleteEducationOutputDto.cs deleted file mode 100644 index 8fcb2f8..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/DeleteEducationOutputDto.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class DeleteEducationOutputDto:BaseOutputDto - { - public int EducationId { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/ReadEducationOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/ReadEducationOutputDto.cs index 194796b..6bff94a 100644 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/ReadEducationOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/ReadEducationOutputDto.cs @@ -1,6 +1,6 @@ namespace EOM.TSHotelManagement.Common.Contract { - public class ReadEducationOutputDto:BaseOutputDto + public class ReadEducationOutputDto { public int EducationId { get; set; } public string EducationName { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/UpdateEducationOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/UpdateEducationOutputDto.cs deleted file mode 100644 index 69d07ce..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/UpdateEducationOutputDto.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class UpdateEducationOutputDto:BaseOutputDto - { - public int EducationId { get; set; } - public string EducationName { get; set; } - } -} - - diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/CreateSupervisionStatisticsInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/CreateSupervisionStatisticsInputDto.cs index 5c04dc4..e002b46 100644 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/CreateSupervisionStatisticsInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/CreateSupervisionStatisticsInputDto.cs @@ -2,8 +2,14 @@ namespace EOM.TSHotelManagement.Common.Contract { public class CreateSupervisionStatisticsInputDto: BaseInputDto { - public string StatisticsName { get; set; } - public string StatisticsDescription { get; set; } + public string StatisticsNumber { get; set; } + public string SupervisingDepartment { get; set; } + public string SupervisingDepartmentName { get; set; } + public string SupervisionProgress { get; set; } + public string SupervisionLoss { get; set; } + public int SupervisionScore { get; set; } + public string SupervisionStatistician { get; set; } + public string SupervisionAdvice { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/CreateSupervisionStatisticsOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/CreateSupervisionStatisticsOutputDto.cs deleted file mode 100644 index e49d574..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/CreateSupervisionStatisticsOutputDto.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class CreateSupervisionStatisticsOutputDto:BaseOutputDto - { - public int StatisticsId { get; set; } - public string StatisticsName { get; set; } - public string StatisticsDescription { get; set; } - } -} - - - diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/DeleteSupervisionStatisticsInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/DeleteSupervisionStatisticsInputDto.cs index fd63130..1a3cad4 100644 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/DeleteSupervisionStatisticsInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/DeleteSupervisionStatisticsInputDto.cs @@ -2,7 +2,14 @@ namespace EOM.TSHotelManagement.Common.Contract { public class DeleteSupervisionStatisticsInputDto: BaseInputDto { - public int StatisticsId { get; set; } + public string StatisticsNumber { get; set; } + public string SupervisingDepartment { get; set; } + public string SupervisingDepartmentName { get; set; } + public string SupervisionProgress { get; set; } + public string SupervisionLoss { get; set; } + public int SupervisionScore { get; set; } + public string SupervisionStatistician { get; set; } + public string SupervisionAdvice { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/DeleteSupervisionStatisticsOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/DeleteSupervisionStatisticsOutputDto.cs deleted file mode 100644 index 3c2298f..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/DeleteSupervisionStatisticsOutputDto.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class DeleteSupervisionStatisticsOutputDto:BaseOutputDto - { - public int StatisticsId { get; set; } - } -} - - - diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/ReadSupervisionStatisticsInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/ReadSupervisionStatisticsInputDto.cs index a99e77d..2879ef8 100644 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/ReadSupervisionStatisticsInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/ReadSupervisionStatisticsInputDto.cs @@ -2,7 +2,14 @@ namespace EOM.TSHotelManagement.Common.Contract { public class ReadSupervisionStatisticsInputDto:ListInputDto { - public int StatisticsId { get; set; } + public string StatisticsNumber { get; set; } + public string SupervisingDepartment { get; set; } + public string SupervisingDepartmentName { get; set; } + public string SupervisionProgress { get; set; } + public string SupervisionLoss { get; set; } + public int SupervisionScore { get; set; } + public string SupervisionStatistician { get; set; } + public string SupervisionAdvice { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/ReadSupervisionStatisticsOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/ReadSupervisionStatisticsOutputDto.cs index d0f54f6..fe8b531 100644 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/ReadSupervisionStatisticsOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/ReadSupervisionStatisticsOutputDto.cs @@ -1,10 +1,15 @@ namespace EOM.TSHotelManagement.Common.Contract { - public class ReadSupervisionStatisticsOutputDto:BaseOutputDto + public class ReadSupervisionStatisticsOutputDto { - public int StatisticsId { get; set; } - public string StatisticsName { get; set; } - public string StatisticsDescription { get; set; } + public string StatisticsNumber { get; set; } + public string SupervisingDepartment { get; set; } + public string SupervisingDepartmentName { get; set; } + public string SupervisionProgress { get; set; } + public string SupervisionLoss { get; set; } + public int SupervisionScore { get; set; } + public string SupervisionStatistician { get; set; } + public string SupervisionAdvice { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/UpdateSupervisionStatisticsInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/UpdateSupervisionStatisticsInputDto.cs index 7fe8ec6..5edc406 100644 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/UpdateSupervisionStatisticsInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/UpdateSupervisionStatisticsInputDto.cs @@ -2,9 +2,14 @@ namespace EOM.TSHotelManagement.Common.Contract { public class UpdateSupervisionStatisticsInputDto: BaseInputDto { - public int StatisticsId { get; set; } - public string StatisticsName { get; set; } - public string StatisticsDescription { get; set; } + public string StatisticsNumber { get; set; } + public string SupervisingDepartment { get; set; } + public string SupervisingDepartmentName { get; set; } + public string SupervisionProgress { get; set; } + public string SupervisionLoss { get; set; } + public int SupervisionScore { get; set; } + public string SupervisionStatistician { get; set; } + public string SupervisionAdvice { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/UpdateSupervisionStatisticsOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/UpdateSupervisionStatisticsOutputDto.cs deleted file mode 100644 index fa3e205..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/UpdateSupervisionStatisticsOutputDto.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class UpdateSupervisionStatisticsOutputDto:BaseOutputDto - { - public int StatisticsId { get; set; } - public string StatisticsName { get; set; } - public string StatisticsDescription { get; set; } - } -} - - - diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/CreateSystemInformationOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/CreateSystemInformationOutputDto.cs deleted file mode 100644 index 9469750..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/CreateSystemInformationOutputDto.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class CreateSystemInformationOutputDto:BaseOutputDto - { - public int InformationId { get; set; } - public string InformationTitle { get; set; } - public string InformationContent { get; set; } - public DateTime InformationDate { get; set; } - } -} - - - diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/DeleteSystemInformationOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/DeleteSystemInformationOutputDto.cs deleted file mode 100644 index bc306d7..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/DeleteSystemInformationOutputDto.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class DeleteSystemInformationOutputDto:BaseOutputDto - { - public int InformationId { get; set; } - } -} - - - diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/ReadSystemInformationOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/ReadSystemInformationOutputDto.cs index 16cd677..6a9c96d 100644 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/ReadSystemInformationOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/ReadSystemInformationOutputDto.cs @@ -1,6 +1,6 @@ namespace EOM.TSHotelManagement.Common.Contract { - public class ReadSystemInformationOutputDto:BaseOutputDto + public class ReadSystemInformationOutputDto { public int InformationId { get; set; } public string InformationTitle { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/UpdateSystemInformationOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/UpdateSystemInformationOutputDto.cs deleted file mode 100644 index ac7f240..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/UpdateSystemInformationOutputDto.cs +++ /dev/null @@ -1,13 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class UpdateSystemInformationOutputDto:BaseOutputDto - { - public int InformationId { get; set; } - public string InformationTitle { get; set; } - public string InformationContent { get; set; } - public DateTime InformationDate { get; set; } - } -} - - - diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/CreateVipLevelRuleInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/CreateVipLevelRuleInputDto.cs index df48193..8d74740 100644 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/CreateVipLevelRuleInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/CreateVipLevelRuleInputDto.cs @@ -2,10 +2,17 @@ namespace EOM.TSHotelManagement.Common.Contract { public class CreateVipLevelRuleInputDto: BaseInputDto { + public int Id { get; set; } + + public string RuleSerialNumber { get; set; } + public string RuleName { get; set; } - public string RuleDescription { get; set; } - public int Level { get; set; } - public decimal Discount { get; set; } + + public decimal RuleValue { get; set; } + + public int VipLevelId { get; set; } + + public string VipLevelName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/CreateVipLevelRuleOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/CreateVipLevelRuleOutputDto.cs deleted file mode 100644 index ff49960..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/CreateVipLevelRuleOutputDto.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class CreateVipLevelRuleOutputDto:BaseOutputDto - { - public int RuleId { get; set; } - public string RuleName { get; set; } - public string RuleDescription { get; set; } - public int Level { get; set; } - public decimal Discount { get; set; } - } -} - - - diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/DeleteVipLevelRuleInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/DeleteVipLevelRuleInputDto.cs index bf73435..690ff80 100644 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/DeleteVipLevelRuleInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/DeleteVipLevelRuleInputDto.cs @@ -2,7 +2,17 @@ namespace EOM.TSHotelManagement.Common.Contract { public class DeleteVipLevelRuleInputDto: BaseInputDto { - public int RuleId { get; set; } + public int Id { get; set; } + + public string RuleSerialNumber { get; set; } + + public string RuleName { get; set; } + + public decimal RuleValue { get; set; } + + public int VipLevelId { get; set; } + + public string VipLevelName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/DeleteVipLevelRuleOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/DeleteVipLevelRuleOutputDto.cs deleted file mode 100644 index 3653c3d..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/DeleteVipLevelRuleOutputDto.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class DeleteVipLevelRuleOutputDto:BaseOutputDto - { - public int RuleId { get; set; } - } -} - - - diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/ReadVipLevelRuleInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/ReadVipLevelRuleInputDto.cs index 4c4626f..f1b4556 100644 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/ReadVipLevelRuleInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/ReadVipLevelRuleInputDto.cs @@ -3,6 +3,7 @@ namespace EOM.TSHotelManagement.Common.Contract public class ReadVipLevelRuleInputDto:ListInputDto { public int RuleId { get; set; } + public string RuleSerialNumber { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/ReadVipLevelRuleOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/ReadVipLevelRuleOutputDto.cs index 83f6c72..71e98a1 100644 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/ReadVipLevelRuleOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/ReadVipLevelRuleOutputDto.cs @@ -1,12 +1,20 @@ +using SqlSugar; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadVipLevelRuleOutputDto:BaseOutputDto { - public int RuleId { get; set; } + public int Id { get; set; } + + public string RuleSerialNumber { get; set; } + public string RuleName { get; set; } - public string RuleDescription { get; set; } - public int Level { get; set; } - public decimal Discount { get; set; } + + public decimal RuleValue { get; set; } + + public int VipLevelId { get; set; } + + public string VipLevelName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/UpdateVipLevelRuleInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/UpdateVipLevelRuleInputDto.cs index 457b8eb..88f0164 100644 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/UpdateVipLevelRuleInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/UpdateVipLevelRuleInputDto.cs @@ -2,11 +2,17 @@ namespace EOM.TSHotelManagement.Common.Contract { public class UpdateVipLevelRuleInputDto: BaseInputDto { - public int RuleId { get; set; } + public int Id { get; set; } + + public string RuleSerialNumber { get; set; } + public string RuleName { get; set; } - public string RuleDescription { get; set; } - public int Level { get; set; } - public decimal Discount { get; set; } + + public decimal RuleValue { get; set; } + + public int VipLevelId { get; set; } + + public string VipLevelName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/UpdateVipLevelRuleOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/UpdateVipLevelRuleOutputDto.cs deleted file mode 100644 index 45a2381..0000000 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/UpdateVipLevelRuleOutputDto.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace EOM.TSHotelManagement.Common.Contract -{ - public class UpdateVipLevelRuleOutputDto:BaseOutputDto - { - public int RuleId { get; set; } - public string RuleName { get; set; } - public string RuleDescription { get; set; } - public int Level { get; set; } - public decimal Discount { get; set; } - } -} - - - diff --git a/EOM.TSHotelManagement.Common.Core/BaseDTO.cs b/EOM.TSHotelManagement.Common.Core/BaseEntity.cs similarity index 78% rename from EOM.TSHotelManagement.Common.Core/BaseDTO.cs rename to EOM.TSHotelManagement.Common.Core/BaseEntity.cs index 016e5cb..9663fbe 100644 --- a/EOM.TSHotelManagement.Common.Core/BaseDTO.cs +++ b/EOM.TSHotelManagement.Common.Core/BaseEntity.cs @@ -2,7 +2,7 @@ namespace EOM.TSHotelManagement.Common.Core { - public class BaseDto + public class BaseEntity { /// @@ -35,16 +35,5 @@ namespace EOM.TSHotelManagement.Common.Core /// [SqlSugar.SugarColumn(IsIgnore = true)] public string UserToken { get; set; } - - /// - /// 页数 - /// - [SqlSugar.SugarColumn(IsIgnore = true)] - public int Page { get; set; } = 0; - /// - /// 总数 - /// - [SqlSugar.SugarColumn(IsIgnore = true)] - public int PageSize { get; set; } = 10; } } diff --git a/EOM.TSHotelManagement.Common.Core/Business/Asset/Asset.cs b/EOM.TSHotelManagement.Common.Core/Business/Asset/Asset.cs index 12681fb..5744e30 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Asset/Asset.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Asset/Asset.cs @@ -30,7 +30,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 资产管理 /// [SqlSugar.SugarTable("cashinfo")] - public class Asset : BaseDto + public class Asset : BaseEntity { /// /// 资产编号 (Asset Number) diff --git a/EOM.TSHotelManagement.Common.Core/Business/Customer/CustoType.cs b/EOM.TSHotelManagement.Common.Core/Business/Customer/CustoType.cs index 84d3ee1..a7d456f 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Customer/CustoType.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Customer/CustoType.cs @@ -28,7 +28,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 客户类型 /// [SqlSugar.SugarTable("usertype")] - public class CustoType : BaseDto + public class CustoType : BaseEntity { /// /// 客户类型 (Customer Type) diff --git a/EOM.TSHotelManagement.Common.Core/Business/Customer/Customer.cs b/EOM.TSHotelManagement.Common.Core/Business/Customer/Customer.cs index 7b18a2e..abc7e28 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Customer/Customer.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Customer/Customer.cs @@ -31,7 +31,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 客户信息 /// [SqlSugar.SugarTable("customer")] - public class Customer : BaseDto + public class Customer : BaseEntity { /// /// 客户编号 (Customer Number) diff --git a/EOM.TSHotelManagement.Common.Core/Business/Customer/GenderType.cs b/EOM.TSHotelManagement.Common.Core/Business/Customer/GenderType.cs index 9f80dd6..f5896c0 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Customer/GenderType.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Customer/GenderType.cs @@ -28,7 +28,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 性别 /// [SqlSugar.SugarTable("sextype")] - public class GenderType : BaseDto + public class GenderType : BaseEntity { /// /// 性别 ID (Gender ID) diff --git a/EOM.TSHotelManagement.Common.Core/Business/Customer/PassPortType.cs b/EOM.TSHotelManagement.Common.Core/Business/Customer/PassPortType.cs index 10b9f71..3bb1d1e 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Customer/PassPortType.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Customer/PassPortType.cs @@ -28,7 +28,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 证件类型 /// [SqlSugar.SugarTable("passporttype")] - public class PassportType : BaseDto + public class PassportType : BaseEntity { /// /// 证件类型 diff --git a/EOM.TSHotelManagement.Common.Core/Business/Hydroelectricity/Hydroelectricity.cs b/EOM.TSHotelManagement.Common.Core/Business/EnergyManagement/Hydroelectricity.cs similarity index 98% rename from EOM.TSHotelManagement.Common.Core/Business/Hydroelectricity/Hydroelectricity.cs rename to EOM.TSHotelManagement.Common.Core/Business/EnergyManagement/Hydroelectricity.cs index f863bea..0cfa665 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Hydroelectricity/Hydroelectricity.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/EnergyManagement/Hydroelectricity.cs @@ -30,7 +30,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 水电信息 /// [SqlSugar.SugarTable("wtinfo")] - public class EnergyManagement : BaseDto + public class EnergyManagement : BaseEntity { /// /// 信息编号 (Information ID) diff --git a/EOM.TSHotelManagement.Common.Core/Business/Reser/Reser.cs b/EOM.TSHotelManagement.Common.Core/Business/Reser/Reser.cs index 198298f..eebbd10 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Reser/Reser.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Reser/Reser.cs @@ -30,7 +30,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 预约列表 /// [SqlSugar.SugarTable("reser")] - public class Reser : BaseDto + public class Reser : BaseEntity { /// /// 预约编号 (Reservation ID) diff --git a/EOM.TSHotelManagement.Common.Core/Business/Room/Room.cs b/EOM.TSHotelManagement.Common.Core/Business/Room/Room.cs index 487a74b..c07de29 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Room/Room.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Room/Room.cs @@ -32,7 +32,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 房间实体类 (Room Entity) /// [SugarTable("room")] - public class Room : BaseDto + public class Room : BaseEntity { /// /// 房间编号 (Room Number) diff --git a/EOM.TSHotelManagement.Common.Core/Business/Room/RoomState.cs b/EOM.TSHotelManagement.Common.Core/Business/Room/RoomState.cs index 6441093..a9c393f 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Room/RoomState.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Room/RoomState.cs @@ -30,7 +30,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 房间状态 (Room State) /// [SugarTable("roomstate")] - public class RoomState : BaseDto + public class RoomState : BaseEntity { /// /// 房间状态编号 (Room State ID) diff --git a/EOM.TSHotelManagement.Common.Core/Business/Room/RoomType.cs b/EOM.TSHotelManagement.Common.Core/Business/Room/RoomType.cs index e592a80..04eac68 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Room/RoomType.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Room/RoomType.cs @@ -31,7 +31,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 房间类型 (Room Type) /// [SugarTable("roomtype")] - public class RoomType : BaseDto + public class RoomType : BaseEntity { /// /// 类型编号 (Room Type ID) diff --git a/EOM.TSHotelManagement.Common.Core/Business/Sellthing/SellThing.cs b/EOM.TSHotelManagement.Common.Core/Business/Sellthing/SellThing.cs index 77fc2b9..920d95b 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Sellthing/SellThing.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Sellthing/SellThing.cs @@ -33,7 +33,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 商品信息 (Product Information) /// [SugarTable("sellthing")] - public class SellThing : BaseDto + public class SellThing : BaseEntity { /// /// 商品编号 (Product Number) diff --git a/EOM.TSHotelManagement.Common.Core/Business/Spend/Spend.cs b/EOM.TSHotelManagement.Common.Core/Business/Spend/Spend.cs index 91dae50..cc67e79 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Spend/Spend.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Spend/Spend.cs @@ -32,7 +32,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 消费信息 (Consumption Information) /// [SugarTable("custospend")] - public class Spend : BaseDto + public class Spend : BaseEntity { /// /// 房间编号 (Room Number) diff --git a/EOM.TSHotelManagement.Common.Core/Employee/Employee.cs b/EOM.TSHotelManagement.Common.Core/Employee/Employee.cs index c2d9958..9e6f52a 100644 --- a/EOM.TSHotelManagement.Common.Core/Employee/Employee.cs +++ b/EOM.TSHotelManagement.Common.Core/Employee/Employee.cs @@ -31,7 +31,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 员工信息 (Employee Information) /// [SugarTable("worker")] - public class Employee : BaseDto + public class Employee : BaseEntity { /// /// 索引ID (Index ID) diff --git a/EOM.TSHotelManagement.Common.Core/Employee/EmployeeCheck.cs b/EOM.TSHotelManagement.Common.Core/Employee/EmployeeCheck.cs index ee2fd22..d71f221 100644 --- a/EOM.TSHotelManagement.Common.Core/Employee/EmployeeCheck.cs +++ b/EOM.TSHotelManagement.Common.Core/Employee/EmployeeCheck.cs @@ -31,7 +31,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 员工打卡考勤 (Employee Check-in/Check-out Record) /// [SugarTable("workercheck")] - public class EmployeeCheck : BaseDto + public class EmployeeCheck : BaseEntity { /// /// 编号 (ID) diff --git a/EOM.TSHotelManagement.Common.Core/Employee/EmployeeHistory.cs b/EOM.TSHotelManagement.Common.Core/Employee/EmployeeHistory.cs index 4d5790d..89f27d6 100644 --- a/EOM.TSHotelManagement.Common.Core/Employee/EmployeeHistory.cs +++ b/EOM.TSHotelManagement.Common.Core/Employee/EmployeeHistory.cs @@ -31,7 +31,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 员工履历 (Employee History) /// [SugarTable("workerhistory")] - public class EmployeeHistory : BaseDto + public class EmployeeHistory : BaseEntity { /// /// 编号 (ID) diff --git a/EOM.TSHotelManagement.Common.Core/Employee/EmployeeRewardPunishment.cs b/EOM.TSHotelManagement.Common.Core/Employee/EmployeeRewardPunishment.cs index 2f9c2bd..c055273 100644 --- a/EOM.TSHotelManagement.Common.Core/Employee/EmployeeRewardPunishment.cs +++ b/EOM.TSHotelManagement.Common.Core/Employee/EmployeeRewardPunishment.cs @@ -31,7 +31,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 员工奖惩 (Employee Rewards/Punishments) /// [SugarTable("workergoodbad")] - public class EmployeeRewardPunishment : BaseDto + public class EmployeeRewardPunishment : BaseEntity { /// /// 编号 (ID) diff --git a/EOM.TSHotelManagement.Common.Core/Employee/GBType.cs b/EOM.TSHotelManagement.Common.Core/Employee/RewardPunishmentType.cs similarity index 97% rename from EOM.TSHotelManagement.Common.Core/Employee/GBType.cs rename to EOM.TSHotelManagement.Common.Core/Employee/RewardPunishmentType.cs index 6dfbd75..18f6bc1 100644 --- a/EOM.TSHotelManagement.Common.Core/Employee/GBType.cs +++ b/EOM.TSHotelManagement.Common.Core/Employee/RewardPunishmentType.cs @@ -31,7 +31,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 奖惩类型实体类 (Reward/Punishment Type Entity) /// [SugarTable("gbtype")] - public class GBType : BaseDto + public class RewardPunishmentType : BaseEntity { /// /// 奖惩类型编号 (Reward/Punishment Type ID) diff --git a/EOM.TSHotelManagement.Common.Core/Sys/NavBar/NavBar.cs b/EOM.TSHotelManagement.Common.Core/Sys/NavBar/NavBar.cs index 4a67107..c84b61c 100644 --- a/EOM.TSHotelManagement.Common.Core/Sys/NavBar/NavBar.cs +++ b/EOM.TSHotelManagement.Common.Core/Sys/NavBar/NavBar.cs @@ -6,7 +6,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 导航控件实体类 (Navigation Bar Entity) /// [SugarTable("nav_bar")] - public class NavBar : BaseDto + public class NavBar : BaseEntity { /// /// 导航控件ID (Navigation Bar ID) diff --git a/EOM.TSHotelManagement.Common.Core/Util/OperationLog.cs b/EOM.TSHotelManagement.Common.Core/Util/OperationLog.cs index edd13a5..46709f1 100644 --- a/EOM.TSHotelManagement.Common.Core/Util/OperationLog.cs +++ b/EOM.TSHotelManagement.Common.Core/Util/OperationLog.cs @@ -52,7 +52,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 操作日志 (Operation Log) /// [SugarTable("operationlog")] - public class OperationLog : BaseDto + public class OperationLog : BaseEntity { /// /// 日志ID (Log ID) diff --git a/EOM.TSHotelManagement.Common.Core/Zero/Administrator.cs b/EOM.TSHotelManagement.Common.Core/Zero/Administrator.cs index 988ba68..3029216 100644 --- a/EOM.TSHotelManagement.Common.Core/Zero/Administrator.cs +++ b/EOM.TSHotelManagement.Common.Core/Zero/Administrator.cs @@ -31,7 +31,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 管理员实体类 (Administrator Entity) /// [SugarTable("admininfo")] - public class Administrator : BaseDto + public class Administrator : BaseEntity { /// /// 构造函数 (Constructor) @@ -64,7 +64,7 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 管理员类型 (Administrator Type) /// - [SugarColumn(ColumnName = "AdministratorType", IsNullable = false)] + [SugarColumn(ColumnName = "AdminType", IsNullable = false)] [NeedValid] public string Type { get; set; } diff --git a/EOM.TSHotelManagement.Common.Core/Zero/AdministratorType.cs b/EOM.TSHotelManagement.Common.Core/Zero/AdministratorType.cs index 2a6c47b..13e2337 100644 --- a/EOM.TSHotelManagement.Common.Core/Zero/AdministratorType.cs +++ b/EOM.TSHotelManagement.Common.Core/Zero/AdministratorType.cs @@ -30,7 +30,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 管理员类型 (Administrator Type) /// [SugarTable("admintype")] - public class AdministratorType : BaseDto + public class AdministratorType : BaseEntity { /// /// 编号 (ID) diff --git a/EOM.TSHotelManagement.Common.Core/Zero/AppointmentNotice.cs b/EOM.TSHotelManagement.Common.Core/Zero/AppointmentNotice.cs index 9c52618..93b28a6 100644 --- a/EOM.TSHotelManagement.Common.Core/Zero/AppointmentNotice.cs +++ b/EOM.TSHotelManagement.Common.Core/Zero/AppointmentNotice.cs @@ -31,7 +31,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 任命公告 (Appointment AppointmentNotice) /// [SugarTable("uploadinfo")] - public class AppointmentNotice : BaseDto + public class AppointmentNotice : BaseEntity { /// /// 公告编号 (AppointmentNotice Number) diff --git a/EOM.TSHotelManagement.Common.Core/Zero/Department.cs b/EOM.TSHotelManagement.Common.Core/Zero/Department.cs index 8edba1e..425cae2 100644 --- a/EOM.TSHotelManagement.Common.Core/Zero/Department.cs +++ b/EOM.TSHotelManagement.Common.Core/Zero/Department.cs @@ -31,7 +31,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 部门表 (Department Table) /// [SugarTable("dept")] - public class Department : BaseDto + public class Department : BaseEntity { /// /// 索引ID (Index ID) diff --git a/EOM.TSHotelManagement.Common.Core/Zero/Education.cs b/EOM.TSHotelManagement.Common.Core/Zero/Education.cs index f9b92de..70cedeb 100644 --- a/EOM.TSHotelManagement.Common.Core/Zero/Education.cs +++ b/EOM.TSHotelManagement.Common.Core/Zero/Education.cs @@ -30,7 +30,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 学历 (Education) /// [SugarTable("education")] - public class Education : BaseDto + public class Education : BaseEntity { /// /// 索引ID (Index ID) diff --git a/EOM.TSHotelManagement.Common.Core/Zero/Menu.cs b/EOM.TSHotelManagement.Common.Core/Zero/Menu.cs index a43e842..bcb32f2 100644 --- a/EOM.TSHotelManagement.Common.Core/Zero/Menu.cs +++ b/EOM.TSHotelManagement.Common.Core/Zero/Menu.cs @@ -32,7 +32,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 菜单表 (Menu Table) /// [SugarTable("menu")] - public class Menu : BaseDto + public class Menu : BaseEntity { /// /// 备 注:自增长ID (Auto-incrementing ID) diff --git a/EOM.TSHotelManagement.Common.Core/Zero/Module.cs b/EOM.TSHotelManagement.Common.Core/Zero/Module.cs index 1d5a722..4541c84 100644 --- a/EOM.TSHotelManagement.Common.Core/Zero/Module.cs +++ b/EOM.TSHotelManagement.Common.Core/Zero/Module.cs @@ -6,7 +6,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 模块实体 (Module Entity) /// [SugarTable("module")] - public class Module : BaseDto + public class Module : BaseEntity { /// /// 模块ID (Module ID) diff --git a/EOM.TSHotelManagement.Common.Core/Zero/Nation.cs b/EOM.TSHotelManagement.Common.Core/Zero/Nation.cs index b0d64a3..638d537 100644 --- a/EOM.TSHotelManagement.Common.Core/Zero/Nation.cs +++ b/EOM.TSHotelManagement.Common.Core/Zero/Nation.cs @@ -30,7 +30,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 民族 (Nation) /// [SugarTable("nation")] - public class Nation : BaseDto + public class Nation : BaseEntity { /// /// 索引ID (Index ID) diff --git a/EOM.TSHotelManagement.Common.Core/Zero/SupervisionStatistics.cs b/EOM.TSHotelManagement.Common.Core/Zero/SupervisionStatistics.cs index 8188ef1..e44d56b 100644 --- a/EOM.TSHotelManagement.Common.Core/Zero/SupervisionStatistics.cs +++ b/EOM.TSHotelManagement.Common.Core/Zero/SupervisionStatistics.cs @@ -30,7 +30,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 监管统计 (Supervision Statistics) /// [SugarTable("checkinfo")] - public class SupervisionStatistics : BaseDto + public class SupervisionStatistics : BaseEntity { /// /// 监管统计编号 (Supervision Statistics Number) diff --git a/EOM.TSHotelManagement.Common.Core/Zero/VipLevelRule.cs b/EOM.TSHotelManagement.Common.Core/Zero/VipLevelRule.cs index 1f5b5bd..c549dc6 100644 --- a/EOM.TSHotelManagement.Common.Core/Zero/VipLevelRule.cs +++ b/EOM.TSHotelManagement.Common.Core/Zero/VipLevelRule.cs @@ -30,7 +30,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 会员等级规则类 (VIP Level Rule Class) /// [SugarTable("vip_rule")] - public class VipLevelRule : BaseDto + public class VipLevelRule : BaseEntity { /// /// 索引ID (Index ID) diff --git a/EOM.TSHotelManagement.Common.Core/Zero/position.cs b/EOM.TSHotelManagement.Common.Core/Zero/position.cs index 8d72fc4..5d1c7f6 100644 --- a/EOM.TSHotelManagement.Common.Core/Zero/position.cs +++ b/EOM.TSHotelManagement.Common.Core/Zero/position.cs @@ -30,7 +30,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 职位 (Position) /// [SugarTable("position")] - public class Position : BaseDto + public class Position : BaseEntity { /// /// 索引ID (Index ID) diff --git a/EOM.TSHotelManagement.Common.Util/Helper/EntityMapper.cs b/EOM.TSHotelManagement.Common.Util/Helper/EntityMapper.cs index d2e68b9..ef2c0ae 100644 --- a/EOM.TSHotelManagement.Common.Util/Helper/EntityMapper.cs +++ b/EOM.TSHotelManagement.Common.Util/Helper/EntityMapper.cs @@ -27,7 +27,7 @@ namespace EOM.TSHotelManagement.Common.Util foreach (var sourceProperty in sourceProperties) { - var destinationProperty = destinationProperties.FirstOrDefault(p => string.Equals(p.Name, sourceProperty.Name, StringComparison.OrdinalIgnoreCase)); + var destinationProperty = destinationProperties.SingleOrDefault(p => string.Equals(p.Name, sourceProperty.Name, StringComparison.OrdinalIgnoreCase)); if (destinationProperty != null && destinationProperty.CanWrite) { var sourceValue = sourceProperty.GetValue(source); diff --git a/EOM.TSHotelManagement.EntityFramework/Repository/GenericRepository.cs b/EOM.TSHotelManagement.EntityFramework/Repository/GenericRepository.cs index e6e8331..58c9247 100644 --- a/EOM.TSHotelManagement.EntityFramework/Repository/GenericRepository.cs +++ b/EOM.TSHotelManagement.EntityFramework/Repository/GenericRepository.cs @@ -6,8 +6,7 @@ namespace EOM.TSHotelManagement.EntityFramework { public GenericRepository(ISqlSugarClient client) : base(client) { - // 初始化数据库上下文,设置必要的配置(例如错误处理) - base.Context.Aop.OnError = (ex) => { /* 处理错误 */ }; + base.Context.Aop.OnError = (ex) => {}; } } } diff --git a/EOM.TSHotelManagement.Shared/JwtConfig.cs b/EOM.TSHotelManagement.Shared/JwtConfig.cs index 341bed2..18935b7 100644 --- a/EOM.TSHotelManagement.Shared/JwtConfig.cs +++ b/EOM.TSHotelManagement.Shared/JwtConfig.cs @@ -2,9 +2,9 @@ { public class JwtConfig { - public string Key { get; set; } // 对应配置中的 Jwt:Key - public string Issuer { get; set; } // 对应配置中的 Jwt:Issuer - public string Audience { get; set; } // 对应配置中的 Jwt:Audience - public int ExpiryMinutes { get; set; } // 对应配置中的 Jwt:ExpiryMinutes + public string Key { get; set; } + public string Issuer { get; set; } + public string Audience { get; set; } + public int ExpiryMinutes { get; set; } } } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Asset/AssetController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Business/Asset/AssetController.cs index 9be1f74..ec57ec1 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Asset/AssetController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Business/Asset/AssetController.cs @@ -31,7 +31,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool AddAssetInfo([FromBody] Asset asset) + public BaseOutputDto AddAssetInfo([FromBody] CreateAssetInputDto asset) { return assetService.AddAssetInfo(asset); } @@ -41,7 +41,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public ListOutputDto SelectAssetInfoAll([FromQuery] Asset asset) + public ListOutputDto SelectAssetInfoAll([FromQuery] ReadAssetInputDto asset) { return assetService.SelectAssetInfoAll(asset); } @@ -52,7 +52,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool UpdAssetInfo([FromBody]Asset asset) + public BaseOutputDto UpdAssetInfo([FromBody]UpdateAssetInputDto asset) { return assetService.UpdAssetInfo(asset); } @@ -63,7 +63,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool DelAssetInfo([FromBody]Asset asset) + public BaseOutputDto DelAssetInfo([FromBody]DeleteAssetInputDto asset) { return assetService.DelAssetInfo(asset); } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomController.cs index 90cf64f..4fe537f 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomController.cs @@ -1,5 +1,6 @@ using EOM.TSHotelManagement.Application; using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Mvc; using System.Collections.Generic; @@ -10,15 +11,8 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// public class RoomController : ControllerBase { - /// - /// 房间信息 - /// private readonly IRoomService roomService; - /// - /// - /// - /// public RoomController(IRoomService roomService) { this.roomService = roomService; @@ -27,12 +21,12 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// 根据房间状态获取相应状态的房间信息 /// - /// + /// /// [HttpGet] - public List SelectRoomByRoomState([FromQuery] int stateid) + public ListOutputDto SelectRoomByRoomState([FromQuery] ReadRoomInputDto inputDto) { - return roomService.SelectRoomByRoomState(stateid); + return roomService.SelectRoomByRoomState(inputDto); } /// @@ -40,7 +34,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public List SelectCanUseRoomAll() + public ListOutputDto SelectCanUseRoomAll() { return roomService.SelectCanUseRoomAll(); } @@ -50,7 +44,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public List SelectRoomAll() + public ListOutputDto SelectRoomAll() { return roomService.SelectRoomAll(); } @@ -58,66 +52,67 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// 获取房间分区的信息 /// + /// /// [HttpGet] - public List SelectRoomByTypeName([FromQuery] string TypeName) + public ListOutputDto SelectRoomByTypeName([FromQuery] ReadRoomInputDto inputDto) { - return roomService.SelectRoomByTypeName(TypeName); + return roomService.SelectRoomByTypeName(inputDto); } /// /// 根据房间编号查询房间信息 /// - /// + /// /// [HttpGet] - public Room SelectRoomByRoomNo([FromQuery] string no) + public ReadRoomOutputDto SelectRoomByRoomNo([FromQuery] ReadRoomInputDto inputDto) { - return roomService.SelectRoomByRoomNo(no); + return roomService.SelectRoomByRoomNo(inputDto); } /// /// 根据房间编号退房(退房) /// - /// + /// /// - [HttpGet] - public bool UpdateRoomByRoomNo([FromQuery] string room) + [HttpPost] + public BaseOutputDto UpdateRoomByRoomNo([FromQuery] ReadRoomInputDto inputDto) { - return roomService.UpdateRoomByRoomNo(room); + return roomService.UpdateRoomByRoomNo(inputDto); } /// /// 根据房间编号查询截止到今天住了多少天 /// - /// + /// /// [HttpGet] - public object DayByRoomNo([FromQuery] string roomno) + public object DayByRoomNo([FromQuery] ReadRoomInputDto inputDto) { - return roomService.DayByRoomNo(roomno); + return roomService.DayByRoomNo(inputDto); } /// /// 根据房间编号修改房间信息(入住) /// - /// + /// /// [HttpPost] - public bool UpdateRoomInfo([FromBody] Room r) + public BaseOutputDto UpdateRoomInfo([FromBody] UpdateRoomInputDto inputDto) { - return roomService.UpdateRoomInfo(r); + return roomService.UpdateRoomInfo(inputDto); } /// /// 根据房间编号修改房间信息(预约) /// - /// + /// /// [HttpPost] - public bool UpdateRoomInfoWithReser([FromBody] Room r) + public BaseOutputDto UpdateRoomInfoWithReser([FromBody] UpdateRoomInputDto inputDto) { - return roomService.UpdateRoomInfoWithReser(r); + return roomService.UpdateRoomInfoWithReser(inputDto); } /// @@ -143,11 +138,12 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// 根据房间编号查询房间价格 /// + /// /// [HttpGet] - public object SelectRoomByRoomPrice([FromQuery] string r) + public object SelectRoomByRoomPrice([FromQuery] ReadRoomInputDto inputDto) { - return roomService.SelectRoomByRoomPrice(r); + return roomService.SelectRoomByRoomPrice(inputDto); } /// @@ -183,46 +179,45 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// 根据房间编号更改房间状态 /// - /// - /// + /// /// - [HttpGet] - public bool UpdateRoomStateByRoomNo([FromQuery] string roomno, int stateid) + [HttpPost] + public BaseOutputDto UpdateRoomStateByRoomNo([FromQuery] ReadRoomInputDto inputDto) { - return roomService.UpdateRoomStateByRoomNo(roomno, stateid); + return roomService.UpdateRoomStateByRoomNo(inputDto); } /// /// 添加房间 /// - /// + /// /// [HttpPost] - public bool InsertRoom([FromBody] Room rn) + public BaseOutputDto InsertRoom([FromBody] CreateRoomInputDto inputDto) { - return roomService.InsertRoom(rn); + return roomService.InsertRoom(inputDto); } /// /// 更新房间 /// - /// + /// /// [HttpPost] - public bool UpdateRoom([FromBody] Room rn) + public BaseOutputDto UpdateRoom([FromBody] UpdateRoomInputDto inputDto) { - return roomService.UpdateRoom(rn); + return roomService.UpdateRoom(inputDto); } /// /// 删除房间 /// - /// + /// /// [HttpPost] - public bool DeleteRoom([FromBody] Room rn) + public BaseOutputDto DeleteRoom([FromBody] DeleteRoomInputDto inputDto) { - return roomService.DeleteRoom(rn); + return roomService.DeleteRoom(inputDto); } /// @@ -230,7 +225,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public List SelectRoomByStateAll() + public ListOutputDto SelectRoomByStateAll() { return roomService.SelectRoomByStateAll(); } @@ -240,7 +235,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public List SelectRoomStateAll() + public ListOutputDto SelectRoomStateAll() { return roomService.SelectRoomStateAll(); } @@ -248,13 +243,12 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// 根据房间编号查询房间状态编号 /// - /// + /// /// [HttpGet] - public object SelectRoomStateIdByRoomNo([FromQuery] string roomno) + public object SelectRoomStateIdByRoomNo([FromQuery] ReadRoomInputDto inputDto) { - return roomService.SelectRoomStateIdByRoomNo(roomno); + return roomService.SelectRoomStateIdByRoomNo(inputDto); } - } } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomTypeController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomTypeController.cs index c5e1fa7..9d1f9ad 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomTypeController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomTypeController.cs @@ -1,5 +1,6 @@ using EOM.TSHotelManagement.Application; using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Mvc; using System.Collections.Generic; @@ -10,15 +11,8 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// public class RoomTypeController : ControllerBase { - /// - /// 房间类型 - /// private readonly IRoomTypeService roomTypeService; - /// - /// - /// - /// public RoomTypeController(IRoomTypeService roomTypeService) { this.roomTypeService = roomTypeService; @@ -27,66 +21,67 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// 获取所有房间类型 /// + /// /// [HttpGet] - public List SelectRoomTypesAll([FromQuery] int? isDelete) + public ListOutputDto SelectRoomTypesAll([FromQuery] ReadRoomTypeInputDto inputDto) { - return roomTypeService.SelectRoomTypesAll(isDelete); + return roomTypeService.SelectRoomTypesAll(inputDto); } /// /// 根据房间编号查询房间类型名称 /// - /// + /// /// [HttpGet] - public RoomType SelectRoomTypeByRoomNo([FromQuery] string no) + public ReadRoomTypeOutputDto SelectRoomTypeByRoomNo([FromQuery] ReadRoomTypeInputDto inputDto) { - return roomTypeService.SelectRoomTypeByRoomNo(no); + return roomTypeService.SelectRoomTypeByRoomNo(inputDto); } /// /// 根据房间类型查询类型配置 /// - /// + /// /// [HttpGet] - public RoomType SelectRoomTypeByType([FromQuery] int roomTypeId) + public ReadRoomTypeOutputDto SelectRoomTypeByType([FromQuery] ReadRoomTypeInputDto inputDto) { - return roomTypeService.SelectRoomTypeByType(roomTypeId); + return roomTypeService.SelectRoomTypeByType(inputDto); } /// /// 添加房间状态 /// - /// + /// /// [HttpPost] - public bool InsertRoomType([FromBody] RoomType roomType) + public BaseOutputDto InsertRoomType([FromBody] CreateRoomTypeInputDto inputDto) { - return roomTypeService.InsertRoomType(roomType); + return roomTypeService.InsertRoomType(inputDto); } /// /// 更新房间状态 /// - /// + /// /// [HttpPost] - public bool UpdateRoomType([FromBody] RoomType roomType) + public BaseOutputDto UpdateRoomType([FromBody] UpdateRoomTypeInputDto inputDto) { - return roomTypeService.UpdateRoomType(roomType); + return roomTypeService.UpdateRoomType(inputDto); } /// /// 删除房间状态 /// - /// + /// /// [HttpPost] - public bool DeleteRoomType([FromBody] RoomType roomType) + public BaseOutputDto DeleteRoomType([FromBody] DeleteRoomTypeInputDto inputDto) { - return roomTypeService.DeleteRoomType(roomType); + return roomTypeService.DeleteRoomType(inputDto); } } -} +} \ No newline at end of file diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Sellthing/SellthingController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Business/Sellthing/SellthingController.cs index 6f8da2a..ee24233 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Sellthing/SellthingController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Business/Sellthing/SellthingController.cs @@ -1,5 +1,6 @@ using EOM.TSHotelManagement.Application; using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Mvc; using System.Collections.Generic; @@ -10,15 +11,8 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// public class SellthingController : ControllerBase { - /// - /// 商品消费 - /// private readonly ISellService sellService; - /// - /// - /// - /// public SellthingController(ISellService sellService) { this.sellService = sellService; @@ -27,9 +21,10 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// 查询所有商品 /// + /// /// [HttpGet] - public List SelectSellThingAll([FromQuery] SellThing sellThing = null) + public ListOutputDto SelectSellThingAll([FromQuery] ReadSellThingInputDto sellThing = null) { return sellService.SelectSellThingAll(sellThing); } @@ -37,9 +32,10 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// 查询所有商品(包括库存为0/已删除) /// + /// /// [HttpGet] - public List GetSellThings(SellThing sellThing = null) + public ListOutputDto GetSellThings([FromQuery] ReadSellThingInputDto sellThing = null) { return sellService.GetSellThings(sellThing); } @@ -47,13 +43,12 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// 修改商品 /// - /// - /// + /// /// [HttpPost] - public bool UpdateSellThing([FromBody] string stock, string sellNo) + public BaseOutputDto UpdateSellThing([FromBody] UpdateSellThingInputDto updateSellThingInputDto) { - return sellService.UpdateSellThing(stock, sellNo); + return sellService.UpdateSellThing(updateSellThingInputDto); } /// @@ -62,7 +57,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool UpdateSellthingInfo([FromBody] SellThing sellThing) + public BaseOutputDto UpdateSellthingInfo([FromBody] UpdateSellThingInputDto sellThing) { return sellService.UpdateSellthingInfo(sellThing); } @@ -70,49 +65,45 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// 撤回客户消费信息 /// - /// - /// - /// + /// /// - [HttpGet] - public bool DeleteSellThing([FromQuery] string roomNo, string custoNo, string sellName) + [HttpPost] + public BaseOutputDto DeleteSellThing([FromQuery] DeleteSellThingInputDto deleteSellThingInputDto) { - return sellService.DeleteSellThing(roomNo, custoNo, sellName); + return sellService.DeleteSellThing(deleteSellThingInputDto); } /// /// 根据商品编号删除商品信息 /// - /// + /// /// - [HttpGet] - public bool DeleteSellThingBySellNo([FromQuery] string sellNo) + [HttpPost] + public BaseOutputDto DeleteSellThingBySellNo([FromQuery] DeleteSellThingInputDto deleteSellThingInputDto) { - return sellService.DeleteSellThingBySellNo(sellNo); + return sellService.DeleteSellThingBySellNo(deleteSellThingInputDto); } /// /// 根据商品名称和价格查询商品编号 /// - /// - /// + /// /// [HttpGet] - public SellThing SelectSellThingByNameAndPrice([FromQuery] string name, string price) + public ReadSellThingOutputDto SelectSellThingByNameAndPrice([FromQuery] ReadSellThingInputDto readSellThingInputDto) { - return sellService.SelectSellThingByNameAndPrice(name, price); + return sellService.SelectSellThingByNameAndPrice(readSellThingInputDto); } - /// /// 根据商品编号查询商品信息 /// - /// + /// /// [HttpGet] - public SellThing SelectSellInfoBySellNo([FromQuery] string SellNo) + public ReadSellThingOutputDto SelectSellInfoBySellNo([FromQuery] ReadSellThingInputDto readSellThingInputDto) { - return sellService.SelectSellInfoBySellNo(SellNo); + return sellService.SelectSellInfoBySellNo(readSellThingInputDto); } /// @@ -121,9 +112,11 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool InsertSellThing([FromBody] SellThing st) + public BaseOutputDto InsertSellThing([FromBody] CreateSellThingInputDto st) { return sellService.InsertSellThing(st); } } } + + diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Spend/SpendController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Business/Spend/SpendController.cs index 23c0bff..8b34864 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Spend/SpendController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Business/Spend/SpendController.cs @@ -1,7 +1,9 @@ using EOM.TSHotelManagement.Application; using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Mvc; using System.Collections.Generic; +using System; namespace EOM.TSHotelManagement.WebApi.Controllers { @@ -10,15 +12,8 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// public class SpendController : ControllerBase { - /// - /// 消费信息 - /// private readonly ISpendService spendService; - /// - /// - /// - /// public SpendController(ISpendService spendService) { this.spendService = spendService; @@ -30,7 +25,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool InsertSpendInfo([FromBody] Spend s) + public BaseOutputDto InsertSpendInfo([FromBody] CreateSpendInputDto s) { return spendService.InsertSpendInfo(s); } @@ -38,34 +33,34 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// 根据客户编号查询消费信息 /// - /// + /// /// [HttpGet] - public List SelectSpendByCustoNo([FromQuery] string No) + public ListOutputDto SelectSpendByCustoNo([FromQuery] ReadSpendInputDto inputDto) { - return spendService.SelectSpendByCustoNo(No); + return spendService.SelectSpendByCustoNo(inputDto); } /// /// 根据房间编号查询消费信息 /// - /// + /// /// [HttpGet] - public List SelectSpendByRoomNo([FromQuery] string No) + public ListOutputDto SelectSpendByRoomNo([FromQuery] ReadSpendInputDto inputDto) { - return spendService.SelectSpendByRoomNo(No); + return spendService.SelectSpendByRoomNo(inputDto); } /// /// 根据客户编号查询历史消费信息 /// - /// + /// /// [HttpGet] - public List SeletHistorySpendInfoAll([FromQuery] string custoNo) + public ListOutputDto SeletHistorySpendInfoAll([FromQuery] ReadSpendInputDto inputDto) { - return spendService.SeletHistorySpendInfoAll(custoNo); + return spendService.SeletHistorySpendInfoAll(inputDto); } /// @@ -73,7 +68,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public List SelectSpendInfoAll() + public ListOutputDto SelectSpendInfoAll() { return spendService.SelectSpendInfoAll(); } @@ -81,58 +76,56 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// 根据房间号查询消费的所有信息 /// + /// /// [HttpGet] - public List SelectSpendInfoRoomNo([FromQuery] string RoomNo) + public ListOutputDto SelectSpendInfoRoomNo([FromQuery] ReadSpendInputDto inputDto) { - return spendService.SelectSpendInfoRoomNo(RoomNo); + return spendService.SelectSpendInfoRoomNo(inputDto); } /// /// 根据房间编号、入住时间到当前时间查询消费总金额 /// - /// - /// + /// /// [HttpGet] - public object SelectMoneyByRoomNoAndTime([FromQuery] string roomno, string custono) + public object SelectMoneyByRoomNoAndTime([FromQuery] ReadSpendInputDto inputDto) { - return spendService.SelectMoneyByRoomNoAndTime(roomno, custono); + return spendService.SelectMoneyByRoomNoAndTime(inputDto); } /// /// 根据房间编号、入住时间和当前时间修改结算状态 /// - /// - /// + /// /// - [HttpGet] - public bool UpdateMoneyState([FromQuery] string roomno, string checktime) + [HttpPost] + public BaseOutputDto UpdateMoneyState([FromQuery] UpdateSpendInputDto inputDto) { - return spendService.UpdateMoneyState(roomno, checktime); + return spendService.UpdateMoneyState(inputDto); } /// /// 将转房前的未结算记录一同转移到新房间 /// - /// + /// /// [HttpPost] - public bool UpdateSpendInfoByRoomNo([FromQuery] Spend spend) + public BaseOutputDto UpdateSpendInfoByRoomNo([FromBody] UpdateSpendInputDto inputDto) { - return spendService.UpdateSpendInfoByRoomNo(spend); + return spendService.UpdateSpendInfoByRoomNo(inputDto); } /// /// 更新消费信息 /// - /// + /// /// [HttpPost] - public bool UpdSpenInfo([FromBody] Spend spend) + public BaseOutputDto UpdSpenInfo([FromBody] UpdateSpendInputDto inputDto) { - return spendService.UpdSpenInfo(spend); + return spendService.UpdSpenInfo(inputDto); } - } } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Worker/Check/WorkerCheckController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Employee/Check/EmployeeCheckController.cs similarity index 66% rename from EOM.TSHotelManagement.WebApi/Controllers/Worker/Check/WorkerCheckController.cs rename to EOM.TSHotelManagement.WebApi/Controllers/Employee/Check/EmployeeCheckController.cs index 24e57de..2f56a33 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Worker/Check/WorkerCheckController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Employee/Check/EmployeeCheckController.cs @@ -1,5 +1,6 @@ using EOM.TSHotelManagement.Application; using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Mvc; using System.Collections.Generic; @@ -8,18 +9,11 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// 员工打卡控制器 /// - public class WorkerCheckController : ControllerBase + public class EmployeeCheckController : ControllerBase { - /// - /// 员工打卡 - /// - private readonly IWorkerCheckService workerCheckService; + private readonly IEmployeeCheckService workerCheckService; - /// - /// - /// - /// - public WorkerCheckController(IWorkerCheckService workerCheckService) + public EmployeeCheckController(IEmployeeCheckService workerCheckService) { this.workerCheckService = workerCheckService; } @@ -27,34 +21,34 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// 根据员工编号查询其所有的打卡记录 /// - /// + /// /// [HttpGet] - public List SelectCheckInfoByWorkerNo([FromQuery] string wid) + public ListOutputDto SelectCheckInfoByWorkerNo([FromQuery] ReadEmployeeCheckInputDto inputDto) { - return workerCheckService.SelectCheckInfoByWorkerNo(wid); + return workerCheckService.SelectCheckInfoByWorkerNo(inputDto); } /// /// 查询员工签到天数 /// - /// + /// /// [HttpGet] - public object SelectWorkerCheckDaySumByWorkerNo([FromQuery] string wkn) + public object SelectWorkerCheckDaySumByWorkerNo([FromQuery] ReadEmployeeCheckInputDto inputDto) { - return workerCheckService.SelectWorkerCheckDaySumByWorkerNo(wkn); + return workerCheckService.SelectWorkerCheckDaySumByWorkerNo(inputDto); } /// /// 查询今天员工是否已签到 /// - /// + /// /// [HttpGet] - public object SelectToDayCheckInfoByWorkerNo([FromQuery] string wkn) + public object SelectToDayCheckInfoByWorkerNo([FromQuery] ReadEmployeeCheckInputDto inputDto) { - return workerCheckService.SelectToDayCheckInfoByWorkerNo(wkn); + return workerCheckService.SelectToDayCheckInfoByWorkerNo(inputDto); } /// @@ -63,9 +57,12 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool AddCheckInfo([FromBody] EmployeeCheck workerCheck) + public BaseOutputDto AddCheckInfo([FromBody] CreateEmployeeCheckInputDto workerCheck) { return workerCheckService.AddCheckInfo(workerCheck); } } } + + + diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Worker/WorkerController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Employee/EmployeeController.cs similarity index 51% rename from EOM.TSHotelManagement.WebApi/Controllers/Worker/WorkerController.cs rename to EOM.TSHotelManagement.WebApi/Controllers/Employee/EmployeeController.cs index 2397368..4ff92e8 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Worker/WorkerController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Employee/EmployeeController.cs @@ -1,5 +1,6 @@ using EOM.TSHotelManagement.Application; using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using System.Collections.Generic; @@ -9,18 +10,11 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// 员工信息控制器 /// - public class WorkerController : ControllerBase + public class EmployeeController : ControllerBase { - /// - /// 员工信息 - /// - private readonly IWorkerService workerService; + private readonly IEmployeeService workerService; - /// - /// - /// - /// - public WorkerController(IWorkerService workerService) + public EmployeeController(IEmployeeService workerService) { this.workerService = workerService; } @@ -31,9 +25,9 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool UpdateWorker([FromBody] Employee worker) + public BaseOutputDto UpdateEmployee([FromBody] UpdateEmployeeInputDto worker) { - return workerService.UpdateWorker(worker); + return workerService.UpdateEmployee(worker); } /// @@ -42,9 +36,9 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool ManagerWorkerAccount([FromBody] Employee worker) + public BaseOutputDto ManagerEmployeeAccount([FromBody] UpdateEmployeeInputDto worker) { - return workerService.ManagerWorkerAccount(worker); + return workerService.ManagerEmployeeAccount(worker); } /// @@ -53,10 +47,9 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - - public bool UpdateWorkerPositionAndClub([FromBody] Employee worker) + public BaseOutputDto UpdateEmployeePositionAndClub([FromBody] UpdateEmployeeInputDto worker) { - return workerService.UpdateWorkerPositionAndClub(worker); + return workerService.UpdateEmployeePositionAndClub(worker); } /// @@ -65,53 +58,54 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool AddWorker([FromBody] Employee worker) + public BaseOutputDto AddEmployee([FromBody] CreateEmployeeInputDto worker) { - return workerService.AddWorker(worker); + return workerService.AddEmployee(worker); } /// /// 获取所有工作人员信息 /// + /// /// [HttpGet] - public List SelectWorkerAll() + public ListOutputDto SelectEmployeeAll([FromQuery] ReadEmployeeInputDto inputDto) { - return workerService.SelectWorkerAll(); + return workerService.SelectEmployeeAll(inputDto); } /// /// 检查指定部门下是否存在工作人员 /// - /// + /// /// [HttpGet] - public bool CheckWorkerBydepartment(string deptNo) + public BaseOutputDto CheckEmployeeByDepartment([FromQuery] ReadEmployeeInputDto inputDto) { - return workerService.CheckWorkerBydepartment(deptNo); + return workerService.CheckEmployeeByDepartment(inputDto); } /// /// 根据登录名称查询员工信息 /// - /// + /// /// [HttpGet] - public Employee SelectWorkerInfoByWorkerId([FromQuery] string workerId) + public SingleOutputDto SelectEmployeeInfoByEmployeeId([FromQuery] ReadEmployeeInputDto inputDto) { - return workerService.SelectWorkerInfoByWorkerId(workerId); + return workerService.SelectEmployeeInfoByEmployeeId(inputDto); } /// /// 根据登录名称、密码查询员工信息 /// - /// + /// /// [HttpPost] [AllowAnonymous] - public Employee SelectWorkerInfoByWorkerIdAndWorkerPwd([FromBody] Employee worker) + public SingleOutputDto SelectEmployeeInfoByEmployeeIdAndEmployeePwd([FromBody] ReadEmployeeInputDto inputDto) { - return workerService.SelectWorkerInfoByWorkerIdAndWorkerPwd(worker); + return workerService.SelectEmployeeInfoByEmployeeIdAndEmployeePwd(inputDto); } /// @@ -120,9 +114,9 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool UpdWorkerPwdByWorkNo([FromBody] Employee worker) + public BaseOutputDto UpdEmployeePwdByWorkNo([FromBody] UpdateEmployeeInputDto worker) { - return workerService.UpdWorkerPwdByWorkNo(worker); + return workerService.UpdEmployeePwdByWorkNo(worker); } } -} +} \ No newline at end of file diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Worker/History/WorkerHistoryController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Employee/History/EmployeeHistoryController.cs similarity index 59% rename from EOM.TSHotelManagement.WebApi/Controllers/Worker/History/WorkerHistoryController.cs rename to EOM.TSHotelManagement.WebApi/Controllers/Employee/History/EmployeeHistoryController.cs index 540a08a..5abf165 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Worker/History/WorkerHistoryController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Employee/History/EmployeeHistoryController.cs @@ -1,5 +1,6 @@ using EOM.TSHotelManagement.Application; using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Mvc; using System.Collections.Generic; @@ -8,18 +9,11 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// 员工履历控制器 /// - public class WorkerHistoryController : ControllerBase + public class EmployeeHistoryController : ControllerBase { - /// - /// 员工履历 - /// - private readonly IWorkerHistoryService workerHistoryService; + private readonly IEmployeeHistoryService workerHistoryService; - /// - /// - /// - /// - public WorkerHistoryController(IWorkerHistoryService workerHistoryService) + public EmployeeHistoryController(IEmployeeHistoryService workerHistoryService) { this.workerHistoryService = workerHistoryService; } @@ -30,7 +24,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool AddHistoryByWorkerId([FromBody] EmployeeHistory workerHistory) + public BaseOutputDto AddHistoryByWorkerId([FromBody] CreateEmployeeHistoryInputDto workerHistory) { return workerHistoryService.AddHistoryByWorkerId(workerHistory); } @@ -38,12 +32,14 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// 根据工号查询履历信息 /// - /// + /// /// [HttpGet] - public List SelectHistoryByWorkerId([FromQuery] string wid) + public ListOutputDto SelectHistoryByWorkerId([FromQuery] ReadEmployeeHistoryInputDto inputDto) { - return workerHistoryService.SelectHistoryByWorkerId(wid); + return workerHistoryService.SelectHistoryByWorkerId(inputDto); } } } + + diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Worker/Picture/WorkerPictureController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Employee/Photo/EmployeePhotoController.cs similarity index 45% rename from EOM.TSHotelManagement.WebApi/Controllers/Worker/Picture/WorkerPictureController.cs rename to EOM.TSHotelManagement.WebApi/Controllers/Employee/Photo/EmployeePhotoController.cs index 28c7177..cdda40f 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Worker/Picture/WorkerPictureController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Employee/Photo/EmployeePhotoController.cs @@ -1,5 +1,6 @@ using EOM.TSHotelManagement.Application; using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Mvc; namespace EOM.TSHotelManagement.WebApi.Controllers @@ -7,18 +8,11 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// 照片控制器 /// - public class WorkerPictureController : ControllerBase + public class EmployeePhotoController : ControllerBase { - /// - /// 照片 - /// - private readonly IWorkerPicService workerPicService; + private readonly IEmployeePhotoService workerPicService; - /// - /// - /// - /// - public WorkerPictureController(IWorkerPicService workerPicService) + public EmployeePhotoController(IEmployeePhotoService workerPicService) { this.workerPicService = workerPicService; } @@ -26,47 +20,46 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// 查询员工照片 /// - /// + /// /// [HttpGet] - public EmployeePhoto EmployeePhoto([FromQuery] EmployeePhoto workerPic) + public ReadEmployeePhotoOutputDto EmployeePhoto([FromQuery] ReadEmployeePhotoInputDto inputDto) { - return workerPicService.EmployeePhoto(workerPic); + return workerPicService.EmployeePhoto(inputDto); } /// /// 添加员工照片 /// - /// + /// /// [HttpPost] - public bool InsertWorkerPic([FromBody] EmployeePhoto workerPic) + public BaseOutputDto InsertWorkerPhoto([FromBody] CreateEmployeePhotoInputDto inputDto) { - return workerPicService.InsertWorkerPic(workerPic); + return workerPicService.InsertWorkerPhoto(inputDto); } /// /// 删除员工照片 /// - /// + /// /// [HttpPost] - public bool DeleteWorkerPic([FromBody] EmployeePhoto workerPic) + public BaseOutputDto DeleteWorkerPhoto([FromBody] DeleteEmployeePhotoInputDto inputDto) { - return workerPicService.DeleteWorkerPic(workerPic); + return workerPicService.DeleteWorkerPhoto(inputDto); } /// /// 更新员工照片 /// - /// + /// /// [HttpPost] - public bool UpdateWorkerPic([FromBody] EmployeePhoto workerPic) + public BaseOutputDto UpdateWorkerPhoto([FromBody] UpdateEmployeePhotoInputDto inputDto) { - return workerPicService.UpdateWorkerPic(workerPic); + return workerPicService.UpdateWorkerPhoto(inputDto); } - } - } + diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Worker/GoodBad/WorkerGoodBadController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Employee/RewardPunishment/RewardPunishmentController.cs similarity index 58% rename from EOM.TSHotelManagement.WebApi/Controllers/Worker/GoodBad/WorkerGoodBadController.cs rename to EOM.TSHotelManagement.WebApi/Controllers/Employee/RewardPunishment/RewardPunishmentController.cs index 990c44f..d054d7a 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Worker/GoodBad/WorkerGoodBadController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Employee/RewardPunishment/RewardPunishmentController.cs @@ -1,4 +1,5 @@ using EOM.TSHotelManagement.Application; +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; using Microsoft.AspNetCore.Mvc; using System.Collections.Generic; @@ -8,18 +9,18 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// 奖惩信息控制器 /// - public class WorkerGoodBadController : ControllerBase + public class RewardPunishmentController : ControllerBase { /// /// 奖惩信息 /// - private readonly IWorkerGoodBadService workerGoodBadService; + private readonly IRewardPunishmentService workerGoodBadService; /// /// /// /// - public WorkerGoodBadController(IWorkerGoodBadService workerGoodBadService) + public RewardPunishmentController(IRewardPunishmentService workerGoodBadService) { this.workerGoodBadService = workerGoodBadService; } @@ -30,9 +31,9 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool AddGoodBad([FromBody] EmployeeRewardPunishment goodBad) + public BaseOutputDto AddRewardPunishment([FromBody] CreateEmployeeRewardPunishmentInputDto goodBad) { - return workerGoodBadService.AddGoodBad(goodBad); + return workerGoodBadService.AddRewardPunishment(goodBad); } /// @@ -41,9 +42,9 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public List SelectAllGoodBadByWorkNo([FromQuery] string wn) + public ListOutputDto SelectAllRewardPunishmentByWorkNo([FromQuery] ReadEmployeeRewardPunishmentInputDto wn) { - return workerGoodBadService.SelectAllGoodBadByWorkNo(wn); + return workerGoodBadService.SelectAllRewardPunishmentByWorkNo(wn); } } } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Sys/NavBar/NavBarController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Sys/NavBar/NavBarController.cs index 7fed6f0..613d7fa 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Sys/NavBar/NavBarController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Sys/NavBar/NavBarController.cs @@ -1,4 +1,5 @@ using EOM.TSHotelManagement.Application; +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; using Microsoft.AspNetCore.Mvc; using System.Collections.Generic; @@ -29,7 +30,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public List NavBarList() + public ListOutputDto NavBarList() { return navBarService.NavBarList(); } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Util/AppController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Util/UtilityController.cs similarity index 71% rename from EOM.TSHotelManagement.WebApi/Controllers/Util/AppController.cs rename to EOM.TSHotelManagement.WebApi/Controllers/Util/UtilityController.cs index 405b4ae..a2c1522 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Util/AppController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Util/UtilityController.cs @@ -9,18 +9,11 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// 工具类控制器 /// - public class AppController : ControllerBase + public class UtilityController : ControllerBase { - /// - /// 工具 - /// private readonly IUtilService utilService; - /// - /// - /// - /// - public AppController(IUtilService utilService) + public UtilityController(IUtilService utilService) { this.utilService = utilService; } @@ -42,7 +35,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// [HttpGet] [AllowAnonymous] - public ApplicationVersion CheckBaseVersion() + public ReadApplicationVersionOutputDto CheckBaseVersion() { return utilService.CheckBaseVersion(); } @@ -53,7 +46,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool AddLog([FromBody] OperationLog opr) + public BaseOutputDto AddLog([FromBody] CreateOperationLogInputDto opr) { return utilService.AddLog(opr); } @@ -63,9 +56,9 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public ListOutputDto SelectOperationlogAll([FromQuery] int? pageIndex, int? pageSize) + public ListOutputDto SelectOperationlogAll([FromQuery] ReadOperationLogInputDto readOperationLogInputDto) { - return utilService.SelectOperationlogAll(pageIndex, pageSize); + return utilService.SelectOperationlogAll(readOperationLogInputDto); } } } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Zero/Admin/AdminController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Zero/Administrator/AdminController.cs similarity index 69% rename from EOM.TSHotelManagement.WebApi/Controllers/Zero/Admin/AdminController.cs rename to EOM.TSHotelManagement.WebApi/Controllers/Zero/Administrator/AdminController.cs index 379e36d..4ed912f 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Zero/Admin/AdminController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Zero/Administrator/AdminController.cs @@ -1,4 +1,5 @@ using EOM.TSHotelManagement.Application; +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; @@ -32,7 +33,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// [HttpPost] [AllowAnonymous] - public Administrator SelectManagerByPass([FromBody] Administrator admin) + public SingleOutputDto SelectManagerByPass([FromBody] ReadAdministratorInputDto admin) { return adminService.SelectManagerByPass(admin); } @@ -44,7 +45,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// [HttpPost] [AllowAnonymous] - public Administrator Login([FromBody] Administrator admin) + public SingleOutputDto Login([FromBody] ReadAdministratorInputDto admin) { return adminService.Login(admin); } @@ -55,7 +56,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public Administrator SelectAdminPwdByAccount([FromQuery] string account) + public SingleOutputDto SelectAdminPwdByAccount([FromQuery] ReadAdministratorInputDto account) { return adminService.SelectAdminPwdByAccount(account); } @@ -65,9 +66,9 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public List GetAllAdminList() + public ListOutputDto GetAllAdminList(ReadAdministratorInputDto readAdministratorInputDto) { - return adminService.GetAllAdminList(); + return adminService.GetAllAdminList(readAdministratorInputDto); } /// @@ -76,7 +77,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool UpdateNewPwdByOldPwd([FromBody] Administrator admin) + public BaseOutputDto UpdateNewPwdByOldPwd([FromBody] UpdateAdministratorInputDto admin) { return adminService.UpdateNewPwdByOldPwd(admin); } @@ -86,10 +87,10 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public List GetAllAdmin() - { - return adminService.GetAllAdmin(); - } + //public List GetAllAdmin() + //{ + // return adminService.GetAllAdmin(); + //} /// /// 添加管理员 @@ -97,7 +98,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool AddAdmin([FromBody] Administrator admin) + public BaseOutputDto AddAdmin([FromBody] CreateAdministratorInputDto admin) { return adminService.AddAdmin(admin); } @@ -108,7 +109,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public Administrator GetAdminInfoByAdminAccount([FromQuery] Administrator admin) + public SingleOutputDto GetAdminInfoByAdminAccount([FromQuery] ReadAdministratorInputDto admin) { return adminService.GetAdminInfoByAdminAccount(admin); } @@ -118,9 +119,9 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public List GetAllAdminTypes() + public ListOutputDto GetAllAdminTypes(ReadAdministratorTypeInputDto readAdministratorTypeInputDto) { - return adminService.GetAllAdminTypes(); + return adminService.GetAllAdminTypes(readAdministratorTypeInputDto); } /// @@ -129,7 +130,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool UpdAccount([FromBody] Administrator admins) + public BaseOutputDto UpdAccount([FromBody] UpdateAdministratorInputDto admins) { return adminService.UpdAccount(admins); } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Zero/Base/BaseController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Zero/Base/BaseController.cs index 2c4619e..506672e 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Zero/Base/BaseController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Zero/Base/BaseController.cs @@ -1,5 +1,6 @@ using EOM.TSHotelManagement.Application; using EOM.TSHotelManagement.Common; +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; using Microsoft.AspNetCore.Mvc; using System; @@ -12,15 +13,8 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// public class BaseController : ControllerBase { - /// - /// 基础信息 - /// private readonly IBaseService baseService; - /// - /// - /// - /// public BaseController(IBaseService baseService) { this.baseService = baseService; @@ -28,125 +22,76 @@ namespace EOM.TSHotelManagement.WebApi.Controllers #region 性别模块 - /// - /// 查询所有性别类型 - /// - /// [HttpGet] - public List SelectSexTypeAll([FromQuery] GenderType sexType = null) + public ListOutputDto SelectSexTypeAll([FromQuery] ReadGenderTypeInputDto sexType = null) { - return baseService.SelectSexTypeAll(sexType); + return baseService.SelectGenderTypeAll(sexType); } - /// - /// 查询性别类型 - /// - /// [HttpGet] - public GenderType SelectSexType([FromQuery] GenderType sexType) + public SingleOutputDto SelectSexType([FromQuery] ReadGenderTypeInputDto sexType) { - return baseService.SelectSexType(sexType); + return baseService.SelectGenderType(sexType); } - /// - /// 添加性别类型 - /// - /// - /// [HttpPost] - public bool AddSexType([FromBody] GenderType sexType) + public BaseOutputDto AddSexType([FromBody] CreateGenderTypeInputDto sexType) { - return baseService.AddSexType(sexType); + return baseService.AddGenderType(sexType); } - /// - /// 删除性别类型 - /// - /// - /// [HttpPost] - public bool DelSexType([FromBody] GenderType sexType) + public BaseOutputDto DelSexType([FromBody] DeleteGenderTypeInputDto sexType) { - return baseService.DelSexType(sexType); + return baseService.DelGenderType(sexType); } - /// - /// 更新性别类型 - /// - /// - /// [HttpPost] - public bool UpdSexType([FromBody] GenderType sexType) + public BaseOutputDto UpdSexType([FromBody] UpdateGenderTypeInputDto sexType) { - return baseService.UpdSexType(sexType); + return baseService.UpdGenderType(sexType); } #endregion #region 面貌模块 - /// - /// 查询所有面貌类型 - /// - /// [HttpGet] public List SelectWorkerFeatureAll() { return baseService.SelectWorkerFeatureAll(); } + #endregion #region 职位模块 - /// - /// 查询所有职位类型 - /// - /// [HttpGet] - public List SelectPositionAll([FromQuery] Position position = null) + public ListOutputDto SelectPositionAll([FromQuery] ReadPositionInputDto position = null) { return baseService.SelectPositionAll(position); } - /// - /// 查询职位类型 - /// - /// [HttpGet] - public Position SelectPosition([FromQuery] Position position) + public SingleOutputDto SelectPosition([FromQuery] ReadPositionInputDto position) { return baseService.SelectPosition(position); } - /// - /// 添加职位类型 - /// - /// - /// [HttpPost] - public bool AddPosition([FromBody] Position position) + public BaseOutputDto AddPosition([FromBody] CreatePositionInputDto position) { return baseService.AddPosition(position); } - /// - /// 删除职位类型 - /// - /// - /// [HttpPost] - public bool DelPosition([FromBody] Position position) + public BaseOutputDto DelPosition([FromBody] DeletePositionInputDto position) { return baseService.DelPosition(position); } - /// - /// 更新职位类型 - /// - /// - /// [HttpPost] - public bool UpdPosition([FromBody] Position position) + public BaseOutputDto UpdPosition([FromBody] UpdatePositionInputDto position) { return baseService.UpdPosition(position); } @@ -155,55 +100,32 @@ namespace EOM.TSHotelManagement.WebApi.Controllers #region 民族模块 - /// - /// 查询所有民族类型 - /// - /// [HttpGet] - public List SelectNationAll([FromQuery] Nation nation = null) + public ListOutputDto SelectNationAll([FromQuery] ReadNationInputDto nation = null) { return baseService.SelectNationAll(nation); } - /// - /// 查询民族类型 - /// - /// [HttpGet] - public Nation SelectNation([FromQuery] Nation nation) + public SingleOutputDto SelectNation([FromQuery] ReadNationInputDto nation) { return baseService.SelectNation(nation); } - /// - /// 添加民族类型 - /// - /// - /// [HttpPost] - public bool AddNation([FromBody] Nation nation) + public BaseOutputDto AddNation([FromBody] CreateNationInputDto nation) { return baseService.AddNation(nation); } - /// - /// 删除民族类型 - /// - /// - /// [HttpPost] - public bool DelNation([FromBody] Nation nation) + public BaseOutputDto DelNation([FromBody] DeleteNationInputDto nation) { return baseService.DelNation(nation); } - /// - /// 更新民族类型 - /// - /// - /// [HttpPost] - public bool UpdNation([FromBody] Nation nation) + public BaseOutputDto UpdNation([FromBody] UpdateNationInputDto nation) { return baseService.UpdNation(nation); } @@ -212,55 +134,32 @@ namespace EOM.TSHotelManagement.WebApi.Controllers #region 学历模块 - /// - /// 查询所有学历类型 - /// - /// [HttpGet] - public List SelectEducationAll([FromQuery] Education education = null) + public ListOutputDto SelectEducationAll([FromQuery] ReadEducationInputDto education = null) { return baseService.SelectEducationAll(education); } - /// - /// 查询学历类型 - /// - /// [HttpGet] - public Education SelectEducation([FromQuery] Education education) + public SingleOutputDto SelectEducation([FromQuery] ReadEducationInputDto education) { return baseService.SelectEducation(education); } - /// - /// 添加学历类型 - /// - /// - /// [HttpPost] - public bool AddEducation([FromBody] Education education) + public BaseOutputDto AddEducation([FromBody] CreateEducationInputDto education) { return baseService.AddEducation(education); } - /// - /// 删除学历类型 - /// - /// - /// [HttpPost] - public bool DelEducation([FromBody] Education education) + public BaseOutputDto DelEducation([FromBody] DeleteEducationInputDto education) { return baseService.DelEducation(education); } - /// - /// 更新学历类型 - /// - /// - /// [HttpPost] - public bool UpdEducation([FromBody] Education education) + public BaseOutputDto UpdEducation([FromBody] UpdateEducationInputDto education) { return baseService.UpdEducation(education); } @@ -269,65 +168,38 @@ namespace EOM.TSHotelManagement.WebApi.Controllers #region 部门模块 - /// - /// 查询所有部门类型(可用) - /// - /// [HttpGet] - public List SelectDeptAllCanUse() + public ListOutputDto SelectDeptAllCanUse() { return baseService.SelectDeptAllCanUse(); } - /// - /// 查询所有部门类型 - /// - /// [HttpGet] - public List SelectDeptAll() + public ListOutputDto SelectDeptAll([FromQuery]ReadDepartmentInputDto readDepartmentInputDto) { - return baseService.SelectDeptAll(); + return baseService.SelectDeptAll(readDepartmentInputDto); } - /// - /// 查询部门类型 - /// - /// [HttpGet] - public Department SelectDept([FromQuery] Department dept) + public SingleOutputDto SelectDept([FromQuery] ReadDepartmentInputDto dept) { return baseService.SelectDept(dept); } - /// - /// 添加部门类型 - /// - /// - /// [HttpPost] - public bool AddDept([FromBody] Department dept) + public BaseOutputDto AddDept([FromBody] CreateDepartmentInputDto dept) { return baseService.AddDept(dept); } - /// - /// 删除部门类型 - /// - /// - /// [HttpPost] - public bool DelDept([FromBody] Department dept) + public BaseOutputDto DelDept([FromBody] DeleteDepartmentInputDto dept) { return baseService.DelDept(dept); } - /// - /// 更新部门类型 - /// - /// - /// [HttpPost] - public bool UpdDept([FromBody] Department dept) + public BaseOutputDto UpdDept([FromBody] UpdateDepartmentInputDto dept) { return baseService.UpdDept(dept); } @@ -336,66 +208,38 @@ namespace EOM.TSHotelManagement.WebApi.Controllers #region 客户类型模块 - /// - /// 查询所有客户类型(可用) - /// - /// [HttpGet] - public List SelectCustoTypeAllCanUse() + public ListOutputDto SelectCustoTypeAllCanUse() { return baseService.SelectCustoTypeAllCanUse(); } - /// - /// 查询所有客户类型 - /// - /// [HttpGet] - public List SelectCustoTypeAll() + public ListOutputDto SelectCustoTypeAll([FromQuery]ReadCustoTypeInputDto readCustoTypeInputDto) { - return baseService.SelectCustoTypeAll(); + return baseService.SelectCustoTypeAll(readCustoTypeInputDto); } - /// - /// 根据客户类型ID查询类型名称 - /// - /// - /// [HttpGet] - public CustoType SelectCustoTypeByTypeId([FromQuery] CustoType custoType) + public SingleOutputDto SelectCustoTypeByTypeId([FromQuery] ReadCustoTypeInputDto custoType) { return baseService.SelectCustoTypeByTypeId(custoType); } - /// - /// 添加客户类型 - /// - /// - /// [HttpPost] - public bool InsertCustoType([FromBody] CustoType custoType) + public BaseOutputDto InsertCustoType([FromBody] CreateCustoTypeInputDto custoType) { return baseService.InsertCustoType(custoType); } - /// - /// 删除客户类型 - /// - /// - /// [HttpPost] - public bool DeleteCustoType([FromBody] CustoType custoType) + public BaseOutputDto DeleteCustoType([FromBody] DeleteCustoTypeInputDto custoType) { return baseService.DeleteCustoType(custoType); } - /// - /// 更新客户类型 - /// - /// - /// [HttpPost] - public bool UpdateCustoType([FromBody] CustoType custoType) + public BaseOutputDto UpdateCustoType([FromBody] UpdateCustoTypeInputDto custoType) { return baseService.UpdateCustoType(custoType); } @@ -404,66 +248,38 @@ namespace EOM.TSHotelManagement.WebApi.Controllers #region 证件类型模块 - /// - /// 查询所有证件类型(可用) - /// - /// [HttpGet] - public List SelectPassPortTypeAllCanUse() + public ListOutputDto SelectPassPortTypeAllCanUse() { return baseService.SelectPassPortTypeAllCanUse(); } - /// - /// 查询所有证件类型 - /// - /// [HttpGet] - public List SelectPassPortTypeAll() + public ListOutputDto SelectPassPortTypeAll([FromQuery]ReadPassportTypeInputDto readPassportTypeInputDto) { - return baseService.SelectPassPortTypeAll(); + return baseService.SelectPassPortTypeAll(readPassportTypeInputDto); } - /// - /// 根据证件类型ID查询类型名称 - /// - /// - /// [HttpGet] - public PassportType SelectPassPortTypeByTypeId([FromQuery] PassportType passPortType) + public SingleOutputDto SelectPassPortTypeByTypeId([FromQuery] ReadPassportTypeInputDto passPortType) { return baseService.SelectPassPortTypeByTypeId(passPortType); } - /// - /// 添加证件类型 - /// - /// - /// [HttpPost] - public bool InsertPassPortType([FromBody] PassportType passPortType) + public BaseOutputDto InsertPassPortType([FromBody] CreatePassportTypeInputDto passPortType) { return baseService.InsertPassPortType(passPortType); } - /// - /// 删除证件类型 - /// - /// - /// [HttpPost] - public bool DeletePassPortType([FromBody] PassportType portType) + public BaseOutputDto DeletePassPortType([FromBody] DeletePassportTypeInputDto portType) { return baseService.DeletePassPortType(portType); } - /// - /// 更新证件类型 - /// - /// - /// [HttpPost] - public bool UpdatePassPortType([FromBody] PassportType portType) + public BaseOutputDto UpdatePassPortType([FromBody] UpdatePassportTypeInputDto portType) { return baseService.UpdatePassPortType(portType); } @@ -472,82 +288,52 @@ namespace EOM.TSHotelManagement.WebApi.Controllers #region 奖惩类型模块 - /// - /// 查询所有奖惩类型(可用) - /// - /// [HttpGet] - public List SelectGBTypeAllCanUse() + public ListOutputDto SelectRewardPunishmentTypeAllCanUse() { - return baseService.SelectGBTypeAllCanUse(); + return baseService.SelectRewardPunishmentTypeAllCanUse(); } - /// - /// 查询所有奖惩类型 - /// - /// [HttpGet] - public List SelectGBTypeAll() + public ListOutputDto SelectRewardPunishmentTypeAll([FromQuery]ReadRewardPunishmentTypeInputDto readRewardPunishmentTypeInputDto) { - return baseService.SelectGBTypeAll(); + return baseService.SelectRewardPunishmentTypeAll(readRewardPunishmentTypeInputDto); } - /// - /// 根据奖惩类型ID查询类型名称 - /// - /// - /// [HttpGet] - public GBType SelectGBTypeByTypeId([FromQuery] GBType gBType) + public SingleOutputDto SelectRewardPunishmentTypeByTypeId([FromQuery] ReadRewardPunishmentTypeInputDto readRewardPunishmentTypeInputDto) { - return baseService.SelectGBTypeByTypeId(gBType); + return baseService.SelectRewardPunishmentTypeByTypeId(readRewardPunishmentTypeInputDto); } - /// - /// 添加奖惩类型 - /// - /// - /// [HttpPost] - public bool InsertGBType([FromBody] GBType gBType) + public BaseOutputDto InsertRewardPunishmentType([FromBody] CreateRewardPunishmentTypeInputDto createRewardPunishmentTypeInputDto) { - return baseService.InsertGBType(gBType); + return baseService.InsertRewardPunishmentType(createRewardPunishmentTypeInputDto); } - /// - /// 删除奖惩类型 - /// - /// - /// [HttpPost] - public bool DeleteGBType([FromBody] GBType gBType) + public BaseOutputDto DeleteRewardPunishmentType([FromBody] DeleteRewardPunishmentTypeInputDto deleteRewardPunishmentTypeInputDto) { - return baseService.DeleteGBType(gBType); + return baseService.DeleteRewardPunishmentType(deleteRewardPunishmentTypeInputDto); } - /// - /// 更新奖惩类型 - /// - /// - /// [HttpPost] - public bool UpdateGBType([FromBody] GBType gBType) + public BaseOutputDto UpdateRewardPunishmentType([FromBody] UpdateRewardPunishmentTypeInputDto updateRewardPunishmentTypeInputDto) { - return baseService.UpdateGBType(gBType); + return baseService.UpdateRewardPunishmentType(updateRewardPunishmentTypeInputDto); } #endregion #region URL模块 - /// - /// 基础URL - /// - /// + [HttpGet] - public SystemInformation GetBase() + public SingleOutputDto GetBase() { return baseService.GetBase(); } + #endregion } } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Zero/Menu/MenuController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Zero/Menu/MenuController.cs index eacb2d8..38f97af 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Zero/Menu/MenuController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Zero/Menu/MenuController.cs @@ -1,4 +1,5 @@ using EOM.TSHotelManagement.Application; +using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; @@ -24,9 +25,9 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public List SelectMenuAll() + public ListOutputDto SelectMenuAll(ReadMenuInputDto readMenuInputDto) { - return menuService.SelectMenuAll(); + return menuService.SelectMenuAll(readMenuInputDto); } /// @@ -46,7 +47,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool InsertMenu([FromBody]Menu menu) + public BaseOutputDto InsertMenu([FromBody]CreateMenuInputDto menu) { return menuService.InsertMenu(menu); } @@ -57,7 +58,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool UpdateMenu([FromBody] Menu menu) + public BaseOutputDto UpdateMenu([FromBody] UpdateMenuInputDto menu) { return menuService.UpdateMenu(menu); } @@ -68,7 +69,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool DeleteMenu([FromBody] Menu menu) + public BaseOutputDto DeleteMenu([FromBody] DeleteMenuInputDto menu) { return menuService.DeleteMenu(menu); } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Zero/Module/ModuleController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Zero/Module/ModuleController.cs index bc36a0f..1bb937b 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Zero/Module/ModuleController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Zero/Module/ModuleController.cs @@ -1,5 +1,6 @@ using EOM.TSHotelManagement.Application; using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Mvc; using System.Collections.Generic; @@ -10,15 +11,8 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// public class ModuleController : ControllerBase { - /// - /// 系统模块 - /// private readonly IAdminModuleZeroService adminModuleZeroService; - /// - /// - /// - /// public ModuleController(IAdminModuleZeroService adminModuleZeroService) { this.adminModuleZeroService = adminModuleZeroService; @@ -29,7 +23,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public List GetAllModule() + public ListOutputDto GetAllModule() { return adminModuleZeroService.GetAllModule(); } @@ -40,7 +34,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public List GetAllModuleByAdmin([FromBody] Administrator admin) + public ListOutputDto GetAllModuleByAdmin([FromBody] ReadModulePermissionInputDto admin) { return adminModuleZeroService.GetAllModuleByAdmin(admin); } @@ -51,7 +45,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool AddModuleZeroList([FromBody] List moduleZeros) + public BaseOutputDto AddModuleZeroList([FromBody] List moduleZeros) { return adminModuleZeroService.AddModuleZeroList(moduleZeros); } @@ -62,10 +56,10 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public bool DelModuleZeroList([FromBody] ModulePermission moduleZero) + public BaseOutputDto DelModuleZeroList([FromBody] DeleteModulePermissionInputDto moduleZero) { return adminModuleZeroService.DelModuleZeroList(moduleZero); } - } } + diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Zero/Notice/NoticeController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Zero/Notice/NoticeController.cs index e226f1a..ecd829d 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Zero/Notice/NoticeController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Zero/Notice/NoticeController.cs @@ -1,5 +1,6 @@ using EOM.TSHotelManagement.Application; using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Mvc; using System.Collections.Generic; @@ -10,15 +11,8 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// public class NoticeController : ControllerBase { - /// - /// 公告 - /// private readonly INoticeService noticeService; - /// - /// - /// - /// public NoticeController(INoticeService noticeService) { this.noticeService = noticeService; @@ -28,38 +22,37 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// 获取所有公告信息 /// + /// /// [HttpGet] - public List SelectNoticeAll() + public ListOutputDto SelectNoticeAll([FromQuery] ReadAppointmentNoticeInputDto inputDto) { - return noticeService.SelectNoticeAll(); + return noticeService.SelectNoticeAll(inputDto); } #endregion /// /// 查询公告 /// - /// + /// /// [HttpGet] - public AppointmentNotice SelectNoticeByNoticeNo([FromQuery] string noticeId) + public ReadAppointmentNoticeOutputDto SelectNoticeByNoticeNo([FromQuery] ReadAppointmentNoticeInputDto inputDto) { - return noticeService.SelectNoticeByNoticeNo(noticeId); + return noticeService.SelectNoticeByNoticeNo(inputDto); } #region 上传公告信息 /// /// 上传公告信息 /// - /// + /// /// [HttpPost] - public bool InsertNotice([FromBody] AppointmentNotice notice) + public BaseOutputDto InsertNotice([FromBody] CreateAppointmentNoticeInputDto inputDto) { - return noticeService.InsertNotice(notice); + return noticeService.InsertNotice(inputDto); } - #endregion - } -} +} \ No newline at end of file diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Zero/CheckInfo/CheckInfoController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Zero/SupervisionStatistics/SupervisionStatisticsController.cs similarity index 43% rename from EOM.TSHotelManagement.WebApi/Controllers/Zero/CheckInfo/CheckInfoController.cs rename to EOM.TSHotelManagement.WebApi/Controllers/Zero/SupervisionStatistics/SupervisionStatisticsController.cs index e5e2a76..19d06af 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Zero/CheckInfo/CheckInfoController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Zero/SupervisionStatistics/SupervisionStatisticsController.cs @@ -1,5 +1,6 @@ using EOM.TSHotelManagement.Application; using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Mvc; using System.Collections.Generic; @@ -8,18 +9,11 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// 监管统计控制器 /// - public class CheckInfoController : ControllerBase + public class SupervisionStatisticsController : ControllerBase { - /// - /// 监管统计 - /// - private readonly ICheckInfoService checkInfoService; + private readonly ISupervisionStatisticsService checkInfoService; - /// - /// - /// - /// - public CheckInfoController(ICheckInfoService checkInfoService) + public SupervisionStatisticsController(ISupervisionStatisticsService checkInfoService) { this.checkInfoService = checkInfoService; } @@ -27,44 +21,45 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// 查询所有监管统计信息 /// + /// /// [HttpGet] - public List SelectCheckInfoAll() + public ListOutputDto SelectSupervisionStatisticsAll([FromQuery] ReadSupervisionStatisticsInputDto inputDto) { - return checkInfoService.SelectCheckInfoAll(); + return checkInfoService.SelectSupervisionStatisticsAll(inputDto); } /// /// 插入监管统计信息 /// - /// + /// /// [HttpPost] - public bool InsertCheckInfo([FromBody]SupervisionStatistics checkInfo) + public BaseOutputDto InsertSupervisionStatistics([FromBody] CreateSupervisionStatisticsInputDto inputDto) { - return checkInfoService.InsertCheckInfo(checkInfo); + return checkInfoService.InsertSupervisionStatistics(inputDto); } /// /// 更新监管统计信息 /// - /// + /// /// [HttpPost] - public bool UpdateCheckInfo([FromBody]SupervisionStatistics checkInfo) + public BaseOutputDto UpdateSupervisionStatistics([FromBody] UpdateSupervisionStatisticsInputDto inputDto) { - return checkInfoService.UpdateCheckInfo(checkInfo); + return checkInfoService.UpdateSupervisionStatistics(inputDto); } /// /// 删除监管统计信息 /// - /// + /// /// [HttpPost] - public bool DeleteCheckInfo([FromBody] SupervisionStatistics checkInfo) + public BaseOutputDto DeleteSupervisionStatistics([FromBody] DeleteSupervisionStatisticsInputDto inputDto) { - return checkInfoService.DeleteCheckInfo(checkInfo); + return checkInfoService.DeleteSupervisionStatistics(inputDto); } } -} +} \ No newline at end of file diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Zero/VipRule/VipRuleController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Zero/VipRule/VipRuleController.cs index 21d7334..2f1627e 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Zero/VipRule/VipRuleController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Zero/VipRule/VipRuleController.cs @@ -1,5 +1,6 @@ using EOM.TSHotelManagement.Application; using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Mvc; using System.Collections.Generic; @@ -10,15 +11,8 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// public class VipRuleController : ControllerBase { - /// - /// 会员规则 - /// private readonly IVipRuleAppService vipRuleAppService; - /// - /// - /// - /// public VipRuleController(IVipRuleAppService vipRuleAppService) { this.vipRuleAppService = vipRuleAppService; @@ -27,55 +21,58 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// 查询会员等级规则列表 /// + /// /// [HttpGet] - public List SelectVipRuleList() + public ListOutputDto SelectVipRuleList([FromQuery] ReadVipLevelRuleInputDto inputDto) { - return vipRuleAppService.SelectVipRuleList(); + return vipRuleAppService.SelectVipRuleList(inputDto); } /// /// 查询会员等级规则 /// - /// + /// /// [HttpGet] - public VipLevelRule SelectVipRule([FromQuery] VipLevelRule vipRule) + public SingleOutputDto SelectVipRule([FromQuery] ReadVipLevelRuleInputDto inputDto) { - return vipRuleAppService.SelectVipRule(vipRule); + return vipRuleAppService.SelectVipRule(inputDto); } /// /// 添加会员等级规则 /// - /// + /// /// [HttpPost] - public bool AddVipRule([FromBody] VipLevelRule vipRule) + public BaseOutputDto AddVipRule([FromBody] CreateVipLevelRuleInputDto inputDto) { - return vipRuleAppService.AddVipRule(vipRule); + return vipRuleAppService.AddVipRule(inputDto); } /// /// 删除会员等级规则 /// - /// + /// /// [HttpPost] - public bool DelVipRule([FromBody] VipLevelRule vipRule) + public BaseOutputDto DelVipRule([FromBody] DeleteVipLevelRuleInputDto inputDto) { - return vipRuleAppService.DelVipRule(vipRule); + return vipRuleAppService.DelVipRule(inputDto); } /// /// 更新会员等级规则 /// - /// + /// /// [HttpPost] - public bool UpdVipRule([FromBody] VipLevelRule vipRule) + public BaseOutputDto UpdVipRule([FromBody] UpdateVipLevelRuleInputDto inputDto) { - return vipRuleAppService.UpdVipRule(vipRule); + return vipRuleAppService.UpdVipRule(inputDto); } } } + + -- Gitee From e128095f66c7fed7025adfec3f51bdd957aaf0c0 Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Sat, 15 Mar 2025 18:21:01 +0800 Subject: [PATCH 04/24] fix field name. --- .../Zero/Base/BaseService.cs | 14 ++++++++++++++ .../Employee/Dto/Employee/ReadEmployeeOutputDto.cs | 6 ++++++ .../Dto/Qualification/ReadEducationOutputDto.cs | 2 +- .../Employee/Employee.cs | 2 +- 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/EOM.TSHotelManagement.Application/Zero/Base/BaseService.cs b/EOM.TSHotelManagement.Application/Zero/Base/BaseService.cs index fa5bc6b..72aefab 100644 --- a/EOM.TSHotelManagement.Application/Zero/Base/BaseService.cs +++ b/EOM.TSHotelManagement.Application/Zero/Base/BaseService.cs @@ -469,6 +469,20 @@ namespace EOM.TSHotelManagement.Application } var count = 0; var depts = deptRepository.AsQueryable().Where(where.ToExpression()).ToPageList(readDepartmentInputDto.Page,readDepartmentInputDto.PageSize,ref count); + + var parentDepartmentNumbers = depts.Where(a => !a.ParentDepartmentNumber.IsNullOrEmpty()).Select(a => a.ParentDepartmentNumber).ToList(); + var parentDepartments = deptRepository.GetList(a => parentDepartmentNumbers.Contains(a.DepartmentNumber)); + var departmentLeaderNumbers = depts.Where(a => !a.DepartmentLeader.IsNullOrEmpty()).Select(a => a.DepartmentLeader).ToList(); + var departmentLeaders = workerRepository.GetList(a => departmentLeaderNumbers.Contains(a.EmployeeId)); + + depts.ForEach(source => + { + var parentDepartment = parentDepartments.SingleOrDefault(a => a.DepartmentNumber.Equals(source.ParentDepartmentNumber)); + source.ParentDepartmentName = parentDepartment.IsNullOrEmpty() ? "" : parentDepartment.DepartmentName; + + var departmentLeader = departmentLeaders.SingleOrDefault(a => a.EmployeeId.Equals(source.DepartmentLeader)); + source.LeaderName = departmentLeader.IsNullOrEmpty() ? "" : departmentLeader.EmployeeName; + }); var result = EntityMapper.MapList(depts); return new ListOutputDto { listSource = result, total = count }; } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs index 08d9be5..a521e05 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs @@ -11,15 +11,21 @@ namespace EOM.TSHotelManagement.Common.Contract public string EmployeeId { get; set; } public string EmployeeName { get; set; } public string Gender { get; set; } + public string GenderName { get; set; } public DateTime DateOfBirth { get; set; } public string Ethnicity { get; set; } + public string EthnicityName { get; set; } public string PhoneNumber { get; set; } public string Department { get; set; } + public string DepartmentName { get; set; } public string Address { get; set; } public string Position { get; set; } + public string PositionName { get; set; } public string IdCardNumber { get; set; } public DateTime HireDate { get; set; } public string PoliticalAffiliation { get; set; } + public string PoliticalAffiliationName { get; set; } public string EducationLevel { get; set; } + public string EducationLevelName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/ReadEducationOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/ReadEducationOutputDto.cs index 6bff94a..48bcc9c 100644 --- a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/ReadEducationOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/ReadEducationOutputDto.cs @@ -2,7 +2,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public class ReadEducationOutputDto { - public int EducationId { get; set; } + public string EducationNumber { get; set; } public string EducationName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/Employee/Employee.cs b/EOM.TSHotelManagement.Common.Core/Employee/Employee.cs index 9e6f52a..c2612dc 100644 --- a/EOM.TSHotelManagement.Common.Core/Employee/Employee.cs +++ b/EOM.TSHotelManagement.Common.Core/Employee/Employee.cs @@ -126,7 +126,7 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 员工密码 (Employee Password) /// - [SugarColumn(/*IsOnlyIgnoreInsert = true*/)] + [SugarColumn(ColumnName = "WorkerPwd")] public string Password { get; set; } /// -- Gitee From ca8d03f70c10dba7f9349d5c76858707e1208bed Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Sat, 22 Mar 2025 13:05:04 +0800 Subject: [PATCH 05/24] adjustment controller. --- .../Business/Asset/AssetService.cs | 9 +- .../Business/Asset/IAssetService.cs | 2 +- .../Business/Customer/CustomerService.cs | 22 ++- .../EnergyManagementService.cs | 6 +- .../Business/Reser/ReserService.cs | 12 +- .../Business/Room/IRoomService.cs | 4 +- .../Business/Room/RoomService.cs | 43 +++++- .../Business/Room/RoomTypeService.cs | 22 ++- .../Business/Sellthing/ISellService.cs | 2 - .../Business/Spend/ISpendService.cs | 2 +- .../Business/Spend/SpendService.cs | 25 +++- .../Employee/Check/EmployeeCheckService.cs | 41 +++++- .../Employee/Check/IEmployeeCheckService.cs | 6 +- .../Employee/EmployeeService.cs | 87 +++++++----- .../History/EmployeeHistoryService.cs | 4 +- .../History/IEmployeeHistoryService.cs | 4 +- .../IRewardPunishmentService.cs | 2 +- .../RewardPunishmentService.cs | 34 ++++- .../Util/UtilService.cs | 32 +++-- .../Zero/Administrator/AdminService.cs | 12 +- .../Zero/Base/BaseService.cs | 128 +++++++++++++++--- .../Zero/Base/IBaseService.cs | 2 +- .../BaseDto/ListInputDto.cs | 2 +- .../Room/Dto/Room/ReadRoomOutputDto.cs | 3 + .../Dto/RoomType/ReadRoomTypeOutputDto.cs | 3 +- .../Dto/Employee/ReadEmployeeInputDto.cs | 1 + .../Dto/Employee/ReadEmployeeOutputDto.cs | 10 +- .../Dto/Employee/UpdateEmployeeInputDto.cs | 1 + .../ReadEmployeeCheckOutputDto.cs | 3 +- .../ReadEmployeeHistoryOutputDto.cs | 9 +- .../ReadEmployeeRewardPunishmentOutputDto.cs | 9 +- .../OperationLog/ReadOperationLogInputDto.cs | 2 + .../Zero/Dto/PoliticalAffiliationDto.cs | 15 ++ ...ydroelectricity.cs => EnergyManagement.cs} | 0 .../Employee/Employee.cs | 6 + .../Zero/PoliticalAffiliation.cs | 30 ++++ .../EOM.TSHotelManagement.Common.Util.csproj | 4 - .../GenerateJWT/JWTHelper.cs | 7 +- .../Business/Asset/AssetController.cs | 2 +- .../Business/Room/RoomController.cs | 8 +- .../Business/Spend/SpendController.cs | 4 +- .../Employee/Check/EmployeeCheckController.cs | 10 +- .../History/EmployeeHistoryController.cs | 8 +- .../RewardPunishmentController.cs | 4 +- .../Controllers/Zero/Base/BaseController.cs | 2 +- 45 files changed, 469 insertions(+), 175 deletions(-) create mode 100644 EOM.TSHotelManagement.Common.Contract/Zero/Dto/PoliticalAffiliationDto.cs rename EOM.TSHotelManagement.Common.Core/Business/EnergyManagement/{Hydroelectricity.cs => EnergyManagement.cs} (100%) create mode 100644 EOM.TSHotelManagement.Common.Core/Zero/PoliticalAffiliation.cs diff --git a/EOM.TSHotelManagement.Application/Business/Asset/AssetService.cs b/EOM.TSHotelManagement.Application/Business/Asset/AssetService.cs index 87b4025..c039351 100644 --- a/EOM.TSHotelManagement.Application/Business/Asset/AssetService.cs +++ b/EOM.TSHotelManagement.Application/Business/Asset/AssetService.cs @@ -84,7 +84,7 @@ namespace EOM.TSHotelManagement.Application /// 查询资产信息 /// /// - public ListOutputDto SelectAssetInfoAll(ReadAssetInputDto asset) + public ListOutputDto SelectAssetInfoAll(ReadAssetInputDto asset) { //查询所有部门信息 List depts = new List(); @@ -93,15 +93,15 @@ namespace EOM.TSHotelManagement.Application List employees = new List(); employees = employeeRepository.GetList(a => a.IsDelete != 1); - ListOutputDto cs = new ListOutputDto(); + ListOutputDto cs = new ListOutputDto(); var where = Expressionable.Create(); int totalCount = 0; if (asset.Page != 0 && asset.PageSize != 0) { - cs.listSource = assetRepository.AsQueryable().Where(where.ToExpression()).OrderBy(a => a.AssetNumber) - .ToPageList((int)asset.Page, (int)asset.PageSize, ref totalCount); + cs.listSource = EntityMapper.MapList(assetRepository.AsQueryable().Where(where.ToExpression()).OrderBy(a => a.AssetNumber) + .ToPageList((int)asset.Page, (int)asset.PageSize, ref totalCount)); cs.total = totalCount; } @@ -115,6 +115,7 @@ namespace EOM.TSHotelManagement.Application source.AssetValueFormatted = source.AssetValue == 0 ? "" : Decimal.Parse(source.AssetValue.ToString()).ToString("#,##0.00").ToString(); }); + return cs; } diff --git a/EOM.TSHotelManagement.Application/Business/Asset/IAssetService.cs b/EOM.TSHotelManagement.Application/Business/Asset/IAssetService.cs index 66852f1..bb66f3e 100644 --- a/EOM.TSHotelManagement.Application/Business/Asset/IAssetService.cs +++ b/EOM.TSHotelManagement.Application/Business/Asset/IAssetService.cs @@ -42,7 +42,7 @@ namespace EOM.TSHotelManagement.Application /// 查询资产信息 /// /// - ListOutputDto SelectAssetInfoAll(ReadAssetInputDto asset); + ListOutputDto SelectAssetInfoAll(ReadAssetInputDto asset); /// /// 更新资产信息 diff --git a/EOM.TSHotelManagement.Application/Business/Customer/CustomerService.cs b/EOM.TSHotelManagement.Application/Business/Customer/CustomerService.cs index b8294c8..d2b0577 100644 --- a/EOM.TSHotelManagement.Application/Business/Customer/CustomerService.cs +++ b/EOM.TSHotelManagement.Application/Business/Customer/CustomerService.cs @@ -67,11 +67,6 @@ namespace EOM.TSHotelManagement.Application /// private readonly GenericRepository custoTypeRepository; - /// - /// 加密 - /// - private readonly jvncorelib.EncryptorLib.EncryptLib encrypt; - /// /// 数据保护 /// @@ -87,14 +82,13 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public CustomerService(GenericRepository custoRepository, GenericRepository spendRepository, GenericRepository sexTypeRepository, GenericRepository passPortTypeRepository, GenericRepository custoTypeRepository, EncryptLib encrypt, IDataProtectionProvider dataProtectionProvider) + public CustomerService(GenericRepository custoRepository, GenericRepository spendRepository, GenericRepository sexTypeRepository, GenericRepository passPortTypeRepository, GenericRepository custoTypeRepository, IDataProtectionProvider dataProtectionProvider) { this.custoRepository = custoRepository; this.spendRepository = spendRepository; this.sexTypeRepository = sexTypeRepository; this.passPortTypeRepository = passPortTypeRepository; this.custoTypeRepository = custoTypeRepository; - this.encrypt = encrypt; this.dataProtector = dataProtectionProvider.CreateProtector("CustomerInfoProtector"); } @@ -294,10 +288,10 @@ namespace EOM.TSHotelManagement.Application try { //解密身份证号码 - var sourceStr = source.PassportID.Contains('·') ? encrypt.Decryption(source.PassportID) : dataProtector.Unprotect(source.PassportID); + var sourceStr = dataProtector.Unprotect(source.PassportID); source.PassportID = sourceStr; //解密联系方式 - var sourceTelStr = source.CustomerPhoneNumber.Contains('·') ? encrypt.Decryption(source.CustomerPhoneNumber) : dataProtector.Unprotect(source.CustomerPhoneNumber); + var sourceTelStr = dataProtector.Unprotect(source.CustomerPhoneNumber); source.CustomerPhoneNumber = sourceTelStr; } catch (Exception) @@ -308,15 +302,15 @@ namespace EOM.TSHotelManagement.Application //性别类型 var sexType = sexTypes.FirstOrDefault(a => a.GenderId == source.CustomerGender); - var genderName = sexType?.GenderName ?? ""; + source.GenderName = sexType?.GenderName ?? ""; //证件类型 var passPortType = passPortTypes.FirstOrDefault(a => a.PassportId == source.PassportType); - var passportTypeName = passPortType?.PassportName ?? ""; + source.PassportTypeName = passPortType?.PassportName ?? ""; //客户类型 var custoType = custoTypes.FirstOrDefault(a => a.CustomerType == source.CustomerType); - var customerTypeName = custoType?.CustomerTypeName ?? ""; + source.CustomerTypeName = custoType?.CustomerTypeName ?? ""; }); oSelectCustoAllDto.listSource = customerOutputDtos; @@ -445,10 +439,10 @@ namespace EOM.TSHotelManagement.Application try { //解密身份证号码 - var sourceStr = customer.PassportID.Contains('·') ? encrypt.Decryption(customer.PassportID) : dataProtector.Unprotect(customer.PassportID); + var sourceStr = dataProtector.Unprotect(customer.PassportID); customer.PassportID = sourceStr; //解密联系方式 - var sourceTelStr = customer.CustomerPhoneNumber.Contains('·') ? encrypt.Decryption(customer.CustomerPhoneNumber) : dataProtector.Unprotect(customer.CustomerPhoneNumber); + var sourceTelStr = dataProtector.Unprotect(customer.CustomerPhoneNumber); customer.CustomerPhoneNumber = sourceTelStr; } catch (Exception) diff --git a/EOM.TSHotelManagement.Application/Business/EnergyManagement/EnergyManagementService.cs b/EOM.TSHotelManagement.Application/Business/EnergyManagement/EnergyManagementService.cs index 25f0d15..bb4610c 100644 --- a/EOM.TSHotelManagement.Application/Business/EnergyManagement/EnergyManagementService.cs +++ b/EOM.TSHotelManagement.Application/Business/EnergyManagement/EnergyManagementService.cs @@ -57,8 +57,6 @@ namespace EOM.TSHotelManagement.Application /// 符合条件的水电费信息列表 public ListOutputDto SelectEnergyManagementInfo(ReadEnergyManagementInputDto readEnergyManagementInputDto) { - var repository = wtiRepository; - var where = Expressionable.Create(); if (!string.IsNullOrEmpty(readEnergyManagementInputDto.RoomNo)) @@ -71,7 +69,7 @@ namespace EOM.TSHotelManagement.Application where = where.And(a => a.StartDate >= readEnergyManagementInputDto.UseDate.Value); } - if (!readEnergyManagementInputDto.EndDate.HasValue) + if (!readEnergyManagementInputDto.EndDate.IsNullOrEmpty()) { where = where.And(a => a.EndDate >= readEnergyManagementInputDto.EndDate.Value); } @@ -83,7 +81,7 @@ namespace EOM.TSHotelManagement.Application var count = 0; - var listSource = repository.AsQueryable() + var listSource = wtiRepository.AsQueryable() .Where(where.ToExpression()).ToPageList(readEnergyManagementInputDto.Page,readEnergyManagementInputDto.PageSize,ref count); var readEnergies = EntityMapper.MapList(listSource); diff --git a/EOM.TSHotelManagement.Application/Business/Reser/ReserService.cs b/EOM.TSHotelManagement.Application/Business/Reser/ReserService.cs index 5e4ae49..916af76 100644 --- a/EOM.TSHotelManagement.Application/Business/Reser/ReserService.cs +++ b/EOM.TSHotelManagement.Application/Business/Reser/ReserService.cs @@ -41,20 +41,14 @@ namespace EOM.TSHotelManagement.Application /// private readonly GenericRepository reserRepository; - /// - /// 加密 - /// - private readonly jvncorelib.EncryptorLib.EncryptLib encrypt; - /// /// 数据保护 /// private readonly IDataProtector dataProtector; - public ReserService(GenericRepository reserRepository, EncryptLib encrypt, IDataProtectionProvider dataProtectionProvider) + public ReserService(GenericRepository reserRepository, IDataProtectionProvider dataProtectionProvider) { this.reserRepository = reserRepository; - this.encrypt = encrypt; this.dataProtector = dataProtectionProvider.CreateProtector("ReserInfoProtector"); } @@ -79,7 +73,7 @@ namespace EOM.TSHotelManagement.Application try { //解密联系方式 - var sourceTelStr = source.ReservationPhoneNumber.Contains('·') ? encrypt.Decryption(source.ReservationPhoneNumber) : dataProtector.Unprotect(source.ReservationPhoneNumber); + var sourceTelStr = dataProtector.Unprotect(source.ReservationPhoneNumber); source.ReservationPhoneNumber = sourceTelStr; } catch (Exception) @@ -103,7 +97,7 @@ namespace EOM.TSHotelManagement.Application Reser res = null; res = reserRepository.GetSingle(a => a.ReservationRoomNumber == readReserInputDt.RoomNo && a.IsDelete != 1); //解密联系方式 - var sourceTelStr = res.ReservationPhoneNumber.Contains("·") ? encrypt.Decryption(res.ReservationPhoneNumber) : res.ReservationPhoneNumber; + var sourceTelStr = dataProtector.Unprotect(res.ReservationPhoneNumber); res.ReservationPhoneNumber = sourceTelStr; var outputReser = EntityMapper.Map(res); diff --git a/EOM.TSHotelManagement.Application/Business/Room/IRoomService.cs b/EOM.TSHotelManagement.Application/Business/Room/IRoomService.cs index 6663878..016a1d1 100644 --- a/EOM.TSHotelManagement.Application/Business/Room/IRoomService.cs +++ b/EOM.TSHotelManagement.Application/Business/Room/IRoomService.cs @@ -53,7 +53,7 @@ namespace EOM.TSHotelManagement.Application /// 获取所有房间信息 /// /// - ListOutputDto SelectRoomAll(); + ListOutputDto SelectRoomAll(ReadRoomInputDto readRoomInputDto); #endregion #region 获取房间分区的信息 @@ -206,7 +206,7 @@ namespace EOM.TSHotelManagement.Application /// 获取所有房间状态 /// /// - ListOutputDto SelectRoomStateAll(); + ListOutputDto SelectRoomStateAll(ReadRoomStateInputDto readRoomStateInputDto); #endregion #region 根据房间编号查询房间状态编号 diff --git a/EOM.TSHotelManagement.Application/Business/Room/RoomService.cs b/EOM.TSHotelManagement.Application/Business/Room/RoomService.cs index d20ea09..b08647f 100644 --- a/EOM.TSHotelManagement.Application/Business/Room/RoomService.cs +++ b/EOM.TSHotelManagement.Application/Business/Room/RoomService.cs @@ -27,6 +27,7 @@ using EOM.TSHotelManagement.Common.Util; using EOM.TSHotelManagement.EntityFramework; using jvncorelib.EntityLib; using NPOI.SS.Formula.Functions; +using SqlSugar; namespace EOM.TSHotelManagement.Application { @@ -130,17 +131,33 @@ namespace EOM.TSHotelManagement.Application /// 获取所有房间信息 /// /// - public ListOutputDto SelectRoomAll() + public ListOutputDto SelectRoomAll(ReadRoomInputDto readRoomInputDto) { + var where = Expressionable.Create(); + + where = where.And(a => a.IsDelete == readRoomInputDto.IsDelete); + List roomStates = new List(); roomStates = roomStateRepository.GetList(); List roomTypes = new List(); roomTypes = roomTypeRepository.GetList(); List rooms = new List(); - rooms = roomRepository.GetList(a => a.IsDelete != 1).OrderBy(a => a.RoomNumber).ToList(); + + var count = 0; + + if (!readRoomInputDto.IgnorePaging && readRoomInputDto.Page != 0 && readRoomInputDto.PageSize != 0) + { + rooms = roomRepository.AsQueryable().Where(where.ToExpression()).OrderBy(a => a.RoomNumber).ToPageList(readRoomInputDto.Page,readRoomInputDto.PageSize,ref count); + } + else + { + rooms = roomRepository.GetList(a => a.IsDelete != 1).OrderBy(a => a.RoomNumber).ToList(); + } + var listCustoNo = rooms.Select(a => a.CustomerNumber).Distinct().ToList(); List custos = new List(); custos = custoRepository.GetList(a => listCustoNo.Contains(a.CustomerNumber)); + rooms.ForEach(source => { var roomState = roomStates.FirstOrDefault(a => a.RoomStateId == source.RoomStateId); @@ -158,7 +175,7 @@ namespace EOM.TSHotelManagement.Application }); var listSource = EntityMapper.MapList(rooms); - return new ListOutputDto { listSource = listSource }; + return new ListOutputDto { listSource = listSource,total = count }; } #endregion @@ -507,14 +524,28 @@ namespace EOM.TSHotelManagement.Application /// 获取所有房间状态 /// /// - public ListOutputDto SelectRoomStateAll() + public ListOutputDto SelectRoomStateAll(ReadRoomStateInputDto readRoomStateInputDto) { + var where = Expressionable.Create(); + + where = where.And(a => a.IsDelete == 0); + List rs = new List(); - rs = roomStateRepository.GetList(a => a.IsDelete != 1); + + var count = 0; + + if (!readRoomStateInputDto.IgnorePaging && readRoomStateInputDto.Page != 0 && readRoomStateInputDto.PageSize != 0) + { + rs = roomStateRepository.AsQueryable().Where(where.ToExpression()).ToPageList(readRoomStateInputDto.Page, readRoomStateInputDto.PageSize, ref count); + } + else + { + rs = roomStateRepository.AsQueryable().Where(where.ToExpression()).ToList(); + } var listSource = EntityMapper.MapList(rs); - return new ListOutputDto { listSource = listSource }; + return new ListOutputDto { listSource = listSource,total = count }; } #endregion diff --git a/EOM.TSHotelManagement.Application/Business/Room/RoomTypeService.cs b/EOM.TSHotelManagement.Application/Business/Room/RoomTypeService.cs index 9eff6e9..3bb7dd1 100644 --- a/EOM.TSHotelManagement.Application/Business/Room/RoomTypeService.cs +++ b/EOM.TSHotelManagement.Application/Business/Room/RoomTypeService.cs @@ -26,6 +26,8 @@ using EOM.TSHotelManagement.Common.Core; using EOM.TSHotelManagement.Common.Util; using EOM.TSHotelManagement.EntityFramework; using jvncorelib.EntityLib; +using NPOI.SS.Formula.Functions; +using SqlSugar; namespace EOM.TSHotelManagement.Application { @@ -62,13 +64,29 @@ namespace EOM.TSHotelManagement.Application /// public ListOutputDto SelectRoomTypesAll(ReadRoomTypeInputDto readRoomTypeInputDto) { + var where = Expressionable.Create(); + + where = where.And(a => a.IsDelete == 0); + List types = new List(); + if (!readRoomTypeInputDto.IsDelete.IsNullOrEmpty()) { - types = roomTypeRepository.GetList(a => a.IsDelete == readRoomTypeInputDto.IsDelete); + where = where.And(a => a.IsDelete == readRoomTypeInputDto.IsDelete); + + } + var count = 0; + + if (!readRoomTypeInputDto.IgnorePaging && readRoomTypeInputDto.Page != 0 && readRoomTypeInputDto.PageSize != 0) + { + types = roomTypeRepository.AsQueryable().Where(where.ToExpression()).ToPageList(readRoomTypeInputDto.Page, readRoomTypeInputDto.PageSize, ref count); } - types = roomTypeRepository.GetList(); + else + { + types = roomTypeRepository.AsQueryable().Where(where.ToExpression()).ToList(); + } + types.ForEach(t => { t.DeleteMarkDescription = t.IsDelete == 0 ? "否" : "是"; diff --git a/EOM.TSHotelManagement.Application/Business/Sellthing/ISellService.cs b/EOM.TSHotelManagement.Application/Business/Sellthing/ISellService.cs index 5e9e868..a2904a1 100644 --- a/EOM.TSHotelManagement.Application/Business/Sellthing/ISellService.cs +++ b/EOM.TSHotelManagement.Application/Business/Sellthing/ISellService.cs @@ -85,13 +85,11 @@ namespace EOM.TSHotelManagement.Application /// ReadSellThingOutputDto SelectSellInfoBySellNo(ReadSellThingInputDto readSellThingInputDto); - #region 添加商品 /// /// 添加商品 /// /// /// BaseOutputDto InsertSellThing(CreateSellThingInputDto st); - #endregion } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Application/Business/Spend/ISpendService.cs b/EOM.TSHotelManagement.Application/Business/Spend/ISpendService.cs index aa697fd..ddeb7d7 100644 --- a/EOM.TSHotelManagement.Application/Business/Spend/ISpendService.cs +++ b/EOM.TSHotelManagement.Application/Business/Spend/ISpendService.cs @@ -72,7 +72,7 @@ namespace EOM.TSHotelManagement.Application /// 查询消费的所有信息 /// /// - ListOutputDto SelectSpendInfoAll(); + ListOutputDto SelectSpendInfoAll(ReadSpendInputDto readSpendInputDto); #endregion #region 根据房间号查询消费的所有信息 diff --git a/EOM.TSHotelManagement.Application/Business/Spend/SpendService.cs b/EOM.TSHotelManagement.Application/Business/Spend/SpendService.cs index dbe1e46..788ce9d 100644 --- a/EOM.TSHotelManagement.Application/Business/Spend/SpendService.cs +++ b/EOM.TSHotelManagement.Application/Business/Spend/SpendService.cs @@ -27,6 +27,7 @@ using jvncorelib.EntityLib; using EOM.TSHotelManagement.Shared; using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Util; +using SqlSugar; namespace EOM.TSHotelManagement.Application { @@ -158,10 +159,28 @@ namespace EOM.TSHotelManagement.Application /// 查询消费的所有信息 /// /// - public ListOutputDto SelectSpendInfoAll() + public ListOutputDto SelectSpendInfoAll(ReadSpendInputDto readSpendInputDto) { + var where = Expressionable.Create(); + + if (!readSpendInputDto.IsDelete.IsNullOrEmpty()) + { + where = where.And(a => a.IsDelete == readSpendInputDto.IsDelete); + } + List ls = new List(); - ls = spendRepository.GetList(a => a.IsDelete != 1).OrderByDescending(a => a.ConsumptionTime).ToList(); + + var count = 0; + + if (!readSpendInputDto.IgnorePaging && readSpendInputDto.Page != 0 && readSpendInputDto.PageSize != 0) + { + ls = spendRepository.AsQueryable().Where(where.ToExpression()).OrderByDescending(a => a.ConsumptionTime).ToPageList(readSpendInputDto.Page, readSpendInputDto.PageSize, ref count); + } + else + { + ls = spendRepository.AsQueryable().Where(where.ToExpression()).OrderByDescending(a => a.ConsumptionTime).ToList(); + } + ls.ForEach(source => { source.SettlementStatusDescription = source.SettlementStatus.IsNullOrEmpty() ? "" @@ -176,7 +195,7 @@ namespace EOM.TSHotelManagement.Application var listSource = EntityMapper.MapList(ls); - return new ListOutputDto { listSource = listSource }; + return new ListOutputDto { listSource = listSource, total = count }; } #endregion diff --git a/EOM.TSHotelManagement.Application/Employee/Check/EmployeeCheckService.cs b/EOM.TSHotelManagement.Application/Employee/Check/EmployeeCheckService.cs index e9342e3..bd6c58e 100644 --- a/EOM.TSHotelManagement.Application/Employee/Check/EmployeeCheckService.cs +++ b/EOM.TSHotelManagement.Application/Employee/Check/EmployeeCheckService.cs @@ -25,6 +25,8 @@ using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; using EOM.TSHotelManagement.Common.Util; using EOM.TSHotelManagement.EntityFramework; +using jvncorelib.EntityLib; +using SqlSugar; namespace EOM.TSHotelManagement.Application { @@ -52,10 +54,37 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public ListOutputDto SelectCheckInfoByWorkerNo(ReadEmployeeCheckInputDto wid) + public ListOutputDto SelectCheckInfoByEmployeeId(ReadEmployeeCheckInputDto wid) { List workerChecks = new List(); - workerChecks = workerCheckRepository.GetList(a => a.EmployeeId == wid.EmployeeId && a.IsDelete != 1); + + var where = Expressionable.Create(); + + if (!wid.EmployeeId.IsNullOrEmpty()) + { + where = where.And(a => a.EmployeeId == wid.EmployeeId); + } + + if (!wid.IsDelete.IsNullOrEmpty()) + { + where = where.And(a => a.IsDelete == wid.IsDelete); + } + + var count = 0; + + if (wid.Page != 0 && wid.PageSize != 0) + { + workerChecks = workerCheckRepository.AsQueryable().Where(where.ToExpression()) + .OrderByDescending(a => a.CheckTime) + .ToPageList(wid.Page, wid.PageSize, ref count); + } + else + { + workerChecks = workerCheckRepository.AsQueryable().Where(where.ToExpression()) + .OrderByDescending(a => a.CheckTime) + .ToList(); + } + workerChecks.ForEach(source => { source.CheckStatusDescription = source.CheckStatus == 0 ? "打卡成功" : "打卡失败"; @@ -65,7 +94,7 @@ namespace EOM.TSHotelManagement.Application return new ListOutputDto { listSource = source, - total = source.Count + total = count }; } @@ -75,7 +104,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public object SelectWorkerCheckDaySumByWorkerNo(ReadEmployeeCheckInputDto wkn) + public int SelectWorkerCheckDaySumByEmployeeId(ReadEmployeeCheckInputDto wkn) { return workerCheckRepository.GetList(a => a.EmployeeId == wkn.EmployeeId && a.IsDelete != 1).Count; } @@ -86,11 +115,11 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public object SelectToDayCheckInfoByWorkerNo(ReadEmployeeCheckInputDto wkn) + public bool SelectToDayCheckInfoByWorkerNo(ReadEmployeeCheckInputDto wkn) { //string sql = "select Count(*) from WORKERCHECK where WorkerNo = '"+wkn+ "' and DATEDIFF(CURRENT_DATE(),workercheck.CheckTime)"; var listCheckInfo = workerCheckRepository.GetList(a => a.EmployeeId == wkn.EmployeeId && a.IsDelete != 1); - var count = listCheckInfo.Where(a => a.CheckTime.ToShortDateString() == Convert.ToDateTime(DateTime.Now).ToShortDateString()).Count() > 0 ? 1 : 0; + var count = listCheckInfo.Where(a => a.CheckTime.ToShortDateString() == Convert.ToDateTime(DateTime.Now).ToShortDateString()).Count() > 0 ? true : false; return count; } diff --git a/EOM.TSHotelManagement.Application/Employee/Check/IEmployeeCheckService.cs b/EOM.TSHotelManagement.Application/Employee/Check/IEmployeeCheckService.cs index ff61992..1de4083 100644 --- a/EOM.TSHotelManagement.Application/Employee/Check/IEmployeeCheckService.cs +++ b/EOM.TSHotelManagement.Application/Employee/Check/IEmployeeCheckService.cs @@ -36,21 +36,21 @@ namespace EOM.TSHotelManagement.Application /// /// /// - ListOutputDto SelectCheckInfoByWorkerNo(ReadEmployeeCheckInputDto wid); + ListOutputDto SelectCheckInfoByEmployeeId(ReadEmployeeCheckInputDto wid); /// /// 查询员工签到天数 /// /// /// - object SelectWorkerCheckDaySumByWorkerNo(ReadEmployeeCheckInputDto wkn); + int SelectWorkerCheckDaySumByEmployeeId(ReadEmployeeCheckInputDto wkn); /// /// 查询今天员工是否已签到 /// /// /// - object SelectToDayCheckInfoByWorkerNo(ReadEmployeeCheckInputDto wkn); + bool SelectToDayCheckInfoByWorkerNo(ReadEmployeeCheckInputDto wkn); /// /// 添加员工打卡数据 diff --git a/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs b/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs index 6c7c0f1..3c68f52 100644 --- a/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs +++ b/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs @@ -21,6 +21,7 @@ *SOFTWARE. * */ +using EOM.TSHotelManagement.Common; using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; using EOM.TSHotelManagement.Common.Util; @@ -32,7 +33,9 @@ using Microsoft.AspNetCore.DataProtection; using Microsoft.IdentityModel.Tokens; using SqlSugar; using SqlSugar.DistributedSystem.Snowflake; +using System.ComponentModel; using System.IdentityModel.Tokens.Jwt; +using System.Reflection; using System.Security.Claims; using System.Text; @@ -50,10 +53,8 @@ namespace EOM.TSHotelManagement.Application /// /// /// - /// - /// /// - public class EmployeeService(GenericRepository workerRepository, GenericRepository sexTypeRepository, GenericRepository educationRepository, GenericRepository nationRepository, GenericRepository deptRepository, GenericRepository positionRepository, EncryptLib encrypt, IJwtConfigFactory jwtConfigFactory, IDataProtectionProvider dataProtectionProvider) : IEmployeeService + public class EmployeeService(GenericRepository workerRepository, GenericRepository sexTypeRepository, GenericRepository educationRepository, GenericRepository nationRepository, GenericRepository deptRepository, GenericRepository positionRepository, IDataProtectionProvider dataProtectionProvider) : IEmployeeService { /// /// 员工信息 @@ -85,11 +86,6 @@ namespace EOM.TSHotelManagement.Application /// private readonly GenericRepository positionRepository = positionRepository; - /// - /// 加密 - /// - private readonly jvncorelib.EncryptorLib.EncryptLib encrypt = encrypt; - /// /// 数据保护 /// @@ -98,8 +94,8 @@ namespace EOM.TSHotelManagement.Application /// /// JWT加密 /// - private readonly IJwtConfigFactory _jwtConfigFactory = jwtConfigFactory; - + private readonly JWTHelper jWTHelper; + /// /// 修改员工信息 /// @@ -157,7 +153,7 @@ namespace EOM.TSHotelManagement.Application { workerRepository.Update(a => new Employee() { - IsDelete = updateEmployeeInputDto.IsDelete + IsEnable = updateEmployeeInputDto.IsEnable, }, a => a.EmployeeId == updateEmployeeInputDto.EmployeeId); } catch (Exception ex) @@ -255,16 +251,28 @@ namespace EOM.TSHotelManagement.Application var count = 0; - employees = workerRepository.AsQueryable().Where(where.ToExpression()).ToPageList(readEmployeeInputDto.Page, readEmployeeInputDto.PageSize,ref count); + if (!readEmployeeInputDto.IgnorePaging && readEmployeeInputDto.Page != 0 && readEmployeeInputDto.PageSize != 0) + { + employees = workerRepository.AsQueryable().Where(where.ToExpression()) + .OrderBy(a => a.EmployeeId) + .ToPageList(readEmployeeInputDto.Page, readEmployeeInputDto.PageSize, ref count); + } + else + { + employees = workerRepository.AsQueryable().Where(where.ToExpression()) + .OrderBy(a => a.EmployeeId) + .ToList(); + } + employees.ForEach(source => { try { //解密身份证号码 - var sourceStr = source.IdCardNumber.Contains('·') ? encrypt.Decryption(source.IdCardNumber) : dataProtector.Unprotect(source.IdCardNumber); + var sourceStr = dataProtector.Unprotect(source.IdCardNumber); source.IdCardNumber = sourceStr; //解密联系方式 - var sourceTelStr = source.PhoneNumber.Contains('·') ? encrypt.Decryption(source.PhoneNumber) : dataProtector.Unprotect(source.PhoneNumber); + var sourceTelStr = dataProtector.Unprotect(source.PhoneNumber); source.PhoneNumber = sourceTelStr; } catch (Exception) @@ -287,6 +295,8 @@ namespace EOM.TSHotelManagement.Application //职位 var position = positions.FirstOrDefault(a => a.PositionNumber == source.Position); source.PositionName = position.IsNullOrEmpty() ? "" : position.PositionName; + //面貌 + source.PoliticalAffiliationName = GetDescriptionByName(source.PoliticalAffiliation); }); var listSource = EntityMapper.MapList(employees); @@ -316,10 +326,10 @@ namespace EOM.TSHotelManagement.Application Employee w = new Employee(); w = workerRepository.GetSingle(a => a.EmployeeId == readEmployeeInputDto.EmployeeId); //解密身份证号码 - var sourceStr = w.IdCardNumber.Contains("·") ? encrypt.Decryption(w.IdCardNumber) : w.IdCardNumber; + var sourceStr = w.IdCardNumber.IsNullOrEmpty() ? "" : dataProtector.Unprotect(w.IdCardNumber); w.IdCardNumber = sourceStr; //解密联系方式 - var sourceTelStr = w.PhoneNumber.Contains("·") ? encrypt.Decryption(w.PhoneNumber) : w.PhoneNumber; + var sourceTelStr = w.PhoneNumber.IsNullOrEmpty() ? "" : dataProtector.Unprotect(w.PhoneNumber); w.PhoneNumber = sourceTelStr; //性别类型 var sexType = sexTypeRepository.GetSingle(a => a.GenderId == w.Gender); @@ -336,6 +346,8 @@ namespace EOM.TSHotelManagement.Application //职位 var position = positionRepository.GetSingle(a => a.PositionNumber == w.Position); w.PositionName = position.PositionName.IsNullOrEmpty() ? "" : position.PositionName; + //面貌 + w.PoliticalAffiliationName = GetDescriptionByName(w.PoliticalAffiliation); var source = EntityMapper.Map(w); @@ -357,10 +369,9 @@ namespace EOM.TSHotelManagement.Application return new SingleOutputDto { Source = null }; } - var frontEncryed = encrypt.Encryption(w.Password, EncryptionLevel.Enhanced); - var backEncryed = encrypt.Encryption(w.Password, EncryptionLevel.Enhanced); + var dbPwd = dataProtector.Unprotect(w.Password); - if (!encrypt.Compare(frontEncryed, backEncryed)) + if (dbPwd != readEmployeeInputDto.Password) { w = null; return new SingleOutputDto { Source = EntityMapper.Map(w) }; @@ -382,24 +393,7 @@ namespace EOM.TSHotelManagement.Application var position = positionRepository.GetSingle(a => a.PositionNumber == w.Position); w.PositionName = position.PositionName.IsNullOrEmpty() ? "" : position.PositionName; - //附带Token - var jwtConfig = _jwtConfigFactory.GetJwtConfig(); - var tokenHandler = new JwtSecurityTokenHandler(); - var key = Encoding.UTF8.GetBytes(jwtConfig.Key); - var tokenDescriptor = new SecurityTokenDescriptor - { - Subject = new ClaimsIdentity(new Claim[] - { - new Claim(ClaimTypes.Name, w.EmployeeId) - }), - Expires = DateTime.Now.AddMinutes(jwtConfig.ExpiryMinutes), - SigningCredentials = new SigningCredentials(new SymmetricSecurityKey(key), SecurityAlgorithms.HmacSha256Signature), - Audience = jwtConfig.Audience, - Issuer = jwtConfig.Issuer - }; - - var token = tokenHandler.CreateToken(tokenDescriptor); - w.UserToken = tokenHandler.WriteToken(token); + w.UserToken = jWTHelper.GenerateJWT(new ClaimsIdentity(new List { new Claim(ClaimTypes.Name, w.EmployeeName), new Claim(ClaimTypes.SerialNumber, w.EmployeeId) })); return new SingleOutputDto { Source = EntityMapper.Map(w) }; } @@ -429,5 +423,24 @@ namespace EOM.TSHotelManagement.Application return new BaseOutputDto(); } + public static string GetDescriptionByName(string enumName) + { + Type enumType = typeof(PoliticalAffiliation); + + if (!Enum.IsDefined(enumType, enumName)) + { + return null; + } + + FieldInfo field = enumType.GetField(enumName); + DescriptionAttribute attribute = field? + .GetCustomAttributes(typeof(DescriptionAttribute), false) + .FirstOrDefault() as DescriptionAttribute; + + string description = attribute?.Description ?? enumName; + + return description; + } + } } diff --git a/EOM.TSHotelManagement.Application/Employee/History/EmployeeHistoryService.cs b/EOM.TSHotelManagement.Application/Employee/History/EmployeeHistoryService.cs index 440b293..a6c7d0f 100644 --- a/EOM.TSHotelManagement.Application/Employee/History/EmployeeHistoryService.cs +++ b/EOM.TSHotelManagement.Application/Employee/History/EmployeeHistoryService.cs @@ -52,7 +52,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public BaseOutputDto AddHistoryByWorkerId(CreateEmployeeHistoryInputDto workerHistory) + public BaseOutputDto AddHistoryByEmployeeId(CreateEmployeeHistoryInputDto workerHistory) { try { @@ -70,7 +70,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public ListOutputDto SelectHistoryByWorkerId(ReadEmployeeHistoryInputDto wid) + public ListOutputDto SelectHistoryByEmployeeId(ReadEmployeeHistoryInputDto wid) { List why = new List(); why = workerHistoryRepository.GetList(a => a.IsDelete != 1 && a.EmployeeId == wid.EmployeeId); diff --git a/EOM.TSHotelManagement.Application/Employee/History/IEmployeeHistoryService.cs b/EOM.TSHotelManagement.Application/Employee/History/IEmployeeHistoryService.cs index 3095353..380a8b5 100644 --- a/EOM.TSHotelManagement.Application/Employee/History/IEmployeeHistoryService.cs +++ b/EOM.TSHotelManagement.Application/Employee/History/IEmployeeHistoryService.cs @@ -35,13 +35,13 @@ namespace EOM.TSHotelManagement.Application /// /// /// - BaseOutputDto AddHistoryByWorkerId(CreateEmployeeHistoryInputDto workerHistory); + BaseOutputDto AddHistoryByEmployeeId(CreateEmployeeHistoryInputDto workerHistory); /// /// 根据工号查询履历信息 /// /// /// - ListOutputDto SelectHistoryByWorkerId(ReadEmployeeHistoryInputDto wid); + ListOutputDto SelectHistoryByEmployeeId(ReadEmployeeHistoryInputDto wid); } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Application/Employee/RewardPunishment/IRewardPunishmentService.cs b/EOM.TSHotelManagement.Application/Employee/RewardPunishment/IRewardPunishmentService.cs index 2541f97..8ab8a00 100644 --- a/EOM.TSHotelManagement.Application/Employee/RewardPunishment/IRewardPunishmentService.cs +++ b/EOM.TSHotelManagement.Application/Employee/RewardPunishment/IRewardPunishmentService.cs @@ -42,6 +42,6 @@ namespace EOM.TSHotelManagement.Application /// /// /// - ListOutputDto SelectAllRewardPunishmentByWorkNo(ReadEmployeeRewardPunishmentInputDto wn); + ListOutputDto SelectAllRewardPunishmentByEmployeeId(ReadEmployeeRewardPunishmentInputDto wn); } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Application/Employee/RewardPunishment/RewardPunishmentService.cs b/EOM.TSHotelManagement.Application/Employee/RewardPunishment/RewardPunishmentService.cs index e75a079..9722262 100644 --- a/EOM.TSHotelManagement.Application/Employee/RewardPunishment/RewardPunishmentService.cs +++ b/EOM.TSHotelManagement.Application/Employee/RewardPunishment/RewardPunishmentService.cs @@ -26,6 +26,7 @@ using EOM.TSHotelManagement.Common.Core; using EOM.TSHotelManagement.Common.Util; using EOM.TSHotelManagement.EntityFramework; using jvncorelib.EntityLib; +using SqlSugar; namespace EOM.TSHotelManagement.Application { @@ -85,15 +86,42 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public ListOutputDto SelectAllRewardPunishmentByWorkNo(ReadEmployeeRewardPunishmentInputDto wn) + public ListOutputDto SelectAllRewardPunishmentByEmployeeId(ReadEmployeeRewardPunishmentInputDto wn) { + var where = Expressionable.Create(); + + if (!wn.EmployeeId.IsNullOrEmpty()) + { + where = where.And(a => a.EmployeeId == wn.EmployeeId); + } + + if (!wn.IsDelete.IsNullOrEmpty()) + { + where = where.And(a => a.IsDelete == wn.IsDelete); + } + //查询所有超级管理员 List admins = new List(); admins = adminRepository.GetList(a => a.IsDelete != 1); List gBTypes = new List(); gBTypes = goodbadTypeRepository.GetList(a => a.IsDelete != 1); List gb = new List(); - gb = rewardPunishmentRepository.GetList(a => a.EmployeeId == wn.EmployeeId); + + var count = 0; + + if (wn.Page != 0 && wn.PageSize != 0) + { + gb = rewardPunishmentRepository.AsQueryable().Where(where.ToExpression()) + .OrderByDescending(a => a.RewardPunishmentTime) + .ToPageList(wn.Page, wn.PageSize, ref count); + } + else + { + gb = rewardPunishmentRepository.AsQueryable().Where(where.ToExpression()) + .OrderByDescending(a => a.RewardPunishmentTime) + .ToList(); + } + gb.ForEach(source => { //奖惩类型 @@ -107,7 +135,7 @@ namespace EOM.TSHotelManagement.Application return new ListOutputDto { - listSource = EntityMapper.Map, List>(gb), + listSource = EntityMapper.MapList(gb), total = gb.Count }; } diff --git a/EOM.TSHotelManagement.Application/Util/UtilService.cs b/EOM.TSHotelManagement.Application/Util/UtilService.cs index 19221b9..1c66d3d 100644 --- a/EOM.TSHotelManagement.Application/Util/UtilService.cs +++ b/EOM.TSHotelManagement.Application/Util/UtilService.cs @@ -2,6 +2,8 @@ using EOM.TSHotelManagement.Common.Core; using EOM.TSHotelManagement.Common.Util; using EOM.TSHotelManagement.EntityFramework; +using jvncorelib.EntityLib; +using SqlSugar; namespace EOM.TSHotelManagement.Application { @@ -87,26 +89,40 @@ namespace EOM.TSHotelManagement.Application /// public ListOutputDto SelectOperationlogAll(ReadOperationLogInputDto readOperationLogInputDto) { - ListOutputDto operationLogs = new ListOutputDto(); + List operationLogs = new List(); + + var where = Expressionable.Create(); + + if (!readOperationLogInputDto.IsDelete.IsNullOrEmpty()) + { + where = where.And(a => a.IsDelete == readOperationLogInputDto.IsDelete); + } + if (!readOperationLogInputDto.LogLevel.IsNullOrEmpty()) + { + if (readOperationLogInputDto.LogLevel.HasValue) + { + where = where.And(a => a.LogLevel == (LogLevel)readOperationLogInputDto.LogLevel.Value); + } + } + var count = 0; if (readOperationLogInputDto.Page != 0 && readOperationLogInputDto.PageSize != 0) { - operationLogs.listSource = operationLogRepository.AsQueryable().OrderByDescending(a => a.OperationTime).ToPageList(readOperationLogInputDto.Page, readOperationLogInputDto.PageSize, ref count); + operationLogs = operationLogRepository.AsQueryable().Where(where.ToExpression()).OrderByDescending(a => a.OperationTime).ToPageList(readOperationLogInputDto.Page, readOperationLogInputDto.PageSize, ref count); } else { - operationLogs.listSource = operationLogRepository.AsQueryable().OrderByDescending(a => a.OperationTime).ToList(); + operationLogs = operationLogRepository.AsQueryable().Where(where.ToExpression()).OrderByDescending(a => a.OperationTime).ToList(); } - operationLogs.listSource.ForEach(source => + operationLogs.ForEach(source => { - source.LogLevelName = source.LogLevel == LogLevel.Normal ? "常规操作" : source.LogLevel == LogLevel.Warning ? "敏感操作" : "严重操作"; + source.LogLevelName = source.LogLevel == LogLevel.Normal ? LocalizationHelper.GetLocalizedString("INFO","常规操作") : source.LogLevel == LogLevel.Warning ? LocalizationHelper.GetLocalizedString("WARNING","敏感操作") : LocalizationHelper.GetLocalizedString("ERROR","严重操作"); }); - operationLogs.total = count; - var listSource = EntityMapper.MapList(operationLogs.listSource); + var listSource = EntityMapper.MapList(operationLogs); - return new ListOutputDto { listSource = listSource, total = operationLogs.total }; + return new ListOutputDto { listSource = listSource, total = count }; } } diff --git a/EOM.TSHotelManagement.Application/Zero/Administrator/AdminService.cs b/EOM.TSHotelManagement.Application/Zero/Administrator/AdminService.cs index 84223d3..9e26934 100644 --- a/EOM.TSHotelManagement.Application/Zero/Administrator/AdminService.cs +++ b/EOM.TSHotelManagement.Application/Zero/Administrator/AdminService.cs @@ -117,7 +117,11 @@ namespace EOM.TSHotelManagement.Application existingAdmin.Password = string.Empty; - existingAdmin.UserToken = jWTHelper.GenerateJWT(readAdministratorInputDto.Name); + existingAdmin.UserToken = jWTHelper.GenerateJWT(new ClaimsIdentity(new Claim[] + { + new Claim(ClaimTypes.Name, existingAdmin.Name), + new Claim(ClaimTypes.SerialNumber, existingAdmin.Account) + })); var source = EntityMapper.Map(existingAdmin); @@ -165,7 +169,11 @@ namespace EOM.TSHotelManagement.Application } existingAdmin.Password = string.Empty; - existingAdmin.UserToken = jWTHelper.GenerateJWT(readAdministratorInputDto.Account); + existingAdmin.UserToken = jWTHelper.GenerateJWT(new ClaimsIdentity(new Claim[] + { + new Claim(ClaimTypes.Name, existingAdmin.Name), + new Claim(ClaimTypes.SerialNumber, existingAdmin.Account) + })); var source = EntityMapper.Map(existingAdmin); diff --git a/EOM.TSHotelManagement.Application/Zero/Base/BaseService.cs b/EOM.TSHotelManagement.Application/Zero/Base/BaseService.cs index 72aefab..504a9e2 100644 --- a/EOM.TSHotelManagement.Application/Zero/Base/BaseService.cs +++ b/EOM.TSHotelManagement.Application/Zero/Base/BaseService.cs @@ -27,8 +27,11 @@ using EOM.TSHotelManagement.Common.Core; using EOM.TSHotelManagement.Common.Util; using EOM.TSHotelManagement.EntityFramework; using jvncorelib.EntityLib; +using Microsoft.Extensions.Options; using SqlSugar; using System; +using System.ComponentModel; +using System.Reflection; namespace EOM.TSHotelManagement.Application { @@ -129,7 +132,17 @@ namespace EOM.TSHotelManagement.Application where = where.And(a => a.IsDelete == genderTypeInputDto.IsDelete); } var count = 0; - var genderTypes = sexTypeRepository.AsQueryable().Where(where.ToExpression()).ToPageList(genderTypeInputDto.Page,genderTypeInputDto.PageSize,ref count); + var genderTypes = new List(); + + if (!genderTypeInputDto.IgnorePaging && genderTypeInputDto.Page != 0 && genderTypeInputDto.PageSize != 0) + { + genderTypes = sexTypeRepository.AsQueryable().Where(where.ToExpression()).ToPageList(genderTypeInputDto.Page, genderTypeInputDto.PageSize, ref count); + } + else + { + genderTypes = sexTypeRepository.AsQueryable().Where(where.ToExpression()).ToList(); + } + var result = EntityMapper.MapList(genderTypes); return new ListOutputDto { listSource = result, total = count }; } @@ -196,15 +209,17 @@ namespace EOM.TSHotelManagement.Application /// 查询所有面貌类型 /// /// - public List SelectWorkerFeatureAll() + public List SelectWorkerFeatureAll() { - var listWorkerFeatures = new List(); - var workerFeatures = WorkerFeaturesConstant.GetAll().ToList(); - foreach (var item in workerFeatures) + return Enum.GetValues(typeof(PoliticalAffiliation)) + .Cast() + .Select(e => new PoliticalAffiliationDto { - listWorkerFeatures.Add(new WorkerFeatures { Code = item.Code, Description = item.Description }); - } - return listWorkerFeatures; + Id = (int)e, + Name = e.ToString(), + Description = GetEnumDescription(e) + }) + .ToList(); } #endregion @@ -227,7 +242,17 @@ namespace EOM.TSHotelManagement.Application where = where.And(a => a.PositionName.Contains(positionInputDto.PositionName)); } var count = 0; - var positions = positionRepository.AsQueryable().Where(where.ToExpression()).ToPageList(positionInputDto.Page, positionInputDto.PageSize, ref count); + var positions = new List(); + + if (!positionInputDto.IgnorePaging && positionInputDto.Page != 0 && positionInputDto.PageSize != 0) + { + positions = positionRepository.AsQueryable().Where(where.ToExpression()).ToPageList(positionInputDto.Page, positionInputDto.PageSize, ref count); + } + else + { + positions = positionRepository.AsQueryable().Where(where.ToExpression()).ToList(); + } + var result = EntityMapper.MapList(positions); return new ListOutputDto { listSource = result, total = count }; } @@ -295,8 +320,10 @@ namespace EOM.TSHotelManagement.Application /// 查询所有民族类型 /// /// - public ListOutputDto SelectNationAll(ReadNationInputDto nationInputDto = null) + public ListOutputDto SelectNationAll(ReadNationInputDto nationInputDto) { + var nations = new List(); + var where = Expressionable.Create(); if (nationInputDto != null && !nationInputDto.IsDelete.IsNullOrEmpty()) @@ -304,7 +331,16 @@ namespace EOM.TSHotelManagement.Application where = where.And(a => a.IsDelete == nationInputDto.IsDelete); } var count = 0; - var nations = nationRepository.AsQueryable().Where(where.ToExpression()).ToPageList(nationInputDto.Page,nationInputDto.PageSize,ref count); + + if (!nationInputDto.IgnorePaging && nationInputDto.Page != 0 && nationInputDto.PageSize != 0) + { + nations = nationRepository.AsQueryable().Where(where.ToExpression()).ToPageList(nationInputDto.Page, nationInputDto.PageSize, ref count); + } + else + { + nations = nationRepository.AsQueryable().Where(where.ToExpression()).ToList(); + } + var result = EntityMapper.MapList(nations); return new ListOutputDto { listSource = result, total = count }; } @@ -376,12 +412,22 @@ namespace EOM.TSHotelManagement.Application { var where = Expressionable.Create(); - if (educationInputDto != null && !educationInputDto.IsDelete.IsNullOrEmpty()) + if (!educationInputDto.IsDelete.IsNullOrEmpty()) { where = where.And(a => a.IsDelete == educationInputDto.IsDelete); } var count = 0; - var educations = educationRepository.AsQueryable().Where(where.ToExpression()).ToPageList(educationInputDto.Page,educationInputDto.PageSize,ref count); + var educations = new List(); + + if (!educationInputDto.IgnorePaging && educationInputDto.Page != 0 && educationInputDto.PageSize != 0) + { + educations = educationRepository.AsQueryable().Where(where.ToExpression()).ToPageList(educationInputDto.Page, educationInputDto.PageSize, ref count); + } + else + { + educations = educationRepository.AsQueryable().Where(where.ToExpression()).ToList(); + } + var result = EntityMapper.MapList(educations); return new ListOutputDto { listSource = result, total = count }; } @@ -468,7 +514,16 @@ namespace EOM.TSHotelManagement.Application where = where.And(a => a.IsDelete == readDepartmentInputDto.IsDelete); } var count = 0; - var depts = deptRepository.AsQueryable().Where(where.ToExpression()).ToPageList(readDepartmentInputDto.Page,readDepartmentInputDto.PageSize,ref count); + var depts = new List(); + + if (!readDepartmentInputDto.IgnorePaging && readDepartmentInputDto.Page != 0 && readDepartmentInputDto.PageSize != 0) + { + depts = deptRepository.AsQueryable().Where(where.ToExpression()).ToPageList(readDepartmentInputDto.Page, readDepartmentInputDto.PageSize, ref count); + } + else + { + depts = deptRepository.AsQueryable().Where(where.ToExpression()).ToList(); + } var parentDepartmentNumbers = depts.Where(a => !a.ParentDepartmentNumber.IsNullOrEmpty()).Select(a => a.ParentDepartmentNumber).ToList(); var parentDepartments = deptRepository.GetList(a => parentDepartmentNumbers.Contains(a.DepartmentNumber)); @@ -573,7 +628,17 @@ namespace EOM.TSHotelManagement.Application where = where.And(a => a.IsDelete == readCustoTypeInputDto.IsDelete); } var count = 0; - var custoTypes = custoTypeRepository.AsQueryable().Where(where.ToExpression()).ToPageList(readCustoTypeInputDto.Page, readCustoTypeInputDto.PageSize, ref count); + var custoTypes = new List(); + + if (!readCustoTypeInputDto.IgnorePaging && readCustoTypeInputDto.Page != 0 && readCustoTypeInputDto.PageSize != 0) + { + custoTypes = custoTypeRepository.AsQueryable().Where(where.ToExpression()).ToPageList(readCustoTypeInputDto.Page, readCustoTypeInputDto.PageSize, ref count); + } + else + { + custoTypes = custoTypeRepository.AsQueryable().Where(where.ToExpression()).ToList(); + } + var result = EntityMapper.MapList(custoTypes); return new ListOutputDto { listSource = result, total = count }; } @@ -660,7 +725,17 @@ namespace EOM.TSHotelManagement.Application where = where.And(a => a.IsDelete == readPassportTypeInputDto.IsDelete); } var count = 0; - var passPortTypes = passPortTypeRepository.AsQueryable().Where(where.ToExpression()).ToPageList(readPassportTypeInputDto.Page, readPassportTypeInputDto.PageSize, ref count); + var passPortTypes = new List(); + + if (!readPassportTypeInputDto.IgnorePaging && readPassportTypeInputDto.Page != 0 && readPassportTypeInputDto.PageSize != 0) + { + passPortTypes = passPortTypeRepository.AsQueryable().Where(where.ToExpression()).ToPageList(readPassportTypeInputDto.Page, readPassportTypeInputDto.PageSize, ref count); + } + else + { + passPortTypes = passPortTypeRepository.AsQueryable().Where(where.ToExpression()).ToList(); + } + var result = EntityMapper.MapList(passPortTypes); return new ListOutputDto { listSource = result, total = count }; } @@ -747,7 +822,17 @@ namespace EOM.TSHotelManagement.Application where = where.And(a => a.IsDelete == readRewardPunishmentTypeInputDto.IsDelete); } var count = 0; - var gBTypes = goodbadTypeRepository.AsQueryable().Where(where.ToExpression()).ToPageList(readRewardPunishmentTypeInputDto.Page, readRewardPunishmentTypeInputDto.PageSize, ref count); + var gBTypes = new List(); + + if (!readRewardPunishmentTypeInputDto.IgnorePaging && readRewardPunishmentTypeInputDto.Page != 0 && readRewardPunishmentTypeInputDto.PageSize != 0) + { + gBTypes = goodbadTypeRepository.AsQueryable().Where(where.ToExpression()).ToPageList(readRewardPunishmentTypeInputDto.Page, readRewardPunishmentTypeInputDto.PageSize, ref count); + } + else + { + gBTypes = goodbadTypeRepository.AsQueryable().Where(where.ToExpression()).ToList(); + } + var result = EntityMapper.MapList(gBTypes); return new ListOutputDto { listSource = result, total = count }; } @@ -824,5 +909,14 @@ namespace EOM.TSHotelManagement.Application #endregion + private static string GetEnumDescription(Enum value) + { + FieldInfo field = value.GetType().GetField(value.ToString()); + DescriptionAttribute attribute = field? + .GetCustomAttributes(typeof(DescriptionAttribute), false) + .FirstOrDefault() as DescriptionAttribute; + + return attribute?.Description ?? value.ToString(); + } } } diff --git a/EOM.TSHotelManagement.Application/Zero/Base/IBaseService.cs b/EOM.TSHotelManagement.Application/Zero/Base/IBaseService.cs index 9d3fa49..00586fe 100644 --- a/EOM.TSHotelManagement.Application/Zero/Base/IBaseService.cs +++ b/EOM.TSHotelManagement.Application/Zero/Base/IBaseService.cs @@ -75,7 +75,7 @@ namespace EOM.TSHotelManagement.Application /// 查询所有面貌类型 /// /// - List SelectWorkerFeatureAll(); + List SelectWorkerFeatureAll(); #endregion #region 职位模块 diff --git a/EOM.TSHotelManagement.Common.Contract/BaseDto/ListInputDto.cs b/EOM.TSHotelManagement.Common.Contract/BaseDto/ListInputDto.cs index 8151c1f..7fb4d65 100644 --- a/EOM.TSHotelManagement.Common.Contract/BaseDto/ListInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/BaseDto/ListInputDto.cs @@ -19,6 +19,6 @@ namespace EOM.TSHotelManagement.Common.Contract /// /// 忽略分页 /// - public int IgnorePaging { get; set; } = 0; + public bool IgnorePaging { get; set; } = false; } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomOutputDto.cs index 4dcdfc7..b2205a5 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomOutputDto.cs @@ -3,11 +3,14 @@ namespace EOM.TSHotelManagement.Common.Contract public class ReadRoomOutputDto { public string RoomNumber { get; set; } + public string RoomName { get; set; } public string RoomType { get; set; } public string CustomerNumber { get; set; } + public string CustomerName { get; set; } public DateTime? LastCheckInTime { get; set; } public DateTime? LastCheckOutTime { get; set; } public int RoomStateId { get; set; } + public string RoomState { get; set; } public decimal RoomRent { get; set; } public decimal RoomDeposit { get; set; } public string RoomLocation { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/ReadRoomTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/ReadRoomTypeOutputDto.cs index b7999fd..272b672 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/ReadRoomTypeOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/RoomType/ReadRoomTypeOutputDto.cs @@ -4,7 +4,8 @@ namespace EOM.TSHotelManagement.Common.Contract { public int RoomTypeId { get; set; } public string RoomTypeName { get; set; } - public decimal RoomTypePrice { get; set; } + public decimal RoomRent { get; set; } + public decimal RoomDeposit { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeInputDto.cs index 767f004..bc63002 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeInputDto.cs @@ -15,6 +15,7 @@ namespace EOM.TSHotelManagement.Common.Contract public DateTime HireDate { get; set; } public string PoliticalAffiliation { get; set; } public string EducationLevel { get; set; } + public string Password { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs index a521e05..f8a0d19 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace EOM.TSHotelManagement.Common.Contract +namespace EOM.TSHotelManagement.Common.Contract { public class ReadEmployeeOutputDto { @@ -27,5 +21,7 @@ namespace EOM.TSHotelManagement.Common.Contract public string PoliticalAffiliationName { get; set; } public string EducationLevel { get; set; } public string EducationLevelName { get; set; } + public int IsEnable { get; set; } + public string Password { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/UpdateEmployeeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/UpdateEmployeeInputDto.cs index 217b87a..30d1e17 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/UpdateEmployeeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/UpdateEmployeeInputDto.cs @@ -16,6 +16,7 @@ namespace EOM.TSHotelManagement.Common.Contract public string PoliticalAffiliation { get; set; } public string EducationLevel { get; set; } public string Password { get; set; } + public int IsEnable { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckOutputDto.cs index cf426de..7e6e9e3 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckOutputDto.cs @@ -4,8 +4,9 @@ namespace EOM.TSHotelManagement.Common.Contract { public int CheckId { get; set; } public string EmployeeId { get; set; } - public DateTime CheckDate { get; set; } + public DateTime CheckTime { get; set; } public string CheckStatus { get; set; } + public string CheckMethod { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryOutputDto.cs index ad8e312..df39b38 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeHistory/ReadEmployeeHistoryOutputDto.cs @@ -2,11 +2,12 @@ namespace EOM.TSHotelManagement.Common.Contract { public class ReadEmployeeHistoryOutputDto { - public int HistoryId { get; set; } + public int Id { get; set; } public string EmployeeId { get; set; } - public DateTime ChangeDate { get; set; } - public string ChangeType { get; set; } - public string ChangeDescription { get; set; } + public DateTime StartDate { get; set; } + public DateTime EndDate { get; set; } + public string Position { get; set; } + public string Company { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentOutputDto.cs index 2fa6a66..f11bd9b 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentOutputDto.cs @@ -1,12 +1,15 @@ + namespace EOM.TSHotelManagement.Common.Contract { public class ReadEmployeeRewardPunishmentOutputDto { - public int RewardPunishmentId { get; set; } public string EmployeeId { get; set; } - public DateTime RewardPunishmentDate { get; set; } + public DateTime RewardPunishmentTime { get; set; } public string RewardPunishmentType { get; set; } - public string RewardPunishmentDescription { get; set; } + public string RewardPunishmentTypeName { get; set; } + public string RewardPunishmentInformation { get; set; } + public string RewardPunishmentOperator { get; set; } + public string OperatorName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogInputDto.cs index 9c06aa8..a7148b2 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogInputDto.cs @@ -1,8 +1,10 @@ + namespace EOM.TSHotelManagement.Common.Contract { public class ReadOperationLogInputDto:ListInputDto { public int OperationId { get; set; } + public int? LogLevel { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/PoliticalAffiliationDto.cs b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/PoliticalAffiliationDto.cs new file mode 100644 index 0000000..0d7861d --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/Zero/Dto/PoliticalAffiliationDto.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EOM.TSHotelManagement.Common.Contract +{ + public class PoliticalAffiliationDto + { + public int Id { get; set; } + public string Name { get; set; } + public string Description { get; set; } + } +} diff --git a/EOM.TSHotelManagement.Common.Core/Business/EnergyManagement/Hydroelectricity.cs b/EOM.TSHotelManagement.Common.Core/Business/EnergyManagement/EnergyManagement.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Core/Business/EnergyManagement/Hydroelectricity.cs rename to EOM.TSHotelManagement.Common.Core/Business/EnergyManagement/EnergyManagement.cs diff --git a/EOM.TSHotelManagement.Common.Core/Employee/Employee.cs b/EOM.TSHotelManagement.Common.Core/Employee/Employee.cs index c2612dc..bad6093 100644 --- a/EOM.TSHotelManagement.Common.Core/Employee/Employee.cs +++ b/EOM.TSHotelManagement.Common.Core/Employee/Employee.cs @@ -158,5 +158,11 @@ namespace EOM.TSHotelManagement.Common.Core /// [SugarColumn(IsIgnore = true)] public string EducationLevelName { get; set; } + + /// + /// 禁用标记 + /// + [SugarColumn(ColumnName = "enable_mk")] + public int IsEnable { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/Zero/PoliticalAffiliation.cs b/EOM.TSHotelManagement.Common.Core/Zero/PoliticalAffiliation.cs new file mode 100644 index 0000000..290cc0d --- /dev/null +++ b/EOM.TSHotelManagement.Common.Core/Zero/PoliticalAffiliation.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EOM.TSHotelManagement.Common.Core +{ + public enum PoliticalAffiliation + { + [Description("党员")] + PoliticalPartyMember = 1, + + [Description("团员")] + GroupMember = 2, + + [Description("群众")] + TheMasses = 3, + + [Description("民主党派")] + DemocraticParty = 4, + + [Description("无党派人士")] + NonParty = 5, + + [Description("预备党员")] + PoliticalPartyReserveMember = 6 + } +} diff --git a/EOM.TSHotelManagement.Common.Util/EOM.TSHotelManagement.Common.Util.csproj b/EOM.TSHotelManagement.Common.Util/EOM.TSHotelManagement.Common.Util.csproj index c21f2bc..c22ff83 100644 --- a/EOM.TSHotelManagement.Common.Util/EOM.TSHotelManagement.Common.Util.csproj +++ b/EOM.TSHotelManagement.Common.Util/EOM.TSHotelManagement.Common.Util.csproj @@ -8,10 +8,6 @@ - - - - diff --git a/EOM.TSHotelManagement.Common.Util/GenerateJWT/JWTHelper.cs b/EOM.TSHotelManagement.Common.Util/GenerateJWT/JWTHelper.cs index 68f15fd..35bb4e0 100644 --- a/EOM.TSHotelManagement.Common.Util/GenerateJWT/JWTHelper.cs +++ b/EOM.TSHotelManagement.Common.Util/GenerateJWT/JWTHelper.cs @@ -22,17 +22,14 @@ namespace EOM.TSHotelManagement.Common.Util _jwtConfigFactory = jwtConfigFactory; } - public string GenerateJWT(string account) + public string GenerateJWT(ClaimsIdentity claimsIdentity) { var jwtConfig = _jwtConfigFactory.GetJwtConfig(); var tokenHandler = new JwtSecurityTokenHandler(); var key = Encoding.UTF8.GetBytes(jwtConfig.Key); var tokenDescriptor = new SecurityTokenDescriptor { - Subject = new ClaimsIdentity(new Claim[] - { - new Claim(ClaimTypes.Name, account) - }), + Subject = claimsIdentity, Expires = DateTime.Now.AddMinutes(jwtConfig.ExpiryMinutes), SigningCredentials = new SigningCredentials(new SymmetricSecurityKey(key), SecurityAlgorithms.HmacSha256Signature), Audience = jwtConfig.Audience, diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Asset/AssetController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Business/Asset/AssetController.cs index ec57ec1..09f059f 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Asset/AssetController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Business/Asset/AssetController.cs @@ -41,7 +41,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public ListOutputDto SelectAssetInfoAll([FromQuery] ReadAssetInputDto asset) + public ListOutputDto SelectAssetInfoAll([FromQuery] ReadAssetInputDto asset) { return assetService.SelectAssetInfoAll(asset); } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomController.cs index 4fe537f..2082cc3 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomController.cs @@ -44,9 +44,9 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public ListOutputDto SelectRoomAll() + public ListOutputDto SelectRoomAll([FromQuery]ReadRoomInputDto readRoomInputDto) { - return roomService.SelectRoomAll(); + return roomService.SelectRoomAll(readRoomInputDto); } /// @@ -235,9 +235,9 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public ListOutputDto SelectRoomStateAll() + public ListOutputDto SelectRoomStateAll([FromQuery]ReadRoomStateInputDto readRoomStateInputDto) { - return roomService.SelectRoomStateAll(); + return roomService.SelectRoomStateAll(readRoomStateInputDto); } /// diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Spend/SpendController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Business/Spend/SpendController.cs index 8b34864..b3197e0 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Spend/SpendController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Business/Spend/SpendController.cs @@ -68,9 +68,9 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public ListOutputDto SelectSpendInfoAll() + public ListOutputDto SelectSpendInfoAll([FromQuery]ReadSpendInputDto readSpendInputDto) { - return spendService.SelectSpendInfoAll(); + return spendService.SelectSpendInfoAll(readSpendInputDto); } /// diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Employee/Check/EmployeeCheckController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Employee/Check/EmployeeCheckController.cs index 2f56a33..02e040c 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Employee/Check/EmployeeCheckController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Employee/Check/EmployeeCheckController.cs @@ -24,9 +24,9 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public ListOutputDto SelectCheckInfoByWorkerNo([FromQuery] ReadEmployeeCheckInputDto inputDto) + public ListOutputDto SelectCheckInfoByEmployeeId([FromQuery] ReadEmployeeCheckInputDto inputDto) { - return workerCheckService.SelectCheckInfoByWorkerNo(inputDto); + return workerCheckService.SelectCheckInfoByEmployeeId(inputDto); } /// @@ -35,9 +35,9 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public object SelectWorkerCheckDaySumByWorkerNo([FromQuery] ReadEmployeeCheckInputDto inputDto) + public int SelectWorkerCheckDaySumByEmployeeId([FromQuery] ReadEmployeeCheckInputDto inputDto) { - return workerCheckService.SelectWorkerCheckDaySumByWorkerNo(inputDto); + return workerCheckService.SelectWorkerCheckDaySumByEmployeeId(inputDto); } /// @@ -46,7 +46,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public object SelectToDayCheckInfoByWorkerNo([FromQuery] ReadEmployeeCheckInputDto inputDto) + public bool SelectToDayCheckInfoByWorkerNo([FromQuery] ReadEmployeeCheckInputDto inputDto) { return workerCheckService.SelectToDayCheckInfoByWorkerNo(inputDto); } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Employee/History/EmployeeHistoryController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Employee/History/EmployeeHistoryController.cs index 5abf165..1278dba 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Employee/History/EmployeeHistoryController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Employee/History/EmployeeHistoryController.cs @@ -24,9 +24,9 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public BaseOutputDto AddHistoryByWorkerId([FromBody] CreateEmployeeHistoryInputDto workerHistory) + public BaseOutputDto AddHistoryByEmployeeId([FromBody] CreateEmployeeHistoryInputDto workerHistory) { - return workerHistoryService.AddHistoryByWorkerId(workerHistory); + return workerHistoryService.AddHistoryByEmployeeId(workerHistory); } /// @@ -35,9 +35,9 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public ListOutputDto SelectHistoryByWorkerId([FromQuery] ReadEmployeeHistoryInputDto inputDto) + public ListOutputDto SelectHistoryByEmployeeId([FromQuery] ReadEmployeeHistoryInputDto inputDto) { - return workerHistoryService.SelectHistoryByWorkerId(inputDto); + return workerHistoryService.SelectHistoryByEmployeeId(inputDto); } } } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Employee/RewardPunishment/RewardPunishmentController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Employee/RewardPunishment/RewardPunishmentController.cs index d054d7a..b5810ab 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Employee/RewardPunishment/RewardPunishmentController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Employee/RewardPunishment/RewardPunishmentController.cs @@ -42,9 +42,9 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public ListOutputDto SelectAllRewardPunishmentByWorkNo([FromQuery] ReadEmployeeRewardPunishmentInputDto wn) + public ListOutputDto SelectAllRewardPunishmentByEmployeeId([FromQuery] ReadEmployeeRewardPunishmentInputDto wn) { - return workerGoodBadService.SelectAllRewardPunishmentByWorkNo(wn); + return workerGoodBadService.SelectAllRewardPunishmentByEmployeeId(wn); } } } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Zero/Base/BaseController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Zero/Base/BaseController.cs index 506672e..5a613ba 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Zero/Base/BaseController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Zero/Base/BaseController.cs @@ -57,7 +57,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers #region 面貌模块 [HttpGet] - public List SelectWorkerFeatureAll() + public List SelectWorkerFeatureAll() { return baseService.SelectWorkerFeatureAll(); } -- Gitee From c89e0a0264a9d65d30fc58aa8744a9ddc9e44764 Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Sat, 22 Mar 2025 21:57:19 +0800 Subject: [PATCH 06/24] add mailhelper. update fields. --- .../Employee/EmployeeService.cs | 59 ++++++++- .../Employee/IEmployeeService.cs | 7 + .../RewardPunishmentService.cs | 4 +- .../Zero/Administrator/AdminService.cs | 9 +- .../Dto/Employee/ReadEmployeeOutputDto.cs | 4 +- .../ReadEmployeeCheckOutputDto.cs | 2 +- .../ReadEmployeeRewardPunishmentOutputDto.cs | 2 +- .../Employee/Employee.cs | 6 + .../Employee/EmployeeRewardPunishment.cs | 2 +- .../EOM.TSHotelManagement.Common.Util.csproj | 2 + .../Helper/MailHelper.cs | 123 ++++++++++++++++++ .../Interfaces/IMailConfigFactory.cs | 13 ++ EOM.TSHotelManagement.Shared/MailConfig.cs | 41 ++++++ .../Employee/EmployeeController.cs | 12 ++ .../Factory/MailConfigFactory.cs | 29 +++++ EOM.TSHotelManagement.WebApi/Startup.cs | 2 + EOM.TSHotelManagement.WebApi/appsettings.json | 9 ++ 17 files changed, 311 insertions(+), 15 deletions(-) create mode 100644 EOM.TSHotelManagement.Common.Util/Helper/MailHelper.cs create mode 100644 EOM.TSHotelManagement.Shared/Interfaces/IMailConfigFactory.cs create mode 100644 EOM.TSHotelManagement.Shared/MailConfig.cs create mode 100644 EOM.TSHotelManagement.WebApi/Factory/MailConfigFactory.cs diff --git a/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs b/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs index 3c68f52..e9fda4b 100644 --- a/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs +++ b/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs @@ -29,6 +29,7 @@ using EOM.TSHotelManagement.EntityFramework; using EOM.TSHotelManagement.Shared; using jvncorelib.EncryptorLib; using jvncorelib.EntityLib; +using jvncorelib.CodeLib; using Microsoft.AspNetCore.DataProtection; using Microsoft.IdentityModel.Tokens; using SqlSugar; @@ -38,6 +39,7 @@ using System.IdentityModel.Tokens.Jwt; using System.Reflection; using System.Security.Claims; using System.Text; +using NPOI.XWPF.UserModel; namespace EOM.TSHotelManagement.Application { @@ -54,7 +56,9 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public class EmployeeService(GenericRepository workerRepository, GenericRepository sexTypeRepository, GenericRepository educationRepository, GenericRepository nationRepository, GenericRepository deptRepository, GenericRepository positionRepository, IDataProtectionProvider dataProtectionProvider) : IEmployeeService + /// + /// + public class EmployeeService(GenericRepository workerRepository, GenericRepository sexTypeRepository, GenericRepository educationRepository, GenericRepository nationRepository, GenericRepository deptRepository, GenericRepository positionRepository, IDataProtectionProvider dataProtectionProvider, JWTHelper jWTHelper,MailHelper mailHelper) : IEmployeeService { /// /// 员工信息 @@ -94,7 +98,12 @@ namespace EOM.TSHotelManagement.Application /// /// JWT加密 /// - private readonly JWTHelper jWTHelper; + private readonly JWTHelper jWTHelper = jWTHelper; + + /// + /// 邮件助手 + /// + private readonly MailHelper mailHelper = mailHelper; /// /// 修改员工信息 @@ -423,6 +432,52 @@ namespace EOM.TSHotelManagement.Application return new BaseOutputDto(); } + /// + /// 重置员工账号密码 + /// + /// + /// + public BaseOutputDto ResetEmployeeAccountPassword(UpdateEmployeeInputDto updateEmployeeInputDto) + { + try + { + var newPwd = new UniqueCode().GetNewId(); + string encrypted = dataProtector.Protect(newPwd); + + var employeeMailAddress = workerRepository.GetSingle(a => a.EmployeeId == updateEmployeeInputDto.EmployeeId).EmailAddress; + + if (employeeMailAddress.IsNullOrEmpty()) + { + return new BaseOutputDto() { Message = LocalizationHelper.GetLocalizedString("No bound email address was found for the employee. Password reset cannot be completed." + , "未找到员工绑定的电子邮箱,无法重置密码。"),StatusCode = StatusCodeConstants.InternalServerError}; + } + + var Subject = LocalizationHelper.GetLocalizedString("Reset Password Notice","重置密码通知"); + var Body = $@"

{LocalizationHelper.GetLocalizedString("Dear User,", "尊敬的用户:")}

+

{LocalizationHelper.GetLocalizedString( + $"Your password was reset at {DateTime.Now:yyyy/MM/dd}. New password:", + $"系统已于{DateTime.Now:yyyy/MM/dd}为你重置密码成功,新密码如下:")} +

+

{newPwd}

+

{LocalizationHelper.GetLocalizedString( + "Please keep your password secure and change it after login.", + "请妥善保管密码,并在成功登录后修改为你能记住的密码!")}

"; + + mailHelper.SendMail(new List { employeeMailAddress }, Subject, Body, new List { employeeMailAddress }); + workerRepository.Update(a => new Employee() + { + Password = encrypted, + DataChgUsr = updateEmployeeInputDto.DataChgUsr + }, a => a.EmployeeId == updateEmployeeInputDto.EmployeeId); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + + return new BaseOutputDto(); + } + public static string GetDescriptionByName(string enumName) { Type enumType = typeof(PoliticalAffiliation); diff --git a/EOM.TSHotelManagement.Application/Employee/IEmployeeService.cs b/EOM.TSHotelManagement.Application/Employee/IEmployeeService.cs index 8ba9459..5b6c797 100644 --- a/EOM.TSHotelManagement.Application/Employee/IEmployeeService.cs +++ b/EOM.TSHotelManagement.Application/Employee/IEmployeeService.cs @@ -93,5 +93,12 @@ namespace EOM.TSHotelManagement.Application /// /// BaseOutputDto UpdEmployeePwdByWorkNo(UpdateEmployeeInputDto updateEmployeeInputDto); + + /// + /// 重置员工账号密码 + /// + /// + /// + BaseOutputDto ResetEmployeeAccountPassword(UpdateEmployeeInputDto updateEmployeeInputDto); } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Application/Employee/RewardPunishment/RewardPunishmentService.cs b/EOM.TSHotelManagement.Application/Employee/RewardPunishment/RewardPunishmentService.cs index 9722262..5cd6352 100644 --- a/EOM.TSHotelManagement.Application/Employee/RewardPunishment/RewardPunishmentService.cs +++ b/EOM.TSHotelManagement.Application/Employee/RewardPunishment/RewardPunishmentService.cs @@ -126,7 +126,7 @@ namespace EOM.TSHotelManagement.Application { //奖惩类型 var gbType = gBTypes.FirstOrDefault(a => a.RewardPunishmentTypeId == source.RewardPunishmentType); - source.TypeName = gbType.RewardPunishmentTypeName.IsNullOrEmpty() ? "" : gbType.RewardPunishmentTypeName; + source.RewardPunishmentTypeName = gbType.RewardPunishmentTypeName.IsNullOrEmpty() ? "" : gbType.RewardPunishmentTypeName; //操作人 var admin = admins.FirstOrDefault(a => a.Account == source.RewardPunishmentOperator); @@ -136,7 +136,7 @@ namespace EOM.TSHotelManagement.Application return new ListOutputDto { listSource = EntityMapper.MapList(gb), - total = gb.Count + total = count }; } } diff --git a/EOM.TSHotelManagement.Application/Zero/Administrator/AdminService.cs b/EOM.TSHotelManagement.Application/Zero/Administrator/AdminService.cs index 9e26934..56c3175 100644 --- a/EOM.TSHotelManagement.Application/Zero/Administrator/AdminService.cs +++ b/EOM.TSHotelManagement.Application/Zero/Administrator/AdminService.cs @@ -62,13 +62,6 @@ namespace EOM.TSHotelManagement.Application ///
private readonly JWTHelper jWTHelper; - /// - /// 构造函数 - /// - /// - /// - /// - /// public AdminService(GenericRepository adminRepository, GenericRepository adminTypeRepository, EncryptLib encrypt, JWTHelper jWTHelper) { this.adminRepository = adminRepository; @@ -168,6 +161,8 @@ namespace EOM.TSHotelManagement.Application return null; } + var currentRoles = + existingAdmin.Password = string.Empty; existingAdmin.UserToken = jWTHelper.GenerateJWT(new ClaimsIdentity(new Claim[] { diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs index f8a0d19..8d1dca8 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs @@ -1,4 +1,5 @@ -namespace EOM.TSHotelManagement.Common.Contract + +namespace EOM.TSHotelManagement.Common.Contract { public class ReadEmployeeOutputDto { @@ -23,5 +24,6 @@ public string EducationLevelName { get; set; } public int IsEnable { get; set; } public string Password { get; set; } + public string EmailAddress { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckOutputDto.cs index 7e6e9e3..4a2d5d0 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckOutputDto.cs @@ -2,7 +2,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public class ReadEmployeeCheckOutputDto { - public int CheckId { get; set; } + public int Id { get; set; } public string EmployeeId { get; set; } public DateTime CheckTime { get; set; } public string CheckStatus { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentOutputDto.cs index f11bd9b..6a81a3b 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeRewardPunishment/ReadEmployeeRewardPunishmentOutputDto.cs @@ -5,7 +5,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public string EmployeeId { get; set; } public DateTime RewardPunishmentTime { get; set; } - public string RewardPunishmentType { get; set; } + public int RewardPunishmentType { get; set; } public string RewardPunishmentTypeName { get; set; } public string RewardPunishmentInformation { get; set; } public string RewardPunishmentOperator { get; set; } diff --git a/EOM.TSHotelManagement.Common.Core/Employee/Employee.cs b/EOM.TSHotelManagement.Common.Core/Employee/Employee.cs index bad6093..1c438a6 100644 --- a/EOM.TSHotelManagement.Common.Core/Employee/Employee.cs +++ b/EOM.TSHotelManagement.Common.Core/Employee/Employee.cs @@ -164,5 +164,11 @@ namespace EOM.TSHotelManagement.Common.Core ///
[SugarColumn(ColumnName = "enable_mk")] public int IsEnable { get; set; } + + /// + /// 邮箱地址 + /// + [SugarColumn(ColumnName = "email_address")] + public string EmailAddress { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/Employee/EmployeeRewardPunishment.cs b/EOM.TSHotelManagement.Common.Core/Employee/EmployeeRewardPunishment.cs index c055273..19d97bf 100644 --- a/EOM.TSHotelManagement.Common.Core/Employee/EmployeeRewardPunishment.cs +++ b/EOM.TSHotelManagement.Common.Core/Employee/EmployeeRewardPunishment.cs @@ -79,6 +79,6 @@ namespace EOM.TSHotelManagement.Common.Core /// 类型名称 (Type Name) ///
[SugarColumn(IsIgnore = true)] - public string TypeName { get; set; } + public string RewardPunishmentTypeName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Util/EOM.TSHotelManagement.Common.Util.csproj b/EOM.TSHotelManagement.Common.Util/EOM.TSHotelManagement.Common.Util.csproj index c22ff83..d969c08 100644 --- a/EOM.TSHotelManagement.Common.Util/EOM.TSHotelManagement.Common.Util.csproj +++ b/EOM.TSHotelManagement.Common.Util/EOM.TSHotelManagement.Common.Util.csproj @@ -10,6 +10,8 @@ + + diff --git a/EOM.TSHotelManagement.Common.Util/Helper/MailHelper.cs b/EOM.TSHotelManagement.Common.Util/Helper/MailHelper.cs new file mode 100644 index 0000000..be10022 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Util/Helper/MailHelper.cs @@ -0,0 +1,123 @@ +using MimeKit; +using MailKit.Net.Smtp; +using MailKit.Security; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using EOM.TSHotelManagement.Shared; +using System.Net.Mime; + +namespace EOM.TSHotelManagement.Common.Util +{ + public class MailHelper + { + private readonly IMailConfigFactory mailConfigFactory; + + public MailHelper(IMailConfigFactory mailConfigFactory) + { + this.mailConfigFactory = mailConfigFactory; + } + + public void SendMail( + List toEmails, + string subject, + string body, + List ccEmails = null, + List bccEmails = null, + List attachments = null, + bool isBodyHtml = true) + { + var mailConfig = mailConfigFactory.GetMailConfig(); + + var message = new MimeMessage(); + + message.From.Add(new MailboxAddress(mailConfig.DisplayName, mailConfig.UserName)); + + AddRecipients(message.To, toEmails); + + AddRecipients(message.Cc, ccEmails); + + AddRecipients(message.Bcc, bccEmails); + + var bodyBuilder = new BodyBuilder + { + HtmlBody = isBodyHtml ? body : null, + TextBody = isBodyHtml ? null : body + }; + + AddAttachments(bodyBuilder, attachments); + + message.Subject = subject; + message.Body = bodyBuilder.ToMessageBody(); + + using var client = new SmtpClient(); + try + { + client.Connect( + mailConfig.Host, + mailConfig.Port, + GetSecureSocketOptions() + ); + + client.Authenticate(mailConfig.UserName, mailConfig.Password); + + client.Send(message); + } + catch (AuthenticationException ex) + { + throw new ApplicationException(LocalizationHelper.GetLocalizedString($"Email verification failed: {ex.Message}", $"邮件认证失败: {ex.Message}"), ex); + } + catch (SmtpCommandException ex) + { + throw new ApplicationException(LocalizationHelper.GetLocalizedString($"SMTP command error ({ex.StatusCode}): {ex.Message}", $"SMTP命令错误 ({ex.StatusCode}): {ex.Message}"), ex); + } + catch (SmtpProtocolException ex) + { + throw new ApplicationException(LocalizationHelper.GetLocalizedString($"SMTP protocol error: {ex.Message}", $"SMTP协议错误: {ex.Message}"), ex); + } + finally + { + client.Disconnect(true); + } + } + + #region Private Methods + + private void AddRecipients(InternetAddressList list, List emails) + { + emails?.Where(email => !string.IsNullOrWhiteSpace(email)) + .ToList() + .ForEach(email => list.Add(MailboxAddress.Parse(email))); + } + + private void AddAttachments(BodyBuilder builder, List attachments) + { + attachments?.Where(File.Exists) + .ToList() + .ForEach(filePath => + { + using var stream = File.OpenRead(filePath); + builder.Attachments.Add( + Path.GetFileName(filePath), + stream, + MimeKit.ContentType.Parse(MediaTypeNames.Application.Octet) + ); + }); + } + + private SecureSocketOptions GetSecureSocketOptions() + { + var mailConfig = mailConfigFactory.GetMailConfig(); + return mailConfig.EnableSsl switch + { + true when mailConfig.Port == 465 => SecureSocketOptions.SslOnConnect, + true when mailConfig.Port == 587 => SecureSocketOptions.StartTls, + true => SecureSocketOptions.Auto, + false => SecureSocketOptions.None + }; + } + + #endregion + } +} \ No newline at end of file diff --git a/EOM.TSHotelManagement.Shared/Interfaces/IMailConfigFactory.cs b/EOM.TSHotelManagement.Shared/Interfaces/IMailConfigFactory.cs new file mode 100644 index 0000000..35af71d --- /dev/null +++ b/EOM.TSHotelManagement.Shared/Interfaces/IMailConfigFactory.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EOM.TSHotelManagement.Shared +{ + public interface IMailConfigFactory + { + MailConfig GetMailConfig(); + } +} diff --git a/EOM.TSHotelManagement.Shared/MailConfig.cs b/EOM.TSHotelManagement.Shared/MailConfig.cs new file mode 100644 index 0000000..4fa7523 --- /dev/null +++ b/EOM.TSHotelManagement.Shared/MailConfig.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EOM.TSHotelManagement.Shared +{ + public class MailConfig + { + /// + /// SMTP服务器地址 + /// + public string Host { get; set; } + + /// + /// SMTP端口 + /// + public int Port { get; set; } + + /// + /// 发件邮箱账号 + /// + public string UserName { get; set; } + + /// + /// 发件邮箱密码/应用专用密码 + /// + public string Password { get; set; } + + /// + /// 是否启用SSL + /// + public bool EnableSsl { get; set; } + + /// + /// 发件人显示名称 + /// + public string DisplayName { get; set; } + } +} diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Employee/EmployeeController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Employee/EmployeeController.cs index 4ff92e8..4bbeb0a 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Employee/EmployeeController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Employee/EmployeeController.cs @@ -4,6 +4,7 @@ using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using System.Collections.Generic; +using SqlSugar.DistributedSystem.Snowflake; namespace EOM.TSHotelManagement.WebApi.Controllers { @@ -118,5 +119,16 @@ namespace EOM.TSHotelManagement.WebApi.Controllers { return workerService.UpdEmployeePwdByWorkNo(worker); } + + /// + /// 重置员工账号密码 + /// + /// + /// + [HttpPost] + public BaseOutputDto ResetEmployeeAccountPassword([FromBody] UpdateEmployeeInputDto updateEmployeeInputDto) + { + return workerService.ResetEmployeeAccountPassword(updateEmployeeInputDto); + } } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.WebApi/Factory/MailConfigFactory.cs b/EOM.TSHotelManagement.WebApi/Factory/MailConfigFactory.cs new file mode 100644 index 0000000..74fd220 --- /dev/null +++ b/EOM.TSHotelManagement.WebApi/Factory/MailConfigFactory.cs @@ -0,0 +1,29 @@ +using EOM.TSHotelManagement.Shared; +using Microsoft.Extensions.Configuration; + +namespace EOM.TSHotelManagement.WebApi +{ + public class MailConfigFactory : IMailConfigFactory + { + private readonly IConfiguration _configuration; + + public MailConfigFactory(IConfiguration configuration) + { + _configuration = configuration; + } + + public MailConfig GetMailConfig() + { + var mailConfig = new MailConfig + { + Host = _configuration.GetSection("Mail").GetValue("Host"), + Port = _configuration.GetSection("Mail").GetValue("Port"), + UserName = _configuration.GetSection("Mail").GetValue("UserName"), + Password = _configuration.GetSection("Mail").GetValue("Password"), + EnableSsl = _configuration.GetSection("Mail").GetValue("EnableSsl"), + DisplayName = _configuration.GetSection("Mail").GetValue("DisplayName") + }; + return mailConfig; + } + } +} diff --git a/EOM.TSHotelManagement.WebApi/Startup.cs b/EOM.TSHotelManagement.WebApi/Startup.cs index bf545ab..80bbea2 100644 --- a/EOM.TSHotelManagement.WebApi/Startup.cs +++ b/EOM.TSHotelManagement.WebApi/Startup.cs @@ -50,6 +50,7 @@ namespace EOM.TSHotelManagement.WebApi services.AddScoped(typeof(GenericRepository<>)); services.AddSingleton(); + services.AddSingleton(); services.AddAuthentication(options => { @@ -203,6 +204,7 @@ namespace EOM.TSHotelManagement.WebApi builder.RegisterGeneric(typeof(GenericRepository<>)).InstancePerLifetimeScope(); builder.RegisterType().AsSelf().InstancePerLifetimeScope(); + builder.RegisterType().AsSelf().InstancePerLifetimeScope(); //ע var assemblyService = Assembly.LoadFrom(Path.Combine(AppContext.BaseDirectory, "EOM.TSHotelManagement.Application.dll")); diff --git a/EOM.TSHotelManagement.WebApi/appsettings.json b/EOM.TSHotelManagement.WebApi/appsettings.json index 5be2f0a..83533de 100644 --- a/EOM.TSHotelManagement.WebApi/appsettings.json +++ b/EOM.TSHotelManagement.WebApi/appsettings.json @@ -10,6 +10,7 @@ "ConnectionStrings": { "PgSqlConnectStr": "Host=my_pgsql_host;Port=5432;Username=my_pgsql_user;Password=my_pgsql_password;Database=tshoteldb;", "MySqlConnectStr": "Server=my_mysql_host;Database=tshoteldb;User=my_mysql_user;Password=my_mysql_password;", + "MariaDBConnectStr": "Server=localhost;Database=tshoteldb;User=my_mariadb_user;Password=my_mariadb_password;", "SqlServerConnectStr": "Server=my_sqlserver_host;Database=tshoteldb;User Id=my_sqlserver_user;Password=my_sqlserver_password;", "OracleConnectStr": "User Id=my_oracle_user;Password=my_oracle_password;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=my_oracle_host)(PORT=1521)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=my_oracle_service_name)));" }, @@ -19,5 +20,13 @@ "Issuer": "", "Audience": "", "ExpiryMinutes": 20 + }, + "Mail": { + "Host": "...", + "Port": 465, + "UserName": "", + "Password": "", + "EnableSsl": true, + "DisplayName": "" } } -- Gitee From 805a751712e84dd44d25317210d7777fc26518f9 Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Sat, 29 Mar 2025 16:40:08 +0800 Subject: [PATCH 07/24] add logfilter. update fields. --- .../Dto/Customer/ReadCustomerOutputDto.cs | 2 +- .../CreatePassportTypeInputDto.cs | 2 +- .../DeletePassportTypeInputDto.cs | 2 +- .../PassportType/ReadPassportTypeInputDto.cs | 2 +- .../PassportType/ReadPassportTypeOutputDto.cs | 2 +- .../UpdatePassportTypeInputDto.cs | 2 +- .../BaseEntity.cs | 2 +- .../Business/Customer/Customer.cs | 2 +- .../Business/Customer/PassPortType.cs | 2 +- .../Filter/ApiLoggerFilter.cs | 47 +++++++++++++++++++ EOM.TSHotelManagement.WebApi/Startup.cs | 10 +++- 11 files changed, 65 insertions(+), 10 deletions(-) create mode 100644 EOM.TSHotelManagement.WebApi/Filter/ApiLoggerFilter.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs index a24601e..f347734 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs @@ -6,7 +6,7 @@ namespace EOM.TSHotelManagement.Common.Contract public string CustomerNumber { get; set; } public string CustomerName { get; set; } public int? CustomerGender { get; set; } - public int PassportType { get; set; } + public string PassportType { get; set; } public string GenderName { get; set; } public string CustomerPhoneNumber { get; set; } public DateTime DateOfBirth { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/CreatePassportTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/CreatePassportTypeInputDto.cs index df95dd1..41be7a0 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/CreatePassportTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/CreatePassportTypeInputDto.cs @@ -2,7 +2,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public class CreatePassportTypeInputDto: BaseInputDto { - public int PassportId { get; set; } + public string PassportId { get; set; } public string PassportName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/DeletePassportTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/DeletePassportTypeInputDto.cs index f62c6fd..a7513b8 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/DeletePassportTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/DeletePassportTypeInputDto.cs @@ -2,7 +2,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public class DeletePassportTypeInputDto: BaseInputDto { - public int PassportId { get; set; } + public string PassportId { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeInputDto.cs index f10f8fd..384de8d 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeInputDto.cs @@ -2,7 +2,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public class ReadPassportTypeInputDto:ListInputDto { - public int PassportId { get; set; } + public string PassportId { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeOutputDto.cs index 8d6c070..adf3ee3 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeOutputDto.cs @@ -2,7 +2,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public class ReadPassportTypeOutputDto { - public int PassportId { get; set; } + public string PassportId { get; set; } public string PassportName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/UpdatePassportTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/UpdatePassportTypeInputDto.cs index b027d5d..1938179 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/UpdatePassportTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/UpdatePassportTypeInputDto.cs @@ -2,7 +2,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public class UpdatePassportTypeInputDto: BaseInputDto { - public int PassportId { get; set; } + public string PassportId { get; set; } public string PassportName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/BaseEntity.cs b/EOM.TSHotelManagement.Common.Core/BaseEntity.cs index 9663fbe..342b0a5 100644 --- a/EOM.TSHotelManagement.Common.Core/BaseEntity.cs +++ b/EOM.TSHotelManagement.Common.Core/BaseEntity.cs @@ -9,7 +9,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 删除标识 ///
[SqlSugar.SugarColumn(ColumnName = "delete_mk")] - public int? IsDelete { get; set; } + public int? IsDelete { get; set; } = 0; /// /// 资料创建人 /// diff --git a/EOM.TSHotelManagement.Common.Core/Business/Customer/Customer.cs b/EOM.TSHotelManagement.Common.Core/Business/Customer/Customer.cs index abc7e28..fe5ff24 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Customer/Customer.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Customer/Customer.cs @@ -57,7 +57,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 证件类型 (Passport Type) ///
[SqlSugar.SugarColumn(ColumnName = "passport_type", IsNullable = false)] - public int PassportType { get; set; } + public string PassportType { get; set; } /// /// 性别 (Gender) diff --git a/EOM.TSHotelManagement.Common.Core/Business/Customer/PassPortType.cs b/EOM.TSHotelManagement.Common.Core/Business/Customer/PassPortType.cs index 3bb1d1e..a1ddbce 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Customer/PassPortType.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Customer/PassPortType.cs @@ -34,7 +34,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 证件类型 /// [SqlSugar.SugarColumn(ColumnName = "PassportId")] - public int PassportId { get; set; } + public string PassportId { get; set; } /// /// 证件名称 diff --git a/EOM.TSHotelManagement.WebApi/Filter/ApiLoggerFilter.cs b/EOM.TSHotelManagement.WebApi/Filter/ApiLoggerFilter.cs new file mode 100644 index 0000000..f0a8f2c --- /dev/null +++ b/EOM.TSHotelManagement.WebApi/Filter/ApiLoggerFilter.cs @@ -0,0 +1,47 @@ +using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.EntityFramework; +using Microsoft.AspNetCore.Mvc.Controllers; +using Microsoft.AspNetCore.Mvc.Filters; +using Microsoft.Extensions.Logging; +using System; +using System.Linq; +using LogLevel = EOM.TSHotelManagement.Common.Core.LogLevel; + +namespace EOM.TSHotelManagement.WebApi.Filter +{ + public class ApiLoggerFilter : IActionFilter + { + private readonly GenericRepository operationLogRepository; + + public ApiLoggerFilter(GenericRepository operationLogRepository) + { + this.operationLogRepository = operationLogRepository; + } + + public void OnActionExecuting(ActionExecutingContext context) + { + var httpContext = context.HttpContext; + var controllerName = context.Controller.GetType().Name; + var actionDescriptor = context.ActionDescriptor as ControllerActionDescriptor; + var actionName = actionDescriptor?.ActionName ?? "Unknown"; + var path = httpContext.Request.Path; + var clientIp = httpContext.Request.Headers["X-Forwarded-For"].FirstOrDefault() + ?? httpContext.Connection.RemoteIpAddress?.ToString(); + + operationLogRepository.Insert(new OperationLog + { + OperationTime = DateTime.Now, + LogContent = $"[{controllerName}] {actionName} {path} {clientIp}", + OperationAccount = "System", + SoftwareVersion = "1.0.0", + LoginIpAddress = clientIp, + LogLevel = LogLevel.Normal, + IsDelete = 0, + DataInsUsr = "System", + DataInsDate = DateTime.Now + }); + } + + public void OnActionExecuted(ActionExecutedContext context) { } + } +} diff --git a/EOM.TSHotelManagement.WebApi/Startup.cs b/EOM.TSHotelManagement.WebApi/Startup.cs index 80bbea2..142dabd 100644 --- a/EOM.TSHotelManagement.WebApi/Startup.cs +++ b/EOM.TSHotelManagement.WebApi/Startup.cs @@ -6,6 +6,7 @@ using EOM.TSHotelManagement.WebApi.Filter; using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.HttpOverrides; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; @@ -48,6 +49,7 @@ namespace EOM.TSHotelManagement.WebApi // ע᷺Ͳֿ services.AddScoped(typeof(GenericRepository<>)); + services.AddScoped(); services.AddSingleton(); services.AddSingleton(); @@ -88,10 +90,11 @@ namespace EOM.TSHotelManagement.WebApi { options.Conventions.Add(new AuthorizeAllControllersConvention()); options.RespectBrowserAcceptHeader = true; + options.Filters.Add(); }).AddNewtonsoftJson(opt => { //ʱʽӦ - opt.SerializerSettings.DateFormatString = "yyyy-MM-dd HH:mm:ss"; + //opt.SerializerSettings.DateFormatString = "yyyy-MM-dd HH:mm:ss"; opt.SerializerSettings.ContractResolver = new DefaultContractResolver(); }); @@ -162,6 +165,11 @@ namespace EOM.TSHotelManagement.WebApi app.UseDeveloperExceptionPage(); } + app.UseForwardedHeaders(new ForwardedHeadersOptions + { + ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto + }); + app.UseCors("MyCorsPolicy"); app.UseRouting(); -- Gitee From 119dcb65cfe0983681b4c8805359cc40a141fcf3 Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Sun, 30 Mar 2025 00:45:42 +0800 Subject: [PATCH 08/24] rename folders. add operationlog fields. --- .../Administrator/AdminService.cs | 6 +- .../Administrator/IAdminService.cs | 0 .../Base/BaseService.cs | 0 .../Base/IBaseService.cs | 0 .../Menu/IMenuService.cs | 0 .../Menu/MenuService.cs | 6 +- .../Module/AdminModuleZeroService.cs | 0 .../Module/IAdminModuleZeroService.cs | 0 .../Notice/INoticeService.cs | 0 .../Notice/NoticeService.cs | 2 +- .../ISupervisionStatisticsService.cs | 0 .../SupervisionStatisticsService.cs | 4 +- .../VipRule/IVipRuleAppService.cs | 0 .../VipRule/VipRuleAppService.cs | 4 +- .../CreateAdministratorInputDto.cs | 0 .../DeleteAdministratorInputDto.cs | 0 .../ReadAdministratorInputDto.cs | 0 .../ReadAdministratorOutputDto.cs | 0 .../UpdateAdministratorInputDto.cs | 0 .../CreateAdministratorTypeInputDto.cs | 0 .../DeleteAdministratorTypeInputDto.cs | 0 .../ReadAdministratorTypeInputDto.cs | 0 .../ReadAdministratorTypeOutputDto.cs | 0 .../UpdateAdministratorTypeInputDto.cs | 0 .../CreateAppointmentNoticeInputDto.cs | 0 .../DeleteAppointmentNoticeInputDto.cs | 0 .../ReadAppointmentNoticeInputDto.cs | 0 .../ReadAppointmentNoticeOutputDto.cs | 0 .../UpdateAppointmentNoticeInputDto.cs | 0 .../Department/CreateDepartmentInputDto.cs | 0 .../Department/DeleteDepartmentInputDto.cs | 0 .../Dto/Department/ReadDepartmentInputDto.cs | 0 .../Dto/Department/ReadDepartmentOutputDto.cs | 0 .../Department/UpdateDepartmentInputDto.cs | 0 .../Dto/Menu/CreateMenuInputDto.cs | 0 .../Dto/Menu/DeleteMenuInputDto.cs | 0 .../Dto/Menu/MenuViewModel.cs | 0 .../Dto/Menu/ModuleConsts.cs | 0 .../Dto/Menu/ReadMenuInputDto.cs | 0 .../Dto/Menu/ReadMenuOutputDto.cs | 0 .../Dto/Menu/UpdateMenuInputDto.cs | 0 .../Dto/Module/CreateModuleInputDto.cs | 0 .../Dto/Module/DeleteModuleInputDto.cs | 0 .../Dto/Module/ReadModuleInputDto.cs | 0 .../Dto/Module/ReadModuleOutputDto.cs | 0 .../Dto/Module/UpdateModuleInputDto.cs | 0 .../CreateModulePermissionInputDto.cs | 0 .../DeleteModulePermissionInputDto.cs | 0 .../ReadModulePermissionInputDto.cs | 0 .../ReadModulePermissionOutputDto.cs | 0 .../UpdateModulePermissionInputDto.cs | 0 .../Dto/Nation/CreateNationInputDto.cs | 0 .../Dto/Nation/DeleteNationInputDto.cs | 0 .../Dto/Nation/ReadNationInputDto.cs | 0 .../Dto/Nation/ReadNationOutputDto.cs | 0 .../Dto/Nation/UpdateNationInputDto.cs | 0 .../Dto/PoliticalAffiliationDto.cs | 0 .../Dto/Position/CreatePositionInputDto.cs | 0 .../Dto/Position/DeletePositionInputDto.cs | 0 .../Dto/Position/ReadPositionInputDto.cs | 0 .../Dto/Position/ReadPositionOutputDto.cs | 0 .../Dto/Position/UpdatePositionInputDto.cs | 0 .../Qualification/CreateEducationInputDto.cs | 0 .../Qualification/DeleteEducationInputDto.cs | 0 .../Qualification/ReadEducationInputDto.cs | 0 .../Qualification/ReadEducationOutputDto.cs | 0 .../Qualification/UpdateEducationInputDto.cs | 0 .../CreateSupervisionStatisticsInputDto.cs | 0 .../DeleteSupervisionStatisticsInputDto.cs | 0 .../ReadSupervisionStatisticsInputDto.cs | 0 .../ReadSupervisionStatisticsOutputDto.cs | 0 .../UpdateSupervisionStatisticsInputDto.cs | 0 .../CreateSystemInformationInputDto.cs | 0 .../DeleteSystemInformationInputDto.cs | 0 .../ReadSystemInformationInputDto.cs | 0 .../ReadSystemInformationOutputDto.cs | 0 .../UpdateSystemInformationInputDto.cs | 0 .../CreateVipLevelRuleInputDto.cs | 0 .../DeleteVipLevelRuleInputDto.cs | 0 .../VipLevelRule/ReadVipLevelRuleInputDto.cs | 0 .../VipLevelRule/ReadVipLevelRuleOutputDto.cs | 0 .../UpdateVipLevelRuleInputDto.cs | 0 .../OperationLog/ReadOperationLogOutputDto.cs | 33 ++++ .../Administrator.cs | 0 .../AdministratorType.cs | 0 .../AppointmentNotice.cs | 0 .../{Zero => SystemManagement}/Department.cs | 0 .../{Zero => SystemManagement}/Education.cs | 0 .../{Zero => SystemManagement}/Menu.cs | 0 .../MenuViewModel.cs | 0 .../{Zero => SystemManagement}/Module.cs | 0 .../ModuleConsts.cs | 0 .../ModulePermission.cs | 0 .../{Zero => SystemManagement}/Nation.cs | 0 .../PoliticalAffiliation.cs | 0 .../Position.cs} | 0 .../SupervisionStatistics.cs | 0 .../SystemInformation.cs | 0 .../VipLevelRule.cs | 0 .../Util/OperationLog.cs | 42 +++++ .../Administrator/AdminController.cs | 2 +- .../Base/BaseController.cs | 2 +- .../Menu/MenuController.cs | 2 +- .../Module/ModuleController.cs | 4 +- .../Notice/NoticeController.cs | 4 +- .../SupervisionStatisticsController.cs | 4 +- .../VipRule/VipRuleController.cs | 4 +- .../Filter/ApiLoggerFilter.cs | 152 ++++++++++++++++-- 108 files changed, 233 insertions(+), 38 deletions(-) rename EOM.TSHotelManagement.Application/{Zero => SystemManagement}/Administrator/AdminService.cs (98%) rename EOM.TSHotelManagement.Application/{Zero => SystemManagement}/Administrator/IAdminService.cs (100%) rename EOM.TSHotelManagement.Application/{Zero => SystemManagement}/Base/BaseService.cs (100%) rename EOM.TSHotelManagement.Application/{Zero => SystemManagement}/Base/IBaseService.cs (100%) rename EOM.TSHotelManagement.Application/{Zero => SystemManagement}/Menu/IMenuService.cs (100%) rename EOM.TSHotelManagement.Application/{Zero => SystemManagement}/Menu/MenuService.cs (98%) rename EOM.TSHotelManagement.Application/{Zero => SystemManagement}/Module/AdminModuleZeroService.cs (100%) rename EOM.TSHotelManagement.Application/{Zero => SystemManagement}/Module/IAdminModuleZeroService.cs (100%) rename EOM.TSHotelManagement.Application/{Zero => SystemManagement}/Notice/INoticeService.cs (100%) rename EOM.TSHotelManagement.Application/{Zero => SystemManagement}/Notice/NoticeService.cs (98%) rename EOM.TSHotelManagement.Application/{Zero => SystemManagement}/SupervisionStatistics/ISupervisionStatisticsService.cs (100%) rename EOM.TSHotelManagement.Application/{Zero => SystemManagement}/SupervisionStatistics/SupervisionStatisticsService.cs (98%) rename EOM.TSHotelManagement.Application/{Zero => SystemManagement}/VipRule/IVipRuleAppService.cs (100%) rename EOM.TSHotelManagement.Application/{Zero => SystemManagement}/VipRule/VipRuleAppService.cs (97%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/Administrator/CreateAdministratorInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/Administrator/DeleteAdministratorInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/Administrator/ReadAdministratorInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/Administrator/ReadAdministratorOutputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/Administrator/UpdateAdministratorInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/AdministratorType/CreateAdministratorTypeInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/AdministratorType/DeleteAdministratorTypeInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/AdministratorType/ReadAdministratorTypeInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/AdministratorType/ReadAdministratorTypeOutputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/AdministratorType/UpdateAdministratorTypeInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/AppointmentNotice/CreateAppointmentNoticeInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/AppointmentNotice/DeleteAppointmentNoticeInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/AppointmentNotice/ReadAppointmentNoticeInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/AppointmentNotice/ReadAppointmentNoticeOutputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/AppointmentNotice/UpdateAppointmentNoticeInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/Department/CreateDepartmentInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/Department/DeleteDepartmentInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/Department/ReadDepartmentInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/Department/ReadDepartmentOutputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/Department/UpdateDepartmentInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/Menu/CreateMenuInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/Menu/DeleteMenuInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/Menu/MenuViewModel.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/Menu/ModuleConsts.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/Menu/ReadMenuInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/Menu/ReadMenuOutputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/Menu/UpdateMenuInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/Module/CreateModuleInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/Module/DeleteModuleInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/Module/ReadModuleInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/Module/ReadModuleOutputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/Module/UpdateModuleInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/ModulePermission/CreateModulePermissionInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/ModulePermission/DeleteModulePermissionInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/ModulePermission/ReadModulePermissionInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/ModulePermission/ReadModulePermissionOutputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/ModulePermission/UpdateModulePermissionInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/Nation/CreateNationInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/Nation/DeleteNationInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/Nation/ReadNationInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/Nation/ReadNationOutputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/Nation/UpdateNationInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/PoliticalAffiliationDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/Position/CreatePositionInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/Position/DeletePositionInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/Position/ReadPositionInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/Position/ReadPositionOutputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/Position/UpdatePositionInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/Qualification/CreateEducationInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/Qualification/DeleteEducationInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/Qualification/ReadEducationInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/Qualification/ReadEducationOutputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/Qualification/UpdateEducationInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/SupervisionStatistics/CreateSupervisionStatisticsInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/SupervisionStatistics/DeleteSupervisionStatisticsInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/SupervisionStatistics/ReadSupervisionStatisticsInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/SupervisionStatistics/ReadSupervisionStatisticsOutputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/SupervisionStatistics/UpdateSupervisionStatisticsInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/SystemInformation/CreateSystemInformationInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/SystemInformation/DeleteSystemInformationInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/SystemInformation/ReadSystemInformationInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/SystemInformation/ReadSystemInformationOutputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/SystemInformation/UpdateSystemInformationInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/VipLevelRule/CreateVipLevelRuleInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/VipLevelRule/DeleteVipLevelRuleInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/VipLevelRule/ReadVipLevelRuleInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/VipLevelRule/ReadVipLevelRuleOutputDto.cs (100%) rename EOM.TSHotelManagement.Common.Contract/{Zero => SystemManagement}/Dto/VipLevelRule/UpdateVipLevelRuleInputDto.cs (100%) rename EOM.TSHotelManagement.Common.Core/{Zero => SystemManagement}/Administrator.cs (100%) rename EOM.TSHotelManagement.Common.Core/{Zero => SystemManagement}/AdministratorType.cs (100%) rename EOM.TSHotelManagement.Common.Core/{Zero => SystemManagement}/AppointmentNotice.cs (100%) rename EOM.TSHotelManagement.Common.Core/{Zero => SystemManagement}/Department.cs (100%) rename EOM.TSHotelManagement.Common.Core/{Zero => SystemManagement}/Education.cs (100%) rename EOM.TSHotelManagement.Common.Core/{Zero => SystemManagement}/Menu.cs (100%) rename EOM.TSHotelManagement.Common.Core/{Zero => SystemManagement}/MenuViewModel.cs (100%) rename EOM.TSHotelManagement.Common.Core/{Zero => SystemManagement}/Module.cs (100%) rename EOM.TSHotelManagement.Common.Core/{Zero => SystemManagement}/ModuleConsts.cs (100%) rename EOM.TSHotelManagement.Common.Core/{Zero => SystemManagement}/ModulePermission.cs (100%) rename EOM.TSHotelManagement.Common.Core/{Zero => SystemManagement}/Nation.cs (100%) rename EOM.TSHotelManagement.Common.Core/{Zero => SystemManagement}/PoliticalAffiliation.cs (100%) rename EOM.TSHotelManagement.Common.Core/{Zero/position.cs => SystemManagement/Position.cs} (100%) rename EOM.TSHotelManagement.Common.Core/{Zero => SystemManagement}/SupervisionStatistics.cs (100%) rename EOM.TSHotelManagement.Common.Core/{Zero => SystemManagement}/SystemInformation.cs (100%) rename EOM.TSHotelManagement.Common.Core/{Zero => SystemManagement}/VipLevelRule.cs (100%) rename EOM.TSHotelManagement.WebApi/Controllers/{Zero => SystemManagement}/Administrator/AdminController.cs (98%) rename EOM.TSHotelManagement.WebApi/Controllers/{Zero => SystemManagement}/Base/BaseController.cs (99%) rename EOM.TSHotelManagement.WebApi/Controllers/{Zero => SystemManagement}/Menu/MenuController.cs (96%) rename EOM.TSHotelManagement.WebApi/Controllers/{Zero => SystemManagement}/Module/ModuleController.cs (94%) rename EOM.TSHotelManagement.WebApi/Controllers/{Zero => SystemManagement}/Notice/NoticeController.cs (93%) rename EOM.TSHotelManagement.WebApi/Controllers/{Zero => SystemManagement}/SupervisionStatistics/SupervisionStatisticsController.cs (94%) rename EOM.TSHotelManagement.WebApi/Controllers/{Zero => SystemManagement}/VipRule/VipRuleController.cs (95%) diff --git a/EOM.TSHotelManagement.Application/Zero/Administrator/AdminService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Administrator/AdminService.cs similarity index 98% rename from EOM.TSHotelManagement.Application/Zero/Administrator/AdminService.cs rename to EOM.TSHotelManagement.Application/SystemManagement/Administrator/AdminService.cs index 56c3175..8e0fc39 100644 --- a/EOM.TSHotelManagement.Application/Zero/Administrator/AdminService.cs +++ b/EOM.TSHotelManagement.Application/SystemManagement/Administrator/AdminService.cs @@ -55,7 +55,7 @@ namespace EOM.TSHotelManagement.Application /// /// 加密 /// - private readonly jvncorelib.EncryptorLib.EncryptLib encrypt; + private readonly EncryptLib encrypt; /// /// JWT加密 @@ -161,7 +161,7 @@ namespace EOM.TSHotelManagement.Application return null; } - var currentRoles = + var currentRoles = existingAdmin.Password = string.Empty; existingAdmin.UserToken = jWTHelper.GenerateJWT(new ClaimsIdentity(new Claim[] @@ -209,7 +209,7 @@ namespace EOM.TSHotelManagement.Application where = where.And(a => a.IsDelete == readAdministratorInputDto.IsDelete); } var count = 0; - var listAdmins = adminRepository.AsQueryable().Where(where.ToExpression()).ToPageList(readAdministratorInputDto.Page,readAdministratorInputDto.PageSize,ref count); + var listAdmins = adminRepository.AsQueryable().Where(where.ToExpression()).ToPageList(readAdministratorInputDto.Page, readAdministratorInputDto.PageSize, ref count); var listAdminType = adminTypeRepository.GetList(a => a.IsDelete != 1); listAdmins.ForEach(admins => { diff --git a/EOM.TSHotelManagement.Application/Zero/Administrator/IAdminService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Administrator/IAdminService.cs similarity index 100% rename from EOM.TSHotelManagement.Application/Zero/Administrator/IAdminService.cs rename to EOM.TSHotelManagement.Application/SystemManagement/Administrator/IAdminService.cs diff --git a/EOM.TSHotelManagement.Application/Zero/Base/BaseService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Base/BaseService.cs similarity index 100% rename from EOM.TSHotelManagement.Application/Zero/Base/BaseService.cs rename to EOM.TSHotelManagement.Application/SystemManagement/Base/BaseService.cs diff --git a/EOM.TSHotelManagement.Application/Zero/Base/IBaseService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Base/IBaseService.cs similarity index 100% rename from EOM.TSHotelManagement.Application/Zero/Base/IBaseService.cs rename to EOM.TSHotelManagement.Application/SystemManagement/Base/IBaseService.cs diff --git a/EOM.TSHotelManagement.Application/Zero/Menu/IMenuService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Menu/IMenuService.cs similarity index 100% rename from EOM.TSHotelManagement.Application/Zero/Menu/IMenuService.cs rename to EOM.TSHotelManagement.Application/SystemManagement/Menu/IMenuService.cs diff --git a/EOM.TSHotelManagement.Application/Zero/Menu/MenuService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Menu/MenuService.cs similarity index 98% rename from EOM.TSHotelManagement.Application/Zero/Menu/MenuService.cs rename to EOM.TSHotelManagement.Application/SystemManagement/Menu/MenuService.cs index 164b836..e31a2ad 100644 --- a/EOM.TSHotelManagement.Application/Zero/Menu/MenuService.cs +++ b/EOM.TSHotelManagement.Application/SystemManagement/Menu/MenuService.cs @@ -77,7 +77,7 @@ namespace EOM.TSHotelManagement.Application var count = 0; List allMenus = menuRepository.AsQueryable().Where(where.ToExpression()).ToPageList(readMenuInputDto.Page, readMenuInputDto.PageSize, ref count); - List result = EntityMapper.MapList(allMenus); + List result = EntityMapper.MapList(allMenus); return new ListOutputDto { @@ -95,7 +95,7 @@ namespace EOM.TSHotelManagement.Application { try { - menuRepository.Insert(EntityMapper.Map(menu)); + menuRepository.Insert(EntityMapper.Map(menu)); } catch (Exception ex) { @@ -113,7 +113,7 @@ namespace EOM.TSHotelManagement.Application { try { - menuRepository.Update(EntityMapper.Map(menu)); + menuRepository.Update(EntityMapper.Map(menu)); } catch (Exception ex) { diff --git a/EOM.TSHotelManagement.Application/Zero/Module/AdminModuleZeroService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Module/AdminModuleZeroService.cs similarity index 100% rename from EOM.TSHotelManagement.Application/Zero/Module/AdminModuleZeroService.cs rename to EOM.TSHotelManagement.Application/SystemManagement/Module/AdminModuleZeroService.cs diff --git a/EOM.TSHotelManagement.Application/Zero/Module/IAdminModuleZeroService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Module/IAdminModuleZeroService.cs similarity index 100% rename from EOM.TSHotelManagement.Application/Zero/Module/IAdminModuleZeroService.cs rename to EOM.TSHotelManagement.Application/SystemManagement/Module/IAdminModuleZeroService.cs diff --git a/EOM.TSHotelManagement.Application/Zero/Notice/INoticeService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Notice/INoticeService.cs similarity index 100% rename from EOM.TSHotelManagement.Application/Zero/Notice/INoticeService.cs rename to EOM.TSHotelManagement.Application/SystemManagement/Notice/INoticeService.cs diff --git a/EOM.TSHotelManagement.Application/Zero/Notice/NoticeService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Notice/NoticeService.cs similarity index 98% rename from EOM.TSHotelManagement.Application/Zero/Notice/NoticeService.cs rename to EOM.TSHotelManagement.Application/SystemManagement/Notice/NoticeService.cs index c1882df..9404dbb 100644 --- a/EOM.TSHotelManagement.Application/Zero/Notice/NoticeService.cs +++ b/EOM.TSHotelManagement.Application/SystemManagement/Notice/NoticeService.cs @@ -71,7 +71,7 @@ namespace EOM.TSHotelManagement.Application where = where.And(a => a.IsDelete == readAppointmentNoticeInputDto.IsDelete); } var count = 0; - ntc = noticeRepository.AsQueryable().Where(where.ToExpression()).ToPageList(readAppointmentNoticeInputDto.Page,readAppointmentNoticeInputDto.PageSize,ref count); + ntc = noticeRepository.AsQueryable().Where(where.ToExpression()).ToPageList(readAppointmentNoticeInputDto.Page, readAppointmentNoticeInputDto.PageSize, ref count); ntc.ForEach(source => { switch (source.NoticeType) diff --git a/EOM.TSHotelManagement.Application/Zero/SupervisionStatistics/ISupervisionStatisticsService.cs b/EOM.TSHotelManagement.Application/SystemManagement/SupervisionStatistics/ISupervisionStatisticsService.cs similarity index 100% rename from EOM.TSHotelManagement.Application/Zero/SupervisionStatistics/ISupervisionStatisticsService.cs rename to EOM.TSHotelManagement.Application/SystemManagement/SupervisionStatistics/ISupervisionStatisticsService.cs diff --git a/EOM.TSHotelManagement.Application/Zero/SupervisionStatistics/SupervisionStatisticsService.cs b/EOM.TSHotelManagement.Application/SystemManagement/SupervisionStatistics/SupervisionStatisticsService.cs similarity index 98% rename from EOM.TSHotelManagement.Application/Zero/SupervisionStatistics/SupervisionStatisticsService.cs rename to EOM.TSHotelManagement.Application/SystemManagement/SupervisionStatistics/SupervisionStatisticsService.cs index f87d071..42344a6 100644 --- a/EOM.TSHotelManagement.Application/Zero/SupervisionStatistics/SupervisionStatisticsService.cs +++ b/EOM.TSHotelManagement.Application/SystemManagement/SupervisionStatistics/SupervisionStatisticsService.cs @@ -61,7 +61,7 @@ namespace EOM.TSHotelManagement.Application where = where.And(a => a.IsDelete == readSupervisionStatisticsInputDto.IsDelete); var count = 0; - cif = checkInfoRepository.AsQueryable().Where(where.ToExpression()).ToPageList(readSupervisionStatisticsInputDto.Page,readSupervisionStatisticsInputDto.PageSize,ref count); + cif = checkInfoRepository.AsQueryable().Where(where.ToExpression()).ToPageList(readSupervisionStatisticsInputDto.Page, readSupervisionStatisticsInputDto.PageSize, ref count); var deptId = cif.Select(a => a.SupervisingDepartment).ToList(); var depts = checkInfoRepository.Change().GetList(a => deptId.Contains(a.DepartmentNumber)); cif.ForEach(c => @@ -88,7 +88,7 @@ namespace EOM.TSHotelManagement.Application { try { - checkInfoRepository.Insert(EntityMapper.Map(checkInfo)); + checkInfoRepository.Insert(EntityMapper.Map(checkInfo)); } catch (Exception ex) { diff --git a/EOM.TSHotelManagement.Application/Zero/VipRule/IVipRuleAppService.cs b/EOM.TSHotelManagement.Application/SystemManagement/VipRule/IVipRuleAppService.cs similarity index 100% rename from EOM.TSHotelManagement.Application/Zero/VipRule/IVipRuleAppService.cs rename to EOM.TSHotelManagement.Application/SystemManagement/VipRule/IVipRuleAppService.cs diff --git a/EOM.TSHotelManagement.Application/Zero/VipRule/VipRuleAppService.cs b/EOM.TSHotelManagement.Application/SystemManagement/VipRule/VipRuleAppService.cs similarity index 97% rename from EOM.TSHotelManagement.Application/Zero/VipRule/VipRuleAppService.cs rename to EOM.TSHotelManagement.Application/SystemManagement/VipRule/VipRuleAppService.cs index bf03702..edb9923 100644 --- a/EOM.TSHotelManagement.Application/Zero/VipRule/VipRuleAppService.cs +++ b/EOM.TSHotelManagement.Application/SystemManagement/VipRule/VipRuleAppService.cs @@ -79,7 +79,7 @@ namespace EOM.TSHotelManagement.Application source.VipLevelName = userType == null ? "" : userType.CustomerTypeName; }); - var viprules = EntityMapper.MapList(listSource); + var viprules = EntityMapper.MapList(listSource); return new ListOutputDto { @@ -102,7 +102,7 @@ namespace EOM.TSHotelManagement.Application var userType = custoTypeRepository.GetSingle(a => a.CustomerType == source.VipLevelId); source.VipLevelName = userType == null ? "" : userType.CustomerTypeName; - var vipLevel = EntityMapper.Map(source); + var vipLevel = EntityMapper.Map(source); return new SingleOutputDto { diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/CreateAdministratorInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/CreateAdministratorInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/CreateAdministratorInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/CreateAdministratorInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/DeleteAdministratorInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/DeleteAdministratorInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/DeleteAdministratorInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/DeleteAdministratorInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/ReadAdministratorInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/ReadAdministratorInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/ReadAdministratorInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/ReadAdministratorInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/ReadAdministratorOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/ReadAdministratorOutputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/ReadAdministratorOutputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/ReadAdministratorOutputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/UpdateAdministratorInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/UpdateAdministratorInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/Administrator/UpdateAdministratorInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/UpdateAdministratorInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/CreateAdministratorTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/CreateAdministratorTypeInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/CreateAdministratorTypeInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/CreateAdministratorTypeInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/DeleteAdministratorTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/DeleteAdministratorTypeInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/DeleteAdministratorTypeInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/DeleteAdministratorTypeInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/ReadAdministratorTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/ReadAdministratorTypeInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/ReadAdministratorTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeOutputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/ReadAdministratorTypeOutputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/ReadAdministratorTypeOutputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/UpdateAdministratorTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/UpdateAdministratorTypeInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/AdministratorType/UpdateAdministratorTypeInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AdministratorType/UpdateAdministratorTypeInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/CreateAppointmentNoticeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/CreateAppointmentNoticeInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/CreateAppointmentNoticeInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/CreateAppointmentNoticeInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/DeleteAppointmentNoticeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/DeleteAppointmentNoticeInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/DeleteAppointmentNoticeInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/DeleteAppointmentNoticeInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/ReadAppointmentNoticeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/ReadAppointmentNoticeInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/ReadAppointmentNoticeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeOutputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/ReadAppointmentNoticeOutputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/ReadAppointmentNoticeOutputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/UpdateAppointmentNoticeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/UpdateAppointmentNoticeInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/AppointmentNotice/UpdateAppointmentNoticeInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/AppointmentNotice/UpdateAppointmentNoticeInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/CreateDepartmentInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/CreateDepartmentInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/CreateDepartmentInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/CreateDepartmentInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/DeleteDepartmentInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/DeleteDepartmentInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/DeleteDepartmentInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/DeleteDepartmentInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/ReadDepartmentInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/ReadDepartmentInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/ReadDepartmentInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/ReadDepartmentInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/ReadDepartmentOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/ReadDepartmentOutputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/ReadDepartmentOutputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/ReadDepartmentOutputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/UpdateDepartmentInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/UpdateDepartmentInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/Department/UpdateDepartmentInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Department/UpdateDepartmentInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/CreateMenuInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/CreateMenuInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/CreateMenuInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/CreateMenuInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/DeleteMenuInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/DeleteMenuInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/DeleteMenuInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/DeleteMenuInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/MenuViewModel.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/MenuViewModel.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/MenuViewModel.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/MenuViewModel.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/ModuleConsts.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/ModuleConsts.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/ModuleConsts.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/ModuleConsts.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/ReadMenuInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/ReadMenuInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/ReadMenuInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/ReadMenuInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/ReadMenuOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/ReadMenuOutputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/ReadMenuOutputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/ReadMenuOutputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/UpdateMenuInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/UpdateMenuInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/Menu/UpdateMenuInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/UpdateMenuInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/CreateModuleInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Module/CreateModuleInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/CreateModuleInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Module/CreateModuleInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/DeleteModuleInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Module/DeleteModuleInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/DeleteModuleInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Module/DeleteModuleInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/ReadModuleInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Module/ReadModuleInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/ReadModuleInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Module/ReadModuleInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/ReadModuleOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Module/ReadModuleOutputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/ReadModuleOutputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Module/ReadModuleOutputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/UpdateModuleInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Module/UpdateModuleInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/Module/UpdateModuleInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Module/UpdateModuleInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/CreateModulePermissionInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/ModulePermission/CreateModulePermissionInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/CreateModulePermissionInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/ModulePermission/CreateModulePermissionInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/DeleteModulePermissionInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/ModulePermission/DeleteModulePermissionInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/DeleteModulePermissionInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/ModulePermission/DeleteModulePermissionInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/ReadModulePermissionInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/ModulePermission/ReadModulePermissionInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/ReadModulePermissionInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/ModulePermission/ReadModulePermissionInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/ReadModulePermissionOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/ModulePermission/ReadModulePermissionOutputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/ReadModulePermissionOutputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/ModulePermission/ReadModulePermissionOutputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/UpdateModulePermissionInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/ModulePermission/UpdateModulePermissionInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/ModulePermission/UpdateModulePermissionInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/ModulePermission/UpdateModulePermissionInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/CreateNationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/CreateNationInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/CreateNationInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/CreateNationInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/DeleteNationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/DeleteNationInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/DeleteNationInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/DeleteNationInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/ReadNationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/ReadNationInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/ReadNationInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/ReadNationInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/ReadNationOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/ReadNationOutputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/ReadNationOutputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/ReadNationOutputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/UpdateNationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/UpdateNationInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/Nation/UpdateNationInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/UpdateNationInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/PoliticalAffiliationDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/PoliticalAffiliationDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/PoliticalAffiliationDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/PoliticalAffiliationDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/CreatePositionInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/CreatePositionInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/CreatePositionInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/CreatePositionInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/DeletePositionInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/DeletePositionInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/DeletePositionInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/DeletePositionInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/ReadPositionInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/ReadPositionInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/ReadPositionInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/ReadPositionInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/ReadPositionOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/ReadPositionOutputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/ReadPositionOutputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/ReadPositionOutputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/UpdatePositionInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/UpdatePositionInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/Position/UpdatePositionInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Position/UpdatePositionInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/CreateEducationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/CreateEducationInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/CreateEducationInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/CreateEducationInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/DeleteEducationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/DeleteEducationInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/DeleteEducationInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/DeleteEducationInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/ReadEducationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/ReadEducationInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/ReadEducationInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/ReadEducationInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/ReadEducationOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/ReadEducationOutputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/ReadEducationOutputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/ReadEducationOutputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/UpdateEducationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/UpdateEducationInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/Qualification/UpdateEducationInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/UpdateEducationInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/CreateSupervisionStatisticsInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/CreateSupervisionStatisticsInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/CreateSupervisionStatisticsInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/CreateSupervisionStatisticsInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/DeleteSupervisionStatisticsInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/DeleteSupervisionStatisticsInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/DeleteSupervisionStatisticsInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/DeleteSupervisionStatisticsInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/ReadSupervisionStatisticsInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/ReadSupervisionStatisticsInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/ReadSupervisionStatisticsOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsOutputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/ReadSupervisionStatisticsOutputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/ReadSupervisionStatisticsOutputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/UpdateSupervisionStatisticsInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/UpdateSupervisionStatisticsInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/SupervisionStatistics/UpdateSupervisionStatisticsInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SupervisionStatistics/UpdateSupervisionStatisticsInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/CreateSystemInformationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/CreateSystemInformationInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/CreateSystemInformationInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/CreateSystemInformationInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/DeleteSystemInformationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/DeleteSystemInformationInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/DeleteSystemInformationInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/DeleteSystemInformationInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/ReadSystemInformationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/ReadSystemInformationInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/ReadSystemInformationOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationOutputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/ReadSystemInformationOutputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationOutputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/UpdateSystemInformationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/UpdateSystemInformationInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/SystemInformation/UpdateSystemInformationInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/UpdateSystemInformationInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/CreateVipLevelRuleInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/CreateVipLevelRuleInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/CreateVipLevelRuleInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/CreateVipLevelRuleInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/DeleteVipLevelRuleInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/DeleteVipLevelRuleInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/DeleteVipLevelRuleInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/DeleteVipLevelRuleInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/ReadVipLevelRuleInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/ReadVipLevelRuleInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/ReadVipLevelRuleOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleOutputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/ReadVipLevelRuleOutputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/ReadVipLevelRuleOutputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/UpdateVipLevelRuleInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/UpdateVipLevelRuleInputDto.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Contract/Zero/Dto/VipLevelRule/UpdateVipLevelRuleInputDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/VipLevelRule/UpdateVipLevelRuleInputDto.cs diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogOutputDto.cs index be0768f..b6f10db 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogOutputDto.cs @@ -1,4 +1,5 @@ using EOM.TSHotelManagement.Common.Core; +using SqlSugar; namespace EOM.TSHotelManagement.Common.Contract { @@ -12,6 +13,38 @@ namespace EOM.TSHotelManagement.Common.Contract public string SoftwareVersion { get; set; } public string LoginIpAddress { get; set; } public string LogLevelName { get; set; } + /// + /// · (Request Path) + /// + public string RequestPath { get; set; } + /// + /// (Request Payload) + /// + public string RequestPayload { get; set; } + /// + /// Ӧ (Response Payload) + /// + public string ResponsePayload { get; set; } + /// + /// Ӧʱ (Elapsed Time) + /// + public long ElapsedTime { get; set; } + /// + /// 󷽷 (Http Method) + /// + public string HttpMethod { get; set; } + /// + /// ״̬ (Status Code) + /// + public int StatusCode { get; set; } + /// + /// 쳣Ϣ (Exception Message) + /// + public string ExceptionMessage { get; set; } + /// + /// 쳣ջ (Exception Stack Trace) + /// + public string ExceptionStackTrace { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/Zero/Administrator.cs b/EOM.TSHotelManagement.Common.Core/SystemManagement/Administrator.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Core/Zero/Administrator.cs rename to EOM.TSHotelManagement.Common.Core/SystemManagement/Administrator.cs diff --git a/EOM.TSHotelManagement.Common.Core/Zero/AdministratorType.cs b/EOM.TSHotelManagement.Common.Core/SystemManagement/AdministratorType.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Core/Zero/AdministratorType.cs rename to EOM.TSHotelManagement.Common.Core/SystemManagement/AdministratorType.cs diff --git a/EOM.TSHotelManagement.Common.Core/Zero/AppointmentNotice.cs b/EOM.TSHotelManagement.Common.Core/SystemManagement/AppointmentNotice.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Core/Zero/AppointmentNotice.cs rename to EOM.TSHotelManagement.Common.Core/SystemManagement/AppointmentNotice.cs diff --git a/EOM.TSHotelManagement.Common.Core/Zero/Department.cs b/EOM.TSHotelManagement.Common.Core/SystemManagement/Department.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Core/Zero/Department.cs rename to EOM.TSHotelManagement.Common.Core/SystemManagement/Department.cs diff --git a/EOM.TSHotelManagement.Common.Core/Zero/Education.cs b/EOM.TSHotelManagement.Common.Core/SystemManagement/Education.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Core/Zero/Education.cs rename to EOM.TSHotelManagement.Common.Core/SystemManagement/Education.cs diff --git a/EOM.TSHotelManagement.Common.Core/Zero/Menu.cs b/EOM.TSHotelManagement.Common.Core/SystemManagement/Menu.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Core/Zero/Menu.cs rename to EOM.TSHotelManagement.Common.Core/SystemManagement/Menu.cs diff --git a/EOM.TSHotelManagement.Common.Core/Zero/MenuViewModel.cs b/EOM.TSHotelManagement.Common.Core/SystemManagement/MenuViewModel.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Core/Zero/MenuViewModel.cs rename to EOM.TSHotelManagement.Common.Core/SystemManagement/MenuViewModel.cs diff --git a/EOM.TSHotelManagement.Common.Core/Zero/Module.cs b/EOM.TSHotelManagement.Common.Core/SystemManagement/Module.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Core/Zero/Module.cs rename to EOM.TSHotelManagement.Common.Core/SystemManagement/Module.cs diff --git a/EOM.TSHotelManagement.Common.Core/Zero/ModuleConsts.cs b/EOM.TSHotelManagement.Common.Core/SystemManagement/ModuleConsts.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Core/Zero/ModuleConsts.cs rename to EOM.TSHotelManagement.Common.Core/SystemManagement/ModuleConsts.cs diff --git a/EOM.TSHotelManagement.Common.Core/Zero/ModulePermission.cs b/EOM.TSHotelManagement.Common.Core/SystemManagement/ModulePermission.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Core/Zero/ModulePermission.cs rename to EOM.TSHotelManagement.Common.Core/SystemManagement/ModulePermission.cs diff --git a/EOM.TSHotelManagement.Common.Core/Zero/Nation.cs b/EOM.TSHotelManagement.Common.Core/SystemManagement/Nation.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Core/Zero/Nation.cs rename to EOM.TSHotelManagement.Common.Core/SystemManagement/Nation.cs diff --git a/EOM.TSHotelManagement.Common.Core/Zero/PoliticalAffiliation.cs b/EOM.TSHotelManagement.Common.Core/SystemManagement/PoliticalAffiliation.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Core/Zero/PoliticalAffiliation.cs rename to EOM.TSHotelManagement.Common.Core/SystemManagement/PoliticalAffiliation.cs diff --git a/EOM.TSHotelManagement.Common.Core/Zero/position.cs b/EOM.TSHotelManagement.Common.Core/SystemManagement/Position.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Core/Zero/position.cs rename to EOM.TSHotelManagement.Common.Core/SystemManagement/Position.cs diff --git a/EOM.TSHotelManagement.Common.Core/Zero/SupervisionStatistics.cs b/EOM.TSHotelManagement.Common.Core/SystemManagement/SupervisionStatistics.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Core/Zero/SupervisionStatistics.cs rename to EOM.TSHotelManagement.Common.Core/SystemManagement/SupervisionStatistics.cs diff --git a/EOM.TSHotelManagement.Common.Core/Zero/SystemInformation.cs b/EOM.TSHotelManagement.Common.Core/SystemManagement/SystemInformation.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Core/Zero/SystemInformation.cs rename to EOM.TSHotelManagement.Common.Core/SystemManagement/SystemInformation.cs diff --git a/EOM.TSHotelManagement.Common.Core/Zero/VipLevelRule.cs b/EOM.TSHotelManagement.Common.Core/SystemManagement/VipLevelRule.cs similarity index 100% rename from EOM.TSHotelManagement.Common.Core/Zero/VipLevelRule.cs rename to EOM.TSHotelManagement.Common.Core/SystemManagement/VipLevelRule.cs diff --git a/EOM.TSHotelManagement.Common.Core/Util/OperationLog.cs b/EOM.TSHotelManagement.Common.Core/Util/OperationLog.cs index 46709f1..7b09877 100644 --- a/EOM.TSHotelManagement.Common.Core/Util/OperationLog.cs +++ b/EOM.TSHotelManagement.Common.Core/Util/OperationLog.cs @@ -101,5 +101,47 @@ namespace EOM.TSHotelManagement.Common.Core /// [SugarColumn(IsIgnore = true)] public string LogLevelName { get; set; } + + + /// + /// 请求路径 (Request Path) + /// + [SugarColumn(ColumnName = "request_path")] + public string RequestPath { get; set; } + /// + /// 请求负载 (Request Payload) + /// + [SugarColumn(ColumnName = "request_payload")] + public string RequestPayload { get; set; } + /// + /// 响应负载 (Response Payload) + /// + [SugarColumn(ColumnName = "response_payload")] + public string ResponsePayload { get; set; } + /// + /// 响应时间 (Elapsed Time) + /// + [SugarColumn(ColumnName = "elapsed_time")] + public long ElapsedTime { get; set; } + /// + /// 请求方法 (Http Method) + /// + [SugarColumn(ColumnName = "http_method")] + public string HttpMethod { get; set; } + /// + /// 状态码 (Status Code) + /// + [SugarColumn(ColumnName = "status_code")] + public int StatusCode { get; set; } + /// + /// 异常消息 (Exception Message) + /// + [SugarColumn(ColumnName = "exception_message")] + public string ExceptionMessage { get; set; } + /// + /// 异常堆栈 (Exception Stack Trace) + /// + [SugarColumn(ColumnName = "exception_stacktrace")] + public string ExceptionStackTrace { get; set; } } } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Zero/Administrator/AdminController.cs b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Administrator/AdminController.cs similarity index 98% rename from EOM.TSHotelManagement.WebApi/Controllers/Zero/Administrator/AdminController.cs rename to EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Administrator/AdminController.cs index 4ed912f..4593d0a 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Zero/Administrator/AdminController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Administrator/AdminController.cs @@ -1,4 +1,4 @@ -using EOM.TSHotelManagement.Application; +using EOM.TSHotelManagement.Application.SystemManagement.Administrator; using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; using Microsoft.AspNetCore.Authorization; diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Zero/Base/BaseController.cs b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Base/BaseController.cs similarity index 99% rename from EOM.TSHotelManagement.WebApi/Controllers/Zero/Base/BaseController.cs rename to EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Base/BaseController.cs index 5a613ba..13419ea 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Zero/Base/BaseController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Base/BaseController.cs @@ -1,4 +1,4 @@ -using EOM.TSHotelManagement.Application; +using EOM.TSHotelManagement.Application.SystemManagement.Base; using EOM.TSHotelManagement.Common; using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Zero/Menu/MenuController.cs b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Menu/MenuController.cs similarity index 96% rename from EOM.TSHotelManagement.WebApi/Controllers/Zero/Menu/MenuController.cs rename to EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Menu/MenuController.cs index 38f97af..9e20fb8 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Zero/Menu/MenuController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Menu/MenuController.cs @@ -1,4 +1,4 @@ -using EOM.TSHotelManagement.Application; +using EOM.TSHotelManagement.Application.SystemManagement.Menu; using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; using Microsoft.AspNetCore.Authorization; diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Zero/Module/ModuleController.cs b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Module/ModuleController.cs similarity index 94% rename from EOM.TSHotelManagement.WebApi/Controllers/Zero/Module/ModuleController.cs rename to EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Module/ModuleController.cs index 1bb937b..a1cd881 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Zero/Module/ModuleController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Module/ModuleController.cs @@ -1,8 +1,8 @@ -using EOM.TSHotelManagement.Application; -using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Core; using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Mvc; using System.Collections.Generic; +using EOM.TSHotelManagement.Application.SystemManagement.Module; namespace EOM.TSHotelManagement.WebApi.Controllers { diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Zero/Notice/NoticeController.cs b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Notice/NoticeController.cs similarity index 93% rename from EOM.TSHotelManagement.WebApi/Controllers/Zero/Notice/NoticeController.cs rename to EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Notice/NoticeController.cs index ecd829d..2b79aec 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Zero/Notice/NoticeController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Notice/NoticeController.cs @@ -1,8 +1,8 @@ -using EOM.TSHotelManagement.Application; -using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Core; using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Mvc; using System.Collections.Generic; +using EOM.TSHotelManagement.Application.SystemManagement.Notice; namespace EOM.TSHotelManagement.WebApi.Controllers { diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Zero/SupervisionStatistics/SupervisionStatisticsController.cs b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/SupervisionStatistics/SupervisionStatisticsController.cs similarity index 94% rename from EOM.TSHotelManagement.WebApi/Controllers/Zero/SupervisionStatistics/SupervisionStatisticsController.cs rename to EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/SupervisionStatistics/SupervisionStatisticsController.cs index 19d06af..a6ace94 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Zero/SupervisionStatistics/SupervisionStatisticsController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/SupervisionStatistics/SupervisionStatisticsController.cs @@ -1,8 +1,8 @@ -using EOM.TSHotelManagement.Application; -using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Core; using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Mvc; using System.Collections.Generic; +using EOM.TSHotelManagement.Application.SystemManagement.SupervisionStatistics; namespace EOM.TSHotelManagement.WebApi.Controllers { diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Zero/VipRule/VipRuleController.cs b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/VipRule/VipRuleController.cs similarity index 95% rename from EOM.TSHotelManagement.WebApi/Controllers/Zero/VipRule/VipRuleController.cs rename to EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/VipRule/VipRuleController.cs index 2f1627e..fd85b1c 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Zero/VipRule/VipRuleController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/VipRule/VipRuleController.cs @@ -1,8 +1,8 @@ -using EOM.TSHotelManagement.Application; -using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Core; using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Mvc; using System.Collections.Generic; +using EOM.TSHotelManagement.Application.SystemManagement.VipRule; namespace EOM.TSHotelManagement.WebApi.Controllers { diff --git a/EOM.TSHotelManagement.WebApi/Filter/ApiLoggerFilter.cs b/EOM.TSHotelManagement.WebApi/Filter/ApiLoggerFilter.cs index f0a8f2c..fe293a4 100644 --- a/EOM.TSHotelManagement.WebApi/Filter/ApiLoggerFilter.cs +++ b/EOM.TSHotelManagement.WebApi/Filter/ApiLoggerFilter.cs @@ -1,47 +1,167 @@ using EOM.TSHotelManagement.Common.Core; using EOM.TSHotelManagement.EntityFramework; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Controllers; using Microsoft.AspNetCore.Mvc.Filters; using Microsoft.Extensions.Logging; +using Newtonsoft.Json; using System; +using System.Diagnostics; +using System.IO; using System.Linq; +using System.Text; +using System.Threading.Tasks; using LogLevel = EOM.TSHotelManagement.Common.Core.LogLevel; namespace EOM.TSHotelManagement.WebApi.Filter { - public class ApiLoggerFilter : IActionFilter + public class ApiLoggerFilter : IAsyncActionFilter { - private readonly GenericRepository operationLogRepository; + private readonly GenericRepository _operationLogRepository; + private const int MaxPayloadLength = 2000; + private readonly bool _logSensitiveData = false; public ApiLoggerFilter(GenericRepository operationLogRepository) { - this.operationLogRepository = operationLogRepository; + _operationLogRepository = operationLogRepository; } - public void OnActionExecuting(ActionExecutingContext context) + public async Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next) + { + var stopwatch = Stopwatch.StartNew(); + var httpContext = context.HttpContext; + var operationLog = CreateOperationLog(context); + + try + { + await LogRequestPayload(httpContext, operationLog); + + var resultContext = await next(); + + await LogResponsePayload(resultContext, operationLog); + + if (resultContext.Exception != null) + { + HandleException(resultContext.Exception, operationLog); + } + } + catch (Exception ex) + { + HandleException(ex, operationLog); + throw; + } + finally + { + stopwatch.Stop(); + operationLog.ElapsedTime = stopwatch.ElapsedMilliseconds; + await SaveLogAsync(operationLog); + } + } + + private OperationLog CreateOperationLog(ActionContext context) { var httpContext = context.HttpContext; - var controllerName = context.Controller.GetType().Name; var actionDescriptor = context.ActionDescriptor as ControllerActionDescriptor; - var actionName = actionDescriptor?.ActionName ?? "Unknown"; - var path = httpContext.Request.Path; - var clientIp = httpContext.Request.Headers["X-Forwarded-For"].FirstOrDefault() - ?? httpContext.Connection.RemoteIpAddress?.ToString(); - operationLogRepository.Insert(new OperationLog + return new OperationLog { OperationTime = DateTime.Now, - LogContent = $"[{controllerName}] {actionName} {path} {clientIp}", OperationAccount = "System", SoftwareVersion = "1.0.0", - LoginIpAddress = clientIp, LogLevel = LogLevel.Normal, IsDelete = 0, DataInsUsr = "System", - DataInsDate = DateTime.Now - }); + DataInsDate = DateTime.Now, + LoginIpAddress = GetClientIp(httpContext), + LogContent = $"[{actionDescriptor?.ControllerTypeInfo.Name}] {actionDescriptor?.ActionName}", + HttpMethod = httpContext.Request.Method, + RequestPath = httpContext.Request.Path, + StatusCode = httpContext.Response.StatusCode + }; + } + + private async Task LogRequestPayload(HttpContext httpContext, OperationLog log) + { + if (!httpContext.Request.ContentLength.HasValue || httpContext.Request.ContentLength == 0) + return; + + httpContext.Request.EnableBuffering(); + + using (var reader = new StreamReader( + httpContext.Request.Body, + encoding: Encoding.UTF8, + detectEncodingFromByteOrderMarks: false, + bufferSize: 1024, + leaveOpen: true)) + { + var requestBody = await reader.ReadToEndAsync(); + httpContext.Request.Body.Position = 0; + + log.RequestPayload = TruncateString(requestBody, MaxPayloadLength); + } + + // 记录查询参数 + if (_logSensitiveData) + { + log.QueryString = httpContext.Request.QueryString.Value; + } } - public void OnActionExecuted(ActionExecutedContext context) { } + private async Task LogResponsePayload(ActionExecutedContext context, OperationLog log) + { + if (context.Result != null) + { + var response = context.HttpContext.Response; + response.Body.Seek(0, SeekOrigin.Begin); + + using (var reader = new StreamReader(response.Body, Encoding.UTF8, leaveOpen: true)) + { + log.ResponsePayload = TruncateString(await reader.ReadToEndAsync(), MaxPayloadLength); + response.Body.Seek(0, SeekOrigin.Begin); + } + } + + log.StatusCode = context.HttpContext.Response.StatusCode; + } + + private void HandleException(Exception exception, OperationLog log) + { + log.LogLevel = LogLevel.Error; + log.ExceptionMessage = exception.Message; + log.ExceptionStackTrace = exception.StackTrace; + log.ResponsePayload = TruncateString(JsonConvert.SerializeObject(new + { + error = exception.GetType().Name, + exception.Message + }), MaxPayloadLength); + } + + private async Task SaveLogAsync(OperationLog log) + { + try + { + // 使用异步保存提高性能 + await _operationLogRepository.InsertAsync(log); + } + catch (Exception ex) + { + // 日志存储失败处理 + Debug.WriteLine($"Log save failed: {ex.Message}"); + } + } + + private string TruncateString(string value, int maxLength) + { + return string.IsNullOrEmpty(value) + ? value + : (value.Length <= maxLength ? value : value.Substring(0, maxLength) + "...[TRUNCATED]"); + } + + private string GetClientIp(HttpContext context) + { + return context.Request.Headers["X-Forwarded-For"].FirstOrDefault() + ?? context.Connection.RemoteIpAddress?.ToString(); + } } -} +} \ No newline at end of file -- Gitee From 02bfcadf8fe46e477fa82ddc1369bfd47fe7039a Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Sun, 30 Mar 2025 16:07:28 +0800 Subject: [PATCH 09/24] update entity fields. remove not use entity and module. --- .../SystemManagement/Base/BaseService.cs | 4 +- .../Module/AdminModuleZeroService.cs | 166 ----------------- .../Module/IAdminModuleZeroService.cs | 39 ---- .../Dto/Nation/CreateNationInputDto.cs | 1 + .../Dto/Nation/DeleteNationInputDto.cs | 1 + .../Dto/Nation/UpdateNationInputDto.cs | 2 +- .../BaseEntity.cs | 9 +- .../Business/Asset/Asset.cs | 16 +- .../Business/Customer/CustoType.cs | 6 +- .../Business/Customer/Customer.cs | 2 +- .../Business/Customer/GenderType.cs | 6 +- .../Business/Customer/PassPortType.cs | 6 +- .../EnergyManagement/EnergyManagement.cs | 18 +- .../PromotionContent/PromotionContent.cs | 6 +- .../Business/Reser/Reser.cs | 14 +- .../Business/Room/RoomState.cs | 6 +- .../Business/Room/RoomType.cs | 6 +- .../Business/Sellthing/SellThing.cs | 10 +- .../Business/Spend/Spend.cs | 23 ++- .../Employee/Employee.cs | 36 ++-- .../Employee/EmployeeCheck.cs | 16 +- .../Employee/EmployeeHistory.cs | 18 +- .../Employee/EmployeePhoto.cs | 12 +- .../Employee/EmployeeRewardPunishment.cs | 18 +- .../Employee/RewardPunishmentType.cs | 6 +- .../SystemManagement/Administrator.cs | 20 ++- .../SystemManagement/AdministratorType.cs | 8 +- .../SystemManagement/AppointmentNotice.cs | 14 +- .../SystemManagement/Department.cs | 8 +- .../SystemManagement/Education.cs | 8 +- .../SystemManagement/Menu.cs | 7 - .../SystemManagement/Module.cs | 29 --- .../SystemManagement/ModuleConsts.cs | 73 -------- .../SystemManagement/ModulePermission.cs | 36 ---- .../SystemManagement/Nation.cs | 6 - .../SystemManagement/Position.cs | 6 - .../SystemManagement/SupervisionStatistics.cs | 16 +- .../SystemManagement/SystemInformation.cs | 2 +- .../Util/ApplicationVersion.cs | 2 +- .../Util/CardCode.cs | 10 +- .../Util/OperationLog.cs | 21 ++- .../Administrator/AdminController.cs | 2 +- .../SystemManagement/Base/BaseController.cs | 7 +- .../SystemManagement/Menu/MenuController.cs | 2 +- .../Module/ModuleController.cs | 65 ------- .../Notice/NoticeController.cs | 2 +- .../SupervisionStatisticsController.cs | 2 +- .../VipRule/VipRuleController.cs | 2 +- .../Filter/ApiLoggerFilter.cs | 167 ------------------ .../Filter/RequestLoggingMiddleware.cs | 135 ++++++++++++++ EOM.TSHotelManagement.WebApi/Startup.cs | 40 ++--- EOM.TSHotelManagement.WebApi/appsettings.json | 5 +- 52 files changed, 327 insertions(+), 815 deletions(-) delete mode 100644 EOM.TSHotelManagement.Application/SystemManagement/Module/AdminModuleZeroService.cs delete mode 100644 EOM.TSHotelManagement.Application/SystemManagement/Module/IAdminModuleZeroService.cs delete mode 100644 EOM.TSHotelManagement.Common.Core/SystemManagement/Module.cs delete mode 100644 EOM.TSHotelManagement.Common.Core/SystemManagement/ModuleConsts.cs delete mode 100644 EOM.TSHotelManagement.Common.Core/SystemManagement/ModulePermission.cs delete mode 100644 EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Module/ModuleController.cs delete mode 100644 EOM.TSHotelManagement.WebApi/Filter/ApiLoggerFilter.cs create mode 100644 EOM.TSHotelManagement.WebApi/Filter/RequestLoggingMiddleware.cs diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Base/BaseService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Base/BaseService.cs index 504a9e2..de9079f 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/Base/BaseService.cs +++ b/EOM.TSHotelManagement.Application/SystemManagement/Base/BaseService.cs @@ -380,7 +380,7 @@ namespace EOM.TSHotelManagement.Application IsDelete = deleteNationInputDto.IsDelete, DataChgUsr = deleteNationInputDto.DataChgUsr, DataChgDate = deleteNationInputDto.DataChgDate - }, a => a.Id == deleteNationInputDto.NationId); + }, a => a.NationNumber == deleteNationInputDto.NationNumber); return new BaseOutputDto { StatusCode = result ? StatusCodeConstants.Success : StatusCodeConstants.InternalServerError }; } @@ -396,7 +396,7 @@ namespace EOM.TSHotelManagement.Application NationName = updateNationInputDto.NationName, DataChgUsr = updateNationInputDto.DataChgUsr, DataChgDate = updateNationInputDto.DataChgDate - }, a => a.Id == updateNationInputDto.NationId); + }, a => a.NationNumber == updateNationInputDto.NationNumber); return new BaseOutputDto { StatusCode = result ? StatusCodeConstants.Success : StatusCodeConstants.InternalServerError }; } diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Module/AdminModuleZeroService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Module/AdminModuleZeroService.cs deleted file mode 100644 index 02603c2..0000000 --- a/EOM.TSHotelManagement.Application/SystemManagement/Module/AdminModuleZeroService.cs +++ /dev/null @@ -1,166 +0,0 @@ -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Core; -using EOM.TSHotelManagement.Common.Util; -using EOM.TSHotelManagement.EntityFramework; - -namespace EOM.TSHotelManagement.Application -{ - /// - /// 管理员模块权限管理接口实现类 - /// - public class AdminModuleZeroService : IAdminModuleZeroService - { - /// - /// 模块权限 - /// - private readonly GenericRepository moduleZeroRepository; - - /// - /// - /// - /// - public AdminModuleZeroService(GenericRepository moduleZeroRepository) - { - this.moduleZeroRepository = moduleZeroRepository; - } - - /// - /// 获取所有模块 - /// - /// - public ListOutputDto GetAllModule() - { - List modules = moduleZeroRepository.Change().GetList(); - modules.ForEach(source => - { - switch (source.ModuleName) - { - case ModuleConsts.BaseInfo: - source.ModuleName = ModuleConsts.BaseInfo + "||" + "基础信息"; - break; - case ModuleConsts.CashInfo: - source.ModuleName = ModuleConsts.CashInfo + "||" + "财务信息"; - break; - case ModuleConsts.WtiInfo: - source.ModuleName = ModuleConsts.WtiInfo + "||" + "水电管理"; - break; - case ModuleConsts.SupervisionStatistics: - source.ModuleName = ModuleConsts.SupervisionStatistics + "||" + "监管统计"; - break; - case ModuleConsts.RoomManager: - source.ModuleName = ModuleConsts.RoomManager + "||" + "客房管理"; - break; - case ModuleConsts.CustomerManager: - source.ModuleName = ModuleConsts.CustomerManager + "||" + "客户管理"; - break; - case ModuleConsts.HumanResourcesManager: - source.ModuleName = ModuleConsts.HumanResourcesManager + "||" + "人事管理"; - break; - case ModuleConsts.MaterialManager: - source.ModuleName = ModuleConsts.MaterialManager + "||" + "物资管理"; - break; - case ModuleConsts.OperationLogManager: - source.ModuleName = ModuleConsts.OperationLogManager + "||" + "员工操作日志"; - break; - case ModuleConsts.AdminManager: - source.ModuleName = ModuleConsts.AdminManager + "||" + "系统管理"; - break; - } - }); - - var listSource = EntityMapper.MapList(modules); - - return new ListOutputDto - { - listSource = listSource, - total = listSource.Count - }; - - } - - /// - /// 根据账号获取对应模块 - /// - /// - /// - public ListOutputDto GetAllModuleByAdmin(ReadModulePermissionInputDto admin) - { - List moduleZeros = moduleZeroRepository.GetList(a => a.AdministratorAccount.Equals(admin.Account) - && a.ModuleEnabled == 1); - moduleZeros.ForEach(source => - { - switch (source.ModuleName) - { - case ModuleConsts.BaseInfo: - source.ModuleName = ModuleConsts.BaseInfo + "||" + "基础信息"; - break; - case ModuleConsts.CashInfo: - source.ModuleName = ModuleConsts.CashInfo + "||" + "财务信息"; - break; - case ModuleConsts.WtiInfo: - source.ModuleName = ModuleConsts.WtiInfo + "||" + "水电管理"; - break; - case ModuleConsts.SupervisionStatistics: - source.ModuleName = ModuleConsts.SupervisionStatistics + "||" + "监管统计"; - break; - case ModuleConsts.RoomManager: - source.ModuleName = ModuleConsts.RoomManager + "||" + "客房管理"; - break; - case ModuleConsts.CustomerManager: - source.ModuleName = ModuleConsts.CustomerManager + "||" + "客户管理"; - break; - case ModuleConsts.HumanResourcesManager: - source.ModuleName = ModuleConsts.HumanResourcesManager + "||" + "人事管理"; - break; - case ModuleConsts.MaterialManager: - source.ModuleName = ModuleConsts.MaterialManager + "||" + "物资管理"; - break; - case ModuleConsts.OperationLogManager: - source.ModuleName = ModuleConsts.OperationLogManager + "||" + "员工操作日志"; - break; - case ModuleConsts.AdminManager: - source.ModuleName = ModuleConsts.AdminManager + "||" + "系统管理"; - break; - } - }); - - var listSource = EntityMapper.MapList(moduleZeros); - - return new ListOutputDto - { - listSource = listSource, - total = listSource.Count - }; - } - - /// - /// 批量添加模块 - /// - /// - /// - public BaseOutputDto AddModuleZeroList(List moduleZeros) - { - moduleZeros.ForEach(moduleZero => - { - moduleZero.ModuleName = moduleZero.ModuleName.Split('|', '|').FirstOrDefault().ToString(); - }); - var result = moduleZeroRepository.InsertRange(moduleZeros); - - return new BaseOutputDto(); - } - - /// - /// 批量删除模块 - /// - /// - /// - public BaseOutputDto DelModuleZeroList(DeleteModulePermissionInputDto moduleZero) - { - var result = moduleZeroRepository.Delete(a => a.AdministratorAccount.Equals(moduleZero.AdministratorAccount)); - - return new BaseOutputDto(); - } - - - } -} diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Module/IAdminModuleZeroService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Module/IAdminModuleZeroService.cs deleted file mode 100644 index a6a4fbf..0000000 --- a/EOM.TSHotelManagement.Application/SystemManagement/Module/IAdminModuleZeroService.cs +++ /dev/null @@ -1,39 +0,0 @@ -using EOM.TSHotelManagement.Common.Contract; -using EOM.TSHotelManagement.Common.Core; - -namespace EOM.TSHotelManagement.Application -{ - /// - /// 管理员模块权限管理接口 - /// - public interface IAdminModuleZeroService - { - /// - /// 获取所有模块 - /// - /// - ListOutputDto GetAllModule(); - - /// - /// 根据账号获取对应模块 - /// - /// - /// - ListOutputDto GetAllModuleByAdmin(ReadModulePermissionInputDto admin); - - /// - /// 批量添加模块 - /// - /// - /// - BaseOutputDto AddModuleZeroList(List moduleZeros); - - /// - /// 批量删除模块 - /// - /// - /// - BaseOutputDto DelModuleZeroList(DeleteModulePermissionInputDto moduleZero); - - } -} diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/CreateNationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/CreateNationInputDto.cs index 8d2655a..1ff8441 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/CreateNationInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/CreateNationInputDto.cs @@ -2,6 +2,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public class CreateNationInputDto: BaseInputDto { + public string NationNumber { get; set; } public string NationName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/DeleteNationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/DeleteNationInputDto.cs index 642783f..7063535 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/DeleteNationInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/DeleteNationInputDto.cs @@ -3,6 +3,7 @@ namespace EOM.TSHotelManagement.Common.Contract public class DeleteNationInputDto: BaseInputDto { public int NationId { get; set; } + public string NationNumber { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/UpdateNationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/UpdateNationInputDto.cs index 6f80e42..3d194d5 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/UpdateNationInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Nation/UpdateNationInputDto.cs @@ -2,7 +2,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public class UpdateNationInputDto: BaseInputDto { - public int NationId { get; set; } + public string NationNumber { get; set; } public string NationName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/BaseEntity.cs b/EOM.TSHotelManagement.Common.Core/BaseEntity.cs index 342b0a5..fdfbdb1 100644 --- a/EOM.TSHotelManagement.Common.Core/BaseEntity.cs +++ b/EOM.TSHotelManagement.Common.Core/BaseEntity.cs @@ -1,10 +1,15 @@ -using System; +using SqlSugar; +using System; namespace EOM.TSHotelManagement.Common.Core { public class BaseEntity { - + /// + /// 编号 (ID) + /// + [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)] + public int Id { get; set; } /// /// 删除标识 /// diff --git a/EOM.TSHotelManagement.Common.Core/Business/Asset/Asset.cs b/EOM.TSHotelManagement.Common.Core/Business/Asset/Asset.cs index 5744e30..5addba2 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Asset/Asset.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Asset/Asset.cs @@ -29,27 +29,27 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 资产管理 /// - [SqlSugar.SugarTable("cashinfo")] + [SqlSugar.SugarTable("asset")] public class Asset : BaseEntity { /// /// 资产编号 (Asset Number) /// - [SqlSugar.SugarColumn(ColumnName = "CashNo")] + [SqlSugar.SugarColumn(ColumnName = "asset_number")] [NeedValid] public string AssetNumber { get; set; } /// /// 资产名称 (Asset Name) /// - [SqlSugar.SugarColumn(ColumnName = "CashName")] + [SqlSugar.SugarColumn(ColumnName = "asset_name")] [NeedValid] public string AssetName { get; set; } /// /// 资产总值 (Asset Value) /// - [SqlSugar.SugarColumn(ColumnName = "CashPrice")] + [SqlSugar.SugarColumn(ColumnName = "asset_value")] [NeedValid] public decimal AssetValue { get; set; } @@ -63,7 +63,7 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 所属部门代码 (Department Code) /// - [SqlSugar.SugarColumn(ColumnName = "CashClub")] + [SqlSugar.SugarColumn(ColumnName = "department_code")] [NeedValid] public string DepartmentCode { get; set; } @@ -76,21 +76,21 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 入库时间 (购置日期) (Acquisition Date) /// - [SqlSugar.SugarColumn(ColumnName = "CashTime")] + [SqlSugar.SugarColumn(ColumnName = "acquisition_date")] [NeedValid] public DateTime AcquisitionDate { get; set; } /// /// 资产来源 (Asset Source) /// - [SqlSugar.SugarColumn(ColumnName = "CashSource")] + [SqlSugar.SugarColumn(ColumnName = "asset_source")] [NeedValid] public string AssetSource { get; set; } /// /// 资产经办人 (员工ID) (Acquired By - Employee ID) /// - [SqlSugar.SugarColumn(ColumnName = "CashPerson")] + [SqlSugar.SugarColumn(ColumnName = "acquired_by_employee")] [NeedValid] public string AcquiredByEmployeeId { get; set; } diff --git a/EOM.TSHotelManagement.Common.Core/Business/Customer/CustoType.cs b/EOM.TSHotelManagement.Common.Core/Business/Customer/CustoType.cs index a7d456f..283841b 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Customer/CustoType.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Customer/CustoType.cs @@ -27,19 +27,19 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 客户类型 /// - [SqlSugar.SugarTable("usertype")] + [SqlSugar.SugarTable("custo_type")] public class CustoType : BaseEntity { /// /// 客户类型 (Customer Type) /// - [SqlSugar.SugarColumn(ColumnName = "UserType")] + [SqlSugar.SugarColumn(ColumnName = "custo_type")] public int CustomerType { get; set; } /// /// 客户类型名称 (Customer Type Name) /// - [SqlSugar.SugarColumn(ColumnName = "TypeName")] + [SqlSugar.SugarColumn(ColumnName = "type_name")] public string CustomerTypeName { get; set; } } diff --git a/EOM.TSHotelManagement.Common.Core/Business/Customer/Customer.cs b/EOM.TSHotelManagement.Common.Core/Business/Customer/Customer.cs index fe5ff24..70b1232 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Customer/Customer.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Customer/Customer.cs @@ -50,7 +50,7 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 客户性别 (Customer Gender) /// - [SqlSugar.SugarColumn(ColumnName = "custo_sex", IsNullable = true)] + [SqlSugar.SugarColumn(ColumnName = "custo_gender", IsNullable = true)] public int? CustomerGender { get; set; } /// diff --git a/EOM.TSHotelManagement.Common.Core/Business/Customer/GenderType.cs b/EOM.TSHotelManagement.Common.Core/Business/Customer/GenderType.cs index f5896c0..7ddf472 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Customer/GenderType.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Customer/GenderType.cs @@ -27,19 +27,19 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 性别 /// - [SqlSugar.SugarTable("sextype")] + [SqlSugar.SugarTable("gender_type")] public class GenderType : BaseEntity { /// /// 性别 ID (Gender ID) /// - [SqlSugar.SugarColumn(ColumnName = "sexId")] + [SqlSugar.SugarColumn(ColumnName = "gender_number")] public int GenderId { get; set; } /// /// 性别名称 (Gender Name) /// - [SqlSugar.SugarColumn(ColumnName = "sexName")] + [SqlSugar.SugarColumn(ColumnName = "gender_name")] public string GenderName { get; set; } } diff --git a/EOM.TSHotelManagement.Common.Core/Business/Customer/PassPortType.cs b/EOM.TSHotelManagement.Common.Core/Business/Customer/PassPortType.cs index a1ddbce..29a213b 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Customer/PassPortType.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Customer/PassPortType.cs @@ -27,19 +27,19 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 证件类型 /// - [SqlSugar.SugarTable("passporttype")] + [SqlSugar.SugarTable("passport_type")] public class PassportType : BaseEntity { /// /// 证件类型 /// - [SqlSugar.SugarColumn(ColumnName = "PassportId")] + [SqlSugar.SugarColumn(ColumnName = "passport_number")] public string PassportId { get; set; } /// /// 证件名称 /// - [SqlSugar.SugarColumn(ColumnName = "PassportName")] + [SqlSugar.SugarColumn(ColumnName = "passport_name")] public string PassportName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/Business/EnergyManagement/EnergyManagement.cs b/EOM.TSHotelManagement.Common.Core/Business/EnergyManagement/EnergyManagement.cs index 0cfa665..66b7e08 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/EnergyManagement/EnergyManagement.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/EnergyManagement/EnergyManagement.cs @@ -29,55 +29,55 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 水电信息 /// - [SqlSugar.SugarTable("wtinfo")] + [SqlSugar.SugarTable("energy_management")] public class EnergyManagement : BaseEntity { /// /// 信息编号 (Information ID) /// - [SqlSugar.SugarColumn(ColumnName = "WtiNo", IsIdentity = true, IsPrimaryKey = true)] + [SqlSugar.SugarColumn(ColumnName = "information_number", IsIdentity = true, IsPrimaryKey = true)] public int InformationId { get; set; } /// /// 房间编号 (Room Number) /// - [SqlSugar.SugarColumn(ColumnName = "RoomNo")] + [SqlSugar.SugarColumn(ColumnName = "room_no")] public string RoomNumber { get; set; } /// /// 开始使用时间 (Start Date) /// - [SqlSugar.SugarColumn(ColumnName = "UseDate")] + [SqlSugar.SugarColumn(ColumnName = "use_date")] public DateTime StartDate { get; set; } /// /// 结束使用时间 (End Date) /// - [SqlSugar.SugarColumn(ColumnName = "EndDate")] + [SqlSugar.SugarColumn(ColumnName = "end_date")] public DateTime EndDate { get; set; } /// /// 水费 (Water Usage) /// - [SqlSugar.SugarColumn(ColumnName = "WaterUse")] + [SqlSugar.SugarColumn(ColumnName = "water_use")] public decimal WaterUsage { get; set; } /// /// 电费 (Power Usage) /// - [SqlSugar.SugarColumn(ColumnName = "PowerUse")] + [SqlSugar.SugarColumn(ColumnName = "power_use")] public decimal PowerUsage { get; set; } /// /// 记录员 (Recorder) /// - [SqlSugar.SugarColumn(ColumnName = "Record", DefaultValue = "Administrator")] + [SqlSugar.SugarColumn(ColumnName = "recorder", DefaultValue = "Administrator")] public string Recorder { get; set; } /// /// 客户编号 (Customer Number) /// - [SqlSugar.SugarColumn(ColumnName = "CustoNo")] + [SqlSugar.SugarColumn(ColumnName = "custo_no")] public string CustomerNumber { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/Business/PromotionContent/PromotionContent.cs b/EOM.TSHotelManagement.Common.Core/Business/PromotionContent/PromotionContent.cs index 9fbca95..361fd5f 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/PromotionContent/PromotionContent.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/PromotionContent/PromotionContent.cs @@ -27,19 +27,19 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 酒店宣传联动内容 /// - [SqlSugar.SugarTable("fonts")] + [SqlSugar.SugarTable("app_banner")] public class PromotionContent { /// /// 宣传内容编号 (Promotion Content ID) /// - [SqlSugar.SugarColumn(ColumnName = "FontsId")] + [SqlSugar.SugarColumn(ColumnName = "banner_number")] public int PromotionContentId { get; set; } /// /// 宣传内容 (Promotion Content Message) /// - [SqlSugar.SugarColumn(ColumnName = "FontsMess")] + [SqlSugar.SugarColumn(ColumnName = "banner_content")] public string PromotionContentMessage { get; set; } } diff --git a/EOM.TSHotelManagement.Common.Core/Business/Reser/Reser.cs b/EOM.TSHotelManagement.Common.Core/Business/Reser/Reser.cs index eebbd10..e1c9837 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Reser/Reser.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Reser/Reser.cs @@ -35,43 +35,43 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 预约编号 (Reservation ID) /// - [SqlSugar.SugarColumn(ColumnName = "ReserId")] + [SqlSugar.SugarColumn(ColumnName = "reser_number")] public string ReservationId { get; set; } /// /// 客户名称 (Customer Name) /// - [SqlSugar.SugarColumn(ColumnName = "CustoName")] + [SqlSugar.SugarColumn(ColumnName = "custo_name")] public string CustomerName { get; set; } /// /// 预约电话 (Reservation Phone Number) /// - [SqlSugar.SugarColumn(ColumnName = "CustoTel")] + [SqlSugar.SugarColumn(ColumnName = "custo_tel")] public string ReservationPhoneNumber { get; set; } /// /// 预约渠道 (Reservation Channel) /// - [SqlSugar.SugarColumn(ColumnName = "ReserWay")] + [SqlSugar.SugarColumn(ColumnName = "reser_way")] public string ReservationChannel { get; set; } /// /// 预约房号 (Reservation Room Number) /// - [SqlSugar.SugarColumn(ColumnName = "ReserRoom")] + [SqlSugar.SugarColumn(ColumnName = "reser_room")] public string ReservationRoomNumber { get; set; } /// /// 预约起始日期 (Reservation Start Date) /// - [SqlSugar.SugarColumn(ColumnName = "ReserDate")] + [SqlSugar.SugarColumn(ColumnName = "reser_date")] public DateTime ReservationStartDate { get; set; } /// /// 预约结束日期 (Reservation End Date) /// - [SqlSugar.SugarColumn(ColumnName = "ReserEndDay")] + [SqlSugar.SugarColumn(ColumnName = "reser_end_date")] public DateTime ReservationEndDate { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/Business/Room/RoomState.cs b/EOM.TSHotelManagement.Common.Core/Business/Room/RoomState.cs index a9c393f..d27dc8a 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Room/RoomState.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Room/RoomState.cs @@ -29,19 +29,19 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 房间状态 (Room State) /// - [SugarTable("roomstate")] + [SugarTable("room_state")] public class RoomState : BaseEntity { /// /// 房间状态编号 (Room State ID) /// - [SugarColumn(ColumnName = "RoomStateId", IsPrimaryKey = true)] + [SugarColumn(ColumnName = "room_state_number", IsPrimaryKey = true)] public int RoomStateId { get; set; } /// /// 房间状态名称 (Room State Name) /// - [SugarColumn(ColumnName = "RoomState")] + [SugarColumn(ColumnName = "room_state")] public string RoomStateName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/Business/Room/RoomType.cs b/EOM.TSHotelManagement.Common.Core/Business/Room/RoomType.cs index 04eac68..d314070 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Room/RoomType.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Room/RoomType.cs @@ -30,20 +30,20 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 房间类型 (Room Type) /// - [SugarTable("roomtype")] + [SugarTable("room_type")] public class RoomType : BaseEntity { /// /// 类型编号 (Room Type ID) /// - [SugarColumn(ColumnName = "RoomType", IsPrimaryKey = true)] + [SugarColumn(ColumnName = "room_type", IsPrimaryKey = true)] [NeedValid] public int RoomTypeId { get; set; } /// /// 房间类型名称 (Room Type Name) /// - [SugarColumn(ColumnName = "RoomName")] + [SugarColumn(ColumnName = "room_name")] [NeedValid] public string RoomTypeName { get; set; } diff --git a/EOM.TSHotelManagement.Common.Core/Business/Sellthing/SellThing.cs b/EOM.TSHotelManagement.Common.Core/Business/Sellthing/SellThing.cs index 920d95b..ab46569 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Sellthing/SellThing.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Sellthing/SellThing.cs @@ -39,21 +39,21 @@ namespace EOM.TSHotelManagement.Common.Core /// 商品编号 (Product Number) /// [UIDisplay("商品编号")] - [SugarColumn(ColumnName = "SellNo", IsPrimaryKey = true)] + [SugarColumn(ColumnName = "sell_no", IsPrimaryKey = true)] public string ProductNumber { get; set; } /// /// 商品名称 (Product Name) /// [UIDisplay("商品名称")] - [SugarColumn(ColumnName = "SellName")] + [SugarColumn(ColumnName = "sell_name")] public string ProductName { get; set; } /// /// 商品价格 (Product Price) /// [UIDisplay("商品价格")] - [SugarColumn(ColumnName = "SellPrice")] + [SugarColumn(ColumnName = "sell_price")] public decimal ProductPrice { get; set; } /// @@ -66,14 +66,14 @@ namespace EOM.TSHotelManagement.Common.Core /// 规格型号 (Specification) /// [UIDisplay("规格型号")] - [SugarColumn(ColumnName = "format")] + [SugarColumn(ColumnName = "specification")] public string Specification { get; set; } /// /// 库存 (Stock) /// [UIDisplay("库存")] - [SugarColumn(ColumnName = "Stock")] + [SugarColumn(ColumnName = "stock")] public decimal Stock { get; set; } } diff --git a/EOM.TSHotelManagement.Common.Core/Business/Spend/Spend.cs b/EOM.TSHotelManagement.Common.Core/Business/Spend/Spend.cs index cc67e79..e99b50c 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Spend/Spend.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Spend/Spend.cs @@ -31,42 +31,47 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 消费信息 (Consumption Information) /// - [SugarTable("custospend")] + [SugarTable("customer_spend")] public class Spend : BaseEntity { + /// + /// 消费编号 (Consumption Number) + /// + [SugarColumn(ColumnName = "spend_number")] + public string SpendNumber { get; set; } /// /// 房间编号 (Room Number) /// [UIDisplay("房间号")] - [SugarColumn(ColumnName = "RoomNo")] + [SugarColumn(ColumnName = "room_no")] public string RoomNumber { get; set; } /// /// 客户编号 (Customer Number) /// [UIDisplay("客户编号")] - [SugarColumn(ColumnName = "CustoNo")] + [SugarColumn(ColumnName = "custo_no")] public string CustomerNumber { get; set; } /// /// 商品名称 (Product Name) /// [UIDisplay("商品名称")] - [SugarColumn(ColumnName = "SpendName")] + [SugarColumn(ColumnName = "spend_name")] public string ProductName { get; set; } /// /// 消费数量 (Consumption Quantity) /// [UIDisplay("消费数量", true)] - [SugarColumn(ColumnName = "SpendAmount")] + [SugarColumn(ColumnName = "apend_quantity")] public int ConsumptionQuantity { get; set; } /// /// 商品单价 (Product Price) /// [UIDisplay("商品单价")] - [SugarColumn(ColumnName = "SpendPrice")] + [SugarColumn(ColumnName = "spend_price")] public decimal ProductPrice { get; set; } /// @@ -79,7 +84,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 消费金额 (Consumption Amount) /// [UIDisplay("消费金额")] - [SugarColumn(ColumnName = "SpendMoney")] + [SugarColumn(ColumnName = "spend_amount")] public decimal ConsumptionAmount { get; set; } /// @@ -92,13 +97,13 @@ namespace EOM.TSHotelManagement.Common.Core /// 消费时间 (Consumption Time) /// [UIDisplay("消费时间")] - [SugarColumn(ColumnName = "SpendTime")] + [SugarColumn(ColumnName = "spend_time")] public DateTime ConsumptionTime { get; set; } /// /// 结算状态 (Settlement Status) /// - [SugarColumn(ColumnName = "MoneyState")] + [SugarColumn(ColumnName = "settlement_status")] public string SettlementStatus { get; set; } /// diff --git a/EOM.TSHotelManagement.Common.Core/Employee/Employee.cs b/EOM.TSHotelManagement.Common.Core/Employee/Employee.cs index 1c438a6..de1d278 100644 --- a/EOM.TSHotelManagement.Common.Core/Employee/Employee.cs +++ b/EOM.TSHotelManagement.Common.Core/Employee/Employee.cs @@ -30,37 +30,31 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 员工信息 (Employee Information) /// - [SugarTable("worker")] + [SugarTable("employee")] public class Employee : BaseEntity { - /// - /// 索引ID (Index ID) - /// - [SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)] - public int Id { get; set; } - /// /// 员工账号/工号 (Employee Account/ID) /// - [SugarColumn(ColumnName = "WorkerId", IsPrimaryKey = true)] + [SugarColumn(ColumnName = "employee_number", IsPrimaryKey = true)] public string EmployeeId { get; set; } /// /// 员工姓名 (Employee Name) /// - [SugarColumn(ColumnName = "WorkerName")] + [SugarColumn(ColumnName = "employee_name")] public string EmployeeName { get; set; } /// /// 出生日期 (Date of Birth) /// - [SugarColumn(ColumnName = "WorkerBirthday")] + [SugarColumn(ColumnName = "employee_date_of_birth")] public DateTime DateOfBirth { get; set; } /// /// 员工性别 (Employee Gender) /// - [SugarColumn(ColumnName = "WorkerSex")] + [SugarColumn(ColumnName = "employee_gender")] public int Gender { get; set; } /// @@ -72,7 +66,7 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 民族类型 (Ethnicity) /// - [SugarColumn(ColumnName = "WorkerNation")] + [SugarColumn(ColumnName = "employee_nation")] public string Ethnicity { get; set; } /// @@ -84,13 +78,13 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 员工电话 (Employee Phone Number) /// - [SugarColumn(ColumnName = "WorkerTel")] + [SugarColumn(ColumnName = "employee_tel")] public string PhoneNumber { get; set; } /// /// 所属部门 (Department) /// - [SugarColumn(ColumnName = "WorkerClub")] + [SugarColumn(ColumnName = "employee_department")] public string Department { get; set; } /// @@ -102,13 +96,13 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 居住地址 (Residential Address) /// - [SugarColumn(ColumnName = "WorkerAddress")] + [SugarColumn(ColumnName = "employee_address")] public string Address { get; set; } /// /// 员工职位 (Employee Position) /// - [SugarColumn(ColumnName = "WorkerPosition")] + [SugarColumn(ColumnName = "employee_postion")] public string Position { get; set; } /// @@ -120,25 +114,25 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 证件号码 (ID Card Number) /// - [SugarColumn(ColumnName = "CardID")] + [SugarColumn(ColumnName = "card_number")] public string IdCardNumber { get; set; } /// /// 员工密码 (Employee Password) /// - [SugarColumn(ColumnName = "WorkerPwd")] + [SugarColumn(ColumnName = "employee_password")] public string Password { get; set; } /// /// 员工入职时间 (Hire Date) /// - [SugarColumn(ColumnName = "WorkerTime")] + [SugarColumn(ColumnName = "hire_time")] public DateTime HireDate { get; set; } /// /// 员工面貌 (Political Affiliation) /// - [SugarColumn(ColumnName = "WorkerFace")] + [SugarColumn(ColumnName = "employee_political")] public string PoliticalAffiliation { get; set; } /// @@ -150,7 +144,7 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 教育程度 (Education Level) /// - [SugarColumn(ColumnName = "WorkerEducation")] + [SugarColumn(ColumnName = "employee_political")] public string EducationLevel { get; set; } /// diff --git a/EOM.TSHotelManagement.Common.Core/Employee/EmployeeCheck.cs b/EOM.TSHotelManagement.Common.Core/Employee/EmployeeCheck.cs index d71f221..bf95a69 100644 --- a/EOM.TSHotelManagement.Common.Core/Employee/EmployeeCheck.cs +++ b/EOM.TSHotelManagement.Common.Core/Employee/EmployeeCheck.cs @@ -30,37 +30,31 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 员工打卡考勤 (Employee Check-in/Check-out Record) /// - [SugarTable("workercheck")] + [SugarTable("employee_check")] public class EmployeeCheck : BaseEntity { - /// - /// 编号 (ID) - /// - [SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)] - public int Id { get; set; } - /// /// 员工工号 (Employee ID) /// - [SugarColumn(ColumnName = "WorkerNo")] + [SugarColumn(ColumnName = "employee_number")] public string EmployeeId { get; set; } /// /// 打卡时间 (Check-in/Check-out Time) /// - [SugarColumn(ColumnName = "CheckTime")] + [SugarColumn(ColumnName = "check_time")] public DateTime CheckTime { get; set; } /// /// 打卡方式 (Check-in/Check-out Method) /// - [SugarColumn(ColumnName = "CheckWay")] + [SugarColumn(ColumnName = "check_way")] public string CheckMethod { get; set; } /// /// 打卡状态 (Check-in/Check-out Status) /// - [SugarColumn(ColumnName = "CheckState")] + [SugarColumn(ColumnName = "check_state")] public int CheckStatus { get; set; } /// diff --git a/EOM.TSHotelManagement.Common.Core/Employee/EmployeeHistory.cs b/EOM.TSHotelManagement.Common.Core/Employee/EmployeeHistory.cs index 89f27d6..32c12cc 100644 --- a/EOM.TSHotelManagement.Common.Core/Employee/EmployeeHistory.cs +++ b/EOM.TSHotelManagement.Common.Core/Employee/EmployeeHistory.cs @@ -30,43 +30,37 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 员工履历 (Employee History) /// - [SugarTable("workerhistory")] + [SugarTable("employee_history")] public class EmployeeHistory : BaseEntity { - /// - /// 编号 (ID) - /// - [SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)] - public int Id { get; set; } - /// /// 员工工号 (Employee ID) /// - [SugarColumn(ColumnName = "WorkerId")] + [SugarColumn(ColumnName = "employee_number")] public string EmployeeId { get; set; } /// /// 开始时间 (Start Date) /// - [SugarColumn(ColumnName = "StartDate")] + [SugarColumn(ColumnName = "start_date")] public DateTime StartDate { get; set; } /// /// 结束时间 (End Date) /// - [SugarColumn(ColumnName = "EndDate")] + [SugarColumn(ColumnName = "end_date")] public DateTime EndDate { get; set; } /// /// 职位 (Position) /// - [SugarColumn(ColumnName = "Position")] + [SugarColumn(ColumnName = "position")] public string Position { get; set; } /// /// 公司 (Company) /// - [SugarColumn(ColumnName = "Company")] + [SugarColumn(ColumnName = "company")] public string Company { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/Employee/EmployeePhoto.cs b/EOM.TSHotelManagement.Common.Core/Employee/EmployeePhoto.cs index db4be01..d5fb746 100644 --- a/EOM.TSHotelManagement.Common.Core/Employee/EmployeePhoto.cs +++ b/EOM.TSHotelManagement.Common.Core/Employee/EmployeePhoto.cs @@ -5,25 +5,19 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 员工照片 (Employee Photo) /// - [SugarTable("workerpic")] + [SugarTable("employee_pic")] public class EmployeePhoto { - /// - /// 自增长流水号 (Auto-incrementing Sequence Number) - /// - [SugarColumn(ColumnName = "Id", IsIdentity = true, IsPrimaryKey = true)] - public int Id { get; set; } - /// /// 员工工号 (Employee ID) /// - [SugarColumn(ColumnName = "WorkerId")] + [SugarColumn(ColumnName = "employee_number")] public string EmployeeId { get; set; } /// /// 照片路径 (Photo Path) /// - [SugarColumn(ColumnName = "Pic")] + [SugarColumn(ColumnName = "pic_url")] public string PhotoPath { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/Employee/EmployeeRewardPunishment.cs b/EOM.TSHotelManagement.Common.Core/Employee/EmployeeRewardPunishment.cs index 19d97bf..a6f56bd 100644 --- a/EOM.TSHotelManagement.Common.Core/Employee/EmployeeRewardPunishment.cs +++ b/EOM.TSHotelManagement.Common.Core/Employee/EmployeeRewardPunishment.cs @@ -30,37 +30,31 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 员工奖惩 (Employee Rewards/Punishments) /// - [SugarTable("workergoodbad")] + [SugarTable("reward_punishment")] public class EmployeeRewardPunishment : BaseEntity { - /// - /// 编号 (ID) - /// - [SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)] - public int Id { get; set; } - /// /// 员工工号 (Employee ID) /// - [SugarColumn(ColumnName = "WorkNo")] + [SugarColumn(ColumnName = "employee_number")] public string EmployeeId { get; set; } /// /// 奖惩信息 (Reward/Punishment Information) /// - [SugarColumn(ColumnName = "GBInfo")] + [SugarColumn(ColumnName = "reward_punishment_information")] public string RewardPunishmentInformation { get; set; } /// /// 奖惩类型 (Reward/Punishment Type) /// - [SugarColumn(ColumnName = "GBType")] + [SugarColumn(ColumnName = "reward_punishment_type")] public int RewardPunishmentType { get; set; } /// /// 奖惩操作人 (Reward/Punishment Operator) /// - [SugarColumn(ColumnName = "GBOperation")] + [SugarColumn(ColumnName = "reward_punishment_operator")] public string RewardPunishmentOperator { get; set; } /// @@ -72,7 +66,7 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 奖惩时间 (Reward/Punishment Time) /// - [SugarColumn(ColumnName = "GBTime")] + [SugarColumn(ColumnName = "reward_punishment_time")] public DateTime RewardPunishmentTime { get; set; } /// diff --git a/EOM.TSHotelManagement.Common.Core/Employee/RewardPunishmentType.cs b/EOM.TSHotelManagement.Common.Core/Employee/RewardPunishmentType.cs index 18f6bc1..1c7881d 100644 --- a/EOM.TSHotelManagement.Common.Core/Employee/RewardPunishmentType.cs +++ b/EOM.TSHotelManagement.Common.Core/Employee/RewardPunishmentType.cs @@ -30,19 +30,19 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 奖惩类型实体类 (Reward/Punishment Type Entity) /// - [SugarTable("gbtype")] + [SugarTable("reward_punishment_type")] public class RewardPunishmentType : BaseEntity { /// /// 奖惩类型编号 (Reward/Punishment Type ID) /// - [SugarColumn(ColumnName = "GBTypeId", IsPrimaryKey = true)] + [SugarColumn(ColumnName = "reward_punishment_type_number", IsPrimaryKey = true)] public int RewardPunishmentTypeId { get; set; } /// /// 奖惩类型名称 (Reward/Punishment Type Name) /// - [SugarColumn(ColumnName = "GBName")] + [SugarColumn(ColumnName = "reward_punishment_type_name")] public string RewardPunishmentTypeName { get; set; } } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Common.Core/SystemManagement/Administrator.cs b/EOM.TSHotelManagement.Common.Core/SystemManagement/Administrator.cs index 3029216..34de428 100644 --- a/EOM.TSHotelManagement.Common.Core/SystemManagement/Administrator.cs +++ b/EOM.TSHotelManagement.Common.Core/SystemManagement/Administrator.cs @@ -30,7 +30,7 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 管理员实体类 (Administrator Entity) /// - [SugarTable("admininfo")] + [SugarTable("administrator")] public class Administrator : BaseEntity { /// @@ -41,30 +41,32 @@ namespace EOM.TSHotelManagement.Common.Core } /// - /// 编号 (ID) + /// 管理员账号 (Administrator Account) /// - [SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)] - public int Id { get; set; } + [UIDisplay("管理员账号")] + [SugarColumn(ColumnName = "admin_number", IsNullable = false)] + [NeedValid] + public string Number { get; set; } /// /// 管理员账号 (Administrator Account) /// [UIDisplay("管理员账号")] - [SugarColumn(ColumnName = "AdminAccount", IsNullable = false)] + [SugarColumn(ColumnName = "admin_account", IsNullable = false)] [NeedValid] public string Account { get; set; } /// /// 管理员密码 (Administrator Password) /// - [SugarColumn(ColumnName = "AdminPassword", IsNullable = false)] + [SugarColumn(ColumnName = "admin_password", IsNullable = false)] [NeedValid] public string Password { get; set; } /// /// 管理员类型 (Administrator Type) /// - [SugarColumn(ColumnName = "AdminType", IsNullable = false)] + [SugarColumn(ColumnName = "admin_type", IsNullable = false)] [NeedValid] public string Type { get; set; } @@ -72,7 +74,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 管理员名称 (Administrator Name) /// [UIDisplay("管理员名称")] - [SugarColumn(ColumnName = "AdminName", IsNullable = false)] + [SugarColumn(ColumnName = "admin_name", IsNullable = false)] [NeedValid] public string Name { get; set; } @@ -80,7 +82,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 是否为超级管理员 (Is Super Administrator) /// [UIDisplay("超级管理员?")] - [SugarColumn(ColumnName = "IsAdmin")] + [SugarColumn(ColumnName = "is_admin")] public int IsSuperAdmin { get; set; } /// diff --git a/EOM.TSHotelManagement.Common.Core/SystemManagement/AdministratorType.cs b/EOM.TSHotelManagement.Common.Core/SystemManagement/AdministratorType.cs index 13e2337..6034ee6 100644 --- a/EOM.TSHotelManagement.Common.Core/SystemManagement/AdministratorType.cs +++ b/EOM.TSHotelManagement.Common.Core/SystemManagement/AdministratorType.cs @@ -29,15 +29,9 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 管理员类型 (Administrator Type) /// - [SugarTable("admintype")] + [SugarTable("administrator_type")] public class AdministratorType : BaseEntity { - /// - /// 编号 (ID) - /// - [SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity = true)] - public int Id { get; set; } - /// /// 类型编号 (Type ID) /// diff --git a/EOM.TSHotelManagement.Common.Core/SystemManagement/AppointmentNotice.cs b/EOM.TSHotelManagement.Common.Core/SystemManagement/AppointmentNotice.cs index 93b28a6..096b6a6 100644 --- a/EOM.TSHotelManagement.Common.Core/SystemManagement/AppointmentNotice.cs +++ b/EOM.TSHotelManagement.Common.Core/SystemManagement/AppointmentNotice.cs @@ -30,25 +30,25 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 任命公告 (Appointment AppointmentNotice) /// - [SugarTable("uploadinfo")] + [SugarTable("appointment_notice")] public class AppointmentNotice : BaseEntity { /// /// 公告编号 (AppointmentNotice Number) /// - [SugarColumn(ColumnName = "NoticeNo", IsPrimaryKey = true)] + [SugarColumn(ColumnName = "notice_no", IsPrimaryKey = true)] public string NoticeNumber { get; set; } /// /// 公告主题 (AppointmentNotice Theme) /// - [SugarColumn(ColumnName = "Noticetheme")] + [SugarColumn(ColumnName = "notice_theme")] public string NoticeTheme { get; set; } /// /// 公告类型 (AppointmentNotice Type) /// - [SugarColumn(ColumnName = "NoticeType")] + [SugarColumn(ColumnName = "notice_type")] public string NoticeType { get; set; } /// @@ -60,19 +60,19 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 公告时间 (AppointmentNotice Time) /// - [SugarColumn(ColumnName = "NoticeTime")] + [SugarColumn(ColumnName = "notice_time")] public DateTime NoticeTime { get; set; } /// /// 公告正文 (AppointmentNotice Content) /// - [SugarColumn(ColumnName = "NoticeContent")] + [SugarColumn(ColumnName = "notice_content")] public string NoticeContent { get; set; } /// /// 发文部门 (Issuing Department) /// - [SugarColumn(ColumnName = "NoticeClub")] + [SugarColumn(ColumnName = "notice_department")] public string IssuingDepartment { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/SystemManagement/Department.cs b/EOM.TSHotelManagement.Common.Core/SystemManagement/Department.cs index 425cae2..366325d 100644 --- a/EOM.TSHotelManagement.Common.Core/SystemManagement/Department.cs +++ b/EOM.TSHotelManagement.Common.Core/SystemManagement/Department.cs @@ -30,15 +30,9 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 部门表 (Department Table) /// - [SugarTable("dept")] + [SugarTable("department")] public class Department : BaseEntity { - /// - /// 索引ID (Index ID) - /// - [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)] - public int Id { get; set; } - /// /// 部门编号 (Department Number) /// diff --git a/EOM.TSHotelManagement.Common.Core/SystemManagement/Education.cs b/EOM.TSHotelManagement.Common.Core/SystemManagement/Education.cs index 70cedeb..fbea359 100644 --- a/EOM.TSHotelManagement.Common.Core/SystemManagement/Education.cs +++ b/EOM.TSHotelManagement.Common.Core/SystemManagement/Education.cs @@ -29,15 +29,9 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 学历 (Education) /// - [SugarTable("education")] + [SugarTable("qualification")] public class Education : BaseEntity { - /// - /// 索引ID (Index ID) - /// - [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)] - public int Id { get; set; } - /// /// 学历编号 (Education Number) /// diff --git a/EOM.TSHotelManagement.Common.Core/SystemManagement/Menu.cs b/EOM.TSHotelManagement.Common.Core/SystemManagement/Menu.cs index bcb32f2..7fb3c44 100644 --- a/EOM.TSHotelManagement.Common.Core/SystemManagement/Menu.cs +++ b/EOM.TSHotelManagement.Common.Core/SystemManagement/Menu.cs @@ -34,13 +34,6 @@ namespace EOM.TSHotelManagement.Common.Core [SugarTable("menu")] public class Menu : BaseEntity { - /// - /// 备 注:自增长ID (Auto-incrementing ID) - /// 默认值: - /// - [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)] - public int Id { get; set; } - /// /// 备 注:菜单键 (Menu Key) /// 默认值: diff --git a/EOM.TSHotelManagement.Common.Core/SystemManagement/Module.cs b/EOM.TSHotelManagement.Common.Core/SystemManagement/Module.cs deleted file mode 100644 index 4541c84..0000000 --- a/EOM.TSHotelManagement.Common.Core/SystemManagement/Module.cs +++ /dev/null @@ -1,29 +0,0 @@ -using SqlSugar; - -namespace EOM.TSHotelManagement.Common.Core -{ - /// - /// 模块实体 (Module Entity) - /// - [SugarTable("module")] - public class Module : BaseEntity - { - /// - /// 模块ID (Module ID) - /// - [SugarColumn(ColumnName = "module_id", IsPrimaryKey = true)] - public int ModuleId { get; set; } - - /// - /// 模块名称 (Module Name) - /// - [SugarColumn(ColumnName = "module_name")] - public string ModuleName { get; set; } - - /// - /// 模块描述 (Module Description) - /// - [SugarColumn(ColumnName = "module_desc")] - public string ModuleDescription { get; set; } - } -} diff --git a/EOM.TSHotelManagement.Common.Core/SystemManagement/ModuleConsts.cs b/EOM.TSHotelManagement.Common.Core/SystemManagement/ModuleConsts.cs deleted file mode 100644 index 91be7cd..0000000 --- a/EOM.TSHotelManagement.Common.Core/SystemManagement/ModuleConsts.cs +++ /dev/null @@ -1,73 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 易开元(Easy-Open-Meta) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - *模块说明:系统模块常量类 - */ -namespace EOM.TSHotelManagement.Common.Core -{ - /// - /// 系统模块常量类 - /// - public class ModuleConsts - { - /// - /// 基础信息 - /// - public const string BaseInfo = "BaseInfo"; - /// - /// 财务信息 - /// - public const string CashInfo = "CashInfo"; - /// - /// 水电管理 - /// - public const string WtiInfo = "WtiInfo"; - /// - /// 监管统计 - /// - public const string SupervisionStatistics = "SupervisionStatistics"; - /// - /// 客房管理 - /// - public const string RoomManager = "RoomManager"; - /// - /// 客户管理 - /// - public const string CustomerManager = "CustomerManager"; - /// - /// 人事管理 - /// - public const string HumanResourcesManager = "HumanResourcesManager"; - /// - /// 物资管理 - /// - public const string MaterialManager = "MaterialManager"; - /// - /// 员工操作日志 - /// - public const string OperationLogManager = "OperationLogManager"; - /// - /// 系统管理 - /// - public const string AdminManager = "AdminManager"; - } -} diff --git a/EOM.TSHotelManagement.Common.Core/SystemManagement/ModulePermission.cs b/EOM.TSHotelManagement.Common.Core/SystemManagement/ModulePermission.cs deleted file mode 100644 index cc55d4c..0000000 --- a/EOM.TSHotelManagement.Common.Core/SystemManagement/ModulePermission.cs +++ /dev/null @@ -1,36 +0,0 @@ -using SqlSugar; - -namespace EOM.TSHotelManagement.Common.Core -{ - - /// - /// 模块权限表 (Module Permission Table) - /// - [SugarTable("module_zero")] - public class ModulePermission - { - /// - /// 模块ID (Module ID) - /// - [SugarColumn(ColumnName = "module_id", IsIdentity = true)] - public int ModuleId { get; set; } - - /// - /// 管理员账号 (Administrator Account) - /// - [SugarColumn(ColumnName = "admin_account")] - public string AdministratorAccount { get; set; } - - /// - /// 模块名称 (Module Name) - /// - [SugarColumn(ColumnName = "module_name")] - public string ModuleName { get; set; } - - /// - /// 是否开启 (Is Enabled) - /// - [SugarColumn(ColumnName = "module_enable")] - public int ModuleEnabled { get; set; } - } -} diff --git a/EOM.TSHotelManagement.Common.Core/SystemManagement/Nation.cs b/EOM.TSHotelManagement.Common.Core/SystemManagement/Nation.cs index 638d537..42a7261 100644 --- a/EOM.TSHotelManagement.Common.Core/SystemManagement/Nation.cs +++ b/EOM.TSHotelManagement.Common.Core/SystemManagement/Nation.cs @@ -32,12 +32,6 @@ namespace EOM.TSHotelManagement.Common.Core [SugarTable("nation")] public class Nation : BaseEntity { - /// - /// 索引ID (Index ID) - /// - [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)] - public int Id { get; set; } - /// /// 民族编号 (Nation Number) /// diff --git a/EOM.TSHotelManagement.Common.Core/SystemManagement/Position.cs b/EOM.TSHotelManagement.Common.Core/SystemManagement/Position.cs index 5d1c7f6..ac6c1f5 100644 --- a/EOM.TSHotelManagement.Common.Core/SystemManagement/Position.cs +++ b/EOM.TSHotelManagement.Common.Core/SystemManagement/Position.cs @@ -32,12 +32,6 @@ namespace EOM.TSHotelManagement.Common.Core [SugarTable("position")] public class Position : BaseEntity { - /// - /// 索引ID (Index ID) - /// - [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)] - public int Id { get; set; } - /// /// 职位编号 (Position Number) /// diff --git a/EOM.TSHotelManagement.Common.Core/SystemManagement/SupervisionStatistics.cs b/EOM.TSHotelManagement.Common.Core/SystemManagement/SupervisionStatistics.cs index e44d56b..6f0355f 100644 --- a/EOM.TSHotelManagement.Common.Core/SystemManagement/SupervisionStatistics.cs +++ b/EOM.TSHotelManagement.Common.Core/SystemManagement/SupervisionStatistics.cs @@ -29,19 +29,19 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 监管统计 (Supervision Statistics) /// - [SugarTable("checkinfo")] + [SugarTable("supervision_statistics")] public class SupervisionStatistics : BaseEntity { /// /// 监管统计编号 (Supervision Statistics Number) /// - [SugarColumn(ColumnName = "CheckNo", IsPrimaryKey = true)] + [SugarColumn(ColumnName = "statistics_number", IsPrimaryKey = true)] public string StatisticsNumber { get; set; } /// /// 本次监管部门 (Supervising Department) /// - [SugarColumn(ColumnName = "CheckClub")] + [SugarColumn(ColumnName = "supervising_department")] public string SupervisingDepartment { get; set; } /// @@ -53,31 +53,31 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 本次监管进度 (Supervision Progress) /// - [SugarColumn(ColumnName = "CheckProgres")] + [SugarColumn(ColumnName = "supervision_progress")] public string SupervisionProgress { get; set; } /// /// 本次监管损失 (Supervision Loss) /// - [SugarColumn(ColumnName = "CheckCash")] + [SugarColumn(ColumnName = "supervision_loss")] public string SupervisionLoss { get; set; } /// /// 本次评分 (Supervision Score) /// - [SugarColumn(ColumnName = "CheckScore")] + [SugarColumn(ColumnName = "supervision_score")] public int SupervisionScore { get; set; } /// /// 监管统计人 (Supervision Statistician) /// - [SugarColumn(ColumnName = "CheckPerson")] + [SugarColumn(ColumnName = "supervision_statistician")] public string SupervisionStatistician { get; set; } /// /// 本次监管建议 (Supervision Advice) /// - [SugarColumn(ColumnName = "CheckAdvice")] + [SugarColumn(ColumnName = "supervision_advice")] public string SupervisionAdvice { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/SystemManagement/SystemInformation.cs b/EOM.TSHotelManagement.Common.Core/SystemManagement/SystemInformation.cs index b537ca7..97e48a3 100644 --- a/EOM.TSHotelManagement.Common.Core/SystemManagement/SystemInformation.cs +++ b/EOM.TSHotelManagement.Common.Core/SystemManagement/SystemInformation.cs @@ -29,7 +29,7 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 系统信息 (System Information) /// - [SugarTable("base")] + [SugarTable("app_config_base")] public class SystemInformation { /// diff --git a/EOM.TSHotelManagement.Common.Core/Util/ApplicationVersion.cs b/EOM.TSHotelManagement.Common.Core/Util/ApplicationVersion.cs index 6ca7e18..4007b72 100644 --- a/EOM.TSHotelManagement.Common.Core/Util/ApplicationVersion.cs +++ b/EOM.TSHotelManagement.Common.Core/Util/ApplicationVersion.cs @@ -5,7 +5,7 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 应用版本 (Application Version) /// - [SugarTable("applicationversion")] + [SugarTable("app_version")] public class ApplicationVersion { /// diff --git a/EOM.TSHotelManagement.Common.Core/Util/CardCode.cs b/EOM.TSHotelManagement.Common.Core/Util/CardCode.cs index 4c05592..a0ac630 100644 --- a/EOM.TSHotelManagement.Common.Core/Util/CardCode.cs +++ b/EOM.TSHotelManagement.Common.Core/Util/CardCode.cs @@ -5,7 +5,7 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 卡片代码 (Card Codes) /// - [SugarTable("cardcodes")] + [SugarTable("card_code")] public class CardCode { /// @@ -24,25 +24,25 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 省份 (Province) /// - [SugarColumn(ColumnName = "Province")] + [SugarColumn(ColumnName = "province")] public string Province { get; set; } /// /// 城市 (City) /// - [SugarColumn(ColumnName = "City")] + [SugarColumn(ColumnName = "city")] public string City { get; set; } /// /// 地区 (District) /// - [SugarColumn(ColumnName = "District")] + [SugarColumn(ColumnName = "district")] public string District { get; set; } /// /// 地区识别码 (Area Code) /// - [SugarColumn(ColumnName = "bm")] + [SugarColumn(ColumnName = "district_code")] public string AreaCode { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/Util/OperationLog.cs b/EOM.TSHotelManagement.Common.Core/Util/OperationLog.cs index 7b09877..78d0979 100644 --- a/EOM.TSHotelManagement.Common.Core/Util/OperationLog.cs +++ b/EOM.TSHotelManagement.Common.Core/Util/OperationLog.cs @@ -51,43 +51,43 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 操作日志 (Operation Log) /// - [SugarTable("operationlog")] + [SugarTable("operation_log")] public class OperationLog : BaseEntity { /// /// 日志ID (Log ID) /// - [SugarColumn(ColumnName = "OperationId", IsIdentity = true, IsPrimaryKey = true)] - public int OperationId { get; set; } + [SugarColumn(ColumnName = "operation_number",IsPrimaryKey = true)] + public string OperationId { get; set; } /// /// 操作时间 (Operation Time) /// - [SugarColumn(ColumnName = "OperationTime")] + [SugarColumn(ColumnName = "operation_time")] public DateTime OperationTime { get; set; } /// /// 操作信息 (Log Content) /// - [SugarColumn(ColumnName = "LogContent")] + [SugarColumn(ColumnName = "log_content")] public string LogContent { get; set; } /// /// 操作账号 (Operation Account) /// - [SugarColumn(ColumnName = "OperationAccount")] + [SugarColumn(ColumnName = "operation_account")] public string OperationAccount { get; set; } /// /// 日志等级 (Log Level) /// - [SugarColumn(ColumnName = "OperationLevel")] + [SugarColumn(ColumnName = "operation_level")] public LogLevel LogLevel { get; set; } /// /// 软件版本 (Software Version) /// - [SugarColumn(ColumnName = "SoftwareVersion")] + [SugarColumn(ColumnName = "software_version")] public string SoftwareVersion { get; set; } /// @@ -109,6 +109,11 @@ namespace EOM.TSHotelManagement.Common.Core [SugarColumn(ColumnName = "request_path")] public string RequestPath { get; set; } /// + /// 查询字符串 (Query String) + /// + [SugarColumn(ColumnName = "query_string")] + public string QueryString { get; set; } + /// /// 请求负载 (Request Payload) /// [SugarColumn(ColumnName = "request_payload")] diff --git a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Administrator/AdminController.cs b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Administrator/AdminController.cs index 4593d0a..4ed912f 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Administrator/AdminController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Administrator/AdminController.cs @@ -1,4 +1,4 @@ -using EOM.TSHotelManagement.Application.SystemManagement.Administrator; +using EOM.TSHotelManagement.Application; using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; using Microsoft.AspNetCore.Authorization; diff --git a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Base/BaseController.cs b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Base/BaseController.cs index 13419ea..db73737 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Base/BaseController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Base/BaseController.cs @@ -1,4 +1,4 @@ -using EOM.TSHotelManagement.Application.SystemManagement.Base; +using EOM.TSHotelManagement.Application; using EOM.TSHotelManagement.Common; using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; @@ -22,6 +22,11 @@ namespace EOM.TSHotelManagement.WebApi.Controllers #region 性别模块 + /// + /// + /// + /// + /// [HttpGet] public ListOutputDto SelectSexTypeAll([FromQuery] ReadGenderTypeInputDto sexType = null) { diff --git a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Menu/MenuController.cs b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Menu/MenuController.cs index 9e20fb8..38f97af 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Menu/MenuController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Menu/MenuController.cs @@ -1,4 +1,4 @@ -using EOM.TSHotelManagement.Application.SystemManagement.Menu; +using EOM.TSHotelManagement.Application; using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; using Microsoft.AspNetCore.Authorization; diff --git a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Module/ModuleController.cs b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Module/ModuleController.cs deleted file mode 100644 index a1cd881..0000000 --- a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Module/ModuleController.cs +++ /dev/null @@ -1,65 +0,0 @@ -using EOM.TSHotelManagement.Common.Core; -using EOM.TSHotelManagement.Common.Contract; -using Microsoft.AspNetCore.Mvc; -using System.Collections.Generic; -using EOM.TSHotelManagement.Application.SystemManagement.Module; - -namespace EOM.TSHotelManagement.WebApi.Controllers -{ - /// - /// 系统模块控制器 - /// - public class ModuleController : ControllerBase - { - private readonly IAdminModuleZeroService adminModuleZeroService; - - public ModuleController(IAdminModuleZeroService adminModuleZeroService) - { - this.adminModuleZeroService = adminModuleZeroService; - } - - /// - /// 获取所有模块 - /// - /// - [HttpGet] - public ListOutputDto GetAllModule() - { - return adminModuleZeroService.GetAllModule(); - } - - /// - /// 根据账号获取对应模块 - /// - /// - /// - [HttpPost] - public ListOutputDto GetAllModuleByAdmin([FromBody] ReadModulePermissionInputDto admin) - { - return adminModuleZeroService.GetAllModuleByAdmin(admin); - } - - /// - /// 批量添加模块 - /// - /// - /// - [HttpPost] - public BaseOutputDto AddModuleZeroList([FromBody] List moduleZeros) - { - return adminModuleZeroService.AddModuleZeroList(moduleZeros); - } - - /// - /// 批量删除模块 - /// - /// - /// - [HttpPost] - public BaseOutputDto DelModuleZeroList([FromBody] DeleteModulePermissionInputDto moduleZero) - { - return adminModuleZeroService.DelModuleZeroList(moduleZero); - } - } -} - diff --git a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Notice/NoticeController.cs b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Notice/NoticeController.cs index 2b79aec..6f2711d 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Notice/NoticeController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Notice/NoticeController.cs @@ -2,7 +2,7 @@ using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Mvc; using System.Collections.Generic; -using EOM.TSHotelManagement.Application.SystemManagement.Notice; +using EOM.TSHotelManagement.Application; namespace EOM.TSHotelManagement.WebApi.Controllers { diff --git a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/SupervisionStatistics/SupervisionStatisticsController.cs b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/SupervisionStatistics/SupervisionStatisticsController.cs index a6ace94..19db8ca 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/SupervisionStatistics/SupervisionStatisticsController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/SupervisionStatistics/SupervisionStatisticsController.cs @@ -2,7 +2,7 @@ using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Mvc; using System.Collections.Generic; -using EOM.TSHotelManagement.Application.SystemManagement.SupervisionStatistics; +using EOM.TSHotelManagement.Application; namespace EOM.TSHotelManagement.WebApi.Controllers { diff --git a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/VipRule/VipRuleController.cs b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/VipRule/VipRuleController.cs index fd85b1c..31ce6f6 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/VipRule/VipRuleController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/VipRule/VipRuleController.cs @@ -2,7 +2,7 @@ using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Mvc; using System.Collections.Generic; -using EOM.TSHotelManagement.Application.SystemManagement.VipRule; +using EOM.TSHotelManagement.Application; namespace EOM.TSHotelManagement.WebApi.Controllers { diff --git a/EOM.TSHotelManagement.WebApi/Filter/ApiLoggerFilter.cs b/EOM.TSHotelManagement.WebApi/Filter/ApiLoggerFilter.cs deleted file mode 100644 index fe293a4..0000000 --- a/EOM.TSHotelManagement.WebApi/Filter/ApiLoggerFilter.cs +++ /dev/null @@ -1,167 +0,0 @@ -using EOM.TSHotelManagement.Common.Core; -using EOM.TSHotelManagement.EntityFramework; -using Microsoft.AspNetCore.Http; -using Microsoft.AspNetCore.Mvc; -using Microsoft.AspNetCore.Mvc.Controllers; -using Microsoft.AspNetCore.Mvc.Filters; -using Microsoft.Extensions.Logging; -using Newtonsoft.Json; -using System; -using System.Diagnostics; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using LogLevel = EOM.TSHotelManagement.Common.Core.LogLevel; - -namespace EOM.TSHotelManagement.WebApi.Filter -{ - public class ApiLoggerFilter : IAsyncActionFilter - { - private readonly GenericRepository _operationLogRepository; - private const int MaxPayloadLength = 2000; - private readonly bool _logSensitiveData = false; - - public ApiLoggerFilter(GenericRepository operationLogRepository) - { - _operationLogRepository = operationLogRepository; - } - - public async Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next) - { - var stopwatch = Stopwatch.StartNew(); - var httpContext = context.HttpContext; - var operationLog = CreateOperationLog(context); - - try - { - await LogRequestPayload(httpContext, operationLog); - - var resultContext = await next(); - - await LogResponsePayload(resultContext, operationLog); - - if (resultContext.Exception != null) - { - HandleException(resultContext.Exception, operationLog); - } - } - catch (Exception ex) - { - HandleException(ex, operationLog); - throw; - } - finally - { - stopwatch.Stop(); - operationLog.ElapsedTime = stopwatch.ElapsedMilliseconds; - await SaveLogAsync(operationLog); - } - } - - private OperationLog CreateOperationLog(ActionContext context) - { - var httpContext = context.HttpContext; - var actionDescriptor = context.ActionDescriptor as ControllerActionDescriptor; - - return new OperationLog - { - OperationTime = DateTime.Now, - OperationAccount = "System", - SoftwareVersion = "1.0.0", - LogLevel = LogLevel.Normal, - IsDelete = 0, - DataInsUsr = "System", - DataInsDate = DateTime.Now, - LoginIpAddress = GetClientIp(httpContext), - LogContent = $"[{actionDescriptor?.ControllerTypeInfo.Name}] {actionDescriptor?.ActionName}", - HttpMethod = httpContext.Request.Method, - RequestPath = httpContext.Request.Path, - StatusCode = httpContext.Response.StatusCode - }; - } - - private async Task LogRequestPayload(HttpContext httpContext, OperationLog log) - { - if (!httpContext.Request.ContentLength.HasValue || httpContext.Request.ContentLength == 0) - return; - - httpContext.Request.EnableBuffering(); - - using (var reader = new StreamReader( - httpContext.Request.Body, - encoding: Encoding.UTF8, - detectEncodingFromByteOrderMarks: false, - bufferSize: 1024, - leaveOpen: true)) - { - var requestBody = await reader.ReadToEndAsync(); - httpContext.Request.Body.Position = 0; - - log.RequestPayload = TruncateString(requestBody, MaxPayloadLength); - } - - // 记录查询参数 - if (_logSensitiveData) - { - log.QueryString = httpContext.Request.QueryString.Value; - } - } - - private async Task LogResponsePayload(ActionExecutedContext context, OperationLog log) - { - if (context.Result != null) - { - var response = context.HttpContext.Response; - response.Body.Seek(0, SeekOrigin.Begin); - - using (var reader = new StreamReader(response.Body, Encoding.UTF8, leaveOpen: true)) - { - log.ResponsePayload = TruncateString(await reader.ReadToEndAsync(), MaxPayloadLength); - response.Body.Seek(0, SeekOrigin.Begin); - } - } - - log.StatusCode = context.HttpContext.Response.StatusCode; - } - - private void HandleException(Exception exception, OperationLog log) - { - log.LogLevel = LogLevel.Error; - log.ExceptionMessage = exception.Message; - log.ExceptionStackTrace = exception.StackTrace; - log.ResponsePayload = TruncateString(JsonConvert.SerializeObject(new - { - error = exception.GetType().Name, - exception.Message - }), MaxPayloadLength); - } - - private async Task SaveLogAsync(OperationLog log) - { - try - { - // 使用异步保存提高性能 - await _operationLogRepository.InsertAsync(log); - } - catch (Exception ex) - { - // 日志存储失败处理 - Debug.WriteLine($"Log save failed: {ex.Message}"); - } - } - - private string TruncateString(string value, int maxLength) - { - return string.IsNullOrEmpty(value) - ? value - : (value.Length <= maxLength ? value : value.Substring(0, maxLength) + "...[TRUNCATED]"); - } - - private string GetClientIp(HttpContext context) - { - return context.Request.Headers["X-Forwarded-For"].FirstOrDefault() - ?? context.Connection.RemoteIpAddress?.ToString(); - } - } -} \ No newline at end of file diff --git a/EOM.TSHotelManagement.WebApi/Filter/RequestLoggingMiddleware.cs b/EOM.TSHotelManagement.WebApi/Filter/RequestLoggingMiddleware.cs new file mode 100644 index 0000000..12a20c7 --- /dev/null +++ b/EOM.TSHotelManagement.WebApi/Filter/RequestLoggingMiddleware.cs @@ -0,0 +1,135 @@ +using System; +using System.Diagnostics; +using System.IO; +using System.Text; +using System.Threading.Tasks; +using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.EntityFramework; +using Microsoft.AspNetCore.Http; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using SqlSugar; + +public class RequestLoggingMiddleware +{ + private readonly RequestDelegate _next; + private readonly string _softwareVersion; + + public RequestLoggingMiddleware( + RequestDelegate next, + IConfiguration config) + { + _next = next; + _softwareVersion = config["SoftwareVersion"] ?? GetDefaultVersion(); + } + + public async Task InvokeAsync(HttpContext context) + { + var repository = context.RequestServices + .GetRequiredService>(); + + var startTime = Stopwatch.GetTimestamp(); + var log = new OperationLog + { + OperationId = Guid.NewGuid().ToString("N"), + OperationTime = DateTime.Now, + RequestPath = context.Request.Path, + HttpMethod = context.Request.Method, + LoginIpAddress = context.Connection.RemoteIpAddress?.ToString(), + QueryString = context.Request.QueryString.Value, + SoftwareVersion = _softwareVersion, + OperationAccount = context.User.Identity?.Name ?? "Anonymous", + LogContent = $"{context.Request.Method} {context.Request.Path}", + DataInsUsr = context.User.Identity?.Name ?? "Anonymous", + DataInsDate = DateTime.Now, + }; + + context.Request.EnableBuffering(); + log.RequestPayload = await ReadRequestBody(context.Request); + + var originalBodyStream = context.Response.Body; + using var responseBodyStream = new MemoryStream(); + context.Response.Body = responseBodyStream; + + Exception exception = null; + try + { + await _next(context); + } + catch (Exception ex) + { + exception = ex; + log.StatusCode = StatusCodes.Status500InternalServerError; + context.Response.StatusCode = log.StatusCode; + await HandleExceptionAsync(context, ex); + } + finally + { + log.ElapsedTime = GetElapsedMilliseconds(startTime, Stopwatch.GetTimestamp()); + log.StatusCode = context.Response.StatusCode; + + // 读取响应体 + log.ResponsePayload = await ReadResponseBody(responseBodyStream); + responseBodyStream.Seek(0, SeekOrigin.Begin); + await responseBodyStream.CopyToAsync(originalBodyStream); + + // 异常处理 + if (exception != null) + { + log.ExceptionMessage = exception.Message; + log.ExceptionStackTrace = exception.StackTrace; + log.LogLevel = LogLevel.Critical; + } + else + { + log.LogLevel = context.Response.StatusCode >= 400 + ? LogLevel.Warning + : LogLevel.Normal; + } + + log.LogLevelName = log.LogLevel.ToString(); + + _ = Task.Run(() => repository.InsertAsync(log)); + } + } + + private async Task ReadRequestBody(HttpRequest request) + { + try + { + request.Body.Seek(0, SeekOrigin.Begin); + using var reader = new StreamReader(request.Body, Encoding.UTF8, + leaveOpen: true); + return await reader.ReadToEndAsync(); + } + finally + { + request.Body.Seek(0, SeekOrigin.Begin); + } + } + + private async Task ReadResponseBody(MemoryStream bodyStream) + { + bodyStream.Seek(0, SeekOrigin.Begin); + using var reader = new StreamReader(bodyStream, Encoding.UTF8, + leaveOpen: true); + return await reader.ReadToEndAsync(); + } + + private async Task HandleExceptionAsync(HttpContext context, Exception exception) + { + context.Response.ContentType = "application/json"; + var errorResponse = new { error = exception.Message }; + await context.Response.WriteAsJsonAsync(errorResponse); + } + + private static long GetElapsedMilliseconds(long start, long stop) + { + return (long)((stop - start) * 1000 / (double)Stopwatch.Frequency); + } + + private string GetDefaultVersion() + { + return GetType().Assembly.GetName().Version.ToString(3); + } +} \ No newline at end of file diff --git a/EOM.TSHotelManagement.WebApi/Startup.cs b/EOM.TSHotelManagement.WebApi/Startup.cs index 142dabd..ace0a07 100644 --- a/EOM.TSHotelManagement.WebApi/Startup.cs +++ b/EOM.TSHotelManagement.WebApi/Startup.cs @@ -34,23 +34,9 @@ namespace EOM.TSHotelManagement.WebApi // This method gets called by the runtime. Use this method to add services to the container. public void ConfigureServices(IServiceCollection services) { - // ע SqlSugarClientFactory - services.AddSingleton(); - - // ISqlSugarClient - services.AddScoped(sp => - { - var factory = sp.GetRequiredService(); - return factory.CreateClient(); - }); - // DataProtection services.AddDataProtection(); - - // ע᷺Ͳֿ - services.AddScoped(typeof(GenericRepository<>)); - services.AddScoped(); - + services.AddSingleton(); services.AddSingleton(); @@ -90,7 +76,6 @@ namespace EOM.TSHotelManagement.WebApi { options.Conventions.Add(new AuthorizeAllControllersConvention()); options.RespectBrowserAcceptHeader = true; - options.Filters.Add(); }).AddNewtonsoftJson(opt => { //ʱʽӦ @@ -178,6 +163,8 @@ namespace EOM.TSHotelManagement.WebApi app.UseAuthorization(); + app.UseMiddleware(); + app.UseEndpoints(endpoints => { endpoints.MapControllers(); @@ -202,18 +189,25 @@ namespace EOM.TSHotelManagement.WebApi #region AutoFac IOC,ʵע try { - builder.RegisterType().As().SingleInstance(); + builder.RegisterType() + .As() + .SingleInstance(); - builder.Register(c => - { - var factory = c.Resolve(); - return factory.CreateClient(); - }).As().InstancePerLifetimeScope(); + builder.Register(c => c.Resolve().CreateClient()) + .As() + .InstancePerLifetimeScope(); + + builder.RegisterGeneric(typeof(GenericRepository<>)) + .AsSelf() + .InstancePerLifetimeScope(); - builder.RegisterGeneric(typeof(GenericRepository<>)).InstancePerLifetimeScope(); builder.RegisterType().AsSelf().InstancePerLifetimeScope(); builder.RegisterType().AsSelf().InstancePerLifetimeScope(); + builder.RegisterType() + .AsSelf() + .InstancePerDependency(); + //ע var assemblyService = Assembly.LoadFrom(Path.Combine(AppContext.BaseDirectory, "EOM.TSHotelManagement.Application.dll")); builder.RegisterAssemblyTypes(assemblyService) diff --git a/EOM.TSHotelManagement.WebApi/appsettings.json b/EOM.TSHotelManagement.WebApi/appsettings.json index 83533de..6abe1a7 100644 --- a/EOM.TSHotelManagement.WebApi/appsettings.json +++ b/EOM.TSHotelManagement.WebApi/appsettings.json @@ -6,7 +6,7 @@ "Microsoft.Hosting.Lifetime": "Information" } }, - "DefaultDatabase": "PgSql", + "DefaultDatabase": "MariaDB", "ConnectionStrings": { "PgSqlConnectStr": "Host=my_pgsql_host;Port=5432;Username=my_pgsql_user;Password=my_pgsql_password;Database=tshoteldb;", "MySqlConnectStr": "Server=my_mysql_host;Database=tshoteldb;User=my_mysql_user;Password=my_mysql_password;", @@ -28,5 +28,6 @@ "Password": "", "EnableSsl": true, "DisplayName": "" - } + }, + "SoftwareVersion": "1.0.0" } -- Gitee From c226a7a36fecff2a56690e072d32a25a93103155 Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Sun, 30 Mar 2025 16:24:21 +0800 Subject: [PATCH 10/24] fix inject. --- .../OperationLog/ReadOperationLogOutputDto.cs | 2 +- .../Extension/MiddlewareExtensions.cs | 13 +++++++++++++ .../MvcOptionsExtensions.cs | 0 .../RouteConvention.cs | 0 .../Filter/RequestLoggingMiddleware.cs | 19 ++++++++++++++----- EOM.TSHotelManagement.WebApi/Startup.cs | 13 ++++++------- 6 files changed, 34 insertions(+), 13 deletions(-) create mode 100644 EOM.TSHotelManagement.WebApi/Extension/MiddlewareExtensions.cs rename EOM.TSHotelManagement.WebApi/{Router_Extension => Extension}/MvcOptionsExtensions.cs (100%) rename EOM.TSHotelManagement.WebApi/{Router_Extension => Extension}/RouteConvention.cs (100%) diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogOutputDto.cs index b6f10db..78558da 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogOutputDto.cs @@ -5,7 +5,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public class ReadOperationLogOutputDto { - public int OperationId { get; set; } + public string OperationId { get; set; } public DateTime OperationTime { get; set; } public string LogContent { get; set; } public string OperationAccount { get; set; } diff --git a/EOM.TSHotelManagement.WebApi/Extension/MiddlewareExtensions.cs b/EOM.TSHotelManagement.WebApi/Extension/MiddlewareExtensions.cs new file mode 100644 index 0000000..7e7f5d4 --- /dev/null +++ b/EOM.TSHotelManagement.WebApi/Extension/MiddlewareExtensions.cs @@ -0,0 +1,13 @@ +using Microsoft.AspNetCore.Builder; + +namespace EOM.TSHotelManagement.WebApi +{ + public static class MiddlewareExtensions + { + public static IApplicationBuilder UseRequestLogging( + this IApplicationBuilder builder) + { + return builder.UseMiddleware(); + } + } +} diff --git a/EOM.TSHotelManagement.WebApi/Router_Extension/MvcOptionsExtensions.cs b/EOM.TSHotelManagement.WebApi/Extension/MvcOptionsExtensions.cs similarity index 100% rename from EOM.TSHotelManagement.WebApi/Router_Extension/MvcOptionsExtensions.cs rename to EOM.TSHotelManagement.WebApi/Extension/MvcOptionsExtensions.cs diff --git a/EOM.TSHotelManagement.WebApi/Router_Extension/RouteConvention.cs b/EOM.TSHotelManagement.WebApi/Extension/RouteConvention.cs similarity index 100% rename from EOM.TSHotelManagement.WebApi/Router_Extension/RouteConvention.cs rename to EOM.TSHotelManagement.WebApi/Extension/RouteConvention.cs diff --git a/EOM.TSHotelManagement.WebApi/Filter/RequestLoggingMiddleware.cs b/EOM.TSHotelManagement.WebApi/Filter/RequestLoggingMiddleware.cs index 12a20c7..fd4af70 100644 --- a/EOM.TSHotelManagement.WebApi/Filter/RequestLoggingMiddleware.cs +++ b/EOM.TSHotelManagement.WebApi/Filter/RequestLoggingMiddleware.cs @@ -8,6 +8,7 @@ using EOM.TSHotelManagement.EntityFramework; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Logging; using SqlSugar; public class RequestLoggingMiddleware @@ -78,18 +79,26 @@ public class RequestLoggingMiddleware { log.ExceptionMessage = exception.Message; log.ExceptionStackTrace = exception.StackTrace; - log.LogLevel = LogLevel.Critical; + log.LogLevel = EOM.TSHotelManagement.Common.Core.LogLevel.Critical; } else { log.LogLevel = context.Response.StatusCode >= 400 - ? LogLevel.Warning - : LogLevel.Normal; + ? EOM.TSHotelManagement.Common.Core.LogLevel.Warning + : EOM.TSHotelManagement.Common.Core.LogLevel.Normal; } log.LogLevelName = log.LogLevel.ToString(); - - _ = Task.Run(() => repository.InsertAsync(log)); + try + { + await repository.InsertAsync(log); + } + catch (Exception ex) + { + var logger = context.RequestServices + .GetRequiredService>(); + logger.LogError(ex, "日志记录失败"); + } } } diff --git a/EOM.TSHotelManagement.WebApi/Startup.cs b/EOM.TSHotelManagement.WebApi/Startup.cs index ace0a07..1082a18 100644 --- a/EOM.TSHotelManagement.WebApi/Startup.cs +++ b/EOM.TSHotelManagement.WebApi/Startup.cs @@ -163,7 +163,7 @@ namespace EOM.TSHotelManagement.WebApi app.UseAuthorization(); - app.UseMiddleware(); + app.UseRequestLogging(); app.UseEndpoints(endpoints => { @@ -198,16 +198,15 @@ namespace EOM.TSHotelManagement.WebApi .InstancePerLifetimeScope(); builder.RegisterGeneric(typeof(GenericRepository<>)) - .AsSelf() - .InstancePerLifetimeScope(); - - builder.RegisterType().AsSelf().InstancePerLifetimeScope(); - builder.RegisterType().AsSelf().InstancePerLifetimeScope(); + .AsSelf() + .InstancePerLifetimeScope(); builder.RegisterType() - .AsSelf() .InstancePerDependency(); + builder.RegisterType().AsSelf().InstancePerLifetimeScope(); + builder.RegisterType().AsSelf().InstancePerLifetimeScope(); + //ע var assemblyService = Assembly.LoadFrom(Path.Combine(AppContext.BaseDirectory, "EOM.TSHotelManagement.Application.dll")); builder.RegisterAssemblyTypes(assemblyService) -- Gitee From bfcb33be6e1a702573284bc57fcc78d8314f998e Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Sat, 5 Apr 2025 01:54:39 +0800 Subject: [PATCH 11/24] adjustment controller. --- .../Business/Reser/IReserService.cs | 7 + .../Business/Reser/ReserService.cs | 62 ++++++- .../Business/Room/IRoomService.cs | 8 - .../Business/Room/RoomService.cs | 161 ++++++++++-------- .../Business/Room/RoomTypeService.cs | 10 +- .../Employee/EmployeeService.cs | 16 +- .../Administrator/AdminService.cs | 2 +- .../SystemManagement/Base/BaseService.cs | 52 +++--- .../SystemManagement/Base/IBaseService.cs | 10 +- .../SystemManagement/Menu/IMenuService.cs | 2 +- .../SystemManagement/Menu/MenuService.cs | 15 +- .../Util/IUtilService.cs | 12 ++ .../Util/UtilService.cs | 47 +++++ .../BaseDto/BaseInputDto.cs | 1 + .../Dto/CustoType/CreateCustoTypeInputDto.cs | 9 +- .../Dto/Customer/ReadCustomerOutputDto.cs | 2 +- .../DeletePassportTypeInputDto.cs | 2 +- .../PassportType/ReadPassportTypeInputDto.cs | 2 +- .../UpdatePassportTypeInputDto.cs | 2 +- .../Business/Reser/Dto/CreateReserInputDto.cs | 5 +- .../Business/Reser/Dto/ReadReserInputDto.cs | 7 +- .../Business/Reser/Dto/ReadReserOutputDto.cs | 12 +- .../Business/Reser/Dto/UpdateReserInputDto.cs | 12 +- .../Room/Dto/Room/ReadRoomOutputDto.cs | 2 +- .../Dto/Employee/CreateEmployeeInputDto.cs | 2 +- .../Dto/Employee/ReadEmployeeOutputDto.cs | 2 +- .../Dto/Employee/UpdateEmployeeInputDto.cs | 1 + .../DeleteRewardPunishmentTypeInputDto.cs | 2 +- .../ReadRewardPunishmentTypeInputDto.cs | 2 +- .../UpdateRewardPunishmentTypeInputDto.cs | 4 +- .../ReadAdministratorOutputDto.cs | 2 +- ...{PoliticalAffiliationDto.cs => EnumDto.cs} | 2 +- .../Qualification/CreateEducationInputDto.cs | 1 + .../Qualification/DeleteEducationInputDto.cs | 2 +- .../Qualification/ReadEducationInputDto.cs | 2 +- .../Qualification/UpdateEducationInputDto.cs | 2 +- .../DeleteOperationLogInputDto.cs | 2 +- .../OperationLog/ReadOperationLogInputDto.cs | 5 +- .../OperationLog/ReadOperationLogOutputDto.cs | 8 - .../BaseEntity.cs | 2 +- .../Business/Asset/Asset.cs | 2 +- .../Business/Customer/CustoType.cs | 2 +- .../Business/Customer/Customer.cs | 2 +- .../Business/Customer/GenderType.cs | 2 +- .../Business/Customer/PassPortType.cs | 4 +- .../EnergyManagement/EnergyManagement.cs | 4 +- .../PromotionContent/PromotionContent.cs | 2 +- .../Business/Reser/Reser.cs | 2 +- .../Business/Room/Room.cs | 2 +- .../Business/Room/RoomState.cs | 29 ++-- .../Business/Spend/Spend.cs | 2 +- .../Employee/Employee.cs | 2 +- .../Employee/EmployeeCheck.cs | 5 + .../Employee/EmployeeHistory.cs | 5 + .../Employee/EmployeeRewardPunishment.cs | 2 +- .../Employee/RewardPunishmentType.cs | 2 +- .../Util/OperationLog.cs | 10 -- .../GenerateJWT/JWTHelper.cs | 102 ++++++++++- .../Helper/RandomStringGenerator.cs | 53 ++++++ EOM.TSHotelManagement.Shared/BrotliHelper.cs | 46 +++++ EOM.TSHotelManagement.Shared/EnumHelper.cs | 31 ++++ .../Business/Reser/ReserController.cs | 11 ++ .../Business/Room/RoomController.cs | 10 -- .../SystemManagement/Base/BaseController.cs | 15 +- .../SystemManagement/Menu/MenuController.cs | 7 +- .../Controllers/Util/UtilityController.cs | 22 +++ .../Filter/RequestLoggingMiddleware.cs | 26 +-- EOM.TSHotelManagement.WebApi/Startup.cs | 4 +- 68 files changed, 650 insertions(+), 257 deletions(-) rename EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/{PoliticalAffiliationDto.cs => EnumDto.cs} (88%) create mode 100644 EOM.TSHotelManagement.Common.Util/Helper/RandomStringGenerator.cs create mode 100644 EOM.TSHotelManagement.Shared/BrotliHelper.cs create mode 100644 EOM.TSHotelManagement.Shared/EnumHelper.cs diff --git a/EOM.TSHotelManagement.Application/Business/Reser/IReserService.cs b/EOM.TSHotelManagement.Application/Business/Reser/IReserService.cs index 93cf386..636e613 100644 --- a/EOM.TSHotelManagement.Application/Business/Reser/IReserService.cs +++ b/EOM.TSHotelManagement.Application/Business/Reser/IReserService.cs @@ -52,6 +52,13 @@ namespace EOM.TSHotelManagement.Application /// BaseOutputDto DeleteReserInfo(DeleteReserInputDto reser); + /// + /// 更新预约信息 + /// + /// + /// + BaseOutputDto UpdateReserInfo(UpdateReserInputDto reser); + /// /// 添加预约信息 /// diff --git a/EOM.TSHotelManagement.Application/Business/Reser/ReserService.cs b/EOM.TSHotelManagement.Application/Business/Reser/ReserService.cs index 916af76..389b344 100644 --- a/EOM.TSHotelManagement.Application/Business/Reser/ReserService.cs +++ b/EOM.TSHotelManagement.Application/Business/Reser/ReserService.cs @@ -25,6 +25,7 @@ using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; using EOM.TSHotelManagement.Common.Util; using EOM.TSHotelManagement.EntityFramework; +using EOM.TSHotelManagement.Shared; using jvncorelib.EncryptorLib; using Microsoft.AspNetCore.DataProtection; using SqlSugar; @@ -41,14 +42,26 @@ namespace EOM.TSHotelManagement.Application /// private readonly GenericRepository reserRepository; + /// + /// 房间信息 + /// + private readonly GenericRepository roomRepository; + /// /// 数据保护 /// private readonly IDataProtector dataProtector; - public ReserService(GenericRepository reserRepository, IDataProtectionProvider dataProtectionProvider) + /// + /// + /// + /// + /// + /// + public ReserService(GenericRepository reserRepository, GenericRepository roomRepository, IDataProtectionProvider dataProtectionProvider) { this.reserRepository = reserRepository; + this.roomRepository = roomRepository; this.dataProtector = dataProtectionProvider.CreateProtector("ReserInfoProtector"); } @@ -95,7 +108,7 @@ namespace EOM.TSHotelManagement.Application public SingleOutputDto SelectReserInfoByRoomNo(ReadReserInputDto readReserInputDt) { Reser res = null; - res = reserRepository.GetSingle(a => a.ReservationRoomNumber == readReserInputDt.RoomNo && a.IsDelete != 1); + res = reserRepository.GetSingle(a => a.ReservationRoomNumber == readReserInputDt.ReservationRoomNumber && a.IsDelete != 1); //解密联系方式 var sourceTelStr = dataProtector.Unprotect(res.ReservationPhoneNumber); res.ReservationPhoneNumber = sourceTelStr; @@ -129,6 +142,35 @@ namespace EOM.TSHotelManagement.Application } } + /// + /// 更新预约信息 + /// + /// + /// + public BaseOutputDto UpdateReserInfo(UpdateReserInputDto reser) + { + string NewTel = dataProtector.Protect(reser.ReservationPhoneNumber); + reser.ReservationPhoneNumber = NewTel; + try + { + var result = reserRepository.Update(EntityMapper.Map(reser)); + + if (result) + { + return new BaseOutputDto(StatusCodeConstants.Success, LocalizationHelper.GetLocalizedString("Update Customer Success", "预约信息更新成功")); + } + else + { + return new BaseOutputDto(StatusCodeConstants.InternalServerError, LocalizationHelper.GetLocalizedString("Update Customer Failed", "预约信息更新失败")); + } + } + catch (Exception ex) + { + LogHelper.LogError(LocalizationHelper.GetLocalizedString("Update Customer Failed", "预约信息添加失败"), ex); + return new BaseOutputDto(StatusCodeConstants.InternalServerError, LocalizationHelper.GetLocalizedString("Update Customer Failed", "预约信息更新失败")); + } + } + /// /// 添加预约信息 /// @@ -140,21 +182,27 @@ namespace EOM.TSHotelManagement.Application r.ReservationPhoneNumber = NewTel; try { - var result = reserRepository.Update(EntityMapper.Map(r)); + var result = reserRepository.Insert(EntityMapper.Map(r)); if (result) { - return new BaseOutputDto(StatusCodeConstants.Success, LocalizationHelper.GetLocalizedString("Update Customer Success", "预约信息添加成功")); + roomRepository.Update(a => new Room() + { + RoomStateId = new EnumHelper().GetEnumValue(RoomState.Reserved), + DataChgUsr = r.DataChgUsr, + DataChgDate = r.DataChgDate + }, a => a.RoomNumber == r.ReservationRoomNumber); + return new BaseOutputDto(StatusCodeConstants.Success, LocalizationHelper.GetLocalizedString("Add Customer Success", "预约信息添加成功")); } else { - return new BaseOutputDto(StatusCodeConstants.InternalServerError, LocalizationHelper.GetLocalizedString("Update Customer Failed", "预约信息添加失败")); + return new BaseOutputDto(StatusCodeConstants.InternalServerError, LocalizationHelper.GetLocalizedString("Add Customer Failed", "预约信息添加失败")); } } catch (Exception ex) { - LogHelper.LogError(LocalizationHelper.GetLocalizedString("Update Customer Failed", "预约信息添加失败"), ex); - return new BaseOutputDto(StatusCodeConstants.InternalServerError, LocalizationHelper.GetLocalizedString("Update Customer Failed", "预约信息添加失败")); + LogHelper.LogError(LocalizationHelper.GetLocalizedString("Add Customer Failed", "预约信息添加失败"), ex); + return new BaseOutputDto(StatusCodeConstants.InternalServerError, LocalizationHelper.GetLocalizedString("Add Customer Failed", "预约信息添加失败")); } } } diff --git a/EOM.TSHotelManagement.Application/Business/Room/IRoomService.cs b/EOM.TSHotelManagement.Application/Business/Room/IRoomService.cs index 016a1d1..5fbbd54 100644 --- a/EOM.TSHotelManagement.Application/Business/Room/IRoomService.cs +++ b/EOM.TSHotelManagement.Application/Business/Room/IRoomService.cs @@ -201,14 +201,6 @@ namespace EOM.TSHotelManagement.Application ListOutputDto SelectRoomByStateAll(); #endregion - #region 获取所有房间状态 - /// - /// 获取所有房间状态 - /// - /// - ListOutputDto SelectRoomStateAll(ReadRoomStateInputDto readRoomStateInputDto); - #endregion - #region 根据房间编号查询房间状态编号 /// /// 根据房间编号查询房间状态编号 diff --git a/EOM.TSHotelManagement.Application/Business/Room/RoomService.cs b/EOM.TSHotelManagement.Application/Business/Room/RoomService.cs index b08647f..3c1a3cf 100644 --- a/EOM.TSHotelManagement.Application/Business/Room/RoomService.cs +++ b/EOM.TSHotelManagement.Application/Business/Room/RoomService.cs @@ -25,6 +25,7 @@ using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; using EOM.TSHotelManagement.Common.Util; using EOM.TSHotelManagement.EntityFramework; +using EOM.TSHotelManagement.Shared; using jvncorelib.EntityLib; using NPOI.SS.Formula.Functions; using SqlSugar; @@ -41,11 +42,6 @@ namespace EOM.TSHotelManagement.Application /// private readonly GenericRepository roomRepository; - /// - /// 客房状态 - /// - private readonly GenericRepository roomStateRepository; - /// /// 客房类型 /// @@ -60,13 +56,11 @@ namespace EOM.TSHotelManagement.Application /// /// /// - /// /// /// - public RoomService(GenericRepository roomRepository, GenericRepository roomStateRepository, GenericRepository roomTypeRepository, GenericRepository custoRepository) + public RoomService(GenericRepository roomRepository, GenericRepository roomTypeRepository, GenericRepository custoRepository) { this.roomRepository = roomRepository; - this.roomStateRepository = roomStateRepository; this.roomTypeRepository = roomTypeRepository; this.custoRepository = custoRepository; } @@ -79,17 +73,26 @@ namespace EOM.TSHotelManagement.Application /// public ListOutputDto SelectRoomByRoomState(ReadRoomInputDto readRoomInputDto) { - List roomStates = new List(); - roomStates = roomStateRepository.GetList(a => a.IsDelete != 1); + List roomStates = new List(); + var helper = new EnumHelper(); + roomStates = Enum.GetValues(typeof(RoomState)) + .Cast() + .Select(e => new EnumDto + { + Id = (int)e, + Name = e.ToString(), + Description = helper.GetEnumDescription(e) + }) + .ToList(); List roomTypes = new List(); roomTypes = roomTypeRepository.GetList(a => a.IsDelete != 1); List rooms = new List(); rooms = roomRepository.GetList(a => a.IsDelete != 1 && a.RoomStateId == readRoomInputDto.RoomStateId).OrderBy(a => a.RoomNumber).ToList(); rooms.ForEach(source => { - var roomState = roomStates.FirstOrDefault(a => a.RoomStateId == source.RoomStateId); - source.RoomState = roomState.RoomStateName.IsNullOrEmpty() ? "" : roomState.RoomStateName; - var roomType = roomTypes.FirstOrDefault(a => a.RoomTypeId == source.RoomType); + var roomState = roomStates.FirstOrDefault(a => a.Id == source.RoomStateId); + source.RoomState = roomState.Description.IsNullOrEmpty() ? "" : roomState.Description; + var roomType = roomTypes.FirstOrDefault(a => a.RoomTypeId == source.RoomTypeId); source.RoomName = roomType.RoomTypeName.IsNullOrEmpty() ? "" : roomType.RoomTypeName; }); @@ -106,17 +109,26 @@ namespace EOM.TSHotelManagement.Application /// public ListOutputDto SelectCanUseRoomAll() { - List roomStates = new List(); - roomStates = roomStateRepository.GetList(); + List roomStates = new List(); + var helper = new EnumHelper(); + roomStates = Enum.GetValues(typeof(RoomState)) + .Cast() + .Select(e => new EnumDto + { + Id = (int)e, + Name = e.ToString(), + Description = helper.GetEnumDescription(e) + }) + .ToList(); List roomTypes = new List(); roomTypes = roomTypeRepository.GetList(); List rooms = new List(); rooms = roomRepository.GetList(a => a.IsDelete != 1 && a.RoomStateId == 0).OrderBy(a => a.RoomNumber).ToList(); rooms.ForEach(source => { - var roomState = roomStates.FirstOrDefault(a => a.RoomStateId == source.RoomStateId); - source.RoomState = roomState.RoomStateName.IsNullOrEmpty() ? "" : roomState.RoomStateName; - var roomType = roomTypes.FirstOrDefault(a => a.RoomTypeId == source.RoomType); + var roomState = roomStates.FirstOrDefault(a => a.Id == source.RoomStateId); + source.RoomState = roomState.Description.IsNullOrEmpty() ? "" : roomState.Description; + var roomType = roomTypes.FirstOrDefault(a => a.RoomTypeId == source.RoomTypeId); source.RoomName = roomType.RoomTypeName.IsNullOrEmpty() ? "" : roomType.RoomTypeName; }); @@ -137,8 +149,22 @@ namespace EOM.TSHotelManagement.Application where = where.And(a => a.IsDelete == readRoomInputDto.IsDelete); - List roomStates = new List(); - roomStates = roomStateRepository.GetList(); + if (readRoomInputDto.RoomStateId > 0) + { + where = where.And(a => a.RoomStateId == readRoomInputDto.RoomStateId); + } + + List roomStates = new List(); + var helper = new EnumHelper(); + roomStates = Enum.GetValues(typeof(RoomState)) + .Cast() + .Select(e => new EnumDto + { + Id = (int)e, + Name = e.ToString(), + Description = helper.GetEnumDescription(e) + }) + .ToList(); List roomTypes = new List(); roomTypes = roomTypeRepository.GetList(); List rooms = new List(); @@ -160,9 +186,9 @@ namespace EOM.TSHotelManagement.Application rooms.ForEach(source => { - var roomState = roomStates.FirstOrDefault(a => a.RoomStateId == source.RoomStateId); - source.RoomState = roomState.RoomStateName.IsNullOrEmpty() ? "" : roomState.RoomStateName; - var roomType = roomTypes.FirstOrDefault(a => a.RoomTypeId == source.RoomType); + var roomState = roomStates.FirstOrDefault(a => a.Id == source.RoomStateId); + source.RoomState = roomState.Description.IsNullOrEmpty() ? "" : roomState.Description; + var roomType = roomTypes.FirstOrDefault(a => a.RoomTypeId == source.RoomTypeId); source.RoomName = roomType.RoomTypeName.IsNullOrEmpty() ? "" : roomType.RoomTypeName; var custo = custos.FirstOrDefault(a => a.CustomerNumber.Equals(source.CustomerNumber)); @@ -186,21 +212,30 @@ namespace EOM.TSHotelManagement.Application /// public ListOutputDto SelectRoomByTypeName(ReadRoomInputDto readRoomInputDto) { - List roomStates = new List(); - roomStates = roomStateRepository.GetList(a => a.IsDelete != 1); + List roomStates = new List(); + var helper = new EnumHelper(); + roomStates = Enum.GetValues(typeof(RoomState)) + .Cast() + .Select(e => new EnumDto + { + Id = (int)e, + Name = e.ToString(), + Description = helper.GetEnumDescription(e) + }) + .ToList(); List roomTypes = new List(); roomTypes = roomTypeRepository.GetList(a => a.IsDelete != 1 && a.RoomTypeName == readRoomInputDto.RoomTypeName); var listTypes = roomTypes.Select(a => a.RoomTypeId).Distinct().ToList(); List rooms = new List(); - rooms = roomRepository.GetList(a => a.IsDelete != 1 && listTypes.Contains(a.RoomType)).OrderBy(a => a.RoomNumber).ToList(); + rooms = roomRepository.GetList(a => a.IsDelete != 1 && listTypes.Contains(a.RoomTypeId)).OrderBy(a => a.RoomNumber).ToList(); var listCustoNo = rooms.Select(a => a.CustomerNumber).Distinct().ToList(); List custos = new List(); custos = custoRepository.GetList(a => listCustoNo.Contains(a.CustomerNumber)); rooms.ForEach(source => { - var roomState = roomStates.FirstOrDefault(a => a.RoomStateId == source.RoomStateId); - source.RoomState = roomState.RoomStateName.IsNullOrEmpty() ? "" : roomState.RoomStateName; - var roomType = roomTypes.FirstOrDefault(a => a.RoomTypeId == source.RoomType); + var roomState = roomStates.FirstOrDefault(a => a.Id == source.RoomStateId); + source.RoomState = roomState.Description.IsNullOrEmpty() ? "" : roomState.Description; + var roomType = roomTypes.FirstOrDefault(a => a.RoomTypeId == source.RoomTypeId); source.RoomName = roomType.RoomTypeName.IsNullOrEmpty() ? "" : roomType.RoomTypeName; var custo = custos.FirstOrDefault(a => a.CustomerNumber.Equals(source.CustomerNumber)); @@ -221,15 +256,24 @@ namespace EOM.TSHotelManagement.Application /// public ReadRoomOutputDto SelectRoomByRoomNo(ReadRoomInputDto readRoomInputDto) { - List roomStates = new List(); - roomStates = roomStateRepository.GetList(a => a.IsDelete != 1); + List roomStates = new List(); + var helper = new EnumHelper(); + roomStates = Enum.GetValues(typeof(RoomState)) + .Cast() + .Select(e => new EnumDto + { + Id = (int)e, + Name = e.ToString(), + Description = helper.GetEnumDescription(e) + }) + .ToList(); Room room = new Room(); room = roomRepository.GetSingle(a => a.IsDelete != 1 && a.RoomNumber == readRoomInputDto.RoomNumber); if (!room.IsNullOrEmpty()) { - var roomSate = roomStates.FirstOrDefault(a => a.RoomStateId == room.RoomStateId); - room.RoomState = roomSate.RoomStateName.IsNullOrEmpty() ? "" : roomSate.RoomStateName; - var roomType = roomTypeRepository.GetSingle(a => a.RoomTypeId == room.RoomType); + var roomSate = roomStates.FirstOrDefault(a => a.Id == room.RoomStateId); + room.RoomState = roomSate.Description.IsNullOrEmpty() ? "" : roomSate.Description; + var roomType = roomTypeRepository.GetSingle(a => a.RoomTypeId == room.RoomTypeId); room.RoomName = roomType.RoomTypeName.IsNullOrEmpty() ? "" : roomType.RoomTypeName; } else @@ -499,17 +543,26 @@ namespace EOM.TSHotelManagement.Application /// public ListOutputDto SelectRoomByStateAll() { - List roomStates = new List(); - roomStates = roomStateRepository.GetList(a => a.IsDelete != 1); + List roomStates = new List(); + var helper = new EnumHelper(); + roomStates = Enum.GetValues(typeof(RoomState)) + .Cast() + .Select(e => new EnumDto + { + Id = (int)e, + Name = e.ToString(), + Description = helper.GetEnumDescription(e) + }) + .ToList(); List roomTypes = new List(); roomTypes = roomTypeRepository.GetList(a => a.IsDelete != 1); List rooms = new List(); rooms = roomRepository.GetList(a => a.IsDelete != 1 && a.RoomStateId == 1).OrderBy(a => a.RoomNumber).ToList(); rooms.ForEach(source => { - var roomState = roomStates.FirstOrDefault(a => a.RoomStateId == source.RoomStateId); - source.RoomState = roomState.RoomStateName.IsNullOrEmpty() ? "" : roomState.RoomStateName; - var roomType = roomTypes.FirstOrDefault(a => a.RoomTypeId == source.RoomType); + var roomState = roomStates.FirstOrDefault(a => a.Id == source.RoomStateId); + source.RoomState = roomState.Description.IsNullOrEmpty() ? "" : roomState.Description; + var roomType = roomTypes.FirstOrDefault(a => a.RoomTypeId == source.RoomTypeId); source.RoomName = roomType.RoomTypeName.IsNullOrEmpty() ? "" : roomType.RoomTypeName; }); @@ -519,36 +572,6 @@ namespace EOM.TSHotelManagement.Application } #endregion - #region 获取所有房间状态 - /// - /// 获取所有房间状态 - /// - /// - public ListOutputDto SelectRoomStateAll(ReadRoomStateInputDto readRoomStateInputDto) - { - var where = Expressionable.Create(); - - where = where.And(a => a.IsDelete == 0); - - List rs = new List(); - - var count = 0; - - if (!readRoomStateInputDto.IgnorePaging && readRoomStateInputDto.Page != 0 && readRoomStateInputDto.PageSize != 0) - { - rs = roomStateRepository.AsQueryable().Where(where.ToExpression()).ToPageList(readRoomStateInputDto.Page, readRoomStateInputDto.PageSize, ref count); - } - else - { - rs = roomStateRepository.AsQueryable().Where(where.ToExpression()).ToList(); - } - - var listSource = EntityMapper.MapList(rs); - - return new ListOutputDto { listSource = listSource,total = count }; - } - #endregion - #region 根据房间编号查询房间状态编号 /// /// 根据房间编号查询房间状态编号 diff --git a/EOM.TSHotelManagement.Application/Business/Room/RoomTypeService.cs b/EOM.TSHotelManagement.Application/Business/Room/RoomTypeService.cs index 3bb7dd1..e9a0320 100644 --- a/EOM.TSHotelManagement.Application/Business/Room/RoomTypeService.cs +++ b/EOM.TSHotelManagement.Application/Business/Room/RoomTypeService.cs @@ -113,7 +113,7 @@ namespace EOM.TSHotelManagement.Application RoomType roomtype = new RoomType(); Room room = new Room(); room = roomRepository.GetSingle(a => a.RoomNumber == readRoomTypeInputDto.RoomNumber && a.IsDelete != 1); - roomtype.RoomTypeName = roomTypeRepository.GetSingle(a => a.RoomTypeId == room.RoomType).RoomTypeName; + roomtype.RoomTypeName = roomTypeRepository.GetSingle(a => a.RoomTypeId == room.RoomTypeId).RoomTypeName; var source = EntityMapper.Map(roomtype); @@ -136,7 +136,7 @@ namespace EOM.TSHotelManagement.Application } /// - /// 添加房间状态 + /// 添加房间类型 /// /// /// @@ -146,7 +146,7 @@ namespace EOM.TSHotelManagement.Application { var existRoomType = roomTypeRepository.IsAny(a => a.RoomTypeId == roomType.RoomTypeId); if (existRoomType) - return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString("This room state already exists.", "房间状态已存在。"), StatusCode = StatusCodeConstants.InternalServerError }; + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString("This room type already exists.", "房间类型已存在。"), StatusCode = StatusCodeConstants.InternalServerError }; roomTypeRepository.Insert(EntityMapper.Map(roomType)); } catch (Exception ex) @@ -157,7 +157,7 @@ namespace EOM.TSHotelManagement.Application } /// - /// 更新房间状态 + /// 更新房间类型 /// /// /// @@ -183,7 +183,7 @@ namespace EOM.TSHotelManagement.Application } /// - /// 删除房间状态 + /// 删除房间类型 /// /// /// diff --git a/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs b/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs index e9fda4b..6b27fb6 100644 --- a/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs +++ b/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs @@ -129,19 +129,7 @@ namespace EOM.TSHotelManagement.Application updateEmployeeInputDto.PhoneNumber = sourceTelStr; updateEmployeeInputDto.IdCardNumber = sourceIdStr; - workerRepository.Update(a => new Employee() - { - EmployeeName = updateEmployeeInputDto.EmployeeName, - PhoneNumber = updateEmployeeInputDto.PhoneNumber, - Address = updateEmployeeInputDto.Address, - PoliticalAffiliation = updateEmployeeInputDto.PoliticalAffiliation, - EducationLevel = updateEmployeeInputDto.EducationLevel, - Ethnicity = updateEmployeeInputDto.Ethnicity, - IdCardNumber = updateEmployeeInputDto.IdCardNumber, - Gender = updateEmployeeInputDto.Gender, - DateOfBirth = updateEmployeeInputDto.DateOfBirth, - DataChgUsr = updateEmployeeInputDto.DataChgUsr - }, a => a.EmployeeId.Equals(updateEmployeeInputDto.EmployeeId)); + workerRepository.Update(EntityMapper.Map(updateEmployeeInputDto)); } catch (Exception ex) { @@ -441,7 +429,7 @@ namespace EOM.TSHotelManagement.Application { try { - var newPwd = new UniqueCode().GetNewId(); + var newPwd = new RandomStringGenerator().GenerateSecurePassword(); string encrypted = dataProtector.Protect(newPwd); var employeeMailAddress = workerRepository.GetSingle(a => a.EmployeeId == updateEmployeeInputDto.EmployeeId).EmailAddress; diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Administrator/AdminService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Administrator/AdminService.cs index 8e0fc39..3628698 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/Administrator/AdminService.cs +++ b/EOM.TSHotelManagement.Application/SystemManagement/Administrator/AdminService.cs @@ -113,7 +113,7 @@ namespace EOM.TSHotelManagement.Application existingAdmin.UserToken = jWTHelper.GenerateJWT(new ClaimsIdentity(new Claim[] { new Claim(ClaimTypes.Name, existingAdmin.Name), - new Claim(ClaimTypes.SerialNumber, existingAdmin.Account) + new Claim(ClaimTypes.SerialNumber, existingAdmin.Number) })); var source = EntityMapper.Map(existingAdmin); diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Base/BaseService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Base/BaseService.cs index de9079f..c6015a9 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/Base/BaseService.cs +++ b/EOM.TSHotelManagement.Application/SystemManagement/Base/BaseService.cs @@ -26,6 +26,7 @@ using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; using EOM.TSHotelManagement.Common.Util; using EOM.TSHotelManagement.EntityFramework; +using EOM.TSHotelManagement.Shared; using jvncorelib.EntityLib; using Microsoft.Extensions.Options; using SqlSugar; @@ -209,15 +210,36 @@ namespace EOM.TSHotelManagement.Application /// 查询所有面貌类型 /// /// - public List SelectWorkerFeatureAll() + public List SelectWorkerFeatureAll() { + var helper = new EnumHelper(); return Enum.GetValues(typeof(PoliticalAffiliation)) .Cast() - .Select(e => new PoliticalAffiliationDto + .Select(e => new EnumDto { Id = (int)e, Name = e.ToString(), - Description = GetEnumDescription(e) + Description = helper.GetEnumDescription(e) + }) + .ToList(); + } + #endregion + + #region 房间状态模块 + /// + /// 获取所有房间状态 + /// + /// + public List SelectRoomStateAll() + { + var helper = new EnumHelper(); + return Enum.GetValues(typeof(RoomState)) + .Cast() + .Select(e => new EnumDto + { + Id = (int)e, + Name = e.ToString(), + Description = helper.GetEnumDescription(e) }) .ToList(); } @@ -438,7 +460,7 @@ namespace EOM.TSHotelManagement.Application /// public SingleOutputDto SelectEducation(ReadEducationInputDto educationInputDto) { - var education = educationRepository.GetSingle(a => a.Id == educationInputDto.EducationId); + var education = educationRepository.GetSingle(a => a.EducationNumber == educationInputDto.EducationNumber); var result = EntityMapper.Map(education); return new SingleOutputDto { Source = result }; } @@ -467,7 +489,7 @@ namespace EOM.TSHotelManagement.Application IsDelete = deleteEducationInputDto.IsDelete, DataChgUsr = deleteEducationInputDto.DataChgUsr, DataChgDate = deleteEducationInputDto.DataChgDate - }, a => a.Id == deleteEducationInputDto.EducationId); + }, a => a.EducationNumber == deleteEducationInputDto.EducationNumber); return new BaseOutputDto { StatusCode = result ? StatusCodeConstants.Success : StatusCodeConstants.InternalServerError }; } @@ -483,7 +505,7 @@ namespace EOM.TSHotelManagement.Application EducationName = education.EducationName, DataChgUsr = education.DataChgUsr, DataChgDate = education.DataChgDate - }, a => a.Id == education.EducationId); + }, a => a.EducationNumber == education.EducationNumber); return new BaseOutputDto { StatusCode = result ? StatusCodeConstants.Success : StatusCodeConstants.InternalServerError }; } @@ -844,7 +866,7 @@ namespace EOM.TSHotelManagement.Application /// public SingleOutputDto SelectRewardPunishmentTypeByTypeId(ReadRewardPunishmentTypeInputDto gBType) { - var gBTypeEntity = goodbadTypeRepository.GetSingle(a => a.RewardPunishmentTypeId == gBType.GBTypeId && a.IsDelete != 1); + var gBTypeEntity = goodbadTypeRepository.GetSingle(a => a.RewardPunishmentTypeId == gBType.RewardPunishmentTypeId && a.IsDelete != 1); var result = EntityMapper.Map(gBTypeEntity); return new SingleOutputDto { Source = result }; } @@ -872,7 +894,7 @@ namespace EOM.TSHotelManagement.Application { IsDelete = 1, DataChgUsr = gBType.DataChgUsr, - }, a => a.RewardPunishmentTypeId == gBType.GBTypeId); + }, a => a.RewardPunishmentTypeId == gBType.RewardPunishmentTypeId); return new BaseOutputDto { StatusCode = result ? StatusCodeConstants.Success : StatusCodeConstants.InternalServerError }; } @@ -885,10 +907,10 @@ namespace EOM.TSHotelManagement.Application { var result = goodbadTypeRepository.Update(a => new RewardPunishmentType() { - RewardPunishmentTypeName = gBType.GBTypeName, + RewardPunishmentTypeName = gBType.RewardPunishmentTypeName, DataChgUsr = gBType.DataChgUsr, DataChgDate = gBType.DataChgDate - }, a => a.RewardPunishmentTypeId == gBType.GBTypeId); + }, a => a.RewardPunishmentTypeId == gBType.RewardPunishmentTypeId); return new BaseOutputDto { StatusCode = result ? StatusCodeConstants.Success : StatusCodeConstants.InternalServerError }; } @@ -908,15 +930,5 @@ namespace EOM.TSHotelManagement.Application } #endregion - - private static string GetEnumDescription(Enum value) - { - FieldInfo field = value.GetType().GetField(value.ToString()); - DescriptionAttribute attribute = field? - .GetCustomAttributes(typeof(DescriptionAttribute), false) - .FirstOrDefault() as DescriptionAttribute; - - return attribute?.Description ?? value.ToString(); - } } } diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Base/IBaseService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Base/IBaseService.cs index 00586fe..f9441c9 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/Base/IBaseService.cs +++ b/EOM.TSHotelManagement.Application/SystemManagement/Base/IBaseService.cs @@ -75,7 +75,15 @@ namespace EOM.TSHotelManagement.Application /// 查询所有面貌类型 /// /// - List SelectWorkerFeatureAll(); + List SelectWorkerFeatureAll(); + #endregion + + #region 房间状态模块 + /// + /// 获取所有房间状态 + /// + /// + List SelectRoomStateAll(); #endregion #region 职位模块 diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Menu/IMenuService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Menu/IMenuService.cs index 7a57aec..fb0b88d 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/Menu/IMenuService.cs +++ b/EOM.TSHotelManagement.Application/SystemManagement/Menu/IMenuService.cs @@ -41,7 +41,7 @@ namespace EOM.TSHotelManagement.Application /// 构建菜单树 /// /// - List BuildMenuAll(); + List BuildMenuAll(BaseInputDto baseInputDto); /// /// 插入菜单 diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Menu/MenuService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Menu/MenuService.cs index e31a2ad..c727d20 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/Menu/MenuService.cs +++ b/EOM.TSHotelManagement.Application/SystemManagement/Menu/MenuService.cs @@ -40,21 +40,32 @@ namespace EOM.TSHotelManagement.Application /// private readonly GenericRepository menuRepository; + /// + /// JWT助手 + /// + private readonly JWTHelper jWTHelper; + /// /// /// /// - public MenuService(GenericRepository menuRepository) + /// + public MenuService(GenericRepository menuRepository, JWTHelper jWTHelper) { this.menuRepository = menuRepository; + this.jWTHelper = jWTHelper; } /// /// 构建菜单树 /// /// - public List BuildMenuAll() + public List BuildMenuAll(BaseInputDto baseInputDto) { + var token = baseInputDto.UserToken; + + var number = jWTHelper.GetSerialNumber(token); + List allMenus = menuRepository.GetList(a => a.IsDelete != 1).OrderBy(a => a.Id).ToList(); List result = BuildMenuTree(allMenus, null); diff --git a/EOM.TSHotelManagement.Application/Util/IUtilService.cs b/EOM.TSHotelManagement.Application/Util/IUtilService.cs index c13f3f3..c638d64 100644 --- a/EOM.TSHotelManagement.Application/Util/IUtilService.cs +++ b/EOM.TSHotelManagement.Application/Util/IUtilService.cs @@ -33,5 +33,17 @@ namespace EOM.TSHotelManagement.Application /// /// ListOutputDto SelectOperationlogAll(ReadOperationLogInputDto readOperationLogInputDto); + + /// + /// 删除指定时间范围的操作日志 + /// + /// + BaseOutputDto DeleteOperationlogByRange(ReadOperationLogInputDto readOperationLogInputDto); + + /// + /// 删除操作日志 + /// + /// + BaseOutputDto DeleteOperationlog(DeleteOperationLogInputDto deleteOperationLogInputDto); } } diff --git a/EOM.TSHotelManagement.Application/Util/UtilService.cs b/EOM.TSHotelManagement.Application/Util/UtilService.cs index 1c66d3d..5eb21f2 100644 --- a/EOM.TSHotelManagement.Application/Util/UtilService.cs +++ b/EOM.TSHotelManagement.Application/Util/UtilService.cs @@ -125,5 +125,52 @@ namespace EOM.TSHotelManagement.Application return new ListOutputDto { listSource = listSource, total = count }; } + /// + /// 删除指定时间范围的操作日志 + /// + /// + public BaseOutputDto DeleteOperationlogByRange(ReadOperationLogInputDto readOperationLogInputDto) + { + try + { + var where = Expressionable.Create(); + + if (readOperationLogInputDto.StartTime != DateTime.MinValue && readOperationLogInputDto.EndTime != DateTime.MinValue) + { + where = where.And(a => a.OperationTime >= readOperationLogInputDto.StartTime && a.OperationTime <= readOperationLogInputDto.EndTime); + } + + var logsToDelete = operationLogRepository.AsQueryable().Where(where.ToExpression()).ToList(); + + if (logsToDelete.Any()) + { + operationLogRepository.Delete(logsToDelete); + } + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto { Message = "操作日志删除成功", StatusCode = StatusCodeConstants.Success }; + } + + /// + /// 删除操作日志 + /// + /// + public BaseOutputDto DeleteOperationlog(DeleteOperationLogInputDto deleteOperationLogInputDto) + { + var result = operationLogRepository.Delete(a => a.OperationId == deleteOperationLogInputDto.OperationId); + + if (result) + { + return new BaseOutputDto(StatusCodeConstants.Success, LocalizationHelper.GetLocalizedString("Delete Operation Log Success", "操作日志删除成功")); + } + else + { + return new BaseOutputDto(StatusCodeConstants.InternalServerError, LocalizationHelper.GetLocalizedString("Delete Operation Log Failed", "操作日志删除失败")); + } + } + } } diff --git a/EOM.TSHotelManagement.Common.Contract/BaseDto/BaseInputDto.cs b/EOM.TSHotelManagement.Common.Contract/BaseDto/BaseInputDto.cs index 7448617..b57374d 100644 --- a/EOM.TSHotelManagement.Common.Contract/BaseDto/BaseInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/BaseDto/BaseInputDto.cs @@ -8,6 +8,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public class BaseInputDto: BaseDto { + public int Id { get; set; } /// /// 删除标识 /// diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/CreateCustoTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/CreateCustoTypeInputDto.cs index 0da6174..18d3b31 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/CreateCustoTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/CustoType/CreateCustoTypeInputDto.cs @@ -2,7 +2,14 @@ namespace EOM.TSHotelManagement.Common.Contract { public class CreateCustoTypeInputDto: BaseInputDto { - public int CustomerType { get; set; } + /// + /// ͻ (Customer Type) + /// + public string CustomerType { get; set; } + + /// + /// ͻ (Customer Type Name) + /// public string CustomerTypeName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs index f347734..a24601e 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs @@ -6,7 +6,7 @@ namespace EOM.TSHotelManagement.Common.Contract public string CustomerNumber { get; set; } public string CustomerName { get; set; } public int? CustomerGender { get; set; } - public string PassportType { get; set; } + public int PassportType { get; set; } public string GenderName { get; set; } public string CustomerPhoneNumber { get; set; } public DateTime DateOfBirth { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/DeletePassportTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/DeletePassportTypeInputDto.cs index a7513b8..f62c6fd 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/DeletePassportTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/DeletePassportTypeInputDto.cs @@ -2,7 +2,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public class DeletePassportTypeInputDto: BaseInputDto { - public string PassportId { get; set; } + public int PassportId { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeInputDto.cs index 384de8d..f10f8fd 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeInputDto.cs @@ -2,7 +2,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public class ReadPassportTypeInputDto:ListInputDto { - public string PassportId { get; set; } + public int PassportId { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/UpdatePassportTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/UpdatePassportTypeInputDto.cs index 1938179..b027d5d 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/UpdatePassportTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/UpdatePassportTypeInputDto.cs @@ -2,7 +2,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public class UpdatePassportTypeInputDto: BaseInputDto { - public string PassportId { get; set; } + public int PassportId { get; set; } public string PassportName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/CreateReserInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/CreateReserInputDto.cs index 5a2f39b..9a78cbd 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/CreateReserInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/CreateReserInputDto.cs @@ -2,12 +2,13 @@ namespace EOM.TSHotelManagement.Common.Contract { public class CreateReserInputDto: BaseInputDto { - public string CustomerNumber { get; set; } + public string ReservationId { get; set; } + public string CustomerName { get; set; } public string ReservationPhoneNumber { get; set; } public string ReservationRoomNumber { get; set; } + public string ReservationChannel { get; set; } public DateTime ReservationStartDate { get; set; } public DateTime ReservationEndDate { get; set; } - public string ReservationStatus { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserInputDto.cs index ee6f36f..aed513f 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserInputDto.cs @@ -3,7 +3,12 @@ namespace EOM.TSHotelManagement.Common.Contract public class ReadReserInputDto:ListInputDto { public string ReservationId { get; set; } - public string RoomNo { get; set; } + public string CustomerName { get; set; } + public string ReservationPhoneNumber { get; set; } + public string ReservationRoomNumber { get; set; } + public string ReservationChannel { get; set; } + public DateTime ReservationStartDate { get; set; } + public DateTime ReservationEndDate { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserOutputDto.cs index b910764..5d8f52a 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserOutputDto.cs @@ -3,12 +3,12 @@ namespace EOM.TSHotelManagement.Common.Contract public class ReadReserOutputDto { public string ReservationId { get; set; } - public string CustomerNumber { get; set; } - public string RoomNumber { get; set; } - public DateTime ReservationDate { get; set; } - public DateTime CheckInDate { get; set; } - public DateTime CheckOutDate { get; set; } - public string ReservationStatus { get; set; } + public string CustomerName { get; set; } + public string ReservationPhoneNumber { get; set; } + public string ReservationRoomNumber { get; set; } + public string ReservationChannel { get; set; } + public DateTime ReservationStartDate { get; set; } + public DateTime ReservationEndDate { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/UpdateReserInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/UpdateReserInputDto.cs index 94ad2d5..92a2d7e 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/UpdateReserInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/UpdateReserInputDto.cs @@ -3,12 +3,12 @@ namespace EOM.TSHotelManagement.Common.Contract public class UpdateReserInputDto: BaseInputDto { public string ReservationId { get; set; } - public string CustomerNumber { get; set; } - public string RoomNumber { get; set; } - public DateTime ReservationDate { get; set; } - public DateTime CheckInDate { get; set; } - public DateTime CheckOutDate { get; set; } - public string ReservationStatus { get; set; } + public string CustomerName { get; set; } + public string ReservationPhoneNumber { get; set; } + public string ReservationRoomNumber { get; set; } + public string ReservationChannel { get; set; } + public DateTime ReservationStartDate { get; set; } + public DateTime ReservationEndDate { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomOutputDto.cs index b2205a5..7fba48c 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomOutputDto.cs @@ -4,7 +4,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public string RoomNumber { get; set; } public string RoomName { get; set; } - public string RoomType { get; set; } + public int RoomTypeId { get; set; } public string CustomerNumber { get; set; } public string CustomerName { get; set; } public DateTime? LastCheckInTime { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/CreateEmployeeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/CreateEmployeeInputDto.cs index 1eb8230..c48685c 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/CreateEmployeeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/CreateEmployeeInputDto.cs @@ -4,7 +4,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public string EmployeeId { get; set; } public string EmployeeName { get; set; } - public string Gender { get; set; } + public int Gender { get; set; } public DateTime DateOfBirth { get; set; } public string Ethnicity { get; set; } public string PhoneNumber { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs index 8d1dca8..2bdffdd 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs @@ -5,7 +5,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public string EmployeeId { get; set; } public string EmployeeName { get; set; } - public string Gender { get; set; } + public int Gender { get; set; } public string GenderName { get; set; } public DateTime DateOfBirth { get; set; } public string Ethnicity { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/UpdateEmployeeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/UpdateEmployeeInputDto.cs index 30d1e17..0b3ba99 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/UpdateEmployeeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/UpdateEmployeeInputDto.cs @@ -17,6 +17,7 @@ namespace EOM.TSHotelManagement.Common.Contract public string EducationLevel { get; set; } public string Password { get; set; } public int IsEnable { get; set; } + public string EmailAddress { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/DeleteRewardPunishmentTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/DeleteRewardPunishmentTypeInputDto.cs index e7ab59d..7731a1f 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/DeleteRewardPunishmentTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/DeleteRewardPunishmentTypeInputDto.cs @@ -2,7 +2,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public class DeleteRewardPunishmentTypeInputDto : BaseInputDto { - public int GBTypeId { get; set; } + public string RewardPunishmentTypeId { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeInputDto.cs index 13408e8..65b41a8 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/ReadRewardPunishmentTypeInputDto.cs @@ -2,7 +2,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public class ReadRewardPunishmentTypeInputDto : ListInputDto { - public int GBTypeId { get; set; } + public string RewardPunishmentTypeId { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/UpdateRewardPunishmentTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/UpdateRewardPunishmentTypeInputDto.cs index ddf736a..cd65c6e 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/UpdateRewardPunishmentTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/RewardPunishmentType/UpdateRewardPunishmentTypeInputDto.cs @@ -2,8 +2,8 @@ namespace EOM.TSHotelManagement.Common.Contract { public class UpdateRewardPunishmentTypeInputDto : BaseInputDto { - public int GBTypeId { get; set; } - public string GBTypeName { get; set; } + public string RewardPunishmentTypeId { get; set; } + public string RewardPunishmentTypeName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/ReadAdministratorOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/ReadAdministratorOutputDto.cs index 6e8d256..1822609 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/ReadAdministratorOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/ReadAdministratorOutputDto.cs @@ -2,7 +2,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public class ReadAdministratorOutputDto:BaseDto { - public int Id { get; set; } + public string Number { get; set; } public string Account { get; set; } public string Password { get; set; } public string Type { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/PoliticalAffiliationDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/EnumDto.cs similarity index 88% rename from EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/PoliticalAffiliationDto.cs rename to EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/EnumDto.cs index 0d7861d..d40158b 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/PoliticalAffiliationDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/EnumDto.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; namespace EOM.TSHotelManagement.Common.Contract { - public class PoliticalAffiliationDto + public class EnumDto { public int Id { get; set; } public string Name { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/CreateEducationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/CreateEducationInputDto.cs index 9146b21..e63d249 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/CreateEducationInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/CreateEducationInputDto.cs @@ -2,6 +2,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public class CreateEducationInputDto: BaseInputDto { + public string EducationNumber { get; set; } public string EducationName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/DeleteEducationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/DeleteEducationInputDto.cs index e7eb6ac..f04a770 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/DeleteEducationInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/DeleteEducationInputDto.cs @@ -2,7 +2,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public class DeleteEducationInputDto: BaseInputDto { - public int EducationId { get; set; } + public string EducationNumber { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/ReadEducationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/ReadEducationInputDto.cs index fbcfeb9..9341c90 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/ReadEducationInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/ReadEducationInputDto.cs @@ -2,7 +2,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public class ReadEducationInputDto:ListInputDto { - public int EducationId { get; set; } + public string EducationNumber { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/UpdateEducationInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/UpdateEducationInputDto.cs index 52da1b8..c25e952 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/UpdateEducationInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Qualification/UpdateEducationInputDto.cs @@ -2,7 +2,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public class UpdateEducationInputDto: BaseInputDto { - public int EducationId { get; set; } + public string EducationNumber { get; set; } public string EducationName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/DeleteOperationLogInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/DeleteOperationLogInputDto.cs index 97fdd2d..b84346e 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/DeleteOperationLogInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/DeleteOperationLogInputDto.cs @@ -2,7 +2,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public class DeleteOperationLogInputDto: BaseInputDto { - public int OperationId { get; set; } + public string OperationId { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogInputDto.cs index a7148b2..ff3a926 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogInputDto.cs @@ -3,8 +3,11 @@ namespace EOM.TSHotelManagement.Common.Contract { public class ReadOperationLogInputDto:ListInputDto { - public int OperationId { get; set; } + public string OperationId { get; set; } public int? LogLevel { get; set; } + + public DateTime StartTime { get; set; } + public DateTime EndTime { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogOutputDto.cs index 78558da..9118475 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/OperationLog/ReadOperationLogOutputDto.cs @@ -18,14 +18,6 @@ namespace EOM.TSHotelManagement.Common.Contract /// public string RequestPath { get; set; } /// - /// (Request Payload) - /// - public string RequestPayload { get; set; } - /// - /// Ӧ (Response Payload) - /// - public string ResponsePayload { get; set; } - /// /// Ӧʱ (Elapsed Time) /// public long ElapsedTime { get; set; } diff --git a/EOM.TSHotelManagement.Common.Core/BaseEntity.cs b/EOM.TSHotelManagement.Common.Core/BaseEntity.cs index fdfbdb1..1e7c46b 100644 --- a/EOM.TSHotelManagement.Common.Core/BaseEntity.cs +++ b/EOM.TSHotelManagement.Common.Core/BaseEntity.cs @@ -8,7 +8,7 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 编号 (ID) /// - [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)] + [SugarColumn(ColumnName = "id", IsIdentity = true)] public int Id { get; set; } /// /// 删除标识 diff --git a/EOM.TSHotelManagement.Common.Core/Business/Asset/Asset.cs b/EOM.TSHotelManagement.Common.Core/Business/Asset/Asset.cs index 5addba2..a390af3 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Asset/Asset.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Asset/Asset.cs @@ -35,7 +35,7 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 资产编号 (Asset Number) /// - [SqlSugar.SugarColumn(ColumnName = "asset_number")] + [SqlSugar.SugarColumn(ColumnName = "asset_number",IsPrimaryKey = true)] [NeedValid] public string AssetNumber { get; set; } diff --git a/EOM.TSHotelManagement.Common.Core/Business/Customer/CustoType.cs b/EOM.TSHotelManagement.Common.Core/Business/Customer/CustoType.cs index 283841b..5008523 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Customer/CustoType.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Customer/CustoType.cs @@ -33,7 +33,7 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 客户类型 (Customer Type) /// - [SqlSugar.SugarColumn(ColumnName = "custo_type")] + [SqlSugar.SugarColumn(ColumnName = "custo_type", IsPrimaryKey = true)] public int CustomerType { get; set; } /// diff --git a/EOM.TSHotelManagement.Common.Core/Business/Customer/Customer.cs b/EOM.TSHotelManagement.Common.Core/Business/Customer/Customer.cs index 70b1232..d23121d 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Customer/Customer.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Customer/Customer.cs @@ -57,7 +57,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 证件类型 (Passport Type) /// [SqlSugar.SugarColumn(ColumnName = "passport_type", IsNullable = false)] - public string PassportType { get; set; } + public int PassportType { get; set; } /// /// 性别 (Gender) diff --git a/EOM.TSHotelManagement.Common.Core/Business/Customer/GenderType.cs b/EOM.TSHotelManagement.Common.Core/Business/Customer/GenderType.cs index 7ddf472..8e52f98 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Customer/GenderType.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Customer/GenderType.cs @@ -33,7 +33,7 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 性别 ID (Gender ID) /// - [SqlSugar.SugarColumn(ColumnName = "gender_number")] + [SqlSugar.SugarColumn(ColumnName = "gender_number", IsPrimaryKey = true)] public int GenderId { get; set; } /// diff --git a/EOM.TSHotelManagement.Common.Core/Business/Customer/PassPortType.cs b/EOM.TSHotelManagement.Common.Core/Business/Customer/PassPortType.cs index 29a213b..dd92736 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Customer/PassPortType.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Customer/PassPortType.cs @@ -33,8 +33,8 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 证件类型 /// - [SqlSugar.SugarColumn(ColumnName = "passport_number")] - public string PassportId { get; set; } + [SqlSugar.SugarColumn(ColumnName = "passport_number", IsPrimaryKey = true)] + public int PassportId { get; set; } /// /// 证件名称 diff --git a/EOM.TSHotelManagement.Common.Core/Business/EnergyManagement/EnergyManagement.cs b/EOM.TSHotelManagement.Common.Core/Business/EnergyManagement/EnergyManagement.cs index 66b7e08..2c61939 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/EnergyManagement/EnergyManagement.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/EnergyManagement/EnergyManagement.cs @@ -35,8 +35,8 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 信息编号 (Information ID) /// - [SqlSugar.SugarColumn(ColumnName = "information_number", IsIdentity = true, IsPrimaryKey = true)] - public int InformationId { get; set; } + [SqlSugar.SugarColumn(ColumnName = "information_number", IsPrimaryKey = true)] + public string InformationId { get; set; } /// /// 房间编号 (Room Number) diff --git a/EOM.TSHotelManagement.Common.Core/Business/PromotionContent/PromotionContent.cs b/EOM.TSHotelManagement.Common.Core/Business/PromotionContent/PromotionContent.cs index 361fd5f..456dd7f 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/PromotionContent/PromotionContent.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/PromotionContent/PromotionContent.cs @@ -33,7 +33,7 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 宣传内容编号 (Promotion Content ID) /// - [SqlSugar.SugarColumn(ColumnName = "banner_number")] + [SqlSugar.SugarColumn(ColumnName = "banner_number", IsPrimaryKey = true)] public int PromotionContentId { get; set; } /// diff --git a/EOM.TSHotelManagement.Common.Core/Business/Reser/Reser.cs b/EOM.TSHotelManagement.Common.Core/Business/Reser/Reser.cs index e1c9837..ffc47f6 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Reser/Reser.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Reser/Reser.cs @@ -35,7 +35,7 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 预约编号 (Reservation ID) /// - [SqlSugar.SugarColumn(ColumnName = "reser_number")] + [SqlSugar.SugarColumn(ColumnName = "reser_number", IsPrimaryKey = true)] public string ReservationId { get; set; } /// diff --git a/EOM.TSHotelManagement.Common.Core/Business/Room/Room.cs b/EOM.TSHotelManagement.Common.Core/Business/Room/Room.cs index c07de29..f595f8a 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Room/Room.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Room/Room.cs @@ -46,7 +46,7 @@ namespace EOM.TSHotelManagement.Common.Core /// [SugarColumn(ColumnName = "room_type")] [NeedValid] - public int RoomType { get; set; } + public int RoomTypeId { get; set; } /// /// 客户编号 (Customer Number) diff --git a/EOM.TSHotelManagement.Common.Core/Business/Room/RoomState.cs b/EOM.TSHotelManagement.Common.Core/Business/Room/RoomState.cs index d27dc8a..1e727c3 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Room/RoomState.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Room/RoomState.cs @@ -23,25 +23,28 @@ *模块说明:房间状态类 */ using SqlSugar; +using System.ComponentModel; namespace EOM.TSHotelManagement.Common.Core { /// /// 房间状态 (Room State) /// - [SugarTable("room_state")] - public class RoomState : BaseEntity + public enum RoomState { - /// - /// 房间状态编号 (Room State ID) - /// - [SugarColumn(ColumnName = "room_state_number", IsPrimaryKey = true)] - public int RoomStateId { get; set; } - - /// - /// 房间状态名称 (Room State Name) - /// - [SugarColumn(ColumnName = "room_state")] - public string RoomStateName { get; set; } + [Description("空房")] + Vacant = 1, + + [Description("已住")] + Occupied = 2, + + [Description("维修")] + Maintenance = 3, + + [Description("脏房")] + Dirty = 4, + + [Description("预约")] + Reserved = 5, } } diff --git a/EOM.TSHotelManagement.Common.Core/Business/Spend/Spend.cs b/EOM.TSHotelManagement.Common.Core/Business/Spend/Spend.cs index e99b50c..43c65d7 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Spend/Spend.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Spend/Spend.cs @@ -37,7 +37,7 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 消费编号 (Consumption Number) /// - [SugarColumn(ColumnName = "spend_number")] + [SugarColumn(ColumnName = "spend_number", IsPrimaryKey = true)] public string SpendNumber { get; set; } /// /// 房间编号 (Room Number) diff --git a/EOM.TSHotelManagement.Common.Core/Employee/Employee.cs b/EOM.TSHotelManagement.Common.Core/Employee/Employee.cs index de1d278..22be704 100644 --- a/EOM.TSHotelManagement.Common.Core/Employee/Employee.cs +++ b/EOM.TSHotelManagement.Common.Core/Employee/Employee.cs @@ -144,7 +144,7 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 教育程度 (Education Level) /// - [SugarColumn(ColumnName = "employee_political")] + [SugarColumn(ColumnName = "employee_quality")] public string EducationLevel { get; set; } /// diff --git a/EOM.TSHotelManagement.Common.Core/Employee/EmployeeCheck.cs b/EOM.TSHotelManagement.Common.Core/Employee/EmployeeCheck.cs index bf95a69..99c76a9 100644 --- a/EOM.TSHotelManagement.Common.Core/Employee/EmployeeCheck.cs +++ b/EOM.TSHotelManagement.Common.Core/Employee/EmployeeCheck.cs @@ -33,6 +33,11 @@ namespace EOM.TSHotelManagement.Common.Core [SugarTable("employee_check")] public class EmployeeCheck : BaseEntity { + /// + /// 打卡编号 + /// + [SugarColumn(ColumnName = "check_number")] + public string CheckNumber { get; set; } /// /// 员工工号 (Employee ID) /// diff --git a/EOM.TSHotelManagement.Common.Core/Employee/EmployeeHistory.cs b/EOM.TSHotelManagement.Common.Core/Employee/EmployeeHistory.cs index 32c12cc..93c49c4 100644 --- a/EOM.TSHotelManagement.Common.Core/Employee/EmployeeHistory.cs +++ b/EOM.TSHotelManagement.Common.Core/Employee/EmployeeHistory.cs @@ -33,6 +33,11 @@ namespace EOM.TSHotelManagement.Common.Core [SugarTable("employee_history")] public class EmployeeHistory : BaseEntity { + /// + /// 履历编号 + /// + [SugarColumn(ColumnName = "history_number")] + public string HistoryNumber { get; set; } /// /// 员工工号 (Employee ID) /// diff --git a/EOM.TSHotelManagement.Common.Core/Employee/EmployeeRewardPunishment.cs b/EOM.TSHotelManagement.Common.Core/Employee/EmployeeRewardPunishment.cs index a6f56bd..8b9f5b6 100644 --- a/EOM.TSHotelManagement.Common.Core/Employee/EmployeeRewardPunishment.cs +++ b/EOM.TSHotelManagement.Common.Core/Employee/EmployeeRewardPunishment.cs @@ -49,7 +49,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 奖惩类型 (Reward/Punishment Type) /// [SugarColumn(ColumnName = "reward_punishment_type")] - public int RewardPunishmentType { get; set; } + public string RewardPunishmentType { get; set; } /// /// 奖惩操作人 (Reward/Punishment Operator) diff --git a/EOM.TSHotelManagement.Common.Core/Employee/RewardPunishmentType.cs b/EOM.TSHotelManagement.Common.Core/Employee/RewardPunishmentType.cs index 1c7881d..b47b5b5 100644 --- a/EOM.TSHotelManagement.Common.Core/Employee/RewardPunishmentType.cs +++ b/EOM.TSHotelManagement.Common.Core/Employee/RewardPunishmentType.cs @@ -37,7 +37,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 奖惩类型编号 (Reward/Punishment Type ID) /// [SugarColumn(ColumnName = "reward_punishment_type_number", IsPrimaryKey = true)] - public int RewardPunishmentTypeId { get; set; } + public string RewardPunishmentTypeId { get; set; } /// /// 奖惩类型名称 (Reward/Punishment Type Name) diff --git a/EOM.TSHotelManagement.Common.Core/Util/OperationLog.cs b/EOM.TSHotelManagement.Common.Core/Util/OperationLog.cs index 78d0979..9b75877 100644 --- a/EOM.TSHotelManagement.Common.Core/Util/OperationLog.cs +++ b/EOM.TSHotelManagement.Common.Core/Util/OperationLog.cs @@ -114,16 +114,6 @@ namespace EOM.TSHotelManagement.Common.Core [SugarColumn(ColumnName = "query_string")] public string QueryString { get; set; } /// - /// 请求负载 (Request Payload) - /// - [SugarColumn(ColumnName = "request_payload")] - public string RequestPayload { get; set; } - /// - /// 响应负载 (Response Payload) - /// - [SugarColumn(ColumnName = "response_payload")] - public string ResponsePayload { get; set; } - /// /// 响应时间 (Elapsed Time) /// [SugarColumn(ColumnName = "elapsed_time")] diff --git a/EOM.TSHotelManagement.Common.Util/GenerateJWT/JWTHelper.cs b/EOM.TSHotelManagement.Common.Util/GenerateJWT/JWTHelper.cs index 35bb4e0..2b8c10a 100644 --- a/EOM.TSHotelManagement.Common.Util/GenerateJWT/JWTHelper.cs +++ b/EOM.TSHotelManagement.Common.Util/GenerateJWT/JWTHelper.cs @@ -12,9 +12,6 @@ namespace EOM.TSHotelManagement.Common.Util { public class JWTHelper { - /// - /// JWT加密 - /// private readonly IJwtConfigFactory _jwtConfigFactory; public JWTHelper(IJwtConfigFactory jwtConfigFactory) @@ -22,21 +19,114 @@ namespace EOM.TSHotelManagement.Common.Util _jwtConfigFactory = jwtConfigFactory; } + public Dictionary ClaimTypeMappings { get; set; } = new() + { + { "serialnumber", ClaimTypes.SerialNumber }, + { "unique_name", ClaimTypes.Name } + }; + + private JwtConfig GetJwtConfig() => _jwtConfigFactory.GetJwtConfig(); + + /// + /// JWT 加密生成 + /// public string GenerateJWT(ClaimsIdentity claimsIdentity) { - var jwtConfig = _jwtConfigFactory.GetJwtConfig(); + var jwtConfig = GetJwtConfig(); var tokenHandler = new JwtSecurityTokenHandler(); var key = Encoding.UTF8.GetBytes(jwtConfig.Key); + var tokenDescriptor = new SecurityTokenDescriptor { Subject = claimsIdentity, Expires = DateTime.Now.AddMinutes(jwtConfig.ExpiryMinutes), - SigningCredentials = new SigningCredentials(new SymmetricSecurityKey(key), SecurityAlgorithms.HmacSha256Signature), + SigningCredentials = new SigningCredentials( + new SymmetricSecurityKey(key), + SecurityAlgorithms.HmacSha256Signature), Audience = jwtConfig.Audience, Issuer = jwtConfig.Issuer }; + var token = tokenHandler.CreateToken(tokenDescriptor); return tokenHandler.WriteToken(token); } + + /// + /// JWT 解密验证(返回 Claims 主体) + /// + public ClaimsPrincipal ValidateAndDecryptToken(string token) + { + var jwtConfig = GetJwtConfig(); + var tokenHandler = new JwtSecurityTokenHandler(); + + var validationParameters = new TokenValidationParameters + { + ValidateIssuer = true, + ValidIssuer = jwtConfig.Issuer, + ValidateAudience = true, + ValidAudience = jwtConfig.Audience, + ValidateLifetime = true, + IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(jwtConfig.Key)), + ValidateIssuerSigningKey = true, + NameClaimType = ClaimTypes.Name, + RoleClaimType = ClaimTypes.Role, + ClockSkew = TimeSpan.Zero + }; + + try + { + return tokenHandler.ValidateToken(token, validationParameters, out _); + } + catch (SecurityTokenExpiredException) + { + throw new ApplicationException("Token 已过期"); + } + catch (SecurityTokenInvalidSignatureException) + { + throw new ApplicationException("无效的签名"); + } + catch (Exception ex) + { + throw new ApplicationException($"Token 验证失败: {ex.Message}"); + } + } + + /// + /// 获取唯一序列号 + /// + /// + /// + /// + /// + public string GetSerialNumber(string token) + { + if (string.IsNullOrWhiteSpace(token)) + throw new ArgumentNullException(nameof(token)); + + var claimsPrincipal = ValidateAndDecryptToken(token); + + var serialClaim = claimsPrincipal.FindFirst(ClaimTypes.SerialNumber) + ?? claimsPrincipal.FindFirst("serialnumber"); + + return serialClaim?.Value ?? throw new SecurityTokenException("无法找到序列号声明"); + } + + /// + /// 获取所有声明信息 + /// + public IEnumerable GetClaims(string token) + { + var principal = ValidateAndDecryptToken(token); + return principal.Claims; + } + + /// + /// 获取 Token 过期时间 + /// + public DateTime GetExpirationTime(string token) + { + var jwtToken = new JwtSecurityTokenHandler().ReadJwtToken(token); + return jwtToken.ValidTo.ToLocalTime(); + } } -} +} \ No newline at end of file diff --git a/EOM.TSHotelManagement.Common.Util/Helper/RandomStringGenerator.cs b/EOM.TSHotelManagement.Common.Util/Helper/RandomStringGenerator.cs new file mode 100644 index 0000000..e0ab59f --- /dev/null +++ b/EOM.TSHotelManagement.Common.Util/Helper/RandomStringGenerator.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Security.Cryptography; +using System.Text; +using System.Threading.Tasks; + +namespace EOM.TSHotelManagement.Common.Util +{ + public class RandomStringGenerator + { + public string GenerateSecurePassword() + { + const string numbers = "0123456789"; + const string lowerLetters = "abcdefghijklmnopqrstuvwxyz"; + const string upperLetters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + const string specialChars = "!@#$%^&*()_+-=[]{}|;:,.<>?"; + + var allChars = numbers + lowerLetters + upperLetters + specialChars; + + var chars = new char[12]; + + chars[0] = GetRandomChar(numbers); + chars[1] = GetRandomChar(lowerLetters); + chars[2] = GetRandomChar(upperLetters); + chars[3] = GetRandomChar(specialChars); + + for (int i = 4; i < 12; i++) + { + chars[i] = GetRandomChar(allChars); + } + + for (int i = chars.Length - 1; i > 0; i--) + { + int swapIndex = GetRandomInt(i + 1); + (chars[i], chars[swapIndex]) = (chars[swapIndex], chars[i]); + } + + return new string(chars); + } + + private static char GetRandomChar(string charSet) + { + var randomNumber = RandomNumberGenerator.GetInt32(charSet.Length); + return charSet[randomNumber]; + } + + private static int GetRandomInt(int maxValue) + { + return RandomNumberGenerator.GetInt32(maxValue); + } + } +} diff --git a/EOM.TSHotelManagement.Shared/BrotliHelper.cs b/EOM.TSHotelManagement.Shared/BrotliHelper.cs new file mode 100644 index 0000000..6bf31d8 --- /dev/null +++ b/EOM.TSHotelManagement.Shared/BrotliHelper.cs @@ -0,0 +1,46 @@ +using System; +using System.Buffers; +using System.Collections.Generic; +using System.IO.Compression; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EOM.TSHotelManagement.Shared +{ + public static class BrotliHelper + { + public static string CompressString(string input) + { + byte[] inputBytes = Encoding.UTF8.GetBytes(input); + + using var outputStream = new MemoryStream(); + using (var brotliStream = new BrotliStream(outputStream, CompressionLevel.Optimal)) + { + int bufferSize = 81920; + for (int i = 0; i < inputBytes.Length; i += bufferSize) + { + int chunkSize = Math.Min(bufferSize, inputBytes.Length - i); + brotliStream.Write(inputBytes, i, chunkSize); + } + } + + return Convert.ToBase64String(outputStream.ToArray()); + } + + + public static string DecompressString(string input) + { + var compressedData = Convert.FromBase64String(input); + + using var inputStream = new MemoryStream(compressedData); + using var outputStream = new MemoryStream(); + using (var brotliStream = new BrotliStream(inputStream, CompressionMode.Decompress)) + { + brotliStream.CopyTo(outputStream); + } + + return Encoding.UTF8.GetString(outputStream.ToArray()); + } + } +} diff --git a/EOM.TSHotelManagement.Shared/EnumHelper.cs b/EOM.TSHotelManagement.Shared/EnumHelper.cs new file mode 100644 index 0000000..47cb806 --- /dev/null +++ b/EOM.TSHotelManagement.Shared/EnumHelper.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; + +namespace EOM.TSHotelManagement.Shared +{ + public class EnumHelper + { + public string GetEnumDescription(Enum value) + { + FieldInfo field = value.GetType().GetField(value.ToString()); + DescriptionAttribute attribute = field? + .GetCustomAttributes(typeof(DescriptionAttribute), false) + .FirstOrDefault() as DescriptionAttribute; + + return attribute?.Description ?? value.ToString(); + } + + public int GetEnumValue(Enum value) + { + if (value == null) + throw new ArgumentNullException(nameof(value)); + + return Convert.ToInt32(value); + } + } +} diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Reser/ReserController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Business/Reser/ReserController.cs index e1e047f..59cb87f 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Reser/ReserController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Business/Reser/ReserController.cs @@ -57,6 +57,17 @@ namespace EOM.TSHotelManagement.WebApi.Controllers return reserService.DeleteReserInfo(reser); } + /// + /// 更新预约信息 + /// + /// + /// + [HttpPost] + public BaseOutputDto UpdateReserInfo([FromBody] UpdateReserInputDto r) + { + return reserService.UpdateReserInfo(r); + } + /// /// 添加预约信息 /// diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomController.cs index 2082cc3..94ab322 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomController.cs @@ -230,16 +230,6 @@ namespace EOM.TSHotelManagement.WebApi.Controllers return roomService.SelectRoomByStateAll(); } - /// - /// 获取所有房间状态 - /// - /// - [HttpGet] - public ListOutputDto SelectRoomStateAll([FromQuery]ReadRoomStateInputDto readRoomStateInputDto) - { - return roomService.SelectRoomStateAll(readRoomStateInputDto); - } - /// /// 根据房间编号查询房间状态编号 /// diff --git a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Base/BaseController.cs b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Base/BaseController.cs index db73737..48654a7 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Base/BaseController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Base/BaseController.cs @@ -5,6 +5,7 @@ using EOM.TSHotelManagement.Common.Core; using Microsoft.AspNetCore.Mvc; using System; using System.Collections.Generic; +using System.Linq; namespace EOM.TSHotelManagement.WebApi.Controllers { @@ -62,13 +63,25 @@ namespace EOM.TSHotelManagement.WebApi.Controllers #region 面貌模块 [HttpGet] - public List SelectWorkerFeatureAll() + public List SelectWorkerFeatureAll() { return baseService.SelectWorkerFeatureAll(); } #endregion + #region 房间状态模块 + /// + /// 获取所有房间状态 + /// + /// + [HttpGet] + public List SelectRoomStateAll() + { + return baseService.SelectRoomStateAll(); + } + #endregion + #region 职位模块 [HttpGet] diff --git a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Menu/MenuController.cs b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Menu/MenuController.cs index 38f97af..15f8791 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Menu/MenuController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Menu/MenuController.cs @@ -34,11 +34,10 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// 构建菜单树 /// /// - [HttpGet] - [AllowAnonymous] - public List BuildMenuAll() + [HttpPost] + public List BuildMenuAll([FromBody]BaseInputDto baseInputDto) { - return menuService.BuildMenuAll(); + return menuService.BuildMenuAll(baseInputDto); } /// diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Util/UtilityController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Util/UtilityController.cs index a2c1522..b044d30 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Util/UtilityController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Util/UtilityController.cs @@ -60,5 +60,27 @@ namespace EOM.TSHotelManagement.WebApi.Controllers { return utilService.SelectOperationlogAll(readOperationLogInputDto); } + + /// + /// 删除时间范围的操作日志 + /// + /// + /// + [HttpPost] + public BaseOutputDto DeleteOperationlogByRange([FromBody]ReadOperationLogInputDto readOperationLogInputDto) + { + return utilService.DeleteOperationlogByRange(readOperationLogInputDto); + } + + /// + /// 删除操作日志 + /// + /// + /// + [HttpPost] + public BaseOutputDto DeleteOperationlog([FromBody] DeleteOperationLogInputDto deleteOperationLogInputDto) + { + return utilService.DeleteOperationlog(deleteOperationLogInputDto); + } } } diff --git a/EOM.TSHotelManagement.WebApi/Filter/RequestLoggingMiddleware.cs b/EOM.TSHotelManagement.WebApi/Filter/RequestLoggingMiddleware.cs index fd4af70..352e765 100644 --- a/EOM.TSHotelManagement.WebApi/Filter/RequestLoggingMiddleware.cs +++ b/EOM.TSHotelManagement.WebApi/Filter/RequestLoggingMiddleware.cs @@ -5,6 +5,7 @@ using System.Text; using System.Threading.Tasks; using EOM.TSHotelManagement.Common.Core; using EOM.TSHotelManagement.EntityFramework; +using EOM.TSHotelManagement.Shared; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; @@ -46,7 +47,6 @@ public class RequestLoggingMiddleware }; context.Request.EnableBuffering(); - log.RequestPayload = await ReadRequestBody(context.Request); var originalBodyStream = context.Response.Body; using var responseBodyStream = new MemoryStream(); @@ -70,7 +70,6 @@ public class RequestLoggingMiddleware log.StatusCode = context.Response.StatusCode; // 读取响应体 - log.ResponsePayload = await ReadResponseBody(responseBodyStream); responseBodyStream.Seek(0, SeekOrigin.Begin); await responseBodyStream.CopyToAsync(originalBodyStream); @@ -102,29 +101,6 @@ public class RequestLoggingMiddleware } } - private async Task ReadRequestBody(HttpRequest request) - { - try - { - request.Body.Seek(0, SeekOrigin.Begin); - using var reader = new StreamReader(request.Body, Encoding.UTF8, - leaveOpen: true); - return await reader.ReadToEndAsync(); - } - finally - { - request.Body.Seek(0, SeekOrigin.Begin); - } - } - - private async Task ReadResponseBody(MemoryStream bodyStream) - { - bodyStream.Seek(0, SeekOrigin.Begin); - using var reader = new StreamReader(bodyStream, Encoding.UTF8, - leaveOpen: true); - return await reader.ReadToEndAsync(); - } - private async Task HandleExceptionAsync(HttpContext context, Exception exception) { context.Response.ContentType = "application/json"; diff --git a/EOM.TSHotelManagement.WebApi/Startup.cs b/EOM.TSHotelManagement.WebApi/Startup.cs index 1082a18..f13c785 100644 --- a/EOM.TSHotelManagement.WebApi/Startup.cs +++ b/EOM.TSHotelManagement.WebApi/Startup.cs @@ -36,7 +36,7 @@ namespace EOM.TSHotelManagement.WebApi { // DataProtection services.AddDataProtection(); - + services.AddSingleton(); services.AddSingleton(); @@ -53,7 +53,7 @@ namespace EOM.TSHotelManagement.WebApi ValidateLifetime = true, ValidateIssuerSigningKey = true, ValidIssuer = _configuration["Jwt:Issuer"], - ValidAudience = _configuration["Jwt:Audience"], // Чaudienceֵ + ValidAudience = _configuration["Jwt:Audience"], IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(_configuration["Jwt:Key"])) }; }); -- Gitee From 6b75d87d1e771534e7c0430d172af6ec92d26f6a Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Sun, 6 Apr 2025 03:40:48 +0800 Subject: [PATCH 12/24] adjustment controllers. add controllers. --- .../Business/Customer/CustomerService.cs | 34 ++--- .../Employee/EmployeeService.cs | 15 ++- .../Administrator/AdminService.cs | 122 +++++++++++++++++- .../Administrator/IAdminService.cs | 35 +++++ .../Util/IUtilService.cs | 4 +- .../Util/UtilService.cs | 17 ++- .../Dto/Customer/CreateCustomerInputDto.cs | 4 +- .../Dto/Customer/ReadCustomerInputDto.cs | 2 +- .../Dto/Customer/ReadCustomerOutputDto.cs | 6 +- .../Dto/Customer/UpdateCustomerInputDto.cs | 4 +- .../CreatePassportTypeInputDto.cs | 2 +- .../PassportType/ReadPassportTypeOutputDto.cs | 2 +- .../Dto/Employee/CreateEmployeeInputDto.cs | 1 + .../Dto/Employee/ReadEmployeeOutputDto.cs | 2 + .../Dto/Employee/UpdateEmployeeInputDto.cs | 1 + .../CreateAdministratorInputDto.cs | 1 + .../DeleteAdministratorInputDto.cs | 2 +- .../ReadAdministratorOutputDto.cs | 12 ++ .../UpdateAdministratorInputDto.cs | 2 +- .../Util/Dto/CardCode/ReadCardCodeInputDto.cs | 2 + .../Business/Customer/Customer.cs | 6 +- .../Employee/Employee.cs | 12 ++ .../Administrator/AdminController.cs | 67 ++++++++-- .../Controllers/Util/UtilityController.cs | 8 +- .../EOM.TSHotelManagement.WebApi.csproj | 2 +- 25 files changed, 306 insertions(+), 59 deletions(-) diff --git a/EOM.TSHotelManagement.Application/Business/Customer/CustomerService.cs b/EOM.TSHotelManagement.Application/Business/Customer/CustomerService.cs index d2b0577..2ede389 100644 --- a/EOM.TSHotelManagement.Application/Business/Customer/CustomerService.cs +++ b/EOM.TSHotelManagement.Application/Business/Customer/CustomerService.cs @@ -98,9 +98,9 @@ namespace EOM.TSHotelManagement.Application /// public BaseOutputDto InsertCustomerInfo(CreateCustomerInputDto custo) { - string NewID = dataProtector.Protect(custo.PassportID); + string NewID = dataProtector.Protect(custo.IdCardNumber); string NewTel = dataProtector.Protect(custo.CustomerPhoneNumber); - custo.PassportID = NewID; + custo.IdCardNumber = NewID; custo.CustomerPhoneNumber = NewTel; try { @@ -122,9 +122,9 @@ namespace EOM.TSHotelManagement.Application /// public BaseOutputDto UpdCustomerInfo(UpdateCustomerInputDto custo) { - string NewID = dataProtector.Protect(custo.PassportID); + string NewID = dataProtector.Protect(custo.IdCardNumber); string NewTel = dataProtector.Protect(custo.CustomerPhoneNumber); - custo.PassportID = NewID; + custo.IdCardNumber = NewID; custo.CustomerPhoneNumber = NewTel; try { @@ -255,6 +255,8 @@ namespace EOM.TSHotelManagement.Application var where = Expressionable.Create(); + where = where.And(a => a.IsDelete == readCustomerInputDto.IsDelete); + if (!readCustomerInputDto.CustomerNumber.IsNullOrEmpty()) { where = where.And(a => a.CustomerNumber.Equals(readCustomerInputDto.CustomerNumber)); @@ -267,9 +269,9 @@ namespace EOM.TSHotelManagement.Application { where = where.And(a => a.CustomerPhoneNumber.Contains(readCustomerInputDto.CustomerPhoneNumber)); } - if (!readCustomerInputDto.PassportID.IsNullOrEmpty()) + if (!readCustomerInputDto.IdCardNumber.IsNullOrEmpty()) { - where = where.And(a => a.PassportID.Contains(readCustomerInputDto.PassportID)); + where = where.And(a => a.IdCardNumber.Contains(readCustomerInputDto.IdCardNumber)); } if (readCustomerInputDto.OnlyVip) { @@ -288,15 +290,15 @@ namespace EOM.TSHotelManagement.Application try { //解密身份证号码 - var sourceStr = dataProtector.Unprotect(source.PassportID); - source.PassportID = sourceStr; + var sourceStr = dataProtector.Unprotect(source.IdCardNumber); + source.IdCardNumber = sourceStr; //解密联系方式 var sourceTelStr = dataProtector.Unprotect(source.CustomerPhoneNumber); source.CustomerPhoneNumber = sourceTelStr; } catch (Exception) { - source.PassportID = source.PassportID; + source.IdCardNumber = source.IdCardNumber; source.CustomerPhoneNumber = source.CustomerPhoneNumber; } @@ -305,8 +307,8 @@ namespace EOM.TSHotelManagement.Application source.GenderName = sexType?.GenderName ?? ""; //证件类型 - var passPortType = passPortTypes.FirstOrDefault(a => a.PassportId == source.PassportType); - source.PassportTypeName = passPortType?.PassportName ?? ""; + var passPortType = passPortTypes.FirstOrDefault(a => a.PassportId == source.PassportId); + source.PassportName = passPortType?.PassportName ?? ""; //客户类型 var custoType = custoTypes.FirstOrDefault(a => a.CustomerType == source.CustomerType); @@ -439,23 +441,23 @@ namespace EOM.TSHotelManagement.Application try { //解密身份证号码 - var sourceStr = dataProtector.Unprotect(customer.PassportID); - customer.PassportID = sourceStr; + var sourceStr = dataProtector.Unprotect(customer.IdCardNumber); + customer.IdCardNumber = sourceStr; //解密联系方式 var sourceTelStr = dataProtector.Unprotect(customer.CustomerPhoneNumber); customer.CustomerPhoneNumber = sourceTelStr; } catch (Exception) { - customer.PassportID = customer.PassportID; + customer.IdCardNumber = customer.IdCardNumber; customer.CustomerPhoneNumber = customer.CustomerPhoneNumber; } //性别类型 var sexType = sexTypes.FirstOrDefault(a => a.GenderId == customer.CustomerGender); customer.GenderName = sexType.GenderName.IsNullOrEmpty() ? "" : sexType.GenderName; //证件类型 - var passPortType = passPortTypes.FirstOrDefault(a => a.PassportId == customer.PassportType); - customer.PassportTypeName = passPortType.PassportName.IsNullOrEmpty() ? "" : passPortType.PassportName; + var passPortType = passPortTypes.FirstOrDefault(a => a.PassportId == customer.PassportId); + customer.PassportName = passPortType.PassportName.IsNullOrEmpty() ? "" : passPortType.PassportName; //客户类型 var custoType = custoTypes.FirstOrDefault(a => a.CustomerType == customer.CustomerType); customer.CustomerTypeName = custoType.CustomerTypeName.IsNullOrEmpty() ? "" : custoType.CustomerTypeName; diff --git a/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs b/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs index 6b27fb6..af6117c 100644 --- a/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs +++ b/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs @@ -55,10 +55,11 @@ namespace EOM.TSHotelManagement.Application /// /// /// + /// /// /// /// - public class EmployeeService(GenericRepository workerRepository, GenericRepository sexTypeRepository, GenericRepository educationRepository, GenericRepository nationRepository, GenericRepository deptRepository, GenericRepository positionRepository, IDataProtectionProvider dataProtectionProvider, JWTHelper jWTHelper,MailHelper mailHelper) : IEmployeeService + public class EmployeeService(GenericRepository workerRepository, GenericRepository sexTypeRepository, GenericRepository educationRepository, GenericRepository nationRepository, GenericRepository deptRepository, GenericRepository positionRepository, GenericRepository passportTypeRepository, IDataProtectionProvider dataProtectionProvider, JWTHelper jWTHelper,MailHelper mailHelper) : IEmployeeService { /// /// 员工信息 @@ -90,6 +91,11 @@ namespace EOM.TSHotelManagement.Application /// private readonly GenericRepository positionRepository = positionRepository; + /// + /// 职务 + /// + private readonly GenericRepository passportTypeRepository = passportTypeRepository; + /// /// 数据保护 /// @@ -243,6 +249,9 @@ namespace EOM.TSHotelManagement.Application //查询所有职位信息 List positions = new List(); positions = positionRepository.GetList(a => a.IsDelete != 1); + //查询所有证件类型 + List passportTypes = new List(); + passportTypes = passportTypeRepository.GetList(a => a.IsDelete != 1); //查询所有员工信息 List employees = new List(); @@ -292,6 +301,8 @@ namespace EOM.TSHotelManagement.Application //职位 var position = positions.FirstOrDefault(a => a.PositionNumber == source.Position); source.PositionName = position.IsNullOrEmpty() ? "" : position.PositionName; + var passport = passportTypes.SingleOrDefault(a => a.PassportId == source.IdCardType); + source.IdCardTypeName = passport.IsNullOrEmpty() ? "" : passport.PassportName; //面貌 source.PoliticalAffiliationName = GetDescriptionByName(source.PoliticalAffiliation); }); @@ -343,6 +354,8 @@ namespace EOM.TSHotelManagement.Application //职位 var position = positionRepository.GetSingle(a => a.PositionNumber == w.Position); w.PositionName = position.PositionName.IsNullOrEmpty() ? "" : position.PositionName; + var passport = passportTypeRepository.GetSingle(a => a.PassportId == w.IdCardType); + w.IdCardTypeName = passport.IsNullOrEmpty() ? "" : passport.PassportName; //面貌 w.PoliticalAffiliationName = GetDescriptionByName(w.PoliticalAffiliation); diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Administrator/AdminService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Administrator/AdminService.cs index 3628698..d703fa9 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/Administrator/AdminService.cs +++ b/EOM.TSHotelManagement.Application/SystemManagement/Administrator/AdminService.cs @@ -28,6 +28,7 @@ using EOM.TSHotelManagement.EntityFramework; using EOM.TSHotelManagement.Shared; using jvncorelib.EncryptorLib; using jvncorelib.EntityLib; +using Microsoft.AspNetCore.DataProtection; using Microsoft.IdentityModel.Tokens; using SqlSugar; using System.ComponentModel; @@ -52,6 +53,11 @@ namespace EOM.TSHotelManagement.Application /// private readonly GenericRepository adminTypeRepository; + /// + /// 数据保护 + /// + private readonly IDataProtector dataProtector; + /// /// 加密 /// @@ -62,10 +68,19 @@ namespace EOM.TSHotelManagement.Application /// private readonly JWTHelper jWTHelper; - public AdminService(GenericRepository adminRepository, GenericRepository adminTypeRepository, EncryptLib encrypt, JWTHelper jWTHelper) + /// + /// + /// + /// + /// + /// + /// + /// + public AdminService(GenericRepository adminRepository, GenericRepository adminTypeRepository, IDataProtectionProvider dataProtectionProvider, EncryptLib encrypt, JWTHelper jWTHelper) { this.adminRepository = adminRepository; this.adminTypeRepository = adminTypeRepository; + this.dataProtector = dataProtectionProvider.CreateProtector("AdminInfoProtector"); this.encrypt = encrypt; this.jWTHelper = jWTHelper; } @@ -209,8 +224,18 @@ namespace EOM.TSHotelManagement.Application where = where.And(a => a.IsDelete == readAdministratorInputDto.IsDelete); } var count = 0; - var listAdmins = adminRepository.AsQueryable().Where(where.ToExpression()).ToPageList(readAdministratorInputDto.Page, readAdministratorInputDto.PageSize, ref count); + var listAdmins = new List(); var listAdminType = adminTypeRepository.GetList(a => a.IsDelete != 1); + + if (!readAdministratorInputDto.IgnorePaging && readAdministratorInputDto.Page != 0 && readAdministratorInputDto.PageSize != 0) + { + listAdmins = adminRepository.AsQueryable().Where(where.ToExpression()).ToPageList(readAdministratorInputDto.Page, readAdministratorInputDto.PageSize, ref count); + } + else + { + listAdmins = adminRepository.AsQueryable().Where(where.ToExpression()).ToList(); + } + listAdmins.ForEach(admins => { var isAdminType = admins.IsSuperAdmin == 1 ? "是" : "否"; @@ -265,7 +290,7 @@ namespace EOM.TSHotelManagement.Application { try { - createAdministratorInputDto.Password = encrypt.Encryption(createAdministratorInputDto.Password, EncryptionLevel.Enhanced); + createAdministratorInputDto.Password = dataProtector.Protect(createAdministratorInputDto.Password); adminRepository.Insert(EntityMapper.Map(createAdministratorInputDto)); } catch (Exception ex) @@ -275,6 +300,43 @@ namespace EOM.TSHotelManagement.Application return new BaseOutputDto(); } + /// + /// 更新管理员 + /// + /// + /// + public BaseOutputDto UpdAdmin(UpdateAdministratorInputDto updateAdministratorInputDto) + { + try + { + updateAdministratorInputDto.Password = dataProtector.Protect(updateAdministratorInputDto.Password); + adminRepository.Insert(EntityMapper.Map(updateAdministratorInputDto)); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); + } + + /// + /// 删除管理员 + /// + /// + /// + public BaseOutputDto DelAdmin(DeleteAdministratorInputDto deleteAdministratorInputDto) + { + try + { + adminRepository.Delete(EntityMapper.Map(deleteAdministratorInputDto)); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); + } + /// /// 获取管理员信息 /// @@ -310,6 +372,60 @@ namespace EOM.TSHotelManagement.Application }; } + /// + /// 添加管理员类型 + /// + /// + /// + public BaseOutputDto AddAdminType(CreateAdministratorTypeInputDto createAdministratorTypeInputDto) + { + try + { + adminTypeRepository.Insert(EntityMapper.Map(createAdministratorTypeInputDto)); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); + } + + /// + /// 更新管理员类型 + /// + /// + /// + public BaseOutputDto UpdAdminType(UpdateAdministratorTypeInputDto updateAdministratorTypeInputDto) + { + try + { + adminTypeRepository.Insert(EntityMapper.Map(updateAdministratorTypeInputDto)); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); + } + + /// + /// 删除管理员类型 + /// + /// + /// + public BaseOutputDto DelAdminType(DeleteAdministratorTypeInputDto deleteAdministratorTypeInputDto) + { + try + { + adminTypeRepository.Delete(EntityMapper.Map(deleteAdministratorTypeInputDto)); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); + } + /// /// 更新管理员账户 /// diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Administrator/IAdminService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Administrator/IAdminService.cs index 2d1e474..1daf478 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/Administrator/IAdminService.cs +++ b/EOM.TSHotelManagement.Application/SystemManagement/Administrator/IAdminService.cs @@ -72,6 +72,20 @@ namespace EOM.TSHotelManagement.Application /// BaseOutputDto AddAdmin(CreateAdministratorInputDto createAdministratorInputDto); + /// + /// 更新管理员 + /// + /// + /// + BaseOutputDto UpdAdmin(UpdateAdministratorInputDto updateAdministratorInputDto); + + /// + /// 删除管理员 + /// + /// + /// + BaseOutputDto DelAdmin(DeleteAdministratorInputDto deleteAdministratorInputDto); + /// /// 获取管理员信息 /// @@ -85,6 +99,27 @@ namespace EOM.TSHotelManagement.Application /// ListOutputDto GetAllAdminTypes(ReadAdministratorTypeInputDto readAdministratorTypeInputDto); + /// + /// 添加管理员类型 + /// + /// + /// + BaseOutputDto AddAdminType(CreateAdministratorTypeInputDto createAdministratorTypeInputDto); + + /// + /// 更新管理员类型 + /// + /// + /// + BaseOutputDto UpdAdminType(UpdateAdministratorTypeInputDto updateAdministratorTypeInputDto); + + /// + /// 删除管理员类型 + /// + /// + /// + BaseOutputDto DelAdminType(DeleteAdministratorTypeInputDto deleteAdministratorTypeInputDto); + /// /// 批量更新管理员账户 /// diff --git a/EOM.TSHotelManagement.Application/Util/IUtilService.cs b/EOM.TSHotelManagement.Application/Util/IUtilService.cs index c638d64..c6e79a7 100644 --- a/EOM.TSHotelManagement.Application/Util/IUtilService.cs +++ b/EOM.TSHotelManagement.Application/Util/IUtilService.cs @@ -11,9 +11,9 @@ namespace EOM.TSHotelManagement.Application /// /// 查询身份证号码 /// - /// + /// /// - string SelectCardCode(string identityCard); + SingleOutputDto SelectCardCode(ReadCardCodeInputDto readCardCodeInputDto); /// /// 检测版本号 diff --git a/EOM.TSHotelManagement.Application/Util/UtilService.cs b/EOM.TSHotelManagement.Application/Util/UtilService.cs index 5eb21f2..522a2c5 100644 --- a/EOM.TSHotelManagement.Application/Util/UtilService.cs +++ b/EOM.TSHotelManagement.Application/Util/UtilService.cs @@ -43,15 +43,18 @@ namespace EOM.TSHotelManagement.Application /// /// 查询身份证号码 /// - /// + /// /// - public string SelectCardCode(string identityCard) + public SingleOutputDto SelectCardCode(ReadCardCodeInputDto readCardCodeInputDto) { - var cardid = identityCard.Substring(0, 6).ToString(); - var pcd = string.Empty; - var cardcodes = cardCodesRepository.GetSingle(a => a.AreaCode == cardid); - pcd = cardcodes == null ? "" : string.Join(",", cardcodes.Province + cardcodes.City + cardcodes.District); - return pcd; + if (!readCardCodeInputDto.IdentityCardNumber.IsNullOrEmpty()) + { + var cardid = readCardCodeInputDto.IdentityCardNumber.Substring(0, 6).ToString(); + var cardcodes = cardCodesRepository.GetSingle(a => a.AreaCode == cardid); + var source = EntityMapper.Map(cardcodes); + return new SingleOutputDto() { Source = source }; + } + return new SingleOutputDto(); } /// diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/CreateCustomerInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/CreateCustomerInputDto.cs index c79d8ff..ca56c28 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/CreateCustomerInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/CreateCustomerInputDto.cs @@ -5,10 +5,10 @@ namespace EOM.TSHotelManagement.Common.Contract public string CustomerNumber { get; set; } public string CustomerName { get; set; } public int? CustomerGender { get; set; } - public int PassportType { get; set; } + public int PassportId { get; set; } public string CustomerPhoneNumber { get; set; } public DateTime DateOfBirth { get; set; } - public string PassportID { get; set; } + public string IdCardNumber { get; set; } public string CustomerAddress { get; set; } public int CustomerType { get; set; } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerInputDto.cs index 6a9fd8a..95871e3 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerInputDto.cs @@ -5,7 +5,7 @@ namespace EOM.TSHotelManagement.Common.Contract public string CustomerName { get; set; } public string CustomerNumber { get; set; } public string CustomerPhoneNumber { get; set; } - public string PassportID { get; set; } + public string IdCardNumber { get; set; } public bool OnlyVip { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs index a24601e..912fdcb 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs @@ -6,13 +6,13 @@ namespace EOM.TSHotelManagement.Common.Contract public string CustomerNumber { get; set; } public string CustomerName { get; set; } public int? CustomerGender { get; set; } - public int PassportType { get; set; } + public int PassportId { get; set; } public string GenderName { get; set; } public string CustomerPhoneNumber { get; set; } public DateTime DateOfBirth { get; set; } public string CustomerTypeName { get; set; } - public string PassportTypeName { get; set; } - public string PassportID { get; set; } + public string PassportName { get; set; } + public string IdCardNumber { get; set; } public string CustomerAddress { get; set; } public int CustomerType { get; set; } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/UpdateCustomerInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/UpdateCustomerInputDto.cs index a22003e..c87a5da 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/UpdateCustomerInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/UpdateCustomerInputDto.cs @@ -5,10 +5,10 @@ namespace EOM.TSHotelManagement.Common.Contract public string CustomerNumber { get; set; } public string CustomerName { get; set; } public int? CustomerGender { get; set; } - public int PassportType { get; set; } + public int PassportId { get; set; } public string CustomerPhoneNumber { get; set; } public DateTime DateOfBirth { get; set; } - public string PassportID { get; set; } + public string IdCardNumber { get; set; } public string CustomerAddress { get; set; } public int CustomerType { get; set; } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/CreatePassportTypeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/CreatePassportTypeInputDto.cs index 41be7a0..df95dd1 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/CreatePassportTypeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/CreatePassportTypeInputDto.cs @@ -2,7 +2,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public class CreatePassportTypeInputDto: BaseInputDto { - public string PassportId { get; set; } + public int PassportId { get; set; } public string PassportName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeOutputDto.cs index adf3ee3..8d6c070 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/PassportType/ReadPassportTypeOutputDto.cs @@ -2,7 +2,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public class ReadPassportTypeOutputDto { - public string PassportId { get; set; } + public int PassportId { get; set; } public string PassportName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/CreateEmployeeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/CreateEmployeeInputDto.cs index c48685c..45a3ff3 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/CreateEmployeeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/CreateEmployeeInputDto.cs @@ -11,6 +11,7 @@ namespace EOM.TSHotelManagement.Common.Contract public string Department { get; set; } public string Address { get; set; } public string Position { get; set; } + public int IdCardType { get; set; } public string IdCardNumber { get; set; } public DateTime HireDate { get; set; } public string PoliticalAffiliation { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs index 2bdffdd..d7e873f 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs @@ -16,6 +16,8 @@ namespace EOM.TSHotelManagement.Common.Contract public string Address { get; set; } public string Position { get; set; } public string PositionName { get; set; } + public int IdCardType { get; set; } + public string IdCardTypeName { get; set; } public string IdCardNumber { get; set; } public DateTime HireDate { get; set; } public string PoliticalAffiliation { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/UpdateEmployeeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/UpdateEmployeeInputDto.cs index 0b3ba99..7c5bc98 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/UpdateEmployeeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/UpdateEmployeeInputDto.cs @@ -11,6 +11,7 @@ namespace EOM.TSHotelManagement.Common.Contract public string Department { get; set; } public string Address { get; set; } public string Position { get; set; } + public int IdCardType { get; set; } public string IdCardNumber { get; set; } public DateTime HireDate { get; set; } public string PoliticalAffiliation { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/CreateAdministratorInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/CreateAdministratorInputDto.cs index 5f32f9b..32821e2 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/CreateAdministratorInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/CreateAdministratorInputDto.cs @@ -2,6 +2,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public class CreateAdministratorInputDto: BaseInputDto { + public string Number { get; set; } public string Account { get; set; } public string Password { get; set; } public string Type { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/DeleteAdministratorInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/DeleteAdministratorInputDto.cs index bc7de82..c95c66e 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/DeleteAdministratorInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/DeleteAdministratorInputDto.cs @@ -2,7 +2,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public class DeleteAdministratorInputDto: BaseInputDto { - public int Id { get; set; } + public string Number { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/ReadAdministratorOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/ReadAdministratorOutputDto.cs index 1822609..4125a45 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/ReadAdministratorOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/ReadAdministratorOutputDto.cs @@ -1,3 +1,5 @@ +using SqlSugar; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadAdministratorOutputDto:BaseDto @@ -8,6 +10,16 @@ namespace EOM.TSHotelManagement.Common.Contract public string Type { get; set; } public string Name { get; set; } public int IsSuperAdmin { get; set; } + + /// + /// ǷΪԱ (Is Super Administrator Description) + /// + public string IsSuperAdminDescription { get; set; } + + /// + /// Ա (Administrator Type Name) + /// + public string TypeName { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/UpdateAdministratorInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/UpdateAdministratorInputDto.cs index 843d88d..dad9a56 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/UpdateAdministratorInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Administrator/UpdateAdministratorInputDto.cs @@ -2,7 +2,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public class UpdateAdministratorInputDto: BaseInputDto { - public int Id { get; set; } + public string Number { get; set; } public string Account { get; set; } public string Password { get; set; } public string Type { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/ReadCardCodeInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/ReadCardCodeInputDto.cs index 7fc6cdb..987a745 100644 --- a/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/ReadCardCodeInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Util/Dto/CardCode/ReadCardCodeInputDto.cs @@ -11,6 +11,8 @@ namespace EOM.TSHotelManagement.Common.Contract public string District { get; set; } public string AreaCode { get; set; } + + public string IdentityCardNumber { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/Business/Customer/Customer.cs b/EOM.TSHotelManagement.Common.Core/Business/Customer/Customer.cs index d23121d..db6a828 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Customer/Customer.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Customer/Customer.cs @@ -57,7 +57,7 @@ namespace EOM.TSHotelManagement.Common.Core /// 证件类型 (Passport Type) /// [SqlSugar.SugarColumn(ColumnName = "passport_type", IsNullable = false)] - public int PassportType { get; set; } + public int PassportId { get; set; } /// /// 性别 (Gender) @@ -92,14 +92,14 @@ namespace EOM.TSHotelManagement.Common.Core /// [UIDisplay("证件类型")] [SqlSugar.SugarColumn(IsIgnore = true)] - public string PassportTypeName { get; set; } + public string PassportName { get; set; } /// /// 证件号码 (Passport ID) /// [UIDisplay("证件号码")] [SqlSugar.SugarColumn(ColumnName = "passport_id", IsNullable = false)] - public string PassportID { get; set; } + public string IdCardNumber { get; set; } /// /// 居住地址 (Customer Address) diff --git a/EOM.TSHotelManagement.Common.Core/Employee/Employee.cs b/EOM.TSHotelManagement.Common.Core/Employee/Employee.cs index 22be704..32c5f32 100644 --- a/EOM.TSHotelManagement.Common.Core/Employee/Employee.cs +++ b/EOM.TSHotelManagement.Common.Core/Employee/Employee.cs @@ -111,6 +111,12 @@ namespace EOM.TSHotelManagement.Common.Core [SugarColumn(IsIgnore = true)] public string PositionName { get; set; } + /// + /// 证件类型 (ID Card Type) + /// + [SugarColumn(ColumnName = "card_type")] + public int IdCardType { get; set; } + /// /// 证件号码 (ID Card Number) /// @@ -141,6 +147,12 @@ namespace EOM.TSHotelManagement.Common.Core [SugarColumn(IsIgnore = true)] public string PoliticalAffiliationName { get; set; } + /// + /// 证件类型 (ID Card Type) + /// + [SugarColumn(IsIgnore = true)] + public string IdCardTypeName { get; set; } + /// /// 教育程度 (Education Level) /// diff --git a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Administrator/AdminController.cs b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Administrator/AdminController.cs index 4ed912f..aa4e9fc 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Administrator/AdminController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Administrator/AdminController.cs @@ -1,8 +1,10 @@ using EOM.TSHotelManagement.Application; using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Util; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; +using System; using System.Collections.Generic; namespace EOM.TSHotelManagement.WebApi.Controllers @@ -82,16 +84,6 @@ namespace EOM.TSHotelManagement.WebApi.Controllers return adminService.UpdateNewPwdByOldPwd(admin); } - /// - /// 获取管理员列表 - /// - /// - [HttpGet] - //public List GetAllAdmin() - //{ - // return adminService.GetAllAdmin(); - //} - /// /// 添加管理员 /// @@ -103,6 +95,28 @@ namespace EOM.TSHotelManagement.WebApi.Controllers return adminService.AddAdmin(admin); } + /// + /// 更新管理员 + /// + /// + /// + [HttpPost] + public BaseOutputDto UpdAdmin([FromBody] UpdateAdministratorInputDto updateAdministratorInputDto) + { + return adminService.UpdAdmin(updateAdministratorInputDto); + } + + /// + /// 删除管理员 + /// + /// + /// + [HttpPost] + public BaseOutputDto DelAdmin([FromBody] DeleteAdministratorInputDto deleteAdministratorInputDto) + { + return adminService.DelAdmin(deleteAdministratorInputDto); + } + /// /// 获取管理员信息 /// @@ -124,6 +138,39 @@ namespace EOM.TSHotelManagement.WebApi.Controllers return adminService.GetAllAdminTypes(readAdministratorTypeInputDto); } + /// + /// 添加管理员类型 + /// + /// + /// + [HttpPost] + public BaseOutputDto AddAdminType([FromBody]CreateAdministratorTypeInputDto createAdministratorTypeInputDto) + { + return adminService.AddAdminType(createAdministratorTypeInputDto); + } + + /// + /// 更新管理员类型 + /// + /// + /// + [HttpPost] + public BaseOutputDto UpdAdminType([FromBody] UpdateAdministratorTypeInputDto updateAdministratorTypeInputDto) + { + return adminService.UpdAdminType(updateAdministratorTypeInputDto); + } + + /// + /// 删除管理员类型 + /// + /// + /// + [HttpPost] + public BaseOutputDto DelAdminType([FromBody] DeleteAdministratorTypeInputDto deleteAdministratorTypeInputDto) + { + return adminService.DelAdminType(deleteAdministratorTypeInputDto); + } + /// /// 批量更新管理员账户 /// diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Util/UtilityController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Util/UtilityController.cs index b044d30..181e58a 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Util/UtilityController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Util/UtilityController.cs @@ -21,12 +21,12 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// 查询身份证号码 /// - /// + /// /// - [HttpGet] - public string SelectCardCode([FromQuery] string identityCard) + [HttpPost] + public SingleOutputDto SelectCardCode([FromBody] ReadCardCodeInputDto readCardCodeInputDto) { - return utilService.SelectCardCode(identityCard); + return utilService.SelectCardCode(readCardCodeInputDto); } /// diff --git a/EOM.TSHotelManagement.WebApi/EOM.TSHotelManagement.WebApi.csproj b/EOM.TSHotelManagement.WebApi/EOM.TSHotelManagement.WebApi.csproj index ccf002b..8f65b1e 100644 --- a/EOM.TSHotelManagement.WebApi/EOM.TSHotelManagement.WebApi.csproj +++ b/EOM.TSHotelManagement.WebApi/EOM.TSHotelManagement.WebApi.csproj @@ -26,7 +26,7 @@ - + -- Gitee From 95b43dc2a287f39b4f888c7eb3875928b9156135 Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Fri, 11 Apr 2025 22:50:12 +0800 Subject: [PATCH 13/24] add role module. add database script. --- .../SystemManagement/Role/IRoleAppService.cs | 40 + .../SystemManagement/Role/RoleAppService.cs | 142 + .../Dto/Role/CreateRoleInputDto.cs | 25 + .../Dto/Role/DeleteRoleInputDto.cs | 13 + .../Dto/Role/ReadRoleInputDto.cs | 25 + .../Dto/Role/ReadRoleOutputDto.cs | 25 + .../Dto/Role/UpdateRoleInputDto.cs | 25 + .../SystemManagement/Role.cs | 35 + .../SystemManagement/RolePermission.cs | 28 + .../SystemManagement/UserRole.cs | 28 + .../SystemManagement/Role/RoleController.cs | 61 + .../tshotel-backstage-dbscript-data.sql" | 4537 +++++++++++++++++ .../tshotel-backstage-dbscript-table.sql" | 717 +++ 13 files changed, 5701 insertions(+) create mode 100644 EOM.TSHotelManagement.Application/SystemManagement/Role/IRoleAppService.cs create mode 100644 EOM.TSHotelManagement.Application/SystemManagement/Role/RoleAppService.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/CreateRoleInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/DeleteRoleInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/ReadRoleInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/ReadRoleOutputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/UpdateRoleInputDto.cs create mode 100644 EOM.TSHotelManagement.Common.Core/SystemManagement/Role.cs create mode 100644 EOM.TSHotelManagement.Common.Core/SystemManagement/RolePermission.cs create mode 100644 EOM.TSHotelManagement.Common.Core/SystemManagement/UserRole.cs create mode 100644 EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Role/RoleController.cs create mode 100644 "\346\225\260\346\215\256\345\272\223\350\204\232\346\234\254/latest_MariaDB\347\211\210\346\234\254/tshotel-backstage-dbscript-data.sql" create mode 100644 "\346\225\260\346\215\256\345\272\223\350\204\232\346\234\254/latest_MariaDB\347\211\210\346\234\254/tshotel-backstage-dbscript-table.sql" diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Role/IRoleAppService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Role/IRoleAppService.cs new file mode 100644 index 0000000..57c84b2 --- /dev/null +++ b/EOM.TSHotelManagement.Application/SystemManagement/Role/IRoleAppService.cs @@ -0,0 +1,40 @@ +using EOM.TSHotelManagement.Common.Contract; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EOM.TSHotelManagement.Application +{ + /// + /// 角色服务接口 + /// + public interface IRoleAppService + { + /// + /// 查询角色列表 + /// + /// + /// + ListOutputDto SelectRoleList(ReadRoleInputDto readRoleInputDto); + /// + /// 添加角色 + /// + /// + /// + BaseOutputDto InsertRole(CreateRoleInputDto createRoleInputDto); + /// + /// 更新角色 + /// + /// + /// + BaseOutputDto UpdateRole(UpdateRoleInputDto updateRoleInputDto); + /// + /// 删除角色 + /// + /// + /// + BaseOutputDto DeleteRole(DeleteRoleInputDto deleteRoleInputDto); + } +} diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Role/RoleAppService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Role/RoleAppService.cs new file mode 100644 index 0000000..a1d8887 --- /dev/null +++ b/EOM.TSHotelManagement.Application/SystemManagement/Role/RoleAppService.cs @@ -0,0 +1,142 @@ +using EOM.TSHotelManagement.Common.Contract; +using EOM.TSHotelManagement.Common.Core; +using EOM.TSHotelManagement.Common.Util; +using EOM.TSHotelManagement.EntityFramework; +using jvncorelib.EntityLib; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EOM.TSHotelManagement.Application +{ + /// + /// 角色服务接口 + /// + public class RoleAppService : IRoleAppService + { + /// + /// 角色仓储 + /// + private readonly GenericRepository roleRepository; + + /// + /// + /// + /// + public RoleAppService(GenericRepository roleRepository) + { + this.roleRepository = roleRepository; + } + + /// + /// 删除角色 + /// + /// + /// + /// + public BaseOutputDto DeleteRole(DeleteRoleInputDto deleteRoleInputDto) + { + try + { + roleRepository.Delete(EntityMapper.Map(deleteRoleInputDto)); + } + catch (Exception) + { + return new BaseOutputDto(StatusCodeConstants.InternalServerError, LocalizationHelper.GetLocalizedString("Delete Role Error", "删除角色失败")); + } + return new BaseOutputDto(StatusCodeConstants.Success, LocalizationHelper.GetLocalizedString("Delete Role Success", "删除角色成功")); + } + + /// + /// 查询角色列表 + /// + /// + /// + /// + public ListOutputDto SelectRoleList(ReadRoleInputDto readRoleInputDto) + { + var where = Expressionable.Create(); + + if (!readRoleInputDto.RoleNumber.IsNullOrEmpty()) + { + where = where.And(x => x.RoleNumber.Contains(readRoleInputDto.RoleNumber)); + } + if (!readRoleInputDto.RoleName.IsNullOrEmpty()) + { + where = where.And(x => x.RoleName.Contains(readRoleInputDto.RoleName)); + } + if (!readRoleInputDto.RoleDescription.IsNullOrEmpty()) + { + where = where.And(x => x.RoleDescription.Contains(readRoleInputDto.RoleDescription)); + } + if (!readRoleInputDto.IsDelete.IsNullOrEmpty()) + { + where = where.And(x => x.IsDelete == readRoleInputDto.IsDelete); + } + + var roles = new List(); + + var count = 0; + + if (!readRoleInputDto.IgnorePaging && readRoleInputDto.Page != 0 && readRoleInputDto.PageSize != 0) + { + roles = roleRepository.AsQueryable().Where(where.ToExpression()).ToPageList(readRoleInputDto.Page, readRoleInputDto.PageSize, ref count); + } + else + { + roles = roleRepository.AsQueryable().Where(where.ToExpression()).ToList(); + } + + var roleList = EntityMapper.MapList(roles); + + var listOutputDto = new ListOutputDto + { + total = count, + listSource = roleList + }; + + return listOutputDto; + } + + /// + /// 添加角色 + /// + /// + /// + /// + public BaseOutputDto InsertRole(CreateRoleInputDto createRoleInputDto) + { + try + { + roleRepository.Insert(EntityMapper.Map(createRoleInputDto)); + } + catch (Exception) + { + return new BaseOutputDto(StatusCodeConstants.InternalServerError, LocalizationHelper.GetLocalizedString("Create Role Error", "创建角色失败")); + } + return new BaseOutputDto(StatusCodeConstants.Success, LocalizationHelper.GetLocalizedString("Create Role Success", "创建角色成功")); + } + + /// + /// 更新角色 + /// + /// + /// + /// + public BaseOutputDto UpdateRole(UpdateRoleInputDto updateRoleInputDto) + { + try + { + roleRepository.Update(EntityMapper.Map(updateRoleInputDto)); + } + catch (Exception) + { + return new BaseOutputDto(StatusCodeConstants.InternalServerError, LocalizationHelper.GetLocalizedString("Update Role Error", "更新角色失败")); + } + return new BaseOutputDto(StatusCodeConstants.Success, LocalizationHelper.GetLocalizedString("Update Role Success", "更新角色成功")); + } + } +} diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/CreateRoleInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/CreateRoleInputDto.cs new file mode 100644 index 0000000..413ebf5 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/CreateRoleInputDto.cs @@ -0,0 +1,25 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class CreateRoleInputDto: BaseInputDto + { + /// + /// ע:ɫ + /// Ĭֵ: + /// + public string RoleNumber { get; set; } = null!; + + /// + /// ע:ɫ + /// Ĭֵ: + /// + public string RoleName { get; set; } = null!; + + /// + /// ע:ɫ + /// Ĭֵ: + /// + public string? RoleDescription { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/DeleteRoleInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/DeleteRoleInputDto.cs new file mode 100644 index 0000000..7193760 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/DeleteRoleInputDto.cs @@ -0,0 +1,13 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class DeleteRoleInputDto: BaseInputDto + { + /// + /// ע:ɫ + /// Ĭֵ: + /// + public string RoleNumber { get; set; } = null!; + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/ReadRoleInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/ReadRoleInputDto.cs new file mode 100644 index 0000000..b697ab3 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/ReadRoleInputDto.cs @@ -0,0 +1,25 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadRoleInputDto:ListInputDto + { + /// + /// ע:ɫ + /// Ĭֵ: + /// + public string RoleNumber { get; set; } = null!; + + /// + /// ע:ɫ + /// Ĭֵ: + /// + public string RoleName { get; set; } = null!; + + /// + /// ע:ɫ + /// Ĭֵ: + /// + public string? RoleDescription { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/ReadRoleOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/ReadRoleOutputDto.cs new file mode 100644 index 0000000..6e3132e --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/ReadRoleOutputDto.cs @@ -0,0 +1,25 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class ReadRoleOutputDto + { + /// + /// ע:ɫ + /// Ĭֵ: + /// + public string RoleNumber { get; set; } = null!; + + /// + /// ע:ɫ + /// Ĭֵ: + /// + public string RoleName { get; set; } = null!; + + /// + /// ע:ɫ + /// Ĭֵ: + /// + public string? RoleDescription { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/UpdateRoleInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/UpdateRoleInputDto.cs new file mode 100644 index 0000000..2666f63 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Role/UpdateRoleInputDto.cs @@ -0,0 +1,25 @@ +namespace EOM.TSHotelManagement.Common.Contract +{ + public class UpdateRoleInputDto: BaseInputDto + { + /// + /// ע:ɫ + /// Ĭֵ: + /// + public string RoleNumber { get; set; } = null!; + + /// + /// ע:ɫ + /// Ĭֵ: + /// + public string RoleName { get; set; } = null!; + + /// + /// ע:ɫ + /// Ĭֵ: + /// + public string? RoleDescription { get; set; } + } +} + + diff --git a/EOM.TSHotelManagement.Common.Core/SystemManagement/Role.cs b/EOM.TSHotelManagement.Common.Core/SystemManagement/Role.cs new file mode 100644 index 0000000..ea7c0cb --- /dev/null +++ b/EOM.TSHotelManagement.Common.Core/SystemManagement/Role.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using SqlSugar; +namespace EOM.TSHotelManagement.Common.Core +{ + /// + /// 角色 + /// + [SugarTable("role")] + public class Role : BaseEntity + { + /// + /// 备 注:角色编码 + /// 默认值: + /// + [SugarColumn(ColumnName = "role_number", IsPrimaryKey = true)] + public string RoleNumber { get; set; } = null!; + + /// + /// 备 注:角色名字 + /// 默认值: + /// + [SugarColumn(ColumnName = "role_name")] + public string RoleName { get; set; } = null!; + + /// + /// 备 注:角色描述 + /// 默认值: + /// + [SugarColumn(ColumnName = "role_description")] + public string? RoleDescription { get; set; } + } + +} \ No newline at end of file diff --git a/EOM.TSHotelManagement.Common.Core/SystemManagement/RolePermission.cs b/EOM.TSHotelManagement.Common.Core/SystemManagement/RolePermission.cs new file mode 100644 index 0000000..e781256 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Core/SystemManagement/RolePermission.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using SqlSugar; +namespace EOM.TSHotelManagement.Common.Core +{ + /// + /// 角色权限关联表 + /// + [SugarTable("role_permission")] + public class RolePermission : BaseEntity + { + /// + /// 备 注:角色编码 + /// 默认值: + /// + [SugarColumn(ColumnName = "role_number")] + public string RoleNumber { get; set; } = null!; + + /// + /// 备 注:权限编码 + /// 默认值: + /// + [SugarColumn(ColumnName = "permission_number")] + public string PermissionNumber { get; set; } = null!; + } + +} \ No newline at end of file diff --git a/EOM.TSHotelManagement.Common.Core/SystemManagement/UserRole.cs b/EOM.TSHotelManagement.Common.Core/SystemManagement/UserRole.cs new file mode 100644 index 0000000..728a068 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Core/SystemManagement/UserRole.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using SqlSugar; +namespace EOM.TSHotelManagement.Common.Core +{ + /// + /// 用户角色关联表 + /// + [SugarTable("user_role")] + public class UserRole:BaseEntity + { + /// + /// 备 注:角色编码 + /// 默认值: + /// + [SugarColumn(ColumnName="role_number" ) ] + public string RoleNumber { get; set; } = null!; + + /// + /// 备 注:用户编码 + /// 默认值: + /// + [SugarColumn(ColumnName="user_number" ) ] + public string UserNumber { get; set; } = null!; + } + +} \ No newline at end of file diff --git a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Role/RoleController.cs b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Role/RoleController.cs new file mode 100644 index 0000000..c1562f6 --- /dev/null +++ b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Role/RoleController.cs @@ -0,0 +1,61 @@ +using EOM.TSHotelManagement.Application; +using EOM.TSHotelManagement.Common.Contract; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; + +namespace EOM.TSHotelManagement.WebApi.Controllers +{ + public class RoleController : ControllerBase + { + private readonly IRoleAppService _roleAppService; + + public RoleController(IRoleAppService roleAppService) + { + _roleAppService = roleAppService; + } + + /// + /// 查询角色列表 + /// + /// + /// + [HttpGet] + public ListOutputDto SelectRoleList([FromQuery]ReadRoleInputDto readRoleInputDto) + { + return _roleAppService.SelectRoleList(readRoleInputDto); + } + + /// + /// 添加角色 + /// + /// + /// + [HttpPost] + public BaseOutputDto InsertRole([FromBody]CreateRoleInputDto createRoleInputDto) + { + return _roleAppService.InsertRole(createRoleInputDto); + } + + /// + /// 更新角色 + /// + /// + /// + [HttpPost] + public BaseOutputDto UpdateRole([FromBody] UpdateRoleInputDto updateRoleInputDto) + { + return _roleAppService.UpdateRole(updateRoleInputDto); + } + + /// + /// 删除角色 + /// + /// + /// + [HttpPost] + public BaseOutputDto DeleteRole([FromBody] DeleteRoleInputDto deleteRoleInputDto) + { + return _roleAppService.DeleteRole(deleteRoleInputDto); + } + } +} diff --git "a/\346\225\260\346\215\256\345\272\223\350\204\232\346\234\254/latest_MariaDB\347\211\210\346\234\254/tshotel-backstage-dbscript-data.sql" "b/\346\225\260\346\215\256\345\272\223\350\204\232\346\234\254/latest_MariaDB\347\211\210\346\234\254/tshotel-backstage-dbscript-data.sql" new file mode 100644 index 0000000..02e83ad --- /dev/null +++ "b/\346\225\260\346\215\256\345\272\223\350\204\232\346\234\254/latest_MariaDB\347\211\210\346\234\254/tshotel-backstage-dbscript-data.sql" @@ -0,0 +1,4537 @@ +INSERT INTO `administrator` (`id`, `admin_number`, `admin_account`, `admin_password`, `admin_type`, `admin_name`, `is_admin`, `delete_mk`, `datains_usr`, `datains_date`, `datachg_usr`, `datachg_date`) VALUES (1, '1263785187301658678', 'admin', 'clUKFMeIUWp6YflZweR0Cw==·#c0fbb?;*$>#;^b%$?>#%% Date: Fri, 11 Apr 2025 23:01:36 +0800 Subject: [PATCH 14/24] support data protection. --- .../SystemManagement/Administrator/AdminService.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Administrator/AdminService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Administrator/AdminService.cs index d703fa9..83e0950 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/Administrator/AdminService.cs +++ b/EOM.TSHotelManagement.Application/SystemManagement/Administrator/AdminService.cs @@ -163,7 +163,15 @@ namespace EOM.TSHotelManagement.Application return null; } - var encrtptPwd = encrypt.Encryption(readAdministratorInputDto.Password, EncryptionLevel.Enhanced); + var encrtptPwd = string.Empty; + try + { + encrtptPwd = encrypt.Encryption(readAdministratorInputDto.Password, EncryptionLevel.Enhanced); + } + catch (Exception) + { + encrtptPwd = dataProtector.Unprotect(readAdministratorInputDto.Password); + } if (encrtptPwd.IsNullOrEmpty() || existingAdmin.Password.IsNullOrEmpty()) { @@ -176,8 +184,6 @@ namespace EOM.TSHotelManagement.Application return null; } - var currentRoles = - existingAdmin.Password = string.Empty; existingAdmin.UserToken = jWTHelper.GenerateJWT(new ClaimsIdentity(new Claim[] { -- Gitee From ccb182ad32daecd769ef9307797813fe73fc1a11 Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Fri, 11 Apr 2025 23:07:31 +0800 Subject: [PATCH 15/24] update compare password logic. --- .../Administrator/AdminService.cs | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Administrator/AdminService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Administrator/AdminService.cs index 83e0950..7521d1c 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/Administrator/AdminService.cs +++ b/EOM.TSHotelManagement.Application/SystemManagement/Administrator/AdminService.cs @@ -163,14 +163,25 @@ namespace EOM.TSHotelManagement.Application return null; } + var encrtptPwd = string.Empty; try { encrtptPwd = encrypt.Encryption(readAdministratorInputDto.Password, EncryptionLevel.Enhanced); + var passed = encrypt.Compare(encrtptPwd, existingAdmin.Password); + if (!passed) + { + return null; + } } catch (Exception) { - encrtptPwd = dataProtector.Unprotect(readAdministratorInputDto.Password); + var originalPwd = dataProtector.Unprotect(existingAdmin.Password); + var passed = originalPwd == existingAdmin.Password; + if (!passed) + { + return null; + } } if (encrtptPwd.IsNullOrEmpty() || existingAdmin.Password.IsNullOrEmpty()) @@ -178,12 +189,6 @@ namespace EOM.TSHotelManagement.Application return null; } - var passed = encrypt.Compare(encrtptPwd, existingAdmin.Password); - if (!passed) - { - return null; - } - existingAdmin.Password = string.Empty; existingAdmin.UserToken = jWTHelper.GenerateJWT(new ClaimsIdentity(new Claim[] { -- Gitee From 68650d22dad748133c9904266498877d54fd1c5b Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Fri, 11 Apr 2025 23:24:03 +0800 Subject: [PATCH 16/24] remove not use table script. --- .../tshotel-backstage-dbscript-table.sql" | 16 ---------------- 1 file changed, 16 deletions(-) diff --git "a/\346\225\260\346\215\256\345\272\223\350\204\232\346\234\254/latest_MariaDB\347\211\210\346\234\254/tshotel-backstage-dbscript-table.sql" "b/\346\225\260\346\215\256\345\272\223\350\204\232\346\234\254/latest_MariaDB\347\211\210\346\234\254/tshotel-backstage-dbscript-table.sql" index df13b2e..5d069ad 100644 --- "a/\346\225\260\346\215\256\345\272\223\350\204\232\346\234\254/latest_MariaDB\347\211\210\346\234\254/tshotel-backstage-dbscript-table.sql" +++ "b/\346\225\260\346\215\256\345\272\223\350\204\232\346\234\254/latest_MariaDB\347\211\210\346\234\254/tshotel-backstage-dbscript-table.sql" @@ -607,22 +607,6 @@ CREATE TABLE `room` ( PRIMARY KEY (`id`, `room_no`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '房屋表' ROW_FORMAT = Dynamic; --- ---------------------------- --- Table structure for room_state --- ---------------------------- -DROP TABLE IF EXISTS `room_state`; -CREATE TABLE `room_state` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `room_state_number` int(11) NOT NULL COMMENT '房间状态ID', - `room_state` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '房间状态名称', - `delete_mk` int(11) NOT NULL COMMENT '删除标记', - `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', - `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', - `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', - `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', - PRIMARY KEY (`id`, `room_state_number`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '房间状态表' ROW_FORMAT = Dynamic; - -- ---------------------------- -- Table structure for room_type -- ---------------------------- -- Gitee From 19bbc0ad0e0edf1c4229bc5e063919b2e8dab09e Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Sat, 12 Apr 2025 15:34:34 +0800 Subject: [PATCH 17/24] change menu module logic. --- .../SystemManagement/Menu/MenuService.cs | 22 ++++++++++++++++++- .../NotControllerAttribute.cs | 13 +++++++++++ .../Dto/Menu/CreateMenuInputDto.cs | 1 + .../Dto/Menu/DeleteMenuInputDto.cs | 6 ++++- .../Dto/Menu/ReadMenuInputDto.cs | 2 ++ .../Dto/Menu/ReadMenuOutputDto.cs | 1 + .../Dto/Menu/UpdateMenuInputDto.cs | 2 +- .../SystemManagement/Menu.cs | 8 +++++++ .../SystemManagement/MenuViewModel.cs | 5 +++++ 9 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 EOM.TSHotelManagement.Common.Contract/NotControllerAttribute.cs diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Menu/MenuService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Menu/MenuService.cs index c727d20..9cbeaf4 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/Menu/MenuService.cs +++ b/EOM.TSHotelManagement.Application/SystemManagement/Menu/MenuService.cs @@ -85,8 +85,22 @@ namespace EOM.TSHotelManagement.Application { where = where.And(a => a.IsDelete == readMenuInputDto.IsDelete); } + if (readMenuInputDto.SearchParent) + { + where = where.And(a => !a.Parent.HasValue); + } + var count = 0; - List allMenus = menuRepository.AsQueryable().Where(where.ToExpression()).ToPageList(readMenuInputDto.Page, readMenuInputDto.PageSize, ref count); + List allMenus = new List(); + + if (!readMenuInputDto.IgnorePaging && readMenuInputDto.Page != 0 && readMenuInputDto.PageSize != 0) + { + allMenus = menuRepository.AsQueryable().Where(where.ToExpression()).ToPageList(readMenuInputDto.Page, readMenuInputDto.PageSize, ref count); + } + else + { + allMenus = menuRepository.AsQueryable().Where(where.ToExpression()).ToList(); + } List result = EntityMapper.MapList(allMenus); @@ -106,6 +120,11 @@ namespace EOM.TSHotelManagement.Application { try { + if (menuRepository.IsAny(a => a.Key == menu.Key && a.IsDelete == 0)) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString("This menu already exists.", "菜单已存在。"), StatusCode = StatusCodeConstants.InternalServerError }; + } + menuRepository.Insert(EntityMapper.Map(menu)); } catch (Exception ex) @@ -170,6 +189,7 @@ namespace EOM.TSHotelManagement.Application Key = menu.Key, Title = menu.Title, Path = menu.Path, + Icon = menu.Icon, Children = BuildMenuTree(menus, menu.Id) }; if (viewModel.Children.Count == 0) diff --git a/EOM.TSHotelManagement.Common.Contract/NotControllerAttribute.cs b/EOM.TSHotelManagement.Common.Contract/NotControllerAttribute.cs new file mode 100644 index 0000000..7216a2f --- /dev/null +++ b/EOM.TSHotelManagement.Common.Contract/NotControllerAttribute.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EOM.TSHotelManagement.Common.Contract +{ + [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false)] + public class NotControllerAttribute : Attribute + { + } +} diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/CreateMenuInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/CreateMenuInputDto.cs index 64cfc38..98fdefa 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/CreateMenuInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/CreateMenuInputDto.cs @@ -6,6 +6,7 @@ namespace EOM.TSHotelManagement.Common.Contract public string Title { get; set; } public string Path { get; set; } public int? Parent { get; set; } + public string Icon { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/DeleteMenuInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/DeleteMenuInputDto.cs index 316b62c..cd22ae2 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/DeleteMenuInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/DeleteMenuInputDto.cs @@ -2,7 +2,11 @@ namespace EOM.TSHotelManagement.Common.Contract { public class DeleteMenuInputDto: BaseInputDto { - public int Id { get; set; } + public string Key { get; set; } + public string Title { get; set; } + public string Path { get; set; } + public int? Parent { get; set; } + public string Icon { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/ReadMenuInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/ReadMenuInputDto.cs index 74cdff0..8b37af2 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/ReadMenuInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/ReadMenuInputDto.cs @@ -3,6 +3,8 @@ namespace EOM.TSHotelManagement.Common.Contract public class ReadMenuInputDto:ListInputDto { public int Id { get; set; } + + public bool SearchParent { get; set; } = false; } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/ReadMenuOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/ReadMenuOutputDto.cs index bcc3d7d..d1c0ac6 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/ReadMenuOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/ReadMenuOutputDto.cs @@ -7,6 +7,7 @@ namespace EOM.TSHotelManagement.Common.Contract public string Title { get; set; } public string Path { get; set; } public int? Parent { get; set; } + public string Icon { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/UpdateMenuInputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/UpdateMenuInputDto.cs index 9878b3e..839950e 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/UpdateMenuInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/Menu/UpdateMenuInputDto.cs @@ -2,11 +2,11 @@ namespace EOM.TSHotelManagement.Common.Contract { public class UpdateMenuInputDto: BaseInputDto { - public int Id { get; set; } public string Key { get; set; } public string Title { get; set; } public string Path { get; set; } public int? Parent { get; set; } + public string Icon { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/SystemManagement/Menu.cs b/EOM.TSHotelManagement.Common.Core/SystemManagement/Menu.cs index 7fb3c44..9b95319 100644 --- a/EOM.TSHotelManagement.Common.Core/SystemManagement/Menu.cs +++ b/EOM.TSHotelManagement.Common.Core/SystemManagement/Menu.cs @@ -34,6 +34,8 @@ namespace EOM.TSHotelManagement.Common.Core [SugarTable("menu")] public class Menu : BaseEntity { + [SugarColumn(ColumnName = "id",IsPrimaryKey = true,IsIdentity = true)] + public new int Id { get; set; } /// /// 备 注:菜单键 (Menu Key) /// 默认值: @@ -61,6 +63,12 @@ namespace EOM.TSHotelManagement.Common.Core /// [SugarColumn(ColumnName = "parent")] public int? Parent { get; set; } + + /// + /// 图标 + /// + [SugarColumn(ColumnName = "icon")] + public string Icon { get; set; } } } \ No newline at end of file diff --git a/EOM.TSHotelManagement.Common.Core/SystemManagement/MenuViewModel.cs b/EOM.TSHotelManagement.Common.Core/SystemManagement/MenuViewModel.cs index 6959174..dee1fd8 100644 --- a/EOM.TSHotelManagement.Common.Core/SystemManagement/MenuViewModel.cs +++ b/EOM.TSHotelManagement.Common.Core/SystemManagement/MenuViewModel.cs @@ -26,6 +26,11 @@ namespace EOM.TSHotelManagement.Common.Core /// public string Path { get; set; } + /// + /// 图标 + /// + public string Icon { get; set; } + /// /// 子菜单 (Child Menus) /// -- Gitee From 079ee2eb59078d0b3ac15db5b27c35eb60cc3be8 Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Sat, 12 Apr 2025 07:39:04 +0000 Subject: [PATCH 18/24] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E4=BB=B6=20?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E8=84=9A=E6=9C=AC/latest=5FMariaDB?= =?UTF-8?q?=E7=89=88=E6=9C=AC/tshotel-backstage-dbscript-table.sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tshotel-backstage-dbscript-table.sql" | 701 ------------------ 1 file changed, 701 deletions(-) delete mode 100644 "\346\225\260\346\215\256\345\272\223\350\204\232\346\234\254/latest_MariaDB\347\211\210\346\234\254/tshotel-backstage-dbscript-table.sql" diff --git "a/\346\225\260\346\215\256\345\272\223\350\204\232\346\234\254/latest_MariaDB\347\211\210\346\234\254/tshotel-backstage-dbscript-table.sql" "b/\346\225\260\346\215\256\345\272\223\350\204\232\346\234\254/latest_MariaDB\347\211\210\346\234\254/tshotel-backstage-dbscript-table.sql" deleted file mode 100644 index 5d069ad..0000000 --- "a/\346\225\260\346\215\256\345\272\223\350\204\232\346\234\254/latest_MariaDB\347\211\210\346\234\254/tshotel-backstage-dbscript-table.sql" +++ /dev/null @@ -1,701 +0,0 @@ -/* - Navicat Premium Dump SQL - - Source Server : local-MariaDB - Source Server Type : MariaDB - Source Server Version : 101110 (10.11.10-MariaDB) - Source Host : localhost:3306 - Source Schema : tshoteldb - - Target Server Type : MariaDB - Target Server Version : 101110 (10.11.10-MariaDB) - File Encoding : 65001 - - Date: 11/04/2025 22:45:27 -*/ - -SET NAMES utf8mb4; -SET FOREIGN_KEY_CHECKS = 0; - --- ---------------------------- --- Table structure for administrator --- ---------------------------- -DROP TABLE IF EXISTS `administrator`; -CREATE TABLE `administrator` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增长ID', - `admin_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '管理员编号', - `admin_account` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '管理员账号', - `admin_password` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '管理员密码', - `admin_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '管理员类型', - `admin_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '管理员名称', - `is_admin` int(11) NULL DEFAULT NULL COMMENT '是否为超级管理员', - `delete_mk` int(11) NULL DEFAULT NULL COMMENT '删除标记', - `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料新增人', - `datains_date` datetime NULL DEFAULT NULL COMMENT '资料新增时间', - `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', - `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', - PRIMARY KEY (`id`, `admin_number`, `admin_account`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '管理员信息表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for administrator_type --- ---------------------------- -DROP TABLE IF EXISTS `administrator_type`; -CREATE TABLE `administrator_type` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', - `type_id` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '管理员类型', - `type_name` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '管理员类型名称', - `delete_mk` int(11) NOT NULL COMMENT '删除标记', - `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', - `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', - `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', - `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', - PRIMARY KEY (`id`, `type_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '管理员类型表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for app_banner --- ---------------------------- -DROP TABLE IF EXISTS `app_banner`; -CREATE TABLE `app_banner` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `banner_number` int(11) NOT NULL COMMENT '编号', - `banner_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '文字信息', - `delete_mk` int(11) NOT NULL COMMENT '删除标记', - `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', - `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', - `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', - `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', - PRIMARY KEY (`id`, `banner_number`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '主页跑马灯信息表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for app_config_base --- ---------------------------- -DROP TABLE IF EXISTS `app_config_base`; -CREATE TABLE `app_config_base` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `url_no` int(11) NOT NULL COMMENT 'No', - `url_addr` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '地址', - PRIMARY KEY (`id`, `url_no`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '程序信息配置表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for app_version --- ---------------------------- -DROP TABLE IF EXISTS `app_version`; -CREATE TABLE `app_version` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `base_versionId` int(11) NOT NULL COMMENT '流水号', - `base_version` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '版本号', - PRIMARY KEY (`id`, `base_versionId`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '应用程序版本控制表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for appointment_notice --- ---------------------------- -DROP TABLE IF EXISTS `appointment_notice`; -CREATE TABLE `appointment_notice` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `notice_no` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '公告编号', - `notice_theme` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '公告主题', - `notice_type` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '公告类型', - `notice_time` datetime NOT NULL COMMENT '发布日期', - `notice_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '公告正文', - `notice_department` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '发文部门', - `delete_mk` int(11) NOT NULL COMMENT '删除标记', - `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', - `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', - `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', - `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', - PRIMARY KEY (`id`, `notice_no`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '公告表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for asset --- ---------------------------- -DROP TABLE IF EXISTS `asset`; -CREATE TABLE `asset` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `asset_number` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '资产编号', - `asset_name` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '资产名称', - `asset_value` decimal(16, 2) NOT NULL COMMENT '资产总值', - `department_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '所属部门', - `acquisition_date` datetime NOT NULL COMMENT '入库时间', - `asset_source` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '资产来源', - `acquired_by_employee` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '资产经办人', - `delete_mk` int(11) NOT NULL COMMENT '删除标记', - `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', - `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', - `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', - `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', - PRIMARY KEY (`id`, `asset_number`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '酒店资产表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for card_code --- ---------------------------- -DROP TABLE IF EXISTS `card_code`; -CREATE TABLE `card_code` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '编号', - `province` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '省份', - `city` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '城市', - `district` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '地区', - `district_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '地区识别码', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 4489 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '身份证地区识别码表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for counter_rule --- ---------------------------- -DROP TABLE IF EXISTS `counter_rule`; -CREATE TABLE `counter_rule` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `rule_id` int(11) NOT NULL COMMENT '规则编号', - `rule_name` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '规格名称', - `rule_desc` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '规则描述', - `now_id` int(11) NULL DEFAULT NULL COMMENT '当前ID', - `prefix_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '规则简写', - `custo_format` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '规则格式', - `number_format` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '编号前缀', - `separating_char` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '规则分割符', - `datains_usrid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料新增人', - `datains_time` datetime NULL DEFAULT NULL COMMENT '资料新增时间', - `datachg_usrid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', - `datachg_time` datetime NULL DEFAULT NULL COMMENT '资料更新时间', - PRIMARY KEY (`id`, `rule_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '业务流水号规则表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for custo_type --- ---------------------------- -DROP TABLE IF EXISTS `custo_type`; -CREATE TABLE `custo_type` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `custo_type` int(11) NOT NULL COMMENT '客户类型ID', - `type_name` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户类型名称', - `delete_mk` int(11) NOT NULL COMMENT '删除标记', - `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', - `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', - `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', - `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', - PRIMARY KEY (`id`, `custo_type`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户类型表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for customer --- ---------------------------- -DROP TABLE IF EXISTS `customer`; -CREATE TABLE `customer` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '索引ID', - `custo_no` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户编号', - `custo_name` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户姓名', - `custo_tel` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户电话', - `passport_type` int(11) NOT NULL COMMENT '证件类型', - `passport_id` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '证件号码', - `custo_address` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户地址', - `custo_birth` datetime NULL DEFAULT NULL COMMENT '客户生日', - `custo_type` int(11) NOT NULL COMMENT '客户类型', - `delete_mk` int(11) NOT NULL COMMENT '删除标记', - `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', - `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', - `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', - `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', - `custo_gender` int(11) NULL DEFAULT NULL COMMENT '客户性别', - PRIMARY KEY (`id`, `custo_no`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for customer_spend --- ---------------------------- -DROP TABLE IF EXISTS `customer_spend`; -CREATE TABLE `customer_spend` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `spend_number` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '记录编号', - `room_no` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '房间编号', - `custo_no` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户编号', - `spend_name` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '商品名称', - `apend_quantity` int(11) NOT NULL COMMENT '商品数量', - `spend_price` decimal(65, 2) NOT NULL COMMENT '商品价格', - `spend_amount` decimal(65, 2) NOT NULL COMMENT '消费总额', - `spend_time` datetime NOT NULL COMMENT '消费时间', - `settlement_status` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '结算状态', - `delete_mk` int(11) NOT NULL COMMENT '删除标记', - `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', - `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', - `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', - `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', - PRIMARY KEY (`id`, `spend_number`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商品消费表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for department --- ---------------------------- -DROP TABLE IF EXISTS `department`; -CREATE TABLE `department` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '索引ID', - `dept_no` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '部门编号', - `dept_name` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门名称', - `dept_desc` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门描述', - `dept_date` datetime NULL DEFAULT NULL COMMENT '创建时间(部门)', - `dept_leader` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门主管', - `dept_parent` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上级部门', - `delete_mk` int(11) NOT NULL COMMENT '删除标记', - `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', - `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', - `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', - `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', - PRIMARY KEY (`id`, `dept_no`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '部门表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for employee --- ---------------------------- -DROP TABLE IF EXISTS `employee`; -CREATE TABLE `employee` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '索引ID', - `employee_number` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '工号', - `employee_name` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '名字', - `employee_date_of_birth` datetime NOT NULL COMMENT '出生日期', - `employee_gender` int(11) NOT NULL COMMENT '性别', - `employee_tel` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '电话', - `employee_department` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '部门', - `employee_nation` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '民族', - `employee_address` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '居住地址', - `employee_postion` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '职位', - `card_type` int(11) NOT NULL COMMENT '证件类型', - `card_number` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '证件号码', - `employee_password` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '系统密码', - `hire_time` datetime NOT NULL COMMENT '入职时间', - `employee_political` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '面貌', - `employee_quality` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '学历', - `email_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '邮箱地址', - `delete_mk` int(11) NULL DEFAULT NULL COMMENT '删除标记', - `enable_mk` int(11) NOT NULL COMMENT '禁用标记', - `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', - `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', - `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', - `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', - PRIMARY KEY (`id`, `employee_number`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '员工表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for employee_check --- ---------------------------- -DROP TABLE IF EXISTS `employee_check`; -CREATE TABLE `employee_check` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增长ID', - `check_number` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '打卡ID', - `employee_number` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '工号', - `check_time` datetime NULL DEFAULT NULL COMMENT '打卡时间', - `check_way` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '打卡方式', - `check_state` int(11) NULL DEFAULT NULL COMMENT '打卡状态', - `delete_mk` int(11) NOT NULL COMMENT '删除标记', - `datains_usr` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', - `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', - `datachg_usr` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', - `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', - PRIMARY KEY (`id`, `check_number`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '员工打卡表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for employee_history --- ---------------------------- -DROP TABLE IF EXISTS `employee_history`; -CREATE TABLE `employee_history` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增长ID', - `history_number` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '履历ID', - `employee_number` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '工号', - `start_date` datetime NOT NULL COMMENT '开始时间', - `end_date` datetime NOT NULL COMMENT '结束时间', - `position` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '职务', - `company` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '公司', - `delete_mk` int(11) NOT NULL COMMENT '删除标记', - `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', - `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', - `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', - `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', - PRIMARY KEY (`id`, `history_number` DESC) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '员工履历表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for employee_pic --- ---------------------------- -DROP TABLE IF EXISTS `employee_pic`; -CREATE TABLE `employee_pic` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增长流水号', - `employee_number` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '工号', - `pic_url` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '照片路径', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '员工照片表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for energy_management --- ---------------------------- -DROP TABLE IF EXISTS `energy_management`; -CREATE TABLE `energy_management` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `information_number` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '编号', - `room_no` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '房间编号', - `use_date` datetime NOT NULL COMMENT '开始时间', - `end_date` datetime NULL DEFAULT NULL COMMENT '结束时间', - `water_use` decimal(65, 2) NOT NULL COMMENT '用水情况', - `power_use` decimal(65, 2) NOT NULL COMMENT '用电情况', - `recorder` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '记录人', - `custo_no` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户编号', - `delete_mk` int(11) NOT NULL COMMENT '删除标记', - `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', - `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', - `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', - `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', - PRIMARY KEY (`id`, `information_number`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '水电费信息表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for gender_type --- ---------------------------- -DROP TABLE IF EXISTS `gender_type`; -CREATE TABLE `gender_type` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `gender_number` int(11) NOT NULL COMMENT '性别ID', - `gender_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '性别名称', - `delete_mk` int(11) NOT NULL COMMENT '删除标记', - `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', - `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', - `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', - `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', - PRIMARY KEY (`id`, `gender_number`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '性别类型表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for menu --- ---------------------------- -DROP TABLE IF EXISTS `menu`; -CREATE TABLE `menu` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增长ID', - `key` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '菜单键', - `title` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '菜单标题', - `path` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '菜单路径', - `parent` int(11) NULL DEFAULT NULL COMMENT '父级ID', - `delete_mk` int(11) NOT NULL COMMENT '删除标记', - `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', - `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', - `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', - `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 35 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '菜单表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for nation --- ---------------------------- -DROP TABLE IF EXISTS `nation`; -CREATE TABLE `nation` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '索引ID', - `nation_no` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '民族编号', - `nation_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '民族名称', - `delete_mk` int(11) NOT NULL COMMENT '删除标记', - `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', - `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', - `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', - `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', - PRIMARY KEY (`id`, `nation_no`, `nation_name`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '民族信息表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for nav_bar --- ---------------------------- -DROP TABLE IF EXISTS `nav_bar`; -CREATE TABLE `nav_bar` ( - `nav_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '导航控件流水号', - `nav_name` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '导航控件名称', - `nav_or` int(11) NULL DEFAULT NULL COMMENT '导航控件排序', - `nav_pic` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '导航控件图片', - `nav_event` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '导航控件事件', - `delete_mk` int(11) NOT NULL COMMENT '删除标记', - `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', - `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', - `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', - `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', - `margin_left` int(11) NULL DEFAULT NULL COMMENT '左边距', - PRIMARY KEY (`nav_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '功能导航' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for operation_log --- ---------------------------- -DROP TABLE IF EXISTS `operation_log`; -CREATE TABLE `operation_log` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `operation_number` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '记录编号', - `operation_time` datetime NOT NULL COMMENT '记录时间', - `log_content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, - `operation_account` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, - `operation_level` int(11) NULL DEFAULT NULL COMMENT '日志等级', - `software_version` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, - `login_ip` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, - `request_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '请求路径', - `query_string` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '查询参数', - `elapsed_time` bigint(20) NULL DEFAULT NULL COMMENT '响应时间', - `http_method` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '请求方式', - `status_code` int(11) NULL DEFAULT NULL COMMENT '状态代码', - `exception_message` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, - `exception_stacktrace` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, - `delete_mk` int(11) NOT NULL COMMENT '删除标记', - `datains_usr` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, - `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', - `datachg_usr` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, - `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', - PRIMARY KEY (`id`, `operation_number`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2220 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统操作日志表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for passport_type --- ---------------------------- -DROP TABLE IF EXISTS `passport_type`; -CREATE TABLE `passport_type` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `passport_number` int(11) NOT NULL COMMENT '证件类型ID', - `passport_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '证件类型名称', - `delete_mk` int(11) NOT NULL COMMENT '删除标记', - `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', - `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', - `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', - `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', - PRIMARY KEY (`id`, `passport_number`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '证件类型表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for position --- ---------------------------- -DROP TABLE IF EXISTS `position`; -CREATE TABLE `position` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '索引ID', - `position_no` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '职位编号', - `position_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '职位名称', - `delete_mk` int(11) NOT NULL COMMENT '删除标记', - `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', - `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', - `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', - `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', - PRIMARY KEY (`id`, `position_no`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '职位表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for qualification --- ---------------------------- -DROP TABLE IF EXISTS `qualification`; -CREATE TABLE `qualification` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '索引ID', - `education_no` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '学历编号', - `education_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '学历名称', - `delete_mk` int(11) NOT NULL COMMENT '删除标记', - `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', - `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', - `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', - `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', - PRIMARY KEY (`id`, `education_no`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '学历表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for reser --- ---------------------------- -DROP TABLE IF EXISTS `reser`; -CREATE TABLE `reser` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `reser_number` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '预约ID ', - `custo_name` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户名字', - `custo_tel` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系方式', - `reser_way` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预约方式', - `reser_room` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预约房号', - `reser_date` datetime NULL DEFAULT NULL COMMENT '预约开始日期', - `reser_end_date` datetime NULL DEFAULT NULL COMMENT '预约结束日期', - `delete_mk` int(11) NOT NULL COMMENT '删除标记', - `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', - `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', - `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', - `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', - PRIMARY KEY (`id`, `reser_number`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '预约表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for reward_punishment --- ---------------------------- -DROP TABLE IF EXISTS `reward_punishment`; -CREATE TABLE `reward_punishment` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增长ID', - `employee_number` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '工号', - `reward_punishment_information` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '奖惩信息', - `reward_punishment_type` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '奖惩类型', - `reward_punishment_operator` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '录入人', - `reward_punishment_time` datetime NULL DEFAULT NULL COMMENT '录入时间', - `delete_mk` int(11) NOT NULL COMMENT '删除标记', - `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', - `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', - `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', - `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '员工奖惩记录表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for reward_punishment_type --- ---------------------------- -DROP TABLE IF EXISTS `reward_punishment_type`; -CREATE TABLE `reward_punishment_type` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `reward_punishment_type_number` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '奖惩类型ID', - `reward_punishment_type_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '奖惩类型名称', - `delete_mk` int(11) NOT NULL COMMENT '删除标记', - `datains_usr` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', - `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', - `datachg_usr` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', - `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', - PRIMARY KEY (`id`, `reward_punishment_type_number`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '奖惩类型' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for role --- ---------------------------- -DROP TABLE IF EXISTS `role`; -CREATE TABLE `role` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `role_number` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色编码', - `role_name` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色名字', - `role_description` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '角色描述', - `delete_mk` int(11) NOT NULL COMMENT '删除标记', - `datains_usr` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', - `datains_date` datetime NULL DEFAULT NULL COMMENT '创建日期', - `datachg_usr` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人', - `datachg_date` datetime NULL DEFAULT NULL COMMENT '更新日期', - PRIMARY KEY (`id`, `role_number`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for role_permission --- ---------------------------- -DROP TABLE IF EXISTS `role_permission`; -CREATE TABLE `role_permission` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `role_number` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色编码', - `permission_number` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '权限编码', - `datains_usr` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', - `datains_date` datetime NULL DEFAULT NULL COMMENT '创建日期', - `datachg_usr` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人', - `datachg_date` datetime NULL DEFAULT NULL COMMENT '更新日期', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色权限关联表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for room --- ---------------------------- -DROP TABLE IF EXISTS `room`; -CREATE TABLE `room` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `room_no` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '房间编号', - `room_type` int(11) NOT NULL COMMENT '房间类型', - `custo_no` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户编号', - `check_in_time` datetime NULL DEFAULT NULL COMMENT '入住时间', - `check_out_time` datetime NULL DEFAULT NULL COMMENT '退房时间', - `room_state_id` int(11) NOT NULL COMMENT '房间状态', - `room_rent` decimal(65, 2) NOT NULL COMMENT '房屋租金', - `room_deposit` decimal(65, 2) NULL DEFAULT NULL COMMENT '房屋押金', - `room_position` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '房屋位置', - `delete_mk` int(11) NOT NULL COMMENT '删除标记', - `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', - `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', - `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', - `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', - PRIMARY KEY (`id`, `room_no`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '房屋表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for room_type --- ---------------------------- -DROP TABLE IF EXISTS `room_type`; -CREATE TABLE `room_type` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `room_type` int(11) NOT NULL COMMENT '房间类型ID', - `room_name` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '房间类型名称', - `room_rent` decimal(65, 2) NOT NULL COMMENT '房间租金', - `room_deposit` decimal(65, 2) NOT NULL COMMENT '房间押金', - `delete_mk` int(11) NOT NULL COMMENT '删除标记', - `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', - `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', - `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', - `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', - PRIMARY KEY (`id`, `room_type`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '房间类型表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for sellthing --- ---------------------------- -DROP TABLE IF EXISTS `sellthing`; -CREATE TABLE `sellthing` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `sell_no` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '商品编号', - `sell_name` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '商品名称', - `sell_price` decimal(65, 2) NOT NULL COMMENT '商品价格', - `specification` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '规格型号', - `stock` int(11) NOT NULL COMMENT '库存数量', - `delete_mk` int(11) NOT NULL COMMENT '删除标记', - `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', - `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', - `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', - `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', - PRIMARY KEY (`id`, `sell_no`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商品表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for supervision_statistics --- ---------------------------- -DROP TABLE IF EXISTS `supervision_statistics`; -CREATE TABLE `supervision_statistics` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `statistics_number` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '监管统计编号', - `supervising_department` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '受监管部门', - `supervision_progress` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '受监管部门总体概述', - `supervision_loss` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '受监管部门交易情况', - `supervision_score` int(11) NOT NULL COMMENT '受监管部门得分情况', - `supervision_statistician` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '本次监管负责人', - `supervision_advice` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '监管建议', - `delete_mk` int(11) NOT NULL COMMENT '删除标记', - `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', - `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', - `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', - `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', - PRIMARY KEY (`id`, `statistics_number`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '监管统计表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for user_role --- ---------------------------- -DROP TABLE IF EXISTS `user_role`; -CREATE TABLE `user_role` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `role_number` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色编码', - `user_number` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户编码', - `datains_usr` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', - `datains_date` datetime NULL DEFAULT NULL COMMENT '创建日期', - `datachg_usr` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人', - `datachg_date` datetime NULL DEFAULT NULL COMMENT '更新日期', - PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户角色关联表' ROW_FORMAT = Dynamic; - --- ---------------------------- --- Table structure for vip_rule --- ---------------------------- -DROP TABLE IF EXISTS `vip_rule`; -CREATE TABLE `vip_rule` ( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '索引ID', - `rule_id` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '会员规则流水号', - `rule_name` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '会员规则名称', - `rule_value` decimal(65, 2) NOT NULL COMMENT '预设数值', - `type_id` int(11) NOT NULL COMMENT '会员等级', - `delete_mk` int(11) NOT NULL COMMENT '删除标记', - `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', - `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', - `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', - `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', - PRIMARY KEY (`id`, `rule_id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '会员等级规则表' ROW_FORMAT = Dynamic; - -SET FOREIGN_KEY_CHECKS = 1; -- Gitee From 197a14fdf4a538ad4bbf6601f2d4c2a2e839aa9b Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Sat, 12 Apr 2025 07:39:33 +0000 Subject: [PATCH 19/24] update db script Signed-off-by: ck_yeun9 --- .../tshotel-backstage-dbscript-table.sql" | 702 ++++++++++++++++++ 1 file changed, 702 insertions(+) create mode 100644 "\346\225\260\346\215\256\345\272\223\350\204\232\346\234\254/latest_MariaDB\347\211\210\346\234\254/tshotel-backstage-dbscript-table.sql" diff --git "a/\346\225\260\346\215\256\345\272\223\350\204\232\346\234\254/latest_MariaDB\347\211\210\346\234\254/tshotel-backstage-dbscript-table.sql" "b/\346\225\260\346\215\256\345\272\223\350\204\232\346\234\254/latest_MariaDB\347\211\210\346\234\254/tshotel-backstage-dbscript-table.sql" new file mode 100644 index 0000000..6a9fcdf --- /dev/null +++ "b/\346\225\260\346\215\256\345\272\223\350\204\232\346\234\254/latest_MariaDB\347\211\210\346\234\254/tshotel-backstage-dbscript-table.sql" @@ -0,0 +1,702 @@ +/* + Navicat Premium Dump SQL + + Source Server : local-MariaDB + Source Server Type : MariaDB + Source Server Version : 101110 (10.11.10-MariaDB) + Source Host : localhost:3306 + Source Schema : tshoteldb + + Target Server Type : MariaDB + Target Server Version : 101110 (10.11.10-MariaDB) + File Encoding : 65001 + + Date: 12/04/2025 15:37:18 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for administrator +-- ---------------------------- +DROP TABLE IF EXISTS `administrator`; +CREATE TABLE `administrator` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增长ID', + `admin_number` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '管理员编号', + `admin_account` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '管理员账号', + `admin_password` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '管理员密码', + `admin_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '管理员类型', + `admin_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '管理员名称', + `is_admin` int(11) NULL DEFAULT NULL COMMENT '是否为超级管理员', + `delete_mk` int(11) NULL DEFAULT NULL COMMENT '删除标记', + `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料新增人', + `datains_date` datetime NULL DEFAULT NULL COMMENT '资料新增时间', + `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', + `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', + PRIMARY KEY (`id`, `admin_number`, `admin_account`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '管理员信息表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for administrator_type +-- ---------------------------- +DROP TABLE IF EXISTS `administrator_type`; +CREATE TABLE `administrator_type` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', + `type_id` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '管理员类型', + `type_name` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '管理员类型名称', + `delete_mk` int(11) NOT NULL COMMENT '删除标记', + `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', + `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', + `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', + `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', + PRIMARY KEY (`id`, `type_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '管理员类型表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for app_banner +-- ---------------------------- +DROP TABLE IF EXISTS `app_banner`; +CREATE TABLE `app_banner` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `banner_number` int(11) NOT NULL COMMENT '编号', + `banner_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '文字信息', + `delete_mk` int(11) NOT NULL COMMENT '删除标记', + `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', + `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', + `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', + `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', + PRIMARY KEY (`id`, `banner_number`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '主页跑马灯信息表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for app_config_base +-- ---------------------------- +DROP TABLE IF EXISTS `app_config_base`; +CREATE TABLE `app_config_base` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `url_no` int(11) NOT NULL COMMENT 'No', + `url_addr` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '地址', + PRIMARY KEY (`id`, `url_no`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '程序信息配置表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for app_version +-- ---------------------------- +DROP TABLE IF EXISTS `app_version`; +CREATE TABLE `app_version` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `base_versionId` int(11) NOT NULL COMMENT '流水号', + `base_version` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '版本号', + PRIMARY KEY (`id`, `base_versionId`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '应用程序版本控制表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for appointment_notice +-- ---------------------------- +DROP TABLE IF EXISTS `appointment_notice`; +CREATE TABLE `appointment_notice` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `notice_no` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '公告编号', + `notice_theme` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '公告主题', + `notice_type` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '公告类型', + `notice_time` datetime NOT NULL COMMENT '发布日期', + `notice_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '公告正文', + `notice_department` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '发文部门', + `delete_mk` int(11) NOT NULL COMMENT '删除标记', + `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', + `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', + `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', + `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', + PRIMARY KEY (`id`, `notice_no`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '公告表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for asset +-- ---------------------------- +DROP TABLE IF EXISTS `asset`; +CREATE TABLE `asset` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `asset_number` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '资产编号', + `asset_name` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '资产名称', + `asset_value` decimal(16, 2) NOT NULL COMMENT '资产总值', + `department_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '所属部门', + `acquisition_date` datetime NOT NULL COMMENT '入库时间', + `asset_source` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '资产来源', + `acquired_by_employee` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '资产经办人', + `delete_mk` int(11) NOT NULL COMMENT '删除标记', + `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', + `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', + `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', + `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', + PRIMARY KEY (`id`, `asset_number`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '酒店资产表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for card_code +-- ---------------------------- +DROP TABLE IF EXISTS `card_code`; +CREATE TABLE `card_code` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '编号', + `province` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '省份', + `city` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '城市', + `district` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '地区', + `district_code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '地区识别码', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 4489 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '身份证地区识别码表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for counter_rule +-- ---------------------------- +DROP TABLE IF EXISTS `counter_rule`; +CREATE TABLE `counter_rule` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `rule_id` int(11) NOT NULL COMMENT '规则编号', + `rule_name` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '规格名称', + `rule_desc` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '规则描述', + `now_id` int(11) NULL DEFAULT NULL COMMENT '当前ID', + `prefix_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '规则简写', + `custo_format` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '规则格式', + `number_format` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '编号前缀', + `separating_char` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '规则分割符', + `datains_usrid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料新增人', + `datains_time` datetime NULL DEFAULT NULL COMMENT '资料新增时间', + `datachg_usrid` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', + `datachg_time` datetime NULL DEFAULT NULL COMMENT '资料更新时间', + PRIMARY KEY (`id`, `rule_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '业务流水号规则表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for custo_type +-- ---------------------------- +DROP TABLE IF EXISTS `custo_type`; +CREATE TABLE `custo_type` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `custo_type` int(11) NOT NULL COMMENT '客户类型ID', + `type_name` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户类型名称', + `delete_mk` int(11) NOT NULL COMMENT '删除标记', + `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', + `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', + `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', + `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', + PRIMARY KEY (`id`, `custo_type`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户类型表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for customer +-- ---------------------------- +DROP TABLE IF EXISTS `customer`; +CREATE TABLE `customer` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '索引ID', + `custo_no` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户编号', + `custo_name` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户姓名', + `custo_tel` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户电话', + `passport_type` int(11) NOT NULL COMMENT '证件类型', + `passport_id` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '证件号码', + `custo_address` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户地址', + `custo_birth` datetime NULL DEFAULT NULL COMMENT '客户生日', + `custo_type` int(11) NOT NULL COMMENT '客户类型', + `delete_mk` int(11) NOT NULL COMMENT '删除标记', + `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', + `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', + `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', + `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', + `custo_gender` int(11) NULL DEFAULT NULL COMMENT '客户性别', + PRIMARY KEY (`id`, `custo_no`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for customer_spend +-- ---------------------------- +DROP TABLE IF EXISTS `customer_spend`; +CREATE TABLE `customer_spend` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `spend_number` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '记录编号', + `room_no` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '房间编号', + `custo_no` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '客户编号', + `spend_name` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '商品名称', + `apend_quantity` int(11) NOT NULL COMMENT '商品数量', + `spend_price` decimal(65, 2) NOT NULL COMMENT '商品价格', + `spend_amount` decimal(65, 2) NOT NULL COMMENT '消费总额', + `spend_time` datetime NOT NULL COMMENT '消费时间', + `settlement_status` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '结算状态', + `delete_mk` int(11) NOT NULL COMMENT '删除标记', + `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', + `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', + `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', + `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', + PRIMARY KEY (`id`, `spend_number`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商品消费表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for department +-- ---------------------------- +DROP TABLE IF EXISTS `department`; +CREATE TABLE `department` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '索引ID', + `dept_no` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '部门编号', + `dept_name` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门名称', + `dept_desc` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门描述', + `dept_date` datetime NULL DEFAULT NULL COMMENT '创建时间(部门)', + `dept_leader` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门主管', + `dept_parent` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '上级部门', + `delete_mk` int(11) NOT NULL COMMENT '删除标记', + `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', + `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', + `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', + `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', + PRIMARY KEY (`id`, `dept_no`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '部门表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for employee +-- ---------------------------- +DROP TABLE IF EXISTS `employee`; +CREATE TABLE `employee` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '索引ID', + `employee_number` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '工号', + `employee_name` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '名字', + `employee_date_of_birth` datetime NOT NULL COMMENT '出生日期', + `employee_gender` int(11) NOT NULL COMMENT '性别', + `employee_tel` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '电话', + `employee_department` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '部门', + `employee_nation` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '民族', + `employee_address` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '居住地址', + `employee_postion` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '职位', + `card_type` int(11) NOT NULL COMMENT '证件类型', + `card_number` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '证件号码', + `employee_password` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '系统密码', + `hire_time` datetime NOT NULL COMMENT '入职时间', + `employee_political` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '面貌', + `employee_quality` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '学历', + `email_address` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '邮箱地址', + `delete_mk` int(11) NULL DEFAULT NULL COMMENT '删除标记', + `enable_mk` int(11) NOT NULL COMMENT '禁用标记', + `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', + `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', + `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', + `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', + PRIMARY KEY (`id`, `employee_number`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '员工表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for employee_check +-- ---------------------------- +DROP TABLE IF EXISTS `employee_check`; +CREATE TABLE `employee_check` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增长ID', + `check_number` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '打卡ID', + `employee_number` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '工号', + `check_time` datetime NULL DEFAULT NULL COMMENT '打卡时间', + `check_way` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '打卡方式', + `check_state` int(11) NULL DEFAULT NULL COMMENT '打卡状态', + `delete_mk` int(11) NOT NULL COMMENT '删除标记', + `datains_usr` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', + `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', + `datachg_usr` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', + `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', + PRIMARY KEY (`id`, `check_number`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '员工打卡表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for employee_history +-- ---------------------------- +DROP TABLE IF EXISTS `employee_history`; +CREATE TABLE `employee_history` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增长ID', + `history_number` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '履历ID', + `employee_number` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '工号', + `start_date` datetime NOT NULL COMMENT '开始时间', + `end_date` datetime NOT NULL COMMENT '结束时间', + `position` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '职务', + `company` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '公司', + `delete_mk` int(11) NOT NULL COMMENT '删除标记', + `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', + `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', + `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', + `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', + PRIMARY KEY (`id`, `history_number` DESC) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '员工履历表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for employee_pic +-- ---------------------------- +DROP TABLE IF EXISTS `employee_pic`; +CREATE TABLE `employee_pic` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增长流水号', + `employee_number` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '工号', + `pic_url` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '照片路径', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '员工照片表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for energy_management +-- ---------------------------- +DROP TABLE IF EXISTS `energy_management`; +CREATE TABLE `energy_management` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `information_number` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '编号', + `room_no` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '房间编号', + `use_date` datetime NOT NULL COMMENT '开始时间', + `end_date` datetime NULL DEFAULT NULL COMMENT '结束时间', + `water_use` decimal(65, 2) NOT NULL COMMENT '用水情况', + `power_use` decimal(65, 2) NOT NULL COMMENT '用电情况', + `recorder` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '记录人', + `custo_no` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户编号', + `delete_mk` int(11) NOT NULL COMMENT '删除标记', + `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', + `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', + `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', + `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', + PRIMARY KEY (`id`, `information_number`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '水电费信息表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for gender_type +-- ---------------------------- +DROP TABLE IF EXISTS `gender_type`; +CREATE TABLE `gender_type` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `gender_number` int(11) NOT NULL COMMENT '性别ID', + `gender_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '性别名称', + `delete_mk` int(11) NOT NULL COMMENT '删除标记', + `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', + `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', + `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', + `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', + PRIMARY KEY (`id`, `gender_number`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '性别类型表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for menu +-- ---------------------------- +DROP TABLE IF EXISTS `menu`; +CREATE TABLE `menu` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增长ID', + `key` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '菜单键', + `title` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '菜单标题', + `path` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '菜单路径', + `parent` int(11) NULL DEFAULT NULL COMMENT '父级ID', + `icon` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '图标', + `delete_mk` int(11) NOT NULL COMMENT '删除标记', + `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', + `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', + `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', + `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 43 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '菜单表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for nation +-- ---------------------------- +DROP TABLE IF EXISTS `nation`; +CREATE TABLE `nation` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '索引ID', + `nation_no` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '民族编号', + `nation_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '民族名称', + `delete_mk` int(11) NOT NULL COMMENT '删除标记', + `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', + `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', + `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', + `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', + PRIMARY KEY (`id`, `nation_no`, `nation_name`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '民族信息表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for nav_bar +-- ---------------------------- +DROP TABLE IF EXISTS `nav_bar`; +CREATE TABLE `nav_bar` ( + `nav_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '导航控件流水号', + `nav_name` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '导航控件名称', + `nav_or` int(11) NULL DEFAULT NULL COMMENT '导航控件排序', + `nav_pic` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '导航控件图片', + `nav_event` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '导航控件事件', + `delete_mk` int(11) NOT NULL COMMENT '删除标记', + `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', + `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', + `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', + `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', + `margin_left` int(11) NULL DEFAULT NULL COMMENT '左边距', + PRIMARY KEY (`nav_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '功能导航' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for operation_log +-- ---------------------------- +DROP TABLE IF EXISTS `operation_log`; +CREATE TABLE `operation_log` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `operation_number` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '记录编号', + `operation_time` datetime NOT NULL COMMENT '记录时间', + `log_content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + `operation_account` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + `operation_level` int(11) NULL DEFAULT NULL COMMENT '日志等级', + `software_version` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `login_ip` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `request_path` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '请求路径', + `query_string` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '查询参数', + `elapsed_time` bigint(20) NULL DEFAULT NULL COMMENT '响应时间', + `http_method` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '请求方式', + `status_code` int(11) NULL DEFAULT NULL COMMENT '状态代码', + `exception_message` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `exception_stacktrace` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `delete_mk` int(11) NOT NULL COMMENT '删除标记', + `datains_usr` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', + `datachg_usr` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', + PRIMARY KEY (`id`, `operation_number`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 3108 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统操作日志表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for passport_type +-- ---------------------------- +DROP TABLE IF EXISTS `passport_type`; +CREATE TABLE `passport_type` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `passport_number` int(11) NOT NULL COMMENT '证件类型ID', + `passport_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '证件类型名称', + `delete_mk` int(11) NOT NULL COMMENT '删除标记', + `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', + `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', + `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', + `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', + PRIMARY KEY (`id`, `passport_number`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '证件类型表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for position +-- ---------------------------- +DROP TABLE IF EXISTS `position`; +CREATE TABLE `position` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '索引ID', + `position_no` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '职位编号', + `position_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '职位名称', + `delete_mk` int(11) NOT NULL COMMENT '删除标记', + `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', + `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', + `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', + `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', + PRIMARY KEY (`id`, `position_no`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '职位表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for qualification +-- ---------------------------- +DROP TABLE IF EXISTS `qualification`; +CREATE TABLE `qualification` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '索引ID', + `education_no` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '学历编号', + `education_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '学历名称', + `delete_mk` int(11) NOT NULL COMMENT '删除标记', + `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', + `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', + `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', + `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', + PRIMARY KEY (`id`, `education_no`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '学历表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for reser +-- ---------------------------- +DROP TABLE IF EXISTS `reser`; +CREATE TABLE `reser` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `reser_number` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '预约ID ', + `custo_name` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户名字', + `custo_tel` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '联系方式', + `reser_way` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预约方式', + `reser_room` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预约房号', + `reser_date` datetime NULL DEFAULT NULL COMMENT '预约开始日期', + `reser_end_date` datetime NULL DEFAULT NULL COMMENT '预约结束日期', + `delete_mk` int(11) NOT NULL COMMENT '删除标记', + `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', + `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', + `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', + `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', + PRIMARY KEY (`id`, `reser_number`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '预约表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for reward_punishment +-- ---------------------------- +DROP TABLE IF EXISTS `reward_punishment`; +CREATE TABLE `reward_punishment` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增长ID', + `employee_number` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '工号', + `reward_punishment_information` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '奖惩信息', + `reward_punishment_type` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '奖惩类型', + `reward_punishment_operator` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '录入人', + `reward_punishment_time` datetime NULL DEFAULT NULL COMMENT '录入时间', + `delete_mk` int(11) NOT NULL COMMENT '删除标记', + `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', + `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', + `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', + `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '员工奖惩记录表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for reward_punishment_type +-- ---------------------------- +DROP TABLE IF EXISTS `reward_punishment_type`; +CREATE TABLE `reward_punishment_type` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `reward_punishment_type_number` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '奖惩类型ID', + `reward_punishment_type_name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '奖惩类型名称', + `delete_mk` int(11) NOT NULL COMMENT '删除标记', + `datains_usr` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', + `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', + `datachg_usr` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', + `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', + PRIMARY KEY (`id`, `reward_punishment_type_number`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '奖惩类型' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for role +-- ---------------------------- +DROP TABLE IF EXISTS `role`; +CREATE TABLE `role` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `role_number` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色编码', + `role_name` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色名字', + `role_description` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '角色描述', + `delete_mk` int(11) NOT NULL COMMENT '删除标记', + `datains_usr` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', + `datains_date` datetime NULL DEFAULT NULL COMMENT '创建日期', + `datachg_usr` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人', + `datachg_date` datetime NULL DEFAULT NULL COMMENT '更新日期', + PRIMARY KEY (`id`, `role_number`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for role_permission +-- ---------------------------- +DROP TABLE IF EXISTS `role_permission`; +CREATE TABLE `role_permission` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `role_number` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色编码', + `permission_number` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '权限编码', + `datains_usr` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', + `datains_date` datetime NULL DEFAULT NULL COMMENT '创建日期', + `datachg_usr` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人', + `datachg_date` datetime NULL DEFAULT NULL COMMENT '更新日期', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色权限关联表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for room +-- ---------------------------- +DROP TABLE IF EXISTS `room`; +CREATE TABLE `room` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `room_no` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '房间编号', + `room_type` int(11) NOT NULL COMMENT '房间类型', + `custo_no` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '客户编号', + `check_in_time` datetime NULL DEFAULT NULL COMMENT '入住时间', + `check_out_time` datetime NULL DEFAULT NULL COMMENT '退房时间', + `room_state_id` int(11) NOT NULL COMMENT '房间状态', + `room_rent` decimal(65, 2) NOT NULL COMMENT '房屋租金', + `room_deposit` decimal(65, 2) NULL DEFAULT NULL COMMENT '房屋押金', + `room_position` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '房屋位置', + `delete_mk` int(11) NOT NULL COMMENT '删除标记', + `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', + `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', + `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', + `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', + PRIMARY KEY (`id`, `room_no`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '房屋表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for room_type +-- ---------------------------- +DROP TABLE IF EXISTS `room_type`; +CREATE TABLE `room_type` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `room_type` int(11) NOT NULL COMMENT '房间类型ID', + `room_name` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '房间类型名称', + `room_rent` decimal(65, 2) NOT NULL COMMENT '房间租金', + `room_deposit` decimal(65, 2) NOT NULL COMMENT '房间押金', + `delete_mk` int(11) NOT NULL COMMENT '删除标记', + `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', + `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', + `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', + `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', + PRIMARY KEY (`id`, `room_type`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '房间类型表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for sellthing +-- ---------------------------- +DROP TABLE IF EXISTS `sellthing`; +CREATE TABLE `sellthing` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `sell_no` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '商品编号', + `sell_name` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '商品名称', + `sell_price` decimal(65, 2) NOT NULL COMMENT '商品价格', + `specification` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '规格型号', + `stock` int(11) NOT NULL COMMENT '库存数量', + `delete_mk` int(11) NOT NULL COMMENT '删除标记', + `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', + `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', + `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', + `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', + PRIMARY KEY (`id`, `sell_no`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '商品表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for supervision_statistics +-- ---------------------------- +DROP TABLE IF EXISTS `supervision_statistics`; +CREATE TABLE `supervision_statistics` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `statistics_number` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '监管统计编号', + `supervising_department` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '受监管部门', + `supervision_progress` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '受监管部门总体概述', + `supervision_loss` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '受监管部门交易情况', + `supervision_score` int(11) NOT NULL COMMENT '受监管部门得分情况', + `supervision_statistician` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '本次监管负责人', + `supervision_advice` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '监管建议', + `delete_mk` int(11) NOT NULL COMMENT '删除标记', + `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', + `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', + `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', + `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', + PRIMARY KEY (`id`, `statistics_number`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '监管统计表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for user_role +-- ---------------------------- +DROP TABLE IF EXISTS `user_role`; +CREATE TABLE `user_role` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', + `role_number` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '角色编码', + `user_number` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户编码', + `datains_usr` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '创建人', + `datains_date` datetime NULL DEFAULT NULL COMMENT '创建日期', + `datachg_usr` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '更新人', + `datachg_date` datetime NULL DEFAULT NULL COMMENT '更新日期', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户角色关联表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Table structure for vip_rule +-- ---------------------------- +DROP TABLE IF EXISTS `vip_rule`; +CREATE TABLE `vip_rule` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '索引ID', + `rule_id` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '会员规则流水号', + `rule_name` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '会员规则名称', + `rule_value` decimal(65, 2) NOT NULL COMMENT '预设数值', + `type_id` int(11) NOT NULL COMMENT '会员等级', + `delete_mk` int(11) NOT NULL COMMENT '删除标记', + `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', + `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', + `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', + `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', + PRIMARY KEY (`id`, `rule_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '会员等级规则表' ROW_FORMAT = Dynamic; + +SET FOREIGN_KEY_CHECKS = 1; -- Gitee From 99bac89d502d3ff8b6c199fb49a35eb58c4dbab3 Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Sun, 13 Apr 2025 15:58:39 +0800 Subject: [PATCH 20/24] update logic for customer/reser/room/sellthing/spend/employee/... module. update table script. --- .../Business/Customer/CustomerService.cs | 11 ++- .../Business/Reser/ReserService.cs | 11 ++- .../Business/Room/IRoomService.cs | 4 +- .../Business/Room/IRoomTypeService.cs | 2 +- .../Business/Room/RoomService.cs | 24 +++---- .../Business/Room/RoomTypeService.cs | 4 +- .../Business/Sellthing/ISellService.cs | 4 +- .../Business/Sellthing/SellService.cs | 70 +++++++++++-------- .../Business/Spend/ISpendService.cs | 9 ++- .../Business/Spend/SpendService.cs | 59 +++++++++++++++- .../Employee/Check/EmployeeCheckService.cs | 42 ++++++++--- .../Employee/Check/IEmployeeCheckService.cs | 4 +- .../Employee/Photo/EmployeePhotoService.cs | 17 ++++- .../Employee/Photo/IEmployeePhotoService.cs | 2 +- .../BaseDto/BaseInputDto.cs | 2 +- .../Dto/Customer/ReadCustomerOutputDto.cs | 16 ++++- .../Dto/CreateEnergyManagementInputDto.cs | 1 + .../Dto/ReadPromotionContentOutputDto.cs | 7 +- .../Room/Dto/Room/ReadRoomOutputDto.cs | 2 + .../Sellthing/Dto/ReadSellThingOutputDto.cs | 7 ++ .../Spend/Dto/Spend/CreateSpendInputDto.cs | 1 + .../Spend/Dto/Spend/ReadSpendInputDto.cs | 6 ++ .../Spend/Dto/Spend/ReadSpendOutputDto.cs | 14 ++++ .../Spend/Dto/Spend/UpdateSpendInputDto.cs | 1 + ...M.TSHotelManagement.Common.Contract.csproj | 1 + .../Dto/Employee/ReadEmployeeOutputDto.cs | 2 +- .../CreateEmployeeCheckInputDto.cs | 24 ++++++- .../ReadEmployeeCheckOutputDto.cs | 3 + .../NotControllerAttribute.cs | 13 ---- .../ReadSystemInformationOutputDto.cs | 6 +- .../Business/Customer/Customer.cs | 10 --- .../Business/Sellthing/SellThing.cs | 5 -- .../Business/Spend/Spend.cs | 13 ++-- .../Validator/UIDisplayAttribute.cs | 5 +- .../Business/Customer/CustomerController.cs | 4 +- .../Business/Room/RoomController.cs | 4 +- .../Business/Room/RoomTypeController.cs | 2 +- .../Business/Sellthing/SellthingController.cs | 6 +- .../Business/Spend/SpendController.cs | 17 ++++- .../Employee/Check/EmployeeCheckController.cs | 4 +- .../Employee/Photo/EmployeePhotoController.cs | 2 +- .../tshotel-backstage-dbscript-table.sql" | 7 +- 42 files changed, 312 insertions(+), 136 deletions(-) delete mode 100644 EOM.TSHotelManagement.Common.Contract/NotControllerAttribute.cs diff --git a/EOM.TSHotelManagement.Application/Business/Customer/CustomerService.cs b/EOM.TSHotelManagement.Application/Business/Customer/CustomerService.cs index 2ede389..6d34027 100644 --- a/EOM.TSHotelManagement.Application/Business/Customer/CustomerService.cs +++ b/EOM.TSHotelManagement.Application/Business/Customer/CustomerService.cs @@ -280,8 +280,15 @@ namespace EOM.TSHotelManagement.Application var count = 0; - custos = custoRepository.AsQueryable().Where(where.ToExpression()).OrderBy(a => a.CustomerNumber) - .ToPageList((int)readCustomerInputDto.Page, (int)readCustomerInputDto.PageSize, ref count); + if (!readCustomerInputDto.IgnorePaging && readCustomerInputDto.Page != 0 && readCustomerInputDto.PageSize != 0) + { + custos = custoRepository.AsQueryable().Where(where.ToExpression()).OrderBy(a => a.CustomerNumber) + .ToPageList((int)readCustomerInputDto.Page, (int)readCustomerInputDto.PageSize, ref count); + } + else + { + custos = custoRepository.AsQueryable().Where(where.ToExpression()).OrderBy(a => a.CustomerNumber).ToList(); + } var customerOutputDtos = EntityMapper.MapList(custos); diff --git a/EOM.TSHotelManagement.Application/Business/Reser/ReserService.cs b/EOM.TSHotelManagement.Application/Business/Reser/ReserService.cs index 389b344..b083496 100644 --- a/EOM.TSHotelManagement.Application/Business/Reser/ReserService.cs +++ b/EOM.TSHotelManagement.Application/Business/Reser/ReserService.cs @@ -79,7 +79,16 @@ namespace EOM.TSHotelManagement.Application var count = 0; - var listSource = reserRepository.AsQueryable().Where(where.ToExpression()).ToPageList(readReserInputDto.Page,readReserInputDto.PageSize,ref count); + var listSource = new List(); + + if (!readReserInputDto.IgnorePaging && readReserInputDto.Page != 0 && readReserInputDto.PageSize != 0) + { + listSource = reserRepository.AsQueryable().Where(where.ToExpression()).ToPageList(readReserInputDto.Page, readReserInputDto.PageSize, ref count); + } + else + { + listSource = reserRepository.AsQueryable().Where(where.ToExpression()).ToList(); + } listSource.ForEach(source => { diff --git a/EOM.TSHotelManagement.Application/Business/Room/IRoomService.cs b/EOM.TSHotelManagement.Application/Business/Room/IRoomService.cs index 5fbbd54..91d3040 100644 --- a/EOM.TSHotelManagement.Application/Business/Room/IRoomService.cs +++ b/EOM.TSHotelManagement.Application/Business/Room/IRoomService.cs @@ -70,7 +70,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - ReadRoomOutputDto SelectRoomByRoomNo(ReadRoomInputDto readRoomInputDto); + SingleOutputDto SelectRoomByRoomNo(ReadRoomInputDto readRoomInputDto); #endregion #region 根据房间编号退房(退房) @@ -88,7 +88,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - object DayByRoomNo(ReadRoomInputDto readRoomInputDto); + ReadRoomOutputDto DayByRoomNo(ReadRoomInputDto readRoomInputDto); #endregion #region 根据房间编号修改房间信息(入住) diff --git a/EOM.TSHotelManagement.Application/Business/Room/IRoomTypeService.cs b/EOM.TSHotelManagement.Application/Business/Room/IRoomTypeService.cs index b4b4765..173c0c7 100644 --- a/EOM.TSHotelManagement.Application/Business/Room/IRoomTypeService.cs +++ b/EOM.TSHotelManagement.Application/Business/Room/IRoomTypeService.cs @@ -42,7 +42,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - ReadRoomTypeOutputDto SelectRoomTypeByRoomNo(ReadRoomTypeInputDto readRoomTypeInputDto); + SingleOutputDto SelectRoomTypeByRoomNo(ReadRoomTypeInputDto readRoomTypeInputDto); /// /// 根据房间类型查询类型配置 diff --git a/EOM.TSHotelManagement.Application/Business/Room/RoomService.cs b/EOM.TSHotelManagement.Application/Business/Room/RoomService.cs index 3c1a3cf..c30738e 100644 --- a/EOM.TSHotelManagement.Application/Business/Room/RoomService.cs +++ b/EOM.TSHotelManagement.Application/Business/Room/RoomService.cs @@ -254,7 +254,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public ReadRoomOutputDto SelectRoomByRoomNo(ReadRoomInputDto readRoomInputDto) + public SingleOutputDto SelectRoomByRoomNo(ReadRoomInputDto readRoomInputDto) { List roomStates = new List(); var helper = new EnumHelper(); @@ -283,7 +283,7 @@ namespace EOM.TSHotelManagement.Application var Source = EntityMapper.Map(room); - return Source; + return new SingleOutputDto() { Source = Source }; } #endregion @@ -311,17 +311,16 @@ namespace EOM.TSHotelManagement.Application } return new BaseOutputDto(); } - #endregion - #region 根据房间编号查询截止到今天住了多少天 /// /// 根据房间编号查询截止到今天住了多少天 /// /// /// - public object DayByRoomNo(ReadRoomInputDto roomInputDto) + public ReadRoomOutputDto DayByRoomNo(ReadRoomInputDto roomInputDto) { - return Math.Abs(((TimeSpan)(roomRepository.GetSingle(a => a.RoomNumber == roomInputDto.RoomNumber).LastCheckInTime - DateTime.Now)).Days); + var days = Math.Abs(((TimeSpan)(roomRepository.GetSingle(a => a.RoomNumber == roomInputDto.RoomNumber).LastCheckInTime - DateTime.Now)).Days); + return new ReadRoomOutputDto { StayDays = days }; } #endregion @@ -363,7 +362,8 @@ namespace EOM.TSHotelManagement.Application roomRepository.Update(a => new Room() { RoomStateId = r.RoomStateId, - DataChgUsr = r.DataChgUsr + DataChgUsr = r.DataChgUsr, + DataInsDate = r.DataInsDate, }, a => a.RoomNumber == r.RoomNumber); } catch (Exception ex) @@ -381,7 +381,7 @@ namespace EOM.TSHotelManagement.Application /// public object SelectCanUseRoomAllByRoomState() { - return roomRepository.GetList(a => a.RoomStateId == 0 && a.IsDelete != 1).OrderBy(a => a.RoomNumber).Count(); + return roomRepository.GetList(a => a.RoomStateId == 1 && a.IsDelete != 1).OrderBy(a => a.RoomNumber).Count(); } #endregion @@ -392,7 +392,7 @@ namespace EOM.TSHotelManagement.Application /// public object SelectNotUseRoomAllByRoomState() { - return roomRepository.GetList(a => a.RoomStateId == 1 && a.IsDelete != 1).OrderBy(a => a.RoomNumber).Count(); + return roomRepository.GetList(a => a.RoomStateId == 2 && a.IsDelete != 1).OrderBy(a => a.RoomNumber).Count(); } #endregion @@ -414,7 +414,7 @@ namespace EOM.TSHotelManagement.Application /// public object SelectNotClearRoomAllByRoomState() { - return roomRepository.GetList(a => a.RoomStateId == 3 && a.IsDelete != 1).OrderBy(a => a.RoomNumber).Count(); + return roomRepository.GetList(a => a.RoomStateId == 4 && a.IsDelete != 1).OrderBy(a => a.RoomNumber).Count(); } #endregion @@ -425,7 +425,7 @@ namespace EOM.TSHotelManagement.Application /// public object SelectFixingRoomAllByRoomState() { - return roomRepository.GetList(a => a.RoomStateId == 2 && a.IsDelete != 1).OrderBy(a => a.RoomNumber).Count(); + return roomRepository.GetList(a => a.RoomStateId == 3 && a.IsDelete != 1).OrderBy(a => a.RoomNumber).Count(); } #endregion @@ -436,7 +436,7 @@ namespace EOM.TSHotelManagement.Application /// public object SelectReseredRoomAllByRoomState() { - return roomRepository.GetList(a => a.RoomStateId == 4 && a.IsDelete != 1).OrderBy(a => a.RoomNumber).Count(); + return roomRepository.GetList(a => a.RoomStateId == 5 && a.IsDelete != 1).OrderBy(a => a.RoomNumber).Count(); } #endregion diff --git a/EOM.TSHotelManagement.Application/Business/Room/RoomTypeService.cs b/EOM.TSHotelManagement.Application/Business/Room/RoomTypeService.cs index e9a0320..0482746 100644 --- a/EOM.TSHotelManagement.Application/Business/Room/RoomTypeService.cs +++ b/EOM.TSHotelManagement.Application/Business/Room/RoomTypeService.cs @@ -108,7 +108,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public ReadRoomTypeOutputDto SelectRoomTypeByRoomNo(ReadRoomTypeInputDto readRoomTypeInputDto) + public SingleOutputDto SelectRoomTypeByRoomNo(ReadRoomTypeInputDto readRoomTypeInputDto) { RoomType roomtype = new RoomType(); Room room = new Room(); @@ -117,7 +117,7 @@ namespace EOM.TSHotelManagement.Application var source = EntityMapper.Map(roomtype); - return source; + return new SingleOutputDto { Source = source}; } #endregion diff --git a/EOM.TSHotelManagement.Application/Business/Sellthing/ISellService.cs b/EOM.TSHotelManagement.Application/Business/Sellthing/ISellService.cs index a2904a1..d2820a8 100644 --- a/EOM.TSHotelManagement.Application/Business/Sellthing/ISellService.cs +++ b/EOM.TSHotelManagement.Application/Business/Sellthing/ISellService.cs @@ -61,7 +61,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - BaseOutputDto DeleteSellThing(DeleteSellThingInputDto deleteSellThingInputDto); + BaseOutputDto DeleteSellthing(DeleteSellThingInputDto deleteSellThingInputDto); /// /// 根据商品编号删除商品信息 @@ -75,7 +75,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - ReadSellThingOutputDto SelectSellThingByNameAndPrice(ReadSellThingInputDto readSellThingInputDto); + SingleOutputDto SelectSellThingByNameAndPrice(ReadSellThingInputDto readSellThingInputDto); /// diff --git a/EOM.TSHotelManagement.Application/Business/Sellthing/SellService.cs b/EOM.TSHotelManagement.Application/Business/Sellthing/SellService.cs index 4f65bf9..9fa9639 100644 --- a/EOM.TSHotelManagement.Application/Business/Sellthing/SellService.cs +++ b/EOM.TSHotelManagement.Application/Business/Sellthing/SellService.cs @@ -64,40 +64,50 @@ namespace EOM.TSHotelManagement.Application public ListOutputDto SelectSellThingAll(ReadSellThingInputDto sellThing) { List sellThings = new List(); - var exp = Expressionable.Create().And(a => a.IsDelete == 0 && a.Stock > 0); - if (sellThing.IsNullOrEmpty()) + var exp = Expressionable.Create(); + + exp = exp.And(a => a.Stock > 0 && a.IsDelete == sellThing.IsDelete); + + //商品编号 + if (!sellThing.ProductNumber.IsNullOrEmpty()) { - sellThings = sellThingRepository.GetList(exp.ToExpression()); - sellThings.ForEach(_sellThing => - { - _sellThing.ProductPriceFormatted = Decimal.Parse(_sellThing.ProductPrice.ToString()).ToString("#,##0.00").ToString(); - }); + exp = exp.And(a => a.ProductNumber.Contains(sellThing.ProductNumber)); + } + + //商品名称 + if (!sellThing.ProductName.IsNullOrEmpty()) + { + exp = exp.Or(a => a.ProductName.Contains(sellThing.ProductName)); + } + + //商品规格 + if (!sellThing.Specification.IsNullOrEmpty()) + { + exp = exp.And(a => a.Specification.Contains(sellThing.Specification)); + } + + var count = 0; + + if (!sellThing.IgnorePaging && sellThing.Page != 0 && sellThing.PageSize != 0) + { + sellThings = sellThingRepository.AsQueryable().Where(exp.ToExpression()).ToPageList(sellThing.Page, sellThing.PageSize, ref count); } else { - //商品编号 - if (!sellThing.ProductNumber.IsNullOrEmpty()) - { - exp = exp.And(a => a.ProductNumber.Contains(sellThing.ProductNumber)); - } - //商品名称 - if (!sellThing.ProductName.IsNullOrEmpty()) - { - exp = exp.Or(a => a.ProductName.Contains(sellThing.ProductName)); - } sellThings = sellThingRepository.GetList(exp.ToExpression()); - sellThings.ForEach(_sellThing => - { - _sellThing.ProductPriceFormatted = Decimal.Parse(_sellThing.ProductPrice.ToString()).ToString("#,##0.00").ToString(); - }); } + sellThings.ForEach(_sellThing => + { + _sellThing.ProductPriceFormatted = Decimal.Parse(_sellThing.ProductPrice.ToString()).ToString("#,##0.00").ToString(); + }); + var listSource = EntityMapper.MapList(sellThings); return new ListOutputDto { listSource = listSource, - total = sellThings.Count + total = count }; } @@ -192,19 +202,18 @@ namespace EOM.TSHotelManagement.Application } /// - /// 撤回客户消费信息 + /// 删除商品信息 /// /// /// - public BaseOutputDto DeleteSellThing(DeleteSellThingInputDto deleteSellThingInputDto) + public BaseOutputDto DeleteSellthing(DeleteSellThingInputDto deleteSellThingInputDto) { try { - spendRepository.Update(a => new Spend() + sellThingRepository.Update(a => new SellThing() { IsDelete = 1, - }, a => a.SettlementStatus.Equals(SpendConsts.UnSettle) && a.RoomNumber == deleteSellThingInputDto.RoomNumber && a.CustomerNumber == deleteSellThingInputDto.CustomerNumber - && a.ProductName == deleteSellThingInputDto.ProductName); + }, a => a.ProductNumber == deleteSellThingInputDto.ProductNumber); } catch (Exception ex) { @@ -239,14 +248,15 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public ReadSellThingOutputDto SelectSellThingByNameAndPrice(ReadSellThingInputDto readSellThingInputDto) + public SingleOutputDto SelectSellThingByNameAndPrice(ReadSellThingInputDto readSellThingInputDto) { SellThing sellThing = null; - sellThing = sellThingRepository.GetSingle(a => a.ProductNumber == readSellThingInputDto.ProductName && a.ProductPrice == Convert.ToDecimal(readSellThingInputDto.ProductPrice)); + sellThing = sellThingRepository.GetSingle(a => a.ProductNumber == readSellThingInputDto.ProductNumber || (a.ProductName == readSellThingInputDto.ProductName + && a.ProductPrice == Convert.ToDecimal(readSellThingInputDto.ProductPrice))); var source = EntityMapper.Map(sellThing); - return source; + return new SingleOutputDto() { Source = source }; } diff --git a/EOM.TSHotelManagement.Application/Business/Spend/ISpendService.cs b/EOM.TSHotelManagement.Application/Business/Spend/ISpendService.cs index ddeb7d7..d0faa26 100644 --- a/EOM.TSHotelManagement.Application/Business/Spend/ISpendService.cs +++ b/EOM.TSHotelManagement.Application/Business/Spend/ISpendService.cs @@ -89,7 +89,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - object SelectMoneyByRoomNoAndTime(ReadSpendInputDto readSpendInputDto); + SingleOutputDto SumConsumptionAmount(ReadSpendInputDto readSpendInputDto); #endregion #region 根据房间编号、入住时间和当前时间修改结算状态 @@ -110,6 +110,13 @@ namespace EOM.TSHotelManagement.Application BaseOutputDto UpdateSpendInfoByRoomNo(UpdateSpendInputDto updateSpendInputDto); #endregion + /// + /// 撤回客户消费信息 + /// + /// + /// + BaseOutputDto UndoCustomerSpend(UpdateSpendInputDto updateSpendInputDto); + /// /// 更新消费信息 /// diff --git a/EOM.TSHotelManagement.Application/Business/Spend/SpendService.cs b/EOM.TSHotelManagement.Application/Business/Spend/SpendService.cs index 788ce9d..2de96c5 100644 --- a/EOM.TSHotelManagement.Application/Business/Spend/SpendService.cs +++ b/EOM.TSHotelManagement.Application/Business/Spend/SpendService.cs @@ -41,13 +41,20 @@ namespace EOM.TSHotelManagement.Application /// private readonly GenericRepository spendRepository; + /// + /// 商品 + /// + private readonly GenericRepository sellThingRepository; + /// /// /// /// - public SpendService(GenericRepository spendRepository) + /// + public SpendService(GenericRepository spendRepository, GenericRepository sellThingRepository) { this.spendRepository = spendRepository; + this.sellThingRepository = sellThingRepository; } #region 添加消费信息 @@ -136,8 +143,19 @@ namespace EOM.TSHotelManagement.Application { List ls = new List(); ls = spendRepository.GetList(a => a.RoomNumber == readSpendInputDto.RoomNumber && a.SettlementStatus.Equals(SpendConsts.UnSettle) && a.IsDelete != 1); + var spendNames = ls.Select(a => a.ProductName).ToList(); + var spendInfos = sellThingRepository.AsQueryable().Where(a => spendNames.Contains(a.ProductName)).ToList(); ls.ForEach(source => { + if (source.ProductNumber.IsNullOrEmpty()) + { + var spendInfo = spendInfos.FirstOrDefault(a => a.ProductName.Equals(source.ProductName)); + if (spendInfo != null) + { + source.ProductNumber = spendInfo.ProductNumber; + } + } + source.SettlementStatusDescription = source.SettlementStatus.IsNullOrEmpty() ? "" : source.SettlementStatus.Equals(SpendConsts.Settled) ? "已结算" : "未结算"; @@ -208,8 +226,19 @@ namespace EOM.TSHotelManagement.Application { List ls = new List(); ls = spendRepository.GetList(a => a.RoomNumber == readSpendInputDto.RoomNumber && a.IsDelete != 1 && a.SettlementStatus.Equals(SpendConsts.UnSettle)); + var spendNames = ls.Select(a => a.ProductName).ToList(); + var spendInfos = sellThingRepository.AsQueryable().Where(a => spendNames.Contains(a.ProductName)).ToList(); ls.ForEach(source => { + if (source.ProductNumber.IsNullOrEmpty()) + { + var spendInfo = spendInfos.SingleOrDefault(a => a.ProductName.Equals(source.ProductName)); + if (spendInfo != null) + { + source.ProductNumber = spendInfo.ProductNumber; + } + } + source.SettlementStatusDescription = source.SettlementStatus.IsNullOrEmpty() ? "" : source.SettlementStatus.Equals(SpendConsts.Settled) ? "已结算" : "未结算"; @@ -232,9 +261,10 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public object SelectMoneyByRoomNoAndTime(ReadSpendInputDto readSpendInputDto) + public SingleOutputDto SumConsumptionAmount(ReadSpendInputDto readSpendInputDto) { - return spendRepository.GetList(a => a.RoomNumber == readSpendInputDto.RoomNumber && a.CustomerNumber == readSpendInputDto.CustomerNumber && a.SettlementStatus.Equals(SpendConsts.UnSettle)).Sum(a => a.ConsumptionAmount); + var totalAmount = spendRepository.GetList(a => a.RoomNumber == readSpendInputDto.RoomNumber && a.CustomerNumber == readSpendInputDto.CustomerNumber && a.SettlementStatus.Equals(SpendConsts.UnSettle)).Sum(a => a.ConsumptionAmount); + return new SingleOutputDto { Source = new ReadSpendInputDto { ConsumptionAmount = totalAmount } }; } #endregion @@ -290,6 +320,29 @@ namespace EOM.TSHotelManagement.Application } #endregion + /// + /// 撤回客户消费信息 + /// + /// + /// + public BaseOutputDto UndoCustomerSpend(UpdateSpendInputDto updateSpendInputDto) + { + try + { + spendRepository.Update(a => new Spend() + { + IsDelete = 1, + DataChgDate = updateSpendInputDto.DataChgDate, + DataChgUsr = updateSpendInputDto.DataChgUsr + }, a => a.SpendNumber.Equals(updateSpendInputDto.SpendNumber)); + } + catch (Exception ex) + { + return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + } + return new BaseOutputDto(); + } + /// /// 更新消费信息 /// diff --git a/EOM.TSHotelManagement.Application/Employee/Check/EmployeeCheckService.cs b/EOM.TSHotelManagement.Application/Employee/Check/EmployeeCheckService.cs index bd6c58e..00a02a6 100644 --- a/EOM.TSHotelManagement.Application/Employee/Check/EmployeeCheckService.cs +++ b/EOM.TSHotelManagement.Application/Employee/Check/EmployeeCheckService.cs @@ -104,9 +104,25 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public int SelectWorkerCheckDaySumByEmployeeId(ReadEmployeeCheckInputDto wkn) + public SingleOutputDto SelectWorkerCheckDaySumByEmployeeId(ReadEmployeeCheckInputDto wkn) { - return workerCheckRepository.GetList(a => a.EmployeeId == wkn.EmployeeId && a.IsDelete != 1).Count; + var checkDay = 0; + try + { + checkDay = workerCheckRepository.AsQueryable().Count(a => a.EmployeeId == wkn.EmployeeId && a.IsDelete != 1); + } + catch (Exception) + { + return new SingleOutputDto { StatusCode = StatusCodeConstants.InternalServerError, Message = LocalizationHelper.GetLocalizedString("Query employee sign-in days failed", "查询员工签到天数失败") }; + } + + return new SingleOutputDto + { + Source = new ReadEmployeeCheckOutputDto + { + CheckDay = checkDay + } + }; } @@ -115,12 +131,22 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public bool SelectToDayCheckInfoByWorkerNo(ReadEmployeeCheckInputDto wkn) + public SingleOutputDto SelectToDayCheckInfoByWorkerNo(ReadEmployeeCheckInputDto wkn) { - //string sql = "select Count(*) from WORKERCHECK where WorkerNo = '"+wkn+ "' and DATEDIFF(CURRENT_DATE(),workercheck.CheckTime)"; - var listCheckInfo = workerCheckRepository.GetList(a => a.EmployeeId == wkn.EmployeeId && a.IsDelete != 1); - var count = listCheckInfo.Where(a => a.CheckTime.ToShortDateString() == Convert.ToDateTime(DateTime.Now).ToShortDateString()).Count() > 0 ? true : false; - return count; + var isChecked = false; + try + { + var today = DateTime.Today; + isChecked = workerCheckRepository.AsQueryable() + .Any(a => a.EmployeeId == wkn.EmployeeId + && a.IsDelete != 1 + && a.CheckTime >= today && a.CheckTime < today.AddDays(1)); + } + catch (Exception ex) + { + return new SingleOutputDto { StatusCode = StatusCodeConstants.InternalServerError, Message = LocalizationHelper.GetLocalizedString($"Error:\n{ex.Message}", $"错误:\n{ex.Message}") }; + } + return new SingleOutputDto { Source = new ReadEmployeeCheckOutputDto { IsChecked = isChecked} }; } /// @@ -132,7 +158,7 @@ namespace EOM.TSHotelManagement.Application { try { - workerCheckRepository.Insert(EntityMapper.Map(workerCheck)); + workerCheckRepository.Insert(EntityMapper.Map(workerCheck)); } catch (Exception ex) { diff --git a/EOM.TSHotelManagement.Application/Employee/Check/IEmployeeCheckService.cs b/EOM.TSHotelManagement.Application/Employee/Check/IEmployeeCheckService.cs index 1de4083..f030099 100644 --- a/EOM.TSHotelManagement.Application/Employee/Check/IEmployeeCheckService.cs +++ b/EOM.TSHotelManagement.Application/Employee/Check/IEmployeeCheckService.cs @@ -43,14 +43,14 @@ namespace EOM.TSHotelManagement.Application /// /// /// - int SelectWorkerCheckDaySumByEmployeeId(ReadEmployeeCheckInputDto wkn); + SingleOutputDto SelectWorkerCheckDaySumByEmployeeId(ReadEmployeeCheckInputDto wkn); /// /// 查询今天员工是否已签到 /// /// /// - bool SelectToDayCheckInfoByWorkerNo(ReadEmployeeCheckInputDto wkn); + SingleOutputDto SelectToDayCheckInfoByWorkerNo(ReadEmployeeCheckInputDto wkn); /// /// 添加员工打卡数据 diff --git a/EOM.TSHotelManagement.Application/Employee/Photo/EmployeePhotoService.cs b/EOM.TSHotelManagement.Application/Employee/Photo/EmployeePhotoService.cs index be0ffd2..ef6e445 100644 --- a/EOM.TSHotelManagement.Application/Employee/Photo/EmployeePhotoService.cs +++ b/EOM.TSHotelManagement.Application/Employee/Photo/EmployeePhotoService.cs @@ -37,7 +37,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public ReadEmployeePhotoOutputDto EmployeePhoto(ReadEmployeePhotoInputDto readEmployeePhotoInputDto) + public SingleOutputDto EmployeePhoto(ReadEmployeePhotoInputDto readEmployeePhotoInputDto) { var workerPicSource = new EmployeePhoto(); @@ -45,10 +45,21 @@ namespace EOM.TSHotelManagement.Application if (workerPicSource.IsNullOrEmpty()) { - return new ReadEmployeePhotoOutputDto { PhotoId = 0, PhotoUrl = "", EmployeeId = readEmployeePhotoInputDto.EmployeeId }; + return new SingleOutputDto + { + Source = new ReadEmployeePhotoOutputDto + { + PhotoId = 0, + PhotoUrl = "", + EmployeeId = readEmployeePhotoInputDto.EmployeeId + } + }; } - return EntityMapper.Map(workerPicSource); + return new SingleOutputDto + { + Source = EntityMapper.Map(workerPicSource) + }; } /// /// 添加员工照片 diff --git a/EOM.TSHotelManagement.Application/Employee/Photo/IEmployeePhotoService.cs b/EOM.TSHotelManagement.Application/Employee/Photo/IEmployeePhotoService.cs index bff614b..34704ca 100644 --- a/EOM.TSHotelManagement.Application/Employee/Photo/IEmployeePhotoService.cs +++ b/EOM.TSHotelManagement.Application/Employee/Photo/IEmployeePhotoService.cs @@ -12,7 +12,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - ReadEmployeePhotoOutputDto EmployeePhoto(ReadEmployeePhotoInputDto readEmployeePhotoInputDto); + SingleOutputDto EmployeePhoto(ReadEmployeePhotoInputDto readEmployeePhotoInputDto); /// /// 添加员工照片 /// diff --git a/EOM.TSHotelManagement.Common.Contract/BaseDto/BaseInputDto.cs b/EOM.TSHotelManagement.Common.Contract/BaseDto/BaseInputDto.cs index b57374d..ff04582 100644 --- a/EOM.TSHotelManagement.Common.Contract/BaseDto/BaseInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/BaseDto/BaseInputDto.cs @@ -12,7 +12,7 @@ namespace EOM.TSHotelManagement.Common.Contract /// /// 删除标识 /// - public int? IsDelete { get; set; } + public int? IsDelete { get; set; } = 0; /// /// 资料创建人 /// diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs index 912fdcb..a937094 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerOutputDto.cs @@ -1,20 +1,34 @@ +using EOM.TSHotelManagement.Common.Util; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadCustomerOutputDto { + [UIDisplay("ͻ")] public string CustomerNumber { get; set; } + [UIDisplay("ͻ")] public string CustomerName { get; set; } + [UIDisplay("Ա", true, false)] public int? CustomerGender { get; set; } + [UIDisplay("֤", true, false)] public int PassportId { get; set; } + [UIDisplay("Ա", false, true)] public string GenderName { get; set; } + [UIDisplay("ϵʽ")] public string CustomerPhoneNumber { get; set; } + [UIDisplay("")] public DateTime DateOfBirth { get; set; } + [UIDisplay("ͻ", true, false)] + public int CustomerType { get; set; } + [UIDisplay("ͻ", false, true)] public string CustomerTypeName { get; set; } + [UIDisplay("֤", false, true)] public string PassportName { get; set; } + [UIDisplay("֤")] public string IdCardNumber { get; set; } + [UIDisplay("ͻַ")] public string CustomerAddress { get; set; } - public int CustomerType { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/CreateEnergyManagementInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/CreateEnergyManagementInputDto.cs index a50257e..5ead7fd 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/CreateEnergyManagementInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/EnergyManagement/Dto/CreateEnergyManagementInputDto.cs @@ -2,6 +2,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public class CreateEnergyManagementInputDto : BaseInputDto { + public string InformationNumber { get; set; } public string RoomNumber { get; set; } public string CustomerNumber { get; set; } public DateTime StartDate { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentOutputDto.cs index 65c20bd..9c67d71 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/PromotionContent/Dto/ReadPromotionContentOutputDto.cs @@ -2,11 +2,8 @@ namespace EOM.TSHotelManagement.Common.Contract { public class ReadPromotionContentOutputDto { - public int PromotionId { get; set; } - public string PromotionTitle { get; set; } - public string PromotionContent { get; set; } - public DateTime StartDate { get; set; } - public DateTime EndDate { get; set; } + public int PromotionContentId { get; set; } + public string PromotionContentMessage { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomOutputDto.cs index 7fba48c..eb8f05b 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomOutputDto.cs @@ -14,6 +14,8 @@ namespace EOM.TSHotelManagement.Common.Contract public decimal RoomRent { get; set; } public decimal RoomDeposit { get; set; } public string RoomLocation { get; set; } + + public int StayDays { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingOutputDto.cs index fec36c7..75219d1 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Sellthing/Dto/ReadSellThingOutputDto.cs @@ -1,11 +1,18 @@ +using EOM.TSHotelManagement.Common.Util; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadSellThingOutputDto { + [UIDisplay("Ʒ")] public string ProductNumber { get; set; } + [UIDisplay("Ʒ")] public string ProductName { get; set; } + [UIDisplay("Ʒ۸")] public decimal ProductPrice { get; set; } + [UIDisplay("ͺ")] public string Specification { get; set; } + [UIDisplay("")] public decimal Stock { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/CreateSpendInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/CreateSpendInputDto.cs index 0476a0e..66a6913 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/CreateSpendInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/CreateSpendInputDto.cs @@ -2,6 +2,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public class CreateSpendInputDto: BaseInputDto { + public string SpendNumber { get; set; } public string RoomNumber { get; set; } public string CustomerNumber { get; set; } public string ProductName { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendInputDto.cs index 08906a9..cf392ea 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendInputDto.cs @@ -2,8 +2,14 @@ namespace EOM.TSHotelManagement.Common.Contract { public class ReadSpendInputDto:ListInputDto { + public string SpendNumber { get; set; } public string RoomNumber { get; set; } public string CustomerNumber { get; set; } + public string ProductName { get; set; } + public int ConsumptionQuantity { get; set; } + public decimal ProductPrice { get; set; } + public decimal ConsumptionAmount { get; set; } + public string SettlementStatus { get; set; } public DateTime ConsumptionTime { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendOutputDto.cs index 67d7668..59f64f9 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/ReadSpendOutputDto.cs @@ -1,17 +1,31 @@ +using EOM.TSHotelManagement.Common.Util; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadSpendOutputDto { + [UIDisplay("ѱ", false, false)] + public string SpendNumber { get; set; } + [UIDisplay("")] public string RoomNumber { get; set; } + [UIDisplay("ͻ")] public string CustomerNumber { get; set; } + [UIDisplay("Ʒ",false,false)] + public string ProductNumber { get; set; } + [UIDisplay("Ʒ")] public string ProductName { get; set; } + [UIDisplay("", true)] public int ConsumptionQuantity { get; set; } + [UIDisplay("Ʒ")] public decimal ProductPrice { get; set; } public string ProductPriceFormatted { get; set; } + [UIDisplay("ѽ")] public decimal ConsumptionAmount { get; set; } public string ConsumptionAmountFormatted { get; set; } + [UIDisplay("ʱ")] public DateTime ConsumptionTime { get; set; } public string SettlementStatus { get; set; } + [UIDisplay("״̬")] public string SettlementStatusDescription { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/UpdateSpendInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/UpdateSpendInputDto.cs index 22b6972..a43b9ab 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/UpdateSpendInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Spend/Dto/Spend/UpdateSpendInputDto.cs @@ -2,6 +2,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public class UpdateSpendInputDto: BaseInputDto { + public string SpendNumber { get; set; } public string RoomNumber { get; set; } public string CustomerNumber { get; set; } public string ProductName { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/EOM.TSHotelManagement.Common.Contract.csproj b/EOM.TSHotelManagement.Common.Contract/EOM.TSHotelManagement.Common.Contract.csproj index 11c470e..25be565 100644 --- a/EOM.TSHotelManagement.Common.Contract/EOM.TSHotelManagement.Common.Contract.csproj +++ b/EOM.TSHotelManagement.Common.Contract/EOM.TSHotelManagement.Common.Contract.csproj @@ -4,6 +4,7 @@ net8.0 enable enable + True diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs index d7e873f..fcf1062 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/Employee/ReadEmployeeOutputDto.cs @@ -1,7 +1,7 @@  namespace EOM.TSHotelManagement.Common.Contract { - public class ReadEmployeeOutputDto + public class ReadEmployeeOutputDto:BaseDto { public string EmployeeId { get; set; } public string EmployeeName { get; set; } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/CreateEmployeeCheckInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/CreateEmployeeCheckInputDto.cs index 2e1b963..edb42b0 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/CreateEmployeeCheckInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/CreateEmployeeCheckInputDto.cs @@ -2,9 +2,29 @@ namespace EOM.TSHotelManagement.Common.Contract { public class CreateEmployeeCheckInputDto: BaseInputDto { + /// + /// 򿨱 (Check-in/Check-out Number) + /// + public string CheckNumber { get; set; } + /// + /// Ա (Employee ID) + /// public string EmployeeId { get; set; } - public DateTime CheckDate { get; set; } - public string CheckStatus { get; set; } + + /// + /// ʱ (Check-in/Check-out Time) + /// + public DateTime CheckTime { get; set; } + + /// + /// 򿨷ʽ (Check-in/Check-out Method) + /// + public string CheckMethod { get; set; } + + /// + /// ״̬ (Check-in/Check-out Status) + /// + public int CheckStatus { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckOutputDto.cs index 4a2d5d0..5230b06 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeeCheck/ReadEmployeeCheckOutputDto.cs @@ -7,6 +7,9 @@ namespace EOM.TSHotelManagement.Common.Contract public DateTime CheckTime { get; set; } public string CheckStatus { get; set; } public string CheckMethod { get; set; } + + public bool IsChecked { get; set; } + public int CheckDay { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/NotControllerAttribute.cs b/EOM.TSHotelManagement.Common.Contract/NotControllerAttribute.cs deleted file mode 100644 index 7216a2f..0000000 --- a/EOM.TSHotelManagement.Common.Contract/NotControllerAttribute.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace EOM.TSHotelManagement.Common.Contract -{ - [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = false)] - public class NotControllerAttribute : Attribute - { - } -} diff --git a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationOutputDto.cs index 6a9c96d..3e671df 100644 --- a/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/SystemManagement/Dto/SystemInformation/ReadSystemInformationOutputDto.cs @@ -2,10 +2,8 @@ namespace EOM.TSHotelManagement.Common.Contract { public class ReadSystemInformationOutputDto { - public int InformationId { get; set; } - public string InformationTitle { get; set; } - public string InformationContent { get; set; } - public DateTime InformationDate { get; set; } + public int UrlNumber { get; set; } + public string UrlAddress { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/Business/Customer/Customer.cs b/EOM.TSHotelManagement.Common.Core/Business/Customer/Customer.cs index db6a828..33ff9cb 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Customer/Customer.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Customer/Customer.cs @@ -22,7 +22,6 @@ * *模块说明:客户信息类 */ -using EOM.TSHotelManagement.Common.Util; using System; namespace EOM.TSHotelManagement.Common.Core @@ -36,14 +35,12 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 客户编号 (Customer Number) /// - [UIDisplay("客户编号")] [SqlSugar.SugarColumn(ColumnName = "custo_no", IsPrimaryKey = true)] public string CustomerNumber { get; set; } /// /// 客户名称 (Customer Name) /// - [UIDisplay("客户名称")] [SqlSugar.SugarColumn(ColumnName = "custo_name", IsNullable = false)] public string CustomerName { get; set; } @@ -62,49 +59,42 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 性别 (Gender) /// - [UIDisplay("性别")] [SqlSugar.SugarColumn(IsIgnore = true)] public string GenderName { get; set; } /// /// 客户电话 (Customer Phone Number) /// - [UIDisplay("联系方式")] [SqlSugar.SugarColumn(ColumnName = "custo_tel", IsNullable = false)] public string CustomerPhoneNumber { get; set; } /// /// 出生日期 (Date of Birth) /// - [UIDisplay("出生日期")] [SqlSugar.SugarColumn(ColumnName = "custo_birth", IsNullable = true)] public DateTime DateOfBirth { get; set; } /// /// 客户类型名称 (Customer Type Name) /// - [UIDisplay("客户类型")] [SqlSugar.SugarColumn(IsIgnore = true)] public string CustomerTypeName { get; set; } /// /// 证件类型名称 (Passport Type Name) /// - [UIDisplay("证件类型")] [SqlSugar.SugarColumn(IsIgnore = true)] public string PassportName { get; set; } /// /// 证件号码 (Passport ID) /// - [UIDisplay("证件号码")] [SqlSugar.SugarColumn(ColumnName = "passport_id", IsNullable = false)] public string IdCardNumber { get; set; } /// /// 居住地址 (Customer Address) /// - [UIDisplay("客户地址")] [SqlSugar.SugarColumn(ColumnName = "custo_address", IsNullable = true)] public string CustomerAddress { get; set; } diff --git a/EOM.TSHotelManagement.Common.Core/Business/Sellthing/SellThing.cs b/EOM.TSHotelManagement.Common.Core/Business/Sellthing/SellThing.cs index ab46569..d3718a9 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Sellthing/SellThing.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Sellthing/SellThing.cs @@ -38,21 +38,18 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 商品编号 (Product Number) /// - [UIDisplay("商品编号")] [SugarColumn(ColumnName = "sell_no", IsPrimaryKey = true)] public string ProductNumber { get; set; } /// /// 商品名称 (Product Name) /// - [UIDisplay("商品名称")] [SugarColumn(ColumnName = "sell_name")] public string ProductName { get; set; } /// /// 商品价格 (Product Price) /// - [UIDisplay("商品价格")] [SugarColumn(ColumnName = "sell_price")] public decimal ProductPrice { get; set; } @@ -65,14 +62,12 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 规格型号 (Specification) /// - [UIDisplay("规格型号")] [SugarColumn(ColumnName = "specification")] public string Specification { get; set; } /// /// 库存 (Stock) /// - [UIDisplay("库存")] [SugarColumn(ColumnName = "stock")] public decimal Stock { get; set; } } diff --git a/EOM.TSHotelManagement.Common.Core/Business/Spend/Spend.cs b/EOM.TSHotelManagement.Common.Core/Business/Spend/Spend.cs index 43c65d7..13bdb35 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Spend/Spend.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Spend/Spend.cs @@ -42,35 +42,36 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 房间编号 (Room Number) /// - [UIDisplay("房间号")] [SugarColumn(ColumnName = "room_no")] public string RoomNumber { get; set; } /// /// 客户编号 (Customer Number) /// - [UIDisplay("客户编号")] [SugarColumn(ColumnName = "custo_no")] public string CustomerNumber { get; set; } + /// + /// 商品编号 (Product Number) + /// + [SugarColumn(ColumnName = "product_number")] + public string ProductNumber { get; set; } + /// /// 商品名称 (Product Name) /// - [UIDisplay("商品名称")] [SugarColumn(ColumnName = "spend_name")] public string ProductName { get; set; } /// /// 消费数量 (Consumption Quantity) /// - [UIDisplay("消费数量", true)] [SugarColumn(ColumnName = "apend_quantity")] public int ConsumptionQuantity { get; set; } /// /// 商品单价 (Product Price) /// - [UIDisplay("商品单价")] [SugarColumn(ColumnName = "spend_price")] public decimal ProductPrice { get; set; } @@ -83,7 +84,6 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 消费金额 (Consumption Amount) /// - [UIDisplay("消费金额")] [SugarColumn(ColumnName = "spend_amount")] public decimal ConsumptionAmount { get; set; } @@ -96,7 +96,6 @@ namespace EOM.TSHotelManagement.Common.Core /// /// 消费时间 (Consumption Time) /// - [UIDisplay("消费时间")] [SugarColumn(ColumnName = "spend_time")] public DateTime ConsumptionTime { get; set; } diff --git a/EOM.TSHotelManagement.Common.Util/Validator/UIDisplayAttribute.cs b/EOM.TSHotelManagement.Common.Util/Validator/UIDisplayAttribute.cs index e16b97e..093a648 100644 --- a/EOM.TSHotelManagement.Common.Util/Validator/UIDisplayAttribute.cs +++ b/EOM.TSHotelManagement.Common.Util/Validator/UIDisplayAttribute.cs @@ -9,10 +9,13 @@ namespace EOM.TSHotelManagement.Common.Util public bool IsNumber { get; set; } = false; - public UIDisplayAttribute(string displayName,bool isNumber = false) + public bool IsVisible { get; set; } = true; + + public UIDisplayAttribute(string displayName,bool isNumber = false,bool isVisible = true) { DisplayName = displayName; IsNumber = isNumber; + IsVisible = isVisible; } } } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Customer/CustomerController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Business/Customer/CustomerController.cs index 3433a22..e89d6ee 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Customer/CustomerController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Business/Customer/CustomerController.cs @@ -103,8 +103,8 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// 查询指定客户信息 /// /// - [HttpPost] - public SingleOutputDto SelectCustoByInfo([FromBody] ReadCustomerInputDto custo) + [HttpGet] + public SingleOutputDto SelectCustoByInfo([FromQuery] ReadCustomerInputDto custo) { return customerService.SelectCustoByInfo(custo); } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomController.cs index 94ab322..6e760c7 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomController.cs @@ -66,7 +66,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public ReadRoomOutputDto SelectRoomByRoomNo([FromQuery] ReadRoomInputDto inputDto) + public SingleOutputDto SelectRoomByRoomNo([FromQuery] ReadRoomInputDto inputDto) { return roomService.SelectRoomByRoomNo(inputDto); } @@ -88,7 +88,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public object DayByRoomNo([FromQuery] ReadRoomInputDto inputDto) + public ReadRoomOutputDto DayByRoomNo([FromQuery] ReadRoomInputDto inputDto) { return roomService.DayByRoomNo(inputDto); } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomTypeController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomTypeController.cs index 9d1f9ad..bbb3283 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomTypeController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomTypeController.cs @@ -35,7 +35,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public ReadRoomTypeOutputDto SelectRoomTypeByRoomNo([FromQuery] ReadRoomTypeInputDto inputDto) + public SingleOutputDto SelectRoomTypeByRoomNo([FromQuery] ReadRoomTypeInputDto inputDto) { return roomTypeService.SelectRoomTypeByRoomNo(inputDto); } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Sellthing/SellthingController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Business/Sellthing/SellthingController.cs index ee24233..f5652b0 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Sellthing/SellthingController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Business/Sellthing/SellthingController.cs @@ -68,9 +68,9 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpPost] - public BaseOutputDto DeleteSellThing([FromQuery] DeleteSellThingInputDto deleteSellThingInputDto) + public BaseOutputDto DeleteSellthing([FromQuery] DeleteSellThingInputDto deleteSellThingInputDto) { - return sellService.DeleteSellThing(deleteSellThingInputDto); + return sellService.DeleteSellthing(deleteSellThingInputDto); } /// @@ -90,7 +90,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public ReadSellThingOutputDto SelectSellThingByNameAndPrice([FromQuery] ReadSellThingInputDto readSellThingInputDto) + public SingleOutputDto SelectSellThingByNameAndPrice([FromQuery] ReadSellThingInputDto readSellThingInputDto) { return sellService.SelectSellThingByNameAndPrice(readSellThingInputDto); } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Spend/SpendController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Business/Spend/SpendController.cs index b3197e0..f7c4ced 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Spend/SpendController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Business/Spend/SpendController.cs @@ -4,6 +4,8 @@ using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Mvc; using System.Collections.Generic; using System; +using EOM.TSHotelManagement.Common.Util; +using Microsoft.AspNetCore.Components.Forms; namespace EOM.TSHotelManagement.WebApi.Controllers { @@ -90,9 +92,9 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public object SelectMoneyByRoomNoAndTime([FromQuery] ReadSpendInputDto inputDto) + public SingleOutputDto SumConsumptionAmount([FromQuery] ReadSpendInputDto inputDto) { - return spendService.SelectMoneyByRoomNoAndTime(inputDto); + return spendService.SumConsumptionAmount(inputDto); } /// @@ -117,6 +119,17 @@ namespace EOM.TSHotelManagement.WebApi.Controllers return spendService.UpdateSpendInfoByRoomNo(inputDto); } + /// + /// 撤回客户消费信息 + /// + /// + /// + [HttpPost] + public BaseOutputDto UndoCustomerSpend([FromBody] UpdateSpendInputDto updateSpendInputDto) + { + return spendService.UndoCustomerSpend(updateSpendInputDto); + } + /// /// 更新消费信息 /// diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Employee/Check/EmployeeCheckController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Employee/Check/EmployeeCheckController.cs index 02e040c..97c491d 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Employee/Check/EmployeeCheckController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Employee/Check/EmployeeCheckController.cs @@ -35,7 +35,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public int SelectWorkerCheckDaySumByEmployeeId([FromQuery] ReadEmployeeCheckInputDto inputDto) + public SingleOutputDto SelectWorkerCheckDaySumByEmployeeId([FromQuery] ReadEmployeeCheckInputDto inputDto) { return workerCheckService.SelectWorkerCheckDaySumByEmployeeId(inputDto); } @@ -46,7 +46,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public bool SelectToDayCheckInfoByWorkerNo([FromQuery] ReadEmployeeCheckInputDto inputDto) + public SingleOutputDto SelectToDayCheckInfoByWorkerNo([FromQuery] ReadEmployeeCheckInputDto inputDto) { return workerCheckService.SelectToDayCheckInfoByWorkerNo(inputDto); } diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Employee/Photo/EmployeePhotoController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Employee/Photo/EmployeePhotoController.cs index cdda40f..5e139b5 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Employee/Photo/EmployeePhotoController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Employee/Photo/EmployeePhotoController.cs @@ -23,7 +23,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public ReadEmployeePhotoOutputDto EmployeePhoto([FromQuery] ReadEmployeePhotoInputDto inputDto) + public SingleOutputDto EmployeePhoto([FromQuery] ReadEmployeePhotoInputDto inputDto) { return workerPicService.EmployeePhoto(inputDto); } diff --git "a/\346\225\260\346\215\256\345\272\223\350\204\232\346\234\254/latest_MariaDB\347\211\210\346\234\254/tshotel-backstage-dbscript-table.sql" "b/\346\225\260\346\215\256\345\272\223\350\204\232\346\234\254/latest_MariaDB\347\211\210\346\234\254/tshotel-backstage-dbscript-table.sql" index 5d069ad..27bea75 100644 --- "a/\346\225\260\346\215\256\345\272\223\350\204\232\346\234\254/latest_MariaDB\347\211\210\346\234\254/tshotel-backstage-dbscript-table.sql" +++ "b/\346\225\260\346\215\256\345\272\223\350\204\232\346\234\254/latest_MariaDB\347\211\210\346\234\254/tshotel-backstage-dbscript-table.sql" @@ -11,7 +11,7 @@ Target Server Version : 101110 (10.11.10-MariaDB) File Encoding : 65001 - Date: 11/04/2025 22:45:27 + Date: 12/04/2025 15:37:18 */ SET NAMES utf8mb4; @@ -377,13 +377,14 @@ CREATE TABLE `menu` ( `title` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '菜单标题', `path` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '菜单路径', `parent` int(11) NULL DEFAULT NULL COMMENT '父级ID', + `icon` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '图标', `delete_mk` int(11) NOT NULL COMMENT '删除标记', `datains_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料创建人', `datains_date` datetime NULL DEFAULT NULL COMMENT '资料创建时间', `datachg_usr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '资料更新人', `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', PRIMARY KEY (`id`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 35 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '菜单表' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 43 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '菜单表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for nation @@ -446,7 +447,7 @@ CREATE TABLE `operation_log` ( `datachg_usr` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, `datachg_date` datetime NULL DEFAULT NULL COMMENT '资料更新时间', PRIMARY KEY (`id`, `operation_number`) USING BTREE -) ENGINE = InnoDB AUTO_INCREMENT = 2220 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统操作日志表' ROW_FORMAT = Dynamic; +) ENGINE = InnoDB AUTO_INCREMENT = 3108 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '系统操作日志表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for passport_type -- Gitee From d3fbd517a389798ab597e3cdecb85e52d76442fa Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Sat, 19 Apr 2025 17:39:44 +0800 Subject: [PATCH 21/24] support upload picture to your's Lsky image hosting. house keeping. --- .../Business/Customer/CustomerService.cs | 48 +++--- .../Business/Room/IRoomService.cs | 12 +- .../Business/Room/RoomService.cs | 153 ++++++++++------- .../Business/Room/RoomTypeService.cs | 1 - .../EOM.TSHotelManagement.Application.csproj | 2 +- .../Employee/EmployeeService.cs | 53 ++++-- .../Employee/Photo/EmployeePhotoService.cs | 91 ++++++++-- .../Employee/Photo/IEmployeePhotoService.cs | 5 +- .../SystemManagement/Base/BaseService.cs | 158 ++++++------------ .../SystemManagement/Base/IBaseService.cs | 33 +--- .../Dto/Customer/ReadCustomerInputDto.cs | 1 - .../Business/Reser/Dto/ReadReserOutputDto.cs | 9 + .../Room/Dto/Room/ReadRoomOutputDto.cs | 5 + .../ReadEmployeePhotoOutputDto.cs | 2 +- .../Business/Customer/GenderType.cs | 19 +-- .../Helper/LskyHelper.cs | 124 ++++++++++++++ EOM.TSHotelManagement.Shared/EnumHelper.cs | 7 + .../Interfaces/ILskyConfigFactory.cs | 13 ++ .../Interfaces/LskyConfig.cs | 17 ++ .../Business/Room/RoomController.cs | 14 +- .../Employee/Photo/EmployeePhotoController.cs | 6 +- .../SystemManagement/Base/BaseController.cs | 34 +--- .../Factory/LskyConfigFactory.cs | 28 ++++ EOM.TSHotelManagement.WebApi/Startup.cs | 2 + EOM.TSHotelManagement.WebApi/appsettings.json | 10 +- 25 files changed, 539 insertions(+), 308 deletions(-) create mode 100644 EOM.TSHotelManagement.Common.Util/Helper/LskyHelper.cs create mode 100644 EOM.TSHotelManagement.Shared/Interfaces/ILskyConfigFactory.cs create mode 100644 EOM.TSHotelManagement.Shared/Interfaces/LskyConfig.cs create mode 100644 EOM.TSHotelManagement.WebApi/Factory/LskyConfigFactory.cs diff --git a/EOM.TSHotelManagement.Application/Business/Customer/CustomerService.cs b/EOM.TSHotelManagement.Application/Business/Customer/CustomerService.cs index 6d34027..ec12ff0 100644 --- a/EOM.TSHotelManagement.Application/Business/Customer/CustomerService.cs +++ b/EOM.TSHotelManagement.Application/Business/Customer/CustomerService.cs @@ -30,7 +30,6 @@ using System.ComponentModel; using EOM.TSHotelManagement.Common; using Microsoft.AspNetCore.DataProtection; using jvncorelib.EncryptorLib; -using NPOI.SS.Formula.Functions; using EOM.TSHotelManagement.Common.Contract; using EOM.TSHotelManagement.Common.Util; using System.Linq; @@ -52,11 +51,6 @@ namespace EOM.TSHotelManagement.Application /// private readonly GenericRepository spendRepository; - /// - /// 性别类型 - /// - private readonly GenericRepository sexTypeRepository; - /// /// 证件类型 /// @@ -77,16 +71,14 @@ namespace EOM.TSHotelManagement.Application /// /// /// - /// /// /// /// /// - public CustomerService(GenericRepository custoRepository, GenericRepository spendRepository, GenericRepository sexTypeRepository, GenericRepository passPortTypeRepository, GenericRepository custoTypeRepository, IDataProtectionProvider dataProtectionProvider) + public CustomerService(GenericRepository custoRepository, GenericRepository spendRepository, GenericRepository passPortTypeRepository, GenericRepository custoTypeRepository, IDataProtectionProvider dataProtectionProvider) { this.custoRepository = custoRepository; this.spendRepository = spendRepository; - this.sexTypeRepository = sexTypeRepository; this.passPortTypeRepository = passPortTypeRepository; this.custoTypeRepository = custoTypeRepository; this.dataProtector = dataProtectionProvider.CreateProtector("CustomerInfoProtector"); @@ -153,7 +145,7 @@ namespace EOM.TSHotelManagement.Application /// public BaseOutputDto DelCustomerInfo(DeleteCustomerInputDto custo) { - var occupied = Convert.ToInt32(RoomStateConstant.Occupied.Code); + var occupied = Convert.ToInt32(RoomState.Occupied); var isOccupied = custoRepository.Change().IsAny(a => a.CustomerNumber == custo.CustomerNumber && a.RoomStateId == occupied); var haveUnSettle = custoRepository.Change().IsAny(a => a.CustomerNumber == custo.CustomerNumber && a.SettlementStatus == SpendConsts.UnSettle); if (isOccupied) @@ -242,8 +234,16 @@ namespace EOM.TSHotelManagement.Application ListOutputDto oSelectCustoAllDto = new ListOutputDto(); //查询出所有性别类型 - List sexTypes = new List(); - sexTypes = sexTypeRepository.GetList(); + var helper = new EnumHelper(); + var genders = Enum.GetValues(typeof(GenderType)) + .Cast() + .Select(e => new EnumDto + { + Id = (int)e, + Name = e.ToString(), + Description = helper.GetEnumDescription(e) + }) + .ToList(); //查询出所有证件类型 List passPortTypes = new List(); passPortTypes = passPortTypeRepository.GetList(); @@ -273,10 +273,6 @@ namespace EOM.TSHotelManagement.Application { where = where.And(a => a.IdCardNumber.Contains(readCustomerInputDto.IdCardNumber)); } - if (readCustomerInputDto.OnlyVip) - { - where = where.And(a => a.CustomerType != 0); - } var count = 0; @@ -310,8 +306,8 @@ namespace EOM.TSHotelManagement.Application } //性别类型 - var sexType = sexTypes.FirstOrDefault(a => a.GenderId == source.CustomerGender); - source.GenderName = sexType?.GenderName ?? ""; + var sexType = genders.FirstOrDefault(a => a.Id == source.CustomerGender); + source.GenderName = sexType?.Description ?? ""; //证件类型 var passPortType = passPortTypes.FirstOrDefault(a => a.PassportId == source.PassportId); @@ -421,8 +417,16 @@ namespace EOM.TSHotelManagement.Application public SingleOutputDto SelectCustoByInfo(ReadCustomerInputDto custo) { //查询出所有性别类型 - List sexTypes = new List(); - sexTypes = sexTypeRepository.GetList(); + var helper = new EnumHelper(); + var genders = Enum.GetValues(typeof(GenderType)) + .Cast() + .Select(e => new EnumDto + { + Id = (int)e, + Name = e.ToString(), + Description = helper.GetEnumDescription(e) + }) + .ToList(); //查询出所有证件类型 List passPortTypes = new List(); passPortTypes = passPortTypeRepository.GetList(); @@ -460,8 +464,8 @@ namespace EOM.TSHotelManagement.Application customer.CustomerPhoneNumber = customer.CustomerPhoneNumber; } //性别类型 - var sexType = sexTypes.FirstOrDefault(a => a.GenderId == customer.CustomerGender); - customer.GenderName = sexType.GenderName.IsNullOrEmpty() ? "" : sexType.GenderName; + var sexType = genders.FirstOrDefault(a => a.Id == customer.CustomerGender); + customer.GenderName = sexType.Description.IsNullOrEmpty() ? "" : sexType.Description; //证件类型 var passPortType = passPortTypes.FirstOrDefault(a => a.PassportId == customer.PassportId); customer.PassportName = passPortType.PassportName.IsNullOrEmpty() ? "" : passPortType.PassportName; diff --git a/EOM.TSHotelManagement.Application/Business/Room/IRoomService.cs b/EOM.TSHotelManagement.Application/Business/Room/IRoomService.cs index 91d3040..a0a4c20 100644 --- a/EOM.TSHotelManagement.Application/Business/Room/IRoomService.cs +++ b/EOM.TSHotelManagement.Application/Business/Room/IRoomService.cs @@ -88,7 +88,7 @@ namespace EOM.TSHotelManagement.Application /// /// /// - ReadRoomOutputDto DayByRoomNo(ReadRoomInputDto readRoomInputDto); + SingleOutputDto DayByRoomNo(ReadRoomInputDto readRoomInputDto); #endregion #region 根据房间编号修改房间信息(入住) @@ -114,7 +114,7 @@ namespace EOM.TSHotelManagement.Application /// 查询可入住房间数量 /// /// - object SelectCanUseRoomAllByRoomState(); + SingleOutputDto SelectCanUseRoomAllByRoomState(); #endregion #region 查询已入住房间数量 @@ -122,7 +122,7 @@ namespace EOM.TSHotelManagement.Application /// 查询已入住房间数量 /// /// - object SelectNotUseRoomAllByRoomState(); + SingleOutputDto SelectNotUseRoomAllByRoomState(); #endregion #region 根据房间编号查询房间价格 @@ -138,7 +138,7 @@ namespace EOM.TSHotelManagement.Application /// 查询脏房数量 /// /// - object SelectNotClearRoomAllByRoomState(); + SingleOutputDto SelectNotClearRoomAllByRoomState(); #endregion #region 查询维修房数量 @@ -146,7 +146,7 @@ namespace EOM.TSHotelManagement.Application /// 查询维修房数量 /// /// - object SelectFixingRoomAllByRoomState(); + SingleOutputDto SelectFixingRoomAllByRoomState(); #endregion #region 查询预约房数量 @@ -154,7 +154,7 @@ namespace EOM.TSHotelManagement.Application /// 查询预约房数量 /// /// - object SelectReseredRoomAllByRoomState(); + SingleOutputDto SelectReservedRoomAllByRoomState(); #endregion #region 根据房间编号更改房间状态 diff --git a/EOM.TSHotelManagement.Application/Business/Room/RoomService.cs b/EOM.TSHotelManagement.Application/Business/Room/RoomService.cs index c30738e..77bfdc7 100644 --- a/EOM.TSHotelManagement.Application/Business/Room/RoomService.cs +++ b/EOM.TSHotelManagement.Application/Business/Room/RoomService.cs @@ -27,7 +27,6 @@ using EOM.TSHotelManagement.Common.Util; using EOM.TSHotelManagement.EntityFramework; using EOM.TSHotelManagement.Shared; using jvncorelib.EntityLib; -using NPOI.SS.Formula.Functions; using SqlSugar; namespace EOM.TSHotelManagement.Application @@ -65,7 +64,6 @@ namespace EOM.TSHotelManagement.Application this.custoRepository = custoRepository; } - #region 根据房间状态获取相应状态的房间信息 /// /// 根据房间状态获取相应状态的房间信息 /// @@ -100,9 +98,7 @@ namespace EOM.TSHotelManagement.Application return new ListOutputDto { listSource = listSource }; } - #endregion - #region 根据房间状态来查询可使用的房间 /// /// 根据房间状态来查询可使用的房间 /// @@ -136,9 +132,7 @@ namespace EOM.TSHotelManagement.Application return new ListOutputDto { listSource = listSource }; } - #endregion - #region 获取所有房间信息 /// /// 获取所有房间信息 /// @@ -203,9 +197,7 @@ namespace EOM.TSHotelManagement.Application return new ListOutputDto { listSource = listSource,total = count }; } - #endregion - #region 获取房间分区的信息 /// /// 获取房间分区的信息 /// @@ -246,9 +238,7 @@ namespace EOM.TSHotelManagement.Application return new ListOutputDto { listSource = listSource }; } - #endregion - #region 根据房间编号查询房间信息 /// /// 根据房间编号查询房间信息 /// @@ -285,9 +275,7 @@ namespace EOM.TSHotelManagement.Application return new SingleOutputDto() { Source = Source }; } - #endregion - #region 根据房间编号退房(退房) /// /// 根据房间编号退房(退房) /// @@ -311,20 +299,17 @@ namespace EOM.TSHotelManagement.Application } return new BaseOutputDto(); } - #region 根据房间编号查询截止到今天住了多少天 /// /// 根据房间编号查询截止到今天住了多少天 /// /// /// - public ReadRoomOutputDto DayByRoomNo(ReadRoomInputDto roomInputDto) + public SingleOutputDto DayByRoomNo(ReadRoomInputDto roomInputDto) { var days = Math.Abs(((TimeSpan)(roomRepository.GetSingle(a => a.RoomNumber == roomInputDto.RoomNumber).LastCheckInTime - DateTime.Now)).Days); - return new ReadRoomOutputDto { StayDays = days }; + return new SingleOutputDto { Source = new ReadRoomOutputDto { StayDays = days } }; } - #endregion - #region 根据房间编号修改房间信息(入住) /// /// 根据房间编号修改房间信息(入住) /// @@ -338,7 +323,9 @@ namespace EOM.TSHotelManagement.Application { LastCheckInTime = r.LastCheckInTime, RoomStateId = r.RoomStateId, - CustomerNumber = r.CustomerNumber + CustomerNumber = r.CustomerNumber, + DataChgDate = r.DataChgDate, + DataChgUsr = r.DataChgUsr, }, a => a.RoomNumber == r.RoomNumber); } catch (Exception ex) @@ -347,9 +334,7 @@ namespace EOM.TSHotelManagement.Application } return new BaseOutputDto(); } - #endregion - #region 根据房间编号修改房间信息(预约) /// /// 根据房间编号修改房间信息(预约) /// @@ -372,31 +357,55 @@ namespace EOM.TSHotelManagement.Application } return new BaseOutputDto(); } - #endregion - #region 查询可入住房间数量 - /// - /// 查询可入住房间数量 - /// - /// - public object SelectCanUseRoomAllByRoomState() + /// + /// 查询可入住房间数量 + /// + /// + public SingleOutputDto SelectCanUseRoomAllByRoomState() { - return roomRepository.GetList(a => a.RoomStateId == 1 && a.IsDelete != 1).OrderBy(a => a.RoomNumber).Count(); + try + { + var count = roomRepository.Count(a => a.RoomStateId == (int)RoomState.Vacant && a.IsDelete != 1); + return new SingleOutputDto + { + Source = new ReadRoomOutputDto { Vacant = count } + }; + } + catch (Exception ex) + { + return new SingleOutputDto + { + Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), + StatusCode = StatusCodeConstants.InternalServerError + }; + } } - #endregion - #region 查询已入住房间数量 /// /// 查询已入住房间数量 /// /// - public object SelectNotUseRoomAllByRoomState() + public SingleOutputDto SelectNotUseRoomAllByRoomState() { - return roomRepository.GetList(a => a.RoomStateId == 2 && a.IsDelete != 1).OrderBy(a => a.RoomNumber).Count(); + try + { + var count = roomRepository.Count(a => a.RoomStateId == (int)RoomState.Occupied && a.IsDelete != 1); + return new SingleOutputDto + { + Source = new ReadRoomOutputDto { Occupied = count } + }; + } + catch (Exception ex) + { + return new SingleOutputDto + { + Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), + StatusCode = StatusCodeConstants.InternalServerError + }; + } } - #endregion - #region 根据房间编号查询房间价格 /// /// 根据房间编号查询房间价格 /// @@ -405,42 +414,79 @@ namespace EOM.TSHotelManagement.Application { return roomRepository.GetSingle(a => a.RoomNumber == r.RoomNumber).RoomRent; } - #endregion - #region 查询脏房数量 /// /// 查询脏房数量 /// /// - public object SelectNotClearRoomAllByRoomState() + public SingleOutputDto SelectNotClearRoomAllByRoomState() { - return roomRepository.GetList(a => a.RoomStateId == 4 && a.IsDelete != 1).OrderBy(a => a.RoomNumber).Count(); + try + { + var count = roomRepository.Count(a => a.RoomStateId == (int)RoomState.Dirty && a.IsDelete != 1); + return new SingleOutputDto + { + Source = new ReadRoomOutputDto { Dirty = count } + }; + } + catch (Exception ex) + { + return new SingleOutputDto + { + Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), + StatusCode = StatusCodeConstants.InternalServerError + }; + } } - #endregion - #region 查询维修房数量 /// /// 查询维修房数量 /// /// - public object SelectFixingRoomAllByRoomState() + public SingleOutputDto SelectFixingRoomAllByRoomState() { - return roomRepository.GetList(a => a.RoomStateId == 3 && a.IsDelete != 1).OrderBy(a => a.RoomNumber).Count(); + try + { + var count = roomRepository.Count(a => a.RoomStateId == (int)RoomState.Maintenance && a.IsDelete != 1); + return new SingleOutputDto + { + Source = new ReadRoomOutputDto { Maintenance = count } + }; + } + catch (Exception ex) + { + return new SingleOutputDto + { + Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), + StatusCode = StatusCodeConstants.InternalServerError + }; + } } - #endregion - #region 查询预约房数量 /// /// 查询预约房数量 /// /// - public object SelectReseredRoomAllByRoomState() + public SingleOutputDto SelectReservedRoomAllByRoomState() { - return roomRepository.GetList(a => a.RoomStateId == 5 && a.IsDelete != 1).OrderBy(a => a.RoomNumber).Count(); + try + { + var count = roomRepository.Count(a => a.RoomStateId == (int)RoomState.Reserved && a.IsDelete != 1); + return new SingleOutputDto + { + Source = new ReadRoomOutputDto { Reserved = count } + }; + } + catch (Exception ex) + { + return new SingleOutputDto + { + Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), + StatusCode = StatusCodeConstants.InternalServerError + }; + } } - #endregion - #region 根据房间编号更改房间状态 /// /// 根据房间编号更改房间状态 /// @@ -461,9 +507,7 @@ namespace EOM.TSHotelManagement.Application } return new BaseOutputDto(); } - #endregion - #region 添加房间 /// /// 添加房间 /// @@ -486,9 +530,7 @@ namespace EOM.TSHotelManagement.Application return new BaseOutputDto(); } - #endregion - #region 更新房间 /// /// 更新房间 /// @@ -510,9 +552,7 @@ namespace EOM.TSHotelManagement.Application return new BaseOutputDto(); } - #endregion - #region 删除房间 /// /// 删除房间 /// @@ -534,9 +574,7 @@ namespace EOM.TSHotelManagement.Application return new BaseOutputDto(); } - #endregion - #region 查询所有可消费(已住)房间 /// /// 查询所有可消费(已住)房间 /// @@ -570,9 +608,7 @@ namespace EOM.TSHotelManagement.Application return new ListOutputDto { listSource = listSource }; } - #endregion - #region 根据房间编号查询房间状态编号 /// /// 根据房间编号查询房间状态编号 /// @@ -582,6 +618,5 @@ namespace EOM.TSHotelManagement.Application { return roomRepository.GetSingle(a => a.RoomNumber == readRoomInputDto.RoomNumber).RoomStateId; } - #endregion } } diff --git a/EOM.TSHotelManagement.Application/Business/Room/RoomTypeService.cs b/EOM.TSHotelManagement.Application/Business/Room/RoomTypeService.cs index 0482746..289ce7c 100644 --- a/EOM.TSHotelManagement.Application/Business/Room/RoomTypeService.cs +++ b/EOM.TSHotelManagement.Application/Business/Room/RoomTypeService.cs @@ -26,7 +26,6 @@ using EOM.TSHotelManagement.Common.Core; using EOM.TSHotelManagement.Common.Util; using EOM.TSHotelManagement.EntityFramework; using jvncorelib.EntityLib; -using NPOI.SS.Formula.Functions; using SqlSugar; namespace EOM.TSHotelManagement.Application diff --git a/EOM.TSHotelManagement.Application/EOM.TSHotelManagement.Application.csproj b/EOM.TSHotelManagement.Application/EOM.TSHotelManagement.Application.csproj index 07786f8..29027c5 100644 --- a/EOM.TSHotelManagement.Application/EOM.TSHotelManagement.Application.csproj +++ b/EOM.TSHotelManagement.Application/EOM.TSHotelManagement.Application.csproj @@ -28,10 +28,10 @@ + - diff --git a/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs b/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs index af6117c..d9b389c 100644 --- a/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs +++ b/EOM.TSHotelManagement.Application/Employee/EmployeeService.cs @@ -39,7 +39,6 @@ using System.IdentityModel.Tokens.Jwt; using System.Reflection; using System.Security.Claims; using System.Text; -using NPOI.XWPF.UserModel; namespace EOM.TSHotelManagement.Application { @@ -50,7 +49,6 @@ namespace EOM.TSHotelManagement.Application /// 构造函数 /// /// - /// /// /// /// @@ -59,18 +57,13 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public class EmployeeService(GenericRepository workerRepository, GenericRepository sexTypeRepository, GenericRepository educationRepository, GenericRepository nationRepository, GenericRepository deptRepository, GenericRepository positionRepository, GenericRepository passportTypeRepository, IDataProtectionProvider dataProtectionProvider, JWTHelper jWTHelper,MailHelper mailHelper) : IEmployeeService + public class EmployeeService(GenericRepository workerRepository, GenericRepository educationRepository, GenericRepository nationRepository, GenericRepository deptRepository, GenericRepository positionRepository, GenericRepository passportTypeRepository, IDataProtectionProvider dataProtectionProvider, JWTHelper jWTHelper,MailHelper mailHelper) : IEmployeeService { /// /// 员工信息 /// private readonly GenericRepository workerRepository = workerRepository; - /// - /// 性别类型 - /// - private readonly GenericRepository sexTypeRepository = sexTypeRepository; - /// /// 学历类型 /// @@ -238,8 +231,16 @@ namespace EOM.TSHotelManagement.Application List educations = new List(); educations = educationRepository.GetList(a => a.IsDelete != 1); //查询所有性别类型信息 - List sexTypes = new List(); - sexTypes = sexTypeRepository.GetList(a => a.IsDelete != 1); + var helper = new EnumHelper(); + var genders = Enum.GetValues(typeof(GenderType)) + .Cast() + .Select(e => new EnumDto + { + Id = (int)e, + Name = e.ToString(), + Description = helper.GetEnumDescription(e) + }) + .ToList(); //查询所有民族类型信息 List nations = new List(); nations = nationRepository.GetList(a => a.IsDelete != 1); @@ -287,8 +288,8 @@ namespace EOM.TSHotelManagement.Application source.PhoneNumber = source.PhoneNumber; } //性别类型 - var sexType = sexTypes.FirstOrDefault(a => a.GenderId == source.Gender); - source.GenderName = sexType.IsNullOrEmpty() ? "" : sexType.GenderName; + var sexType = genders.FirstOrDefault(a => a.Id == source.Gender); + source.GenderName = sexType.IsNullOrEmpty() ? "" : sexType.Description; //教育程度 var eduction = educations.FirstOrDefault(a => a.EducationNumber == source.EducationLevel); source.EducationLevelName = eduction.IsNullOrEmpty() ? "" : eduction.EducationName; @@ -332,6 +333,16 @@ namespace EOM.TSHotelManagement.Application public SingleOutputDto SelectEmployeeInfoByEmployeeId(ReadEmployeeInputDto readEmployeeInputDto) { Employee w = new Employee(); + var helper = new EnumHelper(); + var genders = Enum.GetValues(typeof(GenderType)) + .Cast() + .Select(e => new EnumDto + { + Id = (int)e, + Name = e.ToString(), + Description = helper.GetEnumDescription(e) + }) + .ToList(); w = workerRepository.GetSingle(a => a.EmployeeId == readEmployeeInputDto.EmployeeId); //解密身份证号码 var sourceStr = w.IdCardNumber.IsNullOrEmpty() ? "" : dataProtector.Unprotect(w.IdCardNumber); @@ -340,8 +351,8 @@ namespace EOM.TSHotelManagement.Application var sourceTelStr = w.PhoneNumber.IsNullOrEmpty() ? "" : dataProtector.Unprotect(w.PhoneNumber); w.PhoneNumber = sourceTelStr; //性别类型 - var sexType = sexTypeRepository.GetSingle(a => a.GenderId == w.Gender); - w.GenderName = sexType.GenderName.IsNullOrEmpty() ? "" : sexType.GenderName; + var sexType = genders.SingleOrDefault(a => a.Id == w.Gender); + w.GenderName = sexType.Description.IsNullOrEmpty() ? "" : sexType.Description; //教育程度 var eduction = educationRepository.GetSingle(a => a.EducationNumber == w.EducationLevel); w.EducationLevelName = eduction.EducationName.IsNullOrEmpty() ? "" : eduction.EducationName; @@ -372,6 +383,16 @@ namespace EOM.TSHotelManagement.Application public SingleOutputDto SelectEmployeeInfoByEmployeeIdAndEmployeePwd(ReadEmployeeInputDto readEmployeeInputDto) { Employee w = new Employee(); + var helper = new EnumHelper(); + var genders = Enum.GetValues(typeof(GenderType)) + .Cast() + .Select(e => new EnumDto + { + Id = (int)e, + Name = e.ToString(), + Description = helper.GetEnumDescription(e) + }) + .ToList(); w = workerRepository.GetSingle(a => a.EmployeeId == readEmployeeInputDto.EmployeeId); if (w == null) { @@ -388,8 +409,8 @@ namespace EOM.TSHotelManagement.Application } w.Password = ""; //性别类型 - var sexType = sexTypeRepository.GetSingle(a => a.GenderId == w.Gender); - w.GenderName = sexType.GenderName.IsNullOrEmpty() ? "" : sexType.GenderName; + var sexType = genders.SingleOrDefault(a => a.Id == w.Gender); + w.GenderName = sexType.Description.IsNullOrEmpty() ? "" : sexType.Description; //教育程度 var eduction = educationRepository.GetSingle(a => a.EducationNumber == w.EducationLevel); w.EducationLevelName = eduction.EducationName.IsNullOrEmpty() ? "" : eduction.EducationName; diff --git a/EOM.TSHotelManagement.Application/Employee/Photo/EmployeePhotoService.cs b/EOM.TSHotelManagement.Application/Employee/Photo/EmployeePhotoService.cs index ef6e445..63f15a3 100644 --- a/EOM.TSHotelManagement.Application/Employee/Photo/EmployeePhotoService.cs +++ b/EOM.TSHotelManagement.Application/Employee/Photo/EmployeePhotoService.cs @@ -2,7 +2,10 @@ using EOM.TSHotelManagement.Common.Core; using EOM.TSHotelManagement.Common.Util; using EOM.TSHotelManagement.EntityFramework; +using jvncorelib.EncryptorLib; using jvncorelib.EntityLib; +using Microsoft.AspNetCore.Http; +using System.Drawing; namespace EOM.TSHotelManagement.Application { @@ -17,19 +20,19 @@ namespace EOM.TSHotelManagement.Application private readonly GenericRepository workerPicRepository; /// - /// 加密 + /// 兰空图床帮助类 /// - private readonly jvncorelib.EncryptorLib.EncryptLib encrypt; + private readonly LskyHelper lskyHelper; /// /// /// /// - /// - public EmployeePhotoService(GenericRepository workerPicRepository, jvncorelib.EncryptorLib.EncryptLib encrypt) + /// + public EmployeePhotoService(GenericRepository workerPicRepository, LskyHelper lskyHelper) { this.workerPicRepository = workerPicRepository; - this.encrypt = encrypt; + this.lskyHelper = lskyHelper; } /// @@ -50,7 +53,7 @@ namespace EOM.TSHotelManagement.Application Source = new ReadEmployeePhotoOutputDto { PhotoId = 0, - PhotoUrl = "", + PhotoPath = "", EmployeeId = readEmployeePhotoInputDto.EmployeeId } }; @@ -65,22 +68,84 @@ namespace EOM.TSHotelManagement.Application /// 添加员工照片 /// /// + /// /// - public BaseOutputDto InsertWorkerPhoto(CreateEmployeePhotoInputDto createEmployeePhotoInputDto) + public SingleOutputDto InsertWorkerPhoto(CreateEmployeePhotoInputDto createEmployeePhotoInputDto, IFormFile file) { try { - workerPicRepository.Insert(new EmployeePhoto + if (file == null || file.Length == 0) { - EmployeeId = createEmployeePhotoInputDto.EmployeeId, - PhotoPath = createEmployeePhotoInputDto.PhotoUrl - }); + return new SingleOutputDto { Message = LocalizationHelper.GetLocalizedString("File cannot null","文件不能为空"), StatusCode = StatusCodeConstants.BadRequest }; + } + + if (file.Length > 1048576) + { + return new SingleOutputDto + { + Message = LocalizationHelper.GetLocalizedString("Image size exceeds 1MB limit", "图片大小不能超过1MB"), + StatusCode = StatusCodeConstants.BadRequest + }; + } + if (file.ContentType != "image/jpeg" && file.ContentType != "image/png") + { + return new SingleOutputDto + { + Message = LocalizationHelper.GetLocalizedString("Invalid image format", "图片格式不正确"), + StatusCode = StatusCodeConstants.BadRequest + }; + } + + var token = lskyHelper.GetImageStorageTokenAsync().Result; + if (string.IsNullOrEmpty(token)) + { + return new SingleOutputDto { Message = LocalizationHelper.GetLocalizedString("Get Token Fail", "获取Token失败"), StatusCode = StatusCodeConstants.InternalServerError }; + } + + using var stream = file.OpenReadStream(); + stream.Seek(0, SeekOrigin.Begin); + string imageUrl = lskyHelper.UploadImageAsync( + fileStream: stream, + fileName: file.FileName, + contentType: file.ContentType, + token: token + ).Result; + if (string.IsNullOrEmpty(imageUrl)) + { + return new SingleOutputDto { Message = "图片上传失败", StatusCode = StatusCodeConstants.InternalServerError }; + } + + var workerPicSource = workerPicRepository.GetSingle(a => a.EmployeeId.Equals(createEmployeePhotoInputDto.EmployeeId)); + if (workerPicSource.IsNullOrEmpty()) + { + workerPicRepository.Insert(new EmployeePhoto + { + EmployeeId = createEmployeePhotoInputDto.EmployeeId, + PhotoPath = imageUrl + }); + } + else + { + workerPicRepository.Update(a => new EmployeePhoto + { + PhotoPath = imageUrl + }, a => a.EmployeeId.Equals(createEmployeePhotoInputDto.EmployeeId)); + } + + return new SingleOutputDto + { + Source = new ReadEmployeePhotoOutputDto + { + PhotoId = 0, + PhotoPath = imageUrl, + EmployeeId = createEmployeePhotoInputDto.EmployeeId + } + }; } catch (Exception ex) { - return new BaseOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; + return new SingleOutputDto { Message = LocalizationHelper.GetLocalizedString(ex.Message, ex.Message), StatusCode = StatusCodeConstants.InternalServerError }; } - return new BaseOutputDto(); } /// diff --git a/EOM.TSHotelManagement.Application/Employee/Photo/IEmployeePhotoService.cs b/EOM.TSHotelManagement.Application/Employee/Photo/IEmployeePhotoService.cs index 34704ca..c6dc8b0 100644 --- a/EOM.TSHotelManagement.Application/Employee/Photo/IEmployeePhotoService.cs +++ b/EOM.TSHotelManagement.Application/Employee/Photo/IEmployeePhotoService.cs @@ -1,4 +1,6 @@ using EOM.TSHotelManagement.Common.Contract; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Http.Internal; namespace EOM.TSHotelManagement.Application { @@ -17,8 +19,9 @@ namespace EOM.TSHotelManagement.Application /// 添加员工照片 /// /// + /// /// - BaseOutputDto InsertWorkerPhoto(CreateEmployeePhotoInputDto createEmployeePhotoInputDto); + SingleOutputDto InsertWorkerPhoto(CreateEmployeePhotoInputDto createEmployeePhotoInputDto,IFormFile formFile); /// /// 删除员工照片 /// diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Base/BaseService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Base/BaseService.cs index c6015a9..ddec7a0 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/Base/BaseService.cs +++ b/EOM.TSHotelManagement.Application/SystemManagement/Base/BaseService.cs @@ -46,11 +46,6 @@ namespace EOM.TSHotelManagement.Application /// private readonly GenericRepository workerRepository; - /// - /// 性别类型 - /// - private readonly GenericRepository sexTypeRepository; - /// /// 学历类型 /// @@ -95,7 +90,6 @@ namespace EOM.TSHotelManagement.Application /// /// /// - /// /// /// /// @@ -104,10 +98,9 @@ namespace EOM.TSHotelManagement.Application /// /// /// - public BaseService(GenericRepository workerRepository, GenericRepository sexTypeRepository, GenericRepository educationRepository, GenericRepository nationRepository, GenericRepository deptRepository, GenericRepository positionRepository, GenericRepository passPortTypeRepository, GenericRepository custoTypeRepository, GenericRepository goodbadTypeRepository, GenericRepository baseRepository) + public BaseService(GenericRepository workerRepository, GenericRepository educationRepository, GenericRepository nationRepository, GenericRepository deptRepository, GenericRepository positionRepository, GenericRepository passPortTypeRepository, GenericRepository custoTypeRepository, GenericRepository goodbadTypeRepository, GenericRepository baseRepository) { this.workerRepository = workerRepository; - this.sexTypeRepository = sexTypeRepository; this.educationRepository = educationRepository; this.nationRepository = nationRepository; this.deptRepository = deptRepository; @@ -124,82 +117,24 @@ namespace EOM.TSHotelManagement.Application /// 查询所有性别类型 /// /// - public ListOutputDto SelectGenderTypeAll(ReadGenderTypeInputDto genderTypeInputDto = null) - { - var where = Expressionable.Create(); - - if (genderTypeInputDto != null && !genderTypeInputDto.IsDelete.IsNullOrEmpty()) - { - where = where.And(a => a.IsDelete == genderTypeInputDto.IsDelete); - } - var count = 0; - var genderTypes = new List(); - - if (!genderTypeInputDto.IgnorePaging && genderTypeInputDto.Page != 0 && genderTypeInputDto.PageSize != 0) - { - genderTypes = sexTypeRepository.AsQueryable().Where(where.ToExpression()).ToPageList(genderTypeInputDto.Page, genderTypeInputDto.PageSize, ref count); - } - else - { - genderTypes = sexTypeRepository.AsQueryable().Where(where.ToExpression()).ToList(); - } - - var result = EntityMapper.MapList(genderTypes); - return new ListOutputDto { listSource = result, total = count }; - } - - /// - /// 查询性别类型 - /// - /// - public SingleOutputDto SelectGenderType(ReadGenderTypeInputDto genderTypeInputDto) + public ListOutputDto SelectGenderTypeAll() { - var genderType = sexTypeRepository.GetSingle(a => a.GenderId == genderTypeInputDto.GenderId); - var result = EntityMapper.Map(genderType); - return new SingleOutputDto { Source = result }; - } - - /// - /// 添加性别类型 - /// - /// - /// - public BaseOutputDto AddGenderType(CreateGenderTypeInputDto createGenderTypeInputDto) - { - var genderType = EntityMapper.Map(createGenderTypeInputDto); - var result = sexTypeRepository.Insert(genderType); - return new BaseOutputDto { StatusCode = result ? StatusCodeConstants.Success : StatusCodeConstants.InternalServerError }; - } - - /// - /// 删除性别类型 - /// - /// - /// - public BaseOutputDto DelGenderType(DeleteGenderTypeInputDto deleteGenderTypeInputDto) - { - var result = sexTypeRepository.Update(a => new GenderType() - { - IsDelete = deleteGenderTypeInputDto.IsDelete, - DataChgUsr = deleteGenderTypeInputDto.DataChgUsr - }, a => a.GenderId == deleteGenderTypeInputDto.GenderId); - return new BaseOutputDto { StatusCode = result ? StatusCodeConstants.Success : StatusCodeConstants.InternalServerError }; - } + var helper = new EnumHelper(); + var enumList = Enum.GetValues(typeof(GenderType)) + .Cast() + .Select(e => new EnumDto + { + Id = (int)e, + Name = e.ToString(), + Description = helper.GetEnumDescription(e) + }) + .ToList(); - /// - /// 更新性别类型 - /// - /// - /// - public BaseOutputDto UpdGenderType(UpdateGenderTypeInputDto updateGenderTypeInputDto) - { - var result = sexTypeRepository.Update(a => new GenderType() + return new ListOutputDto { - GenderName = updateGenderTypeInputDto.GenderName, - DataChgUsr = updateGenderTypeInputDto.DataChgUsr, - DataChgDate = updateGenderTypeInputDto.DataChgDate - }, a => a.GenderId == updateGenderTypeInputDto.GenderId); - return new BaseOutputDto { StatusCode = result ? StatusCodeConstants.Success : StatusCodeConstants.InternalServerError }; + listSource = enumList, + total = enumList.Count + }; } #endregion @@ -210,38 +145,51 @@ namespace EOM.TSHotelManagement.Application /// 查询所有面貌类型 /// /// - public List SelectWorkerFeatureAll() + public ListOutputDto SelectWorkerFeatureAll() { var helper = new EnumHelper(); - return Enum.GetValues(typeof(PoliticalAffiliation)) - .Cast() - .Select(e => new EnumDto + var enumList = Enum.GetValues(typeof(PoliticalAffiliation)) + .Cast() + .Select(e => new EnumDto + { + Id = (int)e, + Name = e.ToString(), + Description = helper.GetEnumDescription(e) + }) + .ToList(); + + return new ListOutputDto { - Id = (int)e, - Name = e.ToString(), - Description = helper.GetEnumDescription(e) - }) - .ToList(); + listSource = enumList, + total = enumList.Count + }; } + #endregion - #region 房间状态模块 - /// - /// 获取所有房间状态 - /// - /// - public List SelectRoomStateAll() + #region 房间状态模块 + /// + /// 获取所有房间状态 + /// + /// + public ListOutputDto SelectRoomStateAll() { var helper = new EnumHelper(); - return Enum.GetValues(typeof(RoomState)) - .Cast() - .Select(e => new EnumDto - { - Id = (int)e, - Name = e.ToString(), - Description = helper.GetEnumDescription(e) - }) - .ToList(); + var enumList = Enum.GetValues(typeof(RoomState)) + .Cast() + .Select(e => new EnumDto + { + Id = (int)e, + Name = e.ToString(), + Description = helper.GetEnumDescription(e) + }) + .ToList(); + + return new ListOutputDto + { + listSource = enumList, + total = enumList.Count + }; } #endregion diff --git a/EOM.TSHotelManagement.Application/SystemManagement/Base/IBaseService.cs b/EOM.TSHotelManagement.Application/SystemManagement/Base/IBaseService.cs index f9441c9..6067d96 100644 --- a/EOM.TSHotelManagement.Application/SystemManagement/Base/IBaseService.cs +++ b/EOM.TSHotelManagement.Application/SystemManagement/Base/IBaseService.cs @@ -38,34 +38,7 @@ namespace EOM.TSHotelManagement.Application /// 查询所有性别类型 ///
/// - ListOutputDto SelectGenderTypeAll(ReadGenderTypeInputDto genderTypeInputDto = null); - - /// - /// 查询性别类型 - /// - /// - SingleOutputDto SelectGenderType(ReadGenderTypeInputDto genderTypeInputDto); - - /// - /// 添加性别类型 - /// - /// - /// - BaseOutputDto AddGenderType(CreateGenderTypeInputDto createGenderTypeInputDto); - - /// - /// 删除性别类型 - /// - /// - /// - BaseOutputDto DelGenderType(DeleteGenderTypeInputDto deleteGenderTypeInputDto); - - /// - /// 更新性别类型 - /// - /// - /// - BaseOutputDto UpdGenderType(UpdateGenderTypeInputDto sexType); + ListOutputDto SelectGenderTypeAll(); #endregion @@ -75,7 +48,7 @@ namespace EOM.TSHotelManagement.Application /// 查询所有面貌类型 /// /// - List SelectWorkerFeatureAll(); + ListOutputDto SelectWorkerFeatureAll(); #endregion #region 房间状态模块 @@ -83,7 +56,7 @@ namespace EOM.TSHotelManagement.Application /// 获取所有房间状态 /// /// - List SelectRoomStateAll(); + ListOutputDto SelectRoomStateAll(); #endregion #region 职位模块 diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerInputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerInputDto.cs index 95871e3..b22fe56 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerInputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Customer/Dto/Customer/ReadCustomerInputDto.cs @@ -6,7 +6,6 @@ namespace EOM.TSHotelManagement.Common.Contract public string CustomerNumber { get; set; } public string CustomerPhoneNumber { get; set; } public string IdCardNumber { get; set; } - public bool OnlyVip { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserOutputDto.cs index 5d8f52a..8322907 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Reser/Dto/ReadReserOutputDto.cs @@ -1,13 +1,22 @@ +using EOM.TSHotelManagement.Common.Util; + namespace EOM.TSHotelManagement.Common.Contract { public class ReadReserOutputDto { + [UIDisplay("ԤԼ")] public string ReservationId { get; set; } + [UIDisplay("ͻ")] public string CustomerName { get; set; } + [UIDisplay("ϵʽ")] public string ReservationPhoneNumber { get; set; } + [UIDisplay("")] public string ReservationRoomNumber { get; set; } + [UIDisplay("ԤԼ")] public string ReservationChannel { get; set; } + [UIDisplay("ԤԼʼ")] public DateTime ReservationStartDate { get; set; } + [UIDisplay("ԤԼֹ")] public DateTime ReservationEndDate { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomOutputDto.cs index eb8f05b..c8544fd 100644 --- a/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Business/Room/Dto/Room/ReadRoomOutputDto.cs @@ -16,6 +16,11 @@ namespace EOM.TSHotelManagement.Common.Contract public string RoomLocation { get; set; } public int StayDays { get; set; } + public int Vacant { get; set; } + public int Occupied { get; set; } + public int Maintenance { get; set; } + public int Dirty { get; set; } + public int Reserved { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoOutputDto.cs b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoOutputDto.cs index 1bbde2d..a732611 100644 --- a/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoOutputDto.cs +++ b/EOM.TSHotelManagement.Common.Contract/Employee/Dto/EmployeePhoto/ReadEmployeePhotoOutputDto.cs @@ -4,7 +4,7 @@ namespace EOM.TSHotelManagement.Common.Contract { public int PhotoId { get; set; } public string EmployeeId { get; set; } - public string PhotoUrl { get; set; } + public string PhotoPath { get; set; } } } diff --git a/EOM.TSHotelManagement.Common.Core/Business/Customer/GenderType.cs b/EOM.TSHotelManagement.Common.Core/Business/Customer/GenderType.cs index 8e52f98..bdaa724 100644 --- a/EOM.TSHotelManagement.Common.Core/Business/Customer/GenderType.cs +++ b/EOM.TSHotelManagement.Common.Core/Business/Customer/GenderType.cs @@ -22,25 +22,20 @@ * *模块说明:性别类 */ +using System.ComponentModel; + namespace EOM.TSHotelManagement.Common.Core { /// /// 性别 /// - [SqlSugar.SugarTable("gender_type")] - public class GenderType : BaseEntity + public enum GenderType { - /// - /// 性别 ID (Gender ID) - /// - [SqlSugar.SugarColumn(ColumnName = "gender_number", IsPrimaryKey = true)] - public int GenderId { get; set; } - /// - /// 性别名称 (Gender Name) - /// - [SqlSugar.SugarColumn(ColumnName = "gender_name")] - public string GenderName { get; set; } + [Description("女")] + Female = 0, + [Description("男")] + Male = 1, } } diff --git a/EOM.TSHotelManagement.Common.Util/Helper/LskyHelper.cs b/EOM.TSHotelManagement.Common.Util/Helper/LskyHelper.cs new file mode 100644 index 0000000..3bba4f0 --- /dev/null +++ b/EOM.TSHotelManagement.Common.Util/Helper/LskyHelper.cs @@ -0,0 +1,124 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net.Http.Headers; +using System.Net.Http; +using System.Text; +using System.Threading.Tasks; +using System.Net.Http.Json; +using EOM.TSHotelManagement.Shared; +using System.IO; + +namespace EOM.TSHotelManagement.Common.Util +{ + public class LskyHelper + { + private readonly ILskyConfigFactory lskyConfigFactory; + + public LskyHelper(ILskyConfigFactory lskyConfigFactory) + { + this.lskyConfigFactory = lskyConfigFactory; + } + + public async Task GetImageStorageTokenAsync() + { + var lskConfig = lskyConfigFactory.GetLskyConfig(); + using var httpClient = new HttpClient(); + var tokenRequest = new + { + email = lskConfig.Email, + password = lskConfig.Password + }; + + var response = await httpClient.PostAsJsonAsync($"{lskConfig.BaseAddress}{lskConfig.GetTokenApi}", tokenRequest); + if (!response.IsSuccessStatusCode) return null; + + var result = await response.Content.ReadFromJsonAsync(); + return result?.Status == true ? result.Data.Token : null; + } + + public async Task UploadImageAsync( + Stream fileStream, + string fileName, + string contentType, + string token, + int? strategyId = null) + { + try + { + if (fileStream == null || fileStream.Length == 0) + throw new ArgumentException(LocalizationHelper.GetLocalizedString("File stream cannot be empty","文件流不能为空")); + + if (string.IsNullOrWhiteSpace(fileName)) + throw new ArgumentException(LocalizationHelper.GetLocalizedString("File name cannot be empty", "文件名不能为空")); + + if (string.IsNullOrWhiteSpace(contentType)) + throw new ArgumentException(LocalizationHelper.GetLocalizedString("Content type cannot be empty", "内容类型不能为空")); + + var lskConfig = lskyConfigFactory.GetLskyConfig(); + if (string.IsNullOrEmpty(lskConfig?.BaseAddress)) + throw new InvalidOperationException(LocalizationHelper.GetLocalizedString("The base URL for the Lsky service is not configured.", "兰空图床基础地址未配置")); + + using var httpClient = new HttpClient(); + using var content = new MultipartFormDataContent(); + + var fileContent = new StreamContent(fileStream); + fileContent.Headers.ContentType = MediaTypeHeaderValue.Parse(contentType); + content.Add(fileContent, "file", fileName); + + if (strategyId.HasValue) + { + content.Add(new StringContent(strategyId.Value.ToString()), "strategy_id"); + } + + httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token); + httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); + + var response = await httpClient.PostAsync( + $"{lskConfig.BaseAddress}{lskConfig.UploadApi}", + content + ); + + if (!response.IsSuccessStatusCode) + { + var errorContent = await response.Content.ReadAsStringAsync(); + throw new HttpRequestException($"上传失败: {response.StatusCode} - {errorContent}"); + } + + var result = await response.Content.ReadFromJsonAsync(); + return result?.Data?.Links?.Url ?? throw new Exception("响应中未包含有效URL"); + } + catch (Exception ex) + { + throw; + } + } + + public class TokenResponse + { + public bool Status { get; set; } + public TokenData Data { get; set; } + } + + public class TokenData + { + public string Token { get; set; } + } + + public class UploadResponse + { + public UploadData Data { get; set; } + } + + public class UploadData + { + public UploadLinks Links { get; set; } + } + + public class UploadLinks + { + public string Url { get; set; } + } + + } +} diff --git a/EOM.TSHotelManagement.Shared/EnumHelper.cs b/EOM.TSHotelManagement.Shared/EnumHelper.cs index 47cb806..aee8ccf 100644 --- a/EOM.TSHotelManagement.Shared/EnumHelper.cs +++ b/EOM.TSHotelManagement.Shared/EnumHelper.cs @@ -27,5 +27,12 @@ namespace EOM.TSHotelManagement.Shared return Convert.ToInt32(value); } + + public int GetEnumValue(int value) + { + if (value == null) + throw new ArgumentNullException(nameof(value)); + return Convert.ToInt32(value); + } } } diff --git a/EOM.TSHotelManagement.Shared/Interfaces/ILskyConfigFactory.cs b/EOM.TSHotelManagement.Shared/Interfaces/ILskyConfigFactory.cs new file mode 100644 index 0000000..86a5210 --- /dev/null +++ b/EOM.TSHotelManagement.Shared/Interfaces/ILskyConfigFactory.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EOM.TSHotelManagement.Shared +{ + public interface ILskyConfigFactory + { + LskyConfig GetLskyConfig(); + } +} diff --git a/EOM.TSHotelManagement.Shared/Interfaces/LskyConfig.cs b/EOM.TSHotelManagement.Shared/Interfaces/LskyConfig.cs new file mode 100644 index 0000000..219396c --- /dev/null +++ b/EOM.TSHotelManagement.Shared/Interfaces/LskyConfig.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EOM.TSHotelManagement.Shared +{ + public class LskyConfig + { + public string BaseAddress { get; set; } + public string Email { get; set; } + public string Password { get; set; } + public string UploadApi { get; set; } + public string GetTokenApi { get; set; } + } +} diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomController.cs index 6e760c7..740f78b 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Business/Room/RoomController.cs @@ -88,7 +88,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public ReadRoomOutputDto DayByRoomNo([FromQuery] ReadRoomInputDto inputDto) + public SingleOutputDto DayByRoomNo([FromQuery] ReadRoomInputDto inputDto) { return roomService.DayByRoomNo(inputDto); } @@ -120,7 +120,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public object SelectCanUseRoomAllByRoomState() + public SingleOutputDto SelectCanUseRoomAllByRoomState() { return roomService.SelectCanUseRoomAllByRoomState(); } @@ -130,7 +130,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public object SelectNotUseRoomAllByRoomState() + public SingleOutputDto SelectNotUseRoomAllByRoomState() { return roomService.SelectNotUseRoomAllByRoomState(); } @@ -151,7 +151,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public object SelectNotClearRoomAllByRoomState() + public SingleOutputDto SelectNotClearRoomAllByRoomState() { return roomService.SelectNotClearRoomAllByRoomState(); } @@ -161,7 +161,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public object SelectFixingRoomAllByRoomState() + public SingleOutputDto SelectFixingRoomAllByRoomState() { return roomService.SelectFixingRoomAllByRoomState(); } @@ -171,9 +171,9 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public object SelectReseredRoomAllByRoomState() + public SingleOutputDto SelectReservedRoomAllByRoomState() { - return roomService.SelectReseredRoomAllByRoomState(); + return roomService.SelectReservedRoomAllByRoomState(); } /// diff --git a/EOM.TSHotelManagement.WebApi/Controllers/Employee/Photo/EmployeePhotoController.cs b/EOM.TSHotelManagement.WebApi/Controllers/Employee/Photo/EmployeePhotoController.cs index 5e139b5..c5ac280 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/Employee/Photo/EmployeePhotoController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/Employee/Photo/EmployeePhotoController.cs @@ -2,6 +2,7 @@ using EOM.TSHotelManagement.Common.Core; using EOM.TSHotelManagement.Common.Contract; using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Http; namespace EOM.TSHotelManagement.WebApi.Controllers { @@ -32,11 +33,12 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// 添加员工照片 /// /// + /// /// [HttpPost] - public BaseOutputDto InsertWorkerPhoto([FromBody] CreateEmployeePhotoInputDto inputDto) + public SingleOutputDto InsertWorkerPhoto([FromForm] CreateEmployeePhotoInputDto inputDto, IFormFile file) { - return workerPicService.InsertWorkerPhoto(inputDto); + return workerPicService.InsertWorkerPhoto(inputDto,file); } /// diff --git a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Base/BaseController.cs b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Base/BaseController.cs index 48654a7..392869a 100644 --- a/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Base/BaseController.cs +++ b/EOM.TSHotelManagement.WebApi/Controllers/SystemManagement/Base/BaseController.cs @@ -26,44 +26,18 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// /// - /// /// [HttpGet] - public ListOutputDto SelectSexTypeAll([FromQuery] ReadGenderTypeInputDto sexType = null) + public ListOutputDto SelectGenderTypeAll() { - return baseService.SelectGenderTypeAll(sexType); + return baseService.SelectGenderTypeAll(); } - - [HttpGet] - public SingleOutputDto SelectSexType([FromQuery] ReadGenderTypeInputDto sexType) - { - return baseService.SelectGenderType(sexType); - } - - [HttpPost] - public BaseOutputDto AddSexType([FromBody] CreateGenderTypeInputDto sexType) - { - return baseService.AddGenderType(sexType); - } - - [HttpPost] - public BaseOutputDto DelSexType([FromBody] DeleteGenderTypeInputDto sexType) - { - return baseService.DelGenderType(sexType); - } - - [HttpPost] - public BaseOutputDto UpdSexType([FromBody] UpdateGenderTypeInputDto sexType) - { - return baseService.UpdGenderType(sexType); - } - #endregion #region 面貌模块 [HttpGet] - public List SelectWorkerFeatureAll() + public ListOutputDto SelectWorkerFeatureAll() { return baseService.SelectWorkerFeatureAll(); } @@ -76,7 +50,7 @@ namespace EOM.TSHotelManagement.WebApi.Controllers /// /// [HttpGet] - public List SelectRoomStateAll() + public ListOutputDto SelectRoomStateAll() { return baseService.SelectRoomStateAll(); } diff --git a/EOM.TSHotelManagement.WebApi/Factory/LskyConfigFactory.cs b/EOM.TSHotelManagement.WebApi/Factory/LskyConfigFactory.cs new file mode 100644 index 0000000..fed7874 --- /dev/null +++ b/EOM.TSHotelManagement.WebApi/Factory/LskyConfigFactory.cs @@ -0,0 +1,28 @@ +using EOM.TSHotelManagement.Shared; +using Microsoft.Extensions.Configuration; + +namespace EOM.TSHotelManagement.WebApi +{ + public class LskyConfigFactory:ILskyConfigFactory + { + private readonly IConfiguration _configuration; + + public LskyConfigFactory(IConfiguration configuration) + { + _configuration = configuration; + } + + public LskyConfig GetLskyConfig() + { + var lskyConfig = new LskyConfig + { + BaseAddress = _configuration.GetSection("Lsky").GetValue("BaseAddress"), + Email = _configuration.GetSection("Lsky").GetValue("Email"), + Password = _configuration.GetSection("Lsky").GetValue("Password"), + UploadApi = _configuration.GetSection("Lsky").GetValue("UploadApi"), + GetTokenApi = _configuration.GetSection("Lsky").GetValue("GetTokenApi") + }; + return lskyConfig; + } + } +} diff --git a/EOM.TSHotelManagement.WebApi/Startup.cs b/EOM.TSHotelManagement.WebApi/Startup.cs index f13c785..43d43f1 100644 --- a/EOM.TSHotelManagement.WebApi/Startup.cs +++ b/EOM.TSHotelManagement.WebApi/Startup.cs @@ -39,6 +39,7 @@ namespace EOM.TSHotelManagement.WebApi services.AddSingleton(); services.AddSingleton(); + services.AddSingleton(); services.AddAuthentication(options => { @@ -206,6 +207,7 @@ namespace EOM.TSHotelManagement.WebApi builder.RegisterType().AsSelf().InstancePerLifetimeScope(); builder.RegisterType().AsSelf().InstancePerLifetimeScope(); + builder.RegisterType().AsSelf().InstancePerLifetimeScope(); //ע var assemblyService = Assembly.LoadFrom(Path.Combine(AppContext.BaseDirectory, "EOM.TSHotelManagement.Application.dll")); diff --git a/EOM.TSHotelManagement.WebApi/appsettings.json b/EOM.TSHotelManagement.WebApi/appsettings.json index 6abe1a7..790481d 100644 --- a/EOM.TSHotelManagement.WebApi/appsettings.json +++ b/EOM.TSHotelManagement.WebApi/appsettings.json @@ -29,5 +29,13 @@ "EnableSsl": true, "DisplayName": "" }, - "SoftwareVersion": "1.0.0" + "SoftwareVersion": "1.0.0", + //兰空图床配置 + "Lsky": { + "BaseAddress": "", + "Email": "", + "Password": "", + "UploadApi": "", + "GetTokenApi": "" + } } -- Gitee From a6c0f284b6a40d343e35faa30135eb009bcfd286 Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Sat, 19 Apr 2025 17:52:31 +0800 Subject: [PATCH 22/24] update database script. --- .../tshotel-backstage-dbscript-data.sql" | 18 +++------ .../tshotel-backstage-dbscript-table.sql" | 39 +++++++++---------- 2 files changed, 24 insertions(+), 33 deletions(-) diff --git "a/\346\225\260\346\215\256\345\272\223\350\204\232\346\234\254/latest_MariaDB\347\211\210\346\234\254/tshotel-backstage-dbscript-data.sql" "b/\346\225\260\346\215\256\345\272\223\350\204\232\346\234\254/latest_MariaDB\347\211\210\346\234\254/tshotel-backstage-dbscript-data.sql" index 02e83ad..3fe8f8f 100644 --- "a/\346\225\260\346\215\256\345\272\223\350\204\232\346\234\254/latest_MariaDB\347\211\210\346\234\254/tshotel-backstage-dbscript-data.sql" +++ "b/\346\225\260\346\215\256\345\272\223\350\204\232\346\234\254/latest_MariaDB\347\211\210\346\234\254/tshotel-backstage-dbscript-data.sql" @@ -1,11 +1,5 @@ INSERT INTO `administrator` (`id`, `admin_number`, `admin_account`, `admin_password`, `admin_type`, `admin_name`, `is_admin`, `delete_mk`, `datains_usr`, `datains_date`, `datachg_usr`, `datachg_date`) VALUES (1, '1263785187301658678', 'admin', 'clUKFMeIUWp6YflZweR0Cw==·#c0fbb?;*$>#;^b%$?>#%% Date: Sat, 19 Apr 2025 18:21:30 +0800 Subject: [PATCH 23/24] . --- .../EOM.TSHotelManagement.Application.csproj | 4 ---- 1 file changed, 4 deletions(-) diff --git a/EOM.TSHotelManagement.Application/EOM.TSHotelManagement.Application.csproj b/EOM.TSHotelManagement.Application/EOM.TSHotelManagement.Application.csproj index 29027c5..4172b79 100644 --- a/EOM.TSHotelManagement.Application/EOM.TSHotelManagement.Application.csproj +++ b/EOM.TSHotelManagement.Application/EOM.TSHotelManagement.Application.csproj @@ -21,10 +21,6 @@ - - - - -- Gitee From fce7f84e71e3d372a41b0429f82f07c87e033467 Mon Sep 17 00:00:00 2001 From: ck_yeun9 Date: Sat, 19 Apr 2025 18:28:05 +0800 Subject: [PATCH 24/24] update README.md. --- README.en.md | 6 +++--- README.md | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.en.md b/README.en.md index f0f56de..13a047c 100644 --- a/README.en.md +++ b/README.en.md @@ -120,8 +120,8 @@ EOM.TSHotelManager.Web ### :inbox_tray: Database deployment (local): -**The author and development team strongly recommend using PostgreSQL database. Install the PostgreSQL database and start the service. Use a visualization management tool to create the database. You can quickly establish data tables and import data by opening the .sql suffix format files in the database script folder. Execution steps (taking PostgreSQL database as an example):** +**The author and development team strongly recommend using MariaDB database. Install the MariaDB database and start the service. Use a visualization management tool to create the database. You can quickly establish data tables and import data by opening the .sql suffix format files in the database script folder. Execution steps (taking MariaDB database as an example):** -**1. Use a visualization management tool to open the Table.sql file to create data tables.** +**1. Use a visualization management tool to open the 数据库脚本/latest_MariaDB版本/tshotel-backstage-dbscript-table.sql file to create data tables.** -**2. Then open the Data.sql file to import data.** +**2. Then open the 数据库脚本/latest_MariaDB版本/tshotel-backstage-dbscript-data.sql file to import data.** diff --git a/README.md b/README.md index e62f6e9..65e2c05 100644 --- a/README.md +++ b/README.md @@ -118,10 +118,10 @@ EOM.TSHotelManagement.Web ### :inbox_tray: 数据库运行部署(本地): -**作者及开发团队强烈建议使用PostgreSQL数据库,安装PostgreSQL数据库并开启服务,通过可视化管理工具对数据库进行建立,可通过打开执行数据库脚本文件夹内的.sql后缀格式文件进行快速建立数据表和导入数据,执行步骤(以PostgreSQL数据库为例):** +**作者及开发团队强烈建议使用MariaDB数据库,安装MariaDB数据库并开启服务,通过可视化管理工具对数据库进行建立,可通过打开执行数据库脚本文件夹内的.sql后缀格式文件进行快速建立数据表和导入数据,执行步骤(以MariaDB数据库为例):** -**1、通过可视化管理工具打开Table.sql文件进行数据表建立。** +**1、通过可视化管理工具打开/数据库脚本/latest_MariaDB版本,依次执行tshotel-backstage-dbscript-table.sql文件进行数据库与数据表建立。** -**2、随后打开Data.sql文件进行数据导入。** +**2、随后打开tshotel-backstage-dbscript-data.sql文件进行数据导入。** ​ [![咖啡与网络/TopskyHotelManagementSystem-WebApi](https://gitee.com/java-and-net/topsky-hotel-management-system-web-api/widgets/widget_card.svg?colors=4183c4,ffffff,ffffff,e3e9ed,666666,9b9b9b)](https://gitee.com/java-and-net/topsky-hotel-manager-system-web-api) -- Gitee