Browse Source

Merge branch 'yanshi' of http://123.57.209.16:3000/bjquanjiang/DigitalScholl into yanshi

yanshi
edy 3 years ago
parent
commit
7c228b2afc
9 changed files with 322 additions and 15 deletions
  1. +54
    -14
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Controllers/ArchiveUserController.cs
  2. +46
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/ArchiveUser/IndexTJ.cshtml
  3. +158
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/ArchiveUser/IndexTJ.js
  4. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  5. +11
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/ArchiveInfo/ArchiveInfoEntity.cs
  6. +24
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/ArchiveUser/ArchiveUserBLL.cs
  7. +6
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/ArchiveUser/ArchiveUserEntity.cs
  8. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/ArchiveUser/ArchiveUserIBLL.cs
  9. +20
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/ArchiveUser/ArchiveUserService.cs

+ 54
- 14
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Controllers/ArchiveUserController.cs View File

@@ -3,6 +3,7 @@ using System.Data;
using Learun.Application.TwoDevelopment.CustomFunction;
using System.Web.Mvc;
using System.Collections.Generic;
using System.Linq;

namespace Learun.Application.Web.Areas.CustomFunction.Controllers
{
@@ -16,6 +17,7 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers
public class ArchiveUserController : MvcControllerBase
{
private ArchiveUserIBLL archiveUserIBLL = new ArchiveUserBLL();
private ArchiveInfoIBLL archiveInfoIBLL = new ArchiveInfoBLL();

#region 视图功能

@@ -26,7 +28,7 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers
[HttpGet]
public ActionResult Index()
{
return View();
return View();
}
/// <summary>
/// 表单页
@@ -35,7 +37,7 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers
[HttpGet]
public ActionResult Form()
{
return View();
return View();
}
/// <summary>
/// 表单页
@@ -64,7 +66,16 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers
{
return View();
}
/// <summary>
/// 统计
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult IndexTJ()
{
return View();
}


#endregion

@@ -91,18 +102,46 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers
};
return Success(jsonData);
}
/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]

/// <summary>
/// 档案统计
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageListTJ(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = archiveInfoIBLL.GetPageList(paginationobj, queryJson);
var useData = archiveUserIBLL.GetUseList();
foreach (var item in data)
{
var list = useData.Where(x => x.ArchiveId == item.Id);
item.jyNum = list.Where(x => x.Type == "借阅").Count();
item.ghNum = list.Where(x => x.Type == "归还").Count();
}
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetList(string queryJson)
{
var data = archiveUserIBLL.GetList(queryJson);
return Success(data);
}
/// <summary>
@@ -114,8 +153,9 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var ArchiveUserData = archiveUserIBLL.GetArchiveUserEntity( keyValue );
var jsonData = new {
var ArchiveUserData = archiveUserIBLL.GetArchiveUserEntity(keyValue);
var jsonData = new
{
ArchiveUser = ArchiveUserData,
};
return Success(jsonData);
@@ -148,7 +188,7 @@ namespace Learun.Application.Web.Areas.CustomFunction.Controllers
public ActionResult SaveForm(string keyValue, string strEntity)
{
ArchiveUserEntity entity = strEntity.ToObject<ArchiveUserEntity>();
archiveUserIBLL.SaveEntity(keyValue,entity);
archiveUserIBLL.SaveEntity(keyValue, entity);
if (string.IsNullOrEmpty(keyValue))
{
}


+ 46
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/ArchiveUser/IndexTJ.cshtml View File

@@ -0,0 +1,46 @@
@{
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="Type"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">文号</div>
<input id="DocumentNum" class="form-control"/>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">提名</div>
<input id="Nomination" class="form-control"/>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">件号</div>
<input id="PartNum" 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_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/CustomFunction/Views/ArchiveUser/IndexTJ.js")

+ 158
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/ArchiveUser/IndexTJ.js View File

@@ -0,0 +1,158 @@
/*
* 描 述:档案统计
*/
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);
$('#ArchiveId').lrDataSourceSelect({ code: 'ArchiveInfo', value: 'id', text: 'name' });
$('#Type').lrDataItemSelect({ code: 'ArchiveType' });
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 借阅
$('#lr_jy').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status != '1' && Status != '0') {
return learun.alert.warning("当前状态无法借阅!");
}
learun.layerForm({
id: 'form',
title: '借阅',
url: top.$.rootUrl + '/CustomFunction/ArchiveUser/Form?ArchiveId=' + keyValue,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
//销毁
$('#lr_xh').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认销毁该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/CustomFunction/ArchiveUser/XHForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
//移交
$('#lr_yj').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认移交该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/CustomFunction/ArchiveUser/YJForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});

// 归还
$('#lr_gh').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status != '2') {
return learun.alert.warning("选中项未借阅,无需归还!");
}
learun.layerForm({
id: 'form',
title: '归还',
url: top.$.rootUrl + '/CustomFunction/ArchiveUser/FormGH?ArchiveId=' + keyValue,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 利用记录
$('#lr_data').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
var Name = $('#gridtable').jfGridValue('Name');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: Name + '--利用记录',
url: top.$.rootUrl + '/CustomFunction/ArchiveUser/IndexData?ArchiveId=' + keyValue,
width: 1000,
height: 600,
btn: null
});
}
});
// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
},
// 初始化列表
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/CustomFunction/ArchiveUser/GetPageListTJ',
headData: [
{ label: "档案名称", name: "Name", width: 100, align: "left" },
{
label: "档案分类", name: "Type", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'ArchiveType',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{
label: "所属案卷", name: "RecordId", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'ArchiveRecordInfo',
key: value,
keyId: 'id',
callback: function (_data) {
callback(_data['name']);
}
});
}
},
{ label: "借阅次数", name: "jyNum", width: 100, align: "left" },
{ label: "归还次数", name: "ghNum", width: 100, align: "left" }
],
mainId: 'Id',
isPage: true

});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

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

