Просмотр исходного кода

安全排查流程

和田中职
ndbs 2 месяцев назад
Родитель
Сommit
cd9cf7e77e
14 измененных файлов: 1305 добавлений и 0 удалений
  1. +165
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/SafetyCheckController.cs
  2. +39
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/Form.cshtml
  3. +62
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/Form.js
  4. +47
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/FormCheck.cshtml
  5. +65
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/FormCheck.js
  6. +43
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/FormView.cshtml
  7. +60
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/FormView.js
  8. +47
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/Index.cshtml
  9. +245
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/Index.js
  10. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/SafetyCheckMap.cs
  11. +144
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SafetyCheck/SafetyCheckBLL.cs
  12. +120
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SafetyCheck/SafetyCheckEntity.cs
  13. +53
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SafetyCheck/SafetyCheckIBLL.cs
  14. +186
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SafetyCheck/SafetyCheckService.cs

+ 165
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/SafetyCheckController.cs Просмотреть файл

@@ -0,0 +1,165 @@
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 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2024-09-12 09:46
/// 描 述:安全排查流程
/// </summary>
public class SafetyCheckController : MvcControllerBase
{
private SafetyCheckIBLL safetyCheckIBLL = new SafetyCheckBLL();

#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 FormView()
{
return View();
}
/// <summary>
/// 部门审查
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormCheck()
{
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 = safetyCheckIBLL.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 SafetyCheckData = safetyCheckIBLL.GetSafetyCheckEntity(keyValue);
var jsonData = new
{
SafetyCheck = SafetyCheckData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
safetyCheckIBLL.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)
{
SafetyCheckEntity entity = strEntity.ToObject<SafetyCheckEntity>();
safetyCheckIBLL.SaveEntity(keyValue, entity);
if (!string.IsNullOrEmpty(keyValue))
{

}
return Success("保存成功!");
}
#endregion
/// <summary>
/// 提交
/// </summary>
/// <param name="keyValue"></param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult SubmitForm(string keyValue)
{
safetyCheckIBLL.SubmitEnity(keyValue);
return Success("提交成功!");
}

[HttpPost]
[AjaxOnly]
public ActionResult DepartmentForm(string keyValue, string strEntity)
{
SafetyCheckEntity entity = strEntity.ToObject<SafetyCheckEntity>();
if (entity.Status != 0)
{
entity.Status = 2;
}
else
{
entity.Status = 0;
}
safetyCheckIBLL.SaveEntity(keyValue, entity);
return Success("操作成功!");
}
}
}

+ 39
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/Form.cshtml Просмотреть файл

@@ -0,0 +1,39 @@
@{
ViewBag.Title = "安全排查流程";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-6 lr-form-item" data-table="SafetyCheck" >
<div class="lr-form-item-title">网络格员</div>
<input id="Name" type="text" readonly class="form-control currentInfo lr-currentInfo-user" />
</div>
<div class="col-xs-6 lr-form-item" data-table="SafetyCheck" >
<div class="lr-form-item-title">处室部门</div>
<input id="Department" type="text" readonly class="form-control currentInfo lr-currentInfo-department" />
</div>
<div class="col-xs-6 lr-form-item" data-table="SafetyCheck" >
<div class="lr-form-item-title">责任区域<font face="宋体">*</font></div>
<input id="Area" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item" data-table="SafetyCheck" >
<div class="lr-form-item-title">排查时间<font face="宋体">*</font></div>
<input id="CheckTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#CheckTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="SafetyCheck" >
<div class="lr-form-item-title">发现的隐患<font face="宋体">*</font></div>
<textarea id="Question" class="form-control" style="height:100px;" isvalid="yes" checkexpession="NotNull" ></textarea>
</div>
<div class="col-xs-12 lr-form-item" data-table="SafetyCheck" >
<div class="lr-form-item-title">整改措施及建议</div>
<textarea id="idea" class="form-control" style="height:100px;" ></textarea>
</div>
<div class="col-xs-12 lr-form-item" data-table="SafetyCheck" >
<div class="lr-form-item-title">附件上传</div>
<div id="Path" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="SafetyCheck" >
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height:100px;" ></textarea>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/SafetyCheck/Form.js")

+ 62
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/Form.js Просмотреть файл

