@@ -1006,7 +1006,43 @@ namespace OASystem.API.Controllers
return Ok(insertCount);
}
+ [HttpPost]
+ public IActionResult InsertDataChen()
+ {
+ string sql = @"SELECT * FROM Crm_NewClientData cncd WHERE IsDel = 0
+ AND Lvlid in (
+ select Id from Sys_SetData where STid = 33 and isdel = 0
+ and (Name like '%重庆%')
+ )";
+
+ var list = _sqlSugar.SqlQueryable<Crm_NewClientData>(sql).Select(x => x.Id).ToList();
+ var toUserList = new List<Crm_ClientDataAndUser>();
+ foreach (var item in list)
+ toUserList.Add(new Crm_ClientDataAndUser
+ CreateTime = DateTime.Now,
+ CreateUserId = 235,
+ NewClientDataId = item,
+ usersId = 359,
+ IsDel = 0,
+ });
+ }
+ var updateCount = 0;
+ if (toUserList.Count == 259)
+ updateCount = _sqlSugar.Insertable(toUserList).ExecuteCommand();
+ return Ok(new
+ updateCount
#endregion
@@ -1389,7 +1389,7 @@ namespace OASystem.Infrastructure.Repositories.CRM
var userArr = _sqlSugar.SqlQueryable<Sys_Users>(sql).ToList();
var dic = new Dictionary<int, int[]>()
{
- { 95, new int []{ 95 , 337 , 302, 350, 355, 357, 353 } }
+ { 95, new int []{ 95 , 337 , 302, 350, 355, 357, 353 , 359 , 361 } }
};
if (dic.Keys.Contains(userid))