@@ -1,5 +1,5 @@ | |||
<div class="lr-form-container"> | |||
<div class="lr-form-row " data-table="StuInfoBasic"> | |||
<!--<div class="lr-form-row " data-table="StuInfoBasic"> | |||
<label>出生日期</label> | |||
<div id="Birthday"></div> | |||
@@ -13,8 +13,8 @@ | |||
<label>民族</label> | |||
<div id="NationalityNo"></div> | |||
</div> | |||
<div class="lr-form-row " data-table="StuInfoBasic"> | |||
</div>--> | |||
<!--<div class="lr-form-row " data-table="StuInfoBasic"> | |||
<label>户口分类</label> | |||
<div id="ResidenceNo"></div> | |||
@@ -23,7 +23,7 @@ | |||
<label>照片</label> | |||
<div id="Photo"></div> | |||
</div> | |||
</div>--> | |||
<div class="lr-form-row " data-table="StuInfoBasic"> | |||
<label>联系电话</label> | |||
@@ -74,7 +74,7 @@ | |||
<label>母亲电话</label> | |||
<input id="MatherPhone" type="text" /> | |||
</div> | |||
<div class="lr-form-row " data-table="StuInfoBasic"> | |||
<!--<div class="lr-form-row " data-table="StuInfoBasic"> | |||
<label>家庭出生</label> | |||
<div id="FamilyOriginNo"></div> | |||
@@ -98,15 +98,15 @@ | |||
<label>校内电话</label> | |||
<input id="InSchoolTelephone" type="text" /> | |||
</div> | |||
</div>--> | |||
<div class="lr-form-row " data-table="StuInfoBasic"> | |||
<label>QQ</label> | |||
<input id="QQ" type="text" /> | |||
</div> | |||
<div class="lr-form-row " data-table="StuInfoBasic"> | |||
<!--<div class="lr-form-row " data-table="StuInfoBasic"> | |||
<label>特长</label> | |||
<input id="GoodAt" type="text" /> | |||
</div> | |||
</div>--> | |||
</div> |
@@ -19,7 +19,6 @@ | |||
data: { 'account': account }, | |||
async: false, | |||
success: function (msg) { | |||
console.log(msg); | |||
if (msg.data) { | |||
keyValue = msg.data.StuId; | |||
} else { | |||
@@ -151,40 +150,40 @@ | |||
} | |||
}, | |||
bind: function ($page, param) { | |||
$page.find('#Birthday').lrdate({ | |||
type: 'date' | |||
}); | |||
$page.find('#PartyFaceNo').lrpickerex({ | |||
code: 'BCdPartyFace', | |||
type: 'sourceData', | |||
ivalue: 'partyfaceno', | |||
itext: 'partyface' | |||
}); | |||
$page.find('#NationalityNo').lrpickerex({ | |||
code: 'National', | |||
type: 'dataItem' | |||
}); | |||
//$page.find('#Birthday').lrdate({ | |||
// type: 'date' | |||
//}); | |||
//$page.find('#PartyFaceNo').lrpickerex({ | |||
// code: 'BCdPartyFace', | |||
// type: 'sourceData', | |||
// ivalue: 'partyfaceno', | |||
// itext: 'partyface' | |||
//}); | |||
//$page.find('#NationalityNo').lrpickerex({ | |||
// code: 'National', | |||
// type: 'dataItem' | |||
//}); | |||
$page.find('#ResidenceNo').lrpickerex({ | |||
code: 'ResidenceNo', | |||
type: 'dataItem' | |||
}); | |||
$page.find('#Photo').imagepicker(); | |||
$page.find('#FamilyOriginNo').lrpickerex({ | |||
type: 'sourceData', | |||
code: 'BCdFamilyOrigin', | |||
ivalue: 'familyoriginno', | |||
itext: 'familyorigin' | |||
}); | |||
$page.find('#OverseasChineseNo').lrpickerex({ | |||
type: 'sourceData', | |||
code: 'BCdOverseasChinese', | |||
ivalue: 'overseaschineseno', | |||
itext: 'overseaschinesename' | |||
}); | |||
$page.find('#GraduateNo').lrpickerex({ | |||
code: 'CollegeType', | |||
type: 'dataItem' | |||
}); | |||
//$page.find('#Photo').imagepicker(); | |||
//$page.find('#FamilyOriginNo').lrpickerex({ | |||
// type: 'sourceData', | |||
// code: 'BCdFamilyOrigin', | |||
// ivalue: 'familyoriginno', | |||
// itext: 'familyorigin' | |||
//}); | |||
//$page.find('#OverseasChineseNo').lrpickerex({ | |||
// type: 'sourceData', | |||
// code: 'BCdOverseasChinese', | |||
// ivalue: 'overseaschineseno', | |||
// itext: 'overseaschinesename' | |||
//}); | |||
//$page.find('#GraduateNo').lrpickerex({ | |||
// code: 'CollegeType', | |||
// type: 'dataItem' | |||
//}); | |||
}, destroy: function (pageinfo) { | |||
$header = null; | |||
keyValue = ''; | |||
@@ -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"> | |||
@@ -42,8 +43,8 @@ | |||
</div> | |||
<div class="lr-form-row " data-table="Thermography"> | |||
<font face="宋体">*</font> | |||
<label>温度</label> | |||
<input id="Temperature" type="text" isvalid="yes" checkexpession="PositiveFloatintZero" errormsg="温度" /> | |||
<label>输入温度</label> | |||
<input id="Temperature" placeholder="请在此输入温度" type="text" isvalid="yes" checkexpession="PositiveFloatintZero" errormsg="温度" /> | |||
</div> | |||
<div class="lr-form-row lr-form-row-multi" data-table="Thermography"> | |||
<label>处理结果</label> | |||
@@ -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>'; | |||
}); | |||
@@ -2,7 +2,7 @@ | |||
<div class="lr-form-row " data-table="EpidemicSituation"> | |||
<label>填报人员</label> | |||
<div id="Creater"></div> | |||
<div id="Creater" readonly="readonly"></div> | |||
</div> | |||
<div class="lr-form-row " data-table="EpidemicSituation"> | |||
@@ -20,7 +20,7 @@ | |||
} | |||
var path = config.webapi; | |||
learun.http.get(path + "Learun/EducationalAdministration/EmpRegister/registerbutton", | |||
learun.http.get(path + "Learun/adms/EducationalAdministration/EmpRegister/registerbutton", | |||
{}, (res) => { | |||
if (res.info == "True") { | |||
var button = $page.find('#RegisterBtn'); | |||
@@ -0,0 +1,117 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2020-12-17 14:29 | |||
/// 描 述:人才培养方案 | |||
/// </summary> | |||
public class EATalentTrainController : MvcControllerBase | |||
{ | |||
private EATalentTrainIBLL eATalentTrainIBLL = new EATalentTrainBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = eATalentTrainIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var EATalentTrainData = eATalentTrainIBLL.GetEATalentTrainEntity( keyValue ); | |||
var jsonData = new { | |||
EATalentTrain = EATalentTrainData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
eATalentTrainIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
EATalentTrainEntity entity = strEntity.ToObject<EATalentTrainEntity>(); | |||
eATalentTrainIBLL.SaveEntity(keyValue,entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -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 获取数据 | |||
@@ -0,0 +1,39 @@ | |||
@{ | |||
ViewBag.Title = "人才培养方案"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="EATalentTrain" > | |||
<div class="lr-form-item-title">学年<font face="宋体">*</font></div> | |||
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="EATalentTrain" > | |||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | |||
<div id="Semester" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="EATalentTrain" > | |||
<div class="lr-form-item-title">系部<font face="宋体">*</font></div> | |||
<div id="DeptNo" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="EATalentTrain" > | |||
<div class="lr-form-item-title">专业<font face="宋体">*</font></div> | |||
<div id="MajorNo" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="EATalentTrain" > | |||
<div class="lr-form-item-title">入学要求</div> | |||
<input id="EntranceRequire" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="EATalentTrain" > | |||
<div class="lr-form-item-title">修业年限</div> | |||
<input id="YearLimit" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="EATalentTrain" > | |||
<div class="lr-form-item-title">培训方案</div> | |||
<div id="ProgramFile" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="EATalentTrain" > | |||
<div class="lr-form-item-title">备注</div> | |||
<textarea id="Remark" class="form-control" style="height:100px;" ></textarea> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/EATalentTrain/Form.js") |
@@ -0,0 +1,85 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2020-12-17 14:29 | |||
* 描 述:人才培养方案 | |||
*/ | |||
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 () { | |||
//学年 | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "请选择学年", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "请选择学年", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#DeptNo').lrDataSourceSelect({ | |||
code: 'CdDeptInfo', value: 'deptno', text: 'deptname', select: function (item) { | |||
if (item) { | |||
$('#MajorNo').lrselectRefresh({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||
param: { strWhere: "deptno='" + item.deptno + "' AND CheckMark=1" } | |||
}); | |||
} else { | |||
$('#MajorNo').lrselectRefresh({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||
param: { strWhere: "CheckMark=1" } | |||
}); | |||
} | |||
} | |||
}); | |||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo',value: 'majorno',text: 'majorname' }); | |||
$('#ProgramFile').lrUploader(); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/EATalentTrain/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/EATalentTrain/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,48 @@ | |||
@{ | |||
ViewBag.Title = "人才培养方案"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout " > | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">学年</div> | |||
<div id="AcademicYearNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">学期</div> | |||
<div id="Semester"></div> | |||
</div> | |||
<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> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/EATalentTrain/Index.js") |
@@ -0,0 +1,150 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2020-12-17 14:29 | |||
* 描 述:人才培养方案 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
//学年 | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "请选择学年", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "请选择学年", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||
value: 'value', | |||
text: 'text' | |||
}); | |||
$('#DeptNo').lrDataSourceSelect({ | |||
code: 'CdDeptInfo', value: 'deptno', text: 'deptname', select: function (item) { | |||
if (item) { | |||
$('#MajorNo').lrselectRefresh({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||
param: { strWhere: "deptno='" + item.deptno + "' AND CheckMark=1" } | |||
}); | |||
} else { | |||
$('#MajorNo').lrselectRefresh({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdMajorInfo', | |||
param: { strWhere: "CheckMark=1" } | |||
}); | |||
} | |||
} | |||
}); | |||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/EATalentTrain/Form', | |||
width: 800, | |||
height: 600, | |||
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/EATalentTrain/Form?keyValue=' + keyValue, | |||
width: 800, | |||
height: 600, | |||
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/EATalentTrain/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/EATalentTrain/GetPageList', | |||
headData: [ | |||
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, | |||
{ label: "学期", name: "Semester", width: 100, align: "left" }, | |||
{ | |||
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: "EntranceRequire", width: 150, align: "left" }, | |||
{ label: "修业年限", name: "YearLimit", width: 100, align: "left" }, | |||
], | |||
mainId: 'Id', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -51,8 +51,12 @@ | |||
<div id="PartyFaceNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">文化程度</div> | |||
<div id="CultureDegreeNo"></div> | |||
<div class="lr-form-item-title">最高学历</div> | |||
<div id="HighestRecord"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">是否审核</div> | |||
<div id="CheckMark"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -15,7 +15,7 @@ var bootstrap = function ($, learun) { | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 250, 400); | |||
}, 280, 400); | |||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | |||
$('#ProvinceNo').lrDataSourceSelect({ | |||
code: 'DIC_PROVINCE', value: 'pcode', text: 'pname', | |||
@@ -49,14 +49,16 @@ var bootstrap = function ($, learun) { | |||
$('#RegionNo').lrselect(); | |||
//政治面貌 | |||
$('#PartyFaceNo').lrDataSourceSelect({ code: 'BCdPartyFace', value: 'partyfaceno', text: 'partyface' }); | |||
//文化程度 | |||
$('#CultureDegreeNo').lrDataSourceSelect({ code: 'BCdCultureDegree', value: 'culturedegreeno', text: 'culturedegree' }); | |||
//最高学历 | |||
$('#HighestRecord').lrDataSourceSelect({ code: 'BCdCultureDegree', value: 'culturedegreeno', text: 'culturedegree' }); | |||
//民族 | |||
$('#NationalityNo').lrDataSourceSelect({ code: 'BCdNationality', value: 'nationalityno', text: 'nationality' }); | |||
//性别 | |||
$('#GenderNo').lrDataItemSelect({ code: 'usersexbit' }); | |||
//是否审核 | |||
$('#CheckMark').lrDataItemSelect({ code: 'YesOrNoInt' }); | |||
//学位 | |||
$('#DegreeNo').lrDataSourceSelect({ code: 'BCdDegree', value: 'degreeno', text: 'degreename' }); | |||
//职称 | |||
@@ -412,7 +414,7 @@ var bootstrap = function ($, learun) { | |||
{ label: "身份证号", name: "IdentityCardNo", width: 150, align: "left" }, | |||
{ | |||
label: "文化程度", name: "CultureDegreeNo", width: 100, align: "left", | |||
label: "最高学历", name: "HighestRecord", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BCdCultureDegree', | |||
@@ -34,6 +34,10 @@ | |||
<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="LessonNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">选课状态</div> | |||
<div id="ElectiveSelectStatus"></div> | |||
@@ -24,7 +24,7 @@ var bootstrap = function ($, learun) { | |||
return; | |||
} | |||
page.search(queryJson); | |||
}, 250, 400); | |||
}, 300, 400); | |||
$('#AcademicYearNo').lrselect({ | |||
placeholder: "请选择学年", | |||
allowSearch: true, | |||
@@ -46,6 +46,13 @@ var bootstrap = function ($, learun) { | |||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | |||
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); | |||
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); | |||
$('#LessonNo').lrselect({ | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=LessonInfo', | |||
param: { strWhere: "1=1 AND LessonSortNo='2' " }, | |||
value: "lessonno", | |||
text: "lessonname" | |||
}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
@@ -174,11 +181,12 @@ var bootstrap = function ($, learun) { | |||
{ | |||
label: "上课节次", name: "LessonSection", width: 150, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue != "") { | |||
if (cellvalue.indexOf(',') == -1) | |||
if (cellvalue != "" && cellvalue != undefined && cellvalue != null) { | |||
if (cellvalue.indexOf(',') == -1) { | |||
return "星期" + weekChina[cellvalue.slice(0, 1) - 1] + "第" + cellvalue.slice(1) + "节"; | |||
else | |||
} else { | |||
return "星期" + weekChina[cellvalue.slice(0, 1) - 1] + "第" + cellvalue.slice(1, 2) + "、" + cellvalue.slice(4) + "节"; | |||
} | |||
} | |||
} | |||
}, | |||
@@ -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 () { | |||
@@ -7,28 +7,6 @@ | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">填表人员</div> | |||
<input id="Creater" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">类别</div> | |||
<div id="Type"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">身份证号</div> | |||
<input id="IDCard" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">单位名称</div> | |||
<input id="UnitName" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
@@ -12,19 +12,15 @@ | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">填表人员</div> | |||
<input id="Creater" type="text" class="form-control" /> | |||
<div id="Creater"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">类别</div> | |||
<div id="Type"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">身份证号</div> | |||
<input id="IDCard" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">单位名称</div> | |||
<input id="UnitName" type="text" class="form-control" /> | |||
<div class="lr-form-item-title">系|专业|班级</div> | |||
<input id="StudentSource" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -5,6 +5,7 @@ | |||
* 描 述:疫情记录 | |||
*/ | |||
var refreshGirdData; | |||
var startTime, endTime; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
@@ -13,10 +14,13 @@ var bootstrap = function ($, learun) { | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#Type').lrDataItemSelect({ code: 'EUserType' }); | |||
$('#Creater').lrDataSourceSelect({ code: 'BaseUser', value: 'f_userid', text: 'f_realname' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
@@ -55,12 +59,6 @@ var bootstrap = function ($, learun) { | |||
} | |||
}, | |||
{ | |||
label: "填报日期", name: "CreateTime", width: 100, align: "left", | |||
formatter: function (value, row) { | |||
return dateFormat("YYYY-mm-dd", new Date(value)); | |||
} | |||
}, | |||
{ | |||
label: "类别", name: "Type", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
@@ -792,6 +792,7 @@ | |||
<Compile Include="Areas\EducationalAdministration\Controllers\Sys_InformationPushController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\StuLeaveManagementController.cs" /> | |||
<Compile Include="Areas\Permission\Controllers\DepartmentReleasePermissionsController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\EATalentTrainController.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | |||
@@ -1015,6 +1016,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" /> | |||
@@ -6123,6 +6125,10 @@ | |||
<Content Include="Areas\Permission\Views\DepartmentReleasePermissions\Index.js" /> | |||
<Content Include="Areas\Permission\Views\DepartmentReleasePermissions\Form.cshtml" /> | |||
<Content Include="Areas\Permission\Views\DepartmentReleasePermissions\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\EATalentTrain\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\EATalentTrain\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\EATalentTrain\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\EATalentTrain\Form.js" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Folder Include="Areas\LR_Desktop\Models\" /> | |||
@@ -6888,6 +6894,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" /> | |||
@@ -21,10 +21,6 @@ | |||
<div class="loginBox"> | |||
<div class="loginLogo"> | |||
<img src="@ViewBag.LoGo" alt="" /> | |||
@if (ViewBag.Version) | |||
{ | |||
<div class="loginEdition" style="cursor:pointer;">@ViewBag.VersionNum</div> | |||
} | |||
</div> | |||
<input id="errornum" type="hidden" value="@ViewBag.errornum" /> | |||
<div class="login commonClear"> | |||
@@ -84,11 +84,7 @@ | |||
</div> | |||
</div> | |||
<div class="loginFooter"> | |||
<div> | |||
版本号 : @if (ViewBag.Version) | |||
{ | |||
@ViewBag.errornum | |||
} 在线用户人数 : @ViewBag.OnlineUserNum 人 | |||
<div> 在线用户人数 : @ViewBag.OnlineUserNum 人 | |||
</div> | |||
<div>北京金隅科技学校 智慧校园 版权所有</div> | |||
<!--京ICP备13045367号--> | |||
@@ -21,10 +21,6 @@ | |||
<div class="loginBox"> | |||
<div class="loginLogo"> | |||
<img src="@ViewBag.LoGo" alt="" /> | |||
@if (ViewBag.Version) | |||
{ | |||
<div class="loginEdition" style="cursor:pointer;"><i>@ViewBag.VersionNum</i></div> | |||
} | |||
</div> | |||
<input id="errornum" type="hidden" value="@ViewBag.errornum" /> | |||
<div class="login commonClear"> | |||
@@ -22,10 +22,6 @@ | |||
<div class="loginLogo"> | |||
<img src="@ViewBag.LoGo" alt="" /> | |||
@if (ViewBag.Version) | |||
{ | |||
<div class="loginEdition" style="cursor:pointer;">@ViewBag.VersionNum</div> | |||
} | |||
</div> | |||
<input id="errornum" type="hidden" value="@ViewBag.errornum" /> | |||
<div class="commonClear"> | |||
@@ -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 | |||
@@ -0,0 +1,29 @@ | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2020-12-17 14:29 | |||
/// 描 述:人才培养方案 | |||
/// </summary> | |||
public class EATalentTrainMap : EntityTypeConfiguration<EATalentTrainEntity> | |||
{ | |||
public EATalentTrainMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("EATALENTTRAIN"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -544,6 +544,7 @@ | |||
<Compile Include="EducationalAdministration\Sys_InformationPushMap.cs" /> | |||
<Compile Include="EducationalAdministration\StuLeaveManagementMap.cs" /> | |||
<Compile Include="Permission\DepartmentReleasePermissionsMap.cs" /> | |||
<Compile Include="EducationalAdministration\EATalentTrainMap.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | |||
@@ -0,0 +1,125 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2020-12-17 14:29 | |||
/// 描 述:人才培养方案 | |||
/// </summary> | |||
public class EATalentTrainBLL : EATalentTrainIBLL | |||
{ | |||
private EATalentTrainService eATalentTrainService = new EATalentTrainService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<EATalentTrainEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return eATalentTrainService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取EATalentTrain表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public EATalentTrainEntity GetEATalentTrainEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return eATalentTrainService.GetEATalentTrainEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
eATalentTrainService.DeleteEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
/// <returns></returns> | |||
public void SaveEntity(string keyValue, EATalentTrainEntity entity) | |||
{ | |||
try | |||
{ | |||
eATalentTrainService.SaveEntity(keyValue, entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,85 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2020-12-17 14:29 | |||
/// 描 述:人才培养方案 | |||
/// </summary> | |||
public class EATalentTrainEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// Id | |||
/// </summary> | |||
[Column("ID")] | |||
public string Id { get; set; } | |||
/// <summary> | |||
/// 学年 | |||
/// </summary> | |||
[Column("ACADEMICYEARNO")] | |||
public string AcademicYearNo { get; set; } | |||
/// <summary> | |||
/// 学期 | |||
/// </summary> | |||
[Column("SEMESTER")] | |||
public string Semester { get; set; } | |||
/// <summary> | |||
/// 系部 | |||
/// </summary> | |||
[Column("DEPTNO")] | |||
public string DeptNo { get; set; } | |||
/// <summary> | |||
/// 专业 | |||
/// </summary> | |||
[Column("MAJORNO")] | |||
public string MajorNo { get; set; } | |||
/// <summary> | |||
/// 入学要求 | |||
/// </summary> | |||
[Column("ENTRANCEREQUIRE")] | |||
public string EntranceRequire { get; set; } | |||
/// <summary> | |||
/// 修业年限 | |||
/// </summary> | |||
[Column("YEARLIMIT")] | |||
public string YearLimit { get; set; } | |||
/// <summary> | |||
/// 方案文件 | |||
/// </summary> | |||
[Column("PROGRAMFILE")] | |||
public string ProgramFile { get; set; } | |||
/// <summary> | |||
/// 备注 | |||
/// </summary> | |||
[Column("REMARK")] | |||
public string Remark { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.Id = Guid.NewGuid().ToString(); | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.Id = keyValue; | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,48 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2020-12-17 14:29 | |||
/// 描 述:人才培养方案 | |||
/// </summary> | |||
public interface EATalentTrainIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<EATalentTrainEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取EATalentTrain表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
EATalentTrainEntity GetEATalentTrainEntity(string keyValue); | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void DeleteEntity(string keyValue); | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
void SaveEntity(string keyValue, EATalentTrainEntity entity); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,161 @@ | |||
using Dapper; | |||
using Learun.DataBase.Repository; | |||
using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Data; | |||
using System.Text; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2020-12-17 14:29 | |||
/// 描 述:人才培养方案 | |||
/// </summary> | |||
public class EATalentTrainService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<EATalentTrainEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT t.* "); | |||
strSql.Append(" FROM EATalentTrain t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["AcademicYearNo"].IsEmpty()) | |||
{ | |||
dp.Add("AcademicYearNo",queryParam["AcademicYearNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.AcademicYearNo = @AcademicYearNo "); | |||
} | |||
if (!queryParam["Semester"].IsEmpty()) | |||
{ | |||
dp.Add("Semester",queryParam["Semester"].ToString(), DbType.String); | |||
strSql.Append(" AND t.Semester = @Semester "); | |||
} | |||
if (!queryParam["DeptNo"].IsEmpty()) | |||
{ | |||
dp.Add("DeptNo",queryParam["DeptNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.DeptNo = @DeptNo "); | |||
} | |||
if (!queryParam["MajorNo"].IsEmpty()) | |||
{ | |||
dp.Add("MajorNo",queryParam["MajorNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.MajorNo = @MajorNo "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<EATalentTrainEntity>(strSql.ToString(),dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取EATalentTrain表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public EATalentTrainEntity GetEATalentTrainEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<EATalentTrainEntity>(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
this.BaseRepository("CollegeMIS").Delete<EATalentTrainEntity>(t=>t.Id == keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
public void SaveEntity(string keyValue, EATalentTrainEntity entity) | |||
{ | |||
try | |||
{ | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
entity.Modify(keyValue); | |||
this.BaseRepository("CollegeMIS").Update(entity); | |||
} | |||
else | |||
{ | |||
entity.Create(); | |||
this.BaseRepository("CollegeMIS").Insert(entity); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -97,6 +97,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
dp.Add("NationalityNo", queryParam["NationalityNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.NationalityNo = @NationalityNo "); | |||
} | |||
if (!queryParam["PartyFaceNo"].IsEmpty())//政治面貌 | |||
{ | |||
dp.Add("PartyFaceNo", queryParam["PartyFaceNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.PartyFaceNo = @PartyFaceNo "); | |||
} | |||
if (!queryParam["GenderNo"].IsEmpty())//性别 | |||
{ | |||
dp.Add("GenderNo", queryParam["GenderNo"].ToString(), DbType.String); | |||
@@ -112,6 +117,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
dp.Add("ProfessionalTitle", queryParam["ProfessionalTitle"].ToString(), DbType.String); | |||
strSql.Append(" AND t.ProfessionalTitle = @ProfessionalTitle "); | |||
} | |||
if (!queryParam["HighestRecord"].IsEmpty())//最高学历 | |||
{ | |||
dp.Add("HighestRecord", queryParam["HighestRecord"].ToString(), DbType.String); | |||
strSql.Append(" AND t.HighestRecord = @HighestRecord "); | |||
} | |||
if (!queryParam["CheckMark"].IsEmpty())//是否审核 | |||
{ | |||
dp.Add("CheckMark", queryParam["CheckMark"].ToString(), DbType.String); | |||
strSql.Append(" AND t.CheckMark = @CheckMark "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<EmpInfoEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
@@ -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,58 @@ 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(); | |||
if (entities.Any(x => x.Status == "2")) | |||
{ | |||
//读取信息推送管理-班级自诊打卡体温异常学生推送(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) | |||
{ | |||
@@ -1597,6 +1597,10 @@ | |||
<Compile Include="Permission\DepartmentReleasePermissions\DepartmentReleasePermissionsService.cs" /> | |||
<Compile Include="Permission\DepartmentReleasePermissions\DepartmentReleasePermissionsBLL.cs" /> | |||
<Compile Include="Permission\DepartmentReleasePermissions\DepartmentReleasePermissionsIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\EATalentTrain\EATalentTrainEntity.cs" /> | |||
<Compile Include="EducationalAdministration\EATalentTrain\EATalentTrainService.cs" /> | |||
<Compile Include="EducationalAdministration\EATalentTrain\EATalentTrainBLL.cs" /> | |||
<Compile Include="EducationalAdministration\EATalentTrain\EATalentTrainIBLL.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | |||
@@ -144,7 +144,31 @@ namespace Learun.Application.TwoDevelopment.PersonnelManagement | |||
list.Add(entity); | |||
} | |||
list = this.BaseRepository("CollegeMIS").FindList<EpidemicSituationEntity>(list, pagination).ToList(); | |||
var expression = LinqExtensions.True<EpidemicSituationEntity>(); | |||
var queryParam = queryJson.ToJObject(); | |||
// 填表人员 | |||
if (!queryParam["Creater"].IsEmpty()) | |||
{ | |||
string Creater = queryParam["Creater"].ToString(); | |||
expression = expression.And(t => t.Creater.Equals(Creater)); | |||
} | |||
// 类别 | |||
if (!queryParam["Type"].IsEmpty()) | |||
{ | |||
int Type = 0; | |||
int.TryParse(queryParam["Type"].ToString(), out Type); | |||
expression = expression.And(t => t.Type.Equals(Type)); | |||
} | |||
// 学生来源 | |||
if (!queryParam["StudentSource"].IsEmpty()) | |||
{ | |||
string StudentSource = queryParam["StudentSource"].ToString(); | |||
expression = expression.And(t => t.StudentSource.Contains(StudentSource)); | |||
} | |||
list = this.BaseRepository("CollegeMIS").FindList<EpidemicSituationEntity>(list, expression, pagination).ToList(); | |||
return list; | |||
@@ -233,6 +233,7 @@ namespace Learun.DataBase.Repository | |||
IEnumerable<T> FindList<T>(Pagination pagination) where T : class, new(); | |||
IEnumerable<T> FindList<T>(List<T> data, Pagination pagination) where T : class, new(); | |||
IEnumerable<T> FindList<T>(List<T> data, Expression<Func<T, bool>> condition, Pagination pagination) where T : class, new(); | |||
/// <summary> | |||
/// 查询列表(分页) | |||
/// </summary> | |||
@@ -447,11 +447,55 @@ namespace Learun.DataBase.Repository | |||
var property = typeof(T).GetProperty(_orderField); | |||
var propertyAccess = Expression.MakeMemberAccess(parameter, property); | |||
var orderByExp = Expression.Lambda(propertyAccess, parameter); | |||
resultExp = Expression.Call(typeof(Queryable), isAsc ? "OrderBy" : "OrderByDescending", new Type[] { typeof(T), property.PropertyType }, tempData.Expression, Expression.Quote(orderByExp)); | |||
} | |||
} | |||
if (resultExp != null) | |||
{ | |||
tempData = tempData.Provider.CreateQuery<T>(resultExp); | |||
} | |||
pagination.records = tempData.Count(); | |||
tempData = tempData.Skip<T>(pageSize * (pageIndex - 1)).Take<T>(pageSize).AsQueryable(); | |||
return tempData.ToList(); | |||
} | |||
public IEnumerable<T> FindList<T>(List<T> data, Expression<Func<T, bool>> condition, Pagination pagination) where T : class, new() | |||
{ | |||
var isAsc = pagination.sord.ToLower() == "asc" ? true : false; | |||
var pageSize = pagination.rows; | |||
var pageIndex = pagination.page; | |||
string[] _order = pagination.sidx.Split(','); | |||
MethodCallExpression resultExp = null; | |||
var tempData = data.AsQueryable().Where(condition); | |||
foreach (string item in _order) | |||
{ | |||
if (!string.IsNullOrEmpty(item)) | |||
{ | |||
string _orderPart = item; | |||
_orderPart = Regex.Replace(_orderPart, @"\s+", " "); | |||
string[] _orderArry = _orderPart.Split(' '); | |||
string _orderField = _orderArry[0]; | |||
bool sort = isAsc; | |||
if (_orderArry.Length == 2) | |||
{ | |||
isAsc = _orderArry[1].ToUpper() == "ASC" ? true : false; | |||
} | |||
var parameter = Expression.Parameter(typeof(T), "t"); | |||
var property = typeof(T).GetProperty(_orderField); | |||
var propertyAccess = Expression.MakeMemberAccess(parameter, property); | |||
var orderByExp = Expression.Lambda(propertyAccess, parameter); | |||
resultExp = Expression.Call(typeof(Queryable), isAsc ? "OrderBy" : "OrderByDescending", new Type[] { typeof(T), property.PropertyType }, tempData.Expression, Expression.Quote(orderByExp)); | |||
} | |||
} | |||
if (resultExp != null) | |||
{ | |||
tempData = tempData.Provider.CreateQuery<T>(resultExp); | |||
} | |||
pagination.records = tempData.Count(); | |||
tempData = tempData.Skip<T>(pageSize * (pageIndex - 1)).Take<T>(pageSize).AsQueryable(); | |||
return tempData.ToList(); | |||
} | |||
@@ -17,7 +17,7 @@ export default { | |||
// ], | |||
// 开发环境下自动填充登录账号密码,与接口地址一一对应,只在开发环境下显示 | |||
"devAccount": [ | |||
{ username: "System", password: "0000" } | |||
{ username: "system", password: "123456" } | |||
], | |||
//是否分布式部署 指WebApi与Web不在一台服务器 | |||
"isDistributed":true, | |||
@@ -1,7 +1,7 @@ | |||
{ | |||
"name" : "数字化智慧校园", | |||
"name" : "智慧校园", | |||
"appid" : "__UNI__611EB80", | |||
"description" : "数字化智慧校园移动端", | |||
"description" : "智慧校园移动端", | |||
"versionName" : "2.1.0", | |||
"versionCode" : 20100, | |||
"transformPx" : false, | |||