Browse Source

失物招领管理以及PC端桌面显示

金隅分支
zhangli 3 years ago
parent
commit
523620cfd7
14 changed files with 768 additions and 5 deletions
  1. +64
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Controllers/NoticeController.cs
  2. +50
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/FormLostArticle.cshtml
  3. +143
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/FormLostArticle.js
  4. +50
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/FormLostArticleView.cshtml
  5. +123
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/FormLostArticleView.js
  6. +34
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/IndexLostArticle.cshtml
  7. +157
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/IndexLostArticle.js
  8. +6
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  9. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Utility/ListContentIndex.cshtml
  10. +7
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Utility/ListContentIndex.js
  11. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/News/NewsEntity.cs
  12. +46
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Notice/NoticeBLL.cs
  13. +14
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Notice/NoticeIBLL.cs
  14. +71
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Notice/NoticeService.cs

+ 64
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Controllers/NoticeController.cs View File

@@ -113,6 +113,34 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers
{
return View();
}

/// <summary>
/// 失物招领
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult IndexLostArticle()
{
return View();
}
/// <summary>
/// 失物招领表单
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormLostArticle()
{
return View();
}
/// <summary>
/// 失物招领表单
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormLostArticleView()
{
return View();
}
#endregion

#region 获取数据
@@ -148,6 +176,27 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers
};
return JsonResult(jsonData);
}

/// <summary>
/// 获取失物招领分页数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="keyword">关键词</param>
/// <returns></returns>
public ActionResult GetPageListForLostArticle(string pagination, string keyword)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = noticeIBLL.GetPageListForLostArticle(paginationobj, keyword);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records,
};
return JsonResult(jsonData);
}

/// <summary>
/// 查看通知公告
/// </summary>
@@ -421,6 +470,20 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers
}
}

/// <summary>
/// 保存表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
[HttpPost, ValidateAntiForgeryToken, AjaxOnly]
public ActionResult SaveFormForLostArticle(string keyValue, NewsEntity entity)
{
entity.F_NewsContent = WebHelper.HtmlEncode(entity.F_NewsContent);
noticeIBLL.SaveFormForLostArticle(keyValue, entity);
return Success("保存成功!");
}

/// <summary>
/// 删除表单数据
/// </summary>
@@ -527,7 +590,7 @@ namespace Learun.Application.Web.Areas.LR_OAModule.Controllers
entity.ReadSigns = false;
messageRindIBLL.SaveEntity("", entity);
}
}
#endregion



+ 50
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/FormLostArticle.cshtml View File

@@ -0,0 +1,50 @@
@{
ViewBag.Title = "发布失物招领";
Layout = "~/Views/Shared/_Form.cshtml";
}

<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="OANews">
<div class="lr-form-item-title">公告标题<font face="宋体">*</font></div>
<input id="F_FullHead" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" placeholder="请输入标题" />
</div>
@*<div class="col-xs-6 lr-form-item" data-table="OANews">
<div class="lr-form-item-title">公告类别<font face="宋体">*</font></div>
<div id="F_CategoryId" isvalid="yes" checkexpession="NotNull"></div>
<input type="hidden" id="F_Category" />
</div>*@
<div class="col-xs-6 lr-form-item" data-table="OANews">
<div class="lr-form-item-title">发布时间<font face="宋体">*</font></div>
<input id="F_ReleaseTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy/MM/dd HH:mm' })" isvalid="yes" checkexpession="NotNull" value="@Learun.Util.Time.GetToday("yyyy/MM/dd HH:mm")" />
</div>
@*<div class="col-xs-6 lr-form-item" data-table="OANews">
<div class="lr-form-item-title">信息来源<font face="宋体">*</font></div>
<input id="F_SourceName" type="text" isvalid="yes" checkexpession="NotNull" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="OANews">
<div class="lr-form-item-title">来源地址</div>
<input id="F_SourceAddress" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="OANews">
<div class="lr-form-item-title">接收部门</div>
<div id="F_SendDeptId"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="OANews">
<div class="lr-form-item-title">接收岗位</div>
<div id="F_SendPostId"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="OANews">
<div class="lr-form-item-title">下发飞星</div>
<div id="F_IsSendFX"></div>
</div>*@
<div class="col-xs-12 lr-form-item" data-table="OANews">
<div class="lr-form-item-title">标题图片</div>
<div id="F_NewsImage"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="OANews">
<div class="lr-form-item-title">公告内容</div>
<div id="editor" style="height:300px;"></div>
</div>
</div>

