| | |
| | | |
| | | // 取得接口传输内容 |
| | | String strData = RestContext.request.requestBody.toString(); |
| | | system.debug('strData---'+strData ); |
| | | system.debug('strData2---'+RestContext.request.requestBody ); |
| | | GeDatas ges = (GeDatas) JSON.deserializeStrict(strData, GeDatas.class); |
| | | system.debug('ges---'+JSON.serialize(ges) ); |
| | | |
| | |
| | | OR (Account.Parent_PlatformCode__c IN: ManagementList AND LastName_Encrypted__c IN:NameList AND UnifiedI_Contact_ID__c = null) |
| | | OR (Account.Parent_Management_Code__c IN: SFDCCodeList AND LastName_Encrypted__c IN:NameList AND UnifiedI_Contact_ID__c = null) |
| | | ORDER BY MobilePhone ASC,CManageCode__c ASC]; //根据人员管理编码检索联系人 |
| | | // List < Contact > peopleList = [select Id, |
| | | // Account.Name, |
| | | // //Department__c, |
| | | // Account.parent.Name, |
| | | // UnifiedI_Contact_ID__c, |
| | | // //Account.PlatformCode__c, |
| | | // Account.Management_Code__c, |
| | | // //Account.parent.Department_Class_Label__c, |
| | | // Name,LastName_Encrypted__c, |
| | | // //Account.Parent_Management_Code__c, |
| | | // //Account.Parent_PlatformCode__c, |
| | | // CManageCode__c,AWS_Data_Id__c, |
| | | // // 通过姓名+手机号判断人员是否重复 thh 20220518 start |
| | | // MobilePhone_Encrypted__c |
| | | // // 通过姓名+手机号判断人员是否重复 thh 20220518 end |
| | | // //AccountId |
| | | // from Contact |
| | | // where CManageCode__c IN: PersonManagementCodeList |
| | | // OR (Account.Parent_PlatformCode__c IN: ManagementList AND UnifiedI_Contact_ID__c = null) |
| | | // OR (Account.Parent_Management_Code__c IN: SFDCCodeList AND UnifiedI_Contact_ID__c = null) |
| | | // ORDER BY MobilePhone ASC,CManageCode__c ASC]; //根据人员管理编码检索联系人 |
| | | Map < String, Contact > peopleMap = new Map < String, Contact > (); //联系人 |
| | | system.debug('peopleList '+peopleList); |
| | | system.debug('peopleList.size '+peopleList.size()); |
| | | for (Contact ct: peopleList) { |
| | | if (string.isnotblank(ct.Account.parent.Name)) { |
| | | Map < String, Contact > snameMap = new Map < String, Contact > (); |
| | |
| | | red.awsDataId = sMap.get(namekey).AWS_Data_Id__c; |
| | | red.sfid = sMap.get(namekey).id; |
| | | } else if(sMap.containsKey(namekey1) && sMap.get(namekey1).UnifiedI_Contact_ID__c == null) { |
| | | system.debug('sMap.containsKey(namekey1) && sMap.get(namekey1).UnifiedI_Contact_ID__c == null'); |
| | | red.awsDataId = sMap.get(namekey1).AWS_Data_Id__c; |
| | | red.sfid = sMap.get(namekey1).id; |
| | | |
| | |
| | | //red.sfid = null; |
| | | for ( Integer i = 0; i < peopleList.size(); i++) { |
| | | if (peopleList[i].Account.parent.Name !=DepartmentClasskey && peopleList[i].MobilePhone_Encrypted__c ==null) { |
| | | System.debug('peopleList[i].Account.parent.Name = ' + peopleList[i].Account.parent.Name); |
| | | System.debug('DepartmentClasskey = ' + DepartmentClasskey); |
| | | System.debug('peopleList[i].MobilePhone_Encrypted__c = ' + peopleList[i].MobilePhone_Encrypted__c); |
| | | System.debug('peopleList[i].Account.parent.Name !=DepartmentClasskey && peopleList[i].MobilePhone_Encrypted__c ==null'); |
| | | red.awsDataId =peopleList[i].AWS_Data_Id__c; |
| | | red.sfid =peopleList[i].id; |
| | | } |
| | |
| | | system.debug('战略科室不存在'); |
| | | for ( Integer i = 0; i < peopleList.size(); i++) { |
| | | if (peopleList[i].MobilePhone_Encrypted__c ==null) { |
| | | System.debug('peopleList[i].MobilePhone_Encrypted__c ==null'); |
| | | red.awsDataId =peopleList[i].AWS_Data_Id__c; |
| | | red.sfid =peopleList[i].id; |
| | | } |
| | |
| | | iflog.ErrorLog__c += ex.getMessage() + '\n'; |
| | | iflog.ErrorLog__c += ex.getStackTraceString() + '\n'; |
| | | } |
| | | update rowData; |
| | | system.debug('Rowdata'+rowData); |
| | | logstr += responseList +'\n'; |
| | | logstr += 'end'; |
| | | iflog.Log__c = logstr; |
| | | update iflog; |
| | | system.debug('responseList.ResponseDetails'+responseList.ResponseDetails); |
| | | return responseList; |
| | | update rowData; |
| | | system.debug('Rowdata'+rowData); |
| | | logstr += responseList +'\n'; |
| | | logstr += 'end'; |
| | | iflog.Log__c = logstr; |
| | | update iflog; |
| | | system.debug('responseList.ResponseDetails'+responseList.ResponseDetails); |
| | | return responseList; |
| | | } |
| | | } |