| | |
| | | /// </summary> |
| | | /// <param name="param">条件</param> |
| | | /// <returns></returns> |
| | | public List<IviewTree> GetIpcClassTree(ParamIpcTree param) |
| | | public List<IviewTree> GetIpcClassTree(int year,string json) |
| | | { |
| | | var whereList = new List<IConditionalModel>(); |
| | | try |
| | | { |
| | | if (!string.IsNullOrWhiteSpace(param.JsonConditional)) |
| | | whereList = Context.Utilities.JsonToConditionalModels(param.JsonConditional); |
| | | if (!string.IsNullOrWhiteSpace(json)) |
| | | whereList = Context.Utilities.JsonToConditionalModels(json); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | throw new Exception("条件设置错误,请检查"); |
| | | } |
| | | var res = Context.Queryable<SysIpcClass>() |
| | | .Where(a => a.Year == param.Year) |
| | | .Where(a => a.Year == year) |
| | | .Where(whereList) |
| | | .OrderBy(a => a.Sort1).OrderBy(a => a.Sort2) |
| | | .ToList(); |