Bläddra i källkod

Merge branch '长阳分支中职' of http://123.57.209.16:3000/bjquanjiang/DigitalScholl into 长阳分支中职

新疆警官学校中职
dyy 2 år sedan
förälder
incheckning
e156752716
5 ändrade filer med 182 tillägg och 1 borttagningar
  1. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj
  2. +74
    -1
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuLeaveManagementApi.cs
  3. +25
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuLeaveManagement/StuLeaveManagementBLL.cs
  4. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuLeaveManagement/StuLeaveManagementIBLL.cs
  5. +81
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuLeaveManagement/StuLeaveManagementService.cs

+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj Visa fil

@@ -204,6 +204,7 @@
<Compile Include="Modules\LogisticsManagement\Acc_PublicAreaHealthApi.cs" />
<Compile Include="Modules\LogisticsManagement\Acc_DailyAssessApi.cs" />
<Compile Include="Modules\PersonnelManagement\CustmerLeaveApi.cs" />
<Compile Include="Modules\StuLeaveManagementApi.cs" />
<Compile Include="Modules\WelfarePositionApi.cs" />
<Compile Include="Modules\OuoutsourcingApi.cs" />
<Compile Include="Modules\WageScheduleApi.cs" />


+ 74
- 1
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuLeaveManagementApi.cs Visa fil

@@ -36,6 +36,11 @@ namespace Learun.Application.WebApi
Get["/form"] = GetForm;
Post["/delete"] = DeleteForm;
Post["/save"] = SaveForm;
//审核学生请假
Post["/savecheck"] = SaveCheckForm;

//学生请假--教师审核列表
Get["/checkpagelist"] = GetCheckPageList;
}
#region 获取数据

@@ -58,6 +63,24 @@ namespace Learun.Application.WebApi
return Success(jsonData);
}
/// <summary>
/// 学生请假--教师审核列表
/// <summary>
/// <param name="_"></param>
/// <returns></returns>
public Response GetCheckPageList(dynamic _)
{
ReqPageParam parameter = this.GetReqData<ReqPageParam>();
var data = stuLeaveManagementIBLL.GetCheckPageList(parameter.pagination, parameter.queryJson);
var jsonData = new
{
rows = data,
total = parameter.pagination.total,
page = parameter.pagination.page,
records = parameter.pagination.records
};
return Success(jsonData);
}
/// <summary>
/// 获取表单数据
/// <summary>
/// <param name="_"></param>
@@ -74,7 +97,6 @@ namespace Learun.Application.WebApi
}


#endregion

#region 提交数据
@@ -102,6 +124,57 @@ namespace Learun.Application.WebApi
stuLeaveManagementIBLL.SaveEntity(parameter.keyValue, entity);
return Success("保存成功!");
}

/// <summary>
/// 判断是否可以审核
/// <summary>
/// <param name="_"></param>
/// <returns></returns>
public Response IsCheck(dynamic _)
{
string keyValue = this.GetReqData();
var stuLeaveManagementData = stuLeaveManagementIBLL.GetStuLeaveManagementEntity(keyValue);
bool isDeptDirector = false; //登录用户是否是系主任标识
var deptDirectorRoleId = Config.GetValue("DeptDirectorRoleId");
var loginInfoRoleIds = LoginUserInfo.Get().roleIds;
if (loginInfoRoleIds.IndexOf(',') == -1)
{
if (loginInfoRoleIds == deptDirectorRoleId)
{
isDeptDirector = true;
}
}
else
{
if (loginInfoRoleIds.Split(',').Contains(deptDirectorRoleId))
{
isDeptDirector = true;
}
}
if (stuLeaveManagementData.LeaveDay > 2 && !isDeptDirector)
{
return Fail("该请假申请大于2天,需要由系主任审核!");
}

return Success("");
}

