Commit 8690d0c6 authored by liudong1993's avatar liudong1993

OKR基础配置

parent 55983cd2
......@@ -123,7 +123,9 @@ namespace Edu.Cache.User
GroupName = model.GroupName,
SchoolName = model.SchoolName,
Token = token,
ApiRequestFromEnum= apiRequestFromEnum
ApiRequestFromEnum = apiRequestFromEnum,
DeptId = model.Dept_Id,
PostId = model.Post_Id
};
UserInfoSet(Cache.CacheKey.User_Login_Key + Id.ToString(), userInfo, Common.Config.JwtExpirTime);
}
......
using Edu.Common.Plugin;
using System;
using System.Collections.Generic;
using System.Text;
namespace Edu.Common.Enum.OKR
{
/// <summary>
/// 周期长度枚举
/// </summary>
public enum PeriodMonthEnum
{
/// <summary>
/// 1个月
/// </summary>
[EnumField("1个月")]
One = 1,
/// <summary>
/// 2个月
/// </summary>
[EnumField("2个月")]
Two = 2,
/// <summary>
/// 3个月(季度)
/// </summary>
[EnumField("3个月(季度)")]
Three = 3,
/// <summary>
/// 4个月
/// </summary>
[EnumField("4个月")]
Four = 4,
/// <summary>
/// 半年
/// </summary>
[EnumField("半年")]
Five = 6,
}
}
using Edu.Common.Plugin;
using System;
using System.Collections.Generic;
using System.Text;
namespace Edu.Common.Enum.OKR
{
/// <summary>
/// 周期权限枚举
/// </summary>
public enum PermissionTypeEnum
{
/// <summary>
/// 员工
/// </summary>
[EnumField("员工")]
Employee = 1,
/// <summary>
/// 部门
/// </summary>
[EnumField("部门")]
Department = 2,
/// <summary>
/// 岗位
/// </summary>
[EnumField("岗位")]
Post = 3
}
}
using Edu.Common.Plugin;
using System;
using System.Collections.Generic;
using System.Text;
namespace Edu.Common.Enum.OKR
{
/// <summary>
/// 周期权限枚举
/// </summary>
public enum ProgressStateEnum
{
/// <summary>
/// 正常
/// </summary>
[EnumField("正常")]
Normal = 1,
/// <summary>
/// 有风险
/// </summary>
[EnumField("有风险")]
Risk = 2,
/// <summary>
/// 已延期
/// </summary>
[EnumField("已延期")]
Adjourn = 3
}
}
using Edu.Common.Enum;
using Edu.Common.Enum.Course;
using System;
using VT.FW.DB;
namespace Edu.Model.Entity.OKR
{
/// <summary>
/// okr评论实体类
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_OKR_Comment
{
/// <summary>
/// id
/// </summary>
public int Id { get; set; }
/// <summary>
/// 周期id
/// </summary>
public int PeriodId { get; set; }
/// <summary>
/// 内容
/// </summary>
public string Content { get; set; }
/// <summary>
/// 状态 1正常 2标记为解决并影藏 3删除
/// </summary>
public int State { get; set; }
/// <summary>
/// 集团id
/// </summary>
public int Group_Id { get; set; }
/// <summary>
/// 学校id
/// </summary>
public int School_Id { 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 DateTime UpdateTime { get; set; }
}
}
using Edu.Common.Enum;
using Edu.Common.Enum.Course;
using Edu.Common.Enum.OKR;
using System;
using VT.FW.DB;
namespace Edu.Model.Entity.OKR
{
/// <summary>
/// okr关键结果实体类
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_OKR_KeyResult
{
/// <summary>
/// id
/// </summary>
public int Id { get; set; }
/// <summary>
/// 结果名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 目标id
/// </summary>
public int ObjectiveId { get; set; }
/// <summary>
/// 排序
/// </summary>
public int Sort { get; set; }
/// <summary>
/// 进度 百分之几
/// </summary>
public int Progress { get; set; }
/// <summary>
/// 权重
/// </summary>
public decimal Weight { get; set; }
/// <summary>
/// 分数
/// </summary>
public decimal Score { get; set; }
/// <summary>
/// 进度状态 1正常 2有风险 3已延期
/// </summary>
public ProgressStateEnum ProgressState { get; set; }
/// <summary>
/// 起始值
/// </summary>
public decimal StartValue { get; set; }
/// <summary>
/// 目标值
/// </summary>
public decimal EndValue { get; set; }
/// <summary>
/// 当前值
/// </summary>
public decimal CurrentValue { get; set; }
/// <summary>
/// 是否简单模式 1是 2否
/// </summary>
public int IsEasyMode { get; set; }
/// <summary>
/// 删除状态
/// </summary>
public int Status { get; set; }
/// <summary>
/// 集团id
/// </summary>
public int Group_Id { get; set; }
/// <summary>
/// 学校id
/// </summary>
public int School_Id { 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 DateTime UpdateTime { get; set; }
}
}
using Edu.Common.Enum;
using Edu.Common.Enum.Course;
using Edu.Common.Enum.OKR;
using System;
using VT.FW.DB;
namespace Edu.Model.Entity.OKR
{
/// <summary>
/// okr目标实体类
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_OKR_Objective
{
/// <summary>
/// id
/// </summary>
public int Id { get; set; }
/// <summary>
/// 周期id
/// </summary>
public int PeriodId { get; set; }
/// <summary>
/// 目标
/// </summary>
public string Title { get; set; }
/// <summary>
/// 排序
/// </summary>
public int Sort { get; set; }
/// <summary>
/// 进度
/// </summary>
public int Progress { get; set; }
/// <summary>
/// 权重
/// </summary>
public int Weight { get; set; }
/// <summary>
/// 分数
/// </summary>
public decimal Score { get; set; }
/// <summary>
/// 进度备注
/// </summary>
public string ProgressRemark { get; set; }
/// <summary>
/// 是否默认风险最高的 Key Result 状态 1是 2否
/// </summary>
public int IsDefaultState { get; set; }
/// <summary>
/// 进度状态 1正常 2有风险 3已延期 枚举
/// </summary>
public ProgressStateEnum ProgressState { get; set; }
/// <summary>
/// 审核状态 1审核中 2审核OK 3审核驳回 4暂存 5作废
/// </summary>
public int Status { get; set; }
/// <summary>
/// 集团id
/// </summary>
public int Group_Id { get; set; }
/// <summary>
/// 学校id
/// </summary>
public int School_Id { 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 DateTime UpdateTime { get; set; }
/// <summary>
/// 分数规则id
/// </summary>
public int ScoreRuleId { get; set; }
}
}
using Edu.Common.Enum;
using Edu.Common.Enum.Course;
using System;
using VT.FW.DB;
namespace Edu.Model.Entity.OKR
{
/// <summary>
/// okr目标关联实体类
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_OKR_ObjectiveRelation
{
/// <summary>
/// id
/// </summary>
public int Id { get; set; }
/// <summary>
/// 目标id
/// </summary>
public int ObjectiveId { get; set; }
/// <summary>
/// 父级id
/// </summary>
public int ParentId { get; set; }
}
}
using Edu.Common.Enum;
using Edu.Common.Enum.Course;
using System;
using VT.FW.DB;
namespace Edu.Model.Entity.OKR
{
/// <summary>
/// okr周期实体类
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_OKR_Period
{
/// <summary>
/// id
/// </summary>
public int Id { get; set; }
/// <summary>
/// 周期名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 开始时间
/// </summary>
public DateTime StartDate { get; set; }
/// <summary>
/// 结束时间
/// </summary>
public DateTime EndDate { get; set; }
/// <summary>
/// 是否年度 1是 2否
/// </summary>
public int IsYear { get; set; }
/// <summary>
/// 删除状态
/// </summary>
public int Status { get; set; }
/// <summary>
/// 集团id
/// </summary>
public int Group_Id { get; set; }
/// <summary>
/// 学校id
/// </summary>
public int School_Id { 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 DateTime UpdateTime { get; set; }
}
}
using Edu.Common.Enum;
using Edu.Common.Enum.Course;
using Edu.Common.Enum.OKR;
using System;
using VT.FW.DB;
namespace Edu.Model.Entity.OKR
{
/// <summary>
/// okr周期配置实体类
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_OKR_PeriodConfig
{
/// <summary>
/// id
/// </summary>
public int Id { get; set; }
/// <summary>
/// 周期长度 枚举
/// </summary>
public PeriodMonthEnum PeriodMonth { get; set; }
/// <summary>
/// 开始时间
/// </summary>
public DateTime? StartDate { get; set; }
/// <summary>
/// 结束时间
/// </summary>
public DateTime? EndDate { get; set; }
/// <summary>
/// 提前 几天/几月
/// </summary>
public int BeforeNum { get; set; }
/// <summary>
/// 类型 1天 2月
/// </summary>
public int BeforeType { get; set; }
/// <summary>
/// 年度是否开启 1是 2否
/// </summary>
public int YearOKR { get; set; }
/// <summary>
/// 主管审核 1开启 2不开启
/// </summary>
public int DirectorAudit { get; set; }
/// <summary>
/// 集团id
/// </summary>
public int Group_Id { get; set; }
/// <summary>
/// 学校id
/// </summary>
public int School_Id { 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 DateTime UpdateTime { get; set; }
}
}
using Edu.Common.Enum.OKR;
using System;
using VT.FW.DB;
namespace Edu.Model.Entity.OKR
{
/// <summary>
/// okr周期权限实体类
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_OKR_Permission
{
/// <summary>
/// id
/// </summary>
public int Id { get; set; }
/// <summary>
/// 权限类型 1周期 2目标 3结果
/// </summary>
public int PermissionType { get; set; }
/// <summary>
/// 周期/目标/结果 的id
/// </summary>
public int ObjectiveId { get; set; }
/// <summary>
/// 类型 1员工 2部门 3岗位
/// </summary>
public PermissionTypeEnum Type { get; set; }
/// <summary>
/// 人/部门/岗位 id
/// </summary>
public int SourceId { get; set; }
/// <summary>
/// 状态 1可看 2不可看
/// </summary>
public int State { get; set; }
/// <summary>
/// 集团id
/// </summary>
public int Group_Id { get; set; }
/// <summary>
/// 学校id
/// </summary>
public int School_Id { 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 DateTime UpdateTime { get; set; }
}
}
using Edu.Common.Enum;
using Edu.Common.Enum.Course;
using System;
using VT.FW.DB;
namespace Edu.Model.Entity.OKR
{
/// <summary>
/// okr提醒实体类
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_OKR_Remind
{
/// <summary>
/// id
/// </summary>
public int Id { get; set; }
/// <summary>
/// 周期开始后第几个工作日, 英文逗号分隔
/// </summary>
public string Days { get; set; }
/// <summary>
/// 开始时间 (时:分)
/// </summary>
public string Time { get; set; }
/// <summary>
/// 是否启用 1是 2否
/// </summary>
public int Enable { get; set; }
/// <summary>
/// 描述
/// </summary>
public string Description { get; set; }
/// <summary>
/// 类型 1,2,3,4 顺序排
/// </summary>
public int Type { get; set; }
/// <summary>
/// 集团id
/// </summary>
public int Group_Id { get; set; }
/// <summary>
/// 学校id
/// </summary>
public int School_Id { 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 DateTime UpdateTime { get; set; }
}
}
using Edu.Common.Enum;
using Edu.Common.Enum.Course;
using System;
using VT.FW.DB;
namespace Edu.Model.Entity.OKR
{
/// <summary>
/// okr评分实体类
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_OKR_Score
{
/// <summary>
/// id
/// </summary>
public int Id { get; set; }
/// <summary>
/// 规则名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 是否默认 1是 2否
/// </summary>
public int IsDefault { get; set; }
/// <summary>
/// 删除状态
/// </summary>
public int Status { get; set; }
/// <summary>
/// 集团id
/// </summary>
public int Group_Id { get; set; }
/// <summary>
/// 学校id
/// </summary>
public int School_Id { 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 DateTime UpdateTime { get; set; }
}
}
using Edu.Common.Enum;
using Edu.Common.Enum.Course;
using System;
using VT.FW.DB;
namespace Edu.Model.Entity.OKR
{
/// <summary>
/// okr评分明细实体类
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_OKR_ScoreDetail
{
/// <summary>
/// id
/// </summary>
public int Id { get; set; }
/// <summary>
/// 评分id
/// </summary>
public int ScoreId { get; set; }
/// <summary>
/// 评分名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 最小分
/// </summary>
public decimal ScoreMin { get; set; }
/// <summary>
/// 最大分
/// </summary>
public decimal ScoreMax { get; set; }
/// <summary>
/// 颜色编码
/// </summary>
public string Color { get; set; }
}
}
using System;
using System.Collections.Generic;
namespace Edu.Model.ViewModel.OKR
{
/// <summary>
/// OKR评论扩展类
/// </summary>
[Serializable]
public class RB_OKR_Comment_ViewModel : Model.Entity.OKR.RB_OKR_Comment
{
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
namespace Edu.Model.ViewModel.OKR
{
/// <summary>
/// okr关键结果扩展类
/// </summary>
[Serializable]
public class RB_OKR_KeyResult_ViewModel : Model.Entity.OKR.RB_OKR_KeyResult
{
/// <summary>
/// 目标ids
/// </summary>
public string ObjectiveIds { get; set; }
/// <summary>
/// 是否有设置权限 1是 2否
/// </summary>
public int IsLock { get; set; }
/// <summary>
/// 分数名称
/// </summary>
public string ScoreName { get; set; }
/// <summary>
/// 分数颜色
/// </summary>
public string ScoreColor { get; set; }
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
namespace Edu.Model.ViewModel.OKR
{
/// <summary>
/// okr目标扩展类
/// </summary>
[Serializable]
public class RB_OKR_Objective_ViewModel : Model.Entity.OKR.RB_OKR_Objective
{
/// <summary>
/// 上对齐ids
/// </summary>
public string ParentIds { get; set; }
/// <summary>
/// 目标ids
/// </summary>
public string ObjectiveIds { get; set; }
/// <summary>
/// 目标id
/// </summary>
public int ObjectiveId { get; set; }
/// <summary>
/// 对齐列表
/// </summary>
public List<ObjectiveEmployeeModel> ParentList { get; set; }
/// <summary>
/// 对齐列表
/// </summary>
public List<ObjectiveEmployeeModel> ChildList { get; set; }
/// <summary>
/// 关键结果列表
/// </summary>
public List<RB_OKR_KeyResult_ViewModel> KeyResultList { get; set; }
/// <summary>
/// 是否有设置权限 1是 2否
/// </summary>
public int IsLock { get; set; }
/// <summary>
/// 员工姓名
/// </summary>
public string EmName { get; set; }
/// <summary>
/// 员工头像
/// </summary>
public string EmPhoto { get; set; }
/// <summary>
/// 分数名称
/// </summary>
public string ScoreName { get; set; }
/// <summary>
/// 分数颜色
/// </summary>
public string ScoreColor { get; set; }
}
/// <summary>
/// 员工目标
/// </summary>
public class ObjectiveEmployeeModel {
/// <summary>
/// 账户id
/// </summary>
public int AccountId { get; set; }
/// <summary>
/// 账户名称
/// </summary>
public string AccountName { get; set; }
/// <summary>
/// 对齐列表
/// </summary>
public List<RB_OKR_Objective_ViewModel> AlignList { get; set; }
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
namespace Edu.Model.ViewModel.OKR
{
/// <summary>
/// okr周期配置扩展类
/// </summary>
[Serializable]
public class RB_OKR_PeriodConfig_ViewModel : Model.Entity.OKR.RB_OKR_PeriodConfig
{
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
namespace Edu.Model.ViewModel.OKR
{
/// <summary>
/// okr周期扩展类
/// </summary>
[Serializable]
public class RB_OKR_Period_ViewModel : Model.Entity.OKR.RB_OKR_Period
{
/// <summary>
/// 是否当前 1 是 2否
/// </summary>
public int IsCurrent { get; set; }
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
namespace Edu.Model.ViewModel.OKR
{
/// <summary>
/// okr周期权限扩展类
/// </summary>
[Serializable]
public class RB_OKR_Permission_ViewModel : Model.Entity.OKR.RB_OKR_Permission
{
/// <summary>
/// 目标ids
/// </summary>
public string ObjectiveIds { get; set; }
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
namespace Edu.Model.ViewModel.OKR
{
/// <summary>
/// okr提醒扩展类
/// </summary>
[Serializable]
public class RB_OKR_Remind_ViewModel : Model.Entity.OKR.RB_OKR_Remind
{
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
namespace Edu.Model.ViewModel.OKR
{
/// <summary>
/// OKR评分明细扩展类
/// </summary>
[Serializable]
public class RB_OKR_ScoreDetail_ViewModel : Model.Entity.OKR.RB_OKR_ScoreDetail
{
/// <summary>
/// 分规则ids
/// </summary>
public string ScoreIds { get; set; }
}
}
\ No newline at end of file
using System;
using System.Collections.Generic;
namespace Edu.Model.ViewModel.OKR
{
/// <summary>
/// OKR评分扩展类
/// </summary>
[Serializable]
public class RB_OKR_Score_ViewModel : Model.Entity.OKR.RB_OKR_Score
{
/// <summary>
/// 明细列表
/// </summary>
public List<RB_OKR_ScoreDetail_ViewModel> DetailList { get; set; }
}
}
\ No newline at end of file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Edu.Aop\Edu.Aop.csproj" />
<ProjectReference Include="..\Edu.Cache\Edu.Cache.csproj" />
<ProjectReference Include="..\Edu.Common\Edu.Common.csproj" />
<ProjectReference Include="..\Edu.Model\Edu.Model.csproj" />
<ProjectReference Include="..\Edu.Repository\Edu.Repository.csproj" />
</ItemGroup>
</Project>
This diff is collapsed.
using Edu.Common.Enum;
using Edu.Model.Entity.OKR;
using Edu.Model.ViewModel.OKR;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VT.FW.DB.Dapper;
namespace Edu.Repository.OKR
{
/// <summary>
/// OKR评论仓储层
/// </summary>
public class RB_OKR_CommentRepository : BaseRepository<RB_OKR_Comment>
{
/// <summary>
/// 获取分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="demodel"></param>
/// <returns></returns>
public List<RB_OKR_Comment_ViewModel> GetPageList(int pageIndex, int pageSize, out long rowsCount, RB_OKR_Comment_ViewModel demodel)
{
string where = $@" 1=1 and State <> 3";
if (demodel.Group_Id > 0)
{
where += $@" and {nameof(RB_OKR_Comment_ViewModel.Group_Id)} ={demodel.Group_Id}";
}
if (demodel.PeriodId > 0)
{
where += $@" and {nameof(RB_OKR_Comment_ViewModel.PeriodId)} ={demodel.PeriodId}";
}
if (demodel.State > 0)
{
where += $@" and {nameof(RB_OKR_Comment_ViewModel.State)} ={demodel.State}";
}
string sql = $@" select * from RB_OKR_Comment where {where} order by Id desc";
return GetPage<RB_OKR_Comment_ViewModel>(pageIndex, pageSize, out rowsCount, sql).ToList();
}
/// <summary>
/// 获取列表
/// </summary>
/// <param name="demodel"></param>
/// <returns></returns>
public List<RB_OKR_Comment_ViewModel> GetList(RB_OKR_Comment_ViewModel demodel)
{
string where = $@" 1=1 and State <> 3";
if (demodel.Group_Id > 0)
{
where += $@" and {nameof(RB_OKR_Comment_ViewModel.Group_Id)} ={demodel.Group_Id}";
}
if (demodel.PeriodId > 0)
{
where += $@" and {nameof(RB_OKR_Comment_ViewModel.PeriodId)} ={demodel.PeriodId}";
}
if (demodel.State > 0)
{
where += $@" and {nameof(RB_OKR_Comment_ViewModel.State)} ={demodel.State}";
}
string sql = $@" select * from RB_OKR_Comment where {where} order by Id desc";
return Get<RB_OKR_Comment_ViewModel>(sql).ToList();
}
}
}
using Edu.Common.Enum;
using Edu.Model.Entity.OKR;
using Edu.Model.ViewModel.OKR;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VT.FW.DB.Dapper;
namespace Edu.Repository.OKR
{
/// <summary>
/// OKR结果仓储层
/// </summary>
public class RB_OKR_KeyResultRepository : BaseRepository<RB_OKR_KeyResult>
{
/// <summary>
/// 获取分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="demodel"></param>
/// <returns></returns>
public List<RB_OKR_KeyResult_ViewModel> GetPageList(int pageIndex, int pageSize, out long rowsCount, RB_OKR_KeyResult_ViewModel demodel)
{
string where = $@" 1=1 and Status =0";
if (demodel.Group_Id > 0)
{
where += $@" and {nameof(RB_OKR_KeyResult_ViewModel.Group_Id)} ={demodel.Group_Id}";
}
if (demodel.ObjectiveId > 0)
{
where += $@" and {nameof(RB_OKR_KeyResult_ViewModel.ObjectiveId)} ={demodel.ObjectiveId}";
}
if (demodel.ProgressState > 0)
{
where += $@" and {nameof(RB_OKR_KeyResult_ViewModel.ProgressState)} ={(int)demodel.ProgressState}";
}
string sql = $@" select * from RB_OKR_KeyResult where {where} order by Id desc";
return GetPage<RB_OKR_KeyResult_ViewModel>(pageIndex, pageSize, out rowsCount, sql).ToList();
}
/// <summary>
/// 获取列表
/// </summary>
/// <param name="demodel"></param>
/// <returns></returns>
public List<RB_OKR_KeyResult_ViewModel> GetList(RB_OKR_KeyResult_ViewModel demodel)
{
string where = $@" 1=1 and Status =0";
if (demodel.Group_Id > 0)
{
where += $@" and {nameof(RB_OKR_KeyResult_ViewModel.Group_Id)} ={demodel.Group_Id}";
}
if (demodel.ObjectiveId > 0)
{
where += $@" and {nameof(RB_OKR_KeyResult_ViewModel.ObjectiveId)} ={demodel.ObjectiveId}";
}
if (!string.IsNullOrEmpty(demodel.ObjectiveIds))
{
where += $@" and {nameof(RB_OKR_KeyResult_ViewModel.ObjectiveId)} in({demodel.ObjectiveIds})";
}
if (demodel.ProgressState > 0)
{
where += $@" and {nameof(RB_OKR_KeyResult_ViewModel.ProgressState)} ={(int)demodel.ProgressState}";
}
string sql = $@" select * from RB_OKR_KeyResult where {where} order by Id desc";
return Get<RB_OKR_KeyResult_ViewModel>(sql).ToList();
}
/// <summary>
/// 获取最大sort
/// </summary>
/// <param name="objectiveId"></param>
/// <returns></returns>
public int GetKeyResultMaxSort(int objectiveId)
{
string sql = $@"SELECT MAX(Sort) Sort FROM rb_okr_keyresult WHERE ObjectiveId ={objectiveId}";
var obj = ExecuteScalar(sql);
return obj == null ? 0 : Convert.ToInt32(obj);
}
/// <summary>
/// 设置排序
/// </summary>
/// <param name="objectiveId"></param>
/// <param name="id"></param>
/// <param name="startSort"></param>
/// <param name="endSort"></param>
/// <returns></returns>
public bool UpdateOtherSort(int objectiveId, int id, int startSort, int endSort)
{
string sql = $@"UPDATE rb_okr_keyresult SET Sort =Sort +1 WHERE ObjectiveId={objectiveId} AND Id <>{id} ";
if (startSort > 0)
{
sql += $@" AND Sort > {startSort} ";
}
if (endSort > 0)
{
sql += $@" and Sort < {endSort} ";
}
return Execute(sql) > 0;
}
/// <summary>
/// 设置排序
/// </summary>
/// <param name="objectiveId"></param>
/// <param name="id"></param>
/// <param name="startSort"></param>
/// <param name="endSort"></param>
/// <returns></returns>
public bool UpdateOtherSortDesc(int objectiveId, int id, int startSort, int endSort)
{
string sql = $@"UPDATE rb_okr_keyresult SET Sort =Sort -1 WHERE ObjectiveId={objectiveId} AND Id <>{id} ";
if (startSort > 0 && endSort > 0)
{
sql += $@" AND Sort > {startSort} and Sort <= {endSort}";
}
return Execute(sql) > 0;
}
}
}
using Edu.Common.Enum;
using Edu.Model.Entity.OKR;
using Edu.Model.ViewModel.OKR;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VT.FW.DB.Dapper;
namespace Edu.Repository.OKR
{
/// <summary>
/// OKR目标仓储层
/// </summary>
public class RB_OKR_ObjectiveRepository : BaseRepository<RB_OKR_Objective>
{
/// <summary>
/// 获取分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="demodel"></param>
/// <returns></returns>
public List<RB_OKR_Objective_ViewModel> GetPageList(int pageIndex, int pageSize, out long rowsCount, RB_OKR_Objective_ViewModel demodel)
{
string where = $@" 1=1 and Status <>5";
if (demodel.Group_Id > 0)
{
where += $@" and {nameof(RB_OKR_Objective_ViewModel.Group_Id)} ={demodel.Group_Id}";
}
if (demodel.PeriodId > 0)
{
where += $@" and {nameof(RB_OKR_Objective_ViewModel.PeriodId)} ={demodel.PeriodId}";
}
if (!string.IsNullOrEmpty(demodel.Title))
{
where += $@" and {nameof(RB_OKR_Objective_ViewModel.Title)} like '%{demodel.Title}%'";
}
if (demodel.ProgressState > 0)
{
where += $@" and {nameof(RB_OKR_Objective_ViewModel.ProgressState)} ={(int)demodel.ProgressState}";
}
string sql = $@" select * from RB_OKR_Objective where {where} order by Id desc";
return GetPage<RB_OKR_Objective_ViewModel>(pageIndex, pageSize, out rowsCount, sql).ToList();
}
/// <summary>
/// 获取列表
/// </summary>
/// <param name="demodel"></param>
/// <returns></returns>
public List<RB_OKR_Objective_ViewModel> GetList(RB_OKR_Objective_ViewModel demodel)
{
string where = $@" 1=1 and Status <>5";
if (demodel.Group_Id > 0)
{
where += $@" and {nameof(RB_OKR_Objective_ViewModel.Group_Id)} ={demodel.Group_Id}";
}
if (!string.IsNullOrEmpty(demodel.ObjectiveIds))
{
where += $@" and {nameof(RB_OKR_Objective_ViewModel.Id)} in({demodel.ObjectiveIds})";
}
if (demodel.PeriodId > 0)
{
where += $@" and {nameof(RB_OKR_Objective_ViewModel.PeriodId)} ={demodel.PeriodId}";
}
if (!string.IsNullOrEmpty(demodel.Title))
{
where += $@" and {nameof(RB_OKR_Objective_ViewModel.Title)} like '%{demodel.Title}%'";
}
if (demodel.ProgressState > 0)
{
where += $@" and {nameof(RB_OKR_Objective_ViewModel.ProgressState)} ={(int)demodel.ProgressState}";
}
if (demodel.CreateBy > 0)
{
where += $@" and {nameof(RB_OKR_Objective_ViewModel.CreateBy)} ={demodel.CreateBy}";
}
if (demodel.Status > 0)
{
where += $@" and {nameof(RB_OKR_Objective_ViewModel.Status)} ={demodel.Status}";
}
string sql = $@" select * from RB_OKR_Objective where {where} order by Sort asc";
return Get<RB_OKR_Objective_ViewModel>(sql).ToList();
}
/// <summary>
/// 获取父级列表
/// </summary>
/// <param name="demodel"></param>
/// <returns></returns>
public List<RB_OKR_Objective_ViewModel> GetParentList(RB_OKR_Objective_ViewModel demodel)
{
string where = $@" 1=1 and o.Status <>5";
if (demodel.Group_Id > 0)
{
where += $@" and o.{nameof(RB_OKR_Objective_ViewModel.Group_Id)} ={demodel.Group_Id}";
}
if (demodel.PeriodId > 0)
{
where += $@" and o.{nameof(RB_OKR_Objective_ViewModel.PeriodId)} ={demodel.PeriodId}";
}
if (!string.IsNullOrEmpty(demodel.Title))
{
where += $@" and o.{nameof(RB_OKR_Objective_ViewModel.Title)} like '%{demodel.Title}%'";
}
if (demodel.ProgressState > 0)
{
where += $@" and o.{nameof(RB_OKR_Objective_ViewModel.ProgressState)} ={(int)demodel.ProgressState}";
}
if (demodel.CreateBy > 0)
{
where += $@" and o.{nameof(RB_OKR_Objective_ViewModel.CreateBy)} ={demodel.CreateBy}";
}
if (demodel.Status > 0)
{
where += $@" and o.{nameof(RB_OKR_Objective_ViewModel.Status)} ={demodel.Status}";
}
if (!string.IsNullOrEmpty(demodel.ObjectiveIds))
{
where += $@" and r.{nameof(RB_OKR_ObjectiveRelation.ObjectiveId)} in({demodel.ObjectiveIds})";
}
if (!string.IsNullOrEmpty(demodel.ParentIds))
{
where += $@" and r.{nameof(RB_OKR_ObjectiveRelation.ParentId)} in({demodel.ParentIds})";
}
string sql = $@" select o.*,r.ObjectiveId,r.ParentId,e.EmName,e.EmPhoto from RB_OKR_Objective o
inner join rb_okr_objectiverelation r on o.Id = r.ParentId
left join rb_employee e on o.CreateBy = e.EmployeeId
where {where} order by o.Id desc";
return Get<RB_OKR_Objective_ViewModel>(sql).ToList();
}
/// <summary>
/// 获取最大的Sort
/// </summary>
/// <param name="group_Id"></param>
/// <param name="periodId"></param>
/// <param name="id"></param>
/// <returns></returns>
public int GetObjectiveMaxSort(int group_Id, int periodId, int id)
{
string sql = $@"SELECT MAX(Sort) Sort FROM rb_okr_objective where Group_Id={group_Id} and PeriodId={periodId} AND CreateBy ={id}";
var obj = ExecuteScalar(sql);
return obj == null ? 0 : Convert.ToInt32(obj);
}
/// <summary>
/// 设置排序
/// </summary>
/// <param name="periodId"></param>
/// <param name="createBy"></param>
/// <param name="startSort"></param>
/// <param name="endSort"></param>
/// <returns></returns>
public bool UpdateOtherSort(int periodId, int createBy, int id, int startSort, int endSort)
{
string sql = $@"UPDATE rb_okr_objective SET Sort =Sort +1 WHERE PeriodId={periodId} AND CreateBy ={createBy} AND Id <> {id} ";
if (startSort > 0)
{
sql += $@" AND Sort > {startSort} ";
}
if (endSort > 0) {
sql += $@" and Sort < {endSort} ";
}
return Execute(sql) > 0;
}
/// <summary>
/// 设置排序
/// </summary>
/// <param name="periodId"></param>
/// <param name="createBy"></param>
/// <param name="id"></param>
/// <param name="startSort"></param>
/// <param name="endSort"></param>
/// <returns></returns>
public bool UpdateOtherSortDesc(int periodId, int createBy, int id, int startSort, int endSort)
{
string sql = $@"UPDATE rb_okr_objective SET Sort =Sort -1 WHERE PeriodId={periodId} AND CreateBy ={createBy} AND Id <> {id} ";
if (startSort > 0 && endSort > 0)
{
sql += $@" AND Sort > {startSort} and Sort <= {endSort}";
}
return Execute(sql) > 0;
}
}
}
using Edu.Common.Enum;
using Edu.Model.Entity.OKR;
using Edu.Model.ViewModel.OKR;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VT.FW.DB.Dapper;
namespace Edu.Repository.OKR
{
/// <summary>
/// OKR周期配置仓储层
/// </summary>
public class RB_OKR_PeriodConfigRepository : BaseRepository<RB_OKR_PeriodConfig>
{
/// <summary>
/// 获取分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="demodel"></param>
/// <returns></returns>
public List<RB_OKR_PeriodConfig_ViewModel> GetPageList(int pageIndex, int pageSize, out long rowsCount, RB_OKR_PeriodConfig_ViewModel demodel)
{
string where = $@" 1=1";
if (demodel.Group_Id > 0)
{
where += $@" and {nameof(RB_OKR_PeriodConfig_ViewModel.Group_Id)} ={demodel.Group_Id}";
}
string sql = $@" select * from RB_OKR_PeriodConfig where {where} order by Id desc";
return GetPage<RB_OKR_PeriodConfig_ViewModel>(pageIndex, pageSize, out rowsCount, sql).ToList();
}
/// <summary>
/// 获取列表
/// </summary>
/// <param name="demodel"></param>
/// <returns></returns>
public List<RB_OKR_PeriodConfig_ViewModel> GetList(RB_OKR_PeriodConfig_ViewModel demodel)
{
string where = $@" 1=1";
if (demodel.Group_Id > 0)
{
where += $@" and {nameof(RB_OKR_PeriodConfig_ViewModel.Group_Id)} ={demodel.Group_Id}";
}
string sql = $@" select * from RB_OKR_PeriodConfig where {where} order by Id desc";
return Get<RB_OKR_PeriodConfig_ViewModel>(sql).ToList();
}
}
}
using Edu.Common.Enum;
using Edu.Model.Entity.OKR;
using Edu.Model.ViewModel.OKR;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VT.FW.DB.Dapper;
namespace Edu.Repository.OKR
{
/// <summary>
/// OKR周期仓储层
/// </summary>
public class RB_OKR_PeriodRepository : BaseRepository<RB_OKR_Period>
{
/// <summary>
/// 获取分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="demodel"></param>
/// <returns></returns>
public List<RB_OKR_Period_ViewModel> GetPageList(int pageIndex, int pageSize, out long rowsCount, RB_OKR_Period_ViewModel demodel)
{
string where = $@" 1=1 and Status =0";
if (demodel.Group_Id > 0)
{
where += $@" and {nameof(RB_OKR_Period_ViewModel.Group_Id)} ={demodel.Group_Id}";
}
if (demodel.IsYear > 0)
{
where += $@" and {nameof(RB_OKR_Period_ViewModel.IsYear)} ={demodel.IsYear}";
}
string sql = $@" select * from RB_OKR_Period where {where} order by Id desc";
return GetPage<RB_OKR_Period_ViewModel>(pageIndex, pageSize, out rowsCount, sql).ToList();
}
/// <summary>
/// 获取列表
/// </summary>
/// <param name="demodel"></param>
/// <returns></returns>
public List<RB_OKR_Period_ViewModel> GetList(RB_OKR_Period_ViewModel demodel)
{
string where = $@" 1=1 and Status =0";
if (demodel.Group_Id > 0)
{
where += $@" and {nameof(RB_OKR_Period_ViewModel.Group_Id)} ={demodel.Group_Id}";
}
if (demodel.IsYear > 0)
{
where += $@" and {nameof(RB_OKR_Period_ViewModel.IsYear)} ={demodel.IsYear}";
}
string sql = $@" select * from RB_OKR_Period where {where} order by StartDate desc,IsYear asc";
return Get<RB_OKR_Period_ViewModel>(sql).ToList();
}
}
}
using Edu.Common.Enum;
using Edu.Model.Entity.OKR;
using Edu.Model.ViewModel.OKR;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VT.FW.DB.Dapper;
namespace Edu.Repository.OKR
{
/// <summary>
/// OKR周期权限仓储层
/// </summary>
public class RB_OKR_PermissionRepository : BaseRepository<RB_OKR_Permission>
{
/// <summary>
/// 获取分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="demodel"></param>
/// <returns></returns>
public List<RB_OKR_Permission_ViewModel> GetPageList(int pageIndex, int pageSize, out long rowsCount, RB_OKR_Permission_ViewModel demodel)
{
string where = $@" 1=1";
if (demodel.Group_Id > 0)
{
where += $@" and {nameof(RB_OKR_Permission_ViewModel.Group_Id)} ={demodel.Group_Id}";
}
if (demodel.PermissionType > 0)
{
where += $@" and {nameof(RB_OKR_Permission_ViewModel.PermissionType)} ={demodel.PermissionType}";
}
if (demodel.ObjectiveId > 0)
{
where += $@" and {nameof(RB_OKR_Permission_ViewModel.ObjectiveId)} ={demodel.ObjectiveId}";
}
if (demodel.Type > 0)
{
where += $@" and {nameof(RB_OKR_Permission_ViewModel.Type)} ={demodel.Type}";
}
if (demodel.SourceId > 0)
{
where += $@" and {nameof(RB_OKR_Permission_ViewModel.SourceId)} ={demodel.SourceId}";
}
if (demodel.State > 0)
{
where += $@" and {nameof(RB_OKR_Permission_ViewModel.State)} ={demodel.State}";
}
string sql = $@" select * from RB_OKR_Permission where {where} order by Id desc";
return GetPage<RB_OKR_Permission_ViewModel>(pageIndex, pageSize, out rowsCount, sql).ToList();
}
/// <summary>
/// 获取列表
/// </summary>
/// <param name="demodel"></param>
/// <returns></returns>
public List<RB_OKR_Permission_ViewModel> GetList(RB_OKR_Permission_ViewModel demodel)
{
string where = $@" 1=1";
if (demodel.Group_Id > 0)
{
where += $@" and {nameof(RB_OKR_Permission_ViewModel.Group_Id)} ={demodel.Group_Id}";
}
if (demodel.PermissionType > 0)
{
where += $@" and {nameof(RB_OKR_Permission_ViewModel.PermissionType)} ={demodel.PermissionType}";
}
if (demodel.ObjectiveId > 0)
{
where += $@" and {nameof(RB_OKR_Permission_ViewModel.ObjectiveId)} ={demodel.ObjectiveId}";
}
if (!string.IsNullOrEmpty(demodel.ObjectiveIds))
{
where += $@" and {nameof(RB_OKR_Permission_ViewModel.ObjectiveId)} in({demodel.ObjectiveIds})";
}
if (demodel.Type > 0)
{
where += $@" and {nameof(RB_OKR_Permission_ViewModel.Type)} ={demodel.Type}";
}
if (demodel.SourceId > 0)
{
where += $@" and {nameof(RB_OKR_Permission_ViewModel.SourceId)} ={demodel.SourceId}";
}
if (demodel.State > 0)
{
where += $@" and {nameof(RB_OKR_Permission_ViewModel.State)} ={demodel.State}";
}
string sql = $@" select * from RB_OKR_Permission where {where} order by Id desc";
return Get<RB_OKR_Permission_ViewModel>(sql).ToList();
}
}
}
using Edu.Common.Enum;
using Edu.Model.Entity.OKR;
using Edu.Model.ViewModel.OKR;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VT.FW.DB.Dapper;
namespace Edu.Repository.OKR
{
/// <summary>
/// OKR提醒仓储层
/// </summary>
public class RB_OKR_RemindRepository : BaseRepository<RB_OKR_Remind>
{
/// <summary>
/// 获取分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="demodel"></param>
/// <returns></returns>
public List<RB_OKR_Remind_ViewModel> GetPageList(int pageIndex, int pageSize, out long rowsCount, RB_OKR_Remind_ViewModel demodel)
{
string where = $@" 1=1";
if (demodel.Group_Id > 0)
{
where += $@" and {nameof(RB_OKR_Remind_ViewModel.Group_Id)} ={demodel.Group_Id}";
}
if (demodel.Type > 0)
{
where += $@" and {nameof(RB_OKR_Remind_ViewModel.Type)} ={demodel.Type}";
}
string sql = $@" select * from RB_OKR_Remind where {where} order by Id desc";
return GetPage<RB_OKR_Remind_ViewModel>(pageIndex, pageSize, out rowsCount, sql).ToList();
}
/// <summary>
/// 获取列表
/// </summary>
/// <param name="demodel"></param>
/// <returns></returns>
public List<RB_OKR_Remind_ViewModel> GetList(RB_OKR_Remind_ViewModel demodel)
{
string where = $@" 1=1";
if (demodel.Group_Id > 0)
{
where += $@" and {nameof(RB_OKR_Remind_ViewModel.Group_Id)} ={demodel.Group_Id}";
}
if (demodel.Type > 0)
{
where += $@" and {nameof(RB_OKR_Remind_ViewModel.Type)} ={demodel.Type}";
}
string sql = $@" select * from RB_OKR_Remind where {where} order by Id desc";
return Get<RB_OKR_Remind_ViewModel>(sql).ToList();
}
}
}
using Edu.Common.Enum;
using Edu.Model.Entity.OKR;
using Edu.Model.ViewModel.OKR;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VT.FW.DB.Dapper;
namespace Edu.Repository.OKR
{
/// <summary>
/// OKR评分明细仓储层
/// </summary>
public class RB_OKR_ScoreDetailRepository : BaseRepository<RB_OKR_ScoreDetail>
{
/// <summary>
/// 获取分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="demodel"></param>
/// <returns></returns>
public List<RB_OKR_ScoreDetail_ViewModel> GetPageList(int pageIndex, int pageSize, out long rowsCount, RB_OKR_ScoreDetail_ViewModel demodel)
{
string where = $@" 1=1";
if (demodel.ScoreId > 0)
{
where += $@" and {nameof(RB_OKR_ScoreDetail_ViewModel.ScoreId)} ={demodel.ScoreId}";
}
string sql = $@" select * from RB_OKR_ScoreDetail where {where} order by Id desc";
return GetPage<RB_OKR_ScoreDetail_ViewModel>(pageIndex, pageSize, out rowsCount, sql).ToList();
}
/// <summary>
/// 获取列表
/// </summary>
/// <param name="demodel"></param>
/// <returns></returns>
public List<RB_OKR_ScoreDetail_ViewModel> GetList(RB_OKR_ScoreDetail_ViewModel demodel)
{
string where = $@" 1=1";
if (demodel.ScoreId > 0)
{
where += $@" and {nameof(RB_OKR_ScoreDetail_ViewModel.ScoreId)} ={demodel.ScoreId}";
}
if (!string.IsNullOrEmpty(demodel.ScoreIds))
{
where += $@" and {nameof(RB_OKR_ScoreDetail_ViewModel.ScoreId)} in({demodel.ScoreIds})";
}
string sql = $@" select * from RB_OKR_ScoreDetail where {where} order by Id desc";
return Get<RB_OKR_ScoreDetail_ViewModel>(sql).ToList();
}
}
}
using Edu.Common.Enum;
using Edu.Model.Entity.OKR;
using Edu.Model.ViewModel.OKR;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VT.FW.DB.Dapper;
namespace Edu.Repository.OKR
{
/// <summary>
/// OKR评分仓储层
/// </summary>
public class RB_OKR_ScoreRepository : BaseRepository<RB_OKR_Score>
{
/// <summary>
/// 获取分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="demodel"></param>
/// <returns></returns>
public List<RB_OKR_Score_ViewModel> GetPageList(int pageIndex, int pageSize, out long rowsCount, RB_OKR_Score_ViewModel demodel)
{
string where = $@" 1=1 and Status =0";
if (demodel.Group_Id > 0)
{
where += $@" and {nameof(RB_OKR_Score_ViewModel.Group_Id)} ={demodel.Group_Id}";
}
if (demodel.IsDefault > 0)
{
where += $@" and {nameof(RB_OKR_Score_ViewModel.IsDefault)} ={demodel.IsDefault}";
}
string sql = $@" select * from RB_OKR_Score where {where} order by Id desc";
return GetPage<RB_OKR_Score_ViewModel>(pageIndex, pageSize, out rowsCount, sql).ToList();
}
/// <summary>
/// 获取列表
/// </summary>
/// <param name="demodel"></param>
/// <returns></returns>
public List<RB_OKR_Score_ViewModel> GetList(RB_OKR_Score_ViewModel demodel)
{
string where = $@" 1=1 and Status =0";
if (demodel.Group_Id > 0)
{
where += $@" and {nameof(RB_OKR_Score_ViewModel.Group_Id)} ={demodel.Group_Id}";
}
if (demodel.IsDefault > 0)
{
where += $@" and {nameof(RB_OKR_Score_ViewModel.IsDefault)} ={demodel.IsDefault}";
}
string sql = $@" select * from RB_OKR_Score where {where} order by Id desc";
return Get<RB_OKR_Score_ViewModel>(sql).ToList();
}
}
}
This diff is collapsed.
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
......@@ -30,6 +30,7 @@
<ProjectReference Include="..\Edu.Model\Edu.Model.csproj" />
<ProjectReference Include="..\Edu.Module.Course\Edu.Module.Course.csproj" />
<ProjectReference Include="..\Edu.Module.Finance\Edu.Module.Finance.csproj" />
<ProjectReference Include="..\Edu.Module.OKR\Edu.Module.OKR.csproj" />
<ProjectReference Include="..\Edu.Module.Public\Edu.Module.Public.csproj" />
<ProjectReference Include="..\Edu.Module.Question\Edu.Module.Question.csproj" />
<ProjectReference Include="..\Edu.Module.System\Edu.Module.System.csproj" />
......
......@@ -52,6 +52,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
.editorconfig = .editorconfig
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edu.Module.OKR", "Edu.Module.OKR\Edu.Module.OKR.csproj", "{DA20EF60-D6D6-4EE3-950B-96F231A2F6F2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
......@@ -118,6 +120,10 @@ Global
{FF7B1BD4-0F06-4D22-91EB-9140E65A87AE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FF7B1BD4-0F06-4D22-91EB-9140E65A87AE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FF7B1BD4-0F06-4D22-91EB-9140E65A87AE}.Release|Any CPU.Build.0 = Release|Any CPU
{DA20EF60-D6D6-4EE3-950B-96F231A2F6F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DA20EF60-D6D6-4EE3-950B-96F231A2F6F2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DA20EF60-D6D6-4EE3-950B-96F231A2F6F2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DA20EF60-D6D6-4EE3-950B-96F231A2F6F2}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
......@@ -137,6 +143,7 @@ Global
{5F76907A-7181-4FC5-B224-52CDD5B90359} = {52C9E4CB-A475-4232-95A3-4508B6592AC7}
{A737D901-5EC5-4593-867A-899482FAA67A} = {7AC0A4EC-3215-4FF2-96DC-DE8325ED6915}
{FF7B1BD4-0F06-4D22-91EB-9140E65A87AE} = {5B0BC66C-B15F-4174-8966-0968C61F816F}
{DA20EF60-D6D6-4EE3-950B-96F231A2F6F2} = {7AC0A4EC-3215-4FF2-96DC-DE8325ED6915}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
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