@@ -0,0 +1,142 @@ | |||||
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 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-07-18 17:52 | |||||
/// 描 述:疫情 | |||||
/// </summary> | |||||
public class VaccinationInfoController : MvcControllerBase | |||||
{ | |||||
private VaccinationInfoIBLL vaccinationInfoIBLL = new VaccinationInfoBLL(); | |||||
#region 视图功能 | |||||
/// <summary> | |||||
/// 主页面 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult Index() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 表单页 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult Form() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 主页面 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult TeachIndex() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 表单页 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult TeachForm() | |||||
{ | |||||
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 = vaccinationInfoIBLL.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 VaccinationInfoData = vaccinationInfoIBLL.GetVaccinationInfoEntity(keyValue); | |||||
var jsonData = new | |||||
{ | |||||
VaccinationInfo = VaccinationInfoData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DeleteForm(string keyValue) | |||||
{ | |||||
vaccinationInfoIBLL.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) | |||||
{ | |||||
VaccinationInfoEntity entity = strEntity.ToObject<VaccinationInfoEntity>(); | |||||
vaccinationInfoIBLL.SaveEntity(keyValue, entity); | |||||
return Success("保存成功!"); | |||||
} | |||||
#endregion | |||||
#region 扩展代码 | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult CreateFrom(string userId,string Description) | |||||
{ | |||||
vaccinationInfoIBLL.CreateEntity(userId, Description); | |||||
return Success("生成成功!"); | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,44 @@ | |||||
@{ | |||||
ViewBag.Title = "疫情"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-6 lr-form-item" data-table="VaccinationInfo"> | |||||
<div class="lr-form-item-title">学号</div> | |||||
<input id="StuNo" type="text" class="form-control" readonly="readonly" /> | |||||
<input id="StuOrTeach" type="text" hidden="hidden" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="VaccinationInfo"> | |||||
<div class="lr-form-item-title">姓名</div> | |||||
<input id="StuName" type="text" class="form-control" readonly="readonly" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="VaccinationInfo"> | |||||
<div class="lr-form-item-title">接种地</div> | |||||
<input id="VaccineAddress" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="VaccinationInfo"> | |||||
<div class="lr-form-item-title">疫苗类型</div> | |||||
<div id="VaccineType"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="VaccinationInfo"> | |||||
<div class="lr-form-item-title">第一针时间</div> | |||||
<input id="FirstNeedle" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#FirstNeedle').trigger('change'); } })" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="VaccinationInfo"> | |||||
<div class="lr-form-item-title">第二针时间</div> | |||||
<input id="SecondNeedle" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#SecondNeedle').trigger('change'); } })" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="VaccinationInfo"> | |||||
<div class="lr-form-item-title">第三针时间</div> | |||||
<input id="ThirdNeedle" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#ThirdNeedle').trigger('change'); } })" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="VaccinationInfo"> | |||||
<div class="lr-form-item-title">未接种原因</div> | |||||
<textarea id="NotReason" class="form-control" style="height:60px;"></textarea> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="VaccinationInfo"> | |||||
<div class="lr-form-item-title">备注</div> | |||||
<textarea id="Remark" class="form-control" style="height:100px;"></textarea> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/VaccinationInfo/Form.js") |
@@ -0,0 +1,51 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2022-07-18 17:52 | |||||
* 描 述:疫情 | |||||
*/ | |||||
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 () { | |||||
$('#VaccineType').lrDataItemSelect({ code: 'VaccineType' }); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/VaccinationInfo/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/VaccinationInfo/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,56 @@ | |||||
@{ | |||||
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-6 lr-form-item"> | |||||
<div class="lr-form-item-title">学号</div> | |||||
<input id="StuNo" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">姓名</div> | |||||
<input id="StuName" type="text" class="form-control" /> | |||||
</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 class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">班级</div> | |||||
<div id="ClassNo"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">接种类型</div> | |||||
<div id="VaccineType"></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_create" 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/VaccinationInfo/Index.js") |
@@ -0,0 +1,232 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2022-07-18 17:52 | |||||
* 描 述:疫情 | |||||
*/ | |||||
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); | |||||
$('#VaccineType').lrDataItemSelect({ code: 'VaccineType' }); | |||||
$('#DeptNo').lrselect({ | |||||
value: "deptno", | |||||
text: "deptname", | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#MajorNo').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||||
param: { code: "CdMajorInfo", strWhere: "DeptNo='" + item.deptno + "'" } | |||||
}); | |||||
} | |||||
else { | |||||
$('#MajorNo').lrselectRefresh({ | |||||
url: "", | |||||
data: [] | |||||
}); | |||||
} | |||||
$('#ClassNo').lrselectRefresh({ | |||||
url: "", | |||||
data: [] | |||||
}); | |||||
} | |||||
}); | |||||
$('#MajorNo').lrselect({ | |||||
value: "majorno", | |||||
text: "majorname", | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#ClassNo').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||||
param: { code: "bjsj", strWhere: "DeptNo='" + item.deptno + "' and majorno='" + item.majorno + "'" } | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
$('#MajorNo').on("click", | |||||
function () { | |||||
var data = $('#DeptNo').lrselectGet(); | |||||
if (!data) { | |||||
learun.alert.error('请先选择系'); | |||||
} | |||||
}); | |||||
$('#ClassNo').on("click", | |||||
function () { | |||||
var data1 = $('#DeptNo').lrselectGet(); | |||||
var data2 = $('#MajorNo').lrselectGet(); | |||||
if (!data1 || !data2) { | |||||
learun.alert.error('请先选择系和专业'); | |||||
} | |||||
}); | |||||
$('#ClassNo').lrselect({ | |||||
value: "classno", | |||||
text: "classname" | |||||
}); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
//// 新增 | |||||
//$('#lr_add').on('click', function () { | |||||
// learun.layerForm({ | |||||
// id: 'form', | |||||
// title: '新增', | |||||
// url: top.$.rootUrl + '/EducationalAdministration/VaccinationInfo/Form', | |||||
// width: 600, | |||||
// height: 400, | |||||
// callBack: function (id) { | |||||
// return top[id].acceptClick(refreshGirdData); | |||||
// } | |||||
// }); | |||||
//}); | |||||
// 编辑 | |||||
$('#lr_edit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '编辑', | |||||
url: top.$.rootUrl + '/EducationalAdministration/VaccinationInfo/Form?keyValue=' + keyValue, | |||||
width: 600, | |||||
height: 430, | |||||
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/VaccinationInfo/DeleteForm', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 一键生成 | |||||
$('#lr_create').on('click', function () { | |||||
var userId = learun.clientdata.get(['userinfo']).userId; | |||||
learun.layerConfirm('是否确认一键生成!', function (res) { | |||||
if (res) { | |||||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/VaccinationInfo/CreateFrom', { userId: userId, Description: 0 }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').lrAuthorizeJfGrid({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/VaccinationInfo/GetPageList', | |||||
headData: [ | |||||
{ label: "学号", name: "StuNo", width: 100, align: "left" }, | |||||
{ label: "姓名", name: "StuName", width: 160, align: "left" }, | |||||
{ label: "年龄", name: "Age", width: 80, align: "left" }, | |||||
{ label: "身份证", name: "CardId", width: 150, align: "left" }, | |||||
{ | |||||
label: "院系", name: "DeptNo", width: 160, 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: 160, 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: 160, 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: "Mobile", width: 120, align: "left" }, | |||||
{ | |||||
label: "疫苗类型", name: "VaccineType", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'VaccineType', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "接种地", name: "VaccineAddress", width: 100, align: "left" }, | |||||
{ | |||||
label: "第一针时间", name: "FirstNeedle", width: 80, align: "left", | |||||
formatter: function (cellvalue) { | |||||
return learun.formatDate(cellvalue, 'yyyy-MM-dd'); | |||||
} | |||||
}, | |||||
{ | |||||
label: "第二针时间", name: "SecondNeedle", width: 80, align: "left", | |||||
formatter: function (cellvalue) { | |||||
return learun.formatDate(cellvalue, 'yyyy-MM-dd'); | |||||
} | |||||
}, | |||||
{ | |||||
label: "第三针时间", name: "ThirdNeedle", width: 80, align: "left", | |||||
formatter: function (cellvalue) { | |||||
return learun.formatDate(cellvalue, 'yyyy-MM-dd'); | |||||
} | |||||
}, | |||||
{ label: "未接种原因", name: "NotReason", width: 150, align: "left" }, | |||||
{ label: "备注", name: "Remark", width: 200, align: "left" }, | |||||
], | |||||
mainId: 'Id', | |||||
sidx: 'CreateTime desc', | |||||
isPage: true | |||||
}); | |||||
page.search(); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
param.StuOrTeach = 0; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
refreshGirdData = function () { | |||||
$('#gridtable').jfGridSet('reload'); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,44 @@ | |||||
@{ | |||||
ViewBag.Title = "疫情"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-6 lr-form-item" data-table="VaccinationInfo"> | |||||
<div class="lr-form-item-title">职工号</div> | |||||
<input id="EmpNo" type="text" class="form-control" readonly="readonly" /> | |||||
<input id="StuOrTeach" type="text" hidden="hidden" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="VaccinationInfo"> | |||||
<div class="lr-form-item-title">姓名</div> | |||||
<input id="EmpName" type="text" class="form-control" readonly="readonly" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="VaccinationInfo"> | |||||
<div class="lr-form-item-title">接种地</div> | |||||
<input id="VaccineAddress" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="VaccinationInfo"> | |||||
<div class="lr-form-item-title">疫苗类型</div> | |||||
<div id="VaccineType"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="VaccinationInfo"> | |||||
<div class="lr-form-item-title">第一针时间</div> | |||||
<input id="FirstNeedle" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#FirstNeedle').trigger('change'); } })" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="VaccinationInfo"> | |||||
<div class="lr-form-item-title">第二针时间</div> | |||||
<input id="SecondNeedle" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#SecondNeedle').trigger('change'); } })" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="VaccinationInfo"> | |||||
<div class="lr-form-item-title">第三针时间</div> | |||||
<input id="ThirdNeedle" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#ThirdNeedle').trigger('change'); } })" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="VaccinationInfo"> | |||||
<div class="lr-form-item-title">未接种原因</div> | |||||
<textarea id="NotReason" class="form-control" style="height:60px;"></textarea> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="VaccinationInfo"> | |||||
<div class="lr-form-item-title">备注</div> | |||||
<textarea id="Remark" class="form-control" style="height:100px;"></textarea> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/VaccinationInfo/TeachForm.js") |
@@ -0,0 +1,51 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2022-07-18 17:52 | |||||
* 描 述:疫情 | |||||
*/ | |||||
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 () { | |||||
$('#VaccineType').lrDataItemSelect({ code: 'VaccineType' }); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/VaccinationInfo/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/VaccinationInfo/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,53 @@ | |||||
@using Learun.Application.Web | |||||
@{ | |||||
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="DepartmentId"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">职工号</div> | |||||
<input id="EmpNo" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">姓名</div> | |||||
<input id="EmpName" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">接种类型</div> | |||||
<div id="VaccineType"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">身份证号</div> | |||||
<input id="CardId" type="text" class="form-control" /> | |||||
</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_create" 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/VaccinationInfo/TeachIndex.js") |
@@ -0,0 +1,211 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2022-07-18 17:52 | |||||
* 描 述:疫情 | |||||
*/ | |||||
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); | |||||
$('#VaccineType').lrDataItemSelect({ code: 'VaccineType' }); | |||||
$('#DepartmentId').lrselect({ | |||||
type: 'tree', | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree', | |||||
param: {} | |||||
}); | |||||
$('#DeptNo').lrselect({ | |||||
value: "deptno", | |||||
text: "deptname", | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo', | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#MajorNo').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||||
param: { code: "CdMajorInfo", strWhere: "DeptNo='" + item.deptno + "'" } | |||||
}); | |||||
} | |||||
else { | |||||
$('#MajorNo').lrselectRefresh({ | |||||
url: "", | |||||
data: [] | |||||
}); | |||||
} | |||||
$('#ClassNo').lrselectRefresh({ | |||||
url: "", | |||||
data: [] | |||||
}); | |||||
} | |||||
}); | |||||
$('#MajorNo').lrselect({ | |||||
value: "majorno", | |||||
text: "majorname", | |||||
select: function (item) { | |||||
if (item) { | |||||
$('#ClassNo').lrselectRefresh({ | |||||
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', | |||||
param: { code: "bjsj", strWhere: "DeptNo='" + item.deptno + "' and majorno='" + item.majorno + "'" } | |||||
}); | |||||
} | |||||
} | |||||
}); | |||||
$('#MajorNo').on("click", | |||||
function () { | |||||
var data = $('#DeptNo').lrselectGet(); | |||||
if (!data) { | |||||
learun.alert.error('请先选择系'); | |||||
} | |||||
}); | |||||
$('#ClassNo').on("click", | |||||
function () { | |||||
var data1 = $('#DeptNo').lrselectGet(); | |||||
var data2 = $('#MajorNo').lrselectGet(); | |||||
if (!data1 || !data2) { | |||||
learun.alert.error('请先选择系和专业'); | |||||
} | |||||
}); | |||||
$('#ClassNo').lrselect({ | |||||
value: "classno", | |||||
text: "classname" | |||||
}); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
//// 新增 | |||||
//$('#lr_add').on('click', function () { | |||||
// learun.layerForm({ | |||||
// id: 'form', | |||||
// title: '新增', | |||||
// url: top.$.rootUrl + '/EducationalAdministration/VaccinationInfo/Form', | |||||
// width: 600, | |||||
// height: 400, | |||||
// callBack: function (id) { | |||||
// return top[id].acceptClick(refreshGirdData); | |||||
// } | |||||
// }); | |||||
//}); | |||||
// 编辑 | |||||
$('#lr_edit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '编辑', | |||||
url: top.$.rootUrl + '/EducationalAdministration/VaccinationInfo/TeachForm?keyValue=' + keyValue, | |||||
width: 600, | |||||
height: 430, | |||||
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/VaccinationInfo/DeleteForm', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 一键生成 | |||||
$('#lr_create').on('click', function () { | |||||
var userId = learun.clientdata.get(['userinfo']).userId; | |||||
learun.layerConfirm('是否确认一键生成!', function (res) { | |||||
if (res) { | |||||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/VaccinationInfo/CreateFrom', { userId: userId, Description: 1 }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').jfGrid({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/VaccinationInfo/GetPageList', | |||||
headData: [ | |||||
{ label: "职工编号", name: "EmpNo", width: 100, align: "left" }, | |||||
{ label: "姓名", name: "EmpName", width: 150, align: "left" }, | |||||
{ label: "身份证", name: "CardId", width: 160, align: "left" }, | |||||
{ | |||||
label: "部门", name: "DepartmentId", width: 200, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('custmerData', { | |||||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||||
key: value, | |||||
keyId: 'id', | |||||
callback: function (_data) { | |||||
callback(_data['name']); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "电话号码", name: "Mobile", width: 120, align: "left" }, | |||||
{ | |||||
label: "疫苗类型", name: "VaccineType", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'VaccineType', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "接种地", name: "VaccineAddress", width: 100, align: "left" }, | |||||
{ | |||||
label: "第一针时间", name: "FirstNeedle", width: 100, align: "left", | |||||
formatter: function (cellvalue) { | |||||
return learun.formatDate(cellvalue, 'yyyy-MM-dd'); | |||||
} | |||||
}, | |||||
{ | |||||
label: "第二针时间", name: "SecondNeedle", width: 100, align: "left", | |||||
formatter: function (cellvalue) { | |||||
return learun.formatDate(cellvalue, 'yyyy-MM-dd'); | |||||
} | |||||
}, | |||||
{ | |||||
label: "第三针时间", name: "ThirdNeedle", width: 100, align: "left", | |||||
formatter: function (cellvalue) { | |||||
return learun.formatDate(cellvalue, 'yyyy-MM-dd'); | |||||
} | |||||
}, | |||||
{ label: "未接种原因", name: "NotReason", width: 200, align: "left" }, | |||||
{ label: "备注", name: "Remark", width: 300, align: "left" }, | |||||
], | |||||
mainId: 'Id', | |||||
sidx: 'CreateTime desc', | |||||
isPage: true | |||||
}); | |||||
page.search(); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
param.StuOrTeach = 1; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
refreshGirdData = function () { | |||||
$('#gridtable').jfGridSet('reload'); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -840,6 +840,7 @@ | |||||
<Compile Include="Areas\EducationalAdministration\Controllers\HealthPunchTimeController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\HealthPunchTimeController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\HealthPunchStuController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\HealthPunchStuController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\Acc_DormitoryChangeController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\Acc_DormitoryChangeController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\VaccinationInfoController.cs" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | <Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | ||||
@@ -1201,6 +1202,8 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\Thermography\IndexResult.js" /> | <Content Include="Areas\EducationalAdministration\Views\Thermography\IndexResult.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Thermography\StatisticIndex.js" /> | <Content Include="Areas\EducationalAdministration\Views\Thermography\StatisticIndex.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Thermography\SubmitIndex.js" /> | <Content Include="Areas\EducationalAdministration\Views\Thermography\SubmitIndex.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\VaccinationInfo\TeachForm.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\VaccinationInfo\TeachIndex.js" /> | |||||
<Content Include="Areas\EvaluationTeach\Views\Eval_Main\AnswerIndex.js" /> | <Content Include="Areas\EvaluationTeach\Views\Eval_Main\AnswerIndex.js" /> | ||||
<Content Include="Areas\EvaluationTeach\Views\Eval_Main\TeacherIndex2.js" /> | <Content Include="Areas\EvaluationTeach\Views\Eval_Main\TeacherIndex2.js" /> | ||||
<Content Include="Areas\EvaluationTeach\Views\Eval_Main\TeacherIndex.js" /> | <Content Include="Areas\EvaluationTeach\Views\Eval_Main\TeacherIndex.js" /> | ||||
@@ -6592,6 +6595,10 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\Acc_DormitoryChange\Index.js" /> | <Content Include="Areas\EducationalAdministration\Views\Acc_DormitoryChange\Index.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Acc_DormitoryChange\Form.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\Acc_DormitoryChange\Form.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Acc_DormitoryChange\Form.js" /> | <Content Include="Areas\EducationalAdministration\Views\Acc_DormitoryChange\Form.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\VaccinationInfo\Index.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\VaccinationInfo\Index.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\VaccinationInfo\Form.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\VaccinationInfo\Form.js" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<Folder Include="Areas\EducationalAdministration\Views\HomeStatistics\" /> | <Folder Include="Areas\EducationalAdministration\Views\HomeStatistics\" /> | ||||
@@ -7088,7 +7095,6 @@ | |||||
</ProjectReference> | </ProjectReference> | ||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<Content Include="Areas\EducationalAdministration\Views\web.config" /> | |||||
<Content Include="Areas\LR_OrganizationModule\Views\User\StudentIndex.cshtml" /> | <Content Include="Areas\LR_OrganizationModule\Views\User\StudentIndex.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\LanMail\Index.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\LanMail\Index.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\SYS_SendMessage\FormView.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\SYS_SendMessage\FormView.cshtml" /> | ||||
@@ -7920,6 +7926,8 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\SchoolCalendar\ScheduleIndex.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\SchoolCalendar\ScheduleIndex.cshtml" /> | ||||
<Content Include="Areas\LogisticsManagement\Views\Accommodation\ClearForm.cshtml" /> | <Content Include="Areas\LogisticsManagement\Views\Accommodation\ClearForm.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\StatisticsProvince.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\StatisticsProvince.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\VaccinationInfo\TeachForm.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\VaccinationInfo\TeachIndex.cshtml" /> | |||||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | <None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | ||||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | ||||
<Content Include="Views\Login\Default-beifen.cshtml" /> | <Content Include="Views\Login\Default-beifen.cshtml" /> | ||||
@@ -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 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-07-18 17:52 | |||||
/// 描 述:疫情 | |||||
/// </summary> | |||||
public class VaccinationInfoMap : EntityTypeConfiguration<VaccinationInfoEntity> | |||||
{ | |||||
public VaccinationInfoMap() | |||||
{ | |||||
#region 表、主键 | |||||
//表 | |||||
this.ToTable("VACCINATIONINFO"); | |||||
//主键 | |||||
this.HasKey(t => t.Id); | |||||
#endregion | |||||
#region 配置关系 | |||||
#endregion | |||||
} | |||||
} | |||||
} | |||||
@@ -595,6 +595,7 @@ | |||||
<Compile Include="EducationalAdministration\HealthPunchTimeMap.cs" /> | <Compile Include="EducationalAdministration\HealthPunchTimeMap.cs" /> | ||||
<Compile Include="EducationalAdministration\HealthPunchStuMap.cs" /> | <Compile Include="EducationalAdministration\HealthPunchStuMap.cs" /> | ||||
<Compile Include="EducationalAdministration\Acc_DormitoryChangeMap.cs" /> | <Compile Include="EducationalAdministration\Acc_DormitoryChangeMap.cs" /> | ||||
<Compile Include="EducationalAdministration\VaccinationInfoMap.cs" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | <ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | ||||
@@ -0,0 +1,146 @@ | |||||
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 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-07-18 17:52 | |||||
/// 描 述:疫情 | |||||
/// </summary> | |||||
public class VaccinationInfoBLL : VaccinationInfoIBLL | |||||
{ | |||||
private VaccinationInfoService vaccinationInfoService = new VaccinationInfoService(); | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<VaccinationInfoEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return vaccinationInfoService.GetPageList(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取VaccinationInfo表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public VaccinationInfoEntity GetVaccinationInfoEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return vaccinationInfoService.GetVaccinationInfoEntity(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 | |||||
{ | |||||
vaccinationInfoService.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, VaccinationInfoEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
vaccinationInfoService.SaveEntity(keyValue, entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
/// <summary> | |||||
/// 生成实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void CreateEntity(string userId, string Description) | |||||
{ | |||||
try | |||||
{ | |||||
vaccinationInfoService.CreateEntity(userId, Description); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} |
@@ -0,0 +1,170 @@ | |||||
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 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-07-18 17:52 | |||||
/// 描 述:疫情 | |||||
/// </summary> | |||||
public class VaccinationInfoEntity | |||||
{ | |||||
#region 实体成员 | |||||
/// <summary> | |||||
/// Id | |||||
/// </summary> | |||||
[Column("ID")] | |||||
public string Id { get; set; } | |||||
/// <summary> | |||||
/// 0:学生1:教师 | |||||
/// </summary> | |||||
[Column("STUORTEACH")] | |||||
public int? StuOrTeach { get; set; } | |||||
/// <summary> | |||||
/// StuNo | |||||
/// </summary> | |||||
[Column("STUNO")] | |||||
public string StuNo { get; set; } | |||||
/// <summary> | |||||
/// StuName | |||||
/// </summary> | |||||
[Column("STUNAME")] | |||||
public string StuName { get; set; } | |||||
/// <summary> | |||||
/// CardId | |||||
/// </summary> | |||||
[Column("CARDID")] | |||||
public string CardId { get; set; } | |||||
/// <summary> | |||||
/// DepartmentId | |||||
/// </summary> | |||||
[Column("DEPARTMENTID")] | |||||
public string DepartmentId { get; set; } | |||||
/// <summary> | |||||
/// DeptNo | |||||
/// </summary> | |||||
[Column("DEPTNO")] | |||||
public string DeptNo { get; set; } | |||||
/// <summary> | |||||
/// MajorNo | |||||
/// </summary> | |||||
[Column("MAJORNO")] | |||||
public string MajorNo { get; set; } | |||||
/// <summary> | |||||
/// ClassNo | |||||
/// </summary> | |||||
[Column("CLASSNO")] | |||||
public string ClassNo { get; set; } | |||||
/// <summary> | |||||
/// Mobile | |||||
/// </summary> | |||||
[Column("MOBILE")] | |||||
public string Mobile { get; set; } | |||||
/// <summary> | |||||
/// EmpNo | |||||
/// </summary> | |||||
[Column("EMPNO")] | |||||
public string EmpNo { get; set; } | |||||
/// <summary> | |||||
/// EmpName | |||||
/// </summary> | |||||
[Column("EMPNAME")] | |||||
public string EmpName { get; set; } | |||||
/// <summary> | |||||
/// 生日 | |||||
/// </summary> | |||||
[Column("BIRTHDAY")] | |||||
public DateTime? Birthday { get; set; } | |||||
/// <summary> | |||||
/// 接种类型 | |||||
/// </summary> | |||||
[Column("VACCINETYPE")] | |||||
public string VaccineType { get; set; } | |||||
/// <summary> | |||||
/// NotReason | |||||
/// </summary> | |||||
[Column("NOTREASON")] | |||||
public string NotReason { get; set; } | |||||
/// <summary> | |||||
/// FirstNeedle | |||||
/// </summary> | |||||
[Column("FIRSTNEEDLE")] | |||||
public DateTime? FirstNeedle { get; set; } | |||||
/// <summary> | |||||
/// SecondNeedle | |||||
/// </summary> | |||||
[Column("SECONDNEEDLE")] | |||||
public DateTime? SecondNeedle { get; set; } | |||||
/// <summary> | |||||
/// ThirdNeedle | |||||
/// </summary> | |||||
[Column("THIRDNEEDLE")] | |||||
public DateTime? ThirdNeedle { get; set; } | |||||
/// <summary> | |||||
/// Remark | |||||
/// </summary> | |||||
[Column("REMARK")] | |||||
public string Remark { get; set; } | |||||
/// <summary> | |||||
/// State | |||||
/// </summary> | |||||
[Column("STATE")] | |||||
public int? State { get; set; } | |||||
/// <summary> | |||||
/// CreateTime | |||||
/// </summary> | |||||
[Column("CREATETIME")] | |||||
public DateTime? CreateTime { get; set; } | |||||
/// <summary> | |||||
/// CreateUser | |||||
/// </summary> | |||||
[Column("CREATEUSER")] | |||||
public string CreateUser { get; set; } | |||||
/// <summary> | |||||
/// LastTime | |||||
/// </summary> | |||||
[Column("LASTTIME")] | |||||
public DateTime? LastTime { get; set; } | |||||
/// <summary> | |||||
/// LastUser | |||||
/// </summary> | |||||
[Column("LASTUSER")] | |||||
public string LastUser { get; set; } | |||||
/// <summary> | |||||
/// 接种地 | |||||
/// </summary> | |||||
[Column("VACCINEADDRESS")] | |||||
public string VaccineAddress { get; set; } | |||||
/// <summary> | |||||
/// | |||||
/// </summary> | |||||
[NotMapped] | |||||
public int? Age { 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,51 @@ | |||||
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 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-07-18 17:52 | |||||
/// 描 述:疫情 | |||||
/// </summary> | |||||
public interface VaccinationInfoIBLL | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<VaccinationInfoEntity> GetPageList(Pagination pagination, string queryJson); | |||||
/// <summary> | |||||
/// 获取VaccinationInfo表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
VaccinationInfoEntity GetVaccinationInfoEntity(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, VaccinationInfoEntity entity); | |||||
#endregion | |||||
/// <summary> | |||||
/// 生成 | |||||
/// </summary> | |||||
void CreateEntity(string userId,string Description); | |||||
} | |||||
} |
@@ -0,0 +1,284 @@ | |||||
using Dapper; | |||||
using Learun.DataBase.Repository; | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Data; | |||||
using System.Linq; | |||||
using System.Text; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-07-18 17:52 | |||||
/// 描 述:疫情 | |||||
/// </summary> | |||||
public class VaccinationInfoService : RepositoryFactory | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">查询参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<VaccinationInfoEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" t.* "); | |||||
strSql.Append(" FROM VaccinationInfo t "); | |||||
strSql.Append(" left join ClassInfo c on t.classno = c.classno "); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
var login = LoginUserInfo.Get(); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
var StuOrTeach = queryParam["StuOrTeach"].ToString(); | |||||
if (StuOrTeach == "0") | |||||
{ | |||||
if (!queryParam["StuOrTeach"].IsEmpty()) | |||||
{ | |||||
dp.Add("StuOrTeach", queryParam["StuOrTeach"].ToString(), DbType.Int32); | |||||
strSql.Append(" AND t.StuOrTeach = @StuOrTeach "); | |||||
} | |||||
if (!queryParam["StuNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("StuNo", "%" + queryParam["StuNo"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.StuNo Like @StuNo "); | |||||
} | |||||
if (!queryParam["StuName"].IsEmpty()) | |||||
{ | |||||
dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.StuName Like @StuName "); | |||||
} | |||||
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 "); | |||||
} | |||||
if (!queryParam["ClassNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.ClassNo = @ClassNo "); | |||||
} | |||||
if (!queryParam["CardId"].IsEmpty()) | |||||
{ | |||||
dp.Add("CardId", "%" + queryParam["CardId"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.CardId like @CardId "); | |||||
} | |||||
if (!queryParam["VaccineType"].IsEmpty()) | |||||
{ | |||||
dp.Add("VaccineType", queryParam["VaccineType"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.VaccineType =@VaccineType "); | |||||
} | |||||
if (!queryParam["Mobile"].IsEmpty()) | |||||
{ | |||||
dp.Add("Mobile", "%" + queryParam["Mobile"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.Mobile like @Mobile "); | |||||
} | |||||
if (login.Description == "教师") | |||||
{ | |||||
strSql.Append(" AND c.ClassDiredctorno = '" + login.account + "' "); | |||||
} | |||||
} | |||||
else if (StuOrTeach == "1") | |||||
{ | |||||
if (!queryParam["StuOrTeach"].IsEmpty()) | |||||
{ | |||||
dp.Add("StuOrTeach", queryParam["StuOrTeach"].ToString(), DbType.Int32); | |||||
strSql.Append(" AND t.StuOrTeach = @StuOrTeach "); | |||||
} | |||||
if (!queryParam["VaccineType"].IsEmpty()) | |||||
{ | |||||
dp.Add("VaccineType", queryParam["VaccineType"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.VaccineType =@VaccineType "); | |||||
} | |||||
if (!queryParam["DepartmentId"].IsEmpty()) | |||||
{ | |||||
dp.Add("DepartmentId", queryParam["DepartmentId"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.DepartmentId = @DepartmentId "); | |||||
} | |||||
if (!queryParam["CardId"].IsEmpty()) | |||||
{ | |||||
dp.Add("CardId", "%" + queryParam["CardId"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.CardId like @CardId "); | |||||
} | |||||
if (!queryParam["Mobile"].IsEmpty()) | |||||
{ | |||||
dp.Add("Mobile", "%" + queryParam["Mobile"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.Mobile like @Mobile "); | |||||
} | |||||
if (!queryParam["EmpNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("EmpNo", "%" + queryParam["EmpNo"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.EmpNo Like @EmpNo "); | |||||
} | |||||
if (!queryParam["EmpName"].IsEmpty()) | |||||
{ | |||||
dp.Add("EmpName", "%" + queryParam["EmpName"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.EmpName Like @EmpName "); | |||||
} | |||||
} | |||||
var data = this.BaseRepository("CollegeMIS").FindList<VaccinationInfoEntity>(strSql.ToString(), dp, pagination); | |||||
if (data.Count() > 0 && StuOrTeach == "0") | |||||
{ | |||||
foreach (var item in data) | |||||
{ | |||||
item.Age = DateTime.Now.Year - Convert.ToInt32(item.CardId.ToString().Substring(6, 4)); | |||||
} | |||||
} | |||||
return data; | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取VaccinationInfo表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public VaccinationInfoEntity GetVaccinationInfoEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<VaccinationInfoEntity>(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<VaccinationInfoEntity>(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, VaccinationInfoEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
var logininfo = LoginUserInfo.Get(); | |||||
if (!string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
entity.LastTime = DateTime.Now; | |||||
entity.LastUser = logininfo.userId; | |||||
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 | |||||
/// <summary> | |||||
/// 生成实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void CreateEntity(string userId, string Description) | |||||
{ | |||||
try | |||||
{ | |||||
if (Description == "0") | |||||
{ | |||||
this.BaseRepository("CollegeMIS").ExecuteBySql(@"insert into VaccinationInfo( | |||||
Id, StuOrTeach, stuno, stuname, CardId, deptno, majorno, classno, Mobile, birthday, CreateTime, CreateUser) | |||||
select NEWID(),'" + Description + "',stuno,stuname,IdentityCardNo,DeptNo,MajorNo,ClassNo,Mobile,birthday,'" | |||||
+ DateTime.Now + "','" + userId | |||||
+ "' from StuInfoBasic where CheckMark = '1' and stuno not in (select stuno from VaccinationInfo where stuno is not null)"); | |||||
} | |||||
else | |||||
{ | |||||
this.BaseRepository("CollegeMIS").ExecuteBySql(@"insert into VaccinationInfo( | |||||
Id,StuOrTeach,CardId,empno,empname,DepartmentId,Mobile,birthday,CreateTime,CreateUser) | |||||
select NEWID(),'" + Description + "',IdentityCardNo,EmpNo,empname,F_DepartmentId,Mobile,birthday,'" | |||||
+ DateTime.Now + "','" + userId | |||||
+ "' from empinfo where CheckMark = '1' and EmpNo not in (select EmpNo from VaccinationInfo where EmpNo is not null)"); | |||||
} | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
} | |||||
} |
@@ -1807,6 +1807,10 @@ | |||||
<Compile Include="EducationalAdministration\Acc_DormitoryChange\Acc_DormitoryChangeService.cs" /> | <Compile Include="EducationalAdministration\Acc_DormitoryChange\Acc_DormitoryChangeService.cs" /> | ||||
<Compile Include="EducationalAdministration\Acc_DormitoryChange\Acc_DormitoryChangeBLL.cs" /> | <Compile Include="EducationalAdministration\Acc_DormitoryChange\Acc_DormitoryChangeBLL.cs" /> | ||||
<Compile Include="EducationalAdministration\Acc_DormitoryChange\Acc_DormitoryChangeIBLL.cs" /> | <Compile Include="EducationalAdministration\Acc_DormitoryChange\Acc_DormitoryChangeIBLL.cs" /> | ||||
<Compile Include="EducationalAdministration\VaccinationInfo\VaccinationInfoEntity.cs" /> | |||||
<Compile Include="EducationalAdministration\VaccinationInfo\VaccinationInfoService.cs" /> | |||||
<Compile Include="EducationalAdministration\VaccinationInfo\VaccinationInfoBLL.cs" /> | |||||
<Compile Include="EducationalAdministration\VaccinationInfo\VaccinationInfoIBLL.cs" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | <ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | ||||