Examples of DivFtDtl


Examples of com.iisigroup.cap.rule.model.DivFtDtl

    }
    if(sary!=null){
      List<DivFtDtl> ftDtls = new ArrayList<DivFtDtl>();
      for(int i = 0 ; i<sary.length; i++){
        JSONObject gridData = JSONObject.fromObject(sary[i]);
        DivFtDtl ftDtl = new DivFtDtl();
        CapBeanUtil.map2Bean(gridData, ftDtl);
        ftDtl.setFactorNo(ftItm.getFactorNo());
        if(!CapString.isEmpty(gridData.optString("rangeNo"))){
          ftDtl.setRangeNo(gridData.optString("rangeNo"));
        }else{
          ftDtl.setRangeNo(CapString.fillString(String.valueOf(i), 5, true, '0'));
        }
        if(!CapString.isEmpty(gridData.optString("oid"))){
          ftDtl.setOid(gridData.optString("oid"));
        }
        ftDtl.setRangeSor(new BigDecimal(i));
        ftDtl.setDivFtItm(ftItm);
        ftDtls.add(ftDtl);
      }
      ftItm.setDivFtDtls(ftDtls);
    }
    String userId = CapSecurityContext.getUserId();
View Full Code Here

Examples of com.iisigroup.cap.rule.model.DivFtDtl

//        }
        CapBeanUtil.map2Bean(jsData, ctDtl);
        ctDtl.setDivCtNo(ctItm.getDivCtNo());
        ctDtl.setDivCtSor(new BigDecimal(i+1));
        ctDtl.setRangeNo(jsData.optString("rangeNo"));
        DivFtDtl ftDtl = factorMntService.findByFactorNoAndRangeNo(
            jsData.optString("factorNo"), jsData.optString("rangeNo"));
        ctDtl.setDivFtDtl(ftDtl);
        ctDtl.setDivCtItm(ctItm);
//        if(haveOld){
//          ctDtls.set(j, ctDtl);
View Full Code Here

Examples of com.iisigroup.cap.rule.model.DivFtDtl

    @SuppressWarnings("unchecked")
    public String reformat(Object in) throws CapFormatException {
      StringBuffer rangeNm = new StringBuffer();
      if (in instanceof DivFtDtl) {
        DivFtDtl ftDtl = ((DivFtDtl) in);
        if(ftDtl!=null){
          rangeNm.append(ftDtl.getRangeNm());
        }
      }
      return rangeNm.toString();
    }
View Full Code Here

Examples of com.iisigroup.cap.rule.model.DivFtDtl

      StringBuffer result = new StringBuffer();
      if (in instanceof DivCtItm) {
        DivCtItm ctItm = ((DivCtItm) in);
        if(ctItm.getDivCtDtls()!=null && !ctItm.getDivCtDtls().isEmpty()){
          for(DivCtDtl ctDtl : ctItm.getDivCtDtls()){
            DivFtDtl ftDtl =
                factorMntService2.findByFactorNoAndRangeNo(ctDtl.getFactorNo(), ctDtl.getRangeNo());               
            result.append(ftDtl.getRangeNm()+",");
          }
          result.deleteCharAt(result.lastIndexOf(","));
        }
      }
      return result.toString();
View Full Code Here

Examples of com.iisigroup.cap.rule.model.DivFtDtl

    @SuppressWarnings("unchecked")
    public String reformat(Object in) throws CapFormatException {
      StringBuffer factorNm = new StringBuffer();
      if (in instanceof DivFtDtl) {
        DivFtDtl ftDtl = ((DivFtDtl) in);
        if(ftDtl.getDivFtItm()!=null){
          factorNm.append(ftDtl.getDivFtItm().getFactorNm());
        }
      }
      return factorNm.toString();
    }
View Full Code Here

Examples of com.iisigroup.cap.rule.model.DivFtDtl

    public String reformat(Object in) throws CapFormatException {
      StringBuffer rangeNm = new StringBuffer();
      if (in instanceof DivCtDtl) {
        DivCtDtl ctDtl = ((DivCtDtl) in);
        if(ctDtl.getDivFtDtl()!=null){
          DivFtDtl ftDtl = ctDtl.getDivFtDtl();
          rangeNm.append(ftDtl.getRangeNm());
        }
      }
      return rangeNm.toString();
    }
View Full Code Here

Examples of com.iisigroup.cap.rule.model.DivFtDtl

    public String reformat(Object in) throws CapFormatException {
      StringBuffer rangeNm = new StringBuffer();
      if (in instanceof DivCtDtl) {
        DivCtDtl ctDtl = ((DivCtDtl) in);
        if(ctDtl.getDivFtDtl()!=null){
          DivFtDtl ftDtl = ctDtl.getDivFtDtl();
          rangeNm.append(ftDtl.getDivFtItm().getFactorNm());
        }
      }
      return rangeNm.toString();
    }
View Full Code Here

