Ver a proveniência

【增加】图书归还管理;

新疆警官学校中职
dyy há 2 anos
ascendente
cometimento
16d5b5da35
14 ficheiros alterados com 850 adições e 2 eliminações
  1. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/config/config.js
  2. +111
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/BookReturnController.cs
  3. +28
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Form.cshtml
  4. +53
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Form.js
  5. +44
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Index.cshtml
  6. +141
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Index.js
  7. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  8. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Book_returninfoMap.cs
  9. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  10. +124
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/BookReturnBLL.cs
  11. +49
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/BookReturnIBLL.cs
  12. +158
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/BookReturnService.cs
  13. +101
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/Book_returninfoEntity.cs
  14. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj

+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/config/config.js Ver ficheiro

@@ -7,8 +7,8 @@
// web:"http://112.230.201.53/:8081/"//web地址,用于配置logo
//};
var config = {
webapi: 'http://localhost:8088/',
web: "http://localhost:8087/"//web地址,用于配置logo
webapi: 'http://192.168.10.31:8088/',
web: "http://192.168.10.31:8087/"//web地址,用于配置logo
};
// var config = {
// webapi: 'http://123.57.209.16:31173/',


+ 111
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/BookReturnController.cs Ver ficheiro

@@ -0,0 +1,111 @@
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-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2022-11-11 09:45
/// 描 述:图书归还管理
/// </summary>
public class BookReturnController : MvcControllerBase
{
private BookReturnIBLL bookReturnIBLL = new BookReturnBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
#endregion

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = bookReturnIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// <summary>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var Book_returninfoData = bookReturnIBLL.GetBook_returninfoEntity( keyValue );
var jsonData = new {
Book_returninfo = Book_returninfoData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
bookReturnIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
{
Book_returninfoEntity entity = strEntity.ToObject<Book_returninfoEntity>();
bookReturnIBLL.SaveEntity(keyValue,entity);
return Success("保存成功!");
}
#endregion

}
}

+ 28
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Form.cshtml Ver ficheiro

@@ -0,0 +1,28 @@
@{
ViewBag.Title = "图书归还管理";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap">

<div class="col-xs-12 lr-form-item" data-table="Book_returninfo">
<div class="lr-form-item-title">图书<font face="宋体">*</font></div>
<div id="BookID" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Book_returninfo">
<div class="lr-form-item-title">归还时间<font face="宋体">*</font></div>
<input id="ReturnTime" type="text" class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="NotNull" data-dateFmt="yyyy-MM-dd HH:mm:ss" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked: function () { $('#ReturnTime').trigger('change'); } })" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Book_returninfo">
<div class="lr-form-item-title">归还人<font face="宋体">*</font></div>
<div id="UserId" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="Book_returninfo">
<div class="lr-form-item-title">借书证</div>
<input id="LibraryCard" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="Book_returninfo">
<div class="lr-form-item-title">审核</div>
<input id="CheckMark" type="text" class="form-control" />
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/BookReturn/Form.js")

+ 53
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Form.js Ver ficheiro

@@ -0,0 +1,53 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2022-11-11 09:45
* 描 述:图书归还管理
*/
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 () {
$("#BookID").lrDataSourceSelect({ code: 'BookInfo', value: 'id', text: 'bookname' });
$("#UserId").lrDataSourceSelect({ code: 'BaseUser', value: 'f_userid', text: 'f_realname' });

},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/BookReturn/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/BookReturn/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 44
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Index.cshtml Ver ficheiro

@@ -0,0 +1,44 @@
@{
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>
<input id="LibraryCard" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">图书名称</div>
<input id="BookName" type="text" class="form-control" />
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_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>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/BookReturn/Index.js")

+ 141
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Index.js Ver ficheiro

@@ -0,0 +1,141 @@
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
* Copyright (c) 2013-2018 北京泉江科技有限公司
* 创建人:超级管理员
* 日 期:2022-11-11 09:45
* 描 述:图书归还管理
*/
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: '1',
selectfn: function (begin, end) {
startTime = begin;
endTime = end;
page.search();
}
});
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/BookReturn/Form',
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/BookReturn/Form?keyValue=' + keyValue,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/BookReturn/DeleteForm', { keyValue: keyValue}, function () {
refreshGirdData();
});
}
});
}
});
// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
},
// 初始化列表
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/EducationalAdministration/BookReturn/GetPageList',
headData: [
{ label: "图书名称", name: "BookName", width: 100, align: "left" },
{ label: "书籍出版号", name: "ISBN", width: 100, align: "left" },
{ label: "书籍作者", name: "Author", width: 100, align: "left" },
{ label: "书籍出版社", name: "Publisher", width: 100, align: "left" },
{ label: "数量", name: "Amount", width: 100, align: "left" },
{ label: "归还时间", name: "ReturnTime", width: 130, align: "left" },
{
label: "归还人姓名", name: "UserId", width: 130, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser',
key: value,
keyId: 'f_userid',
callback: function (_data) {
callback(_data['f_realname']);
}
});
}
},
{ label: "借书证", name: "LibraryCard", width: 100, align: "left" },
{ label: "审核", name: "CheckMark", width: 100, align: "left"},
],
mainId:'ID',
isPage: true
});
},
search: function (param) {
param = param || {};
param.StartTime = startTime;
param.EndTime = endTime;
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
page.search();
};
page.init();
}

