| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-12 11:16:07 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-06-05 13:59:58 |
| | | * @LastEditTime: 2023-06-25 13:10:39 |
| | | */ |
| | | public with sharing class OpportunityLightingButtonController { |
| | | @AuraEnabled |
| | |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | @AuraEnabled |
| | | public static InitData initForSpecilaApplyCreateButton(String recordId){ |
| | | InitData res = new InitData(); |
| | | try { |
| | | Opportunity opp = [ |
| | | select |
| | | Forecast_this_month__c |
| | | from Opportunity where Id =: recordId |
| | | ]; |
| | | res.oppForecastStatus = opp.Forecast_this_month__c; |
| | | res.recordTypeId = Schema.SObjectType.OpportunitySpecialApply__c.getRecordTypeInfosByName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_SPECIL_APPLY_CREATE).getRecordTypeId(); |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | } |
| | | return res; |
| | | } |
| | | @AuraEnabled |
| | | public static InitData initForSpecilaApplyCreateAchButton(String recordId){ |
| | | InitData res = new InitData(); |
| | | try { |
| | | Statu_Achievements__c ach = [ |
| | | select |
| | | Id, |
| | | Monthly_forecast_shipping__c, |
| | | Opportunity__c |
| | | from Statu_Achievements__c where Id =: recordId |
| | | ]; |
| | | res.oppId = ach.Opportunity__c; |
| | | res.oppForecastStatus = ach.Monthly_forecast_shipping__c; |
| | | res.recordTypeId = Schema.SObjectType.OpportunitySpecialApply__c.getRecordTypeInfosByName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_SPECIL_APPLY_CREATE_ACH).getRecordTypeId(); |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | } |
| | | return res; |
| | | } |
| | | @AuraEnabled |
| | | public static string updateForAgencyAuthorizeButton(String recordId){ |
| | | try { |
| | |
| | | public String reportForCNYId; |
| | | @AuraEnabled |
| | | public String reportForUSDId; |
| | | @AuraEnabled |
| | | public String oppForecastStatus; |
| | | @AuraEnabled |
| | | public String oppId; |
| | | } |
| | | } |