@@ -0,0 +1 @@ | |||
|
@@ -0,0 +1,34 @@ | |||
<div class="lr-page lr-EducationalAdministrationThermography-page"> | |||
<div class="lr-page-tool"> | |||
<div class="lr-tool-left"> | |||
总共<span class="lr-badge lr-badge-primary">0</span>条 | |||
</div> | |||
<div class="lr-tool-right"> | |||
<div class="lr-tool-right-btn lr_multiple_search"> | |||
<i class="iconfont icon-searchlist"></i> | |||
<div class="lr-tool-right-btn-content lr-form-container"> | |||
<div class="lr-form-row"> | |||
<label>班级</label> | |||
<div id="ClassNo"></div> | |||
</div> | |||
<div class="lr-form-row"> | |||
<label>被测温人</label> | |||
<div id="PersonBeingMeasured"></div> | |||
</div> | |||
<div class="lr-form-row"> | |||
<label>状态</label> | |||
<div id="Status"></div> | |||
</div> | |||
<div class="lr-form-row"> | |||
<label>测温时间段</label> | |||
<div id="MeasureTime"></div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-tool-right-btn lr_time_search" > | |||
<i class="iconfont icon-time"></i> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-page-content" id="lr_EducationalAdministrationThermography_list"></div> | |||
</div> |
@@ -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($('<p class="lr-ellipsis"><span>班级:</span></p>').dataFormatter({ | |||
value: _item.ClassNo, | |||
type: 'dataSource', | |||
code: 'bjsj', | |||
keyId: 'classno', | |||
text: 'classname' | |||
})); | |||
_$item.append($('<p class="lr-ellipsis"><span>测温人:</span></p>').dataFormatter({ | |||
value: _item.MeasurerID, | |||
type: 'dataSource', | |||
code: 'BaseUser', | |||
keyId: 'f_account', | |||
text: 'f_realname' | |||
})); | |||
_$item.append($('<p class="lr-ellipsis"><span>被测温人学号:</span></p>').dataFormatter({ | |||
value: _item.PersonBeingMeasured | |||
})); | |||
_$item.append($('<p class="lr-ellipsis"><span>被测温人:</span></p>').dataFormatter({ | |||
value: _item.PersonBeingMeasured, | |||
type: 'dataSource', | |||
code: 'BaseUser', | |||
keyId: 'f_account', | |||
text: 'f_realname' | |||
})); | |||
_$item.append($('<p class="lr-ellipsis"><span>状态:</span></p>').dataFormatter({ | |||
value: _item.Status, | |||
type: 'dataItem', | |||
code: 'TemperatureMeasure' | |||
})); | |||
_$item.append($('<p class="lr-ellipsis"><span>温度:</span></p>').dataFormatter({ value: _item.Temperature })); | |||
_$item.append($('<p class="lr-ellipsis"><span>处理结果:</span></p>').dataFormatter({ value: _item.ProcessingResult })); | |||
_$item.append($('<p class="lr-ellipsis"><span>备注:</span></p>').dataFormatter({ value: _item.Remark })); | |||
_$item.append($('<p class="lr-ellipsis"><span>测量时间:</span></p>').dataFormatter({ | |||
value: _item.MeasureDate, | |||
type: 'datetime', | |||
dateformat: 'yyyy-MM-dd hh:mm:ss' | |||
})); | |||
_$item.append($('<p class="lr-ellipsis"><span>测量时间段:</span></p>').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: ['<a class="lr-btn-danger">删除</a>'] // 列表行左滑按钮 | |||
}; | |||
return page; | |||
})(); |
@@ -84,7 +84,7 @@ | |||
pagination: { | |||
rows: param.rows, | |||
page: param.page, | |||
sidx: 'MeasureDate', | |||
sidx: 'MeasureDate desc,PersonBeingMeasured', | |||
sord: 'DESC' | |||
}, | |||
queryJson: JSON.stringify({ MeasurerID: learun.storage.get('userinfo').baseinfo.account }) | |||
@@ -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 { | |||
@@ -27,6 +27,7 @@ | |||
<!--学生列表--> | |||
<div class="timeTable_sec2"> | |||
<ul class="timeTableList"></ul> | |||
<div class="submitBtn">提交测温</div> | |||
</div> | |||
<!--弹层--> | |||
<div class="timeTableAlert"> | |||
@@ -11,15 +11,16 @@ | |||
change: function (value, text, datalist, $self) { | |||
loadData($page, param); | |||
} | |||
}).lrpickerSet(0); | |||
}).lrpickerSet(-1); | |||
//状态 | |||
$page.find('#Status').lrpickerex({ | |||
code: 'TemperatureMeasure', | |||
type: 'dataItem' | |||
}).lrpickerSet(1); | |||
//初始化 | |||
setTimeout(function () { | |||
var timer = setTimeout(function () { | |||
loadData($page, param); | |||
clearTimeout(timer); | |||
}, 1000); | |||
//选择学生 | |||
@@ -51,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 () { | |||
// 获取表单数据 | |||
@@ -64,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); | |||
} | |||
}); | |||
} | |||
}); | |||
}); | |||
}); | |||
} | |||
}; | |||
@@ -109,11 +158,13 @@ | |||
var className = ''; | |||
if (weekData2.length == 0) { | |||
html = '<li>暂时没有信息</li>' | |||
$('.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 += '<li student=' + JSON.stringify(k) + ' class="' + statusName + '"><div>' + | |||
html += '<li stuNo="' + k.PersonBeingMeasured + '" student=' + JSON.stringify(k) + ' class="' + statusName + '"><div>' + | |||
k.PersonBeingMeasuredName + '<span class="iconfont icon-check"></span>' + | |||
'</div></li>'; | |||
}); | |||
@@ -58,6 +58,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 班级自诊打开结果 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult IndexResult() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -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('<span class=\"label label-success\">' + _data.text + '</span>'); | |||
} else if (_data.text == "异常") { | |||
callback('<span class=\"label label-danger\">' + _data.text + '</span>'); | |||
} else { | |||
callback('<span class=\"label label-default\">' + _data.text + '</span>'); | |||
} | |||
} | |||
} | |||
}); | |||
} | |||
@@ -260,7 +269,7 @@ var bootstrap = function ($, learun) { | |||
], | |||
mainId: 'ID', | |||
isPage: true, | |||
sidx: 'MeasureDate', | |||
sidx: 'MeasureDate desc,PersonBeingMeasured', | |||
sord: 'desc' | |||
}); | |||
}, | |||
@@ -0,0 +1,54 @@ | |||
@{ | |||
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> | |||
<div id="DeptNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">专业</div> | |||
<div id="MajorNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">班级</div> | |||
<div id="ClassNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">被测温人</div> | |||
<div id="PersonBeingMeasured"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">状态</div> | |||
<div id="Status"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">测温时间段</div> | |||
<div id="MeasureTime"></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> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/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('<span class=\"label label-success\">' + _data.text + '</span>'); | |||
} else if (_data.text == "异常") { | |||
callback('<span class=\"label label-danger\">' + _data.text + '</span>'); | |||
} else { | |||
callback('<span class=\"label label-default\">' + _data.text + '</span>'); | |||
} | |||
} | |||
} | |||
}); | |||
} | |||
}, | |||
{ 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(); | |||
} |
@@ -14,9 +14,10 @@ | |||
<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_morning" class="btn btn-default"><i class="fa fa-thermometer-0"></i> 提交上午测温</a> | |||
@*<a id="lr_morning" class="btn btn-default"><i class="fa fa-thermometer-0"></i> 提交上午测温</a> | |||
<a id="lr_noon" class="btn btn-default"><i class="fa fa-thermometer-0"></i> 提交中午测温</a> | |||
<a id="lr_neight" class="btn btn-default"><i class="fa fa-thermometer-0"></i> 提交晚上测温</a> | |||
<a id="lr_neight" class="btn btn-default"><i class="fa fa-thermometer-0"></i> 提交晚上测温</a>*@ | |||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-thermometer-0"></i> 提交测温</a> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -69,6 +69,19 @@ var bootstrap = function ($, learun) { | |||
} | |||
}); | |||
//提交测温 | |||
$('#lr_submit').on('click', function () { | |||
var datas = $('#gridtable').jfGridGet('rowdatas'); | |||
if (datas.length > 0) { | |||
learun.layerConfirm('是否确认提交测温!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Thermography/DoSave', { measureTime: '-1', rowdatas: JSON.stringify(datas) }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
@@ -1014,6 +1014,7 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\IssueForm.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\ReadListParty.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_SendFile\ReadListDocument.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Thermography\IndexResult.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Thermography\StatisticIndex.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Thermography\SubmitIndex.js" /> | |||
<Content Include="Areas\EvaluationTeach\Views\Eval_Main\AnswerIndex.js" /> | |||
@@ -6883,6 +6884,7 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\StuAttendanceLeave\IndexInStudent.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuLeaveManagement\CheckForm.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuLeaveManagement\CheckIndex.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Thermography\IndexResult.cshtml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile1.pubxml" /> | |||
@@ -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("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// 保存实体数据(新增、修改):单个学生提交测温 | |||
/// <param name="_"></param> | |||
/// <summary> | |||
/// <returns></returns> | |||
@@ -117,6 +118,18 @@ namespace Learun.Application.WebApi | |||
thermographyIBLL.SaveEntity(this.userInfo, parameter.keyValue, entity); | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改):整个班级提交测温 | |||
/// <param name="_"></param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public Response SaveFormList(dynamic _) | |||
{ | |||
ReqFormEntity parameter = this.GetReqData<ReqFormEntity>(); | |||
List<ThermographyEntity> entities = parameter.strEntity.ToObject<List<ThermographyEntity>>(); | |||
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 | |||
@@ -225,7 +225,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
var userInfo = LoginUserInfo.Get(); | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT t.ClassNo,t.DeptNo,t.MajorNo,t.StuNo as PersonBeingMeasured,t.StuName as PersonBeingMeasuredName,'" + userInfo.account + "' as MeasurerID,'0' as Status,c.ClassName "); | |||
strSql.Append("SELECT t.ClassNo,t.DeptNo,t.MajorNo,t.StuNo as PersonBeingMeasured,t.StuName as PersonBeingMeasuredName,'" + userInfo.account + "' as MeasurerID,'1' as Status,c.ClassName "); | |||
strSql.Append(" FROM StuInfoBasic t left join StuInfoBasic tt on t.ClassNo=tt.ClassNo left join ClassInfo c on t.ClassNo=c.ClassNo "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
@@ -269,16 +269,21 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
var dp = new DynamicParameters(new { }); | |||
var nowDate = DateTime.Now.Date; | |||
var nextDate = DateTime.Now.AddDays(1).Date; | |||
strSql.Append("SELECT t.ClassNo,t.DeptNo,t.MajorNo,t.StuNo as PersonBeingMeasured,t.StuName as PersonBeingMeasuredName,'" + userInfo.account + "' as MeasurerID,c.ClassName "); | |||
strSql.Append(" ,g.ID,case when g.Status is null then '0' else g.Status end as Status,g.Temperature,g.ProcessingResult,g.Remark,g.MeasureTime "); | |||
strSql.Append("SELECT t.ClassNo,t.DeptNo,t.MajorNo,t.StuNo as PersonBeingMeasured,t.StuName as PersonBeingMeasuredName,'" + userInfo.account + "' as MeasurerID,'1' as Status,c.ClassName "); | |||
if (!queryParam["MeasureTime"].IsEmpty() && queryParam["MeasureTime"].ToString() != "-1") | |||
{ | |||
strSql.Append(" ,g.ID,case when g.Status is null then '1' else g.Status end as Status,g.Temperature,g.ProcessingResult,g.Remark,g.MeasureTime "); | |||
} | |||
strSql.Append(" FROM StuInfoBasic t left join StuInfoBasic tt on t.ClassNo=tt.ClassNo left join ClassInfo c on t.ClassNo=c.ClassNo "); | |||
strSql.Append(" left join Thermography g on t.StuNo=g.PersonBeingMeasured and t.ClassNo=g.ClassNo and t.DeptNo=g.DeptNo and t.MajorNo=g.DeptNo "); | |||
strSql.Append(" and g.MeasureDate >='" + nowDate + "' and g.MeasureDate<'" + nextDate + "' "); | |||
if (!queryParam["MeasureTime"].IsEmpty()) | |||
if (!queryParam["MeasureTime"].IsEmpty() && queryParam["MeasureTime"].ToString() != "-1") | |||
{ | |||
strSql.Append(" left join Thermography g on t.StuNo=g.PersonBeingMeasured and t.ClassNo=g.ClassNo and t.DeptNo=g.DeptNo and t.MajorNo=g.DeptNo "); | |||
strSql.Append(" and g.MeasureDate >='" + nowDate + "' and g.MeasureDate<'" + nextDate + "' "); | |||
dp.Add("MeasureTime", queryParam["MeasureTime"].ToString(), DbType.String); | |||
strSql.Append(" and g.MeasureTime=@MeasureTime "); | |||
} | |||
strSql.Append(" WHERE 1=1 "); | |||
if (!queryParam["MeasurerID"].IsEmpty()) | |||
{ | |||
@@ -390,16 +395,26 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
try | |||
{ | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
//限制测温时间(上午、中午、晚上)时:判断学生是否已测温,是则更新,否则新增;不限制测温时间时:新增; | |||
if (entity.MeasureTime == "-1") | |||
{ | |||
entity.Modify(keyValue, userInfo); | |||
this.BaseRepository("CollegeMIS").Update(entity); | |||
entity.Create(userInfo); | |||
this.BaseRepository("CollegeMIS").Insert(entity); | |||
} | |||
else | |||
{ | |||
entity.Create(userInfo); | |||
this.BaseRepository("CollegeMIS").Insert(entity); | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
entity.Modify(keyValue, userInfo); | |||
this.BaseRepository("CollegeMIS").Update(entity); | |||
} | |||
else | |||
{ | |||
entity.Create(userInfo); | |||
this.BaseRepository("CollegeMIS").Insert(entity); | |||
} | |||
} | |||
LogEntity logEntity = new LogEntity(); | |||
logEntity.F_LogId = Guid.NewGuid().ToString(); | |||
logEntity.F_Module = "Thermography"; | |||
@@ -521,45 +536,53 @@ 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; | |||
entity.MeasureDate = now; | |||
entity.MeasureTime = measureTime; | |||
entity.CreateTime = now; | |||
//判断学生是否已测温 | |||
var model = db.FindEntity<ThermographyEntity>(x => x.PersonBeingMeasured == entity.PersonBeingMeasured && x.MeasureTime == measureTime && x.MeasureDate >= nowDate && x.MeasureDate < nextDate); | |||
if (model != null) | |||
//限制测温时间(上午、中午、晚上)时:判断学生是否已测温,是则更新,否则新增;不限制测温时间时:新增; | |||
if (measureTime != "-1") | |||
{ | |||
db.Delete(model); | |||
var model = db.FindEntity<ThermographyEntity>(x => x.PersonBeingMeasured == entity.PersonBeingMeasured && x.MeasureTime == measureTime && x.MeasureDate >= nowDate && x.MeasureDate < nextDate); | |||
if (model != null) | |||
{ | |||
db.Delete(model); | |||
} | |||
} | |||
entity.Create(userInfo); | |||
db.Insert(entity); | |||
//体温异常 | |||
if (entity.Status == "2") | |||
{ | |||
try | |||
if (string.IsNullOrEmpty(pushTitle)) | |||
{ | |||
var stuModel = db.FindEntity<StuInfoBasicEntity>(x => x.StuNo == entity.PersonBeingMeasured); | |||
if (stuModel != null) | |||
{ | |||
var title = string.Format("{0}({1})", stuModel.StuName, stuModel.StuNo); | |||
//读取信息推送管理-班级自诊打卡体温异常学生推送(05)的配置 | |||
var informationPushEntity = this.BaseRepository().FindEntity<Sys_InformationPushEntity>(x => x.PushItem == "05"); | |||
if (informationPushEntity != null && informationPushEntity.Status == true) | |||
{ | |||
//微信推送 | |||
PushWeixin(title); | |||
} | |||
} | |||
var classModel = db.FindEntity<ClassInfoEntity>(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<Sys_InformationPushEntity>(x => x.PushItem == "05"); | |||
if (informationPushEntity != null && informationPushEntity.Status == true) | |||
{ | |||
try | |||
{ | |||
//微信推送 | |||
PushWeixin(pushTitle); | |||
} | |||
catch (Exception) | |||
{ | |||
throw; | |||
} | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||