浏览代码

教材征订基础搭建

怀来职教中心中职
ndbs 1年前
父节点
当前提交
64a6d47e43
共有 16 个文件被更改,包括 1286 次插入0 次删除
  1. +149
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookSubscriptionController.cs
  2. +59
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSubscription/Form.cshtml
  3. +149
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSubscription/Form.js
  4. +56
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSubscription/Index.cshtml
  5. +170
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSubscription/Index.js
  6. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  7. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config
  8. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextBookSubscriptionMap.cs
  9. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  10. +183
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSubscription/TextBookSubscriptionBLL.cs
  11. +144
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSubscription/TextBookSubscriptionEntity.cs
  12. +58
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSubscription/TextBookSubscriptionIBLL.cs
  13. +248
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSubscription/TextBookSubscriptionService.cs
  14. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
  15. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj
  16. +28
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/TextBookSubscriptionMethod.cs

+ 149
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookSubscriptionController.cs 查看文件

@@ -0,0 +1,149 @@
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 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2023-07-04 15:10
/// 描 述:TextBookSubscription
/// </summary>
public class TextBookSubscriptionController : MvcControllerBase
{
private TextBookSubscriptionIBLL textBookSubscriptionIBLL = new TextBookSubscriptionBLL();

#region 视图功能

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

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = textBookSubscriptionIBLL.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 TextBookSubscriptionData = textBookSubscriptionIBLL.GetTextBookSubscriptionEntity(keyValue);
var jsonData = new
{
TextBookSubscription = TextBookSubscriptionData,
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="processId">流程实例主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormDataByProcessId(string processId)
{
var TextBookSubscriptionData = textBookSubscriptionIBLL.GetEntityByProcessId(processId);
var jsonData = new
{
TextBookSubscription = TextBookSubscriptionData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

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

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

}
}

+ 59
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSubscription/Form.cshtml 查看文件

@@ -0,0 +1,59 @@
@{
ViewBag.Title = "TextBookSubscription";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription" >
<div class="lr-form-item-title">学年</div>
<div id="AcademicYearNo" ></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription" >
<div class="lr-form-item-title">学期</div>
<div id="Semester" ></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription" >
<div class="lr-form-item-title">年级</div>
<div id="Grade" ></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription" >
<div class="lr-form-item-title">班级</div>
<div id="ClassNo" ></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription" >
<div class="lr-form-item-title">册数</div>
<input id="BookNumber" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription" >
<div class="lr-form-item-title">资料名称</div>
<input id="DataName" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription" >
<div class="lr-form-item-title">刊号</div>
<input id="ISSN" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription" >
<div class="lr-form-item-title">出版社</div>
<input id="Publisher" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription" >
<div class="lr-form-item-title">作者</div>
<input id="Author" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription" >
<div class="lr-form-item-title">定价</div>
<input id="Pricing" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription" >
<div class="lr-form-item-title">教师册数</div>
<input id="TeachNum" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookSubscription" >
<div class="lr-form-item-title">合计</div>
<input id="Amount" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookSubscription" >
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height:100px;" ></textarea>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookSubscription/Form.js")

+ 149
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSubscription/Form.js 查看文件

@@ -0,0 +1,149 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2023-07-04 15:10
* 描 述:TextBookSubscription
*/
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();
page.bind();
page.initData();
},
bind: function () {
$('#AcademicYearNo').lrselect({
placeholder: "学年",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text',
maxHeight: 200,
});
//学期
$('#Semester').lrselect({
placeholder: "学期",
allowSearch: false,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text'
});
$('#Grade').lrselect({
url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GenerateNearByYear',
value: "value",
text: "text",
select: function (item) {
if (item) {
$('#ClassNo').lrselectRefresh({
allowSearch: true,
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
param: {
strWhere: "CheckMark=1 AND Grade='" + item.text + "' order by classno desc"
}
});
} else {
$('#ClassNo').lrselectRefresh({
allowSearch: true,
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
param: { strWhere: "1=1 AND CheckMark=1 order by classno desc" }
});
}
}
});
$('#ClassNo').lrselect({
allowSearch: true,
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
param: { strWhere: "1=1 AND CheckMark=1 order by classno desc" },
value: "classno",
text: "classname"
});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/TextBookSubscription/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/TextBookSubscription/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 == 'TextBookSubscription' && 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/TextBookSubscription/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack(res, i);
}
});
};
page.init();
}

