Kaynağa Gözat

【修改】外勤教师不能接收查看通知公告;

塔里木分支
dyy 2 ay önce
ebeveyn
işleme
c5007f7c4c
6 değiştirilmiş dosya ile 62 ekleme ve 6 silme
  1. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.cshtml
  2. +14
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/DTListController.cs
  3. +13
    -1
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/DesktopApi.cs
  4. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Learun.Application.OA.csproj
  5. +11
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Notice/NoticeService.cs
  6. +18
    -3
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRindService.cs

+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/EmpInfo/Form.cshtml Dosyayı Görüntüle

@@ -139,8 +139,8 @@
<div class="lr-form-item-title lr-title">职业信息</div>
</div>
<div class="col-xs-12 lr-form-item" data-table="EmpInfo">
<div class="lr-form-item-title">员工状态</div>
<div id="IsInActiveStatus"></div>
<div class="lr-form-item-title">员工状态<font face="宋体">*</font></div>
<div id="IsInActiveStatus" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<div class="col-xs-4 lr-form-item" data-table="EmpInfo">
<div class="lr-form-item-title">职工编号<font face="宋体">*</font></div>


+ 14
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/DTListController.cs Dosyayı Görüntüle

@@ -6,6 +6,7 @@ using Learun.Util;
using System.Web.Mvc;
using System.Text;
using Learun.Application.WorkFlow;
using Learun.Application.TwoDevelopment.EducationalAdministration;

