示例#1
0
 public String addfield() {
   if ((this.infoItem != null) && (!"".equals(this.infoItem))) {
     String[] inf = this.infoItem.replace('.', ',').split(",");
     InfoItemBO ib = SysCacheTool.findInfoItem("", inf[1]);
     ib.setSetId(CodeUtil.interpertCode(CodeUtil.TYPE_INFOSET, inf[0]));
     ib.setItemSequence(String.valueOf(this.baseFields.size() + 1));
     this.baseFields.add(ib);
   }
   return null;
 }
示例#2
0
 public String moveNext() {
   if ((this.infoItem != null) && (!"".equals(this.infoItem)) && (this.baseFields != null)) {
     int i = 0;
     while (i < this.baseFields.size()) {
       InfoItemBO ib = (InfoItemBO) this.baseFields.get(i);
       if (this.infoItem.equals(ib.getItemId())) break;
       i++;
     }
     if (i < this.baseFields.size() - 1) {
       InfoItemBO ib = (InfoItemBO) this.baseFields.get(i + 1);
       this.baseFields.set(i + 1, this.baseFields.get(i));
       this.baseFields.set(i, ib);
     }
   }
   return null;
 }
示例#3
0
  public String getInitOrgEdit() {
    String act = super.getRequestParameter("act");
    if ("init".equals(act)) {
      try {
        this.orgchangebo =
            (OrgPersonTypeChangeBO)
                this.changeService.getObjByID(
                    OrgPersonTypeChangeBO.class, super.getUserInfo().getOrgId());
        if (this.orgchangebo == null) {
          this.orgchangebo = new OrgPersonTypeChangeBO();
          this.orgchangebo.setOrgID(super.getUserInfo().getOrgId());
          this.changeService.saveObj(this.orgchangebo);
        } else {
          if (this.orgchangebo.getWageItem() != null
              && !"".equals(this.orgchangebo.getWageItem())) {
            this.baseFields = new ArrayList();
            String[] fs = this.orgchangebo.getWageItem().split(",");
            for (int i = 0; i < fs.length; i++) {
              InfoItemBO ib = SysCacheTool.findInfoItem("", fs[i]);
              ib.setItemSequence(String.valueOf(i + 1));
              ib.setSetId(CodeUtil.interpertCode(CodeUtil.TYPE_INFOSET, ib.getSetId()));
              if (!this.baseFields.contains(ib)) {
                this.baseFields.add(ib);
              }
            }
          }
        }
        this.orgchangebo.setOrgName(
            CodeUtil.interpertCode(CodeUtil.TYPE_ORG, this.orgchangebo.getOrgID()));
      } catch (SysException e) {
        e.printStackTrace();
      }
    }

    return initOrgEdit;
  }
示例#4
0
 public String delfield() {
   if ((this.infoItem != null) && (!"".equals(this.infoItem)) && (this.baseFields != null)) {
     int i = 0;
     while (i < this.baseFields.size()) {
       InfoItemBO ib = (InfoItemBO) this.baseFields.get(i);
       if (this.infoItem.equals(ib.getItemId())) {
         this.baseFields.remove(i);
         if ((this.orgchangebo.getWageItem() == null)
             || ("".equals(this.orgchangebo.getWageItem()))) break;
         String items = "";
         String[] fs = this.orgchangebo.getWageItem().split(",");
         for (int j = 0; j < fs.length; j++) {
           InfoItemBO ib1 = SysCacheTool.findInfoItem("", fs[j]);
           if (!ib1.getItemId().equals(ib.getItemId())) {
             items = items + ib1.getItemId() + ",";
           }
         }
         break;
       }
       i++;
     }
   }
   return null;
 }