Parcourir la source

教材入库订单明细

临城职教中职
ndbs il y a 2 ans
Parent
révision
2bd01d7eca
22 fichiers modifiés avec 1219 ajouts et 185 suppressions
  1. +9
    -6
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookIndentController.cs
  2. +120
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookIndentDetailController.cs
  3. +12
    -10
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/Form.cshtml
  4. +112
    -71
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/Form.js
  5. +23
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/FormDetail.cshtml
  6. +105
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/FormDetail.js
  7. +4
    -10
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/FormView.cshtml
  8. +29
    -62
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/FormView.js
  9. +11
    -17
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/Index.js
  10. +39
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndentDetail/Index.cshtml
  11. +105
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndentDetail/Index.js
  12. +6
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  13. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextBookIndentDetailMap.cs
  14. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  15. +25
    -3
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndent/TextBookIndentBLL.cs
  16. +4
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndent/TextBookIndentIBLL.cs
  17. +49
    -4
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndent/TextBookIndentService.cs
  18. +149
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndentDetail/TextBookIndentDetailBLL.cs
  19. +128
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndentDetail/TextBookIndentDetailEntity.cs
  20. +56
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndentDetail/TextBookIndentDetailIBLL.cs
  21. +199
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndentDetail/TextBookIndentDetailService.cs
  22. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj

+ 9
- 6
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookIndentController.cs Voir le fichier

@@ -93,9 +93,12 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
public ActionResult GetFormData(string keyValue)
{
var TextBookIndentData = textBookIndentIBLL.GetTextBookIndentEntity(keyValue);
var TextBookIndentDetailData = textBookIndentIBLL.TextBookIndentDetailList(TextBookIndentData.ID);

var jsonData = new
{
TextBookIndent = TextBookIndentData,
TextBookIndentDetail = TextBookIndentDetailData,
};
return Success(jsonData);
}
@@ -139,16 +142,16 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity,string strTextBookIndentDetailList)
{
TextBookIndentEntity entity = strEntity.ToObject<TextBookIndentEntity>();
textBookIndentIBLL.SaveEntity(keyValue, entity);
if (string.IsNullOrEmpty(keyValue))
{
}
List<TextBookIndentDetailEntity> textBookIndentDetail = strTextBookIndentDetailList.ToObject<List<TextBookIndentDetailEntity>>();
textBookIndentIBLL.SaveEntity(keyValue, entity, textBookIndentDetail);
return Success("保存成功!");
}
#endregion

#region 扩展数据


+ 120
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookIndentDetailController.cs Voir le fichier

