Commit dbd96a20 authored by 吴春's avatar 吴春

提交代码

parent 6c6ac260
using System;
using System.Collections.Generic;
using System.Text;
using VT.FW.DB;
namespace Edu.Model.Entity.Duty
{
/// <summary>
/// 值班设置实体类
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_Duty_Config
{
/// <summary>
/// 编号
/// </summary>
public int Id { get; set; }
/// <summary>
/// 班次
/// </summary>
public string Shifts { get; set; }
/// <summary>
/// 班次管理员
/// </summary>
public string EmployeeIds { get; set; }
/// <summary>
/// 值班机器码
/// </summary>
public string MachineCode { get; set; }
/// <summary>
/// 创建人
/// </summary>
public int CreateBy { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreateTime { get; set; }
/// <summary>
/// 修改人
/// </summary>
public int UpdateBy { get; set; }
/// <summary>
/// 修改时间
/// </summary>
public int UpdateTime { get; set; }
/// <summary>
/// 集团编号
/// </summary>
public int Group_Id { get; set; }
/// <summary>
/// 学校id
/// </summary>
public int School_Id { get; set; }
public int Status { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Text;
using VT.FW.DB;
namespace Edu.Model.Entity.Duty
{
/// <summary>
/// 班次实体类
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_Duty_Frequency
{
/// <summary>
/// 编号
/// </summary>
public int Id { get; set; }
/// <summary>
/// 班次名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 班次开始时间
/// </summary>
public string StartTime { get; set; }
/// <summary>
/// 班次结束时间
/// </summary>
public string EndTime { get; set; }
/// <summary>
/// 创建人
/// </summary>
public int CreateBy { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreateTime { get; set; }
/// <summary>
/// 修改人
/// </summary>
public int UpdateBy { get; set; }
/// <summary>
/// 修改时间
/// </summary>
public int UpdateTime { get; set; }
/// <summary>
/// 集团编号
/// </summary>
public int Group_Id { get; set; }
/// <summary>
/// 学校id
/// </summary>
public string School_Ids { get; set; }
public int Status { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Text;
using VT.FW.DB;
namespace Edu.Model.Entity.System
{
/// <summary>
/// 系统菜单消息(气泡)实体类
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_Menu_Information
{
/// <summary>
/// 主键
/// </summary>
public int Id
{
get;
set;
}
/// <summary>
/// 菜单Id
/// </summary>
public int? MenuId
{
get;
set;
}
/// <summary>
/// 消息类型 1销售,1-教学,3-留学与就业,4-行政
/// </summary>
public int? MsgType
{
get;
set;
}
/// <summary>
/// 指定消息处理人
/// </summary>
public int? EmployeeId
{
get;
set;
}
/// <summary>
/// 指定消息处理部门
/// </summary>
public int? DepartmentId
{
get;
set;
}
/// <summary>
/// 来源id 先只有订单id
/// </summary>
public int? SourceId
{
get;
set;
}
/// <summary>
/// 来源类型 1销售,1-教学,3-留学与就业,4-行政
/// </summary>
public int? SourceType
{
get;
set;
}
/// <summary>
/// 创建人
/// </summary>
public int? CreateBy
{
get;
set;
}
/// <summary>
/// 创建时间
/// </summary>
public DateTime? CreateDate
{
get;
set;
}
/// <summary>
/// 学校编号
/// </summary>
public int School_Id { get; set; }
/// <summary>
/// 集团编号
/// </summary>
public int Group_Id { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Text;
using Edu.Model.Entity.Duty;
namespace Edu.Model.ViewModel.Duty
{
/// <summary>
/// 值班设置实体扩展类
/// </summary>
public class RB_Duty_Config_ViewModel : RB_Duty_Config
{
/// <summary>
/// 学校名称
/// </summary>
public string SchoolName { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Text;
using Edu.Model.Entity.Duty;
namespace Edu.Model.ViewModel.Duty
{
public class RB_Duty_Frequency_ViewModel : RB_Duty_Frequency
{
/// <summary>
/// 学校
/// </summary>
public string SchoolName { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Text;
using Edu.Model.Entity.System;
namespace Edu.Model.ViewModel.System
{
public class RB_Menu_Information_ViewModel : RB_Menu_Information
{
/// <summary>
/// 菜单id
/// </summary>
public string MenuIdStr { get; set; }
}
}
using System;
using System.Collections.Generic;
using Edu.Model.ViewModel.Duty;
using Edu.Repository.Duty;
using VT.FW.DB;
namespace Edu.Module.Duty
{
public class DutyModule
{
private readonly RB_Duty_ConfigRepository dutyConfigRepository = new RB_Duty_ConfigRepository();
private readonly RB_Duty_FrequencyRepository dutyFrequencyRepository = new RB_Duty_FrequencyRepository();
#region 值班设置
/// <summary>
/// 获取值班设置分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Duty_Config_ViewModel> GetDutyConfigPageListRepository(int pageIndex, int pageSize, out long rowsCount, RB_Duty_Config_ViewModel query)
{
return dutyConfigRepository.GetDutyConfigPageListRepository(pageIndex, pageSize, out rowsCount, query);
}
/// <summary>
/// 获取值班设置列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Duty_Config_ViewModel> GetDutyConfigRepository(RB_Duty_Config_ViewModel query)
{
return dutyConfigRepository.GetDutyConfigRepository(query);
}
#endregion
#region 班次设置
/// <summary>
/// 获取班次设置列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Duty_Frequency_ViewModel> GetDutyFrequencyRepository(RB_Duty_Frequency_ViewModel query)
{
var list = dutyFrequencyRepository.GetDutyFrequencyRepository(query);
return list;
}
/// <summary>
/// 新增/修改班次信息
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public bool SetFrequencyModel(RB_Duty_Frequency_ViewModel model)
{
if (model.Id == 0)
{
return dutyFrequencyRepository.Insert(model) > 0;
}
else
{
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
{ nameof(RB_Duty_Frequency_ViewModel.Name),model.Name},
{ nameof(RB_Duty_Frequency_ViewModel.StartTime),model.StartTime},
{ nameof(RB_Duty_Frequency_ViewModel.EndTime),model.EndTime},
{ nameof(RB_Duty_Frequency_ViewModel.School_Ids),model.School_Ids},
{ nameof(RB_Duty_Frequency_ViewModel.UpdateBy),model.UpdateBy},
{ nameof(RB_Duty_Frequency_ViewModel.UpdateTime),model.UpdateTime},
};
return dutyFrequencyRepository.Update(fileds, new WhereHelper(nameof(RB_Duty_Frequency_ViewModel.Id), model.Id));
}
}
#endregion
}
}
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Edu.Model\Edu.Model.csproj" />
<ProjectReference Include="..\Edu.Repository\Edu.Repository.csproj" />
</ItemGroup>
</Project>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Edu.Model.Entity.Duty;
using Edu.Model.ViewModel.Duty;
using VT.FW.DB.Dapper;
namespace Edu.Repository.Duty
{
/// <summary>
/// 值班设置配置仓储
/// </summary>
public class RB_Duty_ConfigRepository:BaseRepository<RB_Duty_Config>
{
/// <summary>
/// 获取值班设置分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Duty_Config_ViewModel> GetDutyConfigPageListRepository(int pageIndex, int pageSize, out long rowsCount, RB_Duty_Config_ViewModel query)
{
var parameters = new DynamicParameters();
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@" SELECT A.*,B.SName AS SchoolName FROM RB_Duty_Config AS A LEFT JOIN rb_school AS B ON A.School_Id=B.SId WHERE 1=1 ");
if (query != null)
{
if (query.Group_Id > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Duty_Config_ViewModel.Group_Id), query.Group_Id);
}
if (query.School_Id > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Duty_Config_ViewModel.School_Id), query.School_Id);
}
if (query.Status >= 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Duty_Config_ViewModel.Status), (int)query.Status);
}
}
return GetPage<RB_Duty_Config_ViewModel>(pageIndex, pageSize, out rowsCount, builder.ToString(), parameters).ToList();
}
/// <summary>
/// 获取值班设置列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Duty_Config_ViewModel> GetDutyConfigRepository(RB_Duty_Config_ViewModel query)
{
var parameters = new DynamicParameters();
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@" SELECT A.* FROM RB_Duty_Config AS A WHERE 1=1 ");
if (query != null)
{
if (query.Group_Id > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Duty_Config_ViewModel.Group_Id), query.Group_Id);
}
if (query.School_Id > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Duty_Config_ViewModel.School_Id), query.School_Id);
}
if (query.Status >= 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Duty_Config_ViewModel.Status), (int)query.Status);
}
}
return Get<RB_Duty_Config_ViewModel>(builder.ToString(), parameters).ToList();
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Edu.Model.Entity.Duty;
using Edu.Model.ViewModel.Duty;
using VT.FW.DB.Dapper;
namespace Edu.Repository.Duty
{
public class RB_Duty_FrequencyRepository: BaseRepository<RB_Duty_Frequency>
{
/// <summary>
/// 获取班次设置列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Duty_Frequency_ViewModel> GetDutyFrequencyRepository(RB_Duty_Frequency_ViewModel query)
{
var parameters = new DynamicParameters();
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@" SELECT A.* FROM RB_Duty_Frequency AS A WHERE 1=1 ");
if (query != null)
{
if (query.Group_Id > 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Duty_Frequency_ViewModel.Group_Id), query.Group_Id);
}
if (query.Status >= 0)
{
builder.AppendFormat(" AND A.{0}={1} ", nameof(RB_Duty_Frequency_ViewModel.Status), (int)query.Status);
}
}
return Get<RB_Duty_Frequency_ViewModel>(builder.ToString(), parameters).ToList();
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Edu.Model.Entity.System;
using Edu.Model.ViewModel.System;
namespace Edu.Repository.System
{
public class RB_Menu_InformationRepository:BaseRepository<RB_Menu_Information>
{
/// <summary>
/// 根据where获取菜单列表
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public List<RB_Menu_Information_ViewModel> GetList(RB_Menu_Information_ViewModel dmodel)
{
string where = $@" 1=1 and Rb_GroupId={dmodel.Group_Id}";
if (dmodel.MenuId > 0)
{
where += " and " + nameof(RB_Menu_Information_ViewModel.MenuId) + "=" + dmodel.MenuId;
}
if (!string.IsNullOrWhiteSpace(dmodel.MenuIdStr))
{
where += " and " + nameof(RB_Menu_Information_ViewModel.MenuId) + " in(" + dmodel.MenuIdStr + ")";
}
if (dmodel.MsgType > 0)
{
where += " and " + nameof(RB_Menu_Information_ViewModel.MsgType) + "=" + dmodel.MsgType;
}
if (dmodel.EmployeeId > 0)
{
where += " and (" + nameof(RB_Menu_Information_ViewModel.EmployeeId) + "=" + dmodel.EmployeeId + " or EmployeeId=-1)";
}
if (dmodel.DepartmentId > 0)
{
where += " and (" + nameof(RB_Menu_Information_ViewModel.DepartmentId) + "=" + dmodel.DepartmentId + " or DepartmentId=-1)";
}
if (dmodel.SourceId > 0)
{
where += " and " + nameof(RB_Menu_Information_ViewModel.SourceId) + "=" + dmodel.SourceId;
}
if (dmodel.SourceType > 0)
{
where += " and " + nameof(RB_Menu_Information_ViewModel.SourceType) + "=" + dmodel.SourceType;
}
if (dmodel.School_Id >= 0)
{
where += " and " + nameof(RB_Menu_Information_ViewModel.School_Id) + "=" + dmodel.School_Id;
}
return Get<RB_Menu_Information_ViewModel>(" select * from RB_Menu_Information where" + where).ToList();
}
}
}
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
<None Include="..\.editorconfig" Link=".editorconfig" /> <None Include="..\.editorconfig" Link=".editorconfig" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="AspNetCoreRateLimit" Version="3.2.2" />
<PackageReference Include="JWT" Version="5.3.1" /> <PackageReference Include="JWT" Version="5.3.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="3.0.0" /> <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="3.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.10.9" /> <PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.10.9" />
......
...@@ -58,7 +58,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Edu.Test", "Edu.Test\Edu.Te ...@@ -58,7 +58,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Edu.Test", "Edu.Test\Edu.Te
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Edu.Module.StudyAbroad", "Edu.Module.StudyAbroad\Edu.Module.StudyAbroad.csproj", "{2ED4527A-351A-49C0-94E0-D926F6EE2844}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Edu.Module.StudyAbroad", "Edu.Module.StudyAbroad\Edu.Module.StudyAbroad.csproj", "{2ED4527A-351A-49C0-94E0-D926F6EE2844}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edu.Module.Web", "Edu.Module.Web\Edu.Module.Web.csproj", "{380ACD87-3D6C-474C-A0ED-A91BD8E26081}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Edu.Module.Web", "Edu.Module.Web\Edu.Module.Web.csproj", "{380ACD87-3D6C-474C-A0ED-A91BD8E26081}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edu.Module.Duty", "Edu.Module.Duty\Edu.Module.Duty.csproj", "{3C354B2B-8706-49A6-A12A-5A64F28E7CDC}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
...@@ -142,6 +144,10 @@ Global ...@@ -142,6 +144,10 @@ Global
{380ACD87-3D6C-474C-A0ED-A91BD8E26081}.Debug|Any CPU.Build.0 = Debug|Any CPU {380ACD87-3D6C-474C-A0ED-A91BD8E26081}.Debug|Any CPU.Build.0 = Debug|Any CPU
{380ACD87-3D6C-474C-A0ED-A91BD8E26081}.Release|Any CPU.ActiveCfg = Release|Any CPU {380ACD87-3D6C-474C-A0ED-A91BD8E26081}.Release|Any CPU.ActiveCfg = Release|Any CPU
{380ACD87-3D6C-474C-A0ED-A91BD8E26081}.Release|Any CPU.Build.0 = Release|Any CPU {380ACD87-3D6C-474C-A0ED-A91BD8E26081}.Release|Any CPU.Build.0 = Release|Any CPU
{3C354B2B-8706-49A6-A12A-5A64F28E7CDC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3C354B2B-8706-49A6-A12A-5A64F28E7CDC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3C354B2B-8706-49A6-A12A-5A64F28E7CDC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3C354B2B-8706-49A6-A12A-5A64F28E7CDC}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
...@@ -164,6 +170,7 @@ Global ...@@ -164,6 +170,7 @@ Global
{DA20EF60-D6D6-4EE3-950B-96F231A2F6F2} = {7AC0A4EC-3215-4FF2-96DC-DE8325ED6915} {DA20EF60-D6D6-4EE3-950B-96F231A2F6F2} = {7AC0A4EC-3215-4FF2-96DC-DE8325ED6915}
{2ED4527A-351A-49C0-94E0-D926F6EE2844} = {7AC0A4EC-3215-4FF2-96DC-DE8325ED6915} {2ED4527A-351A-49C0-94E0-D926F6EE2844} = {7AC0A4EC-3215-4FF2-96DC-DE8325ED6915}
{380ACD87-3D6C-474C-A0ED-A91BD8E26081} = {7AC0A4EC-3215-4FF2-96DC-DE8325ED6915} {380ACD87-3D6C-474C-A0ED-A91BD8E26081} = {7AC0A4EC-3215-4FF2-96DC-DE8325ED6915}
{3C354B2B-8706-49A6-A12A-5A64F28E7CDC} = {7AC0A4EC-3215-4FF2-96DC-DE8325ED6915}
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {8763B446-FAB1-46BF-9743-F2628533241B} SolutionGuid = {8763B446-FAB1-46BF-9743-F2628533241B}
......
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