@Html.AppendJsFile("/Areas/LR_OAModule/Views/Notice/FormLostArticle.js")

+ 143
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/FormLostArticle.js View File

@@ -0,0 +1,143 @@
/*
* 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:陈彬彬
* 日 期:2017.11.11
* 描 述:公告通知
*/
var acceptClick;
var keyValue = request('keyValue');
// 设置权限
var setAuthorize;
// 设置表单数据
var setFormData;
var isUpdate;
// 验证数据是否填写完整
var validForm;
// 保存数据
var save;
var bootstrap = function ($, learun) {
"use strict";
var ue;
var page = {
init: function () {
page.bind();
page.initData();
},
bind: function () {
//var loginInfo = top.learun.clientdata.get(['userinfo']);

$('#F_NewsImage').lrUploader();

//内容编辑器
ue = UE.getEditor('editor');
},
initData: function () {
if (!!keyValue) {
//$('#form').lrSetFormData(selectedRow);
//$("#F_ReleaseTime").val(learun.formatDate(selectedRow.F_ReleaseTime, 'yyyy/MM/dd hh:mm'));
$.lrSetForm(top.$.rootUrl + '/LR_OAModule/Notice/GetEntity?keyValue=' + keyValue, function (data) {
$('#form').lrSetFormData(data);
setTimeout(function () {
ue.setContent(decodeURI(data.F_NewsContent));
}, 100);
});
}
}
};
// 设置表单数据
//setFormData = function (processId) {
// if (!!processId) {
// $.lrSetForm(top.$.rootUrl + '/LR_OAModule/Notice/GetFormDataByProcessId?processId=' + processId, function (data) {
// for (var id in data) {
// if (!!data[id] && data[id].length > 0) {
// $('#' + id).jfGridSet('refreshdata', data[id]);
// }
// else {
// if (id == 'Sys_ReceiveFile') {
// keyValue = data[id].F_DeptRelationId;
// }
// $('[data-table="' + id + '"]').lrSetFormData(data[id]);
// }
// }
// });
// }
//}
// 验证数据是否填写完整
validForm = function () {
if (!$('#form').lrValidform()) {
return false;
}
return true;
};
// 保存数据
save = function (processId, callBack, i) {

if (!$('#form').lrValidform()) {
return false;
}
var postData = $('#form').lrGetFormData(keyValue);
postData["F_NewsContent"] = encodeURI(ue.getContent(null, null, true));
console.log("1111111111111");
$.lrSaveForm(top.$.rootUrl + '/LR_OAModule/Notice/SaveFormForLostArticle?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
//callBack(res, formData, i);
}
});

//var formData = $('body').lrGetFormData();
//if (!!processId) {
// formData.RProcessId = processId;
//}

//learun.clientdata.getAsync('dataItem', {

// key: $("#F_CategoryId").lrselectGet(),
// code: 'NoticeCategory',
// callback: function (_data) {
// $("#F_Category").val(_data.text);

// }
//});


//$.lrSaveForm(top.$.rootUrl + '/LR_OAModule/Notice/SaveForm?keyValue=' + keyValue, formData, function (res) {
// // 保存成功后才回调
// if (!!callBack) {
// callBack(res, formData, i);
// }
//});
};

acceptClick = function (callBack) {
if (!$('#form').lrValidform()) {
return false;
}
var postData = $('#form').lrGetFormData(keyValue);
postData["F_NewsContent"] = encodeURI(ue.getContent(null, null, true));
console.log("2222222222");
$.lrSaveForm(top.$.rootUrl + '/LR_OAModule/Notice/SaveFormForLostArticle?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
//learun.clientdata.getAsync('dataItem', {
// key: $("#F_CategoryId").lrselectGet(),
// code: 'NoticeCategory',
// callback: function (_data) {
// $("#F_Category").val(_data.text);

// }
//});


}
page.init();
}



+ 50
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/FormLostArticleView.cshtml View File