@@ -0,0 +1,120 @@
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-02-27 09:35
/// 描 述:TextBookIndentDetail
/// </summary>
public class TextBookIndentDetailController : MvcControllerBase
{
private TextBookIndentDetailIBLL textBookIndentDetailIBLL = new TextBookIndentDetailBLL();
#region 视图功能

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

#region 获取数据

/// <summary>
/// 获取列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetList( string queryJson )
{
var data = textBookIndentDetailIBLL.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 = textBookIndentDetailIBLL.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 = textBookIndentDetailIBLL.GetEntity(keyValue);
return Success(data);
}
#endregion

#region 提交数据

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

+ 12
- 10
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/Form.cshtml Voir le fichier

@@ -2,7 +2,9 @@
ViewBag.Title = "教材订单管理";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
@Html.AppendCssFile("/Views/LR_Content/plugin/layerselect/lr-layerselect.css")
@Html.AppendJsFile("/Views/LR_Content/plugin/layerselect/lr-layerselect.js")
<div class="lr-form-wrap">
<div class="col-xs-6 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">专业部<font face="宋体">*</font></div>
<div id="DeptNo" isvalid="yes" checkexpession="NotNull"></div>
@@ -39,15 +41,6 @@
<div class="lr-form-item-title">其他作者</div>
<input id="OtherAuthor" type="text" class="form-control" readonly />
</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="TextBookIndentDetail"></div>
</div>*@
<div class="col-xs-12 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height:100px;"></textarea>
@@ -64,5 +57,14 @@
<div class="lr-form-item-title">状态</div>
<input id="Status" type="text" class="form-control" />
</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="TextBookIndentDetail"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookIndent/Form.js")

+ 112
- 71
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/Form.js Voir le fichier

@@ -14,77 +14,66 @@ var setFormData;
var validForm;
// 保存数据
var save;
var selectedRow;
var refreshGirdData;
var tempdatra = new Array();
var pricecount = 0;

var bootstrap = function ($, learun) {
"use strict";
// 设置权限
setAuthorize = function (data) {
if (!!data) {
for (var field in data) {
if (data[field].isLook != 1) {// 如果没有查看权限就直接移除
$('#' + data[field].fieldId).parent().remove();
}
else {
if (data[field].isEdit != 1) {
$('#' + data[field].fieldId).attr('disabled', 'disabled');
if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) {
$('#' + data[field].fieldId).css({ 'padding-right': '58px' });
$('#' + data[field].fieldId).find('.btn-success').remove();
}
}
}
}
}
};
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
//$("#detailadd").on('click', function () {
// selectedRow = null;
// learun.layerForm({
// id: 'formitem',
// title: '新增明细',
// url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoItemApply/FormJYHC',
// width: 860,
// height: 600,
// callBack: function (id) {
// return top[id].acceptClick(refreshGirdData);
// }
// });
//});
//$("#detailedit").on('click', function () {
// var keyValue = $('#TextBookIndentDetail').jfGridValue('ID');
// selectedRow = $('#TextBookIndentDetail').jfGridGet('rowdata');
// if (learun.checkrow(keyValue)) {
// learun.layerForm({
// id: 'formitem',
// title: '编辑明细',
// url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoItemApply/FormJYHC?keyValue=' + keyValue,
// width: 860,
// height: 600,
// callBack: function (id) {
// return top[id].acceptClick(refreshGirdData);
// }
// });
// }
//});
//$("#detaildel").on('click', function () {
// var keyValue = $('#TextBookIndentDetail').jfGridValue('ID');
// if (learun.checkrow(keyValue)) {
// learun.layerConfirm('是否确认删除该项!', function (res, index) {
// if (res) {
// $.each(tempdatra, function (key, val) {
// if (tempdatra[key].AAIId === keyValue) {
// pricecount -= tempdatra[key].AAIPrice * tempdatra[key].AAIStock;
// tempdatra.splice(key, 1);
// }
// });
// $("#AAPrice").val(pricecount);
// $('#TextBookIndentDetail').jfGridSet('refreshdata', tempdatra.sort(sortNumber));
// top.layer.close(index);
// }
// });
// }
//});
$("#detailadd").on('click', function () {
selectedRow = null;
learun.layerForm({
id: 'formTextBookIndentDetail',
title: '新增明细',
url: top.$.rootUrl + '/EducationalAdministration/TextBookIndent/FormDetail',
width: 600,
height: 350,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
$("#detailedit").on('click', function () {
var keyValue = $('#TextBookIndentDetail').jfGridValue('ID');
selectedRow = $('#TextBookIndentDetail').jfGridGet('rowdata');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'formTextBookIndentDetail',
title: '编辑明细',
url: top.$.rootUrl + '/EducationalAdministration/TextBookIndent/FormDetail?keyValue=' + keyValue,
width: 600,
height: 350,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
$("#detaildel").on('click', function () {
var keyValue = $('#TextBookIndentDetail').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res, index) {
if (res) {
$.each(tempdatra, function (key, val) {
if (tempdatra[key].ID === keyValue) {
pricecount -= tempdatra[key].AAIPrice * tempdatra[key].AAIStock;
tempdatra.splice(key, 1);
}
});
$("#AAPrice").val(pricecount);
$('#TextBookIndentDetail').jfGridSet('refreshdata', tempdatra.sort(sortNumber));
top.layer.close(index);
}
});
}
});
page.bind();
page.initData();
},
@@ -107,6 +96,29 @@ var bootstrap = function ($, learun) {
value: 'value',
text: 'text'
});
$('#TextBookIndentDetail').jfGrid({
headData: [
{
label: "班级", name: "ClassNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
key: value,
keyId: 'classno',
callback: function (_data) {
callback(_data['classname']);
}
});
}
},
{ label: '教师人数', name: 'TeachSum', width: 80, align: 'left' },
{ label: '学生人数', name: 'StuSum', width: 80, align: 'left' },
{ label: '备注', name: 'Remark', width: 100, align: 'left' },
],
height: 400,
mainId: 'ID,IndentID',
reloadSelected: false,
});
$('#TextBookName').lrGirdSelect({
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=TextBookInfo',
param: { strWhere: " IsDel = '0' and IsValid ='true' " },
@@ -151,7 +163,6 @@ var bootstrap = function ($, learun) {
{ label: "印次", name: "impression", width: 100, align: "left" },
],
select: function (item) {
console.log(item, 123123);
////赋值
$("#PublishNo").val(item.publishno);
$("#FirstAuthor").val(item.firstauthor);
@@ -170,15 +181,41 @@ var bootstrap = function ($, learun) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id).jfGridSet('refreshdata', data[id]);
tempdatra = data[id];
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
if (data[id].AAPrice) {
pricecount = data[id].AAPrice;
}
}
}
});
}
}
};
refreshGirdData = function (temprow) {
var ifnewrow = true;
$.each(tempdatra, function (key, val) {
if (tempdatra[key].ID === temprow.ID) {
tempdatra[key] = temprow;
ifnewrow = false;
}
});
if (ifnewrow) {
tempdatra.push(temprow);
}
//总价计算
pricecount = 0;
//for (var i = 0; i < tempdatra.length; i++) {
// pricecount += tempdatra[i].AAIPrice * tempdatra[i].AAIStock;
//}
//$("#AAPrice").val(pricecount);
$('#TextBookIndentDetail').jfGridSet('refreshdata', tempdatra.sort(sortNumber));
};
function sortNumber(a, b) {
return a.AAIOrder - b.AAIOrder;
}
// 设置表单数据
setFormData = function (processId, param, callback) {
if (!!processId) {
@@ -196,28 +233,32 @@ var bootstrap = function ($, learun) {
}
});
}
callback && callback();
}
// 验证数据是否填写完整
validForm = function () {
if (!$('body').lrValidform()) {
if (!$('.lr-form-wrap').lrValidform()) {
return false;
}
var datas = $('#TextBookIndentDetail').jfGridGet('rowdatas');
if (datas == null || datas.length == 0) {
learun.alert.warning("申请未包含明细!请先新增明细!");
return false;
}
return true;
};
// 保存数据
save = function (processId, callBack, i) {
var formData = $('body').lrGetFormData();
var postData = {};
var formData = $('[data-table="TextBookIndent"]').lrGetFormData();
if (!!processId) {
formData.processId = processId;
}
var postData = {
strEntity: JSON.stringify(formData)
};
postData.strEntity = JSON.stringify(formData);
postData.strTextBookIndentDetailList = JSON.stringify($('#TextBookIndentDetail').jfGridGet('rowdatas'));
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/TextBookIndent/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack(res, i);
callBack(res, formData, i);
}
});
};


