Explorar el Código

教材入库 添加入库单

临城职教中职
ndbs hace 2 años
padre
commit
fead9733a3
Se han modificado 21 ficheros con 1411 adiciones y 12 borrados
  1. +133
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookInController.cs
  2. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextbookInOutController.cs
  3. +56
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/Form.cshtml
  4. +164
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/Form.js
  5. +30
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/FormIn.cshtml
  6. +57
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/FormIn.js
  7. +34
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/Index.cshtml
  8. +99
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/Index.js
  9. +32
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/IndexIn.cshtml
  10. +118
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/IndexIn.js
  11. +7
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  12. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextBookInMap.cs
  13. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  14. +173
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIn/TextBookInBLL.cs
  15. +135
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIn/TextBookInEntity.cs
  16. +62
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIn/TextBookInIBLL.cs
  17. +234
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIn/TextBookInService.cs
  18. +25
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutBLL.cs
  19. +6
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutIBLL.cs
  20. +6
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutService.cs
  21. +8
    -8
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj

+ 133
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookInController.cs Ver fichero

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

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-03 10:15
/// 描 述:教材入库
/// </summary>
public class TextBookInController : MvcControllerBase
{
private TextBookInIBLL textBookInIBLL = new TextBookInBLL();
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();
}
/// <summary>
/// 入库表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormIn()
{
ViewBag.BookCode = "RK" + DateTime.Now.ToString("yyyyMMddHHmmss");
return View();
}
#endregion

#region 获取数据

/// <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 = textBookInIBLL.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 TextBookInOutData = textBookInOutIBLL.GetKCEntity(keyValue);
//var TextBookInData = textBookInIBLL.GetInEntity(TextBookInOutData.BookCode);

var jsonData = new
{
TextBookInOut = TextBookInOutData,
//TextBookIn = TextBookInData,
};
return Success(jsonData);
}


#endregion

#region 提交数据

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

}
}

+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextbookInOutController.cs Ver fichero

@@ -35,7 +35,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
[HttpGet]
public ActionResult Form()
{
ViewBag.BookCode = "KC" + DateTime.Now.ToString("yyyyMMddHHmm");
ViewBag.BookCode = "KC" + DateTime.Now.ToString("yyyyMMddHHmmss");
return View();
}
#endregion
@@ -129,7 +129,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
}
else
{
entity.UpTime =DateTime.Now ;
entity.UpTime = DateTime.Now;
entity.UpUserID = loginUserInfo.userId;
}
textbookInOutIBLL.SaveEntity(keyValue, entity);


+ 56
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/Form.cshtml Ver fichero

