Просмотр исходного кода

教材入库 :教材订单管理功能

临城职教中职
ndbs 2 лет назад
Родитель
Сommit
c791bff74f
19 измененных файлов: 1791 добавлений и 2 удалений
  1. +161
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookIndentController.cs
  2. +68
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/Form.cshtml
  3. +225
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/Form.js
  4. +69
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/FormView.cshtml
  5. +173
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/FormView.js
  6. +60
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/Index.cshtml
  7. +274
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/Index.js
  8. +39
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndentDetail/Form.cshtml
  9. +12
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  10. +4
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config
  11. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextBookIndentMap.cs
  12. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  13. +195
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndent/TextBookIndentBLL.cs
  14. +120
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndent/TextBookIndentEntity.cs
  15. +72
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndent/TextBookIndentIBLL.cs
  16. +251
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndent/TextBookIndentService.cs
  17. +8
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
  18. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj
  19. +28
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/TextBookIndentMethod.cs

+ 161
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookIndentController.cs Просмотреть файл

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

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-02-18 14:27
/// 描 述:教材订单管理
/// </summary>
public class TextBookIndentController : MvcControllerBase
{
private TextBookIndentIBLL textBookIndentIBLL = new TextBookIndentBLL();

#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 FormView()
{
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 = textBookIndentIBLL.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 TextBookIndentData = textBookIndentIBLL.GetTextBookIndentEntity(keyValue);
var jsonData = new
{
TextBookIndent = TextBookIndentData,
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="processId">流程实例主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormDataByProcessId(string processId)
{
var TextBookIndentData = textBookIndentIBLL.GetEntityByProcessId(processId);
var jsonData = new
{
TextBookIndent = TextBookIndentData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
textBookIndentIBLL.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)
{
TextBookIndentEntity entity = strEntity.ToObject<TextBookIndentEntity>();
textBookIndentIBLL.SaveEntity(keyValue, entity);
if (string.IsNullOrEmpty(keyValue))
{
}
return Success("保存成功!");
}
#endregion

#region 扩展数据
/// <summary>
/// 提交订单
/// </summary>
/// <param name="keyValue"></param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult ModifyStatus(string keyValue, string processId)
{
textBookIndentIBLL.ModifyStatus(keyValue, processId);
return Success("操作成功!");
}
#endregion

}
}

+ 68
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/Form.cshtml Просмотреть файл

@@ -0,0 +1,68 @@
@{
ViewBag.Title = "教材订单管理";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<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>
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">专业<font face="宋体">*</font></div>
<div id="MajorNo" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-4 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">课程<font face="宋体">*</font></div>
<div id="LessonNo" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-4 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">学年<font face="宋体">*</font></div>
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-4 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">学期<font face="宋体">*</font></div>
<div id="Semester" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">所选书籍<font face="宋体">*</font></div>
<div id="TextBookName" isvalid="yes" checkexpession="NotNull"></div>
</div>
<div class="col-xs-4 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">书籍</div>
<input id="PublishNo" type="text" class="form-control" readonly />
</div>
<div class="col-xs-4 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">作者</div>
<input id="FirstAuthor" type="text" class="form-control" readonly />
</div>
<div class="col-xs-4 lr-form-item" data-table="TextBookIndent">
<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>
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookIndent" style="display: none; ">
<div class="lr-form-item-title">当前信息</div>
<input id="CreateTime" type="text" readonly class="form-control currentInfo lr-currentInfo-time" />
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookIndent" style="display: none; ">
<div class="lr-form-item-title">当前信息</div>
<input id="CreateUserID" type="text" readonly class="form-control currentInfo lr-currentInfo-user" />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookIndent" style="display: none; ">
<div class="lr-form-item-title">状态</div>
<input id="Status" type="text" class="form-control" />
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookIndent/Form.js")

+ 225
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/Form.js Просмотреть файл

@@ -0,0 +1,225 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-02-18 14:27
* 描 述:教材订单管理
*/
var acceptClick;
var keyValue = request('keyValue');
// 设置权限
var setAuthorize;
// 设置表单数据
var setFormData;
// 验证数据是否填写完整
var validForm;
// 保存数据
var save;
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);
// }
// });
// }
//});
page.bind();
page.initData();
},
bind: function () {
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' });
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorname', text: 'majorname' });
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
$('#AcademicYearNo').lrselect({
placeholder: "请选择学年",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text'
});
//学期
$('#Semester').lrselect({
placeholder: "请选择学年",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text'
});
$('#TextBookName').lrGirdSelect({
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=TextBookInfo',
param: { strWhere: " IsDel = '0' and IsValid ='true' " },
height: 800,
width: 1100,
selectWord: 'textbookname',
value: 'textbookname',
text: 'textbookname',
headData:
[
{ label: "教材号", name: "publishno", width: 150, align: "left" },
{ label: "教材名称", name: "textbookname", width: 150, align: "left" },
{ label: "作者", name: "firstauthor", width: 150, align: "left" },
{ label: "其他作者", name: "otherauthor", width: 100, align: "left" },
{ label: "出版社", name: "publisher", width: 100, align: "left" },
{
label: "教材类型", name: "textbooktype", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'TextBookType',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{
label: "教材性质", name: "textbooknature", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'TextBookNature',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{ label: "价格", name: "price", width: 50, align: "left" },
{ label: "版次", name: "edition", width: 100, align: "left" },
{ label: "印次", name: "impression", width: 100, align: "left" },
],
select: function (item) {
console.log(item, 123123);
////赋值
$("#PublishNo").val(item.publishno);
$("#FirstAuthor").val(item.firstauthor);
$("#TextBookName").val(item.textbookname);
$("#OtherAuthor").val(item.otherauthor);
}
});
$('#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);
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookIndent/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]);
}
}
});
}
}
};
// 设置表单数据
setFormData = function (processId, param, callback) {
if (!!processId) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookIndent/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 == 'TextBookIndent' && data[id]) {
keyValue = data[id].ID;
}
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
callback && callback();
}
// 验证数据是否填写完整
validForm = function () {
if (!$('body').lrValidform()) {
return false;
}
return true;
};
// 保存数据
save = function (processId, callBack, i) {
var formData = $('body').lrGetFormData();
if (!!processId) {
formData.processId = processId;
}
var postData = {
strEntity: JSON.stringify(formData)
};
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/TextBookIndent/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack(res, i);
}
});
};
page.init();
}

