public with sharing class ApprovalResultController {
    //审批意见
    public String targetObjId{get;set;}
    public String comments{get{
        comments = '';
        ProcessInstance pi = [SELECT Id,
                                        (SELECT StepStatus, Comments,ActorId FROM Steps order by createddate desc)
                                     FROM ProcessInstance
                                     WHERE targetObjectId = :targetObjId limit 1];
        if(pi <> null) {
            comments = pi.Steps[0].Comments;
        }
        return comments;
    }set;}
    @TestVisible
    public static void testI() {
        integer i = 0;
       
    }
}