diff --git a/TSHotelManagerSystem.sln b/EOM.Client.TopSkyHotelManagerSystem.sln
similarity index 81%
rename from TSHotelManagerSystem.sln
rename to EOM.Client.TopSkyHotelManagerSystem.sln
index 127d7f7d7f89110c8deb6b591c5538d59711c344..b84723af9dfc3e9fac7f3aa3667587134b6b8381 100644
--- a/TSHotelManagerSystem.sln
+++ b/EOM.Client.TopSkyHotelManagerSystem.sln
@@ -1,14 +1,12 @@
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.31205.134
+# Visual Studio Version 17
+VisualStudioVersion = 17.4.33213.308
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SYS.FormUI", "SYS.FormUI\SYS.FormUI.csproj", "{8854DCB7-F2D7-4276-8D10-C7A124436145}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SYS.Core", "SYS.Core\SYS.Core.csproj", "{CD039D0F-BD50-4FBF-B9CD-CDFAB25C7DFA}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SYS.Application", "SYS.Application\SYS.Application.csproj", "{600F4CC8-4323-4237-A55C-BFEF4B67D57C}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SYS.Library", "SYS.Library\SYS.Library.csproj", "{BCEA3E3C-E6D2-4210-95DD-42B461D5F22A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SYS.Common", "SYS.Common\SYS.Common.csproj", "{65501AF6-C629-448A-847E-1BCD60665865}"
@@ -27,10 +25,6 @@ Global
{CD039D0F-BD50-4FBF-B9CD-CDFAB25C7DFA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CD039D0F-BD50-4FBF-B9CD-CDFAB25C7DFA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CD039D0F-BD50-4FBF-B9CD-CDFAB25C7DFA}.Release|Any CPU.Build.0 = Release|Any CPU
- {600F4CC8-4323-4237-A55C-BFEF4B67D57C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {600F4CC8-4323-4237-A55C-BFEF4B67D57C}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {600F4CC8-4323-4237-A55C-BFEF4B67D57C}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {600F4CC8-4323-4237-A55C-BFEF4B67D57C}.Release|Any CPU.Build.0 = Release|Any CPU
{BCEA3E3C-E6D2-4210-95DD-42B461D5F22A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BCEA3E3C-E6D2-4210-95DD-42B461D5F22A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BCEA3E3C-E6D2-4210-95DD-42B461D5F22A}.Release|Any CPU.ActiveCfg = Release|Any CPU
diff --git a/README.md b/README.md
index 854a92ada65c8e58d617802894d65593638dc861..56ffe48041ece2b41c3348a75c0b8c1cd5cc6162 100644
--- a/README.md
+++ b/README.md
@@ -55,63 +55,15 @@
# :open_file_folder: 系统结构:
```tree
-TopSkyHotelManagerSystem
-├─ JVNUI
-│ └─ js
-│ └─ parseUtil.js
+EOM.Client.TopSkyHotelManagerSystem
+├─ .git
+├─ .gitignore
+├─ EOM.Client.TopSkyHotelManagerSystem.sln
+├─ FodyWeavers.xml
├─ LICENSE
├─ README.md
-├─ SYS.Application
-│ ├─ .gitignore
-│ ├─ Business
-│ ├─ Customer
-│ ├─ Properties
-│ ├─ Room
-│ ├─ SYS.Application.csproj
-│ ├─ SYS.Application.csproj.user
-│ ├─ SYS.Application.csproj.vspscc
-│ ├─ Worker
-│ ├─ Zero
-│ ├─ app.config
-│ ├─ bin
-│ ├─ bitbug_favicon (1).ico
-│ ├─ obj
-│ ├─ packages.config
-│ └─ 基础核心类库jvncorelib(适用全平台).md
├─ SYS.Common
-│ ├─ .gitignore
-│ ├─ App.config
-│ ├─ BaseDbContext.cs
-│ ├─ DbContext.cs
-│ ├─ DbContextOption.cs
-│ ├─ HttpHelper.cs
-│ ├─ Properties
-│ ├─ RecordHelper
-│ ├─ Repository
-│ ├─ SYS.Common.csproj
-│ ├─ SYS.Common.csproj.vspscc
-│ ├─ bin
-│ ├─ bitbug_favicon (1).ico
-│ ├─ obj
-│ └─ packages.config
├─ SYS.Core
-│ ├─ .gitignore
-│ ├─ App.config
-│ ├─ Business
-│ ├─ Customer
-│ ├─ Properties
-│ ├─ Resources
-│ ├─ Room
-│ ├─ SYS.Core.csproj
-│ ├─ SYS.Core.csproj.user
-│ ├─ SYS.Core.csproj.vspscc
-│ ├─ Util
-│ ├─ Worker
-│ ├─ Zero
-│ ├─ bin
-│ ├─ bitbug_favicon (1).ico
-│ ├─ obj
-│ └─ packages.config
├─ SYS.FormUI
│ ├─ .gitignore
│ ├─ App.config
@@ -121,48 +73,12 @@ TopSkyHotelManagerSystem
│ ├─ AppUserControls
│ ├─ FodyWeavers.xml
│ ├─ FodyWeavers.xsd
-│ ├─ Font
│ ├─ Logo
│ ├─ Program.cs
│ ├─ Properties
│ ├─ Resources
-│ ├─ SYS.FormUI.csproj
-│ ├─ SYS.FormUI.csproj.user
-│ ├─ SYS.FormUI.csproj.vspscc
-│ ├─ bi
-│ ├─ bitbug_favicon (1).ico
-│ ├─ bitbug_favicon.ico
-│ ├─ icon
-│ ├─ logo.ico
-│ ├─ obj
-│ ├─ packages.config
-│ └─ 基础核心类库jvncorelib(适用全平台).md
├─ SYS.Library
-│ ├─ .gitignore
-│ ├─ MySql.Data.EntityFramework.dll
-│ ├─ MySql.Data.dll
-│ ├─ MySql.Web.dll
-│ ├─ Newtonsoft.Json.dll
-│ ├─ Newtonsoft.Json.xml
-│ ├─ Properties
-│ ├─ RequestHelper.dll
-│ ├─ SYS.Application.dll
-│ ├─ SYS.Application.xml
-│ ├─ SYS.Common.dll
-│ ├─ SYS.Core.dll
-│ ├─ SYS.Core.xml
-│ ├─ SYS.Library.csproj
-│ ├─ SYS.Library.csproj.user
-│ ├─ SYS.Library.csproj.vspscc
-│ ├─ app.config
-│ ├─ bin
-│ ├─ bitbug_favicon (1).ico
-│ ├─ kse.dll
-│ └─ obj
-├─ TSHotelManagerSystem.sln
-├─ packages
├─ 数据库脚本
-├─ 版本迭代功能
├─ 项目效果图
└─ 项目相关文档
```
@@ -193,30 +109,20 @@ TopSkyHotelManagerSystem
# :family: 项目作者:
-**杨俊杰(即本账号,项目组长,核心代码编写和后期项目整合)**
-
-**熊越明(开发,项目代码编写)**
+**原创团队:杨俊杰、熊越明、宾华安、张家杰**
-**宾华安(数据库,提供数据库管理支持)**
-
-**张黔广(开发,APP前后端开发)**
-
-**张家杰(开发,代码编写开发)**
-
-**咖啡与网络(Java&Net)(后期维护团队)**
+**后期维护团队:易开元(Easy Open Meta)**
# :computer: 项目运行部署:
-**下载并安装Microsoft Visual Studio Professional 2017及以上版本,并通过下载Zip包解压,打开.sln后缀格式文件运行。**
+**下载并安装Microsoft Visual Studio Professional 2019及以上版本,并通过下载Zip包解压,打开.sln后缀格式文件运行。**
# :inbox_tray: 数据库运行部署(本地):
-**作者及开发团队强烈建议使用MySQL/PostgreSQL数据库,安装MySQL/PostgreSQL数据库并开启服务,通过可视化管理工具对数据库进行建立,可通过打开执行数据库脚本文件夹内的.sql后缀格式文件进行快速建立数据表和导入数据,执行步骤(以MySQL数据库为例):**
-
-**1、通过可视化管理工具链接MySQL数据库或PostgreSQL数据库,随后新建名为‘tshoteldb’数据库。**
+**作者及开发团队强烈建议使用PostgreSQL数据库,安装PostgreSQL数据库并开启服务,通过可视化管理工具对数据库进行建立,可通过打开执行数据库脚本文件夹内的.sql后缀格式文件进行快速建立数据表和导入数据,执行步骤(以PostgreSQL数据库为例):**
-**2、通过可视化管理工具打开Table.sql文件进行数据表建立。**
+**1、通过可视化管理工具链接PostgreSQL数据库,随后新建名为‘tshoteldb’数据库。**
-**3、随后打开Data.sql文件进行数据导入。**
+**2、通过可视化管理工具打开:数据库脚本\PostgreSQL版本文件\db_file.sql进行数据表建立和数据导入。**
[](https://gitee.com/java-and-net/TopskyHotelManagerSystem)
\ No newline at end of file
diff --git a/SYS.Application/.gitignore b/SYS.Application/.gitignore
deleted file mode 100644
index 6d5679c87e25eb547ff425a90a1da36fffca93ea..0000000000000000000000000000000000000000
--- a/SYS.Application/.gitignore
+++ /dev/null
@@ -1,365 +0,0 @@
-.vs
-## Ignore Visual Studio temporary files, build results, and
-## files generated by popular Visual Studio add-ons.
-##
-## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
-
-# User-specific files
-*.rsuser
-*.suo
-*.user
-*.userosscache
-*.sln.docstates
-*.cache
-
-# User-specific files (MonoDevelop/Xamarin Studio)
-*.userprefs
-
-# Mono auto generated files
-mono_crash.*
-
-# Build results
-[Dd]ebug/
-[Dd]ebugPublic/
-[Rr]elease/
-[Rr]eleases/
-packages/
-x64/
-x86/
-[Ww][Ii][Nn]32/
-[Aa][Rr][Mm]/
-[Aa][Rr][Mm]64/
-bld/
-[Bb]in/
-[Oo]bj/
-[Ll]og/
-[Ll]ogs/
-
-# Visual Studio 2015/2017 cache/options directory
-.vs/
-# Uncomment if you have tasks that create the project's static files in wwwroot
-#wwwroot/
-
-# Visual Studio 2017 auto generated files
-Generated\ Files/
-
-# MSTest test Results
-[Tt]est[Rr]esult*/
-[Bb]uild[Ll]og.*
-
-# NUnit
-*.VisualState.xml
-TestResult.xml
-nunit-*.xml
-
-# Build Results of an ATL Project
-[Dd]ebugPS/
-[Rr]eleasePS/
-dlldata.c
-
-# Benchmark Results
-BenchmarkDotNet.Artifacts/
-
-# .NET Core
-project.lock.json
-project.fragment.lock.json
-artifacts/
-
-# ASP.NET Scaffolding
-ScaffoldingReadMe.txt
-
-# StyleCop
-StyleCopReport.xml
-
-# Files built by Visual Studio
-*_i.c
-*_p.c
-*_h.h
-*.ilk
-*.meta
-*.obj
-*.iobj
-*.pch
-*.pdb
-*.ipdb
-*.pgc
-*.pgd
-*.rsp
-*.sbr
-*.tlb
-*.tli
-*.tlh
-*.tmp
-*.tmp_proj
-*_wpftmp.csproj
-*.log
-*.vspscc
-*.vssscc
-.builds
-*.pidb
-*.svclog
-*.scc
-
-# Chutzpah Test files
-_Chutzpah*
-
-# Visual C++ cache files
-ipch/
-*.aps
-*.ncb
-*.opendb
-*.opensdf
-*.sdf
-*.cachefile
-*.VC.db
-*.VC.VC.opendb
-
-# Visual Studio profiler
-*.psess
-*.vsp
-*.vspx
-*.sap
-
-# Visual Studio Trace Files
-*.e2e
-
-# TFS 2012 Local Workspace
-$tf/
-
-# Guidance Automation Toolkit
-*.gpState
-
-# ReSharper is a .NET coding add-in
-_ReSharper*/
-*.[Rr]e[Ss]harper
-*.DotSettings.user
-
-# TeamCity is a build add-in
-_TeamCity*
-
-# DotCover is a Code Coverage Tool
-*.dotCover
-
-# AxoCover is a Code Coverage Tool
-.axoCover/*
-!.axoCover/settings.json
-
-# Coverlet is a free, cross platform Code Coverage Tool
-coverage*.json
-coverage*.xml
-coverage*.info
-
-# Visual Studio code coverage results
-*.coverage
-*.coveragexml
-
-# NCrunch
-_NCrunch_*
-.*crunch*.local.xml
-nCrunchTemp_*
-
-# MightyMoose
-*.mm.*
-AutoTest.Net/
-
-# Web workbench (sass)
-.sass-cache/
-
-# Installshield output folder
-[Ee]xpress/
-
-# DocProject is a documentation generator add-in
-DocProject/buildhelp/
-DocProject/Help/*.HxT
-DocProject/Help/*.HxC
-DocProject/Help/*.hhc
-DocProject/Help/*.hhk
-DocProject/Help/*.hhp
-DocProject/Help/Html2
-DocProject/Help/html
-
-# Click-Once directory
-publish/
-
-# Publish Web Output
-*.[Pp]ublish.xml
-*.azurePubxml
-# Note: Comment the next line if you want to checkin your web deploy settings,
-# but database connection strings (with potential passwords) will be unencrypted
-*.pubxml
-*.publishproj
-
-# Microsoft Azure Web App publish settings. Comment the next line if you want to
-# checkin your Azure Web App publish settings, but sensitive information contained
-# in these scripts will be unencrypted
-PublishScripts/
-
-# NuGet Packages
-*.nupkg
-# NuGet Symbol Packages
-*.snupkg
-# The packages folder can be ignored because of Package Restore
-**/[Pp]ackages/*
-# except build/, which is used as an MSBuild target.
-!**/[Pp]ackages/build/
-# Uncomment if necessary however generally it will be regenerated when needed
-#!**/[Pp]ackages/repositories.config
-# NuGet v3's project.json files produces more ignorable files
-*.nuget.props
-*.nuget.targets
-
-# Microsoft Azure Build Output
-csx/
-*.build.csdef
-
-# Microsoft Azure Emulator
-ecf/
-rcf/
-
-# Windows Store app package directories and files
-AppPackages/
-BundleArtifacts/
-Package.StoreAssociation.xml
-_pkginfo.txt
-*.appx
-*.appxbundle
-*.appxupload
-
-# Visual Studio cache files
-# files ending in .cache can be ignored
-*.[Cc]ache
-# but keep track of directories ending in .cache
-!?*.[Cc]ache/
-
-# Others
-ClientBin/
-~$*
-*~
-*.dbmdl
-*.dbproj.schemaview
-*.jfm
-*.pfx
-*.publishsettings
-orleans.codegen.cs
-
-# Including strong name files can present a security risk
-# (https://github.com/github/gitignore/pull/2483#issue-259490424)
-#*.snk
-
-# Since there are multiple workflows, uncomment next line to ignore bower_components
-# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
-#bower_components/
-
-# RIA/Silverlight projects
-Generated_Code/
-
-# Backup & report files from converting an old project file
-# to a newer Visual Studio version. Backup files are not needed,
-# because we have git ;-)
-_UpgradeReport_Files/
-Backup*/
-UpgradeLog*.XML
-UpgradeLog*.htm
-ServiceFabricBackup/
-*.rptproj.bak
-
-# SQL Server files
-*.mdf
-*.ldf
-*.ndf
-
-# Business Intelligence projects
-*.rdl.data
-*.bim.layout
-*.bim_*.settings
-*.rptproj.rsuser
-*- [Bb]ackup.rdl
-*- [Bb]ackup ([0-9]).rdl
-*- [Bb]ackup ([0-9][0-9]).rdl
-
-# Microsoft Fakes
-FakesAssemblies/
-
-# GhostDoc plugin setting file
-*.GhostDoc.xml
-
-# Node.js Tools for Visual Studio
-.ntvs_analysis.dat
-node_modules/
-
-# Visual Studio 6 build log
-*.plg
-
-# Visual Studio 6 workspace options file
-*.opt
-
-# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
-*.vbw
-
-# Visual Studio LightSwitch build output
-**/*.HTMLClient/GeneratedArtifacts
-**/*.DesktopClient/GeneratedArtifacts
-**/*.DesktopClient/ModelManifest.xml
-**/*.Server/GeneratedArtifacts
-**/*.Server/ModelManifest.xml
-_Pvt_Extensions
-
-# Paket dependency manager
-.paket/paket.exe
-paket-files/
-
-# FAKE - F# Make
-.fake/
-
-# CodeRush personal settings
-.cr/personal
-
-# Python Tools for Visual Studio (PTVS)
-__pycache__/
-*.pyc
-
-# Cake - Uncomment if you are using it
-# tools/**
-# !tools/packages.config
-
-# Tabs Studio
-*.tss
-
-# Telerik's JustMock configuration file
-*.jmconfig
-
-# BizTalk build output
-*.btp.cs
-*.btm.cs
-*.odx.cs
-*.xsd.cs
-
-# OpenCover UI analysis results
-OpenCover/
-
-# Azure Stream Analytics local run output
-ASALocalRun/
-
-# MSBuild Binary and Structured Log
-*.binlog
-
-# NVidia Nsight GPU debugger configuration file
-*.nvuser
-
-# MFractors (Xamarin productivity tool) working folder
-.mfractor/
-
-# Local History for Visual Studio
-.localhistory/
-
-# BeatPulse healthcheck temp database
-healthchecksdb
-
-# Backup folder for Package Reference Convert tool in Visual Studio 2017
-MigrationBackup/
-
-# Ionide (cross platform F# VS Code tools) working folder
-.ionide/
-
-# Fody - auto-generated XML schema
-FodyWeavers.xsd
\ No newline at end of file
diff --git a/SYS.Application/Business/Cash/CashService.cs b/SYS.Application/Business/Cash/CashService.cs
deleted file mode 100644
index 4c689ea700b886b317132ba54116e4b465293037..0000000000000000000000000000000000000000
--- a/SYS.Application/Business/Cash/CashService.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 System;
-using System.Collections.Generic;
-using System.Linq;
-using MySql.Data.MySqlClient;
-using SYS.Common;
-using SYS.Core;
-
-namespace SYS.Application
-{
- ///
- /// 资产信息接口实现类
- ///
- public class CashService:Repository, ICashService
- {
- ///
- /// 添加资产信息
- ///
- ///
- ///
- public bool AddCashInfo(Cash cash)
- {
- return base.Insert(cash);
- }
-
- ///
- /// 查询资产信息
- ///
- ///
- public List SelectCashInfoAll()
- {
- //查询所有部门信息
- List depts = new List();
- depts = base.Change().GetList(a => a.delete_mk != 1);
- //查询所有员工信息
- List workers = new List();
- workers = base.Change().GetList(a => a.delete_mk != 1);
- List cs = new List();
- cs = base.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;
- 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();
-
- });
- return cs;
- }
- }
-}
diff --git a/SYS.Application/Business/Cash/ICashService.cs b/SYS.Application/Business/Cash/ICashService.cs
deleted file mode 100644
index 8720e5e73b34a06eb2c5d6b9f192a54e4d6e3a87..0000000000000000000000000000000000000000
--- a/SYS.Application/Business/Cash/ICashService.cs
+++ /dev/null
@@ -1,47 +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.Core;
-using System.Collections.Generic;
-
-namespace SYS.Application
-{
- ///
- /// 资产信息接口
- ///
- public interface ICashService
- {
- ///
- /// 添加资产信息
- ///
- ///
- ///
- bool AddCashInfo(Cash cash);
-
- ///
- /// 查询资产信息
- ///
- ///
- List SelectCashInfoAll();
- }
-}
\ No newline at end of file
diff --git a/SYS.Application/Business/Customer/CustoService.cs b/SYS.Application/Business/Customer/CustoService.cs
deleted file mode 100644
index dca18a426e8b2425b12df138a453ba028cc845f9..0000000000000000000000000000000000000000
--- a/SYS.Application/Business/Customer/CustoService.cs
+++ /dev/null
@@ -1,254 +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 System.Linq.Expressions;
-using jvncorelib_fr.EncryptorLib;
-using jvncorelib_fr.EntityLib;
-using MySql.Data.MySqlClient;
-using Npgsql;
-using SYS.Common;
-using SYS.Core;
-
-namespace SYS.Application
-{
- ///
- /// 客户信息接口实现类
- ///
- public class CustoService:Repository, ICustoService
- {
- EncryptLib encryptLib = new EncryptLib();
-
- #region 添加客户信息
- ///
- /// 添加客户信息
- ///
- ///
- ///
- public bool InsertCustomerInfo(Custo custo)
- {
- string NewID = encryptLib.Encryption(custo.CustoID);
- string NewTel = encryptLib.Encryption(custo.CustoTel);
- custo.CustoID = NewID;
- custo.CustoTel = NewTel;
- return base.Insert(custo);
- }
- #endregion
-
- ///
- /// 更新客户信息
- ///
- ///
- ///
- public bool UpdCustomerInfoByCustoNo(Custo custo)
- {
- string NewID = encryptLib.Encryption(custo.CustoID);
- string NewTel = encryptLib.Encryption(custo.CustoTel);
- custo.CustoID = NewID;
- custo.CustoTel = NewTel;
- return base.Update(a => new Custo()
- {
- 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);
- }
-
- ///
- /// 更新客户类型(即会员等级)
- ///
- ///
- ///
- ///
- public bool UpdCustomerTypeByCustoNo(string custoNo,int userType)
- {
- return base.Update(a => new Custo()
- {
- CustoType = userType
- }, a => a.CustoNo.Equals(custoNo));
- }
-
- ///
- /// 查询酒店盈利情况
- ///
- ///
- public List SelectAllMoney()
- {
- List custoSpends = new List();
- var listSource = base.Change().GetList(a => a.MoneyState.Equals(SpendConsts.Settled)).OrderBy(a => a.SpendTime).ToList();
- 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();
- return custoSpends;
- }
-
- ///
- /// 查询所有客户信息
- ///
- ///
- public List SelectCustoAll(ref int count,int? pageIndex,int? pageSize)
- {
-
- //查询出所有性别类型
- List sexTypes = new List();
- sexTypes = base.Change().GetList();
- //查询出所有证件类型
- List passPortTypes = new List();
- passPortTypes = base.Change().GetList();
- //查询出所有客户类型
- List custoTypes = new List();
- custoTypes = base.Change().GetList();
- //查询出所有客户信息
- List custos = new List();
-
- if (!pageIndex.IsNullOrEmpty() && !pageSize.IsNullOrEmpty())
- {
- custos = base.AsQueryable().ToPageList((int)pageIndex, (int)pageSize, ref count).OrderBy(a => a.CustoNo).ToList();
- }
- else
- {
- custos = base.AsQueryable().OrderBy(a => a.CustoNo).ToList();
- }
-
- 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;
- });
- return custos;
- }
-
- ///
- /// 查询指定客户信息
- ///
- ///
- public List SelectCustoByInfo(Custo custo)
- {
- //查询出所有性别类型
- List sexTypes = new List();
- sexTypes = base.Change().GetList();
- //查询出所有证件类型
- List passPortTypes = new List();
- passPortTypes = base.Change().GetList();
- //查询出所有客户类型
- List custoTypes = new List();
- custoTypes = base.Change().GetList();
- //查询出所有客户信息
- List custos = new List();
- if (!custo.CustoNo.IsNullOrEmpty())
- {
- custos = base.GetList(a => a.CustoNo.Contains(custo.CustoNo)).OrderBy(a => a.CustoNo).ToList();
- }
- if (!custo.CustoName.IsNullOrEmpty())
- {
- custos = base.GetList(a => a.CustoName.Contains(custo.CustoName)).OrderBy(a => a.CustoNo).ToList();
- }
- 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;
- });
- return custos;
- }
-
- ///
- /// 根据客户编号查询客户信息
- ///
- ///
- ///
- public Custo SelectCardInfoByCustoNo(string CustoNo)
- {
- Custo c = base.GetSingle(a => a.CustoNo.Contains(CustoNo));
- if (c.IsNullOrEmpty())
- {
- return null;
- }
- //性别类型
- var sexType = base.Change().GetSingle(a => a.sexId == c.CustoSex);
- c.SexName = string.IsNullOrEmpty(sexType.sexName) ? "" : sexType.sexName;
- //证件类型
- var passPortType = base.Change().GetSingle(a => a.PassportId == c.PassportType);
- c.PassportName = string.IsNullOrEmpty(passPortType.PassportName) ? "" : passPortType.PassportName;
- //客户类型
- var custoType = base.Change().GetSingle(a => a.UserType == c.CustoType);
- c.typeName = string.IsNullOrEmpty(custoType.TypeName) ? "" : custoType.TypeName;
- //解密身份证号码
- var sourceStr = c.CustoID.Contains("·") ? encryptLib.Decryption(c.CustoID) : c.CustoID;
- c.CustoID = sourceStr;
- //解密联系方式
- var sourceTelStr = c.CustoTel.Contains("·") ? encryptLib.Decryption(c.CustoTel) : c.CustoTel;
- c.CustoTel = sourceTelStr;
- return c;
- }
-
- }
-}
diff --git a/SYS.Application/Business/Customer/ICustoService.cs b/SYS.Application/Business/Customer/ICustoService.cs
deleted file mode 100644
index 6affffabab2da9ca8a8d2222875cb8011dfde182..0000000000000000000000000000000000000000
--- a/SYS.Application/Business/Customer/ICustoService.cs
+++ /dev/null
@@ -1,85 +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.Core;
-using System.Collections.Generic;
-
-namespace SYS.Application
-{
- ///
- /// 客户信息接口
- ///
- public interface ICustoService
- {
- #region 添加客户信息
- ///
- /// 添加客户信息
- ///
- ///
- ///
- bool InsertCustomerInfo(Custo custo);
- #endregion
-
- ///
- /// 更新客户信息
- ///
- ///
- ///
- bool UpdCustomerInfoByCustoNo(Custo custo);
-
- ///
- /// 更新客户类型(即会员等级)
- ///
- ///
- ///
- ///
- bool UpdCustomerTypeByCustoNo(string custoNo, int userType);
-
- ///
- /// 查询酒店盈利情况
- ///
- ///
- List SelectAllMoney();
-
- ///
- /// 查询所有客户信息
- ///
- ///
- List SelectCustoAll(ref int count, int? pageIndex, int? pageSize);
-
- ///
- /// 查询指定客户信息
- ///
- ///
- List SelectCustoByInfo(Custo custo);
-
- ///
- /// 根据客户编号查询客户信息
- ///
- ///
- ///
- Custo SelectCardInfoByCustoNo(string CustoNo);
-
-
- }
-}
\ No newline at end of file
diff --git a/SYS.Application/Business/Fonts/FontsService.cs b/SYS.Application/Business/Fonts/FontsService.cs
deleted file mode 100644
index 7a46f1986f3601485c537abad774ee10a5800c4e..0000000000000000000000000000000000000000
--- a/SYS.Application/Business/Fonts/FontsService.cs
+++ /dev/null
@@ -1,51 +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 MySql.Data.MySqlClient;
-using SYS.Common;
-using SYS.Core;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace SYS.Application
-{
- ///
- /// 酒店宣传联动内容接口实现类
- ///
- public class FontsService:Repository,IFontsService
- {
- ///
- /// 查询所有宣传联动内容(跑马灯)
- ///
- ///
- public List SelectFontAll()
- {
- List fonts = new List();
- fonts = base.GetList();
- return fonts;
- }
- }
-}
diff --git a/SYS.Application/Business/Fonts/IFontsService.cs b/SYS.Application/Business/Fonts/IFontsService.cs
deleted file mode 100644
index badc1955a78477e59936167aac38a990357e2631..0000000000000000000000000000000000000000
--- a/SYS.Application/Business/Fonts/IFontsService.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 SYS.Core;
-using System.Collections.Generic;
-
-namespace SYS.Application
-{
- ///
- /// 酒店宣传联动内容接口
- ///
- public interface IFontsService
- {
- ///
- /// 查询所有宣传联动内容(跑马灯)
- ///
- ///
- List SelectFontAll();
- }
-}
\ No newline at end of file
diff --git a/SYS.Application/Business/Reser/IReserService.cs b/SYS.Application/Business/Reser/IReserService.cs
deleted file mode 100644
index 6a246ed1c552a6148c766d32a2000315af6b219d..0000000000000000000000000000000000000000
--- a/SYS.Application/Business/Reser/IReserService.cs
+++ /dev/null
@@ -1,64 +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.Core;
-using System.Collections.Generic;
-
-namespace SYS.Application
-{
- ///
- /// 预约信息接口
- ///
- public interface IReserService
- {
-
- ///
- /// 获取所有预约信息
- ///
- ///
- List SelectReserAll();
-
- ///
- /// 根据房间编号获取预约信息
- ///
- ///
- ///
- Reser SelectReserInfoByRoomNo(string no);
-
- ///
- /// 删除预约信息
- ///
- ///
- ///
- bool DeleteReserInfo(string rid);
-
- ///
- /// 添加预约信息
- ///
- ///
- ///
- bool InserReserInfo(Reser r);
-
-
- }
-}
\ No newline at end of file
diff --git a/SYS.Application/Business/Reser/ReserService.cs b/SYS.Application/Business/Reser/ReserService.cs
deleted file mode 100644
index ec8598e31ad39e4a6902f05b79f2c0e5bf40924c..0000000000000000000000000000000000000000
--- a/SYS.Application/Business/Reser/ReserService.cs
+++ /dev/null
@@ -1,101 +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 jvncorelib_fr.EncryptorLib;
-using MySql.Data.MySqlClient;
-using SYS.Common;
-using SYS.Core;
-
-namespace SYS.Application
-{
- ///
- /// 预约信息接口实现类
- ///
- public class ReserService:Repository,IReserService
- {
- EncryptLib encryptLib = new EncryptLib();
- ///
- /// 获取所有预约信息
- ///
- ///
- public List SelectReserAll()
- {
- List rss = new List();
- rss = base.GetList(a => a.delete_mk == 0);
- rss.ForEach(source =>
- {
- //解密联系方式
- var sourceTelStr = source.CustoTel.Contains("·") ? encryptLib.Decryption(source.CustoTel) : source.CustoTel;
- source.CustoTel = sourceTelStr;
- });
- return rss;
- }
-
- ///
- /// 根据房间编号获取预约信息
- ///
- ///
- ///
- public Reser SelectReserInfoByRoomNo(string no)
- {
- Reser res = null;
- res = base.GetSingle(a => a.ReserRoom == no && a.delete_mk != 1);
- //解密联系方式
- var sourceTelStr = res.CustoTel.Contains("·") ? encryptLib.Decryption(res.CustoTel) : res.CustoTel;
- res.CustoTel = sourceTelStr;
- return res;
- }
-
- ///
- /// 删除预约信息
- ///
- ///
- ///
- public bool DeleteReserInfo(string rid)
- {
- return base.Update(a => new Reser()
- {
- delete_mk = 1,
- datachg_usr = LoginInfo.WorkerNo,
- datachg_date = DateTime.Now
- },a => a.ReserId == rid);
-
- }
-
- ///
- /// 添加预约信息
- ///
- ///
- ///
- public bool InserReserInfo(Reser r)
- {
- var cryStr = encryptLib.Encryption(r.CustoTel);
- r.CustoTel = cryStr;
- return base.Insert(r);
- }
-
-
- }
-}
diff --git a/SYS.Application/Business/Room/IRoomService.cs b/SYS.Application/Business/Room/IRoomService.cs
deleted file mode 100644
index 773a724011ca55d4b63ead2eaac39b5821bd39a1..0000000000000000000000000000000000000000
--- a/SYS.Application/Business/Room/IRoomService.cs
+++ /dev/null
@@ -1,206 +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.Core;
-using System.Collections.Generic;
-
-namespace SYS.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/SYS.Application/Business/Room/IRoomTypeService.cs b/SYS.Application/Business/Room/IRoomTypeService.cs
deleted file mode 100644
index a82497eb18c4086ffb04e5763718ffd9896f7fcf..0000000000000000000000000000000000000000
--- a/SYS.Application/Business/Room/IRoomTypeService.cs
+++ /dev/null
@@ -1,51 +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.Core;
-using System.Collections.Generic;
-
-namespace SYS.Application
-{
- ///
- /// 客房信息接口
- ///
- public interface IRoomTypeService
- {
- #region 获取所有房间类型
- ///
- /// 获取所有房间类型
- ///
- ///
- List SelectRoomTypesAll();
- #endregion
-
- #region 根据房间编号查询房间类型名称
- ///
- /// 根据房间编号查询房间类型名称
- ///
- ///
- ///
- RoomType SelectRoomTypeByRoomNo(string no);
- #endregion
- }
-}
\ No newline at end of file
diff --git a/SYS.Application/Business/Room/RoomService.cs b/SYS.Application/Business/Room/RoomService.cs
deleted file mode 100644
index 701051e796ec039e60bed1c010a39d3dfa87aced..0000000000000000000000000000000000000000
--- a/SYS.Application/Business/Room/RoomService.cs
+++ /dev/null
@@ -1,391 +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 jvncorelib_fr.EntityLib;
-using MySql.Data.MySqlClient;
-using SYS.Common;
-using SYS.Core;
-
-namespace SYS.Application
-{
- ///
- /// 客房信息接口实现类
- ///
- public class RoomService:Repository, IRoomService
- {
- #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 List SelectRoomAll()
- {
- 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).OrderBy(a => a.RoomNo).ToList();
- var listCustoNo = rooms.Select(a => a.CustoNo).Distinct().ToList();
- List custos = new List();
- custos = base.Change().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 = 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();
- var listCustoNo = rooms.Select(a => a.CustoNo).Distinct().ToList();
- List custos = new List();
- custos = base.Change().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 = 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/SYS.Application/Business/Room/RoomTypeService.cs b/SYS.Application/Business/Room/RoomTypeService.cs
deleted file mode 100644
index f51711ee5e078d9a878397ac15ba41fca6285fb5..0000000000000000000000000000000000000000
--- a/SYS.Application/Business/Room/RoomTypeService.cs
+++ /dev/null
@@ -1,65 +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.Collections.Generic;
-using MySql.Data.MySqlClient;
-using SYS.Common;
-using SYS.Core;
-
-namespace SYS.Application
-{
- ///
- /// 房间类型接口实现类
- ///
- public class RoomTypeService:Repository, IRoomTypeService
- {
- #region 获取所有房间类型
- ///
- /// 获取所有房间类型
- ///
- ///
- public List SelectRoomTypesAll()
- {
- List types = new List();
- types = base.GetList(a => a.delete_mk != 1);
- return types;
- }
- #endregion
-
- #region 根据房间编号查询房间类型名称
- ///
- /// 根据房间编号查询房间类型名称
- ///
- ///
- ///
- public RoomType SelectRoomTypeByRoomNo(string no)
- {
- RoomType roomtype = new RoomType();
- Room room = new Room();
- room = base.Change().GetSingle(a => a.RoomNo == no && a.delete_mk != 1);
- roomtype.RoomName = base.GetSingle(a => a.Roomtype == room.RoomStateId).RoomName;
- return roomtype;
- }
- #endregion
- }
-}
diff --git a/SYS.Application/Business/Sellthing/ISellService.cs b/SYS.Application/Business/Sellthing/ISellService.cs
deleted file mode 100644
index ee032dd23ffb965159b1c9be318c453da8f95b22..0000000000000000000000000000000000000000
--- a/SYS.Application/Business/Sellthing/ISellService.cs
+++ /dev/null
@@ -1,97 +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.Core;
-using System;
-using System.Collections.Generic;
-
-namespace SYS.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/SYS.Application/Business/Sellthing/SellService.cs b/SYS.Application/Business/Sellthing/SellService.cs
deleted file mode 100644
index d22cd24b646861322f3d77daa025ee337701f70d..0000000000000000000000000000000000000000
--- a/SYS.Application/Business/Sellthing/SellService.cs
+++ /dev/null
@@ -1,180 +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 jvncorelib_fr.EntityLib;
-using MySql.Data.MySqlClient;
-using SqlSugar;
-using SYS.Common;
-using SYS.Core;
-
-namespace SYS.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/SYS.Application/Business/Spend/ISpendService.cs b/SYS.Application/Business/Spend/ISpendService.cs
deleted file mode 100644
index 9368d7d063268a2ff159d9ef18fa75c3f5f0e043..0000000000000000000000000000000000000000
--- a/SYS.Application/Business/Spend/ISpendService.cs
+++ /dev/null
@@ -1,124 +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.Core;
-using System.Collections.Generic;
-
-namespace SYS.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/SYS.Application/Business/Spend/SpendService.cs b/SYS.Application/Business/Spend/SpendService.cs
deleted file mode 100644
index 5996ec0f26c9bfd936dd177a5f6d77a68aa416ce..0000000000000000000000000000000000000000
--- a/SYS.Application/Business/Spend/SpendService.cs
+++ /dev/null
@@ -1,249 +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 MySql.Data.MySqlClient;
-using SYS.Common;
-using SYS.Core;
-
-namespace SYS.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/SYS.Application/Business/Wti/IWtiService.cs b/SYS.Application/Business/Wti/IWtiService.cs
deleted file mode 100644
index 83b2729ffa7370e80b99514f5517d0f25194fd5e..0000000000000000000000000000000000000000
--- a/SYS.Application/Business/Wti/IWtiService.cs
+++ /dev/null
@@ -1,117 +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.Core;
-using System.Collections.Generic;
-
-namespace SYS.Application
-{
- ///
- /// 水电信息接口
- ///
- public interface IWtiService
- {
- #region 根据房间编号查询水电费信息
- ///
- /// 根据房间编号查询水电费信息
- ///
- ///
- ///
- Wti SelectWtiInfoByRoomNo(string roomNo);
- #endregion
-
- #region 根据房间编号、使用时间查询水电费信息
- ///
- /// 根据房间编号、使用时间查询水电费信息
- ///
- ///
- ///
- ///
- ///
- Wti SelectWtiInfoByRoomNoAndTime(string roomno, string usedate, string enddate);
- #endregion
-
- #region 获取所有水电费信息
- ///
- /// 获取所有水电费信息
- ///
- ///
- List SelectWtiInfoAll();
- #endregion
-
- #region 添加水电费信息
- ///
- /// 添加水电费信息
- ///
- ///
- ///
- bool InsertWtiInfo(Wti w);
- #endregion
-
- #region 修改水电费信息(根据房间编号)
- ///
- /// 修改水电费信息(根据房间编号)
- ///
- ///
- ///
- bool UpdateWtiInfo(Wti w);
- #endregion
-
- #region 根据房间信息、使用时间修改水电费
- ///
- /// 根据房间信息、使用时间修改水电费
- ///
- ///
- ///
- bool UpdateWtiInfoByRoomNoAndDateTime(Wti w);
- #endregion
-
- #region 删除水电费信息:根据房间编号
- ///
- /// 删除水电费信息:根据房间编号
- ///
- ///
- ///
- //bool DeleteWtiInfo(string roomno);
- #endregion
-
- #region 根据房间编号、使用时间删除水电费信息
- ///
- /// 根据房间编号、使用时间删除水电费信息
- ///
- ///
- ///
- ///
- ///
- bool DeleteWtiInfoByRoomNoAndDateTime(string roomno, string usedate, string enddate);
- #endregion
-
- #region 根据房间编号获取该房间所有水电费信息
- ///
- /// 获取所有水电费信息
- ///
- ///
- List ListWtiInfoByRoomNo(string roomno);
- #endregion
- }
-}
\ No newline at end of file
diff --git a/SYS.Application/Business/Wti/WtiService.cs b/SYS.Application/Business/Wti/WtiService.cs
deleted file mode 100644
index eec4cdf857fedce8e003564c9e62fac8f106563f..0000000000000000000000000000000000000000
--- a/SYS.Application/Business/Wti/WtiService.cs
+++ /dev/null
@@ -1,188 +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 MySql.Data.MySqlClient;
-using SYS.Common;
-using SYS.Core;
-
-namespace SYS.Application
-{
- ///
- /// 水电信息接口实现类
- ///
- public class WtiService:Repository, IWtiService
- {
- #region 根据房间编号查询水电费信息
- ///
- /// 根据房间编号查询水电费信息
- ///
- ///
- ///
- public Wti SelectWtiInfoByRoomNo(string roomNo)
- {
- Wti w = new Wti();
- w = base.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;
- string sql = "select * from WTINFO where RoomNo='" + roomno +
- "' and UseDate='" + usedate + "' and EndDate='" + enddate + "'";
- w = base.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 = base.GetList(a => a.delete_mk != 1);
- return wti;
- }
- #endregion
-
-
- #region 根据房间编号获取该房间所有水电费信息
- ///
- /// 获取所有水电费信息
- ///
- ///
- public List ListWtiInfoByRoomNo(string roomno)
- {
- List wti = new List();
- wti = base.GetList(a => a.delete_mk != 1 && a.RoomNo.Equals(roomno));
- return wti;
- }
- #endregion
-
- #region 添加水电费信息
- ///
- /// 添加水电费信息
- ///
- ///
- ///
- public bool InsertWtiInfo(Wti w)
- {
- return base.Insert(w);
- }
- #endregion
-
- #region 修改水电费信息(根据房间编号)
- ///
- /// 修改水电费信息(根据房间编号)
- ///
- ///
- ///
- public bool UpdateWtiInfo(Wti w)
- {
- return base.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 base.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 base.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/SYS.Application/Properties/AssemblyInfo.cs b/SYS.Application/Properties/AssemblyInfo.cs
deleted file mode 100644
index b8374f0c03528f8822b360befa79537efb3e959e..0000000000000000000000000000000000000000
--- a/SYS.Application/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// 有关程序集的一般信息由以下
-// 控制。更改这些特性值可修改
-// 与程序集关联的信息。
-[assembly: AssemblyTitle("SYS.Application")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("java-and-net")]
-[assembly: AssemblyProduct("SYS.Application")]
-[assembly: AssemblyCopyright("Copyright © 2020 java-and-net")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// 将 ComVisible 设置为 false 会使此程序集中的类型
-//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
-//请将此类型的 ComVisible 特性设置为 true。
-[assembly: ComVisible(false)]
-
-// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
-[assembly: Guid("600f4cc8-4323-4237-a55c-bfef4b67d57c")]
-
-// 程序集的版本信息由下列四个值组成:
-//
-// 主版本
-// 次版本
-// 生成号
-// 修订号
-//
-// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
-//通过使用 "*",如下所示:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.4.0.0")]
-[assembly: AssemblyFileVersion("1.4.0.0")]
diff --git a/SYS.Application/SYS.Application.csproj b/SYS.Application/SYS.Application.csproj
deleted file mode 100644
index e57f2f1ee431c6096959f78c46f3f6a7f8a8b9cc..0000000000000000000000000000000000000000
--- a/SYS.Application/SYS.Application.csproj
+++ /dev/null
@@ -1,158 +0,0 @@
-
-
-
-
- Debug
- AnyCPU
- {600F4CC8-4323-4237-A55C-BFEF4B67D57C}
- Library
- Properties
- SYS.Application
- SYS.Application
- v4.7.1
- 512
- true
- SAK
- SAK
- SAK
- SAK
-
-
-
- true
- full
- false
- bin\Debug\
- DEBUG;TRACE
- prompt
- 4
- x64
- bin\Debug\SYS.Application.xml
-
-
- pdbonly
- true
- bin\Release\
- TRACE
- prompt
- 4
-
-
- bitbug_favicon %281%29.ico
-
-
-
- ..\packages\jvncorelib.1.0.1.7\lib\net461\jvncorelib-fr.dll
-
-
- False
- ..\SYS.Library\MySql.Data.dll
-
-
- False
- ..\SYS.Library\MySql.Data.EntityFramework.dll
-
-
- False
- ..\SYS.Library\MySql.Web.dll
-
-
- ..\packages\Npgsql.4.0.10\lib\net451\Npgsql.dll
-
-
- ..\packages\SqlSugar.5.0.2\lib\SqlSugar.dll
-
-
-
- ..\packages\System.Buffers.4.4.0\lib\netstandard2.0\System.Buffers.dll
-
-
-
-
- ..\packages\System.Memory.4.5.3\lib\netstandard2.0\System.Memory.dll
-
-
-
- ..\packages\System.Numerics.Vectors.4.4.0\lib\net46\System.Numerics.Vectors.dll
-
-
- ..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll
-
-
- ..\packages\System.Threading.Tasks.Extensions.4.5.2\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll
-
-
- ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {65501af6-c629-448a-847e-1bcd60665865}
- SYS.Common
-
-
- {cd039d0f-bd50-4fbf-b9cd-cdfab25c7dfa}
- SYS.Core
- False
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/SYS.Application/Worker/IWorkerCheckService.cs b/SYS.Application/Worker/IWorkerCheckService.cs
deleted file mode 100644
index a67ac0db7d4dbf887471db9f77473211a69f4a0c..0000000000000000000000000000000000000000
--- a/SYS.Application/Worker/IWorkerCheckService.cs
+++ /dev/null
@@ -1,64 +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.Core;
-using System.Collections.Generic;
-
-namespace SYS.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/SYS.Application/Worker/IWorkerGoodBadService.cs b/SYS.Application/Worker/IWorkerGoodBadService.cs
deleted file mode 100644
index d709da1959a239e5c2a8f10605270af217cbba6c..0000000000000000000000000000000000000000
--- a/SYS.Application/Worker/IWorkerGoodBadService.cs
+++ /dev/null
@@ -1,48 +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.Core;
-using System.Collections.Generic;
-
-namespace SYS.Application
-{
- ///
- /// 员工奖惩信息接口
- ///
- public interface IWorkerGoodBadService
- {
- ///
- /// 添加员工奖惩记录
- ///
- ///
- ///
- bool AddGoodBad(WorkerGoodBad goodBad);
-
- ///
- /// 根据工号查找所有的奖惩记录信息
- ///
- ///
- ///
- List SelectAllGoodBadByWorkNo(string wn);
- }
-}
\ No newline at end of file
diff --git a/SYS.Application/Worker/IWorkerHistoryService.cs b/SYS.Application/Worker/IWorkerHistoryService.cs
deleted file mode 100644
index 55f84e6ca4736e586f2f71b30f01da37f8bb00f7..0000000000000000000000000000000000000000
--- a/SYS.Application/Worker/IWorkerHistoryService.cs
+++ /dev/null
@@ -1,48 +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.Core;
-using System.Collections.Generic;
-
-namespace SYS.Application
-{
- ///
- /// 员工履历信息接口
- ///
- public interface IWorkerHistoryService
- {
- ///
- /// 根据工号添加员工履历
- ///
- ///
- ///
- bool AddHistoryByWorkerId(WorkerHistory workerHistory);
-
- ///
- /// 根据工号查询履历信息
- ///
- ///
- ///
- List SelectHistoryByWorkerId(string wid);
- }
-}
\ No newline at end of file
diff --git a/SYS.Application/Worker/IWorkerPicService.cs b/SYS.Application/Worker/IWorkerPicService.cs
deleted file mode 100644
index 0738f6b0be3d3d79831920e1fd80331dce5404e3..0000000000000000000000000000000000000000
--- a/SYS.Application/Worker/IWorkerPicService.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-using SYS.Core;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace SYS.Application
-{
- ///
- /// 员工照片模块接口
- ///
- public interface IWorkerPicService
- {
- ///
- /// 查询员工照片
- ///
- ///
- ///
- WorkerPic WorkerPic(WorkerPic workerPic);
- ///
- /// 添加员工照片
- ///
- ///
- ///
- bool InsertWorkerPic(WorkerPic workerPic);
- ///
- /// 删除员工照片
- ///
- ///
- ///
- bool DeleteWorkerPic(WorkerPic workerPic);
- ///
- /// 更新员工照片
- ///
- ///
- ///
- bool UpdateWorkerPic(WorkerPic workerPic);
- }
-}
diff --git a/SYS.Application/Worker/IWorkerService.cs b/SYS.Application/Worker/IWorkerService.cs
deleted file mode 100644
index 1a3acae389d148937073e340f64c2fcdc43cfdb4..0000000000000000000000000000000000000000
--- a/SYS.Application/Worker/IWorkerService.cs
+++ /dev/null
@@ -1,102 +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.Core;
-using System.Collections.Generic;
-
-namespace SYS.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/SYS.Application/Worker/WorkerCheckService.cs b/SYS.Application/Worker/WorkerCheckService.cs
deleted file mode 100644
index 9aad694aebeb576ab14b28cf0c95bc8e67f26764..0000000000000000000000000000000000000000
--- a/SYS.Application/Worker/WorkerCheckService.cs
+++ /dev/null
@@ -1,89 +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 MySql.Data.MySqlClient;
-using SYS.Common;
-using SYS.Core;
-
-namespace SYS.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/SYS.Application/Worker/WorkerGoodBadService.cs b/SYS.Application/Worker/WorkerGoodBadService.cs
deleted file mode 100644
index 13797d2b4d8804ea041c64d17cb4787c20e7ace4..0000000000000000000000000000000000000000
--- a/SYS.Application/Worker/WorkerGoodBadService.cs
+++ /dev/null
@@ -1,77 +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 MySql.Data.MySqlClient;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using SYS.Core;
-using SYS.Common;
-
-namespace SYS.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/SYS.Application/Worker/WorkerHistoryService.cs b/SYS.Application/Worker/WorkerHistoryService.cs
deleted file mode 100644
index 617ede6750eaa280dc16a65d30704b72553aea58..0000000000000000000000000000000000000000
--- a/SYS.Application/Worker/WorkerHistoryService.cs
+++ /dev/null
@@ -1,59 +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 MySql.Data.MySqlClient;
-using SYS.Common;
-using SYS.Core;
-
-namespace SYS.Application
-{
- ///
- /// 员工履历接口实现类
- ///
- public class WorkerHistoryService:Repository, IWorkerHistoryService
- {
- ///
- /// 根据工号添加员工履历
- ///
- ///
- ///
- 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/SYS.Application/Worker/WorkerPicService.cs b/SYS.Application/Worker/WorkerPicService.cs
deleted file mode 100644
index 22fb49c9de0d04700218da378df372fcea544061..0000000000000000000000000000000000000000
--- a/SYS.Application/Worker/WorkerPicService.cs
+++ /dev/null
@@ -1,75 +0,0 @@
-using jvncorelib_fr.EncryptorLib;
-using SYS.Common;
-using SYS.Core;
-using SYS.Core.Util;
-using System;
-using System.Collections.Generic;
-using System.Configuration;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace SYS.Application
-{
- ///
- /// 员工照片接口实现类
- ///
- public class WorkerPicService:Repository,IWorkerPicService
- {
- EncryptLib encryptLib = new EncryptLib();
- ///
- /// 查询员工照片
- ///
- ///
- ///
- 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) ? "" : encryptLib.Decryption(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/SYS.Application/Worker/WorkerService.cs b/SYS.Application/Worker/WorkerService.cs
deleted file mode 100644
index 476e564a5fe86399299c0158700f0bea46f09c1e..0000000000000000000000000000000000000000
--- a/SYS.Application/Worker/WorkerService.cs
+++ /dev/null
@@ -1,276 +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 MySql.Data.MySqlClient;
-using SYS.Common;
-using SYS.Core;
-using jvncorelib_fr.EncryptorLib;
-
-namespace SYS.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/SYS.Application/Zero/AdminModuleZeroService.cs b/SYS.Application/Zero/AdminModuleZeroService.cs
deleted file mode 100644
index 7565cf971afbb11593eb095a6a08f455a902980f..0000000000000000000000000000000000000000
--- a/SYS.Application/Zero/AdminModuleZeroService.cs
+++ /dev/null
@@ -1,138 +0,0 @@
-using SYS.Common;
-using SYS.Core;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace SYS.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/SYS.Application/Zero/AdminService.cs b/SYS.Application/Zero/AdminService.cs
deleted file mode 100644
index d4da24d0322cc581f5faaf4f2faeb3ac33cc054e..0000000000000000000000000000000000000000
--- a/SYS.Application/Zero/AdminService.cs
+++ /dev/null
@@ -1,183 +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 jvncorelib_fr.EncryptorLib;
-using SYS.Common;
-using SYS.Core;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-
-namespace SYS.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/SYS.Application/Zero/BaseService.cs b/SYS.Application/Zero/BaseService.cs
deleted file mode 100644
index 3c01f2f53f3cab452d6e1a5d06e3bd04cf4fb78e..0000000000000000000000000000000000000000
--- a/SYS.Application/Zero/BaseService.cs
+++ /dev/null
@@ -1,685 +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 jvncorelib_fr.EntityLib;
-using MySql.Data.MySqlClient;
-using SqlSugar;
-using SYS.Common;
-using SYS.Core;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Linq.Expressions;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace SYS.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 学历模块
-
- ///