19626
2023-04-13 cd063bae7506e671ff66bc23915ae9f811064923
force-app/main/default/classes/OpportunityLightingButtonController.cls
@@ -4,7 +4,7 @@
 * @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
@@ -205,7 +205,7 @@
        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) {
@@ -219,7 +219,7 @@
    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();
            }
@@ -239,7 +239,7 @@
            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);
        }
@@ -249,10 +249,11 @@
    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);
        }
@@ -262,10 +263,11 @@
    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);
        }