+ 23
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/FormDetail.cshtml Voir le fichier

@@ -0,0 +1,23 @@
@{
ViewBag.Title = "TextBookIndentDetail";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">班级<font face="宋体">*</font></div>
<div id="ClassNo" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">教师人数<font face="宋体">*</font></div>
<input id="TeachSum" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">学生人数<font face="宋体">*</font></div>
<input id="StuSum" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</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/TextBookIndent/FormDetail.js")

+ 105
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/FormDetail.js Voir le fichier

@@ -0,0 +1,105 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-02-27 09:35
* 描 述:TextBookIndentDetail
*/
var acceptClick;
var keyValue = request('keyValue');
var selectedRow;
var bootstrap = function ($, learun) {
"use strict";
selectedRow = top["layer_formTextBookIndent"].selectedRow;
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' });
//$("#ID").lrlayerselect({
// dataUrl: top.$.rootUrl + '/EducationalAdministration/TextBookIndent/GetList',
// dataTreeId: 'ID',
// dataValueId: 'ID',
// dataTextId: 'ID',
// grid: [
// {
// label: "班级", name: "ClassNo", width: 100, align: "left",
// formatterAsync: function (callback, value, row, op, $cell) {
// learun.clientdata.getAsync('custmerData', {
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
// key: value,
// keyId: 'classno',
// callback: function (_data) {
// callback(_data['classname']);
// }
// });
// }
// },
// { label: '教师人数', name: 'TeachSum', width: 80, align: 'left' },
// { label: '学生人数', name: 'StuSum', width: 80, align: 'left' },
// { label: '备注', name: 'Remark', width: 100, align: 'left' },
// ],
// select: function (values, texts) {
// if (values && values.length > 0) {
// //绑定
// //$("#AAITId").attr("readonly", "readonly");
// //$("#AAICode").attr("readonly", "readonly");
// //$("#AAIName").attr("readonly", "readonly");
// //$("#AAIUnit").attr("readonly", "readonly");
// //$("#AAIHasDetail").attr("readonly", "readonly");
// $.lrSetForm(top.$.rootUrl + '/TextBookIndentDetail/TextBookIndent/GetFormData?keyValue=' + values[0], function (data) {
// console.log("data" + data.extBookIndentDetailList);
// data = data.extBookIndentDetailList;
// console.log("data" + data)
// $('#ID').lrselectSet(data.IndentId);
// $('#ClassNo').val(data.ClassNo);
// $('#TeachSum').val(data.TeachSum);
// $('#StuSum').lrselectSet(data.StuSum);
// //$('#AAIHasDetail').lrselectSet(data.HasDetail);
// //$('#AAIEName').val(data.AEName);
// //$('#AAIModel').val(data.AModel);
// //$('#AAIManufacturer').val(data.AManufacturer);
// //$('#AAISpecification').val(data.ASpecification);
// });
// }
// },
// unknowselect: function () {
// $('#ID').lrselectSet("");
// $('#ClassNo').val("");
// $('#TeachSum').val("");
// $('#StuSum').lrselectSet("");
// },
// isMultiple: false
//});
},
initData: function () {
if (!!keyValue) {
if (!!selectedRow) {
$('#form').lrSetFormData(selectedRow);
//$("#ID").find('span').text(selectedRow.IndentId);
}
}
}
};
// 保存数据
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();
}

