Browse Source

11

金隅分支
zhichao lei 3 years ago
parent
commit
ecf7218f52
16 changed files with 775 additions and 9 deletions
  1. +2
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_SendFileController.cs
  2. +4
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Index.js
  3. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexParty.js
  4. +117
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/MessageRindController.cs
  5. +35
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/Form.cshtml
  6. +30
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/Index.cshtml
  7. +124
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/Index.js
  8. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  9. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LR_Desktop/MessageRemindMap.cs
  10. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  11. +3
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_SendFile/Sys_SendFileEntity.cs
  12. +90
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRemindEntity.cs
  13. +125
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRindBLL.cs
  14. +48
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRindIBLL.cs
  15. +157
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRindService.cs
  16. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj

+ 2
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Sys_SendFileController.cs View File

@@ -147,14 +147,13 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers

foreach (var item in data)
{
var reciver=string.IsNullOrWhiteSpace(item.Receiver)?"暂无":item.Receiver;
var sql = $"SELECT COUNT(*) FROM dbo.Sys_ReceiveFile where ReadFlag=1 AND SFileId='{item.SFileId}'";
var sendSql = $"SELECT COUNT(*) FROM dbo.Sys_ReceiveFile where SFileId='{item.SFileId}'";
var readdt = sys_SendFileIBLL.Execute(sql);
var senddt = sys_SendFileIBLL.Execute(sendSql);
var readcount = readdt.Rows[0][0];
var sendcount = senddt.Rows[0][0];
item.Receiver = $"{reciver}/{readcount}/{sendcount}";
item.NumberPeople = $"{readcount}/{sendcount}";
}

var jsonData = new
@@ -192,14 +191,13 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers

foreach (var item in data)
{
var reciver = string.IsNullOrWhiteSpace(item.Receiver) ? "暂无" : item.Receiver;
var sql = $"SELECT COUNT(*) FROM dbo.Sys_ReceiveFile where ReadFlag=1 AND SFileId='{item.SFileId}'";
var sendSql = $"SELECT COUNT(*) FROM dbo.Sys_ReceiveFile where SFileId='{item.SFileId}'";
var readdt = sys_SendFileIBLL.Execute(sql);
var senddt = sys_SendFileIBLL.Execute(sendSql);
var readcount = readdt.Rows[0][0];
var sendcount = senddt.Rows[0][0];
item.Receiver = $"{readcount}/{sendcount}";
item.NumberPeople = $"{readcount}/{sendcount}";
}
var jsonData = new
{


+ 4
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/Index.js View File

@@ -179,8 +179,10 @@ var bootstrap = function ($, learun) {
}
}
},
{
label: "阅读数/接受人数", name: "NumberPeople", width: 150, align: "left"
},

],
mainId: 'SFileId',
isPage: true


+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Sys_SendFile/IndexParty.js View File

@@ -158,7 +158,7 @@ var bootstrap = function ($, learun) {
}
},
{
label: "接收人/阅读数/发文章数", name: "Receiver", width: 300, align: "left"
label: "接收人", name: "Receiver", width: 300, align: "left"
},
{
label: "下发人", name: "Sender", width: 100, align: "left"
@@ -180,7 +180,7 @@ var bootstrap = function ($, learun) {
}
},
{
label: "阅读人数/总数", name: "Receiver", width: 150, align: "left",
label: "阅读人数/接受人数", name: "NumberPeople", width: 150, align: "left",

},
],


+ 117
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/MessageRindController.cs View File

@@ -0,0 +1,117 @@
using Learun.Util;
using System.Data;
using Learun.Application.TwoDevelopment.LR_Desktop;
using System.Web.Mvc;
using System.Collections.Generic;

namespace Learun.Application.Web.Areas.LR_Desktop.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-04-23 16:58
/// 描 述:消息提醒
/// </summary>
public class MessageRindController : MvcControllerBase
{
private MessageRindIBLL messageRindIBLL = new MessageRindBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
#endregion

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = messageRindIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var MessageRemindData = messageRindIBLL.GetMessageRemindEntity( keyValue );
var jsonData = new {
MessageRemind = MessageRemindData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
messageRindIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
{
MessageRemindEntity entity = strEntity.ToObject<MessageRemindEntity>();
messageRindIBLL.SaveEntity(keyValue,entity);
if (string.IsNullOrEmpty(keyValue))
{
}
return Success("保存成功!");
}
#endregion

}
}

+ 35
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/Form.cshtml View File