+ 69
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/FormView.cshtml Просмотреть файл

@@ -0,0 +1,69 @@
@{
ViewBag.Title = "教材订单管理";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<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" readonly></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">专业<font face="宋体">*</font></div>
<div id="MajorNo" isvalid="yes" checkexpession="NotNull" readonly></div>
</div>
<div class="col-xs-4 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">课程<font face="宋体">*</font></div>
<div id="LessonNo" isvalid="yes" checkexpession="NotNull" readonly></div>
</div>
<div class="col-xs-4 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">学年<font face="宋体">*</font></div>
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull" readonly></div>
</div>
<div class="col-xs-4 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">学期<font face="宋体">*</font></div>
<div id="Semester" isvalid="yes" checkexpession="NotNull" readonly></div>
</div>
<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>
<div class="col-xs-4 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">书籍</div>
<input id="PublishNo" type="text" class="form-control" readonly />
</div>
<div class="col-xs-4 lr-form-item" data-table="TextBookIndent">
<div class="lr-form-item-title">作者</div>
<input id="FirstAuthor" type="text" class="form-control" readonly />
</div>
<div class="col-xs-4 lr-form-item" data-table="TextBookIndent">
<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>
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookIndent" style="display: none; ">
<div class="lr-form-item-title">当前信息</div>
<input id="CreateTime" type="text" readonly class="form-control currentInfo lr-currentInfo-time" />
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookIndent" style="display: none; ">
<div class="lr-form-item-title">当前信息</div>
<input id="CreateUserID" type="text" readonly class="form-control currentInfo lr-currentInfo-user" />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookIndent" style="display: none; ">
<div class="lr-form-item-title">状态</div>
<input id="Status" type="text" class="form-control" />
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookIndent/FormView.js")

+ 173
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/FormView.js Просмотреть файл

@@ -0,0 +1,173 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-02-18 14:27
* 描 述:教材订单管理
*/
var acceptClick;
var keyValue = request('keyValue');
// 设置权限
var setAuthorize;
// 设置表单数据
var setFormData;
// 验证数据是否填写完整
var validForm;
// 保存数据
var save;
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);
// }
// });
// }
//});
page.bind();
page.initData();
},
bind: function () {
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' });
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorname', text: 'majorname' });
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
$('#AcademicYearNo').lrselect({
placeholder: "请选择学年",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text'
});
//学期
$('#Semester').lrselect({
placeholder: "请选择学年",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
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);
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookIndent/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]);
}
}
});
}
}
};
// 设置表单数据
setFormData = function (processId, param, callback) {
if (!!processId) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookIndent/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 == 'TextBookIndent' && data[id]) {
keyValue = data[id].ID;
}
$('[data-table="' + id + '"]').lrSetFormData(data[id]);
}
}
});
}
callback && callback();
}
// 验证数据是否填写完整
validForm = function () {
if (!$('body').lrValidform()) {
return false;
}
return true;
};
// 保存数据
save = function (processId, callBack, i) {
var formData = $('body').lrGetFormData();
if (!!processId) {
formData.processId = processId;
}
var postData = {
strEntity: JSON.stringify(formData)
};
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/TextBookIndent/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack(res, i);
}
});
};
page.init();
}