@@ -0,0 +1,56 @@
@{
ViewBag.Title = "教材库存表";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap">
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">库存单</div>
<input id="BookCode" 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>
<div id="LessonNo" isvalid="yes" checkexpession="NotNull" readonly></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" 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="FinallyNum" type="text" class="form-control" readonly />
</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;" readonly></textarea>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">明细操作</div>
<input id="detailadd" type="button" class="btn btn-success" value="添加入库单" />
@*<input id="detailedit" type="button" class="btn btn-warning" value="编辑明细" />*@
<input id="detaildel" type="button" class="btn btn-danger" value="移除入库单" />
</div>
<div class="col-xs-12 lr-form-item lr-form-item-grid">
<div id="TextBookIn"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookIn/Form.js")

+ 164
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/Form.js Ver fichero

@@ -0,0 +1,164 @@
/* * 版 本 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 setAuthorize;
// 设置表单数据
var setFormData;
// 验证数据是否填写完整
var validForm;
// 保存数据
var save;
var selectedRow;
var refreshGirdData;
var tempdatra = new Array();

var bootstrap = function ($, learun) {
"use strict";
// 设置权限
setAuthorize = function (data) {
};
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
$("#detailadd").on('click', function () {
selectedRow = null;
learun.layerForm({
id: 'formTextBookIn',
title: '申请入库',
url: top.$.rootUrl + '/EducationalAdministration/TextBookIn/FormIn',
width: 500,
height: 500,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
//$("#detailedit").on('click', function () {
// var keyValue = $('#TextBookIn').jfGridValue('ID');
// selectedRow = $('#TextBookIn').jfGridGet('rowdata');
// if (learun.checkrow(keyValue)) {
// learun.layerForm({
// id: 'formTextBookIn',
// title: '修改入库单',
// url: top.$.rootUrl + '/EducationalAdministration/TextBookIn/FormIn?keyValue=' + keyValue,
// width: 600,
// height: 350,
// callBack: function (id) {
// return top[id].acceptClick(refreshGirdData);
// }
// });
// }
//});
$("#detaildel").on('click', function () {
var keyValue = $('#TextBookIn').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res, index) {
if (res) {
$.each(tempdatra, function (key, val) {
if (tempdatra[key].ID === keyValue) {
// order -= tempdatra[key].TeachSum + tempdatra[key].StuSum;
tempdatra.splice(key, 1);
}
});
$('#TextBookIn').jfGridSet('refreshdata', tempdatra);
top.layer.close(index);
}
});
}
});
page.bind();
page.initData();
},
bind: function () {
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
$('#TextBookIn').jfGrid({
headData: [
{ label: '入库单', name: 'BookCode', width: 180, align: 'left' },
{ label: '入库数量', name: 'variate', width: 100, align: 'left' },
{ label: '入库时间', name: 'CreateTime', width: 200, align: 'left' },
{ label: '入库用户', name: 'CrateUserID', width: 100, align: 'left' },
{ label: '备注', name: 'Remark', width: 100, align: 'left' },
],
height: 400,
mainId: 'CreateTime desc',
reloadSelected: false,
});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookIn/GetFormData?keyValue=' + keyValue, function (data) {
console.log(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]);
}
}
});
}
}
};
refreshGirdData = function (temprow) {
var ifnewrow = true;
$.each(tempdatra, function (key, val) {
if (tempdatra[key].BookCode === temprow.InOutBook) {
tempdatra[key] = temprow;
ifnewrow = false;
}
});
if (ifnewrow) {
tempdatra.push(temprow);
}

$('#TextBookIn').jfGridSet('refreshdata', tempdatra);
};
// 设置表单数据
setFormData = function (processId, param, callback) {
if (!!processId) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookIn/GetFormDataByProcessId?processId=' + processId, function (data) {
for (var id in data) {
if (!!data[id] && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
if (id == 'TextBookIn' && data[id]) {
keyValue = data[id].ID;
}
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
}
// 验证数据是否填写完整
validForm = function () {
var datas = $('#TextBookIn').jfGridGet('rowdatas');
if (datas == null || datas.length == 0) {
learun.alert.warning("申请未包含入库申请!请先添加入库申请!");
return false;
}
return true;
};
// 保存数据
save = function (callBack) {
var postData = {};
var formData = $('[data-table="TextBookInOut"]').lrGetFormData();
postData.strEntity = JSON.stringify(formData);
postData.strTextBookInList = JSON.stringify($('#TextBookIn').jfGridGet('rowdatas'));
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/TextBookIn/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 30
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/FormIn.cshtml Ver fichero

@@ -0,0 +1,30 @@
@{
ViewBag.Title = "教材入库";
Layout = "~/Views/Shared/_Form.cshtml";
}
<script>
var InBookCode = "@ViewBag.BookCode";
</script>
<div class="lr-form-wrap" id="form">
<div class="col-xs-12 lr-form-item" data-table="TextBookIn">
<div class="lr-form-item-title">入库单<font face="宋体">*</font></div>
<input id="BookCode" type="text" class="form-control" readonly="readonly" />
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookIn">
<div class="lr-form-item-title">数量<font face="宋体">*</font></div>
<input id="variate" type="number" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="BC_ShopPurchaseRecord">
<div class="lr-form-item-title">创建人<font face="宋体">*</font></div>
<input id="CrateUserID" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-12 lr-form-item" data-table="BC_ShopPurchaseRecord">
<div class="lr-form-item-title">创建时间<font face="宋体">*</font></div>
<input id="CreateTime" type="text" class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="isDateTime" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked: function () { $('#CreateTime').trigger('change'); } })" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height:100px;"></textarea>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookIn/FormIn.js")

+ 57
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/FormIn.js Ver fichero

@@ -0,0 +1,57 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-03-03 10:15
* 描 述:教材入库
*/
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 () {

},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookIn/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]);
}
}
});
} else {
$("#BookCode").val(InBookCode);
}
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
var postData = $('body').lrGetFormData();
if (!!keyValue) {
if (!!selectedRow) {
postData.ID = selectedRow.ID;
}
} else {
postData.ID = learun.newGuid();
}
if (!!callBack) {
callBack(postData);
return true;
}
};
page.init();
}

