| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 根据编号获得信息 |
| | | /// </summary> |
| | | /// <param name="Keyid">编号</param> |
| | | /// <returns></returns> |
| | | public OA_WorkPlan GetModelByFukuanshenqid(string PlanComplany, string RewardType) |
| | | { |
| | | try |
| | | { |
| | | string condi = ""; |
| | | if (!string.IsNullOrEmpty(PlanComplany)) |
| | | { |
| | | condi = " a.PlanComplany = '"+ PlanComplany + "' "; |
| | | } |
| | | else if (!string.IsNullOrEmpty(RewardType)) |
| | | { |
| | | condi = " a.RewardType = '" + RewardType + "' "; |
| | | } |
| | | else |
| | | { |
| | | return null; |
| | | } |
| | | |
| | | IList<OA_WorkPlan> result = _dataBase.SelectModel<OA_WorkPlan>(" a.* ", " OA_WorkPlan a ", condi) as IList<OA_WorkPlan>;//执行查询 |
| | | |
| | | return (null == result || result.Count == 0) ? null : result[0];//返回结果 |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw ex; |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 分页查询 |
| | | /// </summary> |
| | |
| | | /// <param name="EvaluationStatus"></param> |
| | | /// <param name="RewardType"></param> |
| | | /// <returns></returns> |
| | | public IEnumerable<Model.OA_WorkPlan> SelectModelPage(Infrastructure.Query.Pagination pagination, Guid MemberId, Guid SentStaffId, Guid ReciveStaffId, int? PlanType, int? PlanDataType, string PlanTitle, DateTime? BeginPlanStartTime, DateTime? EndPlanStartTime, DateTime? BeginPlanRunTime, DateTime? EndPlanRunTime, string PlanPeople, int? PlanStatus, int? ApprovalStatus, int? EvaluationStatus, int? RewardType, string RewardContent = null, string PlanContent = null) |
| | | public IEnumerable<Model.OA_WorkPlan> SelectModelPage(Infrastructure.Query.Pagination pagination, Guid MemberId, Guid SentStaffId, Guid ReciveStaffId, int? PlanType, int? PlanDataType, string PlanTitle, DateTime? BeginPlanStartTime, DateTime? EndPlanStartTime, DateTime? BeginPlanRunTime, DateTime? EndPlanRunTime, string PlanPeople, int? PlanStatus, int? ApprovalStatus, int? EvaluationStatus, int? RewardType, string RewardContent = null, string PlanContent = null, string BaocunStatus = null) |
| | | { |
| | | try |
| | | { |
| | |
| | | if (ApprovalStatus >= 0) |
| | | { |
| | | if (ApprovalStatus == 1) |
| | | condition += " and ( a.ApprovalStatus = '1' or a.ApprovalStatus = '3' )"; |
| | | condition += " and (( a.PlanDataType = 17 and a.ApprovalStatus = '1' ) or ( a.PlanDataType != 17 and (a.ApprovalStatus = '3' or a.ApprovalStatus = '1') ))"; |
| | | else |
| | | condition += " and a.ApprovalStatus = '" + ApprovalStatus + "'"; |
| | | } |
| | | if (!string.IsNullOrEmpty(BaocunStatus)) |
| | | { |
| | | condition += " and a.ApprovalStatus != '" + BaocunStatus + "'"; |
| | | } |
| | | if (EvaluationStatus >= 0) |
| | | { |
| | | if (EvaluationStatus == 5) |