+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Ver ficheiro

@@ -320,6 +320,7 @@
<Compile Include="Areas\EducationalAdministration\Controllers\ArrangeLessonTermAttemperController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\AwardAndPunishmentController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\AwardPunishInfoController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\BookReturnController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\CertificateManageController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\CertificateResultController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\ClassPlanController.cs" />
@@ -1046,6 +1047,8 @@
<Content Include="Areas\EducationalAdministration\Views\AwardPunishInfo\AwardIndex.js" />
<Content Include="Areas\EducationalAdministration\Views\AwardPunishInfo\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\AwardPunishInfo\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\BookReturn\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\BookReturn\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\CertificateManage\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\CertificateManage\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\CertificateResult\Form.js" />
@@ -1307,6 +1310,8 @@
<Content Include="Areas\EducationalAdministration\Views\StudentArticlePublic\FormScore.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StudentArticlePublic\Index.cshtml" />
<Content Include="Areas\AssetManagementSystem\Views\FundsApply\FormView.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\BookReturn\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\BookReturn\Index.cshtml" />
<None Include="Areas\EducationalAdministration\Views\StuInfoBasic\Printxjk.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\AllocationClassDC.js" />
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\StatisticClassIndex.js" />


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Book_returninfoMap.cs Ver ficheiro

@@ -0,0 +1,29 @@
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Data.Entity.ModelConfiguration;

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2022-11-11 09:45
/// 描 述:图书归还管理
/// </summary>
public class Book_returninfoMap : EntityTypeConfiguration<Book_returninfoEntity>
{
public Book_returninfoMap()
{
#region 表、主键
//表
this.ToTable("BOOK_RETURNINFO");
//主键
this.HasKey(t => t.ID);
#endregion

#region 配置关系
#endregion
}
}
}


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj Ver ficheiro

@@ -75,6 +75,7 @@
<Compile Include="EducationalAdministration\ArrangeLessonTermAttemperMap.cs" />
<Compile Include="EducationalAdministration\AwardAndPunishmentMap.cs" />
<Compile Include="EducationalAdministration\AwardPunishInfoMap.cs" />
<Compile Include="EducationalAdministration\Book_returninfoMap.cs" />
<Compile Include="EducationalAdministration\Book_borrowinfoMap.cs" />
<Compile Include="EducationalAdministration\Book_cardMap.cs" />
<Compile Include="EducationalAdministration\Book_classMap.cs" />


+ 124
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/BookReturnBLL.cs Ver ficheiro

