gzw
2022-02-15 168114b11da83c5005cd608c1b23a66311717a0f
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
@isTest
public class SaleAndDeliveryControllerTest {
        static testMethod void SaleAndDeliveryTestinit(){
        Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证'];
        List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店'];
        if (rectCo.size() == 0) {
            return;
        }
        List<RecordType> rectHos = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院'];
        if (rectHos.size() == 0) {
            return;
        }
        Account myAccount1 = new Account(name='testaccount001',RecordTypeId = rectCo[0].Id );
        Account myAccount2 = new Account(name='testaccount002',RecordTypeId = rectHos[0].Id );
        insert myAccount1;
        Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=myAccount1.id);
        insert core;
        user myUser_test = New User(ContactId = core.id,Alias = 'newUser',Email='newuser@testorg.com',EmailEncodingKey='UTF-8', LastName='testUser', LanguageLocaleKey='zh_CN',LocaleSidKey='zh_CN', ProfileId = prof.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com',Work_Location__c = '北京');
        insert myUser_test;
        system.runAs(myUser_test){
            Consumable_order__c TestList5 = new Consumable_order__c(Name='Test5',Summons_Sale_Status__c='出货',SummonsStatus_c__c='草案中',Order_ForHospital__c =myAccount2.Id,SummonsForDirction__c='直接销售给医院',Order_status__c='草案中',Order_type__c='传票',Dealer_info__c=myAccount1.Id,Order_ProType__c = 'ET');
            Consumable_order__c TestList6 = new Consumable_order__c(Name='Test6',Summons_Sale_Status__c='出货',SummonsStatus_c__c='草案中',Order_ForHospital__c =myAccount2.Id,SummonsForDirction__c='直接销售给医院',Order_status__c='已提交',Order_type__c='传票',Dealer_info__c=myAccount1.Id,Order_ProType__c = 'ET');
            Consumable_order__c TestList7 = new Consumable_order__c(Name='Test7',Summons_Sale_Status__c='出货',SummonsStatus_c__c='草案中',Order_ForHospital__c =myAccount2.Id,SummonsForDirction__c='直接销售给医院',Order_status__c='已提交',Order_type__c='传票',Dealer_info__c=myAccount1.Id,Order_ProType__c = 'ET');
            Consumable_order__c TestList1 = new Consumable_order__c(Name='Test1',Summons_Sale_Status__c='出货',SummonsStatus_c__c='草案中',Order_ForHospital__c =myAccount2.Id,SummonsForDirction__c='直接销售给医院',Order_status__c='草案中',Order_type__c='传票',Dealer_info__c=myAccount1.Id,Order_ProType__c = 'ET');
            Consumable_order__c TestList2 = new Consumable_order__c(Name='Test2',Summons_Sale_Status__c='出货',SummonsStatus_c__c='草案中',Order_ForHospital__c =myAccount2.Id,SummonsForDirction__c='直接销售给医院',Order_status__c='草案中',Order_type__c='传票',Dealer_info__c=myAccount1.Id,Order_ProType__c = 'ET');
            Consumable_order__c TestList3 = new Consumable_order__c(Name='Test3',Summons_Sale_Status__c='出货',SummonsStatus_c__c='草案中',Order_ForHospital__c =myAccount2.Id,SummonsForDirction__c='直接销售给医院',Order_status__c='草案中',Order_type__c='传票',Dealer_info__c=myAccount1.Id,Order_ProType__c = 'ET');
            Consumable_order__c TestList4 = new Consumable_order__c(Name='Test4',Summons_Sale_Status__c='出货',SummonsStatus_c__c='草案中',Order_ForHospital__c =myAccount2.Id,SummonsForDirction__c='直接销售给医院',Order_status__c='草案中',Order_type__c='传票',Dealer_info__c=myAccount1.Id,Order_ProType__c = 'ET');
            TestList5.Order_date__c = Date.today().addDays(2);
            TestList6.Order_date__c = Date.today().addDays(2);
            TestList7.Order_date__c = Date.today().addDays(2);
            TestList1.Order_date__c = Date.today().addDays(2);
            TestList2.Order_date__c = Date.today().addDays(2);
            TestList3.Order_date__c = Date.today().addDays(2);
            TestList4.Order_date__c = Date.today();
            TestList5.Deliver_date__c=Date.today();
            TestList6.Deliver_date__c=Date.today();
            TestList7.Deliver_date__c=Date.today();
            TestList1.Deliver_date__c=Date.today();
            TestList2.Deliver_date__c=Date.today();
            TestList3.Deliver_date__c=Date.today();
            TestList4.Deliver_date__c=Date.today();
            insert new Consumable_order__c[]{TestList1,TestList2,TestList3,TestList4,TestList5,TestList6,TestList7};
            SaleAndDeliveryController CDC = new SaleAndDeliveryController();
            CDC.init1();
            CDC.SortLimited();
            System.assertEquals('Test1', CDC.raesList[0].name);
            System.assertEquals('Test2', CDC.raesList[1].name);
            System.assertEquals('Test3', CDC.raesList[2].name);
            System.assertEquals('Test4', CDC.raesList[3].name);
            System.assertEquals('Test5', CDC.raesList[4].name);
            System.assertEquals('Test6', CDC.raesList[5].name);
            System.assertEquals('Test7', CDC.raesList[6].name);
            CDC.cleanUp();
            System.assertEquals('Test1', CDC.raesList[0].name);
            System.assertEquals('Test2', CDC.raesList[1].name);
            System.assertEquals('Test3', CDC.raesList[2].name);
            System.assertEquals('Test4', CDC.raesList[3].name);
            System.assertEquals('Test5', CDC.raesList[4].name);
            System.assertEquals('Test6', CDC.raesList[5].name);
            System.assertEquals('Test7', CDC.raesList[6].name);
        }
    }
    static testMethod void SaleAndDeliveryTestOther(){
        Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证'];
        List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店'];
        if (rectCo.size() == 0) {
            return;
        }
        List<RecordType> rectHos = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院'];
        if (rectHos.size() == 0) {
            return;
        }
        Account myAccount1 = new Account(name='testaccount001',RecordTypeId = rectCo[0].Id );
        Account myAccount2 = new Account(name='testaccount002',RecordTypeId = rectHos[0].Id );
        insert myAccount1;
        Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=myAccount1.id);
        insert core;
        user myUser_test = New User(ContactId = core.id,Alias = 'newUser',Email='newuser@testorg.com',EmailEncodingKey='UTF-8', LastName='testUser', LanguageLocaleKey='zh_CN',LocaleSidKey='zh_CN', ProfileId = prof.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com',Work_Location__c = '北京');
        insert myUser_test;
 
        system.runAs(myUser_test){
            Consumable_order__c TestList5 = new Consumable_order__c(Name='Test5',Summons_Sale_Status__c='出货',SummonsStatus_c__c='草案中',Order_ForHospital__c =myAccount2.Id,SummonsForDirction__c='直接销售给医院',Order_status__c='草案中',Order_type__c='传票',Dealer_info__c=myAccount1.Id,Onchange_order__c = true);
            Consumable_order__c TestList6 = new Consumable_order__c(Name='Test6',Summons_Sale_Status__c='出货',SummonsStatus_c__c='草案中',Order_ForHospital__c =myAccount2.Id,SummonsForDirction__c='直接销售给医院',Order_status__c='已提交',Order_type__c='传票',Dealer_info__c=myAccount1.Id,Onchange_order__c = true);
            Consumable_order__c TestList7 = new Consumable_order__c(Name='Test7',Summons_Sale_Status__c='出货',SummonsStatus_c__c='草案中',Order_ForHospital__c =myAccount2.Id,SummonsForDirction__c='直接销售给医院',Order_status__c='已提交',Order_type__c='传票',Dealer_info__c=myAccount1.Id,Onchange_order__c = true);
            Consumable_order__c TestList1 = new Consumable_order__c(Name='Test1',Summons_Sale_Status__c='出货',SummonsStatus_c__c='草案中',Order_ForHospital__c =myAccount2.Id,SummonsForDirction__c='直接销售给医院',Order_status__c='草案中',Order_type__c='传票',Dealer_info__c=myAccount1.Id,Onchange_order__c = true,Order_ProType__c = 'ET');
            Consumable_order__c TestList2 = new Consumable_order__c(Name='Test2',Summons_Sale_Status__c='出货',SummonsStatus_c__c='草案中',Order_ForHospital__c =myAccount2.Id,SummonsForDirction__c='直接销售给医院',Order_status__c='草案中',Order_type__c='传票',Dealer_info__c=myAccount1.Id,Onchange_order__c = true);
            Consumable_order__c TestList3 = new Consumable_order__c(Name='Test3',Summons_Sale_Status__c='出货',SummonsStatus_c__c='草案中',Order_ForHospital__c =myAccount2.Id,SummonsForDirction__c='直接销售给医院',Order_status__c='草案中',Order_type__c='传票',Dealer_info__c=myAccount1.Id,Onchange_order__c = true);
            Consumable_order__c TestList4 = new Consumable_order__c(Name='Test4',Summons_Sale_Status__c='出货',SummonsStatus_c__c='草案中',Order_ForHospital__c =myAccount2.Id,SummonsForDirction__c='直接销售给医院',Order_status__c='草案中',Order_type__c='传票',Dealer_info__c=myAccount1.Id,Onchange_order__c = true);
            TestList5.Order_date__c = Date.today().addDays(2);
            TestList6.Order_date__c = Date.today().addDays(2);
            TestList7.Order_date__c = Date.today().addDays(2);
            TestList1.Order_date__c = Date.today().addDays(2);
            TestList2.Order_date__c = Date.today().addDays(2);
            TestList3.Order_date__c = Date.today().addDays(2);
            TestList4.Order_date__c = Date.today();
            TestList5.Deliver_date__c=Date.today();
            TestList6.Deliver_date__c=Date.today();
            TestList7.Deliver_date__c=Date.today();
            TestList1.Deliver_date__c=Date.today();
            TestList2.Deliver_date__c=Date.today();
            TestList3.Deliver_date__c=Date.today();
            TestList4.Deliver_date__c=Date.today();
            insert new Consumable_order__c[]{TestList1,TestList2,TestList3,TestList4,TestList5,TestList6,TestList7};
            SaleAndDeliveryController CDC = new SaleAndDeliveryController();
            CDC.init1();
            CDC.category1='1';
            CDC.searchConsumableorderdetails();
            System.assertEquals('Test1', CDC.raesList[0].name);
            CDC.coc.Order_date__c = date.today();
            CDC.category1=null;
            CDC.searchConsumableorderdetails();
            CDC.SortLimited();
            System.assertEquals('Test1', CDC.raesList[0].name);
            CDC.neworderhead();
            SaleAndDeliveryController.getTitle();
        }
    }
    //已完成出库单检索
    static testMethod void SaleAndDeliveryTest_Finish(){
        Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证'];
        List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店'];
        if (rectCo.size() == 0) {
            return;
        }
        List<RecordType> rectHos = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院'];
        if (rectHos.size() == 0) {
            return;
        }
        Account myAccount1 = new Account(name='testaccount001',RecordTypeId = rectCo[0].Id );
        Account myAccount2 = new Account(name='testaccount002',RecordTypeId = rectHos[0].Id );
        insert myAccount1;
        Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=myAccount1.id);
        insert core;
        user myUser_test = New User(ContactId = core.id,Alias = 'newUser',Email='newuser@testorg.com',EmailEncodingKey='UTF-8', LastName='testUser', LanguageLocaleKey='zh_CN',LocaleSidKey='zh_CN', ProfileId = prof.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com',Work_Location__c = '北京');
        insert myUser_test;
 
        system.runAs(myUser_test){
            Consumable_order__c TestList5 = new Consumable_order__c(Name='Test5',Summons_Sale_Status__c='出货',SummonsStatus_c__c='已完成',Order_ForHospital__c =myAccount2.Id,SummonsForDirction__c='直接销售给医院',Order_status__c='草案中',Order_type__c='传票',Dealer_info__c=myAccount1.Id,Onchange_order__c = true,Order_ProType__c = 'ET');
            Consumable_order__c TestList6 = new Consumable_order__c(Name='Test6',Summons_Sale_Status__c='出货',SummonsStatus_c__c='已完成',Order_ForHospital__c =myAccount2.Id,SummonsForDirction__c='直接销售给医院',Order_status__c='已提交',Order_type__c='传票',Dealer_info__c=myAccount1.Id,Onchange_order__c = true,Order_ProType__c = 'ET');
            Consumable_order__c TestList7 = new Consumable_order__c(Name='Test7',Summons_Sale_Status__c='出货',SummonsStatus_c__c='已完成',Order_ForHospital__c =myAccount2.Id,SummonsForDirction__c='直接销售给医院',Order_status__c='已提交',Order_type__c='传票',Dealer_info__c=myAccount1.Id,Onchange_order__c = true,Order_ProType__c = 'ET');
            Consumable_order__c TestList1 = new Consumable_order__c(Name='Test1',Summons_Sale_Status__c='出货',SummonsStatus_c__c='已完成',Order_ForHospital__c =myAccount2.Id,SummonsForDirction__c='直接销售给医院',Order_status__c='草案中',Order_type__c='传票',Dealer_info__c=myAccount1.Id,Onchange_order__c = true,Order_ProType__c = 'ET');
            Consumable_order__c TestList2 = new Consumable_order__c(Name='Test2',Summons_Sale_Status__c='出货',SummonsStatus_c__c='已完成',Order_ForHospital__c =myAccount2.Id,SummonsForDirction__c='直接销售给医院',Order_status__c='草案中',Order_type__c='传票',Dealer_info__c=myAccount1.Id,Onchange_order__c = true,Order_ProType__c = 'ET');
            Consumable_order__c TestList3 = new Consumable_order__c(Name='Test3',Summons_Sale_Status__c='出货',SummonsStatus_c__c='草案中',Order_ForHospital__c =myAccount2.Id,SummonsForDirction__c='直接销售给医院',Order_status__c='草案中',Order_type__c='传票',Dealer_info__c=myAccount1.Id,Onchange_order__c = true,Order_ProType__c = 'ET');
            Consumable_order__c TestList4 = new Consumable_order__c(Name='Test4',Summons_Sale_Status__c='出货',SummonsStatus_c__c='草案中',Order_ForHospital__c =myAccount2.Id,SummonsForDirction__c='直接销售给医院',Order_status__c='草案中',Order_type__c='传票',Dealer_info__c=myAccount1.Id,Onchange_order__c = true,Order_ProType__c = 'ET');
            TestList5.Order_date__c = Date.today().addDays(2);
            TestList6.Order_date__c = Date.today().addDays(2);
            TestList7.Order_date__c = Date.today().addDays(2);
            TestList1.Order_date__c = Date.today().addDays(2);
            TestList2.Order_date__c = Date.today().addDays(2);
            TestList3.Order_date__c = Date.today().addDays(2);
            TestList4.Order_date__c = Date.today();
            TestList5.Deliver_date__c=Date.today();
            TestList6.Deliver_date__c=Date.today();
            TestList7.Deliver_date__c=Date.today();
            TestList1.Deliver_date__c=Date.today();
            TestList2.Deliver_date__c=Date.today();
            TestList3.Deliver_date__c=Date.today();
            TestList4.Deliver_date__c=Date.today();
            TestList5.Outbound_Date__c=Date.today().addDays(1);
            TestList6.Outbound_Date__c=Date.today().addDays(1);
            TestList7.Outbound_Date__c=Date.today().addDays(1);
            TestList1.Outbound_Date__c=Date.today().addDays(1);
            TestList2.Outbound_Date__c=Date.today().addDays(1);
            TestList3.Outbound_Date__c=Date.today().addDays(1);
            TestList4.Outbound_Date__c=Date.today().addDays(1);
            insert new Consumable_order__c[]{TestList1,TestList2,TestList3,TestList4,TestList5,TestList6,TestList7};
            SaleAndDeliveryController CDC = new SaleAndDeliveryController();
            CDC.init1();
            CDC.category1='Test';
            CDC.searchConsumableorFinish();
            CDC.SortLimited();
            System.assertEquals(5, CDC.raesList.size());
            CDC.neworderhead();
            CDC.sortKey='5';
            CDC.category2='Test02';
            CDC.searchConsumableorFinish();
            CDC.SortLimited();
 
        }
    }
 
