From 4c8559a872db991bee480a9f5e2664436d827e6b Mon Sep 17 00:00:00 2001 From: Chunkit Yeung Date: Sun, 31 Jul 2022 01:23:37 +0800 Subject: [PATCH 1/4] init --- .../Business/Cash/CashAppService.cs | 49 + .../Business/Cash/Dtos/AddCashInfoDto.cs | 84 ++ .../Business/Cash/Dtos/CashInfoListDto.cs | 44 + .../Business/Cash/Dtos/OAddCashInfoDto.cs | 38 + .../Business/Cash/Dtos/OCashInfoListDto.cs | 46 + .../Business/Cash/Services/CashService.cs | 138 +++ .../Business/Cash/Services/ICashService.cs | 47 + .../Business/Cash/Temp/Temp_Cash.cs | 76 ++ .../Business/Customer/CustoAppService.cs | 78 ++ .../Customer/Dtos/InsertCustomerInfoDto.cs | 95 ++ .../Customer/Dtos/OInsertCustomerInfoDto.cs | 37 + .../Customer/Dtos/OSelectAllMoneyDto.cs | 41 + .../Customer/Dtos/OSelectCustoAllDto.cs | 46 + .../Customer/Dtos/OUpdCustomerInfoDto.cs | 36 + .../Dtos/OUpdCustomerTypeByCustoNoDto.cs | 37 + .../Customer/Dtos/SelectCustoAllDto.cs | 44 + .../Customer/Dtos/UpdCustomerInfoDto.cs | 96 ++ .../Customer/Services/CustoService.cs | 251 +++++ .../Customer/Services/ICustoService.cs | 70 ++ .../Business/Customer/Temp/Temp_Customer.cs | 83 ++ .../Business/Fonts/Dtos/OSelectFonListDto.cs | 41 + .../Business/Fonts/FontsAppService.cs | 38 + .../Business/Fonts/Services/FontsService.cs | 68 ++ .../Business/Fonts/Services/IFontsService.cs | 40 + .../Business/Fonts/Temp/Temp_Fonts.cs | 15 +- .../Dtos/InsertHydropowerInfoDto.cs | 74 ++ .../Dtos/OInsertHydropowerInfoDto.cs | 36 + .../Dtos/OSelectHydropowerInfoAllDto.cs | 26 + .../Dtos/OUpdateHydropowerInfoDto.cs | 36 + .../Dtos/SelectHydropowerInfoAllDto.cs | 73 ++ .../Dtos/UpdateHydropowerInfoDto.cs | 81 ++ .../Hydropower/HydropowerAppService.cs | 58 ++ .../Hydropower/Services/HydropowerService.cs | 160 +++ .../Hydropower/Services/IHydropowerService.cs | 55 ++ .../Hydropower/Temp/Temp_Hydropower.cs | 73 ++ .../Business/Reser/Dtos/InserReserInfoDto.cs | 75 ++ .../Business/Reser/Dtos/OInserReserInfoDto.cs | 37 + .../Business/Reser/Dtos/OSelectReserAllDto.cs | 46 + .../Business/Reser/Dtos/SelectReserAllDto.cs | 56 ++ .../Business/Reser/ReserAppService.cs | 49 + .../Business/Reser/Services/IReserService.cs | 49 + .../Business/Reser/Services/ReserService.cs | 154 +++ .../Business/Reser/Temp/Temp_Reser.cs | 70 ++ .../Room/Dtos/OSelectRoomTypesAllDto.cs | 40 + .../Room/Dtos/SelectRoomTypesAllDto.cs | 46 + .../Business/Room/Services/IRoomService.cs | 216 ++++ .../Room/Services/IRoomTypeService.cs | 45 + .../Business/Room/Services/ORoomListDto.cs | 40 + .../Business/Room/Services/RoomListDto.cs | 64 ++ .../Business/Room/Services/RoomService.cs | 416 ++++++++ .../Business/Room/Services/RoomTypeService.cs | 82 ++ .../Room/Services/SelectRoomTypeByRoomNo.cs | 30 + .../Business/Room/Temp/Temp_Room.cs | 88 ++ .../Business/Room/Temp/Temp_RoomState.cs | 43 + .../Business/Room/Temp/Temp_RoomType.cs | 44 + .../Sellthing/Services/ISellService.cs | 97 ++ .../Sellthing/Services/SellService.cs | 180 ++++ .../Business/Sellthing/Temp/Temp_Sellthing.cs | 59 ++ .../Business/Spend/Services/ISpendService.cs | 124 +++ .../Business/Spend/Services/SpendService.cs | 249 +++++ .../Business/Spend/Temp/Temp_CustoSpend.cs | 80 ++ .../GlobalUsings.cs | 22 + ...otelManagerSystemWebApi.Application.csproj | 30 +- .../GoodBad/Services/IWorkerGoodBadService.cs | 49 + .../GoodBad/Services/WorkerGoodBadService.cs | 77 ++ .../Worker/GoodBad/Temp/Temp_Goodbad.cs | 67 ++ .../History/Services/IWorkerHistoryService.cs | 49 + .../History/Services/WorkerHistoryService.cs | 58 ++ .../Worker/History/Temp/Temp_History.cs | 59 ++ .../Services/IWorkerCheckService.cs | 64 ++ .../Services/WorkerCheckService.cs | 89 ++ .../WorkerCheck/Temp/Temp_WorkerCheck.cs | 61 ++ .../WorkerInfo/Services/IWorkerService.cs | 102 ++ .../WorkerInfo/Services/WorkerService.cs | 276 ++++++ .../Worker/WorkerInfo/Temp/Temp_WorkerInfo.cs | 115 +++ .../WorkerPic/Services/IWorkerPicService.cs | 40 + .../WorkerPic/Services/WorkerPicService.cs | 73 ++ .../Worker/WorkerPic/Temp/Temp_WorkerPic.cs | 28 + .../AdminInfo/Services/AdminInfoService.cs | 146 ++- .../Zero/AdminInfo/Services/AdminService.cs | 183 ++++ .../AdminInfo/Services/IAdminInfoService.cs | 65 ++ .../Zero/AdminInfo/Services/IAdminService.cs | 100 ++ .../Zero/AdminInfo/Temp/Temp_AdminInfo.cs | 65 ++ .../Zero/Base/Services/BaseService.cs | 685 +++++++++++++ .../Zero/Base/Services/IBaseService.cs | 369 +++++++ .../Zero/Base/Temp/Temp_CustomerType.cs | 44 + .../Zero/Base/Temp/Temp_Dept.cs | 67 ++ .../Zero/Base/Temp/Temp_Education.cs | 44 + .../Zero/Base/Temp/Temp_GoodbadType.cs | 49 + .../Zero/Base/Temp/Temp_Job.cs | 44 + .../Zero/Base/Temp/Temp_Nation.cs | 44 + .../Zero/Base/Temp/Temp_PassportType.cs | 44 + .../Zero/Base/Temp/Temp_SexType.cs | 45 + .../Zero/CheckInfo/CheckInfoService.cs | 49 + .../Zero/CheckInfo/ICheckInfoService.cs | 40 + .../Zero/CounterRule}/CounterHelper.cs | 0 .../Zero/Module/AdminModuleZeroService.cs | 138 +++ .../Zero/Module/IAdminModuleZeroService.cs | 43 + .../Zero/Notice/INoticeService.cs | 53 + .../Zero/Notice/NoticeService.cs | 97 ++ .../Zero/VipRule/IVipRuleAppService.cs | 73 ++ .../Zero/VipRule/VipRuleAppService.cs | 109 ++ .../Business/Cash/Cash.cs | 3 +- .../Business/Customer/Custo.cs | 3 +- .../Business/Fonts/Fonts.cs | 3 +- .../{Wti/Wti.cs => Hydropower/Hydropower.cs} | 3 +- .../Business/Reser/Reser.cs | 3 +- .../Business/Room/Room.cs | 3 +- .../Business/Room/RoomState.cs | 5 +- .../Business/Room/RoomType.cs | 3 +- .../Business/Spend/Spend.cs | 3 +- .../DtoExtend/BaseDto/IBaseDto.cs | 7 +- .../DtoExtend/BaseDto/IListDto.cs | 6 +- .../DtoExtend/BaseDto/MsgDto.cs | 2 +- .../DtoExtend/DtoExtend.cs | 112 ++- .../HotelManagerSystemWebApi.Core.csproj | 8 +- .../HotelManagerSystemWebApi.Core.xml | 927 +++++++++--------- .../Worker/{ => Goodbad}/GBType.cs | 0 .../Worker/{ => Goodbad}/WorkerGoodBad.cs | 0 .../Worker/{ => History}/WorkerHistory.cs | 0 .../Worker/{ => WorkerCheck}/WorkerCheck.cs | 0 .../Worker/{ => WorkerInfo}/Worker.cs | 3 +- .../Worker/{ => WorkerPic}/WorkerPic.cs | 0 .../Zero/{ => AdminInfo}/AdminInfo.cs | 0 .../Zero/{ => AdminInfo}/AdminType.cs | 0 .../Customer => Zero/Base}/CustoType.cs | 3 +- .../Zero/{ => Base}/Dept.cs | 3 +- .../Zero/{ => Base}/Education.cs | 0 .../Zero/{ => Base}/Nation.cs | 0 .../Customer => Zero/Base}/PassPortType.cs | 3 +- .../Customer => Zero/Base}/SexType.cs | 3 +- .../Zero/{ => Base}/position.cs | 0 .../Zero/{ => CheckInfo}/CheckInfo.cs | 0 .../Zero/{ => Module}/Module.cs | 0 .../Zero/{ => Module}/ModuleConsts.cs | 0 .../Zero/{ => Module}/ModuleZero.cs | 0 .../Zero/{ => Notice}/Notice.cs | 0 .../Zero/{ => OperationLog}/OperationLog.cs | 0 .../Zero/{ => VipRule}/VipRule.cs | 0 .../DbContexts/DefaultDbContext.cs | 1 + ...erSystemWebApi.EntityFramework.Core.csproj | 2 +- .../dbsettings.json | 3 +- .../Handlers/JwtHandler.cs | 12 +- .../HotelManagerSystemWebApi.Web.Core.csproj | 2 +- HotelManagerSystemWebApi.Web.Core/Startup.cs | 2 +- .../HotelManagerSystemWebApi.Web.Entry.csproj | 5 +- HotelManagerSystemWebApi.Web.Entry/Program.cs | 14 +- HotelManagerSystemWebApi.Web.Entry/Startup.cs | 27 - .../appsettings.json | 1 + 149 files changed, 9280 insertions(+), 539 deletions(-) create mode 100644 HotelManagerSystemWebApi.Application/Business/Cash/CashAppService.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Cash/Dtos/AddCashInfoDto.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Cash/Dtos/CashInfoListDto.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Cash/Dtos/OAddCashInfoDto.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Cash/Dtos/OCashInfoListDto.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Cash/Services/CashService.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Cash/Services/ICashService.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Cash/Temp/Temp_Cash.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Customer/CustoAppService.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Customer/Dtos/InsertCustomerInfoDto.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Customer/Dtos/OInsertCustomerInfoDto.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Customer/Dtos/OSelectAllMoneyDto.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Customer/Dtos/OSelectCustoAllDto.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Customer/Dtos/OUpdCustomerInfoDto.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Customer/Dtos/OUpdCustomerTypeByCustoNoDto.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Customer/Dtos/SelectCustoAllDto.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Customer/Dtos/UpdCustomerInfoDto.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Customer/Services/CustoService.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Customer/Services/ICustoService.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Customer/Temp/Temp_Customer.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Fonts/Dtos/OSelectFonListDto.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Fonts/FontsAppService.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Fonts/Services/FontsService.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Fonts/Services/IFontsService.cs rename HotelManagerSystemWebApi.Core/DtoExtend/BaseDto/BaseDto.cs => HotelManagerSystemWebApi.Application/Business/Fonts/Temp/Temp_Fonts.cs (42%) create mode 100644 HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/InsertHydropowerInfoDto.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/OInsertHydropowerInfoDto.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/OSelectHydropowerInfoAllDto.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/OUpdateHydropowerInfoDto.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/SelectHydropowerInfoAllDto.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/UpdateHydropowerInfoDto.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Hydropower/HydropowerAppService.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Hydropower/Services/HydropowerService.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Hydropower/Services/IHydropowerService.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Hydropower/Temp/Temp_Hydropower.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Reser/Dtos/InserReserInfoDto.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Reser/Dtos/OInserReserInfoDto.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Reser/Dtos/OSelectReserAllDto.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Reser/Dtos/SelectReserAllDto.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Reser/ReserAppService.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Reser/Services/IReserService.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Reser/Services/ReserService.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Reser/Temp/Temp_Reser.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Dtos/OSelectRoomTypesAllDto.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Dtos/SelectRoomTypesAllDto.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Services/IRoomService.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Services/IRoomTypeService.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Services/ORoomListDto.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Services/RoomListDto.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Services/RoomService.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Services/RoomTypeService.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Services/SelectRoomTypeByRoomNo.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Temp/Temp_Room.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Temp/Temp_RoomState.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Temp/Temp_RoomType.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Sellthing/Services/ISellService.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Sellthing/Services/SellService.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Sellthing/Temp/Temp_Sellthing.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Spend/Services/ISpendService.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Spend/Services/SpendService.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Spend/Temp/Temp_CustoSpend.cs create mode 100644 HotelManagerSystemWebApi.Application/GlobalUsings.cs create mode 100644 HotelManagerSystemWebApi.Application/Worker/GoodBad/Services/IWorkerGoodBadService.cs create mode 100644 HotelManagerSystemWebApi.Application/Worker/GoodBad/Services/WorkerGoodBadService.cs create mode 100644 HotelManagerSystemWebApi.Application/Worker/GoodBad/Temp/Temp_Goodbad.cs create mode 100644 HotelManagerSystemWebApi.Application/Worker/History/Services/IWorkerHistoryService.cs create mode 100644 HotelManagerSystemWebApi.Application/Worker/History/Services/WorkerHistoryService.cs create mode 100644 HotelManagerSystemWebApi.Application/Worker/History/Temp/Temp_History.cs create mode 100644 HotelManagerSystemWebApi.Application/Worker/WorkerCheck/Services/IWorkerCheckService.cs create mode 100644 HotelManagerSystemWebApi.Application/Worker/WorkerCheck/Services/WorkerCheckService.cs create mode 100644 HotelManagerSystemWebApi.Application/Worker/WorkerCheck/Temp/Temp_WorkerCheck.cs create mode 100644 HotelManagerSystemWebApi.Application/Worker/WorkerInfo/Services/IWorkerService.cs create mode 100644 HotelManagerSystemWebApi.Application/Worker/WorkerInfo/Services/WorkerService.cs create mode 100644 HotelManagerSystemWebApi.Application/Worker/WorkerInfo/Temp/Temp_WorkerInfo.cs create mode 100644 HotelManagerSystemWebApi.Application/Worker/WorkerPic/Services/IWorkerPicService.cs create mode 100644 HotelManagerSystemWebApi.Application/Worker/WorkerPic/Services/WorkerPicService.cs create mode 100644 HotelManagerSystemWebApi.Application/Worker/WorkerPic/Temp/Temp_WorkerPic.cs create mode 100644 HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services/AdminService.cs create mode 100644 HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services/IAdminService.cs create mode 100644 HotelManagerSystemWebApi.Application/Zero/AdminInfo/Temp/Temp_AdminInfo.cs create mode 100644 HotelManagerSystemWebApi.Application/Zero/Base/Services/BaseService.cs create mode 100644 HotelManagerSystemWebApi.Application/Zero/Base/Services/IBaseService.cs create mode 100644 HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_CustomerType.cs create mode 100644 HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_Dept.cs create mode 100644 HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_Education.cs create mode 100644 HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_GoodbadType.cs create mode 100644 HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_Job.cs create mode 100644 HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_Nation.cs create mode 100644 HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_PassportType.cs create mode 100644 HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_SexType.cs create mode 100644 HotelManagerSystemWebApi.Application/Zero/CheckInfo/CheckInfoService.cs create mode 100644 HotelManagerSystemWebApi.Application/Zero/CheckInfo/ICheckInfoService.cs rename {HotelManagerSystemWebApi.Core/Util => HotelManagerSystemWebApi.Application/Zero/CounterRule}/CounterHelper.cs (100%) create mode 100644 HotelManagerSystemWebApi.Application/Zero/Module/AdminModuleZeroService.cs create mode 100644 HotelManagerSystemWebApi.Application/Zero/Module/IAdminModuleZeroService.cs create mode 100644 HotelManagerSystemWebApi.Application/Zero/Notice/INoticeService.cs create mode 100644 HotelManagerSystemWebApi.Application/Zero/Notice/NoticeService.cs create mode 100644 HotelManagerSystemWebApi.Application/Zero/VipRule/IVipRuleAppService.cs create mode 100644 HotelManagerSystemWebApi.Application/Zero/VipRule/VipRuleAppService.cs rename HotelManagerSystemWebApi.Core/Business/{Wti/Wti.cs => Hydropower/Hydropower.cs} (97%) rename HotelManagerSystemWebApi.Core/Worker/{ => Goodbad}/GBType.cs (100%) rename HotelManagerSystemWebApi.Core/Worker/{ => Goodbad}/WorkerGoodBad.cs (100%) rename HotelManagerSystemWebApi.Core/Worker/{ => History}/WorkerHistory.cs (100%) rename HotelManagerSystemWebApi.Core/Worker/{ => WorkerCheck}/WorkerCheck.cs (100%) rename HotelManagerSystemWebApi.Core/Worker/{ => WorkerInfo}/Worker.cs (98%) rename HotelManagerSystemWebApi.Core/Worker/{ => WorkerPic}/WorkerPic.cs (100%) rename HotelManagerSystemWebApi.Core/Zero/{ => AdminInfo}/AdminInfo.cs (100%) rename HotelManagerSystemWebApi.Core/Zero/{ => AdminInfo}/AdminType.cs (100%) rename HotelManagerSystemWebApi.Core/{Business/Customer => Zero/Base}/CustoType.cs (97%) rename HotelManagerSystemWebApi.Core/Zero/{ => Base}/Dept.cs (98%) rename HotelManagerSystemWebApi.Core/Zero/{ => Base}/Education.cs (100%) rename HotelManagerSystemWebApi.Core/Zero/{ => Base}/Nation.cs (100%) rename HotelManagerSystemWebApi.Core/{Business/Customer => Zero/Base}/PassPortType.cs (97%) rename HotelManagerSystemWebApi.Core/{Business/Customer => Zero/Base}/SexType.cs (97%) rename HotelManagerSystemWebApi.Core/Zero/{ => Base}/position.cs (100%) rename HotelManagerSystemWebApi.Core/Zero/{ => CheckInfo}/CheckInfo.cs (100%) rename HotelManagerSystemWebApi.Core/Zero/{ => Module}/Module.cs (100%) rename HotelManagerSystemWebApi.Core/Zero/{ => Module}/ModuleConsts.cs (100%) rename HotelManagerSystemWebApi.Core/Zero/{ => Module}/ModuleZero.cs (100%) rename HotelManagerSystemWebApi.Core/Zero/{ => Notice}/Notice.cs (100%) rename HotelManagerSystemWebApi.Core/Zero/{ => OperationLog}/OperationLog.cs (100%) rename HotelManagerSystemWebApi.Core/Zero/{ => VipRule}/VipRule.cs (100%) delete mode 100644 HotelManagerSystemWebApi.Web.Entry/Startup.cs diff --git a/HotelManagerSystemWebApi.Application/Business/Cash/CashAppService.cs b/HotelManagerSystemWebApi.Application/Business/Cash/CashAppService.cs new file mode 100644 index 0000000..72109d8 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Cash/CashAppService.cs @@ -0,0 +1,49 @@ +using Furion.DynamicApiController; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 资产信息控制器 + /// + public class CashAppService: IDynamicApiController + { + /// + /// 资产信息 + /// + private readonly ICashService cashService; + + /// + /// + /// + /// + public CashAppService(ICashService cashService) + { + this.cashService = cashService; + } + + /// + /// 添加资产信息 + /// + /// + /// + public OAddCashInfoDto AddCashInfo(AddCashInfoDto addCashInfoDto) + { + return cashService.AddCashInfo(addCashInfoDto); + } + + /// + /// 查询资产信息 + /// + /// + public OCashInfoListDto SelectCashInfoAll(CashInfoListDto cashInfoListDto) + { + return cashService.SelectCashInfoAll(cashInfoListDto); + } + + } +} diff --git a/HotelManagerSystemWebApi.Application/Business/Cash/Dtos/AddCashInfoDto.cs b/HotelManagerSystemWebApi.Application/Business/Cash/Dtos/AddCashInfoDto.cs new file mode 100644 index 0000000..1e02044 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Cash/Dtos/AddCashInfoDto.cs @@ -0,0 +1,84 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using HotelManagerSystemWebApi.Core; +using System; +using System.ComponentModel.DataAnnotations; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 添加资产信息 + /// 输入DTO + /// + public class AddCashInfoDto:IBaseDto + { + /// + /// 资产编号 + /// + public string CashNo { get; set; } + /// + /// 资产名称 + /// + [Required] + public string CashName { get; set; } + /// + /// 资产总值 + /// + [Required] + public decimal CashPrice { get; set; } + /// + /// 所属部门 + /// + [Required] + public string CashClub { get; set; } + /// + /// 入库时间 + /// + [Required] + public DateTime CashTime { get; set; } + /// + /// 资产来源 + /// + [Required] + public string CashSource { get; set; } + /// + /// 资产经办人 + /// + [Required] + public string CashPerson { get; set; } + /// + /// 删除标记 + /// + public int delete_mk { get; set; } + /// + /// 资料创建人 + /// + public string datains_usr { get; set; } + /// + /// 资料创建时间 + /// + public DateTime? datains_date { get; set; } + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Cash/Dtos/CashInfoListDto.cs b/HotelManagerSystemWebApi.Application/Business/Cash/Dtos/CashInfoListDto.cs new file mode 100644 index 0000000..20475d8 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Cash/Dtos/CashInfoListDto.cs @@ -0,0 +1,44 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using HotelManagerSystemWebApi.Core; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 查询资产信息 + /// 输入DTO + /// + public class CashInfoListDto:IListDto + { + /// + /// 资产编号 + /// + public string CashNo { get; set; } + /// + /// 资产名称 + /// + public string CashName { get; set; } + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Cash/Dtos/OAddCashInfoDto.cs b/HotelManagerSystemWebApi.Application/Business/Cash/Dtos/OAddCashInfoDto.cs new file mode 100644 index 0000000..086f7a7 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Cash/Dtos/OAddCashInfoDto.cs @@ -0,0 +1,38 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using HotelManagerSystemWebApi.Core; +using System.Collections.Generic; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 添加资产信息 + /// 输出DTO + /// + public class OAddCashInfoDto:MsgDto + { + + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Cash/Dtos/OCashInfoListDto.cs b/HotelManagerSystemWebApi.Application/Business/Cash/Dtos/OCashInfoListDto.cs new file mode 100644 index 0000000..207ba52 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Cash/Dtos/OCashInfoListDto.cs @@ -0,0 +1,46 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using HotelManagerSystemWebApi.Core; +using System.Collections.Generic; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 查询资产信息 + /// 输出DTO + /// + public class OCashInfoListDto:MsgDto + { + /// + /// 数据源 + /// + public List listSource { get; set; } + + /// + /// 总数 + /// + public int total { get; set; } + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Cash/Services/CashService.cs b/HotelManagerSystemWebApi.Application/Business/Cash/Services/CashService.cs new file mode 100644 index 0000000..4427fa5 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Cash/Services/CashService.cs @@ -0,0 +1,138 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ +using Furion.DatabaseAccessor; +using Furion.DependencyInjection; +using Furion.LinqBuilder; +using HotelManagerSystemWebApi.Core; +using jvncorelib.CodeLib; +using System; +using System.Collections.Generic; +using System.Linq; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 资产信息接口实现类 + /// + public class CashService:ICashService, ITransient + { + /// + /// 资产信息 + /// + private readonly IRepository cashRepository; + + /// + /// 部门 + /// + private readonly IRepository deptRepository; + + /// + /// 员工 + /// + private readonly IRepository workerRepository; + + /// + /// + /// + /// + /// + /// + public CashService(IRepository cashRepository, IRepository deptRepository, IRepository workerRepository) + { + this.cashRepository = cashRepository; + this.deptRepository = deptRepository; + this.workerRepository = workerRepository; + } + + /// + /// 添加资产信息 + /// + /// + /// + public OAddCashInfoDto AddCashInfo(AddCashInfoDto addCashInfoDto) + { + OAddCashInfoDto oAddCashInfoDto = new OAddCashInfoDto(); + + var uncode = new UniqueCode(); + + var source = new Cash(); + + source = source.UpdateToModel(addCashInfoDto); + source.CashNo = uncode.GetNewId("CN"); + source.datains_usr = addCashInfoDto.NowLoginUsr; + source.datains_date = DateTime.Now; + this.cashRepository.Insert(source); + + oAddCashInfoDto.OK(); + + return oAddCashInfoDto; + } + + /// + /// 查询资产信息 + /// + /// + public OCashInfoListDto SelectCashInfoAll(CashInfoListDto cashInfoListDto) + { + OCashInfoListDto oCashInfoListDto = new OCashInfoListDto(); + + //查询所有部门信息 + var depts = deptRepository.AsQueryable(a => a.delete_mk != 1).ToList().CopyToModel(); + //查询所有员工信息 + var workers = workerRepository.AsQueryable(a => a.delete_mk != 1).ToList().CopyToModel(); + + var where = LinqExpression.Create(a => a.delete_mk != 1); + + //资产编号 + if (!cashInfoListDto.CashNo.IsNullOrEmpty()) + { + where = where.And(a => a.CashNo.Contains(cashInfoListDto.CashNo)); + } + //资产名称 + if (!cashInfoListDto.CashName.IsNullOrEmpty()) + { + where = where.And(a => a.CashName.Contains(cashInfoListDto.CashName)); + } + + //查询资产信息 + var listSource = cashRepository.AsQueryable(where).ToList().CopyToModel(); + + listSource.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; + + source.CashPriceStr = source.CashPrice == 0 ? "" : Decimal.Parse(source.CashPrice.ToString()).ToString("#,##0.00").ToString(); + + }); + + oCashInfoListDto.listSource = listSource; + oCashInfoListDto.total = listSource.Count; + + return oCashInfoListDto; + } + } +} diff --git a/HotelManagerSystemWebApi.Application/Business/Cash/Services/ICashService.cs b/HotelManagerSystemWebApi.Application/Business/Cash/Services/ICashService.cs new file mode 100644 index 0000000..7495024 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Cash/Services/ICashService.cs @@ -0,0 +1,47 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using System.Collections.Generic; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 资产信息接口 + /// + public interface ICashService + { + /// + /// 添加资产信息 + /// + /// + /// + OAddCashInfoDto AddCashInfo(AddCashInfoDto addCashInfoDto); + + /// + /// 查询资产信息 + /// + /// + OCashInfoListDto SelectCashInfoAll(CashInfoListDto cashInfoListDto); + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Cash/Temp/Temp_Cash.cs b/HotelManagerSystemWebApi.Application/Business/Cash/Temp/Temp_Cash.cs new file mode 100644 index 0000000..a97221b --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Cash/Temp/Temp_Cash.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 资产管理 + /// + public class Temp_Cash + { + /// + /// 资产编号 + /// + public string CashNo { get; set; } + /// + /// 资产名称 + /// + public string CashName { get; set; } + /// + /// 资产总值 + /// + public decimal CashPrice { get; set; } + /// + /// 资产总值描述 + /// + public string CashPriceStr { get; set; } + /// + /// 所属部门 + /// + public string CashClub { get; set; } + /// + /// 所属部门描述 + /// + public string DeptName { get; set; } + /// + /// 入库时间 + /// + public DateTime CashTime { get; set; } + /// + /// 资产来源 + /// + public string CashSource { get; set; } + /// + /// 资产经办人 + /// + public string CashPerson { get; set; } + /// + /// 资产经办人 + /// + public string PersonName { get; set; } + /// + /// 删除标记 + /// + public int delete_mk { get; set; } + /// + /// 资料创建人 + /// + public string datains_usr { get; set; } + /// + /// 资料创建时间 + /// + public DateTime? datains_date { get; set; } + /// + /// 资料更新人 + /// + public string datachg_usr { get; set; } + /// + /// 资料更新时间 + /// + public DateTime? datachg_date { get; set; } + + } +} diff --git a/HotelManagerSystemWebApi.Application/Business/Customer/CustoAppService.cs b/HotelManagerSystemWebApi.Application/Business/Customer/CustoAppService.cs new file mode 100644 index 0000000..dc9816a --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Customer/CustoAppService.cs @@ -0,0 +1,78 @@ +using Furion.DynamicApiController; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 客户信息控制器 + /// + public class CustoAppService: IDynamicApiController + { + /// + /// 客户信息 + /// + private readonly ICustoService _custoService; + + /// + /// + /// + /// + public CustoAppService(ICustoService custoService) + { + _custoService = custoService; + } + + /// + /// 添加客户信息 + /// + /// + /// + public OInsertCustomerInfoDto InsertCustomerInfo(InsertCustomerInfoDto insertCustomerInfoDto) + { + return _custoService.InsertCustomerInfo(insertCustomerInfoDto); + } + + /// + /// 更新客户信息 + /// + /// + /// + public OUpdCustomerInfoDto UpdCustomerInfoNo(UpdCustomerInfoDto updCustomerInfoDto) + { + return _custoService.UpdCustomerInfoNo(updCustomerInfoDto); + } + + /// + /// 更新客户类型(即会员等级) + /// + /// + /// + /// + //public OUpdCustomerTypeByCustoNoDto UpdCustomerTypeByCustoNo(string custoNo, int userType) + //{ + // return _custoService.UpdCustomerTypeByCustoNo(custoNo, userType); + //} + + /// + /// 查询酒店盈利情况 + /// + /// + public OSelectAllMoneyDto SelectAllMoney() + { + return _custoService.SelectAllMoney(); + } + + /// + /// 查询所有客户信息 + /// + /// + public OSelectCustoAllDto SelectCustoAll(SelectCustoAllDto selectCustoAllDto) + { + return _custoService.SelectCustoAll(selectCustoAllDto); + } + } +} diff --git a/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/InsertCustomerInfoDto.cs b/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/InsertCustomerInfoDto.cs new file mode 100644 index 0000000..87d5287 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/InsertCustomerInfoDto.cs @@ -0,0 +1,95 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using HotelManagerSystemWebApi.Core; +using System; +using System.ComponentModel.DataAnnotations; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 添加客户信息 + /// 输入DTO + /// + public class InsertCustomerInfoDto:IBaseDto + { + /// + /// 客户编号 + /// + public string CustoNo { get; set; } + /// + /// 客户名称 + /// + [Required] + public string CustoName { get; set; } + /// + /// 客户性别 + /// + [Required] + public int CustoSex { get; set; } + /// + /// 客户电话 + /// + [Required] + public string CustoTel { get; set; } + /// + /// 证件类型 + /// + [Required] + public int PassportType { get; set; } + /// + /// 证件号码 + /// + [Required] + public string CustoID { get; set; } + /// + /// 居住地址 + /// + public string CustoAdress { get; set; } + /// + /// 出生日期 + /// + public DateTime CustoBirth { get; set; } + /// + /// 客户类型 + /// + public int CustoType { get; set; } + /// + /// 客户类型 + /// + public string typeName { get; set; } + /// + /// 证件类型 + /// + public string PassportName { get; set; } + /// + /// 性别 + /// + public string SexName { get; set; } + /// + /// 删除标记 + /// + public int delete_mk { get; set; } + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/OInsertCustomerInfoDto.cs b/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/OInsertCustomerInfoDto.cs new file mode 100644 index 0000000..2e1d35b --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/OInsertCustomerInfoDto.cs @@ -0,0 +1,37 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using HotelManagerSystemWebApi.Core; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 添加客户信息 + /// 输出DTO + /// + public class OInsertCustomerInfoDto:MsgDto + { + + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/OSelectAllMoneyDto.cs b/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/OSelectAllMoneyDto.cs new file mode 100644 index 0000000..f301785 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/OSelectAllMoneyDto.cs @@ -0,0 +1,41 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using HotelManagerSystemWebApi.Core; +using System.Collections.Generic; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 查询酒店盈利情况 + /// 输出DTO + /// + public class OSelectAllMoneyDto:MsgDto + { + /// + /// 酒店盈利数据源 + /// + public List listSource { get; set; } + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/OSelectCustoAllDto.cs b/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/OSelectCustoAllDto.cs new file mode 100644 index 0000000..a2695f6 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/OSelectCustoAllDto.cs @@ -0,0 +1,46 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using HotelManagerSystemWebApi.Core; +using System.Collections.Generic; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 查询所有客户信息 + /// 输出DTO + /// + public class OSelectCustoAllDto:MsgDto + { + /// + /// 数据源 + /// + public List listSource { get; set; } + + /// + /// 总数 + /// + public int total { get; set; } + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/OUpdCustomerInfoDto.cs b/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/OUpdCustomerInfoDto.cs new file mode 100644 index 0000000..939a828 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/OUpdCustomerInfoDto.cs @@ -0,0 +1,36 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using HotelManagerSystemWebApi.Core; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 更新客户信息 + /// 输出DTO + /// + public class OUpdCustomerInfoDto : MsgDto + { + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/OUpdCustomerTypeByCustoNoDto.cs b/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/OUpdCustomerTypeByCustoNoDto.cs new file mode 100644 index 0000000..b615e66 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/OUpdCustomerTypeByCustoNoDto.cs @@ -0,0 +1,37 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using HotelManagerSystemWebApi.Core; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 更新客户类型(即会员等级) + /// 输出DTO + /// + public class OUpdCustomerTypeByCustoNoDto:MsgDto + { + + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/SelectCustoAllDto.cs b/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/SelectCustoAllDto.cs new file mode 100644 index 0000000..ca3bc72 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/SelectCustoAllDto.cs @@ -0,0 +1,44 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using HotelManagerSystemWebApi.Core; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 查询所有客户信息 + /// 输入DTO + /// + public class SelectCustoAllDto:IListDto + { + /// + /// 客户编号 + /// + public string CustoNo { get; set; } + /// + /// 客户名称 + /// + public string CustoName { get; set; } + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/UpdCustomerInfoDto.cs b/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/UpdCustomerInfoDto.cs new file mode 100644 index 0000000..bb8c5cb --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/UpdCustomerInfoDto.cs @@ -0,0 +1,96 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using HotelManagerSystemWebApi.Core; +using System; +using System.ComponentModel.DataAnnotations; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 更新客户信息 + /// 输入DTO + /// + public class UpdCustomerInfoDto : IBaseDto + { + /// + /// 客户编号 + /// + [Required] + public string CustoNo { get; set; } + /// + /// 客户名称 + /// + [Required] + public string CustoName { get; set; } + /// + /// 客户性别 + /// + [Required] + public int CustoSex { get; set; } + /// + /// 客户电话 + /// + [Required] + public string CustoTel { get; set; } + /// + /// 证件类型 + /// + [Required] + public int PassportType { get; set; } + /// + /// 证件号码 + /// + [Required] + public string CustoID { get; set; } + /// + /// 居住地址 + /// + public string CustoAdress { get; set; } + /// + /// 出生日期 + /// + public DateTime CustoBirth { get; set; } + /// + /// 客户类型 + /// + public int CustoType { get; set; } + /// + /// 客户类型 + /// + public string typeName { get; set; } + /// + /// 证件类型 + /// + public string PassportName { get; set; } + /// + /// 性别 + /// + public string SexName { get; set; } + /// + /// 删除标记 + /// + public int delete_mk { get; set; } + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Customer/Services/CustoService.cs b/HotelManagerSystemWebApi.Application/Business/Customer/Services/CustoService.cs new file mode 100644 index 0000000..11c970a --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Customer/Services/CustoService.cs @@ -0,0 +1,251 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ +using Furion.DatabaseAccessor; +using Furion.DependencyInjection; +using Furion.LinqBuilder; +using HotelManagerSystemWebApi.Core; +using jvncorelib.CodeLib; +using jvncorelib.EncryptorLib; +using jvncorelib.EntityLib; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 客户信息接口实现类 + /// + public class CustoService:ICustoService, ITransient + { + /// + /// 客户信息 + /// + private readonly IRepository customerRepository; + + /// + /// 客户消费信息 + /// + private readonly IRepository spendRepository; + + /// + /// 客户类型 + /// + private readonly IRepository customerTypeRepository; + + /// + /// 性别类型 + /// + private readonly IRepository sexTypeRepository; + + /// + /// 证件类型 + /// + private readonly IRepository passportTypeRepository; + + EncryptLib encryptLib = new EncryptLib(); + + /// + /// + /// + /// + /// + /// + /// + /// + public CustoService(IRepository customerRepository, IRepository customerTypeRepository, IRepository sexTypeRepository, IRepository passportTypeRepository, EncryptLib encryptLib) + { + this.customerRepository = customerRepository; + this.customerTypeRepository = customerTypeRepository; + this.sexTypeRepository = sexTypeRepository; + this.passportTypeRepository = passportTypeRepository; + this.encryptLib = encryptLib; + } + + #region 添加客户信息 + /// + /// 添加客户信息 + /// + /// + /// + public OInsertCustomerInfoDto InsertCustomerInfo(InsertCustomerInfoDto insertCustomerInfoDto) + { + OInsertCustomerInfoDto oInsertCustomerInfoDto = new OInsertCustomerInfoDto(); + + var uncode = new UniqueCode(); + + var source = new Custo(); + + source = source.UpdateToModel(insertCustomerInfoDto); + source.CustoNo = uncode.GetNewId("TS"); + source.CustoID = encryptLib.Encryption(source.CustoID); + source.CustoTel = encryptLib.Encryption(source.CustoTel); + this.customerRepository.Insert(source); + oInsertCustomerInfoDto.OK(); + + return oInsertCustomerInfoDto; + } + #endregion + + /// + /// 更新客户信息 + /// + /// + /// + public OUpdCustomerInfoDto UpdCustomerInfoNo(UpdCustomerInfoDto updCustomerInfoDto) + { + OUpdCustomerInfoDto oUpdCustomerInfoDto = new OUpdCustomerInfoDto(); + + var source = this.customerRepository.SingleOrDefault(a => a.CustoNo.Equals(updCustomerInfoDto.CustoNo)); + + if (source.IsNullOrEmpty()) + { + oUpdCustomerInfoDto.Error_NotFound(); + return oUpdCustomerInfoDto; + } + + source = source.UpdateToModel(updCustomerInfoDto); + source.CustoID = encryptLib.Encryption(source.CustoID); + source.CustoTel = encryptLib.Encryption(source.CustoTel); + this.customerRepository.Update(source); + + oUpdCustomerInfoDto.OK(); + + return oUpdCustomerInfoDto; + + } + + /// + /// 更新客户类型(即会员等级) + /// + /// + /// + /// + //public OUpdCustomerTypeByCustoNoDto UpdCustomerTypeByCustoNo(string custoNo, int userType) + //{ + // OUpdCustomerTypeByCustoNoDto oUpdCustomerTypeByCustoNoDto = new OUpdCustomerTypeByCustoNoDto(); + + // customerRepository.Update(new Custo { CustoNo = custoNo, CustoType = userType }); + // oUpdCustomerTypeByCustoNoDto.OK(); + + // return oUpdCustomerTypeByCustoNoDto; + + //} + + /// + /// 查询酒店盈利情况 + /// + /// + public OSelectAllMoneyDto SelectAllMoney() + { + OSelectAllMoneyDto oSelectAllMoneyDto = new OSelectAllMoneyDto(); + + List custoSpends = new List(); + var listSource = spendRepository.AsQueryable(a => a.MoneyState.Equals(SpendConsts.Settled)) + .OrderBy(a => a.SpendTime).ToList().CopyToModel(); + var listDates = new List(); + listSource.ForEach(source => + { + var year = source.SpendTime.ToString("yyyy"); + if (!custoSpends.Select(a => a.Years).ToList().Contains(year)) + { + var startDate = new DateTime(source.SpendTime.Year, 1, 1, 0, 0, 0); + var endDate = new DateTime(source.SpendTime.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) + }); + } + }); + + custoSpends = custoSpends.OrderBy(a => a.Years).ToList(); + oSelectAllMoneyDto.listSource = custoSpends; + oSelectAllMoneyDto.OK(); + + return oSelectAllMoneyDto; + } + + /// + /// 查询所有客户信息 + /// + /// + public OSelectCustoAllDto SelectCustoAll(SelectCustoAllDto selectCustoAllDto) + { + OSelectCustoAllDto oSelectCustoAllDto = new OSelectCustoAllDto(); + + //查询出所有性别类型 + var sexTypes = sexTypeRepository.AsQueryable().ToList().CopyToModel(); + //查询出所有证件类型 + var passPortTypes = passportTypeRepository.AsQueryable().ToList().CopyToModel(); + //查询出所有客户类型 + var custoTypes = customerTypeRepository.AsQueryable().ToList().CopyToModel(); + + var where = LinqExpression.Create(a => a.delete_mk != 1); + + if (!selectCustoAllDto.CustoNo.IsNullOrEmpty()) + { + where = where.And(a => a.CustoNo.Contains(selectCustoAllDto.CustoNo)); + } + + if (!selectCustoAllDto.CustoName.IsNullOrEmpty()) + { + where = where.And(a => a.CustoName.Contains(selectCustoAllDto.CustoName)); + } + + var count = 0; + + //查询出所有客户信息 + var custos = customerRepository.AsQueryable(where).OrderBy(a => a.CustoNo).ToList() + .GetPageList(selectCustoAllDto.PageIndex, selectCustoAllDto.PageSize, ref count) + .CopyToModel(); + + custos.ForEach(source => + { + //解密身份证号码 + var sourceStr = source.CustoID.Contains("·") ? encryptLib.Decryption(source.CustoID) : source.CustoID; + source.CustoID = sourceStr; + //解密联系方式 + var sourceTelStr = source.CustoTel.Contains("·") ? encryptLib.Decryption(source.CustoTel) : source.CustoTel; + source.CustoTel = sourceTelStr; + //性别类型 + var sexType = sexTypes.FirstOrDefault(a => a.sexId == source.CustoSex); + source.SexName = string.IsNullOrEmpty(sexType.sexName) ? "" : sexType.sexName; + //证件类型 + var passPortType = passPortTypes.FirstOrDefault(a => a.PassportId == source.PassportType); + source.PassportName = string.IsNullOrEmpty(passPortType.PassportName) ? "" : passPortType.PassportName; + //客户类型 + var custoType = custoTypes.FirstOrDefault(a => a.UserType == source.CustoType); + source.typeName = string.IsNullOrEmpty(custoType.TypeName) ? "" : custoType.TypeName; + }); + + oSelectCustoAllDto.listSource = custos; + oSelectCustoAllDto.total = count; + oSelectCustoAllDto.OK(); + return oSelectCustoAllDto; + } + + } +} diff --git a/HotelManagerSystemWebApi.Application/Business/Customer/Services/ICustoService.cs b/HotelManagerSystemWebApi.Application/Business/Customer/Services/ICustoService.cs new file mode 100644 index 0000000..bf4e4dd --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Customer/Services/ICustoService.cs @@ -0,0 +1,70 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using System.Collections.Generic; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 客户信息接口 + /// + public interface ICustoService + { + /// + /// 添加客户信息 + /// + /// + /// + OInsertCustomerInfoDto InsertCustomerInfo(InsertCustomerInfoDto insertCustomerInfoDto); + + /// + /// 更新客户信息 + /// + /// + /// + OUpdCustomerInfoDto UpdCustomerInfoNo(UpdCustomerInfoDto updCustomerInfoDto); + + /// + /// 更新客户类型(即会员等级) + /// + /// + /// + /// + //OUpdCustomerTypeByCustoNoDto UpdCustomerTypeByCustoNo(string custoNo, int userType); + + /// + /// 查询酒店盈利情况 + /// + /// + OSelectAllMoneyDto SelectAllMoney(); + + /// + /// 查询所有客户信息 + /// + /// + OSelectCustoAllDto SelectCustoAll(SelectCustoAllDto selectCustoAllDto); + + + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Customer/Temp/Temp_Customer.cs b/HotelManagerSystemWebApi.Application/Business/Customer/Temp/Temp_Customer.cs new file mode 100644 index 0000000..790c386 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Customer/Temp/Temp_Customer.cs @@ -0,0 +1,83 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 客户信息 + /// + public class Temp_Customer + { + /// + /// 客户编号 + /// + public string CustoNo { get; set; } + /// + /// 客户名称 + /// + public string CustoName { get; set; } + /// + /// 客户性别 + /// + public int CustoSex { get; set; } + /// + /// 客户电话 + /// + public string CustoTel { get; set; } + /// + /// 证件类型 + /// + public int PassportType { get; set; } + /// + /// 证件号码 + /// + public string CustoID { get; set; } + /// + /// 居住地址 + /// + public string CustoAdress { get; set; } + /// + /// 出生日期 + /// + public DateTime CustoBirth { get; set; } + /// + /// 客户类型 + /// + public int CustoType { get; set; } + /// + /// 客户类型 + /// + public string typeName { get; set; } + /// + /// 证件类型 + /// + public string PassportName { get; set; } + /// + /// 性别 + /// + public string SexName { get; set; } + /// + /// 删除标记 + /// + public int delete_mk { get; set; } + /// + /// 资料创建人 + /// + public string datains_usr { get; set; } + /// + /// 资料创建时间 + /// + public DateTime datains_date { get; set; } + /// + /// 资料更新人 + /// + public string datachg_usr { get; set; } + /// + /// 资料更新时间 + /// + public DateTime datachg_date { get; set; } + } +} diff --git a/HotelManagerSystemWebApi.Application/Business/Fonts/Dtos/OSelectFonListDto.cs b/HotelManagerSystemWebApi.Application/Business/Fonts/Dtos/OSelectFonListDto.cs new file mode 100644 index 0000000..e9d90b9 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Fonts/Dtos/OSelectFonListDto.cs @@ -0,0 +1,41 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using HotelManagerSystemWebApi.Core; +using System.Collections.Generic; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 查询所有宣传联动内容(跑马灯) + /// 输出DTO + /// + public class OSelectFonListDto:MsgDto + { + /// + /// 数据源 + /// + public List listSource { get; set; } + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Fonts/FontsAppService.cs b/HotelManagerSystemWebApi.Application/Business/Fonts/FontsAppService.cs new file mode 100644 index 0000000..813fa27 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Fonts/FontsAppService.cs @@ -0,0 +1,38 @@ +using Furion.DynamicApiController; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 跑马灯宣传 + /// + public class FontsAppService:IDynamicApiController + { + /// + /// 跑马灯宣传 + /// + private readonly IFontsService _fontsService; + + /// + /// + /// + /// + public FontsAppService(IFontsService fontsService) + { + _fontsService = fontsService; + } + + /// + /// 查询所有宣传联动内容(跑马灯) + /// + /// + public OSelectFonListDto SelectFonList() + { + return _fontsService.SelectFonList(); + } + } +} diff --git a/HotelManagerSystemWebApi.Application/Business/Fonts/Services/FontsService.cs b/HotelManagerSystemWebApi.Application/Business/Fonts/Services/FontsService.cs new file mode 100644 index 0000000..26ee857 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Fonts/Services/FontsService.cs @@ -0,0 +1,68 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ +using Furion.DatabaseAccessor; +using Furion.DependencyInjection; +using HotelManagerSystemWebApi.Core; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 酒店宣传联动内容接口实现类 + /// + public class FontsService:IFontsService, ITransient + { + /// + /// 字幕宣传 + /// + private readonly IRepository fontsRepository; + + /// + /// + /// + /// + public FontsService(IRepository fontsRepository) + { + this.fontsRepository = fontsRepository; + } + + /// + /// 查询所有宣传联动内容(跑马灯) + /// + /// + public OSelectFonListDto SelectFonList() + { + OSelectFonListDto oSelectFonListDto = new OSelectFonListDto(); + + var listSource = fontsRepository.AsQueryable().ToList().CopyToModel(); + + oSelectFonListDto.listSource = listSource; + return oSelectFonListDto; + } + } +} diff --git a/HotelManagerSystemWebApi.Application/Business/Fonts/Services/IFontsService.cs b/HotelManagerSystemWebApi.Application/Business/Fonts/Services/IFontsService.cs new file mode 100644 index 0000000..27d2f0a --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Fonts/Services/IFontsService.cs @@ -0,0 +1,40 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using System.Collections.Generic; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 酒店宣传联动内容接口 + /// + public interface IFontsService + { + /// + /// 查询所有宣传联动内容(跑马灯) + /// + /// + OSelectFonListDto SelectFonList(); + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Core/DtoExtend/BaseDto/BaseDto.cs b/HotelManagerSystemWebApi.Application/Business/Fonts/Temp/Temp_Fonts.cs similarity index 42% rename from HotelManagerSystemWebApi.Core/DtoExtend/BaseDto/BaseDto.cs rename to HotelManagerSystemWebApi.Application/Business/Fonts/Temp/Temp_Fonts.cs index 70008b1..0d19e68 100644 --- a/HotelManagerSystemWebApi.Core/DtoExtend/BaseDto/BaseDto.cs +++ b/HotelManagerSystemWebApi.Application/Business/Fonts/Temp/Temp_Fonts.cs @@ -4,16 +4,21 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace HotelManagerSystemWebApi.Core +namespace HotelManagerSystemWebApi.Application { /// - /// DTO基础类 + /// 酒店宣传联动内容 /// - public class BaseDto + public class Temp_Fonts { /// - /// 当前登录人员 + /// 宣传内容编号 /// - public string NowLoginUsr { get; set; } + public int FontsId { get; set; } + + /// + /// 宣传内容 + /// + public string FontsMess { get; set; } } } diff --git a/HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/InsertHydropowerInfoDto.cs b/HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/InsertHydropowerInfoDto.cs new file mode 100644 index 0000000..60df3a3 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/InsertHydropowerInfoDto.cs @@ -0,0 +1,74 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using HotelManagerSystemWebApi.Core; +using System; +using System.ComponentModel.DataAnnotations; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 添加水电费信息 + /// 输入DTO + /// + public class InsertHydropowerInfoDto:IBaseDto + { + /// + /// 房间编号 + /// + [Required] + public string RoomNo { get; set; } + /// + /// 开始使用时间 + /// + [Required] + public DateTime UseDate { get; set; } + /// + /// 结束使用时间 + /// + [Required] + public DateTime EndDate { get; set; } + /// + /// 水费 + /// + public decimal WaterUse { get; set; } + /// + /// 电费 + /// + public decimal PowerUse { get; set; } + /// + /// 记录员 + /// + public string Record { get; set; } + /// + /// 客户编号 + /// + [Required] + public string CustoNo { get; set; } + /// + /// 删除标记 + /// + public int delete_mk { get; set; } + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/OInsertHydropowerInfoDto.cs b/HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/OInsertHydropowerInfoDto.cs new file mode 100644 index 0000000..e5deeeb --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/OInsertHydropowerInfoDto.cs @@ -0,0 +1,36 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using HotelManagerSystemWebApi.Core; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 添加水电费信息 + /// 输出DTO + /// + public class OInsertHydropowerInfoDto:MsgDto + { + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/OSelectHydropowerInfoAllDto.cs b/HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/OSelectHydropowerInfoAllDto.cs new file mode 100644 index 0000000..55cd07c --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/OSelectHydropowerInfoAllDto.cs @@ -0,0 +1,26 @@ +using HotelManagerSystemWebApi.Core; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 获取所有水电费信息 + /// 输出DTO + /// + public class OSelectHydropowerInfoAllDto : MsgDto + { + /// + /// 数据源 + /// + public List listSource { get; set; } + + /// + /// 总数 + /// + public int total { get; set; } + } +} diff --git a/HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/OUpdateHydropowerInfoDto.cs b/HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/OUpdateHydropowerInfoDto.cs new file mode 100644 index 0000000..be6750e --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/OUpdateHydropowerInfoDto.cs @@ -0,0 +1,36 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using HotelManagerSystemWebApi.Core; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 修改水电费信息 + /// 输出DTO + /// + public class OUpdateHydropowerInfoDto:MsgDto + { + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/SelectHydropowerInfoAllDto.cs b/HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/SelectHydropowerInfoAllDto.cs new file mode 100644 index 0000000..5913027 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/SelectHydropowerInfoAllDto.cs @@ -0,0 +1,73 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using HotelManagerSystemWebApi.Core; +using System; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 获取所有水电费信息 + /// 输入DTO + /// + public class SelectHydropowerInfoAllDto:IListDto + { + /// + /// 信息编号 + /// + public int? WtiNo { get; set; } + /// + /// 房间编号 + /// + public string RoomNo { get; set; } + /// + /// 开始使用时间 + /// + public DateTime? UseDate { get; set; } + /// + /// 结束使用时间 + /// + public DateTime? EndDate { get; set; } + /// + /// 水费 + /// + public decimal WaterUse { get; set; } + /// + /// 电费 + /// + public decimal PowerUse { get; set; } + /// + /// 记录员 + /// + public string Record { get; set; } + /// + /// 客户编号 + /// + public string CustoNo { get; set; } + /// + /// 删除标记 + /// + public int delete_mk { get; set; } + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/UpdateHydropowerInfoDto.cs b/HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/UpdateHydropowerInfoDto.cs new file mode 100644 index 0000000..09a8d10 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/UpdateHydropowerInfoDto.cs @@ -0,0 +1,81 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using HotelManagerSystemWebApi.Core; +using System; +using System.ComponentModel.DataAnnotations; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 修改水电费信息 + /// 输入DTO + /// + public class UpdateHydropowerInfoDto:IBaseDto + { + /// + /// 信息编号 + /// + [Required] + public int WtiNo { get; set; } + /// + /// 房间编号 + /// + [Required] + public string RoomNo { get; set; } + /// + /// 开始使用时间 + /// + [Required] + public DateTime UseDate { get; set; } + /// + /// 结束使用时间 + /// + [Required] + public DateTime EndDate { get; set; } + /// + /// 水费 + /// + [Required] + public decimal WaterUse { get; set; } + /// + /// 电费 + /// + [Required] + public decimal PowerUse { get; set; } + /// + /// 记录员 + /// + public string Record { get; set; } + /// + /// 客户编号 + /// + [Required] + public string CustoNo { get; set; } + /// + /// 删除标记 + /// + public int delete_mk { get; set; } + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Hydropower/HydropowerAppService.cs b/HotelManagerSystemWebApi.Application/Business/Hydropower/HydropowerAppService.cs new file mode 100644 index 0000000..dde9929 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Hydropower/HydropowerAppService.cs @@ -0,0 +1,58 @@ +using Furion.DynamicApiController; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 水电信息控制器 + /// + public class HydropowerAppService:IDynamicApiController + { + /// + /// 水电信息 + /// + private readonly IHydropowerService hydropowerService; + + /// + /// + /// + /// + public HydropowerAppService(IHydropowerService hydropowerService) + { + this.hydropowerService = hydropowerService; + } + + /// + /// 获取所有水电费信息 + /// + /// + public OSelectHydropowerInfoAllDto SelectHydropowerInfoAll(SelectHydropowerInfoAllDto selectHydropowerInfoAllDto) + { + return hydropowerService.SelectHydropowerInfoAll(selectHydropowerInfoAllDto); + } + + /// + /// 添加水电费信息 + /// + /// + /// + public OInsertHydropowerInfoDto InsertHydropowerInfo(InsertHydropowerInfoDto insertHydropowerInfoDto) + { + return hydropowerService.InsertHydropowerInfo(insertHydropowerInfoDto); + } + + /// + /// 修改水电费信息 + /// + /// + /// + public OUpdateHydropowerInfoDto UpdateHydropowerInfo(UpdateHydropowerInfoDto updateHydropowerInfoDto) + { + return hydropowerService.UpdateHydropowerInfo(updateHydropowerInfoDto); + } + } +} diff --git a/HotelManagerSystemWebApi.Application/Business/Hydropower/Services/HydropowerService.cs b/HotelManagerSystemWebApi.Application/Business/Hydropower/Services/HydropowerService.cs new file mode 100644 index 0000000..73e96bb --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Hydropower/Services/HydropowerService.cs @@ -0,0 +1,160 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ +using Furion.DatabaseAccessor; +using Furion.DependencyInjection; +using Furion.LinqBuilder; +using HotelManagerSystemWebApi.Core; +using jvncorelib.EntityLib; +using System; +using System.Collections.Generic; +using System.Linq; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 水电信息接口实现类 + /// + public class HydropowerService:IHydropowerService, ITransient + { + /// + /// 水电 + /// + private readonly IRepository hydropowerRepository; + + /// + /// 客户信息 + /// + private readonly IRepository customerRepository; + + /// + /// + /// + /// + /// + public HydropowerService(IRepository hydropowerRepository, IRepository customerRepository) + { + this.hydropowerRepository = hydropowerRepository; + this.customerRepository = customerRepository; + } + + /// + /// 获取所有水电费信息 + /// + /// + public OSelectHydropowerInfoAllDto SelectHydropowerInfoAll(SelectHydropowerInfoAllDto selectHydropowerInfoAllDto) + { + OSelectHydropowerInfoAllDto oSelectHydropowerInfoAllDto = new OSelectHydropowerInfoAllDto(); + + var where = LinqExpression.Create(a => a.delete_mk != 1); + + //流水号 + if (!selectHydropowerInfoAllDto.WtiNo.IsNullOrEmpty()) + { + where = where.And(a => a.WtiNo == selectHydropowerInfoAllDto.WtiNo); + } + //房间号码 + if (!selectHydropowerInfoAllDto.RoomNo.IsNullOrEmpty()) + { + where = where.And(a => a.RoomNo == selectHydropowerInfoAllDto.RoomNo); + } + //开始时间、结束时间 + if (!selectHydropowerInfoAllDto.UseDate.IsNullOrEmpty() && !selectHydropowerInfoAllDto.EndDate.IsNullOrEmpty()) + { + where = where.And(a => a.UseDate >= selectHydropowerInfoAllDto.UseDate && a.EndDate <= selectHydropowerInfoAllDto.EndDate); + } + //客户编号 + if (!selectHydropowerInfoAllDto.CustoNo.IsNullOrEmpty()) + { + where = where.And(a => a.CustoNo.Equals(selectHydropowerInfoAllDto.CustoNo)); + } + + var count = 0; + + var listSource = hydropowerRepository.AsQueryable(where).ToList() + .GetPageList(selectHydropowerInfoAllDto.PageIndex, selectHydropowerInfoAllDto.PageSize, ref count) + .CopyToModel(); + + var listCustomerId = listSource.Select(a => a.CustoNo).Distinct().ToList(); + var listCustomer = this.customerRepository.AsQueryable(a => listCustomerId.Contains(a.CustoNo)); + + listSource.ForEach(source => + { + var customer = listCustomer.FirstOrDefault(a => a.CustoNo.Equals(source.CustoNo)); + source.CustoNm = customer.IsNullOrEmpty() ? "" : customer.CustoName; + }); + + oSelectHydropowerInfoAllDto.listSource = listSource; + oSelectHydropowerInfoAllDto.total = count; + oSelectHydropowerInfoAllDto.OK(); + + return oSelectHydropowerInfoAllDto; + } + + /// + /// 添加水电费信息 + /// + /// + /// + public OInsertHydropowerInfoDto InsertHydropowerInfo(InsertHydropowerInfoDto insertHydropowerInfoDto) + { + OInsertHydropowerInfoDto oInsertHydropowerInfoDto = new OInsertHydropowerInfoDto(); + + var source = new Hydropower(); + + source = source.UpdateToModel(insertHydropowerInfoDto); + source.datains_usr = insertHydropowerInfoDto.NowLoginUsr; + source.datains_date = DateTime.Now; + this.hydropowerRepository.Insert(source); + oInsertHydropowerInfoDto.OK(); + + return oInsertHydropowerInfoDto; + } + + /// + /// 修改水电费信息 + /// + /// + /// + public OUpdateHydropowerInfoDto UpdateHydropowerInfo(UpdateHydropowerInfoDto updateHydropowerInfoDto) + { + OUpdateHydropowerInfoDto oUpdateHydropowerInfoDto = new OUpdateHydropowerInfoDto(); + + var source = hydropowerRepository.SingleOrDefault(a => a.WtiNo == updateHydropowerInfoDto.WtiNo); + + if(source.IsNullOrEmpty()) + { + oUpdateHydropowerInfoDto.Error_NotFound(); + return oUpdateHydropowerInfoDto; + } + + source = source.UpdateToModel(updateHydropowerInfoDto); + source.datains_usr = updateHydropowerInfoDto.NowLoginUsr; + source.datains_date = DateTime.Now; + this.hydropowerRepository.Update(source); + oUpdateHydropowerInfoDto.OK(); + + return oUpdateHydropowerInfoDto; + } + } +} diff --git a/HotelManagerSystemWebApi.Application/Business/Hydropower/Services/IHydropowerService.cs b/HotelManagerSystemWebApi.Application/Business/Hydropower/Services/IHydropowerService.cs new file mode 100644 index 0000000..9e32af0 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Hydropower/Services/IHydropowerService.cs @@ -0,0 +1,55 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using System.Collections.Generic; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 水电信息接口 + /// + public interface IHydropowerService + { + /// + /// 获取所有水电费信息 + /// + /// + OSelectHydropowerInfoAllDto SelectHydropowerInfoAll(SelectHydropowerInfoAllDto selectHydropowerInfoAllDto); + + /// + /// 添加水电费信息 + /// + /// + /// + OInsertHydropowerInfoDto InsertHydropowerInfo(InsertHydropowerInfoDto insertHydropowerInfoDto); + + /// + /// 修改水电费信息 + /// + /// + /// + OUpdateHydropowerInfoDto UpdateHydropowerInfo(UpdateHydropowerInfoDto updateHydropowerInfoDto); + + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Hydropower/Temp/Temp_Hydropower.cs b/HotelManagerSystemWebApi.Application/Business/Hydropower/Temp/Temp_Hydropower.cs new file mode 100644 index 0000000..31260d2 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Hydropower/Temp/Temp_Hydropower.cs @@ -0,0 +1,73 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 水电信息 + /// + public class Temp_Hydropower + { + /// + /// 信息编号 + /// + public int WtiNo { get; set; } + /// + /// 房间编号 + /// + public string RoomNo { get; set; } + /// + /// 开始使用时间 + /// + public DateTime UseDate { get; set; } + /// + /// 结束使用时间 + /// + public DateTime EndDate { get; set; } + /// + /// 水费 + /// + public decimal WaterUse { get; set; } + /// + /// 电费 + /// + public decimal PowerUse { get; set; } + /// + /// 记录员 + /// + public string Record { get; set; } + /// + /// 客户编号 + /// + public string CustoNo { get; set; } + /// + /// 删除标记 + /// + public int delete_mk { get; set; } + /// + /// 资料创建人 + /// + public string datains_usr { get; set; } + /// + /// 资料创建时间 + /// + public DateTime datains_date { get; set; } + /// + /// 资料更新人 + /// + public string datachg_usr { get; set; } + /// + /// 资料更新时间 + /// + public DateTime datachg_date { get; set; } + + + /// + /// 客户描述 + /// + public string CustoNm { get; set; } + } +} diff --git a/HotelManagerSystemWebApi.Application/Business/Reser/Dtos/InserReserInfoDto.cs b/HotelManagerSystemWebApi.Application/Business/Reser/Dtos/InserReserInfoDto.cs new file mode 100644 index 0000000..0d80110 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Reser/Dtos/InserReserInfoDto.cs @@ -0,0 +1,75 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using HotelManagerSystemWebApi.Core; +using System; +using System.ComponentModel.DataAnnotations; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 添加预约信息 + /// 输入DTO + /// + public class InserReserInfoDto:IBaseDto + { + /// + /// 预约编号 + /// + public string ReserId { get; set; } + /// + /// 客户名称 + /// + [Required] + public string CustoName { get; set; } + /// + /// 预约电话 + /// + [Required] + public string CustoTel { get; set; } + /// + /// 预约渠道 + /// + public string ReserWay { get; set; } + /// + /// 预约房号 + /// + [Required] + public string ReserRoom { get; set; } + /// + /// 预约起始 + /// + [Required] + public DateTime ReserDate { get; set; } + /// + /// 预约止日 + /// + [Required] + public DateTime ReserEndDay { get; set; } + /// + /// 删除标记 + /// + public int delete_mk { get; set; } + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Reser/Dtos/OInserReserInfoDto.cs b/HotelManagerSystemWebApi.Application/Business/Reser/Dtos/OInserReserInfoDto.cs new file mode 100644 index 0000000..11e2918 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Reser/Dtos/OInserReserInfoDto.cs @@ -0,0 +1,37 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using HotelManagerSystemWebApi.Core; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 添加预约信息 + /// 输出DTO + /// + public class OInserReserInfoDto:MsgDto + { + + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Reser/Dtos/OSelectReserAllDto.cs b/HotelManagerSystemWebApi.Application/Business/Reser/Dtos/OSelectReserAllDto.cs new file mode 100644 index 0000000..8c5e829 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Reser/Dtos/OSelectReserAllDto.cs @@ -0,0 +1,46 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using HotelManagerSystemWebApi.Core; +using System.Collections.Generic; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 获取所有预约信息 + /// 输出DTO + /// + public class OSelectReserAllDto:MsgDto + { + /// + /// 数据源 + /// + public List listSource { get; set; } + + /// + /// 总数 + /// + public int total { get; set; } + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Reser/Dtos/SelectReserAllDto.cs b/HotelManagerSystemWebApi.Application/Business/Reser/Dtos/SelectReserAllDto.cs new file mode 100644 index 0000000..28c2013 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Reser/Dtos/SelectReserAllDto.cs @@ -0,0 +1,56 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using HotelManagerSystemWebApi.Core; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 获取所有预约信息 + /// 输入DTO + /// + public class SelectReserAllDto:IListDto + { + /// + /// 预约编号 + /// + public string ReserId { get; set; } + /// + /// 客户名称 + /// + public string CustoName { get; set; } + /// + /// 预约电话 + /// + public string CustoTel { get; set; } + /// + /// 预约渠道 + /// + public string ReserWay { get; set; } + /// + /// 预约房号 + /// + public string ReserRoom { get; set; } + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Reser/ReserAppService.cs b/HotelManagerSystemWebApi.Application/Business/Reser/ReserAppService.cs new file mode 100644 index 0000000..088a194 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Reser/ReserAppService.cs @@ -0,0 +1,49 @@ +using Furion.DynamicApiController; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 预约房间控制器 + /// + public class ReserAppService: IDynamicApiController + { + /// + /// 预约房间 + /// + private readonly IReserService _reserService; + + /// + /// + /// + /// + public ReserAppService(IReserService reserService) + { + _reserService = reserService; + } + + /// + /// 获取所有预约信息 + /// + /// + /// + public OSelectReserAllDto SelectReserAll(SelectReserAllDto selectReserAllDto) + { + return this._reserService.SelectReserAll(selectReserAllDto); + } + + /// + /// 添加预约信息 + /// + /// + /// + public OInserReserInfoDto InserReserInfo(InserReserInfoDto inserReserInfoDto) + { + return this._reserService.InserReserInfo(inserReserInfoDto); + } + } +} diff --git a/HotelManagerSystemWebApi.Application/Business/Reser/Services/IReserService.cs b/HotelManagerSystemWebApi.Application/Business/Reser/Services/IReserService.cs new file mode 100644 index 0000000..4823a83 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Reser/Services/IReserService.cs @@ -0,0 +1,49 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using System.Collections.Generic; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 预约信息接口 + /// + public interface IReserService + { + /// + /// 获取所有预约信息 + /// + /// + /// + OSelectReserAllDto SelectReserAll(SelectReserAllDto selectReserAllDto); + + /// + /// 添加预约信息 + /// + /// + /// + OInserReserInfoDto InserReserInfo(InserReserInfoDto inserReserInfoDto); + + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Reser/Services/ReserService.cs b/HotelManagerSystemWebApi.Application/Business/Reser/Services/ReserService.cs new file mode 100644 index 0000000..7c6e340 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Reser/Services/ReserService.cs @@ -0,0 +1,154 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ +using Furion.DatabaseAccessor; +using Furion.DependencyInjection; +using Furion.LinqBuilder; +using HotelManagerSystemWebApi.Core; +using jvncorelib.EncryptorLib; +using jvncorelib.EntityLib; +using System; +using System.Collections.Generic; +using System.Linq; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 预约信息接口实现类 + /// + public class ReserService:IReserService, ITransient + { + /// + /// 预约信息 + /// + private readonly IRepository reserRepository; + + /// + /// 房间信息 + /// + private readonly IRepository roomRepository; + + /// + /// 房间类型 + /// + private readonly IRepository roomTypeRepository; + + EncryptLib encryptLib = new EncryptLib(); + + /// + /// + /// + /// + /// + /// + public ReserService(IRepository reserRepository, IRepository roomRepository, IRepository roomTypeRepository) + { + this.reserRepository = reserRepository; + this.roomRepository = roomRepository; + this.roomTypeRepository = roomTypeRepository; + } + + /// + /// 获取所有预约信息 + /// + /// + /// + public OSelectReserAllDto SelectReserAll(SelectReserAllDto selectReserAllDto) + { + OSelectReserAllDto oSelectReserAllDto = new OSelectReserAllDto(); + + var where = LinqExpression.Create(a => a.delete_mk != 1); + + //预约流水号 + if(!selectReserAllDto.ReserId.IsNullOrEmpty()) + { + where = where.And(a => a.ReserId.Contains(a.ReserId)); + } + //客户名称 + if (!selectReserAllDto.CustoName.IsNullOrEmpty()) + { + where = where.And(a => a.CustoName.Contains(a.CustoName)); + } + //联系方式 + if (!selectReserAllDto.CustoTel.IsNullOrEmpty()) + { + where = where.And(a => a.CustoTel.Contains(a.CustoTel)); + } + //预约方式 + if (!selectReserAllDto.ReserWay.IsNullOrEmpty()) + { + where = where.And(a => a.ReserWay.Equals(a.ReserWay)); + } + //预约房号 + if (!selectReserAllDto.ReserRoom.IsNullOrEmpty()) + { + where = where.And(a => a.ReserRoom.Contains(a.ReserRoom)); + } + + var count = 0; + + var listSource = reserRepository.AsQueryable(where).ToList() + .GetPageList(selectReserAllDto.PageIndex, selectReserAllDto.PageSize, ref count) + .CopyToModel(); + + var listRoomNo = listSource.Select(a => a.ReserRoom).Distinct().ToList(); + var listRoom = this.roomRepository.AsQueryable(a => listRoomNo.Contains(a.RoomNo)); + + var listRoomTypeId = listRoom.Select(a => a.RoomType).Distinct().ToList(); + var listRoomType = this.roomTypeRepository.AsQueryable(a => listRoomTypeId.Contains(a.Roomtype)); + + listSource.ForEach(source => + { + var room = listRoom.FirstOrDefault(a => a.RoomNo.Equals(source.ReserRoom)); + var roomType = listRoomType.FirstOrDefault(a => a.Roomtype.Equals(room.RoomType)); + source.ReserRoomType = roomType.IsNullOrEmpty() ? "" : roomType.RoomName; + }); + + oSelectReserAllDto.listSource = listSource; + oSelectReserAllDto.total = count; + oSelectReserAllDto.OK(); + + return oSelectReserAllDto; + } + + /// + /// 添加预约信息 + /// + /// + /// + public OInserReserInfoDto InserReserInfo(InserReserInfoDto inserReserInfoDto) + { + OInserReserInfoDto oInserReserInfoDto = new OInserReserInfoDto(); + + var source = new Reser(); + + source = source.UpdateToModel(inserReserInfoDto); + source.datains_usr = inserReserInfoDto.NowLoginUsr; + source.datains_date = DateTime.Now; + this.reserRepository.Insert(source); + oInserReserInfoDto.OK(); + + return oInserReserInfoDto; + } + } +} diff --git a/HotelManagerSystemWebApi.Application/Business/Reser/Temp/Temp_Reser.cs b/HotelManagerSystemWebApi.Application/Business/Reser/Temp/Temp_Reser.cs new file mode 100644 index 0000000..a2e4c80 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Reser/Temp/Temp_Reser.cs @@ -0,0 +1,70 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 预约列表 + /// + public class Temp_Reser + { + /// + /// 预约编号 + /// + public string ReserId { get; set; } + /// + /// 客户名称 + /// + public string CustoName { get; set; } + /// + /// 预约电话 + /// + public string CustoTel { get; set; } + /// + /// 预约渠道 + /// + public string ReserWay { get; set; } + /// + /// 预约房号 + /// + public string ReserRoom { get; set; } + /// + /// 预约起始 + /// + public DateTime ReserDate { get; set; } + /// + /// 预约止日 + /// + public DateTime ReserEndDay { get; set; } + /// + /// 删除标记 + /// + public int delete_mk { get; set; } + /// + /// 资料创建人 + /// + public string datains_usr { get; set; } + /// + /// 资料创建时间 + /// + public DateTime datains_date { get; set; } + /// + /// 资料更新人 + /// + public string datachg_usr { get; set; } + /// + /// 资料更新时间 + /// + public DateTime datachg_date { get; set; } + + + /// + /// 预约房间类型 + /// + public string ReserRoomType { get; set; } + + } +} diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OSelectRoomTypesAllDto.cs b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OSelectRoomTypesAllDto.cs new file mode 100644 index 0000000..4f0b4a9 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OSelectRoomTypesAllDto.cs @@ -0,0 +1,40 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ +using HotelManagerSystemWebApi.Application; +using System.Collections.Generic; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 获取所有房间类型 + /// 输出DTO + /// + public class OSelectRoomTypesAllDto:MsgDto + { + /// + /// 数据源 + /// + public List listSource { get; set; } + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/SelectRoomTypesAllDto.cs b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/SelectRoomTypesAllDto.cs new file mode 100644 index 0000000..1878cf0 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/SelectRoomTypesAllDto.cs @@ -0,0 +1,46 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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 HotelManagerSystemWebApi.Application.Business.Room.Dtos +{ + /// + /// 获取所有房间类型 + /// 输入DTO + /// + public class SelectRoomTypesAllDto : IListDto + { + /// + /// 类型编号 + /// + public int Roomtype { get; set; } + /// + /// 房间类型 + /// + public string RoomName { get; set; } + /// + /// 删除标记 + /// + public int? delete_mk { get; set; } + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Services/IRoomService.cs b/HotelManagerSystemWebApi.Application/Business/Room/Services/IRoomService.cs new file mode 100644 index 0000000..95a08ff --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Room/Services/IRoomService.cs @@ -0,0 +1,216 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using HotelManagerSystemWebApi.Core; +using System.Collections.Generic; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 房间信息接口 + /// + public interface IRoomService + { + #region 根据房间状态获取相应状态的房间信息 + /// + /// 根据房间状态获取相应状态的房间信息 + /// + /// + /// + OSelectRoomByRoomStateDto SelectRoomByRoomState(SelectRoomByRoomStateDto selectRoomByRoomStateDto); + #endregion + + #region 根据房间编号查询房间类型名称 + /// + /// 根据房间编号查询房间类型名称 + /// + /// + /// + OSelectRoomTypeByRoomNo SelectRoomTypeByRoomNo(SelectRoomTypeByRoomNo selectRoomTypeByRoomNo); + #endregion + + #region 根据房间状态来查询可使用的房间 + /// + /// 根据房间状态来查询可使用的房间 + /// + /// + List SelectCanUseRoomAll(); + #endregion + + + #region 获取所有房间信息 + /// + /// 获取所有房间信息 + /// + /// + /// + ORoomListDto RoomList(RoomListDto roomListDto); + #endregion + + #region 获取房间分区的信息 + /// + /// 获取房间分区的信息 + /// + /// + List SelectRoomByTypeName(string TypeName); + #endregion + + #region 根据房间编号查询房间信息 + /// + /// 根据房间编号查询房间信息 + /// + /// + /// + Room SelectRoomByRoomNo(string no); + #endregion + + #region 根据房间编号退房(退房) + /// + /// 根据房间编号退房(退房) + /// + /// + /// + bool UpdateRoomByRoomNo(string room); + #endregion + + #region 根据房间编号查询截止到今天住了多少天 + /// + /// 根据房间编号查询截止到今天住了多少天 + /// + /// + /// + object DayByRoomNo(string roomno); + #endregion + + #region 根据房间编号修改房间信息(入住) + /// + /// 根据房间编号修改房间信息(入住) + /// + /// + /// + bool UpdateRoomInfo(Room r); + #endregion + + #region 根据房间编号修改房间信息(预约) + /// + /// 根据房间编号修改房间信息(预约) + /// + /// + /// + bool UpdateRoomInfoWithReser(Room r); + #endregion + + #region 查询可入住房间数量 + /// + /// 查询可入住房间数量 + /// + /// + object SelectCanUseRoomAllByRoomState(); + #endregion + + #region 查询已入住房间数量 + /// + /// 查询已入住房间数量 + /// + /// + object SelectNotUseRoomAllByRoomState(); + #endregion + + #region 根据房间编号查询房间价格 + /// + /// 根据房间编号查询房间价格 + /// + /// + object SelectRoomByRoomPrice(string r); + #endregion + + #region 查询脏房数量 + /// + /// 查询脏房数量 + /// + /// + object SelectNotClearRoomAllByRoomState(); + #endregion + + #region 查询维修房数量 + /// + /// 查询维修房数量 + /// + /// + object SelectFixingRoomAllByRoomState(); + #endregion + + #region 查询预约房数量 + /// + /// 查询预约房数量 + /// + /// + object SelectReseredRoomAllByRoomState(); + #endregion + + #region 根据房间编号更改房间状态 + /// + /// 根据房间编号更改房间状态 + /// + /// + /// + /// + bool UpdateRoomStateByRoomNo(string roomno, int stateid); + #endregion + + #region 添加房间 + /// + /// 添加房间 + /// + /// + /// + bool InsertRoom(Room rn); + #endregion + + #region 查询所有可消费(已住)房间 + /// + /// 查询所有可消费(已住)房间 + /// + /// + List SelectRoomByStateAll(); + #endregion + + #region 获取所有房间状态 + /// + /// 获取所有房间状态 + /// + /// + List SelectRoomStateAll(); + #endregion + + #region 根据房间编号查询房间状态编号 + /// + /// 根据房间编号查询房间状态编号 + /// + /// + /// + object SelectRoomStateIdByRoomNo(string roomno); + #endregion + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Services/IRoomTypeService.cs b/HotelManagerSystemWebApi.Application/Business/Room/Services/IRoomTypeService.cs new file mode 100644 index 0000000..19dd300 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Room/Services/IRoomTypeService.cs @@ -0,0 +1,45 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using HotelManagerSystemWebApi.Application.Business.Room.Dtos; +using HotelManagerSystemWebApi.Core; +using System.Collections.Generic; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 客房信息接口 + /// + public interface IRoomTypeService + { + #region 获取所有房间类型 + /// + /// 获取所有房间类型 + /// + /// + OSelectRoomTypesAllDto SelectRoomTypesAll(SelectRoomTypesAllDto selectRoomTypesAllDto); + #endregion + + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Services/ORoomListDto.cs b/HotelManagerSystemWebApi.Application/Business/Room/Services/ORoomListDto.cs new file mode 100644 index 0000000..7c4d392 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Room/Services/ORoomListDto.cs @@ -0,0 +1,40 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ +using HotelManagerSystemWebApi.Application; + + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 获取所有房间信息 + /// 输出DTO + /// + public class ORoomListDto:MsgDto + { + /// + /// 数据源 + /// + public List listSource { get; set; } + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Services/RoomListDto.cs b/HotelManagerSystemWebApi.Application/Business/Room/Services/RoomListDto.cs new file mode 100644 index 0000000..a445dcf --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Room/Services/RoomListDto.cs @@ -0,0 +1,64 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using System; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 获取所有房间信息 + /// 输入DTO + /// + public class RoomListDto:IListDto + { + /// + /// 房间编号 + /// + public string RoomNo { get; set; } + /// + /// 房间类型 + /// + public int RoomType { get; set; } + /// + /// 客户编号 + /// + public string CustoNo { get; set; } + /// + /// 最后一次入住时间 + /// + public DateTime? CheckTime { get; set; } + /// + /// 最后一次退房时间 + /// + public DateTime? CheckOutTime { get; set; } + /// + /// 房间状态ID + /// + public int RoomStateId { get; set; } + /// + /// 删除标记 + /// + public int delete_mk { get; set; } + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Services/RoomService.cs b/HotelManagerSystemWebApi.Application/Business/Room/Services/RoomService.cs new file mode 100644 index 0000000..e04b3df --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Room/Services/RoomService.cs @@ -0,0 +1,416 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ +using System; +using System.Collections.Generic; +using System.Linq; +using Furion.DependencyInjection; +using HotelManagerSystemWebApi.Core; + + + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 客房信息接口实现类 + /// + public class RoomService:IRoomService, ITransient + { + /// + /// 房间信息 + /// + private readonly IRepository _roomRepository; + + /// + /// 房间类型 + /// + private readonly IRepository _roomTypeRepository; + + /// + /// 房间状态 + /// + private readonly IRepository _roomStateRepository; + + /// + /// 房间信息 + /// + private readonly IRepository _custoRepository; + + /// + /// + /// + /// + public RoomService(IRepository roomRepository) + { + _roomRepository = roomRepository; + } + + #region 根据房间状态获取相应状态的房间信息 + /// + /// 根据房间状态获取相应状态的房间信息 + /// + /// + /// + public List SelectRoomByRoomState(int stateid) + { + List roomStates = new List(); + roomStates = base.Change().GetList(a => a.delete_mk != 1); + List roomTypes = new List(); + roomTypes = base.Change().GetList(a => a.delete_mk != 1); + List rooms = new List(); + rooms = base.GetList(a => a.delete_mk != 1 && a.RoomStateId == stateid).OrderBy(a => a.RoomNo).ToList(); + rooms.ForEach(source => + { + var roomState = roomStates.FirstOrDefault(a => a.RoomStateId == source.RoomStateId); + source.RoomState = string.IsNullOrEmpty(roomState.RoomStateName) ? "" : roomState.RoomStateName; + var roomType = roomTypes.FirstOrDefault(a => a.Roomtype == source.RoomType); + source.RoomName = string.IsNullOrEmpty(roomType.RoomName) ? "" : roomType.RoomName; + }); + return rooms; + } + #endregion + + + #region 根据房间状态来查询可使用的房间 + /// + /// 根据房间状态来查询可使用的房间 + /// + /// + public List SelectCanUseRoomAll() + { + List roomStates = new List(); + roomStates = base.Change().GetList(a => a.delete_mk != 1); + List roomTypes = new List(); + roomTypes = base.Change().GetList(a => a.delete_mk != 1); + List rooms = new List(); + rooms = base.GetList(a => a.delete_mk != 1 && a.RoomStateId == 0).OrderBy(a => a.RoomNo).ToList(); + rooms.ForEach(source => + { + var roomState = roomStates.FirstOrDefault(a => a.RoomStateId == source.RoomStateId); + source.RoomState = string.IsNullOrEmpty(roomState.RoomStateName) ? "" : roomState.RoomStateName; + var roomType = roomTypes.FirstOrDefault(a => a.Roomtype == source.RoomType); + source.RoomName = string.IsNullOrEmpty(roomType.RoomName) ? "" : roomType.RoomName; + }); + return rooms; + } + #endregion + + + #region 获取所有房间信息 + /// + /// 获取所有房间信息 + /// + /// + /// + public ORoomListDto RoomList(RoomListDto roomListDto) + { + ORoomListDto oRoomListDto = new ORoomListDto(); + + var where = LinqExpression.Create(a => a.delete_mk != 1); + + //房间号码 + if (!roomListDto.RoomNo.IsNullOrEmpty()) + { + where = where.And(a => a.RoomNo.Contains(roomListDto.RoomNo)); + } + + //查询出所有房间类型 + var listSource = _roomRepository.AsQueryable(where).ToList() + .CopyToModel(); + + //客户编号 + var listCustoNo = listSource.Select(a => a.CustoNo).Distinct().ToList(); + var listCusto = this._custoRepository.AsQueryable(a => listCustoNo.Contains(a.CustoNo)).ToList(); + + //房间类型 + var listRoomStateId = listSource.Select(a => a.RoomStateId).Distinct().ToList(); + var listRoomState = this._roomStateRepository.AsQueryable() + //房间状态 + + oRoomListDto.listSource = listSource; + oRoomListDto.OK(); + + return oRoomListDto; + } + #endregion + + #region 获取房间分区的信息 + /// + /// 获取房间分区的信息 + /// + /// + public List SelectRoomByTypeName(string TypeName) + { + List roomStates = new List(); + roomStates = base.Change().GetList(a => a.delete_mk != 1); + List roomTypes = new List(); + roomTypes = base.Change().GetList(a => a.delete_mk != 1 && a.RoomName == TypeName); + var listTypes = roomTypes.Select(a => a.Roomtype).Distinct().ToList(); + List rooms = new List(); + rooms = base.GetList(a => a.delete_mk != 1 && listTypes.Contains(a.RoomType)).OrderBy(a => a.RoomNo).ToList(); + rooms.ForEach(source => + { + var roomState = roomStates.FirstOrDefault(a => a.RoomStateId == source.RoomStateId); + source.RoomState = string.IsNullOrEmpty(roomState.RoomStateName) ? "" : roomState.RoomStateName; + var roomType = roomTypes.FirstOrDefault(a => a.Roomtype == source.RoomType); + source.RoomName = string.IsNullOrEmpty(roomType.RoomName) ? "" : roomType.RoomName; + }); + return rooms; + } + #endregion + + #region 根据房间编号查询房间信息 + /// + /// 根据房间编号查询房间信息 + /// + /// + /// + public Room SelectRoomByRoomNo(string no) + { + List roomStates = new List(); + roomStates = base.Change().GetList(a => a.delete_mk != 1); + Room room = new Room(); + room = base.GetSingle(a => a.delete_mk != 1 && a.RoomNo == no); + var roomSate = roomStates.FirstOrDefault(a => a.RoomStateId == room.RoomStateId); + room.RoomState = string.IsNullOrEmpty(roomSate.RoomStateName) ? "" : roomSate.RoomStateName; + return room; + } + #endregion + + #region 根据房间编号退房(退房) + /// + /// 根据房间编号退房(退房) + /// + /// + /// + public bool UpdateRoomByRoomNo(string room) + { + return base.Update(a => new Room() + { + CustoNo = null, + CheckTime = null, + CheckOutTime = DateTime.Now, + RoomStateId = 3 + },a => a.RoomNo == room); + } + #endregion + + #region 根据房间编号查询截止到今天住了多少天 + /// + /// 根据房间编号查询截止到今天住了多少天 + /// + /// + /// + public object DayByRoomNo(string roomno) + { + return Math.Abs(((TimeSpan)(base.GetSingle(a => a.RoomNo == roomno).CheckTime - DateTime.Now)).Days); + } + #endregion + + #region 根据房间编号修改房间信息(入住) + /// + /// 根据房间编号修改房间信息(入住) + /// + /// + /// + public bool UpdateRoomInfo(Room r) + { + return base.Update(a => new Room() + { + CheckTime = r.CheckTime, + RoomStateId = r.RoomStateId, + CustoNo = r.CustoNo + },a => a.RoomNo == r.RoomNo); + } + #endregion + + #region 根据房间编号修改房间信息(预约) + /// + /// 根据房间编号修改房间信息(预约) + /// + /// + /// + public bool UpdateRoomInfoWithReser(Room r) + { + return base.Update(a => new Room() + { + RoomStateId = r.RoomStateId, + datachg_usr = LoginInfo.WorkerNo, + datachg_date = DateTime.Now + }, a => a.RoomNo == r.RoomNo); + } + #endregion + + #region 查询可入住房间数量 + /// + /// 查询可入住房间数量 + /// + /// + public object SelectCanUseRoomAllByRoomState() + { + return base.GetList(a => a.RoomStateId == 0 && a.delete_mk != 1).OrderBy(a => a.RoomNo).Count(); + } + #endregion + + #region 查询已入住房间数量 + /// + /// 查询已入住房间数量 + /// + /// + public object SelectNotUseRoomAllByRoomState() + { + return base.GetList(a => a.RoomStateId == 1 && a.delete_mk != 1).OrderBy(a => a.RoomNo).Count(); + } + #endregion + + #region 根据房间编号查询房间价格 + /// + /// 根据房间编号查询房间价格 + /// + /// + public object SelectRoomByRoomPrice(string r) + { + return base.GetSingle(a => a.RoomNo == r).RoomMoney; + } + #endregion + + #region 查询脏房数量 + /// + /// 查询脏房数量 + /// + /// + public object SelectNotClearRoomAllByRoomState() + { + return base.GetList(a => a.RoomStateId == 3 && a.delete_mk != 1).OrderBy(a => a.RoomNo).Count(); + } + #endregion + + #region 查询维修房数量 + /// + /// 查询维修房数量 + /// + /// + public object SelectFixingRoomAllByRoomState() + { + return base.GetList(a => a.RoomStateId == 2 && a.delete_mk != 1).OrderBy(a => a.RoomNo).Count(); + } + #endregion + + #region 查询预约房数量 + /// + /// 查询预约房数量 + /// + /// + public object SelectReseredRoomAllByRoomState() + { + return base.GetList(a => a.RoomStateId == 4 && a.delete_mk != 1).OrderBy(a => a.RoomNo).Count(); + } + #endregion + + #region 根据房间编号更改房间状态 + /// + /// 根据房间编号更改房间状态 + /// + /// + /// + /// + public bool UpdateRoomStateByRoomNo(string roomno, int stateid) + { + return base.Update(a => new Room() + { + RoomStateId = stateid, + datains_usr = LoginInfo.WorkerNo, + datachg_date = DateTime.Now + },a => a.RoomNo == roomno); + } + #endregion + + #region 添加房间 + /// + /// 添加房间 + /// + /// + /// + public bool InsertRoom(Room rn) + { + try + { + return base.Insert(rn); + } + catch (Exception) + { + return false; + } + } + #endregion + + #region 查询所有可消费(已住)房间 + /// + /// 查询所有可消费(已住)房间 + /// + /// + public List SelectRoomByStateAll() + { + List roomStates = new List(); + roomStates = base.Change().GetList(a => a.delete_mk != 1); + List roomTypes = new List(); + roomTypes = base.Change().GetList(a => a.delete_mk != 1); + List rooms = new List(); + rooms = base.GetList(a => a.delete_mk != 1 && a.RoomStateId == 1).OrderBy(a => a.RoomNo).ToList(); + rooms.ForEach(source => + { + var roomState = roomStates.FirstOrDefault(a => a.RoomStateId == source.RoomStateId); + source.RoomState = string.IsNullOrEmpty(roomState.RoomStateName) ? "" : roomState.RoomStateName; + var roomType = roomTypes.FirstOrDefault(a => a.Roomtype == source.RoomType); + source.RoomName = string.IsNullOrEmpty(roomType.RoomName) ? "" : roomType.RoomName; + }); + return rooms; + } + #endregion + + #region 获取所有房间状态 + /// + /// 获取所有房间状态 + /// + /// + public List SelectRoomStateAll() + { + List rs = new List(); + rs = base.Change().GetList(a => a.delete_mk != 1); + return rs; + } + #endregion + + #region 根据房间编号查询房间状态编号 + /// + /// 根据房间编号查询房间状态编号 + /// + /// + /// + public object SelectRoomStateIdByRoomNo(string roomno) + { + return base.GetSingle(a => a.RoomNo == roomno).RoomStateId; + } + #endregion + } +} diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Services/RoomTypeService.cs b/HotelManagerSystemWebApi.Application/Business/Room/Services/RoomTypeService.cs new file mode 100644 index 0000000..3812e91 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Room/Services/RoomTypeService.cs @@ -0,0 +1,82 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ +using HotelManagerSystemWebApi.Application.Business.Room.Dtos; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 房间类型接口实现类 + /// + public class RoomTypeService:IRoomTypeService,ITransient + { + + /// + /// 房间类型 + /// + private readonly IRepository roomTypeRepository; + + /// + /// + /// + /// + public RoomTypeService(IRepository roomTypeRepository) + { + this.roomTypeRepository = roomTypeRepository; + } + + #region 获取所有房间类型 + /// + /// 获取所有房间类型 + /// + /// + public OSelectRoomTypesAllDto SelectRoomTypesAll(SelectRoomTypesAllDto selectRoomTypesAllDto) + { + OSelectRoomTypesAllDto oSelectRoomTypesAllDto = new OSelectRoomTypesAllDto(); + + var where = LinqExpression.Create(a => a.delete_mk != 1); + + //类型名称 + if (!selectRoomTypesAllDto.RoomName.IsNullOrEmpty()) + { + where = where.And(a => a.RoomName.Contains(selectRoomTypesAllDto.RoomName)); + } + + //删除标记 + if (!selectRoomTypesAllDto.delete_mk.IsNullOrEmpty()) + { + where = where.And(a => a.delete_mk == selectRoomTypesAllDto.delete_mk); + } + + //查询出所有房间类型 + var listSource = roomTypeRepository.AsQueryable(where).ToList() + .CopyToModel(); + + oSelectRoomTypesAllDto.listSource = listSource; + oSelectRoomTypesAllDto.OK(); + + return oSelectRoomTypesAllDto; + } + #endregion + } +} diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Services/SelectRoomTypeByRoomNo.cs b/HotelManagerSystemWebApi.Application/Business/Room/Services/SelectRoomTypeByRoomNo.cs new file mode 100644 index 0000000..6dfb951 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Room/Services/SelectRoomTypeByRoomNo.cs @@ -0,0 +1,30 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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 HotelManagerSystemWebApi.Application +{ + public class SelectRoomTypeByRoomNo + { + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Temp/Temp_Room.cs b/HotelManagerSystemWebApi.Application/Business/Room/Temp/Temp_Room.cs new file mode 100644 index 0000000..021b05c --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Room/Temp/Temp_Room.cs @@ -0,0 +1,88 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 房间实体类 + /// + public class Temp_Room + { + /// + /// 房间编号 + /// + public string RoomNo { get; set; } + /// + /// 房间类型 + /// + public int RoomType { get; set; } + /// + /// 客户编号 + /// + public string CustoNo { get; set; } + /// + /// 最后一次入住时间 + /// + public DateTime? CheckTime { get; set; } + /// + /// 最后一次退房时间 + /// + public DateTime? CheckOutTime { get; set; } + /// + /// 房间状态ID + /// + public int RoomStateId { get; set; } + /// + /// 房间状态 + /// + public string RoomState { get; set; } + /// + /// 房间单价 + /// + public decimal RoomMoney { get; set; } + /// + /// 房间押金 + /// + public decimal RoomDeposit { get; set; } + /// + /// 房间位置 + /// + public string RoomPosition { get; set; } + /// + /// 客户类型名称 + /// + public string typeName { get; set; } + /// + /// 房间名称 + /// + public string RoomName { get; set; } + /// + /// 最后一次入住时间 + /// + public string CheckTimeFormat { get; set; } + /// + /// 删除标记 + /// + public int delete_mk { get; set; } + /// + /// 资料创建人 + /// + public string datains_usr { get; set; } + /// + /// 资料创建时间 + /// + public DateTime datains_date { get; set; } + /// + /// 资料更新人 + /// + public string datachg_usr { get; set; } + /// + /// 资料更新时间 + /// + public DateTime datachg_date { get; set; } + + } +} diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Temp/Temp_RoomState.cs b/HotelManagerSystemWebApi.Application/Business/Room/Temp/Temp_RoomState.cs new file mode 100644 index 0000000..d1a48a7 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Room/Temp/Temp_RoomState.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 房间状态 + /// + public class Temp_RoomState + { + /// + /// 房间状态编号 + /// + public int RoomStateId { get; set; } + /// + /// 房间状态 + /// + public string RoomStateName { get; set; } + /// + /// 删除标记 + /// + public int delete_mk { get; set; } + /// + /// 资料创建人 + /// + public string datains_usr { get; set; } + /// + /// 资料创建时间 + /// + public DateTime datains_date { get; set; } + /// + /// 资料更新人 + /// + public string datachg_usr { get; set; } + /// + /// 资料更新时间 + /// + public DateTime datachg_date { get; set; } + } +} diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Temp/Temp_RoomType.cs b/HotelManagerSystemWebApi.Application/Business/Room/Temp/Temp_RoomType.cs new file mode 100644 index 0000000..0329ce6 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Room/Temp/Temp_RoomType.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 房间类型 + /// + public class Temp_RoomType + { + /// + /// 类型编号 + /// + public int Roomtype { get; set; } + /// + /// 房间类型 + /// + public string RoomName { get; set; } + + /// + /// 删除标记 + /// + public int delete_mk { get; set; } + /// + /// 资料创建人 + /// + public string datains_usr { get; set; } + /// + /// 资料创建时间 + /// + public DateTime datains_date { get; set; } + /// + /// 资料更新人 + /// + public string datachg_usr { get; set; } + /// + /// 资料更新时间 + /// + public DateTime datachg_date { get; set; } + } +} diff --git a/HotelManagerSystemWebApi.Application/Business/Sellthing/Services/ISellService.cs b/HotelManagerSystemWebApi.Application/Business/Sellthing/Services/ISellService.cs new file mode 100644 index 0000000..8cb03a6 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Sellthing/Services/ISellService.cs @@ -0,0 +1,97 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using System; +using System.Collections.Generic; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 商品接口 + /// + public interface ISellService + { + /// + /// 查询所有商品 + /// + /// + List SelectSellThingAll(SellThing sellThing = null); + + /// + /// 修改商品 + /// + /// + /// + /// + bool UpdateSellThing(string stock, string sellNo); + + /// + /// 修改商品信息 + /// + /// + /// + bool UpdateSellthingInfo(SellThing sellThing); + + /// + /// 撤回客户消费信息 + /// + /// + /// + /// + /// + bool DeleteSellThing(string roomNo, string custoNo, string sellName); + + /// + /// 根据商品编号删除商品信息 + /// + /// + /// + bool DeleteSellThingBySellNo(string sellNo); + + /// + /// 根据商品名称和价格查询商品编号 + /// + /// + /// + /// + SellThing SelectSellThingByNameAndPrice(string name, string price); + + + /// + /// 根据商品编号查询商品信息 + /// + /// + /// + SellThing SelectSellInfoBySellNo(string SellNo); + + #region 添加商品 + /// + /// 添加商品 + /// + /// + /// + bool InsertSellThing(SellThing st); + #endregion + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Sellthing/Services/SellService.cs b/HotelManagerSystemWebApi.Application/Business/Sellthing/Services/SellService.cs new file mode 100644 index 0000000..fb00e0f --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Sellthing/Services/SellService.cs @@ -0,0 +1,180 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ +using System; +using System.Collections.Generic; +using jvncorelib_fr.Entitylib; +using MySql.Data.MySqlClient; +using SqlSugar; + + + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 商品信息接口实现类 + /// + public class SellService:Repository,ISellService + { + /// + /// 查询所有商品 + /// + /// + public List SelectSellThingAll(SellThing sellThing = null) + { + List sellThings = new List(); + var exp = Expressionable.Create().And(a => a.delete_mk == 0); + if (sellThing.IsNullOrEmpty()) + { + sellThings = base.GetList(exp.ToExpression()); + sellThings.ForEach(_sellThing => + { + _sellThing.SellPriceStr = Decimal.Parse(_sellThing.SellPrice.ToString()).ToString("#,##0.00").ToString(); + }); + } + else + { + //商品编号 + if (!sellThing.SellNo.IsNullOrEmpty()) + { + exp = exp.And(a => a.SellNo.Contains(sellThing.SellNo)); + } + //商品名称 + if (!sellThing.SellName.IsNullOrEmpty()) + { + exp = exp.Or(a => a.SellName.Contains(sellThing.SellName)); + } + sellThings = base.GetList(exp.ToExpression()); + sellThings.ForEach(_sellThing => + { + _sellThing.SellPriceStr = Decimal.Parse(_sellThing.SellPrice.ToString()).ToString("#,##0.00").ToString(); + }); + } + return sellThings; + } + + /// + /// 更新商品数量 + /// + /// + /// + /// + public bool UpdateSellThing(string stock, string sellNo) + { + return base.Update(a => new SellThing() + { + Stock = Convert.ToInt32(stock), + datachg_usr = LoginInfo.WorkerNo, + datachg_date = DateTime.Now + },a => a.SellNo == sellNo); + } + + /// + /// 修改商品信息 + /// + /// + /// + public bool UpdateSellthingInfo(SellThing sellThing) + { + return base.Update(a => new SellThing() + { + SellName = sellThing.SellName, + SellPrice = sellThing.SellPrice, + Stock = sellThing.Stock, + format = sellThing.format, + },a => a.SellNo == sellThing.SellNo); + } + + /// + /// 撤回客户消费信息 + /// + /// + /// + /// + /// + public bool DeleteSellThing(string roomNo, string custoNo, string sellName) + { + return base.Change().Update(a => new Spend() + { + delete_mk = 1, + datachg_usr = LoginInfo.WorkerNo, + datachg_date = DateTime.Now + },a => a.MoneyState.Equals(SpendConsts.UnSettle) && a.RoomNo == roomNo && a.CustoNo == custoNo + && a.SpendName == sellName); + + } + + /// + /// 根据商品编号删除商品信息 + /// + /// + /// + public bool DeleteSellThingBySellNo(string sellNo) + { + return base.Update(a => new SellThing() + { + delete_mk = 1, + datachg_usr = AdminInfo.Account, + datachg_date = DateTime.Now + }, a => a.SellNo == sellNo); + } + + /// + /// 根据商品名称和价格查询商品编号 + /// + /// + /// + /// + public SellThing SelectSellThingByNameAndPrice(string name,string price) + { + SellThing sellThing = null; + sellThing = base.GetSingle(a => a.SellName == name && a.SellPrice == Convert.ToDecimal(price)); + return sellThing; + } + + + /// + /// 根据商品编号查询商品信息 + /// + /// + /// + public SellThing SelectSellInfoBySellNo(string SellNo) + { + SellThing st = null; + st = base.GetSingle(a => a.SellNo == SellNo && a.delete_mk != 1); + return st; + } + + #region 添加商品 + /// + /// 添加商品 + /// + /// + /// + public bool InsertSellThing(SellThing st) + { + return base.Insert(st); + } + #endregion + } +} diff --git a/HotelManagerSystemWebApi.Application/Business/Sellthing/Temp/Temp_Sellthing.cs b/HotelManagerSystemWebApi.Application/Business/Sellthing/Temp/Temp_Sellthing.cs new file mode 100644 index 0000000..538efa4 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Sellthing/Temp/Temp_Sellthing.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 商品信息 + /// + public class Temp_Sellthing + { + /// + /// 商品编号 + /// + public string SellNo { get; set; } + /// + /// 商品名称 + /// + public string SellName { get; set; } + /// + /// 商品价格 + /// + public decimal SellPrice { get; set; } + /// + /// 商品价格描述 + /// + public string SellPriceStr { get; set; } + /// + /// 规格型号 + /// + public string format { get; set; } + /// + /// 库存 + /// + public decimal Stock { get; set; } + /// + /// 删除标记 + /// + public int delete_mk { get; set; } + /// + /// 资料创建人 + /// + public string datains_usr { get; set; } + /// + /// 资料创建时间 + /// + public DateTime datains_date { get; set; } + /// + /// 资料更新人 + /// + public string datachg_usr { get; set; } + /// + /// 资料更新时间 + /// + public DateTime datachg_date { get; set; } + } +} diff --git a/HotelManagerSystemWebApi.Application/Business/Spend/Services/ISpendService.cs b/HotelManagerSystemWebApi.Application/Business/Spend/Services/ISpendService.cs new file mode 100644 index 0000000..607c264 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Spend/Services/ISpendService.cs @@ -0,0 +1,124 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using System.Collections.Generic; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 消费信息接口 + /// + public interface ISpendService + { + #region 添加消费信息 + /// + /// 添加消费信息 + /// + /// + /// + bool InsertSpendInfo(Spend s); + #endregion + + #region 根据客户编号查询消费信息 + /// + /// 根据客户编号查询消费信息 + /// + /// + /// + List SelectSpendByCustoNo(string No); + #endregion + + #region 根据房间编号查询消费信息 + /// + /// 根据房间编号查询消费信息 + /// + /// + /// + List SelectSpendByRoomNo(string No); + #endregion + + #region 根据客户编号查询历史消费信息 + /// + /// 根据客户编号查询历史消费信息 + /// + /// + /// + List SeletHistorySpendInfoAll(string custoNo); + #endregion + + #region 查询消费的所有信息 + /// + /// 查询消费的所有信息 + /// + /// + List SelectSpendInfoAll(); + #endregion + + #region 根据房间号查询消费的所有信息 + /// + /// 根据房间号查询消费的所有信息 + /// + /// + List SelectSpendInfoRoomNo(string RoomNo); + #endregion + + #region 根据房间编号、入住时间到当前时间查询消费总金额 + /// + /// 根据房间编号、入住时间到当前时间查询消费总金额 + /// + /// + /// + /// + object SelectMoneyByRoomNoAndTime(string roomno, string custono); + #endregion + + #region 根据房间编号、入住时间和当前时间修改结算状态 + /// + /// 根据房间编号、入住时间和当前时间修改结算状态 + /// + /// + /// + /// + bool UpdateMoneyState(string roomno, string checktime); + #endregion + + #region 将转房前的未结算记录一同转移到新房间 + /// + /// 将转房前的未结算记录一同转移到新房间 + /// + /// + /// + /// + /// + bool UpdateSpendInfoByRoomNo(List spends, string newRoom, string custoNo); + #endregion + + /// + /// 更新消费信息 + /// + /// + /// + bool UpdSpenInfo(Spend spend); + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Spend/Services/SpendService.cs b/HotelManagerSystemWebApi.Application/Business/Spend/Services/SpendService.cs new file mode 100644 index 0000000..ddc5c4e --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Spend/Services/SpendService.cs @@ -0,0 +1,249 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ +using System; +using System.Collections.Generic; +using System.Linq; +using MySql.Data.MySqlClient; + + + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 商品消费接口实现类 + /// + public class SpendService:Repository, ISpendService + { + #region 添加消费信息 + /// + /// 添加消费信息 + /// + /// + /// + public bool InsertSpendInfo(Spend s) + { + return base.Insert(s); + } + #endregion + + #region 根据客户编号查询消费信息 + /// + /// 根据客户编号查询消费信息 + /// + /// + /// + public List SelectSpendByCustoNo(string No) + { + List ls = new List(); + ls = base.GetList(a => a.CustoNo == No && a.MoneyState.Equals(SpendConsts.UnSettle) && a.delete_mk != 1); + ls.ForEach(source => + { + source.SpendStateNm = string.IsNullOrEmpty(source.MoneyState) ? "" + : source.MoneyState.Equals(SpendConsts.Settled) ? "已结算" : "未结算"; + + source.SpendPriceStr = string.IsNullOrEmpty(source.SpendPrice + "") ? "" + : Decimal.Parse(source.SpendPrice.ToString()).ToString("#,##0.00").ToString(); + + source.SpendMoneyStr = string.IsNullOrEmpty(source.SpendMoney + "") ? "" + : Decimal.Parse(source.SpendMoney.ToString()).ToString("#,##0.00").ToString(); + }); + return ls; + } + #endregion + + #region 根据客户编号查询历史消费信息 + /// + /// 根据客户编号查询历史消费信息 + /// + /// + /// + public List SeletHistorySpendInfoAll(string custoNo) + { + List ls = new List(); + ls = base.GetList(a => a.CustoNo == custoNo && a.MoneyState.Equals(SpendConsts.Settled) && a.delete_mk != 1); + ls.ForEach(source => + { + source.SpendStateNm = string.IsNullOrEmpty(source.MoneyState) ? "" + : source.MoneyState.Equals(SpendConsts.Settled) ? "已结算" : "未结算"; + + source.SpendPriceStr = string.IsNullOrEmpty(source.SpendPrice + "") ? "" + : Decimal.Parse(source.SpendPrice.ToString()).ToString("#,##0.00").ToString(); + + source.SpendMoneyStr = string.IsNullOrEmpty(source.SpendMoney + "") ? "" + : Decimal.Parse(source.SpendMoney.ToString()).ToString("#,##0.00").ToString(); + }); + return ls; + } + #endregion + + #region 根据房间编号查询消费信息 + /// + /// 根据房间编号查询消费信息 + /// + /// + /// + public List SelectSpendByRoomNo(string No) + { + List ls = new List(); + ls = base.GetList(a => a.RoomNo == No && a.MoneyState.Equals(SpendConsts.UnSettle) && a.delete_mk != 1); + ls.ForEach(source => + { + source.SpendStateNm = string.IsNullOrEmpty(source.MoneyState) ? "" + : source.MoneyState.Equals(SpendConsts.Settled) ? "已结算" : "未结算"; + + source.SpendPriceStr = string.IsNullOrEmpty(source.SpendPrice + "") ? "" + : Decimal.Parse(source.SpendPrice.ToString()).ToString("#,##0.00").ToString(); + + source.SpendMoneyStr = string.IsNullOrEmpty(source.SpendMoney + "") ? "" + : Decimal.Parse(source.SpendMoney.ToString()).ToString("#,##0.00").ToString(); + }); + return ls; + } + #endregion + + #region 查询消费的所有信息 + /// + /// 查询消费的所有信息 + /// + /// + public List SelectSpendInfoAll() + { + List ls = new List(); + ls = base.GetList(a => a.delete_mk != 1).OrderByDescending(a => a.SpendTime).ToList(); + ls.ForEach(source => + { + source.SpendStateNm = string.IsNullOrEmpty(source.MoneyState) ? "" + : source.MoneyState.Equals(SpendConsts.Settled) ? "已结算" : "未结算"; + + source.SpendPriceStr = string.IsNullOrEmpty(source.SpendPrice + "") ? "" + : Decimal.Parse(source.SpendPrice.ToString()).ToString("#,##0.00").ToString(); + + source.SpendMoneyStr = string.IsNullOrEmpty(source.SpendMoney + "") ? "" + : Decimal.Parse(source.SpendMoney.ToString()).ToString("#,##0.00").ToString(); + }); + return ls; + } + #endregion + + + + #region 根据房间号查询消费的所有信息 + /// + /// 根据房间号查询消费的所有信息 + /// + /// + public List SelectSpendInfoRoomNo(string RoomNo) + { + List ls = new List(); + ls = base.GetList(a => a.RoomNo == RoomNo && a.delete_mk != 1 && a.MoneyState.Equals(SpendConsts.UnSettle)); + ls.ForEach(source => + { + source.SpendStateNm = string.IsNullOrEmpty(source.MoneyState) ? "" + : source.MoneyState.Equals(SpendConsts.Settled) ? "已结算" : "未结算"; + + source.SpendPriceStr = string.IsNullOrEmpty(source.SpendPrice + "") ? "" + : Decimal.Parse(source.SpendPrice.ToString()).ToString("#,##0.00").ToString(); + + source.SpendMoneyStr = string.IsNullOrEmpty(source.SpendMoney + "") ? "" + : Decimal.Parse(source.SpendMoney.ToString()).ToString("#,##0.00").ToString(); + }); + return ls; + } + #endregion + + #region 根据房间编号、入住时间到当前时间查询消费总金额 + /// + /// 根据房间编号、入住时间到当前时间查询消费总金额 + /// + /// + /// + /// + public object SelectMoneyByRoomNoAndTime(string roomno,string custono) + { + return base.GetList(a => a.RoomNo == roomno && a.CustoNo == custono && a.MoneyState.Equals(SpendConsts.UnSettle)).Sum(a => a.SpendMoney); + } + #endregion + + #region 根据房间编号、入住时间和当前时间修改结算状态 + /// + /// 根据房间编号、入住时间和当前时间修改结算状态 + /// + /// + /// + /// + public bool UpdateMoneyState(string roomno, string checktime) + { + return base.Update(a => new Spend() + { + MoneyState = SpendConsts.Settled, + datachg_usr = LoginInfo.WorkerNo, + datachg_date = DateTime.Now + },a => a.RoomNo == roomno && a.SpendTime >= Convert.ToDateTime(checktime) && a.SpendTime <= DateTime.Now); + } + #endregion + + #region 将转房前的未结算记录一同转移到新房间 + /// + /// 将转房前的未结算记录一同转移到新房间 + /// + /// + /// + /// + /// + public bool UpdateSpendInfoByRoomNo(List spends, string newRoom, string custoNo) + { + var listSpendId = spends.Select(a => a.SpendName).Distinct().ToList(); + + return base.Update(a => new Spend() + { + RoomNo = newRoom, + datachg_usr = LoginInfo.WorkerNo, + datachg_date = DateTime.Now + }, a => listSpendId.Contains(a.RoomNo) && a.CustoNo == custoNo && a.MoneyState.Equals(SpendConsts.UnSettle) && a.SpendTime >= DateTime.Now + && a.SpendTime <= DateTime.Now); + + + } + #endregion + + /// + /// 更新消费信息 + /// + /// + /// + public bool UpdSpenInfo(Spend spend) + { + return base.Update(a => new Spend() + { + SpendAmount = spend.SpendAmount, + SpendMoney = spend.SpendMoney, + + }, a => a.MoneyState.Equals(SpendConsts.UnSettle) + && a.RoomNo.Equals(spend.RoomNo) + && a.CustoNo.Equals(spend.CustoNo) + && a.SpendName.Equals(spend.SpendName)); + } + + } +} diff --git a/HotelManagerSystemWebApi.Application/Business/Spend/Temp/Temp_CustoSpend.cs b/HotelManagerSystemWebApi.Application/Business/Spend/Temp/Temp_CustoSpend.cs new file mode 100644 index 0000000..9718d0b --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Spend/Temp/Temp_CustoSpend.cs @@ -0,0 +1,80 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 消费信息 + /// + public class Temp_CustoSpend + { + /// + /// 房间编号 + /// + public string RoomNo { get; set; } + /// + /// 客户编号 + /// + public string CustoNo { get; set; } + /// + /// 商品名称 + /// + public string SpendName { get; set; } + /// + /// 消费数量 + /// + public int SpendAmount { get; set; } + /// + /// 商品单价 + /// + public decimal SpendPrice { get; set; } + /// + /// 商品单价描述 + /// + public string SpendPriceStr { get; set; } + /// + /// 消费金额 + /// + public decimal SpendMoney { get; set; } + /// + /// 消费金额描述 + /// + public string SpendMoneyStr { get; set; } + /// + /// 消费时间 + /// + public DateTime SpendTime { get; set; } + /// + /// 结算状态 + /// + public string MoneyState { get; set; } + /// + /// 删除标记 + /// + public int delete_mk { get; set; } + /// + /// 资料创建人 + /// + public string datains_usr { get; set; } + /// + /// 资料创建时间 + /// + public DateTime datains_date { get; set; } + /// + /// 资料更新人 + /// + public string datachg_usr { get; set; } + /// + /// 资料更新时间 + /// + public DateTime datachg_date { get; set; } + + /// + /// 结算状态描述 + /// + public string SpendStateNm { get; set; } + } +} diff --git a/HotelManagerSystemWebApi.Application/GlobalUsings.cs b/HotelManagerSystemWebApi.Application/GlobalUsings.cs new file mode 100644 index 0000000..742b9cc --- /dev/null +++ b/HotelManagerSystemWebApi.Application/GlobalUsings.cs @@ -0,0 +1,22 @@ +global using Furion; +global using Furion.DatabaseAccessor; +global using Furion.DataEncryption; +global using Furion.DataValidation; +global using Furion.DependencyInjection; +global using Furion.DynamicApiController; +global using Furion.Extensions; +global using Furion.FriendlyException; +global using Furion.LinqBuilder; +global using Furion.Logging; +global using Mapster; +global using Microsoft.AspNetCore.Authorization; +global using Microsoft.AspNetCore.Http; +global using Microsoft.AspNetCore.Mvc; +global using Microsoft.CodeAnalysis; +global using Microsoft.EntityFrameworkCore; +global using System.ComponentModel.DataAnnotations; +global using System.Linq; +global using System.Collections.Generic; +global using jvncorelib.EntityLib; +global using jvncorelib.EncryptorLib; +global using HotelManagerSystemWebApi.Core; \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/HotelManagerSystemWebApi.Application.csproj b/HotelManagerSystemWebApi.Application/HotelManagerSystemWebApi.Application.csproj index 296a0ff..a6f5eff 100644 --- a/HotelManagerSystemWebApi.Application/HotelManagerSystemWebApi.Application.csproj +++ b/HotelManagerSystemWebApi.Application/HotelManagerSystemWebApi.Application.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 1701;1702;1591 HotelManagerSystemWebApi.Application.xml @@ -18,13 +18,39 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HotelManagerSystemWebApi.Application/Worker/GoodBad/Services/IWorkerGoodBadService.cs b/HotelManagerSystemWebApi.Application/Worker/GoodBad/Services/IWorkerGoodBadService.cs new file mode 100644 index 0000000..80ae41f --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Worker/GoodBad/Services/IWorkerGoodBadService.cs @@ -0,0 +1,49 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using HotelManagerSystemWebApi.Core; +using System.Collections.Generic; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 员工奖惩信息接口 + /// + public interface IWorkerGoodBadService + { + /// + /// 添加员工奖惩记录 + /// + /// + /// + bool AddGoodBad(WorkerGoodBad goodBad); + + /// + /// 根据工号查找所有的奖惩记录信息 + /// + /// + /// + List SelectAllGoodBadByWorkNo(string wn); + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Worker/GoodBad/Services/WorkerGoodBadService.cs b/HotelManagerSystemWebApi.Application/Worker/GoodBad/Services/WorkerGoodBadService.cs new file mode 100644 index 0000000..9da2a2a --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Worker/GoodBad/Services/WorkerGoodBadService.cs @@ -0,0 +1,77 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ +using System; +using System.Collections.Generic; +using MySql.Data.MySqlClient; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + + + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 员工奖惩记录接口实现类 + /// + public class WorkerGoodBadService:Repository, IWorkerGoodBadService + { + /// + /// 添加员工奖惩记录 + /// + /// + /// + public bool AddGoodBad(WorkerGoodBad goodBad) + { + return base.Insert(goodBad); + } + + /// + /// 根据工号查找所有的奖惩记录信息 + /// + /// + /// + public List SelectAllGoodBadByWorkNo(string wn) + { + //查询所有超级管理员 + List admins = new List(); + admins = base.Change().GetList(a => a.DeleteMk != 1); + List gBTypes = new List(); + gBTypes = base.Change().GetList(a => a.delete_mk != 1); + List gb = new List(); + gb = base.GetList(a => a.WorkNo == wn); + gb.ForEach(source => + { + //奖惩类型 + var gbType = gBTypes.FirstOrDefault(a => a.GBTypeId == source.GBType); + source.TypeName = string.IsNullOrEmpty(gbType.GBName) ? "" : gbType.GBName; + + //操作人 + var admin = admins.FirstOrDefault(a => a.AdminAccount == source.GBOperation); + source.OperationName = string.IsNullOrEmpty(admin.AdminName) ? "" : admin.AdminName; + }); + return gb; + } + } +} diff --git a/HotelManagerSystemWebApi.Application/Worker/GoodBad/Temp/Temp_Goodbad.cs b/HotelManagerSystemWebApi.Application/Worker/GoodBad/Temp/Temp_Goodbad.cs new file mode 100644 index 0000000..87736b1 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Worker/GoodBad/Temp/Temp_Goodbad.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 员工奖罚 + /// + public class Temp_Goodbad + { + /// + /// 编号 + /// + public int Id { get; set; } + /// + /// 工号 + /// + public string WorkNo { get; set; } + /// + /// 奖惩信息 + /// + public string GBInfo { get; set; } + /// + /// 奖惩类型 + /// + public int GBType { get; set; } + /// + /// 奖惩操作人 + /// + public string GBOperation { get; set; } + /// + /// 奖惩操作人 + /// + public string OperationName { get; set; } + /// + /// 奖惩时间 + /// + public DateTime GBTime { get; set; } + /// + /// 类型名称 + /// + public string TypeName { get; set; } + /// + /// 删除标记 + /// + public int delete_mk { get; set; } + /// + /// 资料创建人 + /// + public string datains_usr { get; set; } + /// + /// 资料创建时间 + /// + public DateTime datains_date { get; set; } + /// + /// 资料更新人 + /// + public string datachg_usr { get; set; } + /// + /// 资料更新时间 + /// + public DateTime datachg_date { get; set; } + } +} diff --git a/HotelManagerSystemWebApi.Application/Worker/History/Services/IWorkerHistoryService.cs b/HotelManagerSystemWebApi.Application/Worker/History/Services/IWorkerHistoryService.cs new file mode 100644 index 0000000..6af693f --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Worker/History/Services/IWorkerHistoryService.cs @@ -0,0 +1,49 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using HotelManagerSystemWebApi.Core; +using System.Collections.Generic; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 员工履历信息接口 + /// + public interface IWorkerHistoryService + { + /// + /// 根据工号添加员工履历 + /// + /// + /// + bool AddHistoryByWorkerId(WorkerHistory workerHistory); + + /// + /// 根据工号查询履历信息 + /// + /// + /// + List SelectHistoryByWorkerId(string wid); + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Worker/History/Services/WorkerHistoryService.cs b/HotelManagerSystemWebApi.Application/Worker/History/Services/WorkerHistoryService.cs new file mode 100644 index 0000000..583b49b --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Worker/History/Services/WorkerHistoryService.cs @@ -0,0 +1,58 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ +using System; +using System.Collections.Generic; + + + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 员工履历接口实现类 + /// + public class WorkerHistoryService:IWorkerHistoryService,ITranit + { + /// + /// 根据工号添加员工履历 + /// + /// + /// + public bool AddHistoryByWorkerId(WorkerHistory workerHistory) + { + return base.Insert(workerHistory); + } + + /// + /// 根据工号查询履历信息 + /// + /// + /// + public List SelectHistoryByWorkerId(string wid) + { + List why = new List(); + why = base.GetList(a => a.delete_mk != 1 && a.WorkerId == wid); + return why; + } + } +} diff --git a/HotelManagerSystemWebApi.Application/Worker/History/Temp/Temp_History.cs b/HotelManagerSystemWebApi.Application/Worker/History/Temp/Temp_History.cs new file mode 100644 index 0000000..40d4b71 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Worker/History/Temp/Temp_History.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 员工履历 + /// + public class Temp_History + { + /// + /// 编号 + /// + public int Id { get; set; } + /// + /// 工号 + /// + public string WorkerId { get; set; } + /// + /// 开始时间 + /// + public DateTime StartDate { get; set; } + /// + /// 结束时间 + /// + public DateTime EndDate { get; set; } + /// + /// 职位 + /// + public string Position { get; set; } + /// + /// 公司 + /// + public string Company { get; set; } + /// + /// 删除标记 + /// + public int delete_mk { get; set; } + /// + /// 资料创建人 + /// + public string datains_usr { get; set; } + /// + /// 资料创建时间 + /// + public DateTime datains_date { get; set; } + /// + /// 资料更新人 + /// + public string datachg_usr { get; set; } + /// + /// 资料更新时间 + /// + public DateTime datachg_date { get; set; } + } +} diff --git a/HotelManagerSystemWebApi.Application/Worker/WorkerCheck/Services/IWorkerCheckService.cs b/HotelManagerSystemWebApi.Application/Worker/WorkerCheck/Services/IWorkerCheckService.cs new file mode 100644 index 0000000..0973dce --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Worker/WorkerCheck/Services/IWorkerCheckService.cs @@ -0,0 +1,64 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using System.Collections.Generic; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 员工打卡接口 + /// + public interface IWorkerCheckService + { + /// + /// 根据员工编号查询其所有的打卡记录 + /// + /// + /// + List SelectCheckInfoByWorkerNo(string wid); + + + /// + /// 查询员工签到天数 + /// + /// + /// + object SelectWorkerCheckDaySumByWorkerNo(string wkn); + + + /// + /// 查询今天员工是否已签到 + /// + /// + /// + object SelectToDayCheckInfoByWorkerNo(string wkn); + + /// + /// 添加员工打卡数据 + /// + /// + /// + bool AddCheckInfo(WorkerCheck workerCheck); + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Worker/WorkerCheck/Services/WorkerCheckService.cs b/HotelManagerSystemWebApi.Application/Worker/WorkerCheck/Services/WorkerCheckService.cs new file mode 100644 index 0000000..5e1b00c --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Worker/WorkerCheck/Services/WorkerCheckService.cs @@ -0,0 +1,89 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ +using System; +using System.Collections.Generic; +using System.Linq; +using MySql.Data.MySqlClient; + + + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 员工打卡接口实现类 + /// + public class WorkerCheckService:Repository, IWorkerCheckService + { + /// + /// 根据员工编号查询其所有的打卡记录 + /// + /// + /// + public List SelectCheckInfoByWorkerNo(string wid) + { + List workerChecks = new List(); + workerChecks = base.GetList(a => a.WorkerNo == wid && a.delete_mk != 1); + workerChecks.ForEach(source => + { + source.CheckStateNm = source.CheckState == 0 ? "打卡成功" : "打卡失败"; + }); + return workerChecks; + } + + + /// + /// 查询员工签到天数 + /// + /// + /// + public object SelectWorkerCheckDaySumByWorkerNo(string wkn) + { + return base.GetList(a => a.WorkerNo == wkn && a.delete_mk != 1).Count; + } + + + /// + /// 查询今天员工是否已签到 + /// + /// + /// + public object SelectToDayCheckInfoByWorkerNo(string wkn) + { + //string sql = "select Count(*) from WORKERCHECK where WorkerNo = '"+wkn+ "' and DATEDIFF(CURRENT_DATE(),workercheck.CheckTime)"; + var listCheckInfo = base.GetList(a => a.WorkerNo == wkn && a.delete_mk != 1); + var count = listCheckInfo.Where(a => a.CheckTime.ToShortDateString() == DateTime.Now.ToShortDateString()).Count() > 0 ? 1:0; + return count; + } + + /// + /// 添加员工打卡数据 + /// + /// + /// + public bool AddCheckInfo(WorkerCheck workerCheck) + { + return base.Insert(workerCheck); + } + } +} diff --git a/HotelManagerSystemWebApi.Application/Worker/WorkerCheck/Temp/Temp_WorkerCheck.cs b/HotelManagerSystemWebApi.Application/Worker/WorkerCheck/Temp/Temp_WorkerCheck.cs new file mode 100644 index 0000000..5e0ed20 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Worker/WorkerCheck/Temp/Temp_WorkerCheck.cs @@ -0,0 +1,61 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 员工打卡考勤 + /// + public class Temp_WorkerCheck + { + /// + /// 编号 + /// + public int Id { get; set; } + /// + /// 工号 + /// + public string WorkerNo { get; set; } + /// + /// 打卡时间 + /// + public DateTime CheckTime { get; set; } + /// + /// 打卡方式 + /// + public string CheckWay { get; set; } + /// + /// 打卡状态 + /// + public int CheckState { get; set; } + + /// + /// 打卡状态 + /// + public string CheckStateNm { get; set; } + /// + /// 删除标记 + /// + public int delete_mk { get; set; } + /// + /// 资料创建人 + /// + public string datains_usr { get; set; } + /// + /// 资料创建时间 + /// + public DateTime datains_date { get; set; } + /// + /// 资料更新人 + /// + public string datachg_usr { get; set; } + /// + /// 资料更新时间 + /// + public DateTime datachg_date { get; set; } + + } +} diff --git a/HotelManagerSystemWebApi.Application/Worker/WorkerInfo/Services/IWorkerService.cs b/HotelManagerSystemWebApi.Application/Worker/WorkerInfo/Services/IWorkerService.cs new file mode 100644 index 0000000..c2f8da2 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Worker/WorkerInfo/Services/IWorkerService.cs @@ -0,0 +1,102 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using System.Collections.Generic; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 员工信息接口 + /// + public interface IWorkerService + { + #region 修改员工信息 + /// + /// 修改员工信息 + /// + /// + /// + bool UpdateWorker(Worker worker); + #endregion + + /// + /// 员工账号禁/启用 + /// + /// + /// + bool ManagerWorkerAccount(Worker worker); + + /// + /// 更新员工职位和部门 + /// + /// + /// + + bool UpdateWorkerPositionAndClub(Worker worker); + + #region 添加员工信息 + /// + /// 添加员工信息 + /// + /// + /// + bool AddWorker(Worker worker); + #endregion + + #region 获取所有工作人员信息 + /// + /// 获取所有工作人员信息 + /// + /// + List SelectWorkerAll(); + #endregion + + #region 根据登录名称查询员工信息 + /// + /// 根据登录名称查询员工信息 + /// + /// + /// + Worker SelectWorkerInfoByWorkerId(string workerId); + #endregion + + #region 根据登录名称、密码查询员工信息 + /// + /// 根据登录名称、密码查询员工信息 + /// + /// + /// + Worker SelectWorkerInfoByWorkerIdAndWorkerPwd(Worker worker); + #endregion + + + /// + /// 根据员工编号和密码修改密码 + /// + /// + /// + /// + bool UpdWorkerPwdByWorkNo(string workId, string workPwd); + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Worker/WorkerInfo/Services/WorkerService.cs b/HotelManagerSystemWebApi.Application/Worker/WorkerInfo/Services/WorkerService.cs new file mode 100644 index 0000000..b7b560c --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Worker/WorkerInfo/Services/WorkerService.cs @@ -0,0 +1,276 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ +using System; +using System.Collections.Generic; +using System.Linq; +using MySql.Data.MySqlClient; + + +using jvncorelib_fr.Encryptor; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 员工信息接口实现类 + /// + public class WorkerService:Repository,IWorkerService + { + /// + /// 实例化信息加密插件 + /// + EncryptLib encryptLib = new EncryptLib(); + + #region 修改员工信息 + /// + /// 修改员工信息 + /// + /// + /// + public bool UpdateWorker(Worker worker) + { + //加密联系方式 + var sourceTelStr = string.Empty; + if (!string.IsNullOrEmpty(worker.WorkerTel)) + { + sourceTelStr = encryptLib.Encryption(worker.WorkerTel); + } + //加密身份证 + var sourceIdStr = string.Empty; + if (!string.IsNullOrEmpty(worker.CardId)) + { + sourceIdStr = encryptLib.Encryption(worker.CardId); + } + worker.WorkerTel = sourceTelStr; + worker.CardId = sourceIdStr; + return base.Update(a => new Worker() + { + WorkerName = worker.WorkerName, + WorkerTel = worker.WorkerTel, + WorkerAddress = worker.WorkerAddress, + WorkerFace = worker.WorkerFace, + WorkerEducation = worker.WorkerEducation, + WorkerNation = worker.WorkerNation, + datachg_usr = AdminInfo.Account, + datachg_date = DateTime.Now + },a => a.WorkerId.Equals(worker.WorkerId)); + + } + #endregion + + /// + /// 员工账号禁/启用 + /// + /// + /// + public bool ManagerWorkerAccount(Worker worker) + { + return new WorkerService().Update(a => new Worker() + { + delete_mk = worker.delete_mk + }, a => a.WorkerId == worker.WorkerId); + } + + /// + /// 更新员工职位和部门 + /// + /// + /// + + public bool UpdateWorkerPositionAndClub(Worker worker) + { + return base.Update(a => new Worker() + { + WorkerClub = worker.WorkerClub, + WorkerPosition = worker.WorkerPosition, + datachg_usr = AdminInfo.Account, + datachg_date = DateTime.Now + }, a => a.WorkerId == worker.WorkerId); + } + + #region 添加员工信息 + /// + /// 添加员工信息 + /// + /// + /// + public bool AddWorker(Worker worker) + { + string NewID = encryptLib.Encryption(worker.CardId); + string NewTel = encryptLib.Encryption(worker.WorkerTel); + worker.CardId = NewID; + worker.WorkerTel = NewTel; + return base.Insert(worker); + } + #endregion + + #region 获取所有工作人员信息 + /// + /// 获取所有工作人员信息 + /// + /// + public List SelectWorkerAll() + { + //查询所有教育程度信息 + List educations = new List(); + educations = base.Change().GetList(a => a.delete_mk != 1); + //查询所有性别类型信息 + List sexTypes = new List(); + sexTypes = base.Change().GetList(a => a.delete_mk != 1); + //查询所有民族类型信息 + List nations = new List(); + nations = base.Change().GetList(a => a.delete_mk != 1); + //查询所有部门信息 + List depts = new List(); + depts = base.Change().GetList(a => a.delete_mk != 1); + //查询所有职位信息 + List positions = new List(); + positions = base.Change().GetList(a => a.delete_mk != 1); + //查询所有员工信息 + List workers = new List(); + workers = base.Change().GetList(); + workers.ForEach(source => + { + //解密身份证号码 + var sourceStr = source.CardId.Contains("·") ? encryptLib.Decryption(source.CardId) : source.CardId; + source.CardId = sourceStr; + //解密联系方式 + var sourceTelStr = source.WorkerTel.Contains("·") ? encryptLib.Decryption(source.WorkerTel) : source.WorkerTel; + source.WorkerTel = sourceTelStr; + //性别类型 + var sexType = sexTypes.FirstOrDefault(a => a.sexId == source.WorkerSex); + source.WorkerSexName = string.IsNullOrEmpty(sexType.sexName) ? "" : sexType.sexName; + //教育程度 + var eduction = educations.FirstOrDefault(a => a.education_no == source.WorkerEducation); + source.EducationName = string.IsNullOrEmpty(eduction.education_name) ? "" : eduction.education_name; + //民族类型 + var nation = nations.FirstOrDefault(a => a.nation_no == source.WorkerNation); + source.NationName = string.IsNullOrEmpty(nation.nation_name) ? "" : nation.nation_name; + //部门 + var dept = depts.FirstOrDefault(a => a.dept_no == source.WorkerClub); + source.ClubName = string.IsNullOrEmpty(dept.dept_name) ? "" : dept.dept_name; + //职位 + var position = positions.FirstOrDefault(a => a.position_no == source.WorkerPosition); + source.PositionName = string.IsNullOrEmpty(position.position_name) ? "" : position.position_name; + }); + + return workers; + } + #endregion + + #region 根据登录名称查询员工信息 + /// + /// 根据登录名称查询员工信息 + /// + /// + /// + public Worker SelectWorkerInfoByWorkerId(string workerId) + { + Worker w = new Worker(); + w = base.Change().GetSingle(a => a.WorkerId == workerId); + //解密身份证号码 + var sourceStr = w.CardId.Contains("·") ? encryptLib.Decryption(w.CardId) : w.CardId; + w.CardId = sourceStr; + //解密联系方式 + var sourceTelStr = w.WorkerTel.Contains("·") ? encryptLib.Decryption(w.WorkerTel) : w.WorkerTel; + w.WorkerTel = sourceTelStr; + //性别类型 + var sexType = base.Change().GetSingle(a => a.sexId == w.WorkerSex); + w.WorkerSexName = string.IsNullOrEmpty(sexType.sexName) ? "" : sexType.sexName; + //教育程度 + var eduction = base.Change().GetSingle(a => a.education_no == w.WorkerEducation); + w.EducationName = string.IsNullOrEmpty(eduction.education_name) ? "" : eduction.education_name; + //民族类型 + var nation = base.Change().GetSingle(a => a.nation_no == w.WorkerNation); + w.NationName = string.IsNullOrEmpty(nation.nation_name) ? "" : nation.nation_name; + //部门 + var dept = base.Change().GetSingle(a => a.dept_no == w.WorkerClub); + w.ClubName = string.IsNullOrEmpty(dept.dept_name) ? "" : dept.dept_name; + //职位 + var position = base.Change().GetSingle(a => a.position_no == w.WorkerPosition); + w.PositionName = string.IsNullOrEmpty(position.position_name) ? "" : position.position_name; + return w; + } + #endregion + + #region 根据登录名称、密码查询员工信息 + /// + /// 根据登录名称、密码查询员工信息 + /// + /// + /// + public Worker SelectWorkerInfoByWorkerIdAndWorkerPwd(Worker worker) + { + Worker w = new Worker(); + w = base.GetSingle(a => a.WorkerId == worker.WorkerId); + if (w == null) + { + w = null; + return w; + } + + var sourceStr = w.WorkerPwd.Contains("·") ? encryptLib.Decryption(w.WorkerPwd) : w.WorkerPwd; + if (sourceStr != worker.WorkerPwd) + { + w = null; + return w; + } + + //性别类型 + var sexType = base.Change().GetSingle(a => a.sexId == w.WorkerSex); + w.WorkerSexName = string.IsNullOrEmpty(sexType.sexName) ? "" : sexType.sexName; + //教育程度 + var eduction = base.Change().GetSingle(a => a.education_no == w.WorkerEducation); + w.EducationName = string.IsNullOrEmpty(eduction.education_name) ? "" : eduction.education_name; + //民族类型 + var nation = base.Change().GetSingle(a => a.nation_no == w.WorkerNation); + w.NationName = string.IsNullOrEmpty(nation.nation_name) ? "" : nation.nation_name; + //部门 + var dept = base.Change().GetSingle(a => a.dept_no == w.WorkerClub); + w.ClubName = string.IsNullOrEmpty(dept.dept_name) ? "" : dept.dept_name; + //职位 + var position = base.Change().GetSingle(a => a.position_no == w.WorkerPosition); + w.PositionName = string.IsNullOrEmpty(position.position_name) ? "" : position.position_name; + return w; + } + #endregion + + /// + /// 根据员工编号和密码修改密码 + /// + /// + /// + /// + public bool UpdWorkerPwdByWorkNo(string workId,string workPwd) + { + string NewPwd = encryptLib.Decryption(workPwd); + return base.Update(a => new Worker() + { + WorkerPwd = NewPwd, + datachg_usr = LoginInfo.WorkerNo, + datachg_date = DateTime.Now + },a => a.WorkerId == workId); + } + + } +} diff --git a/HotelManagerSystemWebApi.Application/Worker/WorkerInfo/Temp/Temp_WorkerInfo.cs b/HotelManagerSystemWebApi.Application/Worker/WorkerInfo/Temp/Temp_WorkerInfo.cs new file mode 100644 index 0000000..6c9a663 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Worker/WorkerInfo/Temp/Temp_WorkerInfo.cs @@ -0,0 +1,115 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 员工信息 + /// + public class Temp_WorkerInfo + { + /// + /// 员工账号/工号 + /// + public string WorkerId { get; set; } + /// + /// 员工姓名 + /// + public string WorkerName { get; set; } + /// + /// 出生日期 + /// + public DateTime WorkerBirthday { get; set; } + /// + /// 员工性别 + /// + public int WorkerSex { get; set; } + /// + /// 员工性别(名称描述) + /// + public string WorkerSexName { get; set; } + /// + /// 民族类型 + /// + public string WorkerNation { get; set; } + /// + /// 民族名称 + /// + public string NationName { get; set; } + /// + /// 员工电话 + /// + public string WorkerTel { get; set; } + /// + /// 所属部门 + /// + public string WorkerClub { get; set; } + /// + /// 部门名称 + /// + public string ClubName { get; set; } + /// + /// 居住地址 + /// + public string WorkerAddress { get; set; } + /// + /// 员工职位 + /// + public string WorkerPosition { get; set; } + /// + /// 职位名称 + /// + public string PositionName { get; set; } + /// + /// 证件号码 + /// + public string CardId { get; set; } + /// + /// 员工密码 + /// + public string WorkerPwd { get; set; } + /// + /// 员工入职时间 + /// + public DateTime WorkerTime { get; set; } + /// + /// 员工面貌 + /// + public string WorkerFace { get; set; } + /// + /// 群众面貌描述 + /// + public string FaceName { get; set; } + /// + /// 教育程度 + /// + public string WorkerEducation { get; set; } + /// + /// 教育程度名称 + /// + public string EducationName { get; set; } + /// + /// 删除标记 + /// + public int delete_mk { get; set; } + /// + /// 资料创建人 + /// + public string datains_usr { get; set; } + /// + /// 资料创建时间 + /// + public DateTime? datains_date { get; set; } + /// + /// 资料更新人 + /// + public string datachg_usr { get; set; } + /// + /// 资料更新时间 + /// + public DateTime? datachg_date { get; set; } + } +} diff --git a/HotelManagerSystemWebApi.Application/Worker/WorkerPic/Services/IWorkerPicService.cs b/HotelManagerSystemWebApi.Application/Worker/WorkerPic/Services/IWorkerPicService.cs new file mode 100644 index 0000000..df29dc4 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Worker/WorkerPic/Services/IWorkerPicService.cs @@ -0,0 +1,40 @@ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 员工照片模块接口 + /// + public interface IWorkerPicService + { + /// + /// 查询员工照片 + /// + /// + /// + WorkerPic WorkerPic(WorkerPic workerPic); + /// + /// 添加员工照片 + /// + /// + /// + bool InsertWorkerPic(WorkerPic workerPic); + /// + /// 删除员工照片 + /// + /// + /// + bool DeleteWorkerPic(WorkerPic workerPic); + /// + /// 更新员工照片 + /// + /// + /// + bool UpdateWorkerPic(WorkerPic workerPic); + } +} diff --git a/HotelManagerSystemWebApi.Application/Worker/WorkerPic/Services/WorkerPicService.cs b/HotelManagerSystemWebApi.Application/Worker/WorkerPic/Services/WorkerPicService.cs new file mode 100644 index 0000000..df66479 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Worker/WorkerPic/Services/WorkerPicService.cs @@ -0,0 +1,73 @@ + + +using SYS.Core.Util; +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 员工照片接口实现类 + /// + public class WorkerPicService:Repository,IWorkerPicService + { + /// + /// 查询员工照片 + /// + /// + /// + public WorkerPic WorkerPic(WorkerPic workerPic) + { + var workerPicSource = new WorkerPic(); + + workerPicSource = base.GetSingle(a => a.WorkerId.Equals(workerPic.WorkerId)); + + if (workerPicSource != null) + { + workerPicSource.Pic = workerPicSource == null || string.IsNullOrEmpty(workerPicSource.Pic) ? "" : HttpHelper.baseUrl + workerPicSource.Pic; + } + + return workerPicSource; + } + /// + /// 添加员工照片 + /// + /// + /// + public bool InsertWorkerPic(WorkerPic workerPic) + { + return base.Insert(new WorkerPic + { + WorkerId = workerPic.WorkerId, + Pic = workerPic.Pic + }); + } + + /// + /// 删除员工照片 + /// + /// + /// + public bool DeleteWorkerPic(WorkerPic workerPic) + { + return base.Delete(a => a.WorkerId.Equals(workerPic.WorkerId)); + } + + /// + /// 更新员工照片 + /// + /// + /// + public bool UpdateWorkerPic(WorkerPic workerPic) + { + return base.Update(a=> new WorkerPic + { + Pic = workerPic.Pic + },a => a.WorkerId.Equals(workerPic.WorkerId)); + } + } +} diff --git a/HotelManagerSystemWebApi.Application/Worker/WorkerPic/Temp/Temp_WorkerPic.cs b/HotelManagerSystemWebApi.Application/Worker/WorkerPic/Temp/Temp_WorkerPic.cs new file mode 100644 index 0000000..969352a --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Worker/WorkerPic/Temp/Temp_WorkerPic.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 员工照片 + /// + public class Temp_WorkerPic + { + /// + /// 自增长流水号 + /// + public int Id { get; set; } + /// + /// 工号 + /// + public string WorkerId { get; set; } + + /// + /// 照片路径 + /// + public string Pic { get; set; } + } +} diff --git a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services/AdminInfoService.cs b/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services/AdminInfoService.cs index 82bc023..13462c3 100644 --- a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services/AdminInfoService.cs +++ b/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services/AdminInfoService.cs @@ -2,7 +2,8 @@ using Furion.DependencyInjection; using Furion.LinqBuilder; using HotelManagerSystemWebApi.Core; -using jvncorelib.Entitylib; +using jvncorelib.EncryptorLib; +using jvncorelib.EntityLib; using System; using System.Collections.Generic; using System.Linq; @@ -192,5 +193,148 @@ namespace HotelManagerSystemWebApi.Application oUpdAdminInfoDto.OK(); return oUpdAdminInfoDto; } + + EncryptLib encryptLib = new EncryptLib(); + + //#region 根据超管密码查询员工类型和权限 + ///// + ///// 根据超管密码查询员工类型和权限 + ///// + ///// + ///// + //public Admin SelectMangerByPass(Admin admin) + //{ + // Admin admins = new Admin(); + // admins = base.GetSingle(a => a.AdminAccount == admin.AdminAccount && a.AdminPassword == admin.AdminPassword); + // //admin.AdminPassword = admin.AdminPassword.Contains(":") ? encrypt.DeEncryptStr(admin.AdminPassword) : admin.AdminPassword; + // return admins; + //} + //#endregion + + //#region 根据超管账号查询对应的密码 + ///// + ///// 根据超管账号查询对应的密码 + ///// + ///// + ///// + //public Admin SelectAdminPwdByAccount(string account) + //{ + // Admin admin = new Admin(); + // admin = base.GetSingle(a => a.AdminAccount == account); + // //admin.AdminPassword = admin.AdminPassword.Contains(":") ? encrypt.DeEncryptStr(admin.AdminPassword) : admin.AdminPassword; + // return admin; + //} + //#endregion + + ///// + ///// 获取所有管理员列表 + ///// + ///// + //public List GetAllAdminList() + //{ + // var listAdmins = base.GetList(); + // var listAdminType = base.Change().GetList(a => a.delete_mk != 1); + // listAdmins.ForEach(admins => + // { + // var isAdminType = admins.IsAdmin == 1 ? "是" : "否"; + // admins.IsAdminNm = isAdminType; + + // var adminType = listAdminType.FirstOrDefault(a => a.type_id.Equals(admins.AdminType)); + // admins.TypeName = adminType == null ? "" : adminType.type_name; + + // var adminDelete = admins.DeleteMk == 1 ? "是" : "否"; + // admins.DeleteNm = adminDelete; + + // }); + + // return listAdmins; + //} + + ///// + ///// 修改密码 + ///// + ///// + ///// + //public bool UpdateNewPwdByOldPwd(Admin admin) + //{ + // //admin.AdminPassword = encrypt.EncryptStr(admin.AdminPassword); + // return base.Update(a => new Admin() + // { + // AdminPassword = admin.AdminPassword, + // datachg_usr = AdminInfo.Account, + // datachg_time = DateTime.Now + // }, a => a.AdminAccount == admin.AdminAccount); + //} + + ///// + ///// 获取管理员列表(已启用) + ///// + ///// + //public List GetAllAdmin() + //{ + // var listAdmin = base.GetList(a => a.DeleteMk != 1); + // var listAdminType = base.Change().GetList(a => a.delete_mk != 1); + // listAdmin.ForEach(admin => + // { + // var isAdminType = admin.IsAdmin == 1 ? "是" : "否"; + // admin.IsAdminNm = isAdminType; + + // var adminType = listAdminType.FirstOrDefault(a => a.type_id.Equals(admin.AdminType)); + // admin.TypeName = adminType == null ? "" : adminType.type_name; + // }); + // return listAdmin; + //} + + ///// + ///// 添加管理员 + ///// + ///// + ///// + //public bool AddAdmin(Admin admin) + //{ + // //admin.AdminPassword = encrypt.EncryptStr(admin.AdminPassword); + // bool result = base.Insert(admin); + // return result; + //} + + ///// + ///// 获取管理员信息 + ///// + ///// + ///// + //public Admin GetAdminInfoByAdminAccount(Admin admin) + //{ + // var adminInfo = base.GetSingle(a => a.AdminAccount.Equals(admin.AdminAccount)); + // if (adminInfo != null) + // { + // var adminType = base.Change().GetSingle(a => a.type_id.Equals(adminInfo.AdminType)); + // adminInfo.TypeName = adminType.type_name; + // } + // return adminInfo; + //} + + ///// + ///// 获取所有管理员类型 + ///// + ///// + //public List GetAllAdminTypes() + //{ + // var listAdminTypes = base.Change().GetList(a => a.delete_mk != 1); + // return listAdminTypes; + //} + + ///// + ///// 更新管理员账户 + ///// + ///// + ///// + //public bool UpdAccount(Admin admins) + //{ + // admins.DeleteMk = admins.DeleteMk == 0 ? 1 : 0; + // return base.Update(a => new Admin() + // { + // DeleteMk = admins.DeleteMk + // }, a => a.Id == admins.Id); + //} } } diff --git a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services/AdminService.cs b/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services/AdminService.cs new file mode 100644 index 0000000..2411526 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services/AdminService.cs @@ -0,0 +1,183 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ +using jvncorelib_fr.Encryptor; + + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 管理员数据访问层 + /// + public class AdminService:Repository, IAdminService + { + EncryptLib encryptLib = new EncryptLib(); + + #region 根据超管密码查询员工类型和权限 + /// + /// 根据超管密码查询员工类型和权限 + /// + /// + /// + public Admin SelectMangerByPass(Admin admin) + { + Admin admins = new Admin(); + admins = base.GetSingle(a => a.AdminAccount == admin.AdminAccount && a.AdminPassword == admin.AdminPassword); + //admin.AdminPassword = admin.AdminPassword.Contains(":") ? encrypt.DeEncryptStr(admin.AdminPassword) : admin.AdminPassword; + return admins; + } + #endregion + + #region 根据超管账号查询对应的密码 + /// + /// 根据超管账号查询对应的密码 + /// + /// + /// + public Admin SelectAdminPwdByAccount(string account) + { + Admin admin = new Admin(); + admin = base.GetSingle(a => a.AdminAccount == account); + //admin.AdminPassword = admin.AdminPassword.Contains(":") ? encrypt.DeEncryptStr(admin.AdminPassword) : admin.AdminPassword; + return admin; + } + #endregion + + /// + /// 获取所有管理员列表 + /// + /// + public List GetAllAdminList() + { + var listAdmins = base.GetList(); + var listAdminType = base.Change().GetList(a => a.delete_mk != 1); + listAdmins.ForEach(admins => + { + var isAdminType = admins.IsAdmin == 1 ? "是" : "否"; + admins.IsAdminNm = isAdminType; + + var adminType = listAdminType.FirstOrDefault(a => a.type_id.Equals(admins.AdminType)); + admins.TypeName = adminType == null ? "" : adminType.type_name; + + var adminDelete = admins.DeleteMk == 1 ? "是" : "否"; + admins.DeleteNm = adminDelete; + + }); + + return listAdmins; + } + + /// + /// 修改密码 + /// + /// + /// + public bool UpdateNewPwdByOldPwd(Admin admin) + { + //admin.AdminPassword = encrypt.EncryptStr(admin.AdminPassword); + return base.Update(a => new Admin() + { + AdminPassword = admin.AdminPassword, + datachg_usr = AdminInfo.Account, + datachg_time = DateTime.Now + },a => a.AdminAccount == admin.AdminAccount); + } + + /// + /// 获取管理员列表(已启用) + /// + /// + public List GetAllAdmin() + { + var listAdmin = base.GetList(a => a.DeleteMk != 1); + var listAdminType = base.Change().GetList(a => a.delete_mk != 1); + listAdmin.ForEach(admin => + { + var isAdminType = admin.IsAdmin == 1 ? "是" : "否"; + admin.IsAdminNm = isAdminType; + + var adminType = listAdminType.FirstOrDefault(a => a.type_id.Equals(admin.AdminType)); + admin.TypeName = adminType == null ? "" : adminType.type_name; + }); + return listAdmin; + } + + /// + /// 添加管理员 + /// + /// + /// + public bool AddAdmin(Admin admin) + { + //admin.AdminPassword = encrypt.EncryptStr(admin.AdminPassword); + bool result = base.Insert(admin); + return result; + } + + /// + /// 获取管理员信息 + /// + /// + /// + public Admin GetAdminInfoByAdminAccount(Admin admin) + { + var adminInfo = base.GetSingle(a => a.AdminAccount.Equals(admin.AdminAccount)); + if (adminInfo != null) + { + var adminType = base.Change().GetSingle(a => a.type_id.Equals(adminInfo.AdminType)); + adminInfo.TypeName = adminType.type_name; + } + return adminInfo; + } + + /// + /// 获取所有管理员类型 + /// + /// + public List GetAllAdminTypes() + { + var listAdminTypes = base.Change().GetList(a => a.delete_mk != 1); + return listAdminTypes; + } + + /// + /// 更新管理员账户 + /// + /// + /// + public bool UpdAccount(Admin admins) + { + admins.DeleteMk = admins.DeleteMk == 0 ? 1 : 0; + return base.Update(a => new Admin() + { + DeleteMk = admins.DeleteMk + },a => a.Id == admins.Id); + } + + + } +} diff --git a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services/IAdminInfoService.cs b/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services/IAdminInfoService.cs index cf3f878..43770ae 100644 --- a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services/IAdminInfoService.cs +++ b/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services/IAdminInfoService.cs @@ -46,5 +46,70 @@ namespace HotelManagerSystemWebApi.Application /// /// OUpdAdminInfoDto UpdAdminInfo(UpdAdminInfoDto updAdminInfoDto); + + //#region 根据超管密码查询员工类型和权限 + ///// + ///// 根据超管密码查询员工类型和权限 + ///// + ///// + ///// + //Admin SelectMangerByPass(Admin admin); + //#endregion + + + //#region 根据超管账号查询对应的密码 + ///// + ///// 根据超管账号查询对应的密码 + ///// + ///// + ///// + //Admin SelectAdminPwdByAccount(string account); + //#endregion + + ///// + ///// 获取所有管理员列表 + ///// + ///// + //List GetAllAdminList(); + + ///// + ///// 修改密码 + ///// + ///// + ///// + //bool UpdateNewPwdByOldPwd(Admin admin); + + ///// + ///// 获取管理员列表 + ///// + ///// + //List GetAllAdmin(); + + ///// + ///// 添加管理员 + ///// + ///// + ///// + //bool AddAdmin(Admin admin); + + ///// + ///// 获取管理员信息 + ///// + ///// + ///// + //Admin GetAdminInfoByAdminAccount(Admin admin); + + ///// + ///// 获取所有管理员类型 + ///// + ///// + //List GetAllAdminTypes(); + + ///// + ///// 批量更新管理员账户 + ///// + ///// + ///// + //bool UpdAccount(Admin admins); } } diff --git a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services/IAdminService.cs b/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services/IAdminService.cs new file mode 100644 index 0000000..79baeb0 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services/IAdminService.cs @@ -0,0 +1,100 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using System.Collections.Generic; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 管理员数据访问接口 + /// + public interface IAdminService + { + + #region 根据超管密码查询员工类型和权限 + /// + /// 根据超管密码查询员工类型和权限 + /// + /// + /// + Admin SelectMangerByPass(Admin admin); + #endregion + + + #region 根据超管账号查询对应的密码 + /// + /// 根据超管账号查询对应的密码 + /// + /// + /// + Admin SelectAdminPwdByAccount(string account); + #endregion + + /// + /// 获取所有管理员列表 + /// + /// + List GetAllAdminList(); + + /// + /// 修改密码 + /// + /// + /// + bool UpdateNewPwdByOldPwd(Admin admin); + + /// + /// 获取管理员列表 + /// + /// + List GetAllAdmin(); + + /// + /// 添加管理员 + /// + /// + /// + bool AddAdmin(Admin admin); + + /// + /// 获取管理员信息 + /// + /// + /// + Admin GetAdminInfoByAdminAccount(Admin admin); + + /// + /// 获取所有管理员类型 + /// + /// + List GetAllAdminTypes(); + + /// + /// 批量更新管理员账户 + /// + /// + /// + bool UpdAccount(Admin admins); + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Temp/Temp_AdminInfo.cs b/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Temp/Temp_AdminInfo.cs new file mode 100644 index 0000000..0053396 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Temp/Temp_AdminInfo.cs @@ -0,0 +1,65 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 管理员信息实体类 + /// + public class Temp_AdminInfo + { + + /// + /// 管理员账号 + /// + public System.String AdminAccount { get; set; } + + /// + /// 管理员密码 + /// + public System.String AdminPassword { get; set; } + + /// + /// 管理员类型 + /// + public System.String AdminType { get; set; } + + /// + /// 管理员名称 + /// + public System.String AdminName { get; set; } + + /// + /// 是否为超级管理员 + /// + public System.Int32? IsAdmin { get; set; } + + /// + /// 删除标记 + /// + public System.Int32? DeleteMk { get; set; } + + /// + /// 资料新增人 + /// + public System.String datains_usr { get; set; } + + /// + /// 资料新增时间 + /// + public System.DateTime? datains_time { get; set; } + + /// + /// 资料更新人 + /// + public System.String datachg_usr { get; set; } + + /// + /// 资料更新时间 + /// + public System.DateTime? datachg_time { get; set; } + } +} diff --git a/HotelManagerSystemWebApi.Application/Zero/Base/Services/BaseService.cs b/HotelManagerSystemWebApi.Application/Zero/Base/Services/BaseService.cs new file mode 100644 index 0000000..a641a40 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Zero/Base/Services/BaseService.cs @@ -0,0 +1,685 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ +using jvncorelib_fr.Entitylib; +using MySql.Data.MySqlClient; +using SqlSugar; + + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Linq.Expressions; +using System.Text; +using System.Threading.Tasks; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 基础信息接口实现类 + /// + public class BaseService: Repository,IBaseService + { + + #region 性别模块 + + /// + /// 查询所有性别类型 + /// + /// + public List SelectSexTypeAll(SexType sexType = null) + { + var where = Expressionable.Create(); + if (sexType != null && sexType.sexName.IsNullOrEmpty()) + { + where = where.And(a => a.delete_mk == sexType.delete_mk); + } + if (sexType != null && !sexType.sexName.IsNullOrEmpty()) + { + where = where.And(a => a.sexName.Contains(sexType.sexName)); + } + return base.Change().GetList(where.ToExpression()); + } + + /// + /// 查询性别类型 + /// + /// + public SexType SelectSexType(SexType sexType) + { + SexType sexTypes = new SexType(); + sexTypes = base.GetSingle(a => a.sexId == sexType.sexId); + return sexTypes; + } + + /// + /// 添加性别类型 + /// + /// + /// + public bool AddSexType(SexType sexType) + { + return base.Insert(sexType); + } + + /// + /// 删除性别类型 + /// + /// + /// + public bool DelSexType(SexType sexType) + { + return base.Update(a => new SexType() + { + delete_mk = sexType.delete_mk, + datachg_usr = LoginInfo.WorkerNo, + datachg_date = DateTime.Now + }, a => a.sexId == sexType.sexId); + } + + /// + /// 更新性别类型 + /// + /// + /// + public bool UpdSexType(SexType sexType) + { + return base.Update(a => new SexType() + { + sexName = sexType.sexName, + datachg_usr = LoginInfo.WorkerNo, + datachg_date = DateTime.Now + }, a => a.sexId == sexType.sexId); + } + + #endregion + + #region 职位模块 + + /// + /// 查询所有职位类型 + /// + /// + public List SelectPositionAll(Position position = null) + { + var where = Expressionable.Create(); + if (position != null && position.position_name.IsNullOrEmpty()) + { + where = where.And(a => a.delete_mk == position.delete_mk); + } + if (position != null && !position.position_name.IsNullOrEmpty()) + { + where = where.And(a => a.position_name.Contains(position.position_name)); + } + return base.Change().GetList(where.ToExpression()); + } + + /// + /// 查询职位类型 + /// + /// + public Position SelectPosition(Position position) + { + Position position1 = new Position(); + position1 = base.Change().GetSingle(a => a.position_no == position.position_no); + return position1; + } + + /// + /// 添加职位类型 + /// + /// + /// + public bool AddPosition(Position position) + { + return base.Change().Insert(position); + } + + /// + /// 删除职位类型 + /// + /// + /// + public bool DelPosition(Position position) + { + return base.Change().Update(a => new Position() + { + delete_mk = position.delete_mk, + datachg_usr = LoginInfo.WorkerNo, + datachg_date = DateTime.Now + },a => a.position_no == position.position_no); + } + + /// + /// 更新职位类型 + /// + /// + /// + public bool UpdPosition(Position position) + { + return base.Change().Update(a => new Position() + { + position_name = position.position_name, + datachg_usr = LoginInfo.WorkerNo, + datachg_date = DateTime.Now + }, a => a.position_no == position.position_no); + } + + #endregion + + #region 民族模块 + + /// + /// 查询所有民族类型 + /// + /// + public List SelectNationAll(Nation nation = null) + { + var where = Expressionable.Create(); + if (nation != null && nation.nation_name.IsNullOrEmpty()) + { + where = where.And(a => a.delete_mk == nation.delete_mk); + } + if (nation != null && !nation.nation_name.IsNullOrEmpty()) + { + where = where.And(a => a.nation_name.Contains(nation.nation_name)); + } + return base.Change().GetList(where.ToExpression()); + } + + /// + /// 查询民族类型 + /// + /// + public Nation SelectNation(Nation nation) + { + Nation nation1 = new Nation(); + nation1 = base.Change().GetSingle(a => a.nation_no.Equals(nation.nation_no)); + return nation1; + } + + /// + /// 添加民族类型 + /// + /// + /// + public bool AddNation(Nation nation) + { + return base.Change().Insert(nation); + } + + /// + /// 删除民族类型 + /// + /// + /// + public bool DelNation(Nation nation) + { + return base.Change().Update(a => new Nation() + { + delete_mk = nation.delete_mk, + datachg_usr = LoginInfo.WorkerNo, + datachg_date = DateTime.Now + },a => a.nation_no.Equals(nation.nation_no)); + + } + + /// + /// 更新民族类型 + /// + /// + /// + public bool UpdNation(Nation nation) + { + return base.Change().Update(a => new Nation() + { + nation_name = nation.nation_name, + datachg_usr = LoginInfo.WorkerNo, + datachg_date = DateTime.Now + }, a => a.nation_no.Equals(nation.nation_no)); + } + + #endregion + + #region 学历模块 + + /// + /// 查询所有学历类型 + /// + /// + public List SelectEducationAll(Education education = null) + { + var where = Expressionable.Create(); + if (education != null && education.education_name.IsNullOrEmpty()) + { + where = where.And(a => a.delete_mk == education.delete_mk); + } + if (education != null && !education.education_name.IsNullOrEmpty()) + { + where = where.And(a => a.education_name.Contains(education.education_name)); + } + return base.Change().GetList(where.ToExpression()); + } + + /// + /// 查询学历类型 + /// + /// + public Education SelectEducation(Education education) + { + Education education1 = new Education(); + education1 = base.Change().GetSingle(a => a.education_no == education.education_no); + return education1; + } + + /// + /// 添加学历类型 + /// + /// + /// + public bool AddEducation(Education education) + { + return base.Change().Insert(education); + } + + /// + /// 删除学历类型 + /// + /// + /// + public bool DelEducation(Education education) + { + return base.Change().Update(a => new Education() + { + delete_mk = education.delete_mk, + datachg_usr = LoginInfo.WorkerNo, + datachg_date = DateTime.Now + }, a => a.education_no == education.education_no); + } + + /// + /// 更新学历类型 + /// + /// + /// + public bool UpdEducation(Education education) + { + return base.Change().Update(a => new Education() + { + education_name = education.education_name, + datachg_usr = LoginInfo.WorkerNo, + datachg_date = DateTime.Now + }, a => a.education_no == education.education_no); + } + + #endregion + + #region 部门模块 + + /// + /// 查询所有部门类型(可用) + /// + /// + public List SelectDeptAllCanUse() + { + List workers = new List(); + workers = base.Change().GetList(a => a.delete_mk != 1); + List depts = new List(); + depts = base.Change().GetList(a => a.delete_mk != 1); + depts.ForEach(source => + { + var dept = depts.FirstOrDefault(a => a.dept_no == source.dept_parent); + source.parent_name = dept == null || string.IsNullOrEmpty(dept.dept_name) ? "无" : dept.dept_name; + var leader = workers.FirstOrDefault(a => source.dept_leader != null && a.WorkerId == source.dept_leader); + source.leader_name = leader == null || string.IsNullOrEmpty(leader.WorkerName) ? "无" : leader.WorkerName; + + }); + return depts; + } + + /// + /// 查询所有部门类型 + /// + /// + public List SelectDeptAll() + { + List workers = new List(); + workers = base.Change().GetList(a => a.delete_mk != 1); + List depts = new List(); + depts = base.Change().GetList(a => a.delete_mk != 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; + }); + return depts; + } + + /// + /// 查询部门类型 + /// + /// + public Dept SelectDept(Dept dept) + { + Dept dept1 = new Dept(); + dept1 = base.Change().GetSingle(a => a.dept_no.Equals(dept.dept_no)); + return dept1; + } + + /// + /// 添加部门类型 + /// + /// + /// + public bool AddDept(Dept dept) + { + return base.Change().Insert(dept); + } + + /// + /// 删除部门类型 + /// + /// + /// + public bool DelDept(Dept dept) + { + return base.Change().Update(a => new Dept() + { + delete_mk = 1, + datachg_usr = LoginInfo.WorkerNo, + datachg_date = DateTime.Now + },a => a.dept_no == dept.dept_no); + } + + /// + /// 更新部门类型 + /// + /// + /// + public bool UpdDept(Dept dept) + { + return base.Change().Update(a => new Dept() + { + dept_name = dept.dept_name, + dept_desc = dept.dept_desc, + dept_leader = dept.dept_leader, + dept_parent = dept.dept_parent, + datachg_usr = LoginInfo.WorkerNo, + datachg_date = DateTime.Now + },a => a.dept_no == dept.dept_no); + } + + #endregion + + #region 客户类型模块 + + /// + /// 查询所有客户类型(可用) + /// + /// + public List SelectCustoTypeAllCanUse() + { + List custoTypes = new List(); + custoTypes = base.Change().GetList(a => a.delete_mk != 1); + return custoTypes; + } + + /// + /// 查询所有客户类型 + /// + /// + public List SelectCustoTypeAll() + { + List custoTypes = new List(); + custoTypes = base.Change().GetList(); + return custoTypes; + } + + /// + /// 根据客户类型ID查询类型名称 + /// + /// + /// + public CustoType SelectCustoTypeByTypeId(CustoType custoType) + { + CustoType custoTypes = new CustoType(); + custoType = base.Change().GetSingle(a => a.UserType == custoType.UserType && a.delete_mk != 1); + return custoTypes; + } + + /// + /// 添加客户类型 + /// + /// + /// + public bool InsertCustoType(CustoType custoType) + { + return base.Change().Insert(custoType); + } + + /// + /// 删除客户类型 + /// + /// + /// + public bool DeleteCustoType(CustoType custoType) + { + return base.Change().Update(a => new CustoType() + { + delete_mk = 1, + datachg_usr = AdminInfo.Account, + datachg_date = DateTime.Now + },a => a.UserType == custoType.UserType); + } + + /// + /// 更新客户类型 + /// + /// + /// + public bool UpdateCustoType(CustoType custoType) + { + return base.Change().Update(a => new CustoType() + { + TypeName = custoType.TypeName, + datachg_usr = AdminInfo.Account, + datachg_date = DateTime.Now + },a => a.UserType == custoType.UserType); + } + + #endregion + + #region 证件类型模块 + + /// + /// 查询所有证件类型(可用) + /// + /// + public List SelectPassPortTypeAllCanUse() + { + List passPortTypes = new List(); + passPortTypes = base.Change().GetList(a => a.delete_mk != 1); + return passPortTypes; + } + + /// + /// 查询所有证件类型 + /// + /// + public List SelectPassPortTypeAll() + { + List passPortTypes = new List(); + passPortTypes = base.Change().GetList(); + return passPortTypes; + } + + /// + /// 根据证件类型ID查询类型名称 + /// + /// + /// + public PassPortType SelectPassPortTypeByTypeId(PassPortType passPortType) + { + PassPortType passPortType1 = new PassPortType(); + passPortType1 = base.Change().GetSingle(a => a.PassportId == passPortType.PassportId && a.delete_mk != 1); + return passPortType1; + } + + /// + /// 添加证件类型 + /// + /// + /// + public bool InsertPassPortType(PassPortType passPortType) + { + return base.Change().Insert(passPortType); + } + + /// + /// 删除证件类型 + /// + /// + /// + public bool DeletePassPortType(PassPortType portType) + { + return base.Change().Update(a => new PassPortType() + { + delete_mk = 1, + datachg_usr = AdminInfo.Account, + datachg_date = DateTime.Now + }, a => a.PassportId == portType.PassportId); + } + + /// + /// 更新证件类型 + /// + /// + /// + public bool UpdatePassPortType(PassPortType portType) + { + return base.Change().Update(a => new PassPortType() + { + PassportName = portType.PassportName, + datachg_usr = AdminInfo.Account, + datachg_date = DateTime.Now + }, a => a.PassportId == portType.PassportId); + } + + #endregion + + #region 奖惩类型模块 + + /// + /// 查询所有奖惩类型(可用) + /// + /// + public List SelectGBTypeAllCanUse() + { + List gBTypes = new List(); + gBTypes = base.Change().GetList(a => a.delete_mk != 1); + return gBTypes; + } + + /// + /// 查询所有奖惩类型 + /// + /// + public List SelectGBTypeAll() + { + List gBTypes = new List(); + gBTypes = base.Change().GetList(); + return gBTypes; + } + + /// + /// 根据奖惩类型ID查询类型名称 + /// + /// + /// + public GBType SelectGBTypeByTypeId(GBType gBType) + { + GBType gBType1 = new GBType(); + gBType1 = base.Change().GetSingle(a => a.GBTypeId == gBType.GBTypeId && a.delete_mk != 1); + return gBType1; + } + + /// + /// 添加奖惩类型 + /// + /// + /// + public bool InsertGBType(GBType gBType) + { + return base.Change().Insert(gBType); + } + + /// + /// 删除奖惩类型 + /// + /// + /// + public bool DeleteGBType(GBType gBType) + { + return base.Change().Update(a => new GBType() + { + delete_mk = 1, + datachg_usr = AdminInfo.Account, + datachg_date = DateTime.Now + }, a => a.GBTypeId == gBType.GBTypeId); + } + + /// + /// 更新奖惩类型 + /// + /// + /// + public bool UpdateGBType(GBType gBType) + { + return base.Change().Update(a => new GBType() + { + GBName = gBType.GBName, + datachg_usr = AdminInfo.Account, + datachg_date = DateTime.Now + }, a => a.GBTypeId == gBType.GBTypeId); + } + + #endregion + + #region URL模块 + /// + /// 基础URL + /// + /// + public Base GetBase() + { + var baseTemp = new Base(); + + baseTemp = base.Change().GetSingle(a => a.url_no == 1); + + return baseTemp; + } + #endregion + } +} diff --git a/HotelManagerSystemWebApi.Application/Zero/Base/Services/IBaseService.cs b/HotelManagerSystemWebApi.Application/Zero/Base/Services/IBaseService.cs new file mode 100644 index 0000000..ae38150 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Zero/Base/Services/IBaseService.cs @@ -0,0 +1,369 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 基础信息接口 + /// + public interface IBaseService + { + #region 性别模块 + + /// + /// 查询所有性别类型 + /// + /// + List SelectSexTypeAll(SexType sexType = null); + + /// + /// 查询性别类型 + /// + /// + SexType SelectSexType(SexType sexType); + + /// + /// 添加性别类型 + /// + /// + /// + bool AddSexType(SexType sexType); + + /// + /// 删除性别类型 + /// + /// + /// + bool DelSexType(SexType sexType); + + /// + /// 更新性别类型 + /// + /// + /// + bool UpdSexType(SexType sexType); + + #endregion + + #region 职位模块 + + /// + /// 查询所有职位类型 + /// + /// + List SelectPositionAll(Position position = null); + + /// + /// 查询职位类型 + /// + /// + Position SelectPosition(Position position); + + /// + /// 添加职位类型 + /// + /// + /// + bool AddPosition(Position position); + + /// + /// 删除职位类型 + /// + /// + /// + bool DelPosition(Position position); + + /// + /// 更新职位类型 + /// + /// + /// + bool UpdPosition(Position position); + + #endregion + + #region 民族模块 + + /// + /// 查询所有民族类型 + /// + /// + List SelectNationAll(Nation nation = null); + + /// + /// 查询民族类型 + /// + /// + Nation SelectNation(Nation nation); + + /// + /// 添加民族类型 + /// + /// + /// + bool AddNation(Nation nation); + + /// + /// 删除民族类型 + /// + /// + /// + bool DelNation(Nation nation); + + /// + /// 更新民族类型 + /// + /// + /// + bool UpdNation(Nation nation); + + #endregion + + #region 学历模块 + + /// + /// 查询所有学历类型 + /// + /// + List SelectEducationAll(Education education = null); + + /// + /// 查询学历类型 + /// + /// + Education SelectEducation(Education education); + + /// + /// 添加学历类型 + /// + /// + /// + bool AddEducation(Education education); + + /// + /// 删除学历类型 + /// + /// + /// + bool DelEducation(Education education); + + /// + /// 更新学历类型 + /// + /// + /// + bool UpdEducation(Education education); + + #endregion + + #region 部门模块 + + /// + /// 查询所有部门类型(可用) + /// + /// + List SelectDeptAllCanUse(); + + /// + /// 查询所有部门类型 + /// + /// + List SelectDeptAll(); + + /// + /// 查询部门类型 + /// + /// + Dept SelectDept(Dept dept); + + /// + /// 添加部门类型 + /// + /// + /// + bool AddDept(Dept dept); + + /// + /// 删除部门类型 + /// + /// + /// + bool DelDept(Dept dept); + + /// + /// 更新部门类型 + /// + /// + /// + bool UpdDept(Dept dept); + + #endregion + + #region 客户类型模块 + + /// + /// 查询所有客户类型(可用) + /// + /// + List SelectCustoTypeAllCanUse(); + + /// + /// 查询所有客户类型 + /// + /// + List SelectCustoTypeAll(); + + /// + /// 根据客户类型ID查询类型名称 + /// + /// + /// + CustoType SelectCustoTypeByTypeId(CustoType custoType); + + /// + /// 添加客户类型 + /// + /// + /// + bool InsertCustoType(CustoType custoType); + + /// + /// 删除客户类型 + /// + /// + /// + bool DeleteCustoType(CustoType custoType); + + /// + /// 更新客户类型 + /// + /// + /// + bool UpdateCustoType(CustoType custoType); + + #endregion + + #region 证件类型模块 + + /// + /// 查询所有证件类型(可用) + /// + /// + List SelectPassPortTypeAllCanUse(); + + /// + /// 查询所有证件类型 + /// + /// + List SelectPassPortTypeAll(); + + /// + /// 根据证件类型ID查询类型名称 + /// + /// + /// + PassPortType SelectPassPortTypeByTypeId(PassPortType passPortType); + + /// + /// 添加证件类型 + /// + /// + /// + bool InsertPassPortType(PassPortType passPortType); + + /// + /// 删除证件类型 + /// + /// + /// + bool DeletePassPortType(PassPortType portType); + + /// + /// 更新证件类型 + /// + /// + /// + bool UpdatePassPortType(PassPortType portType); + + #endregion + + #region 奖惩类型模块 + + /// + /// 查询所有证件类型(可用) + /// + /// + List SelectGBTypeAllCanUse(); + + /// + /// 查询所有奖惩类型 + /// + /// + List SelectGBTypeAll(); + + /// + /// 根据奖惩类型ID查询类型名称 + /// + /// + /// + GBType SelectGBTypeByTypeId(GBType gBType); + + /// + /// 添加奖惩类型 + /// + /// + /// + bool InsertGBType(GBType gBType); + + /// + /// 删除奖惩类型 + /// + /// + /// + bool DeleteGBType(GBType gBType); + + /// + /// 更新奖惩类型 + /// + /// + /// + bool UpdateGBType(GBType gBType); + + #endregion + + #region URL模块 + /// + /// 基础URL + /// + /// + Base GetBase(); + #endregion + } +} diff --git a/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_CustomerType.cs b/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_CustomerType.cs new file mode 100644 index 0000000..a02f11d --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_CustomerType.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 客户类型 + /// + public class Temp_CustomerType + { + /// + /// 客户类型 + /// + public int UserType { get; set; } + /// + /// 类型名字 + /// + public string TypeName { get; set; } + /// + /// 删除标记 + /// + public int delete_mk { get; set; } + /// + /// 资料创建人 + /// + public string datains_usr { get; set; } + /// + /// 资料创建时间 + /// + public DateTime datains_date { get; set; } + /// + /// 资料更新人 + /// + public string datachg_usr { get; set; } + /// + /// 资料更新时间 + /// + public DateTime datachg_date { get; set; } + } +} diff --git a/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_Dept.cs b/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_Dept.cs new file mode 100644 index 0000000..4e667e5 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_Dept.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 部门表 + /// + public class Temp_Dept + { + /// + /// 部门编号 + /// + public string dept_no { get; set; } + /// + /// 部门名称 + /// + public string dept_name { get; set; } + /// + /// 部门描述 + /// + public string dept_desc { get; set; } + /// + /// 创建时间(部门) + /// + public DateTime dept_date { get; set; } + /// + /// 部门主管 + /// + public string dept_leader { get; set; } + /// + /// 部门主管 + /// + public string leader_name { get; set; } + /// + /// 上级部门 + /// + public string dept_parent { get; set; } + /// + /// 上级部门 + /// + public string parent_name { get; set; } + /// + /// 删除标记 + /// + public int delete_mk { get; set; } + /// + /// 资料创建人 + /// + public string datains_usr { get; set; } + /// + /// 资料创建时间 + /// + public DateTime datains_date { get; set; } + /// + /// 资料更新人 + /// + public string datachg_usr { get; set; } + /// + /// 资料更新时间 + /// + public DateTime datachg_date { get; set; } + } +} diff --git a/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_Education.cs b/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_Education.cs new file mode 100644 index 0000000..6153b92 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_Education.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 学历 + /// + public class Temp_Education + { + /// + /// 学历编号 + /// + public string education_no { get; set; } + /// + /// 学历名称 + /// + public string education_name { get; set; } + /// + /// 删除标记 + /// + public int delete_mk { get; set; } + /// + /// 资料创建人 + /// + public string datains_usr { get; set; } + /// + /// 资料创建时间 + /// + public DateTime datains_date { get; set; } + /// + /// 资料更新人 + /// + public string datachg_usr { get; set; } + /// + /// 资料更新时间 + /// + public DateTime datachg_date { get; set; } + + } +} diff --git a/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_GoodbadType.cs b/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_GoodbadType.cs new file mode 100644 index 0000000..2fb0367 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_GoodbadType.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 奖惩类型实体类 + /// + public class Temp_GoodbadType + { + /// + /// 奖惩编号 + /// + public int GBTypeId { get; set; } + + /// + /// 奖惩名称 + /// + public string GBName { get; set; } + + /// + /// 删除标记 + /// + public int delete_mk { get; set; } + + /// + /// 资料新增人 + /// + public string datains_usr { get; set; } + + /// + /// 资料新增日期 + /// + public DateTime? datains_date { get; set; } + + /// + /// 资料更新人 + /// + public string datachg_usr { get; set; } + + /// + /// 资料更新日期 + /// + public DateTime? datachg_date { get; set; } + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_Job.cs b/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_Job.cs new file mode 100644 index 0000000..45bb060 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_Job.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 职位 + /// + public class Temp_Job + { + /// + /// 职位编号 + /// + public string position_no { get; set; } + /// + /// 职位名称 + /// + public string position_name { get; set; } + /// + /// 删除标记 + /// + public int delete_mk { get; set; } + /// + /// 资料创建人 + /// + public string datains_usr { get; set; } + /// + /// 资料创建时间 + /// + public DateTime datains_date { get; set; } + /// + /// 资料更新人 + /// + public string datachg_usr { get; set; } + /// + /// 资料更新时间 + /// + public DateTime datachg_date { get; set; } + + } +} diff --git a/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_Nation.cs b/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_Nation.cs new file mode 100644 index 0000000..caa3a93 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_Nation.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 民族 + /// + public class Temp_Nation + { + /// + /// 民族编号 + /// + public string nation_no { get; set; } + /// + /// 民族名称 + /// + public string nation_name { get; set; } + /// + /// 删除标记 + /// + public int delete_mk { get; set; } + /// + /// 资料创建人 + /// + public string datains_usr { get; set; } + /// + /// 资料创建时间 + /// + public DateTime? datains_date { get; set; } + /// + /// 资料更新人 + /// + public string datachg_usr { get; set; } + /// + /// 资料更新时间 + /// + public DateTime? datachg_date { get; set; } + + } +} diff --git a/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_PassportType.cs b/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_PassportType.cs new file mode 100644 index 0000000..ca0eb6b --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_PassportType.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 证件类型 + /// + public class Temp_PassportType + { + /// + /// 证件类型 + /// + public int PassportId { get; set; } + + /// + /// 证件名称 + /// + public string PassportName { get; set; } + /// + /// 删除标记 + /// + public int delete_mk { get; set; } + /// + /// 资料创建人 + /// + public string datains_usr { get; set; } + /// + /// 资料创建时间 + /// + public DateTime datains_date { get; set; } + /// + /// 资料更新人 + /// + public string datachg_usr { get; set; } + /// + /// 资料更新时间 + /// + public DateTime datachg_date { get; set; } + } +} diff --git a/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_SexType.cs b/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_SexType.cs new file mode 100644 index 0000000..e3f0226 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_SexType.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 性别 + /// + public class Temp_SexType + { + /// + /// 性别ID + /// + public int sexId { get; set; } + + /// + /// 性别名称 + /// + public string sexName { get; set; } + + /// + /// 删除标记 + /// + public int delete_mk { get; set; } + /// + /// 资料创建人 + /// + public string datains_usr { get; set; } + /// + /// 资料创建时间 + /// + public DateTime datains_date { get; set; } + /// + /// 资料更新人 + /// + public string datachg_usr { get; set; } + /// + /// 资料更新时间 + /// + public DateTime datachg_date { get; set; } + } +} diff --git a/HotelManagerSystemWebApi.Application/Zero/CheckInfo/CheckInfoService.cs b/HotelManagerSystemWebApi.Application/Zero/CheckInfo/CheckInfoService.cs new file mode 100644 index 0000000..189769b --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Zero/CheckInfo/CheckInfoService.cs @@ -0,0 +1,49 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ +using System; +using System.Collections.Generic; +using System.Data.SqlClient; +using MySql.Data.MySqlClient; + + + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 监管统计接口实现类 + /// + public class CheckInfoService:Repository, ICheckInfoService + { + /// + /// 查询所有监管统计信息 + /// + /// + public List SelectCheckInfoAll() + { + List cif = new List(); + cif = base.GetList(a => a.delete_mk != 1); + return cif; + } + } +} diff --git a/HotelManagerSystemWebApi.Application/Zero/CheckInfo/ICheckInfoService.cs b/HotelManagerSystemWebApi.Application/Zero/CheckInfo/ICheckInfoService.cs new file mode 100644 index 0000000..47e412b --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Zero/CheckInfo/ICheckInfoService.cs @@ -0,0 +1,40 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using System.Collections.Generic; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 监管统计接口 + /// + public interface ICheckInfoService + { + /// + /// 查询所有监管统计信息 + /// + /// + List SelectCheckInfoAll(); + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Core/Util/CounterHelper.cs b/HotelManagerSystemWebApi.Application/Zero/CounterRule/CounterHelper.cs similarity index 100% rename from HotelManagerSystemWebApi.Core/Util/CounterHelper.cs rename to HotelManagerSystemWebApi.Application/Zero/CounterRule/CounterHelper.cs diff --git a/HotelManagerSystemWebApi.Application/Zero/Module/AdminModuleZeroService.cs b/HotelManagerSystemWebApi.Application/Zero/Module/AdminModuleZeroService.cs new file mode 100644 index 0000000..19cad46 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Zero/Module/AdminModuleZeroService.cs @@ -0,0 +1,138 @@ + + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 管理员模块权限管理接口实现类 + /// + public class AdminModuleZeroService:Repository, IAdminModuleZeroService + { + /// + /// 获取所有模块 + /// + /// + public List GetAllModule() + { + List modules = base.Change().GetList(); + modules.ForEach(source => + { + switch (source.module_name) + { + case ModuleConsts.BaseInfo: + source.module_name = ModuleConsts.BaseInfo + "||" + "基础信息"; + break; + case ModuleConsts.CashInfo: + source.module_name = ModuleConsts.CashInfo + "||" + "财务信息"; + break; + case ModuleConsts.WtiInfo: + source.module_name = ModuleConsts.WtiInfo + "||" + "水电管理"; + break; + case ModuleConsts.CheckInfo: + source.module_name = ModuleConsts.CheckInfo + "||" + "监管统计"; + break; + case ModuleConsts.RoomManager: + source.module_name = ModuleConsts.RoomManager + "||" + "客房管理"; + break; + case ModuleConsts.CustomerManager: + source.module_name = ModuleConsts.CustomerManager + "||" + "客户管理"; + break; + case ModuleConsts.HumanResourcesManager: + source.module_name = ModuleConsts.HumanResourcesManager + "||" + "人事管理"; + break; + case ModuleConsts.MaterialManager: + source.module_name = ModuleConsts.MaterialManager + "||" + "物资管理"; + break; + case ModuleConsts.OperationLogManager: + source.module_name = ModuleConsts.OperationLogManager + "||" + "员工操作日志"; + break; + case ModuleConsts.AdminManager: + source.module_name = ModuleConsts.AdminManager + "||" + "系统管理"; + break; + } + }); + return modules; + } + + /// + /// 根据账号获取对应模块 + /// + /// + /// + public List GetAllModuleByAdmin(Admin admin) + { + List moduleZeros = base.GetList(a => a.admin_account.Equals(admin.AdminAccount) + && a.module_enable == 1); + moduleZeros.ForEach(source => + { + switch (source.module_name) + { + case ModuleConsts.BaseInfo: + source.module_name = ModuleConsts.BaseInfo + "||" + "基础信息"; + break; + case ModuleConsts.CashInfo: + source.module_name = ModuleConsts.CashInfo + "||" + "财务信息"; + break; + case ModuleConsts.WtiInfo: + source.module_name = ModuleConsts.WtiInfo + "||" + "水电管理"; + break; + case ModuleConsts.CheckInfo: + source.module_name = ModuleConsts.CheckInfo + "||" + "监管统计"; + break; + case ModuleConsts.RoomManager: + source.module_name = ModuleConsts.RoomManager + "||" + "客房管理"; + break; + case ModuleConsts.CustomerManager: + source.module_name = ModuleConsts.CustomerManager + "||" + "客户管理"; + break; + case ModuleConsts.HumanResourcesManager: + source.module_name = ModuleConsts.HumanResourcesManager + "||" + "人事管理"; + break; + case ModuleConsts.MaterialManager: + source.module_name = ModuleConsts.MaterialManager + "||" + "物资管理"; + break; + case ModuleConsts.OperationLogManager: + source.module_name = ModuleConsts.OperationLogManager + "||" + "员工操作日志"; + break; + case ModuleConsts.AdminManager: + source.module_name = ModuleConsts.AdminManager + "||" + "系统管理"; + break; + } + }); + return moduleZeros; + } + + /// + /// 批量添加模块 + /// + /// + /// + public bool AddModuleZeroList(List moduleZeros) + { + moduleZeros.ForEach(moduleZero => + { + moduleZero.module_name = moduleZero.module_name.Split('|','|').FirstOrDefault().ToString(); + }); + var result = base.InsertRange(moduleZeros); + return result; + } + + /// + /// 批量删除模块 + /// + /// + /// + public bool DelModuleZeroList(ModuleZero moduleZero) + { + var result = base.Delete(a => a.admin_account.Equals(moduleZero.admin_account)); + return result; + } + + + } +} diff --git a/HotelManagerSystemWebApi.Application/Zero/Module/IAdminModuleZeroService.cs b/HotelManagerSystemWebApi.Application/Zero/Module/IAdminModuleZeroService.cs new file mode 100644 index 0000000..a87aff5 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Zero/Module/IAdminModuleZeroService.cs @@ -0,0 +1,43 @@ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 管理员模块权限管理接口 + /// + public interface IAdminModuleZeroService + { + /// + /// 获取所有模块 + /// + /// + List GetAllModule(); + + /// + /// 根据账号获取对应模块 + /// + /// + /// + List GetAllModuleByAdmin(Admin admin); + + /// + /// 批量添加模块 + /// + /// + /// + bool AddModuleZeroList(List moduleZeros); + + /// + /// 批量删除模块 + /// + /// + /// + bool DelModuleZeroList(ModuleZero moduleZero); + + } +} diff --git a/HotelManagerSystemWebApi.Application/Zero/Notice/INoticeService.cs b/HotelManagerSystemWebApi.Application/Zero/Notice/INoticeService.cs new file mode 100644 index 0000000..c5474ec --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Zero/Notice/INoticeService.cs @@ -0,0 +1,53 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using System.Collections.Generic; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 公告接口 + /// + public interface INoticeService + { + #region 获取所有公告信息 + /// + /// 获取所有公告信息 + /// + /// + List SelectNoticeAll(); + #endregion + + + #region 上传公告信息 + /// + /// 上传公告信息 + /// + /// + /// + bool InsertNotice(Notice notice); + + #endregion + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Zero/Notice/NoticeService.cs b/HotelManagerSystemWebApi.Application/Zero/Notice/NoticeService.cs new file mode 100644 index 0000000..7873ed4 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Zero/Notice/NoticeService.cs @@ -0,0 +1,97 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ +using System; +using System.Collections.Generic; +using MySql.Data.MySqlClient; + + + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 公告信息接口实现类 + /// + public class NoticeService:Repository, INoticeService + { + #region 获取所有公告信息 + /// + /// 获取所有公告信息 + /// + /// + public List SelectNoticeAll() + { + List ntc = new List(); + ntc = base.GetList(a => a.delete_mk != 1); + ntc.ForEach(source => + { + switch (source.NoticeType) + { + case "PersonnelChanges": + source.NoticeTypeName = "人事变动"; + break; + case "GeneralNotice": + source.NoticeTypeName = "普通公告"; + break; + } + }); + return ntc; + } + #endregion + + /// + /// 根据公告编号查找公告信息 + /// + /// + /// + public Notice SelectNoticeByNoticeNo(string NoticeNo) + { + Notice notice = new Notice(); + notice = base.GetSingle(a => a.NoticeNo == NoticeNo); + switch (notice.NoticeType) + { + case "PersonnelChanges": + notice.NoticeTypeName = "人事变动"; + break; + case "GeneralNotice": + notice.NoticeTypeName = "普通公告"; + break; + } + return notice; + } + + #region 上传公告信息 + /// + /// 上传公告信息 + /// + /// + /// + public bool InsertNotice(Notice notice) + { + return base.Insert(notice); + } + + #endregion + + } +} diff --git a/HotelManagerSystemWebApi.Application/Zero/VipRule/IVipRuleAppService.cs b/HotelManagerSystemWebApi.Application/Zero/VipRule/IVipRuleAppService.cs new file mode 100644 index 0000000..1893f30 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Zero/VipRule/IVipRuleAppService.cs @@ -0,0 +1,73 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + *模块说明:会员等级规则功能模块接口 + */ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HotelManagerSystemWebApi.Application.Zero +{ + /// + /// 会员等级规则功能模块接口 + /// + public interface IVipRuleAppService + { + /// + /// 查询会员等级规则列表 + /// + /// + List SelectVipRuleList(); + + /// + /// 查询会员等级规则 + /// + /// + /// + VipRule SelectVipRule(VipRule vipRule); + + /// + /// 添加会员等级规则 + /// + /// + /// + bool AddVipRule(VipRule vipRule); + + /// + /// 删除会员等级规则 + /// + /// + /// + bool DelVipRule(VipRule vipRule); + + /// + /// 更新会员等级规则 + /// + /// + /// + bool UpdVipRule(VipRule vipRule); + } +} diff --git a/HotelManagerSystemWebApi.Application/Zero/VipRule/VipRuleAppService.cs b/HotelManagerSystemWebApi.Application/Zero/VipRule/VipRuleAppService.cs new file mode 100644 index 0000000..f0fa6ea --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Zero/VipRule/VipRuleAppService.cs @@ -0,0 +1,109 @@ + + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace HotelManagerSystemWebApi.Application.Zero +{ + /// + /// 会员等级规则功能模块接口实现类 + /// + public class VipRuleAppService:Repository, IVipRuleAppService + { + /// + /// 查询会员等级规则列表 + /// + /// + public List SelectVipRuleList() + { + List vipRules = new List(); + + var listSource = base.GetList(a => a.delete_mk != 1); + + var listUserType = base.Change().GetList(a => a.delete_mk != 1); + + listSource.ForEach(source => + { + var userType = listUserType.FirstOrDefault(a => a.UserType == source.type_id); + source.type_name = userType == null ? "" : userType.TypeName; + }); + + vipRules = listSource; + + return vipRules; + } + + /// + /// 查询会员等级规则 + /// + /// + /// + public VipRule SelectVipRule(VipRule vipRule) + { + VipRule vipRule1 = new VipRule(); + + var source = base.GetSingle(a => a.rule_id.Equals(vipRule.rule_id)); + + var userType = base.Change().GetSingle(a => a.UserType == source.type_id); + source.type_name = userType == null ? "" : userType.TypeName; + + vipRule1 = source; + + return vipRule1; + } + + /// + /// 添加会员等级规则 + /// + /// + /// + public bool AddVipRule(VipRule vipRule) + { + return base.Insert(new VipRule() + { + rule_id = vipRule.rule_id, + rule_name = vipRule.rule_name, + rule_value = vipRule.rule_value, + type_id = vipRule.type_id, + delete_mk = 0, + datains_usr = AdminInfo.Account, + datains_date = DateTime.Now + }); + } + + /// + /// 删除会员等级规则 + /// + /// + /// + public bool DelVipRule(VipRule vipRule) + { + return base.Update(a => new VipRule + { + delete_mk = 1, + datachg_usr = AdminInfo.Account, + datachg_date = DateTime.Now + },a => a.rule_id == vipRule.rule_id); + } + + /// + /// 更新会员等级规则 + /// + /// + /// + public bool UpdVipRule(VipRule vipRule) + { + return base.Update(a => new VipRule + { + rule_name = vipRule.rule_name, + rule_value = vipRule.rule_value, + delete_mk = vipRule.delete_mk, + datachg_usr = AdminInfo.Account, + datachg_date = DateTime.Now + }, a => a.rule_id == vipRule.rule_id); + } + } +} diff --git a/HotelManagerSystemWebApi.Core/Business/Cash/Cash.cs b/HotelManagerSystemWebApi.Core/Business/Cash/Cash.cs index ac44131..2b434ba 100644 --- a/HotelManagerSystemWebApi.Core/Business/Cash/Cash.cs +++ b/HotelManagerSystemWebApi.Core/Business/Cash/Cash.cs @@ -22,6 +22,7 @@ * *模块说明:资产类 */ +using Furion.DatabaseAccessor; using System; using System.ComponentModel.DataAnnotations.Schema; @@ -31,7 +32,7 @@ namespace HotelManagerSystemWebApi.Core /// 资产管理 /// [Table("cashinfo")] - public class Cash + public class Cash:IEntity { /// /// 资产编号 diff --git a/HotelManagerSystemWebApi.Core/Business/Customer/Custo.cs b/HotelManagerSystemWebApi.Core/Business/Customer/Custo.cs index 4deb122..70979a6 100644 --- a/HotelManagerSystemWebApi.Core/Business/Customer/Custo.cs +++ b/HotelManagerSystemWebApi.Core/Business/Customer/Custo.cs @@ -22,6 +22,7 @@ * *模块说明:客户信息类 */ +using Furion.DatabaseAccessor; using System; using System.ComponentModel.DataAnnotations.Schema; @@ -31,7 +32,7 @@ namespace HotelManagerSystemWebApi.Core /// 客户信息 /// [Table("userinfo")] - public class Custo + public class Custo:IEntity { /// /// 客户编号 diff --git a/HotelManagerSystemWebApi.Core/Business/Fonts/Fonts.cs b/HotelManagerSystemWebApi.Core/Business/Fonts/Fonts.cs index fd2b8e0..03cd520 100644 --- a/HotelManagerSystemWebApi.Core/Business/Fonts/Fonts.cs +++ b/HotelManagerSystemWebApi.Core/Business/Fonts/Fonts.cs @@ -22,6 +22,7 @@ * *模块说明:宣传联动类 */ +using Furion.DatabaseAccessor; using System.ComponentModel.DataAnnotations.Schema; namespace HotelManagerSystemWebApi.Core @@ -30,7 +31,7 @@ namespace HotelManagerSystemWebApi.Core /// 酒店宣传联动内容 /// [Table("fonts")] - public class Fonts + public class Fonts:IEntity { /// /// 宣传内容编号 diff --git a/HotelManagerSystemWebApi.Core/Business/Wti/Wti.cs b/HotelManagerSystemWebApi.Core/Business/Hydropower/Hydropower.cs similarity index 97% rename from HotelManagerSystemWebApi.Core/Business/Wti/Wti.cs rename to HotelManagerSystemWebApi.Core/Business/Hydropower/Hydropower.cs index 1780b3d..e80f6b7 100644 --- a/HotelManagerSystemWebApi.Core/Business/Wti/Wti.cs +++ b/HotelManagerSystemWebApi.Core/Business/Hydropower/Hydropower.cs @@ -22,6 +22,7 @@ * *模块说明:水电信息类 */ +using Furion.DatabaseAccessor; using System; using System.ComponentModel.DataAnnotations.Schema; @@ -31,7 +32,7 @@ namespace HotelManagerSystemWebApi.Core /// 水电信息 /// [Table("wtinfo")] - public class Wti + public class Hydropower:IEntity { /// /// 信息编号 diff --git a/HotelManagerSystemWebApi.Core/Business/Reser/Reser.cs b/HotelManagerSystemWebApi.Core/Business/Reser/Reser.cs index 264c1a3..70d5bd1 100644 --- a/HotelManagerSystemWebApi.Core/Business/Reser/Reser.cs +++ b/HotelManagerSystemWebApi.Core/Business/Reser/Reser.cs @@ -22,6 +22,7 @@ * *模块说明:预约类 */ +using Furion.DatabaseAccessor; using System; using System.ComponentModel.DataAnnotations.Schema; @@ -31,7 +32,7 @@ namespace HotelManagerSystemWebApi.Core /// 预约列表 /// [Table("reser")] - public class Reser + public class Reser:IEntity { /// /// 预约编号 diff --git a/HotelManagerSystemWebApi.Core/Business/Room/Room.cs b/HotelManagerSystemWebApi.Core/Business/Room/Room.cs index 2eee0ca..d9b81d0 100644 --- a/HotelManagerSystemWebApi.Core/Business/Room/Room.cs +++ b/HotelManagerSystemWebApi.Core/Business/Room/Room.cs @@ -22,6 +22,7 @@ * *模块说明:房间类 */ +using Furion.DatabaseAccessor; using System; using System.ComponentModel.DataAnnotations.Schema; @@ -31,7 +32,7 @@ namespace HotelManagerSystemWebApi.Core /// 房间实体类 /// [Table("room")] - public class Room + public class Room:IEntity { /// /// 房间编号 diff --git a/HotelManagerSystemWebApi.Core/Business/Room/RoomState.cs b/HotelManagerSystemWebApi.Core/Business/Room/RoomState.cs index 28e33ca..b1615cc 100644 --- a/HotelManagerSystemWebApi.Core/Business/Room/RoomState.cs +++ b/HotelManagerSystemWebApi.Core/Business/Room/RoomState.cs @@ -22,7 +22,8 @@ * *模块说明:房间状态类 */ -using System; + +using Furion.DatabaseAccessor; using System.ComponentModel.DataAnnotations.Schema; namespace HotelManagerSystemWebApi.Core @@ -31,7 +32,7 @@ namespace HotelManagerSystemWebApi.Core /// 房间状态 /// [Table("roomstate")] - public class RoomState + public class RoomState:IEntity { /// /// 房间状态编号 diff --git a/HotelManagerSystemWebApi.Core/Business/Room/RoomType.cs b/HotelManagerSystemWebApi.Core/Business/Room/RoomType.cs index dca134a..c74c119 100644 --- a/HotelManagerSystemWebApi.Core/Business/Room/RoomType.cs +++ b/HotelManagerSystemWebApi.Core/Business/Room/RoomType.cs @@ -22,6 +22,7 @@ * *模块说明:房间类型类 */ +using Furion.DatabaseAccessor; using System; using System.ComponentModel.DataAnnotations.Schema; @@ -31,7 +32,7 @@ namespace HotelManagerSystemWebApi.Core /// 房间类型 /// [Table("roomtype")] - public class RoomType + public class RoomType:IEntity { /// /// 类型编号 diff --git a/HotelManagerSystemWebApi.Core/Business/Spend/Spend.cs b/HotelManagerSystemWebApi.Core/Business/Spend/Spend.cs index 7699429..0482a96 100644 --- a/HotelManagerSystemWebApi.Core/Business/Spend/Spend.cs +++ b/HotelManagerSystemWebApi.Core/Business/Spend/Spend.cs @@ -22,6 +22,7 @@ * *模块说明:消费信息类 */ +using Furion.DatabaseAccessor; using System; using System.ComponentModel.DataAnnotations.Schema; @@ -31,7 +32,7 @@ namespace HotelManagerSystemWebApi.Core /// 消费信息 /// [Table("custospend")] - public class Spend + public class Spend:IEntity { /// /// 房间编号 diff --git a/HotelManagerSystemWebApi.Core/DtoExtend/BaseDto/IBaseDto.cs b/HotelManagerSystemWebApi.Core/DtoExtend/BaseDto/IBaseDto.cs index c7e68ae..6c1a272 100644 --- a/HotelManagerSystemWebApi.Core/DtoExtend/BaseDto/IBaseDto.cs +++ b/HotelManagerSystemWebApi.Core/DtoExtend/BaseDto/IBaseDto.cs @@ -9,8 +9,11 @@ namespace HotelManagerSystemWebApi.Core /// /// 输入DTO /// - public class IBaseDto:BaseDto + public class IBaseDto { - + /// + /// 当前登录人员 + /// + public string NowLoginUsr { get; set; } } } diff --git a/HotelManagerSystemWebApi.Core/DtoExtend/BaseDto/IListDto.cs b/HotelManagerSystemWebApi.Core/DtoExtend/BaseDto/IListDto.cs index 6e652b3..f2f3929 100644 --- a/HotelManagerSystemWebApi.Core/DtoExtend/BaseDto/IListDto.cs +++ b/HotelManagerSystemWebApi.Core/DtoExtend/BaseDto/IListDto.cs @@ -9,16 +9,16 @@ namespace HotelManagerSystemWebApi.Core /// /// 输入DTO(列表) /// - public class IListDto:BaseDto + public class IListDto:IBaseDto { /// /// 页数 /// - public int? PageIndex { get; set; } + public int PageIndex { get; set; } /// /// 总数 /// - public int? PageSize { get; set; } + public int PageSize { get; set; } } } diff --git a/HotelManagerSystemWebApi.Core/DtoExtend/BaseDto/MsgDto.cs b/HotelManagerSystemWebApi.Core/DtoExtend/BaseDto/MsgDto.cs index f0b8b71..8d9a639 100644 --- a/HotelManagerSystemWebApi.Core/DtoExtend/BaseDto/MsgDto.cs +++ b/HotelManagerSystemWebApi.Core/DtoExtend/BaseDto/MsgDto.cs @@ -9,7 +9,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 输出DTO /// - public abstract class MsgDto:BaseDto + public abstract class MsgDto:IBaseDto { /// /// 状态码 diff --git a/HotelManagerSystemWebApi.Core/DtoExtend/DtoExtend.cs b/HotelManagerSystemWebApi.Core/DtoExtend/DtoExtend.cs index 2895fa2..7f8ff9f 100644 --- a/HotelManagerSystemWebApi.Core/DtoExtend/DtoExtend.cs +++ b/HotelManagerSystemWebApi.Core/DtoExtend/DtoExtend.cs @@ -12,6 +12,116 @@ namespace HotelManagerSystemWebApi.Core /// public static class DtoExtend { + /// + /// 对结果进行分页处理 + /// + /// + /// + /// + /// + /// + /// + public static List GetPageList(this List source,int pageIndex,int pageSize,ref int count) + { + var listSource = source.Skip((pageIndex - 1) * pageSize) + .Take(pageSize).ToList(); + count = source.Count; + return listSource; + } + + /// + /// 实体集合转换成指定实体集合 + /// + /// 输入实体类型 + /// 输出实体类型 + /// 输入数据源 + /// 输出数据源 + public static List CopyToModel(this List source) + { + List listT2 = new List(); + + T2 _T2 = default(T2); + PropertyInfo[] _T1PI = typeof(T1).GetProperties(); + PropertyInfo[] _T2PI = typeof(T2).GetProperties(); + foreach (T1 _T1 in source) + { + _T2 = Activator.CreateInstance(); + for (int i = 0; i < _T2PI.Length; i++) + { + //判断源实体中有没有对应的字段属性 + var _PI = _T1PI.Where(a => a.Name.ToUpper() == _T2PI[i].Name.ToUpper()).FirstOrDefault(); + if (_PI == null) + { + //字段名称 + var propName = string.Empty; + //获取字段的自定义属性 + var mappingField = _T2PI[i].GetCustomAttribute(); + //如果自定义的映射属性存在,则取属性名称 + if (mappingField != null) + { + propName = mappingField.ColName; + } + else + { + propName = _T2PI[i].Name; + } + //判断源实体中有没有对应的字段属性 + _PI = _T1PI.Where(a => a.Name.ToUpper() == propName.ToUpper()).FirstOrDefault(); + } + if (_PI != null) + { + object value = _PI.GetValue(_T1, null); + Type t = _T2PI[i].PropertyType; + if ((!t.Equals(_PI.PropertyType)) && value != null) + { + if (t == typeof(int)) + { + value = Convert.ToInt32(_PI.GetValue(_T1, null)); + } + else if (t == typeof(int?)) + { + value = Convert.ToInt32(_PI.GetValue(_T1, null)); + } + else if (t == typeof(string)) + { + if (_PI.PropertyType == typeof(byte[])) + { + value = System.Text.Encoding.UTF8.GetString((byte[])_PI.GetValue(_T1, null)); + } + else + { + value = _PI.GetValue(_T1, null) + ""; + } + } + else if (t == typeof(DateTime)) + { + value = Convert.ToDateTime(_PI.GetValue(_T1, null)); + } + else if (t == typeof(DateTime?)) + { + value = Convert.ToDateTime(_PI.GetValue(_T1, null)); + } + else if (t == typeof(decimal?)) + { + value = Convert.ToDecimal(_PI.GetValue(_T1, null)); + } + else if (t == typeof(decimal)) + { + value = Convert.ToDecimal(_PI.GetValue(_T1, null)); + } + else + { + value = _PI.GetValue(_T1, null); + } + } + _T2PI[i].SetValue(_T2, value, null); + } + } + listT2.Add(_T2); + } + return listT2; + } + /// /// 复制实体A的数据到实体B /// @@ -19,7 +129,7 @@ namespace HotelManagerSystemWebApi.Core /// /// /// - public static T2 CopyModelTo(this T1 t1) where T2 : class, new() + public static T2 CopyToModel(this T1 t1) where T2 : class, new() { T2 t2 = Activator.CreateInstance(); var tInType = t1.GetType(); diff --git a/HotelManagerSystemWebApi.Core/HotelManagerSystemWebApi.Core.csproj b/HotelManagerSystemWebApi.Core/HotelManagerSystemWebApi.Core.csproj index a272fbd..8e5c4e9 100644 --- a/HotelManagerSystemWebApi.Core/HotelManagerSystemWebApi.Core.csproj +++ b/HotelManagerSystemWebApi.Core/HotelManagerSystemWebApi.Core.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 1701;1702;1591 HotelManagerSystemWebApi.Core.xml @@ -27,9 +27,9 @@ - - - + + + diff --git a/HotelManagerSystemWebApi.Core/HotelManagerSystemWebApi.Core.xml b/HotelManagerSystemWebApi.Core/HotelManagerSystemWebApi.Core.xml index a1f6e14..6bbb3ac 100644 --- a/HotelManagerSystemWebApi.Core/HotelManagerSystemWebApi.Core.xml +++ b/HotelManagerSystemWebApi.Core/HotelManagerSystemWebApi.Core.xml @@ -159,141 +159,91 @@ 总金额 - - - 客户类型 - - - - - 客户类型 - - - - - 类型名字 - - - - - 删除标记 - - - - - 资料创建人 - - - - - 资料创建时间 - - - - - 资料更新人 - - - + - 资料更新时间 + 酒店宣传联动内容 - + - 证件类型 + 宣传内容编号 - + - 证件类型 + 宣传内容 - + - 证件名称 + 水电信息 - + - 删除标记 + 信息编号 - + - 资料创建人 + 房间编号 - + - 资料创建时间 + 开始使用时间 - + - 资料更新人 + 结束使用时间 - + - 资料更新时间 + 水费 - + - 性别 + 电费 - + - 性别ID + 记录员 - + - 性别名称 + 客户编号 - + 删除标记 - + 资料创建人 - + 资料创建时间 - + 资料更新人 - + 资料更新时间 - - - 酒店宣传联动内容 - - - - - 宣传内容编号 - - - - - 宣传内容 - - 预约列表 @@ -654,91 +604,16 @@ 未结算状态常量 - - - 水电信息 - - - - - 信息编号 - - - - - 房间编号 - - - - - 开始使用时间 - - - - - 结束使用时间 - - - - - 水费 - - - - - 电费 - - - - - 记录员 - - - - - 客户编号 - - - - - 删除标记 - - - - - 资料创建人 - - - - - 资料创建时间 - - - - - 资料更新人 - - - - - 资料更新时间 - - - + - DTO基础类 + 输入DTO - + 当前登录人员 - - - 输入DTO - - 输入DTO(列表) @@ -774,7 +649,27 @@ 实体类库 - + + + 对结果进行分页处理 + + + + + + + + + + + 实体集合转换成指定实体集合 + + 输入实体类型 + 输出实体类型 + 输入数据源 + 输出数据源 + + 复制实体A的数据到实体B @@ -1019,102 +914,112 @@ Token过期 - + - 员工信息 + 员工奖罚 - + - 员工账号/工号 + 工号 - + - 员工姓名 + 奖惩信息 - + - 出生日期 + 奖惩类型 - + - 员工性别 + 奖惩操作人 - + - 民族类型 + 奖惩时间 - + - 员工电话 + 删除标记 - + - 所属部门 + 资料创建人 - + - 居住地址 + 资料创建时间 - + - 员工职位 + 资料更新人 - + - 证件号码 + 资料更新时间 - + - 员工密码 + 员工履历 - + - 员工入职时间 + 工号 - + - 员工面貌 + 开始时间 - + - 教育程度 + 结束时间 - + + + 职位 + + + + + 公司 + + + 删除标记 - + 资料创建人 - + 资料创建时间 - + 资料更新人 - + 资料更新时间 @@ -1169,112 +1074,102 @@ 资料更新时间 - + - 员工奖罚 + 员工信息 - + - 工号 + 员工账号/工号 - + - 奖惩信息 - - - - - 奖惩类型 - - - - - 奖惩操作人 + 员工姓名 - + - 奖惩时间 + 出生日期 - + - 删除标记 + 员工性别 - + - 资料创建人 + 民族类型 - + - 资料创建时间 + 员工电话 - + - 资料更新人 + 所属部门 - + - 资料更新时间 + 居住地址 - + - 员工履历 + 员工职位 - + - 工号 + 证件号码 - + - 开始时间 + 员工密码 - + - 结束时间 + 员工入职时间 - + - 职位 + 员工面貌 - + - 公司 + 教育程度 - + 删除标记 - + 资料创建人 - + 资料创建时间 - + 资料更新人 - + 资料更新时间 @@ -1309,99 +1204,399 @@ 管理员密码 - + + + 管理员类型 + + + + + 管理员名称 + + + + + 是否为超级管理员 + + + + + 删除标记 + + + + + 资料新增人 + + + + + 资料新增时间 + + + + + 资料更新人 + + + + + 资料更新时间 + + + + + 管理员类型 + + + + + 编号 + + + + + 管理员类型 + + + + + 类型名称 + + + + + 删除标记 + + + + + 新增人 + + + + + 新增时间 + + + + + 修改人 + + + + + 修改时间 + + + + + 地址编号 + + + + + 地址 + + + + + 客户类型 + + + + + 客户类型 + + + + + 类型名字 + + + + + 删除标记 + + + + + 资料创建人 + + + + + 资料创建时间 + + + + + 资料更新人 + + + + + 资料更新时间 + + + + + 部门表 + + + + + 部门编号 + + + + + 部门名称 + + + + + 部门描述 + + + + + 创建时间(部门) + + + + + 部门主管 + + + + + 上级部门 + + + + + 删除标记 + + + + + 资料创建人 + + + + + 资料创建时间 + + + + + 资料更新人 + + + + + 资料更新时间 + + + + + 学历 + + + + + 学历编号 + + + + + 学历名称 + + + + + 删除标记 + + + + + 资料创建人 + + + + + 资料创建时间 + + + + + 资料更新人 + + + + + 资料更新时间 + + + + + 民族 + + + + + 民族编号 + + + + + 民族名称 + + + + + 删除标记 + + + + + 资料创建人 + + + + + 资料创建时间 + + + + + 资料更新人 + + + + + 资料更新时间 + + + + + 证件类型 + + + + + 证件类型 + + + + + 证件名称 + + + + + 删除标记 + + + + + 资料创建人 + + + - 管理员类型 + 资料创建时间 - + - 管理员名称 + 资料更新人 - + - 是否为超级管理员 + 资料更新时间 - + - 删除标记 + 职位 - + - 资料新增人 + 职位编号 - + - 资料新增时间 + 职位名称 - + - 资料更新人 + 删除标记 - + - 资料更新时间 + 资料创建人 - + - 管理员类型 + 资料创建时间 - + - 编号 + 资料更新人 - + - 管理员类型 + 资料更新时间 - + - 类型名称 + 性别 - + - 删除标记 + 性别ID - + - 新增人 + 性别名称 - + - 新增时间 + 删除标记 - + - 修改人 + 资料创建人 - + - 修改时间 + 资料创建时间 - + - 地址编号 + 资料更新人 - + - 地址 + 资料更新时间 @@ -1574,106 +1769,6 @@ 资料更新时间 - - - 部门表 - - - - - 部门编号 - - - - - 部门名称 - - - - - 部门描述 - - - - - 创建时间(部门) - - - - - 部门主管 - - - - - 上级部门 - - - - - 删除标记 - - - - - 资料创建人 - - - - - 资料创建时间 - - - - - 资料更新人 - - - - - 资料更新时间 - - - - - 学历 - - - - - 学历编号 - - - - - 学历名称 - - - - - 删除标记 - - - - - 资料创建人 - - - - - 资料创建时间 - - - - - 资料更新人 - - - - - 资料更新时间 - - 模块实体 @@ -1799,46 +1894,6 @@ 是否开启 - - - 民族 - - - - - 民族编号 - - - - - 民族名称 - - - - - 删除标记 - - - - - 资料创建人 - - - - - 资料创建时间 - - - - - 资料更新人 - - - - - 资料更新时间 - - 任命公告 @@ -1959,46 +2014,6 @@ 资料更新时间 - - - 职位 - - - - - 职位编号 - - - - - 职位名称 - - - - - 删除标记 - - - - - 资料创建人 - - - - - 资料创建时间 - - - - - 资料更新人 - - - - - 资料更新时间 - - 会员等级规则类 diff --git a/HotelManagerSystemWebApi.Core/Worker/GBType.cs b/HotelManagerSystemWebApi.Core/Worker/Goodbad/GBType.cs similarity index 100% rename from HotelManagerSystemWebApi.Core/Worker/GBType.cs rename to HotelManagerSystemWebApi.Core/Worker/Goodbad/GBType.cs diff --git a/HotelManagerSystemWebApi.Core/Worker/WorkerGoodBad.cs b/HotelManagerSystemWebApi.Core/Worker/Goodbad/WorkerGoodBad.cs similarity index 100% rename from HotelManagerSystemWebApi.Core/Worker/WorkerGoodBad.cs rename to HotelManagerSystemWebApi.Core/Worker/Goodbad/WorkerGoodBad.cs diff --git a/HotelManagerSystemWebApi.Core/Worker/WorkerHistory.cs b/HotelManagerSystemWebApi.Core/Worker/History/WorkerHistory.cs similarity index 100% rename from HotelManagerSystemWebApi.Core/Worker/WorkerHistory.cs rename to HotelManagerSystemWebApi.Core/Worker/History/WorkerHistory.cs diff --git a/HotelManagerSystemWebApi.Core/Worker/WorkerCheck.cs b/HotelManagerSystemWebApi.Core/Worker/WorkerCheck/WorkerCheck.cs similarity index 100% rename from HotelManagerSystemWebApi.Core/Worker/WorkerCheck.cs rename to HotelManagerSystemWebApi.Core/Worker/WorkerCheck/WorkerCheck.cs diff --git a/HotelManagerSystemWebApi.Core/Worker/Worker.cs b/HotelManagerSystemWebApi.Core/Worker/WorkerInfo/Worker.cs similarity index 98% rename from HotelManagerSystemWebApi.Core/Worker/Worker.cs rename to HotelManagerSystemWebApi.Core/Worker/WorkerInfo/Worker.cs index f94b418..7c2624f 100644 --- a/HotelManagerSystemWebApi.Core/Worker/Worker.cs +++ b/HotelManagerSystemWebApi.Core/Worker/WorkerInfo/Worker.cs @@ -22,6 +22,7 @@ * *模块说明:员工信息类 */ +using Furion.DatabaseAccessor; using System; using System.ComponentModel.DataAnnotations.Schema; @@ -31,7 +32,7 @@ namespace HotelManagerSystemWebApi.Core /// 员工信息 /// [Table("worker")] - public class Worker + public class Worker : IEntity { /// /// 员工账号/工号 diff --git a/HotelManagerSystemWebApi.Core/Worker/WorkerPic.cs b/HotelManagerSystemWebApi.Core/Worker/WorkerPic/WorkerPic.cs similarity index 100% rename from HotelManagerSystemWebApi.Core/Worker/WorkerPic.cs rename to HotelManagerSystemWebApi.Core/Worker/WorkerPic/WorkerPic.cs diff --git a/HotelManagerSystemWebApi.Core/Zero/AdminInfo.cs b/HotelManagerSystemWebApi.Core/Zero/AdminInfo/AdminInfo.cs similarity index 100% rename from HotelManagerSystemWebApi.Core/Zero/AdminInfo.cs rename to HotelManagerSystemWebApi.Core/Zero/AdminInfo/AdminInfo.cs diff --git a/HotelManagerSystemWebApi.Core/Zero/AdminType.cs b/HotelManagerSystemWebApi.Core/Zero/AdminInfo/AdminType.cs similarity index 100% rename from HotelManagerSystemWebApi.Core/Zero/AdminType.cs rename to HotelManagerSystemWebApi.Core/Zero/AdminInfo/AdminType.cs diff --git a/HotelManagerSystemWebApi.Core/Business/Customer/CustoType.cs b/HotelManagerSystemWebApi.Core/Zero/Base/CustoType.cs similarity index 97% rename from HotelManagerSystemWebApi.Core/Business/Customer/CustoType.cs rename to HotelManagerSystemWebApi.Core/Zero/Base/CustoType.cs index 43d033a..db8dc33 100644 --- a/HotelManagerSystemWebApi.Core/Business/Customer/CustoType.cs +++ b/HotelManagerSystemWebApi.Core/Zero/Base/CustoType.cs @@ -22,6 +22,7 @@ * *模块说明:客户类型类 */ +using Furion.DatabaseAccessor; using System; using System.ComponentModel.DataAnnotations.Schema; @@ -31,7 +32,7 @@ namespace HotelManagerSystemWebApi.Core /// 客户类型 /// [Table("usertype")] - public class CustoType + public class CustoType:IEntity { /// /// 客户类型 diff --git a/HotelManagerSystemWebApi.Core/Zero/Dept.cs b/HotelManagerSystemWebApi.Core/Zero/Base/Dept.cs similarity index 98% rename from HotelManagerSystemWebApi.Core/Zero/Dept.cs rename to HotelManagerSystemWebApi.Core/Zero/Base/Dept.cs index a07b921..18b6f2c 100644 --- a/HotelManagerSystemWebApi.Core/Zero/Dept.cs +++ b/HotelManagerSystemWebApi.Core/Zero/Base/Dept.cs @@ -22,6 +22,7 @@ * *模块说明:部门实体类 */ +using Furion.DatabaseAccessor; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations.Schema; @@ -35,7 +36,7 @@ namespace HotelManagerSystemWebApi.Core /// 部门表 /// [Table("dept")] - public class Dept + public class Dept : IEntity { /// /// 部门编号 diff --git a/HotelManagerSystemWebApi.Core/Zero/Education.cs b/HotelManagerSystemWebApi.Core/Zero/Base/Education.cs similarity index 100% rename from HotelManagerSystemWebApi.Core/Zero/Education.cs rename to HotelManagerSystemWebApi.Core/Zero/Base/Education.cs diff --git a/HotelManagerSystemWebApi.Core/Zero/Nation.cs b/HotelManagerSystemWebApi.Core/Zero/Base/Nation.cs similarity index 100% rename from HotelManagerSystemWebApi.Core/Zero/Nation.cs rename to HotelManagerSystemWebApi.Core/Zero/Base/Nation.cs diff --git a/HotelManagerSystemWebApi.Core/Business/Customer/PassPortType.cs b/HotelManagerSystemWebApi.Core/Zero/Base/PassPortType.cs similarity index 97% rename from HotelManagerSystemWebApi.Core/Business/Customer/PassPortType.cs rename to HotelManagerSystemWebApi.Core/Zero/Base/PassPortType.cs index 274b3b9..8e71b46 100644 --- a/HotelManagerSystemWebApi.Core/Business/Customer/PassPortType.cs +++ b/HotelManagerSystemWebApi.Core/Zero/Base/PassPortType.cs @@ -22,6 +22,7 @@ * *模块说明:证件类型类 */ +using Furion.DatabaseAccessor; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations.Schema; @@ -35,7 +36,7 @@ namespace HotelManagerSystemWebApi.Core /// 证件类型 /// [Table("passporttype")] - public class PassPortType + public class PassPortType : IEntity { /// /// 证件类型 diff --git a/HotelManagerSystemWebApi.Core/Business/Customer/SexType.cs b/HotelManagerSystemWebApi.Core/Zero/Base/SexType.cs similarity index 97% rename from HotelManagerSystemWebApi.Core/Business/Customer/SexType.cs rename to HotelManagerSystemWebApi.Core/Zero/Base/SexType.cs index 018261a..94010d2 100644 --- a/HotelManagerSystemWebApi.Core/Business/Customer/SexType.cs +++ b/HotelManagerSystemWebApi.Core/Zero/Base/SexType.cs @@ -22,6 +22,7 @@ * *模块说明:性别类 */ +using Furion.DatabaseAccessor; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations.Schema; @@ -35,7 +36,7 @@ namespace HotelManagerSystemWebApi.Core /// 性别 /// [Table("sextype")] - public class SexType + public class SexType : IEntity { /// /// 性别ID diff --git a/HotelManagerSystemWebApi.Core/Zero/position.cs b/HotelManagerSystemWebApi.Core/Zero/Base/position.cs similarity index 100% rename from HotelManagerSystemWebApi.Core/Zero/position.cs rename to HotelManagerSystemWebApi.Core/Zero/Base/position.cs diff --git a/HotelManagerSystemWebApi.Core/Zero/CheckInfo.cs b/HotelManagerSystemWebApi.Core/Zero/CheckInfo/CheckInfo.cs similarity index 100% rename from HotelManagerSystemWebApi.Core/Zero/CheckInfo.cs rename to HotelManagerSystemWebApi.Core/Zero/CheckInfo/CheckInfo.cs diff --git a/HotelManagerSystemWebApi.Core/Zero/Module.cs b/HotelManagerSystemWebApi.Core/Zero/Module/Module.cs similarity index 100% rename from HotelManagerSystemWebApi.Core/Zero/Module.cs rename to HotelManagerSystemWebApi.Core/Zero/Module/Module.cs diff --git a/HotelManagerSystemWebApi.Core/Zero/ModuleConsts.cs b/HotelManagerSystemWebApi.Core/Zero/Module/ModuleConsts.cs similarity index 100% rename from HotelManagerSystemWebApi.Core/Zero/ModuleConsts.cs rename to HotelManagerSystemWebApi.Core/Zero/Module/ModuleConsts.cs diff --git a/HotelManagerSystemWebApi.Core/Zero/ModuleZero.cs b/HotelManagerSystemWebApi.Core/Zero/Module/ModuleZero.cs similarity index 100% rename from HotelManagerSystemWebApi.Core/Zero/ModuleZero.cs rename to HotelManagerSystemWebApi.Core/Zero/Module/ModuleZero.cs diff --git a/HotelManagerSystemWebApi.Core/Zero/Notice.cs b/HotelManagerSystemWebApi.Core/Zero/Notice/Notice.cs similarity index 100% rename from HotelManagerSystemWebApi.Core/Zero/Notice.cs rename to HotelManagerSystemWebApi.Core/Zero/Notice/Notice.cs diff --git a/HotelManagerSystemWebApi.Core/Zero/OperationLog.cs b/HotelManagerSystemWebApi.Core/Zero/OperationLog/OperationLog.cs similarity index 100% rename from HotelManagerSystemWebApi.Core/Zero/OperationLog.cs rename to HotelManagerSystemWebApi.Core/Zero/OperationLog/OperationLog.cs diff --git a/HotelManagerSystemWebApi.Core/Zero/VipRule.cs b/HotelManagerSystemWebApi.Core/Zero/VipRule/VipRule.cs similarity index 100% rename from HotelManagerSystemWebApi.Core/Zero/VipRule.cs rename to HotelManagerSystemWebApi.Core/Zero/VipRule/VipRule.cs diff --git a/HotelManagerSystemWebApi.EntityFramework.Core/DbContexts/DefaultDbContext.cs b/HotelManagerSystemWebApi.EntityFramework.Core/DbContexts/DefaultDbContext.cs index cbc1764..ea39a05 100644 --- a/HotelManagerSystemWebApi.EntityFramework.Core/DbContexts/DefaultDbContext.cs +++ b/HotelManagerSystemWebApi.EntityFramework.Core/DbContexts/DefaultDbContext.cs @@ -1,5 +1,6 @@ using Furion.DatabaseAccessor; using Microsoft.EntityFrameworkCore; +using System; namespace HotelManagerSystemWebApi.EntityFramework.Core { diff --git a/HotelManagerSystemWebApi.EntityFramework.Core/HotelManagerSystemWebApi.EntityFramework.Core.csproj b/HotelManagerSystemWebApi.EntityFramework.Core/HotelManagerSystemWebApi.EntityFramework.Core.csproj index 95944c0..e91f2a6 100644 --- a/HotelManagerSystemWebApi.EntityFramework.Core/HotelManagerSystemWebApi.EntityFramework.Core.csproj +++ b/HotelManagerSystemWebApi.EntityFramework.Core/HotelManagerSystemWebApi.EntityFramework.Core.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 diff --git a/HotelManagerSystemWebApi.EntityFramework.Core/dbsettings.json b/HotelManagerSystemWebApi.EntityFramework.Core/dbsettings.json index cb717b4..fc5b6ad 100644 --- a/HotelManagerSystemWebApi.EntityFramework.Core/dbsettings.json +++ b/HotelManagerSystemWebApi.EntityFramework.Core/dbsettings.json @@ -1,5 +1,6 @@ { "ConnectionStrings": { - "MySqlConnectStr": "Data Source=127.0.0.1;Database=tshoteldb;User ID=softuser;Password=yjj990720;pooling=true;port=3306;sslmode=none;CharSet=utf8" + "MySqlConnectStr": "Data Source=127.0.0.1;Database=tshoteldb;User ID=softuser;Password=;pooling=true;port=3306;sslmode=none;CharSet=utf8", + "NpgSqlConnectStr": "PORT=5630;DATABASE=tshoteldb;HOST=.;PASSWORD=.;USER ID=postgres" } } \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Web.Core/Handlers/JwtHandler.cs b/HotelManagerSystemWebApi.Web.Core/Handlers/JwtHandler.cs index e24f31d..38d0844 100644 --- a/HotelManagerSystemWebApi.Web.Core/Handlers/JwtHandler.cs +++ b/HotelManagerSystemWebApi.Web.Core/Handlers/JwtHandler.cs @@ -1,4 +1,7 @@ -using Furion.Authorization; +using Furion; +using Furion.Authorization; +using Furion.DataEncryption; +using HotelManagerSystemWebApi.Core; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Http; using System.Threading.Tasks; @@ -7,11 +10,6 @@ namespace HotelManagerSystemWebApi.Web.Core { public class JwtHandler : AppAuthorizeHandler { - public override Task PipelineAsync(AuthorizationHandlerContext context, DefaultHttpContext httpContext) - { - // 这里写您的授权判断逻辑,授权通过返回 true,否则返回 false - - return Task.FromResult(true); - } + } } \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Web.Core/HotelManagerSystemWebApi.Web.Core.csproj b/HotelManagerSystemWebApi.Web.Core/HotelManagerSystemWebApi.Web.Core.csproj index 80bd83c..e72f211 100644 --- a/HotelManagerSystemWebApi.Web.Core/HotelManagerSystemWebApi.Web.Core.csproj +++ b/HotelManagerSystemWebApi.Web.Core/HotelManagerSystemWebApi.Web.Core.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 1701;1702;1591 HotelManagerSystemWebApi.Web.Core.xml diff --git a/HotelManagerSystemWebApi.Web.Core/Startup.cs b/HotelManagerSystemWebApi.Web.Core/Startup.cs index cfa813c..bc9e8ba 100644 --- a/HotelManagerSystemWebApi.Web.Core/Startup.cs +++ b/HotelManagerSystemWebApi.Web.Core/Startup.cs @@ -10,7 +10,7 @@ namespace HotelManagerSystemWebApi.Web.Core { public void ConfigureServices(IServiceCollection services) { - services.AddJwt(); + //services.AddJwt(); services.AddCorsAccessor(); services.AddControllers() diff --git a/HotelManagerSystemWebApi.Web.Entry/HotelManagerSystemWebApi.Web.Entry.csproj b/HotelManagerSystemWebApi.Web.Entry/HotelManagerSystemWebApi.Web.Entry.csproj index bf5e885..afd7ebd 100644 --- a/HotelManagerSystemWebApi.Web.Entry/HotelManagerSystemWebApi.Web.Entry.csproj +++ b/HotelManagerSystemWebApi.Web.Entry/HotelManagerSystemWebApi.Web.Entry.csproj @@ -1,7 +1,8 @@ - net5.0 + net6.0 + enable @@ -15,7 +16,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/HotelManagerSystemWebApi.Web.Entry/Program.cs b/HotelManagerSystemWebApi.Web.Entry/Program.cs index 667def2..d9bccf2 100644 --- a/HotelManagerSystemWebApi.Web.Entry/Program.cs +++ b/HotelManagerSystemWebApi.Web.Entry/Program.cs @@ -7,15 +7,11 @@ namespace HotelManagerSystemWebApi.Web.Entry { public static void Main(string[] args) { - CreateHostBuilder(args).Build().Run(); + var builder = WebApplication.CreateBuilder(args).Inject(); + AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true); + var app = builder.Build(); + app.Run(); } - - public static IHostBuilder CreateHostBuilder(string[] args) => - Host.CreateDefaultBuilder(args) - .ConfigureWebHostDefaults(webBuilder => - { - webBuilder.Inject() - .UseStartup(); - }); + } } \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Web.Entry/Startup.cs b/HotelManagerSystemWebApi.Web.Entry/Startup.cs deleted file mode 100644 index c2799fc..0000000 --- a/HotelManagerSystemWebApi.Web.Entry/Startup.cs +++ /dev/null @@ -1,27 +0,0 @@ -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; -using Microsoft.Extensions.DependencyInjection; - -namespace HotelManagerSystemWebApi.Web.Entry -{ - public class Startup - { - public Startup(IConfiguration configuration) - { - Configuration = configuration; - } - - public IConfiguration Configuration { get; } - - public void ConfigureServices(IServiceCollection services) - { - // 代码迁移至 HotelManagerSystemWebApi.Web.Core/Startup.cs - } - - public void Configure(IApplicationBuilder app, IWebHostEnvironment env) - { - // 代码迁移至 HotelManagerSystemWebApi.Web.Core/Startup.cs - } - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Web.Entry/appsettings.json b/HotelManagerSystemWebApi.Web.Entry/appsettings.json index 6d84052..38a3974 100644 --- a/HotelManagerSystemWebApi.Web.Entry/appsettings.json +++ b/HotelManagerSystemWebApi.Web.Entry/appsettings.json @@ -4,6 +4,7 @@ "KeepVerb": true, "KeepName": true, "VerbToHttpMethods": [ + [ "Insert", "POST" ], // => Insertǰ׺дΪ[HttpPost] [ "Add", "POST" ], // => Addǰ׺дΪ[HttpPost] [ "Del", "POST" ], // => Delǰ׺дΪ[HttpPost] [ "Upd", "POST" ], // => Updǰ׺дΪ[HttpPost] -- Gitee From dd46b7dd380043cdfaa82363597bef06954a4202 Mon Sep 17 00:00:00 2001 From: Chunkit Yeung Date: Sun, 31 Jul 2022 13:52:59 +0800 Subject: [PATCH 2/4] update_to_net6 --- .../Business/Room/Dtos/DayByRoomNoDto.cs | 39 ++ .../RoomListDto.cs => Dtos/InsertRoomDto.cs} | 18 +- .../Business/Room/Dtos/ODayByRoomNoDto.cs | 38 ++ .../Business/Room/Dtos/OInsertRoomDto.cs | 34 ++ .../Business/Room/Dtos/OSelectRoomDto.cs | 38 ++ .../OSelectRoomListDto.cs} | 9 +- .../Business/Room/Dtos/OUpdCheckInRoomDto.cs | 34 ++ .../Business/Room/Dtos/OUpdCheckoutRoomDto.cs | 34 ++ .../Business/Room/Dtos/OUpdReserRoomDto.cs | 34 ++ .../Business/Room/Dtos/SelectRoomDto.cs | 39 ++ .../Business/Room/Dtos/SelectRoomListDto.cs | 56 +++ .../SelectRoomTypeByRoomNo.cs | 0 .../Room/Dtos/SelectRoomTypesAllDto.cs | 2 +- .../Business/Room/Dtos/UpdCheckInRoomDto.cs | 45 ++ .../Business/Room/Dtos/UpdCheckoutRoomDto.cs | 39 ++ .../Business/Room/Dtos/UpdReserRoomDto.cs | 38 ++ .../Business/Room/RoomAppService.cs | 92 ++++ .../Business/Room/RoomTypeAppService.cs | 34 ++ .../Business/Room/Services/IRoomService.cs | 166 +------ .../Room/Services/IRoomTypeService.cs | 2 +- .../Business/Room/Services/RoomService.cs | 432 +++++++----------- .../Business/Room/Services/RoomTypeService.cs | 4 +- .../Business/Room/Temp/Temp_Room.cs | 47 +- .../WorkerPic/Services/WorkerPicService.cs | 9 +- .../Zero/AdminInfo/Services/AdminService.cs | 2 +- .../Zero/AdminInfo/Services/IAdminService.cs | 16 +- .../Zero/CounterRule/CounterHelper.cs | 145 ------ .../Business/Room/RoomState.cs | 1 + .../appsettings.json | 12 +- 29 files changed, 828 insertions(+), 631 deletions(-) create mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Dtos/DayByRoomNoDto.cs rename HotelManagerSystemWebApi.Application/Business/Room/{Services/RoomListDto.cs => Dtos/InsertRoomDto.cs} (83%) create mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Dtos/ODayByRoomNoDto.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Dtos/OInsertRoomDto.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Dtos/OSelectRoomDto.cs rename HotelManagerSystemWebApi.Application/Business/Room/{Services/ORoomListDto.cs => Dtos/OSelectRoomListDto.cs} (90%) create mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Dtos/OUpdCheckInRoomDto.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Dtos/OUpdCheckoutRoomDto.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Dtos/OUpdReserRoomDto.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Dtos/SelectRoomDto.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Dtos/SelectRoomListDto.cs rename HotelManagerSystemWebApi.Application/Business/Room/{Services => Dtos}/SelectRoomTypeByRoomNo.cs (100%) create mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Dtos/UpdCheckInRoomDto.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Dtos/UpdCheckoutRoomDto.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Dtos/UpdReserRoomDto.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Room/RoomAppService.cs create mode 100644 HotelManagerSystemWebApi.Application/Business/Room/RoomTypeAppService.cs delete mode 100644 HotelManagerSystemWebApi.Application/Zero/CounterRule/CounterHelper.cs diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/DayByRoomNoDto.cs b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/DayByRoomNoDto.cs new file mode 100644 index 0000000..43ba0b3 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/DayByRoomNoDto.cs @@ -0,0 +1,39 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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 HotelManagerSystemWebApi.Application +{ + /// + /// 根据房间编号查询截止到今天住了多少天 + /// 输入DTO + /// + public class DayByRoomNoDto : IBaseDto + { + /// + /// 房间编号 + /// + [Required] + public string RoomNo { get; set; } + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Services/RoomListDto.cs b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/InsertRoomDto.cs similarity index 83% rename from HotelManagerSystemWebApi.Application/Business/Room/Services/RoomListDto.cs rename to HotelManagerSystemWebApi.Application/Business/Room/Dtos/InsertRoomDto.cs index a445dcf..fe465bb 100644 --- a/HotelManagerSystemWebApi.Application/Business/Room/Services/RoomListDto.cs +++ b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/InsertRoomDto.cs @@ -21,16 +21,15 @@ *SOFTWARE. * */ - using System; namespace HotelManagerSystemWebApi.Application { /// - /// 获取所有房间信息 + /// 添加房间 /// 输入DTO /// - public class RoomListDto:IListDto + public class InsertRoomDto : IBaseDto { /// /// 房间编号 @@ -57,8 +56,17 @@ namespace HotelManagerSystemWebApi.Application /// public int RoomStateId { get; set; } /// - /// 删除标记 + /// 房间单价 + /// + public decimal RoomMoney { get; set; } + /// + /// 房间押金 + /// + [MappingField("deposit")] + public decimal RoomDeposit { get; set; } + /// + /// 房间位置 /// - public int delete_mk { get; set; } + public string RoomPosition { get; set; } } } \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/ODayByRoomNoDto.cs b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/ODayByRoomNoDto.cs new file mode 100644 index 0000000..0fd0246 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/ODayByRoomNoDto.cs @@ -0,0 +1,38 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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 HotelManagerSystemWebApi.Application +{ + /// + /// 根据房间编号查询截止到今天住了多少天 + /// 输出DTO + /// + public class ODayByRoomNoDto : MsgDto + { + /// + /// 天数 + /// + public int days { get; set; } + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OInsertRoomDto.cs b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OInsertRoomDto.cs new file mode 100644 index 0000000..c189be9 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OInsertRoomDto.cs @@ -0,0 +1,34 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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 HotelManagerSystemWebApi.Application +{ + /// + /// 添加房间 + /// 输出DTO + /// + public class OInsertRoomDto : MsgDto + { + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OSelectRoomDto.cs b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OSelectRoomDto.cs new file mode 100644 index 0000000..e2d3d6f --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OSelectRoomDto.cs @@ -0,0 +1,38 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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 HotelManagerSystemWebApi.Application +{ + /// + /// 单条房间信息 + /// 输出DTO + /// + public class OSelectRoomDto : MsgDto + { + /// + /// 数据源 + /// + public Temp_Room source { get; set; } + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Services/ORoomListDto.cs b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OSelectRoomListDto.cs similarity index 90% rename from HotelManagerSystemWebApi.Application/Business/Room/Services/ORoomListDto.cs rename to HotelManagerSystemWebApi.Application/Business/Room/Dtos/OSelectRoomListDto.cs index 7c4d392..09f5f51 100644 --- a/HotelManagerSystemWebApi.Application/Business/Room/Services/ORoomListDto.cs +++ b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OSelectRoomListDto.cs @@ -21,8 +21,6 @@ *SOFTWARE. * */ -using HotelManagerSystemWebApi.Application; - namespace HotelManagerSystemWebApi.Application { @@ -30,11 +28,16 @@ namespace HotelManagerSystemWebApi.Application /// 获取所有房间信息 /// 输出DTO /// - public class ORoomListDto:MsgDto + public class OSelectRoomListDto : MsgDto { /// /// 数据源 /// public List listSource { get; set; } + + /// + /// 总数 + /// + public int total { get; set; } } } \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OUpdCheckInRoomDto.cs b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OUpdCheckInRoomDto.cs new file mode 100644 index 0000000..54800d7 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OUpdCheckInRoomDto.cs @@ -0,0 +1,34 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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 HotelManagerSystemWebApi.Application +{ + /// + /// 根据房间编号退房(入住) + /// 输出DTO + /// + public class OUpdCheckInRoomDto : MsgDto + { + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OUpdCheckoutRoomDto.cs b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OUpdCheckoutRoomDto.cs new file mode 100644 index 0000000..e8f8d26 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OUpdCheckoutRoomDto.cs @@ -0,0 +1,34 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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 HotelManagerSystemWebApi.Application +{ + /// + /// 根据房间编号退房(退房) + /// 输出DTO + /// + public class OUpdCheckoutRoomDto : MsgDto + { + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OUpdReserRoomDto.cs b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OUpdReserRoomDto.cs new file mode 100644 index 0000000..a6f49f7 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OUpdReserRoomDto.cs @@ -0,0 +1,34 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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 HotelManagerSystemWebApi.Application +{ + /// + /// 根据房间编号退房(预约) + /// 输出DTO + /// + public class OUpdReserRoomDto : MsgDto + { + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/SelectRoomDto.cs b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/SelectRoomDto.cs new file mode 100644 index 0000000..8b4d9ba --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/SelectRoomDto.cs @@ -0,0 +1,39 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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 HotelManagerSystemWebApi.Application +{ + /// + /// 单条房间信息 + /// 输入DTO + /// + public class SelectRoomDto : IBaseDto + { + /// + /// 房间编号 + /// + [Required] + public string RoomNo { get; set; } + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/SelectRoomListDto.cs b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/SelectRoomListDto.cs new file mode 100644 index 0000000..ca32970 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/SelectRoomListDto.cs @@ -0,0 +1,56 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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. + * + */ + +using System; + +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 获取所有房间信息 + /// 输入DTO + /// + public class SelectRoomListDto : IListDto + { + /// + /// 房间编号 + /// + public string RoomNo { get; set; } + /// + /// 房间类型 + /// + public int? RoomType { get; set; } + /// + /// 客户编号 + /// + public string CustoNo { get; set; } + /// + /// 房间状态ID + /// + public int? RoomStateId { get; set; } + /// + /// 删除标记 + /// + public int? delete_mk { get; set; } + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Services/SelectRoomTypeByRoomNo.cs b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/SelectRoomTypeByRoomNo.cs similarity index 100% rename from HotelManagerSystemWebApi.Application/Business/Room/Services/SelectRoomTypeByRoomNo.cs rename to HotelManagerSystemWebApi.Application/Business/Room/Dtos/SelectRoomTypeByRoomNo.cs diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/SelectRoomTypesAllDto.cs b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/SelectRoomTypesAllDto.cs index 1878cf0..de184a5 100644 --- a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/SelectRoomTypesAllDto.cs +++ b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/SelectRoomTypesAllDto.cs @@ -22,7 +22,7 @@ * */ -namespace HotelManagerSystemWebApi.Application.Business.Room.Dtos +namespace HotelManagerSystemWebApi.Application { /// /// 获取所有房间类型 diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/UpdCheckInRoomDto.cs b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/UpdCheckInRoomDto.cs new file mode 100644 index 0000000..2eff069 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/UpdCheckInRoomDto.cs @@ -0,0 +1,45 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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 HotelManagerSystemWebApi.Application +{ + /// + /// 根据房间编号退房(入住) + /// 输入DTO + /// + public class UpdCheckInRoomDto : IBaseDto + { + /// + /// 房间编号 + /// + [Required] + public string RoomNo { get; set; } + + /// + /// 客户编号 + /// + [Required] + public string CustoNo { get; set; } + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/UpdCheckoutRoomDto.cs b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/UpdCheckoutRoomDto.cs new file mode 100644 index 0000000..0a70daa --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/UpdCheckoutRoomDto.cs @@ -0,0 +1,39 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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 HotelManagerSystemWebApi.Application +{ + /// + /// 根据房间编号退房(退房) + /// 输入DTO + /// + public class UpdCheckoutRoomDto : IBaseDto + { + /// + /// 房间编号 + /// + [Required] + public string RoomNo { get; set; } + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/UpdReserRoomDto.cs b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/UpdReserRoomDto.cs new file mode 100644 index 0000000..3aecdf7 --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/UpdReserRoomDto.cs @@ -0,0 +1,38 @@ +/* + * MIT License + *Copyright (c) 2021 咖啡与网络(java-and-net) + + *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 HotelManagerSystemWebApi.Application +{ + /// + /// 根据房间编号退房(预约) + /// + public class UpdReserRoomDto : IBaseDto + { + /// + /// 房间编号 + /// + [Required] + public string RoomNo { get; set; } + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/RoomAppService.cs b/HotelManagerSystemWebApi.Application/Business/Room/RoomAppService.cs new file mode 100644 index 0000000..09f28bf --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Room/RoomAppService.cs @@ -0,0 +1,92 @@ +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 房间信息控制器 + /// + public class RoomAppService:IDynamicApiController + { + /// + /// 房间信息 + /// + private readonly IRoomService roomService; + + /// + /// + /// + /// + public RoomAppService(IRoomService roomService) + { + this.roomService = roomService; + } + + /// + /// 获取所有房间信息 + /// + /// + /// + public OSelectRoomListDto SelectRoomList(SelectRoomListDto roomListDto) + { + return roomService.SelectRoomList(roomListDto); + } + + /// + /// 单条房间信息 + /// + /// + /// + public OSelectRoomDto SelectRoom(SelectRoomDto roomDto) + { + return roomService.SelectRoom(roomDto); + } + + /// + /// 根据房间编号退房(退房) + /// + /// + /// + public OUpdCheckoutRoomDto UpdCheckoutRoom(UpdCheckoutRoomDto updCheckoutRoomDto) + { + return roomService.UpdCheckoutRoom(updCheckoutRoomDto); + } + + /// + /// 根据房间编号退房(入住) + /// + /// + /// + public OUpdCheckInRoomDto UpdCheckInRoom(UpdCheckInRoomDto updCheckInRoomDto) + { + return roomService.UpdCheckInRoom(updCheckInRoomDto); + } + + /// + /// 根据房间编号退房(预约) + /// + /// + /// + public OUpdReserRoomDto UpdReserRoom(UpdReserRoomDto reserRoomDto) + { + return roomService.UpdReserRoom(reserRoomDto); + } + + /// + /// 根据房间编号查询截止到今天住了多少天 + /// + /// + /// + public ODayByRoomNoDto DayByRoomNo(DayByRoomNoDto dayByRoomNoDto) + { + return roomService.DayByRoomNo(dayByRoomNoDto); + } + + /// + /// 添加房间 + /// + /// + /// + public OInsertRoomDto InsertRoom(InsertRoomDto insertRoomDto) + { + return roomService.InsertRoom(insertRoomDto); + } + } +} diff --git a/HotelManagerSystemWebApi.Application/Business/Room/RoomTypeAppService.cs b/HotelManagerSystemWebApi.Application/Business/Room/RoomTypeAppService.cs new file mode 100644 index 0000000..364409e --- /dev/null +++ b/HotelManagerSystemWebApi.Application/Business/Room/RoomTypeAppService.cs @@ -0,0 +1,34 @@ +namespace HotelManagerSystemWebApi.Application +{ + /// + /// 房间类型控制器 + /// + public class RoomTypeAppService:IDynamicApiController + { + /// + /// 房间类型 + /// + private readonly IRoomTypeService _roomTypeService; + + /// + /// + /// + /// + public RoomTypeAppService(IRoomTypeService roomTypeService) + { + _roomTypeService = roomTypeService; + } + + #region 获取所有房间类型 + /// + /// 获取所有房间类型 + /// + /// + public OSelectRoomTypesAllDto SelectRoomTypesAll(SelectRoomTypesAllDto selectRoomTypesAllDto) + { + return _roomTypeService.SelectRoomTypesAll(selectRoomTypesAllDto); + } + #endregion + + } +} diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Services/IRoomService.cs b/HotelManagerSystemWebApi.Application/Business/Room/Services/IRoomService.cs index 95a08ff..2697a90 100644 --- a/HotelManagerSystemWebApi.Application/Business/Room/Services/IRoomService.cs +++ b/HotelManagerSystemWebApi.Application/Business/Room/Services/IRoomService.cs @@ -22,6 +22,7 @@ * */ +using HotelManagerSystemWebApi.Application; using HotelManagerSystemWebApi.Core; using System.Collections.Generic; @@ -32,185 +33,54 @@ namespace HotelManagerSystemWebApi.Application /// public interface IRoomService { - #region 根据房间状态获取相应状态的房间信息 - /// - /// 根据房间状态获取相应状态的房间信息 - /// - /// - /// - OSelectRoomByRoomStateDto SelectRoomByRoomState(SelectRoomByRoomStateDto selectRoomByRoomStateDto); - #endregion - - #region 根据房间编号查询房间类型名称 - /// - /// 根据房间编号查询房间类型名称 - /// - /// - /// - OSelectRoomTypeByRoomNo SelectRoomTypeByRoomNo(SelectRoomTypeByRoomNo selectRoomTypeByRoomNo); - #endregion - - #region 根据房间状态来查询可使用的房间 - /// - /// 根据房间状态来查询可使用的房间 - /// - /// - List SelectCanUseRoomAll(); - #endregion - - - #region 获取所有房间信息 /// /// 获取所有房间信息 /// /// /// - ORoomListDto RoomList(RoomListDto roomListDto); - #endregion + OSelectRoomListDto SelectRoomList(SelectRoomListDto roomListDto); - #region 获取房间分区的信息 /// - /// 获取房间分区的信息 + /// 单条房间信息 /// + /// /// - List SelectRoomByTypeName(string TypeName); - #endregion + OSelectRoomDto SelectRoom(SelectRoomDto roomDto); - #region 根据房间编号查询房间信息 - /// - /// 根据房间编号查询房间信息 - /// - /// - /// - Room SelectRoomByRoomNo(string no); - #endregion - - #region 根据房间编号退房(退房) /// /// 根据房间编号退房(退房) /// - /// - /// - bool UpdateRoomByRoomNo(string room); - #endregion - - #region 根据房间编号查询截止到今天住了多少天 - /// - /// 根据房间编号查询截止到今天住了多少天 - /// - /// - /// - object DayByRoomNo(string roomno); - #endregion - - #region 根据房间编号修改房间信息(入住) - /// - /// 根据房间编号修改房间信息(入住) - /// - /// - /// - bool UpdateRoomInfo(Room r); - #endregion - - #region 根据房间编号修改房间信息(预约) - /// - /// 根据房间编号修改房间信息(预约) - /// - /// - /// - bool UpdateRoomInfoWithReser(Room r); - #endregion - - #region 查询可入住房间数量 - /// - /// 查询可入住房间数量 - /// + /// /// - object SelectCanUseRoomAllByRoomState(); - #endregion + OUpdCheckoutRoomDto UpdCheckoutRoom(UpdCheckoutRoomDto updCheckoutRoomDto); - #region 查询已入住房间数量 /// - /// 查询已入住房间数量 + /// 根据房间编号退房(入住) /// + /// /// - object SelectNotUseRoomAllByRoomState(); - #endregion + OUpdCheckInRoomDto UpdCheckInRoom(UpdCheckInRoomDto updCheckInRoomDto); - #region 根据房间编号查询房间价格 /// - /// 根据房间编号查询房间价格 + /// 根据房间编号退房(预约) /// + /// /// - object SelectRoomByRoomPrice(string r); - #endregion + OUpdReserRoomDto UpdReserRoom(UpdReserRoomDto reserRoomDto); - #region 查询脏房数量 /// - /// 查询脏房数量 - /// - /// - object SelectNotClearRoomAllByRoomState(); - #endregion - - #region 查询维修房数量 - /// - /// 查询维修房数量 - /// - /// - object SelectFixingRoomAllByRoomState(); - #endregion - - #region 查询预约房数量 - /// - /// 查询预约房数量 - /// - /// - object SelectReseredRoomAllByRoomState(); - #endregion - - #region 根据房间编号更改房间状态 - /// - /// 根据房间编号更改房间状态 + /// 根据房间编号查询截止到今天住了多少天 /// - /// - /// + /// /// - bool UpdateRoomStateByRoomNo(string roomno, int stateid); - #endregion + ODayByRoomNoDto DayByRoomNo(DayByRoomNoDto dayByRoomNoDto); - #region 添加房间 /// /// 添加房间 /// - /// - /// - bool InsertRoom(Room rn); - #endregion - - #region 查询所有可消费(已住)房间 - /// - /// 查询所有可消费(已住)房间 - /// + /// /// - List SelectRoomByStateAll(); - #endregion + OInsertRoomDto InsertRoom(InsertRoomDto insertRoomDto); - #region 获取所有房间状态 - /// - /// 获取所有房间状态 - /// - /// - List SelectRoomStateAll(); - #endregion - - #region 根据房间编号查询房间状态编号 - /// - /// 根据房间编号查询房间状态编号 - /// - /// - /// - object SelectRoomStateIdByRoomNo(string roomno); - #endregion } } \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Services/IRoomTypeService.cs b/HotelManagerSystemWebApi.Application/Business/Room/Services/IRoomTypeService.cs index 19dd300..a11b7bf 100644 --- a/HotelManagerSystemWebApi.Application/Business/Room/Services/IRoomTypeService.cs +++ b/HotelManagerSystemWebApi.Application/Business/Room/Services/IRoomTypeService.cs @@ -22,7 +22,7 @@ * */ -using HotelManagerSystemWebApi.Application.Business.Room.Dtos; +using HotelManagerSystemWebApi.Application; using HotelManagerSystemWebApi.Core; using System.Collections.Generic; diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Services/RoomService.cs b/HotelManagerSystemWebApi.Application/Business/Room/Services/RoomService.cs index e04b3df..fd8429b 100644 --- a/HotelManagerSystemWebApi.Application/Business/Room/Services/RoomService.cs +++ b/HotelManagerSystemWebApi.Application/Business/Room/Services/RoomService.cs @@ -25,6 +25,7 @@ using System; using System.Collections.Generic; using System.Linq; using Furion.DependencyInjection; +using HotelManagerSystemWebApi.Application; using HotelManagerSystemWebApi.Core; @@ -64,67 +65,15 @@ namespace HotelManagerSystemWebApi.Application { _roomRepository = roomRepository; } - - #region 根据房间状态获取相应状态的房间信息 - /// - /// 根据房间状态获取相应状态的房间信息 - /// - /// - /// - public List SelectRoomByRoomState(int stateid) - { - List roomStates = new List(); - roomStates = base.Change().GetList(a => a.delete_mk != 1); - List roomTypes = new List(); - roomTypes = base.Change().GetList(a => a.delete_mk != 1); - List rooms = new List(); - rooms = base.GetList(a => a.delete_mk != 1 && a.RoomStateId == stateid).OrderBy(a => a.RoomNo).ToList(); - rooms.ForEach(source => - { - var roomState = roomStates.FirstOrDefault(a => a.RoomStateId == source.RoomStateId); - source.RoomState = string.IsNullOrEmpty(roomState.RoomStateName) ? "" : roomState.RoomStateName; - var roomType = roomTypes.FirstOrDefault(a => a.Roomtype == source.RoomType); - source.RoomName = string.IsNullOrEmpty(roomType.RoomName) ? "" : roomType.RoomName; - }); - return rooms; - } - #endregion - - - #region 根据房间状态来查询可使用的房间 - /// - /// 根据房间状态来查询可使用的房间 - /// - /// - public List SelectCanUseRoomAll() - { - List roomStates = new List(); - roomStates = base.Change().GetList(a => a.delete_mk != 1); - List roomTypes = new List(); - roomTypes = base.Change().GetList(a => a.delete_mk != 1); - List rooms = new List(); - rooms = base.GetList(a => a.delete_mk != 1 && a.RoomStateId == 0).OrderBy(a => a.RoomNo).ToList(); - rooms.ForEach(source => - { - var roomState = roomStates.FirstOrDefault(a => a.RoomStateId == source.RoomStateId); - source.RoomState = string.IsNullOrEmpty(roomState.RoomStateName) ? "" : roomState.RoomStateName; - var roomType = roomTypes.FirstOrDefault(a => a.Roomtype == source.RoomType); - source.RoomName = string.IsNullOrEmpty(roomType.RoomName) ? "" : roomType.RoomName; - }); - return rooms; - } - #endregion - - - #region 获取所有房间信息 + /// /// 获取所有房间信息 /// /// /// - public ORoomListDto RoomList(RoomListDto roomListDto) + public OSelectRoomListDto SelectRoomList(SelectRoomListDto roomListDto) { - ORoomListDto oRoomListDto = new ORoomListDto(); + OSelectRoomListDto oRoomListDto = new OSelectRoomListDto(); var where = LinqExpression.Create(a => a.delete_mk != 1); @@ -133,6 +82,26 @@ namespace HotelManagerSystemWebApi.Application { where = where.And(a => a.RoomNo.Contains(roomListDto.RoomNo)); } + //客户编号 + if (!roomListDto.CustoNo.IsNullOrEmpty()) + { + where = where.And(a => a.CustoNo.Contains(roomListDto.CustoNo)); + } + //房间状态 + if (!roomListDto.RoomStateId.IsNullOrEmpty()) + { + where = where.And(a => a.RoomStateId == roomListDto.RoomStateId); + } + //房间类型 + if (!roomListDto.RoomType.IsNullOrEmpty()) + { + where = where.And(a => a.RoomType == roomListDto.RoomType); + } + //删除标记 + if (!roomListDto.delete_mk.IsNullOrEmpty()) + { + where = where.And(a => a.delete_mk == roomListDto.delete_mk); + } //查询出所有房间类型 var listSource = _roomRepository.AsQueryable(where).ToList() @@ -142,275 +111,208 @@ namespace HotelManagerSystemWebApi.Application var listCustoNo = listSource.Select(a => a.CustoNo).Distinct().ToList(); var listCusto = this._custoRepository.AsQueryable(a => listCustoNo.Contains(a.CustoNo)).ToList(); - //房间类型 - var listRoomStateId = listSource.Select(a => a.RoomStateId).Distinct().ToList(); - var listRoomState = this._roomStateRepository.AsQueryable() //房间状态 + var listRoomStateId = listSource.Select(a => a.RoomStateId).Distinct().ToList(); + var listRoomState = this._roomStateRepository.AsQueryable().ToList(); + + //房间类型 + var listRoomTypeId = listSource.Select(a => a.RoomType).Distinct().ToList(); + var listRoomType = this._roomTypeRepository.AsQueryable().ToList(); + + listSource.ForEach(source => + { + //客户 + var customer = listCusto.Find(a => a.CustoNo.Equals(source.CustoNo)); + source.CustoNm = customer.IsNullOrEmpty() ? "" : customer.CustoName; + + //房间状态 + var roomState = listRoomState.Find(a => a.RoomStateId == source.RoomStateId); + source.RoomStateNm = roomState.IsNullOrEmpty() ? "" : roomState.RoomStateName; + + //房间类型 + var roomType = listRoomType.Find(a => a.Roomtype == source.RoomType); + source.RoomTypeNm = roomType.IsNullOrEmpty() ? "" : roomType.RoomName; + + }); oRoomListDto.listSource = listSource; + oRoomListDto.total = listSource.Count; oRoomListDto.OK(); return oRoomListDto; } - #endregion - #region 获取房间分区的信息 /// - /// 获取房间分区的信息 + /// 单条房间信息 /// + /// /// - public List SelectRoomByTypeName(string TypeName) + public OSelectRoomDto SelectRoom(SelectRoomDto selectRoomDto) { - List roomStates = new List(); - roomStates = base.Change().GetList(a => a.delete_mk != 1); - List roomTypes = new List(); - roomTypes = base.Change().GetList(a => a.delete_mk != 1 && a.RoomName == TypeName); - var listTypes = roomTypes.Select(a => a.Roomtype).Distinct().ToList(); - List rooms = new List(); - rooms = base.GetList(a => a.delete_mk != 1 && listTypes.Contains(a.RoomType)).OrderBy(a => a.RoomNo).ToList(); - rooms.ForEach(source => + OSelectRoomDto oSelectRoomDto = new OSelectRoomDto(); + + //查询房间信息 + var source = this._roomRepository.Single(a => a.RoomNo.Equals(selectRoomDto.RoomNo)) + .CopyToModel(); + + if (source.IsNullOrEmpty()) { - var roomState = roomStates.FirstOrDefault(a => a.RoomStateId == source.RoomStateId); - source.RoomState = string.IsNullOrEmpty(roomState.RoomStateName) ? "" : roomState.RoomStateName; - var roomType = roomTypes.FirstOrDefault(a => a.Roomtype == source.RoomType); - source.RoomName = string.IsNullOrEmpty(roomType.RoomName) ? "" : roomType.RoomName; - }); - return rooms; - } - #endregion + oSelectRoomDto.Error_NotFound(); + return oSelectRoomDto; + } + + //客户 + var customer = this._custoRepository.Single(a => a.CustoNo.Equals(source.CustoNo)); + source.CustoNm = customer.IsNullOrEmpty() ? "" : customer.CustoName; + + //房间状态 + var roomState = this._roomStateRepository.Single(a => a.RoomStateId == source.RoomStateId); + source.RoomStateNm = roomState.IsNullOrEmpty() ? "" : roomState.RoomStateName; + + //房间类型 + var roomType = this._roomTypeRepository.Single(a => a.Roomtype == source.RoomType); + source.RoomTypeNm = roomType.IsNullOrEmpty() ? "" : roomType.RoomName; + + oSelectRoomDto.source = source; + oSelectRoomDto.OK(); + + return oSelectRoomDto; - #region 根据房间编号查询房间信息 - /// - /// 根据房间编号查询房间信息 - /// - /// - /// - public Room SelectRoomByRoomNo(string no) - { - List roomStates = new List(); - roomStates = base.Change().GetList(a => a.delete_mk != 1); - Room room = new Room(); - room = base.GetSingle(a => a.delete_mk != 1 && a.RoomNo == no); - var roomSate = roomStates.FirstOrDefault(a => a.RoomStateId == room.RoomStateId); - room.RoomState = string.IsNullOrEmpty(roomSate.RoomStateName) ? "" : roomSate.RoomStateName; - return room; } - #endregion - #region 根据房间编号退房(退房) /// /// 根据房间编号退房(退房) /// - /// + /// /// - public bool UpdateRoomByRoomNo(string room) + public OUpdCheckoutRoomDto UpdCheckoutRoom(UpdCheckoutRoomDto checkoutRoomDto) { - return base.Update(a => new Room() - { - CustoNo = null, - CheckTime = null, - CheckOutTime = DateTime.Now, - RoomStateId = 3 - },a => a.RoomNo == room); - } - #endregion + OUpdCheckoutRoomDto oUpdateRoomByRoomNoDto = new OUpdCheckoutRoomDto(); - #region 根据房间编号查询截止到今天住了多少天 - /// - /// 根据房间编号查询截止到今天住了多少天 - /// - /// - /// - public object DayByRoomNo(string roomno) - { - return Math.Abs(((TimeSpan)(base.GetSingle(a => a.RoomNo == roomno).CheckTime - DateTime.Now)).Days); - } - #endregion + //查询房间信息 + var source = this._roomRepository.Single(a => a.RoomNo.Equals(checkoutRoomDto.RoomNo)); - #region 根据房间编号修改房间信息(入住) - /// - /// 根据房间编号修改房间信息(入住) - /// - /// - /// - public bool UpdateRoomInfo(Room r) - { - return base.Update(a => new Room() + if (source.IsNullOrEmpty()) { - CheckTime = r.CheckTime, - RoomStateId = r.RoomStateId, - CustoNo = r.CustoNo - },a => a.RoomNo == r.RoomNo); - } - #endregion + oUpdateRoomByRoomNoDto.Error_NotFound(); + return oUpdateRoomByRoomNoDto; + } - #region 根据房间编号修改房间信息(预约) - /// - /// 根据房间编号修改房间信息(预约) - /// - /// - /// - public bool UpdateRoomInfoWithReser(Room r) - { - return base.Update(a => new Room() - { - RoomStateId = r.RoomStateId, - datachg_usr = LoginInfo.WorkerNo, - datachg_date = DateTime.Now - }, a => a.RoomNo == r.RoomNo); - } - #endregion + source.RoomStateId = 3; + source.CustoNo = null; + source.CheckOutTime = DateTime.Now; + source.datachg_usr = checkoutRoomDto.NowLoginUsr; + source.datachg_date = DateTime.Now; + this._roomRepository.Update(source); + oUpdateRoomByRoomNoDto.OK(); - #region 查询可入住房间数量 - /// - /// 查询可入住房间数量 - /// - /// - public object SelectCanUseRoomAllByRoomState() - { - return base.GetList(a => a.RoomStateId == 0 && a.delete_mk != 1).OrderBy(a => a.RoomNo).Count(); + return oUpdateRoomByRoomNoDto; } - #endregion - #region 查询已入住房间数量 /// - /// 查询已入住房间数量 + /// 根据房间编号退房(入住) /// + /// /// - public object SelectNotUseRoomAllByRoomState() + public OUpdCheckInRoomDto UpdCheckInRoom(UpdCheckInRoomDto checkInRoomDto) { - return base.GetList(a => a.RoomStateId == 1 && a.delete_mk != 1).OrderBy(a => a.RoomNo).Count(); - } - #endregion + OUpdCheckInRoomDto oCheckInRoomDto = new OUpdCheckInRoomDto(); - #region 根据房间编号查询房间价格 - /// - /// 根据房间编号查询房间价格 - /// - /// - public object SelectRoomByRoomPrice(string r) - { - return base.GetSingle(a => a.RoomNo == r).RoomMoney; - } - #endregion + //查询房间信息 + var source = this._roomRepository.Single(a => a.RoomNo.Equals(checkInRoomDto.RoomNo)); - #region 查询脏房数量 - /// - /// 查询脏房数量 - /// - /// - public object SelectNotClearRoomAllByRoomState() - { - return base.GetList(a => a.RoomStateId == 3 && a.delete_mk != 1).OrderBy(a => a.RoomNo).Count(); - } - #endregion + if (source.IsNullOrEmpty()) + { + oCheckInRoomDto.Error_NotFound(); + return oCheckInRoomDto; + } - #region 查询维修房数量 - /// - /// 查询维修房数量 - /// - /// - public object SelectFixingRoomAllByRoomState() - { - return base.GetList(a => a.RoomStateId == 2 && a.delete_mk != 1).OrderBy(a => a.RoomNo).Count(); - } - #endregion + source.RoomStateId = 1; + source.CustoNo = checkInRoomDto.CustoNo; + source.CheckOutTime = null; + source.CheckTime = DateTime.Now; + source.datachg_usr = checkInRoomDto.NowLoginUsr; + source.datachg_date = DateTime.Now; + this._roomRepository.Update(source); + oCheckInRoomDto.OK(); - #region 查询预约房数量 - /// - /// 查询预约房数量 - /// - /// - public object SelectReseredRoomAllByRoomState() - { - return base.GetList(a => a.RoomStateId == 4 && a.delete_mk != 1).OrderBy(a => a.RoomNo).Count(); + return oCheckInRoomDto; } - #endregion - #region 根据房间编号更改房间状态 /// - /// 根据房间编号更改房间状态 + /// 根据房间编号退房(预约) /// - /// - /// + /// /// - public bool UpdateRoomStateByRoomNo(string roomno, int stateid) + public OUpdReserRoomDto UpdReserRoom(UpdReserRoomDto reserRoomDto) { - return base.Update(a => new Room() - { - RoomStateId = stateid, - datains_usr = LoginInfo.WorkerNo, - datachg_date = DateTime.Now - },a => a.RoomNo == roomno); - } - #endregion + OUpdReserRoomDto oReserRoomDto = new OUpdReserRoomDto(); - #region 添加房间 - /// - /// 添加房间 - /// - /// - /// - public bool InsertRoom(Room rn) - { - try - { - return base.Insert(rn); - } - catch (Exception) + //查询房间信息 + var source = this._roomRepository.Single(a => a.RoomNo.Equals(reserRoomDto.RoomNo)); + + if (source.IsNullOrEmpty()) { - return false; + oReserRoomDto.Error_NotFound(); + return oReserRoomDto; } + + source.RoomStateId = 4; + source.CustoNo = null; + source.CheckOutTime = null; + source.CheckTime = null; + source.datachg_usr = reserRoomDto.NowLoginUsr; + source.datachg_date = DateTime.Now; + this._roomRepository.Update(source); + oReserRoomDto.OK(); + + return oReserRoomDto; } - #endregion - #region 查询所有可消费(已住)房间 /// - /// 查询所有可消费(已住)房间 + /// 根据房间编号查询截止到今天住了多少天 /// + /// /// - public List SelectRoomByStateAll() + public ODayByRoomNoDto DayByRoomNo(DayByRoomNoDto dayByRoomNoDto) { - List roomStates = new List(); - roomStates = base.Change().GetList(a => a.delete_mk != 1); - List roomTypes = new List(); - roomTypes = base.Change().GetList(a => a.delete_mk != 1); - List rooms = new List(); - rooms = base.GetList(a => a.delete_mk != 1 && a.RoomStateId == 1).OrderBy(a => a.RoomNo).ToList(); - rooms.ForEach(source => + ODayByRoomNoDto oDayByRoomNoDto = new ODayByRoomNoDto(); + + //查询房间信息 + var source = this._roomRepository.Single(a => a.RoomNo.Equals(dayByRoomNoDto.RoomNo)); + + if (source.IsNullOrEmpty()) { - var roomState = roomStates.FirstOrDefault(a => a.RoomStateId == source.RoomStateId); - source.RoomState = string.IsNullOrEmpty(roomState.RoomStateName) ? "" : roomState.RoomStateName; - var roomType = roomTypes.FirstOrDefault(a => a.Roomtype == source.RoomType); - source.RoomName = string.IsNullOrEmpty(roomType.RoomName) ? "" : roomType.RoomName; - }); - return rooms; - } - #endregion + oDayByRoomNoDto.Error_NotFound(); + return oDayByRoomNoDto; + } - #region 获取所有房间状态 - /// - /// 获取所有房间状态 - /// - /// - public List SelectRoomStateAll() - { - List rs = new List(); - rs = base.Change().GetList(a => a.delete_mk != 1); - return rs; + oDayByRoomNoDto.days = Math.Abs(((TimeSpan)(source.CheckTime - DateTime.Now)).Days); + oDayByRoomNoDto.OK(); + + return oDayByRoomNoDto; } - #endregion - #region 根据房间编号查询房间状态编号 /// - /// 根据房间编号查询房间状态编号 + /// 添加房间 /// - /// + /// /// - public object SelectRoomStateIdByRoomNo(string roomno) + public OInsertRoomDto InsertRoom(InsertRoomDto insertRoomDto) { - return base.GetSingle(a => a.RoomNo == roomno).RoomStateId; + OInsertRoomDto oInsertRoomDto = new OInsertRoomDto(); + + var source = new Room(); + + source = source.UpdateToModel(insertRoomDto); + source.delete_mk = 0; + source.datains_usr = insertRoomDto.NowLoginUsr; + source.datains_date = DateTime.Now; + this._roomRepository.Insert(source); + oInsertRoomDto.OK(); + + return oInsertRoomDto; } - #endregion + } } diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Services/RoomTypeService.cs b/HotelManagerSystemWebApi.Application/Business/Room/Services/RoomTypeService.cs index 3812e91..29862e2 100644 --- a/HotelManagerSystemWebApi.Application/Business/Room/Services/RoomTypeService.cs +++ b/HotelManagerSystemWebApi.Application/Business/Room/Services/RoomTypeService.cs @@ -21,7 +21,7 @@ *SOFTWARE. * */ -using HotelManagerSystemWebApi.Application.Business.Room.Dtos; +using HotelManagerSystemWebApi.Application; namespace HotelManagerSystemWebApi.Application { @@ -45,7 +45,6 @@ namespace HotelManagerSystemWebApi.Application this.roomTypeRepository = roomTypeRepository; } - #region 获取所有房间类型 /// /// 获取所有房间类型 /// @@ -77,6 +76,5 @@ namespace HotelManagerSystemWebApi.Application return oSelectRoomTypesAllDto; } - #endregion } } diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Temp/Temp_Room.cs b/HotelManagerSystemWebApi.Application/Business/Room/Temp/Temp_Room.cs index 021b05c..0babd0d 100644 --- a/HotelManagerSystemWebApi.Application/Business/Room/Temp/Temp_Room.cs +++ b/HotelManagerSystemWebApi.Application/Business/Room/Temp/Temp_Room.cs @@ -24,22 +24,10 @@ namespace HotelManagerSystemWebApi.Application /// public string CustoNo { get; set; } /// - /// 最后一次入住时间 - /// - public DateTime? CheckTime { get; set; } - /// - /// 最后一次退房时间 - /// - public DateTime? CheckOutTime { get; set; } - /// /// 房间状态ID /// public int RoomStateId { get; set; } /// - /// 房间状态 - /// - public string RoomState { get; set; } - /// /// 房间单价 /// public decimal RoomMoney { get; set; } @@ -51,38 +39,21 @@ namespace HotelManagerSystemWebApi.Application /// 房间位置 /// public string RoomPosition { get; set; } + + + /// - /// 客户类型名称 - /// - public string typeName { get; set; } - /// - /// 房间名称 - /// - public string RoomName { get; set; } - /// - /// 最后一次入住时间 - /// - public string CheckTimeFormat { get; set; } - /// - /// 删除标记 - /// - public int delete_mk { get; set; } - /// - /// 资料创建人 - /// - public string datains_usr { get; set; } - /// - /// 资料创建时间 + /// 房间类型描述 /// - public DateTime datains_date { get; set; } + public string RoomTypeNm { get; set; } /// - /// 资料更新人 + /// 客户编号描述 /// - public string datachg_usr { get; set; } + public string CustoNm { get; set; } /// - /// 资料更新时间 + /// 房间状态描述 /// - public DateTime datachg_date { get; set; } + public string RoomStateNm { get; set; } } } diff --git a/HotelManagerSystemWebApi.Application/Worker/WorkerPic/Services/WorkerPicService.cs b/HotelManagerSystemWebApi.Application/Worker/WorkerPic/Services/WorkerPicService.cs index df66479..12ccbe5 100644 --- a/HotelManagerSystemWebApi.Application/Worker/WorkerPic/Services/WorkerPicService.cs +++ b/HotelManagerSystemWebApi.Application/Worker/WorkerPic/Services/WorkerPicService.cs @@ -1,19 +1,12 @@  -using SYS.Core.Util; -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace HotelManagerSystemWebApi.Application { /// /// 员工照片接口实现类 /// - public class WorkerPicService:Repository,IWorkerPicService + public class WorkerPicService:IWorkerPicService,ITransient { /// /// 查询员工照片 diff --git a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services/AdminService.cs b/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services/AdminService.cs index 2411526..f536f42 100644 --- a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services/AdminService.cs +++ b/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services/AdminService.cs @@ -33,7 +33,7 @@ namespace HotelManagerSystemWebApi.Application /// /// 管理员数据访问层 /// - public class AdminService:Repository, IAdminService + public class AdminService:IAdminService,ITransient { EncryptLib encryptLib = new EncryptLib(); diff --git a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services/IAdminService.cs b/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services/IAdminService.cs index 79baeb0..74c7b88 100644 --- a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services/IAdminService.cs +++ b/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services/IAdminService.cs @@ -38,7 +38,7 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - Admin SelectMangerByPass(Admin admin); + AdminInfo SelectMangerByPass(AdminInfo admin); #endregion @@ -48,41 +48,41 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - Admin SelectAdminPwdByAccount(string account); + AdminInfo SelectAdminPwdByAccount(string account); #endregion /// /// 获取所有管理员列表 /// /// - List GetAllAdminList(); + List GetAllAdminList(); /// /// 修改密码 /// /// /// - bool UpdateNewPwdByOldPwd(Admin admin); + bool UpdateNewPwdByOldPwd(AdminInfo admin); /// /// 获取管理员列表 /// /// - List GetAllAdmin(); + List GetAllAdmin(); /// /// 添加管理员 /// /// /// - bool AddAdmin(Admin admin); + bool AddAdmin(AdminInfo admin); /// /// 获取管理员信息 /// /// /// - Admin GetAdminInfoByAdminAccount(Admin admin); + AdminInfo GetAdminInfoByAdminAccount(AdminInfo admin); /// /// 获取所有管理员类型 @@ -95,6 +95,6 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - bool UpdAccount(Admin admins); + bool UpdAccount(AdminInfo admins); } } \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Zero/CounterRule/CounterHelper.cs b/HotelManagerSystemWebApi.Application/Zero/CounterRule/CounterHelper.cs deleted file mode 100644 index 2a083c5..0000000 --- a/HotelManagerSystemWebApi.Application/Zero/CounterRule/CounterHelper.cs +++ /dev/null @@ -1,145 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *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. - * - *模块说明:流水号规则 - */ -using SYS.Common; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HotelManagerSystemWebApi.Core -{ - /// - /// 流水号规则 - /// - public class CounterHelper:Repository - { - /// - /// 获取生成编号 - /// - /// - /// - public string GetNewId(string str) - { - var count = 0; - var Str = string.Empty; - counterrule counterrule = new counterrule(); - counterrule = base.GetSingle(a => a.rule_name == str); - Str = counterrule.prefix_name + counterrule.separating_char + DateTime.Now.ToString(counterrule.custo_format) - + counterrule.number_format + counterrule.now_id; - count++; - var exe2 = base.Update(a => new counterrule() - { - now_id = counterrule.now_id + count - },a => a.rule_name == str); - return Str; - } - } - - /// - /// - /// - public class counterrule - { - /// - /// - /// - public counterrule() - { - } - - private System.Int32 _rule_id; - /// - /// 规则编号 - /// - public System.Int32 rule_id { get { return this._rule_id; } set { this._rule_id = value; } } - - private System.String _rule_name; - /// - /// 规格名称 - /// - public System.String rule_name { get { return this._rule_name; } set { this._rule_name = value; } } - - private System.String _rule_desc; - /// - /// 规则描述 - /// - public System.String rule_desc { get { return this._rule_desc; } set { this._rule_desc = value; } } - - private System.Int32? _now_id; - /// - /// 当前ID - /// - public System.Int32? now_id { get { return this._now_id; } set { this._now_id = value; } } - - private System.String _prefix_name; - /// - /// 规则简写 - /// - public System.String prefix_name { get { return this._prefix_name; } set { this._prefix_name = value; } } - - private System.String _custo_format; - /// - /// 规则格式 - /// - public System.String custo_format { get { return this._custo_format; } set { this._custo_format = value; } } - - private System.String _number_format; - /// - /// 编号前缀 - /// - public System.String number_format { get { return this._number_format; } set { this._number_format = value; } } - - private System.String _separating_char; - /// - /// 规则分割符 - /// - public System.String separating_char { get { return this._separating_char; } set { this._separating_char = value; } } - - private System.String _datains_usrid; - /// - /// 资料新增人 - /// - public System.String datains_usrid { get { return this._datains_usrid; } set { this._datains_usrid = value; } } - - private System.DateTime? _datains_time; - /// - /// 资料新增时间 - /// - public System.DateTime? datains_time { get { return this._datains_time; } set { this._datains_time = value; } } - - private System.String _datachg_usrid; - /// - /// 资料更新人 - /// - public System.String datachg_usrid { get { return this._datachg_usrid; } set { this._datachg_usrid = value; } } - - private System.DateTime? _datachg_time; - /// - /// 资料更新时间 - /// - public System.DateTime? datachg_time { get { return this._datachg_time; } set { this._datachg_time = value; } } - } -} diff --git a/HotelManagerSystemWebApi.Core/Business/Room/RoomState.cs b/HotelManagerSystemWebApi.Core/Business/Room/RoomState.cs index b1615cc..67a96c7 100644 --- a/HotelManagerSystemWebApi.Core/Business/Room/RoomState.cs +++ b/HotelManagerSystemWebApi.Core/Business/Room/RoomState.cs @@ -24,6 +24,7 @@ */ using Furion.DatabaseAccessor; +using System; using System.ComponentModel.DataAnnotations.Schema; namespace HotelManagerSystemWebApi.Core diff --git a/HotelManagerSystemWebApi.Web.Entry/appsettings.json b/HotelManagerSystemWebApi.Web.Entry/appsettings.json index 38a3974..972cde3 100644 --- a/HotelManagerSystemWebApi.Web.Entry/appsettings.json +++ b/HotelManagerSystemWebApi.Web.Entry/appsettings.json @@ -4,11 +4,13 @@ "KeepVerb": true, "KeepName": true, "VerbToHttpMethods": [ - [ "Insert", "POST" ], // => Insertǰ׺дΪ[HttpPost] - [ "Add", "POST" ], // => Addǰ׺дΪ[HttpPost] - [ "Del", "POST" ], // => Delǰ׺дΪ[HttpPost] - [ "Upd", "POST" ], // => Updǰ׺дΪ[HttpPost] - [ "Select", "GET" ] // => Selectǰ׺дΪ[HttpGet] + [ "Insert", "POST" ], + [ "Add", "POST" ], + [ "Del", "DELETE" ], + [ "Delete", "DELETE" ], + [ "Upd", "POST" ], + [ "Update", "POST" ], + [ "Select", "GET" ] ], "DefaultHttpMethod": "GET", "LowercaseRoute":false -- Gitee From 1f58df28fbb5e273a90987f3a60f845eb7e6e9d9 Mon Sep 17 00:00:00 2001 From: Chunkit Yeung Date: Sun, 31 Jul 2022 23:53:15 +0800 Subject: [PATCH 3/4] update_md --- README.md | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 98804eb..c864776 100644 --- a/README.md +++ b/README.md @@ -29,21 +29,21 @@ ### :mag_right: 系统开发环境: -操作系统:Windows 10(x64) +操作系统:Windows 11(x64) -开发工具:Microsoft Visual Studio 2019(系统最新版本) +开发工具:Microsoft Visual Studio 2022(系统最新版本) -数据库:MySQL v8.0.23(强烈推荐!) +数据库:PostgreSQL v13 -数据库管理工具:Navicat 15 +数据库管理工具:Navicat 16 开发语言:C#语言、LINQ语言 开发平台:.Net -开发框架:.Net 5/Furion +开发框架:.Net 6/Furion -开发技术:.NET 5 WebAPI +开发技术:.NET 6 WebAPI ### :open_file_folder: 系统结构: @@ -99,27 +99,16 @@ HotelManagerSystemWebApi **咖啡与网络(后期维护和开发)** -### :computer: 项目运行部署(执行下面步骤前需先安装.NET 5 SDK和Runtime): +### :computer: 项目运行部署(执行下面步骤前需先安装.NET 6 SDK和Runtime): -**下载并安装Microsoft Visual Studio Professional 2019及以上版本,并通过下载Zip包解压,打开.sln后缀格式文件运行。** +**下载并安装Microsoft Visual Studio Professional 2022及以上版本,并通过下载Zip包解压,打开.sln后缀格式文件运行。** ### :inbox_tray: 数据库运行部署(本地): -**作者及开发团队强烈建议使用MySQL数据库,安装MySQL数据库并开启服务,通过可视化管理工具对数据库进行建立,可通过打开执行数据库脚本文件夹内的.sql后缀格式文件进行快速建立数据表和导入数据,执行步骤(以MySQL数据库为例):** +**作者及开发团队强烈建议使用PostgreSQL数据库,安装PostgreSQL数据库并开启服务,通过可视化管理工具对数据库进行建立,可通过打开执行数据库脚本文件夹内的.sql后缀格式文件进行快速建立数据表和导入数据,执行步骤(以PostgreSQL数据库为例):** **1、通过可视化管理工具打开Table.sql文件进行数据表建立。** **2、随后打开Data.sql文件进行数据导入。** -### :exclamation: 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request(https://gitee.com/java-and-net/topsky-hotel-manager-system-web-api/pulls) - -1. # :chart_with_upwards_trend: Star趋势图(感谢[Giteye](https://giteye.net/)提供的趋势图报表功能!): - - [![Giteye chart](https://chart.giteye.net/gitee/java-and-net/topsky-hotel-manager-system-web-api/QXF965PJ.png)](https://giteye.net/chart/QXF965PJ)](https://giteye.net/chart/Z9DD26VK) - ​ [![咖啡与网络/TopskyHotelManagerSystem-WebApi](https://gitee.com/java-and-net/topsky-hotel-manager-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 From 9750e2d0d34bd7d1c5e211a19360515957450303 Mon Sep 17 00:00:00 2001 From: Chunkit Yeung Date: Sat, 17 Dec 2022 22:18:22 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E9=87=8D=E6=9E=84=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E6=A1=86=E6=9E=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Business/Cash}/CashService.cs | 78 +- .../Business/Cash}/ICashService.cs | 12 +- .../Business/Customer}/CustoService.cs | 268 ++- .../Business/Customer}/ICustoService.cs | 32 +- .../Business/Customer}/OSelectCustoAllDto.cs | 12 +- .../Business/Fonts}/FontsService.cs | 28 +- .../Business/Fonts}/IFontsService.cs | 8 +- .../Business/Reser}/IReserService.cs | 28 +- .../Business/Reser/ReserService.cs | 93 +- .../Business/Room/IRoomService.cs | 204 ++ .../Business/Room}/IRoomTypeService.cs | 18 +- .../Business/Room/RoomService.cs | 424 ++++ .../Business/Room}/RoomTypeService.cs | 68 +- .../Business/Sellthing}/ISellService.cs | 16 +- .../Business/Sellthing}/SellService.cs | 63 +- .../Business/Spend}/ISpendService.cs | 20 +- .../Business/Spend}/SpendService.cs | 62 +- .../Business/Wti/IWtiService.cs | 119 +- .../Business/Wti/WtiService.cs | 199 ++ .../EOM.TSHotelManager.Application.csproj | 34 + .../Sys/NavBar/INavBarService.cs | 16 + .../Sys/NavBar/NavBarService.cs | 41 + .../Worker/Check}/IWorkerCheckService.cs | 14 +- .../Worker/Check}/WorkerCheckService.cs | 43 +- .../Worker/GoodBad}/IWorkerGoodBadService.cs | 9 +- .../Worker/GoodBad}/WorkerGoodBadService.cs | 49 +- .../Worker/History}/IWorkerHistoryService.cs | 11 +- .../Worker/History}/WorkerHistoryService.cs | 30 +- .../Worker}/IWorkerService.cs | 10 +- .../Worker/Picture}/IWorkerPicService.cs | 6 +- .../Worker/Picture}/WorkerPicService.cs | 44 +- .../Worker}/WorkerService.cs | 139 +- .../Zero/Admin}/AdminService.cs | 86 +- .../Zero/Admin}/IAdminService.cs | 23 +- .../Zero/Base}/BaseService.cs | 202 +- .../Zero/Base}/IBaseService.cs | 8 +- .../Zero/CheckInfo/CheckInfoService.cs | 27 +- .../Zero/CheckInfo/ICheckInfoService.cs | 6 +- .../Zero/Module/AdminModuleZeroService.cs | 34 +- .../Zero/Module/IAdminModuleZeroService.cs | 4 +- .../Zero/Notice/INoticeService.cs | 7 +- .../Zero/Notice/NoticeService.cs | 33 +- .../Zero/VipRule/IVipRuleAppService.cs | 6 +- .../Zero/VipRule/VipRuleAppService.cs | 65 +- .../EOM.TSHotelManager.Common.csproj | 17 + EOM.TSHotelManager.Common/HttpHelper.cs | 48 + .../RecordHelper/AdminInfo.cs | 46 +- .../RecordHelper/IOperationlogService.cs | 22 +- .../RecordHelper/LoginInfo.cs | 41 +- .../RecordHelper/OperationLog.cs | 99 +- .../RecordHelper/OperationlogService.cs | 54 +- .../RecordHelper/RecordHelper.cs | 44 + .../Util/ApplicationVersionUtil.cs | 31 +- .../Util/IDCardUtil.cs | 26 +- .../Util/IDGenerationUtil.cs | 80 + .../Business/Cash/Cash.cs | 40 +- .../Business/Customer/Custo.cs | 63 +- .../Business/Customer/CustoSpend.cs | 6 +- .../Business/Customer}/CustoType.cs | 16 +- .../Business/Customer}/PassPortType.cs | 16 +- .../Business/Customer}/SexType.cs | 16 +- .../Business/Fonts/Fonts.cs | 13 +- .../Business/Reser/Reser.cs | 24 +- .../Business/Room/Room.cs | 74 +- .../Business/Room/RoomState.cs | 19 +- .../Business/Room/RoomType.cs | 19 +- .../Business/Sellthing/SellThing.cs | 26 +- .../Business/Spend/Spend.cs | 52 +- .../Business/Spend/SpendConsts.cs | 8 +- .../Business/Wti/Wti.cs | 38 +- .../EOM.TSHotelManager.Core.csproj | 14 + .../Sys/NavBar/NavBar.cs | 44 +- .../Worker}/GBType.cs | 13 +- .../Worker}/Worker.cs | 118 +- .../Worker}/WorkerCheck.cs | 33 +- .../Worker}/WorkerGoodBad.cs | 45 +- .../Worker}/WorkerHistory.cs | 25 +- .../Worker/WorkerPic.cs | 13 +- EOM.TSHotelManager.Core/Zero/Admin.cs | 125 + .../Zero}/AdminType.cs | 18 +- .../Zero/Base.cs | 12 +- .../Zero}/CheckInfo.cs | 26 +- .../Zero}/Dept.cs | 44 +- .../Zero}/Education.cs | 15 +- .../Zero}/Module.cs | 13 +- .../Zero}/ModuleConsts.cs | 24 +- .../Zero}/ModuleZero.cs | 16 +- .../Zero}/Nation.cs | 15 +- .../Zero}/Notice.cs | 45 +- .../Zero}/VipRule.cs | 28 +- .../Zero}/position.cs | 15 +- .../AppSettingsJson.cs | 28 + .../EOM.TSHotelManager.EntityFramework.csproj | 11 +- .../Repository/PgRepository.cs | 41 + .../dbsettings.json | 5 + EOM.TSHotelManager.Web.sln | 55 + .../.config/dotnet-tools.json | 12 + .../Business/Cash/CashController.cs | 27 +- .../Business/Customer/CustoController.cs | 80 +- .../Business/Fonts/FontsController.cs | 28 +- .../Business/Reser/ReserController.cs | 72 + .../Business/Room/RoomController.cs | 239 ++ .../Business/Sellthing/SellthingController.cs | 122 + .../Business/Spend/SpendController.cs | 142 ++ .../Controllers/Business/Wti/WtiController.cs | 126 + .../Sys/NavBar/NavBarController.cs | 39 + .../Worker/Check/WorkerCheckController.cs | 72 + .../Worker/GoodBad/WorkerGoodBadController.cs | 50 + .../Worker/History/WorkerHistoryController.cs | 50 + .../Worker/Picture/WorkerPictureController.cs | 73 + .../Controllers/Zero/Admin/AdminController.cs | 125 + .../Controllers/Zero/Base/BaseController.cs | 539 +++++ .../Zero/CheckInfo/CheckInfoController.cs | 38 + .../Zero/Module/ModuleController.cs | 72 + .../Zero/Notice/NoticeController.cs | 55 + .../Zero/VipRule/VipRuleController.cs | 82 + .../EOM.TSHotelManager.WebApi.csproj | 37 + .../EOM.TSHotelManager.WebApi.xml | 1303 ++++++++++ .../MvcOptionsExtensions.cs | 22 + EOM.TSHotelManager.WebApi/Program.cs | 42 + .../Properties/launchSettings.json | 16 +- EOM.TSHotelManager.WebApi/RouteConvention.cs | 57 + EOM.TSHotelManager.WebApi/Startup.cs | 139 ++ .../appsettings.Development.json | 2 +- EOM.TSHotelManager.WebApi/appsettings.json | 10 + .../Business/Cash/Dtos/AddCashInfoDto.cs | 84 - .../Business/Cash/Dtos/CashInfoListDto.cs | 44 - .../Business/Cash/Dtos/OAddCashInfoDto.cs | 38 - .../Business/Cash/Temp/Temp_Cash.cs | 76 - .../Customer/Dtos/OInsertCustomerInfoDto.cs | 37 - .../Customer/Dtos/OSelectAllMoneyDto.cs | 41 - .../Customer/Dtos/OUpdCustomerInfoDto.cs | 36 - .../Dtos/OUpdCustomerTypeByCustoNoDto.cs | 37 - .../Customer/Dtos/SelectCustoAllDto.cs | 44 - .../Business/Customer/Temp/Temp_Customer.cs | 83 - .../Business/Fonts/Dtos/OSelectFonListDto.cs | 41 - .../Business/Fonts/Temp/Temp_Fonts.cs | 24 - .../Dtos/InsertHydropowerInfoDto.cs | 74 - .../Dtos/OInsertHydropowerInfoDto.cs | 36 - .../Dtos/OSelectHydropowerInfoAllDto.cs | 26 - .../Dtos/OUpdateHydropowerInfoDto.cs | 36 - .../Dtos/SelectHydropowerInfoAllDto.cs | 73 - .../Dtos/UpdateHydropowerInfoDto.cs | 81 - .../Hydropower/HydropowerAppService.cs | 58 - .../Hydropower/Services/HydropowerService.cs | 160 -- .../Hydropower/Temp/Temp_Hydropower.cs | 73 - .../Business/Reser/Dtos/InserReserInfoDto.cs | 75 - .../Business/Reser/Dtos/OInserReserInfoDto.cs | 37 - .../Business/Reser/Dtos/OSelectReserAllDto.cs | 46 - .../Business/Reser/ReserAppService.cs | 49 - .../Business/Reser/Services/ReserService.cs | 154 -- .../Business/Reser/Temp/Temp_Reser.cs | 70 - .../Business/Room/Dtos/DayByRoomNoDto.cs | 39 - .../Business/Room/Dtos/InsertRoomDto.cs | 72 - .../Business/Room/Dtos/ODayByRoomNoDto.cs | 38 - .../Business/Room/Dtos/OInsertRoomDto.cs | 34 - .../Business/Room/Dtos/OSelectRoomDto.cs | 38 - .../Business/Room/Dtos/OSelectRoomListDto.cs | 43 - .../Room/Dtos/OSelectRoomTypesAllDto.cs | 40 - .../Business/Room/Dtos/OUpdCheckInRoomDto.cs | 34 - .../Business/Room/Dtos/OUpdCheckoutRoomDto.cs | 34 - .../Business/Room/Dtos/OUpdReserRoomDto.cs | 34 - .../Business/Room/Dtos/SelectRoomDto.cs | 39 - .../Room/Dtos/SelectRoomTypeByRoomNo.cs | 30 - .../Room/Dtos/SelectRoomTypesAllDto.cs | 46 - .../Business/Room/Dtos/UpdCheckInRoomDto.cs | 45 - .../Business/Room/Dtos/UpdCheckoutRoomDto.cs | 39 - .../Business/Room/Dtos/UpdReserRoomDto.cs | 38 - .../Business/Room/RoomAppService.cs | 92 - .../Business/Room/RoomTypeAppService.cs | 34 - .../Business/Room/Services/RoomService.cs | 318 --- .../Business/Room/Temp/Temp_Room.cs | 59 - .../Business/Room/Temp/Temp_RoomState.cs | 43 - .../Business/Room/Temp/Temp_RoomType.cs | 44 - .../Business/Spend/Temp/Temp_CustoSpend.cs | 80 - .../GlobalUsings.cs | 22 - ...otelManagerSystemWebApi.Application.csproj | 56 - .../HotelManagerSystemWebApi.Application.xml | 319 --- .../Worker/GoodBad/Temp/Temp_Goodbad.cs | 67 - .../Worker/History/Temp/Temp_History.cs | 59 - .../WorkerCheck/Temp/Temp_WorkerCheck.cs | 61 - .../Worker/WorkerInfo/Temp/Temp_WorkerInfo.cs | 115 - .../Zero/AdminInfo/AdminInfoAppService.cs | 81 - .../Zero/AdminInfo/Dtos/AddAdminInfoDto.cs | 57 - .../Zero/AdminInfo/Dtos/AdminInfoDto.cs | 18 - .../Zero/AdminInfo/Dtos/AdminInfoListDto.cs | 21 - .../Zero/AdminInfo/Dtos/DelAdminInfoDto.cs | 18 - .../Zero/AdminInfo/Dtos/OAddAdminInfoDto.cs | 13 - .../Zero/AdminInfo/Dtos/OAdminInfoDto.cs | 16 - .../Zero/AdminInfo/Dtos/OAdminInfoListDto.cs | 17 - .../Zero/AdminInfo/Dtos/ODelAdminInfoDto.cs | 13 - .../Zero/AdminInfo/Dtos/OUpdAdminInfoDto.cs | 12 - .../Zero/AdminInfo/Dtos/UpdAdminInfoDto.cs | 56 - .../AdminInfo/Services/AdminInfoService.cs | 340 --- .../AdminInfo/Services/IAdminInfoService.cs | 115 - .../Zero/AdminInfo/Temp/Temp_AdminInfo.cs | 65 - .../Zero/Base/Temp/Temp_CustomerType.cs | 44 - .../Zero/Base/Temp/Temp_Dept.cs | 67 - .../Zero/Base/Temp/Temp_Education.cs | 44 - .../Zero/Base/Temp/Temp_GoodbadType.cs | 49 - .../Zero/Base/Temp/Temp_Job.cs | 44 - .../Zero/Base/Temp/Temp_Nation.cs | 44 - .../Zero/Base/Temp/Temp_PassportType.cs | 44 - .../Zero/Base/Temp/Temp_SexType.cs | 45 - .../applicationsettings.json | 24 - .../Customer/CustomerInfo.cs | 92 - .../Customer/CustomerType.cs | 57 - .../Customer/VipRule.cs | 72 - .../DtoExtend/BaseDto/IBaseDto.cs | 19 - .../DtoExtend/BaseDto/IListDto.cs | 24 - .../DtoExtend/BaseDto/MsgDto.cs | 23 - .../DtoExtend/DtoExtend.cs | 471 ---- .../DtoExtend/MappingField.cs | 21 - .../DtoExtend/StatusCode.cs | 74 - .../HotelManagerSystemWebApi.Core.csproj | 39 - .../HotelManagerSystemWebApi.Core.xml | 2113 ----------------- .../Util/CounterRuleConsts.cs | 69 - .../Worker/WorkerPic/WorkerPic.cs | 29 - .../Zero/AdminInfo/AdminInfo.cs | 64 - .../Zero/CardCodes.cs | 47 - .../Zero/CounterRule.cs | 82 - .../Zero/OperationLog/OperationLog.cs | 73 - .../DbContexts/DefaultDbContext.cs | 14 - .../Startup.cs | 17 - .../dbsettings.json | 6 - .../Handlers/JwtHandler.cs | 15 - .../HotelManagerSystemWebApi.Web.Core.csproj | 18 - .../HotelManagerSystemWebApi.Web.Core.xml | 8 - HotelManagerSystemWebApi.Web.Core/Startup.cs | 44 - .../HotelManagerSystemWebApi.Web.Entry.csproj | 29 - HotelManagerSystemWebApi.Web.Entry/Program.cs | 17 - .../appsettings.json | 27 - HotelManagerSystemWebApi.sln | 49 - Library/CK.Common.dll | Bin 0 -> 22016 bytes Library/Library.csproj | 9 + 235 files changed, 6814 insertions(+), 9849 deletions(-) rename {HotelManagerSystemWebApi.Application/Business/Cash/Services => EOM.TSHotelManager.Application/Business/Cash}/CashService.cs (52%) rename {HotelManagerSystemWebApi.Application/Business/Cash/Services => EOM.TSHotelManager.Application/Business/Cash}/ICashService.cs (83%) rename {HotelManagerSystemWebApi.Application/Business/Customer/Services => EOM.TSHotelManager.Application/Business/Customer}/CustoService.cs (38%) rename {HotelManagerSystemWebApi.Application/Business/Customer/Services => EOM.TSHotelManager.Application/Business/Customer}/ICustoService.cs (68%) rename {HotelManagerSystemWebApi.Application/Business/Customer/Dtos => EOM.TSHotelManager.Application/Business/Customer}/OSelectCustoAllDto.cs (83%) rename {HotelManagerSystemWebApi.Application/Business/Fonts/Services => EOM.TSHotelManager.Application/Business/Fonts}/FontsService.cs (69%) rename {HotelManagerSystemWebApi.Application/Business/Fonts/Services => EOM.TSHotelManager.Application/Business/Fonts}/IFontsService.cs (89%) rename {HotelManagerSystemWebApi.Application/Business/Reser/Services => EOM.TSHotelManager.Application/Business/Reser}/IReserService.cs (69%) rename HotelManagerSystemWebApi.Application/Business/Room/Services/IRoomService.cs => EOM.TSHotelManager.Application/Business/Reser/ReserService.cs (42%) create mode 100644 EOM.TSHotelManager.Application/Business/Room/IRoomService.cs rename {HotelManagerSystemWebApi.Application/Business/Room/Services => EOM.TSHotelManager.Application/Business/Room}/IRoomTypeService.cs (75%) create mode 100644 EOM.TSHotelManager.Application/Business/Room/RoomService.cs rename {HotelManagerSystemWebApi.Application/Business/Room/Services => EOM.TSHotelManager.Application/Business/Room}/RoomTypeService.cs (49%) rename {HotelManagerSystemWebApi.Application/Business/Sellthing/Services => EOM.TSHotelManager.Application/Business/Sellthing}/ISellService.cs (86%) rename {HotelManagerSystemWebApi.Application/Business/Sellthing/Services => EOM.TSHotelManager.Application/Business/Sellthing}/SellService.cs (72%) rename {HotelManagerSystemWebApi.Application/Business/Spend/Services => EOM.TSHotelManager.Application/Business/Spend}/ISpendService.cs (86%) rename {HotelManagerSystemWebApi.Application/Business/Spend/Services => EOM.TSHotelManager.Application/Business/Spend}/SpendService.cs (80%) rename HotelManagerSystemWebApi.Application/Business/Customer/Dtos/UpdCustomerInfoDto.cs => EOM.TSHotelManager.Application/Business/Wti/IWtiService.cs (36%) create mode 100644 EOM.TSHotelManager.Application/Business/Wti/WtiService.cs create mode 100644 EOM.TSHotelManager.Application/EOM.TSHotelManager.Application.csproj create mode 100644 EOM.TSHotelManager.Application/Sys/NavBar/INavBarService.cs create mode 100644 EOM.TSHotelManager.Application/Sys/NavBar/NavBarService.cs rename {HotelManagerSystemWebApi.Application/Worker/WorkerCheck/Services => EOM.TSHotelManager.Application/Worker/Check}/IWorkerCheckService.cs (86%) rename {HotelManagerSystemWebApi.Application/Worker/WorkerCheck/Services => EOM.TSHotelManager.Application/Worker/Check}/WorkerCheckService.cs (65%) rename {HotelManagerSystemWebApi.Application/Worker/GoodBad/Services => EOM.TSHotelManager.Application/Worker/GoodBad}/IWorkerGoodBadService.cs (88%) rename {HotelManagerSystemWebApi.Application/Worker/GoodBad/Services => EOM.TSHotelManager.Application/Worker/GoodBad}/WorkerGoodBadService.cs (62%) rename {HotelManagerSystemWebApi.Application/Worker/History/Services => EOM.TSHotelManager.Application/Worker/History}/IWorkerHistoryService.cs (86%) rename {HotelManagerSystemWebApi.Application/Worker/History/Services => EOM.TSHotelManager.Application/Worker/History}/WorkerHistoryService.cs (68%) rename {HotelManagerSystemWebApi.Application/Worker/WorkerInfo/Services => EOM.TSHotelManager.Application/Worker}/IWorkerService.cs (92%) rename {HotelManagerSystemWebApi.Application/Worker/WorkerPic/Services => EOM.TSHotelManager.Application/Worker/Picture}/IWorkerPicService.cs (89%) rename {HotelManagerSystemWebApi.Application/Worker/WorkerPic/Services => EOM.TSHotelManager.Application/Worker/Picture}/WorkerPicService.cs (51%) rename {HotelManagerSystemWebApi.Application/Worker/WorkerInfo/Services => EOM.TSHotelManager.Application/Worker}/WorkerService.cs (64%) rename {HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services => EOM.TSHotelManager.Application/Zero/Admin}/AdminService.cs (65%) rename {HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services => EOM.TSHotelManager.Application/Zero/Admin}/IAdminService.cs (84%) rename {HotelManagerSystemWebApi.Application/Zero/Base/Services => EOM.TSHotelManager.Application/Zero/Base}/BaseService.cs (72%) rename {HotelManagerSystemWebApi.Application/Zero/Base/Services => EOM.TSHotelManager.Application/Zero/Base}/IBaseService.cs (98%) rename {HotelManagerSystemWebApi.Application => EOM.TSHotelManager.Application}/Zero/CheckInfo/CheckInfoService.cs (68%) rename {HotelManagerSystemWebApi.Application => EOM.TSHotelManager.Application}/Zero/CheckInfo/ICheckInfoService.cs (92%) rename {HotelManagerSystemWebApi.Application => EOM.TSHotelManager.Application}/Zero/Module/AdminModuleZeroService.cs (82%) rename {HotelManagerSystemWebApi.Application => EOM.TSHotelManager.Application}/Zero/Module/IAdminModuleZeroService.cs (93%) rename {HotelManagerSystemWebApi.Application => EOM.TSHotelManager.Application}/Zero/Notice/INoticeService.cs (93%) rename {HotelManagerSystemWebApi.Application => EOM.TSHotelManager.Application}/Zero/Notice/NoticeService.cs (76%) rename {HotelManagerSystemWebApi.Application => EOM.TSHotelManager.Application}/Zero/VipRule/IVipRuleAppService.cs (95%) rename {HotelManagerSystemWebApi.Application => EOM.TSHotelManager.Application}/Zero/VipRule/VipRuleAppService.cs (51%) create mode 100644 EOM.TSHotelManager.Common/EOM.TSHotelManager.Common.csproj create mode 100644 EOM.TSHotelManager.Common/HttpHelper.cs rename HotelManagerSystemWebApi.Application/Business/Room/Dtos/SelectRoomListDto.cs => EOM.TSHotelManager.Common/RecordHelper/AdminInfo.cs (64%) rename HotelManagerSystemWebApi.Application/Business/Cash/Dtos/OCashInfoListDto.cs => EOM.TSHotelManager.Common/RecordHelper/IOperationlogService.cs (74%) rename HotelManagerSystemWebApi.Application/Business/Reser/Dtos/SelectReserAllDto.cs => EOM.TSHotelManager.Common/RecordHelper/LoginInfo.cs (67%) rename HotelManagerSystemWebApi.Application/Business/Customer/Dtos/InsertCustomerInfoDto.cs => EOM.TSHotelManager.Common/RecordHelper/OperationLog.cs (48%) rename HotelManagerSystemWebApi.Application/Business/Hydropower/Services/IHydropowerService.cs => EOM.TSHotelManager.Common/RecordHelper/OperationlogService.cs (47%) create mode 100644 EOM.TSHotelManager.Common/RecordHelper/RecordHelper.cs rename {HotelManagerSystemWebApi.Core => EOM.TSHotelManager.Common}/Util/ApplicationVersionUtil.cs (69%) rename {HotelManagerSystemWebApi.Core => EOM.TSHotelManager.Common}/Util/IDCardUtil.cs (81%) create mode 100644 EOM.TSHotelManager.Common/Util/IDGenerationUtil.cs rename {HotelManagerSystemWebApi.Core => EOM.TSHotelManager.Core}/Business/Cash/Cash.cs (70%) rename {HotelManagerSystemWebApi.Core => EOM.TSHotelManager.Core}/Business/Customer/Custo.cs (60%) rename {HotelManagerSystemWebApi.Core => EOM.TSHotelManager.Core}/Business/Customer/CustoSpend.cs (91%) rename {HotelManagerSystemWebApi.Core/Zero/Base => EOM.TSHotelManager.Core/Business/Customer}/CustoType.cs (83%) rename {HotelManagerSystemWebApi.Core/Zero/Base => EOM.TSHotelManager.Core/Business/Customer}/PassPortType.cs (83%) rename {HotelManagerSystemWebApi.Core/Zero/Base => EOM.TSHotelManager.Core/Business/Customer}/SexType.cs (84%) rename {HotelManagerSystemWebApi.Core => EOM.TSHotelManager.Core}/Business/Fonts/Fonts.cs (83%) rename {HotelManagerSystemWebApi.Core => EOM.TSHotelManager.Core}/Business/Reser/Reser.cs (80%) rename {HotelManagerSystemWebApi.Core => EOM.TSHotelManager.Core}/Business/Room/Room.cs (60%) rename {HotelManagerSystemWebApi.Core => EOM.TSHotelManager.Core}/Business/Room/RoomState.cs (82%) rename {HotelManagerSystemWebApi.Core => EOM.TSHotelManager.Core}/Business/Room/RoomType.cs (80%) rename {HotelManagerSystemWebApi.Core => EOM.TSHotelManager.Core}/Business/Sellthing/SellThing.cs (80%) rename {HotelManagerSystemWebApi.Core => EOM.TSHotelManager.Core}/Business/Spend/Spend.cs (69%) rename {HotelManagerSystemWebApi.Core => EOM.TSHotelManager.Core}/Business/Spend/SpendConsts.cs (88%) rename HotelManagerSystemWebApi.Core/Business/Hydropower/Hydropower.cs => EOM.TSHotelManager.Core/Business/Wti/Wti.cs (73%) create mode 100644 EOM.TSHotelManager.Core/EOM.TSHotelManager.Core.csproj rename HotelManagerSystemWebApi.Application/Business/Sellthing/Temp/Temp_Sellthing.cs => EOM.TSHotelManager.Core/Sys/NavBar/NavBar.cs (50%) rename {HotelManagerSystemWebApi.Core/Worker/Goodbad => EOM.TSHotelManager.Core/Worker}/GBType.cs (86%) rename {HotelManagerSystemWebApi.Core/Worker/WorkerInfo => EOM.TSHotelManager.Core/Worker}/Worker.cs (53%) rename {HotelManagerSystemWebApi.Core/Worker/WorkerCheck => EOM.TSHotelManager.Core/Worker}/WorkerCheck.cs (75%) rename {HotelManagerSystemWebApi.Core/Worker/Goodbad => EOM.TSHotelManager.Core/Worker}/WorkerGoodBad.cs (71%) rename {HotelManagerSystemWebApi.Core/Worker/History => EOM.TSHotelManager.Core/Worker}/WorkerHistory.cs (78%) rename HotelManagerSystemWebApi.Application/Worker/WorkerPic/Temp/Temp_WorkerPic.cs => EOM.TSHotelManager.Core/Worker/WorkerPic.cs (50%) create mode 100644 EOM.TSHotelManager.Core/Zero/Admin.cs rename {HotelManagerSystemWebApi.Core/Zero/AdminInfo => EOM.TSHotelManager.Core/Zero}/AdminType.cs (82%) rename {HotelManagerSystemWebApi.Core => EOM.TSHotelManager.Core}/Zero/Base.cs (86%) rename {HotelManagerSystemWebApi.Core/Zero/CheckInfo => EOM.TSHotelManager.Core/Zero}/CheckInfo.cs (78%) rename {HotelManagerSystemWebApi.Core/Zero/Base => EOM.TSHotelManager.Core/Zero}/Dept.cs (71%) rename {HotelManagerSystemWebApi.Core/Zero/Base => EOM.TSHotelManager.Core/Zero}/Education.cs (84%) rename {HotelManagerSystemWebApi.Core/Zero/Module => EOM.TSHotelManager.Core/Zero}/Module.cs (76%) rename {HotelManagerSystemWebApi.Core/Zero/Module => EOM.TSHotelManager.Core/Zero}/ModuleConsts.cs (74%) rename {HotelManagerSystemWebApi.Core/Zero/Module => EOM.TSHotelManager.Core/Zero}/ModuleZero.cs (57%) rename {HotelManagerSystemWebApi.Core/Zero/Base => EOM.TSHotelManager.Core/Zero}/Nation.cs (84%) rename {HotelManagerSystemWebApi.Core/Zero/Notice => EOM.TSHotelManager.Core/Zero}/Notice.cs (67%) rename {HotelManagerSystemWebApi.Core/Zero/VipRule => EOM.TSHotelManager.Core/Zero}/VipRule.cs (79%) rename {HotelManagerSystemWebApi.Core/Zero/Base => EOM.TSHotelManager.Core/Zero}/position.cs (84%) create mode 100644 EOM.TSHotelManager.EntityFramework/AppSettingsJson.cs rename HotelManagerSystemWebApi.EntityFramework.Core/HotelManagerSystemWebApi.EntityFramework.Core.csproj => EOM.TSHotelManager.EntityFramework/EOM.TSHotelManager.EntityFramework.csproj (47%) create mode 100644 EOM.TSHotelManager.EntityFramework/Repository/PgRepository.cs create mode 100644 EOM.TSHotelManager.EntityFramework/dbsettings.json create mode 100644 EOM.TSHotelManager.Web.sln create mode 100644 EOM.TSHotelManager.WebApi/.config/dotnet-tools.json rename HotelManagerSystemWebApi.Application/Business/Cash/CashAppService.cs => EOM.TSHotelManager.WebApi/Controllers/Business/Cash/CashController.cs (52%) rename HotelManagerSystemWebApi.Application/Business/Customer/CustoAppService.cs => EOM.TSHotelManager.WebApi/Controllers/Business/Customer/CustoController.cs (32%) rename HotelManagerSystemWebApi.Application/Business/Fonts/FontsAppService.cs => EOM.TSHotelManager.WebApi/Controllers/Business/Fonts/FontsController.cs (41%) create mode 100644 EOM.TSHotelManager.WebApi/Controllers/Business/Reser/ReserController.cs create mode 100644 EOM.TSHotelManager.WebApi/Controllers/Business/Room/RoomController.cs create mode 100644 EOM.TSHotelManager.WebApi/Controllers/Business/Sellthing/SellthingController.cs create mode 100644 EOM.TSHotelManager.WebApi/Controllers/Business/Spend/SpendController.cs create mode 100644 EOM.TSHotelManager.WebApi/Controllers/Business/Wti/WtiController.cs create mode 100644 EOM.TSHotelManager.WebApi/Controllers/Sys/NavBar/NavBarController.cs create mode 100644 EOM.TSHotelManager.WebApi/Controllers/Worker/Check/WorkerCheckController.cs create mode 100644 EOM.TSHotelManager.WebApi/Controllers/Worker/GoodBad/WorkerGoodBadController.cs create mode 100644 EOM.TSHotelManager.WebApi/Controllers/Worker/History/WorkerHistoryController.cs create mode 100644 EOM.TSHotelManager.WebApi/Controllers/Worker/Picture/WorkerPictureController.cs create mode 100644 EOM.TSHotelManager.WebApi/Controllers/Zero/Admin/AdminController.cs create mode 100644 EOM.TSHotelManager.WebApi/Controllers/Zero/Base/BaseController.cs create mode 100644 EOM.TSHotelManager.WebApi/Controllers/Zero/CheckInfo/CheckInfoController.cs create mode 100644 EOM.TSHotelManager.WebApi/Controllers/Zero/Module/ModuleController.cs create mode 100644 EOM.TSHotelManager.WebApi/Controllers/Zero/Notice/NoticeController.cs create mode 100644 EOM.TSHotelManager.WebApi/Controllers/Zero/VipRule/VipRuleController.cs create mode 100644 EOM.TSHotelManager.WebApi/EOM.TSHotelManager.WebApi.csproj create mode 100644 EOM.TSHotelManager.WebApi/EOM.TSHotelManager.WebApi.xml create mode 100644 EOM.TSHotelManager.WebApi/MvcOptionsExtensions.cs create mode 100644 EOM.TSHotelManager.WebApi/Program.cs rename {HotelManagerSystemWebApi.Web.Entry => EOM.TSHotelManager.WebApi}/Properties/launchSettings.json (66%) create mode 100644 EOM.TSHotelManager.WebApi/RouteConvention.cs create mode 100644 EOM.TSHotelManager.WebApi/Startup.cs rename {HotelManagerSystemWebApi.Web.Entry => EOM.TSHotelManager.WebApi}/appsettings.Development.json (98%) create mode 100644 EOM.TSHotelManager.WebApi/appsettings.json delete mode 100644 HotelManagerSystemWebApi.Application/Business/Cash/Dtos/AddCashInfoDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Cash/Dtos/CashInfoListDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Cash/Dtos/OAddCashInfoDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Cash/Temp/Temp_Cash.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Customer/Dtos/OInsertCustomerInfoDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Customer/Dtos/OSelectAllMoneyDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Customer/Dtos/OUpdCustomerInfoDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Customer/Dtos/OUpdCustomerTypeByCustoNoDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Customer/Dtos/SelectCustoAllDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Customer/Temp/Temp_Customer.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Fonts/Dtos/OSelectFonListDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Fonts/Temp/Temp_Fonts.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/InsertHydropowerInfoDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/OInsertHydropowerInfoDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/OSelectHydropowerInfoAllDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/OUpdateHydropowerInfoDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/SelectHydropowerInfoAllDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/UpdateHydropowerInfoDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Hydropower/HydropowerAppService.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Hydropower/Services/HydropowerService.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Hydropower/Temp/Temp_Hydropower.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Reser/Dtos/InserReserInfoDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Reser/Dtos/OInserReserInfoDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Reser/Dtos/OSelectReserAllDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Reser/ReserAppService.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Reser/Services/ReserService.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Reser/Temp/Temp_Reser.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Dtos/DayByRoomNoDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Dtos/InsertRoomDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Dtos/ODayByRoomNoDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Dtos/OInsertRoomDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Dtos/OSelectRoomDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Dtos/OSelectRoomListDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Dtos/OSelectRoomTypesAllDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Dtos/OUpdCheckInRoomDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Dtos/OUpdCheckoutRoomDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Dtos/OUpdReserRoomDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Dtos/SelectRoomDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Dtos/SelectRoomTypeByRoomNo.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Dtos/SelectRoomTypesAllDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Dtos/UpdCheckInRoomDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Dtos/UpdCheckoutRoomDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Dtos/UpdReserRoomDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Room/RoomAppService.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Room/RoomTypeAppService.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Services/RoomService.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Temp/Temp_Room.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Temp/Temp_RoomState.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Room/Temp/Temp_RoomType.cs delete mode 100644 HotelManagerSystemWebApi.Application/Business/Spend/Temp/Temp_CustoSpend.cs delete mode 100644 HotelManagerSystemWebApi.Application/GlobalUsings.cs delete mode 100644 HotelManagerSystemWebApi.Application/HotelManagerSystemWebApi.Application.csproj delete mode 100644 HotelManagerSystemWebApi.Application/HotelManagerSystemWebApi.Application.xml delete mode 100644 HotelManagerSystemWebApi.Application/Worker/GoodBad/Temp/Temp_Goodbad.cs delete mode 100644 HotelManagerSystemWebApi.Application/Worker/History/Temp/Temp_History.cs delete mode 100644 HotelManagerSystemWebApi.Application/Worker/WorkerCheck/Temp/Temp_WorkerCheck.cs delete mode 100644 HotelManagerSystemWebApi.Application/Worker/WorkerInfo/Temp/Temp_WorkerInfo.cs delete mode 100644 HotelManagerSystemWebApi.Application/Zero/AdminInfo/AdminInfoAppService.cs delete mode 100644 HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/AddAdminInfoDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/AdminInfoDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/AdminInfoListDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/DelAdminInfoDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/OAddAdminInfoDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/OAdminInfoDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/OAdminInfoListDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/ODelAdminInfoDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/OUpdAdminInfoDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/UpdAdminInfoDto.cs delete mode 100644 HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services/AdminInfoService.cs delete mode 100644 HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services/IAdminInfoService.cs delete mode 100644 HotelManagerSystemWebApi.Application/Zero/AdminInfo/Temp/Temp_AdminInfo.cs delete mode 100644 HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_CustomerType.cs delete mode 100644 HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_Dept.cs delete mode 100644 HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_Education.cs delete mode 100644 HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_GoodbadType.cs delete mode 100644 HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_Job.cs delete mode 100644 HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_Nation.cs delete mode 100644 HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_PassportType.cs delete mode 100644 HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_SexType.cs delete mode 100644 HotelManagerSystemWebApi.Application/applicationsettings.json delete mode 100644 HotelManagerSystemWebApi.Core/Customer/CustomerInfo.cs delete mode 100644 HotelManagerSystemWebApi.Core/Customer/CustomerType.cs delete mode 100644 HotelManagerSystemWebApi.Core/Customer/VipRule.cs delete mode 100644 HotelManagerSystemWebApi.Core/DtoExtend/BaseDto/IBaseDto.cs delete mode 100644 HotelManagerSystemWebApi.Core/DtoExtend/BaseDto/IListDto.cs delete mode 100644 HotelManagerSystemWebApi.Core/DtoExtend/BaseDto/MsgDto.cs delete mode 100644 HotelManagerSystemWebApi.Core/DtoExtend/DtoExtend.cs delete mode 100644 HotelManagerSystemWebApi.Core/DtoExtend/MappingField.cs delete mode 100644 HotelManagerSystemWebApi.Core/DtoExtend/StatusCode.cs delete mode 100644 HotelManagerSystemWebApi.Core/HotelManagerSystemWebApi.Core.csproj delete mode 100644 HotelManagerSystemWebApi.Core/HotelManagerSystemWebApi.Core.xml delete mode 100644 HotelManagerSystemWebApi.Core/Util/CounterRuleConsts.cs delete mode 100644 HotelManagerSystemWebApi.Core/Worker/WorkerPic/WorkerPic.cs delete mode 100644 HotelManagerSystemWebApi.Core/Zero/AdminInfo/AdminInfo.cs delete mode 100644 HotelManagerSystemWebApi.Core/Zero/CardCodes.cs delete mode 100644 HotelManagerSystemWebApi.Core/Zero/CounterRule.cs delete mode 100644 HotelManagerSystemWebApi.Core/Zero/OperationLog/OperationLog.cs delete mode 100644 HotelManagerSystemWebApi.EntityFramework.Core/DbContexts/DefaultDbContext.cs delete mode 100644 HotelManagerSystemWebApi.EntityFramework.Core/Startup.cs delete mode 100644 HotelManagerSystemWebApi.EntityFramework.Core/dbsettings.json delete mode 100644 HotelManagerSystemWebApi.Web.Core/Handlers/JwtHandler.cs delete mode 100644 HotelManagerSystemWebApi.Web.Core/HotelManagerSystemWebApi.Web.Core.csproj delete mode 100644 HotelManagerSystemWebApi.Web.Core/HotelManagerSystemWebApi.Web.Core.xml delete mode 100644 HotelManagerSystemWebApi.Web.Core/Startup.cs delete mode 100644 HotelManagerSystemWebApi.Web.Entry/HotelManagerSystemWebApi.Web.Entry.csproj delete mode 100644 HotelManagerSystemWebApi.Web.Entry/Program.cs delete mode 100644 HotelManagerSystemWebApi.Web.Entry/appsettings.json delete mode 100644 HotelManagerSystemWebApi.sln create mode 100644 Library/CK.Common.dll create mode 100644 Library/Library.csproj diff --git a/HotelManagerSystemWebApi.Application/Business/Cash/Services/CashService.cs b/EOM.TSHotelManager.Application/Business/Cash/CashService.cs similarity index 52% rename from HotelManagerSystemWebApi.Application/Business/Cash/Services/CashService.cs rename to EOM.TSHotelManager.Application/Business/Cash/CashService.cs index 4427fa5..bff8f9d 100644 --- a/HotelManagerSystemWebApi.Application/Business/Cash/Services/CashService.cs +++ b/EOM.TSHotelManager.Application/Business/Cash/CashService.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -21,36 +21,33 @@ *SOFTWARE. * */ -using Furion.DatabaseAccessor; -using Furion.DependencyInjection; -using Furion.LinqBuilder; -using HotelManagerSystemWebApi.Core; -using jvncorelib.CodeLib; using System; using System.Collections.Generic; using System.Linq; +using EOM.TSHotelManager.Core; +using EOM.TSHotelManager.EntityFramework; -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Application { /// /// 资产信息接口实现类 /// - public class CashService:ICashService, ITransient + public class CashService:ICashService { /// /// 资产信息 /// - private readonly IRepository cashRepository; + private readonly PgRepository cashRepository; /// /// 部门 /// - private readonly IRepository deptRepository; + private readonly PgRepository deptRepository; /// /// 员工 /// - private readonly IRepository workerRepository; + private readonly PgRepository workerRepository; /// /// @@ -58,7 +55,7 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - public CashService(IRepository cashRepository, IRepository deptRepository, IRepository workerRepository) + public CashService(PgRepository cashRepository, PgRepository deptRepository, PgRepository workerRepository) { this.cashRepository = cashRepository; this.deptRepository = deptRepository; @@ -68,57 +65,28 @@ namespace HotelManagerSystemWebApi.Application /// /// 添加资产信息 /// - /// + /// /// - public OAddCashInfoDto AddCashInfo(AddCashInfoDto addCashInfoDto) + public bool AddCashInfo(Cash cash) { - OAddCashInfoDto oAddCashInfoDto = new OAddCashInfoDto(); - - var uncode = new UniqueCode(); - - var source = new Cash(); - - source = source.UpdateToModel(addCashInfoDto); - source.CashNo = uncode.GetNewId("CN"); - source.datains_usr = addCashInfoDto.NowLoginUsr; - source.datains_date = DateTime.Now; - this.cashRepository.Insert(source); - - oAddCashInfoDto.OK(); - - return oAddCashInfoDto; + return cashRepository.Insert(cash); } /// /// 查询资产信息 /// /// - public OCashInfoListDto SelectCashInfoAll(CashInfoListDto cashInfoListDto) + public List SelectCashInfoAll() { - OCashInfoListDto oCashInfoListDto = new OCashInfoListDto(); - //查询所有部门信息 - var depts = deptRepository.AsQueryable(a => a.delete_mk != 1).ToList().CopyToModel(); + List depts = new List(); + depts = deptRepository.GetList(a => a.delete_mk != 1); //查询所有员工信息 - var workers = workerRepository.AsQueryable(a => a.delete_mk != 1).ToList().CopyToModel(); - - var where = LinqExpression.Create(a => a.delete_mk != 1); - - //资产编号 - if (!cashInfoListDto.CashNo.IsNullOrEmpty()) - { - where = where.And(a => a.CashNo.Contains(cashInfoListDto.CashNo)); - } - //资产名称 - if (!cashInfoListDto.CashName.IsNullOrEmpty()) - { - where = where.And(a => a.CashName.Contains(cashInfoListDto.CashName)); - } - - //查询资产信息 - var listSource = cashRepository.AsQueryable(where).ToList().CopyToModel(); - - listSource.ForEach(source => + List workers = new List(); + workers = workerRepository.GetList(a => a.delete_mk != 1); + List cs = new List(); + cs = cashRepository.GetList(a => a.delete_mk != 1); + cs.ForEach(source => { var dept = depts.FirstOrDefault(a => a.dept_no.Equals(source.CashClub)); source.DeptName = dept == null ? "" : dept.dept_name; @@ -128,11 +96,7 @@ namespace HotelManagerSystemWebApi.Application source.CashPriceStr = source.CashPrice == 0 ? "" : Decimal.Parse(source.CashPrice.ToString()).ToString("#,##0.00").ToString(); }); - - oCashInfoListDto.listSource = listSource; - oCashInfoListDto.total = listSource.Count; - - return oCashInfoListDto; + return cs; } } } diff --git a/HotelManagerSystemWebApi.Application/Business/Cash/Services/ICashService.cs b/EOM.TSHotelManager.Application/Business/Cash/ICashService.cs similarity index 83% rename from HotelManagerSystemWebApi.Application/Business/Cash/Services/ICashService.cs rename to EOM.TSHotelManager.Application/Business/Cash/ICashService.cs index 7495024..47705ba 100644 --- a/HotelManagerSystemWebApi.Application/Business/Cash/Services/ICashService.cs +++ b/EOM.TSHotelManager.Application/Business/Cash/ICashService.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -21,10 +21,10 @@ *SOFTWARE. * */ - +using EOM.TSHotelManager.Core; using System.Collections.Generic; -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Application { /// /// 资产信息接口 @@ -34,14 +34,14 @@ namespace HotelManagerSystemWebApi.Application /// /// 添加资产信息 /// - /// + /// /// - OAddCashInfoDto AddCashInfo(AddCashInfoDto addCashInfoDto); + bool AddCashInfo(Cash cash); /// /// 查询资产信息 /// /// - OCashInfoListDto SelectCashInfoAll(CashInfoListDto cashInfoListDto); + List SelectCashInfoAll(); } } \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Customer/Services/CustoService.cs b/EOM.TSHotelManager.Application/Business/Customer/CustoService.cs similarity index 38% rename from HotelManagerSystemWebApi.Application/Business/Customer/Services/CustoService.cs rename to EOM.TSHotelManager.Application/Business/Customer/CustoService.cs index 11c970a..5a56b51 100644 --- a/HotelManagerSystemWebApi.Application/Business/Customer/Services/CustoService.cs +++ b/EOM.TSHotelManager.Application/Business/Customer/CustoService.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -21,120 +21,107 @@ *SOFTWARE. * */ -using Furion.DatabaseAccessor; -using Furion.DependencyInjection; -using Furion.LinqBuilder; -using HotelManagerSystemWebApi.Core; -using jvncorelib.CodeLib; -using jvncorelib.EncryptorLib; -using jvncorelib.EntityLib; using System; using System.Collections.Generic; using System.Linq; -using System.Threading.Tasks; - -namespace HotelManagerSystemWebApi.Application +using System.Linq.Expressions; +using CK.Common; +using EncryptTools.Core; +using EOM.TSHotelManager.Core; +using EOM.TSHotelManager.EntityFramework; +using Npgsql; + +namespace EOM.TSHotelManager.Application { /// /// 客户信息接口实现类 /// - public class CustoService:ICustoService, ITransient + public class CustoService:ICustoService { /// /// 客户信息 /// - private readonly IRepository customerRepository; + private readonly PgRepository custoRepository; /// - /// 客户消费信息 + /// 消费情况 /// - private readonly IRepository spendRepository; + private readonly PgRepository spendRepository; /// - /// 客户类型 + /// 性别类型 /// - private readonly IRepository customerTypeRepository; + private readonly PgRepository sexTypeRepository; /// - /// 性别类型 + /// 证件类型 /// - private readonly IRepository sexTypeRepository; + private readonly PgRepository passPortTypeRepository; /// - /// 证件类型 + /// 客户类型 /// - private readonly IRepository passportTypeRepository; + private readonly PgRepository custoTypeRepository; - EncryptLib encryptLib = new EncryptLib(); + Encrypt encrypt = new Encrypt(); /// /// /// - /// - /// + /// + /// /// - /// - /// - public CustoService(IRepository customerRepository, IRepository customerTypeRepository, IRepository sexTypeRepository, IRepository passportTypeRepository, EncryptLib encryptLib) + /// + /// + public CustoService(PgRepository custoRepository, PgRepository spendRepository, PgRepository sexTypeRepository, PgRepository passPortTypeRepository, PgRepository custoTypeRepository) { - this.customerRepository = customerRepository; - this.customerTypeRepository = customerTypeRepository; + this.custoRepository = custoRepository; + this.spendRepository = spendRepository; this.sexTypeRepository = sexTypeRepository; - this.passportTypeRepository = passportTypeRepository; - this.encryptLib = encryptLib; + this.passPortTypeRepository = passPortTypeRepository; + this.custoTypeRepository = custoTypeRepository; } #region 添加客户信息 /// /// 添加客户信息 /// - /// + /// /// - public OInsertCustomerInfoDto InsertCustomerInfo(InsertCustomerInfoDto insertCustomerInfoDto) + public bool InsertCustomerInfo(Custo custo) { - OInsertCustomerInfoDto oInsertCustomerInfoDto = new OInsertCustomerInfoDto(); - - var uncode = new UniqueCode(); - - var source = new Custo(); - - source = source.UpdateToModel(insertCustomerInfoDto); - source.CustoNo = uncode.GetNewId("TS"); - source.CustoID = encryptLib.Encryption(source.CustoID); - source.CustoTel = encryptLib.Encryption(source.CustoTel); - this.customerRepository.Insert(source); - oInsertCustomerInfoDto.OK(); - - return oInsertCustomerInfoDto; + string? NewID = encrypt.Encryption(custo.CustoID); + string? NewTel = encrypt.Encryption(custo.CustoTel); + custo.CustoID = NewID; + custo.CustoTel = NewTel; + return custoRepository.Insert(custo); } #endregion /// /// 更新客户信息 /// - /// + /// /// - public OUpdCustomerInfoDto UpdCustomerInfoNo(UpdCustomerInfoDto updCustomerInfoDto) + public bool UpdCustomerInfoByCustoNo(Custo custo) { - OUpdCustomerInfoDto oUpdCustomerInfoDto = new OUpdCustomerInfoDto(); - - var source = this.customerRepository.SingleOrDefault(a => a.CustoNo.Equals(updCustomerInfoDto.CustoNo)); - - if (source.IsNullOrEmpty()) + string? NewID = encrypt.Encryption(custo.CustoID); + string? NewTel = encrypt.Encryption(custo.CustoTel); + custo.CustoID = NewID; + custo.CustoTel = NewTel; + return custoRepository.Update(a => new Custo() { - oUpdCustomerInfoDto.Error_NotFound(); - return oUpdCustomerInfoDto; - } - - source = source.UpdateToModel(updCustomerInfoDto); - source.CustoID = encryptLib.Encryption(source.CustoID); - source.CustoTel = encryptLib.Encryption(source.CustoTel); - this.customerRepository.Update(source); - - oUpdCustomerInfoDto.OK(); - - return oUpdCustomerInfoDto; - + CustoName = custo.CustoName, + CustoSex = custo.CustoSex, + CustoType = custo.CustoType, + CustoBirth = custo.CustoBirth, + CustoAdress = custo.CustoAdress, + CustoID = custo.CustoID, + CustoTel = custo.CustoTel, + PassportType = custo.PassportType, + datachg_usr = custo.datachg_usr, + datachg_date = DateTime.Now + },a => a.CustoNo == custo.CustoNo); } /// @@ -143,28 +130,22 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - //public OUpdCustomerTypeByCustoNoDto UpdCustomerTypeByCustoNo(string custoNo, int userType) - //{ - // OUpdCustomerTypeByCustoNoDto oUpdCustomerTypeByCustoNoDto = new OUpdCustomerTypeByCustoNoDto(); - - // customerRepository.Update(new Custo { CustoNo = custoNo, CustoType = userType }); - // oUpdCustomerTypeByCustoNoDto.OK(); - - // return oUpdCustomerTypeByCustoNoDto; - - //} + public bool UpdCustomerTypeByCustoNo(string? custoNo,int userType) + { + return custoRepository.Update(a => new Custo() + { + CustoType = userType + }, a => a.CustoNo.Equals(custoNo)); + } /// /// 查询酒店盈利情况 /// /// - public OSelectAllMoneyDto SelectAllMoney() + public List SelectAllMoney() { - OSelectAllMoneyDto oSelectAllMoneyDto = new OSelectAllMoneyDto(); - List custoSpends = new List(); - var listSource = spendRepository.AsQueryable(a => a.MoneyState.Equals(SpendConsts.Settled)) - .OrderBy(a => a.SpendTime).ToList().CopyToModel(); + var listSource = spendRepository.GetList(a => a.MoneyState.Equals(SpendConsts.Settled)).OrderBy(a => a.SpendTime).ToList(); var listDates = new List(); listSource.ForEach(source => { @@ -180,55 +161,49 @@ namespace HotelManagerSystemWebApi.Application }); } }); - + custoSpends = custoSpends.OrderBy(a => a.Years).ToList(); - oSelectAllMoneyDto.listSource = custoSpends; - oSelectAllMoneyDto.OK(); - - return oSelectAllMoneyDto; + return custoSpends; } /// /// 查询所有客户信息 /// /// - public OSelectCustoAllDto SelectCustoAll(SelectCustoAllDto selectCustoAllDto) + public OSelectCustoAllDto SelectCustoAll(int? pageIndex,int? pageSize) { OSelectCustoAllDto oSelectCustoAllDto = new OSelectCustoAllDto(); + var count = 0; + //查询出所有性别类型 - var sexTypes = sexTypeRepository.AsQueryable().ToList().CopyToModel(); + List sexTypes = new List(); + sexTypes = sexTypeRepository.GetList(); //查询出所有证件类型 - var passPortTypes = passportTypeRepository.AsQueryable().ToList().CopyToModel(); + List passPortTypes = new List(); + passPortTypes = passPortTypeRepository.GetList(); //查询出所有客户类型 - var custoTypes = customerTypeRepository.AsQueryable().ToList().CopyToModel(); - - var where = LinqExpression.Create(a => a.delete_mk != 1); + List custoTypes = new List(); + custoTypes = custoTypeRepository.GetList(); + //查询出所有客户信息 + List custos = new List(); - if (!selectCustoAllDto.CustoNo.IsNullOrEmpty()) + if (!pageIndex.IsNullOrEmpty() && !pageSize.IsNullOrEmpty()) { - where = where.And(a => a.CustoNo.Contains(selectCustoAllDto.CustoNo)); + custos = custoRepository.AsQueryable().ToPageList((int)pageIndex, (int)pageSize,ref count).OrderBy(a => a.CustoNo).ToList(); } - - if (!selectCustoAllDto.CustoName.IsNullOrEmpty()) + else { - where = where.And(a => a.CustoName.Contains(selectCustoAllDto.CustoName)); + custos = custoRepository.AsQueryable().OrderBy(a => a.CustoNo).ToList(); } - var count = 0; - - //查询出所有客户信息 - var custos = customerRepository.AsQueryable(where).OrderBy(a => a.CustoNo).ToList() - .GetPageList(selectCustoAllDto.PageIndex, selectCustoAllDto.PageSize, ref count) - .CopyToModel(); - custos.ForEach(source => { //解密身份证号码 - var sourceStr = source.CustoID.Contains("·") ? encryptLib.Decryption(source.CustoID) : source.CustoID; + var sourceStr = source.CustoID.Contains("·") ? encrypt.Decryption(source.CustoID) : source.CustoID; source.CustoID = sourceStr; //解密联系方式 - var sourceTelStr = source.CustoTel.Contains("·") ? encryptLib.Decryption(source.CustoTel) : source.CustoTel; + var sourceTelStr = source.CustoTel.Contains("·") ? encrypt.Decryption(source.CustoTel) : source.CustoTel; source.CustoTel = sourceTelStr; //性别类型 var sexType = sexTypes.FirstOrDefault(a => a.sexId == source.CustoSex); @@ -241,11 +216,86 @@ namespace HotelManagerSystemWebApi.Application source.typeName = string.IsNullOrEmpty(custoType.TypeName) ? "" : custoType.TypeName; }); - oSelectCustoAllDto.listSource = custos; + oSelectCustoAllDto.custos = custos; oSelectCustoAllDto.total = count; - oSelectCustoAllDto.OK(); return oSelectCustoAllDto; } + /// + /// 查询指定客户信息 + /// + /// + public List SelectCustoByInfo(Custo custo) + { + //查询出所有性别类型 + 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.CustoNo.IsNullOrEmpty()) + { + custos = custoRepository.GetList(a => a.CustoNo.Contains(custo.CustoNo)).OrderBy(a => a.CustoNo).ToList(); + } + if (!custo.CustoName.IsNullOrEmpty()) + { + custos = custoRepository.GetList(a => a.CustoName.Contains(custo.CustoName)).OrderBy(a => a.CustoNo).ToList(); + } + custos.ForEach(source => + { + //解密身份证号码 + var sourceStr = source.CustoID.Contains("·") ? encrypt.Decryption(source.CustoID) : source.CustoID; + source.CustoID = sourceStr; + //解密联系方式 + var sourceTelStr = source.CustoTel.Contains("·") ? encrypt.Decryption(source.CustoTel) : source.CustoTel; + source.CustoTel = sourceTelStr; + //性别类型 + var sexType = sexTypes.FirstOrDefault(a => a.sexId == source.CustoSex); + source.SexName = string.IsNullOrEmpty(sexType.sexName) ? "" : sexType.sexName; + //证件类型 + var passPortType = passPortTypes.FirstOrDefault(a => a.PassportId == source.PassportType); + source.PassportName = string.IsNullOrEmpty(passPortType.PassportName) ? "" : passPortType.PassportName; + //客户类型 + var custoType = custoTypes.FirstOrDefault(a => a.UserType == source.CustoType); + source.typeName = string.IsNullOrEmpty(custoType.TypeName) ? "" : custoType.TypeName; + }); + return custos; + } + + /// + /// 根据客户编号查询客户信息 + /// + /// + /// + public Custo SelectCardInfoByCustoNo(string? CustoNo) + { + Custo c = custoRepository.GetSingle(a => a.CustoNo.Contains(CustoNo)); + if (c.IsNullOrEmpty()) + { + return null; + } + //性别类型 + var sexType = sexTypeRepository.GetSingle(a => a.sexId == c.CustoSex); + c.SexName = string.IsNullOrEmpty(sexType.sexName) ? "" : sexType.sexName; + //证件类型 + var passPortType = passPortTypeRepository.GetSingle(a => a.PassportId == c.PassportType); + c.PassportName = string.IsNullOrEmpty(passPortType.PassportName) ? "" : passPortType.PassportName; + //客户类型 + var custoType = custoTypeRepository.GetSingle(a => a.UserType == c.CustoType); + c.typeName = string.IsNullOrEmpty(custoType.TypeName) ? "" : custoType.TypeName; + //解密身份证号码 + var sourceStr = c.CustoID.Contains("·") ? encrypt.Decryption(c.CustoID) : c.CustoID; + c.CustoID = sourceStr; + //解密联系方式 + var sourceTelStr = c.CustoTel.Contains("·") ? encrypt.Decryption(c.CustoTel) : c.CustoTel; + c.CustoTel = sourceTelStr; + return c; + } + } } diff --git a/HotelManagerSystemWebApi.Application/Business/Customer/Services/ICustoService.cs b/EOM.TSHotelManager.Application/Business/Customer/ICustoService.cs similarity index 68% rename from HotelManagerSystemWebApi.Application/Business/Customer/Services/ICustoService.cs rename to EOM.TSHotelManager.Application/Business/Customer/ICustoService.cs index bf4e4dd..d1f758f 100644 --- a/HotelManagerSystemWebApi.Application/Business/Customer/Services/ICustoService.cs +++ b/EOM.TSHotelManager.Application/Business/Customer/ICustoService.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -21,10 +21,10 @@ *SOFTWARE. * */ - +using EOM.TSHotelManager.Core; using System.Collections.Generic; -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Application { /// /// 客户信息接口 @@ -34,16 +34,16 @@ namespace HotelManagerSystemWebApi.Application /// /// 添加客户信息 /// - /// + /// /// - OInsertCustomerInfoDto InsertCustomerInfo(InsertCustomerInfoDto insertCustomerInfoDto); + bool InsertCustomerInfo(Custo custo); /// /// 更新客户信息 /// - /// + /// /// - OUpdCustomerInfoDto UpdCustomerInfoNo(UpdCustomerInfoDto updCustomerInfoDto); + bool UpdCustomerInfoByCustoNo(Custo custo); /// /// 更新客户类型(即会员等级) @@ -51,20 +51,32 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - //OUpdCustomerTypeByCustoNoDto UpdCustomerTypeByCustoNo(string custoNo, int userType); + bool UpdCustomerTypeByCustoNo(string? custoNo, int userType); /// /// 查询酒店盈利情况 /// /// - OSelectAllMoneyDto SelectAllMoney(); + List SelectAllMoney(); /// /// 查询所有客户信息 /// /// - OSelectCustoAllDto SelectCustoAll(SelectCustoAllDto selectCustoAllDto); + OSelectCustoAllDto SelectCustoAll(int? pageIndex, int? pageSize); + + /// + /// 查询指定客户信息 + /// + /// + List SelectCustoByInfo(Custo custo); + /// + /// 根据客户编号查询客户信息 + /// + /// + /// + Custo SelectCardInfoByCustoNo(string? CustoNo); } } \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/OSelectCustoAllDto.cs b/EOM.TSHotelManager.Application/Business/Customer/OSelectCustoAllDto.cs similarity index 83% rename from HotelManagerSystemWebApi.Application/Business/Customer/Dtos/OSelectCustoAllDto.cs rename to EOM.TSHotelManager.Application/Business/Customer/OSelectCustoAllDto.cs index a2695f6..4b7ae13 100644 --- a/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/OSelectCustoAllDto.cs +++ b/EOM.TSHotelManager.Application/Business/Customer/OSelectCustoAllDto.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -21,22 +21,20 @@ *SOFTWARE. * */ +using EOM.TSHotelManager.Core; -using HotelManagerSystemWebApi.Core; -using System.Collections.Generic; - -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Application { /// /// 查询所有客户信息 /// 输出DTO /// - public class OSelectCustoAllDto:MsgDto + public class OSelectCustoAllDto { /// /// 数据源 /// - public List listSource { get; set; } + public List custos { get; set; } /// /// 总数 diff --git a/HotelManagerSystemWebApi.Application/Business/Fonts/Services/FontsService.cs b/EOM.TSHotelManager.Application/Business/Fonts/FontsService.cs similarity index 69% rename from HotelManagerSystemWebApi.Application/Business/Fonts/Services/FontsService.cs rename to EOM.TSHotelManager.Application/Business/Fonts/FontsService.cs index 26ee857..0a2c9ed 100644 --- a/HotelManagerSystemWebApi.Application/Business/Fonts/Services/FontsService.cs +++ b/EOM.TSHotelManager.Application/Business/Fonts/FontsService.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -21,32 +21,31 @@ *SOFTWARE. * */ -using Furion.DatabaseAccessor; -using Furion.DependencyInjection; -using HotelManagerSystemWebApi.Core; +using EOM.TSHotelManager.Core; +using EOM.TSHotelManager.EntityFramework; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Application { /// /// 酒店宣传联动内容接口实现类 /// - public class FontsService:IFontsService, ITransient + public class FontsService:IFontsService { /// - /// 字幕宣传 + /// 跑马灯 /// - private readonly IRepository fontsRepository; + private readonly PgRepository fontsRepository; /// /// /// /// - public FontsService(IRepository fontsRepository) + public FontsService(PgRepository fontsRepository) { this.fontsRepository = fontsRepository; } @@ -55,14 +54,11 @@ namespace HotelManagerSystemWebApi.Application /// 查询所有宣传联动内容(跑马灯) /// /// - public OSelectFonListDto SelectFonList() + public List SelectFontAll() { - OSelectFonListDto oSelectFonListDto = new OSelectFonListDto(); - - var listSource = fontsRepository.AsQueryable().ToList().CopyToModel(); - - oSelectFonListDto.listSource = listSource; - return oSelectFonListDto; + List fonts = new List(); + fonts = fontsRepository.GetList(); + return fonts; } } } diff --git a/HotelManagerSystemWebApi.Application/Business/Fonts/Services/IFontsService.cs b/EOM.TSHotelManager.Application/Business/Fonts/IFontsService.cs similarity index 89% rename from HotelManagerSystemWebApi.Application/Business/Fonts/Services/IFontsService.cs rename to EOM.TSHotelManager.Application/Business/Fonts/IFontsService.cs index 27d2f0a..9cf39bd 100644 --- a/HotelManagerSystemWebApi.Application/Business/Fonts/Services/IFontsService.cs +++ b/EOM.TSHotelManager.Application/Business/Fonts/IFontsService.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -21,10 +21,10 @@ *SOFTWARE. * */ - +using EOM.TSHotelManager.Core; using System.Collections.Generic; -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Application { /// /// 酒店宣传联动内容接口 @@ -35,6 +35,6 @@ namespace HotelManagerSystemWebApi.Application /// 查询所有宣传联动内容(跑马灯) /// /// - OSelectFonListDto SelectFonList(); + List SelectFontAll(); } } \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Reser/Services/IReserService.cs b/EOM.TSHotelManager.Application/Business/Reser/IReserService.cs similarity index 69% rename from HotelManagerSystemWebApi.Application/Business/Reser/Services/IReserService.cs rename to EOM.TSHotelManager.Application/Business/Reser/IReserService.cs index 4823a83..9152c52 100644 --- a/HotelManagerSystemWebApi.Application/Business/Reser/Services/IReserService.cs +++ b/EOM.TSHotelManager.Application/Business/Reser/IReserService.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -21,29 +21,43 @@ *SOFTWARE. * */ - +using EOM.TSHotelManager.Core; using System.Collections.Generic; -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Application { /// /// 预约信息接口 /// public interface IReserService { + /// /// 获取所有预约信息 /// - /// /// - OSelectReserAllDto SelectReserAll(SelectReserAllDto selectReserAllDto); + List SelectReserAll(); + + /// + /// 根据房间编号获取预约信息 + /// + /// + /// + Reser SelectReserInfoByRoomNo(string? no); + + /// + /// 删除预约信息 + /// + /// + /// + bool DeleteReserInfo(string? rid); /// /// 添加预约信息 /// - /// + /// /// - OInserReserInfoDto InserReserInfo(InserReserInfoDto inserReserInfoDto); + bool InserReserInfo(Reser r); } } \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Services/IRoomService.cs b/EOM.TSHotelManager.Application/Business/Reser/ReserService.cs similarity index 42% rename from HotelManagerSystemWebApi.Application/Business/Room/Services/IRoomService.cs rename to EOM.TSHotelManager.Application/Business/Reser/ReserService.cs index 2697a90..1797641 100644 --- a/HotelManagerSystemWebApi.Application/Business/Room/Services/IRoomService.cs +++ b/EOM.TSHotelManager.Application/Business/Reser/ReserService.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -21,66 +21,87 @@ *SOFTWARE. * */ - -using HotelManagerSystemWebApi.Application; -using HotelManagerSystemWebApi.Core; +using EncryptTools.Core; +using EOM.TSHotelManager.Common; +using EOM.TSHotelManager.Core; +using EOM.TSHotelManager.EntityFramework; +using System; using System.Collections.Generic; -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Application { /// - /// 房间信息接口 + /// 预约信息接口实现类 /// - public interface IRoomService + public class ReserService:IReserService { /// - /// 获取所有房间信息 + /// 预约信息 /// - /// - /// - OSelectRoomListDto SelectRoomList(SelectRoomListDto roomListDto); + private readonly PgRepository reserRepository; - /// - /// 单条房间信息 - /// - /// - /// - OSelectRoomDto SelectRoom(SelectRoomDto roomDto); + Encrypt encrypt = new Encrypt(); /// - /// 根据房间编号退房(退房) + /// 获取所有预约信息 /// - /// /// - OUpdCheckoutRoomDto UpdCheckoutRoom(UpdCheckoutRoomDto updCheckoutRoomDto); + public List SelectReserAll() + { + List rss = new List(); + rss = reserRepository.GetList(a => a.delete_mk == 0); + rss.ForEach(source => + { + //解密联系方式 + var sourceTelStr = source.CustoTel.Contains("·") ? encrypt.Decryption(source.CustoTel) : source.CustoTel; + source.CustoTel = sourceTelStr; + }); + return rss; + } /// - /// 根据房间编号退房(入住) + /// 根据房间编号获取预约信息 /// - /// + /// /// - OUpdCheckInRoomDto UpdCheckInRoom(UpdCheckInRoomDto updCheckInRoomDto); + public Reser SelectReserInfoByRoomNo(string? no) + { + Reser res = null; + res = reserRepository.GetSingle(a => a.ReserRoom == no && a.delete_mk != 1); + //解密联系方式 + var sourceTelStr = res.CustoTel.Contains("·") ? encrypt.Decryption(res.CustoTel) : res.CustoTel; + res.CustoTel = sourceTelStr; + return res; + } /// - /// 根据房间编号退房(预约) + /// 删除预约信息 /// - /// + /// /// - OUpdReserRoomDto UpdReserRoom(UpdReserRoomDto reserRoomDto); + public bool DeleteReserInfo(string? rid) + { + return reserRepository.Update(a => new Reser() + { + delete_mk = 1, + datachg_usr = LoginInfo.WorkerNo, + datachg_date = DateTime.Now + },a => a.ReserId == rid); - /// - /// 根据房间编号查询截止到今天住了多少天 - /// - /// - /// - ODayByRoomNoDto DayByRoomNo(DayByRoomNoDto dayByRoomNoDto); + } /// - /// 添加房间 + /// 添加预约信息 /// - /// + /// /// - OInsertRoomDto InsertRoom(InsertRoomDto insertRoomDto); + public bool InserReserInfo(Reser r) + { + var cryStr = encrypt.Encryption(r.CustoTel); + r.CustoTel = cryStr; + return reserRepository.Insert(r); + } + } -} \ No newline at end of file +} diff --git a/EOM.TSHotelManager.Application/Business/Room/IRoomService.cs b/EOM.TSHotelManager.Application/Business/Room/IRoomService.cs new file mode 100644 index 0000000..a955296 --- /dev/null +++ b/EOM.TSHotelManager.Application/Business/Room/IRoomService.cs @@ -0,0 +1,204 @@ +/* + * 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. + * + */ +using EOM.TSHotelManager.Core; +using System.Collections.Generic; + +namespace EOM.TSHotelManager.Application +{ + /// + /// 房间信息接口 + /// + public interface IRoomService + { + #region 根据房间状态获取相应状态的房间信息 + /// + /// 根据房间状态获取相应状态的房间信息 + /// + /// + /// + List SelectRoomByRoomState(int stateid); + #endregion + + #region 根据房间状态来查询可使用的房间 + /// + /// 根据房间状态来查询可使用的房间 + /// + /// + List SelectCanUseRoomAll(); + #endregion + + #region 获取所有房间信息 + /// + /// 获取所有房间信息 + /// + /// + List SelectRoomAll(); + #endregion + + #region 获取房间分区的信息 + /// + /// 获取房间分区的信息 + /// + /// + List SelectRoomByTypeName(string? TypeName); + #endregion + + #region 根据房间编号查询房间信息 + /// + /// 根据房间编号查询房间信息 + /// + /// + /// + Room SelectRoomByRoomNo(string? no); + #endregion + + #region 根据房间编号退房(退房) + /// + /// 根据房间编号退房(退房) + /// + /// + /// + bool UpdateRoomByRoomNo(string? room); + #endregion + + #region 根据房间编号查询截止到今天住了多少天 + /// + /// 根据房间编号查询截止到今天住了多少天 + /// + /// + /// + object DayByRoomNo(string? roomno); + #endregion + + #region 根据房间编号修改房间信息(入住) + /// + /// 根据房间编号修改房间信息(入住) + /// + /// + /// + bool UpdateRoomInfo(Room r); + #endregion + + #region 根据房间编号修改房间信息(预约) + /// + /// 根据房间编号修改房间信息(预约) + /// + /// + /// + bool UpdateRoomInfoWithReser(Room r); + #endregion + + #region 查询可入住房间数量 + /// + /// 查询可入住房间数量 + /// + /// + object SelectCanUseRoomAllByRoomState(); + #endregion + + #region 查询已入住房间数量 + /// + /// 查询已入住房间数量 + /// + /// + object SelectNotUseRoomAllByRoomState(); + #endregion + + #region 根据房间编号查询房间价格 + /// + /// 根据房间编号查询房间价格 + /// + /// + object SelectRoomByRoomPrice(string? r); + #endregion + + #region 查询脏房数量 + /// + /// 查询脏房数量 + /// + /// + object SelectNotClearRoomAllByRoomState(); + #endregion + + #region 查询维修房数量 + /// + /// 查询维修房数量 + /// + /// + object SelectFixingRoomAllByRoomState(); + #endregion + + #region 查询预约房数量 + /// + /// 查询预约房数量 + /// + /// + object SelectReseredRoomAllByRoomState(); + #endregion + + #region 根据房间编号更改房间状态 + /// + /// 根据房间编号更改房间状态 + /// + /// + /// + /// + bool UpdateRoomStateByRoomNo(string? roomno, int stateid); + #endregion + + #region 添加房间 + /// + /// 添加房间 + /// + /// + /// + bool InsertRoom(Room rn); + #endregion + + #region 查询所有可消费(已住)房间 + /// + /// 查询所有可消费(已住)房间 + /// + /// + List SelectRoomByStateAll(); + #endregion + + #region 获取所有房间状态 + /// + /// 获取所有房间状态 + /// + /// + List SelectRoomStateAll(); + #endregion + + #region 根据房间编号查询房间状态编号 + /// + /// 根据房间编号查询房间状态编号 + /// + /// + /// + object SelectRoomStateIdByRoomNo(string? roomno); + #endregion + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Services/IRoomTypeService.cs b/EOM.TSHotelManager.Application/Business/Room/IRoomTypeService.cs similarity index 75% rename from HotelManagerSystemWebApi.Application/Business/Room/Services/IRoomTypeService.cs rename to EOM.TSHotelManager.Application/Business/Room/IRoomTypeService.cs index a11b7bf..7e8cba7 100644 --- a/HotelManagerSystemWebApi.Application/Business/Room/Services/IRoomTypeService.cs +++ b/EOM.TSHotelManager.Application/Business/Room/IRoomTypeService.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -21,12 +21,10 @@ *SOFTWARE. * */ - -using HotelManagerSystemWebApi.Application; -using HotelManagerSystemWebApi.Core; +using EOM.TSHotelManager.Core; using System.Collections.Generic; -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Application { /// /// 客房信息接口 @@ -38,8 +36,16 @@ namespace HotelManagerSystemWebApi.Application /// 获取所有房间类型 /// /// - OSelectRoomTypesAllDto SelectRoomTypesAll(SelectRoomTypesAllDto selectRoomTypesAllDto); + List SelectRoomTypesAll(); #endregion + #region 根据房间编号查询房间类型名称 + /// + /// 根据房间编号查询房间类型名称 + /// + /// + /// + RoomType SelectRoomTypeByRoomNo(string? no); + #endregion } } \ No newline at end of file diff --git a/EOM.TSHotelManager.Application/Business/Room/RoomService.cs b/EOM.TSHotelManager.Application/Business/Room/RoomService.cs new file mode 100644 index 0000000..399a73b --- /dev/null +++ b/EOM.TSHotelManager.Application/Business/Room/RoomService.cs @@ -0,0 +1,424 @@ +/* + * 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. + * + */ +using CK.Common; +using EOM.TSHotelManager.Common; +using EOM.TSHotelManager.Core; +using EOM.TSHotelManager.EntityFramework; +using System; +using System.Collections.Generic; +using System.Linq; + +namespace EOM.TSHotelManager.Application +{ + /// + /// 客房信息接口实现类 + /// + public class RoomService:IRoomService + { + /// + /// 客房信息 + /// + private readonly PgRepository roomRepository; + + /// + /// 客房状态 + /// + private readonly PgRepository roomStateRepository; + + /// + /// 客房类型 + /// + private readonly PgRepository roomTypeRepository; + + /// + /// 客户信息 + /// + private readonly PgRepository custoRepository; + + /// + /// + /// + /// + /// + /// + /// + public RoomService(PgRepository roomRepository, PgRepository roomStateRepository, PgRepository roomTypeRepository, PgRepository custoRepository) + { + this.roomRepository = roomRepository; + this.roomStateRepository = roomStateRepository; + this.roomTypeRepository = roomTypeRepository; + this.custoRepository = custoRepository; + } + + #region 根据房间状态获取相应状态的房间信息 + /// + /// 根据房间状态获取相应状态的房间信息 + /// + /// + /// + public List SelectRoomByRoomState(int stateid) + { + List roomStates = new List(); + roomStates = roomStateRepository.GetList(a => a.delete_mk != 1); + List roomTypes = new List(); + roomTypes = roomTypeRepository.GetList(a => a.delete_mk != 1); + List rooms = new List(); + rooms = roomRepository.GetList(a => a.delete_mk != 1 && a.RoomStateId == stateid).OrderBy(a => a.RoomNo).ToList(); + rooms.ForEach(source => + { + var roomState = roomStates.FirstOrDefault(a => a.RoomStateId == source.RoomStateId); + source.RoomState = string.IsNullOrEmpty(roomState.RoomStateName) ? "" : roomState.RoomStateName; + var roomType = roomTypes.FirstOrDefault(a => a.Roomtype == source.RoomType); + source.RoomName = string.IsNullOrEmpty(roomType.RoomName) ? "" : roomType.RoomName; + }); + return rooms; + } + #endregion + + #region 根据房间状态来查询可使用的房间 + /// + /// 根据房间状态来查询可使用的房间 + /// + /// + public List SelectCanUseRoomAll() + { + List roomStates = new List(); + roomStates = roomStateRepository.GetList(a => a.delete_mk != 1); + List roomTypes = new List(); + roomTypes = roomTypeRepository.GetList(a => a.delete_mk != 1); + List rooms = new List(); + rooms = roomRepository.GetList(a => a.delete_mk != 1 && a.RoomStateId == 0).OrderBy(a => a.RoomNo).ToList(); + rooms.ForEach(source => + { + var roomState = roomStates.FirstOrDefault(a => a.RoomStateId == source.RoomStateId); + source.RoomState = string.IsNullOrEmpty(roomState.RoomStateName) ? "" : roomState.RoomStateName; + var roomType = roomTypes.FirstOrDefault(a => a.Roomtype == source.RoomType); + source.RoomName = string.IsNullOrEmpty(roomType.RoomName) ? "" : roomType.RoomName; + }); + return rooms; + } + #endregion + + #region 获取所有房间信息 + /// + /// 获取所有房间信息 + /// + /// + public List SelectRoomAll() + { + List roomStates = new List(); + roomStates = roomStateRepository.GetList(a => a.delete_mk != 1); + List roomTypes = new List(); + roomTypes = roomTypeRepository.GetList(a => a.delete_mk != 1); + List rooms = new List(); + rooms = roomRepository.GetList(a => a.delete_mk != 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.ForEach(source => + { + var roomState = roomStates.FirstOrDefault(a => a.RoomStateId == source.RoomStateId); + source.RoomState = string.IsNullOrEmpty(roomState.RoomStateName) ? "" : roomState.RoomStateName; + var roomType = roomTypes.FirstOrDefault(a => a.Roomtype == source.RoomType); + source.RoomName = string.IsNullOrEmpty(roomType.RoomName) ? "" : roomType.RoomName; + + var custo = custos.FirstOrDefault(a => a.CustoNo.Equals(source.CustoNo)); + source.CustoName = custo.IsNullOrEmpty() ? "" : custo.CustoName; + + //把入住时间格式化 + source.CheckTimeFormat = string.IsNullOrEmpty(source.CheckTime + "") ? "" + : Convert.ToDateTime(source.CheckTime).ToString("yyyy-MM-dd HH:mm"); + + }); + return rooms; + } + #endregion + + #region 获取房间分区的信息 + /// + /// 获取房间分区的信息 + /// + /// + public List SelectRoomByTypeName(string? TypeName) + { + List roomStates = new List(); + roomStates = roomStateRepository.GetList(a => a.delete_mk != 1); + List roomTypes = new List(); + roomTypes = roomTypeRepository.GetList(a => a.delete_mk != 1 && a.RoomName == TypeName); + var listTypes = roomTypes.Select(a => a.Roomtype).Distinct().ToList(); + List rooms = new List(); + rooms = roomRepository.GetList(a => a.delete_mk != 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.ForEach(source => + { + var roomState = roomStates.FirstOrDefault(a => a.RoomStateId == source.RoomStateId); + source.RoomState = string.IsNullOrEmpty(roomState.RoomStateName) ? "" : roomState.RoomStateName; + var roomType = roomTypes.FirstOrDefault(a => a.Roomtype == source.RoomType); + source.RoomName = string.IsNullOrEmpty(roomType.RoomName) ? "" : roomType.RoomName; + + var custo = custos.FirstOrDefault(a => a.CustoNo.Equals(source.CustoNo)); + source.CustoName = custo.IsNullOrEmpty() ? "" : custo.CustoName; + + }); + return rooms; + } + #endregion + + #region 根据房间编号查询房间信息 + /// + /// 根据房间编号查询房间信息 + /// + /// + /// + public Room SelectRoomByRoomNo(string? no) + { + List roomStates = new List(); + roomStates = roomStateRepository.GetList(a => a.delete_mk != 1); + Room room = new Room(); + room = roomRepository.GetSingle(a => a.delete_mk != 1 && a.RoomNo == no); + var roomSate = roomStates.FirstOrDefault(a => a.RoomStateId == room.RoomStateId); + room.RoomState = string.IsNullOrEmpty(roomSate.RoomStateName) ? "" : roomSate.RoomStateName; + return room; + } + #endregion + + #region 根据房间编号退房(退房) + /// + /// 根据房间编号退房(退房) + /// + /// + /// + public bool UpdateRoomByRoomNo(string? room) + { + return roomRepository.Update(a => new Room() + { + CustoNo = null, + CheckTime = null, + CheckOutTime = DateTime.Now, + RoomStateId = 3 + },a => a.RoomNo == room); + } + #endregion + + #region 根据房间编号查询截止到今天住了多少天 + /// + /// 根据房间编号查询截止到今天住了多少天 + /// + /// + /// + public object DayByRoomNo(string? roomno) + { + return Math.Abs(((TimeSpan)(roomRepository.GetSingle(a => a.RoomNo == roomno).CheckTime - DateTime.Now)).Days); + } + #endregion + + #region 根据房间编号修改房间信息(入住) + /// + /// 根据房间编号修改房间信息(入住) + /// + /// + /// + public bool UpdateRoomInfo(Room r) + { + return roomRepository.Update(a => new Room() + { + CheckTime = r.CheckTime, + RoomStateId = r.RoomStateId, + CustoNo = r.CustoNo + },a => a.RoomNo == r.RoomNo); + } + #endregion + + #region 根据房间编号修改房间信息(预约) + /// + /// 根据房间编号修改房间信息(预约) + /// + /// + /// + public bool UpdateRoomInfoWithReser(Room r) + { + return roomRepository.Update(a => new Room() + { + RoomStateId = r.RoomStateId, + datachg_usr = LoginInfo.WorkerNo, + datachg_date = DateTime.Now + }, a => a.RoomNo == r.RoomNo); + } + #endregion + + #region 查询可入住房间数量 + /// + /// 查询可入住房间数量 + /// + /// + public object SelectCanUseRoomAllByRoomState() + { + return roomRepository.GetList(a => a.RoomStateId == 0 && a.delete_mk != 1).OrderBy(a => a.RoomNo).Count(); + } + #endregion + + #region 查询已入住房间数量 + /// + /// 查询已入住房间数量 + /// + /// + public object SelectNotUseRoomAllByRoomState() + { + return roomRepository.GetList(a => a.RoomStateId == 1 && a.delete_mk != 1).OrderBy(a => a.RoomNo).Count(); + } + #endregion + + #region 根据房间编号查询房间价格 + /// + /// 根据房间编号查询房间价格 + /// + /// + public object SelectRoomByRoomPrice(string? r) + { + return roomRepository.GetSingle(a => a.RoomNo == r).RoomMoney; + } + #endregion + + #region 查询脏房数量 + /// + /// 查询脏房数量 + /// + /// + public object SelectNotClearRoomAllByRoomState() + { + return roomRepository.GetList(a => a.RoomStateId == 3 && a.delete_mk != 1).OrderBy(a => a.RoomNo).Count(); + } + #endregion + + #region 查询维修房数量 + /// + /// 查询维修房数量 + /// + /// + public object SelectFixingRoomAllByRoomState() + { + return roomRepository.GetList(a => a.RoomStateId == 2 && a.delete_mk != 1).OrderBy(a => a.RoomNo).Count(); + } + #endregion + + #region 查询预约房数量 + /// + /// 查询预约房数量 + /// + /// + public object SelectReseredRoomAllByRoomState() + { + return roomRepository.GetList(a => a.RoomStateId == 4 && a.delete_mk != 1).OrderBy(a => a.RoomNo).Count(); + } + #endregion + + #region 根据房间编号更改房间状态 + /// + /// 根据房间编号更改房间状态 + /// + /// + /// + /// + public bool UpdateRoomStateByRoomNo(string? roomno, int stateid) + { + return roomRepository.Update(a => new Room() + { + RoomStateId = stateid, + datains_usr = LoginInfo.WorkerNo, + datachg_date = DateTime.Now + },a => a.RoomNo == roomno); + } + #endregion + + #region 添加房间 + /// + /// 添加房间 + /// + /// + /// + public bool InsertRoom(Room rn) + { + try + { + return roomRepository.Insert(rn); + } + catch (Exception) + { + return false; + } + } + #endregion + + #region 查询所有可消费(已住)房间 + /// + /// 查询所有可消费(已住)房间 + /// + /// + public List SelectRoomByStateAll() + { + List roomStates = new List(); + roomStates = roomStateRepository.GetList(a => a.delete_mk != 1); + List roomTypes = new List(); + roomTypes = roomTypeRepository.GetList(a => a.delete_mk != 1); + List rooms = new List(); + rooms = roomRepository.GetList(a => a.delete_mk != 1 && a.RoomStateId == 1).OrderBy(a => a.RoomNo).ToList(); + rooms.ForEach(source => + { + var roomState = roomStates.FirstOrDefault(a => a.RoomStateId == source.RoomStateId); + source.RoomState = string.IsNullOrEmpty(roomState.RoomStateName) ? "" : roomState.RoomStateName; + var roomType = roomTypes.FirstOrDefault(a => a.Roomtype == source.RoomType); + source.RoomName = string.IsNullOrEmpty(roomType.RoomName) ? "" : roomType.RoomName; + }); + return rooms; + } + #endregion + + #region 获取所有房间状态 + /// + /// 获取所有房间状态 + /// + /// + public List SelectRoomStateAll() + { + List rs = new List(); + rs = roomStateRepository.GetList(a => a.delete_mk != 1); + return rs; + } + #endregion + + #region 根据房间编号查询房间状态编号 + /// + /// 根据房间编号查询房间状态编号 + /// + /// + /// + public object SelectRoomStateIdByRoomNo(string? roomno) + { + return roomRepository.GetSingle(a => a.RoomNo == roomno).RoomStateId; + } + #endregion + } +} diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Services/RoomTypeService.cs b/EOM.TSHotelManager.Application/Business/Room/RoomTypeService.cs similarity index 49% rename from HotelManagerSystemWebApi.Application/Business/Room/Services/RoomTypeService.cs rename to EOM.TSHotelManager.Application/Business/Room/RoomTypeService.cs index 29862e2..3f52efd 100644 --- a/HotelManagerSystemWebApi.Application/Business/Room/Services/RoomTypeService.cs +++ b/EOM.TSHotelManager.Application/Business/Room/RoomTypeService.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -21,60 +21,66 @@ *SOFTWARE. * */ -using HotelManagerSystemWebApi.Application; +using EOM.TSHotelManager.Core; +using EOM.TSHotelManager.EntityFramework; +using System.Collections.Generic; -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Application { /// /// 房间类型接口实现类 /// - public class RoomTypeService:IRoomTypeService,ITransient + public class RoomTypeService:IRoomTypeService { /// - /// 房间类型 + /// 客房类型 /// - private readonly IRepository roomTypeRepository; + private readonly PgRepository roomTypeRepository; + + /// + /// 客房信息 + /// + private readonly PgRepository roomRepository; /// /// /// /// - public RoomTypeService(IRepository roomTypeRepository) + /// + public RoomTypeService(PgRepository roomTypeRepository, PgRepository roomRepository) { this.roomTypeRepository = roomTypeRepository; + this.roomRepository = roomRepository; } + #region 获取所有房间类型 /// /// 获取所有房间类型 /// /// - public OSelectRoomTypesAllDto SelectRoomTypesAll(SelectRoomTypesAllDto selectRoomTypesAllDto) + public List SelectRoomTypesAll() { - OSelectRoomTypesAllDto oSelectRoomTypesAllDto = new OSelectRoomTypesAllDto(); - - var where = LinqExpression.Create(a => a.delete_mk != 1); - - //类型名称 - if (!selectRoomTypesAllDto.RoomName.IsNullOrEmpty()) - { - where = where.And(a => a.RoomName.Contains(selectRoomTypesAllDto.RoomName)); - } - - //删除标记 - if (!selectRoomTypesAllDto.delete_mk.IsNullOrEmpty()) - { - where = where.And(a => a.delete_mk == selectRoomTypesAllDto.delete_mk); - } - - //查询出所有房间类型 - var listSource = roomTypeRepository.AsQueryable(where).ToList() - .CopyToModel(); - - oSelectRoomTypesAllDto.listSource = listSource; - oSelectRoomTypesAllDto.OK(); + List types = new List(); + types = roomTypeRepository.GetList(a => a.delete_mk != 1); + return types; + } + #endregion - return oSelectRoomTypesAllDto; + #region 根据房间编号查询房间类型名称 + /// + /// 根据房间编号查询房间类型名称 + /// + /// + /// + public RoomType SelectRoomTypeByRoomNo(string? no) + { + RoomType roomtype = new RoomType(); + Room room = new Room(); + room = roomRepository.GetSingle(a => a.RoomNo == no && a.delete_mk != 1); + roomtype.RoomName = roomTypeRepository.GetSingle(a => a.Roomtype == room.RoomStateId).RoomName; + return roomtype; } + #endregion } } diff --git a/HotelManagerSystemWebApi.Application/Business/Sellthing/Services/ISellService.cs b/EOM.TSHotelManager.Application/Business/Sellthing/ISellService.cs similarity index 86% rename from HotelManagerSystemWebApi.Application/Business/Sellthing/Services/ISellService.cs rename to EOM.TSHotelManager.Application/Business/Sellthing/ISellService.cs index 8cb03a6..4bc21c9 100644 --- a/HotelManagerSystemWebApi.Application/Business/Sellthing/Services/ISellService.cs +++ b/EOM.TSHotelManager.Application/Business/Sellthing/ISellService.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -21,11 +21,11 @@ *SOFTWARE. * */ - +using EOM.TSHotelManager.Core; using System; using System.Collections.Generic; -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Application { /// /// 商品接口 @@ -44,7 +44,7 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - bool UpdateSellThing(string stock, string sellNo); + bool UpdateSellThing(string? stock, string? sellNo); /// /// 修改商品信息 @@ -60,14 +60,14 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - bool DeleteSellThing(string roomNo, string custoNo, string sellName); + bool DeleteSellThing(string? roomNo, string? custoNo, string? sellName); /// /// 根据商品编号删除商品信息 /// /// /// - bool DeleteSellThingBySellNo(string sellNo); + bool DeleteSellThingBySellNo(string? sellNo); /// /// 根据商品名称和价格查询商品编号 @@ -75,7 +75,7 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - SellThing SelectSellThingByNameAndPrice(string name, string price); + SellThing SelectSellThingByNameAndPrice(string? name, string? price); /// @@ -83,7 +83,7 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - SellThing SelectSellInfoBySellNo(string SellNo); + SellThing SelectSellInfoBySellNo(string? SellNo); #region 添加商品 /// diff --git a/HotelManagerSystemWebApi.Application/Business/Sellthing/Services/SellService.cs b/EOM.TSHotelManager.Application/Business/Sellthing/SellService.cs similarity index 72% rename from HotelManagerSystemWebApi.Application/Business/Sellthing/Services/SellService.cs rename to EOM.TSHotelManager.Application/Business/Sellthing/SellService.cs index fb00e0f..dd6664c 100644 --- a/HotelManagerSystemWebApi.Application/Business/Sellthing/Services/SellService.cs +++ b/EOM.TSHotelManager.Application/Business/Sellthing/SellService.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -23,19 +23,40 @@ */ using System; using System.Collections.Generic; -using jvncorelib_fr.Entitylib; -using MySql.Data.MySqlClient; +using CK.Common; +using EOM.TSHotelManager.Common; +using EOM.TSHotelManager.Core; +using EOM.TSHotelManager.EntityFramework; using SqlSugar; - - -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Application { /// /// 商品信息接口实现类 /// - public class SellService:Repository,ISellService + public class SellService:ISellService { + /// + /// 商品信息 + /// + private readonly PgRepository sellThingRepository; + + /// + /// 消费情况 + /// + private readonly PgRepository spendRepository; + + /// + /// + /// + /// + /// + public SellService(PgRepository sellThingRepository, PgRepository spendRepository) + { + this.sellThingRepository = sellThingRepository; + this.spendRepository = spendRepository; + } + /// /// 查询所有商品 /// @@ -46,7 +67,7 @@ namespace HotelManagerSystemWebApi.Application var exp = Expressionable.Create().And(a => a.delete_mk == 0); if (sellThing.IsNullOrEmpty()) { - sellThings = base.GetList(exp.ToExpression()); + sellThings = sellThingRepository.GetList(exp.ToExpression()); sellThings.ForEach(_sellThing => { _sellThing.SellPriceStr = Decimal.Parse(_sellThing.SellPrice.ToString()).ToString("#,##0.00").ToString(); @@ -64,7 +85,7 @@ namespace HotelManagerSystemWebApi.Application { exp = exp.Or(a => a.SellName.Contains(sellThing.SellName)); } - sellThings = base.GetList(exp.ToExpression()); + sellThings = sellThingRepository.GetList(exp.ToExpression()); sellThings.ForEach(_sellThing => { _sellThing.SellPriceStr = Decimal.Parse(_sellThing.SellPrice.ToString()).ToString("#,##0.00").ToString(); @@ -79,9 +100,9 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - public bool UpdateSellThing(string stock, string sellNo) + public bool UpdateSellThing(string? stock, string? sellNo) { - return base.Update(a => new SellThing() + return sellThingRepository.Update(a => new SellThing() { Stock = Convert.ToInt32(stock), datachg_usr = LoginInfo.WorkerNo, @@ -96,7 +117,7 @@ namespace HotelManagerSystemWebApi.Application /// public bool UpdateSellthingInfo(SellThing sellThing) { - return base.Update(a => new SellThing() + return sellThingRepository.Update(a => new SellThing() { SellName = sellThing.SellName, SellPrice = sellThing.SellPrice, @@ -112,9 +133,9 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - public bool DeleteSellThing(string roomNo, string custoNo, string sellName) + public bool DeleteSellThing(string? roomNo, string? custoNo, string? sellName) { - return base.Change().Update(a => new Spend() + return spendRepository.Update(a => new Spend() { delete_mk = 1, datachg_usr = LoginInfo.WorkerNo, @@ -129,9 +150,9 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - public bool DeleteSellThingBySellNo(string sellNo) + public bool DeleteSellThingBySellNo(string? sellNo) { - return base.Update(a => new SellThing() + return sellThingRepository.Update(a => new SellThing() { delete_mk = 1, datachg_usr = AdminInfo.Account, @@ -145,10 +166,10 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - public SellThing SelectSellThingByNameAndPrice(string name,string price) + public SellThing SelectSellThingByNameAndPrice(string? name,string? price) { SellThing sellThing = null; - sellThing = base.GetSingle(a => a.SellName == name && a.SellPrice == Convert.ToDecimal(price)); + sellThing = sellThingRepository.GetSingle(a => a.SellName == name && a.SellPrice == Convert.ToDecimal(price)); return sellThing; } @@ -158,10 +179,10 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - public SellThing SelectSellInfoBySellNo(string SellNo) + public SellThing SelectSellInfoBySellNo(string? SellNo) { SellThing st = null; - st = base.GetSingle(a => a.SellNo == SellNo && a.delete_mk != 1); + st = sellThingRepository.GetSingle(a => a.SellNo == SellNo && a.delete_mk != 1); return st; } @@ -173,7 +194,7 @@ namespace HotelManagerSystemWebApi.Application /// public bool InsertSellThing(SellThing st) { - return base.Insert(st); + return sellThingRepository.Insert(st); } #endregion } diff --git a/HotelManagerSystemWebApi.Application/Business/Spend/Services/ISpendService.cs b/EOM.TSHotelManager.Application/Business/Spend/ISpendService.cs similarity index 86% rename from HotelManagerSystemWebApi.Application/Business/Spend/Services/ISpendService.cs rename to EOM.TSHotelManager.Application/Business/Spend/ISpendService.cs index 607c264..4bd0852 100644 --- a/HotelManagerSystemWebApi.Application/Business/Spend/Services/ISpendService.cs +++ b/EOM.TSHotelManager.Application/Business/Spend/ISpendService.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -21,10 +21,10 @@ *SOFTWARE. * */ - +using EOM.TSHotelManager.Core; using System.Collections.Generic; -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Application { /// /// 消费信息接口 @@ -46,7 +46,7 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - List SelectSpendByCustoNo(string No); + List SelectSpendByCustoNo(string? No); #endregion #region 根据房间编号查询消费信息 @@ -55,7 +55,7 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - List SelectSpendByRoomNo(string No); + List SelectSpendByRoomNo(string? No); #endregion #region 根据客户编号查询历史消费信息 @@ -64,7 +64,7 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - List SeletHistorySpendInfoAll(string custoNo); + List SeletHistorySpendInfoAll(string? custoNo); #endregion #region 查询消费的所有信息 @@ -80,7 +80,7 @@ namespace HotelManagerSystemWebApi.Application /// 根据房间号查询消费的所有信息 /// /// - List SelectSpendInfoRoomNo(string RoomNo); + List SelectSpendInfoRoomNo(string? RoomNo); #endregion #region 根据房间编号、入住时间到当前时间查询消费总金额 @@ -90,7 +90,7 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - object SelectMoneyByRoomNoAndTime(string roomno, string custono); + object SelectMoneyByRoomNoAndTime(string? roomno, string? custono); #endregion #region 根据房间编号、入住时间和当前时间修改结算状态 @@ -100,7 +100,7 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - bool UpdateMoneyState(string roomno, string checktime); + bool UpdateMoneyState(string? roomno, string? checktime); #endregion #region 将转房前的未结算记录一同转移到新房间 @@ -111,7 +111,7 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - bool UpdateSpendInfoByRoomNo(List spends, string newRoom, string custoNo); + bool UpdateSpendInfoByRoomNo(List spends, string? newRoom, string? custoNo); #endregion /// diff --git a/HotelManagerSystemWebApi.Application/Business/Spend/Services/SpendService.cs b/EOM.TSHotelManager.Application/Business/Spend/SpendService.cs similarity index 80% rename from HotelManagerSystemWebApi.Application/Business/Spend/Services/SpendService.cs rename to EOM.TSHotelManager.Application/Business/Spend/SpendService.cs index ddc5c4e..e47e665 100644 --- a/HotelManagerSystemWebApi.Application/Business/Spend/Services/SpendService.cs +++ b/EOM.TSHotelManager.Application/Business/Spend/SpendService.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -24,17 +24,31 @@ using System; using System.Collections.Generic; using System.Linq; -using MySql.Data.MySqlClient; +using EOM.TSHotelManager.Common; +using EOM.TSHotelManager.Core; +using EOM.TSHotelManager.EntityFramework; - - -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Application { /// /// 商品消费接口实现类 /// - public class SpendService:Repository, ISpendService + public class SpendService:ISpendService { + /// + /// 商品消费 + /// + private readonly PgRepository spendRepository; + + /// + /// + /// + /// + public SpendService(PgRepository spendRepository) + { + this.spendRepository = spendRepository; + } + #region 添加消费信息 /// /// 添加消费信息 @@ -43,7 +57,7 @@ namespace HotelManagerSystemWebApi.Application /// public bool InsertSpendInfo(Spend s) { - return base.Insert(s); + return spendRepository.Insert(s); } #endregion @@ -53,10 +67,10 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - public List SelectSpendByCustoNo(string No) + public List SelectSpendByCustoNo(string? No) { List ls = new List(); - ls = base.GetList(a => a.CustoNo == No && a.MoneyState.Equals(SpendConsts.UnSettle) && a.delete_mk != 1); + ls = spendRepository.GetList(a => a.CustoNo == No && a.MoneyState.Equals(SpendConsts.UnSettle) && a.delete_mk != 1); ls.ForEach(source => { source.SpendStateNm = string.IsNullOrEmpty(source.MoneyState) ? "" @@ -78,10 +92,10 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - public List SeletHistorySpendInfoAll(string custoNo) + public List SeletHistorySpendInfoAll(string? custoNo) { List ls = new List(); - ls = base.GetList(a => a.CustoNo == custoNo && a.MoneyState.Equals(SpendConsts.Settled) && a.delete_mk != 1); + ls = spendRepository.GetList(a => a.CustoNo == custoNo && a.MoneyState.Equals(SpendConsts.Settled) && a.delete_mk != 1); ls.ForEach(source => { source.SpendStateNm = string.IsNullOrEmpty(source.MoneyState) ? "" @@ -103,10 +117,10 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - public List SelectSpendByRoomNo(string No) + public List SelectSpendByRoomNo(string? No) { List ls = new List(); - ls = base.GetList(a => a.RoomNo == No && a.MoneyState.Equals(SpendConsts.UnSettle) && a.delete_mk != 1); + ls = spendRepository.GetList(a => a.RoomNo == No && a.MoneyState.Equals(SpendConsts.UnSettle) && a.delete_mk != 1); ls.ForEach(source => { source.SpendStateNm = string.IsNullOrEmpty(source.MoneyState) ? "" @@ -130,7 +144,7 @@ namespace HotelManagerSystemWebApi.Application public List SelectSpendInfoAll() { List ls = new List(); - ls = base.GetList(a => a.delete_mk != 1).OrderByDescending(a => a.SpendTime).ToList(); + ls = spendRepository.GetList(a => a.delete_mk != 1).OrderByDescending(a => a.SpendTime).ToList(); ls.ForEach(source => { source.SpendStateNm = string.IsNullOrEmpty(source.MoneyState) ? "" @@ -146,17 +160,15 @@ namespace HotelManagerSystemWebApi.Application } #endregion - - #region 根据房间号查询消费的所有信息 /// /// 根据房间号查询消费的所有信息 /// /// - public List SelectSpendInfoRoomNo(string RoomNo) + public List SelectSpendInfoRoomNo(string? RoomNo) { List ls = new List(); - ls = base.GetList(a => a.RoomNo == RoomNo && a.delete_mk != 1 && a.MoneyState.Equals(SpendConsts.UnSettle)); + ls = spendRepository.GetList(a => a.RoomNo == RoomNo && a.delete_mk != 1 && a.MoneyState.Equals(SpendConsts.UnSettle)); ls.ForEach(source => { source.SpendStateNm = string.IsNullOrEmpty(source.MoneyState) ? "" @@ -179,9 +191,9 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - public object SelectMoneyByRoomNoAndTime(string roomno,string custono) + public object SelectMoneyByRoomNoAndTime(string? roomno,string? custono) { - return base.GetList(a => a.RoomNo == roomno && a.CustoNo == custono && a.MoneyState.Equals(SpendConsts.UnSettle)).Sum(a => a.SpendMoney); + return spendRepository.GetList(a => a.RoomNo == roomno && a.CustoNo == custono && a.MoneyState.Equals(SpendConsts.UnSettle)).Sum(a => a.SpendMoney); } #endregion @@ -192,9 +204,9 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - public bool UpdateMoneyState(string roomno, string checktime) + public bool UpdateMoneyState(string? roomno, string? checktime) { - return base.Update(a => new Spend() + return spendRepository.Update(a => new Spend() { MoneyState = SpendConsts.Settled, datachg_usr = LoginInfo.WorkerNo, @@ -211,11 +223,11 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - public bool UpdateSpendInfoByRoomNo(List spends, string newRoom, string custoNo) + public bool UpdateSpendInfoByRoomNo(List spends, string? newRoom, string? custoNo) { var listSpendId = spends.Select(a => a.SpendName).Distinct().ToList(); - return base.Update(a => new Spend() + return spendRepository.Update(a => new Spend() { RoomNo = newRoom, datachg_usr = LoginInfo.WorkerNo, @@ -234,7 +246,7 @@ namespace HotelManagerSystemWebApi.Application /// public bool UpdSpenInfo(Spend spend) { - return base.Update(a => new Spend() + return spendRepository.Update(a => new Spend() { SpendAmount = spend.SpendAmount, SpendMoney = spend.SpendMoney, diff --git a/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/UpdCustomerInfoDto.cs b/EOM.TSHotelManager.Application/Business/Wti/IWtiService.cs similarity index 36% rename from HotelManagerSystemWebApi.Application/Business/Customer/Dtos/UpdCustomerInfoDto.cs rename to EOM.TSHotelManager.Application/Business/Wti/IWtiService.cs index bb8c5cb..c1bdcc9 100644 --- a/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/UpdCustomerInfoDto.cs +++ b/EOM.TSHotelManager.Application/Business/Wti/IWtiService.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -21,76 +21,97 @@ *SOFTWARE. * */ +using EOM.TSHotelManager.Core; +using System.Collections.Generic; -using HotelManagerSystemWebApi.Core; -using System; -using System.ComponentModel.DataAnnotations; - -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Application { /// - /// 更新客户信息 - /// 输入DTO + /// 水电信息接口 /// - public class UpdCustomerInfoDto : IBaseDto + public interface IWtiService { + #region 根据房间编号查询水电费信息 /// - /// 客户编号 - /// - [Required] - public string CustoNo { get; set; } - /// - /// 客户名称 - /// - [Required] - public string CustoName { get; set; } - /// - /// 客户性别 - /// - [Required] - public int CustoSex { get; set; } - /// - /// 客户电话 - /// - [Required] - public string CustoTel { get; set; } - /// - /// 证件类型 + /// 根据房间编号查询水电费信息 /// - [Required] - public int PassportType { get; set; } + /// + /// + Wti SelectWtiInfoByRoomNo(string? roomNo); + #endregion + + #region 根据房间编号、使用时间查询水电费信息 /// - /// 证件号码 + /// 根据房间编号、使用时间查询水电费信息 /// - [Required] - public string CustoID { get; set; } + /// + /// + /// + /// + Wti SelectWtiInfoByRoomNoAndTime(string? roomno, string? usedate, string? enddate); + #endregion + + #region 获取所有水电费信息 /// - /// 居住地址 + /// 获取所有水电费信息 /// - public string CustoAdress { get; set; } + /// + List SelectWtiInfoAll(); + #endregion + + #region 添加水电费信息 /// - /// 出生日期 + /// 添加水电费信息 /// - public DateTime CustoBirth { get; set; } + /// + /// + bool InsertWtiInfo(Wti w); + #endregion + + #region 修改水电费信息(根据房间编号) /// - /// 客户类型 + /// 修改水电费信息(根据房间编号) /// - public int CustoType { get; set; } + /// + /// + bool UpdateWtiInfo(Wti w); + #endregion + + #region 根据房间信息、使用时间修改水电费 /// - /// 客户类型 + /// 根据房间信息、使用时间修改水电费 /// - public string typeName { get; set; } + /// + /// + bool UpdateWtiInfoByRoomNoAndDateTime(Wti w); + #endregion + + #region 删除水电费信息:根据房间编号 /// - /// 证件类型 + /// 删除水电费信息:根据房间编号 /// - public string PassportName { get; set; } + /// + /// + //bool DeleteWtiInfo(string? roomno); + #endregion + + #region 根据房间编号、使用时间删除水电费信息 /// - /// 性别 + /// 根据房间编号、使用时间删除水电费信息 /// - public string SexName { get; set; } + /// + /// + /// + /// + bool DeleteWtiInfoByRoomNoAndDateTime(string? roomno, string? usedate, string? enddate); + #endregion + + #region 根据房间编号获取该房间所有水电费信息 /// - /// 删除标记 + /// 获取所有水电费信息 /// - public int delete_mk { get; set; } + /// + List ListWtiInfoByRoomNo(string? roomno); + #endregion } } \ No newline at end of file diff --git a/EOM.TSHotelManager.Application/Business/Wti/WtiService.cs b/EOM.TSHotelManager.Application/Business/Wti/WtiService.cs new file mode 100644 index 0000000..83b7681 --- /dev/null +++ b/EOM.TSHotelManager.Application/Business/Wti/WtiService.cs @@ -0,0 +1,199 @@ +/* + * 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. + * + */ +using System; +using System.Collections.Generic; +using EOM.TSHotelManager.Common; +using EOM.TSHotelManager.Core; +using EOM.TSHotelManager.EntityFramework; + +namespace EOM.TSHotelManager.Application +{ + /// + /// 水电信息接口实现类 + /// + public class WtiService:IWtiService + { + /// + /// 水电信息 + /// + private readonly PgRepository wtiRepository; + + /// + /// + /// + /// + public WtiService(PgRepository wtiRepository) + { + this.wtiRepository = wtiRepository; + } + + #region 根据房间编号查询水电费信息 + /// + /// 根据房间编号查询水电费信息 + /// + /// + /// + public Wti SelectWtiInfoByRoomNo(string? roomNo) + { + Wti w = new Wti(); + w = wtiRepository.GetSingle(a => a.RoomNo.Contains(roomNo) && a.delete_mk != 1); + return w; + } + #endregion + + #region 根据房间编号、使用时间查询水电费信息 + /// + /// 根据房间编号、使用时间查询水电费信息 + /// + /// + /// + /// + /// + public Wti SelectWtiInfoByRoomNoAndTime(string? roomno, string? usedate, string? enddate) + { + Wti w = null; + w = wtiRepository.GetSingle(a => a.RoomNo == roomno && a.UseDate >= Convert.ToDateTime(usedate) && a.EndDate >= Convert.ToDateTime(enddate)); + return w; + } + #endregion + + #region 获取所有水电费信息 + /// + /// 获取所有水电费信息 + /// + /// + public List SelectWtiInfoAll() + { + List wti = new List(); + wti = wtiRepository.GetList(a => a.delete_mk != 1); + return wti; + } + #endregion + + #region 根据房间编号获取该房间所有水电费信息 + /// + /// 获取所有水电费信息 + /// + /// + public List ListWtiInfoByRoomNo(string? roomno) + { + List wti = new List(); + wti = wtiRepository.GetList(a => a.delete_mk != 1 && a.RoomNo.Equals(roomno)); + return wti; + } + #endregion + + #region 添加水电费信息 + /// + /// 添加水电费信息 + /// + /// + /// + public bool InsertWtiInfo(Wti w) + { + return wtiRepository.Insert(w); + } + #endregion + + #region 修改水电费信息(根据房间编号) + /// + /// 修改水电费信息(根据房间编号) + /// + /// + /// + public bool UpdateWtiInfo(Wti w) + { + return wtiRepository.Update(a => new Wti() + { + UseDate = w.UseDate, + EndDate = w.EndDate, + WaterUse = w.WaterUse, + PowerUse = w.PowerUse, + Record = w.Record, + CustoNo = w.CustoNo, + datachg_usr = w.datachg_usr, + datachg_date = w.datachg_date, + RoomNo = w.RoomNo + },a => a.WtiNo == w.WtiNo); + + } + #endregion + + #region 根据房间信息、使用时间修改水电费 + /// + /// 根据房间信息、使用时间修改水电费 + /// + /// + /// + public bool UpdateWtiInfoByRoomNoAndDateTime(Wti w) + { + return wtiRepository.Update(a => new Wti() + { + WaterUse = w.WaterUse, + PowerUse = w.PowerUse, + datachg_usr = LoginInfo.WorkerNo, + datachg_date = DateTime.Now, + },a => a.RoomNo == w.RoomNo && a.UseDate >= w.UseDate && a.EndDate >= w.EndDate); + } + #endregion + + #region 删除水电费信息:根据房间编号 + /// + /// 删除水电费信息:根据房间编号 + /// + /// + /// + //public bool DeleteWtiInfo(string? roomno) + //{ + // return base.Update(a => new Wti() + // { + // delete_mk = 1, + // datachg_usr = LoginInfo.WorkerNo, + // datachg_date = DateTime.Now + // }, a => a.WtiNo == roomno); + //} + #endregion + + #region 根据房间编号、使用时间删除水电费信息 + /// + /// 根据房间编号、使用时间删除水电费信息 + /// + /// + /// + /// + /// + public bool DeleteWtiInfoByRoomNoAndDateTime(string? roomno, string? usedate, string? enddate) + { + //string? sql = "delete from WTINFO where RoomNo='{0}' and UseDate='{1}' and EndDate='{2}'"; + //sql = string?.Format(sql, roomno, usedate, enddate); + return wtiRepository.Update(a => new Wti() + { + delete_mk = 1, + datachg_usr = LoginInfo.WorkerNo, + datachg_date = DateTime.Now + },a => a.RoomNo == roomno && a.UseDate >= Convert.ToDateTime(usedate) && a.EndDate >= Convert.ToDateTime(enddate)); + } + #endregion + } +} diff --git a/EOM.TSHotelManager.Application/EOM.TSHotelManager.Application.csproj b/EOM.TSHotelManager.Application/EOM.TSHotelManager.Application.csproj new file mode 100644 index 0000000..fb379c1 --- /dev/null +++ b/EOM.TSHotelManager.Application/EOM.TSHotelManager.Application.csproj @@ -0,0 +1,34 @@ + + + + net6.0 + enable + enable + True + + + + 1701;1702;8618; + + + + 1701;1702;8618; + + + + + + + + + + + + + + + ..\Library\CK.Common.dll + + + + diff --git a/EOM.TSHotelManager.Application/Sys/NavBar/INavBarService.cs b/EOM.TSHotelManager.Application/Sys/NavBar/INavBarService.cs new file mode 100644 index 0000000..44b33f9 --- /dev/null +++ b/EOM.TSHotelManager.Application/Sys/NavBar/INavBarService.cs @@ -0,0 +1,16 @@ +using EOM.TSHotelManager.Core; + +namespace EOM.TSHotelManager.Application +{ + /// + /// 导航控件模块接口 + /// + public interface INavBarService + { + /// + /// 导航控件列表 + /// + /// + List NavBarList(); + } +} \ No newline at end of file diff --git a/EOM.TSHotelManager.Application/Sys/NavBar/NavBarService.cs b/EOM.TSHotelManager.Application/Sys/NavBar/NavBarService.cs new file mode 100644 index 0000000..d8d2cfb --- /dev/null +++ b/EOM.TSHotelManager.Application/Sys/NavBar/NavBarService.cs @@ -0,0 +1,41 @@ +using EOM.TSHotelManager.Core; +using EOM.TSHotelManager.EntityFramework; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EOM.TSHotelManager.Application +{ + /// + /// 导航控件模块 + /// + public class NavBarService:INavBarService + { + /// + /// 导航控件 + /// + private readonly PgRepository navBarRepository; + + /// + /// + /// + /// + public NavBarService(PgRepository navBarRepository) + { + this.navBarRepository = navBarRepository; + } + + /// + /// 导航控件列表 + /// + /// + public List NavBarList() + { + var navBarList = navBarRepository.GetList(a => a.delete_mk != 1); + + return navBarList; + } + } +} diff --git a/HotelManagerSystemWebApi.Application/Worker/WorkerCheck/Services/IWorkerCheckService.cs b/EOM.TSHotelManager.Application/Worker/Check/IWorkerCheckService.cs similarity index 86% rename from HotelManagerSystemWebApi.Application/Worker/WorkerCheck/Services/IWorkerCheckService.cs rename to EOM.TSHotelManager.Application/Worker/Check/IWorkerCheckService.cs index 0973dce..98fe435 100644 --- a/HotelManagerSystemWebApi.Application/Worker/WorkerCheck/Services/IWorkerCheckService.cs +++ b/EOM.TSHotelManager.Application/Worker/Check/IWorkerCheckService.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -21,10 +21,10 @@ *SOFTWARE. * */ - +using EOM.TSHotelManager.Core; using System.Collections.Generic; -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Application { /// /// 员工打卡接口 @@ -36,23 +36,21 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - List SelectCheckInfoByWorkerNo(string wid); - + List SelectCheckInfoByWorkerNo(string? wid); /// /// 查询员工签到天数 /// /// /// - object SelectWorkerCheckDaySumByWorkerNo(string wkn); - + object SelectWorkerCheckDaySumByWorkerNo(string? wkn); /// /// 查询今天员工是否已签到 /// /// /// - object SelectToDayCheckInfoByWorkerNo(string wkn); + object SelectToDayCheckInfoByWorkerNo(string? wkn); /// /// 添加员工打卡数据 diff --git a/HotelManagerSystemWebApi.Application/Worker/WorkerCheck/Services/WorkerCheckService.cs b/EOM.TSHotelManager.Application/Worker/Check/WorkerCheckService.cs similarity index 65% rename from HotelManagerSystemWebApi.Application/Worker/WorkerCheck/Services/WorkerCheckService.cs rename to EOM.TSHotelManager.Application/Worker/Check/WorkerCheckService.cs index 5e1b00c..71d980c 100644 --- a/HotelManagerSystemWebApi.Application/Worker/WorkerCheck/Services/WorkerCheckService.cs +++ b/EOM.TSHotelManager.Application/Worker/Check/WorkerCheckService.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -21,29 +21,42 @@ *SOFTWARE. * */ +using EOM.TSHotelManager.Core; +using EOM.TSHotelManager.EntityFramework; using System; using System.Collections.Generic; using System.Linq; -using MySql.Data.MySqlClient; - - -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Application { /// /// 员工打卡接口实现类 /// - public class WorkerCheckService:Repository, IWorkerCheckService + public class WorkerCheckService:IWorkerCheckService { + /// + /// 员工打卡 + /// + private readonly PgRepository workerCheckRepository; + + /// + /// + /// + /// + public WorkerCheckService(PgRepository workerCheckRepository) + { + this.workerCheckRepository = workerCheckRepository; + } + /// /// 根据员工编号查询其所有的打卡记录 /// /// /// - public List SelectCheckInfoByWorkerNo(string wid) + public List SelectCheckInfoByWorkerNo(string? wid) { List workerChecks = new List(); - workerChecks = base.GetList(a => a.WorkerNo == wid && a.delete_mk != 1); + workerChecks = workerCheckRepository.GetList(a => a.WorkerNo == wid && a.delete_mk != 1); workerChecks.ForEach(source => { source.CheckStateNm = source.CheckState == 0 ? "打卡成功" : "打卡失败"; @@ -57,9 +70,9 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - public object SelectWorkerCheckDaySumByWorkerNo(string wkn) + public object SelectWorkerCheckDaySumByWorkerNo(string? wkn) { - return base.GetList(a => a.WorkerNo == wkn && a.delete_mk != 1).Count; + return workerCheckRepository.GetList(a => a.WorkerNo == wkn && a.delete_mk != 1).Count; } @@ -68,11 +81,11 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - public object SelectToDayCheckInfoByWorkerNo(string wkn) + public object SelectToDayCheckInfoByWorkerNo(string? wkn) { - //string sql = "select Count(*) from WORKERCHECK where WorkerNo = '"+wkn+ "' and DATEDIFF(CURRENT_DATE(),workercheck.CheckTime)"; - var listCheckInfo = base.GetList(a => a.WorkerNo == wkn && a.delete_mk != 1); - var count = listCheckInfo.Where(a => a.CheckTime.ToShortDateString() == DateTime.Now.ToShortDateString()).Count() > 0 ? 1:0; + //string? sql = "select Count(*) from WORKERCHECK where WorkerNo = '"+wkn+ "' and DATEDIFF(CURRENT_DATE(),workercheck.CheckTime)"; + var listCheckInfo = workerCheckRepository.GetList(a => a.WorkerNo == wkn && a.delete_mk != 1); + var count = listCheckInfo.Where(a => a.CheckTime.ToShortDateString() == DateTime.Now.ToShortDateString()).Count() > 0 ? 1 : 0; return count; } @@ -83,7 +96,7 @@ namespace HotelManagerSystemWebApi.Application /// public bool AddCheckInfo(WorkerCheck workerCheck) { - return base.Insert(workerCheck); + return workerCheckRepository.Insert(workerCheck); } } } diff --git a/HotelManagerSystemWebApi.Application/Worker/GoodBad/Services/IWorkerGoodBadService.cs b/EOM.TSHotelManager.Application/Worker/GoodBad/IWorkerGoodBadService.cs similarity index 88% rename from HotelManagerSystemWebApi.Application/Worker/GoodBad/Services/IWorkerGoodBadService.cs rename to EOM.TSHotelManager.Application/Worker/GoodBad/IWorkerGoodBadService.cs index 80ae41f..1bfd29c 100644 --- a/HotelManagerSystemWebApi.Application/Worker/GoodBad/Services/IWorkerGoodBadService.cs +++ b/EOM.TSHotelManager.Application/Worker/GoodBad/IWorkerGoodBadService.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -21,11 +21,10 @@ *SOFTWARE. * */ - -using HotelManagerSystemWebApi.Core; +using EOM.TSHotelManager.Core; using System.Collections.Generic; -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Application { /// /// 员工奖惩信息接口 @@ -44,6 +43,6 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - List SelectAllGoodBadByWorkNo(string wn); + List SelectAllGoodBadByWorkNo(string? wn); } } \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Worker/GoodBad/Services/WorkerGoodBadService.cs b/EOM.TSHotelManager.Application/Worker/GoodBad/WorkerGoodBadService.cs similarity index 62% rename from HotelManagerSystemWebApi.Application/Worker/GoodBad/Services/WorkerGoodBadService.cs rename to EOM.TSHotelManager.Application/Worker/GoodBad/WorkerGoodBadService.cs index 9da2a2a..ad5a1b5 100644 --- a/HotelManagerSystemWebApi.Application/Worker/GoodBad/Services/WorkerGoodBadService.cs +++ b/EOM.TSHotelManager.Application/Worker/GoodBad/WorkerGoodBadService.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -21,22 +21,49 @@ *SOFTWARE. * */ +using EOM.TSHotelManager.Core; +using EOM.TSHotelManager.EntityFramework; using System; using System.Collections.Generic; -using MySql.Data.MySqlClient; using System.Linq; using System.Text; using System.Threading.Tasks; - - -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Application { /// /// 员工奖惩记录接口实现类 /// - public class WorkerGoodBadService:Repository, IWorkerGoodBadService + public class WorkerGoodBadService:IWorkerGoodBadService { + /// + /// 员工奖惩记录 + /// + private readonly PgRepository workerGoogBadRepository; + + /// + /// 管理员记录 + /// + private readonly PgRepository adminRepository; + + /// + /// 奖惩类型 + /// + private readonly PgRepository goodbadTypeRepository; + + /// + /// + /// + /// + /// + /// + public WorkerGoodBadService(PgRepository workerGoogBadRepository, PgRepository adminRepository, PgRepository goodbadTypeRepository) + { + this.workerGoogBadRepository = workerGoogBadRepository; + this.adminRepository = adminRepository; + this.goodbadTypeRepository = goodbadTypeRepository; + } + /// /// 添加员工奖惩记录 /// @@ -44,7 +71,7 @@ namespace HotelManagerSystemWebApi.Application /// public bool AddGoodBad(WorkerGoodBad goodBad) { - return base.Insert(goodBad); + return workerGoogBadRepository.Insert(goodBad); } /// @@ -52,15 +79,15 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - public List SelectAllGoodBadByWorkNo(string wn) + public List SelectAllGoodBadByWorkNo(string? wn) { //查询所有超级管理员 List admins = new List(); - admins = base.Change().GetList(a => a.DeleteMk != 1); + admins = adminRepository.GetList(a => a.DeleteMk != 1); List gBTypes = new List(); - gBTypes = base.Change().GetList(a => a.delete_mk != 1); + gBTypes = goodbadTypeRepository.GetList(a => a.delete_mk != 1); List gb = new List(); - gb = base.GetList(a => a.WorkNo == wn); + gb = workerGoogBadRepository.GetList(a => a.WorkNo == wn); gb.ForEach(source => { //奖惩类型 diff --git a/HotelManagerSystemWebApi.Application/Worker/History/Services/IWorkerHistoryService.cs b/EOM.TSHotelManager.Application/Worker/History/IWorkerHistoryService.cs similarity index 86% rename from HotelManagerSystemWebApi.Application/Worker/History/Services/IWorkerHistoryService.cs rename to EOM.TSHotelManager.Application/Worker/History/IWorkerHistoryService.cs index 6af693f..66cbb49 100644 --- a/HotelManagerSystemWebApi.Application/Worker/History/Services/IWorkerHistoryService.cs +++ b/EOM.TSHotelManager.Application/Worker/History/IWorkerHistoryService.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -21,16 +21,15 @@ *SOFTWARE. * */ - -using HotelManagerSystemWebApi.Core; +using EOM.TSHotelManager.Core; using System.Collections.Generic; -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Application { /// /// 员工履历信息接口 /// - public interface IWorkerHistoryService + public interface IWorkerHistoryService { /// /// 根据工号添加员工履历 @@ -44,6 +43,6 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - List SelectHistoryByWorkerId(string wid); + List SelectHistoryByWorkerId(string? wid); } } \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Worker/History/Services/WorkerHistoryService.cs b/EOM.TSHotelManager.Application/Worker/History/WorkerHistoryService.cs similarity index 68% rename from HotelManagerSystemWebApi.Application/Worker/History/Services/WorkerHistoryService.cs rename to EOM.TSHotelManager.Application/Worker/History/WorkerHistoryService.cs index 583b49b..438f153 100644 --- a/HotelManagerSystemWebApi.Application/Worker/History/Services/WorkerHistoryService.cs +++ b/EOM.TSHotelManager.Application/Worker/History/WorkerHistoryService.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -21,18 +21,32 @@ *SOFTWARE. * */ +using EOM.TSHotelManager.Core; +using EOM.TSHotelManager.EntityFramework; using System; using System.Collections.Generic; - - -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Application { /// /// 员工履历接口实现类 /// - public class WorkerHistoryService:IWorkerHistoryService,ITranit + public class WorkerHistoryService : IWorkerHistoryService { + /// + /// 员工履历 + /// + private readonly PgRepository workerHistoryRepository; + + /// + /// + /// + /// + public WorkerHistoryService(PgRepository workerHistoryRepository) + { + this.workerHistoryRepository = workerHistoryRepository; + } + /// /// 根据工号添加员工履历 /// @@ -40,7 +54,7 @@ namespace HotelManagerSystemWebApi.Application /// public bool AddHistoryByWorkerId(WorkerHistory workerHistory) { - return base.Insert(workerHistory); + return workerHistoryRepository.Insert(workerHistory); } /// @@ -48,10 +62,10 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - public List SelectHistoryByWorkerId(string wid) + public List SelectHistoryByWorkerId(string? wid) { List why = new List(); - why = base.GetList(a => a.delete_mk != 1 && a.WorkerId == wid); + why = workerHistoryRepository.GetList(a => a.delete_mk != 1 && a.WorkerId == wid); return why; } } diff --git a/HotelManagerSystemWebApi.Application/Worker/WorkerInfo/Services/IWorkerService.cs b/EOM.TSHotelManager.Application/Worker/IWorkerService.cs similarity index 92% rename from HotelManagerSystemWebApi.Application/Worker/WorkerInfo/Services/IWorkerService.cs rename to EOM.TSHotelManager.Application/Worker/IWorkerService.cs index c2f8da2..e0762ad 100644 --- a/HotelManagerSystemWebApi.Application/Worker/WorkerInfo/Services/IWorkerService.cs +++ b/EOM.TSHotelManager.Application/Worker/IWorkerService.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -21,10 +21,10 @@ *SOFTWARE. * */ - +using EOM.TSHotelManager.Core; using System.Collections.Generic; -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Application { /// /// 员工信息接口 @@ -78,7 +78,7 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - Worker SelectWorkerInfoByWorkerId(string workerId); + Worker SelectWorkerInfoByWorkerId(string? workerId); #endregion #region 根据登录名称、密码查询员工信息 @@ -97,6 +97,6 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - bool UpdWorkerPwdByWorkNo(string workId, string workPwd); + bool UpdWorkerPwdByWorkNo(string? workId, string? workPwd); } } \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Worker/WorkerPic/Services/IWorkerPicService.cs b/EOM.TSHotelManager.Application/Worker/Picture/IWorkerPicService.cs similarity index 89% rename from HotelManagerSystemWebApi.Application/Worker/WorkerPic/Services/IWorkerPicService.cs rename to EOM.TSHotelManager.Application/Worker/Picture/IWorkerPicService.cs index df29dc4..5c342d5 100644 --- a/HotelManagerSystemWebApi.Application/Worker/WorkerPic/Services/IWorkerPicService.cs +++ b/EOM.TSHotelManager.Application/Worker/Picture/IWorkerPicService.cs @@ -1,16 +1,16 @@ - +using EOM.TSHotelManager.Core; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Application { /// /// 员工照片模块接口 /// - public interface IWorkerPicService + public interface IWorkerPicService { /// /// 查询员工照片 diff --git a/HotelManagerSystemWebApi.Application/Worker/WorkerPic/Services/WorkerPicService.cs b/EOM.TSHotelManager.Application/Worker/Picture/WorkerPicService.cs similarity index 51% rename from HotelManagerSystemWebApi.Application/Worker/WorkerPic/Services/WorkerPicService.cs rename to EOM.TSHotelManager.Application/Worker/Picture/WorkerPicService.cs index 12ccbe5..f231388 100644 --- a/HotelManagerSystemWebApi.Application/Worker/WorkerPic/Services/WorkerPicService.cs +++ b/EOM.TSHotelManager.Application/Worker/Picture/WorkerPicService.cs @@ -1,13 +1,37 @@ - +using EncryptTools.Core; +using EOM.TSHotelManager.Common; +using EOM.TSHotelManager.Core; +using EOM.TSHotelManager.EntityFramework; +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Linq; +using System.Text; +using System.Threading.Tasks; - -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Application { /// /// 员工照片接口实现类 /// - public class WorkerPicService:IWorkerPicService,ITransient + public class WorkerPicService : IWorkerPicService { + /// + /// 员工照片 + /// + private readonly PgRepository workerPicRepository; + + /// + /// + /// + /// + public WorkerPicService(PgRepository workerPicRepository) + { + this.workerPicRepository = workerPicRepository; + } + + Encrypt encrypt = new Encrypt(); + /// /// 查询员工照片 /// @@ -17,11 +41,11 @@ namespace HotelManagerSystemWebApi.Application { var workerPicSource = new WorkerPic(); - workerPicSource = base.GetSingle(a => a.WorkerId.Equals(workerPic.WorkerId)); + workerPicSource = workerPicRepository.GetSingle(a => a.WorkerId.Equals(workerPic.WorkerId)); if (workerPicSource != null) { - workerPicSource.Pic = workerPicSource == null || string.IsNullOrEmpty(workerPicSource.Pic) ? "" : HttpHelper.baseUrl + workerPicSource.Pic; + workerPicSource.Pic = workerPicSource == null || string.IsNullOrEmpty(workerPicSource.Pic) ? "" : encrypt.Decryption(HttpHelper.baseUrl) + workerPicSource.Pic; } return workerPicSource; @@ -33,7 +57,7 @@ namespace HotelManagerSystemWebApi.Application /// public bool InsertWorkerPic(WorkerPic workerPic) { - return base.Insert(new WorkerPic + return workerPicRepository.Insert(new WorkerPic { WorkerId = workerPic.WorkerId, Pic = workerPic.Pic @@ -47,7 +71,7 @@ namespace HotelManagerSystemWebApi.Application /// public bool DeleteWorkerPic(WorkerPic workerPic) { - return base.Delete(a => a.WorkerId.Equals(workerPic.WorkerId)); + return workerPicRepository.Delete(a => a.WorkerId.Equals(workerPic.WorkerId)); } /// @@ -57,10 +81,10 @@ namespace HotelManagerSystemWebApi.Application /// public bool UpdateWorkerPic(WorkerPic workerPic) { - return base.Update(a=> new WorkerPic + return workerPicRepository.Update(a => new WorkerPic { Pic = workerPic.Pic - },a => a.WorkerId.Equals(workerPic.WorkerId)); + }, a => a.WorkerId.Equals(workerPic.WorkerId)); } } } diff --git a/HotelManagerSystemWebApi.Application/Worker/WorkerInfo/Services/WorkerService.cs b/EOM.TSHotelManager.Application/Worker/WorkerService.cs similarity index 64% rename from HotelManagerSystemWebApi.Application/Worker/WorkerInfo/Services/WorkerService.cs rename to EOM.TSHotelManager.Application/Worker/WorkerService.cs index b7b560c..e711697 100644 --- a/HotelManagerSystemWebApi.Application/Worker/WorkerInfo/Services/WorkerService.cs +++ b/EOM.TSHotelManager.Application/Worker/WorkerService.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -21,25 +21,74 @@ *SOFTWARE. * */ +using EncryptTools.Core; +using EOM.TSHotelManager.Common; +using EOM.TSHotelManager.Core; +using EOM.TSHotelManager.EntityFramework; using System; using System.Collections.Generic; using System.Linq; -using MySql.Data.MySqlClient; - -using jvncorelib_fr.Encryptor; - -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Application { /// /// 员工信息接口实现类 /// - public class WorkerService:Repository,IWorkerService + public class WorkerService:IWorkerService { + /// + /// 员工信息 + /// + private readonly PgRepository workerRepository; + + /// + /// 性别类型 + /// + private readonly PgRepository sexTypeRepository; + + /// + /// 学历类型 + /// + private readonly PgRepository educationRepository; + + /// + /// 民族类型 + /// + private readonly PgRepository nationRepository; + + /// + /// 部门 + /// + private readonly PgRepository deptRepository; + + /// + /// 职务 + /// + private readonly PgRepository positionRepository; + /// /// 实例化信息加密插件 /// - EncryptLib encryptLib = new EncryptLib(); + Encrypt encrypt = new Encrypt(); + + /// + /// + /// + /// + /// + /// + /// + /// + /// + public WorkerService(PgRepository workerRepository, PgRepository sexTypeRepository, PgRepository educationRepository, PgRepository nationRepository, PgRepository deptRepository, PgRepository positionRepository) + { + this.workerRepository = workerRepository; + this.sexTypeRepository = sexTypeRepository; + this.educationRepository = educationRepository; + this.nationRepository = nationRepository; + this.deptRepository = deptRepository; + this.positionRepository = positionRepository; + } #region 修改员工信息 /// @@ -53,17 +102,17 @@ namespace HotelManagerSystemWebApi.Application var sourceTelStr = string.Empty; if (!string.IsNullOrEmpty(worker.WorkerTel)) { - sourceTelStr = encryptLib.Encryption(worker.WorkerTel); + sourceTelStr = encrypt.Encryption(worker.WorkerTel); } //加密身份证 var sourceIdStr = string.Empty; if (!string.IsNullOrEmpty(worker.CardId)) { - sourceIdStr = encryptLib.Encryption(worker.CardId); + sourceIdStr = encrypt.Encryption(worker.CardId); } worker.WorkerTel = sourceTelStr; worker.CardId = sourceIdStr; - return base.Update(a => new Worker() + return workerRepository.Update(a => new Worker() { WorkerName = worker.WorkerName, WorkerTel = worker.WorkerTel, @@ -71,6 +120,9 @@ namespace HotelManagerSystemWebApi.Application WorkerFace = worker.WorkerFace, WorkerEducation = worker.WorkerEducation, WorkerNation = worker.WorkerNation, + CardId= worker.CardId, + WorkerSex = worker.WorkerSex, + WorkerBirthday = worker.WorkerBirthday, datachg_usr = AdminInfo.Account, datachg_date = DateTime.Now },a => a.WorkerId.Equals(worker.WorkerId)); @@ -85,7 +137,7 @@ namespace HotelManagerSystemWebApi.Application /// public bool ManagerWorkerAccount(Worker worker) { - return new WorkerService().Update(a => new Worker() + return workerRepository.Update(a => new Worker() { delete_mk = worker.delete_mk }, a => a.WorkerId == worker.WorkerId); @@ -99,7 +151,7 @@ namespace HotelManagerSystemWebApi.Application public bool UpdateWorkerPositionAndClub(Worker worker) { - return base.Update(a => new Worker() + return workerRepository.Update(a => new Worker() { WorkerClub = worker.WorkerClub, WorkerPosition = worker.WorkerPosition, @@ -116,11 +168,11 @@ namespace HotelManagerSystemWebApi.Application /// public bool AddWorker(Worker worker) { - string NewID = encryptLib.Encryption(worker.CardId); - string NewTel = encryptLib.Encryption(worker.WorkerTel); + string? NewID = encrypt.Encryption(worker.CardId); + string? NewTel = encrypt.Encryption(worker.WorkerTel); worker.CardId = NewID; worker.WorkerTel = NewTel; - return base.Insert(worker); + return workerRepository.Insert(worker); } #endregion @@ -133,29 +185,29 @@ namespace HotelManagerSystemWebApi.Application { //查询所有教育程度信息 List educations = new List(); - educations = base.Change().GetList(a => a.delete_mk != 1); + educations = educationRepository.GetList(a => a.delete_mk != 1); //查询所有性别类型信息 List sexTypes = new List(); - sexTypes = base.Change().GetList(a => a.delete_mk != 1); + sexTypes = sexTypeRepository.GetList(a => a.delete_mk != 1); //查询所有民族类型信息 List nations = new List(); - nations = base.Change().GetList(a => a.delete_mk != 1); + nations = nationRepository.GetList(a => a.delete_mk != 1); //查询所有部门信息 List depts = new List(); - depts = base.Change().GetList(a => a.delete_mk != 1); + depts = deptRepository.GetList(a => a.delete_mk != 1); //查询所有职位信息 List positions = new List(); - positions = base.Change().GetList(a => a.delete_mk != 1); + positions = positionRepository.GetList(a => a.delete_mk != 1); //查询所有员工信息 List workers = new List(); - workers = base.Change().GetList(); + workers = workerRepository.Change().GetList(); workers.ForEach(source => { //解密身份证号码 - var sourceStr = source.CardId.Contains("·") ? encryptLib.Decryption(source.CardId) : source.CardId; + var sourceStr = source.CardId.Contains("·") ? encrypt.Decryption(source.CardId) : source.CardId; source.CardId = sourceStr; //解密联系方式 - var sourceTelStr = source.WorkerTel.Contains("·") ? encryptLib.Decryption(source.WorkerTel) : source.WorkerTel; + var sourceTelStr = source.WorkerTel.Contains("·") ? encrypt.Decryption(source.WorkerTel) : source.WorkerTel; source.WorkerTel = sourceTelStr; //性别类型 var sexType = sexTypes.FirstOrDefault(a => a.sexId == source.WorkerSex); @@ -184,30 +236,30 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - public Worker SelectWorkerInfoByWorkerId(string workerId) + public Worker SelectWorkerInfoByWorkerId(string? workerId) { Worker w = new Worker(); - w = base.Change().GetSingle(a => a.WorkerId == workerId); + w = workerRepository.GetSingle(a => a.WorkerId == workerId); //解密身份证号码 - var sourceStr = w.CardId.Contains("·") ? encryptLib.Decryption(w.CardId) : w.CardId; + var sourceStr = w.CardId.Contains("·") ? encrypt.Decryption(w.CardId) : w.CardId; w.CardId = sourceStr; //解密联系方式 - var sourceTelStr = w.WorkerTel.Contains("·") ? encryptLib.Decryption(w.WorkerTel) : w.WorkerTel; + var sourceTelStr = w.WorkerTel.Contains("·") ? encrypt.Decryption(w.WorkerTel) : w.WorkerTel; w.WorkerTel = sourceTelStr; //性别类型 - var sexType = base.Change().GetSingle(a => a.sexId == w.WorkerSex); + var sexType = sexTypeRepository.GetSingle(a => a.sexId == w.WorkerSex); w.WorkerSexName = string.IsNullOrEmpty(sexType.sexName) ? "" : sexType.sexName; //教育程度 - var eduction = base.Change().GetSingle(a => a.education_no == w.WorkerEducation); + var eduction = educationRepository.GetSingle(a => a.education_no == w.WorkerEducation); w.EducationName = string.IsNullOrEmpty(eduction.education_name) ? "" : eduction.education_name; //民族类型 - var nation = base.Change().GetSingle(a => a.nation_no == w.WorkerNation); + var nation = nationRepository.GetSingle(a => a.nation_no == w.WorkerNation); w.NationName = string.IsNullOrEmpty(nation.nation_name) ? "" : nation.nation_name; //部门 - var dept = base.Change().GetSingle(a => a.dept_no == w.WorkerClub); + var dept = deptRepository.GetSingle(a => a.dept_no == w.WorkerClub); w.ClubName = string.IsNullOrEmpty(dept.dept_name) ? "" : dept.dept_name; //职位 - var position = base.Change().GetSingle(a => a.position_no == w.WorkerPosition); + var position = positionRepository.GetSingle(a => a.position_no == w.WorkerPosition); w.PositionName = string.IsNullOrEmpty(position.position_name) ? "" : position.position_name; return w; } @@ -222,34 +274,33 @@ namespace HotelManagerSystemWebApi.Application public Worker SelectWorkerInfoByWorkerIdAndWorkerPwd(Worker worker) { Worker w = new Worker(); - w = base.GetSingle(a => a.WorkerId == worker.WorkerId); + w = workerRepository.GetSingle(a => a.WorkerId == worker.WorkerId); if (w == null) { w = null; return w; } - var sourceStr = w.WorkerPwd.Contains("·") ? encryptLib.Decryption(w.WorkerPwd) : w.WorkerPwd; - if (sourceStr != worker.WorkerPwd) + if (!encrypt.Compare(w.WorkerPwd, worker.WorkerPwd)) { w = null; return w; } //性别类型 - var sexType = base.Change().GetSingle(a => a.sexId == w.WorkerSex); + var sexType = sexTypeRepository.GetSingle(a => a.sexId == w.WorkerSex); w.WorkerSexName = string.IsNullOrEmpty(sexType.sexName) ? "" : sexType.sexName; //教育程度 - var eduction = base.Change().GetSingle(a => a.education_no == w.WorkerEducation); + var eduction = educationRepository.GetSingle(a => a.education_no == w.WorkerEducation); w.EducationName = string.IsNullOrEmpty(eduction.education_name) ? "" : eduction.education_name; //民族类型 - var nation = base.Change().GetSingle(a => a.nation_no == w.WorkerNation); + var nation = nationRepository.GetSingle(a => a.nation_no == w.WorkerNation); w.NationName = string.IsNullOrEmpty(nation.nation_name) ? "" : nation.nation_name; //部门 - var dept = base.Change().GetSingle(a => a.dept_no == w.WorkerClub); + var dept = deptRepository.GetSingle(a => a.dept_no == w.WorkerClub); w.ClubName = string.IsNullOrEmpty(dept.dept_name) ? "" : dept.dept_name; //职位 - var position = base.Change().GetSingle(a => a.position_no == w.WorkerPosition); + var position = positionRepository.GetSingle(a => a.position_no == w.WorkerPosition); w.PositionName = string.IsNullOrEmpty(position.position_name) ? "" : position.position_name; return w; } @@ -261,10 +312,10 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - public bool UpdWorkerPwdByWorkNo(string workId,string workPwd) + public bool UpdWorkerPwdByWorkNo(string? workId,string? workPwd) { - string NewPwd = encryptLib.Decryption(workPwd); - return base.Update(a => new Worker() + string? NewPwd = encrypt.Decryption(workPwd); + return workerRepository.Update(a => new Worker() { WorkerPwd = NewPwd, datachg_usr = LoginInfo.WorkerNo, diff --git a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services/AdminService.cs b/EOM.TSHotelManager.Application/Zero/Admin/AdminService.cs similarity index 65% rename from HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services/AdminService.cs rename to EOM.TSHotelManager.Application/Zero/Admin/AdminService.cs index f536f42..c6d8a05 100644 --- a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services/AdminService.cs +++ b/EOM.TSHotelManager.Application/Zero/Admin/AdminService.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -21,21 +21,44 @@ *SOFTWARE. * */ -using jvncorelib_fr.Encryptor; - - +using CK.Common; +using EncryptTools.Core; +using EOM.TSHotelManager.Common; +using EOM.TSHotelManager.Core; +using EOM.TSHotelManager.EntityFramework; using System; using System.Collections.Generic; using System.Linq; -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Application { /// /// 管理员数据访问层 /// - public class AdminService:IAdminService,ITransient + public class AdminService : IAdminService { - EncryptLib encryptLib = new EncryptLib(); + /// + /// 管理员 + /// + private readonly PgRepository adminRepository; + + /// + /// 管理员类型 + /// + private readonly PgRepository adminTypeRepository; + + Encrypt encrypt = new Encrypt(); + + /// + /// + /// + /// + /// + public AdminService(PgRepository adminRepository, PgRepository adminTypeRepository) + { + this.adminRepository = adminRepository; + this.adminTypeRepository = adminTypeRepository; + } #region 根据超管密码查询员工类型和权限 /// @@ -46,8 +69,21 @@ namespace HotelManagerSystemWebApi.Application public Admin SelectMangerByPass(Admin admin) { Admin admins = new Admin(); - admins = base.GetSingle(a => a.AdminAccount == admin.AdminAccount && a.AdminPassword == admin.AdminPassword); - //admin.AdminPassword = admin.AdminPassword.Contains(":") ? encrypt.DeEncryptStr(admin.AdminPassword) : admin.AdminPassword; + + //admin.AdminPassword = encrypt.Encryption(admin.AdminPassword); + + admins = adminRepository.GetSingle(a => a.AdminAccount == admin.AdminAccount); + + if (admins.IsNullOrEmpty()) + { + admins = null; + return admins; + } + if (!encrypt.Compare(admins.AdminPassword, admin.AdminPassword)) + { + admins = null; + return admins; + } return admins; } #endregion @@ -58,10 +94,10 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - public Admin SelectAdminPwdByAccount(string account) + public Admin SelectAdminPwdByAccount(string? account) { Admin admin = new Admin(); - admin = base.GetSingle(a => a.AdminAccount == account); + admin = adminRepository.GetSingle(a => a.AdminAccount == account); //admin.AdminPassword = admin.AdminPassword.Contains(":") ? encrypt.DeEncryptStr(admin.AdminPassword) : admin.AdminPassword; return admin; } @@ -73,8 +109,8 @@ namespace HotelManagerSystemWebApi.Application /// public List GetAllAdminList() { - var listAdmins = base.GetList(); - var listAdminType = base.Change().GetList(a => a.delete_mk != 1); + var listAdmins = adminRepository.GetList(); + var listAdminType = adminTypeRepository.GetList(a => a.delete_mk != 1); listAdmins.ForEach(admins => { var isAdminType = admins.IsAdmin == 1 ? "是" : "否"; @@ -98,13 +134,13 @@ namespace HotelManagerSystemWebApi.Application /// public bool UpdateNewPwdByOldPwd(Admin admin) { - //admin.AdminPassword = encrypt.EncryptStr(admin.AdminPassword); - return base.Update(a => new Admin() + admin.AdminPassword = encrypt.Encryption(admin.AdminPassword); + return adminRepository.Update(a => new Admin() { AdminPassword = admin.AdminPassword, datachg_usr = AdminInfo.Account, datachg_time = DateTime.Now - },a => a.AdminAccount == admin.AdminAccount); + }, a => a.AdminAccount == admin.AdminAccount); } /// @@ -113,8 +149,8 @@ namespace HotelManagerSystemWebApi.Application /// public List GetAllAdmin() { - var listAdmin = base.GetList(a => a.DeleteMk != 1); - var listAdminType = base.Change().GetList(a => a.delete_mk != 1); + var listAdmin = adminRepository.GetList(a => a.DeleteMk != 1); + var listAdminType = adminTypeRepository.GetList(a => a.delete_mk != 1); listAdmin.ForEach(admin => { var isAdminType = admin.IsAdmin == 1 ? "是" : "否"; @@ -133,8 +169,8 @@ namespace HotelManagerSystemWebApi.Application /// public bool AddAdmin(Admin admin) { - //admin.AdminPassword = encrypt.EncryptStr(admin.AdminPassword); - bool result = base.Insert(admin); + admin.AdminPassword = encrypt.Encryption(admin.AdminPassword); + bool result = adminRepository.Insert(admin); return result; } @@ -145,10 +181,10 @@ namespace HotelManagerSystemWebApi.Application /// public Admin GetAdminInfoByAdminAccount(Admin admin) { - var adminInfo = base.GetSingle(a => a.AdminAccount.Equals(admin.AdminAccount)); + var adminInfo = adminRepository.GetSingle(a => a.AdminAccount.Equals(admin.AdminAccount)); if (adminInfo != null) { - var adminType = base.Change().GetSingle(a => a.type_id.Equals(adminInfo.AdminType)); + var adminType = adminTypeRepository.GetSingle(a => a.type_id.Equals(adminInfo.AdminType)); adminInfo.TypeName = adminType.type_name; } return adminInfo; @@ -160,7 +196,7 @@ namespace HotelManagerSystemWebApi.Application /// public List GetAllAdminTypes() { - var listAdminTypes = base.Change().GetList(a => a.delete_mk != 1); + var listAdminTypes = adminTypeRepository.GetList(a => a.delete_mk != 1); return listAdminTypes; } @@ -172,10 +208,10 @@ namespace HotelManagerSystemWebApi.Application public bool UpdAccount(Admin admins) { admins.DeleteMk = admins.DeleteMk == 0 ? 1 : 0; - return base.Update(a => new Admin() + return adminRepository.Update(a => new Admin() { DeleteMk = admins.DeleteMk - },a => a.Id == admins.Id); + }, a => a.Id == admins.Id); } diff --git a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services/IAdminService.cs b/EOM.TSHotelManager.Application/Zero/Admin/IAdminService.cs similarity index 84% rename from HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services/IAdminService.cs rename to EOM.TSHotelManager.Application/Zero/Admin/IAdminService.cs index 74c7b88..f4319f3 100644 --- a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services/IAdminService.cs +++ b/EOM.TSHotelManager.Application/Zero/Admin/IAdminService.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -21,10 +21,10 @@ *SOFTWARE. * */ - +using EOM.TSHotelManager.Core; using System.Collections.Generic; -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Application { /// /// 管理员数据访问接口 @@ -38,51 +38,50 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - AdminInfo SelectMangerByPass(AdminInfo admin); + Admin SelectMangerByPass(Admin admin); #endregion - #region 根据超管账号查询对应的密码 /// /// 根据超管账号查询对应的密码 /// /// /// - AdminInfo SelectAdminPwdByAccount(string account); + Admin SelectAdminPwdByAccount(string? account); #endregion /// /// 获取所有管理员列表 /// /// - List GetAllAdminList(); + List GetAllAdminList(); /// /// 修改密码 /// /// /// - bool UpdateNewPwdByOldPwd(AdminInfo admin); + bool UpdateNewPwdByOldPwd(Admin admin); /// /// 获取管理员列表 /// /// - List GetAllAdmin(); + List GetAllAdmin(); /// /// 添加管理员 /// /// /// - bool AddAdmin(AdminInfo admin); + bool AddAdmin(Admin admin); /// /// 获取管理员信息 /// /// /// - AdminInfo GetAdminInfoByAdminAccount(AdminInfo admin); + Admin GetAdminInfoByAdminAccount(Admin admin); /// /// 获取所有管理员类型 @@ -95,6 +94,6 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - bool UpdAccount(AdminInfo admins); + bool UpdAccount(Admin admins); } } \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Zero/Base/Services/BaseService.cs b/EOM.TSHotelManager.Application/Zero/Base/BaseService.cs similarity index 72% rename from HotelManagerSystemWebApi.Application/Zero/Base/Services/BaseService.cs rename to EOM.TSHotelManager.Application/Zero/Base/BaseService.cs index a641a40..035edfe 100644 --- a/HotelManagerSystemWebApi.Application/Zero/Base/Services/BaseService.cs +++ b/EOM.TSHotelManager.Application/Zero/Base/BaseService.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -21,11 +21,11 @@ *SOFTWARE. * */ -using jvncorelib_fr.Entitylib; -using MySql.Data.MySqlClient; +using CK.Common; +using EOM.TSHotelManager.Common; +using EOM.TSHotelManager.Core; +using EOM.TSHotelManager.EntityFramework; using SqlSugar; - - using System; using System.Collections.Generic; using System.Linq; @@ -33,13 +33,89 @@ using System.Linq.Expressions; using System.Text; using System.Threading.Tasks; -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Application { /// /// 基础信息接口实现类 /// - public class BaseService: Repository,IBaseService + public class BaseService:IBaseService { + /// + /// 员工信息 + /// + private readonly PgRepository workerRepository; + + /// + /// 性别类型 + /// + private readonly PgRepository sexTypeRepository; + + /// + /// 学历类型 + /// + private readonly PgRepository educationRepository; + + /// + /// 民族类型 + /// + private readonly PgRepository nationRepository; + + /// + /// 部门 + /// + private readonly PgRepository deptRepository; + + /// + /// 职务 + /// + private readonly PgRepository positionRepository; + + /// + /// 证件类型 + /// + private readonly PgRepository passPortTypeRepository; + + /// + /// 客户类型 + /// + private readonly PgRepository custoTypeRepository; + + /// + /// 奖惩类型 + /// + private readonly PgRepository goodbadTypeRepository; + + /// + /// 基础URL + /// + private readonly PgRepository baseRepository; + + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + /// + public BaseService(PgRepository workerRepository, PgRepository sexTypeRepository, PgRepository educationRepository, PgRepository nationRepository, PgRepository deptRepository, PgRepository positionRepository, PgRepository passPortTypeRepository, PgRepository custoTypeRepository, PgRepository goodbadTypeRepository, PgRepository baseRepository) + { + this.workerRepository = workerRepository; + this.sexTypeRepository = sexTypeRepository; + this.educationRepository = educationRepository; + this.nationRepository = nationRepository; + this.deptRepository = deptRepository; + this.positionRepository = positionRepository; + this.passPortTypeRepository = passPortTypeRepository; + this.custoTypeRepository = custoTypeRepository; + this.goodbadTypeRepository = goodbadTypeRepository; + this.baseRepository = baseRepository; + } #region 性别模块 @@ -58,7 +134,7 @@ namespace HotelManagerSystemWebApi.Application { where = where.And(a => a.sexName.Contains(sexType.sexName)); } - return base.Change().GetList(where.ToExpression()); + return sexTypeRepository.GetList(where.ToExpression()); } /// @@ -68,7 +144,7 @@ namespace HotelManagerSystemWebApi.Application public SexType SelectSexType(SexType sexType) { SexType sexTypes = new SexType(); - sexTypes = base.GetSingle(a => a.sexId == sexType.sexId); + sexTypes = sexTypeRepository.GetSingle(a => a.sexId == sexType.sexId); return sexTypes; } @@ -79,7 +155,7 @@ namespace HotelManagerSystemWebApi.Application /// public bool AddSexType(SexType sexType) { - return base.Insert(sexType); + return sexTypeRepository.Insert(sexType); } /// @@ -89,7 +165,7 @@ namespace HotelManagerSystemWebApi.Application /// public bool DelSexType(SexType sexType) { - return base.Update(a => new SexType() + return sexTypeRepository.Update(a => new SexType() { delete_mk = sexType.delete_mk, datachg_usr = LoginInfo.WorkerNo, @@ -104,7 +180,7 @@ namespace HotelManagerSystemWebApi.Application /// public bool UpdSexType(SexType sexType) { - return base.Update(a => new SexType() + return sexTypeRepository.Update(a => new SexType() { sexName = sexType.sexName, datachg_usr = LoginInfo.WorkerNo, @@ -131,7 +207,7 @@ namespace HotelManagerSystemWebApi.Application { where = where.And(a => a.position_name.Contains(position.position_name)); } - return base.Change().GetList(where.ToExpression()); + return positionRepository.GetList(where.ToExpression()); } /// @@ -141,7 +217,7 @@ namespace HotelManagerSystemWebApi.Application public Position SelectPosition(Position position) { Position position1 = new Position(); - position1 = base.Change().GetSingle(a => a.position_no == position.position_no); + position1 = positionRepository.GetSingle(a => a.position_no == position.position_no); return position1; } @@ -152,7 +228,7 @@ namespace HotelManagerSystemWebApi.Application /// public bool AddPosition(Position position) { - return base.Change().Insert(position); + return positionRepository.Insert(position); } /// @@ -162,12 +238,12 @@ namespace HotelManagerSystemWebApi.Application /// public bool DelPosition(Position position) { - return base.Change().Update(a => new Position() + return positionRepository.Update(a => new Position() { delete_mk = position.delete_mk, datachg_usr = LoginInfo.WorkerNo, datachg_date = DateTime.Now - },a => a.position_no == position.position_no); + }, a => a.position_no == position.position_no); } /// @@ -177,7 +253,7 @@ namespace HotelManagerSystemWebApi.Application /// public bool UpdPosition(Position position) { - return base.Change().Update(a => new Position() + return positionRepository.Update(a => new Position() { position_name = position.position_name, datachg_usr = LoginInfo.WorkerNo, @@ -204,7 +280,7 @@ namespace HotelManagerSystemWebApi.Application { where = where.And(a => a.nation_name.Contains(nation.nation_name)); } - return base.Change().GetList(where.ToExpression()); + return nationRepository.GetList(where.ToExpression()); } /// @@ -214,7 +290,7 @@ namespace HotelManagerSystemWebApi.Application public Nation SelectNation(Nation nation) { Nation nation1 = new Nation(); - nation1 = base.Change().GetSingle(a => a.nation_no.Equals(nation.nation_no)); + nation1 = nationRepository.GetSingle(a => a.nation_no.Equals(nation.nation_no)); return nation1; } @@ -225,7 +301,7 @@ namespace HotelManagerSystemWebApi.Application /// public bool AddNation(Nation nation) { - return base.Change().Insert(nation); + return nationRepository.Insert(nation); } /// @@ -235,12 +311,12 @@ namespace HotelManagerSystemWebApi.Application /// public bool DelNation(Nation nation) { - return base.Change().Update(a => new Nation() + return nationRepository.Update(a => new Nation() { delete_mk = nation.delete_mk, datachg_usr = LoginInfo.WorkerNo, datachg_date = DateTime.Now - },a => a.nation_no.Equals(nation.nation_no)); + }, a => a.nation_no.Equals(nation.nation_no)); } @@ -251,7 +327,7 @@ namespace HotelManagerSystemWebApi.Application /// public bool UpdNation(Nation nation) { - return base.Change().Update(a => new Nation() + return nationRepository.Update(a => new Nation() { nation_name = nation.nation_name, datachg_usr = LoginInfo.WorkerNo, @@ -278,7 +354,7 @@ namespace HotelManagerSystemWebApi.Application { where = where.And(a => a.education_name.Contains(education.education_name)); } - return base.Change().GetList(where.ToExpression()); + return educationRepository.GetList(where.ToExpression()); } /// @@ -288,7 +364,7 @@ namespace HotelManagerSystemWebApi.Application public Education SelectEducation(Education education) { Education education1 = new Education(); - education1 = base.Change().GetSingle(a => a.education_no == education.education_no); + education1 = educationRepository.GetSingle(a => a.education_no == education.education_no); return education1; } @@ -299,7 +375,7 @@ namespace HotelManagerSystemWebApi.Application /// public bool AddEducation(Education education) { - return base.Change().Insert(education); + return educationRepository.Insert(education); } /// @@ -309,7 +385,7 @@ namespace HotelManagerSystemWebApi.Application /// public bool DelEducation(Education education) { - return base.Change().Update(a => new Education() + return educationRepository.Update(a => new Education() { delete_mk = education.delete_mk, datachg_usr = LoginInfo.WorkerNo, @@ -324,7 +400,7 @@ namespace HotelManagerSystemWebApi.Application /// public bool UpdEducation(Education education) { - return base.Change().Update(a => new Education() + return educationRepository.Update(a => new Education() { education_name = education.education_name, datachg_usr = LoginInfo.WorkerNo, @@ -343,9 +419,9 @@ namespace HotelManagerSystemWebApi.Application public List SelectDeptAllCanUse() { List workers = new List(); - workers = base.Change().GetList(a => a.delete_mk != 1); + workers = workerRepository.GetList(a => a.delete_mk != 1); List depts = new List(); - depts = base.Change().GetList(a => a.delete_mk != 1); + depts = deptRepository.GetList(a => a.delete_mk != 1); depts.ForEach(source => { var dept = depts.FirstOrDefault(a => a.dept_no == source.dept_parent); @@ -364,9 +440,9 @@ namespace HotelManagerSystemWebApi.Application public List SelectDeptAll() { List workers = new List(); - workers = base.Change().GetList(a => a.delete_mk != 1); + workers = workerRepository.GetList(a => a.delete_mk != 1); List depts = new List(); - depts = base.Change().GetList(a => a.delete_mk != 1); + depts = deptRepository.GetList(a => a.delete_mk != 1); depts.ForEach(source => { var dept = depts.FirstOrDefault(a => a.dept_no == source.dept_parent); @@ -384,7 +460,7 @@ namespace HotelManagerSystemWebApi.Application public Dept SelectDept(Dept dept) { Dept dept1 = new Dept(); - dept1 = base.Change().GetSingle(a => a.dept_no.Equals(dept.dept_no)); + dept1 = deptRepository.GetSingle(a => a.dept_no.Equals(dept.dept_no)); return dept1; } @@ -395,7 +471,7 @@ namespace HotelManagerSystemWebApi.Application /// public bool AddDept(Dept dept) { - return base.Change().Insert(dept); + return deptRepository.Insert(dept); } /// @@ -405,12 +481,12 @@ namespace HotelManagerSystemWebApi.Application /// public bool DelDept(Dept dept) { - return base.Change().Update(a => new Dept() + return deptRepository.Update(a => new Dept() { delete_mk = 1, datachg_usr = LoginInfo.WorkerNo, datachg_date = DateTime.Now - },a => a.dept_no == dept.dept_no); + }, a => a.dept_no == dept.dept_no); } /// @@ -420,7 +496,7 @@ namespace HotelManagerSystemWebApi.Application /// public bool UpdDept(Dept dept) { - return base.Change().Update(a => new Dept() + return deptRepository.Update(a => new Dept() { dept_name = dept.dept_name, dept_desc = dept.dept_desc, @@ -428,7 +504,7 @@ namespace HotelManagerSystemWebApi.Application dept_parent = dept.dept_parent, datachg_usr = LoginInfo.WorkerNo, datachg_date = DateTime.Now - },a => a.dept_no == dept.dept_no); + }, a => a.dept_no == dept.dept_no); } #endregion @@ -442,7 +518,7 @@ namespace HotelManagerSystemWebApi.Application public List SelectCustoTypeAllCanUse() { List custoTypes = new List(); - custoTypes = base.Change().GetList(a => a.delete_mk != 1); + custoTypes = custoTypeRepository.GetList(a => a.delete_mk != 1); return custoTypes; } @@ -450,10 +526,10 @@ namespace HotelManagerSystemWebApi.Application /// 查询所有客户类型 /// /// - public List SelectCustoTypeAll() + public List SelectCustoTypeAll() { List custoTypes = new List(); - custoTypes = base.Change().GetList(); + custoTypes = custoTypeRepository.GetList(); return custoTypes; } @@ -465,7 +541,7 @@ namespace HotelManagerSystemWebApi.Application public CustoType SelectCustoTypeByTypeId(CustoType custoType) { CustoType custoTypes = new CustoType(); - custoType = base.Change().GetSingle(a => a.UserType == custoType.UserType && a.delete_mk != 1); + custoType = custoTypeRepository.GetSingle(a => a.UserType == custoType.UserType && a.delete_mk != 1); return custoTypes; } @@ -476,7 +552,7 @@ namespace HotelManagerSystemWebApi.Application /// public bool InsertCustoType(CustoType custoType) { - return base.Change().Insert(custoType); + return custoTypeRepository.Insert(custoType); } /// @@ -486,12 +562,12 @@ namespace HotelManagerSystemWebApi.Application /// public bool DeleteCustoType(CustoType custoType) { - return base.Change().Update(a => new CustoType() + return custoTypeRepository.Update(a => new CustoType() { delete_mk = 1, datachg_usr = AdminInfo.Account, datachg_date = DateTime.Now - },a => a.UserType == custoType.UserType); + }, a => a.UserType == custoType.UserType); } /// @@ -501,12 +577,12 @@ namespace HotelManagerSystemWebApi.Application /// public bool UpdateCustoType(CustoType custoType) { - return base.Change().Update(a => new CustoType() + return custoTypeRepository.Update(a => new CustoType() { TypeName = custoType.TypeName, datachg_usr = AdminInfo.Account, datachg_date = DateTime.Now - },a => a.UserType == custoType.UserType); + }, a => a.UserType == custoType.UserType); } #endregion @@ -520,7 +596,7 @@ namespace HotelManagerSystemWebApi.Application public List SelectPassPortTypeAllCanUse() { List passPortTypes = new List(); - passPortTypes = base.Change().GetList(a => a.delete_mk != 1); + passPortTypes = passPortTypeRepository.GetList(a => a.delete_mk != 1); return passPortTypes; } @@ -531,7 +607,7 @@ namespace HotelManagerSystemWebApi.Application public List SelectPassPortTypeAll() { List passPortTypes = new List(); - passPortTypes = base.Change().GetList(); + passPortTypes = passPortTypeRepository.GetList(); return passPortTypes; } @@ -543,7 +619,7 @@ namespace HotelManagerSystemWebApi.Application public PassPortType SelectPassPortTypeByTypeId(PassPortType passPortType) { PassPortType passPortType1 = new PassPortType(); - passPortType1 = base.Change().GetSingle(a => a.PassportId == passPortType.PassportId && a.delete_mk != 1); + passPortType1 = passPortTypeRepository.GetSingle(a => a.PassportId == passPortType.PassportId && a.delete_mk != 1); return passPortType1; } @@ -554,7 +630,7 @@ namespace HotelManagerSystemWebApi.Application /// public bool InsertPassPortType(PassPortType passPortType) { - return base.Change().Insert(passPortType); + return passPortTypeRepository.Insert(passPortType); } /// @@ -562,9 +638,9 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - public bool DeletePassPortType(PassPortType portType) + public bool DeletePassPortType(PassPortType portType) { - return base.Change().Update(a => new PassPortType() + return passPortTypeRepository.Update(a => new PassPortType() { delete_mk = 1, datachg_usr = AdminInfo.Account, @@ -579,7 +655,7 @@ namespace HotelManagerSystemWebApi.Application /// public bool UpdatePassPortType(PassPortType portType) { - return base.Change().Update(a => new PassPortType() + return passPortTypeRepository.Update(a => new PassPortType() { PassportName = portType.PassportName, datachg_usr = AdminInfo.Account, @@ -598,7 +674,7 @@ namespace HotelManagerSystemWebApi.Application public List SelectGBTypeAllCanUse() { List gBTypes = new List(); - gBTypes = base.Change().GetList(a => a.delete_mk != 1); + gBTypes = goodbadTypeRepository.GetList(a => a.delete_mk != 1); return gBTypes; } @@ -609,7 +685,7 @@ namespace HotelManagerSystemWebApi.Application public List SelectGBTypeAll() { List gBTypes = new List(); - gBTypes = base.Change().GetList(); + gBTypes = goodbadTypeRepository.GetList(); return gBTypes; } @@ -621,7 +697,7 @@ namespace HotelManagerSystemWebApi.Application public GBType SelectGBTypeByTypeId(GBType gBType) { GBType gBType1 = new GBType(); - gBType1 = base.Change().GetSingle(a => a.GBTypeId == gBType.GBTypeId && a.delete_mk != 1); + gBType1 = goodbadTypeRepository.GetSingle(a => a.GBTypeId == gBType.GBTypeId && a.delete_mk != 1); return gBType1; } @@ -630,9 +706,9 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - public bool InsertGBType(GBType gBType) + public bool InsertGBType(GBType gBType) { - return base.Change().Insert(gBType); + return goodbadTypeRepository.Insert(gBType); } /// @@ -642,7 +718,7 @@ namespace HotelManagerSystemWebApi.Application /// public bool DeleteGBType(GBType gBType) { - return base.Change().Update(a => new GBType() + return goodbadTypeRepository.Update(a => new GBType() { delete_mk = 1, datachg_usr = AdminInfo.Account, @@ -657,7 +733,7 @@ namespace HotelManagerSystemWebApi.Application /// public bool UpdateGBType(GBType gBType) { - return base.Change().Update(a => new GBType() + return goodbadTypeRepository.Update(a => new GBType() { GBName = gBType.GBName, datachg_usr = AdminInfo.Account, @@ -676,7 +752,7 @@ namespace HotelManagerSystemWebApi.Application { var baseTemp = new Base(); - baseTemp = base.Change().GetSingle(a => a.url_no == 1); + baseTemp = baseRepository.GetSingle(a => a.url_no == 1); return baseTemp; } diff --git a/HotelManagerSystemWebApi.Application/Zero/Base/Services/IBaseService.cs b/EOM.TSHotelManager.Application/Zero/Base/IBaseService.cs similarity index 98% rename from HotelManagerSystemWebApi.Application/Zero/Base/Services/IBaseService.cs rename to EOM.TSHotelManager.Application/Zero/Base/IBaseService.cs index ae38150..001efee 100644 --- a/HotelManagerSystemWebApi.Application/Zero/Base/Services/IBaseService.cs +++ b/EOM.TSHotelManager.Application/Zero/Base/IBaseService.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -21,14 +21,14 @@ *SOFTWARE. * */ - +using EOM.TSHotelManager.Core; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Application { /// /// 基础信息接口 @@ -259,7 +259,7 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - bool DeleteCustoType(CustoType custoType); + bool DeleteCustoType(CustoType custoType); /// /// 更新客户类型 diff --git a/HotelManagerSystemWebApi.Application/Zero/CheckInfo/CheckInfoService.cs b/EOM.TSHotelManager.Application/Zero/CheckInfo/CheckInfoService.cs similarity index 68% rename from HotelManagerSystemWebApi.Application/Zero/CheckInfo/CheckInfoService.cs rename to EOM.TSHotelManager.Application/Zero/CheckInfo/CheckInfoService.cs index 189769b..475b604 100644 --- a/HotelManagerSystemWebApi.Application/Zero/CheckInfo/CheckInfoService.cs +++ b/EOM.TSHotelManager.Application/Zero/CheckInfo/CheckInfoService.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -21,20 +21,33 @@ *SOFTWARE. * */ +using EOM.TSHotelManager.Core; +using EOM.TSHotelManager.EntityFramework; using System; using System.Collections.Generic; using System.Data.SqlClient; -using MySql.Data.MySqlClient; - - -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Application { /// /// 监管统计接口实现类 /// - public class CheckInfoService:Repository, ICheckInfoService + public class CheckInfoService : ICheckInfoService { + /// + /// 监管统计 + /// + private readonly PgRepository checkInfoRepository; + + /// + /// + /// + /// + public CheckInfoService(PgRepository checkInfoRepository) + { + this.checkInfoRepository = checkInfoRepository; + } + /// /// 查询所有监管统计信息 /// @@ -42,7 +55,7 @@ namespace HotelManagerSystemWebApi.Application public List SelectCheckInfoAll() { List cif = new List(); - cif = base.GetList(a => a.delete_mk != 1); + cif = checkInfoRepository.GetList(a => a.delete_mk != 1); return cif; } } diff --git a/HotelManagerSystemWebApi.Application/Zero/CheckInfo/ICheckInfoService.cs b/EOM.TSHotelManager.Application/Zero/CheckInfo/ICheckInfoService.cs similarity index 92% rename from HotelManagerSystemWebApi.Application/Zero/CheckInfo/ICheckInfoService.cs rename to EOM.TSHotelManager.Application/Zero/CheckInfo/ICheckInfoService.cs index 47e412b..1582ab3 100644 --- a/HotelManagerSystemWebApi.Application/Zero/CheckInfo/ICheckInfoService.cs +++ b/EOM.TSHotelManager.Application/Zero/CheckInfo/ICheckInfoService.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -21,10 +21,10 @@ *SOFTWARE. * */ - +using EOM.TSHotelManager.Core; using System.Collections.Generic; -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Application { /// /// 监管统计接口 diff --git a/HotelManagerSystemWebApi.Application/Zero/Module/AdminModuleZeroService.cs b/EOM.TSHotelManager.Application/Zero/Module/AdminModuleZeroService.cs similarity index 82% rename from HotelManagerSystemWebApi.Application/Zero/Module/AdminModuleZeroService.cs rename to EOM.TSHotelManager.Application/Zero/Module/AdminModuleZeroService.cs index 19cad46..d052519 100644 --- a/HotelManagerSystemWebApi.Application/Zero/Module/AdminModuleZeroService.cs +++ b/EOM.TSHotelManager.Application/Zero/Module/AdminModuleZeroService.cs @@ -1,25 +1,39 @@ - - +using EOM.TSHotelManager.Core; +using EOM.TSHotelManager.EntityFramework; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Application { /// /// 管理员模块权限管理接口实现类 /// - public class AdminModuleZeroService:Repository, IAdminModuleZeroService + public class AdminModuleZeroService : IAdminModuleZeroService { + /// + /// 模块权限 + /// + private readonly PgRepository moduleZeroRepository; + + /// + /// + /// + /// + public AdminModuleZeroService(PgRepository moduleZeroRepository) + { + this.moduleZeroRepository = moduleZeroRepository; + } + /// /// 获取所有模块 /// /// - public List GetAllModule() + public List GetAllModule() { - List modules = base.Change().GetList(); + List modules = moduleZeroRepository.Change().GetList(); modules.ForEach(source => { switch (source.module_name) @@ -66,7 +80,7 @@ namespace HotelManagerSystemWebApi.Application /// public List GetAllModuleByAdmin(Admin admin) { - List moduleZeros = base.GetList(a => a.admin_account.Equals(admin.AdminAccount) + List moduleZeros = moduleZeroRepository.GetList(a => a.admin_account.Equals(admin.AdminAccount) && a.module_enable == 1); moduleZeros.ForEach(source => { @@ -116,9 +130,9 @@ namespace HotelManagerSystemWebApi.Application { moduleZeros.ForEach(moduleZero => { - moduleZero.module_name = moduleZero.module_name.Split('|','|').FirstOrDefault().ToString(); + moduleZero.module_name = moduleZero.module_name.Split('|', '|').FirstOrDefault().ToString(); }); - var result = base.InsertRange(moduleZeros); + var result = moduleZeroRepository.InsertRange(moduleZeros); return result; } @@ -129,7 +143,7 @@ namespace HotelManagerSystemWebApi.Application /// public bool DelModuleZeroList(ModuleZero moduleZero) { - var result = base.Delete(a => a.admin_account.Equals(moduleZero.admin_account)); + var result = moduleZeroRepository.Delete(a => a.admin_account.Equals(moduleZero.admin_account)); return result; } diff --git a/HotelManagerSystemWebApi.Application/Zero/Module/IAdminModuleZeroService.cs b/EOM.TSHotelManager.Application/Zero/Module/IAdminModuleZeroService.cs similarity index 93% rename from HotelManagerSystemWebApi.Application/Zero/Module/IAdminModuleZeroService.cs rename to EOM.TSHotelManager.Application/Zero/Module/IAdminModuleZeroService.cs index a87aff5..1baa1f2 100644 --- a/HotelManagerSystemWebApi.Application/Zero/Module/IAdminModuleZeroService.cs +++ b/EOM.TSHotelManager.Application/Zero/Module/IAdminModuleZeroService.cs @@ -1,11 +1,11 @@ - +using EOM.TSHotelManager.Core; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Application { /// /// 管理员模块权限管理接口 diff --git a/HotelManagerSystemWebApi.Application/Zero/Notice/INoticeService.cs b/EOM.TSHotelManager.Application/Zero/Notice/INoticeService.cs similarity index 93% rename from HotelManagerSystemWebApi.Application/Zero/Notice/INoticeService.cs rename to EOM.TSHotelManager.Application/Zero/Notice/INoticeService.cs index c5474ec..4404560 100644 --- a/HotelManagerSystemWebApi.Application/Zero/Notice/INoticeService.cs +++ b/EOM.TSHotelManager.Application/Zero/Notice/INoticeService.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -21,10 +21,10 @@ *SOFTWARE. * */ - +using EOM.TSHotelManager.Core; using System.Collections.Generic; -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Application { /// /// 公告接口 @@ -39,7 +39,6 @@ namespace HotelManagerSystemWebApi.Application List SelectNoticeAll(); #endregion - #region 上传公告信息 /// /// 上传公告信息 diff --git a/HotelManagerSystemWebApi.Application/Zero/Notice/NoticeService.cs b/EOM.TSHotelManager.Application/Zero/Notice/NoticeService.cs similarity index 76% rename from HotelManagerSystemWebApi.Application/Zero/Notice/NoticeService.cs rename to EOM.TSHotelManager.Application/Zero/Notice/NoticeService.cs index 7873ed4..159e2ef 100644 --- a/HotelManagerSystemWebApi.Application/Zero/Notice/NoticeService.cs +++ b/EOM.TSHotelManager.Application/Zero/Notice/NoticeService.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -21,19 +21,32 @@ *SOFTWARE. * */ +using EOM.TSHotelManager.Core; +using EOM.TSHotelManager.EntityFramework; using System; using System.Collections.Generic; -using MySql.Data.MySqlClient; - - -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Application { /// /// 公告信息接口实现类 /// - public class NoticeService:Repository, INoticeService + public class NoticeService:INoticeService { + /// + /// 公告 + /// + private readonly PgRepository noticeRepository; + + /// + /// + /// + /// + public NoticeService(PgRepository noticeRepository) + { + this.noticeRepository = noticeRepository; + } + #region 获取所有公告信息 /// /// 获取所有公告信息 @@ -42,7 +55,7 @@ namespace HotelManagerSystemWebApi.Application public List SelectNoticeAll() { List ntc = new List(); - ntc = base.GetList(a => a.delete_mk != 1); + ntc = noticeRepository.GetList(a => a.delete_mk != 1); ntc.ForEach(source => { switch (source.NoticeType) @@ -64,10 +77,10 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - public Notice SelectNoticeByNoticeNo(string NoticeNo) + public Notice SelectNoticeByNoticeNo(string? NoticeNo) { Notice notice = new Notice(); - notice = base.GetSingle(a => a.NoticeNo == NoticeNo); + notice = noticeRepository.GetSingle(a => a.NoticeNo == NoticeNo); switch (notice.NoticeType) { case "PersonnelChanges": @@ -88,7 +101,7 @@ namespace HotelManagerSystemWebApi.Application /// public bool InsertNotice(Notice notice) { - return base.Insert(notice); + return noticeRepository.Insert(notice); } #endregion diff --git a/HotelManagerSystemWebApi.Application/Zero/VipRule/IVipRuleAppService.cs b/EOM.TSHotelManager.Application/Zero/VipRule/IVipRuleAppService.cs similarity index 95% rename from HotelManagerSystemWebApi.Application/Zero/VipRule/IVipRuleAppService.cs rename to EOM.TSHotelManager.Application/Zero/VipRule/IVipRuleAppService.cs index 1893f30..23cd4ad 100644 --- a/HotelManagerSystemWebApi.Application/Zero/VipRule/IVipRuleAppService.cs +++ b/EOM.TSHotelManager.Application/Zero/VipRule/IVipRuleAppService.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -22,14 +22,14 @@ * *模块说明:会员等级规则功能模块接口 */ - +using EOM.TSHotelManager.Core; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace HotelManagerSystemWebApi.Application.Zero +namespace EOM.TSHotelManager.Application { /// /// 会员等级规则功能模块接口 diff --git a/HotelManagerSystemWebApi.Application/Zero/VipRule/VipRuleAppService.cs b/EOM.TSHotelManager.Application/Zero/VipRule/VipRuleAppService.cs similarity index 51% rename from HotelManagerSystemWebApi.Application/Zero/VipRule/VipRuleAppService.cs rename to EOM.TSHotelManager.Application/Zero/VipRule/VipRuleAppService.cs index f0fa6ea..447df48 100644 --- a/HotelManagerSystemWebApi.Application/Zero/VipRule/VipRuleAppService.cs +++ b/EOM.TSHotelManager.Application/Zero/VipRule/VipRuleAppService.cs @@ -1,18 +1,63 @@ - +/* + * 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. + * + */ +using EOM.TSHotelManager.Common; +using EOM.TSHotelManager.Core; +using EOM.TSHotelManager.EntityFramework; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace HotelManagerSystemWebApi.Application.Zero +namespace EOM.TSHotelManager.Application { /// /// 会员等级规则功能模块接口实现类 /// - public class VipRuleAppService:Repository, IVipRuleAppService + public class VipRuleAppService:IVipRuleAppService { + /// + /// 会员等级规则 + /// + private readonly PgRepository vipRuleRepository; + + /// + /// 客户类型 + /// + private readonly PgRepository custoTypeRepository; + + /// + /// + /// + /// + /// + public VipRuleAppService(PgRepository vipRuleRepository, PgRepository custoTypeRepository) + { + this.vipRuleRepository = vipRuleRepository; + this.custoTypeRepository = custoTypeRepository; + } + /// /// 查询会员等级规则列表 /// @@ -21,9 +66,9 @@ namespace HotelManagerSystemWebApi.Application.Zero { List vipRules = new List(); - var listSource = base.GetList(a => a.delete_mk != 1); + var listSource = vipRuleRepository.GetList(a => a.delete_mk != 1); - var listUserType = base.Change().GetList(a => a.delete_mk != 1); + var listUserType = custoTypeRepository.GetList(a => a.delete_mk != 1); listSource.ForEach(source => { @@ -45,9 +90,9 @@ namespace HotelManagerSystemWebApi.Application.Zero { VipRule vipRule1 = new VipRule(); - var source = base.GetSingle(a => a.rule_id.Equals(vipRule.rule_id)); + var source = vipRuleRepository.GetSingle(a => a.rule_id.Equals(vipRule.rule_id)); - var userType = base.Change().GetSingle(a => a.UserType == source.type_id); + var userType = custoTypeRepository.GetSingle(a => a.UserType == source.type_id); source.type_name = userType == null ? "" : userType.TypeName; vipRule1 = source; @@ -62,7 +107,7 @@ namespace HotelManagerSystemWebApi.Application.Zero /// public bool AddVipRule(VipRule vipRule) { - return base.Insert(new VipRule() + return vipRuleRepository.Insert(new VipRule() { rule_id = vipRule.rule_id, rule_name = vipRule.rule_name, @@ -81,7 +126,7 @@ namespace HotelManagerSystemWebApi.Application.Zero /// public bool DelVipRule(VipRule vipRule) { - return base.Update(a => new VipRule + return vipRuleRepository.Update(a => new VipRule { delete_mk = 1, datachg_usr = AdminInfo.Account, @@ -96,7 +141,7 @@ namespace HotelManagerSystemWebApi.Application.Zero /// public bool UpdVipRule(VipRule vipRule) { - return base.Update(a => new VipRule + return vipRuleRepository.Update(a => new VipRule { rule_name = vipRule.rule_name, rule_value = vipRule.rule_value, diff --git a/EOM.TSHotelManager.Common/EOM.TSHotelManager.Common.csproj b/EOM.TSHotelManager.Common/EOM.TSHotelManager.Common.csproj new file mode 100644 index 0000000..93cb6cb --- /dev/null +++ b/EOM.TSHotelManager.Common/EOM.TSHotelManager.Common.csproj @@ -0,0 +1,17 @@ + + + + net6.0 + enable + enable + + + + + + + + + + + diff --git a/EOM.TSHotelManager.Common/HttpHelper.cs b/EOM.TSHotelManager.Common/HttpHelper.cs new file mode 100644 index 0000000..483d772 --- /dev/null +++ b/EOM.TSHotelManager.Common/HttpHelper.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading.Tasks; + +namespace EOM.TSHotelManager.Common +{ + /// + /// 文件上传帮助类 + /// + public class HttpHelper + { + #region 受限于打包插件的限制才放在这,个人开发时建议统一在App.Config进行配置 + + /// + /// 数据库配置连接 + /// + public const string? mysqlString = "server = localhost; user id = softuser; password = .; database = tshoteldb;"; + public const string? pgsqlString = "qpyxeqMNN342V18jm3VN+iCeovxqQKgUHzzuYeGmV90jqMTPS5/bJLdDi3XQw4T820gCZ8prLDZICtlvqHJ9Uhn0uys9KYEP0iMuvoE5vsw3JtsetpU7O58CXkujZzMi·%*c>fd;d*d#b%ad;0 + /// 照片文件配置URL + /// + public const string? baseUrl = "RricsELofi55yQ4YD7ndbNP0T7c6nnhD8ASRT6/B35hjaWAdRSS0is7uQearyz60·e$>^b$?%^ff*;c?<$$ca?$#a%ddc;a0c"; + /// + /// 上传照片URL + /// + public const string? postUrl = "qDxYOlHl/qx0D2DqQZ1fe6SR1JUnAdqex4VBmlwGoKZ2OJdf7qx9sxjnZbHlo/GM·%%*;#<%? + /// WebClient上传文件至服务器 + /// + /// 文件名,全路径格式 + /// 服务器文件夹路径 + public static string? UpLoadFile(string? fileNamePath, string? uriString) + { + // 创建WebClient实例 + WebClient myWebClient = new WebClient(); + byte[] responseData = myWebClient.UploadFile(uriString, "POST", fileNamePath);//得到返回的内容 + String str = Encoding.UTF8.GetString(responseData);//得到的目的字符串 + + return str.Replace('\"', ' '); + } + } +} diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/SelectRoomListDto.cs b/EOM.TSHotelManager.Common/RecordHelper/AdminInfo.cs similarity index 64% rename from HotelManagerSystemWebApi.Application/Business/Room/Dtos/SelectRoomListDto.cs rename to EOM.TSHotelManager.Common/RecordHelper/AdminInfo.cs index ca32970..f1f5c23 100644 --- a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/SelectRoomListDto.cs +++ b/EOM.TSHotelManager.Common/RecordHelper/AdminInfo.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -20,37 +20,47 @@ *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE *SOFTWARE. * + *模块说明:管理员信息静态类 */ +using System.Linq; +using System.Net; -using System; - -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Common { /// - /// 获取所有房间信息 - /// 输入DTO + /// 管理员信息静态类 /// - public class SelectRoomListDto : IListDto + public class AdminInfo { /// - /// 房间编号 + /// 存储当前超管账号 /// - public string RoomNo { get; set; } + public static string? Account = ""; + /// - /// 房间类型 + /// 存储当前超管类型 /// - public int? RoomType { get; set; } + public static string? Type = ""; + /// - /// 客户编号 + /// 存储当前超管用户组 /// - public string CustoNo { get; set; } + public static string? Group = ""; + /// - /// 房间状态ID + /// 存储当前超管名称 /// - public int? RoomStateId { get; set; } + public static string? Name = ""; + /// - /// 删除标记 + /// 是否为超管 /// - public int? delete_mk { get; set; } + public static bool isAdmin; + + /// + /// 存储当前软件版本 + /// + public static string? SoftwareVersion = ""; + } -} \ No newline at end of file +} diff --git a/HotelManagerSystemWebApi.Application/Business/Cash/Dtos/OCashInfoListDto.cs b/EOM.TSHotelManager.Common/RecordHelper/IOperationlogService.cs similarity index 74% rename from HotelManagerSystemWebApi.Application/Business/Cash/Dtos/OCashInfoListDto.cs rename to EOM.TSHotelManager.Common/RecordHelper/IOperationlogService.cs index 207ba52..439d3da 100644 --- a/HotelManagerSystemWebApi.Application/Business/Cash/Dtos/OCashInfoListDto.cs +++ b/EOM.TSHotelManager.Common/RecordHelper/IOperationlogService.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -21,26 +21,26 @@ *SOFTWARE. * */ - -using HotelManagerSystemWebApi.Core; using System.Collections.Generic; -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Common { /// - /// 查询资产信息 - /// 输出DTO + /// 操作日志数据访问层 /// - public class OCashInfoListDto:MsgDto + public interface IOperationlogService { /// - /// 数据源 + /// 添加操作日志 /// - public List listSource { get; set; } + /// + /// + bool InsertOperationLog(OperationLog opr); /// - /// 总数 + /// 查询所有操作日志 /// - public int total { get; set; } + /// + List SelectOperationlogAll(); } } \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Reser/Dtos/SelectReserAllDto.cs b/EOM.TSHotelManager.Common/RecordHelper/LoginInfo.cs similarity index 67% rename from HotelManagerSystemWebApi.Application/Business/Reser/Dtos/SelectReserAllDto.cs rename to EOM.TSHotelManager.Common/RecordHelper/LoginInfo.cs index 28c2013..9f7814e 100644 --- a/HotelManagerSystemWebApi.Application/Business/Reser/Dtos/SelectReserAllDto.cs +++ b/EOM.TSHotelManager.Common/RecordHelper/LoginInfo.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -20,37 +20,38 @@ *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE *SOFTWARE. * + *模块说明:登录信息静态类 */ +using System.Linq; +using System.Net; -using HotelManagerSystemWebApi.Core; - -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Common { - /// - /// 获取所有预约信息 - /// 输入DTO - /// - public class SelectReserAllDto:IListDto + public static class LoginInfo { /// - /// 预约编号 + /// 存储当前员工编号 /// - public string ReserId { get; set; } + public static string? WorkerNo = ""; + /// - /// 客户名称 + /// 存储当前员工姓名 /// - public string CustoName { get; set; } + public static string? WorkerName = ""; + /// - /// 预约电话 + /// 存储当前员工职位 /// - public string CustoTel { get; set; } + public static string? WorkerPosition = ""; + /// - /// 预约渠道 + /// 存储当前员工部门 /// - public string ReserWay { get; set; } + public static string? WorkerClub = ""; + /// - /// 预约房号 + /// 存储当前软件版本 /// - public string ReserRoom { get; set; } + public static string? SoftwareVersion = ""; } -} \ No newline at end of file +} diff --git a/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/InsertCustomerInfoDto.cs b/EOM.TSHotelManager.Common/RecordHelper/OperationLog.cs similarity index 48% rename from HotelManagerSystemWebApi.Application/Business/Customer/Dtos/InsertCustomerInfoDto.cs rename to EOM.TSHotelManager.Common/RecordHelper/OperationLog.cs index 87d5287..0046480 100644 --- a/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/InsertCustomerInfoDto.cs +++ b/EOM.TSHotelManager.Common/RecordHelper/OperationLog.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -20,76 +20,95 @@ *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE *SOFTWARE. * + *模块说明:操作日志类 */ - -using HotelManagerSystemWebApi.Core; using System; -using System.ComponentModel.DataAnnotations; +using System.Linq; +using System.Net; -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Common { /// - /// 添加客户信息 - /// 输入DTO + /// 日志等级 /// - public class InsertCustomerInfoDto:IBaseDto + public enum RecordLevel { /// - /// 客户编号 + /// 普通警告 /// - public string CustoNo { get; set; } + Normal = 100, /// - /// 客户名称 + /// 严重警告 /// - [Required] - public string CustoName { get; set; } + Warning = 200, /// - /// 客户性别 + /// 危险警告 /// - [Required] - public int CustoSex { get; set; } + Danger = 300, + } + + /// + /// 操作日志 + /// + [SqlSugar.SugarTable("operationlog")] + public class OperationLog + { /// - /// 客户电话 + /// 操作时间 /// - [Required] - public string CustoTel { get; set; } + [SqlSugar.SugarColumn(ColumnName = "OperationTime")] + public DateTime OperationTime { get; set; } /// - /// 证件类型 + /// 操作信息 /// - [Required] - public int PassportType { get; set; } + [SqlSugar.SugarColumn(ColumnName = "LogContent")] + public string? LogContent { get; set; } /// - /// 证件号码 + /// 操作账号 /// - [Required] - public string CustoID { get; set; } + [SqlSugar.SugarColumn(ColumnName = "OperationAccount")] + public string? OperationAccount { get; set; } /// - /// 居住地址 + /// 日志等级 /// - public string CustoAdress { get; set; } + [SqlSugar.SugarColumn(ColumnName = "OperationLevel")] + public RecordLevel OperationLevel { get; set; } /// - /// 出生日期 + /// 删除标记 /// - public DateTime CustoBirth { get; set; } + [SqlSugar.SugarColumn(ColumnName = "delete_mk")] + public int delete_mk { get; set; } /// - /// 客户类型 + /// 软件版本 /// - public int CustoType { get; set; } + [SqlSugar.SugarColumn(ColumnName = "SoftwareVersion")] + public string? SoftwareVersion { get; set; } /// - /// 客户类型 + /// 登录IP /// - public string typeName { get; set; } + [SqlSugar.SugarColumn(ColumnName = "login_ip")] + public string? login_ip { get; set; } + /// 资料创建人 + /// + public string? datains_usr { get; set; } /// - /// 证件类型 + /// 资料创建时间 /// - public string PassportName { get; set; } + public DateTime datains_date { get; set; } /// - /// 性别 + /// 资料更新人 /// - public string SexName { get; set; } + public string? datachg_usr { get; set; } /// - /// 删除标记 + /// 资料更新时间 /// - public int delete_mk { get; set; } + public DateTime datachg_date { get; set; } + + /// + /// 日志等级 + /// + [SqlSugar.SugarColumn(IsIgnore = true)] + public string? OperationLevelNm { get; set; } + } -} \ No newline at end of file +} diff --git a/HotelManagerSystemWebApi.Application/Business/Hydropower/Services/IHydropowerService.cs b/EOM.TSHotelManager.Common/RecordHelper/OperationlogService.cs similarity index 47% rename from HotelManagerSystemWebApi.Application/Business/Hydropower/Services/IHydropowerService.cs rename to EOM.TSHotelManager.Common/RecordHelper/OperationlogService.cs index 9e32af0..a485760 100644 --- a/HotelManagerSystemWebApi.Application/Business/Hydropower/Services/IHydropowerService.cs +++ b/EOM.TSHotelManager.Common/RecordHelper/OperationlogService.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -21,35 +21,59 @@ *SOFTWARE. * */ - +using System; using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Net; +using EOM.TSHotelManager.EntityFramework; -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Common { /// - /// 水电信息接口 + /// 操作日志数据访问层 /// - public interface IHydropowerService + public class OperationlogService:IOperationlogService { /// - /// 获取所有水电费信息 + /// 操作日志 /// - /// - OSelectHydropowerInfoAllDto SelectHydropowerInfoAll(SelectHydropowerInfoAllDto selectHydropowerInfoAllDto); + private readonly PgRepository operationLogRepository; + + /// + /// + /// + /// + public OperationlogService(PgRepository operationLogRepository) + { + this.operationLogRepository = operationLogRepository; + } /// - /// 添加水电费信息 + /// 添加操作日志 /// - /// + /// /// - OInsertHydropowerInfoDto InsertHydropowerInfo(InsertHydropowerInfoDto insertHydropowerInfoDto); + public bool InsertOperationLog(OperationLog opr) + { + return operationLogRepository.Insert(opr); + } /// - /// 修改水电费信息 + /// 查询所有操作日志 /// - /// /// - OUpdateHydropowerInfoDto UpdateHydropowerInfo(UpdateHydropowerInfoDto updateHydropowerInfoDto); + public List SelectOperationlogAll() + { + List operationLogs = new List(); + operationLogs = operationLogRepository.GetList(a => a.delete_mk != 1).OrderByDescending(a => a.OperationTime).ToList(); + operationLogs.ForEach(source => + { + source.OperationLevelNm = source.OperationLevel == RecordLevel.Normal ? "常规操作" : source.OperationLevel == RecordLevel.Warning ? "敏感操作" : "严重操作"; + }); + return operationLogs; + } + } -} \ No newline at end of file +} diff --git a/EOM.TSHotelManager.Common/RecordHelper/RecordHelper.cs b/EOM.TSHotelManager.Common/RecordHelper/RecordHelper.cs new file mode 100644 index 0000000..d82852b --- /dev/null +++ b/EOM.TSHotelManager.Common/RecordHelper/RecordHelper.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Net; + +namespace EOM.TSHotelManager.Common +{ + /// + /// 日志记录助手 + /// + public class RecordHelper + { + private readonly IOperationlogService operationlogService; + + public RecordHelper(IOperationlogService operationlogService) + { + this.operationlogService = operationlogService; + } + + /// + /// 记录信息集合 + /// + /// + /// + public void Record(string? OperationLog, int level) + { + var logDetail = new OperationLog + { + OperationTime = DateTime.Now, + LogContent = OperationLog, + OperationAccount = LoginInfo.WorkerNo + AdminInfo.Account, + OperationLevel = level == 1 ? RecordLevel.Normal : level == 2 ? RecordLevel.Warning : RecordLevel.Danger, + SoftwareVersion = AdminInfo.SoftwareVersion + LoginInfo.SoftwareVersion, + delete_mk = 0, + datains_usr = AdminInfo.Account + LoginInfo.WorkerNo, + datains_date = DateTime.Now + }; + operationlogService.InsertOperationLog(logDetail); + } + + } +} diff --git a/HotelManagerSystemWebApi.Core/Util/ApplicationVersionUtil.cs b/EOM.TSHotelManager.Common/Util/ApplicationVersionUtil.cs similarity index 69% rename from HotelManagerSystemWebApi.Core/Util/ApplicationVersionUtil.cs rename to EOM.TSHotelManager.Common/Util/ApplicationVersionUtil.cs index ec4ea5b..0e1ed91 100644 --- a/HotelManagerSystemWebApi.Core/Util/ApplicationVersionUtil.cs +++ b/EOM.TSHotelManager.Common/Util/ApplicationVersionUtil.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -22,32 +22,49 @@ * *模块说明:检测软件版本 */ +using EOM.TSHotelManager.EntityFramework; using SqlSugar; -using SYS.Common; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace HotelManagerSystemWebApi.Core +namespace EOM.TSHotelManager.Common { /// /// 程序版本号检测 /// - public class ApplicationVersionUtil:Repository + public class ApplicationVersionUtil { + /// + /// 应用检测 + /// + private readonly PgRepository applicationRepository; + + /// + /// + /// + /// + public ApplicationVersionUtil(PgRepository applicationRepository) + { + this.applicationRepository = applicationRepository; + } + /// /// 检测版本号 /// /// public applicationversion CheckBaseVersion() { - return base.GetSingle(a => a.base_versionId == 1); + return applicationRepository.GetSingle(a => a.base_versionId == 1); } } - [Table("applicationversion")] + /// + /// + /// + [SqlSugar.SugarTable("applicationversion")] public class applicationversion { /// @@ -60,6 +77,6 @@ namespace HotelManagerSystemWebApi.Core /// 版本号 /// [SugarColumn(ColumnName = "base_version")]//数据库是自增才配自增 - public string base_version { get; set; } + public string? base_version { get; set; } } } diff --git a/HotelManagerSystemWebApi.Core/Util/IDCardUtil.cs b/EOM.TSHotelManager.Common/Util/IDCardUtil.cs similarity index 81% rename from HotelManagerSystemWebApi.Core/Util/IDCardUtil.cs rename to EOM.TSHotelManager.Common/Util/IDCardUtil.cs index fc24505..bcb5d8e 100644 --- a/HotelManagerSystemWebApi.Core/Util/IDCardUtil.cs +++ b/EOM.TSHotelManager.Common/Util/IDCardUtil.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -22,31 +22,45 @@ * *模块说明:身份证号码工具类 */ -using SYS.Common; +using EOM.TSHotelManager.EntityFramework; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace HotelManagerSystemWebApi.Core.Util +namespace EOM.TSHotelManager.Common { /// /// 身份证号码工具类 /// - public class IDCardUtil:Repository + public class IDCardUtil { + /// + /// 身份证号 + /// + private readonly PgRepository cardCodeRepository; + + /// + /// + /// + /// + public IDCardUtil(PgRepository cardCodeRepository) + { + this.cardCodeRepository = cardCodeRepository; + } + /// /// 查询地区码 /// /// /// - public string SelectCardCode(string identityCard) + public string? SelectCardCode(string? identityCard) { var cardid = identityCard.Substring(0, 6).ToString(); cardcodes cardcodes = new cardcodes(); var pcd = string.Empty; - cardcodes = base.GetSingle(a => a.bm == cardid); + cardcodes = cardCodeRepository.GetSingle(a => a.bm == cardid); pcd = cardcodes == null ? "" : string.Join(",", cardcodes.Province + cardcodes.City + cardcodes.District); return pcd; } diff --git a/EOM.TSHotelManager.Common/Util/IDGenerationUtil.cs b/EOM.TSHotelManager.Common/Util/IDGenerationUtil.cs new file mode 100644 index 0000000..c57d996 --- /dev/null +++ b/EOM.TSHotelManager.Common/Util/IDGenerationUtil.cs @@ -0,0 +1,80 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EOM.TSHotelManager.Common +{ + public static class IDGenerationUtil + { + //锁对象 + private static readonly object lockTimeCode = new object(); + + private static Dictionary? dic = null; + + /// + /// 批量获取流水号 + /// + /// 流水号前缀 + /// 填充位数,e.g 3为 000 + /// 流水号数量 + /// 分隔符 + /// 流水号集合 + public static List GetListNewId(string? preCode = null, int fillCount = 0, int pCount = 1, string? separatorChar = null) + { + List list = new List(); + int num = 1; + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < pCount; i++) + { + sb.Clear(); + sb.Append(preCode); + DateTime now = DateTime.Now; + string? text = now.ToString("yyyyMMddms"); + sb.Append(text); + sb.Append(separatorChar); + lock (lockTimeCode) + { + if (!dic.ContainsKey(text)) + { + if (dic.Count > 10) + { + dic.Clear(); + } + num++; + dic.Add(text, 1); + } + else + { + if (dic[text] > 8998) + { + while (true) + { + string? a = text; + now = DateTime.Now; + if (a == now.ToString("yyyyMMddms")) + { + Thread.Sleep(0); + continue; + } + break; + } + goto end_IL_004e; + } + Dictionary dictionary = dic; + string? key = text; + dictionary[key]++; + num = dic[text]; + } + string? value = num.ToString().PadLeft(fillCount, '0'); + sb.Append(value); + list.Add(sb.ToString()); + end_IL_004e:; + } + } + return list; + } + + } +} diff --git a/HotelManagerSystemWebApi.Core/Business/Cash/Cash.cs b/EOM.TSHotelManager.Core/Business/Cash/Cash.cs similarity index 70% rename from HotelManagerSystemWebApi.Core/Business/Cash/Cash.cs rename to EOM.TSHotelManager.Core/Business/Cash/Cash.cs index 2b434ba..e564b21 100644 --- a/HotelManagerSystemWebApi.Core/Business/Cash/Cash.cs +++ b/EOM.TSHotelManager.Core/Business/Cash/Cash.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -22,34 +22,41 @@ * *模块说明:资产类 */ -using Furion.DatabaseAccessor; using System; -using System.ComponentModel.DataAnnotations.Schema; - -namespace HotelManagerSystemWebApi.Core +namespace EOM.TSHotelManager.Core { /// /// 资产管理 /// - [Table("cashinfo")] - public class Cash:IEntity + [SqlSugar.SugarTable("cashinfo")] + public class Cash { /// /// 资产编号 /// - public string CashNo { get; set; } + public string? CashNo { get; set; } /// /// 资产名称 /// - public string CashName { get; set; } + public string? CashName { get; set; } /// /// 资产总值 /// public decimal CashPrice { get; set; } /// + /// 资产总值描述 + /// + [SqlSugar.SugarColumn(IsIgnore = true)] + public string? CashPriceStr { get; set; } + /// /// 所属部门 /// - public string CashClub { get; set; } + public string? CashClub { get; set; } + /// + /// 所属部门描述 + /// + [SqlSugar.SugarColumn(IsIgnore = true)] + public string? DeptName { get; set; } /// /// 入库时间 /// @@ -57,11 +64,16 @@ namespace HotelManagerSystemWebApi.Core /// /// 资产来源 /// - public string CashSource { get; set; } + public string? CashSource { get; set; } + /// + /// 资产经办人 + /// + public string? CashPerson { get; set; } /// /// 资产经办人 /// - public string CashPerson { get; set; } + [SqlSugar.SugarColumn(IsIgnore = true)] + public string? PersonName { get; set; } /// /// 删除标记 /// @@ -69,7 +81,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料创建人 /// - public string datains_usr { get; set; } + public string? datains_usr { get; set; } /// /// 资料创建时间 /// @@ -77,7 +89,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料更新人 /// - public string datachg_usr { get; set; } + public string? datachg_usr { get; set; } /// /// 资料更新时间 /// diff --git a/HotelManagerSystemWebApi.Core/Business/Customer/Custo.cs b/EOM.TSHotelManager.Core/Business/Customer/Custo.cs similarity index 60% rename from HotelManagerSystemWebApi.Core/Business/Customer/Custo.cs rename to EOM.TSHotelManager.Core/Business/Customer/Custo.cs index 70979a6..91334f0 100644 --- a/HotelManagerSystemWebApi.Core/Business/Customer/Custo.cs +++ b/EOM.TSHotelManager.Core/Business/Customer/Custo.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -22,69 +22,76 @@ * *模块说明:客户信息类 */ -using Furion.DatabaseAccessor; using System; -using System.ComponentModel.DataAnnotations.Schema; -namespace HotelManagerSystemWebApi.Core +namespace EOM.TSHotelManager.Core { /// /// 客户信息 /// - [Table("userinfo")] - public class Custo:IEntity + [SqlSugar.SugarTable("customer")] + public class Custo { /// /// 客户编号 /// - public string CustoNo { get; set; } + [SqlSugar.SugarColumn(ColumnName = "custo_no",IsPrimaryKey = true)] + public string? CustoNo { get; set; } /// /// 客户名称 /// - public string CustoName { get; set; } + [SqlSugar.SugarColumn(ColumnName = "custo_name", IsNullable = false)] + public string? CustoName { get; set; } /// /// 客户性别 /// + [SqlSugar.SugarColumn(ColumnName = "custo_sex", IsNullable = true)] public int CustoSex { get; set; } /// /// 客户电话 /// - public string CustoTel { get; set; } + [SqlSugar.SugarColumn(ColumnName = "custo_tel", IsNullable = false)] + public string? CustoTel { get; set; } /// /// 证件类型 /// + [SqlSugar.SugarColumn(ColumnName = "passport_type", IsNullable = false)] public int PassportType { get; set; } /// /// 证件号码 /// - public string CustoID { get; set; } + [SqlSugar.SugarColumn(ColumnName = "passport_id", IsNullable = false)] + public string? CustoID { get; set; } /// /// 居住地址 /// - public string CustoAdress { get; set; } + [SqlSugar.SugarColumn(ColumnName = "custo_address", IsNullable = true)] + public string? CustoAdress { get; set; } /// /// 出生日期 /// + [SqlSugar.SugarColumn(ColumnName = "custo_birth", IsNullable = true)] public DateTime CustoBirth { get; set; } /// /// 客户类型 /// + [SqlSugar.SugarColumn(ColumnName = "custo_type", IsNullable = false)] public int CustoType { get; set; } - ///// - ///// 客户类型 - ///// - //[SqlSugar.SugarColumn(IsIgnore = true)] - //public string typeName { get; set; } - ///// - ///// 证件类型 - ///// - //[SqlSugar.SugarColumn(IsIgnore = true)] - //public string PassportName { get; set; } - ///// - ///// 性别 - ///// - //[SqlSugar.SugarColumn(IsIgnore = true)] - //public string SexName { get; set; } + /// + /// 客户类型 + /// + [SqlSugar.SugarColumn(IsIgnore = true)] + public string? typeName { get; set; } + /// + /// 证件类型 + /// + [SqlSugar.SugarColumn(IsIgnore = true)] + public string? PassportName { get; set; } + /// + /// 性别 + /// + [SqlSugar.SugarColumn(IsIgnore = true)] + public string? SexName { get; set; } /// /// 删除标记 /// @@ -92,7 +99,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料创建人 /// - public string datains_usr { get; set; } + public string? datains_usr { get; set; } /// /// 资料创建时间 /// @@ -100,7 +107,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料更新人 /// - public string datachg_usr { get; set; } + public string? datachg_usr { get; set; } /// /// 资料更新时间 /// diff --git a/HotelManagerSystemWebApi.Core/Business/Customer/CustoSpend.cs b/EOM.TSHotelManager.Core/Business/Customer/CustoSpend.cs similarity index 91% rename from HotelManagerSystemWebApi.Core/Business/Customer/CustoSpend.cs rename to EOM.TSHotelManager.Core/Business/Customer/CustoSpend.cs index f65789c..8ec8bcf 100644 --- a/HotelManagerSystemWebApi.Core/Business/Customer/CustoSpend.cs +++ b/EOM.TSHotelManager.Core/Business/Customer/CustoSpend.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -22,7 +22,7 @@ * *模块说明:酒店盈利情况类 */ -namespace HotelManagerSystemWebApi.Core +namespace EOM.TSHotelManager.Core { /// /// 酒店盈利情况 @@ -32,7 +32,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 年 /// - public string Years { get; set; } + public string? Years { get; set; } /// /// 总金额 /// diff --git a/HotelManagerSystemWebApi.Core/Zero/Base/CustoType.cs b/EOM.TSHotelManager.Core/Business/Customer/CustoType.cs similarity index 83% rename from HotelManagerSystemWebApi.Core/Zero/Base/CustoType.cs rename to EOM.TSHotelManager.Core/Business/Customer/CustoType.cs index db8dc33..b89c3b9 100644 --- a/HotelManagerSystemWebApi.Core/Zero/Base/CustoType.cs +++ b/EOM.TSHotelManager.Core/Business/Customer/CustoType.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -22,17 +22,15 @@ * *模块说明:客户类型类 */ -using Furion.DatabaseAccessor; using System; -using System.ComponentModel.DataAnnotations.Schema; -namespace HotelManagerSystemWebApi.Core +namespace EOM.TSHotelManager.Core { /// /// 客户类型 /// - [Table("usertype")] - public class CustoType:IEntity + [SqlSugar.SugarTable("usertype")] + public class CustoType { /// /// 客户类型 @@ -41,7 +39,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 类型名字 /// - public string TypeName { get; set; } + public string? TypeName { get; set; } /// /// 删除标记 /// @@ -49,7 +47,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料创建人 /// - public string datains_usr { get; set; } + public string? datains_usr { get; set; } /// /// 资料创建时间 /// @@ -57,7 +55,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料更新人 /// - public string datachg_usr { get; set; } + public string? datachg_usr { get; set; } /// /// 资料更新时间 /// diff --git a/HotelManagerSystemWebApi.Core/Zero/Base/PassPortType.cs b/EOM.TSHotelManager.Core/Business/Customer/PassPortType.cs similarity index 83% rename from HotelManagerSystemWebApi.Core/Zero/Base/PassPortType.cs rename to EOM.TSHotelManager.Core/Business/Customer/PassPortType.cs index 8e71b46..f05a9c4 100644 --- a/HotelManagerSystemWebApi.Core/Zero/Base/PassPortType.cs +++ b/EOM.TSHotelManager.Core/Business/Customer/PassPortType.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -22,21 +22,19 @@ * *模块说明:证件类型类 */ -using Furion.DatabaseAccessor; using System; using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace HotelManagerSystemWebApi.Core +namespace EOM.TSHotelManager.Core { /// /// 证件类型 /// - [Table("passporttype")] - public class PassPortType : IEntity + [SqlSugar.SugarTable("passporttype")] + public class PassPortType { /// /// 证件类型 @@ -46,7 +44,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 证件名称 /// - public string PassportName { get; set; } + public string? PassportName { get; set; } /// /// 删除标记 /// @@ -54,7 +52,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料创建人 /// - public string datains_usr { get; set; } + public string? datains_usr { get; set; } /// /// 资料创建时间 /// @@ -62,7 +60,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料更新人 /// - public string datachg_usr { get; set; } + public string? datachg_usr { get; set; } /// /// 资料更新时间 /// diff --git a/HotelManagerSystemWebApi.Core/Zero/Base/SexType.cs b/EOM.TSHotelManager.Core/Business/Customer/SexType.cs similarity index 84% rename from HotelManagerSystemWebApi.Core/Zero/Base/SexType.cs rename to EOM.TSHotelManager.Core/Business/Customer/SexType.cs index 94010d2..2e6eb95 100644 --- a/HotelManagerSystemWebApi.Core/Zero/Base/SexType.cs +++ b/EOM.TSHotelManager.Core/Business/Customer/SexType.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -22,21 +22,19 @@ * *模块说明:性别类 */ -using Furion.DatabaseAccessor; using System; using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace HotelManagerSystemWebApi.Core +namespace EOM.TSHotelManager.Core { /// /// 性别 /// - [Table("sextype")] - public class SexType : IEntity + [SqlSugar.SugarTable("sextype")] + public class SexType { /// /// 性别ID @@ -46,7 +44,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 性别名称 /// - public string sexName { get; set; } + public string? sexName { get; set; } /// /// 删除标记 @@ -55,7 +53,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料创建人 /// - public string datains_usr { get; set; } + public string? datains_usr { get; set; } /// /// 资料创建时间 /// @@ -63,7 +61,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料更新人 /// - public string datachg_usr { get; set; } + public string? datachg_usr { get; set; } /// /// 资料更新时间 /// diff --git a/HotelManagerSystemWebApi.Core/Business/Fonts/Fonts.cs b/EOM.TSHotelManager.Core/Business/Fonts/Fonts.cs similarity index 83% rename from HotelManagerSystemWebApi.Core/Business/Fonts/Fonts.cs rename to EOM.TSHotelManager.Core/Business/Fonts/Fonts.cs index 03cd520..04909a7 100644 --- a/HotelManagerSystemWebApi.Core/Business/Fonts/Fonts.cs +++ b/EOM.TSHotelManager.Core/Business/Fonts/Fonts.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -22,16 +22,13 @@ * *模块说明:宣传联动类 */ -using Furion.DatabaseAccessor; -using System.ComponentModel.DataAnnotations.Schema; - -namespace HotelManagerSystemWebApi.Core +namespace EOM.TSHotelManager.Core { /// /// 酒店宣传联动内容 /// - [Table("fonts")] - public class Fonts:IEntity + [SqlSugar.SugarTable("fonts")] + public class Fonts { /// /// 宣传内容编号 @@ -41,6 +38,6 @@ namespace HotelManagerSystemWebApi.Core /// /// 宣传内容 /// - public string FontsMess { get; set; } + public string? FontsMess { get; set; } } } diff --git a/HotelManagerSystemWebApi.Core/Business/Reser/Reser.cs b/EOM.TSHotelManager.Core/Business/Reser/Reser.cs similarity index 80% rename from HotelManagerSystemWebApi.Core/Business/Reser/Reser.cs rename to EOM.TSHotelManager.Core/Business/Reser/Reser.cs index 70d5bd1..35f111e 100644 --- a/HotelManagerSystemWebApi.Core/Business/Reser/Reser.cs +++ b/EOM.TSHotelManager.Core/Business/Reser/Reser.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -22,38 +22,36 @@ * *模块说明:预约类 */ -using Furion.DatabaseAccessor; using System; -using System.ComponentModel.DataAnnotations.Schema; -namespace HotelManagerSystemWebApi.Core +namespace EOM.TSHotelManager.Core { /// /// 预约列表 /// - [Table("reser")] - public class Reser:IEntity + [SqlSugar.SugarTable("reser")] + public class Reser { /// /// 预约编号 /// - public string ReserId { get; set; } + public string? ReserId { get; set; } /// /// 客户名称 /// - public string CustoName { get; set; } + public string? CustoName { get; set; } /// /// 预约电话 /// - public string CustoTel { get; set; } + public string? CustoTel { get; set; } /// /// 预约渠道 /// - public string ReserWay { get; set; } + public string? ReserWay { get; set; } /// /// 预约房号 /// - public string ReserRoom { get; set; } + public string? ReserRoom { get; set; } /// /// 预约起始 /// @@ -69,7 +67,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料创建人 /// - public string datains_usr { get; set; } + public string? datains_usr { get; set; } /// /// 资料创建时间 /// @@ -77,7 +75,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料更新人 /// - public string datachg_usr { get; set; } + public string? datachg_usr { get; set; } /// /// 资料更新时间 /// diff --git a/HotelManagerSystemWebApi.Core/Business/Room/Room.cs b/EOM.TSHotelManager.Core/Business/Room/Room.cs similarity index 60% rename from HotelManagerSystemWebApi.Core/Business/Room/Room.cs rename to EOM.TSHotelManager.Core/Business/Room/Room.cs index d9b81d0..51cab35 100644 --- a/HotelManagerSystemWebApi.Core/Business/Room/Room.cs +++ b/EOM.TSHotelManager.Core/Business/Room/Room.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -22,75 +22,87 @@ * *模块说明:房间类 */ -using Furion.DatabaseAccessor; using System; using System.ComponentModel.DataAnnotations.Schema; -namespace HotelManagerSystemWebApi.Core +namespace EOM.TSHotelManager.Core { /// /// 房间实体类 /// - [Table("room")] - public class Room:IEntity + [SqlSugar.SugarTable("room")] + public class Room { /// /// 房间编号 /// - public string RoomNo { get; set; } + [SqlSugar.SugarColumn(ColumnName = "room_no", IsPrimaryKey = true)] + public string? RoomNo { get; set; } /// /// 房间类型 /// + [SqlSugar.SugarColumn(ColumnName = "room_type")] public int RoomType { get; set; } /// /// 客户编号 /// - public string CustoNo { get; set; } + [SqlSugar.SugarColumn(ColumnName = "custo_no")] + public string? CustoNo { get; set; } + /// + /// 客户姓名 + /// + [SqlSugar.SugarColumn(IsIgnore = true)] + public string? CustoName { get; set; } /// /// 最后一次入住时间 /// + [SqlSugar.SugarColumn(ColumnName = "check_in_time")] public DateTime? CheckTime { get; set; } /// /// 最后一次退房时间 /// + [SqlSugar.SugarColumn(ColumnName = "check_out_time")] public DateTime? CheckOutTime { get; set; } /// /// 房间状态ID /// + [SqlSugar.SugarColumn(ColumnName = "room_state_id")] public int RoomStateId { get; set; } - ///// - ///// 房间状态 - ///// - //[SqlSugar.SugarColumn(IsIgnore = true)] - //public string RoomState { get; set; } + /// + /// 房间状态 + /// + [SqlSugar.SugarColumn(IsIgnore = true)] + public string? RoomState { get; set; } /// /// 房间单价 /// + [SqlSugar.SugarColumn(ColumnName = "room_rent")] public decimal RoomMoney { get; set; } /// /// 房间押金 /// - [Column("deposit")] + [SqlSugar.SugarColumn(ColumnName = "room_deposit")] public decimal RoomDeposit { get; set; } /// /// 房间位置 /// - public string RoomPosition { get; set; } - ///// - ///// 客户类型名称 - ///// - //[SqlSugar.SugarColumn(IsIgnore = true)] - //public string typeName { get; set; } - ///// - ///// 房间名称 - ///// - //[SqlSugar.SugarColumn(IsIgnore = true)] - //public string RoomName { get; set; } - ///// - ///// 最后一次入住时间 - ///// - //[SqlSugar.SugarColumn(IsIgnore = true)] - //public string CheckTimeFormat { get; set; } + [SqlSugar.SugarColumn(ColumnName = "room_position")] + public string? RoomPosition { get; set; } + /// + /// 客户类型名称 + /// + [SqlSugar.SugarColumn(IsIgnore = true)] + public string? typeName { get; set; } + /// + /// 房间名称 + /// + [SqlSugar.SugarColumn(IsIgnore = true)] + public string? RoomName { get; set; } + /// + /// 最后一次入住时间 + /// + [SqlSugar.SugarColumn(IsIgnore = true)] + public string? CheckTimeFormat { get; set; } /// /// 删除标记 /// @@ -98,7 +110,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料创建人 /// - public string datains_usr { get; set; } + public string? datains_usr { get; set; } /// /// 资料创建时间 /// @@ -106,7 +118,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料更新人 /// - public string datachg_usr { get; set; } + public string? datachg_usr { get; set; } /// /// 资料更新时间 /// diff --git a/HotelManagerSystemWebApi.Core/Business/Room/RoomState.cs b/EOM.TSHotelManager.Core/Business/Room/RoomState.cs similarity index 82% rename from HotelManagerSystemWebApi.Core/Business/Room/RoomState.cs rename to EOM.TSHotelManager.Core/Business/Room/RoomState.cs index 67a96c7..280159b 100644 --- a/HotelManagerSystemWebApi.Core/Business/Room/RoomState.cs +++ b/EOM.TSHotelManager.Core/Business/Room/RoomState.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -22,18 +22,15 @@ * *模块说明:房间状态类 */ - -using Furion.DatabaseAccessor; using System; -using System.ComponentModel.DataAnnotations.Schema; -namespace HotelManagerSystemWebApi.Core +namespace EOM.TSHotelManager.Core { /// /// 房间状态 /// - [Table("roomstate")] - public class RoomState:IEntity + [SqlSugar.SugarTable("roomstate")] + public class RoomState { /// /// 房间状态编号 @@ -42,8 +39,8 @@ namespace HotelManagerSystemWebApi.Core /// /// 房间状态 /// - [Column("RoomState")] - public string RoomStateName { get; set; } + [SqlSugar.SugarColumn(ColumnName = "RoomState")] + public string? RoomStateName { get; set; } /// /// 删除标记 /// @@ -51,7 +48,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料创建人 /// - public string datains_usr { get; set; } + public string? datains_usr { get; set; } /// /// 资料创建时间 /// @@ -59,7 +56,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料更新人 /// - public string datachg_usr { get; set; } + public string? datachg_usr { get; set; } /// /// 资料更新时间 /// diff --git a/HotelManagerSystemWebApi.Core/Business/Room/RoomType.cs b/EOM.TSHotelManager.Core/Business/Room/RoomType.cs similarity index 80% rename from HotelManagerSystemWebApi.Core/Business/Room/RoomType.cs rename to EOM.TSHotelManager.Core/Business/Room/RoomType.cs index c74c119..bce36c8 100644 --- a/HotelManagerSystemWebApi.Core/Business/Room/RoomType.cs +++ b/EOM.TSHotelManager.Core/Business/Room/RoomType.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -22,28 +22,25 @@ * *模块说明:房间类型类 */ -using Furion.DatabaseAccessor; using System; -using System.ComponentModel.DataAnnotations.Schema; -namespace HotelManagerSystemWebApi.Core +namespace EOM.TSHotelManager.Core { /// /// 房间类型 /// - [Table("roomtype")] - public class RoomType:IEntity + [SqlSugar.SugarTable("roomtype")] + public class RoomType { /// /// 类型编号 /// - //[SqlSugar.SugarColumn(ColumnName = "RoomType")] - [Column("RoomType")] + [SqlSugar.SugarColumn(ColumnName = "RoomType")] public int Roomtype { get; set; } /// /// 房间类型 /// - public string RoomName { get; set; } + public string? RoomName { get; set; } /// /// 删除标记 @@ -52,7 +49,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料创建人 /// - public string datains_usr { get; set; } + public string? datains_usr { get; set; } /// /// 资料创建时间 /// @@ -60,7 +57,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料更新人 /// - public string datachg_usr { get; set; } + public string? datachg_usr { get; set; } /// /// 资料更新时间 /// diff --git a/HotelManagerSystemWebApi.Core/Business/Sellthing/SellThing.cs b/EOM.TSHotelManager.Core/Business/Sellthing/SellThing.cs similarity index 80% rename from HotelManagerSystemWebApi.Core/Business/Sellthing/SellThing.cs rename to EOM.TSHotelManager.Core/Business/Sellthing/SellThing.cs index 304d08a..ba30d73 100644 --- a/HotelManagerSystemWebApi.Core/Business/Sellthing/SellThing.cs +++ b/EOM.TSHotelManager.Core/Business/Sellthing/SellThing.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -25,35 +25,35 @@ using System; using System.ComponentModel.DataAnnotations.Schema; -namespace HotelManagerSystemWebApi.Core +namespace EOM.TSHotelManager.Core { /// /// 商品信息 /// - [Table("sellthing")] + [SqlSugar.SugarTable("sellthing")] public class SellThing { /// /// 商品编号 /// - public string SellNo { get; set; } + public string? SellNo { get; set; } /// /// 商品名称 /// - public string SellName { get; set; } + public string? SellName { get; set; } /// /// 商品价格 /// public decimal SellPrice { get; set; } - ///// - ///// 商品价格描述 - ///// - //[SqlSugar.SugarColumn(IsIgnore = true)] - //public string SellPriceStr { get; set; } + /// + /// 商品价格描述 + /// + [SqlSugar.SugarColumn(IsIgnore = true)] + public string? SellPriceStr { get; set; } /// /// 规格型号 /// - public string format { get; set; } + public string? format { get; set; } /// /// 库存 /// @@ -65,7 +65,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料创建人 /// - public string datains_usr { get; set; } + public string? datains_usr { get; set; } /// /// 资料创建时间 /// @@ -73,7 +73,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料更新人 /// - public string datachg_usr { get; set; } + public string? datachg_usr { get; set; } /// /// 资料更新时间 /// diff --git a/HotelManagerSystemWebApi.Core/Business/Spend/Spend.cs b/EOM.TSHotelManager.Core/Business/Spend/Spend.cs similarity index 69% rename from HotelManagerSystemWebApi.Core/Business/Spend/Spend.cs rename to EOM.TSHotelManager.Core/Business/Spend/Spend.cs index 0482a96..d61e759 100644 --- a/HotelManagerSystemWebApi.Core/Business/Spend/Spend.cs +++ b/EOM.TSHotelManager.Core/Business/Spend/Spend.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -22,30 +22,28 @@ * *模块说明:消费信息类 */ -using Furion.DatabaseAccessor; using System; -using System.ComponentModel.DataAnnotations.Schema; -namespace HotelManagerSystemWebApi.Core +namespace EOM.TSHotelManager.Core { /// /// 消费信息 /// - [Table("custospend")] - public class Spend:IEntity + [SqlSugar.SugarTable("custospend")] + public class Spend { /// /// 房间编号 /// - public string RoomNo { get; set; } + public string? RoomNo { get; set; } /// /// 客户编号 /// - public string CustoNo { get; set; } + public string? CustoNo { get; set; } /// /// 商品名称 /// - public string SpendName { get; set; } + public string? SpendName { get; set; } /// /// 消费数量 /// @@ -54,20 +52,20 @@ namespace HotelManagerSystemWebApi.Core /// 商品单价 /// public decimal SpendPrice { get; set; } - ///// - ///// 商品单价描述 - ///// - //[SqlSugar.SugarColumn(IsIgnore = true)] - //public string SpendPriceStr { get; set; } + /// + /// 商品单价描述 + /// + [SqlSugar.SugarColumn(IsIgnore = true)] + public string? SpendPriceStr { get; set; } /// /// 消费金额 /// public decimal SpendMoney { get; set; } - ///// - ///// 消费金额描述 - ///// - //[SqlSugar.SugarColumn(IsIgnore = true)] - //public string SpendMoneyStr { get; set; } + /// + /// 消费金额描述 + /// + [SqlSugar.SugarColumn(IsIgnore = true)] + public string? SpendMoneyStr { get; set; } /// /// 消费时间 /// @@ -75,7 +73,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 结算状态 /// - public string MoneyState { get; set; } + public string? MoneyState { get; set; } /// /// 删除标记 /// @@ -83,7 +81,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料创建人 /// - public string datains_usr { get; set; } + public string? datains_usr { get; set; } /// /// 资料创建时间 /// @@ -91,16 +89,16 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料更新人 /// - public string datachg_usr { get; set; } + public string? datachg_usr { get; set; } /// /// 资料更新时间 /// public DateTime datachg_date { get; set; } - ///// - ///// 结算状态描述 - ///// - //[SqlSugar.SugarColumn(IsIgnore = true)] - //public string SpendStateNm { get; set; } + /// + /// 结算状态描述 + /// + [SqlSugar.SugarColumn(IsIgnore = true)] + public string? SpendStateNm { get; set; } } } diff --git a/HotelManagerSystemWebApi.Core/Business/Spend/SpendConsts.cs b/EOM.TSHotelManager.Core/Business/Spend/SpendConsts.cs similarity index 88% rename from HotelManagerSystemWebApi.Core/Business/Spend/SpendConsts.cs rename to EOM.TSHotelManager.Core/Business/Spend/SpendConsts.cs index 32d8547..4aba97b 100644 --- a/HotelManagerSystemWebApi.Core/Business/Spend/SpendConsts.cs +++ b/EOM.TSHotelManager.Core/Business/Spend/SpendConsts.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -28,7 +28,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace HotelManagerSystemWebApi.Core +namespace EOM.TSHotelManager.Core { /// /// 结算状态常量 @@ -38,11 +38,11 @@ namespace HotelManagerSystemWebApi.Core /// /// 已结算状态常量 /// - public const string Settled = "Settled"; + public const string? Settled = "Settled"; /// /// 未结算状态常量 /// - public const string UnSettle = "UnSettle"; + public const string? UnSettle = "UnSettle"; } } diff --git a/HotelManagerSystemWebApi.Core/Business/Hydropower/Hydropower.cs b/EOM.TSHotelManager.Core/Business/Wti/Wti.cs similarity index 73% rename from HotelManagerSystemWebApi.Core/Business/Hydropower/Hydropower.cs rename to EOM.TSHotelManager.Core/Business/Wti/Wti.cs index e80f6b7..8a17560 100644 --- a/HotelManagerSystemWebApi.Core/Business/Hydropower/Hydropower.cs +++ b/EOM.TSHotelManager.Core/Business/Wti/Wti.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -22,67 +22,65 @@ * *模块说明:水电信息类 */ -using Furion.DatabaseAccessor; using System; -using System.ComponentModel.DataAnnotations.Schema; -namespace HotelManagerSystemWebApi.Core +namespace EOM.TSHotelManager.Core { /// /// 水电信息 /// - [Table("wtinfo")] - public class Hydropower:IEntity + [SqlSugar.SugarTable("wtinfo")] + public class Wti { /// /// 信息编号 /// - [Column("WtiNo")] + [SqlSugar.SugarColumn(ColumnName = "WtiNo",IsIdentity =true,IsPrimaryKey =true)] public int WtiNo { get; set; } /// /// 房间编号 /// - [Column("RoomNo")] - public string RoomNo { get; set; } + [SqlSugar.SugarColumn(ColumnName = "RoomNo")] + public string? RoomNo { get; set; } /// /// 开始使用时间 /// - [Column("UseDate")] + [SqlSugar.SugarColumn(ColumnName = "UseDate")] public DateTime UseDate { get; set; } /// /// 结束使用时间 /// - [Column("EndDate")] + [SqlSugar.SugarColumn(ColumnName = "EndDate")] public DateTime EndDate { get; set; } /// /// 水费 /// - [Column( "WaterUse")] + [SqlSugar.SugarColumn(ColumnName = "WaterUse")] public decimal WaterUse { get; set; } /// /// 电费 /// - [Column("PowerUse")] + [SqlSugar.SugarColumn(ColumnName = "PowerUse")] public decimal PowerUse { get; set; } /// /// 记录员 /// - [Column("Record")] - public string Record { get; set; } + [SqlSugar.SugarColumn(ColumnName = "Record")] + public string? Record { get; set; } /// /// 客户编号 /// - [Column("CustoNo")] - public string CustoNo { get; set; } + [SqlSugar.SugarColumn(ColumnName = "CustoNo")] + public string? CustoNo { get; set; } /// /// 删除标记 /// - [Column("delete_mk")] + [SqlSugar.SugarColumn(ColumnName = "delete_mk")] public int delete_mk { get; set; } /// /// 资料创建人 /// - public string datains_usr { get; set; } + public string? datains_usr { get; set; } /// /// 资料创建时间 /// @@ -90,7 +88,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料更新人 /// - public string datachg_usr { get; set; } + public string? datachg_usr { get; set; } /// /// 资料更新时间 /// diff --git a/EOM.TSHotelManager.Core/EOM.TSHotelManager.Core.csproj b/EOM.TSHotelManager.Core/EOM.TSHotelManager.Core.csproj new file mode 100644 index 0000000..fe414e4 --- /dev/null +++ b/EOM.TSHotelManager.Core/EOM.TSHotelManager.Core.csproj @@ -0,0 +1,14 @@ + + + + net6.0 + enable + enable + True + + + + + + + diff --git a/HotelManagerSystemWebApi.Application/Business/Sellthing/Temp/Temp_Sellthing.cs b/EOM.TSHotelManager.Core/Sys/NavBar/NavBar.cs similarity index 50% rename from HotelManagerSystemWebApi.Application/Business/Sellthing/Temp/Temp_Sellthing.cs rename to EOM.TSHotelManager.Core/Sys/NavBar/NavBar.cs index 538efa4..36abd75 100644 --- a/HotelManagerSystemWebApi.Application/Business/Sellthing/Temp/Temp_Sellthing.cs +++ b/EOM.TSHotelManager.Core/Sys/NavBar/NavBar.cs @@ -4,55 +4,57 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Core { /// - /// 商品信息 + /// 导航控件实体类 /// - public class Temp_Sellthing + [SqlSugar.SugarTable("nav_bar")] + public class NavBar { /// - /// 商品编号 + /// 导航控件ID /// - public string SellNo { get; set; } + [SqlSugar.SugarColumn(IsIdentity =true)] + public int nav_id { get; set; } /// - /// 商品名称 + /// 导航控件名称 /// - public string SellName { get; set; } + public string? nav_name { get; set; } /// - /// 商品价格 + /// 导航控件排序 /// - public decimal SellPrice { get; set; } + public int nav_or { get; set; } /// - /// 商品价格描述 + /// 导航控件图片 /// - public string SellPriceStr { get; set; } + public string? nav_pic { get; set; } /// - /// 规格型号 + /// 导航控件事件 /// - public string format { get; set; } + public string? nav_event { get; set; } /// - /// 库存 + /// 导航控件事件 /// - public decimal Stock { get; set; } + public int margin_left { get; set; } /// /// 删除标记 /// public int delete_mk { get; set; } /// - /// 资料创建人 + /// 新增人 /// - public string datains_usr { get; set; } + public string? datains_usr { get; set; } /// - /// 资料创建时间 + /// 新增时间 /// public DateTime datains_date { get; set; } /// - /// 资料更新人 + /// 修改人 /// - public string datachg_usr { get; set; } + public string? datachg_usr { get; set; } /// - /// 资料更新时间 + /// 修改时间 /// public DateTime datachg_date { get; set; } } diff --git a/HotelManagerSystemWebApi.Core/Worker/Goodbad/GBType.cs b/EOM.TSHotelManager.Core/Worker/GBType.cs similarity index 86% rename from HotelManagerSystemWebApi.Core/Worker/Goodbad/GBType.cs rename to EOM.TSHotelManager.Core/Worker/GBType.cs index 56101d2..32858c6 100644 --- a/HotelManagerSystemWebApi.Core/Worker/Goodbad/GBType.cs +++ b/EOM.TSHotelManager.Core/Worker/GBType.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -23,14 +23,13 @@ *模块说明:奖惩类型类 */ using System; -using System.ComponentModel.DataAnnotations.Schema; -namespace SYS.Application +namespace EOM.TSHotelManager.Application { /// /// 奖惩类型实体类 /// - [Table("gbtype")] + [SqlSugar.SugarTable("gbtype")] public class GBType { /// @@ -41,7 +40,7 @@ namespace SYS.Application /// /// 奖惩名称 /// - public string GBName { get; set; } + public string? GBName { get; set; } /// /// 删除标记 @@ -51,7 +50,7 @@ namespace SYS.Application /// /// 资料新增人 /// - public string datains_usr { get; set; } + public string? datains_usr { get; set; } /// /// 资料新增日期 @@ -61,7 +60,7 @@ namespace SYS.Application /// /// 资料更新人 /// - public string datachg_usr { get; set; } + public string? datachg_usr { get; set; } /// /// 资料更新日期 diff --git a/HotelManagerSystemWebApi.Core/Worker/WorkerInfo/Worker.cs b/EOM.TSHotelManager.Core/Worker/Worker.cs similarity index 53% rename from HotelManagerSystemWebApi.Core/Worker/WorkerInfo/Worker.cs rename to EOM.TSHotelManager.Core/Worker/Worker.cs index 7c2624f..e475ecd 100644 --- a/HotelManagerSystemWebApi.Core/Worker/WorkerInfo/Worker.cs +++ b/EOM.TSHotelManager.Core/Worker/Worker.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -22,93 +22,91 @@ * *模块说明:员工信息类 */ -using Furion.DatabaseAccessor; using System; -using System.ComponentModel.DataAnnotations.Schema; -namespace HotelManagerSystemWebApi.Core +namespace EOM.TSHotelManager.Core { /// /// 员工信息 /// - [Table("worker")] - public class Worker : IEntity + [SqlSugar.SugarTable("worker")] + public class Worker { /// /// 员工账号/工号 /// - [Column("WorkerId")] - public string WorkerId { get; set; } + [SqlSugar.SugarColumn(ColumnName = "WorkerId")] + public string? WorkerId { get; set; } /// /// 员工姓名 /// - [Column("WorkerName")] - public string WorkerName { get; set; } + [SqlSugar.SugarColumn(ColumnName = "WorkerName")] + public string? WorkerName { get; set; } /// /// 出生日期 /// - [Column("WorkerBirthday")] + [SqlSugar.SugarColumn(ColumnName = "WorkerBirthday")] public DateTime WorkerBirthday { get; set; } /// /// 员工性别 /// - [Column("WorkerSex")] + [SqlSugar.SugarColumn(ColumnName = "WorkerSex")] public int WorkerSex { get; set; } - ///// - ///// 员工性别(名称描述) - ///// - //[SqlSugar.SugarColumn(IsIgnore = true)] - //public string WorkerSexName { get; set; } + /// + /// 员工性别(名称描述) + /// + [SqlSugar.SugarColumn(IsIgnore = true)] + public string? WorkerSexName { get; set; } /// /// 民族类型 /// - [Column("WorkerNation")] - public string WorkerNation { get; set; } - ///// - ///// 民族名称 - ///// - //[SqlSugar.SugarColumn(IsIgnore = true)] - //public string NationName { get; set; } + [SqlSugar.SugarColumn(ColumnName = "WorkerNation")] + public string? WorkerNation { get; set; } + /// + /// 民族名称 + /// + [SqlSugar.SugarColumn(IsIgnore = true)] + public string? NationName { get; set; } /// /// 员工电话 /// - [Column("WorkerTel")] - public string WorkerTel { get; set; } + [SqlSugar.SugarColumn(ColumnName = "WorkerTel")] + public string? WorkerTel { get; set; } /// /// 所属部门 /// - [Column("WorkerClub")] - public string WorkerClub { get; set; } - ///// - ///// 部门名称 - ///// - //[SqlSugar.SugarColumn(IsIgnore = true)] - //public string ClubName { get; set; } + [SqlSugar.SugarColumn(ColumnName = "WorkerClub")] + public string? WorkerClub { get; set; } + /// + /// 部门名称 + /// + [SqlSugar.SugarColumn(IsIgnore = true)] + public string? ClubName { get; set; } /// /// 居住地址 /// - [Column("WorkerAddress")] - public string WorkerAddress { get; set; } + [SqlSugar.SugarColumn(ColumnName = "WorkerAddress")] + public string? WorkerAddress { get; set; } /// /// 员工职位 /// - [Column("WorkerPosition")] - public string WorkerPosition { get; set; } - ///// - ///// 职位名称 - ///// - //[SqlSugar.SugarColumn(IsIgnore = true)] - //public string PositionName { get; set; } + [SqlSugar.SugarColumn(ColumnName = "WorkerPosition")] + public string? WorkerPosition { get; set; } + /// + /// 职位名称 + /// + [SqlSugar.SugarColumn(IsIgnore = true)] + public string? PositionName { get; set; } /// /// 证件号码 /// - [Column("CardID")] - public string CardId { get; set; } + [SqlSugar.SugarColumn(ColumnName = "CardID")] + public string? CardId { get; set; } /// /// 员工密码 /// - [Column("WorkerPwd")] - public string WorkerPwd { get; set; } + [SqlSugar.SugarColumn(IsOnlyIgnoreInsert = true)] + public string? WorkerPwd { get; set; } /// /// 员工入职时间 /// @@ -116,21 +114,21 @@ namespace HotelManagerSystemWebApi.Core /// /// 员工面貌 /// - public string WorkerFace { get; set; } - ///// - ///// 群众面貌描述 - ///// - //[SqlSugar.SugarColumn(IsIgnore = true)] - //public string FaceName { get; set; } + public string? WorkerFace { get; set; } + /// + /// 群众面貌描述 + /// + [SqlSugar.SugarColumn(IsIgnore = true)] + public string? FaceName { get; set; } /// /// 教育程度 /// - public string WorkerEducation { get; set; } - ///// - ///// 教育程度名称 - ///// - //[SqlSugar.SugarColumn(IsIgnore = true)] - //public string EducationName { get; set; } + public string? WorkerEducation { get; set; } + /// + /// 教育程度名称 + /// + [SqlSugar.SugarColumn(IsIgnore = true)] + public string? EducationName { get; set; } /// /// 删除标记 /// @@ -138,7 +136,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料创建人 /// - public string datains_usr { get; set; } + public string? datains_usr { get; set; } /// /// 资料创建时间 /// @@ -146,7 +144,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料更新人 /// - public string datachg_usr { get; set; } + public string? datachg_usr { get; set; } /// /// 资料更新时间 /// diff --git a/HotelManagerSystemWebApi.Core/Worker/WorkerCheck/WorkerCheck.cs b/EOM.TSHotelManager.Core/Worker/WorkerCheck.cs similarity index 75% rename from HotelManagerSystemWebApi.Core/Worker/WorkerCheck/WorkerCheck.cs rename to EOM.TSHotelManager.Core/Worker/WorkerCheck.cs index 1644847..8e13365 100644 --- a/HotelManagerSystemWebApi.Core/Worker/WorkerCheck/WorkerCheck.cs +++ b/EOM.TSHotelManager.Core/Worker/WorkerCheck.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -22,22 +22,25 @@ * *模块说明:打卡考勤类 */ -using Furion.DatabaseAccessor; using System; -using System.ComponentModel.DataAnnotations.Schema; -namespace HotelManagerSystemWebApi.Core +namespace EOM.TSHotelManager.Core { /// /// 员工打卡考勤 /// - [Table("workercheck")] - public class WorkerCheck:EntityBase + [SqlSugar.SugarTable("workercheck")] + public class WorkerCheck { + /// + /// 编号 + /// + [SqlSugar.SugarColumn(IsOnlyIgnoreInsert = true, IsOnlyIgnoreUpdate = true)] + public int Id { get; set; } /// /// 工号 /// - public string WorkerNo { get; set; } + public string? WorkerNo { get; set; } /// /// 打卡时间 /// @@ -45,17 +48,17 @@ namespace HotelManagerSystemWebApi.Core /// /// 打卡方式 /// - public string CheckWay { get; set; } + public string? CheckWay { get; set; } /// /// 打卡状态 /// public int CheckState { get; set; } - ///// - ///// 打卡状态 - ///// - //[SqlSugar.SugarColumn(IsIgnore = true)] - //public string CheckStateNm { get; set; } + /// + /// 打卡状态 + /// + [SqlSugar.SugarColumn(IsIgnore = true)] + public string? CheckStateNm { get; set; } /// /// 删除标记 /// @@ -63,7 +66,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料创建人 /// - public string datains_usr { get; set; } + public string? datains_usr { get; set; } /// /// 资料创建时间 /// @@ -71,7 +74,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料更新人 /// - public string datachg_usr { get; set; } + public string? datachg_usr { get; set; } /// /// 资料更新时间 /// diff --git a/HotelManagerSystemWebApi.Core/Worker/Goodbad/WorkerGoodBad.cs b/EOM.TSHotelManager.Core/Worker/WorkerGoodBad.cs similarity index 71% rename from HotelManagerSystemWebApi.Core/Worker/Goodbad/WorkerGoodBad.cs rename to EOM.TSHotelManager.Core/Worker/WorkerGoodBad.cs index f72ed1b..7714c5c 100644 --- a/HotelManagerSystemWebApi.Core/Worker/Goodbad/WorkerGoodBad.cs +++ b/EOM.TSHotelManager.Core/Worker/WorkerGoodBad.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -22,30 +22,33 @@ * *模块说明:员工奖惩类 */ -using Furion.DatabaseAccessor; using System; using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace HotelManagerSystemWebApi.Core +namespace EOM.TSHotelManager.Core { /// /// 员工奖罚 /// - [Table("workergoodbad")] - public class WorkerGoodBad:EntityBase + [SqlSugar.SugarTable("workergoodbad")] + public class WorkerGoodBad { + /// + /// 编号 + /// + [SqlSugar.SugarColumn(IsOnlyIgnoreInsert = true, IsOnlyIgnoreUpdate = true)] + public int Id { get; set; } /// /// 工号 /// - public string WorkNo { get; set; } + public string? WorkNo { get; set; } /// /// 奖惩信息 /// - public string GBInfo { get; set; } + public string? GBInfo { get; set; } /// /// 奖惩类型 /// @@ -53,21 +56,21 @@ namespace HotelManagerSystemWebApi.Core /// /// 奖惩操作人 /// - public string GBOperation { get; set; } - ///// - ///// 奖惩操作人 - ///// - //[SqlSugar.SugarColumn(IsIgnore = true)] - //public string OperationName { get; set; } + public string? GBOperation { get; set; } + /// + /// 奖惩操作人 + /// + [SqlSugar.SugarColumn(IsIgnore = true)] + public string? OperationName { get; set; } /// /// 奖惩时间 /// public DateTime GBTime { get; set; } - ///// - ///// 类型名称 - ///// - //[SqlSugar.SugarColumn(IsIgnore = true)] - //public string TypeName { get; set; } + /// + /// 类型名称 + /// + [SqlSugar.SugarColumn(IsIgnore = true)] + public string? TypeName { get; set; } /// /// 删除标记 /// @@ -75,7 +78,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料创建人 /// - public string datains_usr { get; set; } + public string? datains_usr { get; set; } /// /// 资料创建时间 /// @@ -83,7 +86,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料更新人 /// - public string datachg_usr { get; set; } + public string? datachg_usr { get; set; } /// /// 资料更新时间 /// diff --git a/HotelManagerSystemWebApi.Core/Worker/History/WorkerHistory.cs b/EOM.TSHotelManager.Core/Worker/WorkerHistory.cs similarity index 78% rename from HotelManagerSystemWebApi.Core/Worker/History/WorkerHistory.cs rename to EOM.TSHotelManager.Core/Worker/WorkerHistory.cs index 55da25f..73fec9e 100644 --- a/HotelManagerSystemWebApi.Core/Worker/History/WorkerHistory.cs +++ b/EOM.TSHotelManager.Core/Worker/WorkerHistory.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -22,22 +22,25 @@ * *模块说明:履历类 */ -using Furion.DatabaseAccessor; using System; -using System.ComponentModel.DataAnnotations.Schema; -namespace HotelManagerSystemWebApi.Core +namespace EOM.TSHotelManager.Core { /// /// 员工履历 /// - [Table("workerhistory")] - public class WorkerHistory:EntityBase + [SqlSugar.SugarTable("workerhistory")] + public class WorkerHistory { + /// + /// 编号 + /// + [SqlSugar.SugarColumn(IsOnlyIgnoreInsert = true,IsOnlyIgnoreUpdate = true)] + public int Id { get; set; } /// /// 工号 /// - public string WorkerId { get; set; } + public string? WorkerId { get; set; } /// /// 开始时间 /// @@ -49,11 +52,11 @@ namespace HotelManagerSystemWebApi.Core /// /// 职位 /// - public string Position { get; set; } + public string? Position { get; set; } /// /// 公司 /// - public string Company { get; set; } + public string? Company { get; set; } /// /// 删除标记 /// @@ -61,7 +64,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料创建人 /// - public string datains_usr { get; set; } + public string? datains_usr { get; set; } /// /// 资料创建时间 /// @@ -69,7 +72,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料更新人 /// - public string datachg_usr { get; set; } + public string? datachg_usr { get; set; } /// /// 资料更新时间 /// diff --git a/HotelManagerSystemWebApi.Application/Worker/WorkerPic/Temp/Temp_WorkerPic.cs b/EOM.TSHotelManager.Core/Worker/WorkerPic.cs similarity index 50% rename from HotelManagerSystemWebApi.Application/Worker/WorkerPic/Temp/Temp_WorkerPic.cs rename to EOM.TSHotelManager.Core/Worker/WorkerPic.cs index 969352a..e77a6ed 100644 --- a/HotelManagerSystemWebApi.Application/Worker/WorkerPic/Temp/Temp_WorkerPic.cs +++ b/EOM.TSHotelManager.Core/Worker/WorkerPic.cs @@ -1,28 +1,33 @@ using System; using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.Core { /// /// 员工照片 /// - public class Temp_WorkerPic + [SqlSugar.SugarTable("workerpic")] + public class WorkerPic { /// /// 自增长流水号 /// + [SqlSugar.SugarColumn(IsIdentity = true,ColumnName = "Id",IsPrimaryKey = true)] public int Id { get; set; } /// /// 工号 /// - public string WorkerId { get; set; } + [SqlSugar.SugarColumn(ColumnName = "WorkerId")] + public string? WorkerId { get; set; } /// /// 照片路径 /// - public string Pic { get; set; } + [SqlSugar.SugarColumn(ColumnName = "Pic")] + public string? Pic { get; set; } } } diff --git a/EOM.TSHotelManager.Core/Zero/Admin.cs b/EOM.TSHotelManager.Core/Zero/Admin.cs new file mode 100644 index 0000000..58848ee --- /dev/null +++ b/EOM.TSHotelManager.Core/Zero/Admin.cs @@ -0,0 +1,125 @@ +/* + * 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.TSHotelManager.Core +{ + /// + /// 管理员实体类 + /// + [SqlSugar.SugarTable("admininfo")] + public class Admin + { + /// + /// 构造函数 + /// + public Admin() + { + } + + /// + /// 编号 + /// + public int Id { get; set; } + + private string? _AdminAccount; + /// + /// 管理员账号 + /// + [SqlSugar.SugarColumn(IsPrimaryKey = true)] + public string? AdminAccount { get { return this._AdminAccount; } set { this._AdminAccount = value; } } + + private string? _AdminPassword; + /// + /// 管理员密码 + /// + public string? AdminPassword { get { return this._AdminPassword; } set { this._AdminPassword = value; } } + + private string? _AdminType; + /// + /// 管理员类型 + /// + public string? AdminType { get { return this._AdminType; } set { this._AdminType = value; } } + + private string? _AdminName; + /// + /// 管理员名称 + /// + public string? AdminName { get { return this._AdminName; } set { this._AdminName = value; } } + + private System.Int32 _IsAdmin; + /// + /// 是否为超级管理员 + /// + public System.Int32 IsAdmin { get { return this._IsAdmin; } set { this._IsAdmin = value; } } + + private System.Int32 _DeleteMk; + /// + /// 删除标记 + /// + public System.Int32 DeleteMk { get { return this._DeleteMk; } set { this._DeleteMk = value; } } + + private string? _datains_usr; + /// + /// 资料新增人 + /// + public string? datains_usr { get { return this._datains_usr; } set { this._datains_usr = value; } } + + private System.DateTime? _datains_time; + /// + /// 资料新增时间 + /// + public System.DateTime? datains_time { get { return this._datains_time; } set { this._datains_time = value; } } + + private string? _datachg_usr; + /// + /// 资料更新人 + /// + public string? datachg_usr { get { return this._datachg_usr; } set { this._datachg_usr = value; } } + + private System.DateTime? _datachg_time; + /// + /// 资料更新时间 + /// + public System.DateTime? datachg_time { get { return this._datachg_time; } set { this._datachg_time = value; } } + + /// + /// 管理员类型描述 + /// + [SqlSugar.SugarColumn(IsIgnore = true)] + public string? IsAdminNm { get; set; } + + /// + /// 管理员类型 + /// + [SqlSugar.SugarColumn(IsIgnore = true)] + public string? TypeName { get; set; } + + /// + /// 删除标记描述 + /// + [SqlSugar.SugarColumn(IsIgnore = true)] + public string? DeleteNm { get; set; } + + } +} diff --git a/HotelManagerSystemWebApi.Core/Zero/AdminInfo/AdminType.cs b/EOM.TSHotelManager.Core/Zero/AdminType.cs similarity index 82% rename from HotelManagerSystemWebApi.Core/Zero/AdminInfo/AdminType.cs rename to EOM.TSHotelManager.Core/Zero/AdminType.cs index c975b6a..9eb2e5d 100644 --- a/HotelManagerSystemWebApi.Core/Zero/AdminInfo/AdminType.cs +++ b/EOM.TSHotelManager.Core/Zero/AdminType.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -22,21 +22,19 @@ * *模块说明:管理员类型 */ -using Furion.DatabaseAccessor; using System; using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace HotelManagerSystemWebApi.Core +namespace EOM.TSHotelManager.Core { /// /// 管理员类型 /// - [Table("admintype")] - public class AdminType:IEntity + [SqlSugar.SugarTable("admintype")] + public class AdminType { /// /// 编号 @@ -46,12 +44,12 @@ namespace HotelManagerSystemWebApi.Core /// /// 管理员类型 /// - public string type_id { get; set; } + public string? type_id { get; set; } /// /// 类型名称 /// - public string type_name { get; set; } + public string? type_name { get; set; } /// /// 删除标记 @@ -61,7 +59,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 新增人 /// - public string datains_usr { get; set; } + public string? datains_usr { get; set; } /// /// 新增时间 /// @@ -69,7 +67,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 修改人 /// - public string datachg_usr { get; set; } + public string? datachg_usr { get; set; } /// /// 修改时间 /// diff --git a/HotelManagerSystemWebApi.Core/Zero/Base.cs b/EOM.TSHotelManager.Core/Zero/Base.cs similarity index 86% rename from HotelManagerSystemWebApi.Core/Zero/Base.cs rename to EOM.TSHotelManager.Core/Zero/Base.cs index 3c119db..d89ea14 100644 --- a/HotelManagerSystemWebApi.Core/Zero/Base.cs +++ b/EOM.TSHotelManager.Core/Zero/Base.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -24,14 +24,16 @@ */ using System; using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace HotelManagerSystemWebApi.Core +namespace EOM.TSHotelManager.Core { - [Table("base")] + /// + /// 系统信息 + /// + [SqlSugar.SugarTable("base")] public class Base { /// @@ -42,6 +44,6 @@ namespace HotelManagerSystemWebApi.Core /// /// 地址 /// - public string url_addr { get; set; } + public string? url_addr { get; set; } } } diff --git a/HotelManagerSystemWebApi.Core/Zero/CheckInfo/CheckInfo.cs b/EOM.TSHotelManager.Core/Zero/CheckInfo.cs similarity index 78% rename from HotelManagerSystemWebApi.Core/Zero/CheckInfo/CheckInfo.cs rename to EOM.TSHotelManager.Core/Zero/CheckInfo.cs index bda798a..be947cf 100644 --- a/HotelManagerSystemWebApi.Core/Zero/CheckInfo/CheckInfo.cs +++ b/EOM.TSHotelManager.Core/Zero/CheckInfo.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -22,34 +22,32 @@ * *模块说明:监管统计类 */ -using Furion.DatabaseAccessor; using System; -using System.ComponentModel.DataAnnotations.Schema; -namespace HotelManagerSystemWebApi.Core +namespace EOM.TSHotelManager.Core { /// /// 监管统计 /// - [Table("checkinfo")] - public class CheckInfo : IEntity + [SqlSugar.SugarTable("checkinfo")] + public class CheckInfo { /// /// 监管统计编号 /// - public string CheckNo { get; set; } + public string? CheckNo { get; set; } /// /// 监管部门 /// - public string CheckClub { get; set; } + public string? CheckClub { get; set; } /// /// 监管进度 /// - public string CheckProgres { get; set; } + public string? CheckProgres { get; set; } /// /// /// - public string CheckCash { get; set; } + public string? CheckCash { get; set; } /// /// /// @@ -57,11 +55,11 @@ namespace HotelManagerSystemWebApi.Core /// /// /// - public string CheckPerson { get; set; } + public string? CheckPerson { get; set; } /// /// /// - public string CheckAdvice { get; set; } + public string? CheckAdvice { get; set; } /// /// 删除标记 @@ -70,7 +68,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料创建人 /// - public string datains_usr { get; set; } + public string? datains_usr { get; set; } /// /// 资料创建时间 /// @@ -78,7 +76,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料更新人 /// - public string datachg_usr { get; set; } + public string? datachg_usr { get; set; } /// /// 资料更新时间 /// diff --git a/HotelManagerSystemWebApi.Core/Zero/Base/Dept.cs b/EOM.TSHotelManager.Core/Zero/Dept.cs similarity index 71% rename from HotelManagerSystemWebApi.Core/Zero/Base/Dept.cs rename to EOM.TSHotelManager.Core/Zero/Dept.cs index 18b6f2c..e7145c9 100644 --- a/HotelManagerSystemWebApi.Core/Zero/Base/Dept.cs +++ b/EOM.TSHotelManager.Core/Zero/Dept.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -22,34 +22,32 @@ * *模块说明:部门实体类 */ -using Furion.DatabaseAccessor; using System; using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace HotelManagerSystemWebApi.Core +namespace EOM.TSHotelManager.Core { /// /// 部门表 /// - [Table("dept")] - public class Dept : IEntity + [SqlSugar.SugarTable("dept")] + public class Dept { /// /// 部门编号 /// - public string dept_no { get; set; } + public string? dept_no { get; set; } /// /// 部门名称 /// - public string dept_name { get; set; } + public string? dept_name { get; set; } /// /// 部门描述 /// - public string dept_desc { get; set; } + public string? dept_desc { get; set; } /// /// 创建时间(部门) /// @@ -57,21 +55,21 @@ namespace HotelManagerSystemWebApi.Core /// /// 部门主管 /// - public string dept_leader { get; set; } - ///// - ///// 部门主管 - ///// - //[SqlSugar.SugarColumn(IsIgnore = true)] - //public string leader_name { get; set; } + public string? dept_leader { get; set; } + /// + /// 部门主管 + /// + [SqlSugar.SugarColumn(IsIgnore = true)] + public string? leader_name { get; set; } + /// + /// 上级部门 + /// + public string? dept_parent { get; set; } /// /// 上级部门 /// - public string dept_parent { get; set; } - ///// - ///// 上级部门 - ///// - //[SqlSugar.SugarColumn(IsIgnore = true)] - //public string parent_name { get; set; } + [SqlSugar.SugarColumn(IsIgnore = true)] + public string? parent_name { get; set; } /// /// 删除标记 /// @@ -79,7 +77,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料创建人 /// - public string datains_usr { get; set; } + public string? datains_usr { get; set; } /// /// 资料创建时间 /// @@ -87,7 +85,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料更新人 /// - public string datachg_usr { get; set; } + public string? datachg_usr { get; set; } /// /// 资料更新时间 /// diff --git a/HotelManagerSystemWebApi.Core/Zero/Base/Education.cs b/EOM.TSHotelManager.Core/Zero/Education.cs similarity index 84% rename from HotelManagerSystemWebApi.Core/Zero/Base/Education.cs rename to EOM.TSHotelManager.Core/Zero/Education.cs index 7baf32f..c7011eb 100644 --- a/HotelManagerSystemWebApi.Core/Zero/Base/Education.cs +++ b/EOM.TSHotelManager.Core/Zero/Education.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -24,27 +24,26 @@ */ using System; using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace HotelManagerSystemWebApi.Core +namespace EOM.TSHotelManager.Core { /// /// 学历 /// - [Table("education")] + [SqlSugar.SugarTable("education")] public class Education { /// /// 学历编号 /// - public string education_no { get; set; } + public string? education_no { get; set; } /// /// 学历名称 /// - public string education_name { get; set; } + public string? education_name { get; set; } /// /// 删除标记 /// @@ -52,7 +51,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料创建人 /// - public string datains_usr { get; set; } + public string? datains_usr { get; set; } /// /// 资料创建时间 /// @@ -60,7 +59,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料更新人 /// - public string datachg_usr { get; set; } + public string? datachg_usr { get; set; } /// /// 资料更新时间 /// diff --git a/HotelManagerSystemWebApi.Core/Zero/Module/Module.cs b/EOM.TSHotelManager.Core/Zero/Module.cs similarity index 76% rename from HotelManagerSystemWebApi.Core/Zero/Module/Module.cs rename to EOM.TSHotelManager.Core/Zero/Module.cs index 4e7b677..5e6b9e1 100644 --- a/HotelManagerSystemWebApi.Core/Zero/Module/Module.cs +++ b/EOM.TSHotelManager.Core/Zero/Module.cs @@ -1,16 +1,15 @@ using System; using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace HotelManagerSystemWebApi.Core +namespace EOM.TSHotelManager.Core { /// /// 模块实体 /// - [Table("module")] + [SqlSugar.SugarTable("module")] public class Module { /// @@ -21,12 +20,12 @@ namespace HotelManagerSystemWebApi.Core /// /// 模块名称 /// - public string module_name { get; set; } + public string? module_name { get; set; } /// /// 模块描述 /// - public string module_desc { get; set; } + public string? module_desc { get; set; } /// /// 删除标记 @@ -36,7 +35,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料创建人 /// - public string datains_usr { get; set; } + public string? datains_usr { get; set; } /// /// 资料创建时间 @@ -46,7 +45,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料更新人 /// - public string datachg_usr { get; set; } + public string? datachg_usr { get; set; } /// /// 资料更新时间 diff --git a/HotelManagerSystemWebApi.Core/Zero/Module/ModuleConsts.cs b/EOM.TSHotelManager.Core/Zero/ModuleConsts.cs similarity index 74% rename from HotelManagerSystemWebApi.Core/Zero/Module/ModuleConsts.cs rename to EOM.TSHotelManager.Core/Zero/ModuleConsts.cs index afe62e5..45ce180 100644 --- a/HotelManagerSystemWebApi.Core/Zero/Module/ModuleConsts.cs +++ b/EOM.TSHotelManager.Core/Zero/ModuleConsts.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -28,7 +28,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace HotelManagerSystemWebApi.Core +namespace EOM.TSHotelManager.Core { /// /// 系统模块常量类 @@ -38,42 +38,42 @@ namespace HotelManagerSystemWebApi.Core /// /// 基础信息 /// - public const string BaseInfo = "BaseInfo"; + public const string? BaseInfo = "BaseInfo"; /// /// 财务信息 /// - public const string CashInfo = "CashInfo"; + public const string? CashInfo = "CashInfo"; /// /// 水电管理 /// - public const string WtiInfo = "WtiInfo"; + public const string? WtiInfo = "WtiInfo"; /// /// 监管统计 /// - public const string CheckInfo = "CheckInfo"; + public const string? CheckInfo = "CheckInfo"; /// /// 客房管理 /// - public const string RoomManager = "RoomManager"; + public const string? RoomManager = "RoomManager"; /// /// 客户管理 /// - public const string CustomerManager = "CustomerManager"; + public const string? CustomerManager = "CustomerManager"; /// /// 人事管理 /// - public const string HumanResourcesManager = "HumanResourcesManager"; + public const string? HumanResourcesManager = "HumanResourcesManager"; /// /// 物资管理 /// - public const string MaterialManager = "MaterialManager"; + public const string? MaterialManager = "MaterialManager"; /// /// 员工操作日志 /// - public const string OperationLogManager = "OperationLogManager"; + public const string? OperationLogManager = "OperationLogManager"; /// /// 系统管理 /// - public const string AdminManager = "AdminManager"; + public const string? AdminManager = "AdminManager"; } } diff --git a/HotelManagerSystemWebApi.Core/Zero/Module/ModuleZero.cs b/EOM.TSHotelManager.Core/Zero/ModuleZero.cs similarity index 57% rename from HotelManagerSystemWebApi.Core/Zero/Module/ModuleZero.cs rename to EOM.TSHotelManager.Core/Zero/ModuleZero.cs index f81e3ad..7c7e3d9 100644 --- a/HotelManagerSystemWebApi.Core/Zero/Module/ModuleZero.cs +++ b/EOM.TSHotelManager.Core/Zero/ModuleZero.cs @@ -1,37 +1,37 @@ using System; using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace HotelManagerSystemWebApi.Core +namespace EOM.TSHotelManager.Core { /// /// 模块权限表 /// - [Table("module_zero")] + [SqlSugar.SugarTable("module_zero")] public class ModuleZero { /// /// 模块ID /// + [SqlSugar.SugarColumn(IsIdentity = true,ColumnName = "module_id")] public int module_id { get; set; } /// /// 管理员账号 /// - [Column("admin_account")] - public string admin_account { get; set; } + [SqlSugar.SugarColumn(ColumnName = "admin_account")] + public string? admin_account { get; set; } /// /// 模块名称 /// - [Column("module_name")] - public string module_name { get; set; } + [SqlSugar.SugarColumn(ColumnName = "module_name")] + public string? module_name { get; set; } /// /// 是否开启 /// - [Column("module_enable")] + [SqlSugar.SugarColumn(ColumnName = "module_enable")] public int module_enable { get; set; } } } diff --git a/HotelManagerSystemWebApi.Core/Zero/Base/Nation.cs b/EOM.TSHotelManager.Core/Zero/Nation.cs similarity index 84% rename from HotelManagerSystemWebApi.Core/Zero/Base/Nation.cs rename to EOM.TSHotelManager.Core/Zero/Nation.cs index a0d876a..d67a552 100644 --- a/HotelManagerSystemWebApi.Core/Zero/Base/Nation.cs +++ b/EOM.TSHotelManager.Core/Zero/Nation.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -24,27 +24,26 @@ */ using System; using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace HotelManagerSystemWebApi.Core +namespace EOM.TSHotelManager.Core { /// /// 民族 /// - [Table("nation")] + [SqlSugar.SugarTable("nation")] public class Nation { /// /// 民族编号 /// - public string nation_no { get; set; } + public string? nation_no { get; set; } /// /// 民族名称 /// - public string nation_name { get; set; } + public string? nation_name { get; set; } /// /// 删除标记 /// @@ -52,7 +51,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料创建人 /// - public string datains_usr { get; set; } + public string? datains_usr { get; set; } /// /// 资料创建时间 /// @@ -60,7 +59,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料更新人 /// - public string datachg_usr { get; set; } + public string? datachg_usr { get; set; } /// /// 资料更新时间 /// diff --git a/HotelManagerSystemWebApi.Core/Zero/Notice/Notice.cs b/EOM.TSHotelManager.Core/Zero/Notice.cs similarity index 67% rename from HotelManagerSystemWebApi.Core/Zero/Notice/Notice.cs rename to EOM.TSHotelManager.Core/Zero/Notice.cs index a02f687..69b8076 100644 --- a/HotelManagerSystemWebApi.Core/Zero/Notice/Notice.cs +++ b/EOM.TSHotelManager.Core/Zero/Notice.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -23,60 +23,59 @@ *模块说明:任命公告类 */ using System; -using System.ComponentModel.DataAnnotations.Schema; -namespace HotelManagerSystemWebApi.Core +namespace EOM.TSHotelManager.Core { /// /// 任命公告 /// - [Table("uploadinfo")] + [SqlSugar.SugarTable("uploadinfo")] public class Notice { /// /// 公告编号 /// - [Column("NoticeNo")] - public string NoticeNo { get; set; } + [SqlSugar.SugarColumn(ColumnName = "NoticeNo")] + public string? NoticeNo { get; set; } /// /// 公告主题 /// - [Column("Noticetheme")] - public string Noticetheme { get; set; } + [SqlSugar.SugarColumn(ColumnName = "Noticetheme")] + public string? Noticetheme { get; set; } /// /// 公告类型 /// - [Column("NoticeType")] - public string NoticeType { get; set; } - ///// - ///// 公告类型(描述) - ///// - //[SqlSugar.SugarColumn(IsIgnore = true)] - //public string NoticeTypeName { get; set; } + [SqlSugar.SugarColumn(ColumnName = "NoticeType")] + public string? NoticeType { get; set; } + /// + /// 公告类型(描述) + /// + [SqlSugar.SugarColumn(IsIgnore = true)] + public string? NoticeTypeName { get; set; } /// /// 公告时间 /// - [Column("NoticeTime")] + [SqlSugar.SugarColumn(ColumnName = "NoticeTime")] public DateTime NoticeTime { get; set; } /// /// 公告正文 /// - [Column("NoticeContent")] - public string NoticeContent { get; set; } + [SqlSugar.SugarColumn(ColumnName = "NoticeContent")] + public string? NoticeContent { get; set; } /// /// 发文部门 /// - [Column("NoticeClub")] - public string NoticeClub { get; set; } + [SqlSugar.SugarColumn(ColumnName = "NoticeClub")] + public string? NoticeClub { get; set; } /// /// 删除标记 /// - [Column("delete_mk")] + [SqlSugar.SugarColumn(ColumnName = "delete_mk")] public int delete_mk { get; set; } /// /// 资料创建人 /// - public string datains_usr { get; set; } + public string? datains_usr { get; set; } /// /// 资料创建时间 /// @@ -84,7 +83,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料更新人 /// - public string datachg_usr { get; set; } + public string? datachg_usr { get; set; } /// /// 资料更新时间 /// diff --git a/HotelManagerSystemWebApi.Core/Zero/VipRule/VipRule.cs b/EOM.TSHotelManager.Core/Zero/VipRule.cs similarity index 79% rename from HotelManagerSystemWebApi.Core/Zero/VipRule/VipRule.cs rename to EOM.TSHotelManager.Core/Zero/VipRule.cs index f773916..b4d6d9b 100644 --- a/HotelManagerSystemWebApi.Core/Zero/VipRule/VipRule.cs +++ b/EOM.TSHotelManager.Core/Zero/VipRule.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -22,21 +22,19 @@ * *模块说明:会员等级规则类 */ -using Furion.DatabaseAccessor; using System; using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace HotelManagerSystemWebApi.Core +namespace EOM.TSHotelManager.Core { /// /// 会员等级规则类 /// - [Table("vip_rule")] - public class VipRule:IEntity + [SqlSugar.SugarTable("vip_rule")] + public class VipRule { /// /// 索引ID @@ -46,12 +44,12 @@ namespace HotelManagerSystemWebApi.Core /// /// 会员规则流水号 /// - public string rule_id { get; set; } + public string? rule_id { get; set; } /// /// 会员规则名称 /// - public string rule_name { get; set; } + public string? rule_name { get; set; } /// /// 预设数值(历史消费总额) @@ -70,7 +68,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 新增人 /// - public string datains_usr { get; set; } + public string? datains_usr { get; set; } /// /// 新增时间 @@ -79,16 +77,16 @@ namespace HotelManagerSystemWebApi.Core /// /// 修改人 /// - public string datachg_usr { get; set; } + public string? datachg_usr { get; set; } /// /// 修改时间 /// public DateTime datachg_date { get; set; } - ///// - ///// 会员等级描述 - ///// - //[SqlSugar.SugarColumn(IsIgnore = true)] - //public string type_name { get; set; } + /// + /// 会员等级描述 + /// + [SqlSugar.SugarColumn(IsIgnore = true)] + public string? type_name { get; set; } } } diff --git a/HotelManagerSystemWebApi.Core/Zero/Base/position.cs b/EOM.TSHotelManager.Core/Zero/position.cs similarity index 84% rename from HotelManagerSystemWebApi.Core/Zero/Base/position.cs rename to EOM.TSHotelManager.Core/Zero/position.cs index 503feff..c8ac2dc 100644 --- a/HotelManagerSystemWebApi.Core/Zero/Base/position.cs +++ b/EOM.TSHotelManager.Core/Zero/position.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *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 @@ -24,27 +24,26 @@ */ using System; using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace HotelManagerSystemWebApi.Core +namespace EOM.TSHotelManager.Core { /// /// 职位 /// - [Table("position")] + [SqlSugar.SugarTable("position")] public class Position { /// /// 职位编号 /// - public string position_no { get; set; } + public string? position_no { get; set; } /// /// 职位名称 /// - public string position_name { get; set; } + public string? position_name { get; set; } /// /// 删除标记 /// @@ -52,7 +51,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料创建人 /// - public string datains_usr { get; set; } + public string? datains_usr { get; set; } /// /// 资料创建时间 /// @@ -60,7 +59,7 @@ namespace HotelManagerSystemWebApi.Core /// /// 资料更新人 /// - public string datachg_usr { get; set; } + public string? datachg_usr { get; set; } /// /// 资料更新时间 /// diff --git a/EOM.TSHotelManager.EntityFramework/AppSettingsJson.cs b/EOM.TSHotelManager.EntityFramework/AppSettingsJson.cs new file mode 100644 index 0000000..ce283c5 --- /dev/null +++ b/EOM.TSHotelManager.EntityFramework/AppSettingsJson.cs @@ -0,0 +1,28 @@ +using Microsoft.Extensions.Configuration; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EOM.TSHotelManager.EntityFramework +{ + public class AppSettingsJson + { + public static string? ApplicationExeDirectory() + { + var location = System.Reflection.Assembly.GetExecutingAssembly().Location; + var appRoot = Path.GetDirectoryName(location); + return appRoot; + } + public static IConfigurationRoot GetAppSettings() + { + string? applicationExeDirectory = ApplicationExeDirectory(); + var builder = new ConfigurationBuilder() + .SetBasePath(applicationExeDirectory) + .AddJsonFile("dbsettings.json"); + return builder.Build(); + } + } +} diff --git a/HotelManagerSystemWebApi.EntityFramework.Core/HotelManagerSystemWebApi.EntityFramework.Core.csproj b/EOM.TSHotelManager.EntityFramework/EOM.TSHotelManager.EntityFramework.csproj similarity index 47% rename from HotelManagerSystemWebApi.EntityFramework.Core/HotelManagerSystemWebApi.EntityFramework.Core.csproj rename to EOM.TSHotelManager.EntityFramework/EOM.TSHotelManager.EntityFramework.csproj index e91f2a6..897bc58 100644 --- a/HotelManagerSystemWebApi.EntityFramework.Core/HotelManagerSystemWebApi.EntityFramework.Core.csproj +++ b/EOM.TSHotelManager.EntityFramework/EOM.TSHotelManager.EntityFramework.csproj @@ -1,12 +1,13 @@ - + net6.0 + enable + enable - @@ -16,11 +17,13 @@ - + + + - + diff --git a/EOM.TSHotelManager.EntityFramework/Repository/PgRepository.cs b/EOM.TSHotelManager.EntityFramework/Repository/PgRepository.cs new file mode 100644 index 0000000..4277485 --- /dev/null +++ b/EOM.TSHotelManager.EntityFramework/Repository/PgRepository.cs @@ -0,0 +1,41 @@ +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Microsoft.Extensions.Configuration; + +namespace EOM.TSHotelManager.EntityFramework +{ + public class PgRepository : SimpleClient where T : class, new() + { + public PgRepository(ISqlSugarClient context = null) : base(context)//注意这里要有默认值等于null + { + if (context == null) + { + base.Context = new SqlSugarClient(new ConnectionConfig() + { + DbType = SqlSugar.DbType.PostgreSQL,//此处为设置数据库,支持各大主流数据库 + InitKeyType = InitKeyType.Attribute,//此处为初始化配置类型,有按特性进行初始化,也有其他的进行初始化 + IsAutoCloseConnection = true,//此处为是否自动关闭数据库连接,可以理解为是DBHelper里的Close()方法 + MoreSettings = new ConnMoreSettings() + { + PgSqlIsAutoToLower = false, //数据库存在大写字段的 + //,需要把这个设为false ,并且实体和字段名称要一样 + //如果数据库里的数据表本身就为小写,则改成true + //详细可以参考官网https://www.donet5.com/Home/Doc + }, + ConnectionString = AppSettingsJson.GetAppSettings().GetConnectionString("PgSqlConnectStr") + }); + + base.Context.Aop.OnError = (ex) => + { + //此处为AOP切面编程代码块,常用于数据库连接日志记录 + //或者查看详细的报错信息,打印ex的内容即可 + }; + } + } + + } +} diff --git a/EOM.TSHotelManager.EntityFramework/dbsettings.json b/EOM.TSHotelManager.EntityFramework/dbsettings.json new file mode 100644 index 0000000..96ef3f1 --- /dev/null +++ b/EOM.TSHotelManager.EntityFramework/dbsettings.json @@ -0,0 +1,5 @@ +{ + "ConnectionStrings": { + "PgSqlConnectStr": "PORT=5630;DATABASE=tshoteldb;HOST=localhost;PASSWORD=yjj0720.;USER ID=sqw" + } +} diff --git a/EOM.TSHotelManager.Web.sln b/EOM.TSHotelManager.Web.sln new file mode 100644 index 0000000..2ec5821 --- /dev/null +++ b/EOM.TSHotelManager.Web.sln @@ -0,0 +1,55 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.3.32922.545 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EOM.TSHotelManager.Core", "EOM.TSHotelManager.Core\EOM.TSHotelManager.Core.csproj", "{FDC49899-865F-4DBB-AF9C-576D8BF68897}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EOM.TSHotelManager.EntityFramework", "EOM.TSHotelManager.EntityFramework\EOM.TSHotelManager.EntityFramework.csproj", "{B0415048-E431-4FCF-9CF7-C1345C6F7750}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EOM.TSHotelManager.Application", "EOM.TSHotelManager.Application\EOM.TSHotelManager.Application.csproj", "{FE75A00A-4B07-49CE-8F17-F483044A569A}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EOM.TSHotelManager.WebApi", "EOM.TSHotelManager.WebApi\EOM.TSHotelManager.WebApi.csproj", "{4E6141F1-5096-46AB-AF4F-6BB6F348366C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Library", "Library\Library.csproj", "{F27A7D1A-6468-4689-8B83-53CE3B7B0E17}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EOM.TSHotelManager.Common", "EOM.TSHotelManager.Common\EOM.TSHotelManager.Common.csproj", "{D3506829-1B8B-4DC7-A44A-DE672A90DE05}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {FDC49899-865F-4DBB-AF9C-576D8BF68897}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FDC49899-865F-4DBB-AF9C-576D8BF68897}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FDC49899-865F-4DBB-AF9C-576D8BF68897}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FDC49899-865F-4DBB-AF9C-576D8BF68897}.Release|Any CPU.Build.0 = Release|Any CPU + {B0415048-E431-4FCF-9CF7-C1345C6F7750}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B0415048-E431-4FCF-9CF7-C1345C6F7750}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B0415048-E431-4FCF-9CF7-C1345C6F7750}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B0415048-E431-4FCF-9CF7-C1345C6F7750}.Release|Any CPU.Build.0 = Release|Any CPU + {FE75A00A-4B07-49CE-8F17-F483044A569A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FE75A00A-4B07-49CE-8F17-F483044A569A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FE75A00A-4B07-49CE-8F17-F483044A569A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FE75A00A-4B07-49CE-8F17-F483044A569A}.Release|Any CPU.Build.0 = Release|Any CPU + {4E6141F1-5096-46AB-AF4F-6BB6F348366C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4E6141F1-5096-46AB-AF4F-6BB6F348366C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4E6141F1-5096-46AB-AF4F-6BB6F348366C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4E6141F1-5096-46AB-AF4F-6BB6F348366C}.Release|Any CPU.Build.0 = Release|Any CPU + {F27A7D1A-6468-4689-8B83-53CE3B7B0E17}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F27A7D1A-6468-4689-8B83-53CE3B7B0E17}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F27A7D1A-6468-4689-8B83-53CE3B7B0E17}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F27A7D1A-6468-4689-8B83-53CE3B7B0E17}.Release|Any CPU.Build.0 = Release|Any CPU + {D3506829-1B8B-4DC7-A44A-DE672A90DE05}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D3506829-1B8B-4DC7-A44A-DE672A90DE05}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D3506829-1B8B-4DC7-A44A-DE672A90DE05}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D3506829-1B8B-4DC7-A44A-DE672A90DE05}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {AD202AAD-1D93-4B16-84FE-CE52283EAB41} + EndGlobalSection +EndGlobal diff --git a/EOM.TSHotelManager.WebApi/.config/dotnet-tools.json b/EOM.TSHotelManager.WebApi/.config/dotnet-tools.json new file mode 100644 index 0000000..43a4368 --- /dev/null +++ b/EOM.TSHotelManager.WebApi/.config/dotnet-tools.json @@ -0,0 +1,12 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "dotnet-ef": { + "version": "7.0.1", + "commands": [ + "dotnet-ef" + ] + } + } +} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Cash/CashAppService.cs b/EOM.TSHotelManager.WebApi/Controllers/Business/Cash/CashController.cs similarity index 52% rename from HotelManagerSystemWebApi.Application/Business/Cash/CashAppService.cs rename to EOM.TSHotelManager.WebApi/Controllers/Business/Cash/CashController.cs index 72109d8..852a3de 100644 --- a/HotelManagerSystemWebApi.Application/Business/Cash/CashAppService.cs +++ b/EOM.TSHotelManager.WebApi/Controllers/Business/Cash/CashController.cs @@ -1,16 +1,15 @@ -using Furion.DynamicApiController; -using System; +using EOM.TSHotelManager.Application; +using EOM.TSHotelManager.Core; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.WebApi.Controllers { /// /// 资产信息控制器 /// - public class CashAppService: IDynamicApiController + public class CashController : ControllerBase { /// /// 资产信息 @@ -21,7 +20,7 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - public CashAppService(ICashService cashService) + public CashController(ICashService cashService) { this.cashService = cashService; } @@ -29,20 +28,22 @@ namespace HotelManagerSystemWebApi.Application /// /// 添加资产信息 /// - /// + /// /// - public OAddCashInfoDto AddCashInfo(AddCashInfoDto addCashInfoDto) + [HttpPost] + public bool AddCashInfo([FromBody]Cash cash) { - return cashService.AddCashInfo(addCashInfoDto); + return cashService.AddCashInfo(cash); } /// /// 查询资产信息 /// /// - public OCashInfoListDto SelectCashInfoAll(CashInfoListDto cashInfoListDto) + [HttpGet] + public List SelectCashInfoAll() { - return cashService.SelectCashInfoAll(cashInfoListDto); + return cashService.SelectCashInfoAll(); } } diff --git a/HotelManagerSystemWebApi.Application/Business/Customer/CustoAppService.cs b/EOM.TSHotelManager.WebApi/Controllers/Business/Customer/CustoController.cs similarity index 32% rename from HotelManagerSystemWebApi.Application/Business/Customer/CustoAppService.cs rename to EOM.TSHotelManager.WebApi/Controllers/Business/Customer/CustoController.cs index dc9816a..5325052 100644 --- a/HotelManagerSystemWebApi.Application/Business/Customer/CustoAppService.cs +++ b/EOM.TSHotelManager.WebApi/Controllers/Business/Customer/CustoController.cs @@ -1,49 +1,50 @@ -using Furion.DynamicApiController; -using System; +using EOM.TSHotelManager.Application; +using EOM.TSHotelManager.Core; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.WebApi.Controllers { /// - /// 客户信息控制器 + /// 用户信息控制器 /// - public class CustoAppService: IDynamicApiController + public class CustoController : ControllerBase { /// - /// 客户信息 + /// 用户信息 /// - private readonly ICustoService _custoService; + private readonly ICustoService customerService; /// /// /// - /// - public CustoAppService(ICustoService custoService) + /// + public CustoController(ICustoService customerService) { - _custoService = custoService; + this.customerService = customerService; } /// /// 添加客户信息 /// - /// + /// /// - public OInsertCustomerInfoDto InsertCustomerInfo(InsertCustomerInfoDto insertCustomerInfoDto) + [HttpPost] + public bool InsertCustomerInfo([FromBody]Custo custo) { - return _custoService.InsertCustomerInfo(insertCustomerInfoDto); + return customerService.InsertCustomerInfo(custo); } /// /// 更新客户信息 /// - /// + /// /// - public OUpdCustomerInfoDto UpdCustomerInfoNo(UpdCustomerInfoDto updCustomerInfoDto) + [HttpPost] + public bool UpdCustomerInfoByCustoNo([FromBody]Custo custo) { - return _custoService.UpdCustomerInfoNo(updCustomerInfoDto); + return customerService.UpdCustomerInfoByCustoNo(custo); } /// @@ -52,27 +53,52 @@ namespace HotelManagerSystemWebApi.Application /// /// /// - //public OUpdCustomerTypeByCustoNoDto UpdCustomerTypeByCustoNo(string custoNo, int userType) - //{ - // return _custoService.UpdCustomerTypeByCustoNo(custoNo, userType); - //} + [HttpPost] + public bool UpdCustomerTypeByCustoNo([FromBody] string? custoNo, int userType) + { + return customerService.UpdCustomerTypeByCustoNo(custoNo, userType); + } /// /// 查询酒店盈利情况 /// /// - public OSelectAllMoneyDto SelectAllMoney() + [HttpGet] + public List SelectAllMoney() { - return _custoService.SelectAllMoney(); + return customerService.SelectAllMoney(); } /// /// 查询所有客户信息 /// /// - public OSelectCustoAllDto SelectCustoAll(SelectCustoAllDto selectCustoAllDto) + [HttpGet] + public OSelectCustoAllDto SelectCustoAll([FromQuery]int? pageIndex, int? pageSize) + { + return customerService.SelectCustoAll(pageIndex,pageSize); + } + + /// + /// 查询指定客户信息 + /// + /// + [HttpGet] + public List SelectCustoByInfo([FromQuery] Custo custo) { - return _custoService.SelectCustoAll(selectCustoAllDto); + return customerService.SelectCustoByInfo(custo); } + + /// + /// 根据客户编号查询客户信息 + /// + /// + /// + [HttpGet] + public Custo SelectCardInfoByCustoNo([FromQuery] string? CustoNo) + { + return customerService.SelectCardInfoByCustoNo(CustoNo); + } + } } diff --git a/HotelManagerSystemWebApi.Application/Business/Fonts/FontsAppService.cs b/EOM.TSHotelManager.WebApi/Controllers/Business/Fonts/FontsController.cs similarity index 41% rename from HotelManagerSystemWebApi.Application/Business/Fonts/FontsAppService.cs rename to EOM.TSHotelManager.WebApi/Controllers/Business/Fonts/FontsController.cs index 813fa27..9c599ef 100644 --- a/HotelManagerSystemWebApi.Application/Business/Fonts/FontsAppService.cs +++ b/EOM.TSHotelManager.WebApi/Controllers/Business/Fonts/FontsController.cs @@ -1,38 +1,38 @@ -using Furion.DynamicApiController; -using System; +using EOM.TSHotelManager.Application; +using EOM.TSHotelManager.Core; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -namespace HotelManagerSystemWebApi.Application +namespace EOM.TSHotelManager.WebApi.Controllers { /// - /// 跑马灯宣传 + /// 酒店宣传联动内容控制器 /// - public class FontsAppService:IDynamicApiController + public class FontsController : ControllerBase { /// - /// 跑马灯宣传 + /// 酒店宣传联动内容 /// - private readonly IFontsService _fontsService; + private readonly IFontsService fontsService; /// /// /// /// - public FontsAppService(IFontsService fontsService) + public FontsController(IFontsService fontsService) { - _fontsService = fontsService; + this.fontsService = fontsService; } /// /// 查询所有宣传联动内容(跑马灯) /// /// - public OSelectFonListDto SelectFonList() + [HttpGet] + public List SelectFontAll() { - return _fontsService.SelectFonList(); + return fontsService.SelectFontAll(); } } } diff --git a/EOM.TSHotelManager.WebApi/Controllers/Business/Reser/ReserController.cs b/EOM.TSHotelManager.WebApi/Controllers/Business/Reser/ReserController.cs new file mode 100644 index 0000000..fd0ae4d --- /dev/null +++ b/EOM.TSHotelManager.WebApi/Controllers/Business/Reser/ReserController.cs @@ -0,0 +1,72 @@ +using EOM.TSHotelManager.Application; +using EOM.TSHotelManager.Core; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using System.Collections.Generic; +using System.Security.Cryptography; + +namespace EOM.TSHotelManager.WebApi.Controllers +{ + /// + /// 预约信息控制器 + /// + public class ReserController : ControllerBase + { + /// + /// 预约信息 + /// + private readonly IReserService reserService; + + /// + /// + /// + /// + public ReserController(IReserService reserService) + { + this.reserService = reserService; + } + + /// + /// 获取所有预约信息 + /// + /// + [HttpGet] + public List SelectReserAll() + { + return reserService.SelectReserAll(); + } + + /// + /// 根据房间编号获取预约信息 + /// + /// + /// + [HttpGet] + public Reser SelectReserInfoByRoomNo([FromQuery]string? no) + { + return reserService.SelectReserInfoByRoomNo(no); + } + + /// + /// 删除预约信息 + /// + /// + /// + [HttpPost] + public bool DeleteReserInfo([FromBody]string? rid) + { + return reserService.DeleteReserInfo(rid); + } + + /// + /// 添加预约信息 + /// + /// + /// + [HttpPost] + public bool InserReserInfo([FromBody]Reser r) + { + return reserService.InserReserInfo(r); + } + } +} diff --git a/EOM.TSHotelManager.WebApi/Controllers/Business/Room/RoomController.cs b/EOM.TSHotelManager.WebApi/Controllers/Business/Room/RoomController.cs new file mode 100644 index 0000000..0736ddf --- /dev/null +++ b/EOM.TSHotelManager.WebApi/Controllers/Business/Room/RoomController.cs @@ -0,0 +1,239 @@ +using EOM.TSHotelManager.Application; +using EOM.TSHotelManager.Core; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using System.Collections.Generic; + +namespace EOM.TSHotelManager.WebApi.Controllers +{ + /// + /// 房间信息控制器 + /// + public class RoomController : ControllerBase + { + /// + /// 房间信息 + /// + private readonly IRoomService roomService; + + /// + /// + /// + /// + public RoomController(IRoomService roomService) + { + this.roomService = roomService; + } + + /// + /// 根据房间状态获取相应状态的房间信息 + /// + /// + /// + [HttpGet] + public List SelectRoomByRoomState([FromQuery]int stateid) + { + return roomService.SelectRoomByRoomState(stateid); + } + + /// + /// 根据房间状态来查询可使用的房间 + /// + /// + [HttpGet] + public List SelectCanUseRoomAll() + { + return roomService.SelectCanUseRoomAll(); + } + + /// + /// 获取所有房间信息 + /// + /// + [HttpGet] + public List SelectRoomAll() + { + return roomService.SelectRoomAll(); + } + + /// + /// 获取房间分区的信息 + /// + /// + [HttpGet] + public List SelectRoomByTypeName([FromQuery] string? TypeName) + { + return roomService.SelectRoomByTypeName(TypeName); + } + + /// + /// 根据房间编号查询房间信息 + /// + /// + /// + [HttpGet] + public Room SelectRoomByRoomNo([FromQuery] string? no) + { + return roomService.SelectRoomByRoomNo(no); + } + + /// + /// 根据房间编号退房(退房) + /// + /// + /// + [HttpGet] + public bool UpdateRoomByRoomNo([FromQuery] string? room) + { + return roomService.UpdateRoomByRoomNo(room); + } + + /// + /// 根据房间编号查询截止到今天住了多少天 + /// + /// + /// + [HttpGet] + public object DayByRoomNo([FromQuery] string? roomno) + { + return roomService.DayByRoomNo(roomno); + } + + /// + /// 根据房间编号修改房间信息(入住) + /// + /// + /// + [HttpPost] + public bool UpdateRoomInfo([FromBody]Room r) + { + return roomService.UpdateRoomInfo(r); + } + + /// + /// 根据房间编号修改房间信息(预约) + /// + /// + /// + [HttpPost] + public bool UpdateRoomInfoWithReser([FromBody] Room r) + { + return roomService.UpdateRoomInfoWithReser(r); + } + + /// + /// 查询可入住房间数量 + /// + /// + [HttpGet] + public object SelectCanUseRoomAllByRoomState() + { + return roomService.SelectCanUseRoomAllByRoomState(); + } + + /// + /// 查询已入住房间数量 + /// + /// + [HttpGet] + public object SelectNotUseRoomAllByRoomState() + { + return roomService.SelectNotUseRoomAllByRoomState(); + } + + /// + /// 根据房间编号查询房间价格 + /// + /// + [HttpGet] + public object SelectRoomByRoomPrice([FromQuery]string? r) + { + return roomService.SelectRoomByRoomPrice(r); + } + + /// + /// 查询脏房数量 + /// + /// + [HttpGet] + public object SelectNotClearRoomAllByRoomState() + { + return roomService.SelectNotClearRoomAllByRoomState(); + } + + /// + /// 查询维修房数量 + /// + /// + [HttpGet] + public object SelectFixingRoomAllByRoomState() + { + return roomService.SelectFixingRoomAllByRoomState(); + } + + /// + /// 查询预约房数量 + /// + /// + [HttpGet] + public object SelectReseredRoomAllByRoomState() + { + return roomService.SelectReseredRoomAllByRoomState(); + } + + /// + /// 根据房间编号更改房间状态 + /// + /// + /// + /// + [HttpPost] + public bool UpdateRoomStateByRoomNo([FromBody]string? roomno, int stateid) + { + return roomService.UpdateRoomStateByRoomNo(roomno,stateid); + } + + /// + /// 添加房间 + /// + /// + /// + [HttpPost] + public bool InsertRoom([FromBody]Room rn) + { + return roomService.InsertRoom(rn); + } + + /// + /// 查询所有可消费(已住)房间 + /// + /// + [HttpGet] + public List SelectRoomByStateAll() + { + return roomService.SelectRoomByStateAll(); + } + + /// + /// 获取所有房间状态 + /// + /// + [HttpGet] + public List SelectRoomStateAll() + { + return roomService.SelectRoomStateAll(); + } + + /// + /// 根据房间编号查询房间状态编号 + /// + /// + /// + [HttpGet] + public object SelectRoomStateIdByRoomNo([FromQuery]string? roomno) + { + return roomService.SelectRoomStateIdByRoomNo(roomno); + } + + } +} diff --git a/EOM.TSHotelManager.WebApi/Controllers/Business/Sellthing/SellthingController.cs b/EOM.TSHotelManager.WebApi/Controllers/Business/Sellthing/SellthingController.cs new file mode 100644 index 0000000..e93de8b --- /dev/null +++ b/EOM.TSHotelManager.WebApi/Controllers/Business/Sellthing/SellthingController.cs @@ -0,0 +1,122 @@ +using EOM.TSHotelManager.Application; +using EOM.TSHotelManager.Core; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using System.Collections; +using System.Collections.Generic; +using System.Xml.Linq; + +namespace EOM.TSHotelManager.WebApi.Controllers +{ + /// + /// 商品消费控制器 + /// + public class SellthingController : ControllerBase + { + /// + /// 商品消费 + /// + private readonly ISellService sellService; + + /// + /// + /// + /// + public SellthingController(ISellService sellService) + { + this.sellService = sellService; + } + + /// + /// 查询所有商品 + /// + /// + [HttpGet] + public List SelectSellThingAll([FromQuery]SellThing sellThing = null) + { + return sellService.SelectSellThingAll(sellThing); + } + + /// + /// 修改商品 + /// + /// + /// + /// + [HttpPost] + public bool UpdateSellThing([FromBody]string? stock, string? sellNo) + { + return sellService.UpdateSellThing(stock, sellNo); + } + + /// + /// 修改商品信息 + /// + /// + /// + [HttpPost] + public bool UpdateSellthingInfo([FromBody] SellThing sellThing) + { + return sellService.UpdateSellthingInfo(sellThing); + } + + /// + /// 撤回客户消费信息 + /// + /// + /// + /// + /// + [HttpPost] + public bool DeleteSellThing([FromBody] string? roomNo, string? custoNo, string? sellName) + { + return sellService.DeleteSellThing(roomNo, custoNo, sellName); + } + + /// + /// 根据商品编号删除商品信息 + /// + /// + /// + [HttpPost] + public bool DeleteSellThingBySellNo([FromBody]string? sellNo) + { + return sellService.DeleteSellThingBySellNo(sellNo); + } + + /// + /// 根据商品名称和价格查询商品编号 + /// + /// + /// + /// + [HttpGet] + public SellThing SelectSellThingByNameAndPrice([FromQuery]string? name, string? price) + { + return sellService.SelectSellThingByNameAndPrice(name, price); + } + + + /// + /// 根据商品编号查询商品信息 + /// + /// + /// + [HttpGet] + public SellThing SelectSellInfoBySellNo([FromQuery]string? SellNo) + { + return sellService.SelectSellInfoBySellNo(SellNo); + } + + /// + /// 添加商品 + /// + /// + /// + [HttpPost] + public bool InsertSellThing([FromBody]SellThing st) + { + return sellService.InsertSellThing(st); + } + } +} diff --git a/EOM.TSHotelManager.WebApi/Controllers/Business/Spend/SpendController.cs b/EOM.TSHotelManager.WebApi/Controllers/Business/Spend/SpendController.cs new file mode 100644 index 0000000..740988b --- /dev/null +++ b/EOM.TSHotelManager.WebApi/Controllers/Business/Spend/SpendController.cs @@ -0,0 +1,142 @@ +using EOM.TSHotelManager.Application; +using EOM.TSHotelManager.Core; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using System; +using System.Collections.Generic; + +namespace EOM.TSHotelManager.WebApi.Controllers +{ + /// + /// 消费信息控制器 + /// + public class SpendController : ControllerBase + { + /// + /// 消费信息 + /// + private readonly ISpendService spendService; + + /// + /// + /// + /// + public SpendController(ISpendService spendService) + { + this.spendService = spendService; + } + + /// + /// 添加消费信息 + /// + /// + /// + [HttpPost] + public bool InsertSpendInfo([FromBody]Spend s) + { + return spendService.InsertSpendInfo(s); + } + + /// + /// 根据客户编号查询消费信息 + /// + /// + /// + [HttpGet] + public List SelectSpendByCustoNo([FromQuery]string? No) + { + return spendService.SelectSpendByCustoNo(No); + } + + /// + /// 根据房间编号查询消费信息 + /// + /// + /// + [HttpGet] + public List SelectSpendByRoomNo([FromQuery]string? No) + { + return spendService.SelectSpendByRoomNo(No); + } + + /// + /// 根据客户编号查询历史消费信息 + /// + /// + /// + [HttpGet] + public List SeletHistorySpendInfoAll([FromQuery]string? custoNo) + { + return spendService.SeletHistorySpendInfoAll(custoNo); + } + + /// + /// 查询消费的所有信息 + /// + /// + [HttpGet] + List SelectSpendInfoAll() + { + return spendService.SelectSpendInfoAll(); + } + + /// + /// 根据房间号查询消费的所有信息 + /// + /// + [HttpGet] + public List SelectSpendInfoRoomNo([FromQuery]string? RoomNo) + { + return spendService.SelectSpendInfoRoomNo(RoomNo); + } + + /// + /// 根据房间编号、入住时间到当前时间查询消费总金额 + /// + /// + /// + /// + [HttpGet] + public object SelectMoneyByRoomNoAndTime([FromQuery]string? roomno, string? custono) + { + return spendService.SelectMoneyByRoomNoAndTime(roomno, custono); + } + + /// + /// 根据房间编号、入住时间和当前时间修改结算状态 + /// + /// + /// + /// + [HttpPost] + public bool UpdateMoneyState([FromBody] string? roomno, string? checktime) + { + return spendService.UpdateMoneyState(roomno, checktime); + } + + /// + /// 将转房前的未结算记录一同转移到新房间 + /// + /// + /// + /// + /// + [HttpPost] + public bool UpdateSpendInfoByRoomNo([FromBody]List spends, string? newRoom, string? custoNo) + { + return spendService.UpdateSpendInfoByRoomNo(spends, newRoom, custoNo); + } + + /// + /// 更新消费信息 + /// + /// + /// + [HttpPost] + public bool UpdSpenInfo([FromBody]Spend spend) + { + return spendService.UpdSpenInfo(spend); + } + + } +} diff --git a/EOM.TSHotelManager.WebApi/Controllers/Business/Wti/WtiController.cs b/EOM.TSHotelManager.WebApi/Controllers/Business/Wti/WtiController.cs new file mode 100644 index 0000000..e196f02 --- /dev/null +++ b/EOM.TSHotelManager.WebApi/Controllers/Business/Wti/WtiController.cs @@ -0,0 +1,126 @@ +using EOM.TSHotelManager.Application; +using EOM.TSHotelManager.Core; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using System.Collections.Generic; + +namespace EOM.TSHotelManager.WebApi.Controllers +{ + /// + /// 水电信息控制器 + /// + public class WtiController : ControllerBase + { + /// + /// 水电信息 + /// + private readonly IWtiService wtiService; + + /// + /// + /// + /// + public WtiController(IWtiService wtiService) + { + this.wtiService = wtiService; + } + + /// + /// 根据房间编号查询水电费信息 + /// + /// + /// + [HttpGet] + public Wti SelectWtiInfoByRoomNo([FromQuery]string? roomNo) + { + return this.wtiService.SelectWtiInfoByRoomNo(roomNo); + } + + /// + /// 根据房间编号、使用时间查询水电费信息 + /// + /// + /// + /// + /// + [HttpGet] + public Wti SelectWtiInfoByRoomNoAndTime([FromQuery]string? roomno, string? usedate, string? enddate) + { + return this.wtiService.SelectWtiInfoByRoomNoAndTime(roomno, usedate, enddate); + } + + /// + /// 获取所有水电费信息 + /// + /// + [HttpGet] + public List SelectWtiInfoAll() + { + return this.wtiService.SelectWtiInfoAll(); + } + + /// + /// 添加水电费信息 + /// + /// + /// + [HttpPost] + public bool InsertWtiInfo([FromBody]Wti w) + { + return this.wtiService.InsertWtiInfo(w); + } + + /// + /// 修改水电费信息(根据房间编号) + /// + /// + /// + [HttpPost] + public bool UpdateWtiInfo([FromBody]Wti w) + { + return this.wtiService.UpdateWtiInfo(w); + } + + /// + /// 根据房间信息、使用时间修改水电费 + /// + /// + /// + [HttpPost] + public bool UpdateWtiInfoByRoomNoAndDateTime([FromBody]Wti w) + { + return this.wtiService.UpdateWtiInfoByRoomNoAndDateTime(w); + } + + /// + /// 删除水电费信息:根据房间编号 + /// + /// + /// + //bool DeleteWtiInfo(string? roomno); + + /// + /// 根据房间编号、使用时间删除水电费信息 + /// + /// + /// + /// + /// + [HttpPost] + public bool DeleteWtiInfoByRoomNoAndDateTime([FromBody]string? roomno, string? usedate, string? enddate) + { + return this.wtiService.DeleteWtiInfoByRoomNoAndDateTime(roomno, usedate, enddate); + } + + /// + /// 获取所有水电费信息 + /// + /// + [HttpGet] + public List ListWtiInfoByRoomNo([FromQuery]string? roomno) + { + return this.wtiService.ListWtiInfoByRoomNo(roomno); + } + + } +} diff --git a/EOM.TSHotelManager.WebApi/Controllers/Sys/NavBar/NavBarController.cs b/EOM.TSHotelManager.WebApi/Controllers/Sys/NavBar/NavBarController.cs new file mode 100644 index 0000000..e816bf6 --- /dev/null +++ b/EOM.TSHotelManager.WebApi/Controllers/Sys/NavBar/NavBarController.cs @@ -0,0 +1,39 @@ +using EOM.TSHotelManager.Application; +using EOM.TSHotelManager.Core; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using System.Collections.Generic; + +namespace EOM.TSHotelManager.WebApi.Controllers +{ + /// + /// 导航控件模块控制器 + /// + public class NavBarController : ControllerBase + { + /// + /// 导航控件 + /// + private readonly INavBarService navBarService; + + /// + /// + /// + /// + public NavBarController(INavBarService navBarService) + { + this.navBarService = navBarService; + } + + /// + /// 导航控件列表 + /// + /// + [HttpGet] + public List NavBarList() + { + return navBarService.NavBarList(); + } + + } +} diff --git a/EOM.TSHotelManager.WebApi/Controllers/Worker/Check/WorkerCheckController.cs b/EOM.TSHotelManager.WebApi/Controllers/Worker/Check/WorkerCheckController.cs new file mode 100644 index 0000000..1832d80 --- /dev/null +++ b/EOM.TSHotelManager.WebApi/Controllers/Worker/Check/WorkerCheckController.cs @@ -0,0 +1,72 @@ +using EOM.TSHotelManager.Application; +using EOM.TSHotelManager.Core; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using System.Collections.Generic; + +namespace EOM.TSHotelManager.WebApi.Controllers +{ + /// + /// 员工打卡控制器 + /// + public class WorkerCheckController : ControllerBase + { + /// + /// 员工打卡 + /// + private readonly IWorkerCheckService workerCheckService; + + /// + /// + /// + /// + public WorkerCheckController(IWorkerCheckService workerCheckService) + { + this.workerCheckService = workerCheckService; + } + + /// + /// 根据员工编号查询其所有的打卡记录 + /// + /// + /// + [HttpGet] + public List SelectCheckInfoByWorkerNo([FromQuery]string? wid) + { + return workerCheckService.SelectCheckInfoByWorkerNo(wid); + } + + /// + /// 查询员工签到天数 + /// + /// + /// + [HttpGet] + public object SelectWorkerCheckDaySumByWorkerNo([FromQuery]string? wkn) + { + return workerCheckService.SelectWorkerCheckDaySumByWorkerNo(wkn); + } + + /// + /// 查询今天员工是否已签到 + /// + /// + /// + [HttpGet] + public object SelectToDayCheckInfoByWorkerNo([FromQuery] string? wkn) + { + return workerCheckService.SelectToDayCheckInfoByWorkerNo(wkn); + } + + /// + /// 添加员工打卡数据 + /// + /// + /// + [HttpPost] + public bool AddCheckInfo([FromBody]WorkerCheck workerCheck) + { + return workerCheckService.AddCheckInfo(workerCheck); + } + } +} diff --git a/EOM.TSHotelManager.WebApi/Controllers/Worker/GoodBad/WorkerGoodBadController.cs b/EOM.TSHotelManager.WebApi/Controllers/Worker/GoodBad/WorkerGoodBadController.cs new file mode 100644 index 0000000..e10609a --- /dev/null +++ b/EOM.TSHotelManager.WebApi/Controllers/Worker/GoodBad/WorkerGoodBadController.cs @@ -0,0 +1,50 @@ +using EOM.TSHotelManager.Application; +using EOM.TSHotelManager.Core; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using System.Collections.Generic; + +namespace EOM.TSHotelManager.WebApi.Controllers +{ + /// + /// 奖惩信息控制器 + /// + public class WorkerGoodBadController : ControllerBase + { + /// + /// 奖惩信息 + /// + private readonly IWorkerGoodBadService workerGoodBadService; + + /// + /// + /// + /// + public WorkerGoodBadController(IWorkerGoodBadService workerGoodBadService) + { + this.workerGoodBadService = workerGoodBadService; + } + + /// + /// 添加员工奖惩记录 + /// + /// + /// + [HttpPost] + public bool AddGoodBad([FromBody]WorkerGoodBad goodBad) + { + return workerGoodBadService.AddGoodBad(goodBad); + } + + /// + /// 根据工号查找所有的奖惩记录信息 + /// + /// + /// + [HttpGet] + public List SelectAllGoodBadByWorkNo([FromQuery]string? wn) + { + return workerGoodBadService.SelectAllGoodBadByWorkNo(wn); + } + } +} diff --git a/EOM.TSHotelManager.WebApi/Controllers/Worker/History/WorkerHistoryController.cs b/EOM.TSHotelManager.WebApi/Controllers/Worker/History/WorkerHistoryController.cs new file mode 100644 index 0000000..7a644d7 --- /dev/null +++ b/EOM.TSHotelManager.WebApi/Controllers/Worker/History/WorkerHistoryController.cs @@ -0,0 +1,50 @@ +using EOM.TSHotelManager.Application; +using EOM.TSHotelManager.Core; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using System.Collections.Generic; + +namespace EOM.TSHotelManager.WebApi.Controllers +{ + /// + /// 员工履历控制器 + /// + public class WorkerHistoryController : ControllerBase + { + /// + /// 员工履历 + /// + private readonly IWorkerHistoryService workerHistoryService; + + /// + /// + /// + /// + public WorkerHistoryController(IWorkerHistoryService workerHistoryService) + { + this.workerHistoryService = workerHistoryService; + } + + /// + /// 根据工号添加员工履历 + /// + /// + /// + [HttpPost] + public bool AddHistoryByWorkerId([FromBody]WorkerHistory workerHistory) + { + return workerHistoryService.AddHistoryByWorkerId(workerHistory); + } + + /// + /// 根据工号查询履历信息 + /// + /// + /// + [HttpGet] + public List SelectHistoryByWorkerId([FromQuery]string? wid) + { + return workerHistoryService.SelectHistoryByWorkerId(wid); + } + } +} diff --git a/EOM.TSHotelManager.WebApi/Controllers/Worker/Picture/WorkerPictureController.cs b/EOM.TSHotelManager.WebApi/Controllers/Worker/Picture/WorkerPictureController.cs new file mode 100644 index 0000000..a0a7215 --- /dev/null +++ b/EOM.TSHotelManager.WebApi/Controllers/Worker/Picture/WorkerPictureController.cs @@ -0,0 +1,73 @@ +using EOM.TSHotelManager.Application; +using EOM.TSHotelManager.Core; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; + +namespace EOM.TSHotelManager.WebApi.Controllers +{ + /// + /// 照片控制器 + /// + public class WorkerPictureController : ControllerBase + { + /// + /// 照片 + /// + private readonly IWorkerPicService workerPicService; + + /// + /// + /// + /// + public WorkerPictureController(IWorkerPicService workerPicService) + { + this.workerPicService = workerPicService; + } + + /// + /// 查询员工照片 + /// + /// + /// + [HttpGet] + public WorkerPic WorkerPic([FromQuery]WorkerPic workerPic) + { + return workerPicService.WorkerPic(workerPic); + } + + /// + /// 添加员工照片 + /// + /// + /// + [HttpPost] + public bool InsertWorkerPic([FromBody]WorkerPic workerPic) + { + return workerPicService.InsertWorkerPic(workerPic); + } + + /// + /// 删除员工照片 + /// + /// + /// + [HttpPost] + public bool DeleteWorkerPic([FromBody]WorkerPic workerPic) + { + return workerPicService.DeleteWorkerPic(workerPic); + } + + /// + /// 更新员工照片 + /// + /// + /// + [HttpPost] + public bool UpdateWorkerPic([FromBody]WorkerPic workerPic) + { + return workerPicService.UpdateWorkerPic(workerPic); + } + + } + +} diff --git a/EOM.TSHotelManager.WebApi/Controllers/Zero/Admin/AdminController.cs b/EOM.TSHotelManager.WebApi/Controllers/Zero/Admin/AdminController.cs new file mode 100644 index 0000000..c8103e0 --- /dev/null +++ b/EOM.TSHotelManager.WebApi/Controllers/Zero/Admin/AdminController.cs @@ -0,0 +1,125 @@ +using EOM.TSHotelManager.Application; +using EOM.TSHotelManager.Core; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using System.Collections.Generic; + +namespace EOM.TSHotelManager.WebApi.Controllers +{ + /// + /// 管理员控制器 + /// + public class AdminController : ControllerBase + { + /// + /// 管理员模块 + /// + private readonly IAdminService adminService; + + /// + /// + /// + /// + public AdminController(IAdminService adminService) + { + this.adminService = adminService; + } + + /// + /// 根据超管密码查询员工类型和权限 + /// + /// + /// + [HttpPost] + public Admin SelectMangerByPass([FromBody]Admin admin) + { + return adminService.SelectMangerByPass(admin); + } + + /// + /// 根据超管账号查询对应的密码 + /// + /// + /// + [HttpPost] + public Admin SelectAdminPwdByAccount([FromBody]string? account) + { + return adminService.SelectAdminPwdByAccount(account); + } + + /// + /// 获取所有管理员列表 + /// + /// + [HttpGet] + public List GetAllAdminList() + { + return adminService.GetAllAdminList(); + } + + /// + /// 修改密码 + /// + /// + /// + [HttpPost] + public bool UpdateNewPwdByOldPwd([FromBody]Admin admin) + { + return adminService.UpdateNewPwdByOldPwd(admin); + } + + /// + /// 获取管理员列表 + /// + /// + [HttpGet] + public List GetAllAdmin() + { + return adminService.GetAllAdmin(); + } + + /// + /// 添加管理员 + /// + /// + /// + [HttpPost] + public bool AddAdmin([FromBody]Admin admin) + { + return adminService.AddAdmin(admin); + } + + /// + /// 获取管理员信息 + /// + /// + /// + [HttpGet] + public Admin GetAdminInfoByAdminAccount([FromQuery]Admin admin) + { + return adminService.GetAdminInfoByAdminAccount(admin); + } + + /// + /// 获取所有管理员类型 + /// + /// + [HttpGet] + public List GetAllAdminTypes() + { + return adminService.GetAllAdminTypes(); + } + + /// + /// 批量更新管理员账户 + /// + /// + /// + [HttpPost] + public bool UpdAccount([FromBody]Admin admins) + { + return adminService.UpdAccount(admins); + } + + } +} diff --git a/EOM.TSHotelManager.WebApi/Controllers/Zero/Base/BaseController.cs b/EOM.TSHotelManager.WebApi/Controllers/Zero/Base/BaseController.cs new file mode 100644 index 0000000..08914b0 --- /dev/null +++ b/EOM.TSHotelManager.WebApi/Controllers/Zero/Base/BaseController.cs @@ -0,0 +1,539 @@ +using EOM.TSHotelManager.Application; +using EOM.TSHotelManager.Core; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using System.Collections.Generic; + +namespace EOM.TSHotelManager.WebApi.Controllers +{ + /// + /// 基础信息控制器 + /// + public class BaseController : ControllerBase + { + /// + /// 基础信息 + /// + private readonly IBaseService baseService; + + /// + /// + /// + /// + public BaseController(IBaseService baseService) + { + this.baseService = baseService; + } + + #region 性别模块 + + /// + /// 查询所有性别类型 + /// + /// + [HttpGet] + public List SelectSexTypeAll([FromQuery]SexType sexType = null) + { + return baseService.SelectSexTypeAll(sexType); + } + + /// + /// 查询性别类型 + /// + /// + [HttpGet] + public SexType SelectSexType([FromQuery]SexType sexType) + { + return baseService.SelectSexType(sexType); + } + + /// + /// 添加性别类型 + /// + /// + /// + [HttpPost] + public bool AddSexType([FromBody]SexType sexType) + { + return baseService.AddSexType(sexType); + } + + /// + /// 删除性别类型 + /// + /// + /// + [HttpPost] + public bool DelSexType([FromBody]SexType sexType) + { + return baseService.DelSexType(sexType); + } + + /// + /// 更新性别类型 + /// + /// + /// + [HttpPost] + public bool UpdSexType([FromBody]SexType sexType) + { + return baseService.UpdSexType(sexType); + } + + #endregion + + #region 职位模块 + + /// + /// 查询所有职位类型 + /// + /// + [HttpGet] + public List SelectPositionAll([FromQuery]Position position = null) + { + return baseService.SelectPositionAll(position); + } + + /// + /// 查询职位类型 + /// + /// + [HttpGet] + public Position SelectPosition([FromQuery]Position position) + { + return baseService.SelectPosition(position); + } + + /// + /// 添加职位类型 + /// + /// + /// + [HttpPost] + public bool AddPosition([FromBody]Position position) + { + return baseService.AddPosition(position); + } + + /// + /// 删除职位类型 + /// + /// + /// + [HttpPost] + public bool DelPosition([FromBody]Position position) + { + return baseService.DelPosition(position); + } + + /// + /// 更新职位类型 + /// + /// + /// + [HttpPost] + public bool UpdPosition([FromBody]Position position) + { + return baseService.UpdPosition(position); + } + + #endregion + + #region 民族模块 + + /// + /// 查询所有民族类型 + /// + /// + [HttpGet] + public List SelectNationAll([FromQuery]Nation nation = null) + { + return baseService.SelectNationAll(nation); + } + + /// + /// 查询民族类型 + /// + /// + [HttpGet] + public Nation SelectNation([FromQuery]Nation nation) + { + return baseService.SelectNation(nation); + } + + /// + /// 添加民族类型 + /// + /// + /// + [HttpPost] + public bool AddNation([FromBody]Nation nation) + { + return baseService.AddNation(nation); + } + + /// + /// 删除民族类型 + /// + /// + /// + [HttpPost] + public bool DelNation([FromBody]Nation nation) + { + return baseService.DelNation(nation); + } + + /// + /// 更新民族类型 + /// + /// + /// + [HttpPost] + public bool UpdNation([FromBody]Nation nation) + { + return baseService.UpdNation(nation); + } + + #endregion + + #region 学历模块 + + /// + /// 查询所有学历类型 + /// + /// + [HttpGet] + public List SelectEducationAll([FromQuery]Education education = null) + { + return baseService.SelectEducationAll(education); + } + + /// + /// 查询学历类型 + /// + /// + [HttpGet] + public Education SelectEducation([FromQuery]Education education) + { + return baseService.SelectEducation(education); + } + + /// + /// 添加学历类型 + /// + /// + /// + [HttpPost] + public bool AddEducation([FromBody]Education education) + { + return baseService.AddEducation(education); + } + + /// + /// 删除学历类型 + /// + /// + /// + [HttpPost] + public bool DelEducation([FromBody]Education education) + { + return baseService.DelEducation(education); + } + + /// + /// 更新学历类型 + /// + /// + /// + [HttpPost] + public bool UpdEducation([FromBody]Education education) + { + return baseService.UpdEducation(education); + } + + #endregion + + #region 部门模块 + + /// + /// 查询所有部门类型(可用) + /// + /// + [HttpGet] + public List SelectDeptAllCanUse() + { + return baseService.SelectDeptAllCanUse(); + } + + /// + /// 查询所有部门类型 + /// + /// + [HttpGet] + public List SelectDeptAll() + { + return baseService.SelectDeptAll(); + } + + /// + /// 查询部门类型 + /// + /// + [HttpGet] + public Dept SelectDept([FromQuery]Dept dept) + { + return baseService.SelectDept(dept); + } + + /// + /// 添加部门类型 + /// + /// + /// + [HttpPost] + public bool AddDept([FromBody]Dept dept) + { + return baseService.AddDept(dept); + } + + /// + /// 删除部门类型 + /// + /// + /// + [HttpPost] + public bool DelDept([FromBody]Dept dept) + { + return baseService.DelDept(dept); + } + + /// + /// 更新部门类型 + /// + /// + /// + [HttpPost] + public bool UpdDept([FromBody]Dept dept) + { + return baseService.UpdDept(dept); + } + + #endregion + + #region 客户类型模块 + + /// + /// 查询所有客户类型(可用) + /// + /// + [HttpGet] + public List SelectCustoTypeAllCanUse() + { + return baseService.SelectCustoTypeAllCanUse(); + } + + /// + /// 查询所有客户类型 + /// + /// + [HttpGet] + public List SelectCustoTypeAll() + { + return baseService.SelectCustoTypeAll(); + } + + /// + /// 根据客户类型ID查询类型名称 + /// + /// + /// + [HttpGet] + public CustoType SelectCustoTypeByTypeId([FromQuery]CustoType custoType) + { + return baseService.SelectCustoTypeByTypeId(custoType); + } + + /// + /// 添加客户类型 + /// + /// + /// + [HttpPost] + public bool InsertCustoType([FromBody]CustoType custoType) + { + return baseService.InsertCustoType(custoType); + } + + /// + /// 删除客户类型 + /// + /// + /// + [HttpPost] + public bool DeleteCustoType([FromBody]CustoType custoType) + { + return baseService.DeleteCustoType(custoType); + } + + /// + /// 更新客户类型 + /// + /// + /// + [HttpPost] + public bool UpdateCustoType([FromBody]CustoType custoType) + { + return baseService.UpdateCustoType(custoType); + } + + #endregion + + #region 证件类型模块 + + /// + /// 查询所有证件类型(可用) + /// + /// + [HttpGet] + public List SelectPassPortTypeAllCanUse() + { + return baseService.SelectPassPortTypeAllCanUse(); + } + + /// + /// 查询所有证件类型 + /// + /// + [HttpGet] + public List SelectPassPortTypeAll() + { + return baseService.SelectPassPortTypeAll(); + } + + /// + /// 根据证件类型ID查询类型名称 + /// + /// + /// + [HttpGet] + public PassPortType SelectPassPortTypeByTypeId([FromQuery]PassPortType passPortType) + { + return baseService.SelectPassPortTypeByTypeId(passPortType); + } + + /// + /// 添加证件类型 + /// + /// + /// + [HttpPost] + public bool InsertPassPortType([FromBody]PassPortType passPortType) + { + return baseService.InsertPassPortType(passPortType); + } + + /// + /// 删除证件类型 + /// + /// + /// + [HttpPost] + public bool DeletePassPortType([FromBody]PassPortType portType) + { + return baseService.DeletePassPortType(portType); + } + + /// + /// 更新证件类型 + /// + /// + /// + [HttpPost] + public bool UpdatePassPortType([FromBody]PassPortType portType) + { + return baseService.UpdatePassPortType(portType); + } + + #endregion + + #region 奖惩类型模块 + + /// + /// 查询所有奖惩类型(可用) + /// + /// + [HttpGet] + public List SelectGBTypeAllCanUse() + { + return baseService.SelectGBTypeAllCanUse(); + } + + /// + /// 查询所有奖惩类型 + /// + /// + [HttpGet] + public List SelectGBTypeAll() + { + return baseService.SelectGBTypeAll(); + } + + /// + /// 根据奖惩类型ID查询类型名称 + /// + /// + /// + [HttpGet] + public GBType SelectGBTypeByTypeId([FromQuery]GBType gBType) + { + return baseService.SelectGBTypeByTypeId(gBType); + } + + /// + /// 添加奖惩类型 + /// + /// + /// + [HttpPost] + public bool InsertGBType([FromBody]GBType gBType) + { + return baseService.InsertGBType(gBType); + } + + /// + /// 删除奖惩类型 + /// + /// + /// + [HttpPost] + public bool DeleteGBType([FromBody]GBType gBType) + { + return baseService.DeleteGBType(gBType); + } + + /// + /// 更新奖惩类型 + /// + /// + /// + [HttpPost] + public bool UpdateGBType([FromBody]GBType gBType) + { + return baseService.UpdateGBType(gBType); + } + + #endregion + + #region URL模块 + /// + /// 基础URL + /// + /// + [HttpGet] + public Base GetBase() + { + return baseService.GetBase(); + } + #endregion + } +} diff --git a/EOM.TSHotelManager.WebApi/Controllers/Zero/CheckInfo/CheckInfoController.cs b/EOM.TSHotelManager.WebApi/Controllers/Zero/CheckInfo/CheckInfoController.cs new file mode 100644 index 0000000..de5f621 --- /dev/null +++ b/EOM.TSHotelManager.WebApi/Controllers/Zero/CheckInfo/CheckInfoController.cs @@ -0,0 +1,38 @@ +using EOM.TSHotelManager.Application; +using EOM.TSHotelManager.Core; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using System.Collections.Generic; + +namespace EOM.TSHotelManager.WebApi.Controllers +{ + /// + /// 监管统计控制器 + /// + public class CheckInfoController : ControllerBase + { + /// + /// 监管统计 + /// + private readonly ICheckInfoService checkInfoService; + + /// + /// + /// + /// + public CheckInfoController(ICheckInfoService checkInfoService) + { + this.checkInfoService = checkInfoService; + } + + /// + /// 查询所有监管统计信息 + /// + /// + [HttpGet] + public List SelectCheckInfoAll() + { + return checkInfoService.SelectCheckInfoAll(); + } + } +} diff --git a/EOM.TSHotelManager.WebApi/Controllers/Zero/Module/ModuleController.cs b/EOM.TSHotelManager.WebApi/Controllers/Zero/Module/ModuleController.cs new file mode 100644 index 0000000..6b6a749 --- /dev/null +++ b/EOM.TSHotelManager.WebApi/Controllers/Zero/Module/ModuleController.cs @@ -0,0 +1,72 @@ +using EOM.TSHotelManager.Application; +using EOM.TSHotelManager.Core; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using System.Collections.Generic; + +namespace EOM.TSHotelManager.WebApi.Controllers +{ + /// + /// 系统模块控制器 + /// + public class ModuleController : ControllerBase + { + /// + /// 系统模块 + /// + private readonly IAdminModuleZeroService adminModuleZeroService; + + /// + /// + /// + /// + public ModuleController(IAdminModuleZeroService adminModuleZeroService) + { + this.adminModuleZeroService = adminModuleZeroService; + } + + /// + /// 获取所有模块 + /// + /// + [HttpGet] + public List GetAllModule() + { + return adminModuleZeroService.GetAllModule(); + } + + /// + /// 根据账号获取对应模块 + /// + /// + /// + [HttpGet] + public List GetAllModuleByAdmin([FromQuery]Admin admin) + { + return adminModuleZeroService.GetAllModuleByAdmin(admin); + } + + /// + /// 批量添加模块 + /// + /// + /// + [HttpPost] + public bool AddModuleZeroList([FromBody]List moduleZeros) + { + return adminModuleZeroService.AddModuleZeroList(moduleZeros); + } + + /// + /// 批量删除模块 + /// + /// + /// + [HttpPost] + public bool DelModuleZeroList([FromBody]ModuleZero moduleZero) + { + return adminModuleZeroService.DelModuleZeroList(moduleZero); + } + + } +} diff --git a/EOM.TSHotelManager.WebApi/Controllers/Zero/Notice/NoticeController.cs b/EOM.TSHotelManager.WebApi/Controllers/Zero/Notice/NoticeController.cs new file mode 100644 index 0000000..6015dd3 --- /dev/null +++ b/EOM.TSHotelManager.WebApi/Controllers/Zero/Notice/NoticeController.cs @@ -0,0 +1,55 @@ +using EOM.TSHotelManager.Application; +using EOM.TSHotelManager.Core; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using System.Collections.Generic; + +namespace EOM.TSHotelManager.WebApi.Controllers +{ + /// + /// 公告控制器 + /// + public class NoticeController : ControllerBase + { + /// + /// 公告 + /// + private readonly INoticeService noticeService; + + /// + /// + /// + /// + public NoticeController(INoticeService noticeService) + { + this.noticeService = noticeService; + } + + #region 获取所有公告信息 + /// + /// 获取所有公告信息 + /// + /// + [HttpGet] + public List SelectNoticeAll() + { + return noticeService.SelectNoticeAll(); + } + #endregion + + #region 上传公告信息 + /// + /// 上传公告信息 + /// + /// + /// + [HttpPost] + public bool InsertNotice([FromBody]Notice notice) + { + return noticeService.InsertNotice(notice); + } + + #endregion + + } +} diff --git a/EOM.TSHotelManager.WebApi/Controllers/Zero/VipRule/VipRuleController.cs b/EOM.TSHotelManager.WebApi/Controllers/Zero/VipRule/VipRuleController.cs new file mode 100644 index 0000000..343d195 --- /dev/null +++ b/EOM.TSHotelManager.WebApi/Controllers/Zero/VipRule/VipRuleController.cs @@ -0,0 +1,82 @@ +using EOM.TSHotelManager.Application; +using EOM.TSHotelManager.Core; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; +using System.Collections.Generic; + +namespace EOM.TSHotelManager.WebApi.Controllers +{ + /// + /// 会员规则控制器 + /// + public class VipRuleController : ControllerBase + { + /// + /// 会员规则 + /// + private readonly IVipRuleAppService vipRuleAppService; + + /// + /// + /// + /// + public VipRuleController(IVipRuleAppService vipRuleAppService) + { + this.vipRuleAppService = vipRuleAppService; + } + + /// + /// 查询会员等级规则列表 + /// + /// + [HttpGet] + public List SelectVipRuleList() + { + return vipRuleAppService.SelectVipRuleList(); + } + + /// + /// 查询会员等级规则 + /// + /// + /// + [HttpGet] + public VipRule SelectVipRule([FromQuery]VipRule vipRule) + { + return vipRuleAppService.SelectVipRule(vipRule); + } + + /// + /// 添加会员等级规则 + /// + /// + /// + [HttpPost] + public bool AddVipRule([FromBody]VipRule vipRule) + { + return vipRuleAppService.AddVipRule(vipRule); + } + + /// + /// 删除会员等级规则 + /// + /// + /// + [HttpPost] + public bool DelVipRule([FromBody]VipRule vipRule) + { + return vipRuleAppService.DelVipRule(vipRule); + } + + /// + /// 更新会员等级规则 + /// + /// + /// + [HttpPost] + public bool UpdVipRule([FromBody]VipRule vipRule) + { + return vipRuleAppService.UpdVipRule(vipRule); + } + } +} diff --git a/EOM.TSHotelManager.WebApi/EOM.TSHotelManager.WebApi.csproj b/EOM.TSHotelManager.WebApi/EOM.TSHotelManager.WebApi.csproj new file mode 100644 index 0000000..cbf3888 --- /dev/null +++ b/EOM.TSHotelManager.WebApi/EOM.TSHotelManager.WebApi.csproj @@ -0,0 +1,37 @@ + + + + net6.0-windows8.0 + EOM.TSHotelManager.WebApi.Program + + + + EOM.TSHotelManager.WebApi.xml + + Off + 1701;1702;1591; + True + + + + False + + + + + + + + + + + + + + + + + + + + diff --git a/EOM.TSHotelManager.WebApi/EOM.TSHotelManager.WebApi.xml b/EOM.TSHotelManager.WebApi/EOM.TSHotelManager.WebApi.xml new file mode 100644 index 0000000..48f3b92 --- /dev/null +++ b/EOM.TSHotelManager.WebApi/EOM.TSHotelManager.WebApi.xml @@ -0,0 +1,1303 @@ + + + + EOM.TSHotelManager.WebApi + + + + + 资产信息控制器 + + + + + 资产信息 + + + + + + + + + + + 添加资产信息 + + + + + + + 查询资产信息 + + + + + + 用户信息控制器 + + + + + 用户信息 + + + + + + + + + + + 添加客户信息 + + + + + + + 更新客户信息 + + + + + + + 更新客户类型(即会员等级) + + + + + + + + 查询酒店盈利情况 + + + + + + 查询所有客户信息 + + + + + + 查询指定客户信息 + + + + + + 根据客户编号查询客户信息 + + + + + + + 酒店宣传联动内容控制器 + + + + + 酒店宣传联动内容 + + + + + + + + + + + 查询所有宣传联动内容(跑马灯) + + + + + + 预约信息控制器 + + + + + 预约信息 + + + + + + + + + + + 获取所有预约信息 + + + + + + 根据房间编号获取预约信息 + + + + + + + 删除预约信息 + + + + + + + 添加预约信息 + + + + + + + 房间信息控制器 + + + + + 房间信息 + + + + + + + + + + + 根据房间状态获取相应状态的房间信息 + + + + + + + 根据房间状态来查询可使用的房间 + + + + + + 获取所有房间信息 + + + + + + 获取房间分区的信息 + + + + + + 根据房间编号查询房间信息 + + + + + + + 根据房间编号退房(退房) + + + + + + + 根据房间编号查询截止到今天住了多少天 + + + + + + + 根据房间编号修改房间信息(入住) + + + + + + + 根据房间编号修改房间信息(预约) + + + + + + + 查询可入住房间数量 + + + + + + 查询已入住房间数量 + + + + + + 根据房间编号查询房间价格 + + + + + + 查询脏房数量 + + + + + + 查询维修房数量 + + + + + + 查询预约房数量 + + + + + + 根据房间编号更改房间状态 + + + + + + + + 添加房间 + + + + + + + 查询所有可消费(已住)房间 + + + + + + 获取所有房间状态 + + + + + + 根据房间编号查询房间状态编号 + + + + + + + 商品消费控制器 + + + + + 商品消费 + + + + + + + + + + + 查询所有商品 + + + + + + 修改商品 + + + + + + + + 修改商品信息 + + + + + + + 撤回客户消费信息 + + + + + + + + + 根据商品编号删除商品信息 + + + + + + + 根据商品名称和价格查询商品编号 + + + + + + + + 根据商品编号查询商品信息 + + + + + + + 添加商品 + + + + + + + 消费信息控制器 + + + + + 消费信息 + + + + + + + + + + + 添加消费信息 + + + + + + + 根据客户编号查询消费信息 + + + + + + + 根据房间编号查询消费信息 + + + + + + + 根据客户编号查询历史消费信息 + + + + + + + 查询消费的所有信息 + + + + + + 根据房间号查询消费的所有信息 + + + + + + 根据房间编号、入住时间到当前时间查询消费总金额 + + + + + + + + 根据房间编号、入住时间和当前时间修改结算状态 + + + + + + + + 将转房前的未结算记录一同转移到新房间 + + + + + + + + + 更新消费信息 + + + + + + + 水电信息控制器 + + + + + 水电信息 + + + + + + + + + + + 根据房间编号查询水电费信息 + + + + + + + 根据房间编号、使用时间查询水电费信息 + + + + + + + + + 获取所有水电费信息 + + + + + + 添加水电费信息 + + + + + + + 修改水电费信息(根据房间编号) + + + + + + + 根据房间信息、使用时间修改水电费 + + + + + + + 根据房间编号、使用时间删除水电费信息 + + + + + + + + + 获取所有水电费信息 + + + + + + 导航控件模块控制器 + + + + + 导航控件 + + + + + + + + + + + 导航控件列表 + + + + + + 员工打卡控制器 + + + + + 员工打卡 + + + + + + + + + + + 根据员工编号查询其所有的打卡记录 + + + + + + + 查询员工签到天数 + + + + + + + 查询今天员工是否已签到 + + + + + + + 添加员工打卡数据 + + + + + + + 奖惩信息控制器 + + + + + 奖惩信息 + + + + + + + + + + + 添加员工奖惩记录 + + + + + + + 根据工号查找所有的奖惩记录信息 + + + + + + + 员工履历控制器 + + + + + 员工履历 + + + + + + + + + + + 根据工号添加员工履历 + + + + + + + 根据工号查询履历信息 + + + + + + + 照片控制器 + + + + + 照片 + + + + + + + + + + + 查询员工照片 + + + + + + + 添加员工照片 + + + + + + + 删除员工照片 + + + + + + + 更新员工照片 + + + + + + + 管理员控制器 + + + + + 管理员模块 + + + + + + + + + + + 根据超管密码查询员工类型和权限 + + + + + + + 根据超管账号查询对应的密码 + + + + + + + 获取所有管理员列表 + + + + + + 修改密码 + + + + + + + 获取管理员列表 + + + + + + 添加管理员 + + + + + + + 获取管理员信息 + + + + + + + 获取所有管理员类型 + + + + + + 批量更新管理员账户 + + + + + + + 基础信息控制器 + + + + + 基础信息 + + + + + + + + + + + 查询所有性别类型 + + + + + + 查询性别类型 + + + + + + 添加性别类型 + + + + + + + 删除性别类型 + + + + + + + 更新性别类型 + + + + + + + 查询所有职位类型 + + + + + + 查询职位类型 + + + + + + 添加职位类型 + + + + + + + 删除职位类型 + + + + + + + 更新职位类型 + + + + + + + 查询所有民族类型 + + + + + + 查询民族类型 + + + + + + 添加民族类型 + + + + + + + 删除民族类型 + + + + + + + 更新民族类型 + + + + + + + 查询所有学历类型 + + + + + + 查询学历类型 + + + + + + 添加学历类型 + + + + + + + 删除学历类型 + + + + + + + 更新学历类型 + + + + + + + 查询所有部门类型(可用) + + + + + + 查询所有部门类型 + + + + + + 查询部门类型 + + + + + + 添加部门类型 + + + + + + + 删除部门类型 + + + + + + + 更新部门类型 + + + + + + + 查询所有客户类型(可用) + + + + + + 查询所有客户类型 + + + + + + 根据客户类型ID查询类型名称 + + + + + + + 添加客户类型 + + + + + + + 删除客户类型 + + + + + + + 更新客户类型 + + + + + + + 查询所有证件类型(可用) + + + + + + 查询所有证件类型 + + + + + + 根据证件类型ID查询类型名称 + + + + + + + 添加证件类型 + + + + + + + 删除证件类型 + + + + + + + 更新证件类型 + + + + + + + 查询所有奖惩类型(可用) + + + + + + 查询所有奖惩类型 + + + + + + 根据奖惩类型ID查询类型名称 + + + + + + + 添加奖惩类型 + + + + + + + 删除奖惩类型 + + + + + + + 更新奖惩类型 + + + + + + + 基础URL + + + + + + 监管统计控制器 + + + + + 监管统计 + + + + + + + + + + + 查询所有监管统计信息 + + + + + + 系统模块控制器 + + + + + 系统模块 + + + + + + + + + + + 获取所有模块 + + + + + + 根据账号获取对应模块 + + + + + + + 批量添加模块 + + + + + + + 批量删除模块 + + + + + + + 公告控制器 + + + + + 公告 + + + + + + + + + + + 获取所有公告信息 + + + + + + 上传公告信息 + + + + + + + 会员规则控制器 + + + + + 会员规则 + + + + + + + + + + + 查询会员等级规则列表 + + + + + + 查询会员等级规则 + + + + + + + 添加会员等级规则 + + + + + + + 删除会员等级规则 + + + + + + + 更新会员等级规则 + + + + + + + Mvc扩展方法 + + + + + 扩展方法 + + + + + + + + + + + + + + + + + + + + + + + + + 全局路由前缀配置 + + + + + 定义一个路由前缀变量 + + + + + 调用时传入指定的路由前缀 + + + + + + AutoFac + + + + + diff --git a/EOM.TSHotelManager.WebApi/MvcOptionsExtensions.cs b/EOM.TSHotelManager.WebApi/MvcOptionsExtensions.cs new file mode 100644 index 0000000..a98e2b1 --- /dev/null +++ b/EOM.TSHotelManager.WebApi/MvcOptionsExtensions.cs @@ -0,0 +1,22 @@ +using Microsoft.AspNetCore.Mvc.Routing; +using Microsoft.AspNetCore.Mvc; + +namespace EOM.TSHotelManager.WebApi +{ + /// + /// Mvc扩展方法 + /// + public static class MvcOptionsExtensions + { + /// + /// 扩展方法 + /// + /// + /// + public static void UseCentralRoutePrefix(this MvcOptions opts, IRouteTemplateProvider routeAttribute) + { + // 添加我们自定义 实现IApplicationModelConvention的RouteConvention + opts.Conventions.Insert(0, new RouteConvention(routeAttribute)); + } + } +} diff --git a/EOM.TSHotelManager.WebApi/Program.cs b/EOM.TSHotelManager.WebApi/Program.cs new file mode 100644 index 0000000..3cf7d8b --- /dev/null +++ b/EOM.TSHotelManager.WebApi/Program.cs @@ -0,0 +1,42 @@ +using Autofac; +using Autofac.Extensions.DependencyInjection; +using EOM.TSHotelManager.EntityFramework; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace EOM.TSHotelManager.WebApi +{ + /// + /// + /// + public class Program + { + /// + /// + /// + /// + public static void Main(string?[] args) + { + CreateHostBuilder(args).Build().Run(); + } + + /// + /// + /// + /// + /// + public static IHostBuilder CreateHostBuilder(string?[] args) => + Host.CreateDefaultBuilder(args) + .UseServiceProviderFactory(new AutofacServiceProviderFactory())//滻Ĭ + .ConfigureWebHostDefaults(webBuilder => + { + webBuilder.UseStartup(); + }); + } +} diff --git a/HotelManagerSystemWebApi.Web.Entry/Properties/launchSettings.json b/EOM.TSHotelManager.WebApi/Properties/launchSettings.json similarity index 66% rename from HotelManagerSystemWebApi.Web.Entry/Properties/launchSettings.json rename to EOM.TSHotelManager.WebApi/Properties/launchSettings.json index 74af6a9..6cbbe87 100644 --- a/HotelManagerSystemWebApi.Web.Entry/Properties/launchSettings.json +++ b/EOM.TSHotelManager.WebApi/Properties/launchSettings.json @@ -4,28 +4,28 @@ "windowsAuthentication": false, "anonymousAuthentication": true, "iisExpress": { - "applicationUrl": "http://localhost:53785", - "sslPort": 44342 + "applicationUrl": "http://localhost:63001", + "sslPort": 0 } }, "profiles": { "IIS Express": { "commandName": "IISExpress", "launchBrowser": true, - "launchUrl": "", + "launchUrl": "swagger/index.html", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } }, - "HotelManagerSystemWebApi.Web.Entry": { + "EOM.TSHotelManager.WebApi": { "commandName": "Project", - "dotnetRunMessages": "true", + "dotnetRunMessages": true, "launchBrowser": true, - "launchUrl": "", - "applicationUrl": "https://localhost:5001;http://localhost:5000", + "launchUrl": "swagger/index.html", + "applicationUrl": "http://localhost:63001", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } } } -} \ No newline at end of file +} diff --git a/EOM.TSHotelManager.WebApi/RouteConvention.cs b/EOM.TSHotelManager.WebApi/RouteConvention.cs new file mode 100644 index 0000000..42eb6dd --- /dev/null +++ b/EOM.TSHotelManager.WebApi/RouteConvention.cs @@ -0,0 +1,57 @@ +using Microsoft.AspNetCore.Mvc.ApplicationModels; +using Microsoft.AspNetCore.Mvc.Routing; +using System.Linq; + +namespace EOM.TSHotelManager.WebApi +{ + /// + /// 全局路由前缀配置 + /// + public class RouteConvention:IApplicationModelConvention + { + /// + /// 定义一个路由前缀变量 + /// + private readonly AttributeRouteModel _centralPrefix; + + /// + /// 调用时传入指定的路由前缀 + /// + /// + public RouteConvention(IRouteTemplateProvider routeTemplateProvider) + { + _centralPrefix = new AttributeRouteModel(routeTemplateProvider); + } + + //接口的Apply方法 + public void Apply(ApplicationModel application) + { + //遍历所有的 Controller + foreach (var controller in application.Controllers) + { + // 1、已经标记了 RouteAttribute 的 Controller + //这一块需要注意,如果在控制器中已经标注有路由了,则会在路由的前面再添加指定的路由内容。 + var matchedSelectors = controller.Selectors.Where(x => x.AttributeRouteModel != null).ToList(); + if (matchedSelectors.Any()) + { + foreach (var selectorModel in matchedSelectors) + { + // 在 当前路由上 再 添加一个 路由前缀 + selectorModel.AttributeRouteModel = AttributeRouteModel.CombineAttributeRouteModel(_centralPrefix, + selectorModel.AttributeRouteModel); + } + } + //2、 没有标记 RouteAttribute 的 Controller + var unmatchedSelectors = controller.Selectors.Where(x => x.AttributeRouteModel == null).ToList(); + if (unmatchedSelectors.Any()) + { + foreach (var selectorModel in unmatchedSelectors) + { + // 添加一个 路由前缀 + selectorModel.AttributeRouteModel = _centralPrefix; + } + } + } + } + } +} diff --git a/EOM.TSHotelManager.WebApi/Startup.cs b/EOM.TSHotelManager.WebApi/Startup.cs new file mode 100644 index 0000000..3d7e3b4 --- /dev/null +++ b/EOM.TSHotelManager.WebApi/Startup.cs @@ -0,0 +1,139 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Threading.Tasks; +using Autofac; +using EncryptTools.Core; +using EOM.TSHotelManager.EntityFramework; +using Microsoft.AspNetCore.Builder; +using Microsoft.AspNetCore.Hosting; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.Controllers; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.DependencyInjection.Extensions; +using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Logging; +using Microsoft.OpenApi.Models; + +namespace EOM.TSHotelManager.WebApi +{ + public class Startup + { + public Startup(IConfiguration configuration) + { + Configuration = configuration; + } + + public IConfiguration Configuration { get; } + + // This method gets called by the runtime. Use this method to add services to the container. + public void ConfigureServices(IServiceCollection services) + { + services.AddControllers(); + + #region ȫ· + //ڸǰ׺ûض·ǰǰ׺ + services.AddMvc(opt => + { + opt.UseCentralRoutePrefix(new RouteAttribute("api/[controller]/[action]")); + }); + #endregion + + #region עSwagger + services.AddSwaggerGen(s => + { + #region ע Swagger + s.SwaggerDoc("v1", new OpenApiInfo() + { + Title = "EOM.TSHotelManager.Web", //Swaggerĵ + Version = "version-1.0.0", //Swaggerĵİ汾 + Description = "ӿĵ", //Swaggerĵ + License = new OpenApiLicense() + { + Name = "MIT", + Url = new Uri("https://mit-license.org/") + }, //SwaggerĵĿԴȨЭ + TermsOfService = new Uri("https://www.oscode.top/"), //Swaggerĵķ֧ҳ + Contact = new OpenApiContact + { + Name = "׿Ԫ(Easy-Open-Meta)", + Email = "eom-official@oscode.top", + Url = new Uri("https://www.oscode.top/") + } + }); + //ȡͬ¸ֲxmlעͣһȡҵ߼㡢ʵͽӿڲ㼴 + s.IncludeXmlComments("bin/Debug/net6.0/EOM.TSHotelManager.Application.xml"); + s.IncludeXmlComments("bin/Debug/net6.0/EOM.TSHotelManager.Core.xml"); + s.IncludeXmlComments("bin/Debug/net6.0/EOM.TSHotelManager.WebApi.xml"); + #endregion + + #region ʽʱ + //s.IncludeXmlComments("EOM.TSHotelManager.Application.xml"); + //s.IncludeXmlComments("EOM.TSHotelManager.Core.xml"); + //s.IncludeXmlComments("EOM.TSHotelManager.WebApi.xml"); + #endregion + }); + #endregion + + + } + + // This method gets called by the runtime. Use this method to configure the HTTP request pipeline. + public void Configure(IApplicationBuilder app, IWebHostEnvironment env) + { + if (env.IsDevelopment()) + { + app.UseDeveloperExceptionPage(); + } + + app.UseRouting(); + + app.UseAuthorization(); + + app.UseEndpoints(endpoints => + { + endpoints.MapControllers(); + }); + + + #region ʹSwaggerм + app.UseSwagger(); + app.UseSwaggerUI(s => + { + s.SwaggerEndpoint("/swagger/v1/swagger.json", "EOM.TSHotelManagerӿĵ"); + }); + #endregion + } + + /// + /// AutoFac + /// + /// + public void ConfigureContainer(ContainerBuilder builder) + { + #region AutoFac IOC,ʵע + try + { + //עִ + builder.RegisterGeneric(typeof(PgRepository<>)).As(typeof(PgRepository<>)); + + //ע + var assemblyService = Assembly.LoadFrom(Path.Combine(AppContext.BaseDirectory, "EOM.TSHotelManager.Application.dll")); + builder.RegisterAssemblyTypes(assemblyService) + .AsImplementedInterfaces() + .InstancePerDependency() + .PropertiesAutowired(); + } + catch (Exception ex) + { + throw new Exception(ex.Message + "\n" + ex.InnerException); + } + #endregion + } + + + } +} diff --git a/HotelManagerSystemWebApi.Web.Entry/appsettings.Development.json b/EOM.TSHotelManager.WebApi/appsettings.Development.json similarity index 98% rename from HotelManagerSystemWebApi.Web.Entry/appsettings.Development.json rename to EOM.TSHotelManager.WebApi/appsettings.Development.json index 45fe774..8983e0f 100644 --- a/HotelManagerSystemWebApi.Web.Entry/appsettings.Development.json +++ b/EOM.TSHotelManager.WebApi/appsettings.Development.json @@ -6,4 +6,4 @@ "Microsoft.Hosting.Lifetime": "Information" } } -} \ No newline at end of file +} diff --git a/EOM.TSHotelManager.WebApi/appsettings.json b/EOM.TSHotelManager.WebApi/appsettings.json new file mode 100644 index 0000000..d9d9a9b --- /dev/null +++ b/EOM.TSHotelManager.WebApi/appsettings.json @@ -0,0 +1,10 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "AllowedHosts": "*" +} diff --git a/HotelManagerSystemWebApi.Application/Business/Cash/Dtos/AddCashInfoDto.cs b/HotelManagerSystemWebApi.Application/Business/Cash/Dtos/AddCashInfoDto.cs deleted file mode 100644 index 1e02044..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Cash/Dtos/AddCashInfoDto.cs +++ /dev/null @@ -1,84 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *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. - * - */ - -using HotelManagerSystemWebApi.Core; -using System; -using System.ComponentModel.DataAnnotations; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 添加资产信息 - /// 输入DTO - /// - public class AddCashInfoDto:IBaseDto - { - /// - /// 资产编号 - /// - public string CashNo { get; set; } - /// - /// 资产名称 - /// - [Required] - public string CashName { get; set; } - /// - /// 资产总值 - /// - [Required] - public decimal CashPrice { get; set; } - /// - /// 所属部门 - /// - [Required] - public string CashClub { get; set; } - /// - /// 入库时间 - /// - [Required] - public DateTime CashTime { get; set; } - /// - /// 资产来源 - /// - [Required] - public string CashSource { get; set; } - /// - /// 资产经办人 - /// - [Required] - public string CashPerson { get; set; } - /// - /// 删除标记 - /// - public int delete_mk { get; set; } - /// - /// 资料创建人 - /// - public string datains_usr { get; set; } - /// - /// 资料创建时间 - /// - public DateTime? datains_date { get; set; } - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Cash/Dtos/CashInfoListDto.cs b/HotelManagerSystemWebApi.Application/Business/Cash/Dtos/CashInfoListDto.cs deleted file mode 100644 index 20475d8..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Cash/Dtos/CashInfoListDto.cs +++ /dev/null @@ -1,44 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *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. - * - */ - -using HotelManagerSystemWebApi.Core; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 查询资产信息 - /// 输入DTO - /// - public class CashInfoListDto:IListDto - { - /// - /// 资产编号 - /// - public string CashNo { get; set; } - /// - /// 资产名称 - /// - public string CashName { get; set; } - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Cash/Dtos/OAddCashInfoDto.cs b/HotelManagerSystemWebApi.Application/Business/Cash/Dtos/OAddCashInfoDto.cs deleted file mode 100644 index 086f7a7..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Cash/Dtos/OAddCashInfoDto.cs +++ /dev/null @@ -1,38 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *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. - * - */ - -using HotelManagerSystemWebApi.Core; -using System.Collections.Generic; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 添加资产信息 - /// 输出DTO - /// - public class OAddCashInfoDto:MsgDto - { - - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Cash/Temp/Temp_Cash.cs b/HotelManagerSystemWebApi.Application/Business/Cash/Temp/Temp_Cash.cs deleted file mode 100644 index a97221b..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Cash/Temp/Temp_Cash.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 资产管理 - /// - public class Temp_Cash - { - /// - /// 资产编号 - /// - public string CashNo { get; set; } - /// - /// 资产名称 - /// - public string CashName { get; set; } - /// - /// 资产总值 - /// - public decimal CashPrice { get; set; } - /// - /// 资产总值描述 - /// - public string CashPriceStr { get; set; } - /// - /// 所属部门 - /// - public string CashClub { get; set; } - /// - /// 所属部门描述 - /// - public string DeptName { get; set; } - /// - /// 入库时间 - /// - public DateTime CashTime { get; set; } - /// - /// 资产来源 - /// - public string CashSource { get; set; } - /// - /// 资产经办人 - /// - public string CashPerson { get; set; } - /// - /// 资产经办人 - /// - public string PersonName { get; set; } - /// - /// 删除标记 - /// - public int delete_mk { get; set; } - /// - /// 资料创建人 - /// - public string datains_usr { get; set; } - /// - /// 资料创建时间 - /// - public DateTime? datains_date { get; set; } - /// - /// 资料更新人 - /// - public string datachg_usr { get; set; } - /// - /// 资料更新时间 - /// - public DateTime? datachg_date { get; set; } - - } -} diff --git a/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/OInsertCustomerInfoDto.cs b/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/OInsertCustomerInfoDto.cs deleted file mode 100644 index 2e1d35b..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/OInsertCustomerInfoDto.cs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *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. - * - */ - -using HotelManagerSystemWebApi.Core; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 添加客户信息 - /// 输出DTO - /// - public class OInsertCustomerInfoDto:MsgDto - { - - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/OSelectAllMoneyDto.cs b/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/OSelectAllMoneyDto.cs deleted file mode 100644 index f301785..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/OSelectAllMoneyDto.cs +++ /dev/null @@ -1,41 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *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. - * - */ - -using HotelManagerSystemWebApi.Core; -using System.Collections.Generic; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 查询酒店盈利情况 - /// 输出DTO - /// - public class OSelectAllMoneyDto:MsgDto - { - /// - /// 酒店盈利数据源 - /// - public List listSource { get; set; } - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/OUpdCustomerInfoDto.cs b/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/OUpdCustomerInfoDto.cs deleted file mode 100644 index 939a828..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/OUpdCustomerInfoDto.cs +++ /dev/null @@ -1,36 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *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. - * - */ - -using HotelManagerSystemWebApi.Core; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 更新客户信息 - /// 输出DTO - /// - public class OUpdCustomerInfoDto : MsgDto - { - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/OUpdCustomerTypeByCustoNoDto.cs b/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/OUpdCustomerTypeByCustoNoDto.cs deleted file mode 100644 index b615e66..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/OUpdCustomerTypeByCustoNoDto.cs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *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. - * - */ - -using HotelManagerSystemWebApi.Core; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 更新客户类型(即会员等级) - /// 输出DTO - /// - public class OUpdCustomerTypeByCustoNoDto:MsgDto - { - - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/SelectCustoAllDto.cs b/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/SelectCustoAllDto.cs deleted file mode 100644 index ca3bc72..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Customer/Dtos/SelectCustoAllDto.cs +++ /dev/null @@ -1,44 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *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. - * - */ - -using HotelManagerSystemWebApi.Core; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 查询所有客户信息 - /// 输入DTO - /// - public class SelectCustoAllDto:IListDto - { - /// - /// 客户编号 - /// - public string CustoNo { get; set; } - /// - /// 客户名称 - /// - public string CustoName { get; set; } - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Customer/Temp/Temp_Customer.cs b/HotelManagerSystemWebApi.Application/Business/Customer/Temp/Temp_Customer.cs deleted file mode 100644 index 790c386..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Customer/Temp/Temp_Customer.cs +++ /dev/null @@ -1,83 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 客户信息 - /// - public class Temp_Customer - { - /// - /// 客户编号 - /// - public string CustoNo { get; set; } - /// - /// 客户名称 - /// - public string CustoName { get; set; } - /// - /// 客户性别 - /// - public int CustoSex { get; set; } - /// - /// 客户电话 - /// - public string CustoTel { get; set; } - /// - /// 证件类型 - /// - public int PassportType { get; set; } - /// - /// 证件号码 - /// - public string CustoID { get; set; } - /// - /// 居住地址 - /// - public string CustoAdress { get; set; } - /// - /// 出生日期 - /// - public DateTime CustoBirth { get; set; } - /// - /// 客户类型 - /// - public int CustoType { get; set; } - /// - /// 客户类型 - /// - public string typeName { get; set; } - /// - /// 证件类型 - /// - public string PassportName { get; set; } - /// - /// 性别 - /// - public string SexName { get; set; } - /// - /// 删除标记 - /// - public int delete_mk { get; set; } - /// - /// 资料创建人 - /// - public string datains_usr { get; set; } - /// - /// 资料创建时间 - /// - public DateTime datains_date { get; set; } - /// - /// 资料更新人 - /// - public string datachg_usr { get; set; } - /// - /// 资料更新时间 - /// - public DateTime datachg_date { get; set; } - } -} diff --git a/HotelManagerSystemWebApi.Application/Business/Fonts/Dtos/OSelectFonListDto.cs b/HotelManagerSystemWebApi.Application/Business/Fonts/Dtos/OSelectFonListDto.cs deleted file mode 100644 index e9d90b9..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Fonts/Dtos/OSelectFonListDto.cs +++ /dev/null @@ -1,41 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *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. - * - */ - -using HotelManagerSystemWebApi.Core; -using System.Collections.Generic; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 查询所有宣传联动内容(跑马灯) - /// 输出DTO - /// - public class OSelectFonListDto:MsgDto - { - /// - /// 数据源 - /// - public List listSource { get; set; } - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Fonts/Temp/Temp_Fonts.cs b/HotelManagerSystemWebApi.Application/Business/Fonts/Temp/Temp_Fonts.cs deleted file mode 100644 index 0d19e68..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Fonts/Temp/Temp_Fonts.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 酒店宣传联动内容 - /// - public class Temp_Fonts - { - /// - /// 宣传内容编号 - /// - public int FontsId { get; set; } - - /// - /// 宣传内容 - /// - public string FontsMess { get; set; } - } -} diff --git a/HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/InsertHydropowerInfoDto.cs b/HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/InsertHydropowerInfoDto.cs deleted file mode 100644 index 60df3a3..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/InsertHydropowerInfoDto.cs +++ /dev/null @@ -1,74 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *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. - * - */ - -using HotelManagerSystemWebApi.Core; -using System; -using System.ComponentModel.DataAnnotations; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 添加水电费信息 - /// 输入DTO - /// - public class InsertHydropowerInfoDto:IBaseDto - { - /// - /// 房间编号 - /// - [Required] - public string RoomNo { get; set; } - /// - /// 开始使用时间 - /// - [Required] - public DateTime UseDate { get; set; } - /// - /// 结束使用时间 - /// - [Required] - public DateTime EndDate { get; set; } - /// - /// 水费 - /// - public decimal WaterUse { get; set; } - /// - /// 电费 - /// - public decimal PowerUse { get; set; } - /// - /// 记录员 - /// - public string Record { get; set; } - /// - /// 客户编号 - /// - [Required] - public string CustoNo { get; set; } - /// - /// 删除标记 - /// - public int delete_mk { get; set; } - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/OInsertHydropowerInfoDto.cs b/HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/OInsertHydropowerInfoDto.cs deleted file mode 100644 index e5deeeb..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/OInsertHydropowerInfoDto.cs +++ /dev/null @@ -1,36 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *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. - * - */ - -using HotelManagerSystemWebApi.Core; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 添加水电费信息 - /// 输出DTO - /// - public class OInsertHydropowerInfoDto:MsgDto - { - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/OSelectHydropowerInfoAllDto.cs b/HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/OSelectHydropowerInfoAllDto.cs deleted file mode 100644 index 55cd07c..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/OSelectHydropowerInfoAllDto.cs +++ /dev/null @@ -1,26 +0,0 @@ -using HotelManagerSystemWebApi.Core; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 获取所有水电费信息 - /// 输出DTO - /// - public class OSelectHydropowerInfoAllDto : MsgDto - { - /// - /// 数据源 - /// - public List listSource { get; set; } - - /// - /// 总数 - /// - public int total { get; set; } - } -} diff --git a/HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/OUpdateHydropowerInfoDto.cs b/HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/OUpdateHydropowerInfoDto.cs deleted file mode 100644 index be6750e..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/OUpdateHydropowerInfoDto.cs +++ /dev/null @@ -1,36 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *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. - * - */ - -using HotelManagerSystemWebApi.Core; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 修改水电费信息 - /// 输出DTO - /// - public class OUpdateHydropowerInfoDto:MsgDto - { - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/SelectHydropowerInfoAllDto.cs b/HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/SelectHydropowerInfoAllDto.cs deleted file mode 100644 index 5913027..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/SelectHydropowerInfoAllDto.cs +++ /dev/null @@ -1,73 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *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. - * - */ - -using HotelManagerSystemWebApi.Core; -using System; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 获取所有水电费信息 - /// 输入DTO - /// - public class SelectHydropowerInfoAllDto:IListDto - { - /// - /// 信息编号 - /// - public int? WtiNo { get; set; } - /// - /// 房间编号 - /// - public string RoomNo { get; set; } - /// - /// 开始使用时间 - /// - public DateTime? UseDate { get; set; } - /// - /// 结束使用时间 - /// - public DateTime? EndDate { get; set; } - /// - /// 水费 - /// - public decimal WaterUse { get; set; } - /// - /// 电费 - /// - public decimal PowerUse { get; set; } - /// - /// 记录员 - /// - public string Record { get; set; } - /// - /// 客户编号 - /// - public string CustoNo { get; set; } - /// - /// 删除标记 - /// - public int delete_mk { get; set; } - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/UpdateHydropowerInfoDto.cs b/HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/UpdateHydropowerInfoDto.cs deleted file mode 100644 index 09a8d10..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Hydropower/Dtos/UpdateHydropowerInfoDto.cs +++ /dev/null @@ -1,81 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *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. - * - */ - -using HotelManagerSystemWebApi.Core; -using System; -using System.ComponentModel.DataAnnotations; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 修改水电费信息 - /// 输入DTO - /// - public class UpdateHydropowerInfoDto:IBaseDto - { - /// - /// 信息编号 - /// - [Required] - public int WtiNo { get; set; } - /// - /// 房间编号 - /// - [Required] - public string RoomNo { get; set; } - /// - /// 开始使用时间 - /// - [Required] - public DateTime UseDate { get; set; } - /// - /// 结束使用时间 - /// - [Required] - public DateTime EndDate { get; set; } - /// - /// 水费 - /// - [Required] - public decimal WaterUse { get; set; } - /// - /// 电费 - /// - [Required] - public decimal PowerUse { get; set; } - /// - /// 记录员 - /// - public string Record { get; set; } - /// - /// 客户编号 - /// - [Required] - public string CustoNo { get; set; } - /// - /// 删除标记 - /// - public int delete_mk { get; set; } - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Hydropower/HydropowerAppService.cs b/HotelManagerSystemWebApi.Application/Business/Hydropower/HydropowerAppService.cs deleted file mode 100644 index dde9929..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Hydropower/HydropowerAppService.cs +++ /dev/null @@ -1,58 +0,0 @@ -using Furion.DynamicApiController; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 水电信息控制器 - /// - public class HydropowerAppService:IDynamicApiController - { - /// - /// 水电信息 - /// - private readonly IHydropowerService hydropowerService; - - /// - /// - /// - /// - public HydropowerAppService(IHydropowerService hydropowerService) - { - this.hydropowerService = hydropowerService; - } - - /// - /// 获取所有水电费信息 - /// - /// - public OSelectHydropowerInfoAllDto SelectHydropowerInfoAll(SelectHydropowerInfoAllDto selectHydropowerInfoAllDto) - { - return hydropowerService.SelectHydropowerInfoAll(selectHydropowerInfoAllDto); - } - - /// - /// 添加水电费信息 - /// - /// - /// - public OInsertHydropowerInfoDto InsertHydropowerInfo(InsertHydropowerInfoDto insertHydropowerInfoDto) - { - return hydropowerService.InsertHydropowerInfo(insertHydropowerInfoDto); - } - - /// - /// 修改水电费信息 - /// - /// - /// - public OUpdateHydropowerInfoDto UpdateHydropowerInfo(UpdateHydropowerInfoDto updateHydropowerInfoDto) - { - return hydropowerService.UpdateHydropowerInfo(updateHydropowerInfoDto); - } - } -} diff --git a/HotelManagerSystemWebApi.Application/Business/Hydropower/Services/HydropowerService.cs b/HotelManagerSystemWebApi.Application/Business/Hydropower/Services/HydropowerService.cs deleted file mode 100644 index 73e96bb..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Hydropower/Services/HydropowerService.cs +++ /dev/null @@ -1,160 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *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. - * - */ -using Furion.DatabaseAccessor; -using Furion.DependencyInjection; -using Furion.LinqBuilder; -using HotelManagerSystemWebApi.Core; -using jvncorelib.EntityLib; -using System; -using System.Collections.Generic; -using System.Linq; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 水电信息接口实现类 - /// - public class HydropowerService:IHydropowerService, ITransient - { - /// - /// 水电 - /// - private readonly IRepository hydropowerRepository; - - /// - /// 客户信息 - /// - private readonly IRepository customerRepository; - - /// - /// - /// - /// - /// - public HydropowerService(IRepository hydropowerRepository, IRepository customerRepository) - { - this.hydropowerRepository = hydropowerRepository; - this.customerRepository = customerRepository; - } - - /// - /// 获取所有水电费信息 - /// - /// - public OSelectHydropowerInfoAllDto SelectHydropowerInfoAll(SelectHydropowerInfoAllDto selectHydropowerInfoAllDto) - { - OSelectHydropowerInfoAllDto oSelectHydropowerInfoAllDto = new OSelectHydropowerInfoAllDto(); - - var where = LinqExpression.Create(a => a.delete_mk != 1); - - //流水号 - if (!selectHydropowerInfoAllDto.WtiNo.IsNullOrEmpty()) - { - where = where.And(a => a.WtiNo == selectHydropowerInfoAllDto.WtiNo); - } - //房间号码 - if (!selectHydropowerInfoAllDto.RoomNo.IsNullOrEmpty()) - { - where = where.And(a => a.RoomNo == selectHydropowerInfoAllDto.RoomNo); - } - //开始时间、结束时间 - if (!selectHydropowerInfoAllDto.UseDate.IsNullOrEmpty() && !selectHydropowerInfoAllDto.EndDate.IsNullOrEmpty()) - { - where = where.And(a => a.UseDate >= selectHydropowerInfoAllDto.UseDate && a.EndDate <= selectHydropowerInfoAllDto.EndDate); - } - //客户编号 - if (!selectHydropowerInfoAllDto.CustoNo.IsNullOrEmpty()) - { - where = where.And(a => a.CustoNo.Equals(selectHydropowerInfoAllDto.CustoNo)); - } - - var count = 0; - - var listSource = hydropowerRepository.AsQueryable(where).ToList() - .GetPageList(selectHydropowerInfoAllDto.PageIndex, selectHydropowerInfoAllDto.PageSize, ref count) - .CopyToModel(); - - var listCustomerId = listSource.Select(a => a.CustoNo).Distinct().ToList(); - var listCustomer = this.customerRepository.AsQueryable(a => listCustomerId.Contains(a.CustoNo)); - - listSource.ForEach(source => - { - var customer = listCustomer.FirstOrDefault(a => a.CustoNo.Equals(source.CustoNo)); - source.CustoNm = customer.IsNullOrEmpty() ? "" : customer.CustoName; - }); - - oSelectHydropowerInfoAllDto.listSource = listSource; - oSelectHydropowerInfoAllDto.total = count; - oSelectHydropowerInfoAllDto.OK(); - - return oSelectHydropowerInfoAllDto; - } - - /// - /// 添加水电费信息 - /// - /// - /// - public OInsertHydropowerInfoDto InsertHydropowerInfo(InsertHydropowerInfoDto insertHydropowerInfoDto) - { - OInsertHydropowerInfoDto oInsertHydropowerInfoDto = new OInsertHydropowerInfoDto(); - - var source = new Hydropower(); - - source = source.UpdateToModel(insertHydropowerInfoDto); - source.datains_usr = insertHydropowerInfoDto.NowLoginUsr; - source.datains_date = DateTime.Now; - this.hydropowerRepository.Insert(source); - oInsertHydropowerInfoDto.OK(); - - return oInsertHydropowerInfoDto; - } - - /// - /// 修改水电费信息 - /// - /// - /// - public OUpdateHydropowerInfoDto UpdateHydropowerInfo(UpdateHydropowerInfoDto updateHydropowerInfoDto) - { - OUpdateHydropowerInfoDto oUpdateHydropowerInfoDto = new OUpdateHydropowerInfoDto(); - - var source = hydropowerRepository.SingleOrDefault(a => a.WtiNo == updateHydropowerInfoDto.WtiNo); - - if(source.IsNullOrEmpty()) - { - oUpdateHydropowerInfoDto.Error_NotFound(); - return oUpdateHydropowerInfoDto; - } - - source = source.UpdateToModel(updateHydropowerInfoDto); - source.datains_usr = updateHydropowerInfoDto.NowLoginUsr; - source.datains_date = DateTime.Now; - this.hydropowerRepository.Update(source); - oUpdateHydropowerInfoDto.OK(); - - return oUpdateHydropowerInfoDto; - } - } -} diff --git a/HotelManagerSystemWebApi.Application/Business/Hydropower/Temp/Temp_Hydropower.cs b/HotelManagerSystemWebApi.Application/Business/Hydropower/Temp/Temp_Hydropower.cs deleted file mode 100644 index 31260d2..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Hydropower/Temp/Temp_Hydropower.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 水电信息 - /// - public class Temp_Hydropower - { - /// - /// 信息编号 - /// - public int WtiNo { get; set; } - /// - /// 房间编号 - /// - public string RoomNo { get; set; } - /// - /// 开始使用时间 - /// - public DateTime UseDate { get; set; } - /// - /// 结束使用时间 - /// - public DateTime EndDate { get; set; } - /// - /// 水费 - /// - public decimal WaterUse { get; set; } - /// - /// 电费 - /// - public decimal PowerUse { get; set; } - /// - /// 记录员 - /// - public string Record { get; set; } - /// - /// 客户编号 - /// - public string CustoNo { get; set; } - /// - /// 删除标记 - /// - public int delete_mk { get; set; } - /// - /// 资料创建人 - /// - public string datains_usr { get; set; } - /// - /// 资料创建时间 - /// - public DateTime datains_date { get; set; } - /// - /// 资料更新人 - /// - public string datachg_usr { get; set; } - /// - /// 资料更新时间 - /// - public DateTime datachg_date { get; set; } - - - /// - /// 客户描述 - /// - public string CustoNm { get; set; } - } -} diff --git a/HotelManagerSystemWebApi.Application/Business/Reser/Dtos/InserReserInfoDto.cs b/HotelManagerSystemWebApi.Application/Business/Reser/Dtos/InserReserInfoDto.cs deleted file mode 100644 index 0d80110..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Reser/Dtos/InserReserInfoDto.cs +++ /dev/null @@ -1,75 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *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. - * - */ - -using HotelManagerSystemWebApi.Core; -using System; -using System.ComponentModel.DataAnnotations; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 添加预约信息 - /// 输入DTO - /// - public class InserReserInfoDto:IBaseDto - { - /// - /// 预约编号 - /// - public string ReserId { get; set; } - /// - /// 客户名称 - /// - [Required] - public string CustoName { get; set; } - /// - /// 预约电话 - /// - [Required] - public string CustoTel { get; set; } - /// - /// 预约渠道 - /// - public string ReserWay { get; set; } - /// - /// 预约房号 - /// - [Required] - public string ReserRoom { get; set; } - /// - /// 预约起始 - /// - [Required] - public DateTime ReserDate { get; set; } - /// - /// 预约止日 - /// - [Required] - public DateTime ReserEndDay { get; set; } - /// - /// 删除标记 - /// - public int delete_mk { get; set; } - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Reser/Dtos/OInserReserInfoDto.cs b/HotelManagerSystemWebApi.Application/Business/Reser/Dtos/OInserReserInfoDto.cs deleted file mode 100644 index 11e2918..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Reser/Dtos/OInserReserInfoDto.cs +++ /dev/null @@ -1,37 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *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. - * - */ - -using HotelManagerSystemWebApi.Core; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 添加预约信息 - /// 输出DTO - /// - public class OInserReserInfoDto:MsgDto - { - - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Reser/Dtos/OSelectReserAllDto.cs b/HotelManagerSystemWebApi.Application/Business/Reser/Dtos/OSelectReserAllDto.cs deleted file mode 100644 index 8c5e829..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Reser/Dtos/OSelectReserAllDto.cs +++ /dev/null @@ -1,46 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *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. - * - */ - -using HotelManagerSystemWebApi.Core; -using System.Collections.Generic; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 获取所有预约信息 - /// 输出DTO - /// - public class OSelectReserAllDto:MsgDto - { - /// - /// 数据源 - /// - public List listSource { get; set; } - - /// - /// 总数 - /// - public int total { get; set; } - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Reser/ReserAppService.cs b/HotelManagerSystemWebApi.Application/Business/Reser/ReserAppService.cs deleted file mode 100644 index 088a194..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Reser/ReserAppService.cs +++ /dev/null @@ -1,49 +0,0 @@ -using Furion.DynamicApiController; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 预约房间控制器 - /// - public class ReserAppService: IDynamicApiController - { - /// - /// 预约房间 - /// - private readonly IReserService _reserService; - - /// - /// - /// - /// - public ReserAppService(IReserService reserService) - { - _reserService = reserService; - } - - /// - /// 获取所有预约信息 - /// - /// - /// - public OSelectReserAllDto SelectReserAll(SelectReserAllDto selectReserAllDto) - { - return this._reserService.SelectReserAll(selectReserAllDto); - } - - /// - /// 添加预约信息 - /// - /// - /// - public OInserReserInfoDto InserReserInfo(InserReserInfoDto inserReserInfoDto) - { - return this._reserService.InserReserInfo(inserReserInfoDto); - } - } -} diff --git a/HotelManagerSystemWebApi.Application/Business/Reser/Services/ReserService.cs b/HotelManagerSystemWebApi.Application/Business/Reser/Services/ReserService.cs deleted file mode 100644 index 7c6e340..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Reser/Services/ReserService.cs +++ /dev/null @@ -1,154 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *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. - * - */ -using Furion.DatabaseAccessor; -using Furion.DependencyInjection; -using Furion.LinqBuilder; -using HotelManagerSystemWebApi.Core; -using jvncorelib.EncryptorLib; -using jvncorelib.EntityLib; -using System; -using System.Collections.Generic; -using System.Linq; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 预约信息接口实现类 - /// - public class ReserService:IReserService, ITransient - { - /// - /// 预约信息 - /// - private readonly IRepository reserRepository; - - /// - /// 房间信息 - /// - private readonly IRepository roomRepository; - - /// - /// 房间类型 - /// - private readonly IRepository roomTypeRepository; - - EncryptLib encryptLib = new EncryptLib(); - - /// - /// - /// - /// - /// - /// - public ReserService(IRepository reserRepository, IRepository roomRepository, IRepository roomTypeRepository) - { - this.reserRepository = reserRepository; - this.roomRepository = roomRepository; - this.roomTypeRepository = roomTypeRepository; - } - - /// - /// 获取所有预约信息 - /// - /// - /// - public OSelectReserAllDto SelectReserAll(SelectReserAllDto selectReserAllDto) - { - OSelectReserAllDto oSelectReserAllDto = new OSelectReserAllDto(); - - var where = LinqExpression.Create(a => a.delete_mk != 1); - - //预约流水号 - if(!selectReserAllDto.ReserId.IsNullOrEmpty()) - { - where = where.And(a => a.ReserId.Contains(a.ReserId)); - } - //客户名称 - if (!selectReserAllDto.CustoName.IsNullOrEmpty()) - { - where = where.And(a => a.CustoName.Contains(a.CustoName)); - } - //联系方式 - if (!selectReserAllDto.CustoTel.IsNullOrEmpty()) - { - where = where.And(a => a.CustoTel.Contains(a.CustoTel)); - } - //预约方式 - if (!selectReserAllDto.ReserWay.IsNullOrEmpty()) - { - where = where.And(a => a.ReserWay.Equals(a.ReserWay)); - } - //预约房号 - if (!selectReserAllDto.ReserRoom.IsNullOrEmpty()) - { - where = where.And(a => a.ReserRoom.Contains(a.ReserRoom)); - } - - var count = 0; - - var listSource = reserRepository.AsQueryable(where).ToList() - .GetPageList(selectReserAllDto.PageIndex, selectReserAllDto.PageSize, ref count) - .CopyToModel(); - - var listRoomNo = listSource.Select(a => a.ReserRoom).Distinct().ToList(); - var listRoom = this.roomRepository.AsQueryable(a => listRoomNo.Contains(a.RoomNo)); - - var listRoomTypeId = listRoom.Select(a => a.RoomType).Distinct().ToList(); - var listRoomType = this.roomTypeRepository.AsQueryable(a => listRoomTypeId.Contains(a.Roomtype)); - - listSource.ForEach(source => - { - var room = listRoom.FirstOrDefault(a => a.RoomNo.Equals(source.ReserRoom)); - var roomType = listRoomType.FirstOrDefault(a => a.Roomtype.Equals(room.RoomType)); - source.ReserRoomType = roomType.IsNullOrEmpty() ? "" : roomType.RoomName; - }); - - oSelectReserAllDto.listSource = listSource; - oSelectReserAllDto.total = count; - oSelectReserAllDto.OK(); - - return oSelectReserAllDto; - } - - /// - /// 添加预约信息 - /// - /// - /// - public OInserReserInfoDto InserReserInfo(InserReserInfoDto inserReserInfoDto) - { - OInserReserInfoDto oInserReserInfoDto = new OInserReserInfoDto(); - - var source = new Reser(); - - source = source.UpdateToModel(inserReserInfoDto); - source.datains_usr = inserReserInfoDto.NowLoginUsr; - source.datains_date = DateTime.Now; - this.reserRepository.Insert(source); - oInserReserInfoDto.OK(); - - return oInserReserInfoDto; - } - } -} diff --git a/HotelManagerSystemWebApi.Application/Business/Reser/Temp/Temp_Reser.cs b/HotelManagerSystemWebApi.Application/Business/Reser/Temp/Temp_Reser.cs deleted file mode 100644 index a2e4c80..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Reser/Temp/Temp_Reser.cs +++ /dev/null @@ -1,70 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 预约列表 - /// - public class Temp_Reser - { - /// - /// 预约编号 - /// - public string ReserId { get; set; } - /// - /// 客户名称 - /// - public string CustoName { get; set; } - /// - /// 预约电话 - /// - public string CustoTel { get; set; } - /// - /// 预约渠道 - /// - public string ReserWay { get; set; } - /// - /// 预约房号 - /// - public string ReserRoom { get; set; } - /// - /// 预约起始 - /// - public DateTime ReserDate { get; set; } - /// - /// 预约止日 - /// - public DateTime ReserEndDay { get; set; } - /// - /// 删除标记 - /// - public int delete_mk { get; set; } - /// - /// 资料创建人 - /// - public string datains_usr { get; set; } - /// - /// 资料创建时间 - /// - public DateTime datains_date { get; set; } - /// - /// 资料更新人 - /// - public string datachg_usr { get; set; } - /// - /// 资料更新时间 - /// - public DateTime datachg_date { get; set; } - - - /// - /// 预约房间类型 - /// - public string ReserRoomType { get; set; } - - } -} diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/DayByRoomNoDto.cs b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/DayByRoomNoDto.cs deleted file mode 100644 index 43ba0b3..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/DayByRoomNoDto.cs +++ /dev/null @@ -1,39 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *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 HotelManagerSystemWebApi.Application -{ - /// - /// 根据房间编号查询截止到今天住了多少天 - /// 输入DTO - /// - public class DayByRoomNoDto : IBaseDto - { - /// - /// 房间编号 - /// - [Required] - public string RoomNo { get; set; } - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/InsertRoomDto.cs b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/InsertRoomDto.cs deleted file mode 100644 index fe465bb..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/InsertRoomDto.cs +++ /dev/null @@ -1,72 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *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. - * - */ -using System; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 添加房间 - /// 输入DTO - /// - public class InsertRoomDto : IBaseDto - { - /// - /// 房间编号 - /// - public string RoomNo { get; set; } - /// - /// 房间类型 - /// - public int RoomType { get; set; } - /// - /// 客户编号 - /// - public string CustoNo { get; set; } - /// - /// 最后一次入住时间 - /// - public DateTime? CheckTime { get; set; } - /// - /// 最后一次退房时间 - /// - public DateTime? CheckOutTime { get; set; } - /// - /// 房间状态ID - /// - public int RoomStateId { get; set; } - /// - /// 房间单价 - /// - public decimal RoomMoney { get; set; } - /// - /// 房间押金 - /// - [MappingField("deposit")] - public decimal RoomDeposit { get; set; } - /// - /// 房间位置 - /// - public string RoomPosition { get; set; } - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/ODayByRoomNoDto.cs b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/ODayByRoomNoDto.cs deleted file mode 100644 index 0fd0246..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/ODayByRoomNoDto.cs +++ /dev/null @@ -1,38 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *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 HotelManagerSystemWebApi.Application -{ - /// - /// 根据房间编号查询截止到今天住了多少天 - /// 输出DTO - /// - public class ODayByRoomNoDto : MsgDto - { - /// - /// 天数 - /// - public int days { get; set; } - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OInsertRoomDto.cs b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OInsertRoomDto.cs deleted file mode 100644 index c189be9..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OInsertRoomDto.cs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *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 HotelManagerSystemWebApi.Application -{ - /// - /// 添加房间 - /// 输出DTO - /// - public class OInsertRoomDto : MsgDto - { - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OSelectRoomDto.cs b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OSelectRoomDto.cs deleted file mode 100644 index e2d3d6f..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OSelectRoomDto.cs +++ /dev/null @@ -1,38 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *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 HotelManagerSystemWebApi.Application -{ - /// - /// 单条房间信息 - /// 输出DTO - /// - public class OSelectRoomDto : MsgDto - { - /// - /// 数据源 - /// - public Temp_Room source { get; set; } - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OSelectRoomListDto.cs b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OSelectRoomListDto.cs deleted file mode 100644 index 09f5f51..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OSelectRoomListDto.cs +++ /dev/null @@ -1,43 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *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 HotelManagerSystemWebApi.Application -{ - /// - /// 获取所有房间信息 - /// 输出DTO - /// - public class OSelectRoomListDto : MsgDto - { - /// - /// 数据源 - /// - public List listSource { get; set; } - - /// - /// 总数 - /// - public int total { get; set; } - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OSelectRoomTypesAllDto.cs b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OSelectRoomTypesAllDto.cs deleted file mode 100644 index 4f0b4a9..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OSelectRoomTypesAllDto.cs +++ /dev/null @@ -1,40 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *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. - * - */ -using HotelManagerSystemWebApi.Application; -using System.Collections.Generic; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 获取所有房间类型 - /// 输出DTO - /// - public class OSelectRoomTypesAllDto:MsgDto - { - /// - /// 数据源 - /// - public List listSource { get; set; } - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OUpdCheckInRoomDto.cs b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OUpdCheckInRoomDto.cs deleted file mode 100644 index 54800d7..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OUpdCheckInRoomDto.cs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *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 HotelManagerSystemWebApi.Application -{ - /// - /// 根据房间编号退房(入住) - /// 输出DTO - /// - public class OUpdCheckInRoomDto : MsgDto - { - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OUpdCheckoutRoomDto.cs b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OUpdCheckoutRoomDto.cs deleted file mode 100644 index e8f8d26..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OUpdCheckoutRoomDto.cs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *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 HotelManagerSystemWebApi.Application -{ - /// - /// 根据房间编号退房(退房) - /// 输出DTO - /// - public class OUpdCheckoutRoomDto : MsgDto - { - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OUpdReserRoomDto.cs b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OUpdReserRoomDto.cs deleted file mode 100644 index a6f49f7..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/OUpdReserRoomDto.cs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *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 HotelManagerSystemWebApi.Application -{ - /// - /// 根据房间编号退房(预约) - /// 输出DTO - /// - public class OUpdReserRoomDto : MsgDto - { - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/SelectRoomDto.cs b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/SelectRoomDto.cs deleted file mode 100644 index 8b4d9ba..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/SelectRoomDto.cs +++ /dev/null @@ -1,39 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *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 HotelManagerSystemWebApi.Application -{ - /// - /// 单条房间信息 - /// 输入DTO - /// - public class SelectRoomDto : IBaseDto - { - /// - /// 房间编号 - /// - [Required] - public string RoomNo { get; set; } - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/SelectRoomTypeByRoomNo.cs b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/SelectRoomTypeByRoomNo.cs deleted file mode 100644 index 6dfb951..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/SelectRoomTypeByRoomNo.cs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *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 HotelManagerSystemWebApi.Application -{ - public class SelectRoomTypeByRoomNo - { - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/SelectRoomTypesAllDto.cs b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/SelectRoomTypesAllDto.cs deleted file mode 100644 index de184a5..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/SelectRoomTypesAllDto.cs +++ /dev/null @@ -1,46 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *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 HotelManagerSystemWebApi.Application -{ - /// - /// 获取所有房间类型 - /// 输入DTO - /// - public class SelectRoomTypesAllDto : IListDto - { - /// - /// 类型编号 - /// - public int Roomtype { get; set; } - /// - /// 房间类型 - /// - public string RoomName { get; set; } - /// - /// 删除标记 - /// - public int? delete_mk { get; set; } - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/UpdCheckInRoomDto.cs b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/UpdCheckInRoomDto.cs deleted file mode 100644 index 2eff069..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/UpdCheckInRoomDto.cs +++ /dev/null @@ -1,45 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *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 HotelManagerSystemWebApi.Application -{ - /// - /// 根据房间编号退房(入住) - /// 输入DTO - /// - public class UpdCheckInRoomDto : IBaseDto - { - /// - /// 房间编号 - /// - [Required] - public string RoomNo { get; set; } - - /// - /// 客户编号 - /// - [Required] - public string CustoNo { get; set; } - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/UpdCheckoutRoomDto.cs b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/UpdCheckoutRoomDto.cs deleted file mode 100644 index 0a70daa..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/UpdCheckoutRoomDto.cs +++ /dev/null @@ -1,39 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *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 HotelManagerSystemWebApi.Application -{ - /// - /// 根据房间编号退房(退房) - /// 输入DTO - /// - public class UpdCheckoutRoomDto : IBaseDto - { - /// - /// 房间编号 - /// - [Required] - public string RoomNo { get; set; } - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/UpdReserRoomDto.cs b/HotelManagerSystemWebApi.Application/Business/Room/Dtos/UpdReserRoomDto.cs deleted file mode 100644 index 3aecdf7..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Room/Dtos/UpdReserRoomDto.cs +++ /dev/null @@ -1,38 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *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 HotelManagerSystemWebApi.Application -{ - /// - /// 根据房间编号退房(预约) - /// - public class UpdReserRoomDto : IBaseDto - { - /// - /// 房间编号 - /// - [Required] - public string RoomNo { get; set; } - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Business/Room/RoomAppService.cs b/HotelManagerSystemWebApi.Application/Business/Room/RoomAppService.cs deleted file mode 100644 index 09f28bf..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Room/RoomAppService.cs +++ /dev/null @@ -1,92 +0,0 @@ -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 房间信息控制器 - /// - public class RoomAppService:IDynamicApiController - { - /// - /// 房间信息 - /// - private readonly IRoomService roomService; - - /// - /// - /// - /// - public RoomAppService(IRoomService roomService) - { - this.roomService = roomService; - } - - /// - /// 获取所有房间信息 - /// - /// - /// - public OSelectRoomListDto SelectRoomList(SelectRoomListDto roomListDto) - { - return roomService.SelectRoomList(roomListDto); - } - - /// - /// 单条房间信息 - /// - /// - /// - public OSelectRoomDto SelectRoom(SelectRoomDto roomDto) - { - return roomService.SelectRoom(roomDto); - } - - /// - /// 根据房间编号退房(退房) - /// - /// - /// - public OUpdCheckoutRoomDto UpdCheckoutRoom(UpdCheckoutRoomDto updCheckoutRoomDto) - { - return roomService.UpdCheckoutRoom(updCheckoutRoomDto); - } - - /// - /// 根据房间编号退房(入住) - /// - /// - /// - public OUpdCheckInRoomDto UpdCheckInRoom(UpdCheckInRoomDto updCheckInRoomDto) - { - return roomService.UpdCheckInRoom(updCheckInRoomDto); - } - - /// - /// 根据房间编号退房(预约) - /// - /// - /// - public OUpdReserRoomDto UpdReserRoom(UpdReserRoomDto reserRoomDto) - { - return roomService.UpdReserRoom(reserRoomDto); - } - - /// - /// 根据房间编号查询截止到今天住了多少天 - /// - /// - /// - public ODayByRoomNoDto DayByRoomNo(DayByRoomNoDto dayByRoomNoDto) - { - return roomService.DayByRoomNo(dayByRoomNoDto); - } - - /// - /// 添加房间 - /// - /// - /// - public OInsertRoomDto InsertRoom(InsertRoomDto insertRoomDto) - { - return roomService.InsertRoom(insertRoomDto); - } - } -} diff --git a/HotelManagerSystemWebApi.Application/Business/Room/RoomTypeAppService.cs b/HotelManagerSystemWebApi.Application/Business/Room/RoomTypeAppService.cs deleted file mode 100644 index 364409e..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Room/RoomTypeAppService.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 房间类型控制器 - /// - public class RoomTypeAppService:IDynamicApiController - { - /// - /// 房间类型 - /// - private readonly IRoomTypeService _roomTypeService; - - /// - /// - /// - /// - public RoomTypeAppService(IRoomTypeService roomTypeService) - { - _roomTypeService = roomTypeService; - } - - #region 获取所有房间类型 - /// - /// 获取所有房间类型 - /// - /// - public OSelectRoomTypesAllDto SelectRoomTypesAll(SelectRoomTypesAllDto selectRoomTypesAllDto) - { - return _roomTypeService.SelectRoomTypesAll(selectRoomTypesAllDto); - } - #endregion - - } -} diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Services/RoomService.cs b/HotelManagerSystemWebApi.Application/Business/Room/Services/RoomService.cs deleted file mode 100644 index fd8429b..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Room/Services/RoomService.cs +++ /dev/null @@ -1,318 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *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. - * - */ -using System; -using System.Collections.Generic; -using System.Linq; -using Furion.DependencyInjection; -using HotelManagerSystemWebApi.Application; -using HotelManagerSystemWebApi.Core; - - - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 客房信息接口实现类 - /// - public class RoomService:IRoomService, ITransient - { - /// - /// 房间信息 - /// - private readonly IRepository _roomRepository; - - /// - /// 房间类型 - /// - private readonly IRepository _roomTypeRepository; - - /// - /// 房间状态 - /// - private readonly IRepository _roomStateRepository; - - /// - /// 房间信息 - /// - private readonly IRepository _custoRepository; - - /// - /// - /// - /// - public RoomService(IRepository roomRepository) - { - _roomRepository = roomRepository; - } - - /// - /// 获取所有房间信息 - /// - /// - /// - public OSelectRoomListDto SelectRoomList(SelectRoomListDto roomListDto) - { - OSelectRoomListDto oRoomListDto = new OSelectRoomListDto(); - - var where = LinqExpression.Create(a => a.delete_mk != 1); - - //房间号码 - if (!roomListDto.RoomNo.IsNullOrEmpty()) - { - where = where.And(a => a.RoomNo.Contains(roomListDto.RoomNo)); - } - //客户编号 - if (!roomListDto.CustoNo.IsNullOrEmpty()) - { - where = where.And(a => a.CustoNo.Contains(roomListDto.CustoNo)); - } - //房间状态 - if (!roomListDto.RoomStateId.IsNullOrEmpty()) - { - where = where.And(a => a.RoomStateId == roomListDto.RoomStateId); - } - //房间类型 - if (!roomListDto.RoomType.IsNullOrEmpty()) - { - where = where.And(a => a.RoomType == roomListDto.RoomType); - } - //删除标记 - if (!roomListDto.delete_mk.IsNullOrEmpty()) - { - where = where.And(a => a.delete_mk == roomListDto.delete_mk); - } - - //查询出所有房间类型 - var listSource = _roomRepository.AsQueryable(where).ToList() - .CopyToModel(); - - //客户编号 - var listCustoNo = listSource.Select(a => a.CustoNo).Distinct().ToList(); - var listCusto = this._custoRepository.AsQueryable(a => listCustoNo.Contains(a.CustoNo)).ToList(); - - //房间状态 - var listRoomStateId = listSource.Select(a => a.RoomStateId).Distinct().ToList(); - var listRoomState = this._roomStateRepository.AsQueryable().ToList(); - - //房间类型 - var listRoomTypeId = listSource.Select(a => a.RoomType).Distinct().ToList(); - var listRoomType = this._roomTypeRepository.AsQueryable().ToList(); - - listSource.ForEach(source => - { - //客户 - var customer = listCusto.Find(a => a.CustoNo.Equals(source.CustoNo)); - source.CustoNm = customer.IsNullOrEmpty() ? "" : customer.CustoName; - - //房间状态 - var roomState = listRoomState.Find(a => a.RoomStateId == source.RoomStateId); - source.RoomStateNm = roomState.IsNullOrEmpty() ? "" : roomState.RoomStateName; - - //房间类型 - var roomType = listRoomType.Find(a => a.Roomtype == source.RoomType); - source.RoomTypeNm = roomType.IsNullOrEmpty() ? "" : roomType.RoomName; - - }); - - oRoomListDto.listSource = listSource; - oRoomListDto.total = listSource.Count; - oRoomListDto.OK(); - - return oRoomListDto; - } - - /// - /// 单条房间信息 - /// - /// - /// - public OSelectRoomDto SelectRoom(SelectRoomDto selectRoomDto) - { - OSelectRoomDto oSelectRoomDto = new OSelectRoomDto(); - - //查询房间信息 - var source = this._roomRepository.Single(a => a.RoomNo.Equals(selectRoomDto.RoomNo)) - .CopyToModel(); - - if (source.IsNullOrEmpty()) - { - oSelectRoomDto.Error_NotFound(); - return oSelectRoomDto; - } - - //客户 - var customer = this._custoRepository.Single(a => a.CustoNo.Equals(source.CustoNo)); - source.CustoNm = customer.IsNullOrEmpty() ? "" : customer.CustoName; - - //房间状态 - var roomState = this._roomStateRepository.Single(a => a.RoomStateId == source.RoomStateId); - source.RoomStateNm = roomState.IsNullOrEmpty() ? "" : roomState.RoomStateName; - - //房间类型 - var roomType = this._roomTypeRepository.Single(a => a.Roomtype == source.RoomType); - source.RoomTypeNm = roomType.IsNullOrEmpty() ? "" : roomType.RoomName; - - oSelectRoomDto.source = source; - oSelectRoomDto.OK(); - - return oSelectRoomDto; - - } - - /// - /// 根据房间编号退房(退房) - /// - /// - /// - public OUpdCheckoutRoomDto UpdCheckoutRoom(UpdCheckoutRoomDto checkoutRoomDto) - { - OUpdCheckoutRoomDto oUpdateRoomByRoomNoDto = new OUpdCheckoutRoomDto(); - - //查询房间信息 - var source = this._roomRepository.Single(a => a.RoomNo.Equals(checkoutRoomDto.RoomNo)); - - if (source.IsNullOrEmpty()) - { - oUpdateRoomByRoomNoDto.Error_NotFound(); - return oUpdateRoomByRoomNoDto; - } - - source.RoomStateId = 3; - source.CustoNo = null; - source.CheckOutTime = DateTime.Now; - source.datachg_usr = checkoutRoomDto.NowLoginUsr; - source.datachg_date = DateTime.Now; - this._roomRepository.Update(source); - oUpdateRoomByRoomNoDto.OK(); - - return oUpdateRoomByRoomNoDto; - } - - /// - /// 根据房间编号退房(入住) - /// - /// - /// - public OUpdCheckInRoomDto UpdCheckInRoom(UpdCheckInRoomDto checkInRoomDto) - { - OUpdCheckInRoomDto oCheckInRoomDto = new OUpdCheckInRoomDto(); - - //查询房间信息 - var source = this._roomRepository.Single(a => a.RoomNo.Equals(checkInRoomDto.RoomNo)); - - if (source.IsNullOrEmpty()) - { - oCheckInRoomDto.Error_NotFound(); - return oCheckInRoomDto; - } - - source.RoomStateId = 1; - source.CustoNo = checkInRoomDto.CustoNo; - source.CheckOutTime = null; - source.CheckTime = DateTime.Now; - source.datachg_usr = checkInRoomDto.NowLoginUsr; - source.datachg_date = DateTime.Now; - this._roomRepository.Update(source); - oCheckInRoomDto.OK(); - - return oCheckInRoomDto; - } - - /// - /// 根据房间编号退房(预约) - /// - /// - /// - public OUpdReserRoomDto UpdReserRoom(UpdReserRoomDto reserRoomDto) - { - OUpdReserRoomDto oReserRoomDto = new OUpdReserRoomDto(); - - //查询房间信息 - var source = this._roomRepository.Single(a => a.RoomNo.Equals(reserRoomDto.RoomNo)); - - if (source.IsNullOrEmpty()) - { - oReserRoomDto.Error_NotFound(); - return oReserRoomDto; - } - - source.RoomStateId = 4; - source.CustoNo = null; - source.CheckOutTime = null; - source.CheckTime = null; - source.datachg_usr = reserRoomDto.NowLoginUsr; - source.datachg_date = DateTime.Now; - this._roomRepository.Update(source); - oReserRoomDto.OK(); - - return oReserRoomDto; - } - - /// - /// 根据房间编号查询截止到今天住了多少天 - /// - /// - /// - public ODayByRoomNoDto DayByRoomNo(DayByRoomNoDto dayByRoomNoDto) - { - ODayByRoomNoDto oDayByRoomNoDto = new ODayByRoomNoDto(); - - //查询房间信息 - var source = this._roomRepository.Single(a => a.RoomNo.Equals(dayByRoomNoDto.RoomNo)); - - if (source.IsNullOrEmpty()) - { - oDayByRoomNoDto.Error_NotFound(); - return oDayByRoomNoDto; - } - - oDayByRoomNoDto.days = Math.Abs(((TimeSpan)(source.CheckTime - DateTime.Now)).Days); - oDayByRoomNoDto.OK(); - - return oDayByRoomNoDto; - } - - /// - /// 添加房间 - /// - /// - /// - public OInsertRoomDto InsertRoom(InsertRoomDto insertRoomDto) - { - OInsertRoomDto oInsertRoomDto = new OInsertRoomDto(); - - var source = new Room(); - - source = source.UpdateToModel(insertRoomDto); - source.delete_mk = 0; - source.datains_usr = insertRoomDto.NowLoginUsr; - source.datains_date = DateTime.Now; - this._roomRepository.Insert(source); - oInsertRoomDto.OK(); - - return oInsertRoomDto; - } - - } -} diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Temp/Temp_Room.cs b/HotelManagerSystemWebApi.Application/Business/Room/Temp/Temp_Room.cs deleted file mode 100644 index 0babd0d..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Room/Temp/Temp_Room.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 房间实体类 - /// - public class Temp_Room - { - /// - /// 房间编号 - /// - public string RoomNo { get; set; } - /// - /// 房间类型 - /// - public int RoomType { get; set; } - /// - /// 客户编号 - /// - public string CustoNo { get; set; } - /// - /// 房间状态ID - /// - public int RoomStateId { get; set; } - /// - /// 房间单价 - /// - public decimal RoomMoney { get; set; } - /// - /// 房间押金 - /// - public decimal RoomDeposit { get; set; } - /// - /// 房间位置 - /// - public string RoomPosition { get; set; } - - - - /// - /// 房间类型描述 - /// - public string RoomTypeNm { get; set; } - /// - /// 客户编号描述 - /// - public string CustoNm { get; set; } - /// - /// 房间状态描述 - /// - public string RoomStateNm { get; set; } - - } -} diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Temp/Temp_RoomState.cs b/HotelManagerSystemWebApi.Application/Business/Room/Temp/Temp_RoomState.cs deleted file mode 100644 index d1a48a7..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Room/Temp/Temp_RoomState.cs +++ /dev/null @@ -1,43 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 房间状态 - /// - public class Temp_RoomState - { - /// - /// 房间状态编号 - /// - public int RoomStateId { get; set; } - /// - /// 房间状态 - /// - public string RoomStateName { get; set; } - /// - /// 删除标记 - /// - public int delete_mk { get; set; } - /// - /// 资料创建人 - /// - public string datains_usr { get; set; } - /// - /// 资料创建时间 - /// - public DateTime datains_date { get; set; } - /// - /// 资料更新人 - /// - public string datachg_usr { get; set; } - /// - /// 资料更新时间 - /// - public DateTime datachg_date { get; set; } - } -} diff --git a/HotelManagerSystemWebApi.Application/Business/Room/Temp/Temp_RoomType.cs b/HotelManagerSystemWebApi.Application/Business/Room/Temp/Temp_RoomType.cs deleted file mode 100644 index 0329ce6..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Room/Temp/Temp_RoomType.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 房间类型 - /// - public class Temp_RoomType - { - /// - /// 类型编号 - /// - public int Roomtype { get; set; } - /// - /// 房间类型 - /// - public string RoomName { get; set; } - - /// - /// 删除标记 - /// - public int delete_mk { get; set; } - /// - /// 资料创建人 - /// - public string datains_usr { get; set; } - /// - /// 资料创建时间 - /// - public DateTime datains_date { get; set; } - /// - /// 资料更新人 - /// - public string datachg_usr { get; set; } - /// - /// 资料更新时间 - /// - public DateTime datachg_date { get; set; } - } -} diff --git a/HotelManagerSystemWebApi.Application/Business/Spend/Temp/Temp_CustoSpend.cs b/HotelManagerSystemWebApi.Application/Business/Spend/Temp/Temp_CustoSpend.cs deleted file mode 100644 index 9718d0b..0000000 --- a/HotelManagerSystemWebApi.Application/Business/Spend/Temp/Temp_CustoSpend.cs +++ /dev/null @@ -1,80 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 消费信息 - /// - public class Temp_CustoSpend - { - /// - /// 房间编号 - /// - public string RoomNo { get; set; } - /// - /// 客户编号 - /// - public string CustoNo { get; set; } - /// - /// 商品名称 - /// - public string SpendName { get; set; } - /// - /// 消费数量 - /// - public int SpendAmount { get; set; } - /// - /// 商品单价 - /// - public decimal SpendPrice { get; set; } - /// - /// 商品单价描述 - /// - public string SpendPriceStr { get; set; } - /// - /// 消费金额 - /// - public decimal SpendMoney { get; set; } - /// - /// 消费金额描述 - /// - public string SpendMoneyStr { get; set; } - /// - /// 消费时间 - /// - public DateTime SpendTime { get; set; } - /// - /// 结算状态 - /// - public string MoneyState { get; set; } - /// - /// 删除标记 - /// - public int delete_mk { get; set; } - /// - /// 资料创建人 - /// - public string datains_usr { get; set; } - /// - /// 资料创建时间 - /// - public DateTime datains_date { get; set; } - /// - /// 资料更新人 - /// - public string datachg_usr { get; set; } - /// - /// 资料更新时间 - /// - public DateTime datachg_date { get; set; } - - /// - /// 结算状态描述 - /// - public string SpendStateNm { get; set; } - } -} diff --git a/HotelManagerSystemWebApi.Application/GlobalUsings.cs b/HotelManagerSystemWebApi.Application/GlobalUsings.cs deleted file mode 100644 index 742b9cc..0000000 --- a/HotelManagerSystemWebApi.Application/GlobalUsings.cs +++ /dev/null @@ -1,22 +0,0 @@ -global using Furion; -global using Furion.DatabaseAccessor; -global using Furion.DataEncryption; -global using Furion.DataValidation; -global using Furion.DependencyInjection; -global using Furion.DynamicApiController; -global using Furion.Extensions; -global using Furion.FriendlyException; -global using Furion.LinqBuilder; -global using Furion.Logging; -global using Mapster; -global using Microsoft.AspNetCore.Authorization; -global using Microsoft.AspNetCore.Http; -global using Microsoft.AspNetCore.Mvc; -global using Microsoft.CodeAnalysis; -global using Microsoft.EntityFrameworkCore; -global using System.ComponentModel.DataAnnotations; -global using System.Linq; -global using System.Collections.Generic; -global using jvncorelib.EntityLib; -global using jvncorelib.EncryptorLib; -global using HotelManagerSystemWebApi.Core; \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/HotelManagerSystemWebApi.Application.csproj b/HotelManagerSystemWebApi.Application/HotelManagerSystemWebApi.Application.csproj deleted file mode 100644 index a6f5eff..0000000 --- a/HotelManagerSystemWebApi.Application/HotelManagerSystemWebApi.Application.csproj +++ /dev/null @@ -1,56 +0,0 @@ - - - - net6.0 - 1701;1702;1591 - HotelManagerSystemWebApi.Application.xml - - - - - - - - - - PreserveNewest - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/HotelManagerSystemWebApi.Application/HotelManagerSystemWebApi.Application.xml b/HotelManagerSystemWebApi.Application/HotelManagerSystemWebApi.Application.xml deleted file mode 100644 index 576ef19..0000000 --- a/HotelManagerSystemWebApi.Application/HotelManagerSystemWebApi.Application.xml +++ /dev/null @@ -1,319 +0,0 @@ - - - - HotelManagerSystemWebApi.Application - - - - - 管理员信息控制器 - - - - - 管理员信息 - - - - - 构造函数 - - - - - - 查询管理员信息列表 - - - - - - - 查询管理员信息 - - - - - - - 添加管理员信息 - - - - - - - 删除管理员信息 - - - - - - - 更新管理员信息 - - - - - - - 添加管理员信息 - 输入DTO - - - - - 管理员账号 - - - - - 管理员密码 - - - - - 管理员类型 - - - - - 管理员名称 - - - - - 是否为超级管理员 - - - - - 删除标记 - - - - - 资料新增人 - - - - - 资料新增时间 - - - - - 查询管理员信息 - 输入DTO - - - - - 管理员账号 - - - - - 查询管理员信息列表 - 输入DTO - - - - - 管理员名称 - - - - - 是否为超级管理员 - - - - - 删除管理员信息 - 输入DTO - - - - - 管理员账号 - - - - - 添加管理员信息 - 输出DTO - - - - - 查询管理员信息 - 输出DTO - - - - - 数据源 - - - - - 查询管理员信息列表 - - - - - 数据源 - - - - - 删除管理员信息 - 输出DTO - - - - - 更新管理员信息 - 输出DTO - - - - - 更新管理员信息 - 输入DTO - - - - - 管理员账号 - - - - - 管理员密码 - - - - - 管理员类型 - - - - - 管理员名称 - - - - - 是否为超级管理员 - - - - - 删除标记 - - - - - 资料新增人 - - - - - 资料新增时间 - - - - - 管理员信息模块接口实现 - - - - - 管理员信息仓储 - - - - - - - - - - - 查询管理员信息列表 - - - - - - - 查询管理员信息 - - - - - - - 添加管理员信息 - - - - - - - 删除管理员信息 - - - - - - - 更新管理员信息 - - - - - - - 管理员信息模块接口 - - - - - 查询管理员信息列表 - - - - - - - 查询管理员信息 - - - - - - - 添加管理员信息 - - - - - - - 删除管理员信息 - - - - - - - 更新管理员信息 - - - - - - diff --git a/HotelManagerSystemWebApi.Application/Worker/GoodBad/Temp/Temp_Goodbad.cs b/HotelManagerSystemWebApi.Application/Worker/GoodBad/Temp/Temp_Goodbad.cs deleted file mode 100644 index 87736b1..0000000 --- a/HotelManagerSystemWebApi.Application/Worker/GoodBad/Temp/Temp_Goodbad.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 员工奖罚 - /// - public class Temp_Goodbad - { - /// - /// 编号 - /// - public int Id { get; set; } - /// - /// 工号 - /// - public string WorkNo { get; set; } - /// - /// 奖惩信息 - /// - public string GBInfo { get; set; } - /// - /// 奖惩类型 - /// - public int GBType { get; set; } - /// - /// 奖惩操作人 - /// - public string GBOperation { get; set; } - /// - /// 奖惩操作人 - /// - public string OperationName { get; set; } - /// - /// 奖惩时间 - /// - public DateTime GBTime { get; set; } - /// - /// 类型名称 - /// - public string TypeName { get; set; } - /// - /// 删除标记 - /// - public int delete_mk { get; set; } - /// - /// 资料创建人 - /// - public string datains_usr { get; set; } - /// - /// 资料创建时间 - /// - public DateTime datains_date { get; set; } - /// - /// 资料更新人 - /// - public string datachg_usr { get; set; } - /// - /// 资料更新时间 - /// - public DateTime datachg_date { get; set; } - } -} diff --git a/HotelManagerSystemWebApi.Application/Worker/History/Temp/Temp_History.cs b/HotelManagerSystemWebApi.Application/Worker/History/Temp/Temp_History.cs deleted file mode 100644 index 40d4b71..0000000 --- a/HotelManagerSystemWebApi.Application/Worker/History/Temp/Temp_History.cs +++ /dev/null @@ -1,59 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 员工履历 - /// - public class Temp_History - { - /// - /// 编号 - /// - public int Id { get; set; } - /// - /// 工号 - /// - public string WorkerId { get; set; } - /// - /// 开始时间 - /// - public DateTime StartDate { get; set; } - /// - /// 结束时间 - /// - public DateTime EndDate { get; set; } - /// - /// 职位 - /// - public string Position { get; set; } - /// - /// 公司 - /// - public string Company { get; set; } - /// - /// 删除标记 - /// - public int delete_mk { get; set; } - /// - /// 资料创建人 - /// - public string datains_usr { get; set; } - /// - /// 资料创建时间 - /// - public DateTime datains_date { get; set; } - /// - /// 资料更新人 - /// - public string datachg_usr { get; set; } - /// - /// 资料更新时间 - /// - public DateTime datachg_date { get; set; } - } -} diff --git a/HotelManagerSystemWebApi.Application/Worker/WorkerCheck/Temp/Temp_WorkerCheck.cs b/HotelManagerSystemWebApi.Application/Worker/WorkerCheck/Temp/Temp_WorkerCheck.cs deleted file mode 100644 index 5e0ed20..0000000 --- a/HotelManagerSystemWebApi.Application/Worker/WorkerCheck/Temp/Temp_WorkerCheck.cs +++ /dev/null @@ -1,61 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 员工打卡考勤 - /// - public class Temp_WorkerCheck - { - /// - /// 编号 - /// - public int Id { get; set; } - /// - /// 工号 - /// - public string WorkerNo { get; set; } - /// - /// 打卡时间 - /// - public DateTime CheckTime { get; set; } - /// - /// 打卡方式 - /// - public string CheckWay { get; set; } - /// - /// 打卡状态 - /// - public int CheckState { get; set; } - - /// - /// 打卡状态 - /// - public string CheckStateNm { get; set; } - /// - /// 删除标记 - /// - public int delete_mk { get; set; } - /// - /// 资料创建人 - /// - public string datains_usr { get; set; } - /// - /// 资料创建时间 - /// - public DateTime datains_date { get; set; } - /// - /// 资料更新人 - /// - public string datachg_usr { get; set; } - /// - /// 资料更新时间 - /// - public DateTime datachg_date { get; set; } - - } -} diff --git a/HotelManagerSystemWebApi.Application/Worker/WorkerInfo/Temp/Temp_WorkerInfo.cs b/HotelManagerSystemWebApi.Application/Worker/WorkerInfo/Temp/Temp_WorkerInfo.cs deleted file mode 100644 index 6c9a663..0000000 --- a/HotelManagerSystemWebApi.Application/Worker/WorkerInfo/Temp/Temp_WorkerInfo.cs +++ /dev/null @@ -1,115 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 员工信息 - /// - public class Temp_WorkerInfo - { - /// - /// 员工账号/工号 - /// - public string WorkerId { get; set; } - /// - /// 员工姓名 - /// - public string WorkerName { get; set; } - /// - /// 出生日期 - /// - public DateTime WorkerBirthday { get; set; } - /// - /// 员工性别 - /// - public int WorkerSex { get; set; } - /// - /// 员工性别(名称描述) - /// - public string WorkerSexName { get; set; } - /// - /// 民族类型 - /// - public string WorkerNation { get; set; } - /// - /// 民族名称 - /// - public string NationName { get; set; } - /// - /// 员工电话 - /// - public string WorkerTel { get; set; } - /// - /// 所属部门 - /// - public string WorkerClub { get; set; } - /// - /// 部门名称 - /// - public string ClubName { get; set; } - /// - /// 居住地址 - /// - public string WorkerAddress { get; set; } - /// - /// 员工职位 - /// - public string WorkerPosition { get; set; } - /// - /// 职位名称 - /// - public string PositionName { get; set; } - /// - /// 证件号码 - /// - public string CardId { get; set; } - /// - /// 员工密码 - /// - public string WorkerPwd { get; set; } - /// - /// 员工入职时间 - /// - public DateTime WorkerTime { get; set; } - /// - /// 员工面貌 - /// - public string WorkerFace { get; set; } - /// - /// 群众面貌描述 - /// - public string FaceName { get; set; } - /// - /// 教育程度 - /// - public string WorkerEducation { get; set; } - /// - /// 教育程度名称 - /// - public string EducationName { get; set; } - /// - /// 删除标记 - /// - public int delete_mk { get; set; } - /// - /// 资料创建人 - /// - public string datains_usr { get; set; } - /// - /// 资料创建时间 - /// - public DateTime? datains_date { get; set; } - /// - /// 资料更新人 - /// - public string datachg_usr { get; set; } - /// - /// 资料更新时间 - /// - public DateTime? datachg_date { get; set; } - } -} diff --git a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/AdminInfoAppService.cs b/HotelManagerSystemWebApi.Application/Zero/AdminInfo/AdminInfoAppService.cs deleted file mode 100644 index 3d97d68..0000000 --- a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/AdminInfoAppService.cs +++ /dev/null @@ -1,81 +0,0 @@ -using Furion.DependencyInjection; -using Furion.DynamicApiController; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 管理员信息控制器 - /// - public class AdminInfoAppService: IDynamicApiController - { - /// - /// 管理员信息 - /// - private readonly IAdminInfoService adminInfoService; - - /// - /// 构造函数 - /// - /// - public AdminInfoAppService(IAdminInfoService adminInfoService) - { - this.adminInfoService = adminInfoService; - } - - /// - /// 查询管理员信息列表 - /// - /// - /// - public OAdminInfoListDto AdminInfoList(AdminInfoListDto adminInfoListDto) - { - return adminInfoService.AdminInfoList(adminInfoListDto); - } - - /// - /// 查询管理员信息 - /// - /// - /// - public OAdminInfoDto AdminInfo(AdminInfoDto adminInfoDto) - { - return adminInfoService.AdminInfo(adminInfoDto); - } - - /// - /// 添加管理员信息 - /// - /// - /// - public OAddAdminInfoDto AddAdminInfo(AddAdminInfoDto addAdminInfoDto) - { - return adminInfoService.AddAdminInfo(addAdminInfoDto); - } - - /// - /// 删除管理员信息 - /// - /// - /// - public ODelAdminInfoDto DelAdminInfo(DelAdminInfoDto delAdminInfoDto) - { - return adminInfoService.DelAdminInfo(delAdminInfoDto); - } - - /// - /// 更新管理员信息 - /// - /// - /// - public OUpdAdminInfoDto UpdAdminInfo(UpdAdminInfoDto updAdminInfoDto) - { - return adminInfoService.UpdAdminInfo(updAdminInfoDto); - } - - } -} diff --git a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/AddAdminInfoDto.cs b/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/AddAdminInfoDto.cs deleted file mode 100644 index 23e05e5..0000000 --- a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/AddAdminInfoDto.cs +++ /dev/null @@ -1,57 +0,0 @@ -using HotelManagerSystemWebApi.Core; -using System.ComponentModel.DataAnnotations; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 添加管理员信息 - /// 输入DTO - /// - public class AddAdminInfoDto:IBaseDto - { - /// - /// 管理员账号 - /// - [Required] - public System.String AdminAccount { get; set; } - - /// - /// 管理员密码 - /// - [Required] - public System.String AdminPassword { get; set; } - - /// - /// 管理员类型 - /// - [Required] - public System.String AdminType { get; set; } - - /// - /// 管理员名称 - /// - [Required] - public System.String AdminName { get; set; } - - /// - /// 是否为超级管理员 - /// - public System.Int32 IsAdmin { get; set; } - - /// - /// 删除标记 - /// - public System.Int32 DeleteMk { get; set; } - - /// - /// 资料新增人 - /// - public System.String datains_usr { get; set; } - - /// - /// 资料新增时间 - /// - public System.DateTime? datains_time { get; set; } - - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/AdminInfoDto.cs b/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/AdminInfoDto.cs deleted file mode 100644 index fab52f2..0000000 --- a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/AdminInfoDto.cs +++ /dev/null @@ -1,18 +0,0 @@ -using HotelManagerSystemWebApi.Core; -using System.ComponentModel.DataAnnotations; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 查询管理员信息 - /// 输入DTO - /// - public class AdminInfoDto:IBaseDto - { - /// - /// 管理员账号 - /// - [Required] - public string AdminAccount { get; set; } - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/AdminInfoListDto.cs b/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/AdminInfoListDto.cs deleted file mode 100644 index 87607b1..0000000 --- a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/AdminInfoListDto.cs +++ /dev/null @@ -1,21 +0,0 @@ -using HotelManagerSystemWebApi.Core; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 查询管理员信息列表 - /// 输入DTO - /// - public class AdminInfoListDto:IListDto - { - /// - /// 管理员名称 - /// - public string AdminName { get; set; } - - /// - /// 是否为超级管理员 - /// - public int? IsAdmin { get; set; } - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/DelAdminInfoDto.cs b/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/DelAdminInfoDto.cs deleted file mode 100644 index 65d93e7..0000000 --- a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/DelAdminInfoDto.cs +++ /dev/null @@ -1,18 +0,0 @@ -using HotelManagerSystemWebApi.Core; -using System.ComponentModel.DataAnnotations; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 删除管理员信息 - /// 输入DTO - /// - public class DelAdminInfoDto:IBaseDto - { - /// - /// 管理员账号 - /// - [Required] - public System.String AdminAccount { get; set; } - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/OAddAdminInfoDto.cs b/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/OAddAdminInfoDto.cs deleted file mode 100644 index 330ac58..0000000 --- a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/OAddAdminInfoDto.cs +++ /dev/null @@ -1,13 +0,0 @@ -using HotelManagerSystemWebApi.Core; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 添加管理员信息 - /// 输出DTO - /// - public class OAddAdminInfoDto:MsgDto - { - - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/OAdminInfoDto.cs b/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/OAdminInfoDto.cs deleted file mode 100644 index 99da1e0..0000000 --- a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/OAdminInfoDto.cs +++ /dev/null @@ -1,16 +0,0 @@ -using HotelManagerSystemWebApi.Core; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 查询管理员信息 - /// 输出DTO - /// - public class OAdminInfoDto:MsgDto - { - /// - /// 数据源 - /// - public AdminInfo source { get; set; } - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/OAdminInfoListDto.cs b/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/OAdminInfoListDto.cs deleted file mode 100644 index e4d4ad7..0000000 --- a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/OAdminInfoListDto.cs +++ /dev/null @@ -1,17 +0,0 @@ -using HotelManagerSystemWebApi.Core; -using System.Collections.Generic; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 查询管理员信息列表 - /// - public class OAdminInfoListDto:MsgDto - { - /// - /// 数据源 - /// - public List listSource { get; set; } - - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/ODelAdminInfoDto.cs b/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/ODelAdminInfoDto.cs deleted file mode 100644 index a262e0d..0000000 --- a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/ODelAdminInfoDto.cs +++ /dev/null @@ -1,13 +0,0 @@ -using HotelManagerSystemWebApi.Core; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 删除管理员信息 - /// 输出DTO - /// - public class ODelAdminInfoDto:MsgDto - { - - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/OUpdAdminInfoDto.cs b/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/OUpdAdminInfoDto.cs deleted file mode 100644 index 179b2d4..0000000 --- a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/OUpdAdminInfoDto.cs +++ /dev/null @@ -1,12 +0,0 @@ -using HotelManagerSystemWebApi.Core; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 更新管理员信息 - /// 输出DTO - /// - public class OUpdAdminInfoDto:MsgDto - { - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/UpdAdminInfoDto.cs b/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/UpdAdminInfoDto.cs deleted file mode 100644 index 28193bf..0000000 --- a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Dtos/UpdAdminInfoDto.cs +++ /dev/null @@ -1,56 +0,0 @@ -using HotelManagerSystemWebApi.Core; -using System.ComponentModel.DataAnnotations; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 更新管理员信息 - /// 输入DTO - /// - public class UpdAdminInfoDto:IBaseDto - { - /// - /// 管理员账号 - /// - [Required] - public System.String AdminAccount { get; set; } - - /// - /// 管理员密码 - /// - [Required] - public System.String AdminPassword { get; set; } - - /// - /// 管理员类型 - /// - [Required] - public System.String AdminType { get; set; } - - /// - /// 管理员名称 - /// - [Required] - public System.String AdminName { get; set; } - - /// - /// 是否为超级管理员 - /// - public System.Int32 IsAdmin { get; set; } - - /// - /// 删除标记 - /// - public System.Int32 DeleteMk { get; set; } - - /// - /// 资料新增人 - /// - public System.String datains_usr { get; set; } - - /// - /// 资料新增时间 - /// - public System.DateTime? datains_time { get; set; } - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services/AdminInfoService.cs b/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services/AdminInfoService.cs deleted file mode 100644 index 13462c3..0000000 --- a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services/AdminInfoService.cs +++ /dev/null @@ -1,340 +0,0 @@ -using Furion.DatabaseAccessor; -using Furion.DependencyInjection; -using Furion.LinqBuilder; -using HotelManagerSystemWebApi.Core; -using jvncorelib.EncryptorLib; -using jvncorelib.EntityLib; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 管理员信息模块接口实现 - /// - public class AdminInfoService: IAdminInfoService, ITransient - //笔记:如果把Migrations层删除后使用瞬时服务,必须让EntityFramework.Core层被Web.Core层引用,否则会导致服务无法被正常识别 - { - /// - /// 管理员信息仓储 - /// - private readonly IRepository adminInfoRepository; - - /// - /// - /// - /// - public AdminInfoService(IRepository adminInfoRepository) - { - this.adminInfoRepository = adminInfoRepository; - } - - /// - /// 查询管理员信息列表 - /// - /// - /// - public OAdminInfoListDto AdminInfoList(AdminInfoListDto adminInfoListDto) - { - OAdminInfoListDto oAdminInfoListDto = new OAdminInfoListDto(); - - var where = LinqExpression.Create(a => a.DeleteMk != 1); - - //管理员名称 - if (!adminInfoListDto.AdminName.IsNullOrEmpty()) - { - where = where.And(a => a.AdminName.Equals(adminInfoListDto.AdminName)); - } - //是否为超级管理员 - if (!adminInfoListDto.IsAdmin.IsNullOrEmpty()) - { - where = where.And(a => a.IsAdmin == adminInfoListDto.IsAdmin); - } - - var listSource = adminInfoRepository.AsQueryable(where).Distinct().ToList(); - - oAdminInfoListDto.listSource = listSource; - - oAdminInfoListDto.OK(); - - return oAdminInfoListDto; - } - - /// - /// 查询管理员信息 - /// - /// - /// - public OAdminInfoDto AdminInfo(AdminInfoDto adminInfoDto) - { - OAdminInfoDto oAdminInfoDto = new OAdminInfoDto(); - - var where = LinqExpression.Create(a => a.DeleteMk != 1); - - //管理员账号 - if (!adminInfoDto.AdminAccount.IsNullOrEmpty()) - { - where = where.And(a => a.AdminAccount.Equals(adminInfoDto.AdminAccount)); - } - - var source = adminInfoRepository.FirstOrDefault(where); - - if (source.IsNullOrEmpty()) - { - oAdminInfoDto.Error_NotFound(); - return oAdminInfoDto; - } - - oAdminInfoDto.source = source; - oAdminInfoDto.OK(); - - return oAdminInfoDto; - } - - /// - /// 添加管理员信息 - /// - /// - /// - public OAddAdminInfoDto AddAdminInfo(AddAdminInfoDto addAdminInfoDto) - { - OAddAdminInfoDto oAddAdminInfoDto = new OAddAdminInfoDto(); - - var where = LinqExpression.Create(a => a.DeleteMk != 1); - - //管理员账号 - if (!addAdminInfoDto.AdminAccount.IsNullOrEmpty()) - { - where = where.And(a => a.AdminAccount.Equals(addAdminInfoDto.AdminAccount)); - } - - var source = adminInfoRepository.FirstOrDefault(where); - - if (!source.IsNullOrEmpty()) - { - oAddAdminInfoDto.Error_Exist("该管理员已存在,无法添加"); - return oAddAdminInfoDto; - } - - source = source.UpdateToModel(addAdminInfoDto); - source.datains_usr = addAdminInfoDto.NowLoginUsr; - source.datains_time = DateTime.Now; - this.adminInfoRepository.Insert(source); - - oAddAdminInfoDto.OK(); - - return oAddAdminInfoDto; - } - - /// - /// 删除管理员信息 - /// - /// - /// - public ODelAdminInfoDto DelAdminInfo(DelAdminInfoDto delAdminInfoDto) - { - ODelAdminInfoDto oDelAdminInfoDto = new ODelAdminInfoDto(); - - var where = LinqExpression.Create(a => a.DeleteMk != 1); - - //管理员账号 - if (!delAdminInfoDto.AdminAccount.IsNullOrEmpty()) - { - where = where.And(a => a.AdminAccount.Equals(delAdminInfoDto.AdminAccount)); - } - - var source = adminInfoRepository.FirstOrDefault(where); - - if (source.IsNullOrEmpty()) - { - oDelAdminInfoDto.Error_NotFound(); - return oDelAdminInfoDto; - } - - this.adminInfoRepository.Delete(source); - - oDelAdminInfoDto.OK(); - - return oDelAdminInfoDto; - } - - /// - /// 更新管理员信息 - /// - /// - /// - public OUpdAdminInfoDto UpdAdminInfo(UpdAdminInfoDto updAdminInfoDto) - { - OUpdAdminInfoDto oUpdAdminInfoDto = new OUpdAdminInfoDto(); - - var where = LinqExpression.Create(a => a.DeleteMk != 1); - - //管理员账号 - if (!updAdminInfoDto.AdminAccount.IsNullOrEmpty()) - { - where = where.And(a => a.AdminAccount.Equals(updAdminInfoDto.AdminAccount)); - } - - var source = adminInfoRepository.FirstOrDefault(where); - - if (source.IsNullOrEmpty()) - { - oUpdAdminInfoDto.Error_Exist(); - return oUpdAdminInfoDto; - } - - source = source.UpdateToModel(updAdminInfoDto); - source.datains_usr = updAdminInfoDto.NowLoginUsr; - source.datains_time = DateTime.Now; - this.adminInfoRepository.Update(source); - oUpdAdminInfoDto.OK(); - return oUpdAdminInfoDto; - } - - EncryptLib encryptLib = new EncryptLib(); - - //#region 根据超管密码查询员工类型和权限 - ///// - ///// 根据超管密码查询员工类型和权限 - ///// - ///// - ///// - //public Admin SelectMangerByPass(Admin admin) - //{ - // Admin admins = new Admin(); - // admins = base.GetSingle(a => a.AdminAccount == admin.AdminAccount && a.AdminPassword == admin.AdminPassword); - // //admin.AdminPassword = admin.AdminPassword.Contains(":") ? encrypt.DeEncryptStr(admin.AdminPassword) : admin.AdminPassword; - // return admins; - //} - //#endregion - - //#region 根据超管账号查询对应的密码 - ///// - ///// 根据超管账号查询对应的密码 - ///// - ///// - ///// - //public Admin SelectAdminPwdByAccount(string account) - //{ - // Admin admin = new Admin(); - // admin = base.GetSingle(a => a.AdminAccount == account); - // //admin.AdminPassword = admin.AdminPassword.Contains(":") ? encrypt.DeEncryptStr(admin.AdminPassword) : admin.AdminPassword; - // return admin; - //} - //#endregion - - ///// - ///// 获取所有管理员列表 - ///// - ///// - //public List GetAllAdminList() - //{ - // var listAdmins = base.GetList(); - // var listAdminType = base.Change().GetList(a => a.delete_mk != 1); - // listAdmins.ForEach(admins => - // { - // var isAdminType = admins.IsAdmin == 1 ? "是" : "否"; - // admins.IsAdminNm = isAdminType; - - // var adminType = listAdminType.FirstOrDefault(a => a.type_id.Equals(admins.AdminType)); - // admins.TypeName = adminType == null ? "" : adminType.type_name; - - // var adminDelete = admins.DeleteMk == 1 ? "是" : "否"; - // admins.DeleteNm = adminDelete; - - // }); - - // return listAdmins; - //} - - ///// - ///// 修改密码 - ///// - ///// - ///// - //public bool UpdateNewPwdByOldPwd(Admin admin) - //{ - // //admin.AdminPassword = encrypt.EncryptStr(admin.AdminPassword); - // return base.Update(a => new Admin() - // { - // AdminPassword = admin.AdminPassword, - // datachg_usr = AdminInfo.Account, - // datachg_time = DateTime.Now - // }, a => a.AdminAccount == admin.AdminAccount); - //} - - ///// - ///// 获取管理员列表(已启用) - ///// - ///// - //public List GetAllAdmin() - //{ - // var listAdmin = base.GetList(a => a.DeleteMk != 1); - // var listAdminType = base.Change().GetList(a => a.delete_mk != 1); - // listAdmin.ForEach(admin => - // { - // var isAdminType = admin.IsAdmin == 1 ? "是" : "否"; - // admin.IsAdminNm = isAdminType; - - // var adminType = listAdminType.FirstOrDefault(a => a.type_id.Equals(admin.AdminType)); - // admin.TypeName = adminType == null ? "" : adminType.type_name; - // }); - // return listAdmin; - //} - - ///// - ///// 添加管理员 - ///// - ///// - ///// - //public bool AddAdmin(Admin admin) - //{ - // //admin.AdminPassword = encrypt.EncryptStr(admin.AdminPassword); - // bool result = base.Insert(admin); - // return result; - //} - - ///// - ///// 获取管理员信息 - ///// - ///// - ///// - //public Admin GetAdminInfoByAdminAccount(Admin admin) - //{ - // var adminInfo = base.GetSingle(a => a.AdminAccount.Equals(admin.AdminAccount)); - // if (adminInfo != null) - // { - // var adminType = base.Change().GetSingle(a => a.type_id.Equals(adminInfo.AdminType)); - // adminInfo.TypeName = adminType.type_name; - // } - // return adminInfo; - //} - - ///// - ///// 获取所有管理员类型 - ///// - ///// - //public List GetAllAdminTypes() - //{ - // var listAdminTypes = base.Change().GetList(a => a.delete_mk != 1); - // return listAdminTypes; - //} - - ///// - ///// 更新管理员账户 - ///// - ///// - ///// - //public bool UpdAccount(Admin admins) - //{ - // admins.DeleteMk = admins.DeleteMk == 0 ? 1 : 0; - // return base.Update(a => new Admin() - // { - // DeleteMk = admins.DeleteMk - // }, a => a.Id == admins.Id); - //} - } -} diff --git a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services/IAdminInfoService.cs b/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services/IAdminInfoService.cs deleted file mode 100644 index 43770ae..0000000 --- a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Services/IAdminInfoService.cs +++ /dev/null @@ -1,115 +0,0 @@ -using Furion.DependencyInjection; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 管理员信息模块接口 - /// - public interface IAdminInfoService - { - /// - /// 查询管理员信息列表 - /// - /// - /// - OAdminInfoListDto AdminInfoList(AdminInfoListDto adminInfoListDto); - - /// - /// 查询管理员信息 - /// - /// - /// - OAdminInfoDto AdminInfo(AdminInfoDto adminInfoDto); - - /// - /// 添加管理员信息 - /// - /// - /// - OAddAdminInfoDto AddAdminInfo(AddAdminInfoDto addAdminInfoDto); - - /// - /// 删除管理员信息 - /// - /// - /// - ODelAdminInfoDto DelAdminInfo(DelAdminInfoDto delAdminInfoDto); - - /// - /// 更新管理员信息 - /// - /// - /// - OUpdAdminInfoDto UpdAdminInfo(UpdAdminInfoDto updAdminInfoDto); - - //#region 根据超管密码查询员工类型和权限 - ///// - ///// 根据超管密码查询员工类型和权限 - ///// - ///// - ///// - //Admin SelectMangerByPass(Admin admin); - //#endregion - - - //#region 根据超管账号查询对应的密码 - ///// - ///// 根据超管账号查询对应的密码 - ///// - ///// - ///// - //Admin SelectAdminPwdByAccount(string account); - //#endregion - - ///// - ///// 获取所有管理员列表 - ///// - ///// - //List GetAllAdminList(); - - ///// - ///// 修改密码 - ///// - ///// - ///// - //bool UpdateNewPwdByOldPwd(Admin admin); - - ///// - ///// 获取管理员列表 - ///// - ///// - //List GetAllAdmin(); - - ///// - ///// 添加管理员 - ///// - ///// - ///// - //bool AddAdmin(Admin admin); - - ///// - ///// 获取管理员信息 - ///// - ///// - ///// - //Admin GetAdminInfoByAdminAccount(Admin admin); - - ///// - ///// 获取所有管理员类型 - ///// - ///// - //List GetAllAdminTypes(); - - ///// - ///// 批量更新管理员账户 - ///// - ///// - ///// - //bool UpdAccount(Admin admins); - } -} diff --git a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Temp/Temp_AdminInfo.cs b/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Temp/Temp_AdminInfo.cs deleted file mode 100644 index 0053396..0000000 --- a/HotelManagerSystemWebApi.Application/Zero/AdminInfo/Temp/Temp_AdminInfo.cs +++ /dev/null @@ -1,65 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 管理员信息实体类 - /// - public class Temp_AdminInfo - { - - /// - /// 管理员账号 - /// - public System.String AdminAccount { get; set; } - - /// - /// 管理员密码 - /// - public System.String AdminPassword { get; set; } - - /// - /// 管理员类型 - /// - public System.String AdminType { get; set; } - - /// - /// 管理员名称 - /// - public System.String AdminName { get; set; } - - /// - /// 是否为超级管理员 - /// - public System.Int32? IsAdmin { get; set; } - - /// - /// 删除标记 - /// - public System.Int32? DeleteMk { get; set; } - - /// - /// 资料新增人 - /// - public System.String datains_usr { get; set; } - - /// - /// 资料新增时间 - /// - public System.DateTime? datains_time { get; set; } - - /// - /// 资料更新人 - /// - public System.String datachg_usr { get; set; } - - /// - /// 资料更新时间 - /// - public System.DateTime? datachg_time { get; set; } - } -} diff --git a/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_CustomerType.cs b/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_CustomerType.cs deleted file mode 100644 index a02f11d..0000000 --- a/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_CustomerType.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 客户类型 - /// - public class Temp_CustomerType - { - /// - /// 客户类型 - /// - public int UserType { get; set; } - /// - /// 类型名字 - /// - public string TypeName { get; set; } - /// - /// 删除标记 - /// - public int delete_mk { get; set; } - /// - /// 资料创建人 - /// - public string datains_usr { get; set; } - /// - /// 资料创建时间 - /// - public DateTime datains_date { get; set; } - /// - /// 资料更新人 - /// - public string datachg_usr { get; set; } - /// - /// 资料更新时间 - /// - public DateTime datachg_date { get; set; } - } -} diff --git a/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_Dept.cs b/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_Dept.cs deleted file mode 100644 index 4e667e5..0000000 --- a/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_Dept.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 部门表 - /// - public class Temp_Dept - { - /// - /// 部门编号 - /// - public string dept_no { get; set; } - /// - /// 部门名称 - /// - public string dept_name { get; set; } - /// - /// 部门描述 - /// - public string dept_desc { get; set; } - /// - /// 创建时间(部门) - /// - public DateTime dept_date { get; set; } - /// - /// 部门主管 - /// - public string dept_leader { get; set; } - /// - /// 部门主管 - /// - public string leader_name { get; set; } - /// - /// 上级部门 - /// - public string dept_parent { get; set; } - /// - /// 上级部门 - /// - public string parent_name { get; set; } - /// - /// 删除标记 - /// - public int delete_mk { get; set; } - /// - /// 资料创建人 - /// - public string datains_usr { get; set; } - /// - /// 资料创建时间 - /// - public DateTime datains_date { get; set; } - /// - /// 资料更新人 - /// - public string datachg_usr { get; set; } - /// - /// 资料更新时间 - /// - public DateTime datachg_date { get; set; } - } -} diff --git a/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_Education.cs b/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_Education.cs deleted file mode 100644 index 6153b92..0000000 --- a/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_Education.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 学历 - /// - public class Temp_Education - { - /// - /// 学历编号 - /// - public string education_no { get; set; } - /// - /// 学历名称 - /// - public string education_name { get; set; } - /// - /// 删除标记 - /// - public int delete_mk { get; set; } - /// - /// 资料创建人 - /// - public string datains_usr { get; set; } - /// - /// 资料创建时间 - /// - public DateTime datains_date { get; set; } - /// - /// 资料更新人 - /// - public string datachg_usr { get; set; } - /// - /// 资料更新时间 - /// - public DateTime datachg_date { get; set; } - - } -} diff --git a/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_GoodbadType.cs b/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_GoodbadType.cs deleted file mode 100644 index 2fb0367..0000000 --- a/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_GoodbadType.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 奖惩类型实体类 - /// - public class Temp_GoodbadType - { - /// - /// 奖惩编号 - /// - public int GBTypeId { get; set; } - - /// - /// 奖惩名称 - /// - public string GBName { get; set; } - - /// - /// 删除标记 - /// - public int delete_mk { get; set; } - - /// - /// 资料新增人 - /// - public string datains_usr { get; set; } - - /// - /// 资料新增日期 - /// - public DateTime? datains_date { get; set; } - - /// - /// 资料更新人 - /// - public string datachg_usr { get; set; } - - /// - /// 资料更新日期 - /// - public DateTime? datachg_date { get; set; } - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_Job.cs b/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_Job.cs deleted file mode 100644 index 45bb060..0000000 --- a/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_Job.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 职位 - /// - public class Temp_Job - { - /// - /// 职位编号 - /// - public string position_no { get; set; } - /// - /// 职位名称 - /// - public string position_name { get; set; } - /// - /// 删除标记 - /// - public int delete_mk { get; set; } - /// - /// 资料创建人 - /// - public string datains_usr { get; set; } - /// - /// 资料创建时间 - /// - public DateTime datains_date { get; set; } - /// - /// 资料更新人 - /// - public string datachg_usr { get; set; } - /// - /// 资料更新时间 - /// - public DateTime datachg_date { get; set; } - - } -} diff --git a/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_Nation.cs b/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_Nation.cs deleted file mode 100644 index caa3a93..0000000 --- a/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_Nation.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 民族 - /// - public class Temp_Nation - { - /// - /// 民族编号 - /// - public string nation_no { get; set; } - /// - /// 民族名称 - /// - public string nation_name { get; set; } - /// - /// 删除标记 - /// - public int delete_mk { get; set; } - /// - /// 资料创建人 - /// - public string datains_usr { get; set; } - /// - /// 资料创建时间 - /// - public DateTime? datains_date { get; set; } - /// - /// 资料更新人 - /// - public string datachg_usr { get; set; } - /// - /// 资料更新时间 - /// - public DateTime? datachg_date { get; set; } - - } -} diff --git a/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_PassportType.cs b/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_PassportType.cs deleted file mode 100644 index ca0eb6b..0000000 --- a/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_PassportType.cs +++ /dev/null @@ -1,44 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 证件类型 - /// - public class Temp_PassportType - { - /// - /// 证件类型 - /// - public int PassportId { get; set; } - - /// - /// 证件名称 - /// - public string PassportName { get; set; } - /// - /// 删除标记 - /// - public int delete_mk { get; set; } - /// - /// 资料创建人 - /// - public string datains_usr { get; set; } - /// - /// 资料创建时间 - /// - public DateTime datains_date { get; set; } - /// - /// 资料更新人 - /// - public string datachg_usr { get; set; } - /// - /// 资料更新时间 - /// - public DateTime datachg_date { get; set; } - } -} diff --git a/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_SexType.cs b/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_SexType.cs deleted file mode 100644 index e3f0226..0000000 --- a/HotelManagerSystemWebApi.Application/Zero/Base/Temp/Temp_SexType.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HotelManagerSystemWebApi.Application -{ - /// - /// 性别 - /// - public class Temp_SexType - { - /// - /// 性别ID - /// - public int sexId { get; set; } - - /// - /// 性别名称 - /// - public string sexName { get; set; } - - /// - /// 删除标记 - /// - public int delete_mk { get; set; } - /// - /// 资料创建人 - /// - public string datains_usr { get; set; } - /// - /// 资料创建时间 - /// - public DateTime datains_date { get; set; } - /// - /// 资料更新人 - /// - public string datachg_usr { get; set; } - /// - /// 资料更新时间 - /// - public DateTime datachg_date { get; set; } - } -} diff --git a/HotelManagerSystemWebApi.Application/applicationsettings.json b/HotelManagerSystemWebApi.Application/applicationsettings.json deleted file mode 100644 index 83ae7e9..0000000 --- a/HotelManagerSystemWebApi.Application/applicationsettings.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "SpecificationDocumentSettings": { - "DocumentTitle": "TSHotelManagerSystem 2.0 | WebAPI接口文档", - "GroupOpenApiInfos": [ - { - "DefaultGroupName": "TSHotelManagerSystem 2.0", - "Group": "Default", - "Title": "WebAPI接口文档", - "Description": "用于TS酒店管理系统v2.0版本的后端WebAPI接口。", - "Version": "1.0.0", - "TermsOfService": "https://gitee.com/java-and-net/topsky-hotel-manager-system-web-api", - "Contact": { - "Name": "咖啡与网络(Java&Net)", - "Url": "https://www.jvnorg.site/", - "Email": "jvnopensource@163.com" - }, - "License": { - "Name": "MIT", - "Url": "https://gitee.com/java-and-net/topsky-hotel-manager-system-web-api/blob/master/LICENSE" - } - } - ] - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Core/Customer/CustomerInfo.cs b/HotelManagerSystemWebApi.Core/Customer/CustomerInfo.cs deleted file mode 100644 index cd4ed89..0000000 --- a/HotelManagerSystemWebApi.Core/Customer/CustomerInfo.cs +++ /dev/null @@ -1,92 +0,0 @@ -using Furion.DatabaseAccessor; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace HotelManagerSystemWebApi.Core -{ - /// - /// 客户信息表 - /// - [Table("userinfo")] - public class CustomerInfo : IEntity - { - /// - /// - /// - public CustomerInfo() - { - } - - /// - /// 用户编号 - /// - [Key] - [Column(Order = 1)] - public System.String CustoNo { get; set; } - - /// - /// 用户名称 - /// - public System.String CustoName { get; set; } - - /// - /// 用户性别 - /// - public System.Int32 CustoSex { get; set; } - - /// - /// 用户电话 - /// - public System.String CustoTel { get; set; } - - /// - /// 证照类型 - /// - public System.Int32 PassportType { get; set; } - - /// - /// 证件号码 - /// - public System.String CustoID { get; set; } - - /// - /// 居住地址 - /// - public System.String CustoAdress { get; set; } - - /// - /// 出生日期 - /// - public System.DateTime CustoBirth { get; set; } - - /// - /// 客户类型 - /// - public System.Int32 CustoType { get; set; } - - /// - /// 删除标记 - /// - public System.Int32 delete_mk { get; set; } - - /// - /// 资料创建人 - /// - public System.String datains_usr { get; set; } - - /// - /// 资料创建时间 - /// - public System.DateTime? datains_date { get; set; } - - /// - /// 资料更新人 - /// - public System.String datachg_usr { get; set; } - - /// - /// 资料更新时间 - /// - public System.DateTime? datachg_date { get; set; } - } -} diff --git a/HotelManagerSystemWebApi.Core/Customer/CustomerType.cs b/HotelManagerSystemWebApi.Core/Customer/CustomerType.cs deleted file mode 100644 index 5231e89..0000000 --- a/HotelManagerSystemWebApi.Core/Customer/CustomerType.cs +++ /dev/null @@ -1,57 +0,0 @@ -using Furion.DatabaseAccessor; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace HotelManagerSystemWebApi.Core -{ - /// - /// 客户类型表 - /// - [Table("usertype")] - public class CustomerType : IEntity - { - /// - /// - /// - public CustomerType() - { - } - - /// - /// 客户类型ID - /// - [Key] - [Column(Order = 1)] - public System.Int32 UserType { get; set; } - - /// - /// 客户类型名称 - /// - public System.String TypeName { get; set; } - - /// - /// 删除标记 - /// - public System.Int32 delete_mk { get; set; } - - /// - /// 资料创建人 - /// - public System.String datains_usr { get; set; } - - /// - /// 资料创建时间 - /// - public System.DateTime? datains_date { get; set; } - - /// - /// 资料更新人 - /// - public System.String datachg_usr { get; set; } - - /// - /// 资料更新时间 - /// - public System.DateTime? datachg_date { get; set; } - } -} diff --git a/HotelManagerSystemWebApi.Core/Customer/VipRule.cs b/HotelManagerSystemWebApi.Core/Customer/VipRule.cs deleted file mode 100644 index 10b4b70..0000000 --- a/HotelManagerSystemWebApi.Core/Customer/VipRule.cs +++ /dev/null @@ -1,72 +0,0 @@ -using Furion.DatabaseAccessor; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace HotelManagerSystemWebApi.Core -{ - /// - /// 会员等级规则表 - /// - [Table("vip_rule")] - public class VipRule : IEntity - { - /// - /// 会员等级规则表 - /// - public VipRule() - { - } - - /// - /// 索引ID - /// - [Key] - [Column(Order = 1)] - public System.Int32 id { get; set; } - - /// - /// 会员规则流水号 - /// - public System.String rule_id { get; set; } - - /// - /// 会员规则名称 - /// - public System.String rule_name { get; set; } - - /// - /// 预设数值 - /// - public System.Decimal rule_value { get; set; } - - /// - /// 会员等级 - /// - public System.Int32 type_id { get; set; } - - /// - /// 删除标记 - /// - public System.Int32 delete_mk { get; set; } - - /// - /// 资料创建人 - /// - public System.String datains_usr { get; set; } - - /// - /// 资料创建时间 - /// - public System.DateTime? datains_date { get; set; } - - /// - /// 资料更新人 - /// - public System.String datachg_usr { get; set; } - - /// - /// 资料更新时间 - /// - public System.DateTime? datachg_date { get; set; } - } -} diff --git a/HotelManagerSystemWebApi.Core/DtoExtend/BaseDto/IBaseDto.cs b/HotelManagerSystemWebApi.Core/DtoExtend/BaseDto/IBaseDto.cs deleted file mode 100644 index 6c1a272..0000000 --- a/HotelManagerSystemWebApi.Core/DtoExtend/BaseDto/IBaseDto.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HotelManagerSystemWebApi.Core -{ - /// - /// 输入DTO - /// - public class IBaseDto - { - /// - /// 当前登录人员 - /// - public string NowLoginUsr { get; set; } - } -} diff --git a/HotelManagerSystemWebApi.Core/DtoExtend/BaseDto/IListDto.cs b/HotelManagerSystemWebApi.Core/DtoExtend/BaseDto/IListDto.cs deleted file mode 100644 index f2f3929..0000000 --- a/HotelManagerSystemWebApi.Core/DtoExtend/BaseDto/IListDto.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HotelManagerSystemWebApi.Core -{ - /// - /// 输入DTO(列表) - /// - public class IListDto:IBaseDto - { - /// - /// 页数 - /// - public int PageIndex { get; set; } - - /// - /// 总数 - /// - public int PageSize { get; set; } - } -} diff --git a/HotelManagerSystemWebApi.Core/DtoExtend/BaseDto/MsgDto.cs b/HotelManagerSystemWebApi.Core/DtoExtend/BaseDto/MsgDto.cs deleted file mode 100644 index 8d9a639..0000000 --- a/HotelManagerSystemWebApi.Core/DtoExtend/BaseDto/MsgDto.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HotelManagerSystemWebApi.Core -{ - /// - /// 输出DTO - /// - public abstract class MsgDto:IBaseDto - { - /// - /// 状态码 - /// - public StatusCode Status { get; set; } - /// - /// 消息 - /// - public string ErrorMessage { get; set; } - } -} diff --git a/HotelManagerSystemWebApi.Core/DtoExtend/DtoExtend.cs b/HotelManagerSystemWebApi.Core/DtoExtend/DtoExtend.cs deleted file mode 100644 index 7f8ff9f..0000000 --- a/HotelManagerSystemWebApi.Core/DtoExtend/DtoExtend.cs +++ /dev/null @@ -1,471 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using System.Text; -using System.Threading.Tasks; - -namespace HotelManagerSystemWebApi.Core -{ - /// - /// 实体类库 - /// - public static class DtoExtend - { - /// - /// 对结果进行分页处理 - /// - /// - /// - /// - /// - /// - /// - public static List GetPageList(this List source,int pageIndex,int pageSize,ref int count) - { - var listSource = source.Skip((pageIndex - 1) * pageSize) - .Take(pageSize).ToList(); - count = source.Count; - return listSource; - } - - /// - /// 实体集合转换成指定实体集合 - /// - /// 输入实体类型 - /// 输出实体类型 - /// 输入数据源 - /// 输出数据源 - public static List CopyToModel(this List source) - { - List listT2 = new List(); - - T2 _T2 = default(T2); - PropertyInfo[] _T1PI = typeof(T1).GetProperties(); - PropertyInfo[] _T2PI = typeof(T2).GetProperties(); - foreach (T1 _T1 in source) - { - _T2 = Activator.CreateInstance(); - for (int i = 0; i < _T2PI.Length; i++) - { - //判断源实体中有没有对应的字段属性 - var _PI = _T1PI.Where(a => a.Name.ToUpper() == _T2PI[i].Name.ToUpper()).FirstOrDefault(); - if (_PI == null) - { - //字段名称 - var propName = string.Empty; - //获取字段的自定义属性 - var mappingField = _T2PI[i].GetCustomAttribute(); - //如果自定义的映射属性存在,则取属性名称 - if (mappingField != null) - { - propName = mappingField.ColName; - } - else - { - propName = _T2PI[i].Name; - } - //判断源实体中有没有对应的字段属性 - _PI = _T1PI.Where(a => a.Name.ToUpper() == propName.ToUpper()).FirstOrDefault(); - } - if (_PI != null) - { - object value = _PI.GetValue(_T1, null); - Type t = _T2PI[i].PropertyType; - if ((!t.Equals(_PI.PropertyType)) && value != null) - { - if (t == typeof(int)) - { - value = Convert.ToInt32(_PI.GetValue(_T1, null)); - } - else if (t == typeof(int?)) - { - value = Convert.ToInt32(_PI.GetValue(_T1, null)); - } - else if (t == typeof(string)) - { - if (_PI.PropertyType == typeof(byte[])) - { - value = System.Text.Encoding.UTF8.GetString((byte[])_PI.GetValue(_T1, null)); - } - else - { - value = _PI.GetValue(_T1, null) + ""; - } - } - else if (t == typeof(DateTime)) - { - value = Convert.ToDateTime(_PI.GetValue(_T1, null)); - } - else if (t == typeof(DateTime?)) - { - value = Convert.ToDateTime(_PI.GetValue(_T1, null)); - } - else if (t == typeof(decimal?)) - { - value = Convert.ToDecimal(_PI.GetValue(_T1, null)); - } - else if (t == typeof(decimal)) - { - value = Convert.ToDecimal(_PI.GetValue(_T1, null)); - } - else - { - value = _PI.GetValue(_T1, null); - } - } - _T2PI[i].SetValue(_T2, value, null); - } - } - listT2.Add(_T2); - } - return listT2; - } - - /// - /// 复制实体A的数据到实体B - /// - /// - /// - /// - /// - public static T2 CopyToModel(this T1 t1) where T2 : class, new() - { - T2 t2 = Activator.CreateInstance(); - var tInType = t1.GetType(); - foreach (var itemOut in t1.GetType().GetProperties()) - { - var itemIn = tInType.GetProperty(itemOut.Name); ; - if (itemIn != null) - { - itemOut.SetValue(t2, itemIn.GetValue(t1)); - } - } - return t2; - } - - /// - /// 实体更新数据 - /// - /// 输出实体类型 - /// 输入实体类型 - /// 输入数据源 - /// 输入数据源 - /// 输出数据源 - /// - public static T1 UpdateToModel(this T1 _T1, T2 _T2) where T2 : class where T1 : class, new() - { - if (_T1 == null) - { - _T1 = new T1(); - } - List _T1PI = typeof(T1).GetProperties().ToList(); - List _T2PI = typeof(T2).GetProperties().ToList(); - if (_T2 == null) - { - return _T1; - } - - _T1PI.ForEach(_PI1 => - { - _T2PI.ForEach(_PI2 => - { - //字段名称 - var propName = _PI2.Name.ToUpper(); - //判断源实体中有没有对应的字段属性 - if (!propName.Equals(_PI1.Name.ToUpper())) - { - //获取字段的自定义属性 - var mappingField = _PI2.GetCustomAttribute(); - //如果自定义的映射属性存在,则取属性名称 - if (mappingField != null) - { - propName = mappingField.ColName; - } - else - { - propName = _PI2.Name; - } - } - //判断源实体中有没有对应的字段属性 - if (propName.ToUpper().Equals(_PI1.Name.ToUpper())) - { - object value = _PI2.GetValue(_T2, null); - Type t = _PI1.PropertyType; - if ((!t.Equals(_PI2.PropertyType)) && value != null) - { - if (t == typeof(int)) - { - value = Convert.ToInt32(_PI2.GetValue(_T2, null)); - } - else if (t == typeof(int?)) - { - value = Convert.ToInt32(_PI2.GetValue(_T2, null)); - } - else if (t == typeof(string)) - { - if (_PI2.PropertyType == typeof(byte[])) - { - value = System.Text.Encoding.UTF8.GetString((byte[])_PI2.GetValue(_T2, null)); - } - else - { - value = _PI2.GetValue(_T2, null) + ""; - } - } - else if (t == typeof(DateTime)) - { - value = Convert.ToDateTime(_PI2.GetValue(_T2, null)); - } - else if (t == typeof(DateTime?)) - { - value = Convert.ToDateTime(_PI2.GetValue(_T2, null)); - } - else if (t == typeof(decimal?)) - { - value = Convert.ToDecimal(_PI2.GetValue(_T2, null)); - } - else if (t == typeof(decimal)) - { - value = Convert.ToDecimal(_PI2.GetValue(_T2, null)); - } - else if (t == typeof(byte[])) - { - value = System.Text.Encoding.UTF8.GetBytes(_PI2.GetValue(_T2, null) + ""); - } - else - { - value = _PI2.GetValue(_T2, null); - } - } - if (_PI1.CustomAttributes.Count(a => a.AttributeType.Name.Equals("KeyAttribute")) > 0) - { - if ((value + "") != "") - { - _PI1.SetValue(_T1, value, null); - } - } - else - { - _PI1.SetValue(_T1, value, null); - } - } - }); - }); - return _T1; - } - - /// - /// 设置调用成功 - /// - /// - /// - /// - /// - public static T OK(this T dto, string strMsg = "请求成功") where T : MsgDto - { - dto.Status = StatusCode.OK; - return dto; - } - - /// - /// 成功,空数据 - /// - /// - /// - /// - /// - public static T setEmpty(this T dto, string strMsg = "无数据") where T : MsgDto - { - dto.Status = StatusCode.Empty; - dto.ErrorMessage = strMsg; - return dto; - } - - /// - /// 异常报错 - /// - /// - /// - /// - /// - public static T Error(this T dto, string strMsg = "异常报错") where T : MsgDto - { - dto.Status = StatusCode.Error; - dto.ErrorMessage = strMsg; - return dto; - } - - /// - /// 缺少参数 - /// - /// - /// - /// - /// - public static T Error_Required(this T dto, string strMsg = "缺少参数") where T : MsgDto - { - dto.Status = StatusCode.Required; - dto.ErrorMessage = strMsg; - return dto; - } - - /// - /// 数据过期 - /// - /// - /// - /// - /// - public static T Error_Exp(this T dto, string strMsg = "数据已过期") where T : MsgDto - { - dto.Status = StatusCode.Exp; - dto.ErrorMessage = strMsg; - return dto; - } - - /// - /// 数据不存在 - /// - /// - /// - /// - /// - public static T Error_NotFound(this T dto, string strMsg = "数据不存在") where T : MsgDto - { - dto.Status = StatusCode.NotFound; - dto.ErrorMessage = strMsg; - return dto; - } - - /// - /// 参数问题 - /// - /// - /// - /// - /// - public static T Error_Param(this T dto, string strMsg = "参数问题") where T : MsgDto - { - dto.Status = StatusCode.Param; - dto.ErrorMessage = strMsg; - return dto; - } - - /// - /// 服务器中止操作 - /// - /// - /// - /// - /// - public static T Error_Stop(this T dto, string strMsg = "服务器中止操作") where T : MsgDto - { - dto.Status = StatusCode.Stop; - dto.ErrorMessage = strMsg; - return dto; - } - - /// - /// 异常调用 - /// - /// - /// - /// - /// - public static T Error_ExceptionCall(this T dto, string strMsg = "接口异常调用") where T : MsgDto - { - dto.Status = StatusCode.ExceptionCall; - dto.ErrorMessage = strMsg; - return dto; - } - - /// - /// ORM数据库操作失败 - /// - /// - /// - /// - /// - public static T Error_ORM(this T dto, string strMsg = "数据库操作失败") where T : MsgDto - { - dto.Status = StatusCode.ORMError; - dto.ErrorMessage = strMsg; - return dto; - } - - /// - /// 数据已经存在 - /// - /// - /// - /// - /// - public static T Error_Exist(this T dto, string strMsg = "信息已存在") where T : MsgDto - { - dto.Status = StatusCode.Exist; - dto.ErrorMessage = strMsg; - return dto; - } - - /// - /// 密码错误 - /// - /// - /// - /// - /// - public static T Error_Pwd(this T dto, string strMsg = "密码错误") where T : MsgDto - { - dto.Status = StatusCode.PwdError; - dto.ErrorMessage = strMsg; - return dto; - } - - - #region Token 状态集合 - /// - /// 设置状态为Token缺失 - /// - /// - /// - /// - /// - public static T Token_Null(this T dto, string strMsg = "Token缺失") where T : MsgDto - { - dto.Status = StatusCode.TokenNull; - dto.ErrorMessage = strMsg; - return dto; - } - - /// - /// 设置状态为Token格式不正确 - /// - /// - /// - /// - /// - public static T Token_Format(this T dto, string strMsg = "Token格式不正确") where T : MsgDto - { - dto.Status = StatusCode.TokenFormat; - dto.ErrorMessage = strMsg; - return dto; - } - - /// - /// 设置状态为Token过期 - /// - /// - /// - /// - /// - public static T Token_Exp(this T dto, string strMsg = "Token过期") where T : MsgDto - { - dto.Status = StatusCode.TokenExp; - dto.ErrorMessage = strMsg; - return dto; - } - #endregion - - } -} diff --git a/HotelManagerSystemWebApi.Core/DtoExtend/MappingField.cs b/HotelManagerSystemWebApi.Core/DtoExtend/MappingField.cs deleted file mode 100644 index b17de8c..0000000 --- a/HotelManagerSystemWebApi.Core/DtoExtend/MappingField.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HotelManagerSystemWebApi.Core -{ - /// - /// 字段映射 - /// - [AttributeUsage(AttributeTargets.Property, AllowMultiple = false, Inherited = false)] - public class MappingField : Attribute - { - public string ColName { get; } - public MappingField(string colName) - { - this.ColName = colName; - } - } -} diff --git a/HotelManagerSystemWebApi.Core/DtoExtend/StatusCode.cs b/HotelManagerSystemWebApi.Core/DtoExtend/StatusCode.cs deleted file mode 100644 index c2f1b9d..0000000 --- a/HotelManagerSystemWebApi.Core/DtoExtend/StatusCode.cs +++ /dev/null @@ -1,74 +0,0 @@ -namespace HotelManagerSystemWebApi.Core -{ - /// - /// 状态码枚举类 - /// - public enum StatusCode - { - /// - /// 初始化状态 - /// - INIT = 0, - /// - /// 成功 - /// - OK = 200, - /// - /// 无数据 - /// - Empty = 201, - /// - /// 异常报错 - /// - Error = 400, - /// - /// 缺少参数 - /// - Required = 401, - /// - /// 过期 - /// - Exp = 403, - /// - /// 不存在 - /// - NotFound = 404, - /// - /// 参数问题 - /// - Param = 405, - /// - /// 服务器中止操作 - /// - Stop = 406, - /// - /// 异常调用 - /// - ExceptionCall = 407, - /// - /// ORM数据库操作失败 - /// - ORMError = 408, - /// - ///数据已经存在 - /// - Exist = 409, - /// - /// 密码错误 - /// - PwdError = 410, - /// - /// Token缺失 - /// - TokenNull = 301, - /// - /// Token格式不正确 - /// - TokenFormat = 302, - /// - /// Token过期 - /// - TokenExp = 303 - - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Core/HotelManagerSystemWebApi.Core.csproj b/HotelManagerSystemWebApi.Core/HotelManagerSystemWebApi.Core.csproj deleted file mode 100644 index 8e5c4e9..0000000 --- a/HotelManagerSystemWebApi.Core/HotelManagerSystemWebApi.Core.csproj +++ /dev/null @@ -1,39 +0,0 @@ - - - - net6.0 - 1701;1702;1591 - HotelManagerSystemWebApi.Core.xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/HotelManagerSystemWebApi.Core/HotelManagerSystemWebApi.Core.xml b/HotelManagerSystemWebApi.Core/HotelManagerSystemWebApi.Core.xml deleted file mode 100644 index 6bbb3ac..0000000 --- a/HotelManagerSystemWebApi.Core/HotelManagerSystemWebApi.Core.xml +++ /dev/null @@ -1,2113 +0,0 @@ - - - - HotelManagerSystemWebApi.Core - - - - - 资产管理 - - - - - 资产编号 - - - - - 资产名称 - - - - - 资产总值 - - - - - 所属部门 - - - - - 入库时间 - - - - - 资产来源 - - - - - 资产经办人 - - - - - 删除标记 - - - - - 资料创建人 - - - - - 资料创建时间 - - - - - 资料更新人 - - - - - 资料更新时间 - - - - - 客户信息 - - - - - 客户编号 - - - - - 客户名称 - - - - - 客户性别 - - - - - 客户电话 - - - - - 证件类型 - - - - - 证件号码 - - - - - 居住地址 - - - - - 出生日期 - - - - - 客户类型 - - - - - 删除标记 - - - - - 资料创建人 - - - - - 资料创建时间 - - - - - 资料更新人 - - - - - 资料更新时间 - - - - - 酒店盈利情况 - - - - - 年 - - - - - 总金额 - - - - - 酒店宣传联动内容 - - - - - 宣传内容编号 - - - - - 宣传内容 - - - - - 水电信息 - - - - - 信息编号 - - - - - 房间编号 - - - - - 开始使用时间 - - - - - 结束使用时间 - - - - - 水费 - - - - - 电费 - - - - - 记录员 - - - - - 客户编号 - - - - - 删除标记 - - - - - 资料创建人 - - - - - 资料创建时间 - - - - - 资料更新人 - - - - - 资料更新时间 - - - - - 预约列表 - - - - - 预约编号 - - - - - 客户名称 - - - - - 预约电话 - - - - - 预约渠道 - - - - - 预约房号 - - - - - 预约起始 - - - - - 预约止日 - - - - - 删除标记 - - - - - 资料创建人 - - - - - 资料创建时间 - - - - - 资料更新人 - - - - - 资料更新时间 - - - - - 房间实体类 - - - - - 房间编号 - - - - - 房间类型 - - - - - 客户编号 - - - - - 最后一次入住时间 - - - - - 最后一次退房时间 - - - - - 房间状态ID - - - - - 房间单价 - - - - - 房间押金 - - - - - 房间位置 - - - - - 删除标记 - - - - - 资料创建人 - - - - - 资料创建时间 - - - - - 资料更新人 - - - - - 资料更新时间 - - - - - 房间状态 - - - - - 房间状态编号 - - - - - 房间状态 - - - - - 删除标记 - - - - - 资料创建人 - - - - - 资料创建时间 - - - - - 资料更新人 - - - - - 资料更新时间 - - - - - 房间类型 - - - - - 类型编号 - - - - - 房间类型 - - - - - 删除标记 - - - - - 资料创建人 - - - - - 资料创建时间 - - - - - 资料更新人 - - - - - 资料更新时间 - - - - - 商品信息 - - - - - 商品编号 - - - - - 商品名称 - - - - - 商品价格 - - - - - 规格型号 - - - - - 库存 - - - - - 删除标记 - - - - - 资料创建人 - - - - - 资料创建时间 - - - - - 资料更新人 - - - - - 资料更新时间 - - - - - 消费信息 - - - - - 房间编号 - - - - - 客户编号 - - - - - 商品名称 - - - - - 消费数量 - - - - - 商品单价 - - - - - 消费金额 - - - - - 消费时间 - - - - - 结算状态 - - - - - 删除标记 - - - - - 资料创建人 - - - - - 资料创建时间 - - - - - 资料更新人 - - - - - 资料更新时间 - - - - - 结算状态常量 - - - - - 已结算状态常量 - - - - - 未结算状态常量 - - - - - 输入DTO - - - - - 当前登录人员 - - - - - 输入DTO(列表) - - - - - 页数 - - - - - 总数 - - - - - 输出DTO - - - - - 状态码 - - - - - 消息 - - - - - 实体类库 - - - - - 对结果进行分页处理 - - - - - - - - - - - 实体集合转换成指定实体集合 - - 输入实体类型 - 输出实体类型 - 输入数据源 - 输出数据源 - - - - 复制实体A的数据到实体B - - - - - - - - - 实体更新数据 - - 输出实体类型 - 输入实体类型 - 输入数据源 - 输入数据源 - 输出数据源 - - - - - 设置调用成功 - - - - - - - - - 成功,空数据 - - - - - - - - - 异常报错 - - - - - - - - - 缺少参数 - - - - - - - - - 数据过期 - - - - - - - - - 数据不存在 - - - - - - - - - 参数问题 - - - - - - - - - 服务器中止操作 - - - - - - - - - 异常调用 - - - - - - - - - ORM数据库操作失败 - - - - - - - - - 数据已经存在 - - - - - - - - - 密码错误 - - - - - - - - - 设置状态为Token缺失 - - - - - - - - - 设置状态为Token格式不正确 - - - - - - - - - 设置状态为Token过期 - - - - - - - - - 字段映射 - - - - - 状态码枚举类 - - - - - 初始化状态 - - - - - 成功 - - - - - 无数据 - - - - - 异常报错 - - - - - 缺少参数 - - - - - 过期 - - - - - 不存在 - - - - - 参数问题 - - - - - 服务器中止操作 - - - - - 异常调用 - - - - - ORM数据库操作失败 - - - - - 数据已经存在 - - - - - 密码错误 - - - - - Token缺失 - - - - - Token格式不正确 - - - - - Token过期 - - - - - 员工奖罚 - - - - - 工号 - - - - - 奖惩信息 - - - - - 奖惩类型 - - - - - 奖惩操作人 - - - - - 奖惩时间 - - - - - 删除标记 - - - - - 资料创建人 - - - - - 资料创建时间 - - - - - 资料更新人 - - - - - 资料更新时间 - - - - - 员工履历 - - - - - 工号 - - - - - 开始时间 - - - - - 结束时间 - - - - - 职位 - - - - - 公司 - - - - - 删除标记 - - - - - 资料创建人 - - - - - 资料创建时间 - - - - - 资料更新人 - - - - - 资料更新时间 - - - - - 员工打卡考勤 - - - - - 工号 - - - - - 打卡时间 - - - - - 打卡方式 - - - - - 打卡状态 - - - - - 删除标记 - - - - - 资料创建人 - - - - - 资料创建时间 - - - - - 资料更新人 - - - - - 资料更新时间 - - - - - 员工信息 - - - - - 员工账号/工号 - - - - - 员工姓名 - - - - - 出生日期 - - - - - 员工性别 - - - - - 民族类型 - - - - - 员工电话 - - - - - 所属部门 - - - - - 居住地址 - - - - - 员工职位 - - - - - 证件号码 - - - - - 员工密码 - - - - - 员工入职时间 - - - - - 员工面貌 - - - - - 教育程度 - - - - - 删除标记 - - - - - 资料创建人 - - - - - 资料创建时间 - - - - - 资料更新人 - - - - - 资料更新时间 - - - - - 员工照片 - - - - - 工号 - - - - - 照片路径 - - - - - 管理员信息实体类 - - - - - 管理员账号 - - - - - 管理员密码 - - - - - 管理员类型 - - - - - 管理员名称 - - - - - 是否为超级管理员 - - - - - 删除标记 - - - - - 资料新增人 - - - - - 资料新增时间 - - - - - 资料更新人 - - - - - 资料更新时间 - - - - - 管理员类型 - - - - - 编号 - - - - - 管理员类型 - - - - - 类型名称 - - - - - 删除标记 - - - - - 新增人 - - - - - 新增时间 - - - - - 修改人 - - - - - 修改时间 - - - - - 地址编号 - - - - - 地址 - - - - - 客户类型 - - - - - 客户类型 - - - - - 类型名字 - - - - - 删除标记 - - - - - 资料创建人 - - - - - 资料创建时间 - - - - - 资料更新人 - - - - - 资料更新时间 - - - - - 部门表 - - - - - 部门编号 - - - - - 部门名称 - - - - - 部门描述 - - - - - 创建时间(部门) - - - - - 部门主管 - - - - - 上级部门 - - - - - 删除标记 - - - - - 资料创建人 - - - - - 资料创建时间 - - - - - 资料更新人 - - - - - 资料更新时间 - - - - - 学历 - - - - - 学历编号 - - - - - 学历名称 - - - - - 删除标记 - - - - - 资料创建人 - - - - - 资料创建时间 - - - - - 资料更新人 - - - - - 资料更新时间 - - - - - 民族 - - - - - 民族编号 - - - - - 民族名称 - - - - - 删除标记 - - - - - 资料创建人 - - - - - 资料创建时间 - - - - - 资料更新人 - - - - - 资料更新时间 - - - - - 证件类型 - - - - - 证件类型 - - - - - 证件名称 - - - - - 删除标记 - - - - - 资料创建人 - - - - - 资料创建时间 - - - - - 资料更新人 - - - - - 资料更新时间 - - - - - 职位 - - - - - 职位编号 - - - - - 职位名称 - - - - - 删除标记 - - - - - 资料创建人 - - - - - 资料创建时间 - - - - - 资料更新人 - - - - - 资料更新时间 - - - - - 性别 - - - - - 性别ID - - - - - 性别名称 - - - - - 删除标记 - - - - - 资料创建人 - - - - - 资料创建时间 - - - - - 资料更新人 - - - - - 资料更新时间 - - - - - 地区识别码 - - - - - - - - - - 编号 - - - - - 省份 - - - - - 城市 - - - - - 地区 - - - - - 地区识别码 - - - - - 监管统计 - - - - - 监管统计编号 - - - - - 监管部门 - - - - - 监管进度 - - - - - - - - - - - - - - - - - - - - - - - - - 删除标记 - - - - - 资料创建人 - - - - - 资料创建时间 - - - - - 资料更新人 - - - - - 资料更新时间 - - - - - 流水号生成规则表 - - - - - - - - - - 规则编号 - - - - - 规格名称 - - - - - 规则描述 - - - - - 当前ID - - - - - 规则简写 - - - - - 规则格式 - - - - - 编号前缀 - - - - - 规则分割符 - - - - - 资料新增人 - - - - - 资料新增时间 - - - - - 资料更新人 - - - - - 资料更新时间 - - - - - 模块实体 - - - - - 模块ID - - - - - 模块名称 - - - - - 模块描述 - - - - - 删除标记 - - - - - 资料创建人 - - - - - 资料创建时间 - - - - - 资料更新人 - - - - - 资料更新时间 - - - - - 系统模块常量类 - - - - - 基础信息 - - - - - 财务信息 - - - - - 水电管理 - - - - - 监管统计 - - - - - 客房管理 - - - - - 客户管理 - - - - - 人事管理 - - - - - 物资管理 - - - - - 员工操作日志 - - - - - 系统管理 - - - - - 模块权限表 - - - - - 模块ID - - - - - 管理员账号 - - - - - 模块名称 - - - - - 是否开启 - - - - - 任命公告 - - - - - 公告编号 - - - - - 公告主题 - - - - - 公告类型 - - - - - 公告时间 - - - - - 公告正文 - - - - - 发文部门 - - - - - 删除标记 - - - - - 资料创建人 - - - - - 资料创建时间 - - - - - 资料更新人 - - - - - 资料更新时间 - - - - - 操作日志表 - - - - - - - - - - 记录ID - - - - - 记录时间 - - - - - 日志内容 - - - - - 被记录账户 - - - - - 日志等级 - - - - - 删除标记 - - - - - 资料创建人 - - - - - 资料创建时间 - - - - - 资料更新人 - - - - - 资料更新时间 - - - - - 会员等级规则类 - - - - - 索引ID - - - - - 会员规则流水号 - - - - - 会员规则名称 - - - - - 预设数值(历史消费总额) - - - - - 会员等级 - - - - - 删除标识 - - - - - 新增人 - - - - - 新增时间 - - - - - 修改人 - - - - - 修改时间 - - - - - 奖惩类型实体类 - - - - - 奖惩编号 - - - - - 奖惩名称 - - - - - 删除标记 - - - - - 资料新增人 - - - - - 资料新增日期 - - - - - 资料更新人 - - - - - 资料更新日期 - - - - diff --git a/HotelManagerSystemWebApi.Core/Util/CounterRuleConsts.cs b/HotelManagerSystemWebApi.Core/Util/CounterRuleConsts.cs deleted file mode 100644 index 4f0afa3..0000000 --- a/HotelManagerSystemWebApi.Core/Util/CounterRuleConsts.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HotelManagerSystemWebApi.Core -{ - /// - /// 流水号规则常量 - /// - public class CounterRuleConsts - { - /// - /// 员工工号流水号规则 - /// - public const string WorkerId = "WorkerId"; - - /// - /// 民族类型编号 - /// - public const string NationId = "NationId"; - - /// - /// 客户类型编号 - /// - public const string CustoId = "CustoId"; - - /// - /// 预约编号 - /// - public const string ReserId = "ReserId"; - - /// - /// 商品编号 - /// - public const string SellId = "SellId"; - - /// - /// 公告编号 - /// - public const string NoticeId = "NoticeId"; - - /// - /// 资产编号 - /// - public const string CashInfo = "CashInfo"; - - /// - /// 部门编号 - /// - public const string DeptInfo = "DeptInfo"; - - /// - /// 学历编号 - /// - public const string EducationId = "EducationId"; - - /// - /// 职位编号 - /// - public const string PositionId = "PositionId"; - - /// - /// 会员等级类型编号 - /// - public const string VipRuleId = "VipRuleId"; - } -} diff --git a/HotelManagerSystemWebApi.Core/Worker/WorkerPic/WorkerPic.cs b/HotelManagerSystemWebApi.Core/Worker/WorkerPic/WorkerPic.cs deleted file mode 100644 index 2f5f43c..0000000 --- a/HotelManagerSystemWebApi.Core/Worker/WorkerPic/WorkerPic.cs +++ /dev/null @@ -1,29 +0,0 @@ -using Furion.DatabaseAccessor; -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace HotelManagerSystemWebApi.Core -{ - /// - /// 员工照片 - /// - [Table("workerpic")] - public class WorkerPic:EntityBase - { - /// - /// 工号 - /// - [Column("WorkerId")] - public string WorkerId { get; set; } - - /// - /// 照片路径 - /// - [Column("Pic")] - public string Pic { get; set; } - } -} diff --git a/HotelManagerSystemWebApi.Core/Zero/AdminInfo/AdminInfo.cs b/HotelManagerSystemWebApi.Core/Zero/AdminInfo/AdminInfo.cs deleted file mode 100644 index cf01a87..0000000 --- a/HotelManagerSystemWebApi.Core/Zero/AdminInfo/AdminInfo.cs +++ /dev/null @@ -1,64 +0,0 @@ -using Furion.DatabaseAccessor; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace HotelManagerSystemWebApi.Core -{ - /// - /// 管理员信息实体类 - /// - [Table("admininfo")] - public class AdminInfo: EntityBase - { - - /// - /// 管理员账号 - /// - public System.String AdminAccount { get; set; } - - /// - /// 管理员密码 - /// - public System.String AdminPassword { get; set; } - - /// - /// 管理员类型 - /// - public System.String AdminType { get; set; } - - /// - /// 管理员名称 - /// - public System.String AdminName { get; set; } - - /// - /// 是否为超级管理员 - /// - public System.Int32? IsAdmin { get; set; } - - /// - /// 删除标记 - /// - public System.Int32? DeleteMk { get; set; } - - /// - /// 资料新增人 - /// - public System.String datains_usr { get; set; } - - /// - /// 资料新增时间 - /// - public System.DateTime? datains_time { get; set; } - - /// - /// 资料更新人 - /// - public System.String datachg_usr { get; set; } - - /// - /// 资料更新时间 - /// - public System.DateTime? datachg_time { get; set; } - } -} diff --git a/HotelManagerSystemWebApi.Core/Zero/CardCodes.cs b/HotelManagerSystemWebApi.Core/Zero/CardCodes.cs deleted file mode 100644 index 0440b92..0000000 --- a/HotelManagerSystemWebApi.Core/Zero/CardCodes.cs +++ /dev/null @@ -1,47 +0,0 @@ -using Furion.DatabaseAccessor; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace HotelManagerSystemWebApi.Core -{ - /// - /// 地区识别码 - /// - [Table("cardcodes")] - public class CardCodes : IEntity - { - /// - /// - /// - public CardCodes() - { - } - - /// - /// 编号 - /// - [Key] - [Column(Order = 1)] - public System.Int64 id { get; set; } - - /// - /// 省份 - /// - public System.String Province { get; set; } - - /// - /// 城市 - /// - public System.String City { get; set; } - - /// - /// 地区 - /// - public System.String District { get; set; } - - /// - /// 地区识别码 - /// - public System.String bm { get; set; } - } -} diff --git a/HotelManagerSystemWebApi.Core/Zero/CounterRule.cs b/HotelManagerSystemWebApi.Core/Zero/CounterRule.cs deleted file mode 100644 index 1864e4b..0000000 --- a/HotelManagerSystemWebApi.Core/Zero/CounterRule.cs +++ /dev/null @@ -1,82 +0,0 @@ -using Furion.DatabaseAccessor; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace HotelManagerSystemWebApi.Core -{ - /// - /// 流水号生成规则表 - /// - [Table("counterrule")] - public class CounterRule : IEntity - { - /// - /// - /// - public CounterRule() - { - } - - /// - /// 规则编号 - /// - [Key] - [Column(Order = 1)] - public System.Int32 rule_id { get; set; } - - /// - /// 规格名称 - /// - public System.String rule_name { get; set; } - - /// - /// 规则描述 - /// - public System.String rule_desc { get; set; } - - /// - /// 当前ID - /// - public System.Int32? now_id { get; set; } - - /// - /// 规则简写 - /// - public System.String prefix_name { get; set; } - - /// - /// 规则格式 - /// - public System.String custo_format { get; set; } - - /// - /// 编号前缀 - /// - public System.String number_format { get; set; } - - /// - /// 规则分割符 - /// - public System.String separating_char { get; set; } - - /// - /// 资料新增人 - /// - public System.String datains_usrid { get; set; } - - /// - /// 资料新增时间 - /// - public System.DateTime? datains_time { get; set; } - - /// - /// 资料更新人 - /// - public System.String datachg_usrid { get; set; } - - /// - /// 资料更新时间 - /// - public System.DateTime? datachg_time { get; set; } - } -} diff --git a/HotelManagerSystemWebApi.Core/Zero/OperationLog/OperationLog.cs b/HotelManagerSystemWebApi.Core/Zero/OperationLog/OperationLog.cs deleted file mode 100644 index 78630fa..0000000 --- a/HotelManagerSystemWebApi.Core/Zero/OperationLog/OperationLog.cs +++ /dev/null @@ -1,73 +0,0 @@ -using Furion.DatabaseAccessor; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; - -namespace HotelManagerSystemWebApi.Core -{ - /// - /// 操作日志表 - /// - [Table("operationlog")] - public class OperationLog : IEntity - { - /// - /// - /// - public OperationLog() - { - } - - /// - /// 记录ID - /// - [Key] - [Column(Order = 1)] - public System.Int32 OperationId { get; set; } - - /// - /// 记录时间 - /// - public System.DateTime OperationTime { get; set; } - - /// - /// 日志内容 - /// - [Column("OperationLog")] - public System.String OperationLogContent { get; set; } - - /// - /// 被记录账户 - /// - public System.String OperationAccount { get; set; } - - /// - /// 日志等级 - /// - public System.Int32? OperationLevel { get; set; } - - /// - /// 删除标记 - /// - public System.Int32 delete_mk { get; set; } - - /// - /// 资料创建人 - /// - public System.String datains_usr { get; set; } - - /// - /// 资料创建时间 - /// - public System.DateTime? datains_date { get; set; } - - /// - /// 资料更新人 - /// - public System.String datachg_usr { get; set; } - - /// - /// 资料更新时间 - /// - public System.DateTime? datachg_date { get; set; } - } -} diff --git a/HotelManagerSystemWebApi.EntityFramework.Core/DbContexts/DefaultDbContext.cs b/HotelManagerSystemWebApi.EntityFramework.Core/DbContexts/DefaultDbContext.cs deleted file mode 100644 index ea39a05..0000000 --- a/HotelManagerSystemWebApi.EntityFramework.Core/DbContexts/DefaultDbContext.cs +++ /dev/null @@ -1,14 +0,0 @@ -using Furion.DatabaseAccessor; -using Microsoft.EntityFrameworkCore; -using System; - -namespace HotelManagerSystemWebApi.EntityFramework.Core -{ - [AppDbContext("NpgSqlConnectStr", DbProvider.Npgsql)] - public class DefaultDbContext : AppDbContext - { - public DefaultDbContext(DbContextOptions options) : base(options) - { - } - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.EntityFramework.Core/Startup.cs b/HotelManagerSystemWebApi.EntityFramework.Core/Startup.cs deleted file mode 100644 index 7ced7f9..0000000 --- a/HotelManagerSystemWebApi.EntityFramework.Core/Startup.cs +++ /dev/null @@ -1,17 +0,0 @@ -using Furion; -using Furion.DatabaseAccessor; -using Microsoft.Extensions.DependencyInjection; - -namespace HotelManagerSystemWebApi.EntityFramework.Core -{ - public class Startup : AppStartup - { - public void ConfigureServices(IServiceCollection services) - { - services.AddDatabaseAccessor(options => - { - options.AddDbPool(); - }); - } - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.EntityFramework.Core/dbsettings.json b/HotelManagerSystemWebApi.EntityFramework.Core/dbsettings.json deleted file mode 100644 index fc5b6ad..0000000 --- a/HotelManagerSystemWebApi.EntityFramework.Core/dbsettings.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "ConnectionStrings": { - "MySqlConnectStr": "Data Source=127.0.0.1;Database=tshoteldb;User ID=softuser;Password=;pooling=true;port=3306;sslmode=none;CharSet=utf8", - "NpgSqlConnectStr": "PORT=5630;DATABASE=tshoteldb;HOST=.;PASSWORD=.;USER ID=postgres" - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Web.Core/Handlers/JwtHandler.cs b/HotelManagerSystemWebApi.Web.Core/Handlers/JwtHandler.cs deleted file mode 100644 index 38d0844..0000000 --- a/HotelManagerSystemWebApi.Web.Core/Handlers/JwtHandler.cs +++ /dev/null @@ -1,15 +0,0 @@ -using Furion; -using Furion.Authorization; -using Furion.DataEncryption; -using HotelManagerSystemWebApi.Core; -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Http; -using System.Threading.Tasks; - -namespace HotelManagerSystemWebApi.Web.Core -{ - public class JwtHandler : AppAuthorizeHandler - { - - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Web.Core/HotelManagerSystemWebApi.Web.Core.csproj b/HotelManagerSystemWebApi.Web.Core/HotelManagerSystemWebApi.Web.Core.csproj deleted file mode 100644 index e72f211..0000000 --- a/HotelManagerSystemWebApi.Web.Core/HotelManagerSystemWebApi.Web.Core.csproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - net6.0 - 1701;1702;1591 - HotelManagerSystemWebApi.Web.Core.xml - - - - - - - - - - - - diff --git a/HotelManagerSystemWebApi.Web.Core/HotelManagerSystemWebApi.Web.Core.xml b/HotelManagerSystemWebApi.Web.Core/HotelManagerSystemWebApi.Web.Core.xml deleted file mode 100644 index 3894e72..0000000 --- a/HotelManagerSystemWebApi.Web.Core/HotelManagerSystemWebApi.Web.Core.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - HotelManagerSystemWebApi.Web.Core - - - - diff --git a/HotelManagerSystemWebApi.Web.Core/Startup.cs b/HotelManagerSystemWebApi.Web.Core/Startup.cs deleted file mode 100644 index bc9e8ba..0000000 --- a/HotelManagerSystemWebApi.Web.Core/Startup.cs +++ /dev/null @@ -1,44 +0,0 @@ -using Furion; -using Microsoft.AspNetCore.Builder; -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; - -namespace HotelManagerSystemWebApi.Web.Core -{ - public class Startup : AppStartup - { - public void ConfigureServices(IServiceCollection services) - { - //services.AddJwt(); - services.AddCorsAccessor(); - - services.AddControllers() - .AddInjectWithUnifyResult(); - } - - public void Configure(IApplicationBuilder app, IWebHostEnvironment env) - { - if (env.IsDevelopment()) - { - app.UseDeveloperExceptionPage(); - } - - app.UseHttpsRedirection(); - - app.UseRouting(); - - app.UseCorsAccessor(); - - app.UseAuthentication(); - app.UseAuthorization(); - - app.UseInject(string.Empty); - - app.UseEndpoints(endpoints => - { - endpoints.MapControllers(); - }); - } - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Web.Entry/HotelManagerSystemWebApi.Web.Entry.csproj b/HotelManagerSystemWebApi.Web.Entry/HotelManagerSystemWebApi.Web.Entry.csproj deleted file mode 100644 index afd7ebd..0000000 --- a/HotelManagerSystemWebApi.Web.Entry/HotelManagerSystemWebApi.Web.Entry.csproj +++ /dev/null @@ -1,29 +0,0 @@ - - - - net6.0 - enable - - - - - - - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - - - - diff --git a/HotelManagerSystemWebApi.Web.Entry/Program.cs b/HotelManagerSystemWebApi.Web.Entry/Program.cs deleted file mode 100644 index d9bccf2..0000000 --- a/HotelManagerSystemWebApi.Web.Entry/Program.cs +++ /dev/null @@ -1,17 +0,0 @@ -using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Hosting; - -namespace HotelManagerSystemWebApi.Web.Entry -{ - public class Program - { - public static void Main(string[] args) - { - var builder = WebApplication.CreateBuilder(args).Inject(); - AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true); - var app = builder.Build(); - app.Run(); - } - - } -} \ No newline at end of file diff --git a/HotelManagerSystemWebApi.Web.Entry/appsettings.json b/HotelManagerSystemWebApi.Web.Entry/appsettings.json deleted file mode 100644 index 972cde3..0000000 --- a/HotelManagerSystemWebApi.Web.Entry/appsettings.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "DynamicApiControllerSettings": { - "ModelToQuery": true, - "KeepVerb": true, - "KeepName": true, - "VerbToHttpMethods": [ - [ "Insert", "POST" ], - [ "Add", "POST" ], - [ "Del", "DELETE" ], - [ "Delete", "DELETE" ], - [ "Upd", "POST" ], - [ "Update", "POST" ], - [ "Select", "GET" ] - ], - "DefaultHttpMethod": "GET", - "LowercaseRoute":false - }, - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft": "Warning", - "Microsoft.Hosting.Lifetime": "Information", - "Microsoft.EntityFrameworkCore": "Information" - } - }, - "AllowedHosts": "*" - } \ No newline at end of file diff --git a/HotelManagerSystemWebApi.sln b/HotelManagerSystemWebApi.sln deleted file mode 100644 index fa9e62a..0000000 --- a/HotelManagerSystemWebApi.sln +++ /dev/null @@ -1,49 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30223.230 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HotelManagerSystemWebApi.Application", "HotelManagerSystemWebApi.Application\HotelManagerSystemWebApi.Application.csproj", "{AB699EE9-43A8-46F2-A855-04A26DE63372}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HotelManagerSystemWebApi.EntityFramework.Core", "HotelManagerSystemWebApi.EntityFramework.Core\HotelManagerSystemWebApi.EntityFramework.Core.csproj", "{4BD77E5C-138D-4F2D-B709-F9020F306AF3}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HotelManagerSystemWebApi.Web.Core", "HotelManagerSystemWebApi.Web.Core\HotelManagerSystemWebApi.Web.Core.csproj", "{9D14BB78-DA2A-4040-B9DB-5A515B599181}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HotelManagerSystemWebApi.Core", "HotelManagerSystemWebApi.Core\HotelManagerSystemWebApi.Core.csproj", "{4FB30091-15C7-4FD9-AB7D-266814F360F5}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "HotelManagerSystemWebApi.Web.Entry", "HotelManagerSystemWebApi.Web.Entry\HotelManagerSystemWebApi.Web.Entry.csproj", "{C8D99F52-EDC7-411F-8300-6DB14BF59E8C}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {AB699EE9-43A8-46F2-A855-04A26DE63372}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AB699EE9-43A8-46F2-A855-04A26DE63372}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AB699EE9-43A8-46F2-A855-04A26DE63372}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AB699EE9-43A8-46F2-A855-04A26DE63372}.Release|Any CPU.Build.0 = Release|Any CPU - {4BD77E5C-138D-4F2D-B709-F9020F306AF3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4BD77E5C-138D-4F2D-B709-F9020F306AF3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4BD77E5C-138D-4F2D-B709-F9020F306AF3}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4BD77E5C-138D-4F2D-B709-F9020F306AF3}.Release|Any CPU.Build.0 = Release|Any CPU - {9D14BB78-DA2A-4040-B9DB-5A515B599181}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9D14BB78-DA2A-4040-B9DB-5A515B599181}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9D14BB78-DA2A-4040-B9DB-5A515B599181}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9D14BB78-DA2A-4040-B9DB-5A515B599181}.Release|Any CPU.Build.0 = Release|Any CPU - {4FB30091-15C7-4FD9-AB7D-266814F360F5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {4FB30091-15C7-4FD9-AB7D-266814F360F5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {4FB30091-15C7-4FD9-AB7D-266814F360F5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {4FB30091-15C7-4FD9-AB7D-266814F360F5}.Release|Any CPU.Build.0 = Release|Any CPU - {C8D99F52-EDC7-411F-8300-6DB14BF59E8C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C8D99F52-EDC7-411F-8300-6DB14BF59E8C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C8D99F52-EDC7-411F-8300-6DB14BF59E8C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C8D99F52-EDC7-411F-8300-6DB14BF59E8C}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {B2073C2C-0FD3-452B-8047-8134D68E12CE} - EndGlobalSection -EndGlobal diff --git a/Library/CK.Common.dll b/Library/CK.Common.dll new file mode 100644 index 0000000000000000000000000000000000000000..55487f472ab2b3d3ba15b599e059791afd7aef93 GIT binary patch literal 22016 zcmeHv3v^UvmhL`}I`vGEs!GBuU_p44B*X+F28>7^L?VP&0)m2}NQzKWsR~sUB!*}Z zbbO%Wi}u;KvBmC-Z(|zyQqun~In`sB{xA!^q zNT>+XbJx0S%@mw{_WR%eYoGuB>r~pWzK1j-(s6z91<{MR^JkgBF9#zKdoTE&m!5OJ zIpalT)tfUqcScje{$!#z8SV>qhvV@?I=DR&Ob*0@(Ri?BO-HaV(G#gIDss)TT(4bD zv`W#a<>#0DMW(cqG&AT{YKT^YW0>4KVz>u!jo>0G7F;#sW(LPEpW}ew^GBm?x3DVz z&)qGOS@>K6ziSv7Au8vF82dRwc|7g6U}*_Y8lB1fLw0eVFqU7e2XO@qE?6#!&X zS1WE%@(B`ct4^kp-Jm445g=UAwYc&=%g|lb$w({#MUIt@;9_560$xVc1n#KMF4Uht z9Gglu+IJbzFXs~}!u{%CrW%?+SgJ&U8kH(gRfOjw z^$>1T6Gd%GmI}e)&&%@@S^RRjN zJZv6051aYtVN-n`HW!`6W@?R27hs}d7W+~@Oko$L{J6RO>giJOr=Ea=si6Q^p%Q>1 z;{kw zCpYz6ImCC4G2h8Q}Dg(#Jq zz#RO6DL%tDW#T58VHPjn{_f~$JuuZbb;*IxzxcxLNYsfnX6(g4mNbF+lL>zPbQvDV zQxl6=_?|sbUP-?4dDMt$%EPl6*Q=PL4upV(gnRKuBMl(WA&npp z!$d5353MY`(b1D0*`D0(<{4sru^U>+!io)sR%Z>1y8`ZZ~@;GA%*$X5O9`f1b z!GtvpaLd|flgC}0JOVbP1sk4Wff|ke0gZ^|y)U&4rY=JtZp7WthMV}N4maaQ#t`4k z$K+|n<3PGKLNKb#h}kBD%u_jk?wGWJ$=w2B-WarsV8>Is3*rWrk-4Qrk-oLkoV^$l(lK14%&l=@ajoj%C2?GUJ;e1X5|untz`%ww|>N zEVM9=x&Dc3ft4k?09|I>p>4q3_AvoU6VO!j;Y`@N*%roJ&jB!$L>QPn-&{Yz^0>tH z6YP$`=Z?kheDV}BV4(2c_dam2Eb~Dr&jA*@nEKv)pS*vN0%pJxayB=P$4O zFs5Yc;@AcQ+dQ@rq*V>|A{GoAErc~2j(W`YMqBeSAMCWmPAHh!f@NmDFl8as$jCTG zCG>es)@c;%hJ{g`io$&4IshC&Stn0dYl&T8NINF6n(a@-SYDm#W8L_<=w^Lok-yNy zUm^i>b*LY3Xt$tAz(;bjPzrP|mgFe2G-TpojMg}%3_yKo4}dy!J>a>PvUi+PHmXB| z5SbB$&?}Wlg2-_iVV8!^z_V-!a(;U4!yV7EVcbX^x{;~V#!a~8Jt}gQM8D~ng4pk~ zo4gvs)e!s0HIH-!ibcAeO`7b_Jq~lCyU8INbF8MFmJ`HiSS?<_4NtPgUq>z`O&#Kh zheiMnRbYx(n{S&{{Dt6iKF~((wrwbvciT8$Sp1C2O<;`OZR5b9YTkJ6^A^lDs_%mb zI6%nx`$L=^oU4N>(?Ml+8Uu6j;YHPrXb!Hz*v&VeXjGXC=W$vfZv}0m%9`e|u_AribiicZR-KPc=8hL>-bx+K8%IOoDVbk9pPe*( zX%7`_`owC!oHaXDd40%F2`t)qW5`c%KI7$7RLJevbafUTEE6Aq z8T72c>2}7yXS>xEpqH?sG01N`Yd6Sd*PRAEU@%-KFfQ{!=Ss} z48Lh(_?F<;!lywe0bO*0UQrEN?$n(fWRp@Z63vfw);~lHKNUYgmGNV$?)1`=)amxp z%MOO81b!;;LxFz+XwW{`dTE}E@w*&s+aP}K7th76TOEE%>5n4X2PK9diFApZ<6nY! z4El|fUhZMrr|io-2HhyO-xdBL;9hz}%KAQ)LZ{5hnj0kk`%t2nPC&{ndp$amdjRc> zt?_^@;9i`i-a=b3#eH2&AEE6R1J}VRruEJm=W=`-XA^2Ws1isVv>&o-gfh^d`(gKw z8f!YR`ey1Ai>eUnU5mO%r~_nbV%-BTb6qvgdtp~ECAj1+`A*;eB`jEC># zLe=R^6@k)b6q6U>E~n`hHBqP_URKahI-lP!$9VxF2X#=W3ThSVq)@Z*_5#Z;7itb& zDb%Av&83w>{Z^<8sa+^uLN3SFag9*l6{?!Be1w-ip=$8*1XHgIRYzAzoIjAr7SU#! zLpJwhoKZY!pJphuQ=5+}eqH-9>V1*GTeKkfzf+mtrp+>DP#JU#;}P}8v~lD;HDqiY zISH8I99Dzi+$Qjthw;yy3_ljm{eo*cb9Orz4hUz7;GYOyD^{lj4-5Z?Zq~dToJEvU zU((8GzIwCH`2PUD3b;Wd>Z6#8AKQNn_&(;3LGS5^a}56!I41u!*F4Oy5p^Blzfm>d z<+K2B39W^<_o)@|Y&vgA3}jmyGXG& z>>KV&44wX$MLp$i0QF0YYSx!3Hu}V(I`v}AvQt7G6fXwpGYFrr(XDEeVNjh#z3Xl= z?6l3IZd2O~2OYGiZ+X@kPI}RzK6kD&-1Lz}{cm-hQAEL+rq6?rO`uMT`ZsMI&dF}G zs9lbAMu1+ns01`i=@W~pgKQ$rsxZCW37?Z`lSNgc^r^&aPmbE7uQR66af{jry9?+u zi+bL@4&yt7rx9!3fD$Tbi$ysdR~xhGXvmZ~9oJ#b9H}y?-`kVMT)J((N!{s5;;^ru z4-VkvAJJo9TC^%<&q=U<=VgE{|tbF}09SsCy>`U0wF& zG%YJrkpJcgb$}MBck0XOvOLXJYRl7XrS+EP257cYG*5N~B}Y+1mS!n(!4-5YPqu=- zYss#HYz6)IJXst4{V3`KOOw5{(S*88jTGeeNkSb!Mt&dE#d)%owA7L*kgcRni)yCL z>MFWBPqUpK%4jN^)pmNmK3BqO`b(h>&|G*~P48G#6kgVlSJq}`&RR>8ggQW_@UoVA zE@LldTd$*jp-jzn;45?s4mZb#yPPZ?4U6&0#!0c-<^2B_pRaS|e4=bZ6;FoZVhzuM z!W>ioSLe_sx7fMXo23Q*4*Dw1RoQ1g9+py8+L-^KwBdtJ6`Jo!R3_hS`RlPB&gd)^ z={o|yFFwx&@=6y^b%CaShT|lDiunL-G+FQ&fG(;9EXE3(VWYq{f$Icr78n*71yryW zo8l^^hXJS3ZsFW6utZ?Fz?bMr{VsZme&jlgwK+e*t8iTYZK@;H^8z(0)Ag6BK{OjM zf=>YF=X(S3Y-$1jpQuf#v;7+Ir|t>LG1~1ZS5}GsX62Y?K5%~4hm}gBMu{qag{-nl zX4^3uhUPI!*_!|>Y;DR*G|#;naJQ#Z8B{)@Ey{l7I`ulh|7q`6Zl^cxOTqt@zDIe5 znrsJv|Jr^ZZ1>q8Qp)M)>Jg=mF7bRzxm{UeQz$Jlq@_mt1mA~#)qB!|#b$R5fp&ocFptXK}=?UK#v1JM5`dW?QykE=(;_Ndq% z72Bg?dsOEBQL#EoJoBr_i#5b%w1^lM^5#YC-KL!6L_ayB(8g|UnPT~1dqxqDloDG^&d0l&7{f@$; zZAa8OnR^W7-=M`5UsX`+)4|i_OYB_g`!82>%^f<84-+ zcP>@llQHl!Y1Q|nB{wU(J-^aEk~aKITKIF3ekM{~;okQsyozg6YTZG-M9M8ucy(8z z@Ji34@CvX*QIPjM3atTW$`=gKVD@_6%m9@aN2!zkCI@QSfY z{MU)+I(U9duM^Kz;<--Yj9Mk0-;tH-JH*ePDzUvCqwX`kL2Mh86kc2Q(uK6c=D@Z&}_gJG!L9Mx&!zsx(IMB)q%5)4g>F` z#ekb=DL9+yzX0Dt&4Alz1vp{)Q{X++4!D!ngA>Ir*FiD53b3EHfU}!k2cD)d@IiV9 za6i2dcsqRrcrPi2AA3-r%}?I}ETVU*7^@vOYEexAI$*CRtiu2+=uZGE={dlK^nU;^ zrBi^-q&uqdyz>Ee2>%+uh1k6vbTm^p{4`_VRb~qd9;Ot{baV^eE&OiUMT;E!g|lCz z2LwML(gTogbsQ1S;}&EOPhd}W5YSKMj^o0A#eyvTK=2R5+lSD+!||bLlEU#Q7GzCL zVX3CDA5Gy}2Lum_&I}8(W`$^0h_pg9mx;7l_|3v^7XCKjcMHE;_$h%0gmXafBck(! zaGns(6Ur{S$8lWvZwu$7;G}ZQn!pNy3ssJGnaa^N3ul|)-GYw@en9a1Me~Soo)FG) z!T(zDlY)OJ_@|;t8vE2VE-@&0h2YBsZx*~m@= z3+EN#ye*uQ!udcrc*BAtF}ReV;4=ho#9SjVW~D0qj!Bf<$fX2R!)z>@-lPT>eVE|6TzIU;ZdvRO4frFhgq^+EM1^<~wj)oV>! zht{usO*^VB&^z_->3^^DISzgjfbYz8WD5iDLpX4vf+Y~$;OfSj=~_=O;A3`%f9Bo= zxJhUJCRab;l>&e2yb<^t;PbCPH1Vjxr$bJOoPa8_fE|1{pep_qygA?mJ^?&FS8@Zt z7!nmHh!X&jbHQH>sN(D=fU}Yt=m6b8N9Y;)Tl$b@VQtZ?>{ISkexZD#XzC2LOYK$f zR*$MPwJvQ$dq#Ur`v>i3+Nav*noalW6ZOmVgnqC79sO1Pl&+8P8Z7@)gDUg+Wai_r z{SNE8vAmd^osHHr&(lWp9_0o^t?({5EuOYqDz`M>w(b%7wRB`J=vw+A#;*%&4wuqKiYbop zqTj18(IM?$s9G;lp4J^Q0?IKn$}w)r5m7nD3D)blrr`?Ws=zfH*Bo4PafNVQh-)6M zN?h`3*wEh-PDeTu?f9i!Z0Yu{t{Q4+PV^6s=9pT`S~-o34smhVkR;yplC55!{O?Xd{Zw&n4GzDUxdmhbIPMpCJ0A`VewciKeO zN5Va8;<3TzL@XA`FjqxWX(&ZtQA^Dovl^DxcXi>HYT;O_meRG^IXc6W8PL{t5-@L+Q+oJ!Sn)od%kt}V=7P?){2FuSI!wy^Jl>;;9j7ZzsM zbS)_CJIl@@3!x}|v_RUEYrD9sYeCn-LXE~;7B9?+bM42>-blJ@LuYF}t5E|++dwR` zl)GSU8%0xVR?_lhGLh_Bv%a0$R=0K1o^Wg+($z()!hPF&!qhyFN+AJ?Q>bGwm5%gP=LSKl`ie+Al8km!7%$EBL;xCldMxkjBfAHp$w&`1NNMdDRpH*q z(p_C$P2uic_@b*d8i_#)cdNsF1q5rM-Vwc_fTU}6p#QqXe-!jk?XwBm6M9UxcuiJBr{`2j`h#W0fW5*|EiC(VApWBqVv$}G**?(Q8%Z`L6W2>Ex#`dXecK~F zJ&~SliDcC$DMJ@3d7`Y+1|F(e3Wcz5Zn_*VlRuYJK7hH(WnPMMqu`l zpD7_fr>@z49iFkWMzHe4^1a=We(u5Ma4bg6E0Kcx`V#T#9#EZ_=kYFXZxa>FN-vxu zsb3)1xDDCcDo`>5H6;?UNH}ig{ah-ec8u0YGLMnXws}1CEhnpV9&1B9oE*%fo1$YF z)+1znWQVnmAY`g=EZQUal&hGnYp$MFI6RUmGXR8WYYL|#NVtS{=UW>uNf_zDWwt>_ zI?->n5#q|Wr^RDd1eX=os%U&SvXP`Hvk73jp&#jpHbzs?bhZ^lW7JbfM$u>v9H#mnW88RlM$;UqF|s} zc@&SdG096*cnYVo3s0VBDQb^)Cljf}jx-AG!GsRS22;@#E#EzW8e*Qr)8S|w$mj)$ zJW@H^WkctVtIoArmY+ARq~Wq1n4)ZMF_UmgRC-Oa1^H+o2KDuk6yGxwMT%%1NG2okw25OakR~h&SY;0$dMJU1aCVq7 z-k#VKS&bZ;>84J`xsf?%$%-YL!Ay!}O^KdCO7wS0OCpmp-WJD-408=s{uYDUQk*l^ zB$xN~LxdHDiR5~95W5$JZ~{dauBHS|JA*hI4N@OPaBT-n3Wv`fv2ejZd||64@LI@9 z(1SRSP2*n@32{3O0E@ugkHTNS`If`W+DE?MHPXFt9^P3FlA;F{#bE>Rl``rT^fG~M zx?RO*I_Y+0I<2%%EA_7cHC-w7uT!Su-!%V*Qr~9CrcqD$6{P;I`ij|xIXEU(# zZ$PAGZB)bS5C#9p^Q>Nn#`79MwY+>)bl-B$lrofJp8t<)D$9O^Wi4KLo0 zyaEj`$hCyv1k_>Ay^C z+NH<*8#r)j`;pgix0o(4(dw_GN>bR)GYd0Wnq5&*Y5ZbYQN7ZHcqc$p)gqkDp|Og< zFY->Z8~#Cmjei*bM)sHb2jE+}5-keBRxkGneu1Jw%1U18`T=yXe|VaI(CNzP`|TR^ zM{db;;lzORkG!k+2Qhr)jtT|H!9#T97XL5;#56&VK3{Bi_(yK%#)5zcj2mGwqZ~uu zWx5=>OW~eGe@?I?v`jexR0cjdz@KB5SOI}sWJhRbbwFY2`G<`lfPWa>u}pf6`_IHM zWmPZuEm^*afwd~r!RC~}!K3PB)wLP^rVNrd6nOGLXPbzM&}NzWGMzM+;&pLsJsCR_ z;b2UC&G2uSVlVZo{xfGjr+|Qhc9>@Kn(cc`@$YuP7V~pA<|k(BZgaNoR{ba#QCJf- zJ41Jaw^It2IAWPNOoZbwrBm%?kFO#c!|z`jYQ`^FM@CT0Qe7p==>Kw zjFXZ6NW9yjcGX||(4y6wt_fY`V9`Gxe&``@ zQSamHcW#`&di$<7d$z3cJlXwW2m8WRm}g}HOk(} zhd;j4+li;fF68|C(83xT(#r8Mi+ zW09y_Jh*cdI=G8p9qCky8e_4<_3c=0Mf>@LLv^;radr^J{+`uVm7HA-<-jqZ>3IZY zoXs=GLBT&g`8`tF*K$;waJ`6-UTkNH`Qh*bxaQ(2#*5#@t4)3e7H1IazP_WS`8&cTjZ@CiZXQ?eMk<>11Znk6_b4z0Tb>QNtVoN-d zMknM%)%`u&sbfXsf{PcC<$Bj|E!Q0WU;X01H6@eU{-t8*m$oi`H{JRSG9JuOqwkqN zFJ^MPFbY~?v39K2sV~)yArX=7sYt(=4JTu(IojKQQvZ)zfWOTn{(b()=z?Up<2#}= z`K-4B*QODo<1*!#!#KZSw~;#VP0L2SYq%a*8{W5G4Z01m)%>e_^aK54e1XFwmoNU9 zcYd3UKm3Txb1S?SKm}gI*e~F1M7(PefzLSYz!QW&v&5@jU-e8I0AK^PG6}GEj*DF?Bi+=3SIMQCc;gW_<5Lb(ovBu&@tuiw8;}Uu2 zSEwy=Wtr``7CvwogI!-Yyyv1UWQ*Um;G13r@8{&(jBSxzd+_&;+;)vtZKFe{x2zvgg*cP literal 0 HcmV?d00001 diff --git a/Library/Library.csproj b/Library/Library.csproj new file mode 100644 index 0000000..132c02c --- /dev/null +++ b/Library/Library.csproj @@ -0,0 +1,9 @@ + + + + net6.0 + enable + enable + + + -- Gitee