Pārlūkot izejas kodu

解决冲突

临城职教中职
zhangli pirms 2 gadiem
vecāks
revīzija
e210b325ce
14 mainītis faili ar 1035 papildinājumiem un 2 dzēšanām
  1. +121
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextbookInOutController.cs
  2. +51
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/Form.cshtml
  3. +105
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/Form.js
  4. +32
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/Index.cshtml
  5. +120
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/Index.js
  6. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/FormRoom.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/TextbookInOutMap.cs
  9. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  10. +148
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutBLL.cs
  11. +158
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutEntity.cs
  12. +55
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutIBLL.cs
  13. +204
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutService.cs
  14. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj

+ 121
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextbookInOutController.cs Parādīt failu

@@ -0,0 +1,121 @@
using Learun.Application.TwoDevelopment.EducationalAdministration;
using Learun.Util;
using System.Data;
using System.Web.Mvc;

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-02 10:37
/// 描 述:教材库存表
/// </summary>
public class TextbookInOutController : MvcControllerBase
{
private TextbookInOutIBLL textbookInOutIBLL = new TextbookInOutBLL();

#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 GetList( string queryJson )
{
var data = textbookInOutIBLL.GetList(queryJson);
return Success(data);
}
/// <summary>
/// 获取列表分页数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = textbookInOutIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var data = textbookInOutIBLL.GetEntity(keyValue);
return Success(data);
}
#endregion

#region 提交数据

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

}
}

+ 51
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/Form.cshtml Parādīt failu

@@ -0,0 +1,51 @@
@{
ViewBag.Title = "教材库存表";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="body">
<div class="col-xs-6 lr-form-item" data-table="TextbookInOut">
<div class="lr-form-item-title">库存编码<font face="宋体">*</font></div>
<input id="BookCode" type="text" class="form-control" isvalid="yes" checkexpession="NotNull " />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextbookInOut">
<div class="lr-form-item-title">课程<font face="宋体">*</font></div>
<div id="LessonNo" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="TextbookInOut">
<div class="lr-form-item-title">教材</div>
<input id="TextBookName" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextbookInOut">
<div class="lr-form-item-title">教材号</div>
<input id="TextBookNo" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextbookInOut">
<div class="lr-form-item-title">出版号</div>
<input id="PublishNo" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextbookInOut">
<div class="lr-form-item-title">第一作者</div>
<input id="FirstAuthor" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextbookInOut">
<div class="lr-form-item-title">其他作者</div>
<input id="OtherAuthor" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextbookInOut">
<div class="lr-form-item-title">出版社</div>
<input id="Publisher" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextbookInOut">
<div class="lr-form-item-title">版次</div>
<input id="Edition" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextbookInOut">
<div class="lr-form-item-title">印次</div>
<input id="Impression" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="TextbookInOut">
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height:100px;"></textarea>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextbookInOut/Form.js")

+ 105
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/Form.js Parādīt failu

