diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/BookPutInController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/BookPutInController.cs new file mode 100644 index 000000000..114c728c3 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/BookPutInController.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-12 09:45 + /// 描 述:图书入库管理 + /// + public class BookPutInController : MvcControllerBase + { + private BookPutInIBLL bookPutInIBLL = new BookPutInBLL(); + + #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 = bookPutInIBLL.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_putininfoData = bookPutInIBLL.GetBook_putininfoEntity( keyValue ); + var jsonData = new { + Book_putininfo = Book_putininfoData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + bookPutInIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + Book_putininfoEntity entity = strEntity.ToObject(); + bookPutInIBLL.SaveEntity(keyValue,entity); + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Form.cshtml index 65d792a19..da41636e7 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookBorrow/Form.cshtml @@ -6,15 +6,19 @@
图书*
-
+
借阅时间*
- +
借阅人*
-
+
+
+
+
数量
+
借书证
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookPutIn/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookPutIn/Form.cshtml new file mode 100644 index 000000000..59db79761 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookPutIn/Form.cshtml @@ -0,0 +1,28 @@ +@{ + ViewBag.Title = "图书入库管理"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+ +
+
图书*
+
+
+
+
入库时间*
+ +
+
+
入库人*
+
+
+
+
数量
+ +
+
+
审核
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/BookPutIn/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookPutIn/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookPutIn/Form.js new file mode 100644 index 000000000..6e0ec5a08 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookPutIn/Form.js @@ -0,0 +1,53 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-12 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/BookPutIn/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/BookPutIn/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookPutIn/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookPutIn/Index.cshtml new file mode 100644 index 000000000..32cda1ee4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookPutIn/Index.cshtml @@ -0,0 +1,40 @@ +@{ + ViewBag.Title = "图书入库管理"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
+
+
+
图书名称
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/BookPutIn/Index.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookPutIn/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookPutIn/Index.js new file mode 100644 index 000000000..cf2434bc0 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookPutIn/Index.js @@ -0,0 +1,140 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2022-11-12 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/BookPutIn/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/BookPutIn/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/BookPutIn/DeleteForm', { keyValue: keyValue}, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 打印 + $('#lr_print').on('click', function () { + $('#gridtable').jqprintTable(); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/BookPutIn/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: "PutInTime", 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: "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/Areas/EducationalAdministration/Views/BookReturn/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/BookReturn/Form.cshtml index 606a8525b..d1199254b 100644 --- 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 @@ -6,15 +6,19 @@
图书*
-
+
归还时间*
- +
归还人*
-
+
+
+
+
数量
+
借书证
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 2d56849f6..dbccc4328 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 @@ + @@ -1047,6 +1048,8 @@ + + @@ -1312,6 +1315,8 @@ + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Book_putininfoMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Book_putininfoMap.cs new file mode 100644 index 000000000..70374f9fb --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Book_putininfoMap.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-12 09:45 + /// 描 述:图书入库管理 + /// + public class Book_putininfoMap : EntityTypeConfiguration + { + public Book_putininfoMap() + { + #region 表、主键 + //表 + this.ToTable("BOOK_PUTININFO"); + //主键 + 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 26c9da754..8cd6dcff9 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/BookPutIn/BookPutInBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookPutIn/BookPutInBLL.cs new file mode 100644 index 000000000..70b90ae4b --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookPutIn/BookPutInBLL.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-12 09:45 + /// 描 述:图书入库管理 + /// + public class BookPutInBLL : BookPutInIBLL + { + private BookPutInService bookPutInService = new BookPutInService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return bookPutInService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取Book_putininfo表实体数据 + /// 主键 + /// + /// + public Book_putininfoEntity GetBook_putininfoEntity(string keyValue) + { + try + { + return bookPutInService.GetBook_putininfoEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + public void DeleteEntity(string keyValue) + { + try + { + bookPutInService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + public void SaveEntity(string keyValue, Book_putininfoEntity entity) + { + try + { + bookPutInService.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/BookPutIn/BookPutInIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookPutIn/BookPutInIBLL.cs new file mode 100644 index 000000000..223bc3c01 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookPutIn/BookPutInIBLL.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-12 09:45 + /// 描 述:图书入库管理 + /// + public interface BookPutInIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取Book_putininfo表实体数据 + /// 主键 + /// + /// + Book_putininfoEntity GetBook_putininfoEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + void SaveEntity(string keyValue, Book_putininfoEntity entity); + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookPutIn/BookPutInService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookPutIn/BookPutInService.cs new file mode 100644 index 000000000..ac6858275 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookPutIn/BookPutInService.cs @@ -0,0 +1,153 @@ +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-12 09:45 + /// 描 述:图书入库管理 + /// + public class BookPutInService : 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_putininfo 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.PutInTime >= @startTime AND t.PutInTime <= @endTime ) "); + } + 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_putininfo表实体数据 + /// 主键 + /// + /// + public Book_putininfoEntity GetBook_putininfoEntity(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_putininfoEntity 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/BookPutIn/Book_putininfoEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookPutIn/Book_putininfoEntity.cs new file mode 100644 index 000000000..892642f08 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/BookPutIn/Book_putininfoEntity.cs @@ -0,0 +1,91 @@ +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-12 09:45 + /// 描 述:图书入库管理 + /// + public class Book_putininfoEntity + { + #region 实体成员 + /// + /// ID + /// + [Column("ID")] + public string ID { get; set; } + /// + /// 书籍主键 + /// + [Column("BOOKID")] + public string BookID { get; set; } + /// + /// 数量 + /// + [Column("AMOUNT")] + public int? Amount { get; set; } + /// + /// 入库人 + /// + [Column("USERID")] + public string UserId { get; set; } + /// + /// 入库时间 + /// + [Column("PUTINTIME")] + public DateTime? PutInTime { 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 f1f1d81cc..84488bd4a 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 @@ + + + +