Browse Source

Merge branch '新疆体育高职分支' of http://123.57.209.16:3000/bjquanjiang/DigitalScholl into 新疆体育高职分支

新疆体育高职分支
ndbs 9 months ago
parent
commit
0e45769a33
83 changed files with 7162 additions and 97 deletions
  1. +167
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookInController.cs
  2. +197
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookIndentController.cs
  3. +120
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookIndentDetailController.cs
  4. +166
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookInfoController.cs
  5. +177
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookOutController.cs
  6. +153
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookSolSubController.cs
  7. +117
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookSolSubDetailController.cs
  8. +201
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextbookInOutController.cs
  9. +14
    -10
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingMaterial/Form.cshtml
  10. +1
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingMaterial/Index.js
  11. +8
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/Form.cshtml
  12. +8
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/FormDelete.cshtml
  13. +8
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/FormView.cshtml
  14. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/Index.js
  15. +8
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInOut/FormUse.cshtml
  16. +16
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInOut/Index.cshtml
  17. +28
    -13
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInOut/Index.js
  18. +16
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInOut/IndexInOut.cshtml
  19. +7
    -9
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInOut/IndexInOut.js
  20. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInfo/Index.js
  21. +8
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/Form.cshtml
  22. +2
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/Form.js
  23. +9
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/FormDelete.cshtml
  24. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/FormDelete.js
  25. +8
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/FormView.cshtml
  26. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/FormView.js
  27. +12
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/Index.cshtml
  28. +26
    -35
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/Index.js
  29. +42
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSolSub/StatisticsIndex.cshtml
  30. +115
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSolSub/StatisticsIndex.js
  31. +10
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  32. +4
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config
  33. +16
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Excel/Import/ExcelImportBLL.cs
  34. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextBookInMap.cs
  35. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextBookIndentDetailMap.cs
  36. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextBookIndentMap.cs
  37. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextBookInfoMap.cs
  38. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextBookOutMap.cs
  39. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextBookSolSubDetailMap.cs
  40. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextBookSolSubMap.cs
  41. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextbookInOutMap.cs
  42. +8
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  43. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicBLL.cs
  44. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs
  45. +6
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingMaterial/TeachingMaterialEntity.cs
  46. +173
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIn/TextBookInBLL.cs
  47. +135
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIn/TextBookInEntity.cs
  48. +62
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIn/TextBookInIBLL.cs
  49. +259
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIn/TextBookInService.cs
  50. +217
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndent/TextBookIndentBLL.cs
  51. +146
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndent/TextBookIndentEntity.cs
  52. +75
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndent/TextBookIndentIBLL.cs
  53. +340
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndent/TextBookIndentService.cs
  54. +149
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndentDetail/TextBookIndentDetailBLL.cs
  55. +128
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndentDetail/TextBookIndentDetailEntity.cs
  56. +56
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndentDetail/TextBookIndentDetailIBLL.cs
  57. +199
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndentDetail/TextBookIndentDetailService.cs
  58. +169
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoBLL.cs
  59. +155
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoEntity.cs
  60. +69
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoIBLL.cs
  61. +255
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoService.cs
  62. +167
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookOut/TextBookOutBLL.cs
  63. +160
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookOut/TextBookOutEntity.cs
  64. +57
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookOut/TextBookOutIBLL.cs
  65. +292
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookOut/TextBookOutService.cs
  66. +150
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSub/TextBookSolSubBLL.cs
  67. +173
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSub/TextBookSolSubEntity.cs
  68. +55
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSub/TextBookSolSubIBLL.cs
  69. +228
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSub/TextBookSolSubService.cs
  70. +144
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSubDetail/TextBookSolSubDetailBLL.cs
  71. +70
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSubDetail/TextBookSolSubDetailEntity.cs
  72. +53
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSubDetail/TextBookSolSubDetailIBLL.cs
  73. +164
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSubDetail/TextBookSolSubDetailService.cs
  74. +235
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutBLL.cs
  75. +189
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutEntity.cs
  76. +87
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutIBLL.cs
  77. +367
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutService.cs
  78. +32
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj
  79. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ADR_Record/ADR_RecordService.cs
  80. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj
  81. +28
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/TextBookIndentMethod.cs
  82. +2
    -2
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js
  83. +3
    -3
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/manifest.json

+ 167
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookInController.cs View File

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

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

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
/// <summary>
/// 入库表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormIn()
{
ViewBag.BookCode = "RK" + DateTime.Now.ToString("yyyyMMddHHmmss");
return View();
}
/// <summary>
/// 明细查看
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormView()
{
return View();
}
/// <summary>
/// 明细删除
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormDelete()
{
return View();
}
#endregion

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageList(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = textBookInIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var TextBookInOutData = textBookInOutIBLL.GetKCEntity(keyValue);
var TextBookInData = textBookInIBLL.GetInEntity(TextBookInOutData.BookCode);

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

/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormDataEdit(string keyValue)
{
var TextBookInOutData = textBookInOutIBLL.GetKCEntity(keyValue);
var jsonData = new
{
TextBookInOut = TextBookInOutData,
};
return Success(jsonData);
}

#endregion

#region 提交数据

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

}
}

+ 197
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookIndentController.cs View File

@@ -0,0 +1,197 @@
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();
}
/// <summary>
/// 明细
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormDetail()
{
return View();
}
/// <summary>
/// 查看
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormLook()
{
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 TextBookIndentDetailData = textBookIndentIBLL.TextBookIndentDetailList(TextBookIndentData.ID);

var jsonData = new
{
TextBookIndent = TextBookIndentData,
TextBookIndentDetail = TextBookIndentDetailData,
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="processId">流程实例主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormDataByProcessId(string processId)
{
var TextBookIndentData = textBookIndentIBLL.GetEntityByProcessId(processId);
var TextBookIndentDetailData = textBookIndentIBLL.TextBookIndentDetailList(TextBookIndentData.ID);
var jsonData = new
{
TextBookIndent = TextBookIndentData,
TextBookIndentDetail = TextBookIndentDetailData,
};
return Success(jsonData);
}


/// <summary>
/// 学年下拉框(四位)
/// </summary>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetAcademicYear()
{
var data = WebHelper.GenerateNearByYear();
return Success(data);
}
#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,string strTextBookIndentDetailList)
{
TextBookIndentEntity entity = strEntity.ToObject<TextBookIndentEntity>();
List<TextBookIndentDetailEntity> textBookIndentDetail = strTextBookIndentDetailList.ToObject<List<TextBookIndentDetailEntity>>();
textBookIndentIBLL.SaveEntity(keyValue, entity, textBookIndentDetail);
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

}
}

+ 120
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookIndentDetailController.cs View File

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

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-02-27 09:35
/// 描 述:TextBookIndentDetail
/// </summary>
public class TextBookIndentDetailController : MvcControllerBase
{
private TextBookIndentDetailIBLL textBookIndentDetailIBLL = new TextBookIndentDetailBLL();
#region 视图功能

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

#region 获取数据

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

#region 提交数据

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

+ 166
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookInfoController.cs View File

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

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-01-24 12:19
/// 描 述:教材信息管理
/// </summary>
public class TextBookInfoController : MvcControllerBase
{
private TextBookInfoIBLL textBookInfoIBLL = new TextBookInfoBLL();

#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 = textBookInfoIBLL.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 TextBookInfoData = textBookInfoIBLL.GetTextBookInfoEntity(keyValue);
var jsonData = new
{
TextBookInfo = TextBookInfoData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
textBookInfoIBLL.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)
{
TextBookInfoEntity entity = strEntity.ToObject<TextBookInfoEntity>();

if (string.IsNullOrEmpty(keyValue))
{
entity.IsValid = true;
entity.IsDel = 0;
}
else
{
entity.UpdateUserID = LoginUserInfo.Get().userId;
entity.Updatetime = DateTime.Now;
}

var RepetitionList = textBookInfoIBLL.GetRepetitions(keyValue, entity.TextBookNo, entity.TextBookName, entity.PublishNo, entity.DeptNo, entity.Publisher, entity.TextBookNature, entity.TextBookType, entity.Edition, entity.Impression);

if (RepetitionList != null)
{
return Fail("保存失败请检查数据有重复项!");
}
else
{
textBookInfoIBLL.SaveEntity(keyValue, entity);
return Success("保存成功!");
}
}
#endregion

#region 扩展数据

/// <summary>
/// 启用
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult EnableEntity(string keyValue, string IsValid)
{
textBookInfoIBLL.EnabOrDisabEntity(keyValue, IsValid);
return Success("启用成功!");
}

/// <summary>
/// 禁用
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DisableEntity(string keyValue, string IsValid)
{
textBookInfoIBLL.EnabOrDisabEntity(keyValue, IsValid);
return Success("禁用成功!");
}
#endregion
}
}

+ 177
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookOutController.cs View File

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

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-05 11:17
/// 描 述:TextBookOut
/// </summary>
public class TextBookOutController : MvcControllerBase
{
private TextBookOutIBLL textBookOutIBLL = new TextBookOutBLL();
private TextBookInOutIBLL textBookInOutIBLL = new TextbookInOutBLL();

#region 视图功能

/// <summary>
/// 主页面
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
return View();
}
/// <summary>
/// 入库表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormOut()
{
ViewBag.BookCode = "CK" + DateTime.Now.ToString("yyyyMMddHHmmss");
return View();
}
/// <summary>
/// 明细查看
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormView()
{
return View();
}
/// <summary>
/// 明细删除
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormDelete()
{
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 = textBookOutIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var TextBookInOutData = textBookInOutIBLL.GetKCEntity(keyValue);
var TextBookOutData = textBookOutIBLL.GetListByCode(TextBookInOutData.BookCode);
var jsonData = new
{
TextBookInOut = TextBookInOutData,
TextBookOut = TextBookOutData,
};
return Success(jsonData);
}

/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormDataEdit(string keyValue)
{
var TextBookInOutData = textBookInOutIBLL.GetKCEntity(keyValue);
var jsonData = new
{
TextBookInOut = TextBookInOutData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
textBookOutIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="strEntity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity, string strTextBookOutList)
{
TextbookInOutEntity entity = strEntity.ToObject<TextbookInOutEntity>();
List<TextBookOutEntity> textBookOutList = strTextBookOutList.ToObject<List<TextBookOutEntity>>();
if (!textBookOutList.Any())
{
return Fail("请添加出库单!");
}
if (entity.FinallyNum < textBookOutList.Select(x => x.Variate).Sum())//当前库存<出库单数量之和
{
return Fail("当前库存小于出库单总数量!");
}
textBookOutIBLL.SaveEntity(keyValue, entity, textBookOutList);
if (keyValue != null)
{
}
return Success("保存成功!");
}
#endregion

}
}

+ 153
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookSolSubController.cs View File

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

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-01 17:26
/// 描 述:教材征订管理
/// </summary>
public class TextBookSolSubController : MvcControllerBase
{
private TextBookSolSubIBLL textBookSolSubIBLL = new TextBookSolSubBLL();
private TextBookSolSubDetailIBLL textBookSolSubDetailIBLL = new TextBookSolSubDetailBLL();

#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 StatisticsIndex()
{
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 = textBookSolSubIBLL.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 TextBookSolSubData = textBookSolSubIBLL.GetTextBookSolSubEntity(keyValue);
var textBookSolSubDetailData = textBookSolSubDetailIBLL.GetListBySolSubId(TextBookSolSubData.ID);
var jsonData = new
{
TextBookSolSub = TextBookSolSubData,
TextBookSolSubDetail = textBookSolSubDetailData
};
return Success(jsonData);
}

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetStatistics(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = textBookSolSubIBLL.GetStatistics(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}

#endregion

#region 提交数据

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

}
}

+ 117
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookSolSubDetailController.cs View File

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

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-02 09:29
/// 描 述:教材征订管理明细
/// </summary>
public class TextBookSolSubDetailController : MvcControllerBase
{
private TextBookSolSubDetailIBLL textBookSolSubDetailIBLL = new TextBookSolSubDetailBLL();

#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 = textBookSolSubDetailIBLL.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 TextBookSolSubDetailData = textBookSolSubDetailIBLL.GetTextBookSolSubDetailEntity( keyValue );
var jsonData = new {
TextBookSolSubDetail = TextBookSolSubDetailData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

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

}
}

+ 201
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextbookInOutController.cs View File

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

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

#region 视图功能

/// <summary>
/// 主页面
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult Index()
{
return View();
}
/// <summary>
/// 表单页
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult Form()
{
ViewBag.BookCode = "KC" + DateTime.Now.ToString("yyyyMMddHHmmss");
return View();
}
/// <summary>
/// 表单页
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormUse()
{
return View();
}
/// <summary>
/// 主页面
/// </summary>
/// <returns></returns>
[HttpGet]
public ActionResult IndexInOut()
{
return View();
}
#endregion

#region 获取数据

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

/// <summary>
/// 获取表单数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetFormUseData(string keyValue)
{
var TextBookInOutData = textbookInOutIBLL.GetEntity(keyValue);
var TextBookInOutDetailData = textbookInOutIBLL.GetInOrOutEntity(TextBookInOutData.BookCode).OrderBy(x => x.CreateTime);
var jsonData = new
{
TextBookInOut = TextBookInOutData,
TextBookInOrOut = TextBookInOutDetailData,
};
return Success(jsonData);
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
textbookInOutIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
{
var loginUserInfo = LoginUserInfo.Get();
TextbookInOutEntity entity = strEntity.ToObject<TextbookInOutEntity>();
if (string.IsNullOrEmpty(keyValue))
{
entity.IsDel = 0;
entity.IsSubmit = 0;
entity.CreateTime = DateTime.Now;
entity.CrateUserID = loginUserInfo.userId;
}
else
{
entity.UpTime = DateTime.Now;
entity.UpUserID = loginUserInfo.userId;
}
int RepetitionList = textbookInOutIBLL.GetRepetitions(entity.ID,entity.LessonNo, entity.TextBookNo, entity.TextBookName, entity.PublishNo, entity.Publisher, entity.Edition, entity.Impression);

if (RepetitionList > 0)
{
return Fail("已存在相同库存单,请使用教材入库功能!");
}
else
{
textbookInOutIBLL.SaveEntity(keyValue, entity);
return Success("保存成功!");
}
}

/// <summary>
/// 提交
/// </summary>
/// <param name="keyValue"></param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult SubmitForm(string keyValue)
{
textbookInOutIBLL.SubmitEntity(keyValue);
return Success("提交成功!");
}
#endregion

}
}

