posts - 12,  comments - 2,  trackbacks - 0
          ???? /**
          ?????*?根據(jù)commutype,epId查詢分期項(xiàng)目下拉列框的值(LabelValueEx對(duì)象)按indexNo升序排列,lable對(duì)應(yīng)typeName,value對(duì)應(yīng)commTypeId
          ?????*??
          @param ??epId
          ?????*?????????????開發(fā)商Id
          ?????*?
          @param ??commutype?
          ?????*?????????????通訊方法String類型,分別為tysms,tyemail,tyfax
          ?????*?
          @return ?List
          ?????*?
          @throws ?BusinessProcessException
          ?????
          */
          ??????如果在查詢的SQL中,用到left join fetch 查詢出來的只能是一個(gè)對(duì)象,而不能是某些列?
          ???? 否則會(huì)出現(xiàn)沒有取到延遲加載的列的錯(cuò)誤
          ?

          ????
          public ?List?getCrmCommuInfoTyFms(String?epId,String?commutype)? throws ?BusinessProcessException?{
          ????????List?dicList?
          = ? new ?ArrayList();
          ????????
          if ( ! BlankUtil.isBlank(commutype))
          ????????{????????
          ????????
          try ?{
          ????????????String?query
          = " select?info.constValueId?from?SysConstValue?info "
          ????????????????
          + " ?where?info.constValue=' " + commutype + " ' " ;
          ????????????Long?scv
          = (Long)cDao.execute(query);
          ????????????String?sql?
          = ? " from?CrmCommInfoType?info?left?join?fetch?info.communicationTy "
          ????????????????
          + ? " ?where?info.epId=' " + epId + " ' " ?
          ????????????????
          + " ?and?info.communicationTy.constValueId= " + Long.parseLong(scv.toString());
          ????????????dicList?
          = ?cDao.queryObjects(sql);
          ?????????}?
          catch ?(Exception?ex)?{
          ????????????
          throw ? new ?BusinessProcessException( " getDictData_search_001 " );
          ?????????}
          ????????}
          ????????
          return ?dicList;
          ????}

          /**
          ?????*?根據(jù)commutype,epId查詢分期項(xiàng)目下拉列框的值(LabelValueEx對(duì)象),lable對(duì)應(yīng)typeName,value對(duì)應(yīng)commTypeId
          ?????*?
          ?????*?
          @param ?epId
          ?????*????????????開發(fā)商Id
          ?????*?
          @param ?commutype
          ?????*????????????通訊方法String類型,分別為tysms,tyemail,tyfax
          ?????*?
          @return ?List
          ?????*?
          @throws ?BusinessProcessException
          ?????
          */
          ????@SuppressWarnings(
          " unchecked " )
          ????
          public ?DicSelectionModel?getCrmCommuInfoTyFms(String?epId,?String?commutype)
          ????????????
          throws ?BusinessProcessException?{
          ????????
          try ?{
          ????????????
          if ?(DictionaryServ? == ? null )?{
          ????????????????System.out.println(
          " DictionaryServ?is?null. " );
          ????????????}
          ????????????System.out.println(
          " get?dicList:------>begin " );
          ????????????List?dicList?
          = ?DictionaryServ.getCrmCommuInfoTyFms(epId,?commutype);
          ????????????System.out.println(
          " get?dicList:------>end " );
          ????????????List
          < LabelValueEx > ?labelValueList? = ? new ?ArrayList();
          ????????????Iterator?it?
          = ?dicList.iterator();
          ????????????
          // ?System.out.println("***************?Iterator?begin");
          ????????????labelValueList.add( new ?LabelValueEx( " 請(qǐng)選擇 " ,? 0 ));
          ????????????
          while ?(it.hasNext())?{
          ????????????????CrmCommInfoType?result?
          =
          ?(CrmCommInfoType)?it.next();
          ????????????????String?label?
          = ?result.getTypeName();???????????????????????????????????? ?//根據(jù)對(duì)象取到響應(yīng)的列的值
          ????????????????
          long ?value? = ?result.getCommTypeId();
          ????????????????LabelValueEx?labelValue?
          = ? new ?LabelValueEx(label,?value);
          ????????????????labelValueList.add(labelValue);
          ????????????}

          ????????????DicSelectionModel?dicSelectionModel?
          = ? new ?DicSelectionModel(
          ????????????????????labelValueList);
          ????????????
          return ?dicSelectionModel;
          ????????}?
          catch ?(Exception?ex)?{
          ????????????
          throw ? new ?BusinessProcessException( " getCrmCommuInfoTyFms() " );
          ????????}
          ????}

          ?



          如果沒有用到延遲加載 可以返回 已知的列
          ????
          ????
          /**
          ?????*?根據(jù)epId查詢分析項(xiàng)下拉列框的值(LabelValue對(duì)象),lable對(duì)應(yīng)constNameChs,value對(duì)應(yīng)constName
          ?????*??
          @param??epId
          ?????*?????????????開發(fā)商Id
          ?????*?
          @return?List
          ?????*?
          @throws?BusinessProcessException
          ?????
          */
          ????
          public?List?getAnalyseItem(String?epId)?throws?BusinessProcessException?{
          ????????String?sql?
          =?"select?info.constNameChs,info.constName?from?SysConst?info"
          ????????????
          +?"?where?info.epId='"+epId+"'"
          ????????????
          +?"?and?flag='2'";
          ????????List?dicList?
          =?new?ArrayList();

          ????????
          try?{
          ????????????dicList?
          =?cDao.queryObjects(sql);
          ????????}?
          catch?(Exception?ex)?{
          ????????????
          throw?new?BusinessProcessException("getAnalyseItem()");
          ????????}
          ????????
          return?dicList;
          ????}

          posted on 2006-09-23 11:58 doodoosun 閱讀(277) 評(píng)論(0)  編輯  收藏

          只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           

          <2006年9月>
          272829303112
          3456789
          10111213141516
          17181920212223
          24252627282930
          1234567

          常用鏈接

          留言簿(1)

          隨筆分類(6)

          隨筆檔案(11)

          文章分類(30)

          文章檔案(34)

          搜索

          •  

          最新評(píng)論

          閱讀排行榜

          評(píng)論排行榜

          主站蜘蛛池模板: 临桂县| 通辽市| 日喀则市| 孟州市| 沂源县| 海城市| 会理县| 合山市| 深圳市| 三门峡市| 乾安县| 含山县| 赣榆县| 泗洪县| 宁国市| 固阳县| 西和县| 阿拉善左旗| 共和县| 桃江县| 青田县| 卢龙县| 潼南县| 怀安县| 信宜市| 南宫市| 钟祥市| 仲巴县| 宕昌县| 浙江省| 南澳县| 邛崃市| 白银市| 常山县| 河池市| 凌云县| 民县| 尉氏县| 祁门县| 永清县| 延长县|