Commit 0f220e41 authored by liudong1993's avatar liudong1993

1

parent 620f29c7
using Edu.Common.Enum;
using Edu.Common.Enum.Course;
using System;
using VT.FW.DB;
namespace Edu.Model.Entity.Sell
{
/// <summary>
/// 市场顾问提成规则实体类
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_Sell_Achievements_Rule
{
/// <summary>
/// Id
/// </summary>
public int Id { get; set; }
/// <summary>
/// 方案名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 类型 1市场、2顾问、3教师
/// </summary>
public int Type { get; set; }
/// <summary>
/// 课程类型 1包含 2不包含
/// </summary>
public int CourseType { get; set; }
/// <summary>
/// 相关课程Ids 英文逗号分隔
/// </summary>
public string CourseIds { get; set; }
/// <summary>
/// 提成方式 1课耗提成 2次月全提 3课程比例
/// </summary>
public int CommissionType { get; set; }
/// <summary>
/// 提成人员
/// </summary>
public string EmpIds { get; set; }
/// <summary>
/// 子人员 用于部门的情况
/// </summary>
public string ChildEmpIds { get; set; }
/// <summary>
/// 集团编号
/// </summary>
public int Group_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>
/// 课程比例
/// </summary>
public decimal CourseRate { get; set; }
/// <summary>
/// 业绩提成比例 json格式
/// </summary>
public string Content { get; set; }
}
}
using Edu.Model.Entity.Sell;
using Edu.Model.ViewModel.Course;
using Edu.Model.ViewModel.User;
using System;
using System.Collections.Generic;
namespace Edu.Model.ViewModel.Sell
{
/// <summary>
/// 市场顾问提成规则实体类
/// </summary>
[Serializable]
public class RB_Sell_Achievements_Rule_ViewModel : RB_Sell_Achievements_Rule
{
/// <summary>
/// 业绩比例
/// </summary>
public List<AchievementsRateModel> RateList { get; set; }
/// <summary>
/// 课程
/// </summary>
public List<RB_Course_ViewModel> CourseList { get; set; }
/// <summary>
/// 人员列表
/// </summary>
public List<Employee_ViewModel> EmpList { get; set; }
/// <summary>
/// 部门下人员列表
/// </summary>
public List<Employee_ViewModel> ChildEmpList { get; set; }
}
/// <summary>
/// 业绩比列
/// </summary>
public class AchievementsRateModel {
/// <summary>
/// 开始值 (不包含)
/// </summary>
public decimal StartValue { get; set; }
/// <summary>
/// 结束值 -1表示不限 (包含)
/// </summary>
public decimal EndValue { get; set; }
/// <summary>
/// 提成比例
/// </summary>
public decimal Rate { get; set; }
}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
using Edu.Common.Enum;
using Edu.Model.Entity.Course;
using Edu.Model.Entity.Sell;
using Edu.Model.ViewModel.Course;
using Edu.Model.ViewModel.Sell;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VT.FW.DB.Dapper;
namespace Edu.Repository.Sell
{
/// <summary>
/// 市场顾问提成规则仓储层
/// </summary>
public class RB_Sell_Achievements_RuleRepository : BaseRepository<RB_Sell_Achievements_Rule>
{
/// <summary>
/// 获取列表
/// </summary>
/// <param name="demodel"></param>
/// <returns></returns>
public List<RB_Sell_Achievements_Rule_ViewModel> GetList(RB_Sell_Achievements_Rule_ViewModel demodel)
{
string where = $@" 1=1";
if (demodel.Group_Id > 0)
{
where += $@" and r.{nameof(RB_Sell_Achievements_Rule_ViewModel.Group_Id)} ={demodel.Group_Id}";
}
string sql = $@" select r.* from RB_Sell_Achievements_Rule r where {where} order by r.Id desc";
return Get<RB_Sell_Achievements_Rule_ViewModel>(sql).ToList();
}
}
}
This diff is collapsed.
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