wx
2023-01-08 5399034accbccaeb2148337d585df379e70b368a
调整参数
2个文件已修改
12 ■■■■ 已修改文件
GasolineBlend/Controllers/SysController.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Pissa.Service/DbService/SysService.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
GasolineBlend/Controllers/SysController.cs
@@ -74,9 +74,9 @@
        /// <param name="param">条件</param>
        /// <returns></returns>
        [HttpPost]
        public ActionResult GetIpcClassTree(ParamIpcTree param)
        public ActionResult GetIpcClassTree(int year,string json)
        {
            var res = _countryService.GetIpcClassTree(param);
            var res = _countryService.GetIpcClassTree(year,json);
            return SuccessNoShow(data: res);
        }
Pissa.Service/DbService/SysService.cs
@@ -49,20 +49,20 @@
        /// </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();