Ejemplo n.º 1
0
 // other项目总额
 public double getWageOtherItemSum(String itemType, String wageDate, String wageSetID) {
   double r = 0.0;
   try {
     String sql =
         "select sum(money) from wage_data_record where yearmonth='"
             + wageDate
             + "' and setid in (select id from wage_dataset where item_type='"
             + itemType
             + "') "
             + "and userid in (select p.id from wage_set_pers_r p,wage_set w where p.A815700=w.set_id and w.set_id='"
             + wageSetID
             + "')";
     if ("2".equals(itemType) || "3".equals(itemType)) {
       sql +=
           " and id in (select concat(v.dataset_user_id,'"
               + wageDate
               + "') from wage_dataset_verify v where v.status=1 and v.yearmonth='"
               + wageDate
               + "')";
     }
     String c = this.activeapi.queryForString(sql);
     if (c != null && !"".equals(c)) {
       r = Double.valueOf(c);
     }
   } catch (SysException e) {
     e.printStackTrace();
   }
   return r;
 }
Ejemplo n.º 2
0
 public double getWageSigleSum(String itemType) {
   String set = null;
   if ("1".equals(itemType)) {
     set = "a225";
   } else if ("2".equals(itemType)) {
     set = "a226";
   } else if ("3".equals(itemType)) {
     set = "a227";
   }
   String sql =
       "select sum("
           + set
           + "200) from "
           + set
           + " where "
           + set
           + "200 is not null and "
           + set
           + "200<>0 and "
           + set
           + "200<>0.0";
   double r = 0.0;
   try {
     String c = this.activeapi.queryForString(sql);
     if (c != null && !"".equals(c)) {
       r = Double.valueOf(c);
     }
   } catch (SysException e) {
     e.printStackTrace();
   }
   return r;
 }
Ejemplo n.º 3
0
 public void delete() {
   try {
     this.changeService.deleteTypeChange(this.operID);
     this.operID = null;
   } catch (SysException e) {
     e.printStackTrace();
   }
 }
Ejemplo n.º 4
0
 public void effect() {
   try {
     this.changeService.batchUpdateTypeChange(this.typeChangeIDs.split(","));
     this.typeChangeIDs = null;
     super.showMessageDetail("操作完成");
   } catch (SysException e) {
     e.printStackTrace();
   }
 }
Ejemplo n.º 5
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();
      }
    }
  }
Ejemplo n.º 6
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;
  }
Ejemplo n.º 7
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());
     }
   }
 }