Kaynağa Gözat

教材征订统计管理 未完成

临城职教中职
ndbs 2 yıl önce
ebeveyn
işleme
74d567368b
7 değiştirilmiş dosya ile 300 ekleme ve 2 silme
  1. +32
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookSolSubController.cs
  2. +38
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSolSub/StatisticsIndex.cshtml
  3. +126
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSolSub/StatisticsIndex.js
  4. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  5. +25
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSub/TextBookSolSubBLL.cs
  6. +7
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSub/TextBookSolSubIBLL.cs
  7. +70
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSub/TextBookSolSubService.cs

+ 32
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookSolSubController.cs Dosyayı Görüntüle

@@ -38,6 +38,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
return View();
}
/// <summary>
/// 表单页
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult StatisticsIndex()
{
return View();
}
#endregion

#region 获取数据
@@ -81,6 +90,29 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
};
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 提交数据


+ 38
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSolSub/StatisticsIndex.cshtml Dosyayı Görüntüle

@@ -0,0 +1,38 @@
@{
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="DeptNo"></div>
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">学年</div>
<div id="Grade"></div>
</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")

+ 126
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSolSub/StatisticsIndex.js Dosyayı Görüntüle

@@ -0,0 +1,126 @@
/* * 版 本 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);
$('#DeptNo').lrselect({
allowSearch: true,
value: "deptno",
text: "deptname",
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo',
});
$('#Grade').lrselect({
url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetYearListByClass',
value: "year",
text: "year",
});
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
url: top.$.rootUrl + '/EducationalAdministration/TextBookSolSub/GetStatistics',
headData: [
{
{ label: "教材号", name: "TextBookNo", width: 150, align: "left" },
{ label: "教材名称", name: "TextBookName", width: 150, align: "left" },
{ label: "出版号", name: "PublishNo", width: 100, align: "left" },
{
label: "专业部", name: "DeptNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
key: value,
keyId: 'deptno',
callback: function (_data) {
callback(_data['deptname']);
}
});
}
},
{ label: "第一作者", name: "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: "Description", width: 100, align: "left" },
{ label: "备注", name: "Remark", width: 200, align: "left" },

],
mainId: 'DeptNo',
sidx: 'DeptNo asc,MajorNo desc,Grade desc',
isPage: false,
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Dosyayı Görüntüle

@@ -1204,6 +1204,7 @@
<Content Include="Areas\EducationalAdministration\Views\TextBookOut\FormDelete.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookOut\FormView.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookOut\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\TextBookSolSub\StatisticsIndex.js" />
<Content Include="Areas\EducationalAdministration\Views\Thermography\IndexResult.js" />
<Content Include="Areas\EducationalAdministration\Views\Thermography\StatisticIndex.js" />
<Content Include="Areas\EducationalAdministration\Views\Thermography\SubmitIndex.js" />
@@ -7680,6 +7681,7 @@
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPass\IndexUnpass.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPassTwo\IndexUnpassTwo.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuScore\AllStuScoreQueryIndex.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" />


+ 25
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSub/TextBookSolSubBLL.cs Dosyayı Görüntüle

@@ -67,6 +67,31 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

/// <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 提交数据


+ 7
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSub/TextBookSolSubIBLL.cs Dosyayı Görüntüle

@@ -27,6 +27,13 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <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 提交数据


+ 70
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSub/TextBookSolSubService.cs Dosyayı Görüntüle

@@ -75,7 +75,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
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);
return this.BaseRepository("CollegeMIS").FindList<TextBookSolSubEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
@@ -114,6 +114,74 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

/// <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 ");
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);
}
}
}
#endregion

#region 提交数据
@@ -126,7 +194,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
try
{
this.BaseRepository("CollegeMIS").Delete<TextBookSolSubEntity>(t=>t.ID == keyValue);
this.BaseRepository("CollegeMIS").Delete<TextBookSolSubEntity>(t => t.ID == keyValue);
}
catch (Exception ex)
{


Yükleniyor…
İptal
Kaydet