public with sharing class LexOPDSupplementaryController { @AuraEnabled public static OPDPlan__c init(String recordId){ try{ OPDPlan__c res = [SELECT id,OPDPlan_ImplementDate__c,Status__c, OriginalOpdPlanRental__c,Rental_Apply2__c,Account_Laboratory__c,Related_Opportunity1_ID__c, PlanProdDetail__c,Cnt_OPD_LastYear__c,Cnt_OPD_ThisYear__c,Cnt_Rentals__c, lastMonth_Plan__c,SalesManager__c,OPDType__c,OriginalOpdPlanApplication__c, BuchangApprovalManagerSales__c,SalesManager_Txt__c, Name,supplementaryApplication__c FROM OPDPlan__c Where Id = : recordId]; return res; } catch(Exception e){ System.debug(LoggingLevel.INFO, '*** e: ' + e); } return null; } @AuraEnabled public static OPDPlan__c getTheOPDPlan(String Id){ try{ OPDPlan__c res = [Select Id, Name,supplementaryApplication__c FROM OPDPlan__c WHERE supplementaryApplication__c = true AND OriginalOpdPlanApplication__c = :Id]; return res; } catch(Exception e){ System.debug(LoggingLevel.INFO, '*** e: ' + e); } return null; } @AuraEnabled public static OPDPlan__c init2(String recordId){ try{ OPDPlan__c res = [SELECT id,Status__c,RentalReson__c,AttachmentCertificate__c, NeedReport__c,PlanProdDetail__c,Related_Opportunity1_ID__c,Related_Opportunity2_ID__c FROM OPDPlan__c Where Id = : recordId]; return res; } catch(Exception e){ System.debug(LoggingLevel.INFO, '*** e: ' + e); } return null; } @AuraEnabled public static void NewAndUpdateOPDStatus(String Id){ try{ OPDPlan__c res =new OPDPlan__c(); res.Id = Id; res.Status__c='提交'; update res; } catch (Exception e) { System.debug(LoggingLevel.INFO, '*** e: ' + e); } } @AuraEnabled public static OPDPlan__c init3(String recordId){ OPDPlan__c res = new OPDPlan__c(); try{ res = [SELECT Id,Name,Status__c,DelayCancel_Reason__c ,Account_Laboratory__c,OPDType__c,RentalReson__c, Related_Opportunity1_ID__c, CorrespondingRepairNo__c,AdditionalSupport__c,Campaign__c, NoOpp_Reason__c,ModelLending__c,ModelLendingProduct__c, PlanProdDetail__c FROM OPDPlan__c WHERE Id = :recordId]; } catch(Exception e){ System.debug(LoggingLevel.INFO, '*** e: ' + e); } return res; } @AuraEnabled public static OPDPlan__c reapplyFindOPD(String Id){ OPDPlan__c res =new OPDPlan__c(); try{ res =[SELECT Id, Name,Reapply__c FROM OPDPlan__c WHERE Reapply__c = true AND OriginalOpdPlan__c = :Id]; } catch(Exception e){ System.debug(LoggingLevel.INFO, '*** e: ' + e); } return res; } }