Examples of com.iisigroup.cap.rule.model.DivFtDtl

        //資料型別宣告
        sheet1.addCell(new Label(1+j, 11, "beanClz:"+tableNms.get(0), setCellFmt));
        //這一行要擺 物件.屬性 + "比較運算元" + param/$1,$2
        String operand = "";
        if(ctDtl.getDivFtDtl()!=null){
          DivFtDtl ftDtl = ctDtl.getDivFtDtl();
          if(!CapString.isEmpty(ftDtl.getRange1()) && !CapString.isEmpty(ftDtl.getRange2())){
            operand = "$1<"+key+"&&"+key+"<=$2";
          }else{
            operand = key+"==$param";
          }
        }
        sheet1.addCell(new Label(1+j, 12, operand, setCellFmt));
        sheet1.addCell(new Label(1+j, 13, key, blueCellFmt));
        colSortNo.put(key, 1+j);
        i++;
        j++;
      }
      //Bean 宣告合併欄位
      sheet1.mergeCells(1, 11, j, 11);
     
      //宣告完CONDITION欄位,在宣告ACTIVITION-GROUP&NO-LOOP&PRIORITY
      int actGpColNo = 1+j;
      sheet1.addCell(new Label(actGpColNo, 10, DroolsConstants.ACTIVATION_GROUP, setCellFmt));
      sheet1.addCell(new Label(actGpColNo, 11, "", setCellFmt));
      sheet1.addCell(new Label(actGpColNo, 12, "", setCellFmt));
      sheet1.addCell(new Label(actGpColNo, 13, "activation group", blueCellFmt));
      int noLpColNo = actGpColNo+1;
      sheet1.addCell(new Label(noLpColNo, 10, DroolsConstants.NO_LOOP, setCellFmt));
      sheet1.addCell(new Label(noLpColNo, 11, "", setCellFmt));
      sheet1.addCell(new Label(noLpColNo, 12, "", setCellFmt));
      sheet1.addCell(new Label(noLpColNo, 13, "no loop", blueCellFmt));
      int priColNo = noLpColNo+1;
      sheet1.addCell(new Label(priColNo, 10, DroolsConstants.PRIORITY, setCellFmt));
      sheet1.addCell(new Label(priColNo, 11, "", setCellFmt));
      sheet1.addCell(new Label(priColNo, 12, "", setCellFmt));
      sheet1.addCell(new Label(priColNo, 13, "priority", blueCellFmt));
     
      //最後宣告ACTION
      int actColNo1 = priColNo+1;
      sheet1.addCell(new Label(actColNo1, 10, DroolsConstants.ACTION_COL, setCellFmt));
      sheet1.addCell(new Label(actColNo1, 11, "", setCellFmt));
      sheet1.addCell(new Label(actColNo1, 12, "beanClz.setGrpUppId(\"$param\");", setCellFmt));
      sheet1.addCell(new Label(actColNo1, 13, "", yellowCellFmt));

      int actColNo2 = actColNo1+1;
      sheet1.addCell(new Label(actColNo2, 10, DroolsConstants.ACTION_COL, setCellFmt));
      sheet1.addCell(new Label(actColNo2, 11, "", setCellFmt));
      sheet1.addCell(new Label(actColNo2, 12, "beanClz.setDocStatus(\"$param\");", setCellFmt));
      sheet1.addCell(new Label(actColNo2, 13, "", yellowCellFmt));
     
      int actColNo3 = actColNo2+1;
      sheet1.addCell(new Label(actColNo3, 10, DroolsConstants.ACTION_COL, setCellFmt));
      sheet1.addCell(new Label(actColNo3, 11, "", setCellFmt));
      sheet1.addCell(new Label(actColNo3, 12, "System.out.println(\"$param\"+ \" CASEINFO IS "
          + "\" +beanClz.getCasNo()+\" ** 分組結果 = "
          + "\" +beanClz.getGrpUppId() );", setCellFmt));
      sheet1.addCell(new Label(actColNo3, 13, "", yellowCellFmt));
      sheet1.addCell(new Label(0, 13, "Base rules", greenCellFmt));

      /*
       * 將總明細資料一筆一筆拆開來,將condition-->factor的值域填到Excel
       */
      if(!ctItmList.isEmpty()){
        int rowNo = 14, count = 0;
        for(DivCtItm ctItm : ctItmList){
          if(ctItm.getDivCtDtls()!=null){
            //CtItm list對應到自己的CtDtl,所以一筆CtItm就是一行Rule Row
            for(DivCtDtl ctDtl : ctItm.getDivCtDtls()){
              ctItm = ctDtl.getDivCtItm();
              //設定Action動作
              sheet1.addCell(new Label(actColNo1, rowNo, ctItm.getDivCtAction(), bodyCellFmt));
              sheet1.addCell(new Label(actColNo2, rowNo, ctItm.getDivCtSetting(), bodyCellFmt));
              sheet1.addCell(new Label(actColNo3, rowNo, "Test Condition::"+ctItm.getDivCtNm(), bodyCellFmt));

              DivFtDtl ftDtl = ctDtl.getDivFtDtl();
              String colNm = ftDtl.getDivFtItm().getColumnNm();
              //取得要放到第幾個cell
              Integer colNo = colSortNo.get(colNm);
              String rangeVal = "";
              if(!CapString.isEmpty(ftDtl.getRange1())){
                rangeVal = ftDtl.getRange1();
              }
              if(!CapString.isEmpty(ftDtl.getRange2())){
                rangeVal += ","+ftDtl.getRange2();
              }
              //設定行row名稱(rule name)
              sheet1.addCell(new Label(0, rowNo, ctDtl.getDivCtItm().getDivCtNm(), bodyCellFmt));
              //放入值域
              sheet1.addCell(new Label(colNo, rowNo, rangeVal, bodyCellFmt));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.