|
@@ -493,64 +493,56 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
{
|
|
|
Result result = new Result() { Code = -2, Msg = "未知错误" };
|
|
|
|
|
|
- try
|
|
|
+ if (dto.PortType == 1 || dto.PortType == 2 || dto.PortType == 3) //web
|
|
|
{
|
|
|
- if (dto.PortType == 1 || dto.PortType == 2 || dto.PortType == 3) //web
|
|
|
+ dynamic? teamTypeData1 = null;
|
|
|
+ string teamTypeSql = string.Format(@"Select Id,Name From Sys_SetData Where STid = {0} And IsDel = {1}", 10, 0);
|
|
|
+ var teamTypeData = await _sqlSugar.SqlQueryable<SetDataInfoView>(teamTypeSql).ToListAsync(); ; //团组分类 10
|
|
|
+ if (teamTypeData.Any())
|
|
|
{
|
|
|
- dynamic? teamTypeData1 = null;
|
|
|
- string teamTypeSql = string.Format(@"Select Id,Name From Sys_SetData Where STid = {0} And IsDel = {1}", 10, 0);
|
|
|
- var teamTypeData = await _sqlSugar.SqlQueryable<SetDataInfoView>(teamTypeSql).ToListAsync(); ; //团组分类 10
|
|
|
- if (teamTypeData.Count > 0)
|
|
|
- {
|
|
|
- teamTypeData1 = teamTypeData;
|
|
|
- }
|
|
|
-
|
|
|
- dynamic? teamLevData1 = null;
|
|
|
- string teamLevSql = string.Format(@"Select Id,Name From Sys_SetData Where STid = {0} And IsDel = {1}", 56, 0);
|
|
|
- var teamLevData = await _sqlSugar.SqlQueryable<SetDataInfoView>(teamLevSql).ToListAsync(); ; //团组等级 56
|
|
|
- if (teamLevData.Count > 0)
|
|
|
- {
|
|
|
- teamLevData1 = teamLevData;
|
|
|
- }
|
|
|
+ teamTypeData1 = teamTypeData;
|
|
|
+ }
|
|
|
|
|
|
- dynamic? userData1 = null;
|
|
|
- string userSql = string.Format(@"Select Id,CnName From Sys_Users Where IsDel = {0}", 0);
|
|
|
- var userData = await _sqlSugar.SqlQueryable<UserNameView>(userSql).ToListAsync();
|
|
|
- if (userData.Count > 0)
|
|
|
- {
|
|
|
- userData1 = userData;
|
|
|
- }
|
|
|
+ dynamic? teamLevData1 = null;
|
|
|
+ string teamLevSql = string.Format(@"Select Id,Name From Sys_SetData Where STid = {0} And IsDel = {1}", 56, 0);
|
|
|
+ var teamLevData = await _sqlSugar.SqlQueryable<SetDataInfoView>(teamLevSql).ToListAsync(); ; //团组等级 56
|
|
|
+ if (teamLevData.Any())
|
|
|
+ {
|
|
|
+ teamLevData1 = teamLevData;
|
|
|
+ }
|
|
|
|
|
|
- //客户单位数据源 来源市场客户资料
|
|
|
- dynamic? clientData1 = null;
|
|
|
- string clientSql = $@"Select Client,Contact,Telephone,WeChat From Crm_NewClientData Where IsDel = 0";
|
|
|
- var clientData = await _sqlSugar.SqlQueryable<Crm_NewClientData>(clientSql).ToListAsync();
|
|
|
- if (clientData.Count > 0)
|
|
|
- {
|
|
|
- clientData1 = clientData.Select(it => new
|
|
|
- {
|
|
|
- Client = AesEncryptionHelper.Decrypt(it.Client),
|
|
|
- Contact = AesEncryptionHelper.Decrypt(it.Contact),
|
|
|
- Telephone = AesEncryptionHelper.Decrypt(it.Telephone),
|
|
|
- Wechat = AesEncryptionHelper.Decrypt(it.Wechat)
|
|
|
- }).ToList();
|
|
|
- }
|
|
|
+ dynamic? userData1 = null;
|
|
|
+ string userSql = string.Format(@"Select Id,CnName From Sys_Users Where IsDel = {0}", 0);
|
|
|
+ var userData = await _sqlSugar.SqlQueryable<UserNameView>(userSql).ToListAsync();
|
|
|
+ if (userData.Any())
|
|
|
+ {
|
|
|
+ userData1 = userData;
|
|
|
+ }
|
|
|
|
|
|
- result.Code = 0;
|
|
|
- result.Msg = "成功!";
|
|
|
- result.Data = new
|
|
|
+ //客户单位数据源 来源市场客户资料
|
|
|
+ dynamic? clientData1 = null;
|
|
|
+ string clientSql = $@"Select Client,Contact,Telephone,WeChat From Crm_NewClientData Where IsDel = 0";
|
|
|
+ var clientData = await _sqlSugar.SqlQueryable<Crm_NewClientData>(clientSql).ToListAsync();
|
|
|
+ if (clientData.Any())
|
|
|
+ {
|
|
|
+ clientData1 = clientData.Select(it => new
|
|
|
{
|
|
|
- teamTypeData = teamTypeData1,
|
|
|
- teamLevData = teamLevData1,
|
|
|
- userData = userData1,
|
|
|
- clientData = clientData1
|
|
|
- };
|
|
|
+ Client = AesEncryptionHelper.Decrypt(it.Client),
|
|
|
+ Contact = AesEncryptionHelper.Decrypt(it.Contact),
|
|
|
+ Telephone = AesEncryptionHelper.Decrypt(it.Telephone),
|
|
|
+ Wechat = AesEncryptionHelper.Decrypt(it.Wechat)
|
|
|
+ }).ToList();
|
|
|
}
|
|
|
- }
|
|
|
- catch (Exception ex)
|
|
|
- {
|
|
|
|
|
|
- result.Msg = ex.Message;
|
|
|
+ result.Code = 0;
|
|
|
+ result.Msg = "成功!";
|
|
|
+ result.Data = new
|
|
|
+ {
|
|
|
+ teamTypeData = teamTypeData1,
|
|
|
+ teamLevData = teamLevData1,
|
|
|
+ userData = userData1,
|
|
|
+ clientData = clientData1
|
|
|
+ };
|
|
|
}
|
|
|
|
|
|
|