@@ -0,0 +1,124 @@
using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2022-11-11 09:45
/// 描 述:图书归还管理
/// </summary>
public class BookReturnBLL : BookReturnIBLL
{
private BookReturnService bookReturnService = new BookReturnService();

#region 获取数据

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

/// <summary>
/// 获取Book_returninfo表实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public Book_returninfoEntity GetBook_returninfoEntity(string keyValue)
{
try
{
return bookReturnService.GetBook_returninfoEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void DeleteEntity(string keyValue)
{
try
{
bookReturnService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void SaveEntity(string keyValue, Book_returninfoEntity entity)
{
try
{
bookReturnService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}
}

+ 49
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/BookReturnIBLL.cs Ver ficheiro

@@ -0,0 +1,49 @@
using Learun.Util;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2022-11-11 09:45
/// 描 述:图书归还管理
/// </summary>
public interface BookReturnIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<Book_returninfoEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取Book_returninfo表实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
Book_returninfoEntity GetBook_returninfoEntity(string keyValue);
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
void DeleteEntity(string keyValue);
/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
void SaveEntity(string keyValue, Book_returninfoEntity entity);
#endregion

}
}

+ 158
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/BookReturnService.cs Ver ficheiro

@@ -0,0 +1,158 @@
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-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2022-11-11 09:45
/// 描 述:图书归还管理
/// </summary>
public class BookReturnService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// <summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<Book_returninfoEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT t.*,b.BookName,b.ISBN,b.Author,b.Publisher ");
strSql.Append(" FROM Book_returninfo t ");
strSql.Append(" left join Book_info b on t.BookID=b.ID ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
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.BorrowTime >= @startTime AND t.BorrowTime <= @endTime ) ");
}
if (!queryParam["LibraryCard"].IsEmpty())
{
dp.Add("LibraryCard", "%" + queryParam["LibraryCard"].ToString() + "%", DbType.String);
strSql.Append(" AND t.LibraryCard Like @LibraryCard ");
}
if (!queryParam["BookName"].IsEmpty())
{
dp.Add("BookName", "%" + queryParam["BookName"].ToString() + "%", DbType.String);
strSql.Append(" AND b.BookName Like @BookName ");
}
return this.BaseRepository().FindList<Book_returninfoEntity>(strSql.ToString(),dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取Book_returninfo表实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public Book_returninfoEntity GetBook_returninfoEntity(string keyValue)
{
try
{
return this.BaseRepository().FindEntity<Book_returninfoEntity>(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void DeleteEntity(string keyValue)
{
try
{
this.BaseRepository().Delete<Book_returninfoEntity>(t=>t.ID == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public void SaveEntity(string keyValue, Book_returninfoEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository().Update(entity);
}
else
{
entity.Create();
this.BaseRepository().Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

}
}

+ 101
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/Book_returninfoEntity.cs Ver ficheiro

@@ -0,0 +1,101 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
/// Copyright (c) 2013-2018 北京泉江科技有限公司
/// 创 建:超级管理员
/// 日 期:2022-11-11 09:45
/// 描 述:图书归还管理
/// </summary>
public class Book_returninfoEntity
{
#region 实体成员
/// <summary>
/// ID
/// </summary>
[Column("ID")]
public string ID { get; set; }
/// <summary>
/// 借阅主键
/// </summary>
[Column("BORROWID")]
public string BorrowID { get; set; }
/// <summary>
/// 书籍主键
/// </summary>
[Column("BOOKID")]
public string BookID { get; set; }
/// <summary>
/// 借书证
/// </summary>
[Column("LIBRARYCARD")]
public string LibraryCard { get; set; }
/// <summary>
/// 数量
/// </summary>
[Column("AMOUNT")]
public int? Amount { get; set; }
/// <summary>
/// 借阅人
/// </summary>
[Column("USERID")]
public string UserId { get; set; }
/// <summary>
/// 还书时间
/// </summary>
[Column("RETURNTIME")]
public DateTime? ReturnTime { get; set; }
/// <summary>
/// 审核
/// </summary>
[Column("CHECKMARK")]
public string CheckMark { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.ID = Guid.NewGuid().ToString();
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.ID = keyValue;
}
#endregion
#region 扩展字段

/// <summary>
/// 书籍名称
/// </summary>
[NotMapped]
public string BookName { get; set; }
/// <summary>
/// 书籍ISBN
/// </summary>
[NotMapped]
public string ISBN { get; set; }
/// <summary>
/// 书籍作者
/// </summary>
[NotMapped]
public string Author { get; set; }
/// <summary>
/// 书籍出版社
/// </summary>
[NotMapped]
public string Publisher { get; set; }
#endregion
}
}


+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj Ver ficheiro

@@ -125,6 +125,10 @@
<Compile Include="EducationalAdministration\AwardPunishInfo\AwardPunishInfoIBLL.cs" />
<Compile Include="EducationalAdministration\AwardPunishInfo\AwardPunishInfoService.cs" />
<Compile Include="EducationalAdministration\BCdCultureDegree\BCdCultureDegreeEntity.cs" />
<Compile Include="EducationalAdministration\BookReturn\BookReturnBLL.cs" />
<Compile Include="EducationalAdministration\BookReturn\BookReturnIBLL.cs" />
<Compile Include="EducationalAdministration\BookReturn\BookReturnService.cs" />
<Compile Include="EducationalAdministration\BookReturn\Book_returninfoEntity.cs" />
<Compile Include="EducationalAdministration\BookBorrow\BookBorrowBLL.cs" />
<Compile Include="EducationalAdministration\BookBorrow\BookBorrowIBLL.cs" />
<Compile Include="EducationalAdministration\BookBorrow\BookBorrowService.cs" />


Carregando…
Cancelar
Guardar