edy hace 3 años
padre
commit
405c44c53d
Se han modificado 9 ficheros con 175 adiciones y 4 borrados
  1. +4
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Schedule/Form.cshtml
  2. +6
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Schedule/Form.js
  3. +35
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs
  4. +24
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Schedule/ScheduleBLL.cs
  5. +6
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Schedule/ScheduleIBLL.cs
  6. +24
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Schedule/ScheduleService.cs
  7. +25
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRindBLL.cs
  8. +8
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRindIBLL.cs
  9. +43
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRindService.cs

+ 4
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Schedule/Form.cshtml Ver fichero

@@ -6,7 +6,7 @@
<div class="lr-form-wrap" id="form">
<div class="col-xs-6 lr-form-item" data-table="LR_OA_Schedule">
<div class="lr-form-item-title">开始日期<font face="宋体">*</font></div>
<input id="F_StartDate" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy/MM/dd' })" isvalid="yes" checkexpession="NotNull" value="@Learun.Util.Time.GetToday("yyyy/MM/dd")" />
<input id="F_StartDate" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" isvalid="yes" checkexpession="NotNull" value="@Learun.Util.Time.GetToday("yyyy-MM-dd")" />
</div>
<div class="col-xs-6 lr-form-item" style="padding-left:60px;" data-table="LR_OA_Schedule">
<div class="lr-form-item-title" style="width: 60px;">时间</div>
@@ -65,7 +65,7 @@
</div>
<div class="col-xs-6 lr-form-item" data-table="LR_OA_Schedule">
<div class="lr-form-item-title">结束日期<font face="宋体">*</font></div>
<input id="F_EndDate" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy/MM/dd' })" isvalid="yes" checkexpession="NotNull" />
<input id="F_EndDate" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" style="padding-left:60px;" data-table="LR_OA_Schedule">
<div class="lr-form-item-title" style="width: 60px;">时间</div>
@@ -130,7 +130,7 @@
<div class="lr-form-item-title">日程内容<font face="宋体">*</font></div>
<textarea id="F_ScheduleContent" class="form-control" style="height:80px;" placeholder="记录你将要做的一件事..." isvalid="yes" checkexpession="NotNull" ></textarea>
</div>
<div class="col-xs-12 lr-form-item" data-table="LR_OA_Schedule">
@*<div class="col-xs-12 lr-form-item" data-table="LR_OA_Schedule">
<div class="checkbox">
<label>
<input id="F_IsMailAlert" type="checkbox" checked="checked">
@@ -145,7 +145,7 @@
手机提醒
</label>
</div>
</div>
</div>*@
</div>

@Html.AppendJsFile("/Areas/LR_OAModule/Views/Schedule/Form.js")

+ 6
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Schedule/Form.js Ver fichero

@@ -48,6 +48,12 @@ var bootstrap = function ($, learun) {
return false;
}
var postData = $('#form').lrGetFormData("");

var stime = $('#F_StartTime').find('.lr-select-placeholder').html();
var etime = $('#F_EndTime').find('.lr-select-placeholder').html();
postData.F_StartDate += (" " + stime);
postData.F_EndDate += (" " + etime);

$.lrSaveForm(top.$.rootUrl + '/LR_OAModule/Schedule/SaveForm?keyValue=' + keyValue, postData, function (res) {
learun.frameTab.currentIframe().location.reload();
});


+ 35
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/HomeController.cs Ver fichero

@@ -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.OA.Schedule;