@@ -0,0 +1,62 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2024-09-12 09:46
* 描 述:安全排查流程
*/
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 () {
$('#Name')[0].lrvalue = learun.clientdata.get(['userinfo']).userId;
$('#Name').val(learun.clientdata.get(['userinfo']).realName);
$('#Department')[0].lrvalue = learun.clientdata.get(['userinfo']).departmentId;
$('#Department').lrselectSet(learun.clientdata.get(['userinfo']).departmentId);
//$('#Department').val(learun.clientdata.get(['userinfo']).departmentId);
learun.clientdata.getAsync('department', {
key: learun.clientdata.get(['userinfo']).departmentId,
callback: function (_data) {
$('#Department').val(_data.name);
}
});
$('#Path').lrUploader();
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/SafetyCheck/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/SafetyCheck/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 47
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/FormCheck.cshtml Просмотреть файл

@@ -0,0 +1,47 @@
@{
ViewBag.Title = "安全排查流程";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-6 lr-form-item" data-table="SafetyCheck">
<div class="lr-form-item-title">网络格员</div>
<input id="Name" type="text" readonly class="form-control currentInfo lr-currentInfo-user" />
</div>
<div class="col-xs-6 lr-form-item" data-table="SafetyCheck">
<div class="lr-form-item-title">处室部门</div>
<input id="Department" type="text" readonly class="form-control currentInfo lr-currentInfo-department" />
</div>
<div class="col-xs-6 lr-form-item" data-table="SafetyCheck">
<div class="lr-form-item-title">责任区域<font face="宋体">*</font></div>
<input id="Area" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" readonly="readonly" />
</div>
<div class="col-xs-6 lr-form-item" data-table="SafetyCheck">
<div class="lr-form-item-title">排查时间<font face="宋体">*</font></div>
<input id="CheckTime" type="text" class="form-control lr-input-wdatepicker" readonly="readonly" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#CheckTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="SafetyCheck">
<div class="lr-form-item-title">发现的隐患<font face="宋体">*</font></div>
<textarea id="Question" class="form-control" style="height:100px;" isvalid="yes" readonly="readonly" checkexpession="NotNull"></textarea>
</div>
<div class="col-xs-12 lr-form-item" data-table="SafetyCheck">
<div class="lr-form-item-title">整改措施及建议</div>
<textarea id="idea" class="form-control" style="height:100px;" readonly="readonly"></textarea>
</div>
<div class="col-xs-12 lr-form-item" data-table="SafetyCheck">
<div class="lr-form-item-title">附件上传</div>
<div id="Path"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="SafetyCheck">
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height:100px;" readonly="readonly"></textarea>
</div>
<div class="col-xs-12 lr-form-item" data-table="SafetyCheck">
<div class="lr-form-item-title">继续上报</div>
<div id="Status"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="SafetyCheck">
<div class="lr-form-item-title">部门建议</div>
<textarea id="DepartmentRemark" class="form-control" style="height:100px;"></textarea>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/SafetyCheck/FormCheck.js")

+ 65
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/FormCheck.js Просмотреть файл

@@ -0,0 +1,65 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2024-09-12 09:46
* 描 述:安全排查流程
*/
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 () {
$('#Name')[0].lrvalue = learun.clientdata.get(['userinfo']).userId;
$('#Name').val(learun.clientdata.get(['userinfo']).realName);
$('#Department')[0].lrvalue = learun.clientdata.get(['userinfo']).departmentId;
learun.clientdata.getAsync('department', {
key: learun.clientdata.get(['userinfo']).departmentId,
callback: function (_data) {
$('#名称').val(_data.name);
}
});
$('#Path').lrUploader({ isUpload: false });
$("#Status").lrselect({
data: [{ text: "继续上报", value: "1" }, { text: "退回", value: "0" }],
text: "text",
value: "value"
})
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/SafetyCheck/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/SafetyCheck/DepartmentForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 43
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/FormView.cshtml Просмотреть файл

@@ -0,0 +1,43 @@
@{
ViewBag.Title = "安全排查流程";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-6 lr-form-item" data-table="SafetyCheck">
<div class="lr-form-item-title">网络格员</div>
<input id="Name" type="text" readonly class="form-control currentInfo lr-currentInfo-user" />
</div>
<div class="col-xs-6 lr-form-item" data-table="SafetyCheck">
<div class="lr-form-item-title">处室部门</div>
<input id="Department" type="text" readonly class="form-control currentInfo lr-currentInfo-department" />
</div>
<div class="col-xs-6 lr-form-item" data-table="SafetyCheck">
<div class="lr-form-item-title">责任区域<font face="宋体">*</font></div>
<input id="Area" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" readonly="readonly"/>
</div>
<div class="col-xs-6 lr-form-item" data-table="SafetyCheck">
<div class="lr-form-item-title">排查时间<font face="宋体">*</font></div>
<input id="CheckTime" type="text" class="form-control lr-input-wdatepicker" readonly="readonly" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#CheckTime').trigger('change'); } })" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="SafetyCheck">
<div class="lr-form-item-title">发现的隐患<font face="宋体">*</font></div>
<textarea id="Question" class="form-control" style="height:100px;" isvalid="yes" readonly="readonly" checkexpession="NotNull"></textarea>
</div>
<div class="col-xs-12 lr-form-item" data-table="SafetyCheck">
<div class="lr-form-item-title">整改措施及建议</div>
<textarea id="idea" class="form-control" style="height:100px;" readonly="readonly"></textarea>
</div>
<div class="col-xs-12 lr-form-item" data-table="SafetyCheck">
<div class="lr-form-item-title">附件上传</div>
<div id="Path"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="SafetyCheck">
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height:100px;" readonly="readonly"></textarea>
</div>
<div class="col-xs-12 lr-form-item" data-table="SafetyCheck">
<div class="lr-form-item-title">部门建议</div>
<textarea id="DepartmentRemark" class="form-control" style="height:100px;" readonly="readonly"></textarea>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/SafetyCheck/FormView.js")

+ 60
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/FormView.js Просмотреть файл

@@ -0,0 +1,60 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2024-09-12 09:46
* 描 述:安全排查流程
*/
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 () {
$('#Name')[0].lrvalue = learun.clientdata.get(['userinfo']).userId;
$('#Name').val(learun.clientdata.get(['userinfo']).realName);
$('#Department')[0].lrvalue = learun.clientdata.get(['userinfo']).departmentId;
learun.clientdata.getAsync('department', {
key: learun.clientdata.get(['userinfo']).departmentId,
callback: function (_data) {
$('#名称').val(_data.name);
}
});
$('#Path').lrUploader({ isUpload: false });
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/SafetyCheck/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/SafetyCheck/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 47
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/Index.cshtml Просмотреть файл

@@ -0,0 +1,47 @@
@{
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="Name"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">处室部门</div>
<div id="Department"></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>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;提交</a>
<a id="lr_view" class="btn btn-default"><i class="fa fa-search"></i>&nbsp;查看</a>
<a id="lr_department" class="btn btn-default"><i class="fa fa-search"></i>&nbsp;部门审查</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/SafetyCheck/Index.js")

+ 245
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/Index.js Просмотреть файл

@@ -0,0 +1,245 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2024-09-12 09:46
* 描 述:安全排查流程
*/
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: '0',
selectfn: function (begin, end) {
startTime = begin;
endTime = end;
page.search();
}
});
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
$('#Name').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_userid', text: 'f_realname' });
$('#Department').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' });
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/SafetyCheck/Form',
width: 600,
height: 600,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var CreateUser = $('#gridtable').jfGridValue('CreateUser');
var user = learun.clientdata.get(['userinfo']).userId;
if (CreateUser != user) {
learun.alert.warning("当前项暂不可编辑!");
return;
}
var Status = $('#gridtable').jfGridValue('Status');
if (Status != 0) {
learun.alert.warning("当前项目已提交不能不能编辑!");
return;
}
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/SafetyCheck/Form?keyValue=' + keyValue,
width: 600,
height: 600,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var CreateUser = $('#gridtable').jfGridValue('CreateUser');
var user = learun.clientdata.get(['userinfo']).userId;
if (CreateUser != user) {
learun.alert.warning("当前项暂不可删除!");
return;
}
var Status = $('#gridtable').jfGridValue('Status');
if (Status != 0) {
learun.alert.warning("当前项目已提交不能不能删除!");
return;
}
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {

learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/SafetyCheck/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
//  提交
$('#lr_submit').on('click', function () {
var CreateUser = $('#gridtable').jfGridValue('CreateUser');
var user = learun.clientdata.get(['userinfo']).userId;
if (CreateUser != user) {
learun.alert.warning("当前项暂不可提交!");
return;
}
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status !== 0) {
learun.alert.warning("当前项目已提交,请耐心等待审批!");
return;
}
learun.layerConfirm('是否确认提交该项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/SafetyCheck/SubmitForm', { keyValue: keyValue }, function (res) {
refreshGirdData(res, {});
});
}
});
}
});
// 查看
$('#lr_view').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'formSafetyCheck',
title: '查看',
url: top.$.rootUrl + '/EducationalAdministration/SafetyCheck/FormView?keyValue=' + keyValue,
width: 600,
height: 610,
btn: null
});
}
});
// 部门审查
$('#lr_department').on('click', function () {
var Status = $('#gridtable').jfGridValue('Status');
if (Status != 1) {
learun.alert.warning("当前项目不可进行审查!");
return;
}
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'formFormCheck',
title: '部门审查',
url: top.$.rootUrl + '/EducationalAdministration/SafetyCheck/FormCheck?keyValue=' + keyValue,
width: 600,
height: 680,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/SafetyCheck/GetPageList',
headData: [
{
label: "状态", name: "Status", width: 100, align: "left",
formatter: function (cellvalue, row) {
if (cellvalue === 1) {
return '<span class=\"label label-warning\">审批中</span>';
} else if (cellvalue === 2) {
return '<span class=\"label label-success\">完成</span>';
} else if (cellvalue === 0) {
return '<span class=\"label label-default\" >草稿</span>';
}
}
},
{
label: "网络格员", name: "Name", width: 120, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('user', {
key: value,
callback: function (_data) {
callback(_data.name);
}
});
}
},
{
label: "处室部门", name: "Department", width: 150, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('department', {
key: value,
callback: function (_data) {
callback(_data.name);
}
});
}
},
{ label: "责任区域", name: "Area", width: 120, align: "left" },
{ label: "排查时间", name: "CheckTime", width: 150, align: "left" },
{ label: "发现的隐患", name: "Question", width: 230, align: "left" },
{ label: "整改措施及建议", name: "idea", width: 230, align: "left" },
{ label: "备注", name: "Remark", width: 300, align: "left" },
],
mainId: 'ID',
isPage: true,
sidx: 'CheckTime desc ',
});
page.search();
},
search: function (param) {
param = param || {};
param.StartTime = startTime;
param.EndTime = endTime;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/SafetyCheckMap.cs Просмотреть файл

@@ -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 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2024-09-12 09:46
/// 描 述:安全排查流程
/// </summary>
public class SafetyCheckMap : EntityTypeConfiguration<SafetyCheckEntity>
{
public SafetyCheckMap()
{
#region 表、主键
//表
this.ToTable("SAFETYCHECK");
//主键
this.HasKey(t => t.ID);
#endregion

#region 配置关系
#endregion
}
}
}


