1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using EMIS.DataLogic.Repositories;
- using System.Linq.Expressions;
- using EMIS.Entities;
- using EMIS.ViewModel.EvaluationManage;
- namespace EMIS.DataLogic.Common.EvaluationManage
- {
- public class EvaluationProjectDAL
- {
- public EvaluationProjectRepository evaluationProjectRepository { get; set; }
- public EvaluationTargetRepository evaluationTargetRepository { get; set; }
- public EvaluationEnterRepository evaluationEnterRepository { get; set; }
- /// <summary>
- /// 读取评价项目信息
- /// </summary>
- /// <param name="exp"></param>
- /// <returns></returns>
- public IQueryable<EvaluationProjectView> GetEvaluationProjectQueryable(Expression<Func<EM_EvaluationProject, bool>> exp)
- {
- var query = from a in evaluationProjectRepository.GetList(exp)
- join b in evaluationTargetRepository.Entities on a.EvaluationTargetID equals b.EvaluationTargetID
- select new EvaluationProjectView
- {
- ProjectID = a.EvaluationProjectID,
- Code = a.Code,
- Name = a.Name,
- OrderID = a.OrderNo,
- Weight = a.Weight,
- TargetID = a.EvaluationTargetID,
- TargetCode=b.Code,
- TargetName=b.Name,
- TableID=b.EM_EvaluationTable.EvaluationTableID,
- TableCode=b.EM_EvaluationTable.Code,
- TableName=b.EM_EvaluationTable.Name,
- NormID=b.EM_EvaluationNorm.EvaluationNormID,
- NormName=b.EM_EvaluationNorm.Name,
- Remark=a.Remark,
- CreateUserID = a.CreateUserID,
- CreateTime = a.CreateTime,
- TargetWeight = b.Weight //评价指标权重
- };
- return query;
- }
- }
- }
|