Bläddra i källkod

【修改】PC端,移动端,班级自诊打卡测温:由固定的测温次数调整为无限次测温;

中职版本
dyy 4 år sedan
förälder
incheckning
dd703a2dcf
6 ändrade filer med 54 tillägg och 21 borttagningar
  1. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Thermography/Thermography.js
  2. +3
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Thermography/measure/measure.js
  3. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Thermography/Index.js
  4. +3
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Thermography/SubmitIndex.cshtml
  5. +13
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Thermography/SubmitIndex.js
  6. +33
    -15
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Thermography/ThermographyService.cs

+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Thermography/Thermography.js Visa fil

@@ -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 })


+ 3
- 2
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/pages/EducationalAdministration/Thermography/measure/measure.js Visa fil

@@ -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);

//选择学生


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Thermography/Index.js Visa fil

@@ -260,7 +260,7 @@ var bootstrap = function ($, learun) {
],
mainId: 'ID',
isPage: true,
sidx: 'MeasureDate',
sidx: 'MeasureDate desc,PersonBeingMeasured',
sord: 'desc'
});
},


+ 3
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Thermography/SubmitIndex.cshtml Visa fil

@@ -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>&nbsp;提交上午测温</a>
@*<a id="lr_morning" class="btn btn-default"><i class="fa fa-thermometer-0"></i>&nbsp;提交上午测温</a>
<a id="lr_noon" class="btn btn-default"><i class="fa fa-thermometer-0"></i>&nbsp;提交中午测温</a>
<a id="lr_neight" class="btn btn-default"><i class="fa fa-thermometer-0"></i>&nbsp;提交晚上测温</a>
<a id="lr_neight" class="btn btn-default"><i class="fa fa-thermometer-0"></i>&nbsp;提交晚上测温</a>*@
<a id="lr_submit" class="btn btn-default"><i class="fa fa-thermometer-0"></i>&nbsp;提交测温</a>
</div>
</div>
</div>


+ 13
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Thermography/SubmitIndex.js Visa fil

@@ -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 () {


+ 33
- 15
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Thermography/ThermographyService.cs Visa fil

@@ -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";
@@ -527,11 +542,14 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
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);


Laddar…
Avbryt
Spara