| | |
| | | * @Author: chen jing wu |
| | | * @Date: 2023-04-12 11:16:07 |
| | | * @LastEditors: chen jing wu |
| | | * @LastEditTime: 2023-04-13 17:02:46 |
| | | * @LastEditTime: 2023-04-13 17:50:20 |
| | | */ |
| | | public with sharing class OpportunityLightingButtonController { |
| | | @AuraEnabled |
| | |
| | | try { |
| | | Opportunity opp = new Opportunity(); |
| | | opp.Id = recordId; |
| | | opp.ConfirmationofAward__c = '竞争对手中标'; |
| | | opp.ConfirmationofAward__c = LightingButtonConstant.OPPORTUNITY_CONFIRMATION_OF_AWARD_LOSE_BID; |
| | | update opp; |
| | | return null; |
| | | } catch (Exception e) { |
| | |
| | | public static string updateForOLYwinBidButton(String recordId){ |
| | | try { |
| | | Opportunity opp = [select ConfirmationofAward__c,Closing_Bid_Date__c from Opportunity where Id =: recordId]; |
| | | opp.ConfirmationofAward__c = 'OLY中标'; |
| | | opp.ConfirmationofAward__c = LightingButtonConstant.OPPORTUNITY_CONFIRMATION_OF_AWARD_OLY_WIN_BID; |
| | | if (opp.Closing_Bid_Date__c == null) { |
| | | opp.Closing_Bid_Date__c = Date.today(); |
| | | } |
| | |
| | | rac = [ |
| | | select |
| | | id |
| | | from InquiryPredictsDateChange__c where Predicted_Date_Status__c = '审批中' and Opportunity__c =:recordId]; |
| | | from InquiryPredictsDateChange__c where Predicted_Date_Status__c = :LightingButtonConstant.PREDICTED_DATE_STATUS and Opportunity__c =:recordId]; |
| | | } catch (Exception e) { |
| | | System.debug('e:****' + e); |
| | | } |
| | |
| | | public static List<task__c> queryForLoseBidButton(String recordId){ |
| | | List<task__c> tasks = null; |
| | | try { |
| | | String obscureName = '%' + LightingButtonConstant.TASK_NAME_BY_CONFIRMATION_OF_WINNING_BID + '%'; |
| | | tasks = [ |
| | | select |
| | | taskStatus__c |
| | | from task__c where OpportunityId__c =: recordId and name like '%中标结果确认%']; |
| | | from task__c where OpportunityId__c =: recordId and name like :obscureName]; |
| | | } catch (Exception e) { |
| | | System.debug('e:****' + e); |
| | | } |
| | |
| | | public static List<task__c> queryForOLYwinBidButton(String recordId){ |
| | | List<task__c> tasks = null; |
| | | try { |
| | | String obscureName = '%' + LightingButtonConstant.TASK_NAME_BY_CONFIRMATION_OF_WINNING_BID + '%'; |
| | | tasks = [ |
| | | select |
| | | taskStatus__c |
| | | from task__c where OpportunityId__c =: recordId and name like '%中标结果确认%']; |
| | | from task__c where OpportunityId__c =: recordId and name like :obscureName]; |
| | | } catch (Exception e) { |
| | | System.debug('e:****' + e); |
| | | } |