diff --git a/api_v1/.gitignore b/api_v1/.gitignore
new file mode 100644
index 0000000..e1c1fc6
--- /dev/null
+++ b/api_v1/.gitignore
@@ -0,0 +1,16 @@
+################################################################################
+# 此 .gitignore 文件已由 Microsoft(R) Visual Studio 自动创建。
+################################################################################
+/Appointment.Api/.vs
+/Appointment.Api/.vs/Appointment.Api
+/Appointment.Api/Appointment.Api/bin
+/Appointment.Api/Appointment.Api/log
+/Appointment.Api/Appointment.Api/obj
+/Appointment.Entity/bin
+/Appointment.Entity/obj
+/Appointment.IRepository/bin
+/Appointment.IRepository/obj
+/Appointment.Repository/bin
+/Appointment.Repository/obj
+/Appointment.Api/Appointment.Api/.config
+/.vs/Dee.OA
diff --git a/api_v1/Appointment.Api/Appointment.Api.sln b/api_v1/Appointment.Api/Appointment.Api.sln
new file mode 100644
index 0000000..977de71
--- /dev/null
+++ b/api_v1/Appointment.Api/Appointment.Api.sln
@@ -0,0 +1,43 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.30711.63
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Appointment.Api", "Appointment.Api\Appointment.Api.csproj", "{D8C00CB0-D314-4D84-B865-ED50E8BBFB0F}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Appointment.Repository", "..\Appointment.Repository\Appointment.Repository.csproj", "{3F67A123-9CD3-41E3-AF2A-C5EA2DC6B63D}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Appointment.IRepository", "..\Appointment.IRepository\Appointment.IRepository.csproj", "{60B857A7-3AB0-4A5A-8271-FD0775F0A40A}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Appointment.Entity", "..\Appointment.Entity\Appointment.Entity.csproj", "{AB7CA6F6-403E-4E1F-B688-F581D66F4CC4}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {D8C00CB0-D314-4D84-B865-ED50E8BBFB0F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D8C00CB0-D314-4D84-B865-ED50E8BBFB0F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D8C00CB0-D314-4D84-B865-ED50E8BBFB0F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D8C00CB0-D314-4D84-B865-ED50E8BBFB0F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3F67A123-9CD3-41E3-AF2A-C5EA2DC6B63D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3F67A123-9CD3-41E3-AF2A-C5EA2DC6B63D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3F67A123-9CD3-41E3-AF2A-C5EA2DC6B63D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3F67A123-9CD3-41E3-AF2A-C5EA2DC6B63D}.Release|Any CPU.Build.0 = Release|Any CPU
+ {60B857A7-3AB0-4A5A-8271-FD0775F0A40A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {60B857A7-3AB0-4A5A-8271-FD0775F0A40A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {60B857A7-3AB0-4A5A-8271-FD0775F0A40A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {60B857A7-3AB0-4A5A-8271-FD0775F0A40A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {AB7CA6F6-403E-4E1F-B688-F581D66F4CC4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {AB7CA6F6-403E-4E1F-B688-F581D66F4CC4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {AB7CA6F6-403E-4E1F-B688-F581D66F4CC4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {AB7CA6F6-403E-4E1F-B688-F581D66F4CC4}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {491C2436-66E3-43C6-817A-F1E718C28A3B}
+ EndGlobalSection
+EndGlobal
diff --git a/api_v1/Appointment.Api/Appointment.Api/Appointment.Api.csproj b/api_v1/Appointment.Api/Appointment.Api/Appointment.Api.csproj
new file mode 100644
index 0000000..908d29c
--- /dev/null
+++ b/api_v1/Appointment.Api/Appointment.Api/Appointment.Api.csproj
@@ -0,0 +1,39 @@
+
+
+
+ netcoreapp3.1
+ 6dceff68-1c1d-4ab3-9e5c-af79745ae1a1
+
+
+
+ 1701;1702;1591
+ Appointment.Api.xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Always
+
+
+
+
+
+ Always
+
+
+
+
+
diff --git a/api_v1/Appointment.Api/Appointment.Api/Appointment.Api.xml b/api_v1/Appointment.Api/Appointment.Api/Appointment.Api.xml
new file mode 100644
index 0000000..a415842
--- /dev/null
+++ b/api_v1/Appointment.Api/Appointment.Api/Appointment.Api.xml
@@ -0,0 +1,367 @@
+
+
+
+ Appointment.Api
+
+
+
+
+ 预订审核节点接口
+
+
+
+
+ 获取所有组别
+
+
+
+
+
+ 审核流程 添加节点
+
+
+ apptTypeId:审核类型;
+ opGroup:角色代码;
+ opDescript:角色名称;
+ pid:前阶段审核主键,第一级审核填0;
+
+
+
+
+
+ 核流程 删除
+
+
+ id:要删除的节点;有子节点时不允许删除
+
+
+
+
+
+ 根据主键获取实体
+
+
+ id:主键;
+
+
+
+
+
+ 预订审核 审核列表
+
+
+ id:大于0-指定主键;
+ apptTypeId:大于0-指定审核类型;
+ opGroup:不为空-指定组别代码;
+ opDescript:不为空-指定组别名称;
+
+
+
+
+
+ 预订审核 分页
+
+
+ Keywords:角色名称模糊查询
+
+
+
+
+
+ 获取预订审核线状结构
+
+
+ apptTypeId:审核类型;
+
+
+
+
+
+ 预订接口
+
+
+
+
+ 根据时间段获取可使用的会议厅资源
+
+
+
+
+
+
+ 根据日期与场次获取可使用会议厅资源
+
+
+
+
+
+
+ 获取可使用的房间资源
+
+ 启始时间(默认从昨天开始)
+
+
+
+
+ 根据时间段获取房类最小可用数
+
+
+
+
+
+
+ 获取备注列表项
+
+
+
+
+
+ 预订提交
+
+
+
+
+
+
+ 预订审核
+
+
+
+
+
+
+ 转审批
+
+
+
+
+
+
+ 抄送
+
+
+
+
+
+
+ 根据主键获取实体
+
+
+
+
+
+
+ 我发起的预订列表列表
+
+
+
+
+
+
+ 获取我待审核的
+
+
+
+
+
+
+ 获取预订审核记录表
+
+
+
+
+
+
+ 测试
+
+
+
+
+
+
+ 创建新的预订单
+
+
+
+
+
+
+ 修改暂订单
+
+
+
+
+
+
+ 申请确定单
+
+
+
+
+
+
+ 取消OA单
+
+
+
+
+
+
+ 确定单后续审批
+
+
+
+
+
+
+ 被驳回
+
+
+
+
+
+
+ 手动抄送
+
+
+
+
+
+
+ 信息回复
+
+
+
+
+
+
+ 根据主键获取实体
+
+
+
+
+
+
+ 分页预订列表
+
+
+
+
+
+
+ 获取审批流程
+
+
+
+
+
+
+ 订单数据差距
+
+
+
+
+
+
+ 返回回复中的图片列表
+
+
+
+
+
+ 预订类型接口
+
+
+
+
+ 预订类型 添加
+
+ status不填写
+
+
+
+
+ 预订类型 删除
+
+ 根据id删除一条数据
+
+
+
+
+ 预订类型更新
+
+ 根据id更新ApptName、Remark
+
+
+
+
+ 预订类型获取实体
+
+ 根据id获取实体
+
+
+
+
+ 预订类型列表
+
+
+ Id:0-忽略,其他-指定;
+ ApptName:根据类型名称模糊查询;
+
+
+
+
+
+ 预订类型分页
+
+
+ Keywords-根据类型名称模糊查询;
+
+
+
+
+
+ 登录接口
+
+
+
+
+ 管理人员 微信小程序授权登录
+
+
+
+
+
+
+ 管理人员微信小程序登录
+
+ wx.login下的code
+
+
+
+
+ 绑定微信服务号OpenId
+
+
+
+
+
+
+ 获取所有用户
+
+
+
+
+
+ 获取已绑定小程序与公众号的用户列表(不包含本用户)
+
+
+
+
+
+ 注册Swagger服务
+
+
+
+
+
diff --git a/api_v1/Appointment.Api/Appointment.Api/Controllers/ApptAuditorController.cs b/api_v1/Appointment.Api/Appointment.Api/Controllers/ApptAuditorController.cs
new file mode 100644
index 0000000..7051b46
--- /dev/null
+++ b/api_v1/Appointment.Api/Appointment.Api/Controllers/ApptAuditorController.cs
@@ -0,0 +1,127 @@
+using Appointment.Entity;
+using Appointment.IRepository;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace Appointment.Api.Controllers
+{
+ ///
+ /// 预订审核节点接口
+ ///
+ [Route("api/[controller]")]
+ [ApiController]
+ public class ApptAuditorController : ControllerBase
+ {
+ IApptAuditorRepo _ApptAuditorRepo;
+ IManagerGroup _ManagerGroup;
+ public ApptAuditorController(IApptAuditorRepo apptAuditorRepo, IManagerGroup managerGroup)
+ {
+ _ApptAuditorRepo = apptAuditorRepo;
+ _ManagerGroup = managerGroup;
+ }
+
+ // ---- 组别
+
+ ///
+ /// 获取所有组别
+ ///
+ ///
+ [Route("GroupList")]
+ [HttpPost]
+ public ApiResult> GroupList()
+ {
+ return _ManagerGroup.GetAll();
+ }
+
+ // ---- 审核流程管理
+
+ ///
+ /// 审核流程 添加节点
+ ///
+ ///
+ /// apptTypeId:审核类型;
+ /// opGroup:角色代码;
+ /// opDescript:角色名称;
+ /// pid:前阶段审核主键,第一级审核填0;
+ ///
+ ///
+ [HttpPost("Add")]
+ public ApiResult Add(ApptAuditor req)
+ {
+ return _ApptAuditorRepo.Add(req);
+ }
+
+ ///
+ /// 核流程 删除
+ ///
+ ///
+ /// id:要删除的节点;有子节点时不允许删除
+ ///
+ ///
+ [HttpPost("Delete")]
+ public ApiResult Delete(ApptAuditor req)
+ {
+ return _ApptAuditorRepo.Delete(req.Id);
+ }
+
+ ///
+ /// 根据主键获取实体
+ ///
+ ///
+ /// id:主键;
+ ///
+ ///
+ [HttpPost("GetModel")]
+ public ApiResult GetModel(ApptAuditor req)
+ {
+ return _ApptAuditorRepo.GetModel(req.Id);
+ }
+
+ ///
+ /// 预订审核 审核列表
+ ///
+ ///
+ /// id:大于0-指定主键;
+ /// apptTypeId:大于0-指定审核类型;
+ /// opGroup:不为空-指定组别代码;
+ /// opDescript:不为空-指定组别名称;
+ ///
+ ///
+ [HttpPost("GetList")]
+ public ApiResult> GetList(ApptAuditor req)
+ {
+ return _ApptAuditorRepo.GetList(req);
+ }
+
+ ///
+ /// 预订审核 分页
+ ///
+ ///
+ /// Keywords:角色名称模糊查询
+ ///
+ ///
+ [HttpPost("Page")]
+ public ApiResult> Page(CommPageReq req)
+ {
+ return _ApptAuditorRepo.Page(req);
+ }
+
+ ///
+ /// 获取预订审核线状结构
+ ///
+ ///
+ /// apptTypeId:审核类型;
+ ///
+ ///
+ [HttpPost("AuditorLine")]
+ public ApiResult AuditorLine(ApptAuditor req)
+ {
+ return _ApptAuditorRepo.AuditorLine(req.ApptTypeId);
+ }
+
+ }
+}
diff --git a/api_v1/Appointment.Api/Appointment.Api/Controllers/ApptController.cs b/api_v1/Appointment.Api/Appointment.Api/Controllers/ApptController.cs
new file mode 100644
index 0000000..c876e58
--- /dev/null
+++ b/api_v1/Appointment.Api/Appointment.Api/Controllers/ApptController.cs
@@ -0,0 +1,185 @@
+using Appointment.Entity;
+using Appointment.IRepository;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace Appointment.Api.Controllers
+{
+ ///
+ /// 预订接口
+ ///
+ [Route("api/[controller]")]
+ [ApiController]
+ public class ApptController : ControllerBase
+ {
+ IApptRepo _ApptRepo;
+ public ApptController(IApptRepo apptRepo)
+ {
+ _ApptRepo = apptRepo;
+ }
+
+ ///
+ /// 根据时间段获取可使用的会议厅资源
+ ///
+ ///
+ ///
+ [HttpPost("UsableMeeting")]
+ public ApiResult> UsableMeeting(MeetingReq req)
+ {
+ return _ApptRepo.UsableMeetingList(req);
+ }
+
+ ///
+ /// 根据日期与场次获取可使用会议厅资源
+ ///
+ ///
+ ///
+ [HttpPost("UsableMeetingByDay")]
+ public ApiResult> UsableMeetingByDay(UsableMeetingReq req)
+ {
+ return _ApptRepo.UsableMeeting(req);
+ }
+
+ ///
+ /// 获取可使用的房间资源
+ ///
+ /// 启始时间(默认从昨天开始)
+ ///
+ [HttpPost("UsableRoom")]
+ public ApiResult> UsableRoom(UsableRoomReq req)
+ {
+ return _ApptRepo.UsableRoom(req);
+ }
+
+ ///
+ /// 根据时间段获取房类最小可用数
+ ///
+ ///
+ ///
+ [HttpPost("UsableRoomMin")]
+ public ApiResult> UsableRoomMin(UsableRoomReq req)
+ {
+ return _ApptRepo.UsableRoomMin(req);
+ }
+
+ ///
+ /// 获取备注列表项
+ ///
+ ///
+ [HttpPost("RemarkLis")]
+ public ApiResult> RemarkList()
+ {
+ return _ApptRepo.RemarkList();
+ }
+
+ ///
+ /// 预订提交
+ ///
+ ///
+ ///
+ [HttpPost("Add")]
+ public ApiResult Add(ApptSummaryReq req)
+ {
+ return _ApptRepo.Add(req);
+ }
+
+ ///
+ /// 预订审核
+ ///
+ ///
+ ///
+ [HttpPost("ApptAudit")]
+ public ApiResult ApptAudit(ApptAuditReq req)
+ {
+ return _ApptRepo.ApptAudit(req);
+ }
+
+ [HttpPost("CancelAudit")]
+ public ApiResult CancelAudit(ApptAuditReq req)
+ {
+ return _ApptRepo.CancelAudit(req);
+ }
+
+ ///
+ /// 转审批
+ ///
+ ///
+ ///
+ [HttpPost("TransferAudit")]
+ public ApiResult TransferAudit(TransferAuditReq req)
+ {
+ return _ApptRepo.TransferAudit(req);
+ }
+
+ ///
+ /// 抄送
+ ///
+ ///
+ ///
+ [HttpPost("ApptSend")]
+ public ApiResult ApptSend(ApptSendReq req)
+ {
+ return _ApptRepo.ApptSend(req);
+ }
+
+ ///
+ /// 根据主键获取实体
+ ///
+ ///
+ ///
+ [HttpPost("GetModel")]
+ public ApiResult GetModel(ApptSummaryReq req)
+ {
+ return _ApptRepo.GetModel(req.Id);
+ }
+
+ ///
+ /// 我发起的预订列表列表
+ ///
+ ///
+ ///
+ [HttpPost("MyApptApplyPageReq")]
+ public ApiResult> MyApptApplyPageReq(MyApptApplyPageReq req)
+ {
+ return _ApptRepo.MyApptApplyPageReq(req);
+ }
+
+ ///
+ /// 获取我待审核的
+ ///
+ ///
+ ///
+ [HttpPost("MyPartakePage")]
+ public ApiResult> MyPartakePage(MyApptAuditPageReq req)
+ {
+ return _ApptRepo.MyPartakePage(req);
+ }
+
+ ///
+ /// 获取预订审核记录表
+ ///
+ ///
+ ///
+ [HttpPost("AuditorLogTree")]
+ public ApiResult AuditorLogTree(CommIntReq req)
+ {
+ return _ApptRepo.AuditorLogTree(req);
+ }
+
+ ///
+ /// 测试
+ ///
+ ///
+ ///
+ [HttpPost("Demo")]
+ public ApiResult Demo(CommPageReq req)
+ {
+ return _ApptRepo.Demo(req);
+ }
+ }
+}
diff --git a/api_v1/Appointment.Api/Appointment.Api/Controllers/ApptJNCController.cs b/api_v1/Appointment.Api/Appointment.Api/Controllers/ApptJNCController.cs
new file mode 100644
index 0000000..6c00ada
--- /dev/null
+++ b/api_v1/Appointment.Api/Appointment.Api/Controllers/ApptJNCController.cs
@@ -0,0 +1,171 @@
+using Appointment.Entity;
+using Appointment.IRepository;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace Appointment.Api.Controllers
+{
+ [Route("api/[controller]/[action]")]
+ [ApiController]
+ public class ApptJNCController : ControllerBase
+ {
+ IApptRepoJNC apptRepoJNC;
+
+ public ApptJNCController(IApptRepoJNC _apptRepoJNC)
+ {
+ apptRepoJNC = _apptRepoJNC;
+ }
+
+ ///
+ /// 创建新的预订单
+ ///
+ ///
+ ///
+ [HttpPost]
+ public ApiResult AddSummary(AddSummaryJncReq req)
+ {
+ return apptRepoJNC.AddApptSummary(req);
+ }
+
+
+ ///
+ /// 修改暂订单
+ ///
+ ///
+ ///
+ [HttpPost]
+ public ApiResult UpdateSummary(UpdateSummaryReq req)
+ {
+ return apptRepoJNC.UpdateSummary(req);
+ }
+
+ ///
+ /// 申请确定单
+ ///
+ ///
+ ///
+ [HttpPost]
+ public ApiResult ApplyOrder(ApplyOrderReq req)
+ {
+ return apptRepoJNC.ApplyOrder(req);
+ }
+
+ ///
+ /// 取消OA单
+ ///
+ ///
+ ///
+ [HttpPost]
+ public ApiResult Cancel(ApplyOrderReq req)
+ {
+ return apptRepoJNC.Cancel(req);
+ }
+
+ ///
+ /// 确定单后续审批
+ ///
+ ///
+ ///
+ [HttpPost]
+ public ApiResult AuditorSummary(ApplyOrderReq req)
+ {
+ return apptRepoJNC.AuditorSummary(req);
+ }
+
+ ///
+ /// 被驳回
+ ///
+ ///
+ ///
+ [HttpPost]
+ public ApiResult RejectSummary(ApplyOrderReq req)
+ {
+ return apptRepoJNC.RejectSummary(req);
+ }
+
+ ///
+ /// 手动抄送
+ ///
+ ///
+ ///
+ [HttpPost]
+ public ApiResult ManualCopy(ApptSendReq req)
+ {
+ return apptRepoJNC.ManualCopy(req);
+ }
+
+ ///
+ /// 信息回复
+ ///
+ ///
+ ///
+ [HttpPost]
+ public ApiResult AddReply(AddMsgReq req)
+ {
+ return apptRepoJNC.AddReply(req);
+ }
+
+
+
+ ///
+ /// 根据主键获取实体
+ ///
+ ///
+ ///
+ [HttpPost]
+ public ApiResult GetModel(SummaryJncModelReq req)
+ {
+ return apptRepoJNC.GetSummaryModel(req);
+ }
+
+ ///
+ /// 分页预订列表
+ ///
+ ///
+ ///
+ [HttpPost]
+ public ApiResult> SummaryPager(SummaryJNCPageReq req)
+ {
+ return apptRepoJNC.ApptSummaryPager(req);
+ }
+
+ ///
+ /// 获取审批流程
+ ///
+ ///
+ ///
+ [HttpPost]
+ public ApiResult AuditorLogTree(SummaryJncModelReq req)
+ {
+ return apptRepoJNC.AuditorLogTree(req);
+ }
+
+ ///
+ /// 订单数据差距
+ ///
+ ///
+ ///
+ [HttpPost]
+ public ApiResult> Disparity(SummaryJncModelReq req)
+ {
+ return apptRepoJNC.Disparity(req);
+ }
+
+ ///
+ /// 返回回复中的图片列表
+ ///
+ ///
+ [HttpPost]
+ public ApiResult> GetReplyPicList(SummaryJncModelReq req)
+ {
+ return apptRepoJNC.GetReplyPicList(req);
+ }
+
+ }
+}
diff --git a/api_v1/Appointment.Api/Appointment.Api/Controllers/ApptTypeController.cs b/api_v1/Appointment.Api/Appointment.Api/Controllers/ApptTypeController.cs
new file mode 100644
index 0000000..d86717c
--- /dev/null
+++ b/api_v1/Appointment.Api/Appointment.Api/Controllers/ApptTypeController.cs
@@ -0,0 +1,97 @@
+using Appointment.Entity;
+using Appointment.IRepository;
+using Appointment.Repository;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace Appointment.Api.Controllers
+{
+ ///
+ /// 预订类型接口
+ ///
+ [Route("api/[controller]")]
+ [ApiController]
+ public class ApptTypeController : ControllerBase
+ {
+ IApptTypeRepo _ApptTypeRepo;
+ public ApptTypeController(IApptTypeRepo apptTypeRepo)
+ {
+ _ApptTypeRepo = apptTypeRepo;
+ }
+
+ ///
+ /// 预订类型 添加
+ ///
+ /// status不填写
+ ///
+ [HttpPost("Add")]
+ public ApiResult Add(ApptTypeAddReq req)
+ {
+ return _ApptTypeRepo.Add(req);
+ }
+
+ ///
+ /// 预订类型 删除
+ ///
+ /// 根据id删除一条数据
+ ///
+ [HttpPost("Delete")]
+ public ApiResult Delete(ApptType req)
+ {
+ return _ApptTypeRepo.Delete(req.Id);
+ }
+
+ ///
+ /// 预订类型更新
+ ///
+ /// 根据id更新ApptName、Remark
+ ///
+ [HttpPost("Update")]
+ public ApiResult Update(ApptType req)
+ {
+ return _ApptTypeRepo.Update(req);
+ }
+
+ ///
+ /// 预订类型获取实体
+ ///
+ /// 根据id获取实体
+ ///
+ [HttpPost("GetModel")]
+ public ApiResult GetModel(ApptType req)
+ {
+ return _ApptTypeRepo.GetModel(req.Id);
+ }
+
+ ///
+ /// 预订类型列表
+ ///
+ ///
+ /// Id:0-忽略,其他-指定;
+ /// ApptName:根据类型名称模糊查询;
+ ///
+ ///
+ [HttpPost("GetList")]
+ public ApiResult> GetList(ApptType req)
+ {
+ return _ApptTypeRepo.GetList(req);
+ }
+
+ ///
+ /// 预订类型分页
+ ///
+ ///
+ /// Keywords-根据类型名称模糊查询;
+ ///
+ ///
+ [HttpPost("Page")]
+ public ApiResult> Page(CommPageReq req)
+ {
+ return _ApptTypeRepo.Page(req);
+ }
+ }
+}
diff --git a/api_v1/Appointment.Api/Appointment.Api/Controllers/DemoController.cs b/api_v1/Appointment.Api/Appointment.Api/Controllers/DemoController.cs
new file mode 100644
index 0000000..bcf7184
--- /dev/null
+++ b/api_v1/Appointment.Api/Appointment.Api/Controllers/DemoController.cs
@@ -0,0 +1,33 @@
+using Appointment.Entity;
+using Appointment.IRepository;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Linq;
+using System.Net;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Appointment.Api.Controllers
+{
+ [Route("api/[controller]")]
+ [ApiController]
+ public class DemoController : ControllerBase
+ {
+ private IApptRepo apptRepo;
+
+ public DemoController(IApptRepo _apptRepo)
+ {
+ apptRepo = _apptRepo;
+ }
+
+ [HttpGet("show")]
+ public IActionResult Show()
+ {
+ return Ok("ok");
+ }
+ }
+}
diff --git a/api_v1/Appointment.Api/Appointment.Api/Controllers/UserController.cs b/api_v1/Appointment.Api/Appointment.Api/Controllers/UserController.cs
new file mode 100644
index 0000000..a909ff8
--- /dev/null
+++ b/api_v1/Appointment.Api/Appointment.Api/Controllers/UserController.cs
@@ -0,0 +1,81 @@
+using Appointment.Entity;
+using Appointment.IRepository;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace Appointment.Api.Controllers
+{
+ ///
+ /// 登录接口
+ ///
+ [Route("api/[controller]")]
+ [ApiController]
+ public class UserController : ControllerBase
+ {
+ IUserRepo _UserRepo;
+ IApptRepo _ApptRepo;
+ public UserController(IUserRepo userRepo, IApptRepo apptRep)
+ {
+ _UserRepo = userRepo;
+ _ApptRepo = apptRep;
+ }
+
+ ///
+ /// 管理人员 微信小程序授权登录
+ ///
+ ///
+ ///
+ [HttpPost("UserNameLogin")]
+ public ApiResult UserNameLogin(UserLoginAccountReq req)
+ {
+ return _UserRepo.UserNameLogin(req.UserName, req.UserPwd, req.Code, req.Hotelid);
+ }
+
+ ///
+ /// 管理人员微信小程序登录
+ ///
+ /// wx.login下的code
+ ///
+ [HttpPost("WxLogin")]
+ public ApiResult WxLogin(UserLoginCodeReq req)
+ {
+ return _UserRepo.WxLogin(req.Code, req.Hotelid);
+ }
+
+ ///
+ /// 绑定微信服务号OpenId
+ ///
+ ///
+ ///
+ [HttpPost("WxServiceSet")]
+ public ApiResult WxServiceSet(WxServiceSetRes req)
+ {
+ return _UserRepo.WxServiceSet(req);
+ }
+
+ ///
+ /// 获取所有用户
+ ///
+ ///
+ [HttpPost("GetUserAll")]
+ public ApiResult> GetUserAll(BindUserReq req = null)
+ {
+ return _UserRepo.GetSendUserList(req);
+ }
+
+ ///
+ /// 获取已绑定小程序与公众号的用户列表(不包含本用户)
+ ///
+ ///
+ [HttpPost("GetTransferAudit")]
+ public ApiResult> GetBindUser(BindUserReq req)
+ {
+ return _UserRepo.GetTransferAuditUserList(req);
+ }
+ }
+}
diff --git a/api_v1/Appointment.Api/Appointment.Api/Program.cs b/api_v1/Appointment.Api/Appointment.Api/Program.cs
new file mode 100644
index 0000000..447a37c
--- /dev/null
+++ b/api_v1/Appointment.Api/Appointment.Api/Program.cs
@@ -0,0 +1,33 @@
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.Hosting;
+using Microsoft.Extensions.Logging;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace Appointment.Api
+{
+ public class Program
+ {
+ public static void Main(string[] args)
+ {
+ CreateHostBuilder(args).Build().Run();
+ }
+
+ public static IHostBuilder CreateHostBuilder(string[] args) =>
+ Host.CreateDefaultBuilder(args)
+ .ConfigureLogging((context, loggingBuilder) =>
+ {
+ loggingBuilder.AddFilter("System", LogLevel.Warning);
+ loggingBuilder.AddFilter("Microsoft", LogLevel.Warning);
+ loggingBuilder.AddLog4Net();
+ })
+ .ConfigureWebHostDefaults(webBuilder =>
+ {
+ // webBuilder.UseUrls("http://*:8082");
+ webBuilder.UseStartup();
+ });
+ }
+}
diff --git a/api_v1/Appointment.Api/Appointment.Api/Properties/launchSettings.json b/api_v1/Appointment.Api/Appointment.Api/Properties/launchSettings.json
new file mode 100644
index 0000000..d176fed
--- /dev/null
+++ b/api_v1/Appointment.Api/Appointment.Api/Properties/launchSettings.json
@@ -0,0 +1,32 @@
+{
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "http://localhost:54928",
+ "sslPort": 0
+ }
+ },
+ "$schema": "http://json.schemastore.org/launchsettings.json",
+ "profiles": {
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "launchUrl": "weatherforecast",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ },
+ "nativeDebugging": true
+ },
+ "Appointment.Api": {
+ "commandName": "Project",
+ "launchBrowser": true,
+ "launchUrl": "weatherforecast",
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ },
+ //"applicationUrl": "http://localhost:54928"
+ "applicationUrl": "http://127.0.0.1:8062"
+ }
+ }
+}
\ No newline at end of file
diff --git a/api_v1/Appointment.Api/Appointment.Api/Startup.cs b/api_v1/Appointment.Api/Appointment.Api/Startup.cs
new file mode 100644
index 0000000..02c023a
--- /dev/null
+++ b/api_v1/Appointment.Api/Appointment.Api/Startup.cs
@@ -0,0 +1,85 @@
+using Appointment.Api.Utility;
+using Appointment.IRepository;
+using Appointment.Repository;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Server.Kestrel.Core;
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
+using Microsoft.Extensions.Logging;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace Appointment.Api
+{
+ public class Startup
+ {
+ public Startup(IConfiguration configuration)
+ {
+ Configuration = configuration;
+ }
+
+ public IConfiguration Configuration { get; }
+
+ // This method gets called by the runtime. Use this method to add services to the container.
+ public void ConfigureServices(IServiceCollection services)
+ {
+ services.AddSwaggerSetup();
+
+ services.AddControllers(options =>
+ {
+ options.Filters.Add(typeof(CustomExceptionFilterAttribute));
+ });
+
+ //
+ services.AddTransient();
+ services.AddTransient();
+ services.AddTransient();
+ services.AddTransient();
+ services.AddTransient();
+ services.AddTransient();
+ services.AddTransient();
+ services.AddTransient();
+
+ }
+
+ // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
+ public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
+ {
+ // ÉèÖûº´æHttpÇëʾµÄBodyÊý¾Ý
+ app.Use(next => new RequestDelegate(
+ async context =>
+ {
+ context.Request.EnableBuffering();
+ await next(context);
+ }
+ ));
+
+ if (env.IsDevelopment())
+ {
+ app.UseDeveloperExceptionPage();
+ }
+
+ app.UseSwagger();
+ app.UseSwaggerUI(c =>
+ {
+ c.SwaggerEndpoint($"/swagger/V1/swagger.json", "Appointment.Api V1");
+ c.RoutePrefix = "sw";
+ });
+
+ app.UseRouting();
+
+ app.UseAuthorization();
+
+ app.UseEndpoints(endpoints =>
+ {
+ endpoints.MapControllers();
+ });
+ }
+ }
+}
diff --git a/api_v1/Appointment.Api/Appointment.Api/Utility/CustomExceptionFilterAttribute.cs b/api_v1/Appointment.Api/Appointment.Api/Utility/CustomExceptionFilterAttribute.cs
new file mode 100644
index 0000000..06ccdf7
--- /dev/null
+++ b/api_v1/Appointment.Api/Appointment.Api/Utility/CustomExceptionFilterAttribute.cs
@@ -0,0 +1,68 @@
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc.Filters;
+using System;
+using System.Text;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using System.IO;
+using Appointment.Entity;
+
+namespace Appointment.Api.Utility
+{
+ public class CustomExceptionFilterAttribute : ExceptionFilterAttribute
+ {
+ private readonly log4net.ILog _logger = log4net.LogManager.GetLogger(typeof(CustomExceptionFilterAttribute));
+ public override void OnException(ExceptionContext context)
+ {
+ // 异常未被处理
+ if (!context.ExceptionHandled)
+ {
+ // 文本日志
+ StringBuilder msg = new StringBuilder();
+ msg.Append("出现异常:");
+ msg.AppendFormat("请求地址:{0} ", context.HttpContext.Request.Path);
+ string reqMethod = context.HttpContext.Request.Method;
+ msg.AppendFormat("请求类型:{0}", reqMethod);
+
+ Dictionary dict = new Dictionary();
+ if (reqMethod == "GET" && context.HttpContext.Request.Query.Count > 0)
+ {
+ msg.AppendFormat("请求参数:{0} ", context.HttpContext.Request.QueryString.ToString());
+ }
+ else if (reqMethod == "POST"
+ && context.HttpContext.Request.ContentType != null
+ && context.HttpContext.Request.ContentType.Contains("form-data")
+ && context.HttpContext.Request.ContentLength.Value > 0)
+ {
+ List keys = context.HttpContext.Request.Form.Keys.ToList();
+ if (keys.Count > 0)
+ {
+ msg.Append("请求参数:");
+ foreach (var item in keys)
+ {
+ msg.AppendFormat("{0}={1},", item, context.HttpContext.Request.Form[item].ToString());
+ }
+ }
+ }
+ else if (reqMethod == "POST"
+ && context.HttpContext.Request.ContentType != null
+ && context.HttpContext.Request.ContentType == "application/json"
+ && context.HttpContext.Request.ContentLength > 0)
+ {
+ context.HttpContext.Request.Body.Position = 0;
+ StreamReader sr = new StreamReader(context.HttpContext.Request.Body);
+ string body = sr.ReadToEndAsync().Result;
+ msg.AppendFormat("请求参数:Body:{0} ", body);
+ context.HttpContext.Request.Body.Position = 0;
+ }
+ _logger.Error(msg.ToString() + context.Exception);
+
+ // 返回前端
+ DateTime now = DateTime.Now;
+ context.Result = new JsonResult(ApiResult.Failed(context.Exception.Message, null));
+ context.ExceptionHandled = true;
+ }
+ }
+ }
+}
diff --git a/api_v1/Appointment.Api/Appointment.Api/Utility/SwaggerSetUp.cs b/api_v1/Appointment.Api/Appointment.Api/Utility/SwaggerSetUp.cs
new file mode 100644
index 0000000..c8685a1
--- /dev/null
+++ b/api_v1/Appointment.Api/Appointment.Api/Utility/SwaggerSetUp.cs
@@ -0,0 +1,48 @@
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.OpenApi.Models;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace Appointment.Api
+{
+ public static class SwaggerSetUp
+ {
+ ///
+ /// 注册Swagger服务
+ ///
+ ///
+ public static void AddSwaggerSetup(this IServiceCollection services)
+ {
+ if (services == null) throw new ArgumentNullException(nameof(services));
+
+ var apiName = "Appointment.Api";
+
+ services.AddSwaggerGen(c =>
+ {
+ //
+ c.SwaggerDoc("V1", new OpenApiInfo
+ {
+ // {ApiName} 定义成全局变量,方便修改
+ Version = "V1",
+ Title = $"{apiName} 接口文档",
+ Description = $"{apiName} API V1",
+ });
+ //c.OrderActionsBy(o => o.RelativePath);
+
+
+ var api = Path.Combine(AppContext.BaseDirectory, "Appointment.Api.xml");
+ c.IncludeXmlComments(api, true);
+
+ var entity = Path.Combine(AppContext.BaseDirectory, "Appointment.Entity.xml");
+ c.IncludeXmlComments(entity, true);
+
+ // 获取ReadMe项目实体的xml注释文件的目录
+ var Irepository = Path.Combine(AppContext.BaseDirectory, "Appointment.IRepository.xml");
+ c.IncludeXmlComments(Irepository);
+ });
+ }
+ }
+}
diff --git a/api_v1/Appointment.Api/Appointment.Api/Utility/htmlpage.html b/api_v1/Appointment.Api/Appointment.Api/Utility/htmlpage.html
new file mode 100644
index 0000000..125a5a8
--- /dev/null
+++ b/api_v1/Appointment.Api/Appointment.Api/Utility/htmlpage.html
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/api_v1/Appointment.Api/Appointment.Api/appsettings.Development.json b/api_v1/Appointment.Api/Appointment.Api/appsettings.Development.json
new file mode 100644
index 0000000..8983e0f
--- /dev/null
+++ b/api_v1/Appointment.Api/Appointment.Api/appsettings.Development.json
@@ -0,0 +1,9 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft": "Warning",
+ "Microsoft.Hosting.Lifetime": "Information"
+ }
+ }
+}
diff --git a/api_v1/Appointment.Api/Appointment.Api/appsettings.json b/api_v1/Appointment.Api/Appointment.Api/appsettings.json
new file mode 100644
index 0000000..fb0b7ec
--- /dev/null
+++ b/api_v1/Appointment.Api/Appointment.Api/appsettings.json
@@ -0,0 +1,28 @@
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft": "Warning",
+ "Microsoft.Hosting.Lifetime": "Information"
+ }
+ },
+ "ConnectionString": "server=.;uid=sa;pwd=dlhis123;database=hotel;",
+ "NoPrefix": "JNCYXB", // 预定编号前缀
+ "ApptType": "2", // 审核类型:1-默认模式,2-江南春模式
+ "WeChat": { // 小程序
+ "AppId": "wx7e511954cc1c23f7",
+ "AppSecret": "9bef838143040d1972903089ab5429f3"
+ },
+ "AccessTokenMode": "2", // 获取AccessToken模式:1-爱住网获取,其他-本地获取
+ "WeChatService": { // 服务号
+ // 江南春
+ //"AppId": "wx3f193488e04b2ed8",
+ //"AppName": "江南春",
+ //"AppSecret": "aaa88fba85e536c12ebc2e90915bdf46"
+ "AppId": "wx2b6e92e9e0c6025f",
+ "AppName": "香堤湾",
+ "AppSecret": "1bbc7d71ea3154b803f438698d87c458"
+ },
+ "Hotelid": "oatest",
+ "AllowedHosts": "*"
+}
diff --git a/api_v1/Appointment.Api/Appointment.Api/htmlpage.html b/api_v1/Appointment.Api/Appointment.Api/htmlpage.html
new file mode 100644
index 0000000..38fb7b2
--- /dev/null
+++ b/api_v1/Appointment.Api/Appointment.Api/htmlpage.html
@@ -0,0 +1,10 @@
+
+
+
+
+ 启动
+
+
+
+
+
\ No newline at end of file
diff --git a/api_v1/Appointment.Api/Appointment.Api/log4net.Config b/api_v1/Appointment.Api/Appointment.Api/log4net.Config
new file mode 100644
index 0000000..243a512
--- /dev/null
+++ b/api_v1/Appointment.Api/Appointment.Api/log4net.Config
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/api_v1/Appointment.Entity/Appointment.Entity.csproj b/api_v1/Appointment.Entity/Appointment.Entity.csproj
new file mode 100644
index 0000000..e32549a
--- /dev/null
+++ b/api_v1/Appointment.Entity/Appointment.Entity.csproj
@@ -0,0 +1,39 @@
+
+
+
+ netcoreapp3.1
+
+
+
+ Appointment.Entity.xml
+ 1701;1702;1591
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Always
+
+
+
+
diff --git a/api_v1/Appointment.Entity/Appointment.Entity.xml b/api_v1/Appointment.Entity/Appointment.Entity.xml
new file mode 100644
index 0000000..ba877d9
--- /dev/null
+++ b/api_v1/Appointment.Entity/Appointment.Entity.xml
@@ -0,0 +1,3484 @@
+
+
+
+ Appointment.Entity
+
+
+
+
+ 暂订单
+
+
+ 销售人员创建,
+ 创建完成后,提示是保存还是提交
+
+
+
+
+ 待审核的暂订单
+
+
+ 暂订单提交之后,待生成确订单
+ 只有待状态下的订单才能生成确定单
+
+
+
+
+ 暂订单已提交
+
+
+
+
+ 预定处根据销售提示的暂定单编号 及订金生成
+
+
+ 销售人员提供单号
+ 客户交订金
+ 预定处办理
+ 占用资源
+
+
+
+
+ 江南春流程状态
+
+
+
+
+ 销售员保存单
+
+
+
+
+ 业务员已提交申请审核
+
+
+
+
+ 预定部已审核通过
+
+
+
+
+ 销售经理已审核通过
+
+
+
+
+ 财务经理已审核通过
+
+
+
+
+ 财务总监已审核通过
+
+
+
+
+ 总经理已审核通过
+
+
+
+
+ 销售员已确定完成,已群发,自动抄送
+
+
+
+
+ 审核被驳回的单子
+
+
+
+
+ 预约被取消的单子
+
+
+
+
+ 订单占用资源时,原来的暂定单被归档
+
+
+
+
+ 订单占用资源后,原来的单子被归档
+
+
+
+
+ 预订类型
+
+
+
+
+ 预订审核记录表
+ 抄送表
+
+
+
+
+ 递增主键
+
+
+
+
+ 类型:1-审核,2-抄送,3-消息回复
+
+
+
+
+ 创建时间
+
+
+
+
+ 审核人员/抄送接收人/回复操作人
+
+
+
+
+ 所属预订主单
+ 消息回复可为0
+
+
+
+
+ 审核状态(不适用抄送) :0-驳回,1-审核通过,2-转审批,3-抄送,10-江南春模式销售员重新提交,
+
+
+ 2021-5-17 自动 手动抄送都改为3,以前
+ 2021-10-9 新的江南春驳回状态为30
+ 为消息回复类型时 数据为0
+
+
+
+
+ 审核备注
+
+
+
+
+ 图片
+
+
+
+
+ 图片
+
+
+
+
+ 图片
+
+
+
+
+ 图片
+
+
+
+
+ 图片
+
+
+
+
+ 抄送发起人
+
+
+
+
+ 被手工回复的父结点
+
+
+
+
+ 预订审核结构
+
+
+
+
+ 递增主键
+
+
+
+
+ 审批类型[apptType.id]
+
+
+
+
+ 角色代码[uc_groupRes.op_group]
+
+
+
+
+ 角色名称[uc_groupRes.descript]
+
+
+
+
+ 所属父级:0-首审,
+
+
+
+
+ 是否支持转审:0-不支持,1-支持(当转审之后,不再回到审批流程)
+
+
+
+
+ 子结点
+
+
+
+
+ 餐饮预订明细实体
+
+
+
+
+ 自增主键
+
+
+
+
+ guid
+
+
+ 同一个订单的的(暂订单、确认单)GUID相同
+
+
+
+
+ 所属预订主单
+
+
+
+
+ 餐饮入场日期
+
+
+
+
+ 场次 如上午、下午、晚上存储结果为"1,2,3",早为“1”
+
+
+
+
+ 餐厅名称
+
+
+ 手输名称
+
+
+
+
+ 用餐地点
+
+
+
+
+ 用餐类型 0-桌数,1-人数
+
+
+
+
+ 桌数或人数数量
+
+
+
+
+ 每桌或每人单价
+
+
+
+
+ 餐饮-桌型
+
+
+
+
+ 酒水
+
+
+
+
+ 备注
+
+
+
+
+ 预订日志表实体
+
+
+
+
+ 自增主键
+
+
+
+
+ 数据表
+
+
+
+
+ 表主键值
+
+
+
+
+ 原始数据
+
+
+
+
+ 新数据
+
+
+
+
+ 创建时间
+
+
+
+
+ 操作人
+
+
+
+
+ 用户类型:0-普通用户,1-管理人员
+
+
+
+
+ 会议室预订明细实体
+
+
+
+
+ 自增主键
+
+
+
+
+ guid
+
+
+ 同一个订单的的(暂订单、确认单)GUID相同
+
+
+
+
+ 所属预订主单
+
+
+
+
+ 会议入场时间
+
+
+
+
+ 场次,如上午、下午、晚上存储结果为"1,2,3",早为“1”
+
+
+
+
+ 会议厅名称(手输或根据类型选择自动填入),手输不占用资源
+
+
+
+
+ 会议厅代码(手输类型时为空,不占用资源)
+
+
+
+
+ 会议室主席台位
+
+
+
+
+ 会议室-台型(课桌)
+
+
+
+
+ 人数:0-待定,
+
+
+
+
+ 单价
+
+
+
+
+ 横幅内容
+
+
+
+
+ 议厅备注
+
+
+
+
+ 预订备注扩展表
+
+
+
+
+ 递增主键
+
+
+
+
+ guid
+
+
+ 同一个订单的的(暂订单、确认单)GUID相同
+
+
+
+
+ 预订主键
+
+
+ appt_summary.id
+
+
+
+
+ 备注分类
+
+
+
+
+ 备注内容
+
+
+
+
+ 操作展示日志
+
+
+
+
+ 递增主键
+
+
+
+
+ 操作时间
+
+
+
+
+ 所属父级
+
+
+ 0-默认,
+ 其他-对操作备注进行追加备注
+
+
+
+
+ 预订单主键
+
+
+ appt_summary.id
+
+
+
+
+ 操作人账号
+
+
+
+
+ 操作人姓名
+
+
+
+
+ 提交前状态
+
+
+
+
+ 提交后状态
+
+
+
+
+ 备注内容
+
+
+
+
+ 变更的数据
+
+
+
+
+ 客房预订明细表实体
+
+
+
+
+ 自增主键
+
+
+
+
+ guid
+
+
+ 同一个订单的的(暂订单、确认单)GUID相同
+
+
+
+
+ 所属预订主单
+
+
+
+
+ 抵达时间
+
+
+
+
+ 离开时间
+
+
+
+
+ 房型(手输或根据类型选择自动填入),手输不占用资源
+
+
+
+
+ 选择房间类型(手输类型时为空,不占用资源)
+
+
+
+
+ 房间数量
+
+
+ 不占用资源的可以为0
+
+
+
+
+ 房间单价
+
+
+
+
+ 总早餐数:0-无早餐,
+
+
+
+
+ 长途电话:0-关,1-开,
+
+
+
+
+ 客房吧:0-关,1-开,
+
+
+
+
+ 客房备注
+
+
+
+
+ 温泉预订明细实体
+
+
+
+
+ 自增主键
+
+
+
+
+ guid
+
+
+ 同一个订单的的(暂订单、确认单)GUID相同
+
+
+
+
+ 所属预订主单
+
+
+
+
+ 温泉_日期
+
+
+
+
+ 总人数(自动计算):0-待定
+
+
+
+
+ spring_men
+
+
+
+
+ 女性人数:0-待定
+
+
+
+
+ 二次消费
+
+
+
+
+ 单价
+
+
+
+
+ 备注
+
+
+
+
+ 预订主单
+
+
+
+
+ 递增主键
+
+
+
+
+ guid
+
+
+ 同一个订单的的(暂订单、确认单)GUID相同
+
+
+
+
+ 所属用户
+
+
+
+
+ 创建时间
+
+
+
+
+ 预订类型[appt_type.id]
+ 1- 默认模式,
+ 2- 江南春模式,
+
+
+
+
+ 审核状态:见EnumAuditorStatus
+
+
+
+
+ 待审核角色id:0-无 appt_type
+
+
+ 江南春模式=0
+
+
+
+
+ 转审账号(当有转审时,将AuditorId=0)
+
+
+
+
+ 订单类型预留字段
+
+
+
+
+ 编号(生成确认单时产生)
+
+
+
+
+ 组织单位
+
+
+
+
+ 公司地址
+
+
+
+
+ 订单名称
+
+
+
+
+ 组织负责人
+
+
+
+
+ 组织负责人电话
+
+
+
+
+ 会议组房号
+
+
+
+
+ 营销部跟单人(发起人)
+
+
+
+
+ 营销部跟单电话
+
+
+
+
+ 营销总监 手工写
+
+
+
+
+ 客房总备注
+
+
+
+
+ 会议室总备注
+
+
+
+
+ 餐饮总备注
+
+
+
+
+ 温泉总备注
+
+
+
+
+ 编辑之前的主键
+
+
+
+
+ 团队编号
+
+
+ 2021-6-16 江南春模式有效
+
+
+
+
+ 预定信息最小开始日期
+
+
+
+
+ 预定信息最大结果日期
+
+
+
+
+ 申请OA单状态:0-未占用资源,1-已占用资源
+
+
+
+
+ 为销售员再次编辑提交的时间,文件对比中使用该时间,显示什么时候改了内容
+
+
+
+
+ 客房预订明细列表
+
+
+
+
+ 会议室预订明细列表
+
+
+
+
+ 餐饮预订明细列表
+
+
+
+
+ 温泉预订明细列表
+
+
+
+
+ 自定义备注
+
+
+
+
+ 审核类型
+
+
+ 建议:
+ 根据ApptName(预订类型名称) 判断审核模式
+
+ ApptName:
+ DefaultAuditProcess - 标准审核流程,最后一级审核通过后,占用资料,实现抄送,支持转审批(跳转审核流程);
+ JNCcustom - 江南春模式,
+
+
+
+
+ 递增主键
+
+
+
+
+ 预订类型名称
+
+
+
+
+ 备注说明
+
+
+
+
+ 团队表实体
+
+
+
+
+ 团队账号
+
+
+
+
+ 状态:R-预订,I-在住
+
+
+
+
+ 团名
+
+
+
+
+ 团名(英文)首字母自动生成
+
+
+
+
+ 代号
+
+
+
+
+ 预订号
+
+
+
+
+
+
+
+ 默认与Accnt一致
+
+
+
+
+ 来源
+
+
+
+
+ 市场码
+
+
+
+
+ 抵达时间
+
+
+
+
+ 离开时间
+
+
+
+
+ 国家
+
+
+ 默认:CN
+
+
+
+
+ 籍贯编号
+
+
+ 默认:null
+
+
+
+
+ 地址
+
+
+
+
+ 领队
+
+
+
+
+ 领队电话
+
+
+
+
+ 人数
+
+
+
+
+ 房数
+
+
+
+
+ 单位号
+
+
+
+
+ 单位名称
+
+
+
+
+ 付款码
+
+
+ 现金:9001
+
+
+
+
+ 备注说明
+
+
+
+
+ 创建时间
+
+
+
+
+ 更新次数
+
+
+
+
+ 操作账号
+
+
+
+
+
+
+
+ 默认1
+
+
+
+
+ 操作IP
+
+
+
+
+ 最后操作时间
+
+
+ 默认为创建时间
+
+
+
+
+
+
+
+ 默认:"团队"
+
+
+
+
+ 主账房
+
+
+
+
+ IVP
+
+
+ 默认0
+
+
+
+
+
+
+
+ 默认0
+
+
+
+
+ 特殊要求代码
+
+
+
+
+ 应收账号
+
+
+
+
+ 销售员编号
+
+
+
+
+ 总消费
+
+
+
+
+
+
+
+
+
+ 余额,合计余额
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 允许POS账转入:T/F
+
+
+
+
+ 房价码
+
+
+
+
+ package码
+
+
+
+
+ 入住客户表
+
+
+
+
+ 入住信息的账号
+
+
+
+
+ 入住状态:R-预订, I-在住, O-结账, D-待删, H-历史,C-取消,
+
+
+
+
+ 系统时间
+
+
+
+
+ 宾客姓名
+
+
+
+
+ 操作管理员账号
+
+
+
+
+ 操作管理员名称
+
+
+
+
+ 班别
+
+
+
+
+ 日志操作IP
+
+
+
+
+ 取消预定单是,录入的取消信息
+
+
+
+
+ 入住信息的账号
+
+
+
+
+ 订单操作次数,默认1
+
+
+
+
+ 宾客姓名
+
+
+
+
+ 操作备注
+
+
+
+
+ 操作管理员账号
+
+
+
+
+ 操作管理员名称
+
+
+
+
+ 班别
+
+
+
+
+ 创建日志时间
+
+
+
+
+ 日志操作IP
+
+
+
+
+ 系统时间
+
+
+
+
+ 会议厅
+
+
+
+
+ 会议厅代码
+
+
+
+
+ 代码:A-会议室,B-会议室设备,C-汽车,D-自行车.
+
+
+
+
+ 厅名称
+
+
+
+
+ 状态:T-有效,
+
+
+
+
+ 价格
+
+
+
+
+ 会议室流水
+
+
+
+
+ 会议室流水号
+
+
+
+
+ 状态:R-预订
+
+
+
+
+ 订单号
+
+
+
+
+ 会议室代码[res_code.code]
+
+
+
+
+ 数量
+
+
+
+
+ 开始日期
+
+
+
+
+ 结束日期
+
+
+
+
+ 开始场次
+
+
+
+
+ 结束场次
+
+
+
+
+ 开始时间
+
+
+
+
+ 结束时间
+
+
+
+
+ 会场备注
+
+
+
+
+ 价格
+
+
+
+
+ 价格
+
+
+
+
+ 是否入账:T/F
+
+
+
+
+ 操作账号
+
+
+
+
+ 操作人员姓名
+
+
+
+
+ 操作时间
+
+
+
+
+ 房类实体(部分)
+
+
+
+
+ 房类代码
+
+
+
+
+ 房类中文描述(中文名称)
+
+
+
+
+ 房类英文描述
+
+
+
+
+ 门市价
+
+
+
+
+ 优惠价
+
+
+
+
+ 超预订
+
+
+
+
+ 总房数
+
+
+
+
+ 钟点房起步时间
+
+
+
+
+ 钟点房基本价
+
+
+
+
+ 每小时单价
+
+
+
+
+ 钟点房最长时间
+
+
+
+
+ 钟点房选项(可手动录入):T/F
+
+
+
+
+ 排序号(升序)
+
+
+
+
+ 大房类
+
+
+
+
+ 客房打扫工作量
+
+
+
+
+ 中央预定最大可用房数
+
+
+
+
+ 房类描述
+
+
+
+
+ 销售人员表实体
+
+
+
+
+ 自增主键
+
+
+
+
+ 姓名
+
+
+
+
+ 其他描述
+
+
+
+
+ 对应操作员,注意:uc_login也添加了Saleid,两种对应方式,有点重复了
+
+
+
+
+ 综合数据
+
+
+
+
+ 类型
+
+
+
+
+ 编号
+
+
+
+
+ 用户组别
+
+
+
+
+ 代码
+
+
+
+
+ 名称
+
+
+
+
+ 描述
+
+
+
+
+ 工作人员
+
+
+
+
+ 账号
+
+
+
+
+ 姓名
+
+
+
+
+ 密码
+
+
+
+
+ 组别
+
+
+
+
+ 部门
+
+
+
+
+ 账号锁定:T/F
+
+
+
+
+ 密码提示
+
+
+
+
+ 提示答案
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 登录显示邮件提示
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 员工工号
+
+
+
+
+ 手机号
+
+
+
+
+ 微信小程序openid
+
+
+
+
+ 用户所属销售员
+
+
+
+
+ 授权服务号状态,用于消息推送
+
+
+
+
+ OA是否可做为被转审人
+
+
+
+
+ OA是否可做为被抄送人
+
+
+
+
+ 部门备注自动发送以#隔离
+
+
+
+
+ 创建订单入参
+
+
+
+
+ [必填] 客户端保存用户信息
+
+
+
+
+ [必填] 客户端保存用户信息
+
+
+
+
+ 申请确定单入参 | 预定部对预定单进行审批通过 | 其他部门审批通过 | 驳回
+
+
+
+
+ [必填] 客户端保存用户信息
+
+
+
+
+ [必填] 预订单主键
+
+
+
+
+ 申请确定单备注
+
+
+
+
+ 申请确定单图片备注(最多5张)
+
+
+
+
+ 获取实体入参 | 订单对比 | 根据回复编号获取回复中的图片列表
+
+
+
+
+ 客户端保存用户信息
+
+
+
+
+ 预订单主键
+
+
+
+
+ 图标状态:0-未提交,1-审核中,2-通过,3-驳回;4-取消;
+
+
+
+
+ 分页入参
+
+
+
+
+ [必填]客户端保存用户信息
+
+
+
+
+ 当前页从1开始(默认1)
+
+
+
+
+ 页大小(默认10)
+
+
+
+
+ 查询标签
+
+
+
+
+ 开始日期(包含当日,默认全部)[格式 2021-06-24]
+
+
+
+
+ 截止日期(包含当日,默认全部)[格式 2021-06-24]
+
+
+
+
+ 预订单编号
+
+
+
+
+ 搜索
+
+
+
+
+ 生成确认单入参
+
+
+
+
+ 客户端保存用户信息
+
+
+
+
+ 预订单主键
+
+
+
+
+ 客户端保存用户信息
+
+
+
+
+ 预订单主键
+
+
+
+
+ 审核状态:1-审核通过,2-驳回
+
+
+
+
+ 备注
+
+
+
+
+ 销售员修改确订单或驳回订单入参
+
+
+
+
+ 客户端保存用户信息
+
+
+
+
+ 预订单主键
+
+
+
+
+ 备注
+
+
+
+
+ 是否有审核权限:0-否,1-是,
+
+
+
+
+ 是否有修改权限:0-否,1-是,
+
+
+
+
+ 是否可提交审核:0-不可,1-可以,
+
+
+
+
+ 是否显示生成完成单:0-不显示,1-显示
+
+
+
+
+ 取消订单功能显示:0-不显示,1-显示
+
+
+
+
+ 返回的日志记录
+
+
+
+
+ 日志编号
+
+
+
+
+ 标题
+
+
+
+
+ 状态:1-已操作,2-待操作
+
+
+
+
+ 修改信息
+
+
+
+
+ 图片
+
+
+
+
+ 手动回复的信息列表
+
+
+
+
+ 手动回复信息 数据类型
+
+
+
+
+ 创建时间
+
+
+
+
+ 审核人员/抄送接收人/回复操作人
+
+
+
+
+ 回复信息内容的主键
+
+
+
+
+ 审核备注
+
+
+
+
+ 图片数量
+
+
+
+
+ 订单数据对比返回数据类型
+
+
+
+
+ 客户端保存用户信息
+
+
+
+
+ 订单的guid
+
+
+
+
+ 状态:0-获取暂订单与最新确认单的对比,
+
+
+
+
+ 信息回复 入参
+
+
+
+
+ [必填] 客户端保存用户信息
+
+
+
+
+ 被回复的主键
+
+
+
+
+ 回复内容
+
+
+
+
+ 图片
+
+
+
+
+ 被抄送的预订主键
+
+
+
+
+ 客户端保存用户信息
+
+
+
+
+ 抄送到账号
+
+
+
+
+ 抄送备注
+
+
+
+
+ 预订申请提交表单
+
+
+
+
+ 自增主键
+
+
+
+
+ 客户端保存用户信息
+
+
+
+
+ 组织单位
+
+
+
+
+ 公司地址
+
+
+
+
+ 会议名称
+
+
+
+
+ 组织负责人
+
+
+
+
+ 组织负责人电话
+
+
+
+
+ 会议组房号
+
+
+
+
+ 客房总备注
+
+
+
+
+ 议室总备注
+
+
+
+
+ 餐饮总备注
+
+
+
+
+ 温泉总备注
+
+
+
+
+ 驳回备注
+
+
+
+
+ 会议室预订明细列表
+
+
+
+
+ 客房预订明细列表
+
+
+
+
+ 餐饮预订明细列表
+
+
+
+
+ 温泉预订明细列表
+
+
+
+
+ 其他备注
+
+
+
+
+ 提交人
+
+
+
+
+ 销售人员姓名
+
+
+
+
+ 销售人员姓名电话
+
+
+
+
+ 审核状态:1-待审核,2-审核中,3-审核通过,4-驳回,
+
+
+
+
+ 创建时间
+
+
+
+
+ 会议室预订明细
+
+
+
+
+ 自增主键
+
+
+
+
+ 会议入场日期
+
+
+
+
+ 场次:1-上午,2-下午,3-晚上
+
+
+
+
+ 会议厅名称(手输或根据类型选择自动填入),手输不占用资源
+
+
+
+
+ 会议厅代码(手输类型时为空,不占用资源)
+
+
+
+
+ 会议室主席台位
+
+
+
+
+ 会议室-台型(课桌)
+
+
+
+
+ 人数:0-待定,
+
+
+
+
+ 单价
+
+
+
+
+ 横幅内容:
+
+
+
+
+ 会议厅备注
+
+
+
+
+ 客房预订明细
+
+
+
+
+ 自增主键
+
+
+
+
+ 抵达时间
+
+
+
+
+ 离开时间
+
+
+
+
+ 房型(手输或根据类型选择自动填入),手输不占用资源
+
+
+
+
+ 选择房间类型(手输类型时为空,不占用资源)
+
+
+
+
+ 房间数量
+
+
+
+
+ 房间单价[当输入为0时,会根据房类代码获取优惠价]
+
+
+
+
+ 总早餐数:0-无早餐,
+
+
+
+
+ 长途电话:0-关,1-开,
+
+
+
+
+ 房吧:0-关,1-开,
+
+
+
+
+ 总温泉数:0-无,
+
+
+
+
+ 客房备注
+
+
+
+
+ 餐饮预订明细
+
+
+
+
+ 自增主键
+
+
+
+
+ 用餐日期
+
+
+
+
+ 晚上
+ 场次:1-上午,2-下午,3-晚上
+
+
+
+
+ 餐厅名称(手输或根据类型选择自动填入),手输不占用资源
+
+
+
+
+ 用餐地点(手输类型时为空,不占用资源)
+
+
+
+
+ 用餐类型 0-桌数,1-人数
+
+
+
+
+ 桌数或人数数量
+
+
+
+
+ 每桌或每人单价
+
+
+
+
+ 桌型
+
+
+
+
+ 酒水
+
+
+
+
+ 备注
+
+
+
+
+ 温泉预订明细
+
+
+
+
+ 自增主键
+
+
+
+
+ 温泉_日期
+
+
+
+
+ 总人数(自动计算):0-待定
+
+
+
+
+ spring_men
+
+
+
+
+ 女性人数:0-待定
+
+
+
+
+ 二次消费
+
+
+
+
+ 单价
+
+
+
+
+ 备注
+
+
+
+
+ 备注名称
+
+
+
+
+ 备注内容
+
+
+
+
+ 预订类型添加
+
+
+
+
+ 类型名称
+
+
+
+
+ 备注说明
+
+
+
+
+ 启始时间(默认从昨天开始)
+
+
+
+
+ 截止时间(默认截止到3个月后)
+
+
+
+
+ 删除预订请求参数
+
+
+
+
+ 要删除的预订对应的主键
+
+
+
+
+ 删除的类型:1-预订主单与详情,2-客房详情,3-会议详情,4-餐饮详情,5-温泉详情
+
+
+
+
+ 预订审核
+
+
+
+
+ 要审核的主键
+
+
+
+
+ 客户端保存用户信息
+
+
+
+
+ 审核状态:1-审核通过,0-驳回,
+
+
+
+
+ 审核说明
+
+
+
+
+ 绑定用户
+
+
+
+
+ 客户端保留用户信息
+
+
+
+
+ 日期时间
+
+
+
+
+ int型
+
+
+
+
+ id
+
+
+
+
+ 分页
+
+
+
+
+ 获取会议室资源
+
+
+
+
+ 起始时间
+
+
+
+
+ 截止时间(包含当天)
+
+
+
+
+ 客户端保留用户信息
+
+
+
+
+ 我发起的预订
+
+
+
+
+ 当前页从1开始
+
+
+
+
+ 页大小
+
+
+
+
+ 客户端保存用户信息
+
+
+
+
+ 审核状态:null/0-全部,1-审订中,2-审核通过,3-驳回,6-取消
+
+
+ EnumAuditorStatus
+
+
+
+
+ 与我有关的预订
+
+
+
+
+ 当前页从1开始
+
+
+
+
+ 页大小
+
+
+
+
+ 客户端保存用户信息
+
+
+
+
+ 审核状态:0-我的审核,1-待我审核,2-我抄送的,3-抄送给我的
+
+
+ EnumAuditorStatus
+
+
+
+
+ 转审
+
+
+
+
+ 要审核的主键
+
+
+
+
+ 客户端保存用户信息
+
+
+
+
+ 转审给哪个账号
+
+
+
+
+ 审核说明
+
+
+
+
+ 根据日期与场次获取可用会议厅资源
+
+
+
+
+ 日期
+
+
+
+
+ 场次
+
+
+
+
+ 占用状态:0-默认,只返回未占用的,1-返回所有 由Numbers判断是否被占用
+
+
+
+
+ 获取客房资源
+
+
+
+
+ 起始时间
+
+
+
+
+ 截止时间(包含当天)
+
+
+
+
+ 账号密码登录入参
+
+
+
+
+ 用户名
+
+
+
+
+ 密码
+
+
+
+
+ 微信小程序wx.login下的code,实现首次授权
+
+
+
+
+ 酒店id
+
+
+
+
+ 微信Code登录
+
+
+
+
+ 微信Code登录
+
+
+
+
+ 酒店id
+
+
+
+
+ 返回审批流程记录
+
+
+
+
+ 预订编号
+
+
+
+
+ 预订申请时间
+
+
+
+
+ 预订申请人姓名
+
+
+
+
+ 状态 EnumAuditorStatus
+
+
+
+
+ 作废时产生的新单子名称
+
+
+
+
+ 审批流程
+
+
+
+
+ 编号
+
+
+
+
+ 创建时间
+
+
+
+
+ 操作人员姓名
+
+
+
+
+ 审核状态:0-驳回,1-审核通过,2-转审批,3-待审批
+
+
+
+
+ 用户登录返回结果
+
+
+
+
+ 用户账号
+
+
+
+
+ 用户名称
+
+
+
+
+ 用户组别
+
+
+
+
+ 酒店id
+
+
+
+
+ 绑定微信服务号状态:0-未绑定,1-绑定
+
+
+
+
+ 明文小程序AppId
+
+
+
+
+ 用户角色:0-全部;1-审核员;
+
+
+ 预留:2-销售员
+
+
+
+
+ 加密后的用户信息
+
+
+
+
+ 会议室资源
+
+
+
+
+ 资源代码
+
+
+
+
+ 资源名称
+
+
+
+
+ 使用状态:R-预定
+
+
+
+
+ 当天3场使用状态
+
+
+
+
+ 日期
+
+
+
+
+ 状态:第1场,第2场,第3场 状态
+
+
+
+
+ 存储过程返回数据
+
+
+
+
+ 资源类型代码:A-会议室,B-会议室设备,C-汽车,D-自行车.
+
+
+
+
+ 资源编码
+
+
+
+
+ 资源名称
+
+
+
+
+ 第一天 上午场
+
+
+
+
+ 第一天 下午场
+
+
+
+
+ 第一天 晚上场
+
+
+
+
+ 第二天 上午场
+
+
+
+
+ 第二天 下午场
+
+
+
+
+ 第二天 晚上场
+
+
+
+
+ 第三天 上午场
+
+
+
+
+ 第三天 下午场
+
+
+
+
+ 第三天 晚上场
+
+
+
+
+ 第四天 上午场
+
+
+
+
+ 第四天 下午场
+
+
+
+
+ 第四天 晚上场
+
+
+
+
+ 第五天 上午场
+
+
+
+
+ 第五天 下午场
+
+
+
+
+ 第五天 晚上场
+
+
+
+
+ 第六天 上午场
+
+
+
+
+ 第六天 下午场
+
+
+
+
+ 第六天 晚上场
+
+
+
+
+ 第七天 上午场
+
+
+
+
+ 第七天 下午场
+
+
+
+
+ 第七天 晚上场
+
+
+
+
+ 第八天 上午场
+
+
+
+
+ 第八天 下午场
+
+
+
+
+ 第八天 晚上场
+
+
+
+
+ 第九天 上午场
+
+
+
+
+ 第九天 下午场
+
+
+
+
+ 第九天 晚上场
+
+
+
+
+ 返回组别
+
+
+
+
+ 代码
+
+
+
+
+ 名称
+
+
+
+
+ 描述
+
+
+
+
+ 会议厅中间转换
+
+
+
+
+ 日期
+
+
+
+
+ 房型
+
+
+
+
+ 排序
+
+
+
+
+ 可卖数(可用数量)
+
+
+
+
+ 类型名称
+
+
+
+
+ 价格
+
+
+
+
+ 总房数
+
+
+
+
+ 微信用户Openid
+
+
+
+
+ 用户信息
+
+
+
+
+ 微信公共号Code
+
+
+
+
+ 200-成功,400-出错,
+
+
+
+
+ 返回信息:正确、错误都提示
+
+
+
+
+ 信息
+
+
+
+
+ 通过爱住接口获取Accesstoken
+
+
+
+
+
+ 获取到的access_token
+
+
+
+
+ 获取时间
+
+
+
+
+ 微信授权返回结果
+
+
+
+
+ 网页授权接口调用凭证,注意:此access_token与基础支持的access_token不同
+
+
+
+
+ access_token接口调用凭证超时时间,单位(秒)
+ 错误时不返回
+
+
+
+
+ 用户刷新access_token
+
+
+
+
+ 用户唯一标识
+
+
+
+
+ 用户授权的作用域,使用逗号(,)分隔
+
+
+
+
+ 错误码:返回码
+ 正确时不返回
+
+
+
+
+ 错误信息
+
+
+
+
+ 获取服务号AccessToken
+
+ 强制刷新
+
+
+
+
+ 发送模板消息返回结果
+
+
+
+
+ 返回代码,0-发送成功
+
+
+
+
+ 返回消息:"ok"-成功
+
+
+
+
+ 发送成功返回编号:失败不返回
+
+
+
+
+ 接口返回数据标准
+
+
+
+
+ 响应状态:true-成功执行,flase-响应异常
+
+
+
+
+ 是否有效执行以IsSuccess为基准
+ 200-有效执行,500-服务错误
+
+
+ 此属性为定制化返回代码,例如登录成功并需要返回提示修改密码等相关类似的业务
+
+
+
+
+ 返回消息文本内容
+
+
+
+
+ 返回数据
+
+
+
+
+ 构造函数
+
+
+
+
+
+
+
+ 成功执行
+
+
+
+
+
+
+
+ 执行错误
+
+
+
+
+
+
+
+
+ 接口返回数据标准
+
+
+
+
+
+ 响应状态:true-成功执行,flase-响应异常
+
+
+
+
+ 是否有效执行以IsSuccess为基准
+ 200-有效执行,500-服务错误
+
+
+ 此属性为定制化返回代码,例如登录成功并需要返回提示修改密码等相关类似的业务
+
+
+
+
+ 返回消息文本内容
+
+
+
+
+ 返回数据
+
+
+
+
+ 构造函数
+
+
+
+
+
+
+
+ 执行成功
+
+
+
+
+
+
+
+ 出现错误
+
+
+
+
+
+
+
+
+ 公共Msg
+
+
+
+
+ 参数无效
+
+
+
+
+ 缺少参数
+
+
+
+
+ 没有权限
+
+
+
+
+ 没有数据
+
+
+
+
+ 数据不正确
+
+
+
+
+ 缓存配置文件
+
+
+
+
+ 缓存配置文件创建时间
+
+
+
+
+ 缓存配置文件失效时间
+
+
+
+
+ 获取配置信息(必项)
+
+
+ 当不存在或为空是输出异常
+
+
+
+ 获取配置文件
+
+
+ 默认返回值
+ 当不存在的配置项会返回null
+
+ 获取实例:
+ BaseConfig.App(new string[] { "Logging" });
+ BaseConfig.App(new string[] { "Logging", "LogLevel" });
+
+
+
+
+ 递归获取配置信息数组
+
+
+
+
+
+
+
+ MD5小写加密
+
+ 加密前字符串
+
+
+ 使用了UTF8格式
+
+
+
+
+ MD5大写加密
+
+
+
+
+ 字符串转为ASCII再加密
+ 与前面方法Md5()的区别是汉字加密后的结构不一致,
+
+
+
+
+ DES加密字符串
+
+ 待加密的字符串
+ 加密密钥,要求为8位
+ 加密成功返回加密后的字符串,失败返回源串
+
+
+
+ DES解密字符串
+
+ 待解密的字符串
+ 解密密钥,要求为8位,和加密密钥相同
+ 解密成功返回解密后的字符串,失败返源串
+
+
+
+ 获取sql server最小时间
+
+
+
+
+ 上下文分页类型
+
+
+
+ Add:yuangb 2017-3-1
+
+
+
+
+ 获取图片域名
+
+
+
+
+
+ 获取图片保存服务器完整路径
+
+
+
+
+
+ 保存图片
+
+ 图片BASE64
+ NULL-保存图片异常,""-没有图片,其他-保存后的路径
+
+
+
+ 正则表达式
+
+
+
+
+ 判断是否为手机号码
+
+ 字符串
+ True-是,False-否
+
+ Add:yuangb 2016-6-12
+
+
+
+
+ 去除对象字符串后面的空格
+
+
+
+
+
+
+
+ 得到一个汉字的拼音第一个字母,如果是一个英文字母则直接返回大写字母
+
+ 单个汉字
+ 单个大写字母
+
+
+
+ 根据小程序登录code获取用户信息
+
+
+
+
+
+
+ 模版信息
+
+
+
+
+
+ 验证的执行
+
+
+ Add:yuangb 2019-3-5
+
+
+
+
+ 全部实体属性根据特性校验
+
+
+ 验证的实体
+
+
+
+
+ 指定实体的属性名称,根据特性进行校验
+
+
+ 验证的实体
+ 实体的属性名称
+
+
+
+
+ 使用委托,全部实体属性根据特性校验
+
+
+ 验证的实体
+ 一个ApiResult入参,一个ApiResult返回值的委托
+
+
+
+
+ 忽略HTML标签
+
+
+ Add:yuangb 2019-10-15
+
+
+
+
+ 整型数值值范围效验
+
+
+ Add:yuangb 2019-3-11
+ 使用格式:实体属性前加[IntValue(minValue: 1000, maxValue: 999999, ErrorMessage = "验证码长度不正确")]
+
+
+
+
+ 报错提示
+
+
+
+
+ 最小值(包含)
+
+
+
+
+ 最大值(包含)
+
+
+
+
+
+
+ 最小值(包含)
+ 最大值(包含)
+
+
+
+ 手机格式校验
+ 注意:当存在内容时才校验,如果为必填信息,请同时使用必填特性
+
+
+ Add:yuangb 2019-3-11
+ 使用格式:实体属性前加 [Phone(ErrorMessage = "手机号码不正确")]
+
+
+
+
+ 报错提示信息
+
+
+
+
+ 字符串长度校验特性
+
+
+ Add:yuangb 2019-3-5
+ 使用格式:实体属性前加[StringLength(50, MinLength = 2, ErrorMessage = "获取微信用户信息失败")]
+
+
+
+
+ 最小长度
+
+
+
+
+ 报错提示
+
+
+
+
+ 字符串最大长度
+
+
+ Add:yuangb 2020-12-9
+ 使用格式:实体属性前加 [StringMaxLength(200, ErrorMessage = "备注说明最大长度200个字符")]
+
+
+
+
+ 报错提示
+
+
+
+
+ 必填项
+
+
+ Add:yuangb 2019-3-11
+ [StringRequired(ErrorMessage ="状态不能为空")]
+
+
+
+
+ 报错提示信息
+
+
+
+
+ 特性基类
+
+
+ Add:yuangb 2019-3-5
+
+
+
+
diff --git a/api_v1/Appointment.Entity/Enum/CommEnum.cs b/api_v1/Appointment.Entity/Enum/CommEnum.cs
new file mode 100644
index 0000000..c8c98f8
--- /dev/null
+++ b/api_v1/Appointment.Entity/Enum/CommEnum.cs
@@ -0,0 +1,168 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ public enum EnumCommStatus
+ {
+ 屏蔽 = 0,
+ 有效 = 1,
+ }
+
+ public enum EnumAuditorStatus
+ {
+ 全部 = 0,
+
+ // 常规流程
+
+ //保存 = 0,
+ //待审核 = 1,
+ 审核中 = 2,
+ 审核通过 = 3,
+ 驳回 = 4,
+ 作废 = 5,
+ 取消 = 6,
+
+
+
+
+ // 江南春模式
+
+ // ---- 以下为暂定单状态,一个单子必有其一
+
+ ///
+ /// 暂订单
+ ///
+ ///
+ /// 销售人员创建,
+ /// 创建完成后,提示是保存还是提交
+ ///
+ 江南春模式暂订单 = 20,
+
+ ///
+ /// 待审核的暂订单
+ ///
+ ///
+ /// 暂订单提交之后,待生成确订单
+ /// 只有待状态下的订单才能生成确定单
+ ///
+ 江南春模式暂订单审核中 = 21,
+
+ ///
+ /// 暂订单已提交
+ ///
+ 江南春模式暂订单已生成确定单 = 22,
+
+ 江南春模式暂订单驳回 = 23,
+
+ // ---- 以下为确认单状态,
+
+ ///
+ /// 预定处根据销售提示的暂定单编号 及订金生成
+ ///
+ ///
+ /// 销售人员提供单号
+ /// 客户交订金
+ /// 预定处办理
+ /// 占用资源
+ ///
+ 江南春模式确定单 = 30,
+
+ 江南春模式销售申请OA单 = 31,
+
+ 江南春模式销售经理审核中 = 32,
+
+ 江南春模式财务经理审核中 = 33,
+
+ 江南春模式财务总监审核中 = 34,
+
+ 江南春模式总经理审核中 = 35,
+
+ 江南春模式完成预定 = 36,
+
+ 江南春模式历史单 = 37,
+
+ 江南春模式确定单驳回 = 38,
+
+ }
+
+ ///
+ /// 江南春流程状态
+ ///
+ public enum EnumAuditorJncStatus
+ {
+ 全部 = 0,
+
+ // ---- 江南春流程
+ ///
+ /// 销售员保存单
+ ///
+ 暂订单 = 20,
+
+ ///
+ /// 业务员已提交申请审核
+ ///
+ 审核单申请 = 21,
+
+ ///
+ /// 预定部已审核通过
+ ///
+ 审核单预定部 = 22,
+
+ ///
+ /// 销售经理已审核通过
+ ///
+ 审核单销售经理 = 23,
+
+ ///
+ /// 财务经理已审核通过
+ ///
+ 审核单财务经理 = 24,
+
+ ///
+ /// 财务总监已审核通过
+ ///
+ 审核单财务总监 = 25,
+
+ ///
+ /// 总经理已审核通过
+ ///
+ 确定单 = 26,
+
+ ///
+ /// 销售员已确定完成,已群发,自动抄送
+ ///
+ 完成单 = 27,
+
+
+
+ ///
+ /// 审核被驳回的单子
+ ///
+ 驳回单 = 30,
+
+ ///
+ /// 预约被取消的单子
+ ///
+ 取消单 = 31,
+
+ ///
+ /// 订单占用资源时,原来的暂定单被归档
+ ///
+ 归档暂定单 = 32,
+
+ ///
+ /// 订单占用资源后,原来的单子被归档
+ ///
+ 归档资源单 = 33,
+ }
+
+ public enum EnumSysCodeClass
+ {
+ ///
+ /// 预订类型
+ ///
+ apptremark
+ }
+}
diff --git a/api_v1/Appointment.Entity/Model/ApptAuditLog.cs b/api_v1/Appointment.Entity/Model/ApptAuditLog.cs
new file mode 100644
index 0000000..bc25959
--- /dev/null
+++ b/api_v1/Appointment.Entity/Model/ApptAuditLog.cs
@@ -0,0 +1,99 @@
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 预订审核记录表
+ /// 抄送表
+ ///
+ [Serializable]
+ [SugarTable("appt_audit_log")]
+ public class ApptAuditLog
+ {
+ ///
+ /// 递增主键
+ ///
+ [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
+ public int Id { get; set; }
+
+ ///
+ /// 类型:1-审核,2-抄送,3-消息回复
+ ///
+ public int Type { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime { get; set; }
+
+ ///
+ /// 审核人员/抄送接收人/回复操作人
+ ///
+ public string UserId { get; set; }
+
+ ///
+ /// 所属预订主单
+ /// 消息回复可为0
+ ///
+ [SugarColumn(ColumnName = "appt_id")]
+ public int ApptId { get; set; }
+
+
+
+ ///
+ /// 审核状态(不适用抄送) :0-驳回,1-审核通过,2-转审批,3-抄送,10-江南春模式销售员重新提交,
+ ///
+ ///
+ /// 2021-5-17 自动 手动抄送都改为3,以前
+ /// 2021-10-9 新的江南春驳回状态为30
+ /// 为消息回复类型时 数据为0
+ ///
+ [SugarColumn(ColumnName = "auditor_status")]
+ public int AuditorStatus { get; set; }
+
+ ///
+ /// 审核备注
+ ///
+ public string Remark { get; set; }
+
+ ///
+ /// 图片
+ ///
+ public string Pic0 { get; set; }
+
+ ///
+ /// 图片
+ ///
+ public string Pic1 { get; set; }
+
+ ///
+ /// 图片
+ ///
+ public string Pic2 { get; set; }
+
+
+
+ ///
+ /// 图片
+ ///
+ public string Pic3 { get; set; }
+
+ ///
+ /// 图片
+ ///
+ public string Pic4 { get; set; }
+
+ ///
+ /// 抄送发起人
+ ///
+ public string Source { get; set; }
+
+ ///
+ /// 被手工回复的父结点
+ ///
+ public int PId { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Model/ApptAuditor.cs b/api_v1/Appointment.Entity/Model/ApptAuditor.cs
new file mode 100644
index 0000000..633d3b4
--- /dev/null
+++ b/api_v1/Appointment.Entity/Model/ApptAuditor.cs
@@ -0,0 +1,59 @@
+using Appointment.Entity.ValidateAttribute;
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 预订审核结构
+ ///
+ [Serializable]
+ [SugarTable("appt_auditor")]
+ public class ApptAuditor
+ {
+ ///
+ /// 递增主键
+ ///
+ [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
+ public int Id { get; set; }
+
+ ///
+ /// 审批类型[apptType.id]
+ ///
+ [SugarColumn(ColumnName = "Appt_type_id")]
+ public int ApptTypeId { get; set; }
+
+ ///
+ /// 角色代码[uc_groupRes.op_group]
+ ///
+ [StringLength(50, MinLength = 2, ErrorMessage = "角色代码必须为2~50个字符")]
+ [SugarColumn(ColumnName = "op_group")]
+ public string OpGroup { get; set; }
+
+ ///
+ /// 角色名称[uc_groupRes.descript]
+ ///
+ [StringLength(50, MinLength = 2, ErrorMessage = "角色名称必须为2~50个字符")]
+ [SugarColumn(ColumnName = "op_descript")]
+ public string OpDescript { get; set; }
+
+ ///
+ /// 所属父级:0-首审,
+ ///
+ [SugarColumn(ColumnName = "pid")]
+ public int Pid { get; set; }
+
+ ///
+ /// 是否支持转审:0-不支持,1-支持(当转审之后,不再回到审批流程)
+ ///
+ public int Custom { get; set; }
+
+ ///
+ /// 子结点
+ ///
+ [SugarColumn(IsIgnore = true)]
+ public ApptAuditor Child { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Model/ApptCatering.cs b/api_v1/Appointment.Entity/Model/ApptCatering.cs
new file mode 100644
index 0000000..d6924fd
--- /dev/null
+++ b/api_v1/Appointment.Entity/Model/ApptCatering.cs
@@ -0,0 +1,99 @@
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 餐饮预订明细实体
+ ///
+ [Serializable]
+ [SugarTable("appt_catering")]
+ public class ApptCatering
+ {
+ ///
+ /// 自增主键
+ ///
+ [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
+ public int? Id { get; set; }
+
+ ///
+ /// guid
+ ///
+ ///
+ /// 同一个订单的的(暂订单、确认单)GUID相同
+ ///
+ public string Guid { get; set; }
+
+ ///
+ /// 所属预订主单
+ ///
+ [SugarColumn(ColumnName = "appt_id")]
+ public int? ApptId { get; set; }
+
+ ///
+ /// 餐饮入场日期
+ ///
+ [SugarColumn(ColumnName = "catering_time")]
+ public DateTime CateringTime { get; set; }
+
+ ///
+ /// 场次 如上午、下午、晚上存储结果为"1,2,3",早为“1”
+ ///
+ public string Groups { get; set; }
+
+
+
+ ///
+ /// 餐厅名称
+ ///
+ ///
+ /// 手输名称
+ ///
+ [SugarColumn(ColumnName = "catering_room")]
+ public string CateringRoom { get; set; }
+
+ ///
+ /// 用餐地点
+ ///
+ [SugarColumn(ColumnName = "catering_code")]
+ public string CateringCode { get; set; }
+
+ ///
+ /// 用餐类型 0-桌数,1-人数
+ ///
+ [SugarColumn(ColumnName = "catering_type")]
+ public int CateringType { get; set; }
+
+ ///
+ /// 桌数或人数数量
+ ///
+ [SugarColumn(ColumnName = "catering_num")]
+ public int CateringNum { get; set; }
+
+ ///
+ /// 每桌或每人单价
+ ///
+ [SugarColumn(ColumnName = "catering_price")]
+ public decimal CateringPrice { get; set; }
+
+
+
+ ///
+ /// 餐饮-桌型
+ ///
+ [SugarColumn(ColumnName = "catering_table")]
+ public string CateringTable { get; set; }
+
+ ///
+ /// 酒水
+ ///
+ public string Wine { get; set; }
+
+ ///
+ /// 备注
+ ///
+ public string Remark { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Model/ApptLog.cs b/api_v1/Appointment.Entity/Model/ApptLog.cs
new file mode 100644
index 0000000..835abba
--- /dev/null
+++ b/api_v1/Appointment.Entity/Model/ApptLog.cs
@@ -0,0 +1,57 @@
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 预订日志表实体
+ ///
+ [Serializable]
+ [SugarTable("appt_log")]
+ public class ApptLog
+ {
+ ///
+ /// 自增主键
+ ///
+ [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
+ public int Id { get; set; }
+
+ ///
+ /// 数据表
+ ///
+ public string TableName { get; set; }
+
+ ///
+ /// 表主键值
+ ///
+ public string KeyId { get; set; }
+
+ ///
+ /// 原始数据
+ ///
+ public string OldData { get; set; }
+
+ ///
+ /// 新数据
+ ///
+ public string NewData { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime { get; set; }
+
+ ///
+ /// 操作人
+ ///
+ public string UserId { get; set; }
+
+ ///
+ /// 用户类型:0-普通用户,1-管理人员
+ ///
+ public int SystemUser { get; set; }
+
+ }
+}
diff --git a/api_v1/Appointment.Entity/Model/ApptMeeting.cs b/api_v1/Appointment.Entity/Model/ApptMeeting.cs
new file mode 100644
index 0000000..7959cf3
--- /dev/null
+++ b/api_v1/Appointment.Entity/Model/ApptMeeting.cs
@@ -0,0 +1,97 @@
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 会议室预订明细实体
+ ///
+ [Serializable]
+ [SugarTable("appt_meeting")]
+ public class ApptMeeting
+ {
+ ///
+ /// 自增主键
+ ///
+ [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
+ public int? Id { get; set; }
+
+ ///
+ /// guid
+ ///
+ ///
+ /// 同一个订单的的(暂订单、确认单)GUID相同
+ ///
+ public string Guid { get; set; }
+
+ ///
+ /// 所属预订主单
+ ///
+ [SugarColumn(ColumnName = "appt_id")]
+ public int? ApptId { get; set; }
+
+ ///
+ /// 会议入场时间
+ ///
+ [SugarColumn(ColumnName = "meeting_time")]
+ public DateTime MeetingTime { get; set; }
+
+ ///
+ /// 场次,如上午、下午、晚上存储结果为"1,2,3",早为“1”
+ ///
+ public string Groups { get; set; }
+
+
+
+ ///
+ /// 会议厅名称(手输或根据类型选择自动填入),手输不占用资源
+ ///
+ [SugarColumn(ColumnName = "meeting_room")]
+ public string MeetingRoom { get; set; }
+
+ ///
+ /// 会议厅代码(手输类型时为空,不占用资源)
+ ///
+ [SugarColumn(ColumnName = "meeting_code")]
+ public string MeetingCode { get; set; }
+
+ ///
+ /// 会议室主席台位
+ ///
+ [SugarColumn(ColumnName = "meeting_rostrum")]
+ public string MeetingRostrum { get; set; }
+
+ ///
+ /// 会议室-台型(课桌)
+ ///
+ [SugarColumn(ColumnName = "meeting_shape")]
+ public string MeetingShape { get; set; }
+
+ ///
+ /// 人数:0-待定,
+ ///
+ [SugarColumn(ColumnName = "meeting_num")]
+ public int MeetingNum { get; set; }
+
+
+
+ ///
+ /// 单价
+ ///
+ [SugarColumn(ColumnName = "meeting_price")]
+ public decimal MeetingPrice { get; set; }
+
+ ///
+ /// 横幅内容
+ ///
+ [SugarColumn(ColumnName = "meeting_title")]
+ public string MeetingTitle { get; set; }
+
+ ///
+ /// 议厅备注
+ ///
+ public string Remark { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Model/ApptRemark.cs b/api_v1/Appointment.Entity/Model/ApptRemark.cs
new file mode 100644
index 0000000..53d541e
--- /dev/null
+++ b/api_v1/Appointment.Entity/Model/ApptRemark.cs
@@ -0,0 +1,48 @@
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 预订备注扩展表
+ ///
+ [Serializable]
+ [SugarTable("appt_remark")]
+ public class ApptRemark
+ {
+ ///
+ /// 递增主键
+ ///
+ [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
+ public int? Id { get; set; }
+
+ ///
+ /// guid
+ ///
+ ///
+ /// 同一个订单的的(暂订单、确认单)GUID相同
+ ///
+ public string Guid { get; set; }
+
+ ///
+ /// 预订主键
+ ///
+ ///
+ /// appt_summary.id
+ ///
+ [SugarColumn(ColumnName = "appt_id")]
+ public int? ApptId { get; set; }
+
+ ///
+ /// 备注分类
+ ///
+ public string Title { get; set; }
+
+ ///
+ /// 备注内容
+ ///
+ public string Info { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Model/ApptRemarkLog.cs b/api_v1/Appointment.Entity/Model/ApptRemarkLog.cs
new file mode 100644
index 0000000..99852ff
--- /dev/null
+++ b/api_v1/Appointment.Entity/Model/ApptRemarkLog.cs
@@ -0,0 +1,79 @@
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 操作展示日志
+ ///
+ [Serializable]
+ [SugarTable("appt_remark_log")]
+ public class ApptRemarkLog
+ {
+ ///
+ /// 递增主键
+ ///
+ [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
+ public int Id { get; set; }
+
+ ///
+ /// 操作时间
+ ///
+ public DateTime CreateTime { get; set; }
+
+ ///
+ /// 所属父级
+ ///
+ ///
+ /// 0-默认,
+ /// 其他-对操作备注进行追加备注
+ ///
+ public int Pid { get; set; }
+
+ ///
+ /// 预订单主键
+ ///
+ ///
+ /// appt_summary.id
+ ///
+ [SugarColumn(ColumnName = "appt_id")]
+ public int ApptId { get; set; }
+
+ ///
+ /// 操作人账号
+ ///
+ public string Account { get; set; }
+
+
+
+ ///
+ /// 操作人姓名
+ ///
+ public string UserName { get; set; }
+
+ ///
+ /// 提交前状态
+ ///
+ [SugarColumn(ColumnName = "old_status")]
+ public int OldStatus { get; set; }
+
+ ///
+ /// 提交后状态
+ ///
+ [SugarColumn(ColumnName = "new_status")]
+ public int NewStatus { get; set; }
+
+ ///
+ /// 备注内容
+ ///
+ public string Remark { get; set; }
+
+ ///
+ /// 变更的数据
+ ///
+ [SugarColumn(ColumnName = "update_data")]
+ public string UpdateData { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Model/ApptRoom.cs b/api_v1/Appointment.Entity/Model/ApptRoom.cs
new file mode 100644
index 0000000..7ecd895
--- /dev/null
+++ b/api_v1/Appointment.Entity/Model/ApptRoom.cs
@@ -0,0 +1,104 @@
+using Appointment.Entity.ValidateAttribute;
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 客房预订明细表实体
+ ///
+ [Serializable]
+ [SugarTable("appt_room")]
+ public class ApptRoom
+ {
+ ///
+ /// 自增主键
+ ///
+ [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
+ public int? Id { get; set; }
+
+ ///
+ /// guid
+ ///
+ ///
+ /// 同一个订单的的(暂订单、确认单)GUID相同
+ ///
+ public string Guid { get; set; }
+
+ ///
+ /// 所属预订主单
+ ///
+ [SugarColumn(ColumnName = "appt_id")]
+ public int? ApptId { get; set; }
+
+ ///
+ /// 抵达时间
+ ///
+ [SugarColumn(ColumnName = "room_in")]
+ public DateTime RoomIn { get; set; }
+
+ ///
+ /// 离开时间
+ ///
+ [SugarColumn(ColumnName = "room_out")]
+ public DateTime RoomOut { get; set; }
+
+
+
+ ///
+ /// 房型(手输或根据类型选择自动填入),手输不占用资源
+ ///
+ [StringLength(30, MinLength = 2, ErrorMessage = "房型必须为2~30个字符")]
+ [SugarColumn(ColumnName = "room_group")]
+ public string RoomGroup { get; set; }
+
+ ///
+ /// 选择房间类型(手输类型时为空,不占用资源)
+ ///
+ [SugarColumn(ColumnName = "room_code")]
+ public string RoomCode { get; set; }
+
+ ///
+ /// 房间数量
+ ///
+ ///
+ /// 不占用资源的可以为0
+ ///
+ [SugarColumn(ColumnName = "room_num")]
+ public int RoomNum { get; set; }
+
+ ///
+ /// 房间单价
+ ///
+ [SugarColumn(ColumnName = "room_price")]
+ public decimal RoomPrice { get; set; }
+
+ ///
+ /// 总早餐数:0-无早餐,
+ ///
+ [SugarColumn(ColumnName = "breakfast_num")]
+ public int BreakfastNum { get; set; }
+
+
+
+ ///
+ /// 长途电话:0-关,1-开,
+ ///
+ [SugarColumn(ColumnName = "long_distance")]
+ public int LongDistance { get; set; }
+
+ ///
+ /// 客房吧:0-关,1-开,
+ ///
+ [SugarColumn(ColumnName = "min_shop")]
+ public int MinShop { get; set; }
+
+ ///
+ /// 客房备注
+ ///
+ [SugarColumn(ColumnName = "remark")]
+ public string RoomRemark { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Model/ApptSpring.cs b/api_v1/Appointment.Entity/Model/ApptSpring.cs
new file mode 100644
index 0000000..82466df
--- /dev/null
+++ b/api_v1/Appointment.Entity/Model/ApptSpring.cs
@@ -0,0 +1,77 @@
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 温泉预订明细实体
+ ///
+ [Serializable]
+ [SugarTable("appt_spring")]
+ public class ApptSpring
+ {
+ ///
+ /// 自增主键
+ ///
+ [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
+ public int? Id { get; set; }
+
+ ///
+ /// guid
+ ///
+ ///
+ /// 同一个订单的的(暂订单、确认单)GUID相同
+ ///
+ public string Guid { get; set; }
+
+ ///
+ /// 所属预订主单
+ ///
+ [SugarColumn(ColumnName = "appt_id")]
+ public int? ApptId { get; set; }
+
+ ///
+ /// 温泉_日期
+ ///
+ [SugarColumn(ColumnName = "spring_time")]
+ public DateTime SpringTime { get; set; }
+
+ ///
+ /// 总人数(自动计算):0-待定
+ ///
+ [SugarColumn(ColumnName = "people_num")]
+ public int PeopleNum { get; set; }
+
+
+
+ ///
+ /// spring_men
+ ///
+ [SugarColumn(ColumnName = "spring_men")]
+ public int SpringMen { get; set; }
+
+ ///
+ /// 女性人数:0-待定
+ ///
+ [SugarColumn(ColumnName = "spring_women")]
+ public int SpringWomen { get; set; }
+
+ ///
+ /// 二次消费
+ ///
+ public string Consume { get; set; }
+
+ ///
+ /// 单价
+ ///
+ [SugarColumn(ColumnName = "spring_price")]
+ public decimal SpringPrice { get; set; }
+
+ ///
+ /// 备注
+ ///
+ public string Remark { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Model/ApptSummary.cs b/api_v1/Appointment.Entity/Model/ApptSummary.cs
new file mode 100644
index 0000000..6412a40
--- /dev/null
+++ b/api_v1/Appointment.Entity/Model/ApptSummary.cs
@@ -0,0 +1,239 @@
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 预订主单
+ ///
+ [Serializable]
+ [SugarTable("appt_summary")]
+ public class ApptSummary
+ {
+ ///
+ /// 递增主键
+ ///
+ [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
+ public int? Id { get; set; }
+
+ ///
+ /// guid
+ ///
+ ///
+ /// 同一个订单的的(暂订单、确认单)GUID相同
+ ///
+ public string Guid { get; set; }
+
+ ///
+ /// 所属用户
+ ///
+ public string UserId { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ public DateTime? CreateTime { get; set; }
+
+ ///
+ /// 预订类型[appt_type.id]
+ /// 1- 默认模式,
+ /// 2- 江南春模式,
+ ///
+ [SugarColumn(ColumnName = "appt_typeid")]
+ public int? ApptTypeId { get; set; }
+
+
+
+ ///
+ /// 审核状态:见EnumAuditorStatus
+ ///
+ [SugarColumn(ColumnName = "auditor_status")]
+ public int? AuditorStatus { get; set; }
+
+ ///
+ /// 待审核角色id:0-无 appt_type
+ ///
+ ///
+ /// 江南春模式=0
+ ///
+ [SugarColumn(ColumnName = "auditor_id")]
+ public int? AuditorId { get; set; }
+
+ ///
+ /// 转审账号(当有转审时,将AuditorId=0)
+ ///
+ [SugarColumn(ColumnName = "transfer_audit")]
+ public string TransferAudit { get; set; }
+
+ ///
+ /// 订单类型预留字段
+ ///
+ [SugarColumn(ColumnName = "appt_type")]
+ public int? ApptType { get; set; }
+
+ ///
+ /// 编号(生成确认单时产生)
+ ///
+ public string No { get; set; }
+
+
+
+ ///
+ /// 组织单位
+ ///
+ [SugarColumn(ColumnName = "buyer_name")]
+ public string BuyerName { get; set; }
+
+ ///
+ /// 公司地址
+ ///
+ [SugarColumn(ColumnName = "buyer_address")]
+ public string BuyerAddress { get; set; }
+
+ ///
+ /// 订单名称
+ ///
+ [SugarColumn(ColumnName = "buyer_title")]
+ public string BuyerTitle { get; set; }
+
+ ///
+ /// 组织负责人
+ ///
+ [SugarColumn(ColumnName = "leader_name")]
+ public string LeaderName { get; set; }
+
+ ///
+ /// 组织负责人电话
+ ///
+ [SugarColumn(ColumnName = "leader_mobile")]
+ public string LeaderMobile { get; set; }
+
+
+
+ ///
+ /// 会议组房号
+ ///
+ [SugarColumn(ColumnName = "leader_room")]
+ public string LeaderRoom { get; set; }
+
+ ///
+ /// 营销部跟单人(发起人)
+ ///
+ [SugarColumn(ColumnName = "sale_name")]
+ public string SaleName { get; set; }
+
+ ///
+ /// 营销部跟单电话
+ ///
+ [SugarColumn(ColumnName = "sale_mobile")]
+ public string SaleMobile { get; set; }
+
+ ///
+ /// 营销总监 手工写
+ ///
+ [SugarColumn(ColumnName = "sale_director")]
+ public string SaleDirector { get; set; }
+
+ ///
+ /// 客房总备注
+ ///
+ [SugarColumn(ColumnName = "room_remark")]
+ public string RoomRemark { get; set; }
+
+
+
+ ///
+ /// 会议室总备注
+ ///
+ [SugarColumn(ColumnName = "meeting_remark")]
+ public string MeetingRemark { get; set; }
+
+ ///
+ /// 餐饮总备注
+ ///
+ [SugarColumn(ColumnName = "catering_remark")]
+ public string CateringRemark { get; set; }
+
+ ///
+ /// 温泉总备注
+ ///
+ [SugarColumn(ColumnName = "spring_remark")]
+ public string SpringRemark { get; set; }
+
+ ///
+ /// 编辑之前的主键
+ ///
+ public int? Pid { get; set; }
+
+ ///
+ /// 团队编号
+ ///
+ ///
+ /// 2021-6-16 江南春模式有效
+ ///
+ [SugarColumn(ColumnName = "grp_no")]
+ public string GrpNo { get; set; }
+
+
+
+ ///
+ /// 预定信息最小开始日期
+ ///
+ [SugarColumn(ColumnName = "start_day")]
+ public DateTime StartDay { get; set; }
+
+ ///
+ /// 预定信息最大结果日期
+ ///
+ [SugarColumn(ColumnName = "end_day")]
+ public DateTime EndDay { get; set; }
+
+ ///
+ /// 申请OA单状态:0-未占用资源,1-已占用资源
+ ///
+ [SugarColumn(ColumnName = "apply_oa")]
+ public int ApplyOA { get; set; }
+
+ ///
+ /// 为销售员再次编辑提交的时间,文件对比中使用该时间,显示什么时候改了内容
+ ///
+ [SugarColumn(ColumnName = "alter_time")]
+ public DateTime AlterTime { get; set; }
+
+ // 关联表信息
+
+ ///
+ /// 客房预订明细列表
+ ///
+ [SqlSugar.SugarColumn(IsIgnore = true)]
+ public List ApptRoomList { get; set; }
+
+ ///
+ /// 会议室预订明细列表
+ ///
+ [SqlSugar.SugarColumn(IsIgnore = true)]
+ public List ApptMeetingList { get; set; }
+
+ ///
+ /// 餐饮预订明细列表
+ ///
+ [SqlSugar.SugarColumn(IsIgnore = true)]
+ public List ApptCateringList { get; set; }
+
+ ///
+ /// 温泉预订明细列表
+ ///
+ [SqlSugar.SugarColumn(IsIgnore = true)]
+ public List ApptSpringList { get; set; }
+
+ ///
+ /// 自定义备注
+ ///
+ [SqlSugar.SugarColumn(IsIgnore = true)]
+ public List ApptRemarks { get; set; }
+
+
+ }
+}
diff --git a/api_v1/Appointment.Entity/Model/ApptType.cs b/api_v1/Appointment.Entity/Model/ApptType.cs
new file mode 100644
index 0000000..de1c897
--- /dev/null
+++ b/api_v1/Appointment.Entity/Model/ApptType.cs
@@ -0,0 +1,43 @@
+using Appointment.Entity.ValidateAttribute;
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 审核类型
+ ///
+ ///
+ /// 建议:
+ /// 根据ApptName(预订类型名称) 判断审核模式
+ ///
+ /// ApptName:
+ /// DefaultAuditProcess - 标准审核流程,最后一级审核通过后,占用资料,实现抄送,支持转审批(跳转审核流程);
+ /// JNCcustom - 江南春模式,
+ ///
+ [Serializable]
+ [SugarTable("appt_type")]
+ public class ApptType
+ {
+ ///
+ /// 递增主键
+ ///
+ [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
+ public int Id { get; set; }
+
+ ///
+ /// 预订类型名称
+ ///
+ [StringLength(30, MinLength = 2, ErrorMessage = "预订类型名称必须为2~30个字符")]
+ [SugarColumn(ColumnName = "appt_name")]
+ public string ApptName { get; set; }
+
+ ///
+ /// 备注说明
+ ///
+ [StringMaxLength(200, ErrorMessage = "备注说明最大长度200个字符")]
+ public string Remark { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Model/GrpInfo.cs b/api_v1/Appointment.Entity/Model/GrpInfo.cs
new file mode 100644
index 0000000..b5d41b8
--- /dev/null
+++ b/api_v1/Appointment.Entity/Model/GrpInfo.cs
@@ -0,0 +1,264 @@
+using Appointment.Entity.ValidateAttribute;
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 团队表实体
+ ///
+ [Serializable]
+ [SugarTable("grpinfo")]
+ public class GrpInfo
+ {
+ ///
+ /// 团队账号
+ ///
+ [SugarColumn(IsPrimaryKey = true)]
+ public string Accnt { get; set; }
+
+ ///
+ /// 状态:R-预订,I-在住
+ ///
+ public string Sta { get; set; }
+
+ ///
+ /// 团名
+ ///
+ public string Gname { get; set; }
+
+ ///
+ /// 团名(英文)首字母自动生成
+ ///
+ public string Ename { get; set; }
+
+ ///
+ /// 代号
+ ///
+ public string Code { get; set; }
+
+ ///
+ /// 预订号
+ ///
+ public string Resno { get; set; }
+
+ ///
+ ///
+ ///
+ ///
+ /// 默认与Accnt一致
+ ///
+ public string Grpno { get; set; }
+
+ ///
+ /// 来源
+ ///
+ public string Src { get; set; }
+
+ ///
+ /// 市场码
+ ///
+ public string Mkt { get; set; }
+
+ ///
+ /// 抵达时间
+ ///
+ public DateTime? Arr { get; set; }
+
+ ///
+ /// 离开时间
+ ///
+ public DateTime? Dep { get; set; }
+
+ ///
+ /// 国家
+ ///
+ ///
+ /// 默认:CN
+ ///
+ public string Country { get; set; }
+
+ ///
+ /// 籍贯编号
+ ///
+ ///
+ /// 默认:null
+ ///
+ public string Navite { get; set; }
+
+ ///
+ /// 地址
+ ///
+ public string Address { get; set; }
+
+ ///
+ /// 领队
+ ///
+ public string Leader { get; set; }
+
+ ///
+ /// 领队电话
+ ///
+ public string Phone { get; set; }
+
+ ///
+ /// 人数
+ ///
+ public int? Guests { get; set; }
+
+ ///
+ /// 房数
+ ///
+ public int? Rooms { get; set; }
+
+ ///
+ /// 单位号
+ ///
+ public string Cropsno { get; set; }
+
+ ///
+ /// 单位名称
+ ///
+ public string Cropname { get; set; }
+
+ ///
+ /// 付款码
+ ///
+ ///
+ /// 现金:9001
+ ///
+ public string Paycode { get; set; }
+
+ ///
+ /// 备注说明
+ ///
+ public string Ramark { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ public DateTime? Sysdate { get; set; }
+
+ ///
+ /// 更新次数
+ ///
+ [SugarColumn(ColumnName = "log_num")]
+ public int? LogNum { get; set; }
+
+ ///
+ /// 操作账号
+ ///
+ [SugarColumn(ColumnName = "log_id")]
+ public string LogId { get; set; }
+
+ ///
+ ///
+ ///
+ ///
+ /// 默认1
+ ///
+ [SugarColumn(ColumnName = "log_shift")]
+ public char LogShift { get; set; }
+
+ ///
+ /// 操作IP
+ ///
+ [SugarColumn(ColumnName = "log_ip")]
+ public string LogIp { get; set; }
+
+ ///
+ /// 最后操作时间
+ ///
+ ///
+ /// 默认为创建时间
+ ///
+ [SugarColumn(ColumnName = "log_date")]
+ public DateTime? LogDate { get; set; }
+
+ ///
+ ///
+ ///
+ ///
+ /// 默认:"团队"
+ ///
+ public string Payroom { get; set; }
+
+ ///
+ /// 主账房
+ ///
+ public string Payaccnt { get; set; }
+
+ ///
+ /// IVP
+ ///
+ ///
+ /// 默认0
+ ///
+ public string Vip { get; set; }
+
+ ///
+ ///
+ ///
+ ///
+ /// 默认0
+ ///
+ public string Sec { get; set; }
+
+ ///
+ /// 特殊要求代码
+ ///
+ public string Special { get; set; }
+
+ ///
+ /// 应收账号
+ ///
+ public string Araccnt { get; set; }
+
+ ///
+ /// 销售员编号
+ ///
+ public string Saleid { get; set; }
+
+ ///
+ /// 总消费
+ ///
+ public decimal? Charge { get; set; }
+
+ ///
+ ///
+ ///
+ public decimal? Credit { get; set; }
+
+ ///
+ /// 余额,合计余额
+ ///
+ public decimal? Balance { get; set; }
+
+ ///
+ ///
+ ///
+ public decimal? Ybalance { get; set; }
+
+ ///
+ ///
+ ///
+ public decimal? Accntnumb { get; set; }
+
+ ///
+ /// 允许POS账转入:T/F
+ ///
+ public char Flag { get; set; }
+
+ ///
+ /// 房价码
+ ///
+ public string Rmcode { get; set; }
+
+ ///
+ /// package码
+ ///
+ public string Rmpackage { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Model/Mstinfo.cs b/api_v1/Appointment.Entity/Model/Mstinfo.cs
new file mode 100644
index 0000000..3cc3598
--- /dev/null
+++ b/api_v1/Appointment.Entity/Model/Mstinfo.cs
@@ -0,0 +1,59 @@
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 入住客户表
+ ///
+ [SugarTable("mstinfo")]
+ public class Mstinfo
+ {
+ ///
+ /// 入住信息的账号
+ ///
+ [SugarColumn(IsPrimaryKey = true)]
+ public string Accnt { get; set; }
+
+ ///
+ /// 入住状态:R-预订, I-在住, O-结账, D-待删, H-历史,C-取消,
+ ///
+ public string Sta { get; set; }
+
+ ///
+ /// 系统时间
+ ///
+ public string SysDate { get; set; }
+
+ ///
+ /// 宾客姓名
+ ///
+ public string Gname { get; set; }
+
+ ///
+ /// 操作管理员账号
+ ///
+ [SugarColumn(ColumnName = "log_id")]
+ public string LogId { get; set; }
+
+ ///
+ /// 操作管理员名称
+ ///
+ [SugarColumn(ColumnName = "log_name")]
+ public string LogName { get; set; }
+
+ ///
+ /// 班别
+ ///
+ [SugarColumn(ColumnName = "log_shift")]
+ public string LogShift { get; set; }
+
+ ///
+ /// 日志操作IP
+ ///
+ [SugarColumn(ColumnName = "log_ip")]
+ public string LogIp { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Model/RcancelLog.cs b/api_v1/Appointment.Entity/Model/RcancelLog.cs
new file mode 100644
index 0000000..9355772
--- /dev/null
+++ b/api_v1/Appointment.Entity/Model/RcancelLog.cs
@@ -0,0 +1,70 @@
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 取消预定单是,录入的取消信息
+ ///
+ [SugarTable("rcancel_log")]
+ public class RcancelLog
+ {
+ ///
+ /// 入住信息的账号
+ ///
+ [SugarColumn(IsPrimaryKey = true)]
+ public string Accnt { get; set; }
+
+ ///
+ /// 订单操作次数,默认1
+ ///
+ public int Number { get; set; }
+
+ ///
+ /// 宾客姓名
+ ///
+ public string Gname { get; set; }
+
+ ///
+ /// 操作备注
+ ///
+ public string Reason { get; set; }
+
+ ///
+ /// 操作管理员账号
+ ///
+ [SugarColumn(ColumnName = "log_id")]
+ public string LogId { get; set; }
+
+ ///
+ /// 操作管理员名称
+ ///
+ [SugarColumn(ColumnName = "log_name")]
+ public string LogName { get; set; }
+
+ ///
+ /// 班别
+ ///
+ [SugarColumn(ColumnName = "log_shift")]
+ public string LogShift { get; set; }
+
+ ///
+ /// 创建日志时间
+ ///
+ [SugarColumn(ColumnName = "log_date")]
+ public DateTime LogDate { get; set; }
+
+ ///
+ /// 日志操作IP
+ ///
+ [SugarColumn(ColumnName = "log_ip")]
+ public string LogIp { get; set; }
+
+ ///
+ /// 系统时间
+ ///
+ public string SysDate { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Model/ResCode.cs b/api_v1/Appointment.Entity/Model/ResCode.cs
new file mode 100644
index 0000000..d8585de
--- /dev/null
+++ b/api_v1/Appointment.Entity/Model/ResCode.cs
@@ -0,0 +1,52 @@
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 会议厅
+ ///
+ [Serializable]
+ [SugarTable("res_code")]
+ public class ResCode
+ {
+ ///
+ /// 会议厅代码
+ ///
+ public string Code { get; set; }
+
+ ///
+ /// 代码:A-会议室,B-会议室设备,C-汽车,D-自行车.
+ ///
+ public string Sort { get; set; }
+
+ ///
+ /// 厅名称
+ ///
+ public string Descript1 { get; set; }
+
+ public string Descript2 { get; set; }
+
+ ///
+ /// 状态:T-有效,
+ ///
+ public string Sta { get; set; }
+
+ public int Numbers { get; set; }
+
+ public string Pccode { get; set; }
+
+ ///
+ /// 价格
+ ///
+ public decimal Price { get; set; }
+
+ public int Period { get; set; }
+
+ public string Remark { get; set; }
+
+ public int Sequence { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Model/ResInfo.cs b/api_v1/Appointment.Entity/Model/ResInfo.cs
new file mode 100644
index 0000000..25b4c62
--- /dev/null
+++ b/api_v1/Appointment.Entity/Model/ResInfo.cs
@@ -0,0 +1,117 @@
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 会议室流水
+ ///
+ [Serializable]
+ [SugarTable("res_info")]
+ public class ResInfo
+ {
+ ///
+ /// 会议室流水号
+ ///
+ public string No { get; set; }
+
+ ///
+ /// 状态:R-预订
+ ///
+ public string Sta { get; set; }
+
+ ///
+ /// 订单号
+ ///
+ public string Accnt { get; set; }
+
+ public string Accnt1 { get; set; }
+
+ ///
+ /// 会议室代码[res_code.code]
+ ///
+ public string Rescode { get; set; }
+
+ ///
+ /// 数量
+ ///
+ public int Numbers { get; set; }
+
+ public DateTime Bdate { get; set; }
+
+ ///
+ /// 开始日期
+ ///
+ public DateTime? Stime { get; set; }
+
+ ///
+ /// 结束日期
+ ///
+ public DateTime? Etime { get; set; }
+
+ ///
+ /// 开始场次
+ ///
+ public int Sfield { get; set; }
+
+ ///
+ /// 结束场次
+ ///
+ public int Efield { get; set; }
+
+ ///
+ /// 开始时间
+ ///
+ public string Sfieldtime { get; set; }
+
+ ///
+ /// 结束时间
+ ///
+ public string Efieldtime { get; set; }
+
+ ///
+ /// 会场备注
+ ///
+ public string Summary { get; set; }
+
+ ///
+ /// 价格
+ ///
+ public decimal Price0 { get; set; }
+
+ ///
+ /// 价格
+ ///
+ public decimal Price { get; set; }
+
+ ///
+ /// 是否入账:T/F
+ ///
+ public string Paid { get; set; }
+
+ ///
+ /// 操作账号
+ ///
+ public string Resby { get; set; }
+
+ ///
+ /// 操作人员姓名
+ ///
+ public string Resbyname { get; set; }
+
+ ///
+ /// 操作时间
+ ///
+ public DateTime? Reserved { get; set; }
+
+ public string Cby { get; set; }
+
+ public string Cbyname { get; set; }
+
+ public DateTime? Cbytime { get; set; }
+
+ public int Logmark { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Model/RoomType.cs b/api_v1/Appointment.Entity/Model/RoomType.cs
new file mode 100644
index 0000000..76fedb0
--- /dev/null
+++ b/api_v1/Appointment.Entity/Model/RoomType.cs
@@ -0,0 +1,116 @@
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 房类实体(部分)
+ ///
+ [Serializable]
+ [SugarTable("room_type")]
+ public class RoomType
+ {
+ ///
+ /// 房类代码
+ ///
+ [SugarColumn(IsPrimaryKey = true)]
+ public string Id { get; set; }
+
+ ///
+ /// 房类中文描述(中文名称)
+ ///
+ public string Descript1 { get; set; }
+
+ ///
+ /// 房类英文描述
+ ///
+ public string Descript2 { get; set; }
+
+ ///
+ /// 门市价
+ ///
+ public decimal Price0 { get; set; }
+
+ ///
+ /// 优惠价
+ ///
+ public decimal Price { get; set; }
+
+ ///
+ /// 超预订
+ ///
+ public int Exceed { get; set; }
+
+ ///
+ /// 总房数
+ ///
+ public int Total { get; set; }
+
+ ///
+ /// 钟点房起步时间
+ ///
+ [SugarColumn(ColumnName = "dayuse_base")]
+ public decimal? DayuseBase { get; set; }
+
+ ///
+ /// 钟点房基本价
+ ///
+ [SugarColumn(ColumnName = "base_price")]
+ public decimal? BasePrice { get; set; }
+
+ ///
+ /// 每小时单价
+ ///
+ public decimal? Hourly { get; set; }
+
+ ///
+ /// 钟点房最长时间
+ ///
+ [SugarColumn(ColumnName = "dayuse_top")]
+ public decimal? DayuseTop { get; set; }
+
+ ///
+ /// 钟点房选项(可手动录入):T/F
+ ///
+ [SugarColumn(ColumnName = "dayuse_flag")]
+ public string DayuseFlag { get; set; }
+
+ ///
+ /// 排序号(升序)
+ ///
+ public int? Sequence { get; set; }
+
+ ///
+ /// 大房类
+ ///
+ public string Stype { get; set; }
+
+ ///
+ /// 客房打扫工作量
+ ///
+ public decimal? Mone1 { get; set; }
+
+ ///
+ /// 中央预定最大可用房数
+ ///
+ public decimal? Mone2 { get; set; }
+
+ public string Char1 { get; set; }
+
+ ///
+ /// 房类描述
+ ///
+ public string Char2 { get; set; }
+
+ public DateTime? Date1 { get; set; }
+
+ public DateTime? Date2 { get; set; }
+
+ //
+ // x7不存在
+ //
+ //public string Defpackage { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Model/Saleid.cs b/api_v1/Appointment.Entity/Model/Saleid.cs
new file mode 100644
index 0000000..841d327
--- /dev/null
+++ b/api_v1/Appointment.Entity/Model/Saleid.cs
@@ -0,0 +1,34 @@
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 销售人员表实体
+ ///
+ [Serializable]
+ public class Saleid
+ {
+ ///
+ /// 自增主键
+ ///
+ public string Id { get; set; }
+
+ ///
+ /// 姓名
+ ///
+ public string Name { get; set; }
+
+ ///
+ /// 其他描述
+ ///
+ public string Descript { get; set; }
+
+ ///
+ /// 对应操作员,注意:uc_login也添加了Saleid,两种对应方式,有点重复了
+ ///
+ public string Op_id { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Model/SysCode.cs b/api_v1/Appointment.Entity/Model/SysCode.cs
new file mode 100644
index 0000000..d01eca9
--- /dev/null
+++ b/api_v1/Appointment.Entity/Model/SysCode.cs
@@ -0,0 +1,35 @@
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 综合数据
+ ///
+ [Serializable]
+ [SugarTable("sys_code")]
+ public class SysCode
+ {
+ ///
+ /// 类型
+ ///
+ public string Class { get; set; }
+
+ ///
+ /// 编号
+ ///
+ public string Id { get; set; }
+
+ public string Descript1 { get; set; }
+
+ public string Descript2 { get; set; }
+
+ public string Remark { get; set; }
+
+ public string System { get; set; }
+
+ public int Sequence { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Model/UcGroup.cs b/api_v1/Appointment.Entity/Model/UcGroup.cs
new file mode 100644
index 0000000..f95e5cb
--- /dev/null
+++ b/api_v1/Appointment.Entity/Model/UcGroup.cs
@@ -0,0 +1,33 @@
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 用户组别
+ ///
+ [Serializable]
+ [SugarTable("uc_group")]
+ public class UcGroup
+ {
+ ///
+ /// 代码
+ ///
+ [SugarColumn(ColumnName = "op_group")]
+ public string OpGroup { get; set; }
+
+ ///
+ /// 名称
+ ///
+ [SugarColumn(ColumnName = "descript")]
+ public string Descript { get; set; }
+
+ ///
+ /// 描述
+ ///
+ [SugarColumn(ColumnName = "op_func")]
+ public string OpFunc { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Model/UcLogin.cs b/api_v1/Appointment.Entity/Model/UcLogin.cs
new file mode 100644
index 0000000..002411f
--- /dev/null
+++ b/api_v1/Appointment.Entity/Model/UcLogin.cs
@@ -0,0 +1,153 @@
+using Appointment.Entity.ValidateAttribute;
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 工作人员
+ ///
+ [Serializable]
+ [SugarTable("uc_login")]
+ public class UcLogin
+ {
+ ///
+ /// 账号
+ ///
+ [SugarColumn(IsPrimaryKey = true, ColumnName = "op_id")]
+ public string OpId { get; set; }
+
+ ///
+ /// 姓名
+ ///
+ [SugarColumn(IsPrimaryKey = true, ColumnName = "op_name")]
+ public string OpName { get; set; }
+
+ ///
+ /// 密码
+ ///
+ public string Password { get; set; }
+
+ ///
+ /// 组别
+ ///
+ [SugarColumn(IsPrimaryKey = true, ColumnName = "op_group")]
+ public string OpGroup { get; set; }
+
+ ///
+ /// 部门
+ ///
+ public string Deptno { get; set; }
+
+ ///
+ /// 账号锁定:T/F
+ ///
+ public string Locked { get; set; }
+
+ ///
+ /// 密码提示
+ ///
+ public string Question { get; set; }
+
+ ///
+ /// 提示答案
+ ///
+ public string Answer { get; set; }
+
+ ///
+ ///
+ ///
+ public int X { get; set; }
+
+
+ ///
+ ///
+ ///
+ public int Y { get; set; }
+
+ ///
+ ///
+ ///
+ public int Width { get; set; }
+
+ ///
+ ///
+ ///
+ public int Height { get; set; }
+
+ ///
+ ///
+ ///
+ public string Winstate { get; set; }
+
+ ///
+ ///
+ ///
+ public string Tips { get; set; }
+
+ ///
+ /// 登录显示邮件提示
+ ///
+ public string Mail { get; set; }
+
+ ///
+ ///
+ ///
+ public string Font { get; set; }
+
+ ///
+ ///
+ ///
+ public string Text { get; set; }
+
+ ///
+ ///
+ ///
+ public string Pop { get; set; }
+
+ ///
+ /// 员工工号
+ ///
+ public string Errinfo { get; set; }
+
+
+ ///
+ /// 手机号
+ ///
+ public string Mobile { get; set; }
+
+ ///
+ /// 微信小程序openid
+ ///
+ [SugarColumn(ColumnName = "wxopenId")]
+ public string WxOpenId { get; set; }
+
+ ///
+ /// 用户所属销售员
+ ///
+ public string Saleid { get; set; }
+
+ ///
+ /// 授权服务号状态,用于消息推送
+ ///
+ [SugarColumn(ColumnName = "wx_service_id")]
+ public string WxServiceId { get; set; }
+
+ ///
+ /// OA是否可做为被转审人
+ ///
+ public string Appttrans { get; set; }
+
+ ///
+ /// OA是否可做为被抄送人
+ ///
+ public string Apptsend { get; set; }
+
+ ///
+ /// 部门备注自动发送以#隔离
+ ///
+ public string Autosendcond { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Model/_data/迪联OA预定补丁(含转审抄送).sql b/api_v1/Appointment.Entity/Model/_data/迪联OA预定补丁(含转审抄送).sql
new file mode 100644
index 0000000..b22913b
--- /dev/null
+++ b/api_v1/Appointment.Entity/Model/_data/迪联OA预定补丁(含转审抄送).sql
@@ -0,0 +1,732 @@
+
+
+-- ÈËԱ±í
+if not exists (select 1 from syscolumns where name = 'wxopenid' and id = (select id from sysobjects where name = 'uc_login'))
+ALTER TABLE uc_login add wxopenid varchar(100) null -- ÐÅС³ÌÐòΨһÉí·Ý
+;
+if not exists (select 1 from syscolumns where name = 'wx_service_id' and id = (select id from sysobjects where name = 'uc_login'))
+ALTER TABLE uc_login add wx_service_id varchar(100) null -- ÐŷþÎñºÅΨһÉí·Ý֤
+;
+if not exists (select 1 from syscolumns where name = 'saleid' and id = (select id from sysobjects where name = 'uc_login'))
+ALTER TABLE uc_login add saleid varchar(4) null -- ÏúÊÛÈËԱ±àºÅ
+;
+if not exists (select 1 from syscolumns where name = 'appttrans' and id = (select id from sysobjects where name = 'uc_login'))
+ALTER TABLE uc_login add appttrans char(1) null -- OAÊǷñ¿É×öΪ±»תÉóÈË
+;
+if not exists (select 1 from syscolumns where name = 'apptsend' and id = (select id from sysobjects where name = 'uc_login'))
+ALTER TABLE uc_login add apptsend char(1) null -- OAÊǷñ¿É×öΪ±»³ËÍÈË
+;
+if not exists (select 1 from syscolumns where name = 'autosendcond' and id = (select id from sysobjects where name = 'uc_login'))
+ALTER TABLE uc_login add autosendcond varchar(500) null -- ×Զ¯³ËÍ ÒÔ#¸ôÀë
+;
+--Ԥ¶©ÉóÅúÀàÐÍ
+if object_id('appt_type') is null --±ØÐëÏÈÅжϣ¬¸ÃSQL²¹¶¡ÊǿÉÒԷ´¸´ִÐеÄ
+CREATE TABLE appt_type( -- ÉóÅúÀàÐÍ
+ [Id] [int] IDENTITY(1,1) PRIMARY key , --Ö÷¼üֱ½ÓдÔÚ×ֶκóÃæ¾ÍÐУ¬¼õÉÙÓ¸´ÔӶȣ¬Ìá¸߿ɶÁÐÔ
+ [appt_name] [varchar](30) NULL, -- ÉóÅúÀàÐÍÃû³Æ
+ [remark] [varchar](200) NULL -- ÉóÅúÀàÐͱ¸ע
+)
+;
+if not exists (select 1 from appt_type) --±ØÐëÏÈÅжϣ¬¸ÃSQL²¹¶¡ÊǿÉÒԷ´¸´ִÐеÄ
+INSERT INTO appt_type (appt_name,remark)VALUES('ĬÈÏÁ÷³Ì','')
+;
+
+--Ԥ¶©ÉóÅúÁ÷³̱í
+if object_id('appt_auditor') is null create table appt_auditor( -- Ԥ¶©ÉóÅúÁ÷ÅäÖÃ
+ [id] [int] IDENTITY(1,1) PRIMARY key , -- Ö÷¼ü
+ [appt_type_id] [int] NULL, -- ÉóºËÀàÐÍ
+ [op_group] [varchar](30) NULL, -- ÉóÅú×é±àºÅ(µ±Ϊ¿Õʱ£¬¶¼¿ɲÙ×÷)
+ [op_descript] [varchar](50) NULL, -- ÉóÅú×éÃû³Æ
+ [pid] [int] NULL, -- (ȫпɸÄÃûΪoper_seq)ÉóÅúÁ÷˳Ðò[¾ɲãÉóÅúÖ÷¼ü:0-Êײ㣬¹Øϵµ±ǰ±íÖ÷¼ü]
+
+ [custom] int default(0) not null -- ÊǷñ֧³ÖתÉó£º0-²»֧³Ö,1-֧³Ö(µ±תÉó֮º»Ôٻص½ÉóÅúÁ÷³Ì)
+);
+if not exists (select 1 from sysobjects as t join syscolumns as c on t.id=c.id where t.name='appt_auditor' and c.name='rejectid')
+alter table appt_auditor add [rejectid] int default(1); -- ²µ»ػص½µĽڵã
+
+
+--Ԥ¶©Ö÷µ¥
+if object_id('appt_summary') is null
+CREATE TABLE appt_summary( --Ԥ¶©Ö÷µ¥
+ [id] int IDENTITY(1,1) PRIMARY KEY --×ÔÔöÖ÷¼ü
+ ,[guid] nvarchar(50) not null --GUID
+ ,[userid] nvarchar(20) NULL --ËùÊôÓû§
+ ,[createtime] datetime default getdate() NOT NULL --´´½¨ʱ¼ä
+ ,[appt_typeid] int NULL --Ԥ¶©ÀàÐÍ[appt_type.id]£º0-²»ÐèҪÉóÅú
+
+ ,[auditor_status] int NULL --ÉóÅú״̬:0-±£´æ,1-´ýÉóÅú,2-ÉóÅúÖÐ,3-ÉóÅúͨ¹ý(ÒÑÉú³ÉÕýʽԤ¶©Êý¾Ý),4-²µ»Ø,
+ ,[auditor_id] int NULL --´ýÉóÅú½Çɫid:0-ÎÞ
+ ,[transfer_audit] nvarchar(50) default('')
+ ,[appt_type] int default 0 not NULL --¶©µ¥ÀàÐÍԤÁô×ֶÎ
+ ,[no] nvarchar(50) NULL --񅧏
+
+ ,[buyer_name] nvarchar(50) NULL --×é֯µ¥λ
+ ,[buyer_address] nvarchar(200) NULL --¹«˾µØַ
+ ,[buyer_title] nvarchar(100) NULL --»áÒéÃû³Æ
+ ,[leader_name] nvarchar(20) NULL --×é֯¸ºÔðÈË
+ ,[leader_mobile] nvarchar(20) NULL --×é֯¸ºÔðÈ˵绰
+
+ ,[leader_room] nvarchar(50) NULL --»áÒé×鷿ºÅ
+ ,[sale_name] nvarchar(20) NULL --ӪÏú²¿¸úµ¥ÈË
+ ,[sale_mobile] nvarchar(20) NULL --ӪÏú²¿¸úµ¥µ绰
+ ,[sale_director] nvarchar(20) NULL --ӪÏú×ܼà(Êֹ¤д)£¬
+ ,[room_remark] nvarchar(200) NULL --¿ͷ¿×ܱ¸ע
+
+ ,[meeting_remark] nvarchar(200) NULL --»áÒéÌü×ܱ¸ע
+ ,[catering_remark] nvarchar(200) NULL --²ÍÒû×ܱ¸ע
+ ,[spring_remark] nvarchar(200) NULL --ÎÂȪ×ܱ¸ע
+ ,[pid] int default(0) not null -- ±༭ǰµÄÖ÷¼ü,ԭʼÊý¾ݴÓappt_log±íÖжÁȡ
+ ,[grp_no] nvarchar(100) null -- ÍŶӱàºÅ
+
+ ,[start_day] datetime null -- Ԥ¶¨ÐÅϢ×îС¿ªʼÈÕÆÚ
+ ,[end_day] datetime null -- Ԥ¶¨ÐÅϢ×î´ó½á¹ûÈÕÆÚ
+ ,[apply_oa] int default(0) -- ÉêÇëOAµ¥״̬:0-δռÓÃ×ÊԴ,1-ռÓÃ×ÊԴ,2-ÉêÇëOAµ¥
+ ,[alter_time] datetime not null -- ¶©µ¥×îºóÐÄʱ¼ä
+)
+;
+
+--¿ͷ¿Ԥ¶©Ã÷ϸ±í
+if object_id('appt_room') is null
+CREATE TABLE appt_room( -- ¿ͷ¿
+ [id] int IDENTITY(1,1) PRIMARY KEY --×ÔÔöÖ÷¼ü
+ ,[guid] nvarchar(50) not null --GUID
+ ,[appt_id] int NOT NULL --ËùÊôԤ¶©Ö÷µ¥
+ ,[room_in] datetime NULL --µִïʱ¼ä
+ ,[room_out] datetime NULL --À뿪ʱ¼ä
+
+ ,[room_group] nvarchar(50) NULL --·¿ÐÍ(ÊÖÊä»ò¸ù¾ÝÀàÐÍѡÔñ×Զ¯ÌîÈë)£¬ÊÖÊ䲻ռÓÃ×ÊԴ
+ ,[room_code] nvarchar(20) NULL--ѡÔäÀàÐÍ(ÊÖÊäÀàÐÍʱΪ¿Õ,²»ռÓÃ×ÊԴ)
+ ,[room_num] int NOT NULL--·¿¼äÊýÁ¿
+ ,[room_price] money default 0 NOT NULL--·¿¼䵥¼Û
+ ,[breakfast_num] int NOT NULL--×ÜÔç²ÍÊý:0-ÎÞÔç²Í,
+
+ ,[long_distance] int NOT NULL--³¤;µ绰:0-¹أ¬1-¿ª,
+ ,[min_shop] int NOT NULL--·¿°É:0-¹Ø,1-¿ª,
+ ,[remark] nvarchar(200) NULL --¿ͷ¿±¸ע
+)
+;
+
+--»áÒéÊÒԤ¶©Ã÷ϸ±í
+if object_id('appt_meeting') is null
+CREATE TABLE appt_meeting(
+ [id] int IDENTITY(1,1) PRIMARY KEY --×ÔÔöÖ÷¼ü
+ ,[guid] nvarchar(50) not null --GUID
+ ,[appt_id] int NOT NULL--ËùÊôԤ¶©Ö÷µ¥
+ ,[meeting_time] datetime NULL-- »áÒéÈ볡ÈÕÆÚ
+ ,[groups] nvarchar(50) NOT NULL --³¡´Î:1-Ôç,2-ÖÐ,3-Íí£¬
+ ,[meeting_room] nvarchar(50) NULL --»áÒéÌüÃû³Æ(ÊÖÊä»ò¸ù¾ÝÀàÐÍѡÔñ×Զ¯ÌîÈë)£¬ÊÖÊ䲻ռÓÃ×ÊԴ
+
+ ,[meeting_code] nvarchar(20) NULL --»áÒéÌü´úÂë(ÊÖÊäÀàÐÍʱΪ¿Õ,²»ռÓÃ×ÊԴ)
+ ,[meeting_rostrum] nvarchar(50) NULL --»áÒéÊÒÖ÷ϯ̨λ
+ ,[meeting_shape] nvarchar(50) NULL --»áÒéÊÒ-̨ÐÍ(¿Î×À)
+ ,[meeting_num] int NULL --ÈËÊý:0-´ý¶¨,
+ ,[meeting_price] money default 0 not NULL --µ¥¼Û
+
+ ,[meeting_title] nvarchar(50) NULL --ºá·ùÄÚÈÝ:¿Õ-Îá·ù,
+ ,[remark] nvarchar(200) NULL --»áÒéÌü±¸ע
+)
+;
+
+--²ÍÒûԤ¶©Ã÷ϸ±í
+if object_id('appt_catering') is null
+CREATE TABLE appt_catering(
+ [id] int IDENTITY(1,1) PRIMARY KEY --×ÔÔöÖ÷¼ü
+ ,[guid] nvarchar(50) not null --GUID
+ ,[appt_id] int NOT NULL--ËùÊôԤ¶©Ö÷µ¥
+ ,[catering_time] datetime NOT NULL --²ÍÒû-ÈÕÆÚ
+ ,[groups] nvarchar(50) NOT NULL --²ͱð:1-Ôç,2-ÖÐ,3-Íí£¬
+ ,[catering_room] nvarchar(50) NULL --²ÍÌüÃû³Æ
+
+ ,[catering_code] nvarchar(50) NULL--Óò͵صã
+ ,[catering_type] int default 0 not null -- ÓòÍÀàÐÍ 0-×ÀÊý£¬1-ÈËÊý
+ ,[catering_num] int default 1 not null -- ×ÀÊý»òÈËÊýÊýÁ¿
+ ,[catering_price] money default 0 not NULL--ÿ×À»òÿÈ˵¥¼Û
+ ,[catering_table] nvarchar(50) NULL--²ÍÒû-×ÀÐÍ
+
+ ,[wine] nvarchar(50) NULL--¾Æˮ
+ ,[remark] nvarchar(200) NULL --±¸ע
+)
+;
+--ÎÂȪԤ¶©Ã÷ϸ±í
+if object_id('appt_spring') is null
+CREATE TABLE appt_spring(
+ [id] int IDENTITY(1,1) PRIMARY KEY --×ÔÔöÖ÷¼ü
+ ,[guid] nvarchar(50) not null --GUID
+ ,[appt_id] int NOT NULL --ËùÊôԤ¶©Ö÷µ¥
+ ,[spring_time] datetime NULL --ÎÂȪ_ÈÕÆÚ
+ ,[people_num] int NULL--×ÜÈËÊý(×Զ¯¼ÆËã):0-´ý¶¨
+ ,[spring_men] int NULL--ÄÐÐÔÈËÊý:0-´ý¶¨
+
+ ,[spring_women] int NULL--ŮÐÔÈËÊý:0-´ý¶¨
+ ,[consume] nvarchar(50) NULL--¶þ´ÎÏû·Ñ
+ ,[spring_price] money default 0 not NULL--µ¥¼Û
+ ,[remark] nvarchar(200) NULL --±¸ע
+)
+;
+--Ԥ¶©±¸עÀ©չ±í
+if object_id('appt_remark') is null
+CREATE TABLE appt_remark(
+ [id] int IDENTITY(1,1) PRIMARY KEY --×ÔÔöÖ÷¼ü
+ ,[guid] nvarchar(50) not null --GUID
+ ,[appt_id] int NOT NULL --Ԥ¶©Ö÷¼ü±¸ע
+ ,[title] nvarchar(50) NULL--±¸ע·ÖÀà
+ ,[info] nvarchar(500) NULL --±¸עÄÚÈÝ
+)
+;
+-- Ԥ¶©ÉóÅú¼Ç¼¼°³Ëͱí
+if object_id('appt_audit_log') is null
+CREATE TABLE appt_audit_log(
+ [id] int IDENTITY(1,1) PRIMARY KEY --×ÔÔöÖ÷¼ü
+ ,[type] int NOT NULL --ÀàÐÍ:1-ÉóÅú,2-³Ëͣ¬
+ ,[createtime] datetime default getdate() NOT NULL--´´½¨ʱ¼ä
+ ,[userid] nvarchar(20) NOT NULL--ÉóÅúÈËԱ/³ËͽÓÊÕÈË
+ ,[appt_id] int NOT NULL--ËùÊôԤ¶©Ö÷µ¥
+
+ ,[auditor_status] int NOT NULL--ÉóÅú״̬:1-ÉóÅúͨ¹ý,0-²µ»Ø,2-תÉóÅú,3-Êֶ¯³ËÍÓë×Զ¯³ËÍ
+ ,[remark] nvarchar(200) NULL--ÉóÅú±¸ע
+ ,[pic0] nvarchar(max) -- ͼƬ0
+ ,[pic1] nvarchar(max) -- ͼƬ1
+ ,[pic2] nvarchar(max) -- ͼƬ2
+
+ ,[pic3] nvarchar(max) -- ͼƬ3
+ ,[pic4] nvarchar(max) -- ͼƬ4
+ ,[source] nvarchar(20) NULL --³Ëͷ¢ÆðÈË
+ ,[pid] int not null default 0 -- ±»»ظ´µĸ¸½áµã
+)
+;
+--ÈÕ־±í
+if object_id('appt_log') is null
+CREATE TABLE appt_log(
+ [id] [int] IDENTITY(1,1) PRIMARY KEY, --×ÔÔöÖ÷¼ü
+ [tableName] [varchar](100) NULL,-- Êý¾ݱí
+ [keyId] [varchar](100) NULL, --±íÖ÷¼üֵ
+ [oldData] [varchar](2000) NULL, --ԭʼÊý¾Ý
+ [newData] [varchar](2000) NULL, --ÐÂÊý¾Ý
+ [createTime] [datetime] default getdate() NOT NULL, --´´½¨ʱ¼ä
+ [userId] [nvarchar](20) NULL, --²Ù×÷ÈË
+ [systemUser] [int] NULL --»§ÀàÐÍ:0-ÆÕͨÓû§,1-¹ÜÀíÈËԱ
+)
+;
+--²Ù×÷չʾÈÕ־
+if object_id('appt_remark_log') is null
+CREATE TABLE appt_remark_log(
+ [id] [int] IDENTITY(1,1) PRIMARY KEY --×ÔÔöÖ÷¼ü
+ ,[createTime] [datetime] default getdate() NOT NULL --´´½¨ʱ¼ä
+ ,[pid] [int] default(0) not null -- ËùÊô¸¸¼¶
+ ,[appt_id] [int] NOT NULL --ËùÊôԤ¶©Ö÷µ¥
+ ,[account] [nvarchar](20) not null --²Ù×÷ÈËÕ˺Å
+
+ ,[username] [nvarchar](20) null --²Ù×÷ÈËÐÕÃû
+ ,[old_status] [int] not null -- Ìύǰ״̬
+ ,[new_status] [int] not null -- Ìύºó״̬
+ ,[remark] [varchar](2000) NULL --²Ù×÷È˱¸עÎÄ×Ö
+ ,[update_data] [varchar](2000) NULL, --Êý¾ݱ仯
+)
+;
+
+-- °´ÈÕÆڶÎȡÿÈտÉÊ۷¿Êý
+
+if object_id('p_yyj_ota_type_rsv_tend') is not null
+ drop proc p_yyj_ota_type_rsv_tend;
+
+create proc p_yyj_ota_type_rsv_tend
+ @rm_type varchar(255), -- ·¿ÐͲÎÊý£¬¿ÉÒԶàѡ£¬ÓÃ#¸ô¿ª£¬Èç#BJ#DJ# , Ҳ¿ÉÒÔÓà % ´ú±íȫ²¿·¿ÐÍ
+ @s_time datetime, -- ¿ªʼÈÕÆÚ
+ @e_time datetime, -- ½áÊøÈÕÆÚ
+ @tentative char(1) = 'T' -- °üº¬²»ȷ¶¨ OTAĬÈϴ«µÝ T
+
+as
+update room_type set sequence = 10 where sequence = 0
+select @s_time = convert(datetime, convert(char(10), @s_time, 111))
+select @e_time = convert(datetime, convert(char(10), @e_time, 111))
+
+declare
+ @result int
+-- ------------------------------------------------------------------------------------
+-- ·µ»ØֵÈçÏÂ
+-- ------------------------------------------------------------------------------------
+create table #inventory --±¾¹ý³̷µ»Øֵ
+(
+ date datetime null, --ÈÕÆÚ
+ type char(3) null, --·¿ÐÍ
+ sequence int null, --ÅÅÐò
+ quan int null --¿ÉÂôÊý£¨¿ÉÓÃÊýÁ¿£©
+)
+create table #tmp
+(
+ type char(3) null,
+ quan int null
+)
+
+declare @type char(3),
+ @tennum int
+
+-- ƴ×ַû´®
+if @rm_type='%'
+begin
+ select @rm_type='#'
+ select @type=isnull((select min(id) from room_type where id>''), '')
+ while @type <> ''
+ begin
+ select @rm_type = @rm_type+substring(@type+space(3), 1, 3)+'#'
+ select @type=isnull((select min(id) from room_type where id>@type ), '')
+ end
+end
+else
+ select @rm_type = '#'+@rm_type+'#' --ǿÖƼÓÉÏYYJ
+
+
+while @s_time <= @e_time
+begin
+
+
+ -- Ê×ÏȲåÈëԤÁô
+ if @tentative = 'T'
+ begin
+
+ insert #inventory select @s_time, c.id, 0,
+ quan=isnull((select sum(a.rooms) from rsvinfo a, mstinfo b
+ where charindex('#'+substring(a.type+' ',1,3)+'#',@rm_type)>0 and a.begin_<>a.end_ and a.begin_<=@s_time and a.end_>@s_time and substring(a.accnt,1,1) <> 'G%'
+ and a.accnt=b.accnt and (a.roomno is null or a.roomno='') and c.id = b.type
+ and b.sta in ('R','I')
+ ),0) + (select isnull(count(distinct a.roomno),0) from rsvinfo a, mstinfo b
+ where charindex('#'+substring(a.type+' ',1,3)+'#',@rm_type)>0 and a.begin_<>a.end_ and a.begin_<=@s_time and a.end_>@s_time and substring(a.accnt,1,1) <> 'G%'
+ and a.accnt=b.accnt and a.roomno is not null and a.roomno<>'' and c.id = b.type
+ and b.sta in ('R','I'))
+ from room_type c where charindex('#'+substring(c.id+' ',1,3)+'#', @rm_type) > 0
+
+ end
+ else
+ begin
+ delete #tmp
+ insert #inventory select @s_time, c.id, 0,
+ quan=isnull((select sum(a.rooms) from rsvinfo a, mstinfo b
+ where charindex('#'+substring(a.type+' ',1,3)+'#',@rm_type)>0 and a.begin_<>a.end_ and a.begin_<=@s_time and a.end_>@s_time and substring(a.accnt,1,1) <> 'G%'
+ and a.accnt=b.accnt and (a.roomno is null or a.roomno='') and c.id = b.type
+ and b.sta in ('R','I') and b.resclass not in (select id from sys_code where class='resclass' and charindex('Tentative',remark)>0)
+ ),0) + (select isnull(count(distinct a.roomno),0) from rsvinfo a, mstinfo b
+ where charindex('#'+substring(a.type+' ',1,3)+'#',@rm_type)>0 and a.begin_<>a.end_ and a.begin_<=@s_time and a.end_>@s_time and substring(a.accnt,1,1) <> 'G%'
+ and a.accnt=b.accnt and a.roomno is not null and a.roomno<>'' and c.id = b.type
+ and b.sta in ('R','I') and b.resclass not in (select id from sys_code where class='resclass' and charindex('Tentative',remark)>0))
+ from room_type c where charindex('#'+substring(c.id+' ',1,3)+'#', @rm_type) > 0
+
+ end
+
+ -- modi by shr 2014.4.3
+ update #inventory set #inventory.quan =(select isnull(count(c.roomno),0) from room_list c where #inventory.type=C.type and
+ c.tag1 <> 'VR') - #inventory.quan where #inventory.date = @s_time and #inventory.type<>'TEN'
+
+ update #inventory set #inventory.quan = #inventory.quan - (select isnull(count(1),0) from room_oo b where b.sta='I' and b.type='OO'
+ and b.bdate <= @s_time and b.edate > @s_time and b.rmtype = #inventory.type)
+ where #inventory.date = @s_time and #inventory.type<>'TEN'
+
+ -- YYJ ¿ÉÓÃÓëռÓÃÔö¼ӳ¬ԤÁôÀۼÓ
+ if exists(select 1 from sys_option where catalog = 'reserver' and item = 'rsvtendovr' and rtrim(value)='T')
+ update #inventory set #inventory.quan = #inventory.quan + (select isnull(sum(exceed),0) from room_type b where b.id = #inventory.type)
+ where #inventory.date = @s_time and #inventory.type<>'TEN'
+
+
+
+ select @s_time = dateadd(day, 1, @s_time)
+end
+
+
+update #inventory set sequence = a.sequence from room_type a where rtrim(#inventory.type)=rtrim(a.id)
+select a.date,a.type,a.sequence,a.quan
+ from #inventory a order by a.date, a.sequence
+
+return 0
+;
+if object_id('p_yyj_grpadd_inter') is not null
+ drop proc p_yyj_grpadd_inter ;
+
+create proc p_yyj_grpadd_inter
+ @gname varchar(50) , --ÍŶÓÃû³Æ
+ @leader char(20), --Áì¶ӻòµ¼ÓλòÁªϵÈË
+ @phone char(20), --Áì¶ӵ绰
+ @arr datetime , --µִïʱ¼ä ÈÕÆںÍʱ¼䣬Èç2019-01-17 18:00:00
+ @dep datetime, --À뿪ʱ¼ä ÈÕÆںÍʱ¼䣬Èç2019-01-18 14:00:00
+ @rooms integer, --ÍŶÓ×ܹ²µķ¿¼äÊý±¸ע£¨ֻÊDZ¸ע£¬²»ռÓ÷¿¼䣩
+ @guests integer, --ÍŶӵÄ×ÜÈËÊý±¸ע£¨ֻÊDZ¸ע£¬²»ռÓ÷¿¼䣩
+ @remark varchar(255), --ÍŶÓÖ÷µ¥±¸ע
+ @log_id char(5), --²Ù×÷Ա¹¤ºţ¨Èç¹û²Ù×÷ԱûÓÐÈí¼þµĹ¤ºţ¬µÚÈý·½¿ÉÒÔÔڵÏÁªÈí¼þÖд´½¨һ¸öͨÓõŤºÅ
+ @log_ip char(16), --²Ù×÷µçÄԻòÕ߽ӿڵçÄԵÄIP£¬¿ÉÒÔÓÿÕ×ַû´®»òÕßÈÎÒâ×ַû´®
+ @saleid char(4) --ÏúÊÛԱ¹¤ºţ¬ÔڵÏÁªÈí¼þÏúÊ۲˵¥Ï¿ÉÒԴò¿ªÏúÊÛԱÉèÖ㬲鿴ÏúÊÛԱµĹ¤ºţ¬¿ÉÒÔΪ¿Õ×ַû»»
+as
+
+declare
+@resno char(10) ,
+@accnt varchar(10),
+@msg varchar(60),
+@ret integer ,
+@sysdate datetime,
+@newno char(10)
+
+select @ret = 0
+select @msg = ''
+
+if rtrim(isnull(@gname,'')) = ''
+ select @msg = 'ÍŶÓÃû³Ʋ»ÔÊÐí¿Õ'
+if @arr = null or @dep= null
+ select @msg = 'µÖÀëʱ¼䲻ÔÊÐíΪ¿Õ'
+if @rooms = null or @rooms=0
+ select @rooms =1
+if @guests = null or @guests=0
+ select @guests =1
+if datediff(dd,@arr,@dep)<1
+ select @msg = 'À뿪ÈÕÆڱØÐë´óÓÚÈëסÈÕÆÚ'
+
+if @msg <> ''
+ begin
+ select @ret = 1
+ select @ret , @msg
+ return @ret
+ end
+
+select @sysdate = sysdate from sys_data
+select @resno = no from sys_acctno where class ='reserve'
+select @accnt = no from sys_acctno where class ='group'
+
+if exists (select 1 from grpinfo where accnt =@accnt)
+ begin
+ select @accnt = "G0" + right("00000" + convert(varchar(4),convert(integer,right(max(rtrim(accnt)),4))+1),5) from grpinfo
+ end
+
+insert grpinfo( accnt,sta, gname,src,mkt,arr,dep,country, leader,phone,guests,rooms,cropsno,cropname,paycode,
+ ramark,sysdate,log_num,log_id,log_shift,log_ip,log_date,navite,address,payroom,ename,resno,
+ grpno,payaccnt,code,vip,sec,special,araccnt,saleid)
+select @accnt,'R',@gname,'LOC','GRP',@arr,@dep,'CN',@leader,@phone,@guests,@rooms,'','','9001',
+ @remark, @sysdate,0,@log_id,'1',@log_ip,getdate(),'','','ÍŶÓ','',@resno,
+ @accnt,@accnt,'G','0','0','','',@saleid
+
+if exists (select 1 from grpinfo where accnt =@accnt)
+ begin
+ select @newno = "G0" + right("00000" + convert(varchar(4),convert(integer,(right(rtrim(@accnt),4))) + 1),5)
+ update sys_acctno set no = @newno where class ='group'
+ select @newno = "R0" + right("00000" + convert(varchar(4),convert(integer,(right(rtrim(@resno),4))) + 1),5)
+ update sys_acctno set no =@newno where class ='reserve'
+ end
+select @ret = 0
+select @msg = @accnt
+select @ret,@msg
+return @ret
+;
+
+if object_id('p_yyj_grpmeet_inter') is not null
+ drop proc p_yyj_grpmeet_inter;
+
+create proc p_yyj_grpmeet_inter
+@accnt char(7), --ÍŶÓÕ˺ţ¨´´½¨ÍŶÓʱ»ñµã©
+@date datetime, --»áÒéԤ¶©µÄÈÕÆÚ ֻҪÈÕÆڲ»ÐèҪʱ·ÖÃë
+@rescode varchar(3), --»áÒéÊұàºÅ,¿ÉÒԴӵÏÁªÈí¼þ²鿴£¬»òÕßres_code±íȡ¶ÔÕÕcode×ֶÎ
+@sfield integer, --³¡´Σ¬ 0´ú±íȫÌì 1ÉÏÎ糡 2ÏÂÎ糡 3Íí³¡
+@price money, --¼۸ÉÒԴӵÏÁªÈí¼þ²鿴£¬»òÕßres_code±íȡprice×ֶΣ¬¸Ã×ֶÎΪԤÉè²ο¼¼ۣ¬¾ßÌ嶩µ¥¼۸ñÒԸòÎÊýΪ¡£
+@op_id char(5) --²Ù×÷Ա¹¤ºţ¨Èç¹û²Ù×÷ԱûÓÐÈí¼þµĹ¤ºţ¬µÚÈý·½¿ÉÒÔÔڵÏÁªÈí¼þÖд´½¨һ¸öͨÓõŤºÅ
+as
+
+
+declare
+@sysno char(6) ,
+@maxno integer ,
+@no char(10),
+@bdate datetime ,
+@op_name varchar(16),
+@sfieldtime varchar(5),
+@efieldtime varchar(5)
+
+if not exists( select 1 from grpinfo where sta in ('I','R') and accnt = @accnt )
+ begin
+ select 1,'ÍŶÓÕ˺Å ' + @accnt + '·ÇÓÐЧ״̬'
+ return 1
+ end
+if exists (select 1 from res_info where @date>=stime and @date<=etime and rescode = @rescode and (sfield = @sfield or sfield=0 or @sfield=0) and sta in ('R','O'))
+ begin
+ select 1,'¸ûáÒéÊÒÒѱ»Ԥ¶©!'
+ return 1
+ end
+select @op_name = op_name from uc_login where op_id = @op_id
+select @bdate = sysdate from sys_data
+select @sysno = convert ( char ( 6 ) , getdate ( ) , 12 ) from sys_data
+select @maxno = isnull ( max ( convert ( int , substring ( no , 7 , 4 ) ) ) , 0 ) + 1 from res_info where
+substring ( no , 1 , 6 ) =convert ( char ( 6 ) , getdate ( ) , 12 )
+select @no = @sysno + right('0000' + convert(varchar(4),@maxno),4)
+if @sfield = 0
+ begin
+ select @sfieldtime = '08:30'
+ select @efieldtime = '22:30'
+ end
+else if @sfield = 1
+ begin
+ select @sfieldtime = '08:30'
+ select @efieldtime = '11:30'
+ end
+else if @sfield = 2
+ begin
+ select @sfieldtime = '13:00'
+ select @efieldtime = '17:30'
+ end
+else if @sfield = 3
+ begin
+ select @sfieldtime = '19:30'
+ select @efieldtime = '22:30'
+ end
+
+
+
+INSERT INTO res_info select
+ @no,'R',@accnt,'',@rescode,1,@bdate,@date,@date,@sfield,@sfield,
+ @sfieldtime,@efieldtime,NULL,@price,@price,'F',@op_id,@op_name,
+ getdate(),NULL,NULL,NULL,0
+if @@rowcount = 1
+ select 0,'»áÒéÊÒԤ¶¨³ɹ¦!'
+else
+ select 1,'»áÒéÊÒԤ¶¨ʧ°ܣ¬ÇëÖØÊÔ!'
+return 0
+;
+
+if object_id('p_yyj_gblock_inter') is not null
+ drop proc p_yyj_gblock_inter ;
+create proc p_yyj_gblock_inter
+ @log_id char(5), --²Ù×÷Ա¹¤ºţ¨Èç¹û²Ù×÷ԱûÓÐÈí¼þµĹ¤ºţ¬µÚÈý·½¿ÉÒÔÔڵÏÁªÈí¼þÖд´½¨һ¸öͨÓõŤºţ©
+ @log_ip char(16), --²Ù×÷µçÄԻòÕ߽ӿڵçÄԵÄIP£¬¿ÉÒÔÓÿÕ×ַû´®»òÕßÈÎÒâ×ַû´®
+ @grpno char(7), --ÍŶÓÕ˺ţ¨´´½¨ÍŶÓʱ»ñµã©
+ @arr datetime, --µִïÈÕÆÚ ֻҪÈÕÆڲ»ÐèҪʱ·ÖÃë
+ @dep datetime, --À뿪ÈÕÆÚ ֻҪÈÕÆڲ»ÐèҪʱ·ÖÃë
+ @type char(3), --·¿Àà´úÂ룬ÈçBJ£¬Çë²鿴µÏÁª¾ƵêϵͳÖз¿ÀàµÄÉèÖÃ
+ @rooms integer, --ԤÁôµÄÊýÁ¿£¬´ËΪÕæʵÊýÁ¿£¬Èç¹û³¬¹ý¾Ƶê¿ÉÓÃÊý»᷵»شíÎóÐÅϢ
+ @price money, --·¿¼Û
+ @guests integer, -- һ¸ö·¿¼äס¼¸¸öÈˣ¬ĬÈÏΪ1
+ @remark varchar(255), --¸ÃԤÁôµı¸ע£¬Åŷ¿ʱ¿ÉÒԿ´µ½´˱¸ע
+ @rmcode char(4) --Ç밴ÕÕĬÈϵÄRACKÌîд£¬´ËΪ·¿¼ÛÂë
+
+as
+declare
+ @ret integer,
+ @accnt char(10),
+ @resno char(10),
+ @sysdate datetime,
+ @price0 money,
+ @log_name char(12),
+ @mkt char(3),
+ @src char(3),
+ @gname varchar(50),
+ @ename char(50),
+ @country char(3),
+ @vip char(2),
+ @sec char(2),
+ @cropsno char(7),
+ @special varchar(50),
+ @saleid char(4),
+ @araccnt char(10),
+ @msg varchar(60),
+ @deptime varchar(8),
+ @postopen char(1),
+ @rmpackage varchar(50),
+ @ooo integer,
+ @blk integer,
+ @avl integer
+
+select @rmpackage = ''
+select @postopen = isnull(value,'') from sys_option where catalog = 'group' and item = 'postopen'
+if @postopen is null
+ set @postopen = 'F'
+if charindex(@postopen,'TF') = 0
+ set @postopen = 'F'
+
+if not exists( select 1 from grpinfo where sta in ('I','R') and accnt = @grpno )
+ begin
+ select @ret=1, @msg = 'ÍŶÓÕ˺Å ' + @grpno + '·ÇÓÐЧ״̬'
+ select @ret, @msg
+ return @ret
+ end
+select @ooo = 0
+select @blk=0
+select @avl=0
+exec p_xx_reserve_chkavail @type,@arr,@dep,'N',@ooo out ,@blk out ,@avl out,''
+if @avl is null or @avl<@rooms
+ begin
+ select @ret=@avl, @msg = '¸÷¿Àà×ÊԴ²»×ã'
+ select @ret, @msg
+ return @ret
+ end
+
+select @sysdate = sysdate from sys_data
+select @log_name = op_name from uc_login where op_id=@log_id
+select @src=src,@mkt=mkt,@gname=gname,@ename=ename,@country=country,@resno=rtrim(resno),@vip=vip,@sec=sec,
+@cropsno=cropsno,@special=special,@saleid=saleid,@araccnt=araccnt from grpinfo where accnt = @grpno
+if @resno is null
+ exec p_xx_pub_getno 'RESE',@resno output
+
+ select @deptime = deptime from mkt_deptime where id = 'GRP' and isnull(flag,'') = 'T'
+ if @deptime <> '' and @deptime is not null
+ begin
+ select @dep = convert(datetime,(rtrim(left(convert(varchar,@dep,120),10)) + ' ' + @deptime))
+ end
+
+ select @price0 = price0 from room_type where id=@type
+ exec p_xx_pub_getno 'ACCT',@accnt output
+
+ insert mstinfo(accnt,grpno,sta,src,mkt,sysdate,resno,arr,dep,type,roomno,price0,price,rooms,numbs,gname,ename,sex,
+ vip,sec,cropsno,special,saleid,araccnt,country,rmcode,remark,log_id,log_name,log_shift,log_ip,log_date,logmark,res,restime,idcls,rmpackage,flag)
+ select @accnt,@grpno,'R',@src,@mkt,@sysdate,@resno,@arr,@dep,@type,'',@price0,@price,@rooms,@guests,@gname,@ename,'M',
+ @vip,@sec,@cropsno,@special,@saleid,@araccnt,@country,@rmcode,@remark,@log_id,@log_name,'1',@log_ip,getdate(),0,@log_id,getdate(),'01',@rmpackage,@postopen
+
+
+select @ret = 0, @msg = '·¿ÀàԤÁô³ɹ¦'
+select @ret, @msg
+return @ret
+;
+
+if object_id('p_xx_res_info_view3') is not null
+ drop proc p_xx_res_info_view3 ;
+create proc p_xx_res_info_view3
+ @startday datetime,
+ @enddate datetime,
+ @sort varchar(3),
+ @accnt varchar(10) = '%'
+as
+
+declare
+ @rdate datetime,
+ @accnt1 varchar(10)
+if exists(select 1 from mstinfo where accnt=@accnt)
+ select @accnt1=grpno from mstinfo where accnt=@accnt
+select @rdate=@startday
+
+CREATE TABLE #query (
+ code varchar(6) not null,
+ descript char(20) null,
+ sort char(3) null,
+ day11 char(2) null,
+ day12 char(2) null,
+ day13 char(2) null,
+ day21 char(2) null,
+ day22 char(2) null,
+ day23 char(2) null,
+ day31 char(2) null,
+ day32 char(2) null,
+ day33 char(2) null,
+ day41 char(2) null,
+ day42 char(2) null,
+ day43 char(2) null,
+ day51 char(2) null,
+ day52 char(2) null,
+ day53 char(2) null,
+ day61 char(2) null,
+ day62 char(2) null,
+ day63 char(2) null,
+ day71 char(2) null,
+ day72 char(2) null,
+ day73 char(2) null,
+ day81 char(2) null,
+ day82 char(2) null,
+ day83 char(2) null,
+ day91 char(2) null,
+ day92 char(2) null,
+ day93 char(2) null
+)
+
+insert #query (code,descript,sort)
+ select code,descript1,sort from res_code where sta='T' and sort like @sort
+
+CREATE TABLE #tblav (
+ rescode char(4) not null,
+ bdate datetime not null,
+ sfield int null,
+ accnt varchar(10) null,
+ accnt1 varchar(10) null,
+ sta char(1) not null)
+insert #tblav(rescode,bdate,sfield,accnt,accnt1,sta)
+ select rescode,stime,sfield,accnt,accnt1,min(sta) from res_info where sta in ('R','O')
+ group by rescode,stime,sfield,accnt,accnt1
+ order by rescode,stime,sfield,accnt,accnt1
+
+update #tblav set sta='S' where accnt=@accnt or accnt1=@accnt1
+
+select @rdate=dateadd(day,0,@startday)
+
+update #query set #query.day11=b.sta + '0' from #tblav b where #query.code=b.rescode and datediff(dd,b.bdate,@rdate)=0 and b.sfield=0
+
+update #query set #query.day11=b.sta from #tblav b where #query.code=b.rescode and datediff(dd,b.bdate,@rdate)=0 and b.sfield=1
+update #query set #query.day12=b.sta from #tblav b where #query.code=b.rescode and datediff(dd,b.bdate,@rdate)=0 and b.sfield=2
+update #query set #query.day13=b.sta from #tblav b where #query.code=b.rescode and datediff(dd,b.bdate,@rdate)=0 and b.sfield=3
+
+select @rdate=dateadd(day,1,@startday)
+update #query set #query.day21=b.sta + '0' from #tblav b where #query.code=b.rescode and datediff(dd,b.bdate,@rdate)=0 and b.sfield=0
+
+update #query set #query.day21=b.sta from #tblav b where #query.code=b.rescode and datediff(dd,b.bdate,@rdate)=0 and b.sfield=1
+update #query set #query.day22=b.sta from #tblav b where #query.code=b.rescode and datediff(dd,b.bdate,@rdate)=0 and b.sfield=2
+update #query set #query.day23=b.sta from #tblav b where #query.code=b.rescode and datediff(dd,b.bdate,@rdate)=0 and b.sfield=3
+
+select @rdate=dateadd(day,2,@startday)
+update #query set #query.day31=b.sta + '0' from #tblav b where #query.code=b.rescode and datediff(dd,b.bdate,@rdate)=0 and b.sfield=0
+update #query set #query.day31=b.sta from #tblav b where #query.code=b.rescode and datediff(dd,b.bdate,@rdate)=0 and b.sfield=1
+update #query set #query.day32=b.sta from #tblav b where #query.code=b.rescode and datediff(dd,b.bdate,@rdate)=0 and b.sfield=2
+update #query set #query.day33=b.sta from #tblav b where #query.code=b.rescode and datediff(dd,b.bdate,@rdate)=0 and b.sfield=3
+
+select @rdate=dateadd(day,3,@startday)
+update #query set #query.day41=b.sta + '0' from #tblav b where #query.code=b.rescode and datediff(dd,b.bdate,@rdate)=0 and b.sfield=0
+update #query set #query.day41=b.sta from #tblav b where #query.code=b.rescode and datediff(dd,b.bdate,@rdate)=0 and b.sfield=1
+update #query set #query.day42=b.sta from #tblav b where #query.code=b.rescode and datediff(dd,b.bdate,@rdate)=0 and b.sfield=2
+update #query set #query.day43=b.sta from #tblav b where #query.code=b.rescode and datediff(dd,b.bdate,@rdate)=0 and b.sfield=3
+
+select @rdate=dateadd(day,4,@startday)
+update #query set #query.day51=b.sta + '0' from #tblav b where #query.code=b.rescode and datediff(dd,b.bdate,@rdate)=0 and b.sfield=0
+update #query set #query.day51=b.sta from #tblav b where #query.code=b.rescode and datediff(dd,b.bdate,@rdate)=0 and b.sfield=1
+update #query set #query.day52=b.sta from #tblav b where #query.code=b.rescode and datediff(dd,b.bdate,@rdate)=0 and b.sfield=2
+update #query set #query.day53=b.sta from #tblav b where #query.code=b.rescode and datediff(dd,b.bdate,@rdate)=0 and b.sfield=3
+
+select @rdate=dateadd(day,5,@startday)
+update #query set #query.day61=b.sta + '0' from #tblav b where #query.code=b.rescode and datediff(dd,b.bdate,@rdate)=0 and b.sfield=0
+update #query set #query.day61=b.sta from #tblav b where #query.code=b.rescode and datediff(dd,b.bdate,@rdate)=0 and b.sfield=1
+update #query set #query.day62=b.sta from #tblav b where #query.code=b.rescode and datediff(dd,b.bdate,@rdate)=0 and b.sfield=2
+update #query set #query.day63=b.sta from #tblav b where #query.code=b.rescode and datediff(dd,b.bdate,@rdate)=0 and b.sfield=3
+
+select @rdate=dateadd(day,6,@startday)
+update #query set #query.day71=b.sta + '0' from #tblav b where #query.code=b.rescode and datediff(dd,b.bdate,@rdate)=0 and b.sfield=0
+update #query set #query.day71=b.sta from #tblav b where #query.code=b.rescode and datediff(dd,b.bdate,@rdate)=0 and b.sfield=1
+update #query set #query.day72=b.sta from #tblav b where #query.code=b.rescode and datediff(dd,b.bdate,@rdate)=0 and b.sfield=2
+update #query set #query.day73=b.sta from #tblav b where #query.code=b.rescode and datediff(dd,b.bdate,@rdate)=0 and b.sfield=3
+
+select @rdate=dateadd(day,7,@startday)
+update #query set #query.day81=b.sta + '0' from #tblav b where #query.code=b.rescode and datediff(dd,b.bdate,@rdate)=0 and b.sfield=0
+update #query set #query.day81=b.sta from #tblav b where #query.code=b.rescode and datediff(dd,b.bdate,@rdate)=0 and b.sfield=1
+update #query set #query.day82=b.sta from #tblav b where #query.code=b.rescode and datediff(dd,b.bdate,@rdate)=0 and b.sfield=2
+update #query set #query.day83=b.sta from #tblav b where #query.code=b.rescode and datediff(dd,b.bdate,@rdate)=0 and b.sfield=3
+
+select @rdate=dateadd(day,8,@startday)
+update #query set #query.day91=b.sta + '0' from #tblav b where #query.code=b.rescode and datediff(dd,b.bdate,@rdate)=0 and b.sfield=0
+update #query set #query.day91=b.sta from #tblav b where #query.code=b.rescode and datediff(dd,b.bdate,@rdate)=0 and b.sfield=1
+update #query set #query.day92=b.sta from #tblav b where #query.code=b.rescode and datediff(dd,b.bdate,@rdate)=0 and b.sfield=2
+update #query set #query.day93=b.sta from #tblav b where #query.code=b.rescode and datediff(dd,b.bdate,@rdate)=0 and b.sfield=3
+
+select sort,code,descript,day11,day12,day13,day21,day22,day23,day31,day32,day33,day41,day42,day43,day51,day52,day53,
+ day61,day62,day63,day71,day72,day73,day81,day82,day83,day91,day92,day93 from #query order by sort,code
+return 0
+;
+
+-- ȡÏû×ÊԴռÓô洢¹ý³Ì
+if object_id('p_yyj_gblock_cancel') is not null
+ drop proc p_yyj_gblock_cancel;
+
+create proc p_yyj_gblock_cancel
+@accnt char(7), --ÍŶÓÕ˺ţ¨´´½¨ÍŶÓʱ»ñµã©
+@op_id char(5) --²Ù×÷Ա¹¤ºţ¨Èç¹û²Ù×÷ԱûÓÐÈí¼þµĹ¤ºţ¬µÚÈý·½¿ÉÒÔÔڵÏÁªÈí¼þÖд´½¨һ¸öͨÓõŤºÅ
+as
+declare
+@op_name varchar(16),
+@sysdate datetime,
+@ret integer,
+@msg varchar(60)
+
+--¸ùý³ÌÓÃÓÚȡÏû¸ÃÍŶӵÄËùÓÐԤ¶©×ÊԴ£¬°üÀ¨·¿¼䡢»áÒéÊÒ
+
+select @sysdate = sysdate from sys_data
+select @op_name = op_name from uc_login where op_id = @op_id
+update res_info set sta='C',cby = @op_id , cbyname = @op_name,cbytime=getdate(),logmark = logmark +1 where accnt = @accnt
+update mstinfo set sta='C',log_id =@op_id , log_shift ='1', log_date =getdate() ,log_name = @op_name,
+logmark = logmark+1 where grpno = @accnt
+select @ret = 0, @msg = '×ÊԴȡÏû³ɹ¦'
+select @ret, @msg
+return @ret
+;
\ No newline at end of file
diff --git a/api_v1/Appointment.Entity/Request/ApptJNCReq.cs b/api_v1/Appointment.Entity/Request/ApptJNCReq.cs
new file mode 100644
index 0000000..7a4e8fa
--- /dev/null
+++ b/api_v1/Appointment.Entity/Request/ApptJNCReq.cs
@@ -0,0 +1,356 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ #region 添加
+ ///
+ /// 创建订单入参
+ ///
+ public class AddSummaryJncReq : ApptSummary
+ {
+ ///
+ /// [必填] 客户端保存用户信息
+ ///
+ public string AccountDes { get; set; }
+ }
+ #endregion
+
+ #region 修改暂定单
+ public class UpdateSummaryReq : ApptSummary
+ {
+ ///
+ /// [必填] 客户端保存用户信息
+ ///
+ public string AccountDes { get; set; }
+ }
+ #endregion
+
+ #region 申请确定单
+ ///
+ /// 申请确定单入参 | 预定部对预定单进行审批通过 | 其他部门审批通过 | 驳回
+ ///
+ public class ApplyOrderReq
+ {
+ ///
+ /// [必填] 客户端保存用户信息
+ ///
+ public string AccountDes { get; set; }
+
+ ///
+ /// [必填] 预订单主键
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// 申请确定单备注
+ ///
+ public string Remark { get; set; }
+
+ ///
+ /// 申请确定单图片备注(最多5张)
+ ///
+ public List RemarkPics { get; set; }
+ }
+ #endregion
+
+ #region 获取实体
+
+ ///
+ /// 获取实体入参 | 订单对比 | 根据回复编号获取回复中的图片列表
+ ///
+ public class SummaryJncModelReq
+ {
+ ///
+ /// 客户端保存用户信息
+ ///
+ public string AccountDes { get; set; }
+
+ ///
+ /// 预订单主键
+ ///
+ public int Id { get; set; }
+ }
+
+
+ public class SummaryJncDetailRep : ApptSummary
+ {
+ public string UserName { get; set; }
+
+ ///
+ /// 图标状态:0-未提交,1-审核中,2-通过,3-驳回;4-取消;
+ ///
+ public int IconStatus { get; set; }
+ }
+ #endregion
+
+ #region 分页
+
+ ///
+ /// 分页入参
+ ///
+ public class SummaryJNCPageReq
+ {
+ ///
+ /// [必填]客户端保存用户信息
+ ///
+ public string AccountDES { get; set; }
+
+ ///
+ /// 当前页从1开始(默认1)
+ ///
+ public int PageIndex { get; set; }
+
+ ///
+ /// 页大小(默认10)
+ ///
+ public int PageSize { get; set; }
+
+ ///
+ /// 查询标签
+ ///
+ public int Menu { get; set; }
+
+ ///
+ /// 开始日期(包含当日,默认全部)[格式 2021-06-24]
+ ///
+ public string StartDay { get; set; }
+
+ ///
+ /// 截止日期(包含当日,默认全部)[格式 2021-06-24]
+ ///
+ public string EndDay { get; set; }
+
+ ///
+ /// 预订单编号
+ ///
+ public string No { get; set; }
+
+ ///
+ /// 搜索
+ ///
+ public string KeyWord { get; set; }
+ }
+ #endregion
+
+ #region 生成确认单
+ ///
+ /// 生成确认单入参
+ ///
+ public class CreateOrderReq
+ {
+ ///
+ /// 客户端保存用户信息
+ ///
+ public string AccountDes { get; set; }
+
+ ///
+ /// 预订单主键
+ ///
+ public int Id { get; set; }
+ }
+ #endregion
+
+ #region 审核订单
+ public class CheckerOrderReq
+ {
+ ///
+ /// 客户端保存用户信息
+ ///
+ public string AccountDes { get; set; }
+
+ ///
+ /// 预订单主键
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// 审核状态:1-审核通过,2-驳回
+ ///
+ public int Status { get; set; }
+
+ ///
+ /// 备注
+ ///
+ public string Remark { get; set; }
+ }
+ #endregion
+
+ ///
+ /// 销售员修改确订单或驳回订单入参
+ ///
+ public class UpdateOrderBySaleReq
+ {
+ ///
+ /// 客户端保存用户信息
+ ///
+ public string AccountDes { get; set; }
+
+ ///
+ /// 预订单主键
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// 备注
+ ///
+ public string Remark { get; set; }
+ }
+
+ public class AuditorLogReq
+ {
+ ///
+ /// 是否有审核权限:0-否,1-是,
+ ///
+ public int Authority { get; set; }
+
+ ///
+ /// 是否有修改权限:0-否,1-是,
+ ///
+ public int UpdateStatus { get; set; }
+
+ ///
+ /// 是否可提交审核:0-不可,1-可以,
+ ///
+ public int SubmitStatus { get; set; }
+
+ ///
+ /// 是否显示生成完成单:0-不显示,1-显示
+ ///
+ public int SumbitFinish { get; set; }
+
+ ///
+ /// 取消订单功能显示:0-不显示,1-显示
+ ///
+ public int SumbitCancel { get; set; }
+
+ public List AuditorLog { get; set; }
+ }
+
+ ///
+ /// 返回的日志记录
+ ///
+ public class AuditorLogDataReq
+ {
+ ///
+ /// 日志编号
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// 标题
+ ///
+ public string Title { get; set; }
+
+ ///
+ /// 状态:1-已操作,2-待操作
+ ///
+ public int Status { get; set; }
+
+ ///
+ /// 修改信息
+ ///
+ public List Info { get; set; }
+
+ ///
+ /// 图片
+ ///
+ public List PicList { get; set; }
+
+ ///
+ /// 手动回复的信息列表
+ ///
+ public List ReplyList { get; set; }
+
+ }
+
+ ///
+ /// 手动回复信息 数据类型
+ ///
+ public class ReplyResp
+ {
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime { get; set; }
+
+ ///
+ /// 审核人员/抄送接收人/回复操作人
+ ///
+ public string UserName { get; set; }
+
+ ///
+ /// 回复信息内容的主键
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// 审核备注
+ ///
+ public string Remark { get; set; }
+
+ ///
+ /// 图片数量
+ ///
+ public int PicNum { get; set; }
+ }
+
+ ///
+ /// 订单数据对比返回数据类型
+ ///
+ public class DisparityReq
+ {
+ public string Title { get; set; }
+
+ public DateTime Time { get; set; }
+
+ public List Info { get; set; }
+ }
+
+ public class CompareSummaryReq
+ {
+ ///
+ /// 客户端保存用户信息
+ ///
+ public string AccountDes { get; set; }
+
+ ///
+ /// 订单的guid
+ ///
+ public string Guid { get; set; }
+
+ ///
+ /// 状态:0-获取暂订单与最新确认单的对比,
+ ///
+ public int Status { get; set; }
+ }
+
+ ///
+ /// 信息回复 入参
+ ///
+ public class AddMsgReq
+ {
+ ///
+ /// [必填] 客户端保存用户信息
+ ///
+ public string AccountDes { get; set; }
+
+ ///
+ /// 被回复的主键
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// 回复内容
+ ///
+ public string Remark { get; set; }
+
+ ///
+ /// 图片
+ ///
+ public List PicList { get; set; }
+ }
+
+
+}
diff --git a/api_v1/Appointment.Entity/Request/ApptSendReq.cs b/api_v1/Appointment.Entity/Request/ApptSendReq.cs
new file mode 100644
index 0000000..8d7ad44
--- /dev/null
+++ b/api_v1/Appointment.Entity/Request/ApptSendReq.cs
@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ public class ApptSendReq
+ {
+ ///
+ /// 被抄送的预订主键
+ ///
+ public int ApptId { get; set; }
+
+ ///
+ /// 客户端保存用户信息
+ ///
+ public string AccountDES { get; set; }
+
+ ///
+ /// 抄送到账号
+ ///
+ public string[] ToUserAccounts { get; set; }
+
+ ///
+ /// 抄送备注
+ ///
+ public string Remark { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Request/ApptSummaryReq - 复制.cs b/api_v1/Appointment.Entity/Request/ApptSummaryReq - 复制.cs
new file mode 100644
index 0000000..9d20a51
--- /dev/null
+++ b/api_v1/Appointment.Entity/Request/ApptSummaryReq - 复制.cs
@@ -0,0 +1,380 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 预订申请提交表单
+ ///
+ public class ApptSummaryReq1
+ {
+ ///
+ /// 自增主键
+ ///
+ public int Id { get; set; }
+
+ /////
+ ///// 客户端保存用户信息
+ /////
+ //public string AccountDES { get; set; }
+
+ /////
+ ///// 组织单位
+ /////
+ //public string BuyerName { get; set; }
+
+ /////
+ ///// 公司地址
+ /////
+ //public string BuyerAddress { get; set; }
+
+ /////
+ ///// 会议名称
+ /////
+ //public string BuyerTitle { get; set; }
+
+ /////
+ ///// 组织负责人
+ /////
+ //public string LeaderName { get; set; }
+
+ /////
+ ///// 组织负责人电话
+ /////
+ //public string LeaderMobile { get; set; }
+
+ /////
+ ///// 会议组房号
+ /////
+ //public string LeaderRoom { get; set; }
+
+ /////
+ ///// 客房总备注
+ /////
+ //public string RoomRemark { get; set; }
+
+ /////
+ ///// 议室总备注
+ /////
+ //public string MeetingRemark { get; set; }
+
+ /////
+ ///// 餐饮总备注
+ /////
+ //public string CateringRemark { get; set; }
+
+ /////
+ ///// 温泉总备注
+ /////
+ //public string SpringRemark { get; set; }
+
+ /////
+ ///// 驳回备注
+ /////
+ //public string RebutRemark { get; set; }
+
+ /////
+ ///// 会议室预订明细列表
+ /////
+ ////public List ApptMeetingList { get; set; }
+
+ /////
+ ///// 客房预订明细列表
+ /////
+ ////public List ApptRoomList { get; set; }
+
+
+ /////
+ ///// 餐饮预订明细列表
+ /////
+ ////public List ApptCateringList { get; set; }
+
+ /////
+ ///// 温泉预订明细列表
+ /////
+ ////public List ApptSpringList { get; set; }
+
+ /////
+ ///// 其他备注
+ /////
+ ////public List Remarks { get; set; }
+
+ /////
+ ///// 提交人
+ /////
+ //public string UserId { get; set; }
+
+ /////
+ ///// 销售人员姓名
+ /////
+ //public string SaleName { get; set; }
+
+
+ /////
+ ///// 销售人员姓名电话
+ /////
+ //public string SalePhone { get; set; }
+
+
+ /////
+ ///// 审核状态:1-待审核,2-审核中,3-审核通过,4-驳回,
+ /////
+ //public int? AuditorStatus { get; set; }
+
+ /////
+ ///// 创建时间
+ /////
+ ////public DateTime CreateTime { get; set; }
+ }
+
+ ///
+ /// 会议室预订明细
+ ///
+ public class ApptMeetingReq1
+ {
+ ///
+ /// 自增主键
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// 会议入场日期
+ ///
+ public DateTime? MeetingTime { get; set; }
+
+ ///
+ /// 场次:1-早,2-中,3-晚
+ ///
+ public int[] MeetingGroup { get; set; }
+
+ ///
+ /// 会议厅名称(手输或根据类型选择自动填入),手输不占用资源
+ ///
+ public string MeetingRoom { get; set; }
+
+ ///
+ /// 会议厅代码(手输类型时为空,不占用资源)
+ ///
+ public string MeetingCode { get; set; }
+
+ ///
+ /// 会议室主席台位
+ ///
+ public string MeetingRostrum { get; set; }
+
+ ///
+ /// 会议室-台型(课桌)
+ ///
+ public string MeetingShape { get; set; }
+
+ ///
+ /// 人数:0-待定,
+ ///
+ public int? MeetingNum { get; set; }
+
+ ///
+ /// 单价
+ ///
+ public decimal? MeetingPrice { get; set; }
+
+ ///
+ /// 横幅内容:
+ ///
+ public string MeetingTitle { get; set; }
+
+ ///
+ /// 会议厅备注
+ ///
+ public string Remark { get; set; }
+ }
+
+ ///
+ /// 客房预订明细
+ ///
+ public class ApptRoomReq1
+ {
+ ///
+ /// 自增主键
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// 抵达时间
+ ///
+ public DateTime? RoomIn { get; set; }
+
+ ///
+ /// 离开时间
+ ///
+ public DateTime? RoomOut { get; set; }
+
+ ///
+ /// 房型(手输或根据类型选择自动填入),手输不占用资源
+ ///
+ public string RoomGroup { get; set; }
+
+ ///
+ /// 选择房间类型(手输类型时为空,不占用资源)
+ ///
+ public string RooomCode { get; set; }
+
+ ///
+ /// 房间数量
+ ///
+ public int? RoomNum { get; set; }
+
+ ///
+ /// 房间单价[当输入为0时,会根据房类代码获取优惠价]
+ ///
+ public decimal? RoomPrice { get; set; }
+
+ ///
+ /// 总早餐数:0-无早餐,
+ ///
+ public int? BreakfastNum { get; set; }
+
+ ///
+ /// 长途电话:0-关,1-开,
+ ///
+ public int? LongDistance { get; set; }
+
+ ///
+ /// 房吧:0-关,1-开,
+ ///
+ public int? MinShop { get; set; }
+
+ ///
+ /// 总温泉数:0-无,
+ ///
+ public int? SpringNum { get; set; }
+
+ ///
+ /// 客房备注
+ ///
+ public string RoomRemark { get; set; }
+ }
+
+
+
+ ///
+ /// 餐饮预订明细
+ ///
+ public class ApptCateringReq1
+ {
+ ///
+ /// 自增主键
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// 用餐日期
+ ///
+ public DateTime? CateringTime { get; set; }
+
+ ///
+ /// 场次:1-早,2-中,3-晚
+ ///
+ public int[] CateringGroup { get; set; }
+
+ ///
+ /// 餐厅名称(手输或根据类型选择自动填入),手输不占用资源
+ ///
+ public string CateringRoom { get; set; }
+
+ ///
+ /// 用餐地点(手输类型时为空,不占用资源)
+ ///
+ public string CateringCode { get; set; }
+
+ ///
+ /// 用餐类型 0-桌数,1-人数
+ ///
+ public int CateringType { get; set; }
+
+ ///
+ /// 桌数或人数数量
+ ///
+ public int CateringNum { get; set; }
+
+ ///
+ /// 每桌或每人单价
+ ///
+ public decimal CateringPrice { get; set; }
+
+ ///
+ /// 桌型
+ ///
+ public string CateringTable { get; set; }
+
+ ///
+ /// 酒水
+ ///
+ public string Wine { get; set; }
+
+ ///
+ /// 备注
+ ///
+ public string Remark { get; set; }
+
+ }
+
+ ///
+ /// 温泉预订明细
+ ///
+ public class ApptSpringReq1
+ {
+ ///
+ /// 自增主键
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// 温泉_日期
+ ///
+ public DateTime? SpringTime { get; set; }
+
+ ///
+ /// 总人数(自动计算):0-待定
+ ///
+ public int? PeopleNum { get; set; }
+
+ ///
+ /// spring_men
+ ///
+ public int? SpringMen { get; set; }
+
+ ///
+ /// 女性人数:0-待定
+ ///
+ public int? SpringWomen { get; set; }
+
+ ///
+ /// 二次消费
+ ///
+ public string Consume { get; set; }
+
+ ///
+ /// 单价
+ ///
+ public decimal? SpringPrice { get; set; }
+
+ ///
+ /// 备注
+ ///
+ public string Remark { get; set; }
+ }
+
+ public class RemarkReq1
+ {
+ ///
+ /// 备注名称
+ ///
+ public string RemarkName { get; set; }
+
+ ///
+ /// 备注内容
+ ///
+ public string RemarkContent { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Request/ApptSummaryReq.cs b/api_v1/Appointment.Entity/Request/ApptSummaryReq.cs
new file mode 100644
index 0000000..7ebb802
--- /dev/null
+++ b/api_v1/Appointment.Entity/Request/ApptSummaryReq.cs
@@ -0,0 +1,381 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 预订申请提交表单
+ ///
+ public class ApptSummaryReq
+ {
+ ///
+ /// 自增主键
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// 客户端保存用户信息
+ ///
+ public string AccountDES { get; set; }
+
+ ///
+ /// 组织单位
+ ///
+ public string BuyerName { get; set; }
+
+ ///
+ /// 公司地址
+ ///
+ public string BuyerAddress { get; set; }
+
+ ///
+ /// 会议名称
+ ///
+ public string BuyerTitle { get; set; }
+
+ ///
+ /// 组织负责人
+ ///
+ public string LeaderName { get; set; }
+
+ ///
+ /// 组织负责人电话
+ ///
+ public string LeaderMobile { get; set; }
+
+ ///
+ /// 会议组房号
+ ///
+ public string LeaderRoom { get; set; }
+
+ ///
+ /// 客房总备注
+ ///
+ public string RoomRemark { get; set; }
+
+ ///
+ /// 议室总备注
+ ///
+ public string MeetingRemark { get; set; }
+
+ ///
+ /// 餐饮总备注
+ ///
+ public string CateringRemark { get; set; }
+
+ ///
+ /// 温泉总备注
+ ///
+ public string SpringRemark { get; set; }
+
+ ///
+ /// 驳回备注
+ ///
+ public string RebutRemark { get; set; }
+
+ ///
+ /// 会议室预订明细列表
+ ///
+ public List ApptMeetingList { get; set; }
+
+ ///
+ /// 客房预订明细列表
+ ///
+ public List ApptRoomList { get; set; }
+
+
+ ///
+ /// 餐饮预订明细列表
+ ///
+ public List ApptCateringList { get; set; }
+
+ ///
+ /// 温泉预订明细列表
+ ///
+ public List ApptSpringList { get; set; }
+
+ ///
+ /// 其他备注
+ ///
+ public List Remarks { get; set; }
+
+ ///
+ /// 提交人
+ ///
+ public string UserId { get; set; }
+
+ ///
+ /// 销售人员姓名
+ ///
+ public string SaleName { get; set; }
+
+
+ ///
+ /// 销售人员姓名电话
+ ///
+ public string SalePhone { get; set; }
+
+
+ ///
+ /// 审核状态:1-待审核,2-审核中,3-审核通过,4-驳回,
+ ///
+ public int? AuditorStatus { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ public DateTime CreateTime { get; set; }
+ }
+
+ ///
+ /// 会议室预订明细
+ ///
+ public class ApptMeetingReq
+ {
+ ///
+ /// 自增主键
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// 会议入场日期
+ ///
+ public DateTime? MeetingTime { get; set; }
+
+ ///
+ /// 场次:1-上午,2-下午,3-晚上
+ ///
+ public int[] MeetingGroup { get; set; }
+
+ ///
+ /// 会议厅名称(手输或根据类型选择自动填入),手输不占用资源
+ ///
+ public string MeetingRoom { get; set; }
+
+ ///
+ /// 会议厅代码(手输类型时为空,不占用资源)
+ ///
+ public string MeetingCode { get; set; }
+
+ ///
+ /// 会议室主席台位
+ ///
+ public string MeetingRostrum { get; set; }
+
+ ///
+ /// 会议室-台型(课桌)
+ ///
+ public string MeetingShape { get; set; }
+
+ ///
+ /// 人数:0-待定,
+ ///
+ public int? MeetingNum { get; set; }
+
+ ///
+ /// 单价
+ ///
+ public decimal? MeetingPrice { get; set; }
+
+ ///
+ /// 横幅内容:
+ ///
+ public string MeetingTitle { get; set; }
+
+ ///
+ /// 会议厅备注
+ ///
+ public string Remark { get; set; }
+ }
+
+ ///
+ /// 客房预订明细
+ ///
+ public class ApptRoomReq
+ {
+ ///
+ /// 自增主键
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// 抵达时间
+ ///
+ public DateTime? RoomIn { get; set; }
+
+ ///
+ /// 离开时间
+ ///
+ public DateTime? RoomOut { get; set; }
+
+ ///
+ /// 房型(手输或根据类型选择自动填入),手输不占用资源
+ ///
+ public string RoomGroup { get; set; }
+
+ ///
+ /// 选择房间类型(手输类型时为空,不占用资源)
+ ///
+ public string RooomCode { get; set; }
+
+ ///
+ /// 房间数量
+ ///
+ public int? RoomNum { get; set; }
+
+ ///
+ /// 房间单价[当输入为0时,会根据房类代码获取优惠价]
+ ///
+ public decimal? RoomPrice { get; set; }
+
+ ///
+ /// 总早餐数:0-无早餐,
+ ///
+ public int? BreakfastNum { get; set; }
+
+ ///
+ /// 长途电话:0-关,1-开,
+ ///
+ public int? LongDistance { get; set; }
+
+ ///
+ /// 房吧:0-关,1-开,
+ ///
+ public int? MinShop { get; set; }
+
+ ///
+ /// 总温泉数:0-无,
+ ///
+ public int? SpringNum { get; set; }
+
+ ///
+ /// 客房备注
+ ///
+ public string RoomRemark { get; set; }
+ }
+
+
+
+ ///
+ /// 餐饮预订明细
+ ///
+ public class ApptCateringReq
+ {
+ ///
+ /// 自增主键
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// 用餐日期
+ ///
+ public DateTime? CateringTime { get; set; }
+
+ ///
+ /// 晚上
+ /// 场次:1-上午,2-下午,3-晚上
+ ///
+ public int[] CateringGroup { get; set; }
+
+ ///
+ /// 餐厅名称(手输或根据类型选择自动填入),手输不占用资源
+ ///
+ public string CateringRoom { get; set; }
+
+ ///
+ /// 用餐地点(手输类型时为空,不占用资源)
+ ///
+ public string CateringCode { get; set; }
+
+ ///
+ /// 用餐类型 0-桌数,1-人数
+ ///
+ public int CateringType { get; set; }
+
+ ///
+ /// 桌数或人数数量
+ ///
+ public int CateringNum { get; set; }
+
+ ///
+ /// 每桌或每人单价
+ ///
+ public decimal CateringPrice { get; set; }
+
+ ///
+ /// 桌型
+ ///
+ public string CateringTable { get; set; }
+
+ ///
+ /// 酒水
+ ///
+ public string Wine { get; set; }
+
+ ///
+ /// 备注
+ ///
+ public string Remark { get; set; }
+
+ }
+
+ ///
+ /// 温泉预订明细
+ ///
+ public class ApptSpringReq
+ {
+ ///
+ /// 自增主键
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// 温泉_日期
+ ///
+ public DateTime? SpringTime { get; set; }
+
+ ///
+ /// 总人数(自动计算):0-待定
+ ///
+ public int? PeopleNum { get; set; }
+
+ ///
+ /// spring_men
+ ///
+ public int? SpringMen { get; set; }
+
+ ///
+ /// 女性人数:0-待定
+ ///
+ public int? SpringWomen { get; set; }
+
+ ///
+ /// 二次消费
+ ///
+ public string Consume { get; set; }
+
+ ///
+ /// 单价
+ ///
+ public decimal? SpringPrice { get; set; }
+
+ ///
+ /// 备注
+ ///
+ public string Remark { get; set; }
+ }
+
+ public class RemarkReq
+ {
+ ///
+ /// 备注名称
+ ///
+ public string RemarkName { get; set; }
+
+ ///
+ /// 备注内容
+ ///
+ public string RemarkContent { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Request/ApptTypeAddReq.cs b/api_v1/Appointment.Entity/Request/ApptTypeAddReq.cs
new file mode 100644
index 0000000..8bacbd4
--- /dev/null
+++ b/api_v1/Appointment.Entity/Request/ApptTypeAddReq.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 预订类型添加
+ ///
+ public class ApptTypeAddReq
+ {
+ ///
+ /// 类型名称
+ ///
+ public string ApptName { get; set; }
+
+ ///
+ /// 备注说明
+ ///
+ public string Remark { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Request/ApptUsableMeetingReq.cs b/api_v1/Appointment.Entity/Request/ApptUsableMeetingReq.cs
new file mode 100644
index 0000000..3301fab
--- /dev/null
+++ b/api_v1/Appointment.Entity/Request/ApptUsableMeetingReq.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ public class ApptUsableMeetingReq
+ {
+ ///
+ /// 启始时间(默认从昨天开始)
+ ///
+ public string Startday { get; set; }
+
+ ///
+ /// 截止时间(默认截止到3个月后)
+ ///
+ public string EndDay { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Request/AuditDeleteReq.cs b/api_v1/Appointment.Entity/Request/AuditDeleteReq.cs
new file mode 100644
index 0000000..595fbba
--- /dev/null
+++ b/api_v1/Appointment.Entity/Request/AuditDeleteReq.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 删除预订请求参数
+ ///
+ public class AuditDeleteReq
+ {
+ ///
+ /// 要删除的预订对应的主键
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// 删除的类型:1-预订主单与详情,2-客房详情,3-会议详情,4-餐饮详情,5-温泉详情
+ ///
+ public int Type { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Request/AuditReq.cs b/api_v1/Appointment.Entity/Request/AuditReq.cs
new file mode 100644
index 0000000..f3f6d9a
--- /dev/null
+++ b/api_v1/Appointment.Entity/Request/AuditReq.cs
@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 预订审核
+ ///
+ public class ApptAuditReq
+ {
+ ///
+ /// 要审核的主键
+ ///
+ public int ApptId { get; set; }
+
+ ///
+ /// 客户端保存用户信息
+ ///
+ public string AccountDES { get; set; }
+
+ ///
+ /// 审核状态:1-审核通过,0-驳回,
+ ///
+ public int AuditorStatus { get; set; }
+
+ ///
+ /// 审核说明
+ ///
+ public string Remark { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Request/BindUserReq.cs b/api_v1/Appointment.Entity/Request/BindUserReq.cs
new file mode 100644
index 0000000..c13182b
--- /dev/null
+++ b/api_v1/Appointment.Entity/Request/BindUserReq.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 绑定用户
+ ///
+ public class BindUserReq
+ {
+ ///
+ /// 客户端保留用户信息
+ ///
+ public string AccountDES { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Request/CommReq.cs b/api_v1/Appointment.Entity/Request/CommReq.cs
new file mode 100644
index 0000000..2721503
--- /dev/null
+++ b/api_v1/Appointment.Entity/Request/CommReq.cs
@@ -0,0 +1,43 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 日期时间
+ ///
+ public class CommDayReq
+ {
+ public DateTime Date { get; set; }
+ }
+
+ ///
+ /// int型
+ ///
+ public class CommIntReq
+ {
+ public int? IntValue { get; set; }
+ }
+
+
+ ///
+ /// id
+ ///
+ public class CommIntIdReq
+ {
+ public int Id { get; set; }
+ }
+
+ ///
+ /// 分页
+ ///
+ public class CommPageReq
+ {
+ public int PageIndex { get; set; }
+
+ public int PageSize { get; set; }
+
+ public string Keywords { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Request/MeetingReq.cs b/api_v1/Appointment.Entity/Request/MeetingReq.cs
new file mode 100644
index 0000000..c704468
--- /dev/null
+++ b/api_v1/Appointment.Entity/Request/MeetingReq.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+
+ ///
+ /// 获取会议室资源
+ ///
+ public class MeetingReq
+ {
+ ///
+ /// 起始时间
+ ///
+ public DateTime StartDay { get; set; }
+
+ ///
+ /// 截止时间(包含当天)
+ ///
+ public DateTime EndDay { get; set; }
+
+ ///
+ /// 客户端保留用户信息
+ ///
+ public string AccountDES { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Request/MyApptApplyPageReq.cs b/api_v1/Appointment.Entity/Request/MyApptApplyPageReq.cs
new file mode 100644
index 0000000..f3452fd
--- /dev/null
+++ b/api_v1/Appointment.Entity/Request/MyApptApplyPageReq.cs
@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 我发起的预订
+ ///
+ public class MyApptApplyPageReq
+ {
+ ///
+ /// 当前页从1开始
+ ///
+ public int PageIndex { get; set; }
+
+ ///
+ /// 页大小
+ ///
+ public int PageSize { get; set; }
+
+ ///
+ /// 客户端保存用户信息
+ ///
+ public string AccountDES { get; set; }
+
+ ///
+ /// 审核状态:null/0-全部,1-审订中,2-审核通过,3-驳回,6-取消
+ ///
+ ///
+ /// EnumAuditorStatus
+ ///
+ public int? AuditorStatus { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Request/MyApptAuditPageReq.cs b/api_v1/Appointment.Entity/Request/MyApptAuditPageReq.cs
new file mode 100644
index 0000000..d395400
--- /dev/null
+++ b/api_v1/Appointment.Entity/Request/MyApptAuditPageReq.cs
@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 与我有关的预订
+ ///
+ public class MyApptAuditPageReq
+ {
+ ///
+ /// 当前页从1开始
+ ///
+ public int PageIndex { get; set; }
+
+ ///
+ /// 页大小
+ ///
+ public int PageSize { get; set; }
+
+ ///
+ /// 客户端保存用户信息
+ ///
+ public string AccountDES { get; set; }
+
+ ///
+ /// 审核状态:0-我的审核,1-待我审核,2-我抄送的,3-抄送给我的
+ ///
+ ///
+ /// EnumAuditorStatus
+ ///
+ public int? AuditorStatus { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Request/TransferAuditReq.cs b/api_v1/Appointment.Entity/Request/TransferAuditReq.cs
new file mode 100644
index 0000000..61162f1
--- /dev/null
+++ b/api_v1/Appointment.Entity/Request/TransferAuditReq.cs
@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 转审
+ ///
+ public class TransferAuditReq
+ {
+ ///
+ /// 要审核的主键
+ ///
+ public int ApptId { get; set; }
+
+ ///
+ /// 客户端保存用户信息
+ ///
+ public string AccountDES { get; set; }
+
+ ///
+ /// 转审给哪个账号
+ ///
+ public string ToAccount { get; set; }
+
+ ///
+ /// 审核说明
+ ///
+ public string Remark { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Request/UsableMeetingReq.cs b/api_v1/Appointment.Entity/Request/UsableMeetingReq.cs
new file mode 100644
index 0000000..48af835
--- /dev/null
+++ b/api_v1/Appointment.Entity/Request/UsableMeetingReq.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+
+ ///
+ /// 根据日期与场次获取可用会议厅资源
+ ///
+ public class UsableMeetingReq
+ {
+ ///
+ /// 日期
+ ///
+ public DateTime Day { get; set; }
+
+ ///
+ /// 场次
+ ///
+ public int[] Groups { get; set; }
+
+ ///
+ /// 占用状态:0-默认,只返回未占用的,1-返回所有 由Numbers判断是否被占用
+ ///
+ public int Status { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Request/UsableRoomReq.cs b/api_v1/Appointment.Entity/Request/UsableRoomReq.cs
new file mode 100644
index 0000000..b3d2f31
--- /dev/null
+++ b/api_v1/Appointment.Entity/Request/UsableRoomReq.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 获取客房资源
+ ///
+ public class UsableRoomReq
+ {
+ ///
+ /// 起始时间
+ ///
+ public DateTime StartDay { get; set; }
+
+ ///
+ /// 截止时间(包含当天)
+ ///
+ public DateTime EndDay { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Request/UserLoginAccountReq.cs b/api_v1/Appointment.Entity/Request/UserLoginAccountReq.cs
new file mode 100644
index 0000000..385a3b7
--- /dev/null
+++ b/api_v1/Appointment.Entity/Request/UserLoginAccountReq.cs
@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 账号密码登录入参
+ ///
+ public class UserLoginAccountReq
+ {
+ ///
+ /// 用户名
+ ///
+ public string UserName { get; set; }
+
+ ///
+ /// 密码
+ ///
+ public string UserPwd { get; set; }
+
+ ///
+ /// 微信小程序wx.login下的code,实现首次授权
+ ///
+ public string Code { get; set; }
+
+ ///
+ /// 酒店id
+ ///
+ public string Hotelid { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Request/UserLoginCodeReq.cs b/api_v1/Appointment.Entity/Request/UserLoginCodeReq.cs
new file mode 100644
index 0000000..ebced6b
--- /dev/null
+++ b/api_v1/Appointment.Entity/Request/UserLoginCodeReq.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 微信Code登录
+ ///
+ public class UserLoginCodeReq
+ {
+ ///
+ /// 微信Code登录
+ ///
+ public string Code { get; set; }
+
+ ///
+ /// 酒店id
+ ///
+ public string Hotelid { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Response/AuditorLogTreeRes.cs b/api_v1/Appointment.Entity/Response/AuditorLogTreeRes.cs
new file mode 100644
index 0000000..3a66e60
--- /dev/null
+++ b/api_v1/Appointment.Entity/Response/AuditorLogTreeRes.cs
@@ -0,0 +1,68 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 返回审批流程记录
+ ///
+ public class AuditorLogTreeRes
+ {
+ ///
+ /// 预订编号
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// 预订申请时间
+ ///
+ public DateTime CreateTime { get; set; }
+
+ ///
+ /// 预订申请人姓名
+ ///
+ public string SaleName { get; set; }
+
+ ///
+ /// 状态 EnumAuditorStatus
+ ///
+ public int AuditorStatus { get; set; }
+
+ ///
+ /// 作废时产生的新单子名称
+ ///
+ public string NewName { get; set; }
+
+ ///
+ /// 审批流程
+ ///
+ public List AudioLogList { get; set; }
+
+ }
+
+ public class AudioLogRes
+ {
+ ///
+ /// 编号
+ ///
+ public int Id { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ public DateTime? CreateTime { get; set; }
+
+ ///
+ /// 操作人员姓名
+ ///
+ public string UserName { get; set; }
+
+ ///
+ /// 审核状态:0-驳回,1-审核通过,2-转审批,3-待审批
+ ///
+ public int Status { get; set; }
+
+ public string Remark { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Response/LoginUserRes.cs b/api_v1/Appointment.Entity/Response/LoginUserRes.cs
new file mode 100644
index 0000000..d7c49be
--- /dev/null
+++ b/api_v1/Appointment.Entity/Response/LoginUserRes.cs
@@ -0,0 +1,61 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 用户登录返回结果
+ ///
+ [Serializable]
+ public class LoginUserRes
+ {
+ ///
+ /// 用户账号
+ ///
+ public string UserAccount { get; set; }
+
+ ///
+ /// 用户名称
+ ///
+ public string UserName { get; set; }
+
+ ///
+ /// 用户组别
+ ///
+ public string UserGroup { get; set; }
+
+ ///
+ /// 酒店id
+ ///
+ public string Hotelid { get; set; }
+ }
+
+ public class UserInfoRes
+ {
+ ///
+ /// 绑定微信服务号状态:0-未绑定,1-绑定
+ ///
+ public int BindStatus { get; set; }
+
+ public string UserAccount { get; set; }
+
+ ///
+ /// 明文小程序AppId
+ ///
+ public string Token { get; set; }
+
+ ///
+ /// 用户角色:0-全部;1-审核员;
+ ///
+ ///
+ /// 预留:2-销售员
+ ///
+ public int Role { get; set; }
+
+ ///
+ /// 加密后的用户信息
+ ///
+ public string AccountDES { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Response/MeetingRes.cs b/api_v1/Appointment.Entity/Response/MeetingRes.cs
new file mode 100644
index 0000000..ef45cb3
--- /dev/null
+++ b/api_v1/Appointment.Entity/Response/MeetingRes.cs
@@ -0,0 +1,44 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 会议室资源
+ ///
+ public class MeetingRes
+ {
+ ///
+ /// 资源代码
+ ///
+ public string Code { get; set; }
+
+ ///
+ /// 资源名称
+ ///
+ public string Descript { get; set; }
+
+ ///
+ /// 使用状态:R-预定
+ ///
+ public List DayStatus { get; set; }
+
+ }
+
+ ///
+ /// 当天3场使用状态
+ ///
+ public class MeetingStatus
+ {
+ ///
+ /// 日期
+ ///
+ public DateTime Day { get; set; }
+
+ ///
+ /// 状态:第1场,第2场,第3场 状态
+ ///
+ public string[] Status { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Response/P_xx_res_info_view3_Res.cs b/api_v1/Appointment.Entity/Response/P_xx_res_info_view3_Res.cs
new file mode 100644
index 0000000..b315a7e
--- /dev/null
+++ b/api_v1/Appointment.Entity/Response/P_xx_res_info_view3_Res.cs
@@ -0,0 +1,162 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 存储过程返回数据
+ ///
+ public class P_xx_res_info_view3_Res
+ {
+ ///
+ /// 资源类型代码:A-会议室,B-会议室设备,C-汽车,D-自行车.
+ ///
+ public string Sort { get; set; }
+
+ ///
+ /// 资源编码
+ ///
+ public string Code { get; set; }
+
+ ///
+ /// 资源名称
+ ///
+ public string Descript { get; set; }
+
+ ///
+ /// 第一天 上午场
+ ///
+ public string Day11 { get; set; }
+
+ ///
+ /// 第一天 下午场
+ ///
+ public string Day12 { get; set; }
+
+ ///
+ /// 第一天 晚上场
+ ///
+ public string Day13 { get; set; }
+
+ ///
+ /// 第二天 上午场
+ ///
+ public string Day21 { get; set; }
+
+ ///
+ /// 第二天 下午场
+ ///
+ public string Day22 { get; set; }
+
+ ///
+ /// 第二天 晚上场
+ ///
+ public string Day23 { get; set; }
+
+ ///
+ /// 第三天 上午场
+ ///
+ public string Day31 { get; set; }
+
+ ///
+ /// 第三天 下午场
+ ///
+ public string Day32 { get; set; }
+
+ ///
+ /// 第三天 晚上场
+ ///
+ public string Day33 { get; set; }
+
+ ///
+ /// 第四天 上午场
+ ///
+ public string Day41 { get; set; }
+
+ ///
+ /// 第四天 下午场
+ ///
+ public string Day42 { get; set; }
+
+ ///
+ /// 第四天 晚上场
+ ///
+ public string Day43 { get; set; }
+
+ ///
+ /// 第五天 上午场
+ ///
+ public string Day51 { get; set; }
+
+ ///
+ /// 第五天 下午场
+ ///
+ public string Day52 { get; set; }
+
+ ///
+ /// 第五天 晚上场
+ ///
+ public string Day53 { get; set; }
+
+ ///
+ /// 第六天 上午场
+ ///
+ public string Day61 { get; set; }
+
+ ///
+ /// 第六天 下午场
+ ///
+ public string Day62 { get; set; }
+
+ ///
+ /// 第六天 晚上场
+ ///
+ public string Day63 { get; set; }
+
+ ///
+ /// 第七天 上午场
+ ///
+ public string Day71 { get; set; }
+
+ ///
+ /// 第七天 下午场
+ ///
+ public string Day72 { get; set; }
+
+ ///
+ /// 第七天 晚上场
+ ///
+ public string Day73 { get; set; }
+
+ ///
+ /// 第八天 上午场
+ ///
+ public string Day81 { get; set; }
+
+ ///
+ /// 第八天 下午场
+ ///
+ public string Day82 { get; set; }
+
+ ///
+ /// 第八天 晚上场
+ ///
+ public string Day83 { get; set; }
+
+ ///
+ /// 第九天 上午场
+ ///
+ public string Day91 { get; set; }
+
+ ///
+ /// 第九天 下午场
+ ///
+ public string Day92 { get; set; }
+
+ ///
+ /// 第九天 晚上场
+ ///
+ public string Day93 { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Response/Uc_groupRes.cs b/api_v1/Appointment.Entity/Response/Uc_groupRes.cs
new file mode 100644
index 0000000..6345576
--- /dev/null
+++ b/api_v1/Appointment.Entity/Response/Uc_groupRes.cs
@@ -0,0 +1,32 @@
+using SqlSugar;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 返回组别
+ ///
+ [Serializable]
+ public class Uc_groupRes
+ {
+ ///
+ /// 代码
+ ///
+ [SugarColumn(ColumnName = "op_group")]
+ public string OpGroup { get; set; }
+
+ ///
+ /// 名称
+ ///
+ [SugarColumn(ColumnName = "descript")]
+ public string Descript { get; set; }
+
+ ///
+ /// 描述
+ ///
+ [SugarColumn(ColumnName = "op_func")]
+ public string OpFunc { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Response/UsableMeetingMiddleRes.cs b/api_v1/Appointment.Entity/Response/UsableMeetingMiddleRes.cs
new file mode 100644
index 0000000..4fe8a7d
--- /dev/null
+++ b/api_v1/Appointment.Entity/Response/UsableMeetingMiddleRes.cs
@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 会议厅中间转换
+ ///
+ public class UsableMeetingMiddleRes
+ {
+ public string MeetingName { get; set; }
+ public string Code { get; set; }
+
+ public DateTime Stime { get; set; }
+
+ public string Sta { get; set; }
+
+ public int Sfield { get; set; }
+
+ public string Resby { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Response/UsableRoomRes.cs b/api_v1/Appointment.Entity/Response/UsableRoomRes.cs
new file mode 100644
index 0000000..7491f8c
--- /dev/null
+++ b/api_v1/Appointment.Entity/Response/UsableRoomRes.cs
@@ -0,0 +1,45 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ [Serializable]
+ public class UsableRoomRes
+ {
+ ///
+ /// 日期
+ ///
+ public DateTime? Date { get; set; }
+
+ ///
+ /// 房型
+ ///
+ public string Type { get; set; }
+
+ ///
+ /// 排序
+ ///
+ public int? Sequence { get; set; }
+
+ ///
+ /// 可卖数(可用数量)
+ ///
+ public int Quan { get; set; }
+
+ ///
+ /// 类型名称
+ ///
+ public string RoomName { get; set; }
+
+ ///
+ /// 价格
+ ///
+ public decimal? RoomPrice { get; set; }
+
+ ///
+ /// 总房数
+ ///
+ public int? RoomTotal { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Response/WeChatLoginRes.cs b/api_v1/Appointment.Entity/Response/WeChatLoginRes.cs
new file mode 100644
index 0000000..fb2460b
--- /dev/null
+++ b/api_v1/Appointment.Entity/Response/WeChatLoginRes.cs
@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ public class WeChatLoginRes
+ {
+ ///
+ /// 微信用户Openid
+ ///
+ public string Openid { get; set; }
+
+ public string Guid { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Response/WxServiceSetRes.cs b/api_v1/Appointment.Entity/Response/WxServiceSetRes.cs
new file mode 100644
index 0000000..2a70b3c
--- /dev/null
+++ b/api_v1/Appointment.Entity/Response/WxServiceSetRes.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ public class WxServiceSetRes
+ {
+ ///
+ /// 用户信息
+ ///
+ public string UserAccount { get; set; }
+
+ ///
+ /// 微信公共号Code
+ ///
+ public string Code { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Utility/AizhuhotelHelper.cs b/api_v1/Appointment.Entity/Utility/AizhuhotelHelper.cs
new file mode 100644
index 0000000..5bf5d15
--- /dev/null
+++ b/api_v1/Appointment.Entity/Utility/AizhuhotelHelper.cs
@@ -0,0 +1,468 @@
+using Newtonsoft.Json;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Net;
+using System.Net.Http;
+using System.Text;
+using System.Threading;
+
+namespace Appointment.Entity
+{
+ public class AizhuhotelHelper
+ {
+ private static readonly log4net.ILog _logger = log4net.LogManager.GetLogger(typeof(AizhuhotelHelper));
+
+ // ---- 获取公众号 Access_token
+ private class LoveInnGetAccessTokenRes
+ {
+ ///
+ /// 200-成功,400-出错,
+ ///
+ public int Code { get; set; }
+
+ ///
+ /// 返回信息:正确、错误都提示
+ ///
+ public string Message { get; set; }
+
+ ///
+ /// 信息
+ ///
+ public GetAccessTokenRes Data { get; set; }
+ }
+
+ private class GetAccessTokenRes
+ {
+ public string Access_token { get; set; }
+
+ public int? Expires_in { get; set; }
+
+ public string Errcode { get; set; }
+
+ public string Errmsg { get; set; }
+ }
+
+ ///
+ /// 通过爱住接口获取Accesstoken
+ ///
+ ///
+ public static ApiResult AizhuhotelGetAccesstoken()
+ {
+ var url = "https://pay.aizhuhotel.com/dlwx/api/WD/LoveInnGetAccessToken";
+
+ string AppId = BaseConfig.App(new string[] { "WeChatService", "AppId" });
+ if (string.IsNullOrWhiteSpace(AppId)) return ApiResult.Failed("配置文件中未获取有效的消息推送AppId");
+ string AppName = BaseConfig.App(new string[] { "WeChatService", "AppName" });
+ if (string.IsNullOrWhiteSpace(AppName)) return ApiResult.Failed("配置文件中未获取有效的消息推送AppName");
+ string AppSecret = BaseConfig.App(new string[] { "WeChatService", "AppSecret" });
+ if (string.IsNullOrWhiteSpace(AppSecret)) return ApiResult.Failed("配置文件中未获取有效的消息推送AppSecret");
+
+ var json = JsonConvert.SerializeObject(new { AppId, AppName, AppSecret });
+
+ try
+ {
+ HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
+ request.Proxy = null;
+ request.Method = "POST";
+ request.ContentType = "application/json";
+ // request.Timeout = 10000;
+ using (StreamWriter dataStream = new StreamWriter(request.GetRequestStream()))
+ {
+ dataStream.Write(json);
+ dataStream.Close();
+ }
+ HttpWebResponse response = (HttpWebResponse)request.GetResponse();
+ if (response == null)
+ {
+ return ApiResult.Failed("远程服务器没有响应!");
+ }
+ string encoding = response.ContentEncoding;
+ if (encoding == null || encoding.Length < 1)
+ {
+ encoding = "UTF-8"; //默认编码
+ }
+ StreamReader reader = new StreamReader(response.GetResponseStream(), Encoding.GetEncoding(encoding));
+ string retString = reader.ReadToEnd();
+
+ var res = JsonConvert.DeserializeObject(retString);
+ if (res.Code != 200) return ApiResult.Failed(res.Message);
+ if (res.Data == null) return ApiResult.Failed("未获取到有效信息");
+ return ApiResult.Success(string.Empty, res.Data.Access_token);
+ }
+ catch (Exception ex)
+ {
+ _logger.Debug(ex.ToString());
+ return ApiResult.Failed("http请求异常,异常信息:" + ex.Message);
+ }
+ }
+
+
+ // ---- 通过微信服务器获取access_token
+
+ private static WxAccessTokenData accessCacheToken = null;
+
+ public class WxAccessTokenData
+ {
+ ///
+ /// 获取到的access_token
+ ///
+ public string Access_token { get; set; }
+
+ ///
+ /// 获取时间
+ ///
+ public DateTime GetDate { get; set; }
+ }
+
+ ///
+ /// 微信授权返回结果
+ ///
+ public class WxAuthorizationCodeRep
+ {
+ ///
+ /// 网页授权接口调用凭证,注意:此access_token与基础支持的access_token不同
+ ///
+ public string Access_token { get; set; }
+
+ ///
+ /// access_token接口调用凭证超时时间,单位(秒)
+ /// 错误时不返回
+ ///
+ public int? Expires_in { get; set; }
+
+ ///
+ /// 用户刷新access_token
+ ///
+ public string Refresh_token { get; set; }
+
+ ///
+ /// 用户唯一标识
+ ///
+ public string Openid { get; set; }
+
+ ///
+ /// 用户授权的作用域,使用逗号(,)分隔
+ ///
+ public string Scope { get; set; }
+
+ ///
+ /// 错误码:返回码
+ /// 正确时不返回
+ ///
+ public int? Errcode { get; set; }
+
+ ///
+ /// 错误信息
+ ///
+ public string Errmsg { get; set; }
+ }
+
+ ///
+ /// 获取服务号AccessToken
+ ///
+ /// 强制刷新
+ ///
+ public static ApiResult GetAccessToken(bool forceUpdate = false)
+ {
+ try
+ {
+ string AppId = BaseConfig.App(new string[] { "WeChatService", "AppId" });
+ if (string.IsNullOrWhiteSpace(AppId)) return ApiResult.Failed("配置文件中未获取有效的服务号AppId");
+ string AppSecret = BaseConfig.App(new string[] { "WeChatService", "AppSecret" });
+ if (string.IsNullOrWhiteSpace(AppSecret)) return ApiResult.Failed("配置文件中未获取有效的服务号AppSecret");
+
+ DateTime now = DateTime.Now;
+
+ if (forceUpdate == false && accessCacheToken != null && now.AddSeconds(-1 * 55 * 2) < accessCacheToken.GetDate)
+ {
+ return ApiResult.Success(string.Empty, accessCacheToken.Access_token);
+ }
+
+ var url = $"https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid={AppId}&secret={AppSecret}";
+ using (var http = new HttpClient(new HttpClientHandler()))
+ {
+ var res = http.GetAsync(url).Result;
+ if (res.StatusCode != HttpStatusCode.OK)
+ {
+ _logger.Error("获取公众号access_token失败,微信服务接口响应" + res.StatusCode.ToString());
+ return ApiResult.Failed("获取公众号access_token失败,微信服务接口响应" + res.StatusCode.ToString());
+ }
+
+ var reContent = res.Content.ReadAsStringAsync().Result;
+ if (!string.IsNullOrWhiteSpace(reContent))
+ {
+ var reToken = JsonConvert.DeserializeObject(reContent);
+ if (!string.IsNullOrEmpty(reToken.Access_token))
+ {
+ accessCacheToken = new WxAccessTokenData()
+ {
+ Access_token = reToken.Access_token,
+ GetDate = now
+ };
+ return ApiResult.Success(string.Empty, reToken.Access_token);
+
+ }
+ else
+ {
+ _logger.Error(reContent);
+ }
+ }
+ return ApiResult.Failed(string.Empty);
+ }
+ }
+ catch (Exception ex)
+ {
+ _logger.Error(ex.Message);
+ return ApiResult.Failed(ex.Message);
+ }
+ }
+
+ // ---- 获取用户Openid
+
+ private class WxServiceRes
+ {
+ public string Access_token { get; set; }
+
+ public int? Expires_in { get; set; }
+
+ public string Refresh_token { get; set; }
+
+ public string Openid { get; set; }
+
+ public string Errcode { get; set; }
+
+ public string Errmsg { get; set; }
+ }
+
+ public static ApiResult GetWxSericeOpenId(string code)
+ {
+ if (string.IsNullOrWhiteSpace(code)) return ApiResult.Failed("未获取到有效的code");
+ string AppId = BaseConfig.App(new string[] { "WeChatService", "AppId" });
+ if (string.IsNullOrWhiteSpace(AppId)) return ApiResult.Failed("配置文件中未获取有效的消息推送AppId");
+ string AppSecret = BaseConfig.App(new string[] { "WeChatService", "AppSecret" });
+ if (string.IsNullOrWhiteSpace(AppSecret)) return ApiResult.Failed("配置文件中未获取有效的消息推送AppSecret");
+
+
+ string url = $"https://api.weixin.qq.com/sns/oauth2/access_token?appid={AppId}&secret={AppSecret}&code={code}&grant_type=authorization_code";
+ using (var http = new HttpClient(new HttpClientHandler()))
+ {
+ var response = http.GetAsync(url).Result;
+ if (response.StatusCode != HttpStatusCode.OK) return ApiResult.Failed("微信接口无响应");
+
+ string res = response.Content.ReadAsStringAsync().Result;
+ if (!string.IsNullOrWhiteSpace(res))
+ {
+ var wxServiceRes = JsonConvert.DeserializeObject(res);
+ if (!string.IsNullOrWhiteSpace(wxServiceRes.Openid))
+ {
+ return ApiResult.Success(string.Empty, wxServiceRes.Openid);
+ }
+ else
+ {
+ _logger.Error(res);
+ return ApiResult.Failed(wxServiceRes.Errcode);
+ }
+ }
+ return ApiResult.Failed("返回空");
+ }
+ }
+
+ // ---- 发送消息模板
+
+ public static ApiResult SendTemplateMsg(string touser, string template_id, string url, string first, string remark, params object[] args)
+ {
+ try
+ {
+ string error = string.Empty;
+ for (int i = 0; i < 3; i++)
+ {
+ error = string.Empty;
+ var msg = WechatHelper.BuildTemlMsg(touser, template_id, url, first, remark, args);
+
+ string accessTokenMode = BaseConfig.App(new string[] { "AccessTokenMode" });
+ if (string.IsNullOrWhiteSpace(accessTokenMode))
+ {
+ _logger.Error("配置文件中未获取有效的AccessTokenMode");
+ return ApiResult.Failed("配置文件中未获取有效的AccessTokenMode");
+ }
+
+ ApiResult tokenResult = null;
+ if (i == 0)
+ {
+ tokenResult = accessTokenMode == "1" ? AizhuhotelGetAccesstoken() : GetAccessToken();
+ }
+ else
+ {
+ tokenResult = accessTokenMode == "1" ? AizhuhotelGetAccesstoken() : GetAccessToken(true);
+ }
+ if (!tokenResult.IsSuccess)
+ {
+ error = "配置文件中未获取有效的AccessTokenMode";
+ _logger.Error(error);
+ continue;
+ }
+
+ var postUrl = $"https://api.weixin.qq.com/cgi-bin/message/template/send?access_token={tokenResult.Info}";
+
+ HttpWebRequest request = (HttpWebRequest)WebRequest.Create(postUrl);
+ request.Proxy = null;
+ request.Method = "POST";
+ request.ContentType = "application/json";
+ // request.Timeout = 10000;
+ using (StreamWriter dataStream = new StreamWriter(request.GetRequestStream()))
+ {
+ dataStream.Write(msg);
+ dataStream.Close();
+ }
+ HttpWebResponse response = (HttpWebResponse)request.GetResponse();
+ if (response == null)
+ {
+ error = "远程服务器没有响应!";
+ _logger.Error(error);
+ continue;
+ }
+ string encoding = response.ContentEncoding;
+ if (encoding == null || encoding.Length < 1)
+ {
+ encoding = "UTF-8"; //默认编码
+ }
+ StreamReader reader = new StreamReader(response.GetResponseStream(), Encoding.GetEncoding(encoding));
+ string retString = reader.ReadToEnd();
+
+ if (!string.IsNullOrWhiteSpace(retString))
+ {
+ var sendTemplateMsgRes = JsonConvert.DeserializeObject(retString);
+ if (sendTemplateMsgRes.Errmsg.ToLower() == "ok")
+ {
+ return ApiResult.Success(string.Empty);
+ }
+ else
+ {
+ error = $"接收者openid:{touser},错误代码{sendTemplateMsgRes.Errcode}";
+ _logger.Error(error);
+ continue;
+ }
+ }
+ }
+ return ApiResult.Failed(msg: "", info: error);
+
+ }
+ catch (Exception ex)
+ {
+ _logger.Debug(ex.ToString());
+ return ApiResult.Failed(msg: "", info: ex.Message);
+ }
+ }
+
+ ///
+ /// 发送模板消息返回结果
+ ///
+ private class SendTemplateMsgRes
+ {
+ ///
+ /// 返回代码,0-发送成功
+ ///
+ public int Errcode { get; set; }
+
+ ///
+ /// 返回消息:"ok"-成功
+ ///
+ public string Errmsg { get; set; }
+
+ ///
+ /// 发送成功返回编号:失败不返回
+ ///
+ public long? Msgid { get; set; }
+ }
+
+ public static void SendTemplateMsg(List tousers, string template_id, string url, string first, string remark, params object[] args)
+ {
+ if (tousers == null || tousers.Count == 0) return;
+ string accessTokenMode = BaseConfig.App(new string[] { "AccessTokenMode" });
+ if (string.IsNullOrWhiteSpace(accessTokenMode))
+ {
+ _logger.Error("配置文件中未获取有效的AccessTokenMode");
+ return;
+ }
+
+ ApiResult tokenResult = accessTokenMode == "1" ? AizhuhotelGetAccesstoken() : GetAccessToken();
+ if (!tokenResult.IsSuccess)
+ {
+ _logger.Error(tokenResult.Msg);
+ return;
+ }
+
+ List msgList = new List();
+ foreach (var touser in tousers)
+ {
+ msgList.Add(WechatHelper.BuildTemlMsg(touser, template_id, url, first, remark, args));
+ }
+
+ int send = 0;
+ _logger.Info($"发送推送消息,模板:{template_id}, 接收者openId:{string.Join(",", msgList)} 。");
+ StringBuilder msg = new StringBuilder();
+ foreach (var itemMsg in msgList)
+ {
+ for (int i = 0; i < 3; i++)
+ {
+ if (i > 0)
+ {
+ Thread.Sleep(100);
+ tokenResult = accessTokenMode == "1" ? AizhuhotelGetAccesstoken() : GetAccessToken(true);
+ if (!tokenResult.IsSuccess)
+ {
+ _logger.Error(tokenResult.Msg);
+ continue;
+ }
+ }
+ var postUrl = $"https://api.weixin.qq.com/cgi-bin/message/template/send?access_token={tokenResult.Info}";
+
+ HttpWebRequest request = (HttpWebRequest)WebRequest.Create(postUrl);
+ request.Proxy = null;
+ request.Method = "POST";
+ request.ContentType = "application/json";
+ // request.Timeout = 10000;
+ using (StreamWriter dataStream = new StreamWriter(request.GetRequestStream()))
+ {
+ dataStream.Write(itemMsg);
+ dataStream.Close();
+ }
+ HttpWebResponse response = (HttpWebResponse)request.GetResponse();
+ if (response == null)
+ {
+ _logger.Error("微信接口远程服务器没有响应");
+ continue;
+ }
+ string encoding = response.ContentEncoding;
+ if (encoding == null || encoding.Length < 1)
+ {
+ encoding = "UTF-8"; //默认编码
+ }
+ StreamReader reader = new StreamReader(response.GetResponseStream(), Encoding.GetEncoding(encoding));
+ string retString = reader.ReadToEnd();
+ _logger.Info("-->" + itemMsg);
+
+ if (!string.IsNullOrWhiteSpace(retString))
+ {
+ var sendTemplateMsgRes = JsonConvert.DeserializeObject(retString);
+ if (sendTemplateMsgRes.Errmsg.ToLower() == "ok")
+ {
+ send += 1;
+ break;
+ }
+ else
+ {
+ if (msg.Length == 0) msg.AppendFormat("消息推送失败:消息模板{0}", template_id);
+ msg.AppendFormat("接收者openid:{0},错误代码{1}", itemMsg, sendTemplateMsgRes.Errcode);
+ continue;
+ }
+ }
+ }
+ Thread.Sleep(100);
+ }
+ if (msg.Length > 0) _logger.Error(msg.ToString());
+
+ }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Utility/ApiResult.cs b/api_v1/Appointment.Entity/Utility/ApiResult.cs
new file mode 100644
index 0000000..c90f01d
--- /dev/null
+++ b/api_v1/Appointment.Entity/Utility/ApiResult.cs
@@ -0,0 +1,192 @@
+using System;
+using System.Collections.Generic;
+using System.Net;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 接口返回数据标准
+ ///
+ public class ApiResult
+ {
+ ///
+ /// 响应状态:true-成功执行,flase-响应异常
+ ///
+ public bool IsSuccess { get { return this.Code == (int)HttpStatusCode.OK; } }
+
+ ///
+ /// 是否有效执行以IsSuccess为基准
+ /// 200-有效执行,500-服务错误
+ ///
+ ///
+ /// 此属性为定制化返回代码,例如登录成功并需要返回提示修改密码等相关类似的业务
+ ///
+ public int Code { get; set; }
+
+ ///
+ /// 返回消息文本内容
+ ///
+ public string Msg { get; set; }
+
+ ///
+ /// 返回数据
+ ///
+ public object Info { get; set; }
+
+ ///
+ /// 构造函数
+ ///
+ ///
+ ///
+ ///
+ public ApiResult(int code = (int)HttpStatusCode.OK, string msg = "操作成功", object info = null)
+ {
+ this.Code = code;
+ this.Msg = msg;
+ this.Info = info;
+ }
+
+ ///
+ /// 成功执行
+ ///
+ ///
+ ///
+ ///
+ public static ApiResult Success(string msg = "操作成功", object info = null)
+ {
+ return new ApiResult
+ {
+ Code = (int)HttpStatusCode.OK,
+ Msg = msg,
+ Info = info,
+ };
+ }
+
+ ///
+ /// 执行错误
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static ApiResult Failed(string msg = "操作失败", object info = null, int code = (int)HttpStatusCode.InternalServerError)
+ {
+ return new ApiResult
+ {
+ Code = code,
+ Msg = msg,
+ Info = info,
+ };
+ }
+ }
+
+ ///
+ /// 接口返回数据标准
+ ///
+ ///
+ public class ApiResult
+ {
+ ///
+ /// 响应状态:true-成功执行,flase-响应异常
+ ///
+ public bool IsSuccess { get { return this.Code == (int)HttpStatusCode.OK; } }
+
+ ///
+ /// 是否有效执行以IsSuccess为基准
+ /// 200-有效执行,500-服务错误
+ ///
+ ///
+ /// 此属性为定制化返回代码,例如登录成功并需要返回提示修改密码等相关类似的业务
+ ///
+ public int Code { get; set; }
+
+ ///
+ /// 返回消息文本内容
+ ///
+ public string Msg { get; set; }
+
+ ///
+ /// 返回数据
+ ///
+ public T Info { get; set; }
+
+ ///
+ /// 构造函数
+ ///
+ ///
+ ///
+ ///
+ public ApiResult(int code = (int)HttpStatusCode.OK, string msg = "操作成功", T info = default)
+ {
+ this.Code = code;
+ this.Msg = msg;
+ this.Info = info;
+ }
+
+ ///
+ /// 执行成功
+ ///
+ ///
+ ///
+ ///
+ public static ApiResult Success(string msg = "操作成功", T info = default)
+ {
+ return new ApiResult
+ {
+ Code = (int)HttpStatusCode.OK,
+ Msg = msg,
+ Info = info,
+ };
+ }
+
+ ///
+ /// 出现错误
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static ApiResult Failed(string msg = "操作失败", int code = (int)HttpStatusCode.InternalServerError, T info = default)
+ {
+ return new ApiResult
+ {
+ Code = code,
+ Msg = msg,
+ Info = info,
+ };
+ }
+ }
+
+ ///
+ /// 公共Msg
+ ///
+ public class ApiResultMsg
+ {
+ ///
+ /// 参数无效
+ ///
+ public string InvalidParameter { get { return $"参数[{_InvalidParameter}]无效!"; } set { _InvalidParameter = value; } }
+ private string _InvalidParameter;
+
+ ///
+ /// 缺少参数
+ ///
+ public static string NoParameter { get { return "缺少参数!"; } }
+
+ ///
+ /// 没有权限
+ ///
+ public static string NoPower { get { return "没有权限,操作失败!"; } }
+
+ ///
+ /// 没有数据
+ ///
+ public static string NoData { get { return "没有数据!"; } }
+
+ ///
+ /// 数据不正确
+ ///
+ public static string ErrorData { get { return "数据不正确!"; } }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Utility/BaseConfig.cs b/api_v1/Appointment.Entity/Utility/BaseConfig.cs
new file mode 100644
index 0000000..2fdaa09
--- /dev/null
+++ b/api_v1/Appointment.Entity/Utility/BaseConfig.cs
@@ -0,0 +1,119 @@
+using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.Configuration.Json;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ public class BaseConfig
+ {
+ ///
+ /// 缓存配置文件
+ ///
+ static IConfiguration configuration { get; set; }
+
+ static BaseConfig()
+ {
+ /* 当配置文件更新后,IConfiguration会自动更新,使用缓存为了双重保障 */
+ DateTime now = DateTime.Now;
+ if (validTime < now)
+ {
+ string path = "appsettings.json";
+ var _newCreateTime = System.IO.File.GetCreationTime(path);
+ if (_newCreateTime != createTime)
+ {
+ configuration = new ConfigurationBuilder()
+ .Add(new JsonConfigurationSource
+ {
+ Path = path,
+ Optional = false,
+ ReloadOnChange = true
+ }).Build();
+ createTime = _newCreateTime;
+ }
+ validTime = now.AddSeconds(60);
+ }
+ }
+
+ ///
+ /// 缓存配置文件创建时间
+ ///
+ static DateTime createTime;
+
+ ///
+ /// 缓存配置文件失效时间
+ ///
+ static DateTime validTime;
+
+ ///
+ /// 获取配置信息(必项)
+ ///
+ ///
+ /// 当不存在或为空是输出异常
+ public static string App(params string[] sections)
+ {
+ try
+ {
+ if (sections.Any())
+ {
+ string str = configuration[string.Join(":", sections)];
+ if (!string.IsNullOrEmpty(str))
+ {
+ return str;
+ }
+ }
+ throw new Exception($"没有在配置文件中的appSettings中找到{sections.Last()}的配置,请检查配置文件配置!");
+ }
+ catch (Exception ex)
+ {
+ throw new Exception(ex.Message);
+ }
+ }
+
+ ///
+ /// 获取配置文件
+ ///
+ ///
+ /// 默认返回值
+ /// 当不存在的配置项会返回null
+ ///
+ /// 获取实例:
+ /// BaseConfig.App(new string[] { "Logging" });
+ /// BaseConfig.App(new string[] { "Logging", "LogLevel" });
+ ///
+ public static string App(string[] sections, string defaultValue)
+ {
+ try
+ {
+ if (sections.Any())
+ {
+ string stre = configuration[string.Join(":", sections)];
+
+ if (!string.IsNullOrEmpty(stre)) return stre;
+ }
+ return defaultValue;
+ }
+ catch (Exception)
+ {
+ return defaultValue;
+ }
+ }
+
+ ///
+ /// 递归获取配置信息数组
+ ///
+ ///
+ ///
+ ///
+ public static List App(params string[] sections)
+ {
+ List list = new List();
+ configuration.Bind(string.Join(":", sections), list);
+ return list;
+ }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Utility/CryptoHelper.cs b/api_v1/Appointment.Entity/Utility/CryptoHelper.cs
new file mode 100644
index 0000000..a4112b4
--- /dev/null
+++ b/api_v1/Appointment.Entity/Utility/CryptoHelper.cs
@@ -0,0 +1,109 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Security.Cryptography;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ public static class CryptoHelper
+ {
+ private static byte[] DESKeys = { 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF };
+
+ ///
+ /// MD5小写加密
+ ///
+ /// 加密前字符串
+ ///
+ ///
+ /// 使用了UTF8格式
+ ///
+ public static string Md5(string token)
+ {
+ StringBuilder strHash = new StringBuilder();
+ System.Security.Cryptography.MD5CryptoServiceProvider md5 = new System.Security.Cryptography.MD5CryptoServiceProvider();
+ byte[] bytHash;
+
+ bytHash = md5.ComputeHash(Encoding.UTF8.GetBytes(token));
+ md5.Clear();
+ for (int i = 0; i < bytHash.Length; i++)
+ {
+ strHash.Append(bytHash[i].ToString("x").PadLeft(2, '0'));
+ }
+ return strHash.ToString();
+ }
+
+ ///
+ /// MD5大写加密
+ ///
+ ///
+ ///
+ ///
+ /// 字符串转为ASCII再加密
+ /// 与前面方法Md5()的区别是汉字加密后的结构不一致,
+ ///
+ public static string Md5Hash(string input)
+ {
+ string strResult;
+ using (var md51 = System.Security.Cryptography.MD5.Create())
+ {
+ var result = md51.ComputeHash(Encoding.ASCII.GetBytes(input));
+ strResult = BitConverter.ToString(result);
+ strResult = strResult.Replace("-", "");
+ }
+ return strResult;
+ }
+
+ ///
+ /// DES加密字符串
+ ///
+ /// 待加密的字符串
+ /// 加密密钥,要求为8位
+ /// 加密成功返回加密后的字符串,失败返回源串
+ public static string DES_Encode(string encryptString, string encryptKey = "dlhisapi")
+ {
+ encryptKey = encryptKey.Substring(0, 8);
+ encryptKey = encryptKey.PadRight(8, ' ');
+ byte[] rgbKey = Encoding.UTF8.GetBytes(encryptKey.Substring(0, 8));
+ byte[] rgbIV = DESKeys;
+ byte[] inputByteArray = Encoding.UTF8.GetBytes(encryptString);
+ DESCryptoServiceProvider dCSP = new DESCryptoServiceProvider();
+ MemoryStream mStream = new MemoryStream();
+ CryptoStream cStream = new CryptoStream(mStream, dCSP.CreateEncryptor(rgbKey, rgbIV), CryptoStreamMode.Write);
+ cStream.Write(inputByteArray, 0, inputByteArray.Length);
+ cStream.FlushFinalBlock();
+ return Convert.ToBase64String(mStream.ToArray());
+ }
+
+ ///
+ /// DES解密字符串
+ ///
+ /// 待解密的字符串
+ /// 解密密钥,要求为8位,和加密密钥相同
+ /// 解密成功返回解密后的字符串,失败返源串
+ public static string DES_Decode(string decryptString, string decryptKey = "dlhisapi")
+ {
+ try
+ {
+ decryptKey = decryptKey.Substring(0, 8);
+ decryptKey = decryptKey.PadRight(8, ' ');
+ byte[] rgbKey = Encoding.UTF8.GetBytes(decryptKey);
+ byte[] rgbIV = DESKeys;
+ byte[] inputByteArray = Convert.FromBase64String(decryptString);
+ DESCryptoServiceProvider DCSP = new DESCryptoServiceProvider();
+
+ MemoryStream mStream = new MemoryStream();
+ CryptoStream cStream = new CryptoStream(mStream, DCSP.CreateDecryptor(rgbKey, rgbIV), CryptoStreamMode.Write);
+ cStream.Write(inputByteArray, 0, inputByteArray.Length);
+ cStream.FlushFinalBlock();
+ return Encoding.UTF8.GetString(mStream.ToArray());
+ }
+ catch
+ {
+ return "";
+ }
+ }
+ }
+
+
+}
diff --git a/api_v1/Appointment.Entity/Utility/DateTimeHelper.cs b/api_v1/Appointment.Entity/Utility/DateTimeHelper.cs
new file mode 100644
index 0000000..43acfd5
--- /dev/null
+++ b/api_v1/Appointment.Entity/Utility/DateTimeHelper.cs
@@ -0,0 +1,16 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ public static class DateTimeHelper
+ {
+ ///
+ /// 获取sql server最小时间
+ ///
+ public static DateTime MSSQLMinValue { get { return _MSSQLMinValue; }}
+ private static DateTime _MSSQLMinValue = new DateTime(1753, 1, 1);
+
+ }
+}
diff --git a/api_v1/Appointment.Entity/Utility/PagerData.cs b/api_v1/Appointment.Entity/Utility/PagerData.cs
new file mode 100644
index 0000000..3a95937
--- /dev/null
+++ b/api_v1/Appointment.Entity/Utility/PagerData.cs
@@ -0,0 +1,24 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ ///
+ /// 上下文分页类型
+ ///
+ ///
+ ///
+ /// Add:yuangb 2017-3-1
+ ///
+ public class PagerData
+ {
+ public int PageIndex { get; set; }
+
+ public int PageSize { get; set; }
+
+ public int Total { get; set; }
+
+ public List Data { get; set; }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Utility/PicHelper.cs b/api_v1/Appointment.Entity/Utility/PicHelper.cs
new file mode 100644
index 0000000..ffe1356
--- /dev/null
+++ b/api_v1/Appointment.Entity/Utility/PicHelper.cs
@@ -0,0 +1,111 @@
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Drawing.Imaging;
+using System.IO;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ public static class PicHelper
+ {
+ ///
+ /// 获取图片域名
+ ///
+ ///
+ public static string GetPicDomain()
+ {
+ string value = string.Empty;
+ using (System.IO.StreamReader file = System.IO.File.OpenText("appsettings.json"))
+ {
+ using JsonTextReader reader = new JsonTextReader(file);
+ JObject o = (JObject)JToken.ReadFrom(reader);
+ value = Convert.ToString(o["WebApiDomain"]);
+ }
+ if (string.IsNullOrWhiteSpace(value)) throw new Exception("配置信息中缺少WebApiDomain");
+ return value;
+ }
+
+ ///
+ /// 获取图片保存服务器完整路径
+ ///
+ ///
+ public static string GetPicRootPath()
+ {
+ string value = string.Empty;
+ using (System.IO.StreamReader file = System.IO.File.OpenText("appsettings.json"))
+ {
+ using JsonTextReader reader = new JsonTextReader(file);
+ JObject o = (JObject)JToken.ReadFrom(reader);
+ value = Convert.ToString(o["PicRootPath"]);
+ }
+ if (string.IsNullOrWhiteSpace(value)) throw new Exception("配置信息中缺少PicRootPath");
+ return value;
+ }
+
+
+ ///
+ /// 保存图片
+ ///
+ /// 图片BASE64
+ /// NULL-保存图片异常,""-没有图片,其他-保存后的路径
+ public static ApiResult SavePic(string base64str)
+ {
+ try
+ {
+ if (string.IsNullOrWhiteSpace(base64str)) return ApiResult.Success(string.Empty);
+ if (base64str.ToLower().IndexOf("imgfile") > 0) return ApiResult.Success(base64str.Substring(base64str.ToLower().IndexOf("imgfile") - 1));
+
+ DateTime now = DateTime.Now;
+ var rd = new Random().Next(100, 999);
+ string filePath = $"/ImgFile/{now:yyyyMM}";
+ string fileName = $"{now:yyyyMMddHHmmssfff}{rd}";
+ base64str = base64str.Substring(base64str.IndexOf(",") + 1).Trim('\0');
+ byte[] arr = Convert.FromBase64String(base64str);
+ using (MemoryStream ms = new MemoryStream(arr))
+ {
+ if (!Directory.Exists(GetPicRootPath() + filePath)) Directory.CreateDirectory(GetPicRootPath() + filePath);
+ Bitmap bmp = new Bitmap(ms);
+
+ ImageCodecInfo myImageCodecInfo = GetEnoderInfo(bmp.RawFormat.ToString().ToLower());
+ if (bmp.RawFormat.ToString().ToLower().Contains("jpeg"))
+ {
+ fileName = $"{fileName}.jpg";
+ myImageCodecInfo = GetEnoderInfo("png");
+ }
+ else
+ {
+ fileName = $"{fileName}.{bmp.RawFormat}";
+ }
+
+ EncoderParameters destEncParams = new EncoderParameters(1);
+ destEncParams.Param[0] = new EncoderParameter(System.Drawing.Imaging.Encoder.Quality, 100);
+
+ bmp.Save($"{GetPicRootPath()}{filePath}/{fileName}", myImageCodecInfo, destEncParams);
+ ms.Close();
+ }
+
+ return ApiResult.Success($"{filePath}/{fileName}");
+ }
+ catch (Exception ex)
+ {
+ return ApiResult.Failed("保存图片失败,失败信息:" + ex.Message);
+ }
+ }
+
+ #region private
+ private static ImageCodecInfo GetEnoderInfo(string mineType)
+ {
+ ImageCodecInfo[] myEncoders = ImageCodecInfo.GetImageEncoders();
+
+ foreach (System.Drawing.Imaging.ImageCodecInfo myEncoder in myEncoders)
+ if (myEncoder.MimeType.Contains(mineType))
+ return myEncoder;
+ return null;
+ }
+ #endregion
+
+ }
+}
diff --git a/api_v1/Appointment.Entity/Utility/RegexHelper.cs b/api_v1/Appointment.Entity/Utility/RegexHelper.cs
new file mode 100644
index 0000000..da4cad5
--- /dev/null
+++ b/api_v1/Appointment.Entity/Utility/RegexHelper.cs
@@ -0,0 +1,44 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Text.RegularExpressions;
+
+namespace Appointment.Entity.Utility
+{
+ ///
+ /// 正则表达式
+ ///
+ public static class RegexHelper
+ {
+ ///
+ /// 判断是否为手机号码
+ ///
+ /// 字符串
+ /// True-是,False-否
+ ///
+ /// Add:yuangb 2016-6-12
+ ///
+ public static bool IsPhone(this string value)
+ {
+ value = value.Replace("+86", "");
+ return Regex.IsMatch(value, @"^1[3-9]{1}[0-9]{9}$");
+ }
+
+ public static TChild AutoCopy(TParent parent) where TChild : TParent, new()
+ {
+ TChild child = new TChild();
+ var ParentType = typeof(TParent);
+ var Properties = ParentType.GetProperties();
+ foreach (var Propertie in Properties)
+ {
+ //循环遍历属性
+ if (Propertie.CanRead && Propertie.CanWrite)
+ {
+ //进行属性拷贝
+ Propertie.SetValue(child, Propertie.GetValue(parent, null), null);
+ }
+ }
+ return child;
+ }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Utility/StringHelper.cs b/api_v1/Appointment.Entity/Utility/StringHelper.cs
new file mode 100644
index 0000000..bc68e85
--- /dev/null
+++ b/api_v1/Appointment.Entity/Utility/StringHelper.cs
@@ -0,0 +1,150 @@
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ public static class StringHelper
+ {
+ ///
+ /// 去除对象字符串后面的空格
+ ///
+ ///
+ ///
+ ///
+ public static T Replace(this T t)
+ {
+ string jsonStr = Newtonsoft.Json.JsonConvert.SerializeObject(t);
+ while (true)
+ {
+ if (jsonStr.IndexOf(" \"") > -1)
+ {
+ jsonStr = jsonStr.Replace(" \"","\"");
+ }
+ else
+ {
+ break;
+ }
+ }
+ return Newtonsoft.Json.JsonConvert.DeserializeObject(jsonStr);
+ }
+
+ ///
+ /// 得到一个汉字的拼音第一个字母,如果是一个英文字母则直接返回大写字母
+ ///
+ /// 单个汉字
+ /// 单个大写字母
+ public static string GetCharSpellCode(string CnChar)
+ {
+ long iCnChar;
+ byte[] ZW = System.Text.Encoding.Default.GetBytes(CnChar);
+
+ //如果是字母,则直接返回首字母
+ if (ZW.Length == 1)
+ {
+ return CnChar.ToUpper();
+ }
+ else
+ {
+ int i1 = (short)(ZW[0]);
+ int i2 = (short)(ZW[1]);
+ iCnChar = i1 * 256 + i2;
+ }
+ if ((iCnChar >= 45217) && (iCnChar <= 45252))
+ {
+ return "A";
+ }
+ else if ((iCnChar >= 45253) && (iCnChar <= 45760))
+ {
+ return "B";
+ }
+ else if ((iCnChar >= 45761) && (iCnChar <= 46317))
+ {
+ return "C";
+ }
+ else if ((iCnChar >= 46318) && (iCnChar <= 46825))
+ {
+ return "D";
+ }
+ else if ((iCnChar >= 46826) && (iCnChar <= 47009))
+ {
+ return "E";
+ }
+ else if ((iCnChar >= 47010) && (iCnChar <= 47296))
+ {
+ return "F";
+ }
+ else if ((iCnChar >= 47297) && (iCnChar <= 47613))
+ {
+ return "G";
+ }
+ else if ((iCnChar >= 47614) && (iCnChar <= 48118))
+ {
+ return "H";
+ }
+ else if ((iCnChar >= 48119) && (iCnChar <= 49061))
+ {
+ return "J";
+ }
+ else if ((iCnChar >= 49062) && (iCnChar <= 49323))
+ {
+ return "K";
+ }
+ else if ((iCnChar >= 49324) && (iCnChar <= 49895))
+ {
+ return "L";
+ }
+ else if ((iCnChar >= 49896) && (iCnChar <= 50370))
+ {
+ return "M";
+ }
+ else if ((iCnChar >= 50371) && (iCnChar <= 50613))
+ {
+ return "N";
+ }
+ else if ((iCnChar >= 50614) && (iCnChar <= 50621))
+ {
+ return "O";
+ }
+ else if ((iCnChar >= 50622) && (iCnChar <= 50905))
+ {
+ return "P";
+ }
+ else if ((iCnChar >= 50906) && (iCnChar <= 51386))
+ {
+ return "Q";
+ }
+ else if ((iCnChar >= 51387) && (iCnChar <= 51445))
+ {
+ return "R";
+ }
+ else if ((iCnChar >= 51446) && (iCnChar <= 52217))
+ {
+ return "S";
+ }
+ else if ((iCnChar >= 52218) && (iCnChar <= 52697))
+ {
+ return "T";
+ }
+ else if ((iCnChar >= 52698) && (iCnChar <= 52979))
+ {
+ return "W";
+ }
+ else if ((iCnChar >= 52980) && (iCnChar <= 53640))
+ {
+ return "X";
+ }
+ else if ((iCnChar >= 53689) && (iCnChar <= 54480))
+ {
+ return "Y";
+ }
+ else if ((iCnChar >= 54481) && (iCnChar <= 55289))
+ {
+ return "Z";
+ }
+ else
+ return ("?");
+ }
+ }
+}
diff --git a/api_v1/Appointment.Entity/Utility/WechatHelper.cs b/api_v1/Appointment.Entity/Utility/WechatHelper.cs
new file mode 100644
index 0000000..ac07ea1
--- /dev/null
+++ b/api_v1/Appointment.Entity/Utility/WechatHelper.cs
@@ -0,0 +1,123 @@
+using System;
+using System.Collections.Generic;
+using System.Net;
+using System.Net.Http;
+using System.Text;
+
+namespace Appointment.Entity
+{
+ public class WechatHelper
+ {
+ private static HttpClient _HttpClient = null;
+
+ static WechatHelper()
+ {
+ _HttpClient = new HttpClient(new HttpClientHandler());
+ }
+
+ public object JsonConvert { get; private set; }
+
+ ///
+ /// 根据小程序登录code获取用户信息
+ ///
+ ///
+ ///
+ public ApiResult Code2Session(string code)
+ {
+ string appId = BaseConfig.App(new string[] { "WeChat", "AppId" });
+ if(string.IsNullOrWhiteSpace(appId)) ApiResult.Failed("缺少配置参数 [AppId]!");
+ string appSecret = BaseConfig.App(new string[] { "WeChat", "AppSecret" });
+ if (string.IsNullOrWhiteSpace(appSecret)) ApiResult.Failed("缺少配置参数 [AppSecret]!");
+
+ if (string.IsNullOrWhiteSpace(code) || string.IsNullOrWhiteSpace(appId) || string.IsNullOrWhiteSpace(appSecret))
+ {
+ return ApiResult.Failed("获取小程序配置信息出错");
+ }
+
+ string url = $"https://api.weixin.qq.com/sns/jscode2session?appid={appId}&secret={appSecret}&js_code={code}&grant_type=authorization_code";
+
+ var res = _HttpClient.GetAsync(url).Result;
+ if (res.StatusCode == HttpStatusCode.OK)
+ {
+ var result = Encoding.Default.GetString(res.Content.ReadAsByteArrayAsync().Result);
+ if (string.IsNullOrWhiteSpace(result) || result.IndexOf("session_key") == -1)
+ {
+ return ApiResult.Failed("调用微信接口失败,可能code已失效");
+ }
+
+ var weChatDto = Newtonsoft.Json.JsonConvert.DeserializeObject(result);
+
+ return ApiResult.Success("", weChatDto);
+ }
+ else
+ {
+ return ApiResult.Failed("调用微信接口失败");
+ }
+ }
+
+ //
+
+ public class LoveInnGetAccessTokenReq
+ {
+ public string AppId { get; set; }
+
+ public string AppName { get; set; }
+
+ public string AppSecret { get; set; }
+ }
+
+
+ ///
+ /// 模版信息
+ ///
+ ///
+ public static string BuildTemlMsg(string toUser, string tmplId, string url, string first, string remark, params object[] args)
+ {
+ string appId = BaseConfig.App(new string[] { "WeChat", "AppId" });
+ if (string.IsNullOrWhiteSpace(appId)) ApiResult.Failed("缺少配置参数 [AppId]!");
+
+ StringBuilder sbMsg = new StringBuilder();
+
+ sbMsg.Append("{");
+ sbMsg.AppendFormat("\"touser\":\"{0}\",", toUser);
+ sbMsg.AppendFormat("\"template_id\":\"{0}\",", tmplId);
+ sbMsg.Append("\"miniprogram\":{");
+ sbMsg.AppendFormat("\"appid\":\"{0}\",", appId);
+ sbMsg.AppendFormat("\"pagepath\":\"{0}\"", url);
+ sbMsg.Append("},");
+ sbMsg.Append("\"topcolor\":\"#FF0000\",");
+ sbMsg.Append("\"data\":");
+ sbMsg.Append("{");
+
+ sbMsg.Append("\"first\":");
+ sbMsg.Append("{");
+ sbMsg.AppendFormat("\"value\":\"{0}\",", first);
+ sbMsg.AppendFormat("\"color\":\"{0}\"", "#333333");
+ sbMsg.Append("},");
+
+ for (int i = 0; i < args.Length; i++)
+ {
+ sbMsg.AppendFormat("\"keyword{0}\":", i + 1);
+ sbMsg.Append("{");
+ sbMsg.AppendFormat("\"value\":\"{0}\",", args[i]);
+ sbMsg.AppendFormat("\"color\":\"{0}\"", "#333333");
+ sbMsg.Append("},");
+ }
+
+ sbMsg.Append("\"remark\":");
+ sbMsg.Append("{");
+ sbMsg.AppendFormat("\"value\":\"{0}\",", remark);
+ sbMsg.AppendFormat("\"color\":\"{0}\"", "#333333");
+ sbMsg.Append("}");
+
+ sbMsg.Append("}");
+ sbMsg.Append("}");
+
+
+
+
+
+ return sbMsg.ToString();
+ }
+ }
+}
diff --git a/api_v1/Appointment.Entity/ValidateAttribute/AttributeExtend.cs b/api_v1/Appointment.Entity/ValidateAttribute/AttributeExtend.cs
new file mode 100644
index 0000000..c98b497
--- /dev/null
+++ b/api_v1/Appointment.Entity/ValidateAttribute/AttributeExtend.cs
@@ -0,0 +1,116 @@
+using Appointment.Entity.Utility;
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Text;
+
+namespace Appointment.Entity.ValidateAttribute
+{
+ ///
+ /// 验证的执行
+ ///
+ ///
+ /// Add:yuangb 2019-3-5
+ ///
+ public static class AttributeExtend
+ {
+ ///
+ /// 全部实体属性根据特性校验
+ ///
+ ///
+ /// 验证的实体
+ ///
+ public static ApiResult Validate(this T t) where T : class
+ {
+ List validates = new List();
+
+ Type type = t.GetType();
+ foreach (PropertyInfo prop in type.GetProperties())
+ {
+ object oValue = prop.GetValue(t);
+
+ foreach (ValidateAttribute attr in prop.GetCustomAttributes(typeof(ValidateAttribute), true))
+ {
+ string msg = attr.Validate(oValue);
+ if (!string.IsNullOrWhiteSpace(msg)) validates.Add(msg);
+ }
+
+ // 2020-10-12 添加屏蔽HTML注入
+ if (prop.PropertyType.Name == "String")
+ {
+ string sValue = (string)prop.GetValue(t);
+ if (sValue != null && !string.IsNullOrEmpty(sValue))
+ {
+ var isIgnoreHtml = prop.GetCustomAttribute(typeof(IsIgnoreHtml), true);
+ if (isIgnoreHtml == null)
+ {
+ sValue = sValue.Replace("<", "<").Replace(">", ">");
+ prop.SetValue(t, sValue);
+ }
+ }
+ }
+ }
+
+ return validates.Count == 0 ? ApiResult.Success() : ApiResult.Failed(string.Join(",", validates));
+ }
+
+ ///
+ /// 指定实体的属性名称,根据特性进行校验
+ ///
+ ///
+ /// 验证的实体
+ /// 实体的属性名称
+ ///
+ public static ApiResult Validate(this T t, List list) where T : class
+ {
+ List validates = new List();
+
+ Type type = t.GetType();
+ foreach (PropertyInfo prop in type.GetProperties())
+ {
+ object oValue = prop.GetValue(t);
+
+ if (list.Contains(prop.Name))
+ {
+ foreach (ValidateAttribute attr in prop.GetCustomAttributes(typeof(ValidateAttribute), true))
+ {
+
+ string msg = attr.Validate(oValue);
+ if (!string.IsNullOrWhiteSpace(msg)) validates.Add(msg);
+ }
+ }
+ }
+
+ return validates.Count == 0 ? ApiResult.Success() : ApiResult.Failed(string.Join(",", validates));
+ }
+
+ ///
+ /// 使用委托,全部实体属性根据特性校验
+ ///
+ ///
+ /// 验证的实体
+ /// 一个ApiResult入参,一个ApiResult返回值的委托
+ ///
+ public static ApiResult Validate(this T t, Func func)
+ {
+ List validates = new List();
+
+ Type type = t.GetType();
+ foreach (PropertyInfo prop in type.GetProperties())
+ {
+ object oValue = prop.GetValue(t);
+
+ foreach (ValidateAttribute attr in prop.GetCustomAttributes(typeof(ValidateAttribute), true))
+ {
+ string msg = attr.Validate(oValue);
+ if (!string.IsNullOrWhiteSpace(msg))
+ {
+ validates.Add(msg);
+ }
+ }
+ }
+
+ return validates.Count == 0 ? func.Invoke(ApiResult.Success()) : ApiResult.Failed(string.Join(",", validates));
+ }
+ }
+}
diff --git a/api_v1/Appointment.Entity/ValidateAttribute/IsIgnoreHtml.cs b/api_v1/Appointment.Entity/ValidateAttribute/IsIgnoreHtml.cs
new file mode 100644
index 0000000..207da89
--- /dev/null
+++ b/api_v1/Appointment.Entity/ValidateAttribute/IsIgnoreHtml.cs
@@ -0,0 +1,20 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity.ValidateAttribute
+{
+ ///
+ /// 忽略HTML标签
+ ///
+ ///
+ /// Add:yuangb 2019-10-15
+ ///
+ public class IsIgnoreHtml : ValidateAttribute
+ {
+ public override string Validate(object oValue)
+ {
+ return "";
+ }
+ }
+}
diff --git a/api_v1/Appointment.Entity/ValidateAttribute/LongValueAttribute.cs b/api_v1/Appointment.Entity/ValidateAttribute/LongValueAttribute.cs
new file mode 100644
index 0000000..3a557b1
--- /dev/null
+++ b/api_v1/Appointment.Entity/ValidateAttribute/LongValueAttribute.cs
@@ -0,0 +1,52 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity.ValidateAttribute
+{
+ ///
+ /// 整型数值值范围效验
+ ///
+ ///
+ /// Add:yuangb 2019-3-11
+ /// 使用格式:实体属性前加[IntValue(minValue: 1000, maxValue: 999999, ErrorMessage = "验证码长度不正确")]
+ ///
+ public class LongValueAttribute : ValidateAttribute
+ {
+ ///
+ /// 报错提示
+ ///
+ public string ErrorMessage { get; set; }
+
+ ///
+ /// 最小值(包含)
+ ///
+ public long MinValue { get; private set; }
+
+ ///
+ /// 最大值(包含)
+ ///
+ public long MaxValue { get; private set; }
+
+ ///
+ ///
+ ///
+ /// 最小值(包含)
+ /// 最大值(包含)
+ public LongValueAttribute(long minValue, long maxValue)
+ {
+ this.MinValue = minValue;
+ this.MaxValue = maxValue;
+ }
+
+ public override string Validate(object oValue)
+ {
+ if (oValue != null)
+ {
+ long lValue = Convert.ToInt64(oValue);
+ if (lValue < MinValue || lValue > MaxValue) return ErrorMessage;
+ }
+ return null;
+ }
+ }
+}
diff --git a/api_v1/Appointment.Entity/ValidateAttribute/PhoneAttribute.cs b/api_v1/Appointment.Entity/ValidateAttribute/PhoneAttribute.cs
new file mode 100644
index 0000000..3565dcb
--- /dev/null
+++ b/api_v1/Appointment.Entity/ValidateAttribute/PhoneAttribute.cs
@@ -0,0 +1,34 @@
+using Appointment.Entity.Utility;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity.ValidateAttribute
+{
+ ///
+ /// 手机格式校验
+ /// 注意:当存在内容时才校验,如果为必填信息,请同时使用必填特性
+ ///
+ ///
+ /// Add:yuangb 2019-3-11
+ /// 使用格式:实体属性前加 [Phone(ErrorMessage = "手机号码不正确")]
+ ///
+ public class PhoneAttribute : ValidateAttribute
+ {
+ ///
+ /// 报错提示信息
+ ///
+ public string ErrorMessage { get; set; }
+
+ public override string Validate(object oValue)
+ {
+ if (oValue != null && !string.IsNullOrWhiteSpace(oValue.ToString()))
+ {
+ string sPhone = oValue.ToString().Replace("+86", "");
+ if (!sPhone.IsPhone()) return ErrorMessage;
+ }
+
+ return null;
+ }
+ }
+}
diff --git a/api_v1/Appointment.Entity/ValidateAttribute/StringLengthAttribute.cs b/api_v1/Appointment.Entity/ValidateAttribute/StringLengthAttribute.cs
new file mode 100644
index 0000000..11b372b
--- /dev/null
+++ b/api_v1/Appointment.Entity/ValidateAttribute/StringLengthAttribute.cs
@@ -0,0 +1,45 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity.ValidateAttribute
+{
+ ///
+ /// 字符串长度校验特性
+ ///
+ ///
+ /// Add:yuangb 2019-3-5
+ /// 使用格式:实体属性前加[StringLength(50, MinLength = 2, ErrorMessage = "获取微信用户信息失败")]
+ ///
+ public class StringLengthAttribute : ValidateAttribute
+ {
+ ///
+ /// 最小长度
+ ///
+ public int MinLength { get; set; }
+
+ ///
+ /// 报错提示
+ ///
+ public string ErrorMessage { get; set; }
+
+ private int _maxLength;
+
+ public StringLengthAttribute(int maxLength)
+ {
+ this._maxLength = maxLength;
+ }
+
+ public override string Validate(object oValue)
+ {
+ if (oValue == null || string.IsNullOrWhiteSpace(oValue.ToString()) || oValue.ToString().Length > this._maxLength || oValue.ToString().Length < this.MinLength)
+ {
+ return ErrorMessage;
+ }
+ else
+ {
+ return null;
+ }
+ }
+ }
+}
diff --git a/api_v1/Appointment.Entity/ValidateAttribute/StringMaxLengthAttribute.cs b/api_v1/Appointment.Entity/ValidateAttribute/StringMaxLengthAttribute.cs
new file mode 100644
index 0000000..c25847f
--- /dev/null
+++ b/api_v1/Appointment.Entity/ValidateAttribute/StringMaxLengthAttribute.cs
@@ -0,0 +1,37 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity.ValidateAttribute
+{
+ ///
+ /// 字符串最大长度
+ ///
+ ///
+ /// Add:yuangb 2020-12-9
+ /// 使用格式:实体属性前加 [StringMaxLength(200, ErrorMessage = "备注说明最大长度200个字符")]
+ ///
+ public class StringMaxLengthAttribute : ValidateAttribute
+ {
+ private int _MaxLength = 0;
+
+ ///
+ /// 报错提示
+ ///
+ public string ErrorMessage { get; set; }
+
+ public StringMaxLengthAttribute(int maxLength)
+ {
+ _MaxLength = maxLength;
+ }
+
+ public override string Validate(object oValue)
+ {
+ if (oValue != null && oValue.ToString().Length > _MaxLength)
+ {
+ return ErrorMessage;
+ }
+ return null;
+ }
+ }
+}
diff --git a/api_v1/Appointment.Entity/ValidateAttribute/StringRequiredAttribute.cs b/api_v1/Appointment.Entity/ValidateAttribute/StringRequiredAttribute.cs
new file mode 100644
index 0000000..adf9468
--- /dev/null
+++ b/api_v1/Appointment.Entity/ValidateAttribute/StringRequiredAttribute.cs
@@ -0,0 +1,33 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity.ValidateAttribute
+{
+ ///
+ /// 必填项
+ ///
+ ///
+ /// Add:yuangb 2019-3-11
+ /// [StringRequired(ErrorMessage ="状态不能为空")]
+ ///
+ public class StringRequiredAttribute : ValidateAttribute
+ {
+ ///
+ /// 报错提示信息
+ ///
+ public string ErrorMessage { get; set; }
+
+ public override string Validate(object oValue)
+ {
+ if (oValue == null || string.IsNullOrWhiteSpace(oValue.ToString()))
+ {
+ return ErrorMessage;
+ }
+ else
+ {
+ return null;
+ }
+ }
+ }
+}
diff --git a/api_v1/Appointment.Entity/ValidateAttribute/ValidateAttribute.cs b/api_v1/Appointment.Entity/ValidateAttribute/ValidateAttribute.cs
new file mode 100644
index 0000000..9995b06
--- /dev/null
+++ b/api_v1/Appointment.Entity/ValidateAttribute/ValidateAttribute.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Entity.ValidateAttribute
+{
+ ///
+ /// 特性基类
+ ///
+ ///
+ /// Add:yuangb 2019-3-5
+ ///
+ public abstract class ValidateAttribute : Attribute
+ {
+ public abstract string Validate(object oValue);
+ }
+}
diff --git a/api_v1/Appointment.IRepository/Appointment.IRepository.csproj b/api_v1/Appointment.IRepository/Appointment.IRepository.csproj
new file mode 100644
index 0000000..5343cfd
--- /dev/null
+++ b/api_v1/Appointment.IRepository/Appointment.IRepository.csproj
@@ -0,0 +1,22 @@
+
+
+
+ netcoreapp3.1
+
+
+
+ Appointment.IRepository.xml
+ 1701;1702;1591
+
+
+
+
+
+
+
+
+ Always
+
+
+
+
diff --git a/api_v1/Appointment.IRepository/Appointment.IRepository.xml b/api_v1/Appointment.IRepository/Appointment.IRepository.xml
new file mode 100644
index 0000000..2353ddd
--- /dev/null
+++ b/api_v1/Appointment.IRepository/Appointment.IRepository.xml
@@ -0,0 +1,342 @@
+
+
+
+ Appointment.IRepository
+
+
+
+
+ 预订审核节点 添加
+
+
+
+
+
+
+ 预订审核节点 删除
+
+
+
+
+
+
+ 预订审核节点 根据主键获取实体
+
+
+
+
+
+
+ 预订审核节点 获取列表
+
+
+
+
+
+
+ 预订审核节点 分页
+
+
+
+
+
+
+ 获取预订审核线状结构
+
+
+
+
+
+
+ 日志
+
+ 数据表
+ 主键
+ 原始数据
+ 新数据
+ 操作人员
+ 用户类型:0-普通用户,1-管理人员
+
+
+
+
+ 根据时间段获取可使用的会议厅资源
+
+
+
+
+
+
+ 根据日期与场次获取可使用会议厅资源
+
+
+
+
+
+
+ 获取房间列表
+
+
+
+
+
+ 据时间段获取房类最小可用数
+
+
+
+
+
+
+ 获取自定义备注列表项
+
+
+
+
+
+ 添加预订
+
+
+
+
+
+
+ 删除主单或详情
+
+
+
+
+
+
+ 预订审核
+
+
+
+
+
+
+ 取消预订
+
+
+
+
+
+
+ 转审批
+
+
+
+
+
+
+ 抄送操作
+
+
+
+
+
+
+ 查询实体
+
+ 主键
+
+
+
+
+ 获取我申请的预订信息
+
+
+
+
+
+
+ 获取我的待审核的
+
+
+
+
+
+
+ 获取预订审核记录表
+
+
+
+
+
+
+ 创建新的预订单
+
+
+
+
+
+
+ 修改暂订单
+
+
+
+
+
+
+ 申请确定单
+
+
+
+
+
+
+ 取消OA单
+
+
+
+
+
+
+ 审批通过确实单
+
+
+
+
+
+
+ 被驳回
+
+
+
+
+
+
+ 手动抄送
+
+
+
+
+
+
+ 信息回复
+
+
+
+
+
+
+ 根据订单主键获取实体
+
+
+
+
+
+
+ 分页预订列表
+
+
+
+
+
+
+ 获取审批流程
+
+
+
+
+
+
+ 订单数据差距
+
+
+
+
+
+
+ 返回回复中的图片列表
+
+
+
+
+
+ 预订类型添加
+
+
+
+
+
+
+ 预订类型删除
+
+
+
+
+
+
+ 预订类型更新
+
+
+
+
+
+
+ 预订类型获取实体
+
+
+
+
+
+
+ 预订类型列表
+
+
+
+
+
+
+ 预订类型分页
+
+
+
+
+
+
+ 获取全部角色
+
+
+
+
+
+ 工号密码登录
+
+
+
+
+ 酒店id
+
+
+
+
+ 微信登录
+
+
+ 酒店id
+
+
+
+
+ 绑定微信服务号openid
+
+
+
+
+
+
+ 获取所有用户
+
+
+
+
+
+
+ 当前用户角色是否具有转审权限
+
+
+
+
+
+
diff --git a/api_v1/Appointment.IRepository/IApptAuditorRepo.cs b/api_v1/Appointment.IRepository/IApptAuditorRepo.cs
new file mode 100644
index 0000000..58c04f8
--- /dev/null
+++ b/api_v1/Appointment.IRepository/IApptAuditorRepo.cs
@@ -0,0 +1,52 @@
+using Appointment.Entity;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.IRepository
+{
+ public interface IApptAuditorRepo
+ {
+ ///
+ /// 预订审核节点 添加
+ ///
+ ///
+ ///
+ ApiResult Add(ApptAuditor req);
+
+ ///
+ /// 预订审核节点 删除
+ ///
+ ///
+ ///
+ ApiResult Delete(int id);
+
+ ///
+ /// 预订审核节点 根据主键获取实体
+ ///
+ ///
+ ///
+ ApiResult GetModel(int id);
+
+ ///
+ /// 预订审核节点 获取列表
+ ///
+ ///
+ ///
+ ApiResult> GetList(ApptAuditor req);
+
+ ///
+ /// 预订审核节点 分页
+ ///
+ ///
+ ///
+ ApiResult> Page(CommPageReq req);
+
+ ///
+ /// 获取预订审核线状结构
+ ///
+ ///
+ ///
+ ApiResult AuditorLine(int apptTypeId);
+ }
+}
diff --git a/api_v1/Appointment.IRepository/IApptLogRepo.cs b/api_v1/Appointment.IRepository/IApptLogRepo.cs
new file mode 100644
index 0000000..6f3ce37
--- /dev/null
+++ b/api_v1/Appointment.IRepository/IApptLogRepo.cs
@@ -0,0 +1,22 @@
+using Appointment.Entity;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.IRepository
+{
+ public interface IApptLogRepo
+ {
+ ///
+ /// 日志
+ ///
+ /// 数据表
+ /// 主键
+ /// 原始数据
+ /// 新数据
+ /// 操作人员
+ /// 用户类型:0-普通用户,1-管理人员
+ ///
+ ApiResult SetLog(string tableName, string keyId, string oldData, string newData, string userId, int systemUser = 0);
+ }
+}
diff --git a/api_v1/Appointment.IRepository/IApptRepo.cs b/api_v1/Appointment.IRepository/IApptRepo.cs
new file mode 100644
index 0000000..c7167d0
--- /dev/null
+++ b/api_v1/Appointment.IRepository/IApptRepo.cs
@@ -0,0 +1,116 @@
+using Appointment.Entity;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Text;
+
+namespace Appointment.IRepository
+{
+ public interface IApptRepo
+ {
+ ///
+ /// 根据时间段获取可使用的会议厅资源
+ ///
+ ///
+ ///
+ ApiResult> UsableMeetingList(MeetingReq req);
+
+ ///
+ /// 根据日期与场次获取可使用会议厅资源
+ ///
+ ///
+ ///
+ ApiResult> UsableMeeting(UsableMeetingReq req);
+
+ ///
+ /// 获取房间列表
+ ///
+ ///
+ ApiResult> UsableRoom(UsableRoomReq req);
+
+ ///
+ /// 据时间段获取房类最小可用数
+ ///
+ ///
+ ///
+ ApiResult> UsableRoomMin(UsableRoomReq req);
+
+ ///
+ /// 获取自定义备注列表项
+ ///
+ ///
+ ApiResult> RemarkList();
+
+ ///
+ /// 添加预订
+ ///
+ ///
+ ///
+ ApiResult Add(ApptSummaryReq req);
+
+ ///
+ /// 删除主单或详情
+ ///
+ ///
+ ///
+ ApiResult DeleteAppt(AuditDeleteReq req);
+
+ ///
+ /// 预订审核
+ ///
+ ///
+ ///
+ public ApiResult ApptAudit(ApptAuditReq req);
+
+ ///
+ /// 取消预订
+ ///
+ ///
+ ///
+ public ApiResult CancelAudit(ApptAuditReq req);
+
+ ///
+ /// 转审批
+ ///
+ ///
+ ///
+ public ApiResult TransferAudit(TransferAuditReq req);
+
+ ///
+ /// 抄送操作
+ ///
+ ///
+ ///
+ ApiResult ApptSend(ApptSendReq req);
+
+ ///
+ /// 查询实体
+ ///
+ /// 主键
+ ///
+ ApiResult GetModel(int id);
+
+ ///
+ /// 获取我申请的预订信息
+ ///
+ ///
+ ///
+ public ApiResult> MyApptApplyPageReq(MyApptApplyPageReq req);
+
+ ///
+ /// 获取我的待审核的
+ ///
+ ///
+ ///
+ public ApiResult> MyPartakePage(MyApptAuditPageReq req);
+
+ ///
+ /// 获取预订审核记录表
+ ///
+ ///
+ ///
+ public ApiResult AuditorLogTree(CommIntReq req);
+
+ public ApiResult Demo(CommPageReq req);
+ }
+}
diff --git a/api_v1/Appointment.IRepository/IApptRepoJNC.cs b/api_v1/Appointment.IRepository/IApptRepoJNC.cs
new file mode 100644
index 0000000..9b67857
--- /dev/null
+++ b/api_v1/Appointment.IRepository/IApptRepoJNC.cs
@@ -0,0 +1,103 @@
+using Appointment.Entity;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.IRepository
+{
+ public interface IApptRepoJNC
+ {
+ ///
+ /// 创建新的预订单
+ ///
+ ///
+ ///
+ public ApiResult AddApptSummary(AddSummaryJncReq req);
+
+
+ ///
+ /// 修改暂订单
+ ///
+ ///
+ ///
+ public ApiResult UpdateSummary(UpdateSummaryReq req);
+
+ ///
+ /// 申请确定单
+ ///
+ ///
+ ///
+ public ApiResult ApplyOrder(ApplyOrderReq req);
+
+ ///
+ /// 取消OA单
+ ///
+ ///
+ ///
+ public ApiResult Cancel(ApplyOrderReq req);
+
+ ///
+ /// 审批通过确实单
+ ///
+ ///
+ ///
+ public ApiResult AuditorSummary(ApplyOrderReq req);
+
+ ///
+ /// 被驳回
+ ///
+ ///
+ ///
+ public ApiResult RejectSummary(ApplyOrderReq req);
+
+ ///
+ /// 手动抄送
+ ///
+ ///
+ ///
+ public ApiResult ManualCopy(ApptSendReq req);
+
+ ///
+ /// 信息回复
+ ///
+ ///
+ ///
+ public ApiResult AddReply(AddMsgReq req);
+
+
+
+ ///
+ /// 根据订单主键获取实体
+ ///
+ ///
+ ///
+ public ApiResult GetSummaryModel(SummaryJncModelReq req);
+
+ ///
+ /// 分页预订列表
+ ///
+ ///
+ ///
+ public ApiResult> ApptSummaryPager(SummaryJNCPageReq req);
+
+ ///
+ /// 获取审批流程
+ ///
+ ///
+ ///
+ public ApiResult AuditorLogTree(SummaryJncModelReq req);
+
+ ///
+ /// 订单数据差距
+ ///
+ ///
+ ///
+ public ApiResult> Disparity(SummaryJncModelReq req);
+
+ ///
+ /// 返回回复中的图片列表
+ ///
+ ///
+ public ApiResult> GetReplyPicList(SummaryJncModelReq req);
+ }
+}
diff --git a/api_v1/Appointment.IRepository/IApptTypeRepo.cs b/api_v1/Appointment.IRepository/IApptTypeRepo.cs
new file mode 100644
index 0000000..4ed647d
--- /dev/null
+++ b/api_v1/Appointment.IRepository/IApptTypeRepo.cs
@@ -0,0 +1,52 @@
+using Appointment.Entity;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.IRepository
+{
+ public interface IApptTypeRepo
+ {
+ ///
+ /// 预订类型添加
+ ///
+ ///
+ ///
+ ApiResult Add(ApptTypeAddReq req);
+
+ ///
+ /// 预订类型删除
+ ///
+ ///
+ ///
+ ApiResult Delete(int id);
+
+ ///
+ /// 预订类型更新
+ ///
+ ///
+ ///
+ ApiResult Update(ApptType req);
+
+ ///
+ /// 预订类型获取实体
+ ///
+ ///
+ ///
+ ApiResult GetModel(int id);
+
+ ///
+ /// 预订类型列表
+ ///
+ ///
+ ///
+ ApiResult> GetList(ApptType req);
+
+ ///
+ /// 预订类型分页
+ ///
+ ///
+ ///
+ ApiResult> Page(CommPageReq req);
+ }
+}
diff --git a/api_v1/Appointment.IRepository/IManageGroup.cs b/api_v1/Appointment.IRepository/IManageGroup.cs
new file mode 100644
index 0000000..d7519bc
--- /dev/null
+++ b/api_v1/Appointment.IRepository/IManageGroup.cs
@@ -0,0 +1,16 @@
+using Appointment.Entity;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.IRepository
+{
+ public interface IManagerGroup
+ {
+ ///
+ /// 获取全部角色
+ ///
+ ///
+ ApiResult> GetAll();
+ }
+}
diff --git a/api_v1/Appointment.IRepository/IUserRepo.cs b/api_v1/Appointment.IRepository/IUserRepo.cs
new file mode 100644
index 0000000..d2942da
--- /dev/null
+++ b/api_v1/Appointment.IRepository/IUserRepo.cs
@@ -0,0 +1,49 @@
+using Appointment.Entity;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.IRepository
+{
+ public interface IUserRepo
+ {
+ ///
+ /// 工号密码登录
+ ///
+ ///
+ ///
+ ///
+ /// 酒店id
+ ///
+ public ApiResult UserNameLogin(string userName, string userPwd, string code, string hotelid);
+
+ ///
+ /// 微信登录
+ ///
+ ///
+ /// 酒店id
+ ///
+ public ApiResult WxLogin(string code, string hotelid);
+
+ ///
+ /// 绑定微信服务号openid
+ ///
+ ///
+ ///
+ public ApiResult WxServiceSet(WxServiceSetRes req);
+
+ ///
+ /// 获取所有用户
+ ///
+ ///
+ ///
+ ApiResult> GetSendUserList(BindUserReq req = null);
+
+ ///
+ /// 当前用户角色是否具有转审权限
+ ///
+ ///
+ ///
+ public ApiResult> GetTransferAuditUserList(BindUserReq req);
+ }
+}
diff --git a/api_v1/Appointment.Repository/Appointment.Repository.csproj b/api_v1/Appointment.Repository/Appointment.Repository.csproj
new file mode 100644
index 0000000..b507ecc
--- /dev/null
+++ b/api_v1/Appointment.Repository/Appointment.Repository.csproj
@@ -0,0 +1,32 @@
+
+
+
+ netcoreapp3.1
+
+
+
+ Appointment.Repository.xml
+ 1701;1702;1591
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Always
+
+
+
+
diff --git a/api_v1/Appointment.Repository/Appointment.Repository.xml b/api_v1/Appointment.Repository/Appointment.Repository.xml
new file mode 100644
index 0000000..6b01ed1
--- /dev/null
+++ b/api_v1/Appointment.Repository/Appointment.Repository.xml
@@ -0,0 +1,423 @@
+
+
+
+ Appointment.Repository
+
+
+
+
+ 标准预订业务
+
+
+
+
+ 可用会议室资源列表
+
+
+
+
+
+
+ 当天可用会议室资源
+
+
+
+
+
+
+ 可用客房资源列表
+
+
+
+
+
+
+ 根据时间段获取房类最小可用数
+
+
+
+
+
+
+ 备注列表项
+
+
+
+
+
+ 创建暂定单
+
+
+
+
+
+
+ 删除预定
+
+
+
+
+
+
+ 预订审批
+
+
+
+
+
+
+ 取消预订
+
+
+
+
+
+
+ 转审批
+
+
+
+
+
+
+ 抄送
+
+
+
+
+
+
+ 获取实体
+
+
+
+
+
+
+ 我发起的预订列表
+
+
+
+
+
+
+ 和我关联的预订(我审核的、我有权审核的、我抄送的、抄送给我的)
+
+
+
+
+
+
+ 获取预订审核记录表
+
+
+
+
+
+
+ 预订信息入正式表
+
+
+
+
+
+
+ 向审核人员发送审核消息
+
+
+
+ 酒店id
+
+
+
+
+ 转审批
+
+
+
+
+
+
+
+ 审核通过向提交人发送信息
+
+
+
+
+
+
+
+
+
+
+ 抄送 消息模板
+
+ 接收人程序openid
+
+
+
+ 江南春模式
+
+
+
+
+ "预定部", "销售经理", "财务经理", "财务总监", "总经理"
+
+
+
+
+ 创建暂订单
+
+
+
+
+
+
+ 修改暂订单
+
+
+
+
+
+
+ 申请审核单
+
+
+
+
+
+
+ 取消OA单
+
+
+
+
+ 未占用资源时,只有发起人可以取消;
+ 未用资源后,只有预定部可以取消;
+
+
+
+
+ 审核通过
+
+
+
+
+
+
+ 被驳回
+
+
+
+
+
+
+ 手动抄送
+
+
+
+
+
+
+ 信息回复
+
+
+
+
+
+
+ 根据订单主键获取实体
+
+
+
+
+
+
+ 获取审批流程
+
+
+
+
+
+
+ 订单数据差异
+
+
+
+
+
+
+
+
+ 返回回复中的图片列表
+
+
+
+
+
+ 预定部对预定单进行审批通过 【新的订单替换原来的订单】
+
+
+
+
+
+ 实时计算机发送消息模板
+
+
+
+
+
+ 抄送消息推送
+
+ 发起人姓名
+ 订单标题
+ 接收人程序openid
+ 自动手动,true-自动,false-手动
+ 手动自动备注
+
+
+
+ 自动抄送
+
+
+
+
+
+ 封装手工回复信息
+
+ 所有人员
+ 要查看的回复的主键
+
+
+
+
+ 解释用户信息
+
+
+
+
+
+
+ 格式转化
+
+
+
+
+
+
+ 数据库操作
+
+
+
+
+ 插入数据并返回主键
+
+
+
+
+
+
+
+
+ 批量插入
+
+
+
+
+
+
+
+
+ 根据主键删除
+
+
+
+
+
+
+ 批量删除
+
+
+
+
+
+
+ 更新
+
+
+
+
+
+
+
+
+ 批量更新
+
+
+ 是否数据校验
+
+
+
+
+ 根据主键获取实体
+
+
+
+
+
+
+ 根据条件获取实体,如果多条获取第一条
+
+
+
+
+
+
+ 获取所有
+
+
+
+
+
+ 根据条件查询
+
+ Lambd表达式
+
+
+
+
+ IN 查询
+
+
+
+
+
+
+ 单表分页获取数据列表
+
+ 当前页
+ 页大小
+ Lambd表达式
+ 排序字段,
+ 排序方式
+
+
+
+
+ 账号与密码登录
+
+ 账号
+ 密码
+ 公众号Code
+ 酒店Id
+
+
+
+
+ 当前用户角色是否具有转审权限
+
+
+
+
+
+
diff --git a/api_v1/Appointment.Repository/ApptAuditorRepo.cs b/api_v1/Appointment.Repository/ApptAuditorRepo.cs
new file mode 100644
index 0000000..baa3c7e
--- /dev/null
+++ b/api_v1/Appointment.Repository/ApptAuditorRepo.cs
@@ -0,0 +1,134 @@
+using Appointment.Entity;
+using Appointment.IRepository;
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.Text;
+using Newtonsoft.Json;
+
+namespace Appointment.Repository
+{
+ public class ApptAuditorRepo : DbContext, IApptAuditorRepo
+ {
+ private List cache = null;
+
+ IApptLogRepo _ApptLogRepo;
+ public ApptAuditorRepo(IApptLogRepo apptLogRepo)
+ {
+ _ApptLogRepo = apptLogRepo;
+ }
+
+ public ApiResult Add(ApptAuditor req)
+ {
+ var apptType = Db.Queryable()
+ .Where(t => t.Id == req.ApptTypeId)
+ .Any();
+ if (!apptType) return ApiResult.Failed($"操作失败,预订类型无效!");
+
+ var groupAny = Db.Queryable()
+ .Where(t => t.OpGroup == req.OpGroup.Trim() && t.Descript == req.OpDescript.Trim())
+ .Any();
+ if (!groupAny) return ApiResult.Failed($"操作失败,组别无效!");
+
+ cache = Db.Queryable().Where(t => t.ApptTypeId == req.ApptTypeId).ToList();
+ if (req.Pid > 0)
+ {
+ var rootEntity = cache.Where(t => t.Id == req.Pid).FirstOrDefault();
+ if (rootEntity == null) return ApiResult.Failed($"操作失败,上级审核组无效!");
+ }
+ var auditorAny = cache.Where(t => t.Pid == req.Pid).FirstOrDefault();
+ if (auditorAny != null) return ApiResult.Failed($"操作失败,当前位置已经配置了审核组!");
+
+ var result = InsertReturnId(req);
+ if (!result.IsSuccess) return ApiResult.Failed(result.Msg);
+
+ req.Id = result.Info;
+ return ApiResult.Success(string.Empty, req);
+ }
+
+ public ApiResult Delete(int id)
+ {
+ var childData = Db.Queryable().Where(t => t.Pid == id).Any();
+ if (childData) return ApiResult.Failed("操作失败,请先删除子级数据!");
+
+ var apptAuditor = GetById(id);
+ if (apptAuditor == null) return ApiResult.Success(string.Empty);
+
+ var ls = Db.Queryable().Where(
+ t => t.ApptTypeId == apptAuditor.ApptTypeId && t.AuditorId == apptAuditor.Id
+ && t.AuditorStatus == (int)EnumAuditorStatus.审核中)
+ .Select(t => t.Id).ToList();
+ if (ls.Count > 0) return ApiResult.Failed($"操作失败,有待审核的预订[{string.Join(",", ls)}],请审核后再删除!");
+
+
+ _ApptLogRepo.SetLog("ppt_auditor", apptAuditor.Id.ToString(), JsonConvert.SerializeObject(apptAuditor), null, null, 1);
+ DeleteById(id);
+ return ApiResult.Success();
+ }
+
+ public ApiResult GetModel(int id)
+ {
+ var entity = GetById(id);
+
+ return ApiResult.Success(string.Empty, entity);
+ }
+
+ public ApiResult> GetList(ApptAuditor req)
+ {
+ var ls = Db.Queryable()
+ .Where(t => req.Pid == 0)
+ .WhereIF(req.Id > 0, t => t.Id == req.Id)
+ .WhereIF(req.ApptTypeId > 0, t => t.ApptTypeId == req.ApptTypeId)
+ .WhereIF(!string.IsNullOrWhiteSpace(req.OpGroup), t => t.OpGroup == req.OpGroup)
+ .WhereIF(!string.IsNullOrWhiteSpace(req.OpDescript), t => t.OpDescript.Contains(req.OpDescript))
+ .WhereIF(req.Pid > 0, t => t.Pid == req.Pid)
+ .ToList();
+
+
+ return ApiResult>.Success(string.Empty, ls);
+ }
+
+ public ApiResult> Page(CommPageReq req)
+ {
+ int total = 0;
+ var ls = Db.Queryable()
+ .WhereIF(!string.IsNullOrWhiteSpace(req.Keywords), t => t.OpDescript.Contains(req.Keywords))
+ .ToPageList(req.PageIndex, req.PageSize, ref total);
+
+
+ PagerData result = new PagerData()
+ {
+ PageIndex = req.PageIndex,
+ PageSize = req.PageSize,
+ Total = total,
+ Data = ls
+ };
+
+ return ApiResult>.Success(string.Empty, result);
+ }
+
+ public ApiResult AuditorLine(int apptTypeId)
+ {
+ cache = Db.Queryable().Where(t => t.ApptTypeId == apptTypeId).ToList();
+ if (cache.Count == 0) return ApiResult.Success(string.Empty, null);
+
+ ApptAuditor apptAuditor = cache.Where(t => t.ApptTypeId == apptTypeId && t.Pid == 0).FirstOrDefault();
+
+ if (apptAuditor == null) return ApiResult.Success(string.Empty, null);
+
+ apptAuditor = GetRecursion(apptAuditor);
+
+ return ApiResult.Success(string.Empty, apptAuditor);
+ }
+
+ private ApptAuditor GetRecursion(ApptAuditor req)
+ {
+ var entity = cache.Where(t => t.Pid == req.Id).FirstOrDefault();
+ if (entity == null) return req;
+
+ req.Child = GetRecursion(entity);
+
+ return req;
+ }
+ }
+}
diff --git a/api_v1/Appointment.Repository/ApptLogRepo.cs b/api_v1/Appointment.Repository/ApptLogRepo.cs
new file mode 100644
index 0000000..78d88d0
--- /dev/null
+++ b/api_v1/Appointment.Repository/ApptLogRepo.cs
@@ -0,0 +1,26 @@
+using Appointment.Entity;
+using Appointment.IRepository;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace Appointment.Repository
+{
+ public class ApptLogRepo : DbContext, IApptLogRepo
+ {
+ public ApiResult SetLog(string tableName, string keyId, string oldData, string newData, string userId, int systemUser = 0)
+ {
+ var model = new ApptLog()
+ {
+ TableName = tableName,
+ KeyId = keyId,
+ OldData = oldData,
+ NewData = newData,
+ CreateTime = DateTime.Now,
+ UserId = userId,
+ SystemUser = systemUser
+ };
+ return InsertReturnId(model);
+ }
+ }
+}
diff --git a/api_v1/Appointment.Repository/ApptRepo.cs b/api_v1/Appointment.Repository/ApptRepo.cs
new file mode 100644
index 0000000..cc90ad3
--- /dev/null
+++ b/api_v1/Appointment.Repository/ApptRepo.cs
@@ -0,0 +1,1902 @@
+using Appointment.Entity;
+using Appointment.IRepository;
+using System;
+using System.Linq;
+using System.Collections.Generic;
+using System.Data;
+using System.Text;
+using SqlSugar;
+using System.Threading.Tasks;
+using Newtonsoft.Json;
+using System.Net.Http;
+using static Appointment.Entity.WechatHelper;
+
+namespace Appointment.Repository
+{
+ ///
+ /// 标准预订业务
+ ///
+ public class ApptRepo : DbContext, IApptRepo
+ {
+ private readonly log4net.ILog _logger = log4net.LogManager.GetLogger(typeof(ApptRepo));
+
+ IApptLogRepo _ApptLog;
+ public ApptRepo(IApptLogRepo apptLog)
+ {
+ _ApptLog = apptLog;
+ }
+
+ // ---- 会议室
+
+ ///
+ /// 可用会议室资源列表
+ ///
+ ///
+ ///
+ public ApiResult> UsableMeetingList(MeetingReq req)
+ {
+ var loginUserRes = BaseRepo.DECLoginInfo(req.AccountDES);
+ if (!loginUserRes.IsSuccess) return ApiResult>.Failed(loginUserRes.Msg);
+
+ if (req.StartDay == DateTime.MinValue) return ApiResult>.Failed("操作失败,[StartTime]不正确!");
+ req.StartDay = new DateTime(req.StartDay.Year, req.StartDay.Month, req.StartDay.Day);
+ if (req.EndDay == DateTime.MinValue) return ApiResult>.Failed("操作失败,[EndTime]不正确!");
+ var endd = req.EndDay.AddDays(1);
+ req.EndDay = new DateTime(endd.Year, endd.Month, endd.Day);
+
+ var ls = Db.Queryable((i, c) => new JoinQueryInfos(
+ JoinType.Left, i.Rescode == c.Code
+ ))
+ .Where((i, c) => i.Stime >= req.StartDay && i.Etime <= req.EndDay && c.Sta == "T" && i.Sta != "C")
+ .Select((i, c) => new UsableMeetingMiddleRes()
+ {
+ MeetingName = c.Descript1,
+ Code = c.Code,
+ Stime = i.Stime.Value,
+ Sta = i.Sta,
+ Sfield = i.Sfield,
+ Resby = i.Resby
+ })
+ .ToList();
+
+ List reList = new List();
+
+ var resCode = Db.Queryable()
+ .Where(t => t.Sort == "A" && t.Sta == "T").OrderBy(t => t.Code, OrderByType.Asc).ToList();
+ if (resCode == null || resCode.Count == 0) return ApiResult>.Success(string.Empty);
+ int days = (req.EndDay - req.StartDay).Days;
+ foreach (var item in resCode)
+ {
+ DateTime curDay = req.StartDay;
+ MeetingRes meetingRes = new MeetingRes();
+ meetingRes.Code = item.Code;
+ meetingRes.Descript = item.Descript1;
+ meetingRes.DayStatus = new List();
+ for (int i = 0; i < days; i++)
+ {
+ MeetingStatus meetingStatus = new MeetingStatus();
+ meetingStatus.Day = curDay;
+ string[] st = new string[] { "", "", "" };
+ for (int j = 0; j < 3; j++)
+ {
+ int sField = j + 1;
+ var model = ls.Where(t => t.Stime == curDay && t.Sfield == sField && t.Code == item.Code).FirstOrDefault();
+ if (model != null)
+ {
+ if (model.Resby == loginUserRes.Info.UserAccount)
+ {
+ st[j] = "M";
+ }
+ else
+ {
+ st[j] = model.Sta;
+ }
+ }
+
+ }
+ meetingStatus.Status = st;
+ meetingRes.DayStatus.Add(meetingStatus);
+ curDay = curDay.AddDays(1);
+ }
+
+ reList.Add(meetingRes);
+ }
+
+
+ return ApiResult>.Success(string.Empty, reList);
+ }
+
+ ///
+ /// 当天可用会议室资源
+ ///
+ ///
+ ///
+ public ApiResult> UsableMeeting(UsableMeetingReq req)
+ {
+ // 获取会议室列表
+ var resCodeList = Db.Queryable().Where(t => t.Sort == "A").OrderBy(t => t.Code, OrderByType.Asc).ToList();
+ if (resCodeList == null || resCodeList.Count == 0) return ApiResult>.Success(string.Empty);
+
+ // 获取占用的会议室
+ req.Day = new DateTime(req.Day.Year, req.Day.Month, req.Day.Day);
+ ISugarQueryable sugar = Db.Queryable().Where(t => t.Stime == req.Day && t.Sta != "C");
+ if (req.Groups != null && req.Groups.Length > 0) sugar = sugar.In(t => t.Sfield, req.Groups);
+ var resInfoList = sugar.ToList();
+
+ List list = new List();
+ foreach (var item in resCodeList)
+ {
+ int rows = resInfoList.Where(t => t.Rescode == item.Code).Count();
+ if (rows > 0)
+ {
+ if (req.Status == 1)
+ {
+ item.Numbers = 0;
+ }
+ else
+ {
+ continue;
+ }
+ }
+ list.Add(item);
+ }
+
+
+ // 获取待审核的信息
+ return ApiResult>.Success(string.Empty, list);
+ }
+
+ // ---- 客房
+
+ ///
+ /// 可用客房资源列表
+ ///
+ ///
+ ///
+ public ApiResult> UsableRoom(UsableRoomReq req)
+ {
+ if (req.StartDay == DateTime.MinValue) return ApiResult>.Failed("操作失败,[StartTime]不正确!");
+ req.StartDay = new DateTime(req.StartDay.Year, req.StartDay.Month, req.StartDay.Day);
+ if (req.EndDay == DateTime.MinValue) return ApiResult>.Failed("操作失败,[EndTime]不正确!");
+ var endd = req.EndDay.AddDays(-1);
+ req.EndDay = new DateTime(endd.Year, endd.Month, endd.Day);
+
+ string rm_type = "%"; // 全部
+ var dt2 = Db.Ado.UseStoredProcedure().SqlQuery("p_yyj_ota_type_rsv_tend", new { rm_type = rm_type, s_time = req.StartDay, e_time = req.EndDay, tentative = "T" });
+ if (dt2.Count == 0) return ApiResult>.Success(String.Empty, null);
+ dt2 = dt2.Replace();
+
+ var ls = Db.Queryable().ToList().Replace();
+
+ for (int i = 0; i < dt2.Count; i++)
+ {
+ dt2[i].RoomName = ls.Where(t => t.Id == dt2[i].Type).FirstOrDefault()?.Descript1;
+ dt2[i].RoomPrice = ls.Where(t => t.Id == dt2[i].Type).FirstOrDefault()?.Price;
+ dt2[i].RoomTotal = ls.Where(t => t.Id == dt2[i].Type).FirstOrDefault()?.Total;
+ }
+ dt2 = dt2.OrderBy(t => t.Quan).ToList();
+
+ return ApiResult>.Success(String.Empty, dt2);
+ }
+
+ ///
+ /// 根据时间段获取房类最小可用数
+ ///
+ ///
+ ///
+ public ApiResult> UsableRoomMin(UsableRoomReq req)
+ {
+ if (req.StartDay == DateTime.MinValue) return ApiResult>.Failed("操作失败,[StartTime]不正确!");
+ req.StartDay = new DateTime(req.StartDay.Year, req.StartDay.Month, req.StartDay.Day);
+ if (req.EndDay == DateTime.MinValue) return ApiResult>.Failed("操作失败,[EndTime]不正确!");
+ /* 获取基本客房类型数据 */
+ var ls = Db.Queryable().ToList().Replace();
+ if (ls == null && ls.Count == 0) return ApiResult>.Success(String.Empty, null);
+ var usableTypeList = new List();
+ for (int i = 0; i < ls.Count; i++)
+ {
+ usableTypeList.Add(new UsableRoomRes()
+ {
+ Sequence = ls[i].Sequence.Value,
+ Type = ls[i].Id,
+ Quan = ls[i].Total,
+ RoomName = ls[i].Descript1,
+ RoomPrice = ls[i].Price,
+ RoomTotal = ls[i].Total
+ });
+ }
+
+ /* 获取正式库客房使用数量 */
+ var endday = req.EndDay.AddDays(-1);
+ endday = new DateTime(endday.Year, endday.Month, endday.Day);
+ string rm_type = "%"; // 全部
+ var dt2 = Db.Ado.UseStoredProcedure().SqlQuery("p_yyj_ota_type_rsv_tend", new { rm_type = rm_type, s_time = req.StartDay, e_time = endday, tentative = "T" });
+ if (dt2.Count == 0) return ApiResult>.Success(String.Empty, null);
+ dt2 = dt2.Replace();
+
+
+ /* 获取临时表客户使用数量 */
+ //DateTime eTime = req.EndDay.AddDays(1);
+
+ //var SummaryIds = Db.Queryable()
+ // .Where(t => t.AuditorStatus == (int)EnumAuditorStatus.审核中)
+ // .Select(t => t.Id).ToList();
+ //var apptRoomList = Db.Queryable()
+ // .In(t => t.ApptId, SummaryIds)
+ // .Where(t => !(t.RoomOut < eTime || t.RoomIn > req.EndDay))
+ // .ToList();
+
+ foreach (var item in usableTypeList)
+ {
+ item.Quan = dt2.Where(t => t.Type == item.Type).Min(t => t.Quan); // 正式数据可使用的最小客房
+ }
+ usableTypeList = usableTypeList.Where(t => t.Quan > 0).OrderBy(t => t.Sequence).ToList();
+ return ApiResult>.Success(String.Empty, usableTypeList);
+ }
+
+ ///
+ /// 备注列表项
+ ///
+ ///
+ public ApiResult> RemarkList()
+ {
+ var ls = Db.Queryable()
+ .Where(t => t.Class == EnumSysCodeClass.apptremark.ToString())
+ .OrderBy(t => t.Id, OrderByType.Asc)
+ .Select(t => t.Descript1).ToList().Replace();
+ return ApiResult>.Success(string.Empty, ls);
+ }
+
+ // ---- 预订管理
+
+ ///
+ /// 创建暂定单
+ ///
+ ///
+ ///
+ public ApiResult Add(ApptSummaryReq req)
+ {
+ DateTime now = DateTime.Now;
+
+ var loginUserRes = BaseRepo.DECLoginInfo(req.AccountDES);
+ if (!loginUserRes.IsSuccess) return ApiResult.Failed(loginUserRes.Msg);
+
+ int pid = 0;
+ if (req.Id != 0)
+ {
+ var summary = Db.Queryable().Where(t => t.Id == req.Id).First();
+ if (summary != null)
+ {
+ if (summary.AuditorStatus == (int)EnumAuditorStatus.审核中)
+ {
+ string oldData = JsonConvert.SerializeObject(summary);
+ summary.AuditorStatus = (int)EnumAuditorStatus.作废;
+ Db.Updateable(summary).UpdateColumns(t => new { t.AuditorStatus }).ExecuteCommand();
+ string newData = JsonConvert.SerializeObject(summary);
+ _ApptLog.SetLog("appt_summary", summary.Id.ToString(), oldData, newData, loginUserRes.Info.UserAccount, 0);
+ pid = req.Id;
+ }
+ else if (summary.AuditorStatus == (int)EnumAuditorStatus.审核通过 || summary.AuditorStatus == (int)EnumAuditorStatus.作废)
+ {
+ return ApiResult.Failed("操作无效");
+ }
+ else if (summary.AuditorStatus == (int)EnumAuditorStatus.驳回)
+ {
+ // 驳回的复制新建,原来的不需要更改
+ }
+ }
+ }
+
+
+ if (
+ (req.ApptRoomList == null || req.ApptRoomList.Count == 0)
+ && (req.ApptMeetingList == null || req.ApptMeetingList.Count == 0)
+ && (req.ApptCateringList == null || req.ApptCateringList.Count == 0)
+ && (req.ApptSpringList == null || req.ApptSpringList.Count == 0)
+ )
+ {
+ return ApiResult.Failed("添加失败,预订详情全为空!");
+ }
+
+ /* 主体 */
+
+ // 审批状态
+ var auditorStatus = EnumAuditorStatus.审核中;
+ int apptTypeId = 0;//现不使用类型
+ var auditorId = 0;
+ var apptType = Db.Queryable().ToList();
+ var apptTypeModel = apptType.Where(t => t.Pid == 0).FirstOrDefault();
+ if (apptTypeModel == null)
+ {
+ auditorId = 0;
+ }
+ else
+ {
+ if (apptTypeModel.OpGroup != loginUserRes.Info.UserGroup)
+ {
+ auditorId = apptTypeModel.Id;
+ }
+ else
+ {
+ var nextAuditor = apptType.Where(t => t.Pid == apptTypeModel.Id).FirstOrDefault();
+ if (nextAuditor == null)
+ {
+ auditorId = 0;
+ }
+ else
+ {
+ auditorId = nextAuditor.Id;
+ }
+ }
+ }
+
+ StringBuilder no = new StringBuilder();
+ string NoPrefix = BaseConfig.App(new string[] { "NoPrefix" });
+ if (!string.IsNullOrWhiteSpace(NoPrefix))
+ {
+ no.AppendFormat("{0}-", NoPrefix);
+ }
+ no.Append($"{now:yyyy}-{now:MM}-{now:dd}-");
+
+ // 计算序号
+ DateTime sTime = new DateTime(now.Year, now.Month, now.Day);
+ var count = Db.Queryable()
+ .Where(t => t.CreateTime > sTime).Count() + 1;
+ no.Append(count.ToString().PadLeft(2, '0'));
+
+ /* 会议室预订明细 */
+ var apptMeetingList = new List();
+ if (req.ApptMeetingList != null && req.ApptMeetingList.Count > 0)
+ {
+ List resCodeList = Db.Queryable().Where(t => t.Sort == "A" && t.Sta == "T").ToList();
+
+ foreach (var item in req.ApptMeetingList)
+ {
+ if (item.MeetingGroup.Length == 0) return ApiResult.Failed("添加失败,未获取到选择的场次!");
+ string meetingRoom = item.MeetingRoom;
+ string meetingCode = item.MeetingCode;
+ decimal meetingPrice = item.MeetingPrice == null ? 0 : item.MeetingPrice.Value;
+ if (!string.IsNullOrWhiteSpace(item.MeetingCode))
+ {
+ var resCode = resCodeList.Where(t => t.Code == item.MeetingCode).FirstOrDefault();
+ if (resCode == null) return ApiResult.Failed("添加失败,无效的会议厅代码!");
+ meetingRoom = resCode.Descript1;
+
+ if (item.MeetingTime != null)
+ {
+ item.MeetingTime = new DateTime(item.MeetingTime.Value.Year, item.MeetingTime.Value.Month, item.MeetingTime.Value.Day);
+ // 判断正式表 会议厅资源是否被占用
+ var resInfo = Db.Queryable()
+ .Where(t => t.Rescode == item.MeetingCode && t.Stime == item.MeetingTime.Value)
+ .In(t => t.Sfield, item.MeetingGroup).Any();
+ if (resInfo) return ApiResult.Failed("添加失败,会议室已被占用!");
+ }
+ }
+
+ for (int i = 0; i < item.MeetingGroup.Length; i++)
+ {
+ apptMeetingList.Add(new ApptMeeting()
+ {
+ MeetingTime = item.MeetingTime.Value,
+ //MeetingGroup = item.MeetingGroup[i],
+ MeetingRoom = meetingRoom,
+ MeetingCode = meetingCode,
+ MeetingRostrum = item.MeetingRostrum,
+ MeetingShape = item.MeetingShape,
+ MeetingNum = item.MeetingNum == null ? 0 : item.MeetingNum.Value,
+ MeetingPrice = meetingPrice,
+ MeetingTitle = item.MeetingTitle,
+ Remark = item.Remark
+ });
+ }
+ }
+ }
+
+ /* 客房预订明细 */
+ var apptRoomList = new List();
+ if (req.ApptRoomList != null && req.ApptRoomList.Count > 0)
+ {
+ List roomTypeList = Db.Queryable