コード例 #1
0
        public async Task <IActionResult> GetMyApproveList([FromBody] GetMyApproveListRequest requestDto)
        {
            if (string.IsNullOrWhiteSpace(requestDto.UserID))
            {
                requestDto.UserID = UserID;
            }
            var responseList = await new CommonReportThemeBiz().GetMyApproveList(requestDto);

            return(Success(responseList));
        }
コード例 #2
0
        /// <summary>
        /// IT-我的审核列表
        /// </summary>
        /// <param name="requestDto"></param>
        /// <returns></returns>
        public async Task <GetMyApproveListResponse> GetMyApproveList(GetMyApproveListRequest requestDto)
        {
            var sqlStr = @" SELECT
                                        th.theme_guid,
	                                    th.name,
	                                    th.demand,
                                        th.condition_demand,
	                                    ap.approve_guid,
	                                    ap.apply_user_guid,
	                                    u.user_name AS ApplyUserName,
	                                    ap.sql_writer_guid,
	                                    u2.user_name AS SQLWriterName,
	                                    ap.sql_approver_guid,
	                                    u3.user_name AS SQLApproverName,
	                                    ap.list_approver_guid,
	                                    u4.user_name AS ListApproverName,
	                                    ap.approved_reason,
	                                    ap.approved_datetime,
	                                    ap.approve_schedule_enum,
	                                    ap.approve_status,
	                                    ap.creation_date 
                                    FROM
	                                    t_report_approve AS ap
	                                    LEFT JOIN t_report_theme AS th ON ap.theme_guid = th.theme_guid 
	                                    AND ap.ENABLE =
	                                    TRUE LEFT JOIN t_utility_user AS u ON ap.apply_user_guid = u.user_guid
	                                    LEFT JOIN t_utility_user AS u2 ON ap.sql_writer_guid = u2.user_guid 
	                                    LEFT JOIN t_utility_user AS u3 ON ap.sql_approver_guid = u3.user_guid 
	                                    LEFT JOIN t_utility_user AS u4 ON ap.list_approver_guid = u4.user_guid 
                                    WHERE
	                                    th.`enable` = TRUE 
	                                    AND (
	                                    ( ap.approve_schedule_enum = 'Apply' AND ap.approve_status = 'Pending' ) 
	                                    OR ( ap.approve_schedule_enum = 'SqlWrite' AND ap.approve_status = 'Reject' ) 
	                                    ) 
                                    ORDER BY
	                                    ap.creation_date DESC "    ;

            return(await MySqlHelper.QueryByPageAsync <GetMyApproveListRequest, GetMyApproveListResponse, GetMyApproveListItem>(sqlStr, requestDto));
        }