+ 14
- 10
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingMaterial/Form.cshtml View File

@@ -3,25 +3,29 @@
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap">
<div class="col-xs-12 lr-form-item" data-table="TeachingMaterial" >
<div class="col-xs-12 lr-form-item" data-table="TeachingMaterial">
<div class="lr-form-item-title">教材分类</div>
<input id="Type" type="text" class="form-control" />
<input id="Type" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="TeachingMaterial" >
<div class="col-xs-12 lr-form-item" data-table="TeachingMaterial">
<div class="lr-form-item-title">教材名称</div>
<input id="Name" type="text" class="form-control" />
<input id="Name" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="TeachingMaterial" >
<div class="col-xs-12 lr-form-item" data-table="TeachingMaterial">
<div class="lr-form-item-title">教材来源</div>
<input id="Source" type="text" class="form-control" />
<input id="Source" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="TeachingMaterial" >
<div class="col-xs-12 lr-form-item" data-table="TeachingMaterial">
<div class="lr-form-item-title">价格</div>
<input id="Price" type="text" class="form-control" />
<input id="Price" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="TeachingMaterial" >
<div class="col-xs-12 lr-form-item" data-table="TeachingMaterial">
<div class="lr-form-item-title">购买数量</div>
<input id="BuySum" type="number" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item" data-table="TeachingMaterial">
<div class="lr-form-item-title">添加时间</div>
<input id="AddTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#AddTime').trigger('change'); } })" />
<input id="AddTime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#AddTime').trigger('change'); } })" />
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TeachingMaterial/Form.js")

+ 1
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TeachingMaterial/Index.js View File

@@ -77,9 +77,7 @@ var bootstrap = function ($, learun) {
{ label: "教材来源", name: "Source", width: 100, align: "left"},
{ label: "价格", name: "Price", width: 100, align: "left"},
{ label: "添加时间", name: "AddTime", width: 100, align: "left"},
{ label: "需要购买数量", name: "AddTime", width: 100, align: "left", formatter: function(val) {
return '312';
}},
{ label: "购买数量", name: "BuySum", width: 100, align: "left"},
],
mainId:'ID',
isPage: true


+ 8
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/Form.cshtml View File

@@ -39,6 +39,14 @@
<div class="lr-form-item-title">当前库存</div>
<input id="FinallyNum" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">累计入库</div>
<input id="RKNum" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">累计出库</div>
<input id="CKNum" type="text" class="form-control" readonly />
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height: 100px;" readonly></textarea>


+ 8
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/FormDelete.cshtml View File

@@ -39,6 +39,14 @@
<div class="lr-form-item-title">当前库存</div>
<input id="FinallyNum" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">累计入库</div>
<input id="RKNum" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">累计出库</div>
<input id="CKNum" type="text" class="form-control" readonly />
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height: 100px;" readonly></textarea>


+ 8
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/FormView.cshtml View File

@@ -39,6 +39,14 @@
<div class="lr-form-item-title">当前库存</div>
<input id="FinallyNum" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">累计入库</div>
<input id="RKNum" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">累计出库</div>
<input id="CKNum" type="text" class="form-control" readonly />
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height: 100px;" readonly></textarea>


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookIn/Index.js View File

