public with sharing class LexRequestCloseController { public LexRequestCloseController() { } @AuraEnabled public static Rental_Apply__c init(String recordId){ try{ }catch(Exception e){ System.debug(LoggingLevel.INFO,'Rental_Apply__c Cancel Error : ' + e); } return null; } @AuraEnabled public static UpdateResult updateTask( String recordId, String Status ) { UpdateResult result = new UpdateResult(); result.recordId = recordId; try{ // 更新记录并获取结果 if(recordId==null) return null; Task rac = new Task( id=recordId); if(String.isNotBlank(Status)){ rac.Status=Status; } rac.Request_completed_time__c=System.now(); if(rac.id==null)return null; update rac; result.success = true; result.errors = new List(); return result; }catch(Exception e){ result.success = false; result.errors = new List(); result.errors.add(e.getMessage()); System.debug(LoggingLevel.INFO,'Rental_Apply__c update Error : ' + e); } return result; } @AuraEnabled public static String getProfileId(){ return UserInfo.getProfileId().substring(0,15); } @AuraEnabled public static List getProfileIds(){ List res=[SELECT id FROM Profile where name='OBA2_询价管理' OR name='OBA7_询价+招标管理']; List ids=new List(); for (Profile p:res ) { String idd=p.Id; ids.add(idd.substring(0,15)); } return ids; } public class UpdateResult { @AuraEnabled public String recordId {get;set;} @AuraEnabled public Boolean success {get;set;} @AuraEnabled public List errors {get;set;} } }