| 
					
				 | 
			
			
				@@ -519,6 +519,7 @@ namespace OASystem.API.Controllers 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         #endregion 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         #region 代理出票合作方资料 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         /// <summary> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         /// 代理出票合作方资料 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         /// </summary> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -528,52 +529,39 @@ namespace OASystem.API.Controllers 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         public async Task<IActionResult> QueryAirTicketAgent(DtoBase dto) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            try 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            var res_AirTicketAgents = _airTicketAgentRep.Query<Res_AirTicketAgent>(a => a.IsDel == 0).ToList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (res_AirTicketAgents.Count > 1) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                List<Res_AirTicketAgent> res_AirTicketAgents = _airTicketAgentRep.Query<Res_AirTicketAgent>(a => a.IsDel == 0).ToList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (res_AirTicketAgents.Count != 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                res_AirTicketAgents = res_AirTicketAgents.OrderByDescending(a => a.CreateTime).ToList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (dto.PageSize == 0 && dto.PageIndex == 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    res_AirTicketAgents = res_AirTicketAgents.OrderByDescending(a => a.CreateTime).ToList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    if (dto.PageSize == 0 && dto.PageIndex == 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        return Ok(JsonView(true, "查询成功!", res_AirTicketAgents)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    else 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        int count = res_AirTicketAgents.Count; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        float totalPage = (float)count / dto.PageSize;//总页数 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        if (totalPage == 0) totalPage = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        else totalPage = (int)Math.Ceiling((double)totalPage); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    foreach (var item in res_AirTicketAgents) EncryptionProcessor.DecryptProperties(item); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    return Ok(JsonView(true, "查询成功!", res_AirTicketAgents)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                else 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    int count = res_AirTicketAgents.Count; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    float totalPage = (float)count / dto.PageSize;//总页数 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if (totalPage == 0) totalPage = 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    else totalPage = (int)Math.Ceiling((double)totalPage); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        List<Res_AirTicketAgent> _AirTicketAgent = new List<Res_AirTicketAgent>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        for (int i = 0; i < dto.PageSize; i++) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    var _AirTicketAgent = new List<Res_AirTicketAgent>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    for (int i = 0; i < dto.PageSize; i++) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        var RowIndex = i + (dto.PageIndex - 1) * dto.PageSize; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        if (RowIndex < res_AirTicketAgents.Count) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            var RowIndex = i + (dto.PageIndex - 1) * dto.PageSize; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            if (RowIndex < res_AirTicketAgents.Count) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                _AirTicketAgent.Add(res_AirTicketAgents[RowIndex]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            else 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            EncryptionProcessor.DecryptProperties(res_AirTicketAgents[RowIndex]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            _AirTicketAgent.Add(res_AirTicketAgents[RowIndex]); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        return Ok(JsonView(true, "查询成功!", new { pageCount = count, totalPage = (int)totalPage, pageIndex = dto.PageIndex, pageSize = dto.PageSize, pageSource = _AirTicketAgent })); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        else break; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                else 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    return Ok(JsonView(false, "暂无数据!")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    return Ok(JsonView(true, "查询成功!", new { pageCount = count, totalPage = (int)totalPage, pageIndex = dto.PageIndex, pageSize = dto.PageSize, pageSource = _AirTicketAgent })); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            catch (Exception ex) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                return Ok(JsonView(false, "程序错误!")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                throw; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return Ok(JsonView(false, "暂无数据!")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         /// <summary> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -585,33 +573,12 @@ namespace OASystem.API.Controllers 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         public async Task<IActionResult> OpAirTicketAgent(OpAirTicketAgentDto dto) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            try 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (dto.Account == "") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    return Ok(JsonView(false, "请检查代理商账户是否填写!")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (dto.Bank == "") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    return Ok(JsonView(false, "请检查代理商银行是否填写!")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (dto.Name == "") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    return Ok(JsonView(false, "请检查代理商名称是否填写正确!")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                Result result = await _airTicketAgentRep.OpAirTicketAgent(dto); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (result.Code != 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    return Ok(JsonView(false, result.Msg)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                return Ok(JsonView(true, result.Msg)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            catch (Exception ex) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                return Ok(JsonView(false, "程序错误!")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                throw; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (string.IsNullOrEmpty(dto.Account)) return Ok(JsonView(false, "请检查代理商账户是否填写!")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (string.IsNullOrEmpty(dto.Bank)) return Ok(JsonView(false, "请检查代理商银行是否填写!")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (string.IsNullOrEmpty(dto.Name)) return Ok(JsonView(false, "请检查代理商名称是否填写正确!")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            Result result = await _airTicketAgentRep.OpAirTicketAgent(dto); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (result.Code != 0) return Ok(JsonView(false, result.Msg)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return Ok(JsonView(true, result.Msg)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         /// <summary> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -622,20 +589,9 @@ namespace OASystem.API.Controllers 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         public async Task<IActionResult> DelAirTicketAgent(DelBaseDto dto) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            try 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                var res = await _airTicketAgentRep.SoftDeleteByIdAsync<Res_AirTicketAgent>(dto.Id.ToString(), dto.DeleteUserId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (!res) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    return Ok(JsonView(false, "删除失败")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                return Ok(JsonView(true, "删除成功!")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            catch (Exception ex) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                return Ok(JsonView(false, "程序错误!")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                throw; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            var res = await _airTicketAgentRep.SoftDeleteByIdAsync<Res_AirTicketAgent>(dto.Id.ToString(), dto.DeleteUserId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (!res) return Ok(JsonView(false, "删除失败")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return Ok(JsonView(true, "删除成功!")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         #endregion 
			 |