From 16d5b5da357584dc1534795121c34b652bccc39a Mon Sep 17 00:00:00 2001
From: dyy <807692433@qq.com>
Date: Fri, 11 Nov 2022 18:00:01 +0800
Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91=E5=9B=BE?=
=?UTF-8?q?=E4=B9=A6=E5=BD=92=E8=BF=98=E7=AE=A1=E7=90=86=EF=BC=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../www/config/config.js | 4 +-
.../Controllers/BookReturnController.cs | 111 ++++++++++++
.../Views/BookReturn/Form.cshtml | 28 ++++
.../Views/BookReturn/Form.js | 53 ++++++
.../Views/BookReturn/Index.cshtml | 44 +++++
.../Views/BookReturn/Index.js | 141 ++++++++++++++++
.../Learun.Application.Web.csproj | 5 +
.../Book_returninfoMap.cs | 29 ++++
.../Learun.Application.Mapping.csproj | 1 +
.../BookReturn/BookReturnBLL.cs | 124 ++++++++++++++
.../BookReturn/BookReturnIBLL.cs | 49 ++++++
.../BookReturn/BookReturnService.cs | 158 ++++++++++++++++++
.../BookReturn/Book_returninfoEntity.cs | 101 +++++++++++
.../Learun.Application.TwoDevelopment.csproj | 4 +
14 files changed, 850 insertions(+), 2 deletions(-)
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/BookReturnController.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Form.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Form.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Index.cshtml
create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Index.js
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Book_returninfoMap.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/BookReturnBLL.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/BookReturnIBLL.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/BookReturnService.cs
create mode 100644 Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/Book_returninfoEntity.cs
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/config/config.js b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/config/config.js
index 356c54ea0..84277feb3 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/config/config.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Mobile/www/config/config.js
@@ -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/',
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/BookReturnController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/BookReturnController.cs
new file mode 100644
index 000000000..dee12f2eb
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/BookReturnController.cs
@@ -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
+{
+ ///
+ /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
+ /// Copyright (c) 2013-2018 北京泉江科技有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2022-11-11 09:45
+ /// 描 述:图书归还管理
+ ///
+ public class BookReturnController : MvcControllerBase
+ {
+ private BookReturnIBLL bookReturnIBLL = new BookReturnBLL();
+
+ #region 视图功能
+
+ ///
+ /// 主页面
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Index()
+ {
+ return View();
+ }
+ ///
+ /// 表单页
+ ///
+ ///
+ [HttpGet]
+ public ActionResult Form()
+ {
+ return View();
+ }
+ #endregion
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetPageList(string pagination, string queryJson)
+ {
+ Pagination paginationobj = pagination.ToObject();
+ var data = bookReturnIBLL.GetPageList(paginationobj, queryJson);
+ var jsonData = new
+ {
+ rows = data,
+ total = paginationobj.total,
+ page = paginationobj.page,
+ records = paginationobj.records
+ };
+ return Success(jsonData);
+ }
+ ///
+ /// 获取表单数据
+ ///
+ ///
+ [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 提交数据
+
+ ///
+ /// 删除实体数据
+ /// 主键
+ ///
+ ///
+ [HttpPost]
+ [AjaxOnly]
+ public ActionResult DeleteForm(string keyValue)
+ {
+ bookReturnIBLL.DeleteEntity(keyValue);
+ return Success("删除成功!");
+ }
+ ///
+ /// 保存实体数据(新增、修改)
+ /// 主键
+ ///
+ ///
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ [AjaxOnly]
+ public ActionResult SaveForm(string keyValue, string strEntity)
+ {
+ Book_returninfoEntity entity = strEntity.ToObject();
+ bookReturnIBLL.SaveEntity(keyValue,entity);
+ return Success("保存成功!");
+ }
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Form.cshtml
new file mode 100644
index 000000000..606a8525b
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Form.cshtml
@@ -0,0 +1,28 @@
+@{
+ ViewBag.Title = "图书归还管理";
+ Layout = "~/Views/Shared/_Form.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/BookReturn/Form.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Form.js
new file mode 100644
index 000000000..e84acbf33
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Form.js
@@ -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();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Index.cshtml
new file mode 100644
index 000000000..b52246d73
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Index.cshtml
@@ -0,0 +1,44 @@
+@{
+ ViewBag.Title = "图书归还管理";
+ Layout = "~/Views/Shared/_Index.cshtml";
+}
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/BookReturn/Index.js")
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Index.js
new file mode 100644
index 000000000..518ccfe70
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Index.js
@@ -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();
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
index cf73cad65..2d56849f6 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
@@ -320,6 +320,7 @@
+
@@ -1046,6 +1047,8 @@
+
+
@@ -1307,6 +1310,8 @@
+
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Book_returninfoMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Book_returninfoMap.cs
new file mode 100644
index 000000000..a9af83ef3
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Book_returninfoMap.cs
@@ -0,0 +1,29 @@
+using Learun.Application.TwoDevelopment.EducationalAdministration;
+using System.Data.Entity.ModelConfiguration;
+
+namespace Learun.Application.Mapping
+{
+ ///
+ /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
+ /// Copyright (c) 2013-2018 北京泉江科技有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2022-11-11 09:45
+ /// 描 述:图书归还管理
+ ///
+ public class Book_returninfoMap : EntityTypeConfiguration
+ {
+ public Book_returninfoMap()
+ {
+ #region 表、主键
+ //表
+ this.ToTable("BOOK_RETURNINFO");
+ //主键
+ this.HasKey(t => t.ID);
+ #endregion
+
+ #region 配置关系
+ #endregion
+ }
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
index 8862c2c62..26c9da754 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
@@ -75,6 +75,7 @@
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/BookReturnBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/BookReturnBLL.cs
new file mode 100644
index 000000000..c2349cf37
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/BookReturnBLL.cs
@@ -0,0 +1,124 @@
+using Learun.Util;
+using System;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.EducationalAdministration
+{
+ ///
+ /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
+ /// Copyright (c) 2013-2018 北京泉江科技有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2022-11-11 09:45
+ /// 描 述:图书归还管理
+ ///
+ public class BookReturnBLL : BookReturnIBLL
+ {
+ private BookReturnService bookReturnService = new BookReturnService();
+
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ ///
+ public IEnumerable GetPageList(Pagination pagination, string queryJson)
+ {
+ try
+ {
+ return bookReturnService.GetPageList(pagination, queryJson);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Book_returninfo表实体数据
+ /// 主键
+ ///
+ ///
+ 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 提交数据
+
+ ///
+ /// 删除实体数据
+ /// 主键
+ ///
+ ///
+ public void DeleteEntity(string keyValue)
+ {
+ try
+ {
+ bookReturnService.DeleteEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ /// 主键
+ ///
+ ///
+ 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
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/BookReturnIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/BookReturnIBLL.cs
new file mode 100644
index 000000000..c3b3b9b76
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/BookReturnIBLL.cs
@@ -0,0 +1,49 @@
+using Learun.Util;
+using System.Data;
+using System.Collections.Generic;
+
+namespace Learun.Application.TwoDevelopment.EducationalAdministration
+{
+ ///
+ /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
+ /// Copyright (c) 2013-2018 北京泉江科技有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2022-11-11 09:45
+ /// 描 述:图书归还管理
+ ///
+ public interface BookReturnIBLL
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ ///
+ IEnumerable GetPageList(Pagination pagination, string queryJson);
+ ///
+ /// 获取Book_returninfo表实体数据
+ /// 主键
+ ///
+ ///
+ Book_returninfoEntity GetBook_returninfoEntity(string keyValue);
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ /// 主键
+ ///
+ ///
+ void DeleteEntity(string keyValue);
+ ///
+ /// 保存实体数据(新增、修改)
+ /// 主键
+ ///
+ ///
+ void SaveEntity(string keyValue, Book_returninfoEntity entity);
+ #endregion
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/BookReturnService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/BookReturnService.cs
new file mode 100644
index 000000000..a3116a7cc
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/BookReturnService.cs
@@ -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
+{
+ ///
+ /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
+ /// Copyright (c) 2013-2018 北京泉江科技有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2022-11-11 09:45
+ /// 描 述:图书归还管理
+ ///
+ public class BookReturnService : RepositoryFactory
+ {
+ #region 获取数据
+
+ ///
+ /// 获取页面显示列表数据
+ ///
+ /// 查询参数
+ ///
+ public IEnumerable 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(strSql.ToString(),dp, pagination);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 获取Book_returninfo表实体数据
+ /// 主键
+ ///
+ ///
+ public Book_returninfoEntity GetBook_returninfoEntity(string keyValue)
+ {
+ try
+ {
+ return this.BaseRepository().FindEntity(keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ #endregion
+
+ #region 提交数据
+
+ ///
+ /// 删除实体数据
+ /// 主键
+ ///
+ ///
+ public void DeleteEntity(string keyValue)
+ {
+ try
+ {
+ this.BaseRepository().Delete(t=>t.ID == keyValue);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
+
+ ///
+ /// 保存实体数据(新增、修改)
+ /// 主键
+ ///
+ ///
+ 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
+
+ }
+}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/Book_returninfoEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/Book_returninfoEntity.cs
new file mode 100644
index 000000000..b4ea465bf
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookReturn/Book_returninfoEntity.cs
@@ -0,0 +1,101 @@
+using Learun.Util;
+using System;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace Learun.Application.TwoDevelopment.EducationalAdministration
+{
+ ///
+ /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
+ /// Copyright (c) 2013-2018 北京泉江科技有限公司
+ /// 创 建:超级管理员
+ /// 日 期:2022-11-11 09:45
+ /// 描 述:图书归还管理
+ ///
+ public class Book_returninfoEntity
+ {
+ #region 实体成员
+ ///
+ /// ID
+ ///
+ [Column("ID")]
+ public string ID { get; set; }
+ ///
+ /// 借阅主键
+ ///
+ [Column("BORROWID")]
+ public string BorrowID { get; set; }
+ ///
+ /// 书籍主键
+ ///
+ [Column("BOOKID")]
+ public string BookID { get; set; }
+ ///
+ /// 借书证
+ ///
+ [Column("LIBRARYCARD")]
+ public string LibraryCard { get; set; }
+ ///
+ /// 数量
+ ///
+ [Column("AMOUNT")]
+ public int? Amount { get; set; }
+ ///
+ /// 借阅人
+ ///
+ [Column("USERID")]
+ public string UserId { get; set; }
+ ///
+ /// 还书时间
+ ///
+ [Column("RETURNTIME")]
+ public DateTime? ReturnTime { get; set; }
+ ///
+ /// 审核
+ ///
+ [Column("CHECKMARK")]
+ public string CheckMark { get; set; }
+ #endregion
+
+ #region 扩展操作
+ ///
+ /// 新增调用
+ ///
+ public void Create()
+ {
+ this.ID = Guid.NewGuid().ToString();
+ }
+ ///
+ /// 编辑调用
+ ///
+ ///
+ public void Modify(string keyValue)
+ {
+ this.ID = keyValue;
+ }
+ #endregion
+ #region 扩展字段
+
+ ///
+ /// 书籍名称
+ ///
+ [NotMapped]
+ public string BookName { get; set; }
+ ///
+ /// 书籍ISBN
+ ///
+ [NotMapped]
+ public string ISBN { get; set; }
+ ///
+ /// 书籍作者
+ ///
+ [NotMapped]
+ public string Author { get; set; }
+ ///
+ /// 书籍出版社
+ ///
+ [NotMapped]
+ public string Publisher { get; set; }
+ #endregion
+ }
+}
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
index d3c6ee25c..f1f1d81cc 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
@@ -125,6 +125,10 @@
+
+
+
+