@@ -101,7 +101,7 @@ var bootstrap = function ($, learun) {
{ label: '出版社', name: 'Publisher', width: 200, align: "left" },
{ label: '版次', name: 'Edition', width: 200, align: "left" },
{ label: '印次', name: 'Impression', width: 200, align: "left" },
{ label: '创建', name: 'CreateTime', width: 200, align: "left" },
{ label: '创建时间', name: 'CreateTime', width: 200, align: "left" },
{ label: '创建用户', name: 'CrateUserID', width: 200, align: "left" },
{ label: '修改人', name: 'UpTime', width: 200, align: "left" },
{ label: '修改用户', name: 'UpUserID', width: 200, align: "left" },


+ 8
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInOut/FormUse.cshtml View File

@@ -39,6 +39,14 @@
<div class="lr-form-item-title">当前库存</div>
<input id="FinallyNum" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">累计入库</div>
<input id="RKNum" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">累计出库</div>
<input id="CKNum" type="text" class="form-control" readonly />
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height: 100px;" readonly></textarea>


+ 16
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInOut/Index.cshtml View File

@@ -8,10 +8,22 @@
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<input id="txt_Keyword" type="text" class="form-control" placeholder="请输入要查询关键字" />
</div>
<div class="lr-layout-tool-item">
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i>&nbsp;查询</a>
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">教材名称</div>
<input id="TextBookName" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">教材号</div>
<input id="TextBookNo" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">第一作者</div>
<input id="FirstAuthor" type="text" class="form-control" />
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">


+ 28
- 13
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInOut/Index.js View File

@@ -14,10 +14,9 @@ var bootstrap = function ($, learun) {
},
bind: function () {
// 查询
$('#btn_Search').on('click', function () {
var keyword = $('#txt_Keyword').val();
page.search({ keyword: keyword });
});
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 200, 400);
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
// 刷新
$('#lr_refresh').on('click', function () {
@@ -93,7 +92,7 @@ var bootstrap = function ($, learun) {
});
},
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
$('#gridtable').lrAuthorizeJfGridLei({
url: top.$.rootUrl + '/EducationalAdministration/TextBookInOut/GetPageList',
headData: [
{ label: '库存单号', name: 'BookCode', width: 200, align: "left" },
@@ -115,15 +114,31 @@ var bootstrap = function ($, learun) {
{ label: '出版号', name: 'PublishNo', width: 200, align: "left" },
{ label: '第一作者', name: 'FirstAuthor', width: 200, align: "left" },
{ label: '其他作者', name: 'OtherAuthor', width: 200, align: "left" },
//{ label: '出版日期', name: 'Pubdate', width: 200, align: "left" },
{ label: '出版社', name: 'Publisher', width: 200, align: "left" },
{ label: '版次', name: 'Edition', width: 200, align: "left" },
{ label: '印次', name: 'Impression', width: 200, align: "left" },
{ label: '创建人', name: 'CreateTime', width: 200, align: "left" },
{ label: '创建用户', name: 'CrateUserID', width: 200, align: "left" },
{ label: '修改人', name: 'UpTime', width: 200, align: "left" },
{ label: '修改用户', name: 'UpUserID', width: 200, align: "left" },
{ label: '当前数量', name: 'FinallyNum', width: 200, align: "left" },
{ label: '版次', name: 'Edition', width: 100, align: "left" },
{ label: '印次', name: 'Impression', width: 100, align: "left" },
{ label: '创建时间', name: 'CreateTime', width: 200, align: "left" },
{
label: '创建用户', name: 'CrateUserID', width: 200, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser',
key: value,
keyId: 'f_userid',
callback: function (_data) {
callback(_data['f_realname']);
}
});
}
},
{ label: '当前数量', name: 'FinallyNum', width: 100, align: "left" },
{ label: '累计入库数量', name: 'RKNum', width: 100, align: "left" },
{ label: '累计出库数量', name: 'CKNum', width: 100, align: "left" },
{
label: '是否提交', name: 'IsSubmit', width: 100, align: "left",
formatter: function (cellvalue) {
return cellvalue == 1 ? "是" : "否";
}
},
{ label: '备注', name: 'Remark', width: 200, align: "left" },

],


+ 16
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInOut/IndexInOut.cshtml View File

@@ -8,10 +8,22 @@
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<input id="txt_Keyword" type="text" class="form-control" placeholder="请输入要查询关键字" />
</div>
<div class="lr-layout-tool-item">
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i>&nbsp;查询</a>
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">教材名称</div>
<input id="TextBookName" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">教材号</div>
<input id="TextBookNo" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">第一作者</div>
<input id="FirstAuthor" type="text" class="form-control" />
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">


+ 7
- 9
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInOut/IndexInOut.js View File

@@ -14,10 +14,9 @@ var bootstrap = function ($, learun) {
},
bind: function () {
// 查询
$('#btn_Search').on('click', function () {
var keyword = $('#txt_Keyword').val();
page.search({ keyword: keyword });
});
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 200, 400);
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' });
// 刷新
$('#lr_refresh').on('click', function () {
@@ -39,7 +38,7 @@ var bootstrap = function ($, learun) {
});
},
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
$('#gridtable').lrAuthorizeJfGridLei({
url: top.$.rootUrl + '/EducationalAdministration/TextBookInOut/GetPageList',
headData: [
{ label: '库存单号', name: 'BookCode', width: 200, align: "left" },
@@ -61,15 +60,14 @@ var bootstrap = function ($, learun) {
{ label: '出版号', name: 'PublishNo', width: 200, align: "left" },
{ label: '第一作者', name: 'FirstAuthor', width: 200, align: "left" },
{ label: '其他作者', name: 'OtherAuthor', width: 200, align: "left" },
//{ label: '出版日期', name: 'Pubdate', width: 200, align: "left" },
{ label: '出版社', name: 'Publisher', width: 200, align: "left" },
{ label: '版次', name: 'Edition', width: 200, align: "left" },
{ label: '印次', name: 'Impression', width: 200, align: "left" },
{ label: '创建', name: 'CreateTime', width: 200, align: "left" },
{ label: '创建时间', name: 'CreateTime', width: 200, align: "left" },
{ label: '创建用户', name: 'CrateUserID', width: 200, align: "left" },
{ label: '修改人', name: 'UpTime', width: 200, align: "left" },
{ label: '修改用户', name: 'UpUserID', width: 200, align: "left" },
{ label: '当前数量', name: 'FinallyNum', width: 200, align: "left" },
{ label: '累计入库数量', name: 'RKNum', width: 100, align: "left" },
{ label: '累计出库数量', name: 'CKNum', width: 100, align: "left" },
{ label: '备注', name: 'Remark', width: 200, align: "left" },

],


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookInfo/Index.js View File

@@ -225,6 +225,7 @@ var bootstrap = function ($, learun) {
],
mainId: 'ID',
isPage: true,
rows: 100,
isMultiselect: true,
sidx: 'Createdate asc'
});


+ 8
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/Form.cshtml View File

@@ -39,6 +39,14 @@
<div class="lr-form-item-title">当前库存</div>
<input id="FinallyNum" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">累计入库</div>
<input id="RKNum" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">累计出库</div>
<input id="CKNum" type="text" class="form-control" readonly />
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height: 100px;" readonly></textarea>


+ 2
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/Form.js View File

@@ -64,6 +64,7 @@ var bootstrap = function ($, learun) {
$('#TextBookOut').jfGrid({
headData: [
{ label: '出库单', name: 'BookCode', width: 180, align: 'left' },
{ label: '数量', name: 'Variate', width: 100, align: 'left' },
{
label: "专业部", name: "DeptNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
@@ -180,7 +181,7 @@ var bootstrap = function ($, learun) {
validForm = function () {
var datas = $('#TextBookOut').jfGridGet('rowdatas');
if (datas == null || datas.length == 0) {
learun.alert.warning("申请未包含出库申请!请先添加库申请!");
learun.alert.warning("申请未包含出库申请!请先添加库申请!");
return false;
}
return true;


+ 9
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/FormDelete.cshtml View File

@@ -39,13 +39,21 @@
<div class="lr-form-item-title">当前库存</div>
<input id="FinallyNum" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">累计入库</div>
<input id="RKNum" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">累计出库</div>
<input id="CKNum" type="text" class="form-control" readonly />
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height: 100px;" readonly></textarea>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">明细操作</div>
<input id="detaildel" type="button" class="btn btn-danger" 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="TextBookOut"></div>


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/FormDelete.js View File

@@ -31,6 +31,7 @@ var bootstrap = function ($, learun) {
$('#TextBookOut').jfGrid({
headData: [
{ label: '出库单', name: 'BookCode', width: 180, align: 'left' },
{ label: '数量', name: 'Variate', width: 100, align: 'left' },
{
label: "专业部", name: "DeptNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {


+ 8
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/FormView.cshtml View File

@@ -39,6 +39,14 @@
<div class="lr-form-item-title">当前库存</div>
<input id="FinallyNum" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">累计入库</div>
<input id="RKNum" type="text" class="form-control" readonly />
</div>
<div class="col-xs-6 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">累计出库</div>
<input id="CKNum" type="text" class="form-control" readonly />
</div>
<div class="col-xs-12 lr-form-item" data-table="TextBookInOut">
<div class="lr-form-item-title">备注</div>
<textarea id="Remark" class="form-control" style="height: 100px;" readonly></textarea>


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/FormView.js View File

@@ -34,6 +34,7 @@ var bootstrap = function ($, learun) {
$('#TextBookOut').jfGrid({
headData: [
{ label: '出库单', name: 'BookCode', width: 180, align: 'left' },
{ label: '数量', name: 'Variate', width: 100, align: 'left' },
{
label: "专业部", name: "DeptNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {


+ 12
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/Index.cshtml View File

@@ -7,15 +7,23 @@
<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 class="lr-layout-tool-item">
<div id="datesearch"></div>
</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>
<input id="keyword" type="text" class="form-control" placeholder="请输入要查询关键字" />
<div class="lr-form-item-title">教材名称</div>
<input id="TextBookName" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">教材号</div>
<input id="TextBookNo" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">第一作者</div>
<input id="FirstAuthor" type="text" class="form-control" />
</div>
</div>
</div>


+ 26
- 35
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookOut/Index.js View File

@@ -7,44 +7,15 @@
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var startTime;
var endTime;
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);
}, 100, 400);
}, 200, 400);
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo',value: 'deptno',text: 'deptname' });
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo',value: 'majorno',text: 'majorname' });
$('#ClassNo').lrDataSourceSelect({ code: 'bjsj',value: 'classno',text: 'classname' });
@@ -135,10 +106,32 @@ var bootstrap = function ($, learun) {
{ label: '出版社', name: 'Publisher', width: 200, align: "left" },
{ label: '版次', name: 'Edition', width: 200, align: "left" },
{ label: '印次', name: 'Impression', width: 200, align: "left" },
{ label: '创建人', name: 'CreateTime', width: 200, align: "left" },
{ label: '创建用户', name: 'CrateUserID', width: 200, align: "left" },
{ label: '创建时间', name: 'CreateTime', width: 200, align: "left" },
{
label: '创建用户', name: 'CrateUserID', width: 200, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser',
key: value,
keyId: 'f_userid',
callback: function (_data) {
callback(_data['f_realname']);
}
});
}
},
{ label: '修改人', name: 'UpTime', width: 200, align: "left" },
{ label: '修改用户', name: 'UpUserID', width: 200, align: "left" },
{
label: '修改用户', name: 'UpUserID', width: 200, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser',
key: value,
keyId: 'f_userid',
callback: function (_data) {
callback(_data['f_realname']);
}
});
}
},
{ label: '当前数量', name: 'FinallyNum', width: 200, align: "left" },
{ label: '备注', name: 'Remark', width: 200, align: "left" },
],
@@ -150,8 +143,6 @@ var bootstrap = function ($, learun) {
},
search: function (param) {
param = param || {};
param.StartTime = startTime;
param.EndTime = endTime;
param.SqlParameter = ' and IsSubmit =1 ';
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}


+ 42
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSolSub/StatisticsIndex.cshtml View File

@@ -0,0 +1,42 @@
@{
ViewBag.Title = "专业统计";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout">
<div class="lr-layout-center">
<div class="lr-layout-wrap lr-layout-wrap-notitle ">
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<div class="lr-layout-tool-item">
<div id="multiple_condition_query">
<div class="lr-query-formcontent">
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">学年</div>
<div id="AcademicYearNo"></div>
</div>
<div class="col-xs-12 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="TextBookName" type="text" class="form-control" />
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/TextBookSolSub/StatisticsIndex.js")

+ 115
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSolSub/StatisticsIndex.js View File

@@ -0,0 +1,115 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-12-16 10:14
* 描 述:长阳迎新
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
$('#AcademicYearNo').lrselect({
placeholder: "请选择学年",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/TextBookIndent/GetAcademicYear',
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();
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGridLei({
url: top.$.rootUrl + '/EducationalAdministration/TextBookSolSub/GetStatistics',
headData: [
{ label: "学年", name: "AcademicYearNo", width: 50, align: "left" },
{ label: "学期", name: "Semester", width: 50, align: "left" },
{ label: "教材名称", name: "TextBookName", width: 150, align: "left" },
{ label: "出版号", name: "PublishNo", width: 100, align: "left" },
{ label: "第一作者", name: "FirstAuthor", width: 100, align: "left" },
{ label: "其他作者", name: "OtherAuthor", width: 100, align: "left" },
{
label: "出版日期", name: "Pubdate", width: 80, align: "left",
formatter: function (value) {
return learun.formatDate(value, 'yyyy-MM-dd');
}
},
{ 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: 60, align: "left" },
{ label: "版次", name: "Edition", width: 100, align: "left" },
{ label: "印次", name: "Impression", width: 100, align: "left" },
{
label: "练习册", name: "IsWorkBook", width: 100, align: "left",
formatter: function (cellvalue) {
return cellvalue == true ? "<span class=\"label label-success\">是</span>" :
"<span class=\"label label-danger\">否</span>";
}
},
{
label: "教参教辅", name: "IsTeachConsult", width: 100, align: "left",
formatter: function (cellvalue) {
return cellvalue == true ? "<span class=\"label label-success\">是</span>" :
"<span class=\"label label-danger\">否</span>";
}
},
{ label: "订购数量", name: "DGNum", width: 200, align: "left" }
],
mainId: 'PublishNo',
sidx: 'PublishNo desc',
isPage: true
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 10
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj View File

@@ -350,6 +350,14 @@
<Compile Include="Areas\EducationalAdministration\Controllers\StuScoreOnlineController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\StuSelectLessonListOfElectiveOnlineController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\DoorController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookInController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookIndentController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookIndentDetailController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookInfoController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TextbookInOutController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookOutController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookSolSubController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\TextBookSolSubDetailController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\YKTStateMentController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\ArrangeLessonSyncController.cs" />
<Compile Include="Areas\EducationalAdministration\Controllers\ArrangeLessonTermAttemperController.cs" />
@@ -1109,6 +1117,7 @@
<Content Include="Areas\EducationalAdministration\Views\StuSelectLessonListOfElectiveOnline\QueryStuSelectResult.js" />
<Content Include="Areas\EducationalAdministration\Views\StuSelectLessonListOfElectiveOnline\QueryStuSelectResultForTeacher.js" />
<Content Include="Areas\EducationalAdministration\Views\StuSelectLessonListOfElectiveOnline\InitScoreForm.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookSolSub\StatisticsIndex.js" />
<Content Include="Areas\EducationalAdministration\Views\YKTStateMent\AnalysisByMonthForStudent.js" />
<Content Include="Areas\EducationalAdministration\Views\YKTStateMent\ManageIndexTeacher.js" />
<Content Include="Areas\EducationalAdministration\Views\YKTStateMent\IndexForTeacher.js" />
@@ -8412,6 +8421,7 @@
<Content Include="Areas\EducationalAdministration\Views\StuPunishment\DeptIndex.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuPunishment\MajorIndex.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuPunishment\StuIndex.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\TextBookSolSub\StatisticsIndex.cshtml" />
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" />


+ 4
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config View File

@@ -41,7 +41,8 @@
<typeAlias alias="Ass_FixAssetsApplyMethod" type="Learun.Application.WorkFlow.Ass_FixAssetsApplyMethod,Learun.Application.WorkFlow" />
<typeAlias alias="Ass_FixAssetsMethod" type="Learun.Application.WorkFlow.Ass_FixAssetsMethod,Learun.Application.WorkFlow" />
<typeAlias alias="FundsApplyMethod" type="Learun.Application.WorkFlow.FundsApplyMethod,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" />-->
@@ -92,6 +93,8 @@
<type type="IWorkFlowMethod" mapTo="Ass_FixAssetsApplyMethod" name="Ass_FixAssetsApplyMethod"></type>
<type type="IWorkFlowMethod" mapTo="Ass_FixAssetsMethod" name="Ass_FixAssetsMethod"></type>
<type type="IWorkFlowMethod" mapTo="FundsApplyMethod" name="FundsApplyMethod"></type>
<type type="IWorkFlowMethod" mapTo="TextBookIndentMethod" name="TextBookIndentMethod"></type>
</container>

<container name="TsIOCcontainer">


+ 16
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Excel/Import/ExcelImportBLL.cs View File

@@ -321,7 +321,7 @@ namespace Learun.Application.Excel
throw (new Exception("【" + col.F_ColName + "】 此项数据为必填项"));
}
}
if (dbType == System.Data.DbType.DateTime || dbType == System.Data.DbType.Decimal)
if (dbType == System.Data.DbType.DateTime || dbType == System.Data.DbType.Decimal || dbType == System.Data.DbType.Boolean)
{
if (string.IsNullOrEmpty(dr[col.F_ColName].ToString()))
{
@@ -349,7 +349,21 @@ namespace Learun.Application.Excel
dataItemMap.Add(col.F_DataItemCode, dataItemList);
}
dataItemName = FindDataItemValue(dataItemMap[col.F_DataItemCode], dr[col.F_ColName].ToString(), col.F_ColName, col.F_IsMandatory ?? false);
dp.Add(col.F_Name, dataItemName, dbType);
if (dbType == System.Data.DbType.Boolean)
{
if (string.IsNullOrEmpty(dr[col.F_ColName].ToString()) || string.IsNullOrEmpty(dataItemName))
{
dp.Add(col.F_Name, null, dbType);
}
else
{
dp.Add(col.F_Name, dataItemName, dbType);
}
}
else
{
dp.Add(col.F_Name, dataItemName, dbType);
}
IsOnlyOne(col, sqlonly, dataItemName, entity.F_DbId, dbType);
break;
case 3://数据表


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

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

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-03 10:15
/// 描 述:教材入库
/// </summary>
public class TextBookInMap : EntityTypeConfiguration<TextBookInEntity>
{
public TextBookInMap()
{
#region 表、主键
//表
this.ToTable("TEXTBOOKIN");
//主键
this.HasKey(t => t.ID);
#endregion

#region 配置关系
#endregion
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextBookIndentDetailMap.cs View File

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

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-02-27 09:35
/// 描 述:TextBookIndentDetail
/// </summary>
public class TextBookIndentDetailMap : EntityTypeConfiguration<TextBookIndentDetailEntity>
{
public TextBookIndentDetailMap()
{
#region 表、主键
//表
this.ToTable("TEXTBOOKINDENTDETAIL");
//主键
this.HasKey(t => t.ID);
#endregion

#region 配置关系
#endregion
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextBookIndentMap.cs View File

@@ -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
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextBookInfoMap.cs View File

@@ -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-01-24 12:19
/// 描 述:教材信息管理
/// </summary>
public class TextBookInfoMap : EntityTypeConfiguration<TextBookInfoEntity>
{
public TextBookInfoMap()
{
#region 表、主键
//表
this.ToTable("TEXTBOOKINFO");
//主键
this.HasKey(t => t.ID);
#endregion

#region 配置关系
#endregion
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextBookOutMap.cs View File

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

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-05 11:17
/// 描 述:TextBookOut
/// </summary>
public class TextBookOutMap : EntityTypeConfiguration<TextBookOutEntity>
{
public TextBookOutMap()
{
#region 表、主键
//表
this.ToTable("TEXTBOOKOUT");
//主键
this.HasKey(t => t.ID);
#endregion

#region 配置关系
#endregion
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextBookSolSubDetailMap.cs View File

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

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-02 09:29
/// 描 述:教材征订管理明细
/// </summary>
public class TextBookSolSubDetailMap : EntityTypeConfiguration<TextBookSolSubDetailEntity>
{
public TextBookSolSubDetailMap()
{
#region 表、主键
//表
this.ToTable("TEXTBOOKSOLSUBDETAIL");
//主键
this.HasKey(t => t.ID);
#endregion

#region 配置关系
#endregion
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextBookSolSubMap.cs View File

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

namespace Learun.Application.Mapping
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-01 17:26
/// 描 述:教材征订管理
/// </summary>
public class TextBookSolSubMap : EntityTypeConfiguration<TextBookSolSubEntity>
{
public TextBookSolSubMap()
{
#region 表、主键
//表
this.ToTable("TEXTBOOKSOLSUB");
//主键
this.HasKey(t => t.ID);
#endregion

#region 配置关系
#endregion
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/TextbookInOutMap.cs View File

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

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

#region 配置关系
#endregion
}
}
}


+ 8
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj View File

@@ -125,6 +125,14 @@
<Compile Include="EducationalAdministration\TeachPlanMap.cs" />
<Compile Include="EducationalAdministration\TeachSwitchMap.cs" />
<Compile Include="EducationalAdministration\Teach_attendanceMap.cs" />
<Compile Include="EducationalAdministration\TextBookIndentDetailMap.cs" />
<Compile Include="EducationalAdministration\TextBookIndentMap.cs" />
<Compile Include="EducationalAdministration\TextBookInfoMap.cs" />
<Compile Include="EducationalAdministration\TextBookInMap.cs" />
<Compile Include="EducationalAdministration\TextbookInOutMap.cs" />
<Compile Include="EducationalAdministration\TextBookOutMap.cs" />
<Compile Include="EducationalAdministration\TextBookSolSubDetailMap.cs" />
<Compile Include="EducationalAdministration\TextBookSolSubMap.cs" />
<Compile Include="EducationalAdministration\ThermographyMap.cs" />
<Compile Include="EducationalAdministration\VaccinationInfoMap.cs" />
<Compile Include="EvaluationTeach\Eval_MainMap.cs" />


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicBLL.cs View File

@@ -268,7 +268,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
TreeModel node = new TreeModel
{
id = item["classno"].ToString(),
id = item["classid"].ToString(),
text = item["classname"].ToString(),
value = item["classno"].ToString(),
showcheck = false,


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuInfoBasic/StuInfoBasicService.cs View File

@@ -500,7 +500,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
try
{
var ClassDiredctorNo = LoginUserInfo.Get().account;
return this.BaseRepository("CollegeMIS").FindTable($" SELECT * FROM dbo.ClassInfo where ClassDiredctorNo='{ClassDiredctorNo}' or ClassTutorNo='{ClassDiredctorNo}'");
return this.BaseRepository("CollegeMIS").FindTable($" SELECT * FROM dbo.ClassInfo where CheckMark=1 and (ClassDiredctorNo='{ClassDiredctorNo}' or ClassTutorNo='{ClassDiredctorNo}') ");
}
catch (Exception ex)
{


+ 6
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachingMaterial/TeachingMaterialEntity.cs View File

@@ -44,6 +44,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// </summary>
[Column("ADDTIME")]
public string AddTime { get; set; }
/// <summary>
/// 购买数量
/// </summary>
[Column("BUYSUM")]
public decimal BuySum { get; set; }

#endregion

#region 扩展操作


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

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

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

#region 获取数据

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

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

/// <summary>
/// 获取TextBookIn表RK明细
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public IEnumerable<TextBookInEntity> GetInEntity(string keyValue)
{
try
{
return textBookInService.GetInEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

#region 提交数据

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

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

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

#endregion

}
}

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

@@ -0,0 +1,135 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

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

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


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

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

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

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

#region 提交数据

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

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

}
}

+ 259
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIn/TextBookInService.cs View File

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

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

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

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

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

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
decimal? Num = 0;
var keyValueArr = keyValue.Split(',');
foreach (var item in keyValueArr)
{
var entity = BaseRepository("CollegeMIS").FindEntity<TextBookInEntity>(x => x.ID == item);
if (entity != null)
{
Num += entity.variate;
var InOutEntity = db.FindEntity<TextbookInOutEntity>(x => x.BookCode == entity.InOutCode);
if (InOutEntity != null)
{
InOutEntity.FinallyNum = InOutEntity.FinallyNum - Num;
if (InOutEntity.FinallyNum == 0 || InOutEntity.FinallyNum > 0)
{
db.Delete(entity);
db.Update(InOutEntity);
}
else
{
db.Rollback();
}
}
else
{
db.Rollback();
}
}
}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

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

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

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

}
}

+ 217
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndent/TextBookIndentBLL.cs View File

@@ -0,0 +1,217 @@
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);
}
}
}

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

#endregion

#region 提交数据

/// <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,List<TextBookIndentDetailEntity> textbookIndentDateil)
{
try
{
textBookIndentService.SaveEntity(keyValue, entity, textbookIndentDateil);
}
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

}
}

+ 146
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndent/TextBookIndentEntity.cs View File

@@ -0,0 +1,146 @@
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("TEXTBOOKNO")]
public string TextBookNo { get; set; }
/// <summary>
/// 教材名称
/// </summary>
[Column("TEXTBOOKNAME")]
public string TextBookName { get; set; }
/// <summary>
/// 第一作者
/// </summary>
[Column("FIRSTAUTHOR")]
public string FirstAuthor { get; set; }
/// <summary>
/// 其他作者
/// </summary>
[Column("OTHERAUTHOR")]
public string OtherAuthor { get; set; }

/// <summary>
/// 订购数量
/// </summary>
[Column("ORDERNUM")]
public int? OrderNum { get; set; }
/// <summary>
/// Remark
/// </summary>
[Column("REMARK")]
public string Remark { get; set; }
/// <summary>
///出版社
/// </summary>
[Column("PUBLISHER")]
public string Publisher { get; set; }
/// <summary>
/// 版次
/// </summary>
[Column("EDITION")]
public string Edition { get; set; }
/// <summary>
/// 单价
/// </summary>
[Column("PRICE")]
public decimal? Price { 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
}
}


+ 75
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndent/TextBookIndentIBLL.cs View File

@@ -0,0 +1,75 @@
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);

IEnumerable <TextBookIndentDetailEntity> TextBookIndentDetailList(string keyValue);

#endregion

#region 提交数据

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

/// <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

}
}

+ 340
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndent/TextBookIndentService.cs View File

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

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);
}
}
}

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

#region 提交数据

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

}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
public void SaveEntity(string keyValue, TextBookIndentEntity entity, List<TextBookIndentDetailEntity> textbookIndentDateil)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
db.Update(entity);
db.Delete<TextBookIndentDetailEntity>(t => t.IndentId == keyValue);
foreach (TextBookIndentDetailEntity item in textbookIndentDateil)
{
item.Create();
item.IndentId = keyValue;
db.Insert(item);
}
}
else
{
entity.Create();
db.Insert(entity);
foreach (TextBookIndentDetailEntity item in textbookIndentDateil)
{
item.Create();
item.IndentId = entity.ID;
db.Insert(item);
}
}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
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)
{
var db = this.BaseRepository("CollegeMIS");
try
{
db.BeginTrans();
var entity = this.BaseRepository("CollegeMIS").FindEntity<TextBookIndentEntity>(a => a.processId == processId);
entity.Status = pastatus;
db.Update(entity);

if (pastatus == 2)
{
//教材订单明细
var detailList = db.FindList<TextBookIndentDetailEntity>(x => x.IndentId == entity.ID);

//审核通过,添加征订数据
TextBookSolSubEntity textBookSolSub = new TextBookSolSubEntity();
textBookSolSub.Create();
textBookSolSub.TextBookIndentId = entity.ID;
textBookSolSub.DeptNo = entity.DeptNo;
textBookSolSub.MajorNo = entity.MajorNo;
textBookSolSub.LessonNo = entity.LessonNo;
textBookSolSub.AcademicYearNo = entity.AcademicYearNo;
textBookSolSub.Semester = entity.Semester;
textBookSolSub.PublishNo = entity.PublishNo;
textBookSolSub.TextBookNo = entity.TextBookNo;
textBookSolSub.TextBookName = entity.TextBookName;
textBookSolSub.FirstAuthor = entity.FirstAuthor;
textBookSolSub.OtherAuthor = entity.OtherAuthor;
textBookSolSub.OrderNum = entity.OrderNum;
textBookSolSub.Remark = entity.Remark;
textBookSolSub.Publisher = entity.Publisher;
textBookSolSub.Edition = entity.Edition;
textBookSolSub.Price = entity.Price;
textBookSolSub.ClassSum = entity.ClassSum;
db.Insert(textBookSolSub);

foreach (var detail in detailList)
{
TextBookSolSubDetailEntity textBookSolSubDetail = new TextBookSolSubDetailEntity();
textBookSolSubDetail.Create();
textBookSolSubDetail.SolSubId = textBookSolSub.ID;
textBookSolSubDetail.ClassNo = detail.ClassNo;
textBookSolSubDetail.TeachSum = detail.TeachSum;
textBookSolSubDetail.StuSum = detail.StuSum;
textBookSolSubDetail.Remark = detail.Remark;
db.Insert(textBookSolSubDetail);
}
}
db.Commit();
}
catch (Exception e)
{
db.Rollback();
if (e is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(e);
}
}

}
#endregion

}
}

