瀏覽代碼

PostOfficialActivitiesReqReqSampleTips
怎加请求字段

leiy 1 年之前
父節點
當前提交
be2a0db011

+ 1 - 1
OASystem/OASystem.Api/Controllers/ResourceController.cs

@@ -1762,7 +1762,7 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
         public async Task<IActionResult> PostOfficialActivitiesReqReqSampleTips(PostOfficialActivitiesReqReqSampleTipsDto dto)
         {
-            var res = await _officialActivitiesRep.PostReqReqSampleTips(dto.country, dto.area);
+            var res = await _officialActivitiesRep.PostReqReqSampleTips(dto.country, dto.area,dto.client);
             if (res.Code == 0)
             {
                 return Ok(JsonView(true, "操作成功!", res.Data));

+ 3 - 0
OASystem/OASystem.Domain/Dtos/Resource/OfficialActivitiesDto.cs

@@ -155,6 +155,9 @@ namespace OASystem.Domain.Dtos.Resource
     public class PostOfficialActivitiesReqReqSampleTipsDto
     {
         public string country { get; set; }
+
         public string area { get; set; }
+
+        public string client { get; set; }
     }
 }

+ 4 - 1
OASystem/OASystem.Infrastructure/Repositories/Resource/OfficialActivitiesRepository.cs

@@ -281,13 +281,16 @@ namespace OASystem.Infrastructure.Repositories.Resource
             return result;
         }
 
-        public async Task<Result> PostReqReqSampleTips(string country, string Area)
+        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