浏览代码

Merge branch '娄底高职分支' of http://123.57.209.16:3000/bjquanjiang/DigitalScholl into 娄底高职分支

娄底高职分支
杨晓琪 2 年前
父节点
当前提交
90bffd95c6
共有 11 个文件被更改,包括 516 次插入1 次删除
  1. +24
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/OpenLessonPlanOfElectiveStudentApi.cs
  2. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs
  3. +19
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfo/LessonInfoBLL.cs
  4. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfo/LessonInfoEntity.cs
  5. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfo/LessonInfoIBLL.cs
  6. +24
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfo/LessonInfoService.cs
  7. +143
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OLPElectiveStuSelectCount/OLPElectiveStuSelectCountBLL.cs
  8. +65
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OLPElectiveStuSelectCount/OLPElectiveStuSelectCountEntity.cs
  9. +49
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OLPElectiveStuSelectCount/OLPElectiveStuSelectCountIBLL.cs
  10. +183
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OLPElectiveStuSelectCount/OLPElectiveStuSelectCountService.cs
  11. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj

+ 24
- 0
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/OpenLessonPlanOfElectiveStudentApi.cs 查看文件

@@ -22,6 +22,8 @@ namespace Learun.Application.WebApi
private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL();
LessonInfoIBLL lessonInfoIbll = new LessonInfoBLL();
EmpInfoIBLL empInfoIbll = new EmpInfoBLL();
private OLPElectiveStuSelectCountIBLL oLPElectiveStuSelectCountIBLL = new OLPElectiveStuSelectCountBLL();
private LessonInfoIBLL lessonInfoIBLL = new LessonInfoBLL();

/// <summary>
/// 注册接口
@@ -123,6 +125,17 @@ namespace Learun.Application.WebApi
//相同时间不能报名
return Success("本学期此时间段已有报名的选修课!");
}

//专业选修课根据学生选课次数表判断选课上限
var lesson = lessonInfoIBLL.GetLessonInfoAndTypeByLessonNo(olpeEntity.LessonNo);
if (lesson != null && lesson.LessonTypeCode.Contains("Professional"))
{
var oLPElectiveStuSelectCount = oLPElectiveStuSelectCountIBLL.GetOLPElectiveStuSelectCountEntity(olpeEntity.AcademicYearNo, olpeEntity.Semester, stuInfoBasicEntity.DeptNo);
if (oLPElectiveStuSelectCount != null && sslleListOfNow1.Count() > oLPElectiveStuSelectCount.SelectMaxCount)
{
return Fail("本系部最多选择" + oLPElectiveStuSelectCount.SelectMaxCount + "门专业选修课!");
}
}
}

return Fail("正在提交,请等待!");
@@ -381,6 +394,17 @@ namespace Learun.Application.WebApi
}
}
}