@@ -0,0 +1,50 @@
@{
ViewBag.Title = "发布失物招领";
Layout = "~/Views/Shared/_Form.cshtml";
}

<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="OANews">
<div class="lr-form-item-title">公告标题<font face="宋体">*</font></div>
<input id="F_FullHead" readonly="readonly" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" placeholder="请输入标题" />
</div>
@*<div class="col-xs-6 lr-form-item" data-table="OANews">
<div class="lr-form-item-title">公告类别<font face="宋体">*</font></div>
<div id="F_CategoryId" isvalid="yes" checkexpession="NotNull"></div>
<input type="hidden" id="F_Category" />
</div>*@
<div class="col-xs-6 lr-form-item" data-table="OANews">
<div class="lr-form-item-title">发布时间<font face="宋体">*</font></div>
<input id="F_ReleaseTime" readonly="readonly" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy/MM/dd HH:mm' })" isvalid="yes" checkexpession="NotNull" value="@Learun.Util.Time.GetToday("yyyy/MM/dd HH:mm")" />
</div>
@*<div class="col-xs-6 lr-form-item" data-table="OANews">
<div class="lr-form-item-title">信息来源<font face="宋体">*</font></div>
<input id="F_SourceName" type="text" isvalid="yes" checkexpession="NotNull" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="OANews">
<div class="lr-form-item-title">来源地址</div>
<input id="F_SourceAddress" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="OANews">
<div class="lr-form-item-title">接收部门</div>
<div id="F_SendDeptId"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="OANews">
<div class="lr-form-item-title">接收岗位</div>
<div id="F_SendPostId"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="OANews">
<div class="lr-form-item-title">下发飞星</div>
<div id="F_IsSendFX"></div>
</div>*@
<div class="col-xs-12 lr-form-item" data-table="OANews">
<div class="lr-form-item-title">标题图片</div>
<div id="F_NewsImage" readonly="readonly" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="OANews">
<div class="lr-form-item-title">公告内容</div>
<div id="editor" style="height:300px;" readonly="readonly" ></div>
</div>
</div>

@Html.AppendJsFile("/Areas/LR_OAModule/Views/Notice/FormLostArticleView.js")

+ 123
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/FormLostArticleView.js View File

@@ -0,0 +1,123 @@
/*
* 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:陈彬彬
* 日 期:2017.11.11
* 描 述:公告通知
*/
var acceptClick;
var keyValue = request('keyValue');
// 设置权限
var setAuthorize;
// 设置表单数据
var setFormData;
var isUpdate;
// 验证数据是否填写完整
var validForm;
// 保存数据
var save;
var bootstrap = function ($, learun) {
"use strict";
var ue;
var page = {
init: function () {
page.bind();
page.initData();
},
bind: function () {
//var loginInfo = top.learun.clientdata.get(['userinfo']);

$('#F_NewsImage').lrUploader();

//内容编辑器
ue = UE.getEditor('editor');
},
initData: function () {
if (!!keyValue) {
//$('#form').lrSetFormData(selectedRow);
//$("#F_ReleaseTime").val(learun.formatDate(selectedRow.F_ReleaseTime, 'yyyy/MM/dd hh:mm'));
$.lrSetForm(top.$.rootUrl + '/LR_OAModule/Notice/GetEntity?keyValue=' + keyValue, function (data) {
$('#form').lrSetFormData(data);
setTimeout(function () {
ue.setContent(decodeURI(data.F_NewsContent));
}, 100);
});
}
}
};

//// 验证数据是否填写完整
//validForm = function () {
// if (!$('#form').lrValidform()) {
// return false;
// }
// return true;
//};
//// 保存数据
//save = function (processId, callBack, i) {

// if (!$('#form').lrValidform()) {
// return false;
// }
// var postData = $('#form').lrGetFormData(keyValue);
// postData["F_NewsContent"] = ue.getContent(null, null, true);
// $.lrSaveForm(top.$.rootUrl + '/LR_OAModule/Notice/SaveFormForLostArticle?keyValue=' + keyValue, postData, function (res) {
// // 保存成功后才回调
// if (!!callBack) {
// callBack(res, formData, i);
// }
// });

// //var formData = $('body').lrGetFormData();
// //if (!!processId) {
// // formData.RProcessId = processId;
// //}

// //learun.clientdata.getAsync('dataItem', {

// // key: $("#F_CategoryId").lrselectGet(),
// // code: 'NoticeCategory',
// // callback: function (_data) {
// // $("#F_Category").val(_data.text);


// // }
// //});


// //$.lrSaveForm(top.$.rootUrl + '/LR_OAModule/Notice/SaveForm?keyValue=' + keyValue, formData, function (res) {
// // // 保存成功后才回调
// // if (!!callBack) {
// // callBack(res, formData, i);
// // }
// //});
//};

//acceptClick = function (callBack) {
// if (!$('#form').lrValidform()) {
// return false;
// }
// var postData = $('#form').lrGetFormData(keyValue);
// postData["F_NewsContent"] = ue.getContent(null, null, true);
// $.lrSaveForm(top.$.rootUrl + '/LR_OAModule/Notice/SaveFormForLostArticle?keyValue=' + keyValue, postData, function (res) {
// // 保存成功后才回调
// if (!!callBack) {
// callBack();
// }
// });
// //learun.clientdata.getAsync('dataItem', {
// // key: $("#F_CategoryId").lrselectGet(),
// // code: 'NoticeCategory',
// // callback: function (_data) {
// // $("#F_Category").val(_data.text);


// // }
// //});


//}
page.init();
}



