| 
					
				 | 
			
			
				@@ -22,8 +22,6 @@ namespace OASystem.Infrastructure.Repositories.Resource 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             _mapper = mapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         /// <summary> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         /// 根据Diid查询公务出访数据List 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         /// </summary> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -174,113 +172,139 @@ namespace OASystem.Infrastructure.Repositories.Resource 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         public async Task<Result> OpOfficialActivities(OpOfficialActivitiesDto dto) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             Result result = new Result() { Code = -2, Msg = "未知错误" }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            try 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            #region 特殊字符转码  037 - 4.28 15:17 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (!string.IsNullOrEmpty(dto.Contact)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                #region 特殊字符转码  037 - 4.28 15:17 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                byte[] utf8Bytes = Encoding.UTF8.GetBytes(dto.Contact); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                byte[] utf16Bytes = Encoding.Convert(Encoding.UTF8, Encoding.Unicode, utf8Bytes); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                dto.Contact = Encoding.Unicode.GetString(utf16Bytes); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (!string.IsNullOrEmpty(dto.Contact)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    byte[] utf8Bytes = Encoding.UTF8.GetBytes(dto.Contact); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    byte[] utf16Bytes = Encoding.Convert(Encoding.UTF8, Encoding.Unicode, utf8Bytes); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    dto.Contact = Encoding.Unicode.GetString(utf16Bytes); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                #endregion 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            #endregion 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (dto.Status == 1)//添加 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                _sqlSugar.BeginTran(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                string selectSql = string.Format(@"select * from Res_OfficialActivities where Client='{0}' and Address='{1}' and IsDel='{2}'", dto.Client, dto.Address, 0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                var res_InvitationOfficial = await _sqlSugar.SqlQueryable<Res_OfficialActivities>(selectSql).FirstAsync();//查询是否存在 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (res_InvitationOfficial != null) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    _sqlSugar.RollbackTran(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    return result = new Result() { Code = -1, Msg = "该信息已存在,请勿重复添加!" }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (dto.Status == 1)//添加 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                else//不存在,可添加 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    _sqlSugar.BeginTran(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    string selectSql = string.Format(@"select * from Res_OfficialActivities where Client='{0}' and Address='{1}' and IsDel='{2}'", dto.Client, dto.Address, 0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    var res_InvitationOfficial = await _sqlSugar.SqlQueryable<Res_OfficialActivities>(selectSql).FirstAsync();//查询是否存在 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    if (res_InvitationOfficial != null) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    Res_OfficialActivities _InvitationOfficialActivityData = _mapper.Map<Res_OfficialActivities>(dto); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    int id = await _sqlSugar.Insertable(_InvitationOfficialActivityData).ExecuteReturnIdentityAsync(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if (id == 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         _sqlSugar.RollbackTran(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        return result = new Result() { Code = -1, Msg = "该信息已存在,请勿重复添加!" }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        return result = new Result() { Code = -1, Msg = "添加失败!" }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    else//不存在,可添加 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        Res_OfficialActivities _InvitationOfficialActivityData = _mapper.Map<Res_OfficialActivities>(dto); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        int id = await _sqlSugar.Insertable(_InvitationOfficialActivityData).ExecuteReturnIdentityAsync(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        if (id == 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    //添加到资料库 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    Res_InvitationOfficialActivityData res_InvitationData = new Res_InvitationOfficialActivityData(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    res_InvitationData.Country = dto.Country; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    res_InvitationData.City = dto.Area; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    res_InvitationData.UnitName = dto.Client; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    res_InvitationData.Delegation = dto.DiId.ToString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    res_InvitationData.Address = dto.Address; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    res_InvitationData.CreateUserId = dto.CreateUserId; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    res_InvitationData.Contact = dto.Contact; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    res_InvitationData.Job = dto.Job; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    res_InvitationData.Tel = dto.Tel; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    Res_InvitationOfficialActivityData ifNullUp = await _sqlSugar.Queryable<Res_InvitationOfficialActivityData>().FirstAsync 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        (a => a.Country == res_InvitationData.Country && a.City == res_InvitationData.City && a.UnitName == res_InvitationData.UnitName && a.IsDel == 0 && a.Address == res_InvitationData.Address); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if (ifNullUp == null) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        int DataID = await _sqlSugar.Insertable(res_InvitationData).ExecuteReturnIdentityAsync(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        if (DataID != 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            _sqlSugar.RollbackTran(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            return result = new Result() { Code = -1, Msg = "添加失败!" }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            _sqlSugar.CommitTran(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            return  new Result() { Code = 0, Msg = "添加成功!", Data = new { Id = id } }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        //添加到资料库 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        Res_InvitationOfficialActivityData res_InvitationData = new Res_InvitationOfficialActivityData(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        res_InvitationData.Country = ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        res_InvitationData.City = ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        res_InvitationData.UnitName = dto.Client; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        res_InvitationData.Delegation = dto.DiId.ToString(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        res_InvitationData.Address = dto.Address; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        res_InvitationData.CreateUserId = dto.CreateUserId; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        res_InvitationData.Contact = dto.Contact; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        res_InvitationData.Job = dto.Job; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        res_InvitationData.Tel = dto.Tel; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        Res_InvitationOfficialActivityData ifNullUp = await _sqlSugar.Queryable<Res_InvitationOfficialActivityData>().FirstAsync 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            (a => a.Country == res_InvitationData.Country && a.City == res_InvitationData.City && a.UnitName == res_InvitationData.UnitName && a.IsDel == 0 && a.Address == res_InvitationData.Address); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        if (ifNullUp == null) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        else 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            int DataID = await _sqlSugar.Insertable(res_InvitationData).ExecuteReturnIdentityAsync(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            if (DataID != 0) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                result = new Result() { Code = 0, Msg = "添加成功!" }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            else 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                                result = new Result() { Code = -1, Msg = "添加失败!" }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            _sqlSugar.RollbackTran(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            return  new Result() { Code = -1, Msg = "添加失败!" }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        _sqlSugar.CommitTran(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        return result = new Result() { Code = 0, Msg = "添加成功!", Data = new { Id = id } }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                else if (dto.Status == 2)//修改 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            else if (dto.Status == 2)//修改 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                bool res = await UpdateAsync(a => a.Id == dto.Id, a => new Res_OfficialActivities 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    bool res = await UpdateAsync(a => a.Id == dto.Id, a => new Res_OfficialActivities 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        Type = dto.Type, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        Client = dto.Client, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        Date = dto.Date, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        Time = dto.Time, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        Address = dto.Address, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        Contact = dto.Contact, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        Job = dto.Job, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        Tel = dto.Tel, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        OfficialForm = dto.OfficialForm, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        Setting = dto.Setting, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        Dresscode = dto.Dresscode, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        Attendees = dto.Attendees, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        IsNeedTrans = dto.IsNeedTrans, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        Translators = dto.Translators, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        language = dto.language, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        Trip = dto.Trip, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        CreateUserId = dto.CreateUserId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        Remark = dto.Remark, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    if (!res) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        return result = new Result() { Code = -1, Msg = "修改失败!" }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    return result = new Result() { Code = 0, Msg = "修改成功!", Data = new { Id = dto.Id } }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                else 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    Country = dto.Country, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    Area = dto.Area, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    Type = dto.Type, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    Client = dto.Client, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    Date = dto.Date, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    Time = dto.Time, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    Address = dto.Address, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    Contact = dto.Contact, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    Job = dto.Job, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    Tel = dto.Tel, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    OfficialForm = dto.OfficialForm, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    Field = dto.Field, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    ReqSample = dto.ReqSample, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    Setting = dto.Setting, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    Dresscode = dto.Dresscode, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    Attendees = dto.Attendees, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    IsNeedTrans = dto.IsNeedTrans, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    Translators = dto.Translators, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    language = dto.language, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    Trip = dto.Trip, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    CreateUserId = dto.CreateUserId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    Remark = dto.Remark, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (!res) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    return result = new Result() { Code = -1, Msg = "请传入Status参数,1添加 2修改!" }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    return result = new Result() { Code = -1, Msg = "修改失败!" }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                return result = new Result() { Code = 0, Msg = "修改成功!", Data = new { Id = dto.Id } }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            catch (Exception ex) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            else 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                return new Result() { Code = -1, Msg = "请传入Status参数,1添加 2修改!" }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return result; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        public async Task<Result> PostReqReqSampleTips(string country, string Area,string client) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (string.IsNullOrEmpty(country)) return new Result() { Code = -1, Msg = "国家为空!" }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            string sqlWhere = string.Empty; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (!string.IsNullOrEmpty(Area)) sqlWhere = string.Format(@$" And oa.Area Like '%{Area}%'"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (!string.IsNullOrEmpty(client)) sqlWhere = string.Format(@$" And oa.Client Like '%{client}%'"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            string sql = string.Format(@$"Select di.TeamName,oa.Id,oa.Country,oa.Area,oa.Client,oa.ReqSample  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                          From Res_OfficialActivities oa With(NoLock) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                          Left Join Grp_DelegationInfo di On oa.DiId = di.Id  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                          Where oa.IsDel = 0 And oa.Country='{country}' {sqlWhere}"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //ReqReqSampleTipsView 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            var _views = await _sqlSugar.SqlQueryable< ReqReqSampleTipsView >(sql).ToListAsync(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (_views.Count > 0 ) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                return result = new Result() { Code = -2, Msg = "程序错误!" }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                return new Result() { Code = 0, Msg = "操作成功!", Data = _views }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            return new Result() { Code = -1, Msg = "暂无相关数据!" }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 } 
			 |