+ 56
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSubscription/Index.cshtml 查看文件

@@ -0,0 +1,56 @@
@{
ViewBag.Title = "TextBookSubscription";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout " >
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">年级</div>
<div id="Grade"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">班级</div>
<div id="ClassNo"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">资料名称</div>
<input id="DataName" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">刊号</div>
<input id="ISSN" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">出版社</div>
<input id="Publisher" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">作者</div>
<input id="Author" 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>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookSubscription/Index.js")

+ 170
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSubscription/Index.js 查看文件

@@ -0,0 +1,170 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2023-07-04 15:10
* 描 述:TextBookSubscription
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var processId = '';
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 300, 400);
$('#Grade').lrselect({
url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GenerateNearByYear',
value: "value",
text: "text",
select: function (item) {
if (item) {
$('#ClassNo').lrselectRefresh({
allowSearch: true,
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
param: {
strWhere: "CheckMark=1 AND Grade='" + item.text + "' order by classno desc"
}
});
} else {
$('#ClassNo').lrselectRefresh({
allowSearch: true,
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
param: { strWhere: "1=1 AND CheckMark=1 order by classno desc" }
});
}
}
});
$('#ClassNo').lrselect({
allowSearch: true,
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=bjsj',
param: { strWhere: "1=1 AND CheckMark=1 order by classno desc" },
value: "classno",
text: "classname"
});
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
learun.layerForm({
id: 'form',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/TextBookSubscription/Form',
width: 600,
height: 600,
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)) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/TextBookSubscription/Form?keyValue=' + keyValue,
width: 600,
height: 600,
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');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/TextBookSubscription/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/TextBookSubscription/GetPageList',
headData: [
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" },
{ label: "学期", name: "Semester", width: 100, align: "left" },
{ label: "年级", name: "Grade", width: 100, align: "left" },
{
label: "班级", name: "ClassNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: '',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{ label: "册数", name: "BookNumber", width: 100, align: "left" },
{ label: "资料名称", name: "DataName", width: 100, align: "left" },
{ label: "刊号", name: "ISSN", width: 100, align: "left" },
{ label: "出版社", name: "Publisher", width: 100, align: "left" },
{ label: "作者", name: "Author", width: 100, align: "left" },
{ label: "定价", name: "Pricing", width: 100, align: "left" },
{ label: "教师册数", name: "TeachNum", width: 100, align: "left" },
{ label: "合计", name: "Amount", width: 100, align: "left" },
{ label: "备注", name: "Remark", width: 100, align: "left" },
],
mainId: 'ID',
isPage: true
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function (res, postData) {
if (!!res) {
if (res.code == 200) {
// 发起流程
var postData = {
schemeCode: '',// 填写流程对应模板编号
processId: processId,
level: '1',
};
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function (data) {
learun.loading(false);
});
}
page.search();
}
};
page.init();
}

+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj 查看文件

@@ -908,6 +908,7 @@
<Compile Include="Areas\EducationalAdministration\Controllers\StudentPracticeInfoController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\SchulPraktikaInfoController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TeachingCompetitionController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookSubscriptionController.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" />
@@ -7131,6 +7132,10 @@
<Content Include="Areas\EducationalAdministration\Views\TeachingCompetition\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\TeachingCompetition\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TeachingCompetition\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookSubscription\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookSubscription\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookSubscription\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookSubscription\Form.js" />
</ItemGroup>
<ItemGroup>
<Folder Include="Areas\EducationalAdministration\Views\OpenLessonPlanOfElectivePre\" />


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config 查看文件