+ 60
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/Index.cshtml Просмотреть файл

@@ -0,0 +1,60 @@
@{
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="datesearch"></div>
</div>
<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>
<div id="DeptNo"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">专业</div>
<div id="MajorNo"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">课程</div>
<div id="LessonNo"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">学年</div>
<div id="AcademicYearNo"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">学期</div>
<div id="Semester"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">书籍</div>
<input id="PublishNo" 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_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>
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp; 提交</a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookIndent/Index.js")

+ 274
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIndent/Index.js Просмотреть файл

@@ -0,0 +1,274 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-02-18 14:27
* 描 述:教材订单管理
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var startTime;
var endTime;
var processId = '';
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
// 时间搜索框
$('#datesearch').lrdate({
dfdata: [
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }
],
// 月
mShow: false,
premShow: false,
// 季度
jShow: false,
prejShow: false,
// 年
ysShow: false,
yxShow: false,
preyShow: false,
yShow: false,
// 默认
dfvalue: '1',
selectfn: function (begin, end) {
startTime = begin;
endTime = end;
page.search();
}
});
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' });
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorname', text: 'majorname' });
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
$('#AcademicYearNo').lrselect({
placeholder: "请选择学年",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text'
});
//学期
$('#Semester').lrselect({
placeholder: "请选择学年",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text'
});
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/TextBookIndent/Form',
width: 800,
height: 800,
callBack: function (id) {
var res = false;
// 验证数据
res = top[id].validForm();
// 保存数据
if (res) {
processId = learun.newGuid();
res = top[id].save(processId, refreshGirdData);
}
return res;
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status != 0) {
learun.alert.warning("当前项目已提交,不可编辑!");
return;
}
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/TextBookIndent/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;
}
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
var Status = $('#gridtable').jfGridValue('Status');
if (Status != 0) {
learun.alert.warning("当前项目已提交,不可删除!");
return;
}
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/TextBookIndent/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
//  提交
$('#lr_submit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('ID');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status != 0) {
learun.alert.warning("当前项目已提交,请耐心等待审批!");
return;
}
learun.layerConfirm('是否确认提交该项!', function (res) {
if (res) {
processId = learun.newGuid();
learun.postForm(top.$.rootUrl + '/EducationalAdministration/TextBookIndent/ModifyStatus', { keyValue: keyValue, processId: processId }, function (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);
});
}
refreshGirdData();
});
}
});
}
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/TextBookIndent/GetPageList',
headData: [
{
label: "专业部", name: "DeptNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
key: value,
keyId: 'deptno',
callback: function (_data) {
callback(_data['deptname']);
}
});
}
},
{
label: "专业", name: "MajorNo", width: 120, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
key: value,
keyId: 'majorname',
callback: function (_data) {
callback(_data['majorname']);
}
});
}
},
{
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: "AcademicYearNo", width: 100, align: "left" },
{ label: "学期", name: "Semester", width: 100, align: "left" },
{ label: "所选书籍", name: "TextBookName", width: 200, align: "left" },
{ label: "书籍编码", name: "PublishNo", width: 150, align: "left" },
{ label: "作者", name: "FirstAuthor", width: 100, align: "left" },
{ label: "其他作者", name: "OtherAuthor", width: 200, align: "left" },
{ label: "备注", name: "Remark", width: 200, align: "left" },
{ label: "录入时间", name: "CreateTime", width: 100, align: "left" },
{
label: "当前用户", name: "CreateUserID", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('user', {
key: value,
callback: function (_data) {
callback(_data.name);
}
});
}
},
{
label: "状态", name: "Status", width: 100, align: "left",
formatter: function (cellvalue) {
if (cellvalue == '0') {
return '<span class=\"label label-success\">草稿</span>';
} else if (cellvalue == '1') {
return '<span class=\"label label-danger\">审批中</span>';
} else if (cellvalue == '2') {
return '<span class=\"label label-info\">审批通过</span>';
}
}
},
],
mainId: 'ID',
sidx: 'CreateTime desc,Status desc',
isPage: true
});
},
search: function (param) {
param = param || {};
param.StartTime = startTime;
param.EndTime = endTime;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
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/Form.cshtml Просмотреть файл

@@ -0,0 +1,39 @@
@{
ViewBag.Title = "教材订单明细";
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">ID<font face="宋体">*</font></div>
<input id="ID" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">IndentId<font face="宋体">*</font></div>
<input id="IndentId" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">DeptNo<font face="宋体">*</font></div>
<input id="DeptNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">MajorNo<font face="宋体">*</font></div>
<input id="MajorNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">ClassNo<font face="宋体">*</font></div>
<input id="ClassNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">TeachSum<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">StuSum<font face="宋体">*</font></div>
<input id="StuSum" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">Remark<font face="宋体">*</font></div>
<input id="Remark" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookIndentDetail/Form.js")

+ 12
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Просмотреть файл

@@ -837,6 +837,8 @@
<Compile Include="Areas\LogisticsManagement\Controllers\ProjectProcessManageController.cs" />
<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" />
@@ -1169,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\FormView.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" />
@@ -6636,6 +6639,14 @@
<Content Include="Areas\EducationalAdministration\Views\TextBookInfo\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookInfo\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookInfo\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIndent\Index.cshtml" />
<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" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIndentDetail\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookIndentDetail\Form.js" />
</ItemGroup>
<ItemGroup>
<Folder Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElectivePre\" />
@@ -7560,6 +7571,7 @@
<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" />
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" />


+ 4
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config Просмотреть файл

@@ -30,7 +30,8 @@
<typeAlias alias="MeetingManagementApplyMethod" type="Learun.Application.WorkFlow.MeetingManagementApplyMethod,Learun.Application.WorkFlow" />
<typeAlias alias="FD_PayManageMethod" type="Learun.Application.WorkFlow.FD_PayManageMethod,Learun.Application.WorkFlow" />
<typeAlias alias="TeacherLeaveManagementMethod" type="Learun.Application.WorkFlow.TeacherLeaveManagementMethod,Learun.Application.WorkFlow" />

<typeAlias alias="TextBookIndentMethod" type="Learun.Application.WorkFlow.TextBookIndentMethod,Learun.Application.WorkFlow" />
<!--任务调度器-->
<typeAlias alias="ITSMethod" type="Learun.Application.Extention.TaskScheduling.ITsMethod,Learun.Application.Extention" />
<!--<typeAlias alias="TestTask" type="Learun.Plugin.TestTask,Learun.Plugin" />-->
@@ -70,7 +71,8 @@
<type type="IWorkFlowMethod" mapTo="MeetingManagementApplyMethod" name="MeetingManagementApplyMethod"></type>
<type type="IWorkFlowMethod" mapTo="FD_PayManageMethod" name="FD_PayManageMethod"></type>
<type type="IWorkFlowMethod" mapTo="TeacherLeaveManagementMethod" name="TeacherLeaveManagementMethod"></type>

<type type="IWorkFlowMethod" mapTo="TextBookIndentMethod" name="TextBookIndentMethod"></type>
</container>

<container name="TsIOCcontainer">


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextBookIndentMap.cs Просмотреть файл

@@ -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-18 14:27
/// 描 述:教材订单管理
/// </summary>
public class TextBookIndentMap : EntityTypeConfiguration<TextBookIndentEntity>
{
public TextBookIndentMap()
{
#region 表、主键
//表
this.ToTable("TEXTBOOKINDENT");
//主键
this.HasKey(t => t.ID);
#endregion

#region 配置关系
#endregion
}
}
}


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj Просмотреть файл

@@ -591,6 +591,8 @@
<Compile Include="LogisticsManagement\ProjectProcessManageMap.cs" />
<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">


+ 195
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndent/TextBookIndentBLL.cs Просмотреть файл

@@ -0,0 +1,195 @@
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-18 14:27
/// 描 述:教材订单管理
/// </summary>
public class TextBookIndentBLL : TextBookIndentIBLL
{
private TextBookIndentService textBookIndentService = new TextBookIndentService();

#region 获取数据

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

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

/// <summary>
/// 获取主表实体数据
/// </summary>
/// <param name="processId">流程实例ID</param>
/// <returns></returns>
public TextBookIndentEntity GetEntityByProcessId(string processId)
{
try
{
return textBookIndentService.GetEntityByProcessId(processId);
}
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
{
textBookIndentService.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, TextBookIndentEntity entity)
{
try
{
textBookIndentService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 修改审核状态
/// </summary>
/// <param name="pastatus"></param>
/// <param name="processId"></param>
public void ModifyStatus(string keyValue, string processId)
{
try
{
textBookIndentService.ModifyStatus(keyValue, processId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 修改审核状态
/// </summary>
/// <param name="pastatus"></param>
/// <param name="processId"></param>
public void ChangeStatusByProcessId(int pastatus, string processId)
{
try
{
textBookIndentService.ChangeStatusByProcessId(pastatus, processId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

}
}

+ 120
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndent/TextBookIndentEntity.cs Просмотреть файл

@@ -0,0 +1,120 @@
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-18 14:27
/// 描 述:教材订单管理
/// </summary>
public class TextBookIndentEntity
{
#region 实体成员
/// <summary>
/// 主键
/// </summary>
[Column("ID")]
public string ID { get; set; }
/// <summary>
/// 专业部
/// </summary>
[Column("DEPTNO")]
public string DeptNo { get; set; }
/// <summary>
/// 专业
/// </summary>
[Column("MAJORNO")]
public string MajorNo { get; set; }
/// <summary>
/// 课程
/// </summary>
[Column("LESSONNO")]
public string LessonNo { get; set; }
/// <summary>
/// 学年
/// </summary>
[Column("ACADEMICYEARNO")]
public string AcademicYearNo { get; set; }
/// <summary>
/// 学期
/// </summary>
[Column("SEMESTER")]
public string Semester { get; set; }
/// <summary>
/// CreateTime
/// </summary>
[Column("CREATETIME")]
public DateTime? CreateTime { get; set; }
/// <summary>
/// CreateUserID
/// </summary>
[Column("CREATEUSERID")]
public string CreateUserID { get; set; }
/// <summary>
/// 出版号
/// </summary>
[Column("PUBLISHNO")]
public string PublishNo { 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>
/// Remark
/// </summary>
[Column("REMARK")]
public string Remark { get; set; }
/// <summary>
/// Status
/// </summary>
[Column("STATUS")]
public int? Status { get; set; }
/// <summary>
/// processId
/// </summary>
[Column("PROCESSID")]
public string processId { get; set; }
/// <summary>
/// ClassSum
/// </summary>
[Column("CLASSSUM")]
public string ClassSum { 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
}
}


+ 72
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndent/TextBookIndentIBLL.cs Просмотреть файл

@@ -0,0 +1,72 @@
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-18 14:27
/// 描 述:教材订单管理
/// </summary>
public interface TextBookIndentIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<TextBookIndentEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取TextBookIndent表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
TextBookIndentEntity GetTextBookIndentEntity(string keyValue);
/// <summary>
/// 获取主表实体数据
/// </summary>
/// <param name="processId">流程实例ID</param>
/// <returns></returns>
TextBookIndentEntity GetEntityByProcessId(string processId);
#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, TextBookIndentEntity entity);

/// <summary>
/// 提交审核
/// </summary>
/// <param name="keyValue"></param>
/// <param name="pastatus"></param>
/// <param name="processId"></param>
void ModifyStatus(string keyValue, string processId);

/// <summary>
/// 修改审核状态
/// </summary>
/// <param name="pastatus"></param>
/// <param name="processId"></param>
void ChangeStatusByProcessId(int pastatus, string processId);


#endregion

}
}

+ 251
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndent/TextBookIndentService.cs Просмотреть файл

@@ -0,0 +1,251 @@
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-18 14:27
/// 描 述:教材订单管理
/// </summary>
public class TextBookIndentService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<TextBookIndentEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@" * ");
strSql.Append(" FROM TextBookIndent t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty())
{
dp.Add("startTime", queryParam["StartTime"].ToDate(), DbType.DateTime);
dp.Add("endTime", queryParam["EndTime"].ToDate(), DbType.DateTime);
strSql.Append(" AND ( t.CreateTime >= @startTime AND t.CreateTime <= @endTime ) ");
}
if (!queryParam["DeptNo"].IsEmpty())
{
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String);
strSql.Append(" AND t.DeptNo = @DeptNo ");
}
if (!queryParam["MajorNo"].IsEmpty())
{
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String);
strSql.Append(" AND t.MajorNo = @MajorNo ");
}
if (!queryParam["LessonNo"].IsEmpty())
{
dp.Add("LessonNo", queryParam["LessonNo"].ToString(), DbType.String);
strSql.Append(" AND t.LessonNo = @LessonNo ");
}
if (!queryParam["AcademicYearNo"].IsEmpty())
{
dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String);
strSql.Append(" AND t.AcademicYearNo = @AcademicYearNo ");
}
if (!queryParam["Semester"].IsEmpty())
{
dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String);
strSql.Append(" AND t.Semester = @Semester ");
}
if (!queryParam["PublishNo"].IsEmpty())
{
dp.Add("PublishNo", "%" + queryParam["PublishNo"].ToString() + "%", DbType.String);
strSql.Append(" AND t.PublishNo Like @PublishNo ");
}
return this.BaseRepository("CollegeMIS").FindList<TextBookIndentEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

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

/// <summary>
/// 获取主表实体数据
/// </summary>
/// <param name="processId">流程实例ID</param>
/// <returns></returns>
public TextBookIndentEntity GetEntityByProcessId(string processId)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<TextBookIndentEntity>(t => t.processId == processId);
}
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<TextBookIndentEntity>(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>
/// <returns></returns>
public void SaveEntity(string keyValue, TextBookIndentEntity 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);
}
}
}

public void ModifyStatus(string keyValue, string processId)
{
try
{
var entity = this.BaseRepository("CollegeMIS").FindEntity<TextBookIndentEntity>(a => a.ID == keyValue);
entity.processId = processId;
entity.Status = 1;
this.BaseRepository("CollegeMIS").Update(entity);
}
catch (Exception e)
{
if (e is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(e);
}
}
}

/// <summary>
/// 审批后修改状态
/// </summary>
/// <param name="pastatus"></param>
/// <param name="processId"></param>
public void ChangeStatusByProcessId(int pastatus, string processId)
{
try
{
var entity = this.BaseRepository("CollegeMIS").FindEntity<TextBookIndentEntity>(a => a.processId == processId);
entity.Status = pastatus;
this.BaseRepository("CollegeMIS").Update(entity);
}
catch (Exception e)
{
if (e is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(e);
}
}

}
#endregion

}
}