namespace Learun.Application.Web.Areas.LR_Desktop.Controllers
{
@@ -22,6 +23,7 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers
private DatabaseLinkIBLL databaseLinkIbll = new DatabaseLinkBLL();
private NWFProcessIBLL nWFProcessIBLL = new NWFProcessBLL();
private ThematicManagementIBLL thematicManagementIbll = new ThematicManagementBLL();
private EmpInfoIBLL empInfoIBLL = new EmpInfoBLL();
#region 视图功能

/// <summary>
@@ -193,6 +195,18 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers
{
dtListEntity.F_Sql = dtListEntity.F_Sql.Replace("@@@userId", "'" + loginUserInfo.userId + "'");
}

if (dtListEntity.F_Id == "88f94781-acb8-47ca-864b-f96e3d9b5587")//通知公告
{
if (loginUserInfo.Description == "教师")
{
var empinfo = empInfoIBLL.GetEmpInfoEntityByEmpNo(loginUserInfo.account);
if (empinfo != null && empinfo.IsInActiveStatus == "2")
{
dtListEntity.F_Sql = dtListEntity.F_Sql.Replace("F_NewsId is not null", "F_NewsId is null");
}
}
}
var reqDataTable = databaseLinkIbll.FindTable(dtListEntity.F_DataSourceId.Trim(), dtListEntity.F_Sql);
if (dtListEntity.F_Id == "88f94781-acb8-47ca-864b-f96e3d9b5587")
{


+ 13
- 1
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/DesktopApi.cs Dosyayı Görüntüle

@@ -8,6 +8,7 @@ using Learun.Application.TwoDevelopment.LR_Desktop;
using System.Text;
using System.Data;
using Learun.Application.WorkFlow;
using Learun.Application.TwoDevelopment.EducationalAdministration;

namespace Learun.Application.WebApi.Modules
{
@@ -30,6 +31,7 @@ namespace Learun.Application.WebApi.Modules
private DTChartIBLL dTChartIBLL = new DTChartBLL();
private DTImgIBLL dTImgIBLL = new DTImgBLL();
private NWFProcessIBLL nWFProcessIBLL = new NWFProcessBLL();
private EmpInfoIBLL empInfoIBLL = new EmpInfoBLL();

public Response GetList(dynamic _)
{
@@ -120,7 +122,17 @@ namespace Learun.Application.WebApi.Modules
dtListEntity.F_Sql = dtListEntity.F_Sql.Replace("MMM", strSql.ToString());
}


if (dtListEntity.F_Id == "88f94781-acb8-47ca-864b-f96e3d9b5587")//通知公告
{
if (loginUserInfo.Description == "教师")
{
var empinfo = empInfoIBLL.GetEmpInfoEntityByEmpNo(loginUserInfo.account);
if (empinfo != null && empinfo.IsInActiveStatus == "2")
{
dtListEntity.F_Sql = dtListEntity.F_Sql.Replace("F_NewsId is not null", "F_NewsId is null");
}
}
}
var reqDataTable = databaseLinkIbll.FindTable(dtListEntity.F_DataSourceId.Trim(), dtListEntity.F_Sql);
if (dtListEntity.F_Id == "88f94781-acb8-47ca-864b-f96e3d9b5587")
{


+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Learun.Application.OA.csproj Dosyayı Görüntüle

@@ -166,6 +166,10 @@
<Project>{0CDD0DC8-74CF-4C71-923C-66204A8923D3}</Project>
<Name>Learun.Application.Base</Name>
</ProjectReference>
<ProjectReference Include="..\Learun.Application.TwoDevelopment\Learun.Application.TwoDevelopment.csproj">
<Project>{56F9A112-FD96-4809-98F4-0D7C5DE0711B}</Project>
<Name>Learun.Application.TwoDevelopment</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Analyzer Include="..\..\..\packages\Microsoft.DependencyValidation.Analyzers.0.10.0\analyzers\dotnet\cs\Microsoft.DependencyValidation.Analyzers.resources.dll" />


+ 11
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Notice/NoticeService.cs Dosyayı Görüntüle

@@ -1,4 +1,5 @@
using Dapper;
using Learun.Application.TwoDevelopment.EducationalAdministration;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
@@ -395,6 +396,16 @@ SELECT ruserid from [dbo].[LR_OA_NewsShouldRead] where newsid='{news.F_NewsId}'
var userId = userinfo.userId;
var deptId = userinfo.departmentId;
var postIds = userinfo.postIds;

if (userinfo.Description == "教师")
{
var empinfo = this.BaseRepository("CollegeMIS").FindEntity<EmpInfoEntity>(x => x.EmpNo == userinfo.account);
if (empinfo != null && empinfo.IsInActiveStatus == "2")
{
return new List<NewsEntity>();
}
}

var strSql = new StringBuilder();
strSql.Append("SELECT t.*,r.RNewsId,r.RTime,d.F_FullName FROM LR_OA_News t ");
strSql.Append(" left join LR_OA_NewsRead r on t.F_NewsId = r.NewsId and r.RUserId=@userId ");


+ 18
- 3
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRindService.cs Dosyayı Görüntüle

@@ -71,6 +71,14 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
try
{
var userInfo = LoginUserInfo.Get();
if (userInfo.Description == "教师")
{
var empinfo = this.BaseRepository("CollegeMIS").FindEntity<EmpInfoEntity>(x => x.EmpNo == userInfo.account);
if (empinfo != null && empinfo.IsInActiveStatus == "2")
{
return new List<MessageRemindEntity>();
}
}
return this.BaseRepository().FindList<MessageRemindEntity>(x => x.ReadSigns == false && x.ReceiptId == userInfo.userId);
}
catch (Exception ex)
@@ -95,7 +103,14 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
try
{
var userInfo = LoginUserInfo.Get();

if (userInfo.Description == "教师")
{
var empinfo = this.BaseRepository("CollegeMIS").FindEntity<EmpInfoEntity>(x => x.EmpNo == userInfo.account);
if (empinfo != null && empinfo.IsInActiveStatus == "2")
{
return 0;
}
}
//string dbname = this.BaseRepository("CollegeMIS").getDbConnection().Database;


@@ -103,7 +118,7 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
string sql = "select count(1) from MessageRemind ";
sql += $" where ReadSigns=0 ";
sql += $" and ReceiptId='{userInfo.userId}'";

var obj = this.BaseRepository().FindObject(sql);
if (obj != null && Convert.ToInt32(obj) > 0)
@@ -287,7 +302,7 @@ where t.IsRead = 0 and [Description] = '学生' and a.[state] = 7 and t.Account
//获取对应的维修数据,判断是否已处理
var model = this.BaseRepository().FindEntity<MessageRemindEntity>(keyValue);
string status = "";
if (model.TheTitle=="维修通知")
if (model.TheTitle == "维修通知")
{
if (model.ConnectionUrl.Contains("RepairReportStudent"))
{


Yükleniyor…
İptal
Kaydet