+ 34
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/Index.cshtml Ver fichero

@@ -0,0 +1,34 @@
@{
ViewBag.Title = "教材入库";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout ">
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">教材</div>
<input id="TextBookName" 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_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;教材入库</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookIn/Index.js")

+ 99
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/Index.js Ver fichero

@@ -0,0 +1,99 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-03-03 10:15
* 描 述:教材入库
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/TextBookIn/Form?keyValue=' + keyValue,
width: 800,
height: 800,
callBack: function (id) {
var res = false;
// 验证数据
res = top[id].validForm();
// 保存数据
if (res) {
res = top[id].save('', function () {
page.search();
});
}
return res;
}
});
}
});
},
// 初始化列表
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: '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,
sidx: 'CreateTime desc'
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 32
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/IndexIn.cshtml Ver fichero

@@ -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/IndexIn.js")

+ 118
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextbookInOut/IndexIn.js Ver fichero

@@ -0,0 +1,118 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-03-02 10:37
* 描 述:教材库存表
*/
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 () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/TextBookInOut/Form',
width: 700,
height: 500,
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/TextBookInOut/Form?keyValue=' + keyValue,
width: 700,
height: 500,
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,
sidx: 'CreateTime desc'
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 7
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Ver fichero

@@ -842,6 +842,7 @@
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookSolSubController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookSolSubDetailController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TextbookInOutController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookInController.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" />
@@ -1177,6 +1178,9 @@
<Content Include="Areas\EducationalAdministration\Views\TextBookIndent\FormLook.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIndent\FormDetail.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIndent\FormView.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIn\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIn\FormIn.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIn\FormIn.js" />
<Content Include="Areas\EducationalAdministration\Views\Thermography\IndexResult.js" />
<Content Include="Areas\EducationalAdministration\Views\Thermography\StatisticIndex.js" />
<Content Include="Areas\EducationalAdministration\Views\Thermography\SubmitIndex.js" />
@@ -6668,6 +6672,8 @@
<Content Include="Areas\EducationalAdministration\Views\TextBookInOut\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookInOut\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookInOut\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIn\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIn\Index.js" />
</ItemGroup>
<ItemGroup>
<Folder Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElectivePre\" />
@@ -7606,6 +7612,7 @@
<Content Include="Areas\EducationalAdministration\Views\TextBookIndent\FormDetail.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIndent\FormView.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIndent\FormLook.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIn\Form.cshtml" />
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" />


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