@@ -0,0 +1,35 @@
@{
ViewBag.Title = "消息提醒";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-6 lr-form-item" data-table="MessageRemind" >
<div class="lr-form-item-title">收件人ID</div>
<input id="ReceiptId" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="MessageRemind" >
<div class="lr-form-item-title">收件人姓名</div>
<input id="ReceiptName" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="MessageRemind" >
<div class="lr-form-item-title">发件人ID</div>
<input id="SenderId" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="MessageRemind" >
<div class="lr-form-item-title">发件人姓名</div>
<input id="SenderName" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="MessageRemind" >
<div class="lr-form-item-title">发送时间</div>
<input id="SendTime" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="MessageRemind" >
<div class="lr-form-item-title">标题</div>
<input id="TheTitle" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="MessageRemind" >
<div class="lr-form-item-title">内容</div>
<div id="TheContent" style="height:200px;"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/LR_Desktop/Views/MessageRind/Form.js")

+ 30
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/Index.cshtml View File

@@ -0,0 +1,30 @@
@{
ViewBag.Title = "消息提醒";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout " >
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="datesearch"></div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/LR_Desktop/Views/MessageRind/Index.js")

+ 124
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/MessageRind/Index.js View File

@@ -0,0 +1,124 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-04-23 16:58
* 描 述:消息提醒
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var startTime;
var endTime;
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
// 时间搜索框
$('#datesearch').lrdate({
dfdata: [
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }
],
// 月
mShow: false,
premShow: false,
// 季度
jShow: false,
prejShow: false,
// 年
ysShow: false,
yxShow: false,
preyShow: false,
yShow: false,
// 默认
dfvalue: '1',
selectfn: function (begin, end) {
startTime = begin;
endTime = end;
page.search();
}
});
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/LR_Desktop/MessageRind/Form',
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('MessageId');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/LR_Desktop/MessageRind/Form?keyValue=' + keyValue,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('MessageId');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/LR_Desktop/MessageRind/DeleteForm', { keyValue: keyValue}, function () {
refreshGirdData();
});
}
});
}
});
// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/LR_Desktop/MessageRind/GetPageList',
headData: [
{ label: "收件人ID", name: "ReceiptId", width: 100, align: "left"},
{ label: "收件人姓名", name: "ReceiptName", width: 100, align: "left"},
{ label: "发件人ID", name: "SenderId", width: 100, align: "left"},
{ label: "发件人姓名", name: "SenderName", width: 100, align: "left"},
{ label: "发送时间", name: "SendTime", width: 100, align: "left"},
{ label: "标题", name: "TheTitle", width: 100, align: "left"},
{ label: "内容", name: "TheContent", width: 100, align: "left"},
],
mainId:'MessageId',
isPage: true
});
},
search: function (param) {
param = param || {};
param.StartTime = startTime;
param.EndTime = endTime;
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj View File

@@ -794,6 +794,7 @@
<Compile Include="Areas\Permission\Controllers\DepartmentReleasePermissionsController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\EATalentTrainController.cs" />
<Compile Include="Areas\PersonnelManagement\Controllers\Emp_PayrollController.cs" />
<Compile Include="Areas\LR_Desktop\Controllers\MessageRindController.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" />
@@ -6136,6 +6137,9 @@
<Content Include="Areas\PersonnelManagement\Views\Emp_Payroll\Index.js" />
<Content Include="Areas\PersonnelManagement\Views\Emp_Payroll\Form.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\Emp_Payroll\Form.js" />
<Content Include="Areas\LR_Desktop\Views\MessageRind\Index.cshtml" />
<Content Include="Areas\LR_Desktop\Views\MessageRind\Index.js" />
<Content Include="Areas\LR_Desktop\Views\MessageRind\Form.cshtml" />
</ItemGroup>
<ItemGroup>
<Folder Include="Areas\LR_Desktop\Models\" />


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/LR_Desktop/MessageRemindMap.cs View File

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.LR_Desktop;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-04-23 16:58
/// 描 述:消息提醒
/// </summary>
public class MessageRemindMap : EntityTypeConfiguration<MessageRemindEntity>
{
public MessageRemindMap()
{
#region 表、主键
//表
this.ToTable("MESSAGEREMIND");
//主键
this.HasKey(t => t.MessageId);
#endregion

#region 配置关系
#endregion
}
}
}


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj View File

@@ -546,6 +546,7 @@
<Compile Include="Permission\DepartmentReleasePermissionsMap.cs" />
<Compile Include="EducationalAdministration\EATalentTrainMap.cs" />
<Compile Include="PersonnelManagement\EMP_PayrollMap.cs" />
<Compile Include="LR_Desktop\MessageRemindMap.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


+ 3
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Sys_SendFile/Sys_SendFileEntity.cs View File

