Browse Source

更改新客户资料表dto字段属性

wangh 1 year ago
parent
commit
5d58668353

+ 2 - 15
OASystem/OASystem.Domain/Dtos/CRM/NewClientDataQueryDto.cs

@@ -28,29 +28,16 @@ namespace OASystem.Domain.Dtos.CRM
         /// <summary>
         /// 负责人
         /// </summary>
-        public int Userid { get; set; }
-        
-        //省域
-
-        //单独负责的客户 (只看老张的)
-
-        /// <summary>
-        /// 权重
-        /// </summary>
-        //public char Weight { get; set; }
-
-
+        public string Userid { get; set; }
         /// <summary>
         /// 客户级别(地市州)
         /// </summary>
         public int Lvlid { get; set; }
 
-        //客户类别
-
         /// <summary>
         /// 业务分类
         /// </summary>
-        public int Business { get; set; }
+        public string Business { get; set; }
 
         public class NewClientOpDto
         {

+ 4 - 4
OASystem/OASystem.Infrastructure/Repositories/CRM/NewClientDataRepository.cs

@@ -42,7 +42,7 @@ namespace OASystem.Infrastructure.Repositories.CRM
                     List<int> NewClientDataId1= new List<int>();
                     List<int> NewClientDataId2 = new List<int>();
                     string NewClientDataId = "";
-                    if (dto.Userid != 0)
+                    if (!string.IsNullOrWhiteSpace(dto.Userid))
                     {
                         string sql = string.Format(@"select u1.UsersId,u2.CnName,u1.NewClientDataId from Crm_ClientDataAndUser u1,Sys_Users u2 where u1.UsersId=u2.Id and u1.UsersId in ({0})", dto.Userid);
                         List<AscribedUser> ascribedUsers = await _sqlSugar.SqlQueryable<AscribedUser>(sql).ToListAsync();
@@ -61,7 +61,7 @@ namespace OASystem.Infrastructure.Repositories.CRM
                             result = new Result() { Code = -1, Msg = "暂无数据" };
                         }
                     }
-                    if (dto.Business != 0)
+                    if (!string.IsNullOrWhiteSpace(dto.Business))
                     {
                         string sql = string.Format(@"select d1.*,d2.Name from Crm_ClientDataAndBusiness d1,Sys_SetData d2 where d1.SetDataId=d2.Id and d1.SetDataId in ({0})", dto.Business);
                         List<AscribedDepartment> AscribedDepartment = await _sqlSugar.SqlQueryable<AscribedDepartment>(sql).ToListAsync();
@@ -258,7 +258,7 @@ namespace OASystem.Infrastructure.Repositories.CRM
                     List<int> NewClientDataId1 = new List<int>();
                     List<int> NewClientDataId2 = new List<int>();
                     string NewClientDataId = "";
-                    if (dto.Userid != 0)
+                    if (!string.IsNullOrWhiteSpace(dto.Userid))
                     {
                         string sql = string.Format(@"select u1.UsersId,u2.CnName,u1.NewClientDataId from Crm_ClientDataAndUser u1,Sys_Users u2 where u1.UsersId=u2.Id and u1.UsersId in ({0})", dto.Userid);
                         List<AscribedUser> ascribedUsers = await _sqlSugar.SqlQueryable<AscribedUser>(sql).ToListAsync();
@@ -277,7 +277,7 @@ namespace OASystem.Infrastructure.Repositories.CRM
                             result = new Result() { Code = -1, Msg = "暂无数据" };
                         }
                     }
-                    if (dto.Business != 0)
+                    if (!string.IsNullOrWhiteSpace(dto.Business))
                     {
                         string sql = string.Format(@"select d1.*,d2.Name from Crm_ClientDataAndBusiness d1,Sys_SetData d2 where d1.SetDataId=d2.Id and d1.SetDataId in({0})", dto.Business);
                         List<AscribedDepartment> AscribedDepartment = await _sqlSugar.SqlQueryable<AscribedDepartment>(sql).ToListAsync();