| | |
| | | //Profile prof = [select Id from Profile where Name ='901_经销商社区普通权限_2重验证']; |
| | | User loginUser = [Select Id, Alias, Province__c from User where Id =: UserInfo.getUserId()]; |
| | | loginUser.Job_Category__c = '销售服务'; |
| | | update loginUser; |
| | | //update loginUser; |
| | | loginUser = [Select Id, Alias, Province__c from User where Job_Category__c = '销售服务' limit 1]; |
| | | |
| | | ir = new Inspection_Report__c(Name = '*', Inspection_Date__c = inspectionDate, Hospital__c = hp.Id); |
| | | ir.recordtypeId = [Select Id FROM RecordType WHERE IsActive = true and SobjectType = 'Inspection_Report__c' and DeveloperName = 'EndoscopeSystem'].id; |
| | |
| | | Test.startTest(); |
| | | TestRepo repo = new TestRepo(); |
| | | repo.createInspectionReport(null); |
| | | |
| | | repo.initAssets(); |
| | | repo.sqlIr(); |
| | | |
| | | String wrongId = repo.ir.Id; |
| | | wrongId = wrongId.substring(0, 14) + wrongId.substring(13, 14); |
| | | Apexpages.currentPage().getParameters().put('id', wrongId); |