buli
2023-05-23 07390e2fcb4adf27c928335bf27ae7939c5a80ad
force-app/main/default/classes/OppLoseController.cls
@@ -4,12 +4,13 @@
    public static InitData init(String taskId){
        InitData res = new initData();
        try{
            task__c task = [SELECT id, OpportunityId__c
            task__c task = [SELECT id, OpportunityId__c , taskStatus__c
                            FROM task__c
                            WHERE Id =: taskId 
                            LIMIT 1];
            res.task = task;
            res.taskStatus = task.taskStatus__c;
            res.OpportunityId = task.OpportunityId__c;
            Opportunity opp =  [SELECT Sales_owner_buchangID__c,Manager_name__c,Sales_owner_buchang__c,
@@ -43,13 +44,48 @@
    public class ReturnData{
    }
    //OLY中标
    @AuraEnabled
    public static String taskOLYwinBid(String recordId) {
        String messageText = '';
       try {
        Opportunity opp = [SELECT Id,ConfirmationofAward__c FROM Opportunity WHERE Id = :recordId LIMIT 1];
        opp.Id = recordId;
        opp.ConfirmationofAward__c = 'OLY中标';
        messageText = '1';
        update opp;
        System.debug(LoggingLevel.INFO, '*** winBid: ' + opp);
        return messageText;
       } catch (Exception ex) {
        System.debug(LoggingLevel.INFO, '*** winBidXu: ' + ex);
        messageText = ex.getMessage();
        return messageText;
       }
    }
    //竞争对手中标
    @AuraEnabled
    public static String taskLoseBid(String recordId) {
        String messageText = '';
        try {
        Opportunity opp = [SELECT Id,ConfirmationofAward__c FROM Opportunity WHERE Id = :recordId LIMIT 1];
        opp.Id = recordId;
        opp.ConfirmationofAward__c = '竞争对手中标';
        messageText = '1';
        update opp;
        System.debug(LoggingLevel.INFO, '*** winBid: ' + opp);
        return messageText;
        } catch (Exception ex) {
        System.debug(LoggingLevel.INFO, '*** winBidXu: ' + ex);
        messageText = ex.getMessage();
        return messageText;
        }
    }
    public class InitData{
        //询价数据
        @AuraEnabled
        public Opportunity opp;
        @AuraEnabled
        public String stageName;
        public String StageName;
        @AuraEnabled
        public Boolean SAP_Send_OK;
        @AuraEnabled
@@ -73,6 +109,8 @@
        @AuraEnabled
        public String OpportunityId;
        @AuraEnabled
        public String taskStatus;
        @AuraEnabled
        public task__c task;
    }