liuyn
2024-03-11 a87f1c3df03078814ee97ad0c8ac200a232419e9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
public with sharing class ISOpportunityDemand {
    // 查询SI项目需求表
    @AuraEnabled
    public static InitData initISOpportunityController(String recordId) {
        InitData res = new initData();
        try{
            IS_Opportunity_Demand__c report = [SELECT Id,Data_Check_TF__c,Func_SOD_Status__c FROM IS_Opportunity_Demand__c WHERE Id = :recordId LIMIT 1];
            res.Id = report.Id;
            res.checkTf = report.Data_Check_TF__c;
            res.sodStatus = report.Func_SOD_Status__c;
            // res.cadUpload = report.CAD_Upload_Date__c;
            res.submitLabel = System.Label.ProfileId_SystemAdmin;
            System.debug(LoggingLevel.INFO, '*** zq: ' + res);
        }catch(Exception e){
            System.debug(LoggingLevel.INFO, '*** zq: ' + e);
        }
        return res;
    }
 
    public class InitData{
        @AuraEnabled
        public String Id;
        @AuraEnabled
        public Boolean checkTf;
        @AuraEnabled
        public String sodStatus;
        // @AuraEnabled
        // public String cadUpload;
        @AuraEnabled
        public String submitLabel;
 
    }
 
    //提交按钮
    @AuraEnabled
    public static String submit(String recordId) {
       try {
        // Request_tedner_doc__c rac = [SELECT     Id,Status__c,Submit_check_flag__c,RecordTypeId,Submit_time__c,Request_target__c,Document_format__c,Bid_distributor__c,Product_discription__c,Tedner_date__c,Tender_active_day__c,tender_inactive_date__c,Tender_request_reason__c FROM Request_tedner_doc__c WHERE Id = :recordId LIMIT 1];
        IS_Opportunity_Demand__c rac = [SELECT Id,Submint_TF__c FROM IS_Opportunity_Demand__c WHERE Id = :recordId LIMIT 1];
        rac.Id = rac.Id;
        rac.Submint_TF__c = true;
        update rac;
        return '1';
       } catch (Exception ex) {
        System.debug(LoggingLevel.INFO, '*** zq: ' + ex);
        // return ex;
        // return ex.getMessage();
        return ex.getDmlMessage(0);
       }
    }
}