@@ -1,5 +1,6 @@
using Learun.Util;
using System;
using System.Collections.Specialized;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
@@ -87,7 +88,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
[Column("SPROCESSID")]
public string SProcessId { get; set; }
#endregion

[NotMapped]
public string NumberPeople { get; set; }
#region 扩展操作
/// <summary>
/// 新增调用


+ 90
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRemindEntity.cs View File

@@ -0,0 +1,90 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.LR_Desktop
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-04-23 16:58
/// 描 述:消息提醒
/// </summary>
public class MessageRemindEntity
{
#region 实体成员
/// <summary>
/// MessageId
/// </summary>
[Column("MESSAGEID")]
public string MessageId { get; set; }
/// <summary>
/// ReceiptId
/// </summary>
[Column("RECEIPTID")]
public string ReceiptId { get; set; }
/// <summary>
/// ReceiptName
/// </summary>
[Column("RECEIPTNAME")]
public string ReceiptName { get; set; }
/// <summary>
/// SenderId
/// </summary>
[Column("SENDERID")]
public string SenderId { get; set; }
/// <summary>
/// SenderName
/// </summary>
[Column("SENDERNAME")]
public string SenderName { get; set; }
/// <summary>
/// TheTitle
/// </summary>
[Column("THETITLE")]
public string TheTitle { get; set; }
/// <summary>
/// TheContent
/// </summary>
[Column("THECONTENT")]
public string TheContent { get; set; }
/// <summary>
/// ConnectionUrl
/// </summary>
[Column("CONNECTIONURL")]
public string ConnectionUrl { get; set; }
/// <summary>
/// SendTime
/// </summary>
[Column("SENDTIME")]
public DateTime? SendTime { get; set; }
/// <summary>
/// ReadSigns
/// </summary>
[Column("READSIGNS")]
public bool? ReadSigns { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.MessageId = Guid.NewGuid().ToString();
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.MessageId = keyValue;
}
#endregion
#region 扩展字段
#endregion
}
}


+ 125
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRindBLL.cs View File

@@ -0,0 +1,125 @@
using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.LR_Desktop
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-04-23 16:58
/// 描 述:消息提醒
/// </summary>
public class MessageRindBLL : MessageRindIBLL
{
private MessageRindService messageRindService = new MessageRindService();

#region 获取数据

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

/// <summary>
/// 获取MessageRemind表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public MessageRemindEntity GetMessageRemindEntity(string keyValue)
{
try
{
return messageRindService.GetMessageRemindEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
messageRindService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
public void SaveEntity(string keyValue, MessageRemindEntity entity)
{
try
{
messageRindService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}
}

+ 48
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRindIBLL.cs View File

@@ -0,0 +1,48 @@
using Learun.Util;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.LR_Desktop
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-04-23 16:58
/// 描 述:消息提醒
/// </summary>
public interface MessageRindIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<MessageRemindEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取MessageRemind表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
MessageRemindEntity GetMessageRemindEntity(string keyValue);
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, MessageRemindEntity entity);
#endregion

}
}

+ 157
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/MessageRind/MessageRindService.cs View File

@@ -0,0 +1,157 @@
using Dapper;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace Learun.Application.TwoDevelopment.LR_Desktop
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2021-04-23 16:58
/// 描 述:消息提醒
/// </summary>
public class MessageRindService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<MessageRemindEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.MessageId,
t.ReceiptId,
t.ReceiptName,
t.SenderId,
t.SenderName,
t.SendTime,
t.TheTitle,
t.TheContent
");
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 ) ");
}
return this.BaseRepository().FindList<MessageRemindEntity>(strSql.ToString(),dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取MessageRemind表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public MessageRemindEntity GetMessageRemindEntity(string keyValue)
{
try
{
return this.BaseRepository().FindEntity<MessageRemindEntity>(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
this.BaseRepository().Delete<MessageRemindEntity>(t=>t.MessageId == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, MessageRemindEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository().Update(entity);
}
else
{
entity.Create();
this.BaseRepository().Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

}
}

+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj View File

@@ -1605,6 +1605,10 @@
<Compile Include="PersonnelManagement\Emp_Payroll\Emp_PayrollService.cs" />
<Compile Include="PersonnelManagement\Emp_Payroll\Emp_PayrollBLL.cs" />
<Compile Include="PersonnelManagement\Emp_Payroll\Emp_PayrollIBLL.cs" />
<Compile Include="LR_Desktop\MessageRind\MessageRemindEntity.cs" />
<Compile Include="LR_Desktop\MessageRind\MessageRindService.cs" />
<Compile Include="LR_Desktop\MessageRind\MessageRindBLL.cs" />
<Compile Include="LR_Desktop\MessageRind\MessageRindIBLL.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


Loading…
Cancel
Save