@@ -0,0 +1,117 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using System.Web.Mvc; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2020-09-03 12:11 | |||||
/// 描 述:考勤设备管理 | |||||
/// </summary> | |||||
public class ADR_DeviceController : MvcControllerBase | |||||
{ | |||||
private ADR_DeviceIBLL aDR_DeviceIBLL = new ADR_DeviceBLL(); | |||||
#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 = aDR_DeviceIBLL.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 ADR_DeviceData = aDR_DeviceIBLL.GetADR_DeviceEntity( keyValue ); | |||||
var jsonData = new { | |||||
ADR_Device = ADR_DeviceData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DeleteForm(string keyValue) | |||||
{ | |||||
aDR_DeviceIBLL.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) | |||||
{ | |||||
ADR_DeviceEntity entity = strEntity.ToObject<ADR_DeviceEntity>(); | |||||
aDR_DeviceIBLL.SaveEntity(keyValue,entity); | |||||
if (string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
} | |||||
return Success("保存成功!"); | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,117 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using System.Web.Mvc; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2020-09-03 12:18 | |||||
/// 描 述:考勤设备日志 | |||||
/// </summary> | |||||
public class ADR_DeviceLogController : MvcControllerBase | |||||
{ | |||||
private ADR_DeviceLogIBLL aDR_DeviceLogIBLL = new ADR_DeviceLogBLL(); | |||||
#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 = aDR_DeviceLogIBLL.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 ADR_DeviceLogData = aDR_DeviceLogIBLL.GetADR_DeviceLogEntity( keyValue ); | |||||
var jsonData = new { | |||||
ADR_DeviceLog = ADR_DeviceLogData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DeleteForm(string keyValue) | |||||
{ | |||||
aDR_DeviceLogIBLL.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) | |||||
{ | |||||
ADR_DeviceLogEntity entity = strEntity.ToObject<ADR_DeviceLogEntity>(); | |||||
aDR_DeviceLogIBLL.SaveEntity(keyValue,entity); | |||||
if (string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
} | |||||
return Success("保存成功!"); | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -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="ADR_Device" > | |||||
<div class="lr-form-item-title">设备名称<font face="宋体">*</font></div> | |||||
<input id="DName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ADR_Device" > | |||||
<div class="lr-form-item-title">设备编号<font face="宋体">*</font></div> | |||||
<input id="DCode" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ADR_Device" > | |||||
<div class="lr-form-item-title">Ip地址<font face="宋体">*</font></div> | |||||
<input id="IpAddress" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ADR_Device" > | |||||
<div class="lr-form-item-title">端口号<font face="宋体">*</font></div> | |||||
<input id="PortNumber" type="text" class="form-control" isvalid="yes" checkexpession="Num" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ADR_Device" > | |||||
<div class="lr-form-item-title">管理员帐号<font face="宋体">*</font></div> | |||||
<input id="AdminAccount" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="ADR_Device" > | |||||
<div class="lr-form-item-title">管理员密码<font face="宋体">*</font></div> | |||||
<input id="AdminPwd" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="ADR_Device" > | |||||
<div class="lr-form-item-title">是否启用</div> | |||||
<div id="F_EnabledMark"></div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ADR_Device/Form.js") |
@@ -0,0 +1,54 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2020-09-03 12:11 | |||||
* 描 述:考勤设备管理 | |||||
*/ | |||||
var acceptClick; | |||||
var keyValue = request('keyValue'); | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
page.bind(); | |||||
page.initData(); | |||||
}, | |||||
bind: function () { | |||||
$('#F_EnabledMark').lrRadioCheckbox({ | |||||
type: 'radio', | |||||
code: 'YesOrNoInt', | |||||
}); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/ADR_Device/GetFormData?keyValue=' + keyValue, function (data) { | |||||
for (var id in data) { | |||||
if (!!data[id].length && data[id].length > 0) { | |||||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
} | |||||
}; | |||||
// 保存数据 | |||||
acceptClick = function (callBack) { | |||||
if (!$('body').lrValidform()) { | |||||
return false; | |||||
} | |||||
var postData = { | |||||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||||
}; | |||||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/ADR_Device/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,26 @@ | |||||
@{ | |||||
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> | |||||
<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> 新增</a> | |||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ADR_Device/Index.js") |
@@ -0,0 +1,99 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2020-09-03 12:11 | |||||
* 描 述:考勤设备管理 | |||||
*/ | |||||
var refreshGirdData; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
page.initGird(); | |||||
page.bind(); | |||||
}, | |||||
bind: function () { | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
// 新增 | |||||
$('#lr_add').on('click', function () { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '新增', | |||||
url: top.$.rootUrl + '/EducationalAdministration/ADR_Device/Form', | |||||
width: 600, | |||||
height: 400, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
// 编辑 | |||||
$('#lr_edit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '编辑', | |||||
url: top.$.rootUrl + '/EducationalAdministration/ADR_Device/Form?keyValue=' + keyValue, | |||||
width: 600, | |||||
height: 400, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 删除 | |||||
$('#lr_delete').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
if (res) { | |||||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/ADR_Device/DeleteForm', { keyValue: keyValue}, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').lrAuthorizeJfGrid({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/ADR_Device/GetPageList', | |||||
headData: [ | |||||
{ label: "设备名称", name: "DName", width: 100, align: "left"}, | |||||
{ label: "设备编号", name: "DCode", width: 100, align: "left"}, | |||||
{ label: "Ip地址", name: "IpAddress", width: 200, align: "left"}, | |||||
{ label: "端口号", name: "PortNumber", width: 50, align: "left"}, | |||||
{ label: "管理员帐号", name: "AdminAccount", width: 100, align: "left"}, | |||||
{ label: "管理员密码", name: "AdminPwd", width: 100, align: "left"}, | |||||
{ label: "是否启用", name: "F_EnabledMark", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op,$cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'YesOrNoInt', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
}}, | |||||
], | |||||
mainId:'Id', | |||||
isPage: true | |||||
}); | |||||
page.search(); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
refreshGirdData = function () { | |||||
$('#gridtable').jfGridSet('reload'); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,23 @@ | |||||
@{ | |||||
ViewBag.Title = "考勤设备日志"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-12 lr-form-item" data-table="ADR_DeviceLog" > | |||||
<div class="lr-form-item-title">考勤设备</div> | |||||
<input id="DeviceId" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="ADR_DeviceLog" > | |||||
<div class="lr-form-item-title">日志类型</div> | |||||
<input id="LogType" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="ADR_DeviceLog" > | |||||
<div class="lr-form-item-title">日志内容</div> | |||||
<textarea id="LogData" class="form-control" style="height:100px;" ></textarea> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="ADR_DeviceLog" > | |||||
<div class="lr-form-item-title">日志记录时间</div> | |||||
<input id="F_CreateDate" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm',onpicked: function () { $('#F_CreateDate').trigger('change'); } })" /> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ADR_DeviceLog/Form.js") |
@@ -0,0 +1,50 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2020-09-03 12:18 | |||||
* 描 述:考勤设备日志 | |||||
*/ | |||||
var acceptClick; | |||||
var keyValue = request('keyValue'); | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
page.bind(); | |||||
page.initData(); | |||||
}, | |||||
bind: function () { | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/ADR_DeviceLog/GetFormData?keyValue=' + keyValue, function (data) { | |||||
for (var id in data) { | |||||
if (!!data[id].length && data[id].length > 0) { | |||||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
} | |||||
}; | |||||
// 保存数据 | |||||
acceptClick = function (callBack) { | |||||
if (!$('body').lrValidform()) { | |||||
return false; | |||||
} | |||||
var postData = { | |||||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||||
}; | |||||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/ADR_DeviceLog/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,39 @@ | |||||
@{ | |||||
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 class="lr-layout-tool-item"> | |||||
<div id="multiple_condition_query"> | |||||
<div class="lr-query-formcontent"> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">考勤设备</div> | |||||
<input id="DeviceId" type="text" class="form-control" /> | |||||
</div> | |||||
</div> | |||||
</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> 新增</a> | |||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ADR_DeviceLog/Index.js") |
@@ -0,0 +1,120 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2020-09-03 12:18 | |||||
* 描 述:考勤设备日志 | |||||
*/ | |||||
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(); | |||||
} | |||||
}); | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||||
page.search(queryJson); | |||||
}, 220, 400); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
// 新增 | |||||
$('#lr_add').on('click', function () { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '新增', | |||||
url: top.$.rootUrl + '/EducationalAdministration/ADR_DeviceLog/Form', | |||||
width: 600, | |||||
height: 400, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
// 编辑 | |||||
$('#lr_edit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('LogId'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '编辑', | |||||
url: top.$.rootUrl + '/EducationalAdministration/ADR_DeviceLog/Form?keyValue=' + keyValue, | |||||
width: 600, | |||||
height: 400, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 删除 | |||||
$('#lr_delete').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('LogId'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
if (res) { | |||||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/ADR_DeviceLog/DeleteForm', { keyValue: keyValue}, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').lrAuthorizeJfGrid({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/ADR_DeviceLog/GetPageList', | |||||
headData: [ | |||||
{ label: "考勤设备", name: "DeviceId", width: 100, align: "left"}, | |||||
{ label: "日志类型", name: "LogType", width: 100, align: "left"}, | |||||
{ label: "日志内容", name: "LogData", width: 100, align: "left"}, | |||||
{ label: "日志记录时间", name: "F_CreateDate", width: 100, align: "left"}, | |||||
], | |||||
mainId:'LogId', | |||||
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(); | |||||
} |
@@ -794,6 +794,8 @@ | |||||
<Compile Include="Areas\PersonnelManagement\Controllers\ADR_RecordController.cs" /> | <Compile Include="Areas\PersonnelManagement\Controllers\ADR_RecordController.cs" /> | ||||
<Compile Include="Areas\LogisticsManagement\Controllers\ADR_RecordController.cs" /> | <Compile Include="Areas\LogisticsManagement\Controllers\ADR_RecordController.cs" /> | ||||
<Compile Include="Startup1.cs" /> | <Compile Include="Startup1.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\ADR_DeviceController.cs" /> | |||||
<Compile Include="Areas\EducationalAdministration\Controllers\ADR_DeviceLogController.cs" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\RegistrateForm.js" /> | <Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\RegistrateForm.js" /> | ||||
@@ -6011,6 +6013,14 @@ | |||||
<Content Include="Areas\LogisticsManagement\Views\ADR_Record\Index.js" /> | <Content Include="Areas\LogisticsManagement\Views\ADR_Record\Index.js" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\ADR_Record\Form.cshtml" /> | <Content Include="Areas\LogisticsManagement\Views\ADR_Record\Form.cshtml" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\ADR_Record\Form.js" /> | <Content Include="Areas\LogisticsManagement\Views\ADR_Record\Form.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\ADR_Device\Index.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\ADR_Device\Index.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\ADR_Device\Form.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\ADR_Device\Form.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\ADR_DeviceLog\Index.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\ADR_DeviceLog\Index.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\ADR_DeviceLog\Form.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\ADR_DeviceLog\Form.js" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<Folder Include="Areas\LR_Desktop\Models\" /> | <Folder Include="Areas\LR_Desktop\Models\" /> | ||||
@@ -0,0 +1,29 @@ | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using System.Data.Entity.ModelConfiguration; | |||||
namespace Learun.Application.Mapping | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2020-09-03 12:18 | |||||
/// 描 述:考勤设备日志 | |||||
/// </summary> | |||||
public class ADR_DeviceLogMap : EntityTypeConfiguration<ADR_DeviceLogEntity> | |||||
{ | |||||
public ADR_DeviceLogMap() | |||||
{ | |||||
#region 表、主键 | |||||
//表 | |||||
this.ToTable("ADR_DEVICELOG"); | |||||
//主键 | |||||
this.HasKey(t => t.LogId); | |||||
#endregion | |||||
#region 配置关系 | |||||
#endregion | |||||
} | |||||
} | |||||
} | |||||
@@ -0,0 +1,29 @@ | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using System.Data.Entity.ModelConfiguration; | |||||
namespace Learun.Application.Mapping | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2020-09-03 12:11 | |||||
/// 描 述:考勤设备管理 | |||||
/// </summary> | |||||
public class ADR_DeviceMap : EntityTypeConfiguration<ADR_DeviceEntity> | |||||
{ | |||||
public ADR_DeviceMap() | |||||
{ | |||||
#region 表、主键 | |||||
//表 | |||||
this.ToTable("ADR_DEVICE"); | |||||
//主键 | |||||
this.HasKey(t => t.Id); | |||||
#endregion | |||||
#region 配置关系 | |||||
#endregion | |||||
} | |||||
} | |||||
} | |||||
@@ -526,6 +526,8 @@ | |||||
<Compile Include="EducationalAdministration\BC_SpecialDestinationMap.cs" /> | <Compile Include="EducationalAdministration\BC_SpecialDestinationMap.cs" /> | ||||
<Compile Include="EducationalAdministration\BC_EPIMap.cs" /> | <Compile Include="EducationalAdministration\BC_EPIMap.cs" /> | ||||
<Compile Include="LogisticsManagement\ADR_RecordMap.cs" /> | <Compile Include="LogisticsManagement\ADR_RecordMap.cs" /> | ||||
<Compile Include="EducationalAdministration\ADR_DeviceMap.cs" /> | |||||
<Compile Include="EducationalAdministration\ADR_DeviceLogMap.cs" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | <ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | ||||
@@ -0,0 +1,125 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2020-09-03 12:11 | |||||
/// 描 述:考勤设备管理 | |||||
/// </summary> | |||||
public class ADR_DeviceBLL : ADR_DeviceIBLL | |||||
{ | |||||
private ADR_DeviceService aDR_DeviceService = new ADR_DeviceService(); | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<ADR_DeviceEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return aDR_DeviceService.GetPageList(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取ADR_Device表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public ADR_DeviceEntity GetADR_DeviceEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return aDR_DeviceService.GetADR_DeviceEntity(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 | |||||
{ | |||||
aDR_DeviceService.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, ADR_DeviceEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
aDR_DeviceService.SaveEntity(keyValue, entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,128 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.ComponentModel.DataAnnotations.Schema; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2020-09-03 12:11 | |||||
/// 描 述:考勤设备管理 | |||||
/// </summary> | |||||
public class ADR_DeviceEntity | |||||
{ | |||||
#region 实体成员 | |||||
/// <summary> | |||||
/// Id | |||||
/// </summary> | |||||
[Column("ID")] | |||||
public string Id { get; set; } | |||||
/// <summary> | |||||
/// DName | |||||
/// </summary> | |||||
[Column("DNAME")] | |||||
public string DName { get; set; } | |||||
/// <summary> | |||||
/// DCode | |||||
/// </summary> | |||||
[Column("DCODE")] | |||||
public string DCode { get; set; } | |||||
/// <summary> | |||||
/// IpAddress | |||||
/// </summary> | |||||
[Column("IPADDRESS")] | |||||
public string IpAddress { get; set; } | |||||
/// <summary> | |||||
/// PortNumber | |||||
/// </summary> | |||||
[Column("PORTNUMBER")] | |||||
public int? PortNumber { get; set; } | |||||
/// <summary> | |||||
/// AdminAccount | |||||
/// </summary> | |||||
[Column("ADMINACCOUNT")] | |||||
public string AdminAccount { get; set; } | |||||
/// <summary> | |||||
/// AdminPwd | |||||
/// </summary> | |||||
[Column("ADMINPWD")] | |||||
public string AdminPwd { get; set; } | |||||
/// <summary> | |||||
/// F_EnabledMark | |||||
/// </summary> | |||||
[Column("F_ENABLEDMARK")] | |||||
public int? F_EnabledMark { get; set; } | |||||
/// <summary> | |||||
/// 布防状态 | |||||
/// </summary> | |||||
[Column("DONLINESTATUS")] | |||||
public bool? DOnlineStatus { get; set; } | |||||
/// <summary> | |||||
/// 设备最后通讯时间 | |||||
/// </summary> | |||||
[Column("DCONNECTDATE")] | |||||
public DateTime? DConnectDate { get; set; } | |||||
/// <summary> | |||||
/// F_CreateDate | |||||
/// </summary> | |||||
[Column("F_CREATEDATE")] | |||||
public DateTime? F_CreateDate { get; set; } | |||||
/// <summary> | |||||
/// F_CreateUserId | |||||
/// </summary> | |||||
[Column("F_CREATEUSERID")] | |||||
public string F_CreateUserId { get; set; } | |||||
/// <summary> | |||||
/// F_CreateUserName | |||||
/// </summary> | |||||
[Column("F_CREATEUSERNAME")] | |||||
public string F_CreateUserName { get; set; } | |||||
/// <summary> | |||||
/// F_ModifyDate | |||||
/// </summary> | |||||
[Column("F_MODIFYDATE")] | |||||
public DateTime? F_ModifyDate { get; set; } | |||||
/// <summary> | |||||
/// F_ModifyUserId | |||||
/// </summary> | |||||
[Column("F_MODIFYUSERID")] | |||||
public string F_ModifyUserId { get; set; } | |||||
/// <summary> | |||||
/// F_ModifyUserName | |||||
/// </summary> | |||||
[Column("F_MODIFYUSERNAME")] | |||||
public string F_ModifyUserName { get; set; } | |||||
#endregion | |||||
#region 扩展操作 | |||||
/// <summary> | |||||
/// 新增调用 | |||||
/// </summary> | |||||
public void Create() | |||||
{ | |||||
this.Id = Guid.NewGuid().ToString(); | |||||
this.F_CreateDate = DateTime.Now; | |||||
UserInfo userInfo = LoginUserInfo.Get(); | |||||
this.F_CreateUserId = userInfo.userId; | |||||
this.F_CreateUserName = userInfo.realName; | |||||
} | |||||
/// <summary> | |||||
/// 编辑调用 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
public void Modify(string keyValue) | |||||
{ | |||||
this.Id = keyValue; | |||||
this.F_ModifyDate = DateTime.Now; | |||||
UserInfo userInfo = LoginUserInfo.Get(); | |||||
this.F_ModifyUserId = userInfo.userId; | |||||
this.F_ModifyUserName = userInfo.realName; | |||||
} | |||||
#endregion | |||||
#region 扩展字段 | |||||
#endregion | |||||
} | |||||
} | |||||
@@ -0,0 +1,48 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2020-09-03 12:11 | |||||
/// 描 述:考勤设备管理 | |||||
/// </summary> | |||||
public interface ADR_DeviceIBLL | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<ADR_DeviceEntity> GetPageList(Pagination pagination, string queryJson); | |||||
/// <summary> | |||||
/// 获取ADR_Device表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
ADR_DeviceEntity GetADR_DeviceEntity(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, ADR_DeviceEntity entity); | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,151 @@ | |||||
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.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2020-09-03 12:11 | |||||
/// 描 述:考勤设备管理 | |||||
/// </summary> | |||||
public class ADR_DeviceService : RepositoryFactory | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">查询参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<ADR_DeviceEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" | |||||
t.Id, | |||||
t.DName, | |||||
t.DCode, | |||||
t.IpAddress, | |||||
t.PortNumber, | |||||
t.AdminAccount, | |||||
t.AdminPwd, | |||||
t.F_EnabledMark | |||||
"); | |||||
strSql.Append(" FROM ADR_Device t "); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
return this.BaseRepository("CollegeMIS").FindList<ADR_DeviceEntity>(strSql.ToString(),dp, pagination); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取ADR_Device表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public ADR_DeviceEntity GetADR_DeviceEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<ADR_DeviceEntity>(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("CollegeMIS").Delete<ADR_DeviceEntity>(t=>t.Id == 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, ADR_DeviceEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
if (!string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
entity.Modify(keyValue); | |||||
this.BaseRepository("CollegeMIS").Update(entity); | |||||
} | |||||
else | |||||
{ | |||||
entity.Create(); | |||||
this.BaseRepository("CollegeMIS").Insert(entity); | |||||
} | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,125 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2020-09-03 12:18 | |||||
/// 描 述:考勤设备日志 | |||||
/// </summary> | |||||
public class ADR_DeviceLogBLL : ADR_DeviceLogIBLL | |||||
{ | |||||
private ADR_DeviceLogService aDR_DeviceLogService = new ADR_DeviceLogService(); | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<ADR_DeviceLogEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return aDR_DeviceLogService.GetPageList(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取ADR_DeviceLog表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public ADR_DeviceLogEntity GetADR_DeviceLogEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return aDR_DeviceLogService.GetADR_DeviceLogEntity(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 | |||||
{ | |||||
aDR_DeviceLogService.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, ADR_DeviceLogEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
aDR_DeviceLogService.SaveEntity(keyValue, entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,98 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.ComponentModel.DataAnnotations.Schema; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2020-09-03 12:18 | |||||
/// 描 述:考勤设备日志 | |||||
/// </summary> | |||||
public class ADR_DeviceLogEntity | |||||
{ | |||||
#region 实体成员 | |||||
/// <summary> | |||||
/// LogId | |||||
/// </summary> | |||||
[Column("LOGID")] | |||||
public string LogId { get; set; } | |||||
/// <summary> | |||||
/// DeviceId | |||||
/// </summary> | |||||
[Column("DEVICEID")] | |||||
public string DeviceId { get; set; } | |||||
/// <summary> | |||||
/// LogType | |||||
/// </summary> | |||||
[Column("LOGTYPE")] | |||||
public string LogType { get; set; } | |||||
/// <summary> | |||||
/// LogData | |||||
/// </summary> | |||||
[Column("LOGDATA")] | |||||
public string LogData { get; set; } | |||||
/// <summary> | |||||
/// F_CreateDate | |||||
/// </summary> | |||||
[Column("F_CREATEDATE")] | |||||
public DateTime? F_CreateDate { get; set; } | |||||
/// <summary> | |||||
/// F_CreateUserId | |||||
/// </summary> | |||||
[Column("F_CREATEUSERID")] | |||||
public string F_CreateUserId { get; set; } | |||||
/// <summary> | |||||
/// F_CreateUserName | |||||
/// </summary> | |||||
[Column("F_CREATEUSERNAME")] | |||||
public string F_CreateUserName { get; set; } | |||||
/// <summary> | |||||
/// F_ModifyDate | |||||
/// </summary> | |||||
[Column("F_MODIFYDATE")] | |||||
public DateTime? F_ModifyDate { get; set; } | |||||
/// <summary> | |||||
/// F_ModifyUserId | |||||
/// </summary> | |||||
[Column("F_MODIFYUSERID")] | |||||
public string F_ModifyUserId { get; set; } | |||||
/// <summary> | |||||
/// F_ModifyUserName | |||||
/// </summary> | |||||
[Column("F_MODIFYUSERNAME")] | |||||
public string F_ModifyUserName { get; set; } | |||||
#endregion | |||||
#region 扩展操作 | |||||
/// <summary> | |||||
/// 新增调用 | |||||
/// </summary> | |||||
public void Create() | |||||
{ | |||||
this.LogId = Guid.NewGuid().ToString(); | |||||
this.F_CreateDate = DateTime.Now; | |||||
UserInfo userInfo = LoginUserInfo.Get(); | |||||
this.F_CreateUserId = userInfo.userId; | |||||
this.F_CreateUserName = userInfo.realName; | |||||
} | |||||
/// <summary> | |||||
/// 编辑调用 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
public void Modify(string keyValue) | |||||
{ | |||||
this.LogId = keyValue; | |||||
this.F_ModifyDate = DateTime.Now; | |||||
UserInfo userInfo = LoginUserInfo.Get(); | |||||
this.F_ModifyUserId = userInfo.userId; | |||||
this.F_ModifyUserName = userInfo.realName; | |||||
} | |||||
#endregion | |||||
#region 扩展字段 | |||||
#endregion | |||||
} | |||||
} | |||||
@@ -0,0 +1,48 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2020-09-03 12:18 | |||||
/// 描 述:考勤设备日志 | |||||
/// </summary> | |||||
public interface ADR_DeviceLogIBLL | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<ADR_DeviceLogEntity> GetPageList(Pagination pagination, string queryJson); | |||||
/// <summary> | |||||
/// 获取ADR_DeviceLog表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
ADR_DeviceLogEntity GetADR_DeviceLogEntity(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, ADR_DeviceLogEntity entity); | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,159 @@ | |||||
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.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2020-09-03 12:18 | |||||
/// 描 述:考勤设备日志 | |||||
/// </summary> | |||||
public class ADR_DeviceLogService : RepositoryFactory | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">查询参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<ADR_DeviceLogEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" | |||||
t.LogId, | |||||
t.DeviceId, | |||||
t.LogType, | |||||
t.LogData, | |||||
t.F_CreateDate | |||||
"); | |||||
strSql.Append(" FROM ADR_DeviceLog 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.F_CreateDate >= @startTime AND t.F_CreateDate <= @endTime ) "); | |||||
} | |||||
if (!queryParam["DeviceId"].IsEmpty()) | |||||
{ | |||||
dp.Add("DeviceId", "%" + queryParam["DeviceId"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.DeviceId Like @DeviceId "); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<ADR_DeviceLogEntity>(strSql.ToString(),dp, pagination); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取ADR_DeviceLog表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public ADR_DeviceLogEntity GetADR_DeviceLogEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<ADR_DeviceLogEntity>(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("CollegeMIS").Delete<ADR_DeviceLogEntity>(t=>t.LogId == 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, ADR_DeviceLogEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
if (!string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
entity.Modify(keyValue); | |||||
this.BaseRepository("CollegeMIS").Update(entity); | |||||
} | |||||
else | |||||
{ | |||||
entity.Create(); | |||||
this.BaseRepository("CollegeMIS").Insert(entity); | |||||
} | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -1555,6 +1555,14 @@ | |||||
<Compile Include="LogisticsManagement\ADR_Record\ADR_RecordService.cs" /> | <Compile Include="LogisticsManagement\ADR_Record\ADR_RecordService.cs" /> | ||||
<Compile Include="LogisticsManagement\ADR_Record\ADR_RecordBLL.cs" /> | <Compile Include="LogisticsManagement\ADR_Record\ADR_RecordBLL.cs" /> | ||||
<Compile Include="LogisticsManagement\ADR_Record\ADR_RecordIBLL.cs" /> | <Compile Include="LogisticsManagement\ADR_Record\ADR_RecordIBLL.cs" /> | ||||
<Compile Include="EducationalAdministration\ADR_Device\ADR_DeviceEntity.cs" /> | |||||
<Compile Include="EducationalAdministration\ADR_Device\ADR_DeviceService.cs" /> | |||||
<Compile Include="EducationalAdministration\ADR_Device\ADR_DeviceBLL.cs" /> | |||||
<Compile Include="EducationalAdministration\ADR_Device\ADR_DeviceIBLL.cs" /> | |||||
<Compile Include="EducationalAdministration\ADR_DeviceLog\ADR_DeviceLogEntity.cs" /> | |||||
<Compile Include="EducationalAdministration\ADR_DeviceLog\ADR_DeviceLogService.cs" /> | |||||
<Compile Include="EducationalAdministration\ADR_DeviceLog\ADR_DeviceLogBLL.cs" /> | |||||
<Compile Include="EducationalAdministration\ADR_DeviceLog\ADR_DeviceLogIBLL.cs" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | <ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | ||||