+ 149
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndentDetail/TextBookIndentDetailBLL.cs View File

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

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-02-27 09:35
/// 描 述:TextBookIndentDetail
/// </summary>
public class TextBookIndentDetailBLL : TextBookIndentDetailIBLL
{
private TextBookIndentDetailService textBookIndentDetailService = new TextBookIndentDetailService();
private TextBookIndentService textBookIndentService = new TextBookIndentService();
#region 获取数据

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

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

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

#region 提交数据

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

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

#endregion

}
}

+ 128
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndentDetail/TextBookIndentDetailEntity.cs View File

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

{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-02-27 09:35
/// 描 述:TextBookIndentDetail
/// </summary>
public class TextBookIndentDetailEntity
{
#region 实体成员
/// <summary>
/// ID
/// </summary>
/// <returns></returns>
[Column("ID")]
public string ID { get; set; }
/// <summary>
/// IndentId
/// </summary>
/// <returns></returns>
[Column("INDENTID")]
public string IndentId { get; set; }
/// <summary>
/// DeptNo
/// </summary>
/// <returns></returns>
[Column("DEPTNO")]
public string DeptNo { get; set; }
/// <summary>
/// MajorNo
/// </summary>
/// <returns></returns>
[Column("MAJORNO")]
public string MajorNo { get; set; }
/// <summary>
/// ClassNo
/// </summary>
/// <returns></returns>
[Column("CLASSNO")]
public string ClassNo { get; set; }
/// <summary>
/// TeachSum
/// </summary>
/// <returns></returns>
[Column("TEACHSUM")]
public string TeachSum { get; set; }
/// <summary>
/// StuSum
/// </summary>
/// <returns></returns>
[Column("STUSUM")]
public string StuSum { get; set; }
/// <summary>
/// Price
/// </summary>
/// <returns></returns>
[Column("PRICE")]
public string Price { get; set; }
/// <summary>
/// BookNo
/// </summary>
/// <returns></returns>
[Column("BOOKNO")]
public string BookNo { get; set; }
/// <summary>
/// BooName
/// </summary>
/// <returns></returns>
[Column("BOONAME")]
public string BooName { get; set; }
/// <summary>
/// 出版号
/// </summary>
/// <returns></returns>
[Column("PUBLISHNO")]
public string PublishNo { get; set; }
/// <summary>
/// Remark
/// </summary>
/// <returns></returns>
[Column("REMARK")]
public string Remark { get; set; }
/// <summary>
/// CreateTime
/// </summary>
/// <returns></returns>
[Column("CREATETIME")]
public DateTime? CreateTime { get; set; }
/// <summary>
/// CreateUserID
/// </summary>
/// <returns></returns>
[Column("CREATEUSERID")]
public string CreateUserID { get; set; }
/// <summary>
/// LessonNo
/// </summary>
/// <returns></returns>
[Column("LESSONNO")]
public string LessonNo { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.ID = Guid.NewGuid().ToString();
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.ID = keyValue;
}
#endregion
}
}


