diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Thermography/Result/Result.css b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Thermography/Result/Result.css new file mode 100644 index 000000000..5f282702b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Thermography/Result/Result.css @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Thermography/Result/Result.html b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Thermography/Result/Result.html new file mode 100644 index 000000000..8e97c5c9e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Thermography/Result/Result.html @@ -0,0 +1,34 @@ +
+
+
+ 总共0条 +
+
+ + +
+
+
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Thermography/Result/Result.js b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Thermography/Result/Result.js new file mode 100644 index 000000000..b15bd2b9b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Thermography/Result/Result.js @@ -0,0 +1,174 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2020-04-16 15:52 + * 描 述:班级自诊打卡结果 + */ +(function () { + var begin = ''; + var end = ''; + var multipleData = null; + var page = { + grid: null, + init: function ($page) { + begin = ''; + end = ''; + multipleData = null; + page.grid = $page.find('#lr_EducationalAdministrationThermography_list').lrpagination({ + lclass: page.lclass, + rows: 10, // 每页行数 + getData: function (param, callback) {// 获取数据 param 分页参数,callback 异步回调 + param.begin = begin; + param.end = end; + param.multipleData = multipleData; + page.loadData(param, callback, $page); + }, + renderData: function (_index, _item, _$item) {// 渲染数据模板 + return page.rowRender(_index, _item, _$item, $page); + }, + click: function (item, $item, $et) {// 列表行点击事件 + if ($et.hasClass('lr-btn-danger')) { + page.btnClick(item, $item, $page); + } + else { + page.rowClick(item, $item, $page); + } + }, + btns: page.rowBtns + }); + // 时间搜索 + $page.find('.lr_time_search').searchdate({ + callback: function (_begin, _end) { + begin = _begin; + end = _end; + multipleData = null; + page.grid.reload(); + } + }); + // 多条件查询 + var $multiple = $page.find('.lr_multiple_search').multiplequery({ + callback: function (data) { + begin = ''; + end = ''; + multipleData = data || {}; + page.grid.reload(); + } + }); + $multiple.find('#ClassNo').lrpickerex({ + type: 'sourceData', + code: 'bjsj', + ivalue: 'classno', + itext: 'classname' + }); + $multiple.find('#PersonBeingMeasured').lrpickerex({ + type: 'sourceData', + code: 'StuInfoBasic', + ivalue: 'stuno', + itext: 'stuname' + }); + $multiple.find('#Status').lrpickerex({ + type: 'dataItem', + code: 'TemperatureMeasure' + }); + $multiple.find('#MeasureTime').lrpickerex({ + type: 'dataItem', + code: 'MeasureTime' + }); + $page.find('#lr_EducationalAdministrationThermography_btn').on('tap', function () { + learun.nav.go({ path: 'EducationalAdministration/Thermography/form', title: '新增', type: 'right' }); + }); + }, + lclass: 'lr-list', + loadData: function (param, callback, $page) {// 列表加载后台数据 + var _postParam = { + pagination: { + rows: param.rows, + page: param.page, + sidx: 'MeasureDate desc,PersonBeingMeasured', + sord: 'DESC' + }, + queryJson: '{}' + }; + if (param.multipleData) { + _postParam.queryJson = JSON.stringify(multipleData); + } + if (param.begin && param.end) { + _postParam.queryJson = JSON.stringify({ StartTime: param.begin, EndTime: param.end }); + } + learun.httpget(config.webapi + 'learun/adms/EducationalAdministration/Thermography/pagelist', _postParam, (data) => { + $page.find('.lr-badge').text('0'); + if (data) { + $page.find('.lr-badge').text(data.records); + callback(data.rows, parseInt(data.records)); + } + else { + callback([], 0); + } + }); + }, + rowRender: function (_index, _item, _$item, $page) {// 渲染列表行数据 + _$item.addClass('lr-list-item lr-list-item-multi'); + _$item.append($('

班级:

').dataFormatter({ + value: _item.ClassNo, + type: 'dataSource', + code: 'bjsj', + keyId: 'classno', + text: 'classname' + })); + _$item.append($('

测温人:

').dataFormatter({ + value: _item.MeasurerID, + type: 'dataSource', + code: 'BaseUser', + keyId: 'f_account', + text: 'f_realname' + })); + _$item.append($('

被测温人学号:

').dataFormatter({ + value: _item.PersonBeingMeasured + })); + _$item.append($('

被测温人:

').dataFormatter({ + value: _item.PersonBeingMeasured, + type: 'dataSource', + code: 'BaseUser', + keyId: 'f_account', + text: 'f_realname' + })); + _$item.append($('

状态:

').dataFormatter({ + value: _item.Status, + type: 'dataItem', + code: 'TemperatureMeasure' + })); + _$item.append($('

温度:

').dataFormatter({ value: _item.Temperature })); + _$item.append($('

处理结果:

').dataFormatter({ value: _item.ProcessingResult })); + _$item.append($('

备注:

').dataFormatter({ value: _item.Remark })); + _$item.append($('

测量时间:

').dataFormatter({ + value: _item.MeasureDate, + type: 'datetime', + dateformat: 'yyyy-MM-dd hh:mm:ss' + })); + _$item.append($('

测量时间段:

').dataFormatter({ + value: _item.MeasureTime, + type: 'dataItem', + code: 'MeasureTime' + })); + return ''; + }, + rowClick: function (item, $item, $page) {// 列表行点击触发方法 + learun.nav.go({ path: 'EducationalAdministration/Thermography/form', title: '详情', type: 'right', param: { keyValue: item.ID } }); + }, + btnClick: function (item, $item, $page) {// 左滑按钮点击事件 + learun.layer.confirm('确定要删除该笔数据吗?', function (_index) { + if (_index === '1') { + learun.layer.loading(true, '正在删除该笔数据'); + learun.httppost(config.webapi + 'learun/adms/EducationalAdministration/Thermography/delete', item.ID, (data) => { + if (data) {// 删除数据成功 + page.grid.reload(); + } + learun.layer.loading(false); + }); + } + }, '智慧校园提示', ['取消', '确定']); + }, + //rowBtns: ['删除'] // 列表行左滑按钮 + }; + return page; +})(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Thermography/measure/measure.css b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Thermography/measure/measure.css index 8ef6f50ab..8db6708d1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Thermography/measure/measure.css +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Thermography/measure/measure.css @@ -202,7 +202,7 @@ li { border-color: #cacaca !important; } */ -.timeTableBtn { +.timeTableBtn,.submitBtn { font-size: 16px; margin: 20px 12px; background: #0C86D8; @@ -211,6 +211,7 @@ li { line-height: 40px; height: 40px; color: #fff; + cursor:pointer; } .statusType { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Thermography/measure/measure.html b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Thermography/measure/measure.html index f81c12eb3..a932ff8d9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Thermography/measure/measure.html +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Thermography/measure/measure.html @@ -27,6 +27,7 @@
+
提交测温
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Thermography/measure/measure.js b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Thermography/measure/measure.js index 425fa2e07..56d3741ca 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Thermography/measure/measure.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Thermography/measure/measure.js @@ -52,7 +52,42 @@ $('.timeTableAlert').removeClass('active'); } - //确定 + //弹框确定按钮:单个学生提交测温 + //$page.find(".timeTableBtn").on('tap', + // function () { + // // 获取表单数据 + // if (!$page.find('.lr-form-container').lrformValid()) { + // return false; + // } + // var data = JSON.parse($(this).siblings('.timeTableAlertTop').attr('student')); + // data.Status = $page.find('#Status').lrpickerGet(); + // data.Temperature = $page.find('#Temperature').val(); + // data.ProcessingResult = $page.find('#ProcessingResult').val(); + // data.Remark = $page.find('#Remark').val(); + // data.MeasureTime = $page.find('#MeasureTime').lrpickerGet(); + // learun.layer.confirm('是否确认提交测温?', + // function (_index) { + // if (_index === '1') { + // learun.layer.loading(true, '正在提交'); + // learun.httppost( + // config.webapi + '/learun/adms/EducationalAdministration/Thermography/save', + // { + // keyValue: data.ID, + // strEntity: JSON.stringify(data) + // }, + // (data) => { + // learun.layer.loading(false); + // if (data) { + // learun.layer.toast("提交成功"); + // timeTableAlertFn(); + // loadData($page, param); + // } + // }); + // } + // }); + // }); + + //弹框确定按钮:弹框数据绑定到学生列表上 $page.find(".timeTableBtn").on('tap', function () { // 获取表单数据 @@ -65,28 +100,41 @@ data.ProcessingResult = $page.find('#ProcessingResult').val(); data.Remark = $page.find('#Remark').val(); data.MeasureTime = $page.find('#MeasureTime').lrpickerGet(); + $page.find('.timeTableList').find('li[stuNo="' + data.PersonBeingMeasured + '"]').attr('student', JSON.stringify(data)); + var classTemp = !data.Status ? 'sStatue1' : data.Status == "0" ? 'sStatue1' : data.Status == "1" ? 'sStatue2' : 'sStatue3'; + $page.find('.timeTableList').find('li[stuNo="' + data.PersonBeingMeasured + '"]').removeClass().addClass(classTemp); + timeTableAlertFn(); + }); + + //提交测温按钮:整个班级提交测温 + $page.find(".submitBtn").on('tap', + function () { + var dataArray = new Array(); + $.each($page.find('.timeTableList').find('li'), function (i, item) { + var dataItem = JSON.parse($(item).attr('student')); + dataArray.push(dataItem); + }); learun.layer.confirm('是否确认提交测温?', function (_index) { if (_index === '1') { learun.layer.loading(true, '正在提交'); learun.httppost( - config.webapi + '/learun/adms/EducationalAdministration/Thermography/save', + config.webapi + '/learun/adms/EducationalAdministration/Thermography/save2', { - keyValue: data.ID, - strEntity: JSON.stringify(data) + measureTime: $page.find('#MeasureTime').lrpickerGet(), + strEntity: JSON.stringify(dataArray) }, (data) => { learun.layer.loading(false); if (data) { learun.layer.toast("提交成功"); - timeTableAlertFn(); loadData($page, param); } }); } }); - }); + }); } }; @@ -110,11 +158,13 @@ var className = ''; if (weekData2.length == 0) { html = '
  • 暂时没有信息
  • ' + $('.submitBtn').hide(); } else { + $('.submitBtn').show(); className = weekData2[0].ClassName; $.each(weekData2, function (j, k) { var statusName = !k.Status ? 'sStatue1' : k.Status == "0" ? 'sStatue1' : k.Status == "1" ? 'sStatue2' : 'sStatue3'; - html += '
  • ' + + html += '
  • ' + k.PersonBeingMeasuredName + '' + '
  • '; }); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ThermographyController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ThermographyController.cs index c802bf5ba..bf96c0471 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ThermographyController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ThermographyController.cs @@ -58,6 +58,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + /// + /// 班级自诊打开结果 + /// + /// + [HttpGet] + public ActionResult IndexResult() + { + return View(); + } #endregion #region 获取数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Thermography/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Thermography/Index.js index 291765b6f..d9aed5d45 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Thermography/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Thermography/Index.js @@ -236,7 +236,16 @@ var bootstrap = function ($, learun) { key: value, code: 'TemperatureMeasure', callback: function (_data) { - callback(_data.text); + //callback(_data.text); + if (_data.text) { + if (_data.text == "正常") { + callback('' + _data.text + ''); + } else if (_data.text == "异常") { + callback('' + _data.text + ''); + } else { + callback('' + _data.text + ''); + } + } } }); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Thermography/IndexResult.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Thermography/IndexResult.cshtml new file mode 100644 index 000000000..7085627a6 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Thermography/IndexResult.cshtml @@ -0,0 +1,54 @@ +@{ + ViewBag.Title = "班级自诊打卡结果"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    系部
    +
    +
    +
    +
    专业
    +
    +
    +
    +
    班级
    +
    +
    +
    +
    被测温人
    +
    +
    +
    +
    状态
    +
    +
    +
    +
    测温时间段
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Thermography/IndexResult.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Thermography/IndexResult.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Thermography/IndexResult.js new file mode 100644 index 000000000..b29544089 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Thermography/IndexResult.js @@ -0,0 +1,226 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2020-04-16 15:52 + * 描 述:班级自诊打卡结果 + */ +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); + }, 300, 400); + $('#DeptNo').lrDataSourceSelect({ + code: 'CdDeptInfo', value: 'deptno', text: 'deptname', select: function (val) { + var deptno = ""; + if (val) { + deptno = val.deptno; + } + $('#MajorNo').lrselectRefresh({ + url: top.$.rootUrl + '/EducationalAdministration/CdMajor/GetListByDeptNo?DeptNo=' + deptno, + text: "MajorName", + value: "MajorNo" + }) + } + }); + $('#MajorNo').lrDataSourceSelect({ + code: 'CdMajorInfo', value: 'majorno', text: 'majorname', select: + function (val) { + var majorNo = ''; + if (val) { + majorNo = val.MajorNo; + } + $('#ClassNo').lrselectRefresh({ + url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GetClassByMajorNo?majorNo=' + majorNo, + text: "ClassName", + value: "ClassNo" + }) + } + }); + $('#ClassNo').lrDataSourceSelect({ + code: 'bjsj', value: 'classno', text: 'classname', select: function (val) { + var classNo = ''; + if (val) { + classNo = val.ClassNo; + } + $('#PersonBeingMeasured').lrselectRefresh({ + url: top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetStuInfoByClassNo?classNo=' + classNo, + text: "StuName", + value: "StuNo" + }) + } + }); + $('#PersonBeingMeasured').lrDataSourceSelect({ code: 'StuInfoBasic', value: 'stuno', text: 'stuname' }); + $('#Status').lrDataItemSelect({ code: 'TemperatureMeasure' }); + $('#MeasureTime').lrDataItemSelect({ code: 'MeasureTime' }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/Thermography/GetPageList', + headData: [ + { + label: "系", name: "DeptNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo', + key: value, + keyId: 'deptno', + callback: function (_data) { + callback(_data['deptname']); + } + }); + } + }, + { + label: "专业", name: "MajorNo", width: 100, 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: 100, 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: "MeasurerID", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', + key: value, + keyId: 'f_account', + callback: function (_data) { + callback(_data['f_realname']); + } + }); + } + }, + { + label: "被测温人学号", name: "PersonBeingMeasured", width: 100, align: "left" + }, + { + label: "被测温人", name: "PersonBeingMeasuredName", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', + key: row.PersonBeingMeasured, + keyId: 'f_account', + callback: function (_data) { + callback(_data['f_realname']); + } + }); + } + }, + { + label: "状态", name: "Status", width: 80, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'TemperatureMeasure', + callback: function (_data) { + //callback(_data.text); + if (_data.text) { + if (_data.text == "正常") { + callback('' + _data.text + ''); + } else if (_data.text == "异常") { + callback('' + _data.text + ''); + } else { + callback('' + _data.text + ''); + } + } + } + }); + } + }, + { label: "温度", name: "Temperature", width: 100, align: "left" }, + { label: "处理结果", name: "ProcessingResult", width: 100, align: "left" }, + { label: "备注", name: "Remark", width: 100, align: "left" }, + { label: "测量时间", name: "MeasureDate", width: 120, align: "left" }, + { + label: "测量时间段", name: "MeasureTime", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('dataItem', { + key: value, + code: 'MeasureTime', + callback: function (_data) { + callback(_data.text); + } + }); + } + }, + ], + mainId: 'ID', + isPage: true, + sidx: 'MeasureDate desc,PersonBeingMeasured', + sord: 'desc' + }); + }, + search: function (param) { + param = param || {}; + param.StartTime = startTime; + param.EndTime = endTime; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + }; + page.init(); +} 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 e127f6d05..179d3d9d9 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 @@ -1014,6 +1014,7 @@ + @@ -6883,6 +6884,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/EducationalAdministration/ThermographyApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/EducationalAdministration/ThermographyApi.cs index 657e44224..8347bc910 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/EducationalAdministration/ThermographyApi.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/EducationalAdministration/ThermographyApi.cs @@ -30,6 +30,7 @@ namespace Learun.Application.WebApi Get["/form"] = GetForm; Post["/delete"] = DeleteForm; Post["/save"] = SaveForm; + Post["/save2"] = SaveFormList; } #region 获取数据 @@ -104,7 +105,7 @@ namespace Learun.Application.WebApi return Success("删除成功!"); } /// - /// 保存实体数据(新增、修改) + /// 保存实体数据(新增、修改):单个学生提交测温 /// /// /// @@ -117,6 +118,18 @@ namespace Learun.Application.WebApi thermographyIBLL.SaveEntity(this.userInfo, parameter.keyValue, entity); return Success("保存成功!"); } + /// + /// 保存实体数据(新增、修改):整个班级提交测温 + /// + /// + /// + public Response SaveFormList(dynamic _) + { + ReqFormEntity parameter = this.GetReqData(); + List entities = parameter.strEntity.ToObject>(); + thermographyIBLL.SaveEntityList(parameter.measureTime, entities); + return Success("保存成功!"); + } #endregion #region 私有类 @@ -128,6 +141,8 @@ namespace Learun.Application.WebApi { public string keyValue { get; set; } public string strEntity { get; set; } + public string measureTime { get; set; } + } #endregion diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Thermography/ThermographyService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Thermography/ThermographyService.cs index 3e1da4e07..02b77e286 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Thermography/ThermographyService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Thermography/ThermographyService.cs @@ -536,6 +536,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration var now = DateTime.Now; var nowDate = DateTime.Now.Date; var nextDate = DateTime.Now.AddDays(1).Date; + var pushTitle = string.Empty;//微信推送标题 foreach (var entity in entities) { entity.MeasurerID = userInfo.account; @@ -556,28 +557,32 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration //体温异常 if (entity.Status == "2") { - try + if (string.IsNullOrEmpty(pushTitle)) { - var stuModel = db.FindEntity(x => x.StuNo == entity.PersonBeingMeasured); - if (stuModel != null) - { - var title = string.Format("{0}({1})", stuModel.StuName, stuModel.StuNo); - //读取信息推送管理-班级自诊打卡体温异常学生推送(05)的配置 - var informationPushEntity = this.BaseRepository().FindEntity(x => x.PushItem == "05"); - if (informationPushEntity != null && informationPushEntity.Status == true) - { - //微信推送 - PushWeixin(title); - } - - } + var classModel = db.FindEntity(x => x.ClassNo == entity.ClassNo); + pushTitle = string.Format("{0}班级({1})发现异常学生:{2}({3})", classModel?.ClassName, entity.ClassNo, entity.PersonBeingMeasuredName, entity.PersonBeingMeasured); } - catch (Exception e) + else { + pushTitle += string.Format(",{0}({1})", entity.PersonBeingMeasuredName, entity.PersonBeingMeasured); } } } db.Commit(); + //读取信息推送管理-班级自诊打卡体温异常学生推送(05)的配置 + var informationPushEntity = this.BaseRepository().FindEntity(x => x.PushItem == "05"); + if (informationPushEntity != null && informationPushEntity.Status == true) + { + try + { + //微信推送 + PushWeixin(pushTitle); + } + catch (Exception) + { + throw; + } + } } catch (Exception ex) {