//专业选修课根据学生选课次数表判断选课上限
var lesson = lessonInfoIBLL.GetLessonInfoAndTypeByLessonNo(olpeEntity.LessonNo);
if (lesson != null && lesson.LessonTypeCode.Contains("Professional"))
{
var oLPElectiveStuSelectCount = oLPElectiveStuSelectCountIBLL.GetOLPElectiveStuSelectCountEntity(olpeEntity.AcademicYearNo, olpeEntity.Semester, stuInfoBasicEntity.DeptNo);
if (oLPElectiveStuSelectCount != null && sslleListOfNow1.Count() > oLPElectiveStuSelectCount.SelectMaxCount)
{
return Fail("本系部最多选择" + oLPElectiveStuSelectCount.SelectMaxCount + "门专业选修课!");
}
}
if (sslleListOfNow2.Count() > 0)
{
foreach (var item in sslleListOfNow2)


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs 查看文件

@@ -13,7 +13,7 @@ using Nancy;

namespace Learun.Application.WebApi.Modules
{
public class TimeTable : BaseNoLoginApi
public class TimeTable : BaseApi
{
public TimeTable()
: base("/learun/adms/timetable")


+ 19
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfo/LessonInfoBLL.cs 查看文件

@@ -108,6 +108,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
}
public LessonInfoEntity GetLessonInfoAndTypeByLessonNo(string lessonNo)
{
try
{
return lessonInfoService.GetLessonInfoAndTypeByLessonNo(lessonNo);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

public bool GetAny()
{
try


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfo/LessonInfoEntity.cs 查看文件

@@ -191,6 +191,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
#region 扩展字段
[NotMapped]
public string LessonTypeName { get; set; }
[NotMapped]
public string LessonTypeCode { get; set; }

#endregion
}


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfo/LessonInfoIBLL.cs 查看文件

@@ -35,6 +35,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <summary>
/// <returns></returns>
LessonInfoEntity GetLessonInfoEntityByLessonNo(string lessonNo);

LessonInfoEntity GetLessonInfoAndTypeByLessonNo(string lessonNo);
bool GetAny();
#endregion



+ 24
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfo/LessonInfoService.cs 查看文件

@@ -168,6 +168,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

/// <summary>
/// 获取LessonInfo表实体数据和课程类型
/// <param name="keyValue">主键</param>
/// <summary>
/// <returns></returns>
public LessonInfoEntity GetLessonInfoAndTypeByLessonNo(string lessonNo)
{
try
{
string sql = $"select a.*,b.LessonTypeCode from LessonInfo a join CdLessonType b on a.LessonTypeId=b.LTId where a.LessonNo='{lessonNo}'";
return this.BaseRepository("CollegeMIS").FindList<LessonInfoEntity>(sql).FirstOrDefault();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

#region 提交数据


+ 143
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OLPElectiveStuSelectCount/OLPElectiveStuSelectCountBLL.cs 查看文件

@@ -0,0 +1,143 @@
using Learun.Util;
using System;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-10-26 11:05
/// 描 述:学生选课次数维护
/// </summary>
public class OLPElectiveStuSelectCountBLL : OLPElectiveStuSelectCountIBLL
{
private OLPElectiveStuSelectCountService oLPElectiveStuSelectCountService = new OLPElectiveStuSelectCountService();

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<OLPElectiveStuSelectCountEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return oLPElectiveStuSelectCountService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取OLPElectiveStuSelectCount表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public OLPElectiveStuSelectCountEntity GetOLPElectiveStuSelectCountEntity(string keyValue)
{
try
{
return oLPElectiveStuSelectCountService.GetOLPElectiveStuSelectCountEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

public OLPElectiveStuSelectCountEntity GetOLPElectiveStuSelectCountEntity(string AcademicYearNo, string Semester, string DeptNo)
{
try
{
return oLPElectiveStuSelectCountService.GetOLPElectiveStuSelectCountEntity(AcademicYearNo, Semester, DeptNo);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
oLPElectiveStuSelectCountService.DeleteEntity(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
public void SaveEntity(string keyValue, OLPElectiveStuSelectCountEntity entity)
{
try
{
oLPElectiveStuSelectCountService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}
}

+ 65
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OLPElectiveStuSelectCount/OLPElectiveStuSelectCountEntity.cs 查看文件

@@ -0,0 +1,65 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-10-26 11:05
/// 描 述:学生选课次数维护
/// </summary>
public class OLPElectiveStuSelectCountEntity
{
#region 实体成员
/// <summary>
/// Id
/// </summary>
[Column("ID")]
public string Id { get; set; }
/// <summary>
/// 学年度
/// </summary>
[Column("ACADEMICYEARNO")]
public string AcademicYearNo { get; set; }
/// <summary>
/// 学期
/// </summary>
[Column("SEMESTER")]
public string Semester { get; set; }
/// <summary>
/// DeptNo
/// </summary>
[Column("DEPTNO")]
public string DeptNo { get; set; }
/// <summary>
/// 选课次数上限
/// </summary>
[Column("SELECTMAXCOUNT")]
public int? SelectMaxCount { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.Id = Guid.NewGuid().ToString();
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.Id = keyValue;
}
#endregion
#region 扩展字段
#endregion
}
}


+ 49
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OLPElectiveStuSelectCount/OLPElectiveStuSelectCountIBLL.cs 查看文件

@@ -0,0 +1,49 @@
using Learun.Util;
using System.Data;
using System.Collections.Generic;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-10-26 11:05
/// 描 述:学生选课次数维护
/// </summary>
public interface OLPElectiveStuSelectCountIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<OLPElectiveStuSelectCountEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取OLPElectiveStuSelectCount表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
OLPElectiveStuSelectCountEntity GetOLPElectiveStuSelectCountEntity(string keyValue);
OLPElectiveStuSelectCountEntity GetOLPElectiveStuSelectCountEntity(string AcademicYearNo,string Semester,string DeptNo);
#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, OLPElectiveStuSelectCountEntity entity);
#endregion

}
}

+ 183
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OLPElectiveStuSelectCount/OLPElectiveStuSelectCountService.cs 查看文件

@@ -0,0 +1,183 @@
using Dapper;
using Learun.DataBase.Repository;
using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-10-26 11:05
/// 描 述:学生选课次数维护
/// </summary>
public class OLPElectiveStuSelectCountService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<OLPElectiveStuSelectCountEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.Id,
t.AcademicYearNo,
t.Semester,
t.DeptNo,
t.SelectMaxCount
");
strSql.Append(" FROM OLPElectiveStuSelectCount t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
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["DeptNo"].IsEmpty())
{
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String);
strSql.Append(" AND t.DeptNo = @DeptNo ");
}
return this.BaseRepository("CollegeMIS").FindList<OLPElectiveStuSelectCountEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取OLPElectiveStuSelectCount表实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public OLPElectiveStuSelectCountEntity GetOLPElectiveStuSelectCountEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<OLPElectiveStuSelectCountEntity>(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

public OLPElectiveStuSelectCountEntity GetOLPElectiveStuSelectCountEntity(string AcademicYearNo,
string Semester, string DeptNo)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<OLPElectiveStuSelectCountEntity>(x => x.AcademicYearNo == AcademicYearNo && x.Semester == Semester && x.DeptNo == DeptNo);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

#region 提交数据

/// <summary>
/// 删除实体数据
/// </summary>
/// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
try
{
this.BaseRepository("CollegeMIS").Delete<OLPElectiveStuSelectCountEntity>(t => t.Id == keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, OLPElectiveStuSelectCountEntity entity)
{
try
{
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
}
else
{
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
}
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

#endregion

}
}

+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj 查看文件

@@ -228,6 +228,10 @@
<Compile Include="EducationalAdministration\MobileTest\MobileTestEntity.cs" />
<Compile Include="EducationalAdministration\MobileTest\MobileTestIBLL.cs" />
<Compile Include="EducationalAdministration\MobileTest\MobileTestService.cs" />
<Compile Include="EducationalAdministration\OLPElectiveStuSelectCount\OLPElectiveStuSelectCountBLL.cs" />
<Compile Include="EducationalAdministration\OLPElectiveStuSelectCount\OLPElectiveStuSelectCountEntity.cs" />
<Compile Include="EducationalAdministration\OLPElectiveStuSelectCount\OLPElectiveStuSelectCountIBLL.cs" />
<Compile Include="EducationalAdministration\OLPElectiveStuSelectCount\OLPElectiveStuSelectCountService.cs" />
<Compile Include="EducationalAdministration\OpenLessonPlan\OpenLessonPlanBLL.cs" />
<Compile Include="EducationalAdministration\OpenLessonPlan\OpenLessonPlanIBLL.cs" />
<Compile Include="EducationalAdministration\OpenLessonPlan\OpenLessonPlanService.cs" />


正在加载...
取消
保存