@@ -938,6 +938,7 @@
<Content Include="Areas\CustomFunction\Views\ArchiveInfo\FormRecord.js" />
<Content Include="Areas\CustomFunction\Views\ArchiveInfo\IndexRecord.js" />
<Content Include="Areas\CustomFunction\Views\ArchiveUser\FormGH.js" />
<Content Include="Areas\CustomFunction\Views\ArchiveUser\IndexTJ.js" />
<Content Include="Areas\CustomFunction\Views\ArchiveUser\IndexYJ.js" />
<Content Include="Areas\CustomFunction\Views\ArchiveUser\IndexData.js" />
<Content Include="Areas\EducationalAdministration\Views\ArrangeLessonSync\Form.js" />
@@ -7266,6 +7267,7 @@
<Content Include="Areas\CustomFunction\Views\ArchiveUser\IndexData.cshtml" />
<Content Include="Areas\CustomFunction\Views\ArchiveUser\FormGH.cshtml" />
<Content Include="Areas\CustomFunction\Views\ArchiveUser\IndexYJ.cshtml" />
<Content Include="Areas\CustomFunction\Views\ArchiveUser\IndexTJ.cshtml" />
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" />
<Content Include="Areas\PersonnelManagement\Views\MeetingManagement\IndexOfMyJoin.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\MeetingSignInRecord\IndexAttendance.cshtml" />


+ 11
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/ArchiveInfo/ArchiveInfoEntity.cs View File

@@ -136,6 +136,17 @@ namespace Learun.Application.TwoDevelopment.CustomFunction
}
#endregion
#region 扩展字段
/// <summary>
/// 借阅次数
/// </summary>
[NotMapped]
public int jyNum { get; set; }
/// <summary>
/// 归还次数
/// </summary>
[NotMapped]
public int ghNum { get; set; }

#endregion
}
}


+ 24
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/ArchiveUser/ArchiveUserBLL.cs View File

@@ -65,7 +65,30 @@ namespace Learun.Application.TwoDevelopment.CustomFunction
}
}
}

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <returns></returns>
public IEnumerable<ArchiveUserEntity> GetUseList()
{
try
{
return archiveUserService.GetUseList();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取ArchiveUser表实体数据
/// </summary>


+ 6
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/ArchiveUser/ArchiveUserEntity.cs View File

@@ -86,6 +86,12 @@ namespace Learun.Application.TwoDevelopment.CustomFunction
}
#endregion
#region 扩展字段
/// <summary>
///
/// </summary>
[NotMapped]
public int num { get; set; }

#endregion
}
}


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/ArchiveUser/ArchiveUserIBLL.cs View File

@@ -22,6 +22,7 @@ namespace Learun.Application.TwoDevelopment.CustomFunction
/// <returns></returns>
IEnumerable<ArchiveUserEntity> GetPageList(Pagination pagination, string queryJson);
IEnumerable<ArchiveUserEntity> GetList(string queryJson);
IEnumerable<ArchiveUserEntity> GetUseList();
/// <summary>
/// 获取ArchiveUser表实体数据
/// </summary>


+ 20
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/ArchiveUser/ArchiveUserService.cs View File

@@ -111,6 +111,26 @@ namespace Learun.Application.TwoDevelopment.CustomFunction
}
}

public IEnumerable<ArchiveUserEntity> GetUseList()
{
try
{
string sql = " select ArchiveId,[Type],count(1) num from [dbo].[ArchiveUser] group by ArchiveId,[Type]";
return this.BaseRepository("CollegeMIS").FindList<ArchiveUserEntity>(sql);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取ArchiveUser表实体数据
/// </summary>


Loading…
Cancel
Save