黄千龙
2023-03-08 962519811b7c4be07f30d09e791798b0ea79d3ae
force-app/main/default/classes/NFM624Rest.cls
@@ -202,9 +202,11 @@
                }
                //查询市区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
                }
 
                //查询医院所有人
@@ -586,7 +588,10 @@
                            //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);