| 
															
																@@ -4,6 +4,7 @@ using Aspose.Words.Drawing; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 using Aspose.Words.Tables; 
															 | 
															
															 | 
															
																 using Aspose.Words.Tables; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 using DiffMatchPatch; 
															 | 
															
															 | 
															
																 using DiffMatchPatch; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 using Microsoft.AspNetCore.SignalR; 
															 | 
															
															 | 
															
																 using Microsoft.AspNetCore.SignalR; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+using Microsoft.EntityFrameworkCore.Query.Internal; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 using NPOI.HSSF.UserModel; 
															 | 
															
															 | 
															
																 using NPOI.HSSF.UserModel; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 using NPOI.SS.UserModel; 
															 | 
															
															 | 
															
																 using NPOI.SS.UserModel; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 using NPOI.SS.Util; 
															 | 
															
															 | 
															
																 using NPOI.SS.Util; 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -103,6 +104,7 @@ namespace OASystem.API.Controllers 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         private readonly List<int> _portTypeData; 
															 | 
															
															 | 
															
																         private readonly List<int> _portTypeData; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         private readonly TableOperationRecordRepository _tableorRep; 
															 | 
															
															 | 
															
																         private readonly TableOperationRecordRepository _tableorRep; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         private readonly EnterExitCostDraftRepository _enterExitCostDraftRep; 
															 | 
															
															 | 
															
																         private readonly EnterExitCostDraftRepository _enterExitCostDraftRep; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        private readonly RestaurantRepository _restaurantRep; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																         /// <summary> 
															 | 
															
															 | 
															
																         /// <summary> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         /// 构造函数 
															 | 
															
															 | 
															
																         /// 构造函数 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -144,6 +146,8 @@ namespace OASystem.API.Controllers 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         /// <param name="ffrRep"></param> 
															 | 
															
															 | 
															
																         /// <param name="ffrRep"></param> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         /// <param name="opinionaireRep"></param> 
															 | 
															
															 | 
															
																         /// <param name="opinionaireRep"></param> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         /// <param name="tableorRep"></param> 
															 | 
															
															 | 
															
																         /// <param name="tableorRep"></param> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        /// <param name="enterExitCostDraftRep"></param> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        /// <param name="restaurantRep"></param> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         public GroupsController( 
															 | 
															
															 | 
															
																         public GroupsController( 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             ILogger<GroupsController> logger, 
															 | 
															
															 | 
															
																             ILogger<GroupsController> logger, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             IMapper mapper, 
															 | 
															
															 | 
															
																             IMapper mapper, 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -181,7 +185,8 @@ namespace OASystem.API.Controllers 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             ForeignReceivablesRepository ffrRep, 
															 | 
															
															 | 
															
																             ForeignReceivablesRepository ffrRep, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             OpinionaireRepository opinionaireRep, 
															 | 
															
															 | 
															
																             OpinionaireRepository opinionaireRep, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             TableOperationRecordRepository tableorRep, 
															 | 
															
															 | 
															
																             TableOperationRecordRepository tableorRep, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-            EnterExitCostDraftRepository enterExitCostDraftRep 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            EnterExitCostDraftRepository enterExitCostDraftRep, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            RestaurantRepository restaurantRep 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             ) 
															 | 
															
															 | 
															
																             ) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         { 
															 | 
															
															 | 
															
																         { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             _logger = logger; 
															 | 
															
															 | 
															
																             _logger = logger; 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -237,6 +242,7 @@ namespace OASystem.API.Controllers 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             _portTypeData = new List<int>() { 2, 3 }; 
															 | 
															
															 | 
															
																             _portTypeData = new List<int>() { 2, 3 }; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             _tableorRep = tableorRep; 
															 | 
															
															 | 
															
																             _tableorRep = tableorRep; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																             _enterExitCostDraftRep = enterExitCostDraftRep; 
															 | 
															
															 | 
															
																             _enterExitCostDraftRep = enterExitCostDraftRep; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            _restaurantRep = restaurantRep; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																         } 
															 | 
															
															 | 
															
																         } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -8857,11 +8863,11 @@ FROM 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 var permissions = new List<Grp_EnterExitCostPermission>(); 
															 | 
															
															 | 
															
																                 var permissions = new List<Grp_EnterExitCostPermission>(); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 if (userIds.Any()) 
															 | 
															
															 | 
															
																                 if (userIds.Any()) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                 { 
															 | 
															
															 | 
															
																                 { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                    foreach (var userId in userIds) 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                    foreach (var userId1 in userIds) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     { 
															 | 
															
															 | 
															
																                     { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         permissions.Add(new Grp_EnterExitCostPermission() {  
															 | 
															
															 | 
															
																                         permissions.Add(new Grp_EnterExitCostPermission() {  
															 | 
														
													
												
													
														
															| 
															 | 
															
																                             GroupId = groupId, 
															 | 
															
															 | 
															
																                             GroupId = groupId, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																-                            UserId = userId, 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                            UserId = userId1, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                             CreateUserId = dto.UserId 
															 | 
															
															 | 
															
																                             CreateUserId = dto.UserId 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                         }); 
															 | 
															
															 | 
															
																                         }); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																                     } 
															 | 
															
															 | 
															
																                     } 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@@ -19810,6 +19816,93 @@ ORDER BY 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																         #endregion 
															 | 
															
															 | 
															
																         #endregion 
															 | 
														
													
												
													
														
															| 
															 | 
															
																  
															 | 
															
															 | 
															
																  
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        #region 团组餐厅相关信息 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        /// <summary> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        /// 团组相关餐厅信息 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        /// 基础数据(团组) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        /// </summary> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        /// <returns></returns> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        [HttpGet] 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)] 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        public async Task<IActionResult> RestaurantInit() 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            return Ok(await _restaurantRep.InitAsync()); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        /// <summary> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        /// 团组相关餐厅信息 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        /// Item 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        /// </summary> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        /// <param name="dto"></param> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        /// <returns></returns> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        [HttpPost] 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)] 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        public async Task<IActionResult> RestaurantItem(RestaurantItemDto dto) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            int portType = dto.PortType, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                groupId = dto.GroupId; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            if (!SharingStaticData.PortTypes.Contains(portType)) return Ok(JsonView(false,MsgTips.Port)); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            if (groupId < 1) return Ok(JsonView(false, MsgTips.DiId)); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            return Ok(await _restaurantRep.ItemAsync(portType,groupId)); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        /// <summary> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        /// 团组相关餐厅信息 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        /// Info 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        /// </summary> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        /// <param name="dto"></param> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        /// <returns></returns> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        [HttpPost] 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)] 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        public async Task<IActionResult> RestaurantInfo(RestaurantInfoDto dto) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            int portType = dto.PortType, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+                id = dto.Id; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            if (!SharingStaticData.PortTypes.Contains(portType)) return Ok(JsonView(false, MsgTips.Port)); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            if (id < 1) return Ok(JsonView(false, MsgTips.Id)); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            return Ok(await _restaurantRep.InfoAsync(portType, id)); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        /// <summary> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        /// 团组相关餐厅信息 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        /// Op 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        /// </summary> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        /// <param name="dto"></param> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        /// <returns></returns> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        [HttpPost] 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)] 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        public async Task<IActionResult> RestaurantOp(RestaurantOpDto dto) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            if (dto.CurrUserId < 1) return Ok(JsonView(false, MsgTips.UserId)); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            if (dto.GroupId < 1) return Ok(JsonView(false, MsgTips.DiId)); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            if ( string.IsNullOrEmpty(dto.Name)) return Ok(JsonView(false, "餐厅名称为空!")); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            return Ok(await _restaurantRep.OpAsync(dto)); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        /// <summary> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        /// 团组相关餐厅信息 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        /// Del 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        /// </summary> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        /// <param name="dto"></param> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        /// <returns></returns> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        [HttpPost] 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)] 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        public async Task<IActionResult> RestaurantDel(RestaurantDelDto dto) 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            int userId = dto.DeleteUserId; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            var id = dto.Id; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            if (userId < 1) return Ok( JsonView(false, MsgTips.UserId)); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            if (id < 1) return Ok(JsonView(false, MsgTips.Id)); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+            return Ok(await _restaurantRep.DelAsync(dto)); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        } 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+        #endregion 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																+ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         //        /// <summary> 
															 | 
															
															 | 
															
																         //        /// <summary> 
															 | 
														
													
												
													
														
															| 
															 | 
															
																         //        ///  
															 | 
															
															 | 
															
																         //        ///  
															 | 
														
													
												
													
														
															| 
															 | 
															
																         //        /// </summary> 
															 | 
															
															 | 
															
																         //        /// </summary> 
															 |