+ 144
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SafetyCheck/SafetyCheckBLL.cs Просмотреть файл

@@ -0,0 +1,144 @@
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 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2024-09-12 09:46
/// 描 述:安全排查流程
/// </summary>
public class SafetyCheckBLL : SafetyCheckIBLL
{
private SafetyCheckService safetyCheckService = new SafetyCheckService();

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<SafetyCheckEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return safetyCheckService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取SafetyCheck表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public SafetyCheckEntity GetSafetyCheckEntity(string keyValue)
{
try
{
return safetyCheckService.GetSafetyCheckEntity(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
{
safetyCheckService.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, SafetyCheckEntity entity)
{
try
{
safetyCheckService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

public void SubmitEnity(string keyValue)
{
try
{
safetyCheckService.SubmitEnity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}
}

+ 120
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SafetyCheck/SafetyCheckEntity.cs Просмотреть файл

@@ -0,0 +1,120 @@
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 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2024-09-12 09:46
/// 描 述:安全排查流程
/// </summary>
public class SafetyCheckEntity
{
#region 实体成员
/// <summary>
/// ID
/// </summary>
[Column("ID")]
public string ID { get; set; }
/// <summary>
/// 姓名
/// </summary>
[Column("NAME")]
public string Name { get; set; }
/// <summary>
/// 处室部门
/// </summary>
[Column("DEPARTMENT")]
public string Department { get; set; }
/// <summary>
/// 责任区域
/// </summary>
[Column("AREA")]
public string Area { get; set; }
/// <summary>
/// 排查时间
/// </summary>
[Column("CHECKTIME")]
public DateTime? CheckTime { get; set; }
/// <summary>
/// 发现的隐患问题
/// </summary>
[Column("QUESTION")]
public string Question { get; set; }
/// <summary>
/// 整改措施及建议等
/// </summary>
[Column("IDEA")]
public string idea { get; set; }
/// <summary>
/// 附件
/// </summary>
[Column("PATH")]
public string Path { get; set; }
/// <summary>
/// 备注
/// </summary>
[Column("REMARK")]
public string Remark { get; set; }
/// <summary>
/// 创建用户
/// </summary>
[Column("CREATEUSER")]
public string CreateUser { get; set; }
/// <summary>
/// 创建时间
/// </summary>
[Column("CREATETIME")]
public DateTime? CreateTime { get; set; }
/// <summary>
/// 编辑用户
/// </summary>
[Column("MODIFYUSER")]
public string ModifyUser { get; set; }
/// <summary>
/// 编辑时间
/// </summary>
[Column("MODIFYTIME")]
public DateTime? Modifytime { get; set; }
/// <summary>
/// 0草稿 1提交/部门 2教务
/// </summary>
[Column("STATUS")]
public int? Status { get; set; }
/// <summary>
/// 部门建议
/// </summary>
[Column("DEPARTMENTREMARK")]
public string DepartmentRemark { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.ID = Guid.NewGuid().ToString();
this.Status = 0;
this.CreateTime = DateTime.Now;
this.CreateUser = LoginUserInfo.Get().userId;
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.ID = keyValue;
this.Modifytime = DateTime.Now;
this.ModifyUser = LoginUserInfo.Get().userId;
}
#endregion
#region 扩展字段
#endregion
}
}


+ 53
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SafetyCheck/SafetyCheckIBLL.cs Просмотреть файл

@@ -0,0 +1,53 @@
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 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2024-09-12 09:46
/// 描 述:安全排查流程
/// </summary>
public interface SafetyCheckIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<SafetyCheckEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取SafetyCheck表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
SafetyCheckEntity GetSafetyCheckEntity(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, SafetyCheckEntity entity);
/// <summary>
/// 提交
/// </summary>
/// <param name="keyValue"></param>
void SubmitEnity(string keyValue);
#endregion

}
}

+ 186
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SafetyCheck/SafetyCheckService.cs Просмотреть файл

@@ -0,0 +1,186 @@
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 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2024-09-12 09:46
/// 描 述:安全排查流程
/// </summary>
public class SafetyCheckService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<SafetyCheckEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT *");
strSql.Append(" FROM SafetyCheck t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["Name"].IsEmpty())
{
dp.Add("Name", queryParam["Name"].ToString(), DbType.String);
strSql.Append(" AND t.Name = @Name ");
}
if (!queryParam["Department"].IsEmpty())
{
dp.Add("Department", queryParam["Department"].ToString(), DbType.String);
strSql.Append(" AND t.Department = @Department ");
}
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty())
{
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime);
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime);
strSql.Append(" AND ( t.CheckTime >= @startTime AND t.CheckTime <= @endTime ) ");
}
return this.BaseRepository("CollegeMIS").FindList<SafetyCheckEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取SafetyCheck表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public SafetyCheckEntity GetSafetyCheckEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<SafetyCheckEntity>(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<SafetyCheckEntity>(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, SafetyCheckEntity 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);
}
}
}
/// <summary>
/// 提交
/// </summary>
/// <param name="keyValue"></param>
/// <param name="status"></param>
public void SubmitEnity(string keyValue)
{
try
{
var entity = BaseRepository("CollegeMIS").FindEntity<SafetyCheckEntity>(keyValue);
if (entity.Status != null)
{
entity.Status = 1;
entity.ModifyUser = LoginUserInfo.Get().userId;
entity.Modifytime = DateTime.Now;
}
BaseRepository("CollegeMIS").Update(entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

}
}

Загрузка…
Отмена
Сохранить