| | |
| | | } |
| | | |
| | | private static User getUser() { |
| | | String timenow = Datetime.now().format('yyyyMMddHHmmss'); |
| | | // 20230119 ljh start |
| | | /*String timenow = Datetime.now().format('yyyyMMddHHmmss'); |
| | | User usr = new User(Test_staff__c = true, LastName = 'TestZY', FirstName = 'TestZY', |
| | | Alias = 'zy', CommunityNickname = 'TestMiao', Email = 'TestZY@test.com', |
| | | Username = 'Test' + timenow + '@sunbridge.com', IsActive = true, EmailEncodingKey = 'ISO-2022-JP', |
| | | TimeZoneSidKey = 'Asia/Tokyo', LocaleSidKey = 'ja_JP', LanguageLocaleKey = 'ja', ProfileId = System.Label.ProfileId_SystemAdmin, |
| | | Province__c = '北京市',Work_Location__c = '北京'); |
| | | insert usr; |
| | | insert usr;*/ |
| | | String ProfileId = System.Label.ProfileId_SystemAdmin; |
| | | User usr = [SELECT Id,name from User WHERE ProfileId =:ProfileId AND Test_staff__c = true AND IsActive = true AND Province__c = '北京市' AND Work_Location__c = '北京'limit 1]; |
| | | // 20230119 ljh end |
| | | return usr; |
| | | } |
| | | |