namespace Learun.Application.Web.Controllers
{
@@ -58,6 +59,8 @@ 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 ScheduleIBLL scheduleIBLL = new ScheduleBLL();
private MessageRindIBLL messageRindIBLL = new MessageRindBLL();
#region 视图功能

public ActionResult ChangePwd()
@@ -506,6 +509,38 @@ namespace Learun.Application.Web.Controllers
ViewBag.ACIp = ConfigurationManager.AppSettings["ACIp"] ?? "";
ViewBag.ACIp2 = ConfigurationManager.AppSettings["ACIp2"] ?? "";

#region 日程提醒

//判断今天是否有日程提醒
var scheduleList = scheduleIBLL.GetListByUserId(userinfo.userId).Where(x => x.F_StartDate <= DateTime.Now && x.F_EndDate >= DateTime.Now);
if (scheduleList.Any())
{
foreach (var item in scheduleList)
{
//判断该日程今天是否已提醒过
var st = Convert.ToDateTime(string.Format("{0} {1}", DateTime.Now.ToString("yyyy-MM-dd"), "00:00:00"));
var et = Convert.ToDateTime(string.Format("{0} {1}", DateTime.Now.ToString("yyyy-MM-dd"), "23:59:59"));
var mrlist = messageRindIBLL.GetList("{\"InstanceId\":\"" + item.F_ScheduleId + "\",\"StartTime\":\"" + st + "\",\"EndTime\":\"" + et + "\"}");
if (!mrlist.Any())
{
MessageRemindEntity entity = new MessageRemindEntity();
entity.ReceiptId = item.F_CreateUserId;
entity.ReceiptName = item.F_CreateUserName;
entity.SenderId = item.F_CreateUserId;
entity.SenderName = item.F_CreateUserName;
entity.TheTitle = "日程提醒";
entity.TheContent = item.F_ScheduleContent;
entity.InstanceId = item.F_ScheduleId;
entity.ConnectionUrl = "/LR_OAModule/Schedule/Index?keyValue=";
entity.SendTime = DateTime.Now;
entity.ReadSigns = false;
messageRindIBLL.SaveEntity("", entity);
}
}
}
#endregion


switch (learn_UItheme)
{
case "1":


+ 24
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Schedule/ScheduleBLL.cs Ver fichero

@@ -89,6 +89,30 @@ namespace Learun.Application.OA.Schedule
}
}
}

/// <summary>
/// 获取列表
/// </summary>
/// <returns>返回列表</returns>
public IEnumerable<ScheduleEntity> GetListByUserId(string userId)
{
try
{
return scheduleService.GetListByUserId(userId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

#region 提交数据


+ 6
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Schedule/ScheduleIBLL.cs Ver fichero

@@ -37,6 +37,12 @@ namespace Learun.Application.OA.Schedule
/// <param name="keyValue">主键值</param>
/// <returns></returns>
ScheduleEntity GetEntity(string keyValue);

/// <summary>
/// 获取列表
/// </summary>
/// <returns>返回列表</returns>
IEnumerable<ScheduleEntity> GetListByUserId(string userId);
#endregion

#region 提交数据


+ 24
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Schedule/ScheduleService.cs Ver fichero

@@ -94,6 +94,30 @@ namespace Learun.Application.OA.Schedule
throw ExceptionEx.ThrowServiceException(ex);
}
}

/// <summary>
/// 获取列表
/// </summary>
/// <returns>返回列表</returns>
public IEnumerable<ScheduleEntity> GetListByUserId(string userId)
{
try
{
return this.BaseRepository().FindList<ScheduleEntity>(x => x.F_CreateUserId == userId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

#region 提交数据


+ 25
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRindBLL.cs Ver fichero

@@ -43,6 +43,31 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
}
}

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<MessageRemindEntity> GetList(string queryJson)
{
try
{
return messageRindService.GetList(queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 未读消息
/// </summary>


+ 8
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRindIBLL.cs Ver fichero

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

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<MessageRemindEntity> GetList(string queryJson);
/// <summary>
/// 获取未读的消息
/// </summary>


+ 43
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRindService.cs Ver fichero

@@ -68,6 +68,49 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
}
}

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<MessageRemindEntity> GetList(string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT t.* ");
strSql.Append(" FROM MessageRemind t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
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.SendTime >= @startTime AND t.SendTime <= @endTime ) ");
}
if (!queryParam["InstanceId"].IsEmpty())
{
dp.Add("InstanceId", queryParam["InstanceId"].ToString(), DbType.String);
strSql.Append(" AND t.InstanceId = @InstanceId ");
}
return this.BaseRepository().FindList<MessageRemindEntity>(strSql.ToString(), dp);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取MessageRemind表未读的消息
/// </summary>


Cargando…
Cancelar
Guardar