|
@@ -339,6 +339,19 @@ namespace OASystem.Infrastructure.Repositories.CRM
|
|
|
}
|
|
|
else if (dto.PortType == 2)
|
|
|
{
|
|
|
+
|
|
|
+ foreach (var item in NewClientDataView)
|
|
|
+ {
|
|
|
+ List<AscribedUser> AscribedUser = await _sqlSugar.SqlQueryable<AscribedUser>
|
|
|
+ ("select u1.UsersId as UserId ,u2.CnName,u1.NewClientDataId from Crm_ClientDataAndUser u1,Sys_Users u2 where u1.UsersId=u2.Id and NewClientDataId=" + item.Id + " AND u1.ISDEL = 0").ToListAsync();
|
|
|
+ item.AscribedUser = AscribedUser.Select(x=> x.UserId);
|
|
|
+
|
|
|
+ List<AscribedDepartment> AscribedDepartment = await _sqlSugar.SqlQueryable<AscribedDepartment>
|
|
|
+ ("select d2.Id,d2.Name,d1.NewClientDataId from Crm_ClientDataAndBusiness d1,Sys_SetData d2 where d1.SetDataId=d2.Id and NewClientDataId=" + item.Id + " AND d1.ISDEL = 0").ToListAsync();
|
|
|
+ item.AscribedDepartment = AscribedDepartment.Select(x => x.Id);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
result = new Result()
|
|
|
{
|
|
|
Code = 0,
|