@@ -31,6 +31,7 @@
<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="TextBookSubscriptionMethod" type="Learun.Application.WorkFlow.TextBookSubscriptionMethod,Learun.Application.WorkFlow" />
<typeAlias alias="StuCancelDisciplineManagementMethod" type="Learun.Application.WorkFlow.StuCancelDisciplineManagementMethod,Learun.Application.WorkFlow" />
<typeAlias alias="StuDisciplineManagementMethod" type="Learun.Application.WorkFlow.StuDisciplineManagementMethod,Learun.Application.WorkFlow" />
<typeAlias alias="StudentCertificateMethod" type="Learun.Application.WorkFlow.StudentCertificateMethod,Learun.Application.WorkFlow" />
@@ -79,6 +80,7 @@
<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>
<type type="IWorkFlowMethod" mapTo="TextBookSubscriptionMethod" name="TextBookSubscriptionMethod"></type>
<type type="IWorkFlowMethod" mapTo="StuCancelDisciplineManagementMethod" name="StuCancelDisciplineManagementMethod"></type>
<type type="IWorkFlowMethod" mapTo="StuDisciplineManagementMethod" name="StuDisciplineManagementMethod"></type>
<type type="IWorkFlowMethod" mapTo="StudentCertificateMethod" name="StudentCertificateMethod"></type>


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextBookSubscriptionMap.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 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2023-07-04 15:10
/// 描 述:TextBookSubscription
/// </summary>
public class TextBookSubscriptionMap : EntityTypeConfiguration<TextBookSubscriptionEntity>
{
public TextBookSubscriptionMap()
{
#region 表、主键
//表
this.ToTable("TEXTBOOKSUBSCRIPTION");
//主键
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 查看文件

@@ -666,6 +666,7 @@
<Compile Include="EducationalAdministration\StudentPracticeInfoMap.cs" />
<Compile Include="EducationalAdministration\SchulPraktikaInfoMap.cs" />
<Compile Include="EducationalAdministration\TeachingCompetitionMap.cs" />
<Compile Include="EducationalAdministration\TextBookSubscriptionMap.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


+ 183
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSubscription/TextBookSubscriptionBLL.cs 查看文件

@@ -0,0 +1,183 @@
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 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2023-07-04 15:10
/// 描 述:TextBookSubscription
/// </summary>
public class TextBookSubscriptionBLL : TextBookSubscriptionIBLL
{
private TextBookSubscriptionService textBookSubscriptionService = new TextBookSubscriptionService();

#region 获取数据

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

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

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

}
}

+ 144
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSubscription/TextBookSubscriptionEntity.cs 查看文件

@@ -0,0 +1,144 @@
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 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2023-07-04 15:10
/// 描 述:TextBookSubscription
/// </summary>
public class TextBookSubscriptionEntity
{
#region 实体成员
/// <summary>
/// ID
/// </summary>
[Column("ID")]
public string ID { get; set; }
/// <summary>
/// 年级
/// </summary>
[Column("GRADE")]
public string Grade { get; set; }
/// <summary>
/// 班级
/// </summary>
[Column("CLASSNO")]
public string ClassNo { get; set; }
/// <summary>
/// 册数
/// </summary>
[Column("BOOKNUMBER")]
public decimal? BookNumber { get; set; }
/// <summary>
/// 资料名称
/// </summary>
[Column("DATANAME")]
public string DataName { get; set; }
/// <summary>
/// 刊号
/// </summary>
[Column("ISSN")]
public string ISSN { get; set; }
/// <summary>
/// 出版社
/// </summary>
[Column("PUBLISHER")]
public string Publisher { get; set; }
/// <summary>
/// 作者
/// </summary>
[Column("AUTHOR")]
public string Author { get; set; }
/// <summary>
/// 定价
/// </summary>
[Column("PRICING")]
public decimal? Pricing { get; set; }
/// <summary>
/// CreateUser
/// </summary>
[Column("CREATEUSER")]
public string CreateUser { get; set; }
/// <summary>
/// CreateTime
/// </summary>
[Column("CREATETIME")]
public DateTime? CreateTime { get; set; }
/// <summary>
/// Department
/// </summary>
[Column("DEPARTMENT")]
public string Department { get; set; }
/// <summary>
/// 教师使用人数
/// </summary>
[Column("TEACHNUM")]
public decimal? TeachNum { get; set; }
/// <summary>
/// 合计
/// </summary>
[Column("AMOUNT")]
public decimal? Amount { get; set; }
/// <summary>
/// 备注
/// </summary>
[Column("REMARK")]
public string Remark { get; set; }
/// <summary>
/// ProcessId
/// </summary>
[Column("PROCESSID")]
public string ProcessId { get; set; }
/// <summary>
/// 0草稿 1审核中 2审批通过, 3审批未通过
/// </summary>
[Column("STATUS")]
public int? Status { get; set; }
/// <summary>
/// 学年
/// </summary>
[Column("ACADEMICYEARNO")]
public string AcademicYearNo { get; set; }
/// <summary>
/// 学期
/// </summary>
[Column("SEMESTER")]
public string Semester { get; set; }
/// <summary>
/// 申请人
/// </summary>
[Column("APPLICAT")]
public string Applicat { get; set; }

#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.ID = Guid.NewGuid().ToString();
this.Status = 0;
this.CreateUser = LoginUserInfo.Get().userId;
this.CreateTime = DateTime.Now;
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.ID = keyValue;
}
#endregion
#region 扩展字段
#endregion
}
}


