Explorar el Código

安全排查流程

长阳分支中职
ndbs hace 2 semanas
padre
commit
5daa93ec1c
Se han modificado 9 ficheros con 217 adiciones y 142 borrados
  1. +2
    -13
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/SafetyCheckController.cs
  2. +34
    -32
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/FormCheck.cshtml
  3. +22
    -22
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/FormCheck.js
  4. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/FormLeader.cshtml
  5. +22
    -22
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/FormLeader.js
  6. +55
    -46
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/Index.js
  7. +19
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SafetyCheck/SafetyCheckBLL.cs
  8. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SafetyCheck/SafetyCheckIBLL.cs
  9. +59
    -5
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SafetyCheck/SafetyCheckService.cs

+ 2
- 13
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/SafetyCheckController.cs Ver fichero

@@ -160,20 +160,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
public ActionResult DepartmentForm(string keyValue, string strEntity)
{
SafetyCheckEntity entity = strEntity.ToObject<SafetyCheckEntity>();
if (entity.Status == 1)
{
entity.Status = 2;
}
else if (entity.Status == 2)
{
entity.Status = 3;
}
else
{
entity.Status = 0;
}
safetyCheckIBLL.SaveEntity(keyValue, entity);
safetyCheckIBLL.CheckEntity(keyValue, entity);
return Success("操作成功!");
}

}
}

+ 34
- 32
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/FormCheck.cshtml Ver fichero

@@ -3,38 +3,40 @@
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" 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 id="=allparameter">
<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" 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>*@
<div class="col-xs-12 lr-form-item" data-table="SafetyCheck">
<div class="lr-form-item-title">继续上报<font face="宋体">*</font></div>
<div id="Status" isvalid="yes" checkexpession="NotNull" ></div>


+ 22
- 22
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/FormCheck.js Ver fichero

@@ -15,16 +15,16 @@ var bootstrap = function ($, learun) {
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 });
//$('#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",
@@ -32,18 +32,18 @@ var bootstrap = function ($, learun) {
})
},
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]);
}
}
});
}
//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]);
// }
// }
// });
//}
}
};
// 保存数据


+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/FormLeader.cshtml Ver fichero

@@ -3,7 +3,7 @@
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="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>
@@ -34,7 +34,7 @@
<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>*@
<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>


+ 22
- 22
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/FormLeader.js Ver fichero

@@ -15,16 +15,16 @@ var bootstrap = function ($, learun) {
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 });
//$('#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: "2" }, { text: "退回", value: "0" }],
text: "text",
@@ -32,18 +32,18 @@ var bootstrap = function ($, learun) {
})
},
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]);
}
}
});
}
//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]);
// }
// }
// });
//}
}
};
// 保存数据


+ 55
- 46
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SafetyCheck/Index.js Ver fichero

