Commit ff45a488 authored by 黄奎's avatar 黄奎

页面修改

parent d6efdb68
using Edu.Model.Entity.Course;
using Edu.Model.Entity.Sell;
using Edu.Model.ViewModel.Course;
using Edu.Model.Entity.Sell;
using Edu.Model.ViewModel.Sell;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
......@@ -32,11 +29,11 @@ namespace Edu.Repository.BackClass
SELECT A.*,C.GuestName, D.ClassName,E.CourseName,F.TeacherName,G.RoomName,C.GuestState,H.StartTime,H.EndTime,H.TimeHour
FROM RB_Student_Makeup AS A LEFT JOIN rb_class_check AS B ON A.ClassCheckId=B.ClassCheckId
LEFT JOIN rb_order_guest AS C ON A.OrderGuestId=C.Id
LEFT JOIN rb_class AS D ON A.ClassId=D.ClassId
LEFT JOIN rb_course AS E ON D.CouseId=E.CourseId
LEFT JOIN rb_teacher AS F ON B.TeacherId=F.TId
LEFT JOIN rb_class_room AS G ON B.ClassRoomId=G.RoomId
LEFT JOIN rb_class_time AS H ON B.ClassTimeId=H.ClassTimeId
LEFT JOIN rb_class AS D ON A.ClassId=D.ClassId
LEFT JOIN rb_course AS E ON D.CouseId=E.CourseId
LEFT JOIN rb_teacher AS F ON B.TeacherId=F.TId
LEFT JOIN rb_class_room AS G ON B.ClassRoomId=G.RoomId
LEFT JOIN rb_class_time AS H ON B.ClassTimeId=H.ClassTimeId
WHERE 1=1 and B.CheckStatus IN(1,2)
");
if (query != null)
......@@ -163,4 +160,4 @@ WHERE 1=1
return base.Exists("Id", whereHelpers);
}
}
}
}
\ No newline at end of file
......@@ -39,4 +39,4 @@ WHERE 1=1
return Get<RB_Personnel_BonusDetail_Extend>(builder.ToString()).ToList();
}
}
}
}
\ No newline at end of file
......@@ -73,5 +73,4 @@ WHERE 1=1
return newId > 0;
}
}
}
}
\ No newline at end of file
......@@ -28,7 +28,6 @@ namespace Edu.Repository.Bonus
public List<RB_Personnel_Bonus_Extend> GetPersonnelBonusPageRepository(int pageIndex,int pageSize,out long rowsCount, RB_Personnel_Bonus_Extend query)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT A.*
FROM RB_Personnel_Bonus AS A
......@@ -66,7 +65,6 @@ WHERE 1=1
public List<RB_Personnel_Bonus_Extend> GetPersonnelBonusListRepository(RB_Personnel_Bonus_Extend query,bool isGetDetail=false)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT A.*
FROM RB_Personnel_Bonus AS A
......@@ -137,6 +135,5 @@ WHERE 1=1
string sql = string.Format(@" UPDATE RB_Personnel_Bonus SET IsIssue=1 WHERE Id IN({0})", Ids);
return base.Execute(sql) > 0;
}
}
}
}
\ No newline at end of file
using Edu.Common.Enum;
using Edu.Model.Entity.Contract;
using Edu.Model.Entity.Course;
using Edu.Model.Entity.Contract;
using Edu.Model.ViewModel.Contract;
using Edu.Model.ViewModel.Course;
using Edu.Repository.User;
using System;
using System.Collections.Generic;
......@@ -293,7 +290,6 @@ left join {datebaseStr}.rb_tradeway t on f.FrID = t.FinanceId
return GetPage<RB_Education_Contract_ViewModel>(pageIndex, pageSize, out rowsCount, sql, parameters).ToList();
}
/// <summary>
/// 获取分页列表
/// </summary>
......@@ -368,82 +364,6 @@ left join {datebaseStr}.rb_tradeway t on f.FrID = t.FinanceId
return GetPage<RB_Education_Contract_ViewModel>(pageIndex, pageSize, out rowsCount, sql, parameters).ToList();
}
/// <summary>
/// 获取分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="demodel"></param>
/// <param name="orderIds"></param>
/// <returns></returns>
public List<RB_Education_Contract_ViewModel> GetEducationContractPageListRepository_V3(int pageIndex, int pageSize, out long rowsCount, RB_Education_Contract_ViewModel demodel)
{
DynamicParameters parameters = new DynamicParameters();
string where = $@" 1=1";
if (demodel.Group_Id > 0)
{
where += $@" AND {nameof(RB_Education_Contract_ViewModel.Group_Id)} ={demodel.Group_Id}";
}
if (demodel.School_Id > 0)
{
where += $@" AND {nameof(RB_Education_Contract_ViewModel.School_Id)} ={demodel.School_Id}";
}
if (demodel.OrderId > 0)
{
where += $@" AND {nameof(RB_Education_Contract_ViewModel.OrderId)} ={demodel.OrderId}";
}
if (demodel.CType > 0)
{
where += $@" AND {nameof(RB_Education_Contract_ViewModel.CType)} ={(int)demodel.CType}";
}
if (!string.IsNullOrEmpty(demodel.ContractNo))
{
where += $@" AND {nameof(RB_Education_Contract_ViewModel.ContractNo)} LIKE @ContractNo ";
parameters.Add("ContractNo", "%" + demodel.ContractNo.Trim() + "%");
}
if (!string.IsNullOrEmpty(demodel.StudentName))
{
where += $@" AND {nameof(RB_Education_Contract_ViewModel.StudentName)} LIKE @StudentName ";
parameters.Add("StudentName", "%" + demodel.StudentName.Trim() + "%");
}
if (demodel.IsAduit == 1)
{
if (demodel.Status >= 0)
{
if (demodel.Status == 5)
{
where += $@" AND {nameof(RB_Education_Contract_ViewModel.Status)} in( 5,2)";
}
else
{
where += $@" AND {nameof(RB_Education_Contract_ViewModel.Status)} ={demodel.Status}";
}
}
else
{
where += $@" AND {nameof(RB_Education_Contract_ViewModel.Status)} NOT IN(0,4) ";
}
}
else
{
if (demodel.CreateBy > 0)
{
where += $@" AND {nameof(RB_Education_Contract_ViewModel.CreateBy)} ={demodel.CreateBy}";
}
if (demodel.Status >= 0)
{
where += $@" AND {nameof(RB_Education_Contract_ViewModel.Status)} ={demodel.Status}";
}
}
string sql = $@" SELECT * FROM RB_Education_Contract WHERE {where} ORDER BY Id DESC ";
return GetPage<RB_Education_Contract_ViewModel>(pageIndex, pageSize, out rowsCount, sql, parameters).ToList();
}
/// <summary>
/// 根据学生id获取学生的有效合同信息
/// </summary>
......
......@@ -26,7 +26,7 @@ SELECT A.*,IFNULL(B.CateName,'') AS CateName
FROM RB_Course AS A LEFT JOIN rb_course_category AS B ON A.CateId=B.CateId
WHERE 1=1
");
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Course_ViewModel.Status), (int)DateStateEnum.Normal);
if (query != null)
{
......@@ -80,7 +80,7 @@ WHERE 1=1
//所属科目
if (query.CourseSubject > 0)
{
builder.AppendFormat(" AND A.{0} IN({1}) ", nameof(RB_Course_ViewModel.CourseSubject),query.CourseSubject);
builder.AppendFormat(" AND A.{0} IN({1}) ", nameof(RB_Course_ViewModel.CourseSubject), query.CourseSubject);
}
}
return Get<RB_Course_ViewModel>(builder.ToString(), parameters).ToList();
......@@ -105,8 +105,6 @@ FROM RB_Course AS A LEFT JOIN rb_course_category AS B ON A.CateId=B.CateId
WHERE 1=1
");
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Course_ViewModel.Group_Id), query.Group_Id);
//builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Course_ViewModel.School_Id), query.School_Id);
if (query != null)
{
if ((int)query.Status > -1)
......@@ -156,14 +154,14 @@ WHERE 1=1
builder.AppendFormat(" AND A.{0} IN({1}) ", nameof(RB_Course_ViewModel.CourseSubject), (int)query.CourseSubject);
}
}
return GetPage<RB_Course_ViewModel>(pageIndex, pageSize, out rowsCount, builder.ToString(), parameters).ToList();
return GetPage<RB_Course_ViewModel>(pageIndex, pageSize, out rowsCount, builder.ToString(), parameters).ToList();
}
/// <summary>
/// 查询所有正常课程的章节信息
/// </summary>
/// <returns></returns>
public List<RB_Course_ViewModel> GetCourseAllChapterCount(int groupId,int courseId)
public List<RB_Course_ViewModel> GetCourseAllChapterCount(int groupId, int courseId)
{
StringBuilder sql = new StringBuilder("select CourseId,CourseName,(select Count(0) from rb_course_chapter b where b.CourseId=a.CourseId and ParentId=0 and b.`Status`=0) as UnitCount,(select Count(0) from rb_course_chapter b where b.CourseId=a.CourseId and ParentId>0 and b.`Status`=0) as ChapterCount from rb_course a where Status=0");
sql.AppendFormat(" AND a.{0}={1} ", nameof(RB_Course_ViewModel.Group_Id), groupId);
......
......@@ -40,7 +40,6 @@ WHERE 1=1
builder.AppendFormat(" AND {0} IN({1}) ", nameof(RB_Course_Notice_ViewModel.CourseId), query.CourseIds);
}
}
return GetPage<RB_Course_Notice_ViewModel>(pageIndex, pageSize, out rowsCount, builder.ToString(), parameters).ToList();
}
}
......
......@@ -43,10 +43,6 @@ WHERE 1=1
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Course_Offer_ViewModel.Group_Id), query.Group_Id);
}
if (query.School_Id > 0)
{
//builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Course_Offer_ViewModel.School_Id), query.School_Id);
}
if (!string.IsNullOrEmpty(query.Name))
{
builder.AppendFormat(" AND A.{0} LIKE @Name ", nameof(RB_Course_Offer_ViewModel.Name));
......@@ -134,10 +130,6 @@ WHERE 1=1
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Course_Offer_ViewModel.Group_Id), query.Group_Id);
}
if (query.School_Id > 0)
{
//builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Course_Offer_ViewModel.School_Id), query.School_Id);
}
if (!string.IsNullOrEmpty(query.Name))
{
builder.AppendFormat(" AND A.{0} LIKE @Name ", nameof(RB_Course_Offer_ViewModel.Name));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment