| | |
| | | } |
| | | |
| | | // FIXME develoerNameより |
| | | /*20230214 you DB202302187947 101去掉一个sql |
| | | String[] deptTypes = new String[] {'Department_Class_OTH', 'Department_Class_BF', 'Department_Class_GYN', 'Department_Class_GS', 'Department_Class_URO', 'Department_Class_GI', 'Department_Class_ENT', 'Department_Class_ET'}; |
| | | List<RecordType> deptRects = [select Id, DeveloperName from RecordType where IsActive = true and SobjectType = 'Account' and DeveloperName IN :deptTypes]; |
| | | Map<String, String> deptRectMap = new Map<String, String>(); |
| | |
| | | deptRectMap.put('ET', rect.Id); |
| | | } |
| | | } |
| | | */ |
| | | //添加新逻辑 start |
| | | String[] deptTypes = new String[] {'Department_Class_OTH', 'Department_Class_BF', 'Department_Class_GYN', 'Department_Class_GS', 'Department_Class_URO', 'Department_Class_GI', 'Department_Class_ENT', 'Department_Class_ET'}; |
| | | Map<String, String> deptRectMap = new Map<String, String>(); |
| | | Map<String, Schema.RecordTypeInfo> deptrectAllMap = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName(); |
| | | for (string rect : deptTypes) { |
| | | ID accid=deptrectAllMap.get(rect).getRecordTypeId(); |
| | | if (rect == 'Department_Class_OTH') { |
| | | deptRectMap.put('OTH', accid); |
| | | } else if (rect == 'Department_Class_BF') { |
| | | deptRectMap.put('BF', accid); |
| | | } else if (rect == 'Department_Class_GYN') { |
| | | deptRectMap.put('GYN', accid); |
| | | } else if (rect == 'Department_Class_GS') { |
| | | deptRectMap.put('GS', accid); |
| | | } else if (rect == 'Department_Class_URO') { |
| | | deptRectMap.put('URO', accid); |
| | | } else if (rect == 'Department_Class_GI') { |
| | | deptRectMap.put('GI', accid); |
| | | } else if (rect == 'Department_Class_ENT') { |
| | | deptRectMap.put('ENT', accid); |
| | | } else if (rect == 'Department_Class_ET') { |
| | | deptRectMap.put('ET', accid); |
| | | } |
| | | } |
| | | //添加新逻辑 end |
| | | |
| | | Map<Id, Id> ahMap = new Map<Id, Id>(); |
| | | List<Agency_Hospital_Link__c> ahlist = [select Id, Hospital__c from Agency_Hospital_Link__c where Id in :ahId]; |