Commit 2edee6e7 authored by liudong1993's avatar liudong1993

教育调整

parent 91cc79ad
...@@ -24,6 +24,11 @@ namespace Edu.Model.ViewModel.Course ...@@ -24,6 +24,11 @@ namespace Edu.Model.ViewModel.Course
/// </summary> /// </summary>
public string ClassName { get; set; } public string ClassName { get; set; }
/// <summary>
/// 班级所属学校
/// </summary>
public int ClassSchoolId { get; set; }
/// <summary> /// <summary>
/// 客人名称 /// 客人名称
/// </summary> /// </summary>
......
...@@ -39,6 +39,20 @@ namespace Edu.Module.User ...@@ -39,6 +39,20 @@ namespace Edu.Module.User
private readonly RB_AccountRepository accountRepository = new RB_AccountRepository(); private readonly RB_AccountRepository accountRepository = new RB_AccountRepository();
#region 获取字典
/// <summary>
/// 获取字典
/// </summary>
/// <param name="group_Id"></param>
/// <param name="key"></param>
/// <returns></returns>
public List<RB_Dictvalue_Extend> GetDictValueList(int group_Id, string key)
{
return dictvalueRepository.GetList(new RB_Dictvalue_Extend() { RB_Group_id = group_Id, DictKey = key });
}
#endregion
/// <summary> /// <summary>
/// 获取公司所有数据 /// 获取公司所有数据
/// </summary> /// </summary>
......
...@@ -197,7 +197,7 @@ where {where} order by {orderBy} ...@@ -197,7 +197,7 @@ where {where} order by {orderBy}
orderBy = " o.CreateTime desc"; orderBy = " o.CreateTime desc";
} }
string sql = $@" select o.*,c.ClassName,t.TeacherName,t.TeacherIcon from RB_Order o string sql = $@" select o.*,c.ClassName,c.School_Id as ClassSchoolId,t.TeacherName,t.TeacherIcon from RB_Order o
left join rb_class c on o.ClassId = c.ClassId left join rb_class c on o.ClassId = c.ClassId
left join rb_teacher t on c.Teacher_Id = t.TId left join rb_teacher t on c.Teacher_Id = t.TId
where {where} order by {orderBy} where {where} order by {orderBy}
......
...@@ -54,7 +54,15 @@ namespace Edu.Repository.User ...@@ -54,7 +54,15 @@ namespace Edu.Repository.User
if (dmodel.IsBind.HasValue && dmodel.IsBind > 0) { if (dmodel.IsBind.HasValue && dmodel.IsBind > 0) {
where += " and t.IsBind=" + dmodel.IsBind; where += " and t.IsBind=" + dmodel.IsBind;
} }
var pageList = GetPage<RB_Attendance_Extend>(pageIndex, pageSize, out count, "SELECT * from (select a.Id,a.`Status`,a.UpdateTime,b.Id as RB_BranchId,b.RB_Group_Id as RB_GroupId,case when a.Id is NULL then 2 else 1 end AS IsBind ,e.EmName as UpdateName,b.BName as BranchName,(select count(*) from rb_employee em where em.IsLeave=0 and em.RB_Branch_id=b.Id) as PeopleNum,case when a.Id IS NOT NULL THEN (select GROUP_CONCAT(ws.Workday SEPARATOR '、') from rb_workdayseting ws where ws.AttendanceId=a.Id) ELSE '' END as AttendanceDate from rb_branch b LEFT JOIN Rb_attendance a on b.Id=a.RB_BranchId left join rb_employee e on a.UpdateBy=e.EmployeeId )t " + where + " order by t.IsBind,t.RB_BranchId asc").ToList(); var pageList = GetPage<RB_Attendance_Extend>(pageIndex, pageSize, out count, $@"SELECT * from (
select a.Id,a.`Status`,a.UpdateTime,b.SId as RB_BranchId,b.Group_Id as RB_GroupId,
case when a.Id is NULL then 2 else 1 end AS IsBind ,e.EmName as UpdateName,b.SName as BranchName,
(select count(*) from rb_employee em where em.IsLeave=0 and em.RB_Branch_id=b.SId) as PeopleNum,
case when a.Id IS NOT NULL THEN (select GROUP_CONCAT(ws.Workday SEPARATOR '、')
from rb_workdayseting ws where ws.AttendanceId=a.Id) ELSE '' END as AttendanceDate
from Rb_attendance a
left join rb_school b on a.RB_BranchId = b.SId
left join rb_employee e on a.UpdateBy=e.EmployeeId )t " + where + " order by t.IsBind,t.RB_BranchId asc").ToList();
return pageList; return pageList;
} }
......
...@@ -134,6 +134,7 @@ namespace Edu.WebApi.Controllers.Course ...@@ -134,6 +134,7 @@ namespace Edu.WebApi.Controllers.Course
{ {
x.OrderId, x.OrderId,
x.ClassId, x.ClassId,
x.ClassSchoolId,
x.TradeWay, x.TradeWay,
x.Class_Price, x.Class_Price,
x.Unit_Price, x.Unit_Price,
...@@ -835,6 +836,7 @@ namespace Edu.WebApi.Controllers.Course ...@@ -835,6 +836,7 @@ namespace Edu.WebApi.Controllers.Course
{ {
x.OrderId, x.OrderId,
x.ClassId, x.ClassId,
x.ClassSchoolId,
x.ClassName, x.ClassName,
x.TradeWay, x.TradeWay,
x.Class_Price, x.Class_Price,
......
...@@ -43,7 +43,49 @@ namespace Edu.WebApi.Controllers.User ...@@ -43,7 +43,49 @@ namespace Edu.WebApi.Controllers.User
/// </summary> /// </summary>
public AttendanceRecodModule attendRecodeModule = new AttendanceRecodModule(); public AttendanceRecodModule attendRecodeModule = new AttendanceRecodModule();
#region 字典管理
/// <summary>
/// 获取字典列表
/// </summary>
/// <returns></returns>
public virtual ApiResult GetDictValueList()
{
UserInfo userInfo = base.UserInfo; ;
JObject parm = JObject.Parse(RequestParm.Msg.ToString());
string Key = parm.GetStringValue("Key");
int IsTimer = parm.GetInt("IsTimer", 0);
List<RB_Dictvalue_Extend> list = new List<RB_Dictvalue_Extend>();
if (IsTimer == 1)
{
list = attendancemodule.GetDictValueList(0, Key);
}
else
{
list = attendancemodule.GetDictValueList(userInfo.Group_Id, Key);
}
List<object> objlist = new List<object>();
foreach (var item in list)
{
if (item.Code == null || item.Code == "")//表示条件下所有的一级字典
{
var query = list.Where(x => x.Code == item.ID.ToString()).RefMapperToList<RB_Dictvalue_Extend>().ToList()
.Select(x => new { x.ID, Name = x.Name ?? "", Content = x.Content ?? "", Code = x.Code ?? "" });
var obj = new
{
item.ID,
Name = item.Name ?? "",
Content = item.Content ?? "",
Code = item.Code ?? "",
RB_Group_id = item.RB_Group_id ?? 0,
list = query
};
objlist.Add(obj);
}
}
return ApiResult.Success("请求成功!", objlist);
}
#endregion
#region 公告管理 #region 公告管理
...@@ -62,6 +104,7 @@ namespace Edu.WebApi.Controllers.User ...@@ -62,6 +104,7 @@ namespace Edu.WebApi.Controllers.User
/// 新增修改公告基础 /// 新增修改公告基础
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPost]
public ApiResult SetNoticeBaseInfo() { public ApiResult SetNoticeBaseInfo() {
var demodel = JsonHelper.DeserializeObject<RB_Notice_Base_ViewModel>(RequestParm.Msg.ToString()); var demodel = JsonHelper.DeserializeObject<RB_Notice_Base_ViewModel>(RequestParm.Msg.ToString());
demodel.Group_Id = base.UserInfo.Group_Id; demodel.Group_Id = base.UserInfo.Group_Id;
......
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