瀏覽代碼

修复训练模块

新疆体育高职分支
hwh2023 1 年之前
父節點
當前提交
566bdae5f9
共有 4 個檔案被更改,包括 49 行新增81 行删除
  1. +15
    -26
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Controllers/Notice_TrainTeamController.cs
  2. +16
    -27
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Controllers/Notice_Train_CoachController.cs
  3. +15
    -26
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Controllers/Notice_Train_SportsController.cs
  4. +3
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Notice_Train_Sports/Notice_Train_SportsService.cs

+ 15
- 26
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Controllers/Notice_TrainTeamController.cs 查看文件

@@ -275,19 +275,6 @@ namespace Learun.Application.Web.Areas.Ask.Controllers
{
var departteacherlist = allteacherlist.Where(m => entity.Noticedept == m.F_DepartmentId);
needpostuserlist.AddRange(departteacherlist.ToList());
if (!string.IsNullOrEmpty(entity.Noticepeople))
{
var newpostuserlist = new List<UserEntity>();
foreach (var uuitem in needpostuserlist)
{
var postids = userralationlist?.Count(m => m.F_UserId == uuitem.F_UserId && entity.Noticepeople.Contains(m.F_ObjectId));
if (postids > 0)
{
newpostuserlist.Add(uuitem);
}
}
needpostuserlist = newpostuserlist;
}
}
else
{
@@ -295,22 +282,24 @@ namespace Learun.Application.Web.Areas.Ask.Controllers
{
var departteacherlist = allteacherlist.Where(m => senddeptid == m.F_DepartmentId);
needpostuserlist.AddRange(departteacherlist.ToList());
if (!string.IsNullOrEmpty(entity.Noticepeople))
{
var newpostuserlist = new List<UserEntity>();
foreach (var uuitem in needpostuserlist)
{
var postids = userralationlist?.Count(m => m.F_UserId == uuitem.F_UserId && entity.Noticepeople.Contains(m.F_ObjectId));
if (postids > 0)
{
newpostuserlist.Add(uuitem);
}
}
needpostuserlist = newpostuserlist;
}
}
}
}

if (!string.IsNullOrEmpty(entity.Noticepeople))
{
var newpostuserlist = new List<UserEntity>();
string[] strs = entity.Noticepeople.Split(',');
foreach (var uuitem in strs)
{
var postids = allteacherlist.Where(m => m.F_UserId == uuitem).FirstOrDefault();
if (postids != null)
{
newpostuserlist.Add(postids);
}
}
needpostuserlist = newpostuserlist;
}
PushWeixin(needpostuserlist, entity.T_title);

//消息提醒表


+ 16
- 27
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Controllers/Notice_Train_CoachController.cs 查看文件

@@ -163,19 +163,6 @@ namespace Learun.Application.Web.Areas.Ask.Controllers
{
var departteacherlist = allteacherlist.Where(m => entity.Noticedept == m.F_DepartmentId);
needpostuserlist.AddRange(departteacherlist.ToList());
if (!string.IsNullOrEmpty(entity.Noticepeople))
{
var newpostuserlist = new List<UserEntity>();
foreach (var uuitem in needpostuserlist)
{
var postids = userralationlist?.Count(m => m.F_UserId == uuitem.F_UserId && entity.Noticepeople.Contains(m.F_ObjectId));
if (postids > 0)
{
newpostuserlist.Add(uuitem);
}
}
needpostuserlist = newpostuserlist;
}
}
else
{
@@ -183,22 +170,24 @@ namespace Learun.Application.Web.Areas.Ask.Controllers
{
var departteacherlist = allteacherlist.Where(m => senddeptid == m.F_DepartmentId);
needpostuserlist.AddRange(departteacherlist.ToList());
if (!string.IsNullOrEmpty(entity.Noticepeople))
{
var newpostuserlist = new List<UserEntity>();
foreach (var uuitem in needpostuserlist)
{
var postids = userralationlist?.Count(m => m.F_UserId == uuitem.F_UserId && entity.Noticepeople.Contains(m.F_ObjectId));
if (postids > 0)
{
newpostuserlist.Add(uuitem);
}
}
needpostuserlist = newpostuserlist;
}
}
}
}

if (!string.IsNullOrEmpty(entity.Noticepeople))
{
var newpostuserlist = new List<UserEntity>();
string[] strs = entity.Noticepeople.Split(',');
foreach (var uuitem in strs)
{
var postids = allteacherlist.Where(m => m.F_UserId == uuitem).FirstOrDefault();
if (postids !=null)
{
newpostuserlist.Add(postids);
}
}
needpostuserlist = newpostuserlist;
}
PushWeixin(needpostuserlist, entity.T_title);

//消息提醒表
@@ -285,7 +274,7 @@ namespace Learun.Application.Web.Areas.Ask.Controllers
entity.TheTitle = "通知公告";
entity.TheContent = model.T_title;
entity.InstanceId = model.T_id;
entity.ConnectionUrl = "/Utility/ListContentIndex?id=";
entity.ConnectionUrl = "/Ask/Notice_Train_Sports/ListContentIndex?id=";
entity.SendTime = DateTime.Now;
entity.ReadSigns = false;
messageRindIBLL.SaveEntity("", entity);


+ 15
- 26
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Controllers/Notice_Train_SportsController.cs 查看文件

@@ -275,19 +275,6 @@ namespace Learun.Application.Web.Areas.Ask.Controllers
{
var departteacherlist = allteacherlist.Where(m => entity.Noticedept == m.F_DepartmentId);
needpostuserlist.AddRange(departteacherlist.ToList());
if (!string.IsNullOrEmpty(entity.Noticepeople))
{
var newpostuserlist = new List<UserEntity>();
foreach (var uuitem in needpostuserlist)
{
var postids = userralationlist?.Count(m => m.F_UserId == uuitem.F_UserId && entity.Noticepeople.Contains(m.F_ObjectId));
if (postids > 0)
{
newpostuserlist.Add(uuitem);
}
}
needpostuserlist = newpostuserlist;
}
}
else
{
@@ -295,22 +282,24 @@ namespace Learun.Application.Web.Areas.Ask.Controllers
{
var departteacherlist = allteacherlist.Where(m => senddeptid == m.F_DepartmentId);
needpostuserlist.AddRange(departteacherlist.ToList());
if (!string.IsNullOrEmpty(entity.Noticepeople))
{
var newpostuserlist = new List<UserEntity>();
foreach (var uuitem in needpostuserlist)
{
var postids = userralationlist?.Count(m => m.F_UserId == uuitem.F_UserId && entity.Noticepeople.Contains(m.F_ObjectId));
if (postids > 0)
{
newpostuserlist.Add(uuitem);
}
}
needpostuserlist = newpostuserlist;
}
}
}
}

if (!string.IsNullOrEmpty(entity.Noticepeople))
{
var newpostuserlist = new List<UserEntity>();
string[] strs = entity.Noticepeople.Split(',');
foreach (var uuitem in strs)
{
var postids = allteacherlist.Where(m => m.F_UserId == uuitem).FirstOrDefault();
if (postids != null)
{
newpostuserlist.Add(postids);
}
}
needpostuserlist = newpostuserlist;
}
PushWeixin(needpostuserlist, entity.T_title);

//消息提醒表


+ 3
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Notice_Train_Sports/Notice_Train_SportsService.cs 查看文件

@@ -250,7 +250,7 @@ namespace Learun.Application.TwoDevelopment.Ask
strSql.Append(" left join NoticeLog_Train_Sports r on t.T_id = r.NewsId and r.RUserId =@userId ");
strSql.Append(" left join adms7ultimate2_新疆体育.dbo.lr_base_user u on u.F_UserId =@userId ");
strSql.Append(" left join adms7ultimate2_新疆体育.dbo.LR_BASE_DEPARTMENT d on d.F_DepartmentId = t.Noticedept ");
strSql.Append(" WHERE ");
strSql.Append(" WHERE 1=1 ");
//去掉用户入职时间条件
//if (userinfo.account.Contains("20"))
//{
@@ -260,8 +260,9 @@ namespace Learun.Application.TwoDevelopment.Ask
//strSql.Append($@" and (((t.F_SendDeptId is null or len(t.F_SendDeptId)=0) and (t.F_SendPostId is null or len(t.F_SendPostId)=0))");
if (!string.IsNullOrEmpty(deptId))
{
strSql.Append($" t.Noticedept like '%{deptId}%'");
strSql.Append($" and (t.Noticedept like '%{deptId}%' or t.Noticepeople like '%{userId}%')");
}
//strSql.Append($" ");
//if (!string.IsNullOrEmpty(postIds))
//{
// strSql.Append(" or (t.F_SendPostId is not null and ");


Loading…
取消
儲存