Преглед на файлове

【增加】普通教师请假归档提醒;

金隅分支
dyy преди 3 години
родител
ревизия
01bfa866bd
променени са 11 файла, в които са добавени 230 реда и са изтрити 4 реда
  1. +13
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFProcessController.cs
  2. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/LeaveFiling.cshtml
  3. +27
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/LeaveFiling.js
  4. +6
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs
  5. +4
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault.cshtml
  6. +10
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault/index.css
  7. +11
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault/index.js
  8. +47
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/StudentLeave/StudentLeaveBLL.cs
  9. +6
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/StudentLeave/StudentLeaveEntity.cs
  10. +14
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/StudentLeave/StudentLeaveIBLL.cs
  11. +91
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/StudentLeave/StudentLeaveService.cs

+ 13
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFProcessController.cs Целия файл

@@ -472,6 +472,19 @@ namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers
nWFProcessIBLL.DeleteEntity(processId);
return Success("删除成功");
}

/// <summary>
/// 普通教师请假归档
/// </summary>
/// <param name="keyValue">请假主键</param>
[HttpPost]
[AjaxOnly]
public ActionResult DoFileStudentLeave(string keyValue)
{
studentLeaveIBLL.DoFile(keyValue);
return Success("归档成功");
}

#endregion

#region 流程API


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/LeaveFiling.cshtml Целия файл

@@ -40,6 +40,7 @@
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_eye" class="btn btn-default"><i class="fa fa-eye"></i>&nbsp;<span class="lrlg">查看</span></a>
<a id="lr_file" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;<span class="lrlg">归档</span></a>
</div>
</div>
</div>


+ 27
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/LeaveFiling.js Целия файл

