| | |
| | | contactDataId = c.AWS_Data_Id__c; |
| | | } |
| | | //查询战略科室分类 |
| | | List<Contact> cs = [select Account.Department_Class__c from Contact where id='0030l00000mldeG']; |
| | | List<Contact> cs = [select Account.Department_Class__c from Contact where id=:contactId]; |
| | | if(cs.size()>0){ |
| | | controller.getRecord().put('Department_Class__c',cs[0].Account.Department_Class__c); |
| | | } |
| | |
| | | //自定义格式转换 |
| | | for (String fieldAPI: fieldValueMap.keySet()) { |
| | | system.debug('field API='+fieldAPI); |
| | | if(!fieldAPIToTypeMap.containskey(fieldAPI)){ |
| | | continue; |
| | | } |
| | | Schema.DisplayType fielddataType = fieldAPIToTypeMap.get(fieldAPI).getDescribe().getType(); |
| | | String fieldValue = String.valueOf(fieldValueMap.get(fieldAPI)); |
| | | system.debug('Field Type:'+fielddataType+' field Value='+fieldValue); |
| | |
| | | leadInfo.put(fieldAPI, null); |
| | | } |
| | | }else if(String.valueof(fielddataType)=='CURRENCY'|| String.valueof(fielddataType)=='PERCENT'||String.valueOf(fielddataType)=='Number'||String.valueOf(fielddataType)=='DOUBLE' ){ |
| | | leadInfo.put(fieldAPI, (String.isBlank(fieldValue)||String.isEmpty(fieldValue))?0:Decimal.valueOf(fieldValue)); |
| | | leadInfo.put(fieldAPI, (String.isBlank(fieldValue)||String.isEmpty(fieldValue))?null:Decimal.valueOf(fieldValue.replace(',', ''))); |
| | | } else if(String.valueof(fielddataType)=='BOOLEAN'){ |
| | | leadInfo.put(fieldAPI, fieldValueMap.get(fieldAPI)); |
| | | }else { |