+ 4
- 10
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/FormView.cshtml Voir le fichier

@@ -26,7 +26,7 @@
<div class="col-xs-12 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">所选书籍<font face="宋体">*</font></div>
<input id="TextBookName" type="text" class="form-control" readonly />
@*<div id="" readonly ></div>*@
@*<div id="" readonly></div>*@
</div>
<div class="col-xs-4 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">书籍</div>
@@ -40,15 +40,9 @@
<div class="lr-form-item-title">其他作者</div>
<input id="OtherAuthor" type="text" class="form-control" readonly />
</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="TextBookIndentDetail"></div>
</div>*@
<div class="col-xs-12 lr-form-item lr-form-item-grid">
<div id="TextBookIndentDetail"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height:100px;"></textarea>


+ 29
- 62
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/FormView.js Voir le fichier

@@ -38,53 +38,6 @@ var bootstrap = function ($, learun) {
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
//$("#detailadd").on('click', function () {
// selectedRow = null;
// learun.layerForm({
// id: 'formitem',
// title: '新增明细',
// url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoItemApply/FormJYHC',
// width: 860,
// height: 600,
// callBack: function (id) {
// return top[id].acceptClick(refreshGirdData);
// }
// });
//});
//$("#detailedit").on('click', function () {
// var keyValue = $('#TextBookIndentDetail').jfGridValue('ID');
// selectedRow = $('#TextBookIndentDetail').jfGridGet('rowdata');
// if (learun.checkrow(keyValue)) {
// learun.layerForm({
// id: 'formitem',
// title: '编辑明细',
// url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoItemApply/FormJYHC?keyValue=' + keyValue,
// width: 860,
// height: 600,
// callBack: function (id) {
// return top[id].acceptClick(refreshGirdData);
// }
// });
// }
//});
//$("#detaildel").on('click', function () {
// var keyValue = $('#TextBookIndentDetail').jfGridValue('ID');
// if (learun.checkrow(keyValue)) {
// learun.layerConfirm('是否确认删除该项!', function (res, index) {
// if (res) {
// $.each(tempdatra, function (key, val) {
// if (tempdatra[key].AAIId === keyValue) {
// pricecount -= tempdatra[key].AAIPrice * tempdatra[key].AAIStock;
// tempdatra.splice(key, 1);
// }
// });
// $("#AAPrice").val(pricecount);
// $('#TextBookIndentDetail').jfGridSet('refreshdata', tempdatra.sort(sortNumber));
// top.layer.close(index);
// }
// });
// }
//});
page.bind();
page.initData();
},
@@ -107,10 +60,29 @@ var bootstrap = function ($, learun) {
value: 'value',
text: 'text'
});
$('#Status').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);
$('#TextBookIndentDetail').jfGrid({
headData: [
{
label: "班级", name: "ClassNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
key: value,
keyId: 'classno',
callback: function (_data) {
callback(_data['classname']);
}
});
}
},
{ label: '教师人数', name: 'TeachSum', width: 80, align: 'left' },
{ label: '学生人数', name: 'StuSum', width: 80, align: 'left' },
{ label: '备注', name: 'Remark', width: 100, align: 'left' },
],
height: 400,
mainId: 'ID,IndentID',
reloadSelected: false,
});
},
initData: function () {
if (!!keyValue) {
@@ -155,19 +127,14 @@ var bootstrap = function ($, learun) {
};
// 保存数据
save = function (processId, callBack, i) {
var formData = $('body').lrGetFormData();
var formData = {};
var res = {};
res.code = 200;
if (!!processId) {
formData.processId = processId;
formData.AAProcessId = processId;
}
var postData = {
strEntity: JSON.stringify(formData)
};
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/TextBookIndent/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack(res, i);
}
});
callBack(res, i);
};