    //未成出库单检索
    static testMethod void SaleAndDeliveryTest_Instatus(){
        Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证'];
        List<RecordType> rectCo = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '販売店'];
        if (rectCo.size() == 0) {
            return;
        }
        List<RecordType> rectHos = [select Id from RecordType where IsActive = true and SobjectType = 'Account' and Name = '病院'];
        if (rectHos.size() == 0) {
            return;
        }
        Account myAccount1 = new Account(name='testaccount001',RecordTypeId = rectCo[0].Id );
        Account myAccount2 = new Account(name='testaccount002',RecordTypeId = rectHos[0].Id );
        insert myAccount1;
        Contact core = new Contact(email='jplumber@salesforce.com', firstname='Joe',lastname='Plumber',accountid=myAccount1.id);
        insert core;
        user myUser_test = New User(ContactId = core.id,Alias = 'newUser',Email='newuser@testorg.com',EmailEncodingKey='UTF-8', LastName='testUser', LanguageLocaleKey='zh_CN',LocaleSidKey='zh_CN', ProfileId = prof.Id,TimeZoneSidKey='Asia/Shanghai', UserName='testUser@testorg.com',Work_Location__c = '北京');
        insert myUser_test;
 
        system.runAs(myUser_test){
            Consumable_order__c TestList5 = new Consumable_order__c(Name='Test5',Summons_Sale_Status__c='出货',SummonsStatus_c__c='已完成',Order_ForHospital__c =myAccount2.Id,SummonsForDirction__c='直接销售给医院',Order_status__c='草案中',Order_type__c='传票',Dealer_info__c=myAccount1.Id,Total_Invoiced_Procount__c =1,InvoiceNotPro_total_amount__c =1,Order_ProType__c = 'ET');
            Consumable_order__c TestList6 = new Consumable_order__c(Name='Test6',Summons_Sale_Status__c='出货',SummonsStatus_c__c='已完成',Order_ForHospital__c =myAccount2.Id,SummonsForDirction__c='直接销售给医院',Order_status__c='已提交',Order_type__c='传票',Dealer_info__c=myAccount1.Id,Total_Invoiced_Procount__c =2,InvoiceNotPro_total_amount__c =1,Order_ProType__c = 'ET');
            Consumable_order__c TestList7 = new Consumable_order__c(Name='Test7',Summons_Sale_Status__c='出货',SummonsStatus_c__c='已完成',Order_ForHospital__c =myAccount2.Id,SummonsForDirction__c='直接销售给医院',Order_status__c='已提交',Order_type__c='传票',Dealer_info__c=myAccount1.Id,Total_Invoiced_Procount__c =3,InvoiceNotPro_total_amount__c =1,Order_ProType__c = 'ET');
            Consumable_order__c TestList1 = new Consumable_order__c(Name='Test1',Summons_Sale_Status__c='出货',SummonsStatus_c__c='已完成',Order_ForHospital__c =myAccount2.Id,SummonsForDirction__c='直接销售给医院',Order_status__c='草案中',Order_type__c='传票',Dealer_info__c=myAccount1.Id,Total_Invoiced_Procount__c =4,InvoiceNotPro_total_amount__c =1,Order_ProType__c = 'ET');
            Consumable_order__c TestList2 = new Consumable_order__c(Name='Test2',Summons_Sale_Status__c='出货',SummonsStatus_c__c='已完成',Order_ForHospital__c =myAccount2.Id,SummonsForDirction__c='直接销售给医院',Order_status__c='草案中',Order_type__c='传票',Dealer_info__c=myAccount1.Id,Total_Invoiced_Procount__c =5,InvoiceNotPro_total_amount__c =1,Order_ProType__c = 'ET');
            Consumable_order__c TestList3 = new Consumable_order__c(Name='Test3',Summons_Sale_Status__c='出货',SummonsStatus_c__c='草案中',Order_ForHospital__c =myAccount2.Id,SummonsForDirction__c='直接销售给医院',Order_status__c='草案中',Order_type__c='传票',Dealer_info__c=myAccount1.Id,Total_Invoiced_Procount__c =6,InvoiceNotPro_total_amount__c =1,Order_ProType__c = 'ET');
            Consumable_order__c TestList4 = new Consumable_order__c(Name='Test4',Summons_Sale_Status__c='出货',SummonsStatus_c__c='草案中',Order_ForHospital__c =myAccount2.Id,SummonsForDirction__c='直接销售给医院',Order_status__c='草案中',Order_type__c='传票',Dealer_info__c=myAccount1.Id,Total_Invoiced_Procount__c =7,InvoiceNotPro_total_amount__c =1,Order_ProType__c = 'ET');
            TestList5.Deliver_date__c = Date.today().addDays(2);
            TestList6.Deliver_date__c = Date.today().addDays(2);
            TestList7.Deliver_date__c = Date.today().addDays(2);
            TestList1.Deliver_date__c = Date.today().addDays(2);
            TestList2.Deliver_date__c = Date.today().addDays(2);
            TestList3.Deliver_date__c = Date.today().addDays(2);
            TestList4.Deliver_date__c = Date.today().addDays(2);
            TestList5.Order_date__c=Date.today();
            TestList6.Order_date__c=Date.today();
            TestList7.Order_date__c=Date.today();
            TestList1.Order_date__c=Date.today();
            TestList2.Order_date__c=Date.today();
            TestList3.Order_date__c=Date.today();
            TestList4.Order_date__c=Date.today();
            TestList5.Outbound_Date__c=Date.today().addDays(1);
            TestList6.Outbound_Date__c=Date.today().addDays(1);
            TestList7.Outbound_Date__c=Date.today().addDays(1);
            TestList1.Outbound_Date__c=Date.today().addDays(1);
            TestList2.Outbound_Date__c=Date.today().addDays(1);
            TestList3.Outbound_Date__c=Date.today().addDays(1);
            TestList4.Outbound_Date__c=Date.today().addDays(1);
            insert new Consumable_order__c[]{TestList1,TestList2,TestList3,TestList4,TestList5,TestList6,TestList7};
            SaleAndDeliveryController CDC = new SaleAndDeliveryController();
            CDC.init1();
            CDC.category1='Test';
            CDC.searchOrderInstatus();
            System.assertEquals(5, CDC.raesList.size());
            CDC.SortLimited();
            CDC.neworderhead();
            CDC.category2='Test02';
            CDC.searchOrderInstatus();
            CDC.sortKey='5';
            CDC.SortLimited();
        }
    }
 
 
}