      CAP4FormCacheManager cap4FormCacheManager = (CAP4FormCacheManager) AppContext.getBean(${doubleQuote}cap4FormCacheManager${doubleQuote});
      CAP4FormRelationActionManager cap4FormRelationActionManager = (CAP4FormRelationActionManager) AppContext.getBean(${doubleQuote}cap4FormRelationActionManager${doubleQuote});
      EnumManager enumManagerNew = (EnumManager) AppContext.getBean(${doubleQuote}enumManagerNew${doubleQuote});
      long targetFormId = MagicHandleFormUtils.getProviderFormId(${doubleQuote}${businessId}${doubleQuote}, ${doubleQuote}${versionId}${doubleQuote}, ${doubleQuote}${methodName}${doubleQuote});
      Map<String, Object> params = context.getExtAttrs();
      MethodProviderInfo info = (MethodProviderInfo)params.get(${doubleQuote}providerInfo${doubleQuote});
      Map<String,Object> resultMapping  ;
      if(info != null){
          resultMapping = info.getResultMapping();
      } else {
          resultMapping = new HashMap<String, Object>();
      }
      List<String> resultFieldList = new ArrayList<String>();
      ${resultFieldList}
      Map<String, Class<?>> resultDataClassMapp = new HashMap<String, Class<?>>();
      ${resultDataClassMapp}
      params.put(${doubleQuote}targetFormId${doubleQuote},targetFormId);
      params.put(${doubleQuote}toRelationAttr${doubleQuote},${doubleQuote}${toRelationAttr}${doubleQuote});
      params.put(${doubleQuote}customShowFields${doubleQuote}, resultFieldList);
      List<Map<String, Object>> newCondition = new ArrayList<Map<String,Object>>();
      if(condition != null) {
        for(int x = 0;x < condition.size();x ++){
            ${conditionName} c =  condition.get(x);
            Map<String,Object> map = new HashMap<String, Object>();
            map.put(${doubleQuote}aliasTableName${doubleQuote},c.getAliasTableName());
            map.put(${doubleQuote}fieldName${doubleQuote},c.getFieldName());
            map.put(${doubleQuote}fieldValue${doubleQuote},c.getFieldValue());
            map.put(${doubleQuote}leftChar${doubleQuote},c.getLeftChar());
            map.put(${doubleQuote}operation${doubleQuote},c.getOperation());
            map.put(${doubleQuote}rightChar${doubleQuote},c.getRightChar());
            map.put(${doubleQuote}rowOperation${doubleQuote},c.getRowOperation());
            newCondition.add(map);
        }
      }
      FlipInfo flipInfo = null;
      try {
        
        flipInfo = MagicHandleFormUtils.getReletionList2Magic(params, newCondition, page, pageSize,selectedToMasterDataId);
        
      } catch (BusinessException e1) {
        // TODO Auto-generated catch block
        e1.printStackTrace();
       }
      List relationDatas = flipInfo.getData();
      if (flipInfo.getPage() != page) {
         // 平台JDBC查询，当页数超过总页数还是为默认返回上一页的数据。无JDBC源码，单独在此处处理
           relationDatas = new ArrayList();
      }
      MagicProviderDefaultConvertor convertor = MagicProviderDefaultConvertor.getConvertor(${doubleQuote}${businessId}${doubleQuote}, ${doubleQuote}${versionId}${doubleQuote}, ${doubleQuote}${methodName}${doubleQuote});
      
      FormBean toFormBean = cap4FormCacheManager.getForm(targetFormId);
      ${resultListDefineName} result = new ${resultListDefineName}();
      if(toFormBean == null) {
         return result;
      }
      result.setTargetFormType(toFormBean.getFormType());
      result.setTargetFormId(targetFormId);
      result.setTotal(flipInfo.getTotal());
      List<${resultListItemEntityName}> listDatas = new ArrayList<${resultListItemEntityName}>(relationDatas.size());
       for (int i = 0; i < relationDatas.size(); i++) {
            Map relationData = (Map) relationDatas.get(i);
            ${resultListItemEntityName} resultData = new ${resultListItemEntityName}();

            Object vs ;
            FormFieldBean toFormFieldBean;
            Object[] values;
            try {
                ${resultValueSetItem}
            } catch (NumberFormatException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            } catch (BusinessException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }

            listDatas.add(resultData);
        }
      result.setData(listDatas );
      return result;