page.init();
}

+ 11
- 17
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/Index.js Voir le fichier

@@ -49,6 +49,7 @@ var bootstrap = function ($, learun) {
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' });
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorname', text: 'majorname' });
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
$('#ClassNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
$('#AcademicYearNo').lrselect({
placeholder: "请选择学年",
allowSearch: true,
@@ -71,19 +72,22 @@ var bootstrap = function ($, learun) {
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
id: 'formTextBookIndent',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/TextBookIndent/Form',
width: 800,
height: 800,
height: 600,
callBack: function (id) {
var res = false;
// 验证数据
res = top[id].validForm();
// 保存数据
if (res) {
processId = learun.newGuid();
res = top[id].save(processId, refreshGirdData);
//processId = learun.newGuid();
//res = top[id].save(processId, refreshGirdData);
res = top[id].save('', function () {
page.search();
});
}
return res;
}
@@ -99,11 +103,11 @@ var bootstrap = function ($, learun) {
return;
}
learun.layerForm({
id: 'form',
id: 'formTextBookIndent',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/TextBookIndent/Form?keyValue=' + keyValue,
width: 800,
height: 800,
height: 600,
callBack: function (id) {
var res = false;
// 验证数据
@@ -173,6 +177,7 @@ var bootstrap = function ($, learun) {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/TextBookIndent/GetPageList',
headData: [
{ label: "主键", name: "ID", width: 200, align: "left" },
{
label: "专业部", name: "DeptNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
@@ -257,17 +262,6 @@ var bootstrap = function ($, learun) {
}
};
refreshGirdData = function () {
//if (!!res) {
// if (res.code == 200) {
//// 发起流程
//var postData = {
// schemeCode: 'TextBookIndent',// 填写流程对应模板编号
// processId: processId,
// level: '1',
//};
//learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) {
// learun.loading(false);
//});
page.search();
};
page.init();


+ 39
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndentDetail/Index.cshtml Voir le fichier

@@ -0,0 +1,39 @@
@{
ViewBag.Title = "TextBookIndentDetail";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout lr-layout-left-center" id="lr_layout">
<div class="lr-layout-left">
<div class="lr-layout-wrap">
<div class="lr-layout-title">树形目录</div>
<div id="tree" class="lr-layout-body"></div>
</div>
</div>
<div class="lr-layout-center">
<div class="lr-layout-wrap">
<div class="lr-layout-title">标题</div>
<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/TextBookIndentDetail/Index.js")

+ 105
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndentDetail/Index.js Voir le fichier

@@ -0,0 +1,105 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-02-27 09:35
* 描 述:TextBookIndentDetail
*/
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 });
});
$('#ClassNo').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/TextBookIndentDetail/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/TextBookIndentDetail/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/TextBookIndentDetail/DeleteForm', { keyValue: keyValue}, function () {
});
}
});
}
});
},
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/TextBookIndentDetail/GetPageList',
headData: [
{ label: 'ID', name: 'ID', width: 200, align: "left" },
{ label: 'IndentId', name: 'IndentId', width: 200, align: "left" },
{ label: 'DeptNo', name: 'DeptNo', width: 200, align: "left" },
{ label: 'MajorNo', name: 'MajorNo', width: 200, align: "left" },
{ label: 'ClassNo', name: 'ClassNo', width: 200, align: "left" },
{ label: 'TeachSum', name: 'TeachSum', width: 200, align: "left" },
{ label: 'StuSum', name: 'StuSum', width: 200, align: "left" },
{ label: 'Price', name: 'Price', width: 200, align: "left" },
{ label: 'BookNo', name: 'BookNo', width: 200, align: "left" },
{ label: 'BooName', name: 'BooName', width: 200, align: "left" },
{ label: '出版号', name: 'PublishNo', width: 200, align: "left" },
{ label: 'Remark', name: 'Remark', width: 200, align: "left" },
{ label: 'CreateTime', name: 'CreateTime', width: 200, align: "left" },
{ label: 'CreateUserID', name: 'CreateUserID', width: 200, align: "left" },
{ label: 'LessonNo', name: 'LessonNo', 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();
}

+ 6
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Voir le fichier

@@ -838,6 +838,7 @@
<Compile Include="Areas\PersonnelManagement\Controllers\FD_BudgetFileController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookInfoController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookIndentController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookIndentDetailController.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" />
@@ -1170,6 +1171,7 @@
<Content Include="Areas\EducationalAdministration\Views\TeachingPlan\FormManageView.js" />
<Content Include="Areas\EducationalAdministration\Views\TeachingPlan\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\TeachingPlan\IndexManage.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIndent\FormDetail.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIndent\FormView.js" />
<Content Include="Areas\EducationalAdministration\Views\Thermography\IndexResult.js" />
<Content Include="Areas\EducationalAdministration\Views\Thermography\StatisticIndex.js" />
@@ -6648,6 +6650,8 @@
<Content Include="Areas\EducationalAdministration\Views\TextBookIndent\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIndent\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIndent\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIndentDetail\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIndentDetail\Index.js" />
</ItemGroup>
<ItemGroup>
<Folder Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElectivePre\" />
@@ -7565,7 +7569,6 @@
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\FormMajor.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuInfoBasic\FormTran.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuVolunteer\MajorIndex.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIndent\FormView.cshtml" />
<Content Include="Areas\LR_SystemModule\Views\Log\ApiIndex.cshtml" />
<Content Include="Areas\LogisticsManagement\Views\Accommodation\Allocation.cshtml" />
<Content Include="Areas\LogisticsManagement\Views\Accommodation\Corridor.cshtml" />
@@ -7584,6 +7587,8 @@
<Content Include="Areas\LogisticsManagement\Views\Accommodation\IndexDistribution.cshtml" />
<Content Include="Areas\LogisticsManagement\Views\Accommodation\Room.cshtml" />
<Content Include="Areas\LogisticsManagement\Views\Accommodation\Unit.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIndent\FormDetail.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIndent\FormView.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/TextBookIndentDetailMap.cs Voir le fichier

@@ -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-02-27 09:35
/// 描 述:TextBookIndentDetail
/// </summary>
public class TextBookIndentDetailMap : EntityTypeConfiguration<TextBookIndentDetailEntity>
{
public TextBookIndentDetailMap()
{
#region 表、主键
//表
this.ToTable("TEXTBOOKINDENTDETAIL");
//主键
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 Voir le fichier

@@ -592,6 +592,7 @@
<Compile Include="PersonnelManagement\FD_BudgetFileMap.cs" />
<Compile Include="EducationalAdministration\TextBookInfoMap.cs" />
<Compile Include="EducationalAdministration\TextBookIndentMap.cs" />
<Compile Include="EducationalAdministration\TextBookIndentDetailMap.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


+ 25
- 3
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndent/TextBookIndentBLL.cs Voir le fichier

@@ -91,6 +91,29 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

/// <summary>
/// 获取Ass_AssetsInfoItemApply表数据
/// <summary>
/// <returns></returns>
public IEnumerable<TextBookIndentDetailEntity> TextBookIndentDetailList(string keyValue)
{
try
{
return textBookIndentService.TextBookIndentDetailList(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

#region 提交数据
@@ -123,11 +146,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, TextBookIndentEntity entity)
public void SaveEntity(string keyValue, TextBookIndentEntity entity,List<TextBookIndentDetailEntity> textbookIndentDateil)
{
try
{
textBookIndentService.SaveEntity(keyValue, entity);
textBookIndentService.SaveEntity(keyValue, entity, textbookIndentDateil);
}
catch (Exception ex)
{
@@ -141,7 +164,6 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
}

/// <summary>
/// 修改审核状态
/// </summary>


+ 4
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndent/TextBookIndentIBLL.cs Voir le fichier

@@ -34,6 +34,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="processId">流程实例ID</param>
/// <returns></returns>
TextBookIndentEntity GetEntityByProcessId(string processId);

IEnumerable <TextBookIndentDetailEntity> TextBookIndentDetailList(string keyValue);

#endregion

#region 提交数据
@@ -48,7 +51,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, TextBookIndentEntity entity);
void SaveEntity(string keyValue, TextBookIndentEntity entity, List<TextBookIndentDetailEntity> textBookIndentDatail);

/// <summary>
/// 提交审核


+ 49
- 4
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndent/TextBookIndentService.cs Voir le fichier

@@ -5,6 +5,7 @@ using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
using Learun.Application.TwoDevelopment.AssetManagementSystem;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
@@ -136,6 +137,29 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

/// <summary>
/// 获取Ass_AssetsInfoApply表实体数据
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public IEnumerable<TextBookIndentDetailEntity> TextBookIndentDetailList(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindList<TextBookIndentDetailEntity>(t=>t.IndentId==keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

#region 提交数据
@@ -146,12 +170,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
this.BaseRepository("CollegeMIS").Delete<TextBookIndentEntity>(t => t.ID == keyValue);
db.Delete<TextBookIndentDetailEntity>(t => t.IndentId == keyValue);
db.Delete<TextBookIndentEntity>(t => t.ID == keyValue);
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
@@ -161,6 +189,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
throw ExceptionEx.ThrowServiceException(ex);
}
}

}

/// <summary>
@@ -169,23 +198,39 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
public void SaveEntity(string keyValue, TextBookIndentEntity entity)
public void SaveEntity(string keyValue, TextBookIndentEntity entity, List<TextBookIndentDetailEntity> textbookIndentDateil)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
db.Update(entity);
db.Delete<TextBookIndentDetailEntity>(t => t.IndentId == keyValue);
foreach (TextBookIndentDetailEntity item in textbookIndentDateil)
{
item.Create();
item.IndentId = keyValue;
db.Insert(item);
}
}
else
{
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
db.Insert(entity);
foreach (TextBookIndentDetailEntity item in textbookIndentDateil)
{
item.Create();
item.IndentId = entity.ID;
db.Insert(item);
}
}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;


+ 149
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndentDetail/TextBookIndentDetailBLL.cs Voir le fichier

@@ -0,0 +1,149 @@
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-02-27 09:35
/// 描 述:TextBookIndentDetail
/// </summary>
public class TextBookIndentDetailBLL : TextBookIndentDetailIBLL
{
private TextBookIndentDetailService textBookIndentDetailService = new TextBookIndentDetailService();
private TextBookIndentService textBookIndentService = new TextBookIndentService();
#region 获取数据

/// <summary>
/// 获取列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<TextBookIndentDetailEntity> GetList( string queryJson )
{
try
{
return textBookIndentDetailService.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<TextBookIndentDetailEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return textBookIndentDetailService.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 TextBookIndentDetailEntity GetEntity(string keyValue)
{
try
{
return textBookIndentDetailService.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
{
textBookIndentDetailService.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, TextBookIndentDetailEntity entity)
{
try
{
textBookIndentDetailService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}
}

+ 128
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndentDetail/TextBookIndentDetailEntity.cs Voir le fichier

@@ -0,0 +1,128 @@
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-02-27 09:35
/// 描 述:TextBookIndentDetail
/// </summary>
public class TextBookIndentDetailEntity
{
#region 实体成员
/// <summary>
/// ID
/// </summary>
/// <returns></returns>
[Column("ID")]
public string ID { get; set; }
/// <summary>
/// IndentId
/// </summary>
/// <returns></returns>
[Column("INDENTID")]
public string IndentId { get; set; }
/// <summary>
/// DeptNo
/// </summary>
/// <returns></returns>
[Column("DEPTNO")]
public string DeptNo { get; set; }
/// <summary>
/// MajorNo
/// </summary>
/// <returns></returns>
[Column("MAJORNO")]
public string MajorNo { get; set; }
/// <summary>
/// ClassNo
/// </summary>
/// <returns></returns>
[Column("CLASSNO")]
public string ClassNo { get; set; }
/// <summary>
/// TeachSum
/// </summary>
/// <returns></returns>
[Column("TEACHSUM")]
public string TeachSum { get; set; }
/// <summary>
/// StuSum
/// </summary>
/// <returns></returns>
[Column("STUSUM")]
public string StuSum { get; set; }
/// <summary>
/// Price
/// </summary>
/// <returns></returns>
[Column("PRICE")]
public string Price { get; set; }
/// <summary>
/// BookNo
/// </summary>
/// <returns></returns>
[Column("BOOKNO")]
public string BookNo { get; set; }
/// <summary>
/// BooName
/// </summary>
/// <returns></returns>
[Column("BOONAME")]
public string BooName { get; set; }
/// <summary>
/// 出版号
/// </summary>
/// <returns></returns>
[Column("PUBLISHNO")]
public string PublishNo { get; set; }
/// <summary>
/// Remark
/// </summary>
/// <returns></returns>
[Column("REMARK")]
public string Remark { get; set; }
/// <summary>
/// CreateTime
/// </summary>
/// <returns></returns>
[Column("CREATETIME")]
public DateTime? CreateTime { get; set; }
/// <summary>
/// CreateUserID
/// </summary>
/// <returns></returns>
[Column("CREATEUSERID")]
public string CreateUserID { get; set; }
/// <summary>
/// LessonNo
/// </summary>
/// <returns></returns>
[Column("LESSONNO")]
public string LessonNo { 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
}
}


+ 56
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndentDetail/TextBookIndentDetailIBLL.cs Voir le fichier

@@ -0,0 +1,56 @@
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-02-27 09:35
/// 描 述:TextBookIndentDetail
/// </summary>
public interface TextBookIndentDetailIBLL
{
#region 获取数据

/// <summary>
/// 获取列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<TextBookIndentDetailEntity> GetList( string queryJson );
/// <summary>
/// 获取列表分页数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<TextBookIndentDetailEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
TextBookIndentDetailEntity 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, TextBookIndentDetailEntity entity);
#endregion

}
}

+ 199
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndentDetail/TextBookIndentDetailService.cs Voir le fichier

@@ -0,0 +1,199 @@
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-02-27 09:35
/// 描 述:TextBookIndentDetail
/// </summary>
public class TextBookIndentDetailService : RepositoryFactory
{
#region 构造函数和属性

private string fieldSql;
/// <summary>
/// 构造方法
/// </summary>
public TextBookIndentDetailService()
{
fieldSql = @"
t.ID,
t.IndentId,
t.DeptNo,
t.MajorNo,
t.ClassNo,
t.TeachSum,
t.StuSum,
t.Price,
t.BookNo,
t.BooName,
t.PublishNo,
t.Remark,
t.CreateTime,
t.CreateUserID,
t.LessonNo
";
}
#endregion

#region 获取数据

/// <summary>
/// 获取列表数据
/// </summary>
/// <param name="queryJson">条件参数</param>
/// <returns></returns>
public IEnumerable<TextBookIndentDetailEntity> 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 TextBookIndentDetail t ");
return this.BaseRepository("CollegeMIS").FindList<TextBookIndentDetailEntity>(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<TextBookIndentDetailEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(fieldSql);
strSql.Append(" FROM TextBookIndentDetail t ");
return this.BaseRepository("CollegeMIS").FindList<TextBookIndentDetailEntity>(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 TextBookIndentDetailEntity GetEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<TextBookIndentDetailEntity>(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<TextBookIndentDetailEntity>(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, TextBookIndentDetailEntity 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 Voir le fichier

@@ -1798,6 +1798,10 @@
<Compile Include="EducationalAdministration\TextBookIndent\TextBookIndentService.cs" />
<Compile Include="EducationalAdministration\TextBookIndent\TextBookIndentBLL.cs" />
<Compile Include="EducationalAdministration\TextBookIndent\TextBookIndentIBLL.cs" />
<Compile Include="EducationalAdministration\TextBookIndentDetail\TextBookIndentDetailEntity.cs" />
<Compile Include="EducationalAdministration\TextBookIndentDetail\TextBookIndentDetailService.cs" />
<Compile Include="EducationalAdministration\TextBookIndentDetail\TextBookIndentDetailIBLL.cs" />
<Compile Include="EducationalAdministration\TextBookIndentDetail\TextBookIndentDetailBLL.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


Chargement…
Annuler
Enregistrer