+ 56
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndentDetail/TextBookIndentDetailIBLL.cs View File

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

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

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

#region 提交数据

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

}
}

+ 199
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookIndentDetail/TextBookIndentDetailService.cs View File

@@ -0,0 +1,199 @@
using Dapper;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-02-27 09:35
/// 描 述:TextBookIndentDetail
/// </summary>
public class TextBookIndentDetailService : RepositoryFactory
{
#region 构造函数和属性

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

#region 获取数据

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

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

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

#region 提交数据

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

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

#endregion

}
}

+ 169
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoBLL.cs View File

@@ -0,0 +1,169 @@
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-01-24 12:19
/// 描 述:教材信息管理
/// </summary>
public class TextBookInfoBLL : TextBookInfoIBLL
{
private TextBookInfoService textBookInfoService = new TextBookInfoService();

#region 获取数据

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

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

#endregion

#region 提交数据

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

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

#endregion

#region 扩展数据
/// <summary>
/// 启用或禁用
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="IsValid">状态</param>
public void EnabOrDisabEntity(string keyValue, string IsValid)
{
try
{
textBookInfoService.EnabOrDisabEntity(keyValue, IsValid);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

public TextBookInfoEntity GetRepetitions(string keyValue, string TextBookNo, string TextBookName, string PublishNo, string DeptNo, string Publisher, string TextBookNature, string TextBookType, string Edition, string Impression)
{
try
{
return textBookInfoService.GetRepetitions(keyValue, TextBookNo, TextBookName, PublishNo, DeptNo, Publisher, TextBookNature, TextBookType, Edition, Impression);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
}
}

+ 155
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoEntity.cs View File

@@ -0,0 +1,155 @@
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-01-24 12:19
/// 描 述:教材信息管理
/// </summary>
public class TextBookInfoEntity
{
#region 实体成员
/// <summary>
/// ID
/// </summary>
[Column("ID")]
public string ID { get; set; }
/// <summary>
/// 专业部
/// </summary>
[Column("DEPTNO")]
public string DeptNo { get; set; }
/// <summary>
/// 教材号
/// </summary>
[Column("TEXTBOOKNO")]
public string TextBookNo { get; set; }
/// <summary>
/// 教材名称
/// </summary>
[Column("TEXTBOOKNAME")]
public string TextBookName { get; set; }
/// <summary>
/// 出版号
/// </summary>
[Column("PUBLISHNO")]
public string PublishNo { get; set; }
/// <summary>
/// 第一作者
/// </summary>
[Column("FIRSTAUTHOR")]
public string FirstAuthor { get; set; }
/// <summary>
/// 其他作者
/// </summary>
[Column("OTHERAUTHOR")]
public string OtherAuthor { get; set; }
/// <summary>
/// 出版日期
/// </summary>
[Column("PUBDATE")]
public DateTime? Pubdate { get; set; }
/// <summary>
/// 出版社
/// </summary>
[Column("PUBLISHER")]
public string Publisher { get; set; }
/// <summary>
/// 教材类型
/// </summary>
[Column("TEXTBOOKTYPE")]
public string TextBookType { get; set; }
/// <summary>
/// 教材性质
/// </summary>
[Column("TEXTBOOKNATURE")]
public string TextBookNature { get; set; }
/// <summary>
/// 价格
/// </summary>
[Column("PRICE")]
public decimal? Price { get; set; }
/// <summary>
/// 版次
/// </summary>
[Column("EDITION")]
public string Edition { get; set; }
/// <summary>
/// 印次
/// </summary>
[Column("IMPRESSION")]
public string Impression { get; set; }
/// <summary>
/// 是否有练习册
/// </summary>
[Column("ISWORKBOOK")]
public bool? IsWorkBook { get; set; }
/// <summary>
/// 是否有教参教辅
/// </summary>
[Column("ISTEACHCONSULT")]
public bool? IsTeachConsult { get; set; }
/// <summary>
/// 内容简介
/// </summary>
[Column("DESCRIPTION")]
public string Description { get; set; }
/// <summary>
/// 是否有效
/// </summary>
[Column("ISVALID")]
public bool? IsValid { get; set; }
/// <summary>
/// Createdate
/// </summary>
[Column("CREATEDATE")]
public DateTime? Createdate { get; set; }
/// <summary>
/// Updatetime
/// </summary>
[Column("UPDATETIME")]
public DateTime? Updatetime { get; set; }
/// <summary>
/// CreateUserID
/// </summary>
[Column("CREATEUSERID")]
public string CreateUserID { get; set; }
/// <summary>
/// UpdateUserID
/// </summary>
[Column("UPDATEUSERID")]
public string UpdateUserID { get; set; }
/// <summary>
/// 删除 0 1
/// </summary>
public int? IsDel { 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
}
}


+ 69
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoIBLL.cs View File

@@ -0,0 +1,69 @@
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-01-24 12:19
/// 描 述:教材信息管理
/// </summary>
public interface TextBookInfoIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<TextBookInfoEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取TextBookInfo表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
TextBookInfoEntity GetTextBookInfoEntity(string keyValue);
#endregion

#region 提交数据

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

#region 扩展数据
/// <summary>
/// 启用或禁用
/// </summary>
/// <param name="keyValue"></param>
/// <param name="IsValid"></param>
void EnabOrDisabEntity(string keyValue, string IsValid);
/// <summary>
///
/// </summary>
/// <param name="TextBookName">名称</param>
/// <param name="PublishNo">出版号</param>
/// <param name="DeptNo">专业部</param>
/// <param name="Publisher"></param>
/// <param name="TextBookNature"></param>
/// <param name="TextBookType"></param>
/// <param name="Impression">版次</param>
/// <returns></returns>
TextBookInfoEntity GetRepetitions(string keyValue,string TextBookNo, string TextBookName, string PublishNo, string DeptNo, string Publisher, string TextBookNature, string TextBookType, string Edition, string Impression);

#endregion
}
}

+ 255
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookInfo/TextBookInfoService.cs View File

@@ -0,0 +1,255 @@
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-01-24 12:19
/// 描 述:教材信息管理
/// </summary>
public class TextBookInfoService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<TextBookInfoEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@" * ");
strSql.Append(" FROM TextBookInfo t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["TextBookName"].IsEmpty())
{
dp.Add("TextBookName", "%" + queryParam["TextBookName"].ToString() + "%", DbType.String);
strSql.Append(" AND t.TextBookName Like @TextBookName ");
}
if (!queryParam["DeptNo"].IsEmpty())
{
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String);
strSql.Append(" AND t.DeptNo = @DeptNo ");
}
if (!queryParam["TextBookType"].IsEmpty())
{
dp.Add("TextBookType", queryParam["TextBookType"].ToString(), DbType.String);
strSql.Append(" AND t.TextBookType = @TextBookType ");
}
if (!queryParam["TextBookNature"].IsEmpty())
{
dp.Add("TextBookNature", queryParam["TextBookNature"].ToString(), DbType.String);
strSql.Append(" AND t.TextBookNature = @TextBookNature ");
}