@@ -65,6 +65,24 @@ var bootstrap = function ($, learun) {
$('#lr_eye').on('click', function () {
page.eye();
});
// 归档
$('#lr_file').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('SLId');
if (learun.checkrow(keyValue)) {
var FileStatus = $('#gridtable').jfGridValue('FileStatus');
if (FileStatus == 1) {
learun.alert.warning("当前项已归档!");
return false;
}
learun.layerConfirm('是否确认归档该项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/DoFileStudentLeave', { keyValue: keyValue }, function () {
page.search();
});
}
});
}
});
},
initleft: function () {
$('#lr_left_list li').on('click', function () {
@@ -158,6 +176,15 @@ var bootstrap = function ($, learun) {
}
},
{ label: '请假事由', name: 'F_Description', width: 80, align: "left" },
{
label: '归档状态', name: 'FileStatus', width: 80, align: "left", formatter: function (cellvalue) {
if (cellvalue == 1) {
return "<span class=\"label label-success\">已归档</span>";
} else {
return "<span class=\"label label-warning\">未归档</span>";
}
}
},
],
mainId: 'SLId',
isPage: true,


+ 6
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs Целия файл

@@ -17,6 +17,7 @@ using Learun.Application.OA;
using Learun.Application.TwoDevelopment.LR_Desktop;
using Learun.Application.TwoDevelopment.Permission;
using Learun.Application.WorkFlow;
using Learun.Application.TwoDevelopment.LR_LGManager;

namespace Learun.Application.Web.Controllers
{
@@ -58,6 +59,7 @@ namespace Learun.Application.Web.Controllers
private Perm_FunctionIBLL perm_FunctionIBLL = new Perm_FunctionBLL();
private ICache redisCache = CacheFactory.CaChe();
private Sys_DefaultPwdConfigIBLL sys_DefaultPwdConfigIBLL = new Sys_DefaultPwdConfigBLL();
private StudentLeaveIBLL studentLeaveIBLL = new StudentLeaveBLL();
#region 视图功能

public ActionResult ChangePwd()
@@ -489,8 +491,11 @@ namespace Learun.Application.Web.Controllers
ViewBag.UnreadNews = outnewslist.Count(m => !readnewslist.Contains(m.F_NewsId));
paginationobj.sidx = "SendTime";
ViewBag.UnreadFile = sys_ReceiveFileIBLL.GetPageListBySenderId(userinfo.userId).Count();
//普通教师请假-未归档数
ViewBag.UnfileLeave = studentLeaveIBLL.GetListWithProcess("{\"F_IsFinished\":\"1\",\"F_CreateUserName\":\"" + userinfo.userId + "\"}").Where(x => x.FileStatus != "1").Count();

ViewBag.UnreadNum = ViewBag.UnreadFile + ViewBag.UnreadNews + ViewBag.UnreadTask + ViewBag.UnreadMail;

ViewBag.UnreadNum = ViewBag.UnreadFile + ViewBag.UnreadNews + ViewBag.UnreadTask + ViewBag.UnreadMail + ViewBag.UnfileLeave;
#endregion




+ 4
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault.cshtml Целия файл

@@ -30,7 +30,7 @@
</ul></div>*@
<div class="lr-im-bell2" title="消息中心2">
<a href="javascript:void(0);" class="dropdown-toggle" data-toggle="dropdown">
<span class="point" style="display:none;"></span>
<span class="point" @(ViewBag.UnreadNum <= 0 ? "style=display:none;" : "")></span>
<i style="font-size: 20px" class="fa fa-bell"></i>
</a>
<ul class="dropdown-menu pull-right">
@@ -39,8 +39,9 @@
<li><a href="javascript:void(0);" id="btn_tonggao"><i class="fa fa-paper-plane"></i>通告 @ViewBag.UnreadNews 条</a></li>
<li><a href="javascript:void(0);" id="btn_gongwen"><i class="fa fa-tag"></i>公文 @ViewBag.UnreadFile 条</a></li>
@*<li><a href="javascript:void(0);" id="btn_gongwen1"><i class="fa fa-quora"></i>未完成作业 2 条</a></li>
<li><a href="javascript:void(0);" id="btn_gongwen2"><i class="fa fa-anchor"></i>未批改作业 1 条</a></li>
<li><a href="javascript:void(0);" id="btn_gongwen3"><i class="fa fa-balance-scale"></i>备课任务 0 条</a></li>*@
<li><a href="javascript:void(0);" id="btn_gongwen2"><i class="fa fa-anchor"></i>未批改作业 1 条</a></li>
<li><a href="javascript:void(0);" id="btn_gongwen3"><i class="fa fa-balance-scale"></i>备课任务 0 条</a></li>*@
<li><a href="javascript:void(0);" id="btn_studentleave"><i class="fa fa-tag"></i>教师请假归档 @ViewBag.UnfileLeave 条</a></li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;共 @ViewBag.UnreadNum 条</li>
</ul>
</div>


+ 10
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault/index.css Целия файл

@@ -845,3 +845,13 @@
cursor: pointer;
z-index: 51;
}

.lr-im-bell2 .point {
background: #D71012;
position: absolute;
right: 9px;
top: 6px;
width: 8px;
height: 8px;
border-radius: 50%
}

+ 11
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Home/AdminDefault/index.js Целия файл

@@ -636,6 +636,17 @@ var bootstrap = function ($, learun) {
});
});

//教师请假归档
$("#btn_studentleave").on('click',
function () {
learun.frameTab.open({
F_ModuleId: '105',
F_Icon: 'fa fa-user',
F_FullName: '普通教师请假归档',
F_UrlAddress: '/LR_NewWorkFlow/NWFProcess/LeaveFiling'
});
});

// 打开关闭聊天窗
$('.lr-im-bell').off('click').on('click', function () {
var $this = $(this);


+ 47
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/StudentLeave/StudentLeaveBLL.cs Целия файл

@@ -67,6 +67,31 @@ namespace Learun.Application.TwoDevelopment.LR_LGManager
}
}