@@ -0,0 +1,105 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-03-02 10:37
* 描 述:教材库存表
*/
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 () {
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
$('#TextBookName').lrGirdSelect({
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=TextBookInfo',
param: { strWhere: " IsDel = '0' and IsValid ='true' " },
height: 800,
width: 1100,
selectWord: 'textbookname',
value: 'textbookname',
text: 'textbookname',
headData:
[
{ label: "教材号", name: "publishno", width: 150, align: "left" },
{ label: "教材编码", name: "textbookno", width: 150, align: "left" },
{ label: "教材名称", name: "textbookname", width: 150, align: "left" },
{ label: "作者", name: "firstauthor", width: 150, align: "left" },
{ label: "其他作者", name: "otherauthor", width: 100, align: "left" },
{ label: "出版日期", name: "pubdate", width: 100, align: "left" },
{ label: "出版社", name: "publisher", width: 100, align: "left" },
{
label: "教材类型", name: "textbooktype", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'TextBookType',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{
label: "教材性质", name: "textbooknature", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'TextBookNature',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{ label: "价格", name: "price", width: 50, align: "left" },
{ label: "版次", name: "edition", width: 100, align: "left" },
{ label: "印次", name: "impression", width: 100, align: "left" },
],
select: function (item) {
////赋值
$("#Price").val(item.price);
$("#PublishNo").val(item.publishno);
$("#TextBookNo").val(item.textbookno);
$("#TextBookName").val(item.textbookname);
$("#FirstAuthor").val(item.firstauthor);
$("#OtherAuthor").val(item.otherauthor);
$("#Publisher").val(item.publisher);
$("#Edition").val(item.edition);
$("#Impression").val(item.impression);
}
});
$('#IsDel').val(0);
$('#FinallyNum').val(0);
$('#CreateTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'));
$('#CreateUserID')[0].lrvalue = learun.clientdata.get(['userinfo']).userId;
$('#CreateUserID').val(learun.clientdata.get(['userinfo']).realName);
},
initData: function () {
if (!!selectedRow) {
$('#form').lrSetFormData(selectedRow);
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('form').lrValidform()) {
return false;
}
var postData = {
strEntity: JSON.stringify($('form').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/TextbookInOut/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 32
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/Index.cshtml Parādīt failu

@@ -0,0 +1,32 @@
@{
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;查询</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;新增</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>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextbookInOut/Index.js")

+ 120
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/Index.js Parādīt failu

@@ -0,0 +1,120 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-03-02 10:37
* 描 述:教材库存表
*/
var selectedRow;
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
// 查询
$('#btn_Search').on('click', function () {
var keyword = $('#txt_Keyword').val();
page.search({ keyword: keyword });
});
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
selectedRow = null;
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/TextbookInOut/Form',
width: 700,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
selectedRow = $('#gridtable').jfGridGet('rowdata');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/TextbookInOut/Form?keyValue=' + keyValue,
width: 700,
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/TextbookInOut/DeleteForm', { keyValue: keyValue }, function () {
});
}
});
}
});
},
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/TextbookInOut/GetPageList',
headData: [
{ label: '库存单号', name: 'BookCode', width: 200, align: "left" },
{
label: "课程", name: "LessonNo", width: 150, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo',
key: value,
keyId: 'lessonno',
callback: function (_data) {
callback(_data['lessonname']);
}
});
}
},
{ label: '教材名称', name: 'TextBookName', width: 200, align: "left" },
{ label: '教材号', name: 'TextBookNo', width: 200, align: "left" },
{ label: '出版号', name: 'PublishNo', width: 200, align: "left" },
{ label: '第一作者', name: 'FirstAuthor', width: 200, align: "left" },
{ label: '其他作者', name: 'OtherAuthor', width: 200, align: "left" },
//{ label: '出版日期', name: 'Pubdate', width: 200, align: "left" },
{ label: '出版社', name: 'Publisher', width: 200, align: "left" },
{ label: '版次', name: 'Edition', width: 200, align: "left" },
{ label: '印次', name: 'Impression', width: 200, align: "left" },
{ label: '创建人', name: 'CreateTime', width: 200, align: "left" },
{ label: '创建用户', name: 'CrateUserID', width: 200, align: "left" },
{ label: '修改人', name: 'UpTime', width: 200, align: "left" },
{ label: '修改用户', name: 'UpUserID', width: 200, align: "left" },
{ label: '当前数量', name: 'FinallyNum', width: 200, align: "left" },
{ label: '备注', name: 'Remark', width: 200, 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
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/FormRoom.js Parādīt failu

@@ -48,7 +48,7 @@ var bootstrap = function ($, learun) {
$('#content').append(html);

$('#' + data[i].ID).lrselect({
value: "stuid",
value: "stuno",
text: "stuname",
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable',
param: { code: "StuInfoBasic", strWhere: strWhere },
@@ -56,7 +56,7 @@ var bootstrap = function ($, learun) {
// console.log(item);
var stuid = '';
if (item) {
stuid = item.stuid;
stuid = item.stuno;

}
var id = $(this).attr('id');


+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Parādīt failu

@@ -841,6 +841,7 @@
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookIndentDetailController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookSolSubController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookSolSubDetailController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TextbookInOutController.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" />
@@ -6663,6 +6664,10 @@
<Content Include="Areas\EducationalAdministration\Views\TextBookSolSubDetail\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookSolSubDetail\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookSolSubDetail\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\TextbookInOut\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextbookInOut\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\TextbookInOut\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextbookInOut\Form.js" />
</ItemGroup>
<ItemGroup>
<Folder Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElectivePre\" />


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextbookInOutMap.cs Parādīt failu

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

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-02 10:37
/// 描 述:教材库存表
/// </summary>
public class TextbookInOutMap : EntityTypeConfiguration<TextbookInOutEntity>
{
public TextbookInOutMap()
{
#region 表、主键
//表
this.ToTable("TEXTBOOKINOUT");
//主键
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 Parādīt failu

@@ -595,6 +595,7 @@
<Compile Include="EducationalAdministration\TextBookIndentDetailMap.cs" />
<Compile Include="EducationalAdministration\TextBookSolSubMap.cs" />
<Compile Include="EducationalAdministration\TextBookSolSubDetailMap.cs" />
<Compile Include="EducationalAdministration\TextbookInOutMap.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


+ 148
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutBLL.cs Parādīt failu

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

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-02 10:37
/// 描 述:教材库存表
/// </summary>
public class TextbookInOutBLL : TextbookInOutIBLL
{
private TextbookInOutService textbookInOutService = new TextbookInOutService();

#region 获取数据

/// <summary>
/// 获取列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<TextbookInOutEntity> GetList( string queryJson )
{
try
{
return textbookInOutService.GetList(queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

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

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

#endregion

#region 提交数据

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

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

#endregion

}
}

+ 158
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutEntity.cs Parādīt failu

@@ -0,0 +1,158 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;
namespace Learun.Application.TwoDevelopment.EducationalAdministration

{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-02 10:37
/// 描 述:教材库存表
/// </summary>
public class TextbookInOutEntity
{
#region 实体成员
/// <summary>
/// ID
/// </summary>
/// <returns></returns>
[Column("ID")]
public string ID { get; set; }
/// <summary>
/// InorOut
/// </summary>
/// <returns></returns>
[Column("INOROUT")]
public string InorOut { get; set; }
/// <summary>
/// BookCode
/// </summary>
/// <returns></returns>
[Column("BOOKCODE")]
public string BookCode { get; set; }
/// <summary>
/// 课程
/// </summary>
/// <returns></returns>
[Column("LESSONNO")]
public string LessonNo { get; set; }
/// <summary>
/// PublishNo
/// </summary>
/// <returns></returns>
[Column("PUBLISHNO")]
public string PublishNo { get; set; }
/// <summary>
/// 教材号
/// </summary>
/// <returns></returns>
[Column("TEXTBOOKNO")]
public string TextBookNo { get; set; }
/// <summary>
/// 教材名称
/// </summary>
/// <returns></returns>
[Column("TEXTBOOKNAME")]
public string TextBookName { get; set; }
/// <summary>
/// 第一作者
/// </summary>
/// <returns></returns>
[Column("FIRSTAUTHOR")]
public string FirstAuthor { get; set; }
/// <summary>
/// 其他作者
/// </summary>
/// <returns></returns>
[Column("OTHERAUTHOR")]
public string OtherAuthor { get; set; }
/// <summary>
/// 出版日期
/// </summary>
/// <returns></returns>
[Column("PUBDATE")]
public DateTime? Pubdate { get; set; }
/// <summary>
/// 出版社
/// </summary>
/// <returns></returns>
[Column("PUBLISHER")]
public string Publisher { get; set; }
/// <summary>
/// 版次
/// </summary>
/// <returns></returns>
[Column("EDITION")]
public string Edition { get; set; }
/// <summary>
/// 印次
/// </summary>
/// <returns></returns>
[Column("IMPRESSION")]
public string Impression { get; set; }
/// <summary>
/// 创建人
/// </summary>
/// <returns></returns>
[Column("CREATETIME")]
public DateTime? CreateTime { get; set; }
/// <summary>
/// 创建版次
/// </summary>
/// <returns></returns>
[Column("CRATEUSERID")]
public string CrateUserID { get; set; }
/// <summary>
/// UpTime
/// </summary>
/// <returns></returns>
[Column("UPTIME")]
public DateTime? UpTime { get; set; }
/// <summary>
/// UpUserID
/// </summary>
/// <returns></returns>
[Column("UPUSERID")]
public string UpUserID { get; set; }
/// <summary>
/// FinallyNum
/// </summary>
/// <returns></returns>
[Column("FINALLYNUM")]
public decimal? FinallyNum { get; set; }
/// <summary>
/// variate
/// </summary>
/// <returns></returns>
[Column("VARIATE")]
public decimal? variate { get; set; }
/// <summary>
/// Remark
/// </summary>
/// <returns></returns>
[Column("REMARK")]
public string Remark { 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
}
}


+ 55
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutIBLL.cs Parādīt failu

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

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-02 10:37
/// 描 述:教材库存表
/// </summary>
public interface TextbookInOutIBLL
{
#region 获取数据

/// <summary>
/// 获取列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<TextbookInOutEntity> GetList( string queryJson );
/// <summary>
/// 获取列表分页数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<TextbookInOutEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
TextbookInOutEntity GetEntity(string keyValue);
#endregion

#region 提交数据

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

}
}

+ 204
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutService.cs Parādīt failu

@@ -0,0 +1,204 @@
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 V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-02 10:37
/// 描 述:教材库存表
/// </summary>
public class TextbookInOutService : RepositoryFactory
{
#region 构造函数和属性

private string fieldSql;
/// <summary>
/// 构造方法
/// </summary>
public TextbookInOutService()
{
fieldSql=@"
t.ID,
t.InorOut,
t.BookCode,
t.LessonNo,
t.PublishNo,
t.TextBookNo,
t.TextBookName,
t.FirstAuthor,
t.OtherAuthor,
t.Pubdate,
t.Publisher,
t.Edition,
t.Impression,
t.CreateTime,
t.CrateUserID,
t.UpTime,
t.UpUserID,
t.FinallyNum,
t.variate,
t.Remark
";
}
#endregion

#region 获取数据

/// <summary>
/// 获取列表数据
/// </summary>
/// <param name="queryJson">条件参数</param>
/// <returns></returns>
public IEnumerable<TextbookInOutEntity> GetList( string queryJson )
{
try
{
//参考写法
//var queryParam = queryJson.ToJObject();
// 虚拟参数
//var dp = new DynamicParameters(new { });
//dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime);
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(fieldSql);
strSql.Append(" FROM TextbookInOut t ");
return this.BaseRepository("CollegeMIS").FindList<TextbookInOutEntity>(strSql.ToString());
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取列表分页数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">条件参数</param>
/// <returns></returns>
public IEnumerable<TextbookInOutEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(fieldSql);
strSql.Append(" FROM TextbookInOut t ");
return this.BaseRepository("CollegeMIS").FindList<TextbookInOutEntity>(strSql.ToString(), pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

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

#endregion

#region 提交数据

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

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

#endregion

}
}

+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj Parādīt failu

@@ -1802,6 +1802,10 @@
<Compile Include="EducationalAdministration\TextBookIndentDetail\TextBookIndentDetailService.cs" />
<Compile Include="EducationalAdministration\TextBookIndentDetail\TextBookIndentDetailIBLL.cs" />
<Compile Include="EducationalAdministration\TextBookIndentDetail\TextBookIndentDetailBLL.cs" />
<Compile Include="EducationalAdministration\TextbookInOut\TextbookInOutEntity.cs" />
<Compile Include="EducationalAdministration\TextbookInOut\TextbookInOutService.cs" />
<Compile Include="EducationalAdministration\TextbookInOut\TextbookInOutIBLL.cs" />
<Compile Include="EducationalAdministration\TextbookInOut\TextbookInOutBLL.cs" />
<Compile Include="EducationalAdministration\TextBookSolSub\TextBookSolSubEntity.cs" />
<Compile Include="EducationalAdministration\TextBookSolSub\TextBookSolSubService.cs" />
<Compile Include="EducationalAdministration\TextBookSolSub\TextBookSolSubBLL.cs" />


Notiek ielāde…
Atcelt
Saglabāt