if (!queryParam["SqlParameter"].IsEmpty())
{
strSql.Append(queryParam["SqlParameter"].ToString());
}
return this.BaseRepository("CollegeMIS").FindList<TextBookInfoEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

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

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
var keyValueArr = keyValue.Split(',');
foreach (var item in keyValueArr)
{
var entity = BaseRepository("CollegeMIS").FindEntity<TextBookInfoEntity>(x => x.ID == item);
entity.IsDel = 1;
db.Update(entity);
}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

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

#endregion

#region 扩展数据
/// <summary>
/// 启用或禁用
/// </summary>
/// <param name="keyValue"></param>
public void EnabOrDisabEntity(string keyValue, string IsValid)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
var keyValueArr = keyValue.Split(',');
foreach (var item in keyValueArr)
{
var entity = BaseRepository("CollegeMIS").FindEntity<TextBookInfoEntity>(x => x.ID == item);
entity.IsValid = IsValid.ToString() == "1" ? true : false;
db.Update(entity);
}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
/// <summary>
/// 去重
/// </summary>
/// <param name="keyValue"></param>
/// <param name="TextBookNo"></param>
/// <param name="TextBookName"></param>
/// <param name="PublishNo"></param>
/// <param name="DeptNo"></param>
/// <param name="Publisher"></param>
/// <param name="TextBookNature"></param>
/// <param name="TextBookType"></param>
/// <param name="Edition"></param>
/// <param name="Impression"></param>
/// <returns></returns>
public TextBookInfoEntity GetRepetitions(string keyValue, string TextBookNo, string TextBookName, string PublishNo, string DeptNo, string Publisher, string TextBookNature, string TextBookType, string Edition, string Impression)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
return this.BaseRepository("CollegeMIS").FindEntity<TextBookInfoEntity>(
x => x.ID != keyValue && x.TextBookNo == TextBookNo && x.TextBookName == TextBookName && x.PublishNo == PublishNo &&
x.DeptNo == DeptNo && x.Publisher == Publisher && x.TextBookNature == TextBookNature && x.TextBookType == TextBookType
&& x.Edition == Edition && x.Impression == Impression && x.IsDel == 0);
}
else
{
return this.BaseRepository("CollegeMIS").FindEntity<TextBookInfoEntity>(
x => x.TextBookNo == TextBookNo && x.TextBookName == TextBookName && x.PublishNo == PublishNo &&
x.DeptNo == DeptNo && x.PublishNo == Publisher && x.TextBookNature == TextBookNature && x.TextBookType == TextBookType
&& x.Edition == Edition && x.Impression == Impression && x.IsDel == 0);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion
}
}

+ 167
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookOut/TextBookOutBLL.cs View File

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

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-05 11:17
/// 描 述:TextBookOut
/// </summary>
public class TextBookOutBLL : TextBookOutIBLL
{
private TextBookOutService textBookOutService = new TextBookOutService();

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<TextBookOutEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return textBookOutService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
public IEnumerable<TextBookOutEntity> GetListByCode(string code)
{
try
{
return textBookOutService.GetListByCode(code);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
/// <summary>
/// 获取TextBookOut表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public TextBookOutEntity GetTextBookOutEntity(string keyValue)
{
try
{
return textBookOutService.GetTextBookOutEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

#region 提交数据

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

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

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

#endregion

}
}

+ 160
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookOut/TextBookOutEntity.cs View File

@@ -0,0 +1,160 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-05 11:17
/// 描 述:TextBookOut
/// </summary>
public class TextBookOutEntity
{
#region 实体成员
/// <summary>
/// ID
/// </summary>
[Column("ID")]
public string ID { get; set; }
/// <summary>
/// InOutCode
/// </summary>
[Column("INOUTCODE")]
public string InOutCode { get; set; }
/// <summary>
/// BookCode
/// </summary>
[Column("BOOKCODE")]
public string BookCode { get; set; }
/// <summary>
/// AcademicYearNo
/// </summary>
[Column("ACADEMICYEARNO")]
public string AcademicYearNo { get; set; }
/// <summary>
/// Semester
/// </summary>
[Column("SEMESTER")]
public string Semester { get; set; }
/// <summary>
/// DeptNo
/// </summary>
[Column("DEPTNO")]
public string DeptNo { get; set; }
/// <summary>
/// MajorNo
/// </summary>
[Column("MAJORNO")]
public string MajorNo { get; set; }
/// <summary>
/// ClassNo
/// </summary>
[Column("CLASSNO")]
public string ClassNo { get; set; }
/// <summary>
/// 课程
/// </summary>
[Column("LESSONNO")]
public string LessonNo { get; set; }
/// <summary>
/// PublishNo
/// </summary>
[Column("PUBLISHNO")]
public string PublishNo { get; set; }
/// <summary>
/// 教材号
/// </summary>
[Column("TEXTBOOKNO")]
public string TextBookNo { get; set; }
/// <summary>
/// 教材名称
/// </summary>
[Column("TEXTBOOKNAME")]
public string TextBookName { get; set; }
/// <summary>
/// 第一作者
/// </summary>
[Column("FIRSTAUTHOR")]
public string FirstAuthor { get; set; }
/// <summary>
/// 其他作者
/// </summary>
[Column("OTHERAUTHOR")]
public string OtherAuthor { get; set; }
/// <summary>
/// 出版社
/// </summary>
[Column("PUBLISHER")]
public string Publisher { get; set; }
/// <summary>
/// 版次
/// </summary>
[Column("EDITION")]
public string Edition { get; set; }
/// <summary>
/// 印次
/// </summary>
[Column("IMPRESSION")]
public string Impression { get; set; }
/// <summary>
/// 创建人
/// </summary>
[Column("CREATETIME")]
public DateTime? CreateTime { get; set; }
/// <summary>
/// 创建版次
/// </summary>
[Column("CRATEUSERID")]
public string CrateUserID { get; set; }
/// <summary>
/// UpTime
/// </summary>
[Column("UPTIME")]
public DateTime? UpTime { get; set; }
/// <summary>
/// UpUserID
/// </summary>
[Column("UPUSERID")]
public string UpUserID { get; set; }
/// <summary>
/// Variate
/// </summary>
[Column("VARIATE")]
public decimal? Variate { get; set; }
/// <summary>
/// Recipient
/// </summary>
[Column("RECIPIENT")]
public string Recipient { get; set; }

/// <summary>
/// 备注
/// </summary>
[Column("REMARK")]
public string Remark { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.ID = keyValue;
}
#endregion
#region 扩展字段
#endregion
}
}


+ 57
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookOut/TextBookOutIBLL.cs View File

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

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

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<TextBookOutEntity> GetPageList(Pagination pagination, string queryJson);
IEnumerable<TextBookOutEntity> GetListByCode(string code);
/// <summary>
/// 获取TextBookOut表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
TextBookOutEntity GetTextBookOutEntity(string keyValue);
#endregion

#region 提交数据

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

#endregion

}
}

+ 292
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookOut/TextBookOutService.cs View File

