| | |
| | | String s=''; |
| | | try { |
| | | String objectName = 'Opportunity'; // 要获取字段的对象名 |
| | | |
| | | Map<String, Schema.SObjectType> globalDescribe = Schema.getGlobalDescribe(); |
| | | Schema.SObjectType objType = globalDescribe.get(objectName); |
| | | if (objType != null) { |
| | |
| | | if(!fieldName.equals('id')) |
| | | s+=fieldName+','; |
| | | } |
| | | |
| | | s=s.removeEnd(','); |
| | | s+=' FROM Opportunity where id=\''+recordId+'\''; |
| | | system.debug('SQL:'+s); |
| | |
| | | if(opportunitys.size()>0){ |
| | | system.debug('in!'); |
| | | for (String fieldName : fieldMap.keySet()) { |
| | | String formaF=forma(fieldName); |
| | | String formaF=fieldMap.get(fieldName).getDescribe().getName(); |
| | | if(opportunitys.get(0).get(fieldName)!=null&&!opportunitys.get(0).get(fieldName).equals('null')) |
| | | s+=formaF+'='+opportunitys.get(0).get(fieldName)+','; |
| | | } |
| | |
| | | List<Integer> charArr = new List<Integer>(); |
| | | Integer change=bA-a; |
| | | Integer st=(str.charAt(0)+change); |
| | | //res+=String.valueOf(st); |
| | | charArr.add(st); |
| | | for(Integer i=0;i<str.length()-2;i++){ |
| | | Integer c=str.charAt(i); |
| | |
| | | nextC+=change; |
| | | } |
| | | charArr.add(nextC); |
| | | //res+=String.fromCharArray(List<Integer> charArr)(nextC); |
| | | } |
| | | res=String.fromCharArray(charArr); |
| | | res+=str.substring(str.length()-1,str.length()); |