| | |
| | | } |
| | | //查询市区Id |
| | | Map < String, String > CityMap = new Map < String, String > (); //市Map |
| | | List < Address_Level2__c > citytempList = [select Id, Name from Address_Level2__c where Name IN: CityList]; |
| | | //省市对应该关系 LY 20230206 start |
| | | List < Address_Level2__c > citytempList = [select Id, Name,Level1_Name__c from Address_Level2__c where Name IN: CityList]; |
| | | for (Address_Level2__c temp: citytempList) { |
| | | CityMap.put(temp.Name, temp.Id); |
| | | CityMap.put(temp.Level1_Name__c+temp.Name, temp.Id); |
| | | //省市对应该关系 LY 20230206 end |
| | | } |
| | | |
| | | //查询医院所有人 |
| | |
| | | //Ly 省文本赋值 start |
| | | hp.State_Text__c = gedata.State; // 省(文本) |
| | | //Ly 省文本赋值 end |
| | | hp.City_Master__c = CityMap.get(gedata.City); // 市 |
| | | //省市对应该关系 LY 20230206 start |
| | | //hp.City_Master__c = CityMap.get(gedata.City); // 市 |
| | | hp.City_Master__c = CityMap.get(gedata.State+gedata.City); // 市 |
| | | //省市对应该关系 LY 20230206 end |
| | | hp.Hospital_Source__c = '智慧医疗'; |
| | | upsertAccountList.add(hp); |
| | | System.debug('upsertAccountList'+upsertAccountList); |