public with sharing class LexNewSICustomNewController {
    public LexNewSICustomNewController() {
        
    }
    @AuraEnabled
    public static Opportunity init(String recordId){
    	try{
    		Opportunity res=[select RecordTypeId
    		 from Opportunity
    		 where id= :recordId ];
    		return res;
    	}catch(Exception e){
    		System.debug('LexStockCancelController init error: '+e.getMessage());
    	}
    	return null;
    }
    @AuraEnabled
    public static List<IS_Opportunity_Demand__c> getISOPList(String recordId){
    	try{
    		List<IS_Opportunity_Demand__c> res=[select id
    		 from IS_Opportunity_Demand__c
    		 where Opportunity_ID__c= :recordId and Func_SOD_Status__c !='00 已终止'];
    		return res;
    	}catch(Exception e){
    		System.debug('LexStockCancelController init error: '+e.getMessage());
    	}
    	return null;
    }

    @AuraEnabled
    public static String getProfileName(String recordId){
    	try{
    		String id=UserInfo.getProfileId();
    		Profile p=[select name from Profile where id =:id];
    		
    		return p.name.subString(0,2);
    	}catch(Exception e){
    		System.debug('LexStockCancelController init error: '+e.getMessage());
    	}
    	return null;
    }

    public class InitData{
        @AuraEnabled
        public String id;
        @AuraEnabled
        public Boolean delFlag;
    }
}