+ 34
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/IndexLostArticle.cshtml View File

@@ -0,0 +1,34 @@
@{
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">
<input id="txt_Keyword" type="text" class="form-control" placeholder="请输入标题" />
</div>
<div class="lr-layout-tool-item">
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i>&nbsp;<span class="lrlt">查询</span></a>
</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;<span class="lrlt">录入</span></a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;<span class="lrlt">修改</span></a>
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;<span class="lrlt">查看</span></a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;<span class="lrlt">删除</span></a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/LR_OAModule/Views/Notice/IndexLostArticle.js")


+ 157
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_OAModule/Views/Notice/IndexLostArticle.js View File

@@ -0,0 +1,157 @@
/*
* 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:陈彬彬
* 日 期:2017.07.11
* 描 述:公告通知
*/
var refreshGirdData; // 更新数据
var bootstrap = function ($, learun) {
"use strict";
var processId = '';
var page = {
init: function () {
page.initGrid();
page.bind();
},
bind: function () {
// 查询
$('#btn_Search').on('click', function () {
var keyword = $('#txt_Keyword').val();
page.search({ keyword: keyword });
});
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '添加公告',
url: top.$.rootUrl + '/LR_OAModule/Notice/FormLostArticle',
width: 1000,
height: 650,
maxmin: true,
callBack: function (id) {
var res = false;
// 验证数据
res = top[id].validForm();
// 保存数据
if (res) {
res = top[id].save('', function () {
page.search();
});
}
return res;
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('F_NewsId');
if (learun.checkrow(keyValue)) {
if (keyValue.indexOf(",") != -1) {
learun.alert.warning("只能选择一条记录进行编辑!");
return false;
}
var SendFlag = $('#gridtable').jfGridValue('F_Status');
if (SendFlag == "1" || SendFlag == "2") {
learun.alert.warning("当前项目已提交不能编辑!");
return;
}
learun.layerForm({
id: 'formedit',
title: '编辑公告',
url: top.$.rootUrl + '/LR_OAModule/Notice/FormLostArticle?keyValue=' + keyValue,
width: 1000,
height: 650,
maxmin: true,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 查看
$('#lr_view').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('F_NewsId');
if (learun.checkrow(keyValue)) {
if (keyValue.indexOf(",") != -1) {
learun.alert.warning("只能选择一条记录查看!");
return false;
}
learun.layerForm({
id: 'form',
title: '查看',
url: top.$.rootUrl + '/LR_OAModule/Notice/FormLostArticleView?keyValue=' + keyValue,
width: 800,
height: 650,
btn: null
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('F_NewsId');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/LR_OAModule/Notice/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
},
initGrid: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/LR_OAModule/Notice/GetPageListForLostArticle',
headData: [
{ label: '标题', name: 'F_FullHead', index: 'F_FullHead', width: 600, align: 'left' },
{ label: '发布人员', name: 'F_CreateUserName', index: 'F_CreateUserName', width: 100, align: 'left' },
{
label: "发布时间", name: "F_ReleaseTime", index: "F_ReleaseTime", width: 140, align: "left",
formatter: function (cellvalue) {
return learun.formatDate(cellvalue, 'yyyy-MM-dd hh:mm');
}
},
{ label: "创建时间", name: "F_CreateDate", index: "F_CreateDate", width: 130, align: 'left' }
],
mainId: 'F_NewsId',
reloadSelected: true,
isMultiselect: true,
isPage: true,
sidx: 'F_CreateDate',
sord: 'desc'
});
page.search();
},
search: function (param) {
$('#gridtable').jfGridSet('reload', param);
}
};
// 保存数据后回调刷新
refreshGirdData = function (res, postData) {
//if (res && res.code && res.code == 200) {
// var postData = {
// schemeCode: 'OA_News',// 填写流程对应模板编号
// processId: processId,
// level: '1',
// };
// learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) {
// learun.loading(false);
// });
//}
page.search();
}
page.init();
}



+ 6
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj View File

@@ -1302,8 +1302,11 @@
<Content Include="Areas\LR_NewWorkFlow\Views\StampInfo\Form.js" />
<Content Include="Areas\LR_NewWorkFlow\Views\StampInfo\Index.js" />
<Content Include="Areas\LR_NewWorkFlow\Views\StampInfo\StampDetailIndex.js" />
<Content Include="Areas\LR_OAModule\Views\Notice\FormLostArticleView.js" />
<Content Include="Areas\LR_OAModule\Views\Notice\FormLostArticle.js" />
<Content Include="Areas\LR_OAModule\Views\Notice\FormFlowView.js" />
<Content Include="Areas\LR_OAModule\Views\Notice\FormFlow.js" />
<Content Include="Areas\LR_OAModule\Views\Notice\IndexLostArticle.js" />
<Content Include="Areas\LR_OAModule\Views\Notice\IndexRecycle.js" />
<Content Include="Areas\LR_OAModule\Views\Notice\IndexFlow.js" />
<Content Include="Areas\LR_OAModule\Views\ResourceFile\BcIndex.js" />
@@ -7154,6 +7157,9 @@
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\Peichart.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuEnroll\StatisticIndex.cshtml" />
<Content Include="Areas\LR_Desktop\Views\MessageRind\UnreadIndex.cshtml" />
<Content Include="Areas\LR_OAModule\Views\Notice\IndexLostArticle.cshtml" />
<Content Include="Areas\LR_OAModule\Views\Notice\FormLostArticle.cshtml" />
<Content Include="Areas\LR_OAModule\Views\Notice\FormLostArticleView.cshtml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" />
<None Include="Properties\PublishProfiles\FolderProfile1.pubxml" />


+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Utility/ListContentIndex.cshtml View File

@@ -20,8 +20,8 @@
<div class="listDotT" id="F_FullHead"></div>
<div class="listDotTime">
<span>发布时间:<span id="F_CreateDate"></span></span>
<span>信息来源:<span id="F_CreateUserName"></span></span>
<span>公告类别:<span id="F_Category"></span></span>
<span id="msgSource">信息来源:<span id="F_CreateUserName"></span></span>
<span id="newType">公告类别:<span id="F_Category"></span></span>
</div>
<div class="listDotBox" id="F_NewsContent">


+ 7
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Views/Utility/ListContentIndex.js View File

@@ -22,6 +22,13 @@ var bootstrap = function ($, learun) {
$("#F_NewsContent").html($('<div></div>').html(item.f_content).text());
} else {
$.lrSetForm(top.$.rootUrl + '/LR_OAModule/Notice/GetEntity?keyValue=' + id, function (data) {
if (data.F_Category == "失物招领") {
data.F_NewsContent = decodeURI(data.F_NewsContent);
$('.inSec1T').attr("hidden","hidden");
$('#readlist').attr("hidden","hidden");
$('#msgSource').attr("hidden","hidden");
$('#newType').attr("hidden","hidden");
}
$("#F_FullHead").text(data.F_FullHead);
$("#F_CreateDate").text(data.F_CreateDate);
$("#F_CreateUserName").text(data.F_SourceName == null ? "" : data.F_SourceName);


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/News/NewsEntity.cs View File

@@ -21,7 +21,7 @@ namespace Learun.Application.OA
[Column("F_NEWSID")]
public string F_NewsId { get; set; }
/// <summary>
/// 类型(1-新闻2-公告)
/// 类型(1-新闻2-公告3-失物招领
/// </summary>
/// <returns></returns>
[Column("F_TYPEID")]


+ 46
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Notice/NoticeBLL.cs View File

@@ -59,6 +59,25 @@ namespace Learun.Application.OA
}
}
}
public IEnumerable<NewsEntity> GetPageListForLostArticle(Pagination pagination, string keyword)
{
try
{
return noticeService.GetPageListForLostArticle(pagination, keyword);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 公告实体
/// </summary>
@@ -151,6 +170,33 @@ namespace Learun.Application.OA
}

}

/// <summary>
/// 保存(新增、修改)失物招领
/// </summary>
/// <param name="keyValue">主键值</param>
/// <param name="newsEntity">公告实体</param>
/// <returns></returns>
public void SaveFormForLostArticle(string keyValue, NewsEntity newsEntity)
{
try
{
noticeService.SaveFormForLostArticle(keyValue, newsEntity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}

}
#endregion
#region 扩展数据



+ 14
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Notice/NoticeIBLL.cs View File

@@ -22,6 +22,13 @@ namespace Learun.Application.OA
IEnumerable<NewsEntity> GetPageList(Pagination pagination, string keyword);
IEnumerable<NewsEntity> GetPageListRevert(Pagination pagination, string keyword);
/// <summary>
/// 获取失物招领分页数据
/// </summary>
/// <param name="pagination"></param>
/// <param name="keyword"></param>
/// <returns></returns>
IEnumerable<NewsEntity> GetPageListForLostArticle(Pagination pagination, string keyword);
/// <summary>
/// 公告实体
/// </summary>
/// <param name="keyValue">主键值</param>
@@ -42,6 +49,13 @@ namespace Learun.Application.OA
/// <param name="newsEntity">公告实体</param>
/// <returns></returns>
void SaveEntity(string keyValue, NewsEntity newsEntity);

/// <summary>
/// 保存失物招领信息
/// </summary>
/// <param name="keyValue"></param>
/// <param name="newsEntity"></param>
void SaveFormForLostArticle(string keyValue, NewsEntity newsEntity);
#endregion
#region 扩展数据



+ 71
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.OA/Notice/NoticeService.cs View File

@@ -70,6 +70,38 @@ namespace Learun.Application.OA
}
}
}

/// <summary>
/// 失物招领分页列表
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="keyword">关键词</param>
/// <returns></returns>
public IEnumerable<NewsEntity> GetPageListForLostArticle(Pagination pagination, string keyword)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT * FROM LR_OA_News t WHERE t.F_TypeId = 3 and F_CategoryId=99 ");
if (!string.IsNullOrEmpty(keyword))
{
strSql.Append(" AND F_FullHead like @keyword");
}
return this.BaseRepository().FindList<NewsEntity>(strSql.ToString(), new { keyword = "%" + keyword + "%" }, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 新闻公告实体
/// </summary>
@@ -131,7 +163,7 @@ namespace Learun.Application.OA
}
}

public void RecycleForm(string keyValue,string status)
public void RecycleForm(string keyValue, string status)
{
var db = this.BaseRepository().BeginTrans();
try
@@ -195,6 +227,44 @@ namespace Learun.Application.OA
}
}

}

/// <summary>
/// 保存(新增、修改)失物招领
/// </summary>
/// <param name="keyValue">主键值</param>
/// <param name="newsEntity">新闻公告实体</param>
/// <returns></returns>
public void SaveFormForLostArticle(string keyValue, NewsEntity newsEntity)
{
try
{
newsEntity.F_TypeId = 3;
newsEntity.F_CategoryId = "99";
newsEntity.F_Category = "失物招领";
if (!string.IsNullOrEmpty(keyValue))
{
newsEntity.Modify(keyValue);
this.BaseRepository().Update(newsEntity);
}
else
{
newsEntity.Create();
this.BaseRepository().Insert(newsEntity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}

}
#endregion
#region 扩展数据


Loading…
Cancel
Save