/// <summary>
/// 获取列表分页数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">条件参数</param>
/// <returns></returns>
public IEnumerable<StudentLeaveEntity> GetListWithProcess(string queryJson)
{
try
{
return studentLeaveService.GetListWithProcess(queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取实体数据
/// </summary>
@@ -142,6 +167,28 @@ namespace Learun.Application.TwoDevelopment.LR_LGManager
}
}

/// <summary>
/// 归档
/// </summary>
/// <param name="keyValue">主键</param>
public void DoFile(string keyValue)
{
try
{
studentLeaveService.DoFile(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

}


+ 6
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/StudentLeave/StudentLeaveEntity.cs Целия файл

@@ -104,6 +104,12 @@ namespace Learun.Application.TwoDevelopment.LR_LGManager
/// <returns></returns>
[Column("LEAVEDAY")]
public string LeaveDay { get; set; }
/// <summary>
/// 归档状态(1已归档)
/// </summary>
/// <returns></returns>
[Column("FILESTATUS")]
public string FileStatus { get; set; }
#endregion

#region 扩展操作


+ 14
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/StudentLeave/StudentLeaveIBLL.cs Целия файл

@@ -28,6 +28,14 @@ namespace Learun.Application.TwoDevelopment.LR_LGManager
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<StudentLeaveEntity> GetPageList(Pagination pagination, string queryJson);

/// <summary>
/// 获取列表分页数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">条件参数</param>
/// <returns></returns>
IEnumerable<StudentLeaveEntity> GetListWithProcess(string queryJson);
/// <summary>
/// 获取实体数据
/// </summary>
@@ -49,6 +57,12 @@ namespace Learun.Application.TwoDevelopment.LR_LGManager
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, StudentLeaveEntity entity);

/// <summary>
/// 归档
/// </summary>
/// <param name="keyValue">主键</param>
void DoFile(string keyValue);
#endregion

}


+ 91
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_LGManager/StudentLeave/StudentLeaveService.cs Целия файл

@@ -148,6 +148,74 @@ namespace Learun.Application.TwoDevelopment.LR_LGManager
}
}

/// <summary>
/// 获取列表分页数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">条件参数</param>
/// <returns></returns>
public IEnumerable<StudentLeaveEntity> GetListWithProcess(string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT t.* ");
strSql.Append(" FROM StudentLeave t left join LR_NWF_Process p on t.SLId=p.F_Id where p.F_EnabledMark!=2 and p.F_IsChild=0 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["F_IsFinished"].IsEmpty())
{
dp.Add("F_IsFinished", queryParam["F_IsFinished"].ToString(), DbType.String);
strSql.Append(" and p.F_IsFinished=@F_IsFinished ");
}
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty())
{
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime);
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime);
strSql.Append(" AND ( t.F_CreateDate >= @startTime AND t.F_CreateDate <= @endTime ) ");
}
if (!queryParam["F_CreateUserName"].IsEmpty())
{
var arr = queryParam["F_CreateUserName"].ToString().Split(',');
var arrtemp = "";
foreach (var item in arr)
{
arrtemp += $"'{item}',";
}
arrtemp = arrtemp.TrimEnd(',');
strSql.Append($" and t.F_CreateUserName in ({arrtemp}) ");
}
if (!queryParam["F_BuMen"].IsEmpty())
{
dp.Add("F_BuMen", queryParam["F_BuMen"].ToString(), DbType.String);
strSql.Append(" and t.F_BuMen=@F_BuMen ");
}
if (!queryParam["F_QJType"].IsEmpty())
{
dp.Add("F_QJType", queryParam["F_QJType"].ToString(), DbType.String);
strSql.Append(" and t.F_QJType=@F_QJType ");
}
if (!queryParam["F_Description"].IsEmpty())
{
dp.Add("F_Description", "%" + queryParam["F_Description"].ToString() + "%", DbType.String);
strSql.Append(" and t.F_Description like @F_Description ");
}
return this.BaseRepository().FindList<StudentLeaveEntity>(strSql.ToString(), dp);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取实体数据
/// </summary>
@@ -232,6 +300,29 @@ namespace Learun.Application.TwoDevelopment.LR_LGManager
}
}

/// <summary>
/// 归档
/// </summary>
/// <param name="keyValue">主键</param>
public void DoFile(string keyValue)
{
try
{
this.BaseRepository().ExecuteBySql("update StudentLeave set FileStatus='1' where SLId='" + keyValue + "' ");
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

}


Зареждане…
Отказ
Запис