Pārlūkot izejas kodu

教材征订汇总功能

临城职教中职
ndbs pirms 2 gadiem
vecāks
revīzija
d4430b906a
5 mainītis faili ar 59 papildinājumiem un 72 dzēšanām
  1. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookSolSubController.cs
  2. +8
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSolSub/StatisticsIndex.cshtml
  3. +20
    -32
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSolSub/StatisticsIndex.js
  4. +16
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSub/TextBookSolSubEntity.cs
  5. +14
    -34
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSub/TextBookSolSubService.cs

+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/TextBookSolSubController.cs Parādīt failu

@@ -112,7 +112,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
};
return Success(jsonData);
}
#endregion

#region 提交数据


+ 8
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSolSub/StatisticsIndex.cshtml Parādīt failu

@@ -11,12 +11,16 @@
<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 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="Grade"></div>
<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>


+ 20
- 32
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/TextBookSolSub/StatisticsIndex.js Parādīt failu

@@ -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 ? "<span class=\"label label-success\">是</span>" :
"<span class=\"label label-danger\">否</span>";
}
},
{
label: "是否有教参教辅", name: "IsTeachConsult", width: 100, align: "left",
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" },

{ 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();
},


+ 16
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSub/TextBookSolSubEntity.cs Parādīt failu

@@ -24,7 +24,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// </summary>
[Column("TEXTBOOKINDENTID")]
public string TextBookIndentId { get; set; }
/// <summary>
/// 专业部
/// </summary>
@@ -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
}
}


+ 14
- 34
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TextBookSolSub/TextBookSolSubService.cs Parādīt failu

@@ -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<TextBookSolSubEntity>(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<TextBookSolSubEntity>(strSql.ToString(), pagination);
}
catch (Exception ex)
{


Notiek ielāde…
Atcelt
Saglabāt