+ 8
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj Просмотреть файл

@@ -1794,6 +1794,14 @@
<Compile Include="EducationalAdministration\TextBookInfo\TextBookInfoService.cs" />
<Compile Include="EducationalAdministration\TextBookInfo\TextBookInfoBLL.cs" />
<Compile Include="EducationalAdministration\TextBookInfo\TextBookInfoIBLL.cs" />
<Compile Include="EducationalAdministration\TextBookIndent\TextBookIndentEntity.cs" />
<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">


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj Просмотреть файл

@@ -119,6 +119,7 @@
<Compile Include="NodeMethod\Ass_AssetsInfoApplyMethod.cs" />
<Compile Include="NodeMethod\INodeMethod.cs" />
<Compile Include="NodeMethod\NodeMethod.cs" />
<Compile Include="NodeMethod\TextBookIndentMethod.cs" />
<Compile Include="NodeMethod\TeacherLeaveManagementMethod.cs" />
<Compile Include="NodeMethod\WfMethodParameter.cs" />
<Compile Include="NodeMethod\WF\WFFileRelease.cs" />


+ 28
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/TextBookIndentMethod.cs Просмотреть файл

@@ -0,0 +1,28 @@
using Learun.Application.TwoDevelopment.EducationalAdministration;
using Learun.Application.TwoDevelopment.PersonnelManagement;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Learun.Application.WorkFlow
{
public class TextBookIndentMethod : IWorkFlowMethod
{
TextBookIndentIBLL textbookindentManagementIBLL = new TextBookIndentBLL();


public void Execute(WfMethodParameter parameter)
{
if (parameter.code == "agree")
{
textbookindentManagementIBLL.ChangeStatusByProcessId(2, parameter.processId);
}
else
{
textbookindentManagementIBLL.ChangeStatusByProcessId(0, parameter.processId);
}
}
}
}

Загрузка…
Отмена
Сохранить