diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/HealthPunchStuController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/HealthPunchStuController.cs
new file mode 100644
index 000000000..010684899
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/HealthPunchStuController.cs
@@ -0,0 +1,132 @@
+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
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2022-06-17 11:00
+ /// 描 述:体温上报
+ ///
+ public class HealthPunchStuController : MvcControllerBase
+ {
+ private HealthPunchStuIBLL healthPunchStuIBLL = new HealthPunchStuBLL();
+
+ #region 视图功能
+
+ ///
+ /// 主页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Index()
+ {
+ return View();
+ }
+ ///
+ /// 表单页
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Form()
+ {
+ return View();
+ }
+ #endregion
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetPageList(string pagination, string queryJson)
+ {
+ Pagination paginationobj = pagination.ToObject();
+ var data = healthPunchStuIBLL.GetPageList(paginationobj, queryJson);
+ var jsonData = new
+ {
+ rows = data,
+ total = paginationobj.total,
+ page = paginationobj.page,
+ records = paginationobj.records
+ };
+ return Success(jsonData);
+ }
+ ///
+ /// 获取表单数据
+ ///
+ /// 主键
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetFormData(string keyValue)
+ {
+ var HealthPunchStuData = healthPunchStuIBLL.GetHealthPunchStuEntity(keyValue);
+ var jsonData = new
+ {
+ HealthPunchStu = HealthPunchStuData,
+ };
+ return Success(jsonData);
+ }
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult DeleteForm(string keyValue)
+ {
+ healthPunchStuIBLL.DeleteEntity(keyValue);
+ return Success("删除成功!");
+ }
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ [AjaxOnly]
+ public ActionResult SaveForm(string keyValue, string strEntity)
+ {
+ HealthPunchStuEntity entity = strEntity.ToObject();
+ healthPunchStuIBLL.SaveEntity(keyValue, entity);
+ return Success("保存成功!");
+ }
+
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ [AjaxOnly]
+ public ActionResult PunchCard(string keyValue, string strEntity)
+ {
+ HealthPunchStuEntity entity = strEntity.ToObject();
+ var result = healthPunchStuIBLL.PunchCard(keyValue, entity);
+ return Success(result);
+ }
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/HealthPunchTimeController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/HealthPunchTimeController.cs
index 4b93c7489..9ae7c8b6f 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/HealthPunchTimeController.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/HealthPunchTimeController.cs
@@ -106,10 +106,22 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
public ActionResult SaveForm(string keyValue, string strEntity)
{
HealthPunchTimeEntity entity = strEntity.ToObject();
- healthPunchTimeIBLL.SaveEntity(keyValue, entity);
+ var model = healthPunchTimeIBLL.GetTypeEntity(entity.Description);
if (string.IsNullOrEmpty(keyValue))
{
+ if (model != null)
+ {
+ return Fail("当前时间段已存在!");
+ }
+ }
+ else
+ {
+ if (model != null && model.ID != keyValue)
+ {
+ return Fail("当前时间段已存在!");
+ }
}
+ healthPunchTimeIBLL.SaveEntity(keyValue, entity);
return Success("保存成功!");
}
[HttpPost]
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchStu/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchStu/Form.cshtml
new file mode 100644
index 000000000..fbfdbe72f
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchStu/Form.cshtml
@@ -0,0 +1,19 @@
+@{
+ ViewBag.Title = "体温上报";
+ Layout = "~/Views/Shared/_Form.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/HealthPunchStu/Form.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchStu/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchStu/Form.js
new file mode 100644
index 000000000..893096d41
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchStu/Form.js
@@ -0,0 +1,52 @@
+/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
+ * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ * 创建人:超级管理员
+ * 日 期:2022-06-17 11:00
+ * 描 述:体温上报
+ */
+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 () {
+ $('#StuNo')[0].lrvalue = learun.clientdata.get(['userinfo']).userId;
+ $('#StuNo').val(learun.clientdata.get(['userinfo']).realName);
+ },
+ initData: function () {
+ if (!!keyValue) {
+ $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/HealthPunchStu/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/HealthPunchStu/PunchCard?keyValue=' + keyValue, postData, function (res) {
+ // 保存成功后才回调
+ if (!!callBack) {
+ callBack();
+ }
+ });
+ };
+ page.init();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchStu/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchStu/Index.cshtml
new file mode 100644
index 000000000..99ef0b939
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchStu/Index.cshtml
@@ -0,0 +1,26 @@
+@{
+ ViewBag.Title = "体温上报";
+ Layout = "~/Views/Shared/_Index.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/HealthPunchStu/Index.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchStu/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchStu/Index.js
new file mode 100644
index 000000000..5a17a5afe
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchStu/Index.js
@@ -0,0 +1,137 @@
+/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
+ * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ * 创建人:超级管理员
+ * 日 期:2022-06-17 11:00
+ * 描 述:体温上报
+ */
+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/HealthPunchStu/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/HealthPunchStu/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/HealthPunchStu/DeleteForm', { keyValue: keyValue }, function () {
+ refreshGirdData();
+ });
+ }
+ });
+ }
+ });
+ },
+ // 初始化列表
+ initGird: function () {
+ $('#gridtable').jfGrid({
+ url: top.$.rootUrl + '/EducationalAdministration/HealthPunchStu/GetPageList',
+ headData: [
+ { label: "学工号", name: "StuNo", width: 100, align: "left" },
+ { label: "学生姓名", name: "StuName", width: 100, align: "left" },
+ {
+ label: "性别", name: "Sex", width: 100, align: "left",
+ formatter: function (cellvalue) {
+ return cellvalue == 1 ? "男" : "女";
+ }
+ },
+ {
+ label: "所属院校", name: "F_School", width: 150, align: "left",
+ formatterAsync: function (callback, value, row, op, $cell) {
+ learun.clientdata.getAsync('custmerData', {
+ url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company',
+ key: value,
+ keyId: 'f_companyid',
+ callback: function (_data) {
+ callback(_data['f_fullname']);
+ }
+ });
+ }
+ },
+ {
+ label: "所属专业", name: "MajorNo", width: 150, align: "left",
+ formatterAsync: function (callback, value, row, op, $cell) {
+ learun.clientdata.getAsync('custmerData', {
+ url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
+ key: value,
+ keyId: 'majorno',
+ callback: function (_data) {
+ callback(_data['majorname']);
+ }
+ });
+ }
+ },
+ {
+ label: "所属班级", name: "ClassNo", width: 150, align: "left",
+ formatterAsync: function (callback, value, row, op, $cell) {
+ learun.clientdata.getAsync('custmerData', {
+ url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
+ key: value,
+ keyId: 'classno',
+ callback: function (_data) {
+ callback(_data['classname']);
+ }
+ });
+ }
+ },
+ { label: "年级", name: "Grade", width: 100, align: "left" },
+ { label: "联系方式", name: "Phone", width: 100, align: "left" },
+ { label: "阶段", name: "Temperature", width: 100, align: "left" },
+ { label: "打卡所在地址", name: "Address", width: 200, align: "left" },
+ { label: "打卡时间", name: "CreateTime", width: 140, align: "left" },
+ { label: "备注", name: "Remark", width: 200, align: "left" },
+ ],
+ mainId: 'ID',
+ isPage: true,
+ sidx: 'CreateTime desc',
+ });
+ page.search();
+ },
+ search: function (param) {
+ param = param || {};
+ $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
+ }
+ };
+ refreshGirdData = function () {
+ $('#gridtable').jfGridSet('reload');
+ };
+ page.init();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchTime/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchTime/Index.cshtml
index 5c19a70aa..2ba19d47d 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchTime/Index.cshtml
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchTime/Index.cshtml
@@ -30,8 +30,8 @@
新增
编辑
删除
- 启用
- 禁用
+ 禁/启用
+ @* 禁用*@
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchTime/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchTime/Index.js
index 7aa3016e6..c0c99165a 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchTime/Index.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/HealthPunchTime/Index.js
@@ -39,6 +39,11 @@ var bootstrap = function ($, learun) {
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
+ var CheckMark = $('#gridtable').jfGridValue('CheckMark');
+ if (CheckMark !== 1) {
+ learun.alert.warning("当前项目已启用不能编辑!");
+ return;
+ }
learun.layerForm({
id: 'form',
title: '编辑',
@@ -55,10 +60,10 @@ var bootstrap = function ($, learun) {
$('#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
+ if (CheckMark !== 1) {
+ learun.alert.warning("当前项目已启用不能删除!");
+ return;
}
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
@@ -83,19 +88,6 @@ var bootstrap = function ($, learun) {
});
}
});
- // 禁用
- $('#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 () {
@@ -138,7 +130,9 @@ var bootstrap = function ($, learun) {
{ label: "备注", name: "Remark", width: 100, align: "left" },
],
mainId: 'ID',
- isPage: true
+ isPage: true,
+ sidx: 'Description asc',
+
});
page.search();
},
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
index 7a88a1e0e..148722cb5 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
@@ -834,6 +834,7 @@
+
@@ -6556,6 +6557,10 @@
+
+
+
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/HealthPunchStuMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/HealthPunchStuMap.cs
new file mode 100644
index 000000000..f3f3f82bc
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/HealthPunchStuMap.cs
@@ -0,0 +1,29 @@
+using Learun.Application.TwoDevelopment.EducationalAdministration;
+using System.Data.Entity.ModelConfiguration;
+
+namespace Learun.Application.Mapping
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2022-06-17 11:00
+ /// 描 述:体温上报
+ ///
+ public class HealthPunchStuMap : EntityTypeConfiguration
+ {
+ public HealthPunchStuMap()
+ {
+ #region 表、主键
+ //表
+ this.ToTable("HEALTHPUNCHSTU");
+ //主键
+ this.HasKey(t => t.ID);
+ #endregion
+
+ #region 配置关系
+ #endregion
+ }
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
index 7cbcc4ae0..2385e2b03 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
@@ -589,6 +589,7 @@
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchStu/HealthPunchStuBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchStu/HealthPunchStuBLL.cs
new file mode 100644
index 000000000..8ea6781e0
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchStu/HealthPunchStuBLL.cs
@@ -0,0 +1,143 @@
+using Learun.Util;
+using System;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.EducationalAdministration
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2022-06-17 11:00
+ /// 描 述:体温上报
+ ///
+ public class HealthPunchStuBLL : HealthPunchStuIBLL
+ {
+ private HealthPunchStuService healthPunchStuService = new HealthPunchStuService();
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 分页参数
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ return healthPunchStuService.GetPageList(pagination, queryJson);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取HealthPunchStu表实体数据
+ ///
+ /// 主键
+ ///
+ public HealthPunchStuEntity GetHealthPunchStuEntity(string keyValue)
+ {
+ try
+ {
+ return healthPunchStuService.GetHealthPunchStuEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ public void DeleteEntity(string keyValue)
+ {
+ try
+ {
+ healthPunchStuService.DeleteEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ ///
+ public void SaveEntity(string keyValue, HealthPunchStuEntity entity)
+ {
+ try
+ {
+ healthPunchStuService.SaveEntity(keyValue, entity);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ public string PunchCard(string keyValue, HealthPunchStuEntity entity)
+ {
+ try
+ {
+ return healthPunchStuService.PunchCard(keyValue, entity);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchStu/HealthPunchStuEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchStu/HealthPunchStuEntity.cs
new file mode 100644
index 000000000..a73025327
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchStu/HealthPunchStuEntity.cs
@@ -0,0 +1,145 @@
+using Learun.Util;
+using System;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace Learun.Application.TwoDevelopment.EducationalAdministration
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2022-06-17 11:00
+ /// 描 述:体温上报
+ ///
+ public class HealthPunchStuEntity
+ {
+ #region 实体成员
+ ///
+ /// ID
+ ///
+ [Column("ID")]
+ public string ID { get; set; }
+ ///
+ /// 打卡开始时间
+ ///
+ [Column("STARTTIME")]
+ public string StartTime { get; set; }
+ ///
+ /// 打卡结束时间
+ ///
+ [Column("ENDRTIME")]
+ public string EndRTime { get; set; }
+ ///
+ /// 学号
+ ///
+ [Column("STUNO")]
+ public string StuNo { get; set; }
+ ///
+ /// 学生名称
+ ///
+ [Column("STUNAME")]
+ public string StuName { get; set; }
+ ///
+ /// Sex
+ ///
+ [Column("SEX")]
+ public int? Sex { get; set; }
+ ///
+ /// 温度
+ ///
+ [Column("TEMPERATURE")]
+ public string Temperature { get; set; }
+ ///
+ /// 年级
+ ///
+ [Column("GRADE")]
+ public string Grade { get; set; }
+ ///
+ /// ClassNo
+ ///
+ [Column("CLASSNO")]
+ public string ClassNo { get; set; }
+ ///
+ /// DeptNo
+ ///
+ [Column("DEPTNO")]
+ public string DeptNo { get; set; }
+ ///
+ /// MajorNo
+ ///
+ [Column("MAJORNO")]
+ public string MajorNo { get; set; }
+ ///
+ /// F_School
+ ///
+ [Column("F_SCHOOL")]
+ public string F_School { get; set; }
+ ///
+ /// Phone
+ ///
+ [Column("PHONE")]
+ public string Phone { get; set; }
+ ///
+ /// Year
+ ///
+ [Column("YEAR")]
+ public string Year { get; set; }
+ ///
+ /// DKDate
+ ///
+ [Column("DKDATE")]
+ public DateTime? DKDate { get; set; }
+ ///
+ /// Moth
+ ///
+ [Column("MOTH")]
+ public string Moth { get; set; }
+ ///
+ /// Day
+ ///
+ [Column("DAY")]
+ public string Day { get; set; }
+ ///
+ /// DKType
+ ///
+ [Column("DKTYPE")]
+ public string DKType { get; set; }
+ ///
+ /// Address
+ ///
+ [Column("ADDRESS")]
+ public string Address { get; set; }
+ ///
+ /// 打卡时间
+ ///
+ [Column("CREATETIME")]
+ public DateTime? CreateTime { get; set; }
+ ///
+ /// Remark
+ ///
+ [Column("REMARK")]
+ public string Remark { get; set; }
+ #endregion
+
+ #region 扩展操作
+ ///
+ /// 新增调用
+ ///
+ public void Create()
+ {
+ this.ID = Guid.NewGuid().ToString();
+ }
+ ///
+ /// 编辑调用
+ ///
+ ///
+ public void Modify(string keyValue)
+ {
+ this.ID = keyValue;
+ }
+ #endregion
+ #region 扩展字段
+ #endregion
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchStu/HealthPunchStuIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchStu/HealthPunchStuIBLL.cs
new file mode 100644
index 000000000..8404e7d0b
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchStu/HealthPunchStuIBLL.cs
@@ -0,0 +1,51 @@
+using Learun.Util;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.EducationalAdministration
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2022-06-17 11:00
+ /// 描 述:体温上报
+ ///
+ public interface HealthPunchStuIBLL
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ ///
+ IEnumerable GetPageList(Pagination pagination, string queryJson);
+ ///
+ /// 获取HealthPunchStu表实体数据
+ ///
+ /// 主键
+ ///
+ HealthPunchStuEntity GetHealthPunchStuEntity(string keyValue);
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ void DeleteEntity(string keyValue);
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ void SaveEntity(string keyValue, HealthPunchStuEntity entity);
+
+ string PunchCard(string keyValue, HealthPunchStuEntity entity);
+
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchStu/HealthPunchStuService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchStu/HealthPunchStuService.cs
new file mode 100644
index 000000000..5901add0b
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchStu/HealthPunchStuService.cs
@@ -0,0 +1,263 @@
+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
+{
+ ///
+ /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
+ /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2022-06-17 11:00
+ /// 描 述:体温上报
+ ///
+ public class HealthPunchStuService : RepositoryFactory
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ var strSql = new StringBuilder();
+ strSql.Append("SELECT ");
+ strSql.Append(@"* ");
+ strSql.Append(" FROM HealthPunchStu t ");
+ strSql.Append(" WHERE 1=1 ");
+ var queryParam = queryJson.ToJObject();
+ // 虚拟参数
+ var dp = new DynamicParameters(new { });
+ return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取HealthPunchStu表实体数据
+ ///
+ /// 主键
+ ///
+ public HealthPunchStuEntity GetHealthPunchStuEntity(string keyValue)
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ ///
+ /// 主键
+ public void DeleteEntity(string keyValue)
+ {
+ try
+ {
+ this.BaseRepository("CollegeMIS").Delete(t => t.ID == keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ ///
+ /// 主键
+ /// 实体
+ public void SaveEntity(string keyValue, HealthPunchStuEntity entity)
+ {
+ try
+ {
+ var userInfo = LoginUserInfo.Get();
+ var stuInfo = this.BaseRepository("CollegeMIS").FindEntity(x => x.StuNo == userInfo.account);
+ if (stuInfo != null)
+ {
+ entity.StuNo = stuInfo.StuNo;
+ entity.StuName = userInfo.realName;
+ entity.Phone = stuInfo.mobile;
+ entity.F_School = stuInfo.F_SchoolId;
+ entity.DeptNo = stuInfo.DeptNo;
+ entity.MajorNo = stuInfo.MajorNo;
+ entity.ClassNo = stuInfo.ClassNo;
+ entity.Grade = stuInfo.Grade;
+ entity.Sex = Convert.ToInt32(stuInfo.GenderNo);
+ entity.CreateTime = DateTime.Now;
+ entity.DKDate = DateTime.Now;
+ entity.Year = DateTime.Now.Year.ToString();
+ entity.Moth = DateTime.Now.Month.ToString();
+ entity.Day = DateTime.Now.Day.ToString();
+ }
+ entity.Create();
+ this.BaseRepository("CollegeMIS").Insert(entity);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ public string PunchCard(string keyValue, HealthPunchStuEntity entity)
+ {
+ try
+ {
+ //获取打卡规则
+ var dktime1 = this.BaseRepository("CollegeMIS").FindEntity(x => x.CheckMark == 0 && x.Description == "1");
+ var dktime2 = this.BaseRepository("CollegeMIS").FindEntity(x => x.CheckMark == 0 && x.Description == "2");
+ var dktime3 = this.BaseRepository("CollegeMIS").FindEntity(x => x.CheckMark == 0 && x.Description == "3");
+
+ var datenow = DateTime.Now.ToString("yyyy-MM-dd");
+ DateTime Nowdate = DateTime.Now;
+ DateTime todyTime = DateTime.Now.Date;
+ var userInfo = LoginUserInfo.Get();
+
+ if (dktime1 != null && dktime2 != null && dktime3 != null)
+ {
+ DateTime Startime1 = Convert.ToDateTime(datenow + " " + dktime1.StarTime);
+ DateTime Startime2 = Convert.ToDateTime(datenow + " " + dktime1.EndTime);
+ DateTime Startime3 = Convert.ToDateTime(datenow + " " + dktime2.StarTime);
+ DateTime Startime4 = Convert.ToDateTime(datenow + " " + dktime2.EndTime);
+ DateTime Startime5 = Convert.ToDateTime(datenow + " " + dktime3.StarTime);
+ DateTime Startime6 = Convert.ToDateTime(datenow + " " + dktime3.EndTime);
+
+ #region 学生数据
+ var stuInfo = this.BaseRepository("CollegeMIS").FindEntity(x => x.StuNo == userInfo.account);
+ if (stuInfo != null)
+ {
+ entity.StuNo = stuInfo.StuNo;
+ entity.StuName = userInfo.realName;
+ entity.Phone = stuInfo.mobile;
+ entity.F_School = stuInfo.F_SchoolId;
+ entity.DeptNo = stuInfo.DeptNo;
+ entity.MajorNo = stuInfo.MajorNo;
+ entity.ClassNo = stuInfo.ClassNo;
+ entity.Grade = stuInfo.Grade;
+ entity.Sex = Convert.ToInt32(stuInfo.GenderNo);
+ entity.CreateTime = DateTime.Now;
+ entity.DKDate = DateTime.Now;
+ entity.Year = DateTime.Now.Year.ToString();
+ entity.Moth = DateTime.Now.Month.ToString();
+ entity.Day = DateTime.Now.Day.ToString();
+ }
+ else
+ {
+ return "学生数据不存在!";
+ }
+ #endregion
+
+ if (Startime1 <= Nowdate && Startime2 >= Nowdate) //早上打卡
+ {
+ var HealthPunchStu = this.BaseRepository("CollegeMIS").FindEntity(x => x.DKDate == todyTime && x.DKType == "1" && x.StuNo == userInfo.account);
+ if (HealthPunchStu == null)
+ {
+ entity.DKType = "1";
+ }
+ else
+ {
+ return "请勿重复打卡!";
+ }
+ }
+ else if (Startime3 <= Nowdate && Startime4 >= Nowdate)
+ {
+ var HealthPunchStu = this.BaseRepository("CollegeMIS").FindEntity(x => x.DKDate == todyTime && x.DKType == "2" && x.StuNo == userInfo.account);
+ if (HealthPunchStu == null)
+ {
+ entity.DKType = "2";
+ }
+ else
+ {
+ return "请勿重复打卡!";
+ }
+ }
+ else if (Startime5 <= Nowdate && Startime6 >= Nowdate)
+ {
+ var HealthPunchStu = this.BaseRepository("CollegeMIS").FindEntity(x => x.DKDate == todyTime && x.DKType == "3" && x.StuNo == userInfo.account);
+ if (HealthPunchStu == null)
+ {
+ entity.DKType = "3";
+ }
+ else
+ {
+ return "请勿重复打卡";
+ }
+ }
+ else
+ {
+ return "请在规定的时间段内打卡!";
+ }
+ }
+ else
+ {
+ return "请先设置打卡时间";
+ }
+ entity.Create();
+ this.BaseRepository("CollegeMIS").Insert(entity);
+ return "保存成功";
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchTime/HealthPunchTimeBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchTime/HealthPunchTimeBLL.cs
index 48b16879f..00e2fbd19 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchTime/HealthPunchTimeBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchTime/HealthPunchTimeBLL.cs
@@ -66,6 +66,24 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
}
+ public HealthPunchTimeEntity GetTypeEntity(string keyValue)
+ {
+ try
+ {
+ return healthPunchTimeService.GetTypeEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
#endregion
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchTime/HealthPunchTimeIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchTime/HealthPunchTimeIBLL.cs
index c62c4186b..0c69ea963 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchTime/HealthPunchTimeIBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchTime/HealthPunchTimeIBLL.cs
@@ -27,6 +27,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// 主键
///
HealthPunchTimeEntity GetHealthPunchTimeEntity(string keyValue);
+ HealthPunchTimeEntity GetTypeEntity(string Type);
+
#endregion
#region 提交数据
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchTime/HealthPunchTimeService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchTime/HealthPunchTimeService.cs
index fad36cb22..519346852 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchTime/HealthPunchTimeService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/HealthPunchTime/HealthPunchTimeService.cs
@@ -94,6 +94,24 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
}
+ public HealthPunchTimeEntity GetTypeEntity(string keyValue)
+ {
+ try
+ {
+ return this.BaseRepository("CollegeMIS").FindEntity(x => x.Description == keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
#endregion
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
index 944b75ed2..3b1b116b8 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
@@ -1786,6 +1786,10 @@
+
+
+
+