@@ -66,19 +66,23 @@ var bootstrap = function ($, learun) {
});
// 编辑
$('#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)) {
if (keyValue.indexOf(',') != -1) {
learun.alert.warning("只能选择一条记录进行编辑!");
return;
}
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;
}
learun.layerForm({
id: 'form',
title: '编辑',
@@ -93,20 +97,21 @@ var bootstrap = function ($, learun) {
});
// 删除
$('#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)) {

var CheckMark = $('#gridtable').jfGridValue('Status');
var CheckMarkArr = CheckMark.split(',');
if ($.inArray('1', CheckMarkArr) != -1 || $.inArray('2', CheckMarkArr) != -1 || $.inArray('3', CheckMarkArr) != -1) {
learun.alert.warning("选中记录中包含已提交项目!不可删除");
return;
}
var CreateUser = $('#gridtable').jfGridValue('CreateUser');
var user = learun.clientdata.get(['userinfo']).userId;
var CreateUserArr = CreateUser.split(',');
if (!CreateUserArr.every(item => item == user)) {
learun.alert.warning("选中项包含其他所属用户!暂不可删除!");
return;
}
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/SafetyCheck/DeleteForm', { keyValue: keyValue }, function () {
@@ -122,16 +127,21 @@ var bootstrap = function ($, learun) {
});
//  提交
$('#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)) {
if (keyValue.indexOf(',') != -1) {
learun.alert.warning("只能选择一条记录!");
return;
}
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) {
console.log(Status)
if (Status != 0) {
learun.alert.warning("当前项目已提交,请耐心等待审批!");
return;
}
@@ -147,6 +157,10 @@ var bootstrap = function ($, learun) {
// 查看
$('#lr_view').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (keyValue.indexOf(',') != -1) {
learun.alert.warning("只能选择一条记录!");
return;
}
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'formSafetyCheck',
@@ -162,12 +176,9 @@ var bootstrap = function ($, learun) {
$('#lr_department').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
var Status = $('#gridtable').jfGridValue('Status');
if (Status != 1) {
learun.alert.warning("当前项目操作项不允许!");
return;
}
if (Status == 2) {
learun.alert.warning("当前项目操作项不允许!");
var CheckMarkArr = Status.split(',');
if (!CheckMarkArr.every(item => item == 1)) {
learun.alert.warning("选中项当前操作不允许!");
return;
}
if (learun.checkrow(keyValue)) {
@@ -175,8 +186,8 @@ var bootstrap = function ($, learun) {
id: 'formformcheck',
title: '部门审查',
url: top.$.rootUrl + '/EducationalAdministration/SafetyCheck/FormCheck?keyValue=' + keyValue,
width: 600,
height: 680,
width: 400,
height: 300,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
@@ -186,12 +197,9 @@ var bootstrap = function ($, learun) {
// 分管领导
$('#lr_leader').on('click', function () {
var Status = $('#gridtable').jfGridValue('Status');
if (Status != 2) {
learun.alert.warning("当前项目操作项不允许!");
return;
}
if (Status == 3) {
learun.alert.warning("当前项目操作项不允许!");
var CheckMarkArr = Status.split(',');
if (!CheckMarkArr.every(item => item == 2)) {
learun.alert.warning("选中项当前操作不允许!");
return;
}
var keyValue = $('#gridtable').jfGridValue('ID');
@@ -200,8 +208,8 @@ var bootstrap = function ($, learun) {
id: 'formformleader',
title: '分管领导',
url: top.$.rootUrl + '/EducationalAdministration/SafetyCheck/FormLeader?keyValue=' + keyValue,
width: 600,
height: 680,
width: 400,
height: 300,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
@@ -260,6 +268,7 @@ var bootstrap = function ($, learun) {
],
mainId: 'ID',
isPage: true,
isMultiselect: true,
sidx: 'CheckTime desc ',
});
page.search();


+ 19
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SafetyCheck/SafetyCheckBLL.cs Ver fichero

@@ -138,6 +138,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

public void CheckEntity(string keyValue, SafetyCheckEntity entity)
{
try
{
safetyCheckService.CheckEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

}


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SafetyCheck/SafetyCheckIBLL.cs Ver fichero

@@ -47,6 +47,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// </summary>
/// <param name="keyValue"></param>
void SubmitEnity(string keyValue);

void CheckEntity(string keyValue, SafetyCheckEntity entity);
#endregion

}


+ 59
- 5
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SafetyCheck/SafetyCheckService.cs Ver fichero

@@ -158,12 +158,19 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
this.BaseRepository("CollegeMIS").Delete<SafetyCheckEntity>(t => t.ID == keyValue);
var id = keyValue.Split(',');
foreach (var item in id)
{
db.Delete(item);
}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
@@ -184,9 +191,14 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
try
{

if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
var id = keyValue.Split(',');
foreach (var item in id)
{
entity.Modify(item);
}
this.BaseRepository("CollegeMIS").Update(entity);
}
else
@@ -214,19 +226,61 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="status"></param>
public void SubmitEnity(string keyValue)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
var entity = BaseRepository("CollegeMIS").FindEntity<SafetyCheckEntity>(keyValue);
if (entity.Status != null)
var id = keyValue.Split(',');
foreach (var item in id)
{
var entity = db.FindEntity<SafetyCheckEntity>(item);
entity.Status = 1;
entity.ModifyUser = LoginUserInfo.Get().userId;
entity.Modifytime = DateTime.Now;
db.Update(entity);
}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
public void CheckEntity(string keyValue, SafetyCheckEntity entity)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
if (entity.Status == 1)
{
entity.Status = 2;
}
else if (entity.Status == 2)
{
entity.Status = 3;
}
var id = keyValue.Split(',');
foreach (var item in id)
{
var Newentity = db.FindEntity<SafetyCheckEntity>(item);
Newentity.Status = entity.Status;
Newentity.DepartmentRemark = entity.DepartmentRemark;
Newentity.ModifyUser = LoginUserInfo.Get().userId;
Newentity.Modifytime = DateTime.Now;
db.Update(Newentity);
}
BaseRepository("CollegeMIS").Update(entity);
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;


Cargando…
Cancelar
Guardar