@@ -0,0 +1,126 @@ | |||||
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 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-06-17 09:17 | |||||
/// 描 述:健康打卡时段 | |||||
/// </summary> | |||||
public class HealthPunchTimeController : MvcControllerBase | |||||
{ | |||||
private HealthPunchTimeIBLL healthPunchTimeIBLL = new HealthPunchTimeBLL(); | |||||
#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 = healthPunchTimeIBLL.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 HealthPunchTimeData = healthPunchTimeIBLL.GetHealthPunchTimeEntity(keyValue); | |||||
var jsonData = new | |||||
{ | |||||
HealthPunchTime = HealthPunchTimeData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DeleteForm(string keyValue) | |||||
{ | |||||
healthPunchTimeIBLL.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) | |||||
{ | |||||
HealthPunchTimeEntity entity = strEntity.ToObject<HealthPunchTimeEntity>(); | |||||
healthPunchTimeIBLL.SaveEntity(keyValue, entity); | |||||
if (string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
} | |||||
return Success("保存成功!"); | |||||
} | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult EnableForm(string keyValue) | |||||
{ | |||||
healthPunchTimeIBLL.EnableEntity(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="HealthPunchTime" > | |||||
<div class="lr-form-item-title">开始时间<font face="宋体">*</font></div> | |||||
<input id="StarTime" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="HealthPunchTime" > | |||||
<div class="lr-form-item-title">结束时间<font face="宋体">*</font></div> | |||||
<input id="EndTime" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="HealthPunchTime" > | |||||
<div class="lr-form-item-title">描述<font face="宋体">*</font></div> | |||||
<div id="Description" isvalid="yes" checkexpession="NotNull" ></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="HealthPunchTime" > | |||||
<div class="lr-form-item-title">是否启用<font face="宋体">*</font></div> | |||||
<div id="CheckMark" isvalid="yes" checkexpession="NotNull" ></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="HealthPunchTime" style="display: none; " > | |||||
<div class="lr-form-item-title">当前用户</div> | |||||
<input id="CreateUser" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="HealthPunchTime" style="display: none; " > | |||||
<div class="lr-form-item-title">当前时间</div> | |||||
<input id="CreateTime" type="text" readonly class="form-control currentInfo lr-currentInfo-time" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="HealthPunchTime" > | |||||
<div class="lr-form-item-title">备注</div> | |||||
<textarea id="Remark" class="form-control" style="height:100px;" ></textarea> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/HealthPunchTime/Form.js") |
@@ -0,0 +1,56 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2022-06-17 09:17 | |||||
* 描 述:健康打卡时段 | |||||
*/ | |||||
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 () { | |||||
$('#Description').lrDataItemSelect({ code: 'HealthPunchType' }); | |||||
$('#CheckMark').lrDataItemSelect({ code: 'YesOrNoInt' }); | |||||
$('#CheckMark').lrselectSet("1"); | |||||
$('#CreateUser')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; | |||||
$('#CreateUser').val(learun.clientdata.get(['userinfo']).realName); | |||||
$('#CreateTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/HealthPunchTime/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/HealthPunchTime/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,42 @@ | |||||
@{ | |||||
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="multiple_condition_query"> | |||||
<div class="lr-query-formcontent"> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">描述</div> | |||||
<div id="Description"></div> | |||||
</div> | |||||
@*<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">是否启用</div> | |||||
<div id="CheckMark"></div> | |||||
</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> | |||||
<a id="lr_lock" class="btn btn-default"><i class="fa fa-plus"></i> 启用</a> | |||||
<a id="lr_unlock" class="btn btn-default"><i class="fa fa-plus"></i> 禁用</a> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/HealthPunchTime/Index.js") |
@@ -0,0 +1,154 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2022-06-17 09:17 | |||||
* 描 述:健康打卡时段 | |||||
*/ | |||||
var refreshGirdData; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
page.initGird(); | |||||
page.bind(); | |||||
}, | |||||
bind: function () { | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||||
page.search(queryJson); | |||||
}, 220, 400); | |||||
$('#Description').lrDataItemSelect({ code: 'HealthPunchType' }); | |||||
$('#CheckMark').lrDataItemSelect({ code: 'YesOrNoInt' }); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
// 新增 | |||||
$('#lr_add').on('click', function () { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '新增', | |||||
url: top.$.rootUrl + '/EducationalAdministration/HealthPunchTime/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/HealthPunchTime/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)) { | |||||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||||
var CheckMark = $('#gridtable').jfGridValue('CheckMark'); | |||||
if (CheckMark == 1) { | |||||
return | |||||
} | |||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
if (res) { | |||||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/HealthPunchTime/DeleteForm', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 启用 | |||||
$('#lr_lock').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||||
console.log(keyValue) | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerConfirm('是否确认启用!', function (res) { | |||||
if (res) { | |||||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/HealthPunchTime/EnableForm', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 禁用 | |||||
$('#lr_unlock').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerConfirm('是否确认启用!', function (res) { | |||||
if (res) { | |||||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/HealthPunchTime/EnableForm', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').lrAuthorizeJfGrid({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/HealthPunchTime/GetPageList', | |||||
headData: [ | |||||
{ label: "开始时间", name: "StarTime", width: 100, align: "left" }, | |||||
{ label: "结束时间", name: "EndTime", width: 100, align: "left" }, | |||||
{ | |||||
label: "描述", name: "Description", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'HealthPunchType', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "录入用户", name: "CreateUser", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('user', { | |||||
key: value, | |||||
callback: function (_data) { | |||||
callback(_data.name); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "录入时间", name: "CreateTime", width: 200, align: "left" }, | |||||
{ | |||||
label: "是否启用", name: "CheckMark", width: 100, align: "left", | |||||
formatter: function (cellvalue) { | |||||
return cellvalue == "0" ? "<span class=\"label label-success\">启用</span>" : | |||||
"<span class=\"label label-danger\">禁用</span>"; | |||||
} | |||||
}, | |||||
{ label: "备注", name: "Remark", width: 100, align: "left" }, | |||||
], | |||||
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(); | |||||
} |
@@ -833,6 +833,7 @@ | |||||
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_ExamPlanController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\Exam_ExamPlanController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\Sys_PsychologicalCounseController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\Sys_PsychologicalCounseController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_ExamTeacherTimeController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\Exam_ExamTeacherTimeController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\HealthPunchTimeController.cs" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | <Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | ||||
@@ -6551,6 +6552,10 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamTeacherTime\Index.js" /> | <Content Include="Areas\EducationalAdministration\Views\Exam_ExamTeacherTime\Index.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamTeacherTime\Form.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\Exam_ExamTeacherTime\Form.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamTeacherTime\Form.js" /> | <Content Include="Areas\EducationalAdministration\Views\Exam_ExamTeacherTime\Form.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\HealthPunchTime\Index.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\HealthPunchTime\Index.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\HealthPunchTime\Form.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\HealthPunchTime\Form.js" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<Folder Include="Areas\EducationalAdministration\Views\HomeStatistics\" /> | <Folder Include="Areas\EducationalAdministration\Views\HomeStatistics\" /> | ||||
@@ -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 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-06-17 09:17 | |||||
/// 描 述:健康打卡时段 | |||||
/// </summary> | |||||
public class HealthPunchTimeMap : EntityTypeConfiguration<HealthPunchTimeEntity> | |||||
{ | |||||
public HealthPunchTimeMap() | |||||
{ | |||||
#region 表、主键 | |||||
//表 | |||||
this.ToTable("HEALTHPUNCHTIME"); | |||||
//主键 | |||||
this.HasKey(t => t.ID); | |||||
#endregion | |||||
#region 配置关系 | |||||
#endregion | |||||
} | |||||
} | |||||
} | |||||
@@ -588,6 +588,7 @@ | |||||
<Compile Include="EducationalAdministration\ArrangeExamTermNewMap.cs" /> | <Compile Include="EducationalAdministration\ArrangeExamTermNewMap.cs" /> | ||||
<Compile Include="EducationalAdministration\Sys_PsychologicalCounseMap.cs" /> | <Compile Include="EducationalAdministration\Sys_PsychologicalCounseMap.cs" /> | ||||
<Compile Include="EducationalAdministration\Exam_ExamTeacherTimeMap.cs" /> | <Compile Include="EducationalAdministration\Exam_ExamTeacherTimeMap.cs" /> | ||||
<Compile Include="EducationalAdministration\HealthPunchTimeMap.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,148 @@ | |||||
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 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-06-17 09:17 | |||||
/// 描 述:健康打卡时段 | |||||
/// </summary> | |||||
public class HealthPunchTimeBLL : HealthPunchTimeIBLL | |||||
{ | |||||
private HealthPunchTimeService healthPunchTimeService = new HealthPunchTimeService(); | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<HealthPunchTimeEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return healthPunchTimeService.GetPageList(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取HealthPunchTime表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public HealthPunchTimeEntity GetHealthPunchTimeEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return healthPunchTimeService.GetHealthPunchTimeEntity(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 | |||||
{ | |||||
healthPunchTimeService.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, HealthPunchTimeEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
healthPunchTimeService.SaveEntity(keyValue, entity); | |||||
} | |||||
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 EnableEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
healthPunchTimeService.EnableEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,80 @@ | |||||
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 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-06-17 09:17 | |||||
/// 描 述:健康打卡时段 | |||||
/// </summary> | |||||
public class HealthPunchTimeEntity | |||||
{ | |||||
#region 实体成员 | |||||
/// <summary> | |||||
/// ID | |||||
/// </summary> | |||||
[Column("ID")] | |||||
public string ID { get; set; } | |||||
/// <summary> | |||||
/// StarTime | |||||
/// </summary> | |||||
[Column("STARTIME")] | |||||
public string StarTime { get; set; } | |||||
/// <summary> | |||||
/// EndTime | |||||
/// </summary> | |||||
[Column("ENDTIME")] | |||||
public string EndTime { get; set; } | |||||
/// <summary> | |||||
/// 描述 | |||||
/// </summary> | |||||
[Column("DESCRIPTION")] | |||||
public string Description { get; set; } | |||||
/// <summary> | |||||
/// CreateTime | |||||
/// </summary> | |||||
[Column("CREATETIME")] | |||||
public DateTime? CreateTime { get; set; } | |||||
/// <summary> | |||||
/// CreateUser | |||||
/// </summary> | |||||
[Column("CREATEUSER")] | |||||
public string CreateUser { get; set; } | |||||
/// <summary> | |||||
/// Remark | |||||
/// </summary> | |||||
[Column("REMARK")] | |||||
public string Remark { get; set; } | |||||
/// <summary> | |||||
/// CheckMark | |||||
/// </summary> | |||||
[Column("CHECKMARK")] | |||||
public int? CheckMark { get; set; } | |||||
#endregion | |||||
#region 扩展操作 | |||||
/// <summary> | |||||
/// 新增调用 | |||||
/// </summary> | |||||
public void Create() | |||||
{ | |||||
this.ID = Guid.NewGuid().ToString(); | |||||
} | |||||
/// <summary> | |||||
/// 编辑调用 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
public void Modify(string keyValue) | |||||
{ | |||||
this.ID = keyValue; | |||||
} | |||||
#endregion | |||||
#region 扩展字段 | |||||
#endregion | |||||
} | |||||
} | |||||
@@ -0,0 +1,51 @@ | |||||
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 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-06-17 09:17 | |||||
/// 描 述:健康打卡时段 | |||||
/// </summary> | |||||
public interface HealthPunchTimeIBLL | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<HealthPunchTimeEntity> GetPageList(Pagination pagination, string queryJson); | |||||
/// <summary> | |||||
/// 获取HealthPunchTime表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
HealthPunchTimeEntity GetHealthPunchTimeEntity(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, HealthPunchTimeEntity entity); | |||||
void EnableEntity(string keyValue); | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,188 @@ | |||||
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 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-06-17 09:17 | |||||
/// 描 述:健康打卡时段 | |||||
/// </summary> | |||||
public class HealthPunchTimeService : RepositoryFactory | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">查询参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<HealthPunchTimeEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" | |||||
t.ID, | |||||
t.StarTime, | |||||
t.EndTime, | |||||
t.Description, | |||||
t.CheckMark, | |||||
t.CreateUser, | |||||
t.CreateTime, | |||||
t.Remark | |||||
"); | |||||
strSql.Append(" FROM HealthPunchTime t "); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["Description"].IsEmpty()) | |||||
{ | |||||
dp.Add("Description", queryParam["Description"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.Description = @Description "); | |||||
} | |||||
if (!queryParam["CheckMark"].IsEmpty()) | |||||
{ | |||||
dp.Add("CheckMark", queryParam["CheckMark"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.CheckMark = @CheckMark "); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<HealthPunchTimeEntity>(strSql.ToString(), dp, pagination); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取HealthPunchTime表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public HealthPunchTimeEntity GetHealthPunchTimeEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<HealthPunchTimeEntity>(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<HealthPunchTimeEntity>(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, HealthPunchTimeEntity 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); | |||||
} | |||||
} | |||||
} | |||||
public void EnableEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
var entity = this.BaseRepository("CollegeMIS").FindEntity<HealthPunchTimeEntity>(keyValue); | |||||
if (entity.CheckMark == 0) | |||||
{ | |||||
entity.CheckMark = 1; | |||||
} | |||||
else if (entity.CheckMark == 1) | |||||
{ | |||||
entity.CheckMark = 0; | |||||
} | |||||
this.BaseRepository("CollegeMIS").Update(entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -1782,6 +1782,10 @@ | |||||
<Compile Include="EducationalAdministration\Exam_ExamTeacherTime\Exam_ExamTeacherTimeService.cs" /> | <Compile Include="EducationalAdministration\Exam_ExamTeacherTime\Exam_ExamTeacherTimeService.cs" /> | ||||
<Compile Include="EducationalAdministration\Exam_ExamTeacherTime\Exam_ExamTeacherTimeBLL.cs" /> | <Compile Include="EducationalAdministration\Exam_ExamTeacherTime\Exam_ExamTeacherTimeBLL.cs" /> | ||||
<Compile Include="EducationalAdministration\Exam_ExamTeacherTime\Exam_ExamTeacherTimeIBLL.cs" /> | <Compile Include="EducationalAdministration\Exam_ExamTeacherTime\Exam_ExamTeacherTimeIBLL.cs" /> | ||||
<Compile Include="EducationalAdministration\HealthPunchTime\HealthPunchTimeEntity.cs" /> | |||||
<Compile Include="EducationalAdministration\HealthPunchTime\HealthPunchTimeService.cs" /> | |||||
<Compile Include="EducationalAdministration\HealthPunchTime\HealthPunchTimeBLL.cs" /> | |||||
<Compile Include="EducationalAdministration\HealthPunchTime\HealthPunchTimeIBLL.cs" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | <ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | ||||