高章伟
2023-03-03 d8dc84a3d56df839895f1c417a4d9cbee763d262
force-app/main/default/classes/ProcessInstanceSolController.cls
@@ -6,11 +6,14 @@
    public string Comments {get;set;}
    public string ApprovalAction {get;set;}
    public PageReference redirectPage;
    //public String testlink {get; set;}
    //初始化
    public ProcessInstanceSolController()
    {
       // testlink = ApexPages.currentPage().getParameters().get('testlink'); //当前节点名字
        processId = ApexPages.currentPage().getParameters().get('id'); //获取当前的工作流ID
        SolId = ApexPages.currentPage().getParameters().get('SolId'); //获取当前case ID
        system.debug(processId+'==ceshi==='+SolId);
        objSol = [select Name,Confirmation_Result__c,Remarks__c,ProcessOfApproval__c from Solution_Programme__c where id =:SolId]; //获取当前Opp对象为了后面更新comments和Reson
        redirectPage = new PageReference('/'+SolId);
     }
@@ -23,10 +26,10 @@
            {
                //system.debug('ApprovalAction:'+this.ApprovalAction);
                // User nextapprover =[select Id from User where username = 'yinghai_guo_neo@sina.com'];//新建立一个object 并mapping关系
                if(ApprovalAction == 'Reject'){
                /**if(ApprovalAction == 'Reject'){
                   ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '请填写反馈结果,并按审批按钮'));
                   return null;
                }
                }**/
                if(objSol.Confirmation_Result__c == null){
                   ApexPages.addmessage(new ApexPages.message(ApexPages.severity.ERROR, '批准之前必须填写反馈结果!'));
                   return null;