using Edu.Model.Entity.Finance; using Edu.Model.ViewModel.Finance; using System.Collections.Generic; using System.Linq; namespace Edu.Repository.Finance { /// /// 财务流程费用配置仓储层 /// public class RB_Finance_ConfigRepository : BaseRepository { /// /// 获取列表 /// /// /// public List GetList(RB_Finance_Config_ViewModel demodel) { string where = $@" 1=1 and Status =0"; if (demodel.Group_Id > 0) { where += $@" and {nameof(RB_Finance_Config_ViewModel.Group_Id)} ={demodel.Group_Id}"; } if (demodel.Type > 0) { where += $@" and {nameof(RB_Finance_Config_ViewModel.Type)} ={(int)demodel.Type}"; } string sql = $@" select * from RB_Finance_Config where {where} order by Id desc"; return Get(sql).ToList(); } } }