高章伟
2022-02-18 8b5f4c6c281cfa548f92de52c8021e37aa81901e
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
@isTest
public with sharing class EnquiryNoBiddingControllerTest {
    static testMethod void testMethod1() {
        //创建数据
        //招投标项目
        //创建招投标项目
        Enquiry_No_Bidding_Apply__c Enq = new Enquiry_No_Bidding_Apply__c();
        Enq.irresponsibleReason__c = '竞品参数';
        Enq.InvolveBudgetAmount__c = 1;
        Enq.RepsExtraContent__c = '123';
        insert Enq;
 
        Tender_information__c Ten = new Tender_information__c();
        Ten.Name = '123456';
        Ten.ProjectId__c = '38_99df2844cf784982acdc61d00d7a7dbb';
 
        insert Ten;
        
 
        Opportunity opp = new Opportunity();
        opp.Name = 'test询价';
        opp.StageName = '目標';
        //opp.AgencyOpp_FromOCM__c = true;
        opp.SAP_Send_OK__c = false;
        opp.CloseDate = Date.newInstance(2222, 7, 15);
        opp.Bidding_Project_Name_Bid__c = Ten.Id;
        opp.Opp_Bid__c = Enq.Id;
        insert opp;
   
        //根据ID查询  招投标项目
        EnquiryNoBiddingController.GetInspectById(Enq.Id);
        EnquiryNoBiddingController.GetTenderInformationById(Ten.Id);
        EnquiryNoBiddingController.GetIrresponsibleReason ();
        //保存 应标数据 JSONData 是 招投标项目 对象的 json格式的值 
        string  JSONData =  JSON.serialize(Ten);
        EnquiryNoBiddingController.SaveDataYB(JSONData,opp.Id,'是');
        //提交审核 应标数据 JSONData 是 招投标项目 对象的 json格式的值 
        EnquiryNoBiddingController.ChangeDataYB(JSONData,opp.Id,'是');
        //查询用户
        EnquiryNoBiddingController.CheckOwner('a4J1m0000008bkl');
 
        //查询用户
        EnquiryNoBiddingController.GetDataById(opp.Id);
 
    }
}