Browse Source

1、团组预算/实际成本 --> 团组新增条件IsBid = 0
2、策划部供应商资料 --> List 新增查询类型(多个)

LEIYI 3 months ago
parent
commit
39ddcb2383

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

@@ -4185,7 +4185,7 @@ WHERE
         /// 策划部供应商资料
         /// 分页查询
         /// </summary>
-        /// <param name="id"></param>
+        /// <param name="dto"></param>
         /// <returns></returns>
         [HttpPost]
         [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]

+ 1 - 0
OASystem/OASystem.Api/Controllers/StatisticsController.cs

@@ -5039,6 +5039,7 @@ FROM
   Grp_DelegationInfo di
 WHERE
   di.IsDel = 0
+  AND di.IsBid = 0 
   AND di.TeamDid IN (38, 39, 40, 1048)
   AND di.VisitDate BETWEEN '{0}' AND '{1}'
 ", beginDt, endDt);

+ 6 - 0
OASystem/OASystem.Domain/Dtos/Resource/MediaSuppliersDto.cs

@@ -18,6 +18,12 @@ namespace OASystem.Domain.Dtos.Resource
 
     public class MediaSupplierPageItemDto : DtoBase
     {
+        /// <summary>
+        /// 供应商类型 多个
+        /// 1,2,3
+        /// </summary>
+        public string TypeLabel { get; set; }
+
         /// <summary>
         /// 搜索条件(联系人、单位、电话)
         /// </summary>

+ 16 - 0
OASystem/OASystem.Infrastructure/Repositories/Resource/MediaSuppliersRepository.cs

@@ -91,11 +91,27 @@ namespace OASystem.Infrastructure.Repositories.Resource
 
             if (!_portIds.Contains(dto.PortType)) { result.Msg = MsgTips.Port; return result; }
 
+
+            var typeLabel = new List<int>();
+            if (!string.IsNullOrEmpty(dto.TypeLabel))
+            {
+                typeLabel = dto.TypeLabel.Split(',')
+                               .Select(s =>
+                               {
+                                   int value = 0;
+                                   if (int.TryParse(s, out value)) return value;
+                                   return value;
+                               })
+                               .Where(i => i != 0)
+                               .ToList();
+            }
+
             var search = dto.Search;
             RefAsync<int> total = 0;
             var infos = await _sqlSugar.Queryable<Res_MediaSuppliers>()
                 .LeftJoin<Sys_Users>((ms, u) => ms.CreateUserId == u.Id)
                 .Where((ms, u) => ms.IsDel == 0)
+                .WhereIF(typeLabel.Count > 0 ,x=> typeLabel.Contains(x.TypeId))
                 .WhereIF(!string.IsNullOrEmpty(search), (ms, u) => ms.UnitName.Contains(search) || ms.Contact.Contains(search) || ms.Tel.Contains(search))
                 .OrderByDescending((ms, u) => ms.CreateTime)
                 .Select((ms, u) => new