public async Task <IActionResult> GetConditionListAsync([FromBody] GetConditionOrColumnListRequest request)
        {
            string[] strArr = new string[] { "condition", "column" };
            if (!strArr.Contains(request.RecordType.ToLower().Trim()))
            {
                return(Failed(ErrorCode.DataBaseError, "查询类型输入有误,请检查!"));
            }
            var responseList = await new CommonReportThemeBiz().GetConditionListAsync(request);

            return(Success(responseList.OrderBy(a => a.Sort)));
        }
Example #2
0
        /// <summary>
        /// IT-我的审核列表
        /// </summary>
        /// <param name="requestDto"></param>
        /// <returns></returns>
        public async Task <List <GetConditionOrColumnListResponseDto> > GetConditionListAsync(GetConditionOrColumnListRequest request)
        {
            var sqlStr = @"SELECT
	                        condition_guid,
	                        theme_guid,
	                        NAME,
	                        field_code,
	                        value_type,
	                        value_range,
	                        record_type,
	                        required,
	                        sort 
                        FROM
	                        t_report_condition 
                        WHERE
	                        `enable` = 1 
	                        AND theme_guid = @ThemeGuid 
	                        AND record_type = @RecordType"    ;

            using (var conn = MySqlHelper.GetConnection())
            {
                var response = (await conn.QueryAsync <GetConditionOrColumnListResponseDto>(sqlStr, new { request.ThemeGuid, request.RecordType })).ToList();
                return(response);
            }
        }