+ 58
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSubscription/TextBookSubscriptionIBLL.cs 查看文件

@@ -0,0 +1,58 @@
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 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2023-07-04 15:10
/// 描 述:TextBookSubscription
/// </summary>
public interface TextBookSubscriptionIBLL
{
#region 获取数据

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

void ModifyStatus(string keyValue, string processId);

void ChangeStatusByProcessId(int pastatus, string processId);
}
}

+ 248
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSubscription/TextBookSubscriptionService.cs 查看文件

@@ -0,0 +1,248 @@
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 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2023-07-04 15:10
/// 描 述:TextBookSubscription
/// </summary>
public class TextBookSubscriptionService : RepositoryFactory
{
#region 获取数据

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

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

/// <summary>
/// 获取主表实体数据
/// </summary>
/// <param name="processId">流程实例ID</param>
/// <returns></returns>
public TextBookSubscriptionEntity GetEntityByProcessId(string processId)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<TextBookSubscriptionEntity>(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<TextBookSubscriptionEntity>(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, TextBookSubscriptionEntity 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)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
var id = keyValue.Split(',');
foreach (var item in id)
{
var entity = this.BaseRepository("CollegeMIS").FindEntity<TextBookIndentEntity>(a => a.ID == keyValue);
entity.processId = processId;
entity.Status = 1;
db.Update(entity);
}
db.Commit();
}
catch (Exception e)
{
db.Rollback();
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
{
this.BaseRepository("CollegeMIS").ExecuteBySql($"update TextBookSubscription set status='{pastatus}' where ProcessId='{processId}'");
}
catch (Exception e)
{
if (e is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(e);
}
}

}
#endregion

}
}

+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj 查看文件

@@ -2087,6 +2087,10 @@
<Compile Include="EducationalAdministration\TeachingCompetition\TeachingCompetitionService.cs" />
<Compile Include="EducationalAdministration\TeachingCompetition\TeachingCompetitionBLL.cs" />
<Compile Include="EducationalAdministration\TeachingCompetition\TeachingCompetitionIBLL.cs" />
<Compile Include="EducationalAdministration\TextBookSubscription\TextBookSubscriptionEntity.cs" />
<Compile Include="EducationalAdministration\TextBookSubscription\TextBookSubscriptionService.cs" />
<Compile Include="EducationalAdministration\TextBookSubscription\TextBookSubscriptionBLL.cs" />
<Compile Include="EducationalAdministration\TextBookSubscription\TextBookSubscriptionIBLL.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 查看文件

@@ -126,6 +126,7 @@
<Compile Include="NodeMethod\INodeMethod.cs" />
<Compile Include="NodeMethod\NodeMethod.cs" />
<Compile Include="NodeMethod\StuCancelDisciplineManagementMethod.cs" />
<Compile Include="NodeMethod\TextBookSubscriptionMethod.cs" />
<Compile Include="NodeMethod\TextBookIndentMethod.cs" />
<Compile Include="NodeMethod\TeacherLeaveManagementMethod.cs" />
<Compile Include="NodeMethod\WfMethodParameter.cs" />


+ 28
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/TextBookSubscriptionMethod.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 TextBookSubscriptionMethod : IWorkFlowMethod
{
TextBookSubscriptionIBLL tTextBookSubscriptionIBLL = new TextBookSubscriptionBLL();


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

正在加载...
取消
保存