@@ -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-03 10:15
/// 描 述:教材入库
/// </summary>
public class TextBookInMap : EntityTypeConfiguration<TextBookInEntity>
{
public TextBookInMap()
{
#region 表、主键
//表
this.ToTable("TEXTBOOKIN");
//主键
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 fichero

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


+ 173
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIn/TextBookInBLL.cs Ver fichero

@@ -0,0 +1,173 @@
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-03 10:15
/// 描 述:教材入库
/// </summary>
public class TextBookInBLL : TextBookInIBLL
{
private TextBookInService textBookInService = new TextBookInService();

#region 获取数据

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

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

/// <summary>
/// 获取TextBookIn表RK明细
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public IEnumerable<TextBookInEntity> GetInEntity(string keyValue)
{
try
{
return textBookInService.GetInEntity(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
{
textBookInService.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>
/// <returns></returns>
public void SaveEntity(string keyValue, TextBookInEntity entity)
{
try
{
textBookInService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

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

#endregion

}
}

+ 135
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIn/TextBookInEntity.cs Ver fichero

@@ -0,0 +1,135 @@
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-03 10:15
/// 描 述:教材入库
/// </summary>
public class TextBookInEntity
{
#region 实体成员
/// <summary>
/// ID
/// </summary>
[Column("ID")]
public string ID { get; set; }
/// <summary>
/// 库存单号
/// </summary>
[Column("INOUTCODE")]
public string InOutCode { get; set; }
/// <summary>
/// BookCode
/// </summary>
[Column("BOOKCODE")]
public string BookCode { get; set; }
/// <summary>
/// 课程
/// </summary>
[Column("LESSONNO")]
public string LessonNo { get; set; }
/// <summary>
/// PublishNo
/// </summary>
[Column("PUBLISHNO")]
public string PublishNo { get; set; }
/// <summary>
/// 教材号
/// </summary>
[Column("TEXTBOOKNO")]
public string TextBookNo { get; set; }
/// <summary>
/// 教材名称
/// </summary>
[Column("TEXTBOOKNAME")]
public string TextBookName { get; set; }
/// <summary>
/// 第一作者
/// </summary>
[Column("FIRSTAUTHOR")]
public string FirstAuthor { get; set; }
/// <summary>
/// 其他作者
/// </summary>
[Column("OTHERAUTHOR")]
public string OtherAuthor { get; set; }
/// <summary>
/// 出版日期
/// </summary>
[Column("PUBDATE")]
public DateTime? Pubdate { get; set; }
/// <summary>
/// 出版社
/// </summary>
[Column("PUBLISHER")]
public string Publisher { get; set; }
/// <summary>
/// 版次
/// </summary>
[Column("EDITION")]
public string Edition { get; set; }
/// <summary>
/// 印次
/// </summary>
[Column("IMPRESSION")]
public string Impression { get; set; }
/// <summary>
/// 创建人
/// </summary>
[Column("CREATETIME")]
public DateTime? CreateTime { get; set; }
/// <summary>
/// 创建版次
/// </summary>
[Column("CRATEUSERID")]
public string CrateUserID { get; set; }
/// <summary>
/// UpTime
/// </summary>
[Column("UPTIME")]
public DateTime? UpTime { get; set; }
/// <summary>
/// UpUserID
/// </summary>
[Column("UPUSERID")]
public string UpUserID { get; set; }
/// <summary>
/// variate
/// </summary>
[Column("VARIATE")]
public decimal? variate { get; set; }
/// <summary>
/// Remark
/// </summary>
[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
#region 扩展字段
#endregion
}
}


+ 62
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIn/TextBookInIBLL.cs Ver fichero

@@ -0,0 +1,62 @@
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-03 10:15
/// 描 述:教材入库
/// </summary>
public interface TextBookInIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<TextBookInEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取TextBookIn表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
TextBookInEntity GetTextBookInEntity(string keyValue);
/// <summary>
/// 获取TextBookIn表RK明细
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
IEnumerable<TextBookInEntity> GetInEntity(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, TextBookInEntity entity);

/// <summary>
/// 保存实体数据
/// </summary>
/// <param name="keyValue"></param>
/// <param name="entity"></param>
/// <param name="textBookIndentDatail"></param>
void SaveEntity(string keyValue, TextbookInOutEntity entity, List<TextBookInEntity> textBookIndentDatail);
#endregion

}
}

+ 234
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIn/TextBookInService.cs Ver fichero

@@ -0,0 +1,234 @@
using Dapper;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
using Learun.Application.TwoDevelopment.LogisticsManagement;

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

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<TextBookInEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.ID,
t.TextBookName,
t.CreateTime,
t.CrateUserID
");
strSql.Append(" FROM TextBookIn t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["TextBookName"].IsEmpty())
{
dp.Add("TextBookName", queryParam["TextBookName"].ToString(), DbType.String);
strSql.Append(" AND t.TextBookName = @TextBookName ");
}
return this.BaseRepository("CollegeMIS").FindList<TextBookInEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

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

/// <summary>
/// 获取TextBookIn表RK明细
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public IEnumerable<TextBookInEntity> GetInEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindList<TextBookInEntity>(x => x.InOutCode == 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<TextBookInEntity>(t => t.ID == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, TextBookInEntity 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);
}
}
}

/// <summary>
/// 保存
/// </summary>
/// <param name="keyValue"></param>
/// <param name="entity">库存</param>
/// <param name="textbookIndentDateil"></param>
public void SaveEntity(string keyValue, TextbookInOutEntity entity, List<TextBookInEntity> textbookInList)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
decimal? variate = 0;
if (textbookInList.Count > 0)
{
for (int i = 0; i < textbookInList.Count; i++)
{
textbookInList[i].InOutCode = entity.BookCode;
textbookInList[i].LessonNo = entity.LessonNo;
textbookInList[i].PublishNo = entity.PublishNo;
textbookInList[i].TextBookNo = entity.TextBookNo;
textbookInList[i].TextBookName = entity.TextBookName;
textbookInList[i].FirstAuthor = entity.FirstAuthor;
textbookInList[i].OtherAuthor = entity.OtherAuthor;
textbookInList[i].Pubdate = entity.Pubdate;
textbookInList[i].Publisher = entity.Publisher;
textbookInList[i].Edition = entity.Edition;
textbookInList[i].Impression = entity.Impression;
textbookInList[i].Impression = entity.Impression;
variate += textbookInList[i].variate;
}
entity.Create();
this.BaseRepository("CollegeMIS").Insert(textbookInList);

if (variate != 0 && variate > 0)
{
var newtextInOutEntity = db.FindEntity<TextbookInOutEntity>(x => x.BookCode == entity.BookCode);
if (newtextInOutEntity != null)
{
newtextInOutEntity.FinallyNum += variate;
db.Update(newtextInOutEntity);
}
}
}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

}
}

+ 25
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutBLL.cs Ver fichero

@@ -66,7 +66,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
}
/// <summary>
/// 获取实体数据
/// </summary>
@@ -91,6 +91,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

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

#endregion

#region 提交数据


+ 6
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutIBLL.cs Ver fichero

@@ -34,6 +34,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="keyValue">主键</param>
/// <returns></returns>
TextbookInOutEntity GetEntity(string keyValue);
/// <summary>
/// 获取KC未删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
TextbookInOutEntity GetKCEntity(string keyValue);
#endregion

#region 提交数据


+ 6
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutService.cs Ver fichero

@@ -71,6 +71,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
strSql.Append(" and ( t.TextBookNo like @keyword or t.TextBookName like @keyword or t.FirstAuthor like @keyword )");
dp.Add("keyword", "%" + queryParam["keyword"].ToString() + "%", DbType.String);
}
if (!queryParam["TextBookName"].IsEmpty())
{
strSql.Append(" and TextBookName like @TextBookName )");
dp.Add("TextBookName", "%" + queryParam["TextBookName"].ToString() + "%", DbType.String);
}
return this.BaseRepository("CollegeMIS").FindList<TextbookInOutEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
@@ -95,7 +100,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<TextbookInOutEntity>(keyValue);
return this.BaseRepository("CollegeMIS").FindEntity<TextbookInOutEntity>(x => x.ID == keyValue && x.IsDel == 0);
}
catch (Exception ex)
{


+ 8
- 8
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj Ver fichero

@@ -287,6 +287,10 @@
<Compile Include="EducationalAdministration\TeachSwitch\TeachSwitchEntity.cs" />
<Compile Include="EducationalAdministration\TeachSwitch\TeachSwitchIBLL.cs" />
<Compile Include="EducationalAdministration\TeachSwitch\TeachSwitchService.cs" />
<Compile Include="EducationalAdministration\TextbookInOut\TextBookInOutBLL.cs" />
<Compile Include="EducationalAdministration\TextbookInOut\TextBookInOutEntity.cs" />
<Compile Include="EducationalAdministration\TextbookInOut\TextBookInOutIBLL.cs" />
<Compile Include="EducationalAdministration\TextbookInOut\TextBookInOutService.cs" />
<Compile Include="EducationalAdministration\Thermography\ThermographyEntity.cs" />
<Compile Include="EvaluationTeach\Eval_Main\Eval_MainBLL.cs" />
<Compile Include="EvaluationTeach\Eval_Main\Eval_MainEntity.cs" />
@@ -1802,10 +1806,6 @@
<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" />
@@ -1814,10 +1814,10 @@
<Compile Include="EducationalAdministration\TextBookSolSubDetail\TextBookSolSubDetailService.cs" />
<Compile Include="EducationalAdministration\TextBookSolSubDetail\TextBookSolSubDetailBLL.cs" />
<Compile Include="EducationalAdministration\TextBookSolSubDetail\TextBookSolSubDetailIBLL.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\TextBookIn\TextBookInEntity.cs" />
<Compile Include="EducationalAdministration\TextBookIn\TextBookInService.cs" />
<Compile Include="EducationalAdministration\TextBookIn\TextBookInBLL.cs" />
<Compile Include="EducationalAdministration\TextBookIn\TextBookInIBLL.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


Cargando…
Cancelar
Guardar