Пример #1
0
  /**
   * 设置加入帐套人员顺序
   *
   * @param setID 帐套ID
   * @param personIDs 人员IDS
   * @param personCode 人员编号s
   */
  public void batchUpdateWageSetPersonSort(String setID, String personIDs, String personCode) {
    if (personCode != null && !"".equals(personCode)) {
      // 查询当前帐套中的最大薪资序号
      String sql =
          "select isnull(max(a001745),0) from a001 where id in (select id from wage_set_pers_r w where w.a815700='"
              + setID
              + "')";
      int currSort = this.jdbcTemplate.queryForInt(sql);

      // 循环处理每个人员编号
      List sqlList = new ArrayList();
      String[] codes = personCode.split(",");
      for (int i = 0; i < codes.length; i++) {
        PersonBO p = SysCacheTool.findPersonByCode(codes[i].trim()); // 获得人员对象
        if (p != null && personIDs.indexOf(p.getPersonId()) != -1) {
          String sql1 =
              "update a001 set A001745= case when len("
                  + currSort
                  + "+10)<4 then (lpad("
                  + currSort
                  + "+10,4,0)) else "
                  + currSort
                  + "+10||'' end where id='"
                  + p.getPersonId()
                  + "'";
          sqlList.add(sql1);
          currSort += 10;
        }
      }
      try {
        this.activeapi.batchExecuteSql(sqlList);
      } catch (SysException e) {
        e.printStackTrace();
      }
    }
  }
Пример #2
0
 public void selPerson() {
   PersonBO[] pbos = (PersonBO[]) super.getHttpSession().getAttribute(Constants.SELPERSON_SESSION);
   if (pbos != null && pbos.length > 0) {
     for (PersonBO p : pbos) {
       if (!selMap.containsKey(p.getPersonId())) {
         selMap.put(p.getPersonId(), p.getName());
         this.personIDs += p.getPersonId() + ",";
         this.personNames += p.getName() + ",";
       }
     }
   }
 }
Пример #3
0
 public void doQuery() {
   if (this.mypage.getCurrentPage() == 0) {
     this.mypage.setCurrentPage(1);
   }
   try {
     this.list =
         this.changeService.getEmpTypeChangeBO(
             mypage,
             this.orgID,
             super.getUserInfo(),
             this.name,
             this.apprived,
             this.time,
             this.time2);
   } catch (SysException e) {
     e.printStackTrace();
   }
   if (this.list == null) {
     this.list = new ArrayList<EmpPersonTypeChangeBO>();
   }
   for (EmpPersonTypeChangeBO bo : this.list) {
     PersonBO p = SysCacheTool.findPersonById(bo.getPersonID());
     bo.setName(p.getName());
     bo.setPersonCode(p.getPersonCode());
     bo.setOrgName(CodeUtil.interpertCode(CodeUtil.TYPE_ORG, p.getOrgId()));
     bo.setDeptName(CodeUtil.interpertCode(CodeUtil.TYPE_ORG, p.getDeptId()));
     if (bo.getOldType() != null) {
       bo.setOldTypeDes(CodeUtil.interpertCode(bo.getOldType()));
     }
     bo.setNewTypeDes(CodeUtil.interpertCode(bo.getNewType()));
     p = SysCacheTool.findPersonById(bo.getApplyPersonID());
     if (p != null) {
       bo.setApplyPersonName(p.getName());
     }
   }
 }