@@ -0,0 +1,292 @@
using Dapper;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

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

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<TextBookOutEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.Id,
t.AcademicYearNo,
t.Semester,
t.DeptNo,
t.MajorNo,
t.ClassNo,
t.LessonNo,
t.Variate,
t.Recipient,
t.CreateTime,
t.CrateUserID
");
strSql.Append(" FROM TextBookOut 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["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["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["ClassNo"].IsEmpty())
{
dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String);
strSql.Append(" AND t.ClassNo = @ClassNo ");
}
if (!queryParam["LessonNo"].IsEmpty())
{
dp.Add("LessonNo", queryParam["LessonNo"].ToString(), DbType.String);
strSql.Append(" AND t.LessonNo = @LessonNo ");
}
if (!queryParam["Recipient"].IsEmpty())
{
dp.Add("Recipient", "%" + queryParam["Recipient"].ToString() + "%", DbType.String);
strSql.Append(" AND t.Recipient Like @Recipient ");
}
return this.BaseRepository("CollegeMIS").FindList<TextBookOutEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

public IEnumerable<TextBookOutEntity> GetListByCode(string code)
{
try
{
return this.BaseRepository("CollegeMIS").FindList<TextBookOutEntity>(x => x.InOutCode == code);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
/// <summary>
/// 获取TextBookOut表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public TextBookOutEntity GetTextBookOutEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<TextBookOutEntity>(x => x.InOutCode == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
decimal? Num = 0;
var keyValueArr = keyValue.Split(',');
foreach (var item in keyValueArr)
{
var entity = BaseRepository("CollegeMIS").FindEntity<TextBookOutEntity>(x => x.ID == item);
if (entity != null)
{
Num += entity.Variate;
var InOutEntity = db.FindEntity<TextbookInOutEntity>(x => x.BookCode == entity.InOutCode);
if (InOutEntity != null)
{
InOutEntity.FinallyNum += Num;
db.Delete(entity);
db.Update(InOutEntity);
}
else
{
db.Rollback();
}
}
}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

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

/// <summary>
/// 保存
/// </summary>
/// <param name="keyValue"></param>
/// <param name="entity">库存</param>
/// <param name="textbookIndentDateil"></param>
public void SaveEntity(string keyValue, TextbookInOutEntity entity, List<TextBookOutEntity> textbookOutList)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
var newtextInOutEntity = db.FindEntity<TextbookInOutEntity>(x => x.BookCode == entity.BookCode);
if (newtextInOutEntity != null)
{
decimal? variate = 0;//出库单数量之和,临时
for (int i = 0; i < textbookOutList.Count; i++)
{
textbookOutList[i].InOutCode = entity.BookCode;
textbookOutList[i].LessonNo = entity.LessonNo;
textbookOutList[i].PublishNo = entity.PublishNo;
textbookOutList[i].TextBookNo = entity.TextBookNo;
textbookOutList[i].TextBookName = entity.TextBookName;
textbookOutList[i].FirstAuthor = entity.FirstAuthor;
textbookOutList[i].OtherAuthor = entity.OtherAuthor;
textbookOutList[i].Publisher = entity.Publisher;
textbookOutList[i].Edition = entity.Edition;
textbookOutList[i].Impression = entity.Impression;
textbookOutList[i].Impression = entity.Impression;
variate += textbookOutList[i].Variate;
}
if (variate > 0 && newtextInOutEntity.FinallyNum >= variate)
{
//写入出库单
db.Insert(textbookOutList);
//更新出库
newtextInOutEntity.FinallyNum -= variate;
newtextInOutEntity.CKNum += variate;
db.Update(newtextInOutEntity);
}
}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

}
}

+ 150
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSub/TextBookSolSubBLL.cs View File

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

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-01 17:26
/// 描 述:教材征订管理
/// </summary>
public class TextBookSolSubBLL : TextBookSolSubIBLL
{
private TextBookSolSubService textBookSolSubService = new TextBookSolSubService();

#region 获取数据

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

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

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<TextBookSolSubEntity> GetStatistics(Pagination pagination, string queryJson)
{
try
{
return textBookSolSubService.GetStatistics(pagination, queryJson);
}
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
{
textBookSolSubService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

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

#endregion

}
}

+ 173
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSub/TextBookSolSubEntity.cs View File

@@ -0,0 +1,173 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-01 17:26
/// 描 述:教材征订管理
/// </summary>
public class TextBookSolSubEntity
{
#region 实体成员
/// <summary>
/// 主键
/// </summary>
[Column("ID")]
public string ID { get; set; }
/// <summary>
/// 教材订单表ID
/// </summary>
[Column("TEXTBOOKINDENTID")]
public string TextBookIndentId { get; set; }

/// <summary>
/// 专业部
/// </summary>
[Column("DEPTNO")]
public string DeptNo { get; set; }
/// <summary>
/// 专业
/// </summary>
[Column("MAJORNO")]
public string MajorNo { get; set; }
/// <summary>
/// ClassNo
/// </summary>
[Column("CLASSNO")]
public string ClassNo { 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("TEXTBOOKNO")]
public string TextBookNo { get; set; }
/// <summary>
/// 教材名称
/// </summary>
[Column("TEXTBOOKNAME")]
public string TextBookName { get; set; }
/// <summary>
/// 第一作者
/// </summary>
[Column("FIRSTAUTHOR")]
public string FirstAuthor { get; set; }
/// <summary>
/// 其他作者
/// </summary>
[Column("OTHERAUTHOR")]
public string OtherAuthor { get; set; }
/// <summary>
/// 订购数量
/// </summary>
[Column("ORDERNUM")]
public int? OrderNum { get; set; }
/// <summary>
/// Remark
/// </summary>
[Column("REMARK")]
public string Remark { get; set; }
/// <summary>
/// 出版社
/// </summary>
[Column("PUBLISHER")]
public string Publisher { get; set; }
/// <summary>
/// 版次
/// </summary>
[Column("EDITION")]
public string Edition { get; set; }
/// <summary>
/// Price
/// </summary>
[Column("PRICE")]
public decimal? Price { 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();
this.CreateTime = DateTime.Now;
this.CreateUserID = LoginUserInfo.Get().userId;
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.ID = keyValue;
}
#endregion

#region 扩展字段
[NotMapped]
public decimal? DGNum { get; set; }
[NotMapped]
public string Impression { get; set; }
[NotMapped]
public string TextBookType { get; set; }
[NotMapped]
public string TextBookNature { get; set; }
[NotMapped]
public string IsWorkBook { get; set; }
[NotMapped]
public string IsTeachConsult { get; set; }
[NotMapped]
public string Pubdate { get; set; }
#endregion
}
}


+ 55
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSub/TextBookSolSubIBLL.cs View File

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

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

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<TextBookSolSubEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取TextBookSolSub表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
TextBookSolSubEntity GetTextBookSolSubEntity(string keyValue);
/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<TextBookSolSubEntity> GetStatistics(Pagination pagination, string queryJson);

#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, TextBookSolSubEntity entity);
#endregion

}
}

+ 228
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSub/TextBookSolSubService.cs View File

@@ -0,0 +1,228 @@
using Dapper;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

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

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<TextBookSolSubEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.*
");
strSql.Append(" FROM TextBookSolSub 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<TextBookSolSubEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

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

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<TextBookSolSubEntity> GetStatistics(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append(@"select t.AcademicYearNo,t.Semester,tbi.PublishNo,t.TextBookName,t.Edition,t.Price,
t.FirstAuthor,t.OtherAuthor,tbi.Impression,tbi.TextBookType,tbi.TextBookNature,tbi.IsWorkBook,tbi.IsTeachConsult,tbi.Pubdate,tbi.Publisher,sum(OrderNum) as DGNum
");
strSql.Append(" from TextBookSolSub t left join TextBookInfo tbi on tbi. PublishNo =t.PublishNo ");
strSql.Append(" where 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
if (!queryParam["AcademicYearNo"].IsEmpty())
{
strSql.Append(" AND t.AcademicYearNo = " + queryParam["AcademicYearNo"].ToString() + " ");
}
if (!queryParam["Semester"].IsEmpty())
{
strSql.Append(" AND t.Semester = " + queryParam["Semester"].ToString() + " ");
}
if (!queryParam["TextBookName"].IsEmpty())
{
strSql.Append(" AND t.TextBookName like '%" + queryParam["TextBookName"].ToString() + "%' ");
}

strSql.Append(@" Group By t.AcademicYearNo,t.Semester,tbi.PublishNo,t.TextBookName,t.Edition,t.Price,
t.FirstAuthor,t.OtherAuthor,tbi.Impression,tbi.TextBookType,tbi.TextBookNature,tbi.IsWorkBook,tbi.IsTeachConsult,tbi.Pubdate,tbi.Publisher
");
return this.BaseRepository("CollegeMIS").FindList<TextBookSolSubEntity>(strSql.ToString(), pagination);
}
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<TextBookSolSubEntity>(t => t.ID == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

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

#endregion

}
}

+ 144
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSubDetail/TextBookSolSubDetailBLL.cs View File

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

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-02 09:29
/// 描 述:教材征订管理明细
/// </summary>
public class TextBookSolSubDetailBLL : TextBookSolSubDetailIBLL
{
private TextBookSolSubDetailService textBookSolSubDetailService = new TextBookSolSubDetailService();

#region 获取数据

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

public IEnumerable<TextBookSolSubDetailEntity> GetListBySolSubId(string SolSubId)
{
try
{
return textBookSolSubDetailService.GetListBySolSubId(SolSubId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

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

#endregion

#region 提交数据

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

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

#endregion

}
}

+ 70
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSubDetail/TextBookSolSubDetailEntity.cs View File

@@ -0,0 +1,70 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-03-02 09:29
/// 描 述:教材征订管理明细
/// </summary>
public class TextBookSolSubDetailEntity
{
#region 实体成员
/// <summary>
/// ID
/// </summary>
[Column("ID")]
public string ID { get; set; }
/// <summary>
/// SolSubId
/// </summary>
[Column("SOLSUBID")]
public string SolSubId { get; set; }
/// <summary>
/// ClassNo
/// </summary>
[Column("CLASSNO")]
public string ClassNo { get; set; }
/// <summary>
/// TeachSum
/// </summary>
[Column("TEACHSUM")]
public string TeachSum { get; set; }
/// <summary>
/// StuSum
/// </summary>
[Column("STUSUM")]
public string StuSum { get; set; }
/// <summary>
/// Remark
/// </summary>
[Column("REMARK")]
public string Remark { get; set; }
#endregion

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


+ 53
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSubDetail/TextBookSolSubDetailIBLL.cs View File

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

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

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<TextBookSolSubDetailEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <returns></returns>
IEnumerable<TextBookSolSubDetailEntity> GetListBySolSubId(string SolSubId);
/// <summary>
/// 获取TextBookSolSubDetail表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
TextBookSolSubDetailEntity GetTextBookSolSubDetailEntity(string keyValue);
#endregion

#region 提交数据

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

}
}

+ 164
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSubDetail/TextBookSolSubDetailService.cs View File

@@ -0,0 +1,164 @@
using Dapper;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

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

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

public IEnumerable<TextBookSolSubDetailEntity> GetListBySolSubId(string SolSubId)
{
try
{
return this.BaseRepository("CollegeMIS").FindList<TextBookSolSubDetailEntity>(x => x.SolSubId == SolSubId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

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

#endregion

#region 提交数据

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

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

#endregion

}
}

+ 235
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutBLL.cs View File

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

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

#region 获取数据

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

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

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

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

#region 提交数据

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

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

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

public int GetRepetitions(string keyValue, string LessonNo, string TextBookNo, string TextBookName, string PublishNo, string Publisher, string Edition, string Impression)
{
try
{
return textbookInOutService.GetRepetitions(keyValue, LessonNo, TextBookNo, TextBookName, PublishNo, Publisher, Edition, Impression);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

}
}

+ 189
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutEntity.cs View File

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

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

/// <summary>
/// 出库货入库
/// </summary>
[NotMapped]
public string CKORRK { get; set; }

/// <summary>
/// 累计出库
/// </summary>
/// <returns></returns>
[Column("CKNUM")]
public decimal? CKNum { get; set; }
/// <summary>
/// 累计入库
/// </summary>
/// <returns></returns>
[Column("RKNUM")]
public decimal? RKNum { 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
}
}


+ 87
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutIBLL.cs View File

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

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

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

#region 提交数据

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

/// <summary>
/// 去重
/// </summary>
/// <param name="keyValue"></param>
/// <param name="LessonNo"></param>
/// <param name="TextBookNo"></param>
/// <param name="TextBookName"></param>
/// <param name="PublishNo"></param>
/// <param name="Publisher"></param>
/// <param name="Edition"></param>
/// <param name="Impression"></param>
/// <returns></returns>
int GetRepetitions(string keyValue, string LessonNo, string TextBookNo, string TextBookName, string PublishNo, string Publisher, string Edition, string Impression);

#endregion

}
}

+ 367
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextbookInOut/TextbookInOutService.cs View File

@@ -0,0 +1,367 @@
using Dapper;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

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

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

/// <summary>
/// 获取列表分页数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">条件参数</param>
/// <returns></returns>
public IEnumerable<TextbookInOutEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT *");
strSql.Append(" FROM TextbookInOut t 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["SqlParameter"].IsEmpty())
{
string SqlParameter = queryParam["SqlParameter"].ToString();
strSql.Append(SqlParameter);
}
if (!queryParam["keyword"].IsEmpty())
{
strSql.Append(" and ( t.TextBookNo like @keyword or t.TextBookName like @keyword or t.FirstAuthor like @keyword )");
dp.Add("keyword", "%" + queryParam["keyword"].ToString() + "%", DbType.String);
}
if (!queryParam["TextBookName"].IsEmpty())
{
strSql.Append(" and t.TextBookName like @TextBookName ");
dp.Add("TextBookName", "%" + queryParam["TextBookName"].ToString() + "%", DbType.String);
}
if (!queryParam["TextBookNo"].IsEmpty())
{
strSql.Append(" and t.TextBookNo like @TextBookNo ");
dp.Add("TextBookNo", "%" + queryParam["TextBookNo"].ToString() + "%", DbType.String);
}
if (!queryParam["FirstAuthor"].IsEmpty())
{
strSql.Append(" and t.FirstAuthor like @FirstAuthor ");
dp.Add("FirstAuthor", "%" + queryParam["FirstAuthor"].ToString() + "%", DbType.String);
}
return this.BaseRepository("CollegeMIS").FindList<TextbookInOutEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public TextbookInOutEntity GetEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<TextbookInOutEntity>(x => x.ID == keyValue && x.IsDel == 0);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
/// <summary>
/// 获取实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public IEnumerable<TextbookInOutEntity> GetInOrOutEntity(string keyValue)
{
try
{
List<TextbookInOutEntity> returnList = new List<TextbookInOutEntity>();
//TextbookInOutEntity InOutList = new TextbookInOutEntity();
List<TextBookInEntity> InEntity = this.BaseRepository("CollegeMIS").FindList<TextBookInEntity>(x => x.InOutCode == keyValue).ToList();
List<TextBookOutEntity> OutEntity = this.BaseRepository("CollegeMIS").FindList<TextBookOutEntity>(x => x.InOutCode == keyValue).ToList();
if (InEntity.Count() > 0 || OutEntity.Count() > 0)
{
for (int i = 0; i < InEntity.Count(); i++)
{
TextbookInOutEntity InOutList = new TextbookInOutEntity();
InOutList.CKORRK = "入库";
InOutList.InorOut = InEntity[i].InOutCode;
InOutList.BookCode = InEntity[i].BookCode;
InOutList.variate = InEntity[i].variate;
InOutList.CreateTime = InEntity[i].CreateTime;
InOutList.CrateUserID = InEntity[i].CrateUserID;
InOutList.Remark = InEntity[i].Remark;
returnList.Add(InOutList);
}
for (int j = 0; j < OutEntity.Count(); j++)
{
TextbookInOutEntity InOutList = new TextbookInOutEntity();
InOutList.CKORRK = "出库";
InOutList.InorOut = OutEntity[j].InOutCode;
InOutList.BookCode = OutEntity[j].BookCode;
InOutList.variate = OutEntity[j].Variate;
InOutList.CreateTime = OutEntity[j].CreateTime;
InOutList.CrateUserID = OutEntity[j].CrateUserID;
InOutList.Remark = OutEntity[j].Remark;
returnList.Add(InOutList);
}
}
return returnList;
}
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)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
var keyValueArr = keyValue.Split(',');
foreach (var item in keyValueArr)
{
var entity = BaseRepository("CollegeMIS").FindEntity<TextbookInOutEntity>(x => x.ID == item);
entity.IsDel = 1;
db.Update(entity);
}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

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

/// <summary>
/// 提交
/// </summary>
/// <param name="keyValue"></param>
public void SubmitEntity(string keyValue)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
var keyValueArr = keyValue.Split(',');
foreach (var item in keyValueArr)
{
var entity = BaseRepository("CollegeMIS").FindEntity<TextbookInOutEntity>(x => x.ID == item);
entity.IsSubmit = 1;
//添加入库总数
entity.RKNum += entity.FinallyNum;
db.Update(entity);
#region 将本次记录保存出库单
TextBookInEntity InEntity = new TextBookInEntity
{
ID = Guid.NewGuid().ToString(),
BookCode = "RK" + DateTime.Now.ToString("yyyyMMddHHmmss"),
InOutCode = entity.BookCode,
LessonNo = entity.LessonNo,
PublishNo = entity.PublishNo,
TextBookNo = entity.TextBookNo,
TextBookName = entity.TextBookName,
FirstAuthor = entity.FirstAuthor,
OtherAuthor = entity.OtherAuthor,
Pubdate = entity.Pubdate,
Publisher = entity.Publisher,
Edition = entity.Edition,
Impression = entity.Impression,
variate = entity.FinallyNum,
CreateTime = DateTime.Now,
CrateUserID = "system",
Remark = "初始数据删除需谨慎"
};
#endregion
db.Insert(InEntity);
}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

/// <summary>
/// 去重
/// </summary>
/// <param name="keyValue"></param>
/// <param name="TextBookNo"></param>
/// <param name="TextBookName"></param>
/// <param name="PublishNo"></param>
/// <param name="Publisher"></param>
/// <param name="Edition"></param>
/// <param name="Impression"></param>
/// <returns></returns>
public int GetRepetitions(string keyValue, string LessonNo, string TextBookNo, string TextBookName, string PublishNo, string Publisher, string Edition, string Impression)
{
try
{
var HistoryList = new List<TextbookInOutEntity>();

if (!string.IsNullOrEmpty(keyValue))
{
HistoryList = BaseRepository("CollegeMIS").FindList<TextbookInOutEntity>(
x => x.ID == keyValue && x.LessonNo == LessonNo && x.TextBookNo == TextBookNo && x.TextBookName == TextBookName && x.PublishNo == PublishNo &&
x.Publisher == Publisher && x.Edition == Edition && x.Impression == Impression && x.IsDel == 0).ToList();
}
else
{
HistoryList = BaseRepository("CollegeMIS").FindList<TextbookInOutEntity>(
x => x.LessonNo == LessonNo && x.TextBookNo == TextBookNo && x.TextBookName == TextBookName && x.PublishNo == PublishNo &&
x.Publisher == Publisher && x.Edition == Edition && x.Impression == Impression && x.IsDel == 0).ToList();
}

return HistoryList.Count;
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
}
}

+ 32
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj View File

@@ -128,6 +128,38 @@
<Compile Include="EducationalAdministration\StuSelectLessonListOfElectiveOnline\StuSelectLessonListOfElectiveOnlineEntity.cs" />
<Compile Include="EducationalAdministration\StuSelectLessonListOfElectiveOnline\StuSelectLessonListOfElectiveOnlineIBLL.cs" />
<Compile Include="EducationalAdministration\StuSelectLessonListOfElectiveOnline\StuSelectLessonListOfElectiveOnlineService.cs" />
<Compile Include="EducationalAdministration\TextBookIndentDetail\TextBookIndentDetailBLL.cs" />
<Compile Include="EducationalAdministration\TextBookIndentDetail\TextBookIndentDetailEntity.cs" />
<Compile Include="EducationalAdministration\TextBookIndentDetail\TextBookIndentDetailIBLL.cs" />
<Compile Include="EducationalAdministration\TextBookIndentDetail\TextBookIndentDetailService.cs" />
<Compile Include="EducationalAdministration\TextBookIndent\TextBookIndentBLL.cs" />
<Compile Include="EducationalAdministration\TextBookIndent\TextBookIndentEntity.cs" />
<Compile Include="EducationalAdministration\TextBookIndent\TextBookIndentIBLL.cs" />
<Compile Include="EducationalAdministration\TextBookIndent\TextBookIndentService.cs" />
<Compile Include="EducationalAdministration\TextBookInfo\TextBookInfoBLL.cs" />
<Compile Include="EducationalAdministration\TextBookInfo\TextBookInfoEntity.cs" />
<Compile Include="EducationalAdministration\TextBookInfo\TextBookInfoIBLL.cs" />
<Compile Include="EducationalAdministration\TextBookInfo\TextBookInfoService.cs" />
<Compile Include="EducationalAdministration\TextbookInOut\TextbookInOutBLL.cs" />
<Compile Include="EducationalAdministration\TextbookInOut\TextbookInOutEntity.cs" />
<Compile Include="EducationalAdministration\TextbookInOut\TextbookInOutIBLL.cs" />
<Compile Include="EducationalAdministration\TextbookInOut\TextbookInOutService.cs" />
<Compile Include="EducationalAdministration\TextBookIn\TextBookInBLL.cs" />
<Compile Include="EducationalAdministration\TextBookIn\TextBookInEntity.cs" />
<Compile Include="EducationalAdministration\TextBookIn\TextBookInIBLL.cs" />
<Compile Include="EducationalAdministration\TextBookIn\TextBookInService.cs" />
<Compile Include="EducationalAdministration\TextBookOut\TextBookOutBLL.cs" />
<Compile Include="EducationalAdministration\TextBookOut\TextBookOutEntity.cs" />
<Compile Include="EducationalAdministration\TextBookOut\TextBookOutIBLL.cs" />
<Compile Include="EducationalAdministration\TextBookOut\TextBookOutService.cs" />
<Compile Include="EducationalAdministration\TextBookSolSubDetail\TextBookSolSubDetailBLL.cs" />
<Compile Include="EducationalAdministration\TextBookSolSubDetail\TextBookSolSubDetailEntity.cs" />
<Compile Include="EducationalAdministration\TextBookSolSubDetail\TextBookSolSubDetailIBLL.cs" />
<Compile Include="EducationalAdministration\TextBookSolSubDetail\TextBookSolSubDetailService.cs" />
<Compile Include="EducationalAdministration\TextBookSolSub\TextBookSolSubBLL.cs" />
<Compile Include="EducationalAdministration\TextBookSolSub\TextBookSolSubEntity.cs" />
<Compile Include="EducationalAdministration\TextBookSolSub\TextBookSolSubIBLL.cs" />
<Compile Include="EducationalAdministration\TextBookSolSub\TextBookSolSubService.cs" />
<Compile Include="EducationalAdministration\YKTStateMent\YKTStateMentBLL.cs" />
<Compile Include="EducationalAdministration\YKTStateMent\DoorEntity.cs" />
<Compile Include="EducationalAdministration\YKTStateMent\YKTStateMentEntity.cs" />


+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/ADR_Record/ADR_RecordService.cs View File

@@ -317,7 +317,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
UserName = item.UserName,
Department = item.Department,
ClockDate = date,
BanCi = "上午上下班",
BanCi = "上午",
TimePeriodNo = 1,
TimePeriod = string.Format("上午上下班({0}-{1})", restrictionEntity?.WorkTime, restrictionEntity?.NoonCloseTime),
ADStatusWork = adtype1 != null ? adtype1.ClockStatus : "6",
@@ -339,7 +339,7 @@ namespace Learun.Application.TwoDevelopment.LogisticsManagement
UserName = item.UserName,
Department = item.Department,
ClockDate = date,
BanCi = "下午上下班",
BanCi = "下午",
TimePeriodNo = 2,
TimePeriod = string.Format("下午上下班({0}-{1})", restrictionEntity?.NoonWorkTime, restrictionEntity?.CloseTime),
ADStatusWork = adtype7 != null ? adtype7.ClockStatus : "6",


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj View File

@@ -130,6 +130,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\WfMethodParameter.cs" />
<Compile Include="NodeMethod\WF\WFFileRelease.cs" />
<Compile Include="Node\WfForm.cs" />


+ 28
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/TextBookIndentMethod.cs View File

@@ -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);
}
}
}
}

+ 2
- 2
Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js View File

@@ -7,9 +7,9 @@ export default {
"enableSignUp": true,
//请求数据的接口地址;可以配置多个,开发环境下登录页会出现选择菜单供您选择
"apiHost": [
"http://192.168.1.5:8001/"
"http://124.117.225.118:8001/"
],
"webHost":"http://192.168.1.5:8002/",
"webHost":"http://10.10.200.1:8000/",
//学校测试环境地址:
// "apiHost": [
// "http://218.84.232.3:9003/"


+ 3
- 3
Learun.Framework.Ultimate V7/LearunApp-2.2.0/manifest.json View File

@@ -1,9 +1,9 @@
{
"name" : "智慧校园",
"appid" : "__UNI__E4958C9",
"appid" : "__UNI__7C24C09",
"description" : "智慧校园移动端",
"versionName" : "2.1.0",
"versionCode" : 20100,
"versionName" : "2.1.1",
"versionCode" : 20101,
"transformPx" : false,
/* 5+App特有相关 */
"app-plus" : {


Loading…
Cancel
Save