/// <summary>
/// 审核学生请假
/// <param name="_"></param>
/// <summary>
/// <returns></returns>
public Response SaveCheckForm(dynamic _)
{
var loginInfo = LoginUserInfo.Get();
ReqFormEntity parameter = this.GetReqData<ReqFormEntity>();
StuLeaveManagementEntity entity = parameter.strEntity.ToObject<StuLeaveManagementEntity>();
entity.CheckUserId = loginInfo.userId;
entity.CheckUserNo = loginInfo.account;
entity.CheckTime = DateTime.Now;
stuLeaveManagementIBLL.SaveEntity(parameter.keyValue, entity);
return Success("保存成功!");
}
#endregion

#region 私有类


+ 25
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuLeaveManagement/StuLeaveManagementBLL.cs Visa fil

@@ -43,6 +43,31 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

/// <summary>
/// 学生请假教师审核列表
/// </summary>
/// <param name="pagination"></param>
/// <param name="queryJson"></param>
/// <returns></returns>
public IEnumerable<StuLeaveManagementEntity> GetCheckPageList(Pagination pagination, string queryJson)
{
try
{
return stuLeaveManagementService.GetCheckPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取StuLeaveManagement表实体数据
/// </summary>


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuLeaveManagement/StuLeaveManagementIBLL.cs Visa fil

@@ -21,6 +21,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<StuLeaveManagementEntity> GetPageList(Pagination pagination, string queryJson);
IEnumerable<StuLeaveManagementEntity> GetCheckPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取StuLeaveManagement表实体数据
/// </summary>


+ 81
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuLeaveManagement/StuLeaveManagementService.cs Visa fil

@@ -105,6 +105,87 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}


public IEnumerable<StuLeaveManagementEntity> GetCheckPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT t.*,s.StuName as CreateUserName,s.ClassNo,s.DeptNo,s.MajorNo,c.ClassDiredctorNo,c.ClassTutorNo ");
strSql.Append(" FROM StuLeaveManagement t left join StuInfoBasic s on t.CreateUserNo=s.StuNo left join ClassInfo c on s.ClassNo=c.ClassNo ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["LeaveType"].IsEmpty())
{
dp.Add("LeaveType", queryParam["LeaveType"].ToString(), DbType.String);
strSql.Append(" AND t.LeaveType = @LeaveType ");
}
if (!queryParam["CheckStatus"].IsEmpty())
{
dp.Add("CheckStatus", queryParam["CheckStatus"].ToString(), DbType.String);
strSql.Append(" AND t.CheckStatus = @CheckStatus ");
}
if (!queryParam["StuNo"].IsEmpty())
{
dp.Add("StuNo", queryParam["StuNo"].ToString(), DbType.String);
strSql.Append(" AND t.CreateUserNo = @StuNo ");
}
//班级班主任/辅导员/系主任
var ClassManagerNo = LoginUserInfo.Get().account;
if (!string.IsNullOrEmpty(ClassManagerNo))
{
dp.Add("ClassManagerNo", ClassManagerNo, DbType.String);
strSql.Append(" AND (c.ClassDiredctorNo = @ClassManagerNo or c.ClassTutorNo = @ClassManagerNo ");
//登录用户是否是系主任:若是,展示大于2天的请假记录;
var deptDirectorRoleId = Config.GetValue("DeptDirectorRoleId");
if (deptDirectorRoleId != null)
{
var loginInfoRoleIds = LoginUserInfo.Get().roleIds;
if (loginInfoRoleIds.IndexOf(',') == -1)
{
if (loginInfoRoleIds == deptDirectorRoleId)
{
strSql.Append(" or t.LeaveDay>2 )");
}
else
{
strSql.Append(" ) ");
}
}
else
{
if (loginInfoRoleIds.Split(',').Contains(deptDirectorRoleId))
{
strSql.Append(" or t.LeaveDay>2 )");
}
else
{
strSql.Append(" ) ");
}
}
}
else
{
strSql.Append(" ) ");
}
}
return this.BaseRepository("CollegeMIS").FindList<StuLeaveManagementEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取StuLeaveManagement表实体数据
/// </summary>


Laddar…
Avbryt
Spara