diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookSolSubController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookSolSubController.cs
index b451ecda3..80cd56936 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookSolSubController.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookSolSubController.cs
@@ -112,7 +112,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
};
return Success(jsonData);
}
-
+
#endregion
#region 提交数据
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSolSub/StatisticsIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSolSub/StatisticsIndex.cshtml
index 78e7028cd..3ce0feaa1 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSolSub/StatisticsIndex.cshtml
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSolSub/StatisticsIndex.cshtml
@@ -11,12 +11,16 @@
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSolSub/StatisticsIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSolSub/StatisticsIndex.js
index d3d909bd4..521c7eb4b 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSolSub/StatisticsIndex.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSolSub/StatisticsIndex.js
@@ -16,16 +16,20 @@ var bootstrap = function ($, learun) {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
- $('#DeptNo').lrselect({
+ $('#AcademicYearNo').lrselect({
+ placeholder: "请选择学年",
allowSearch: true,
- value: "deptno",
- text: "deptname",
- url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=CdDeptInfo',
+ url: top.$.rootUrl + '/EducationalAdministration/TextBookIndent/GetAcademicYear',
+ value: 'value',
+ text: 'text'
});
- $('#Grade').lrselect({
- url: top.$.rootUrl + '/EducationalAdministration/StuEnroll/GetYearListByClass',
- value: "year",
- text: "year",
+ //学期
+ $('#Semester').lrselect({
+ placeholder: "请选择学期",
+ allowSearch: true,
+ url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
+ value: 'value',
+ text: 'text'
});
// 刷新
$('#lr_refresh').on('click', function () {
@@ -34,26 +38,11 @@ var bootstrap = function ($, learun) {
},
// 初始化列表
initGird: function () {
- $('#gridtable').lrAuthorizeJfGrid({
+ $('#gridtable').lrAuthorizeJfGridLei({
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" },
{
@@ -87,30 +76,29 @@ var bootstrap = function ($, learun) {
});
}
},
- { label: "价格", name: "Price", width: 60, align: "left" },
+ { 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",
+ label: "练习册", name: "IsWorkBook", width: 100, align: "left",
formatter: function (cellvalue) {
return cellvalue == true ? "是" :
"否";
}
},
{
- label: "是否有教参教辅", name: "IsTeachConsult", width: 100, align: "left",
+ label: "教参教辅", name: "IsTeachConsult", width: 100, align: "left",
formatter: function (cellvalue) {
return cellvalue == true ? "是" :
"否";
}
},
{ label: "内容简介", name: "Description", width: 100, align: "left" },
- { label: "备注", name: "Remark", width: 200, align: "left" },
-
+ { label: "订购数量", name: "DGNum", width: 200, align: "left" }
],
- mainId: 'DeptNo',
- sidx: 'DeptNo asc,MajorNo desc,Grade desc',
- isPage: false,
+ mainId: 'PublishNo',
+ sidx: 'PublishNo desc',
+ isPage: true
});
page.search();
},
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSub/TextBookSolSubEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSub/TextBookSolSubEntity.cs
index 8cce770b2..d4ca97e9b 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSub/TextBookSolSubEntity.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSub/TextBookSolSubEntity.cs
@@ -24,7 +24,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
///
[Column("TEXTBOOKINDENTID")]
public string TextBookIndentId { get; set; }
-
+
///
/// 专业部
///
@@ -151,7 +151,22 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
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
}
}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSub/TextBookSolSubService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSub/TextBookSolSubService.cs
index 86db55286..69f5bedad 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSub/TextBookSolSubService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSub/TextBookSolSubService.cs
@@ -125,50 +125,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
try
{
var strSql = new StringBuilder();
- strSql.Append("SELECT ");
- strSql.Append(@" t.* ");
- strSql.Append(" FROM TextBookSolSub t ");
- strSql.Append(" WHERE 1=1 ");
+ 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();
// 虚拟参数
- 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 ");
+ strSql.Append(" AND t.AcademicYearNo = " + queryParam["AcademicYearNo"].ToString() + " ");
}
if (!queryParam["Semester"].IsEmpty())
{
- dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String);
- strSql.Append(" AND t.Semester = @Semester ");
+ strSql.Append(" AND t.Semester = " + queryParam["Semester"].ToString() + " ");
}
- if (!queryParam["PublishNo"].IsEmpty())
+ if (!queryParam["TextBookName"].IsEmpty())
{
- dp.Add("PublishNo", "%" + queryParam["PublishNo"].ToString() + "%", DbType.String);
- strSql.Append(" AND t.PublishNo Like @PublishNo ");
+ strSql.Append(" AND t.TextBookName like '%" + queryParam["TextBookName"].ToString() + "%' ");
}
- return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination);
+
+ 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(strSql.ToString(), pagination);
}
catch (Exception ex)
{