Example #1
0
  public static void format(String kq_date) throws Exception {
    Connection con = null;
    try {
      con = com.gemway.igo.JDatabase.getPkJDatabase().getConnection();
      con.setAutoCommit(false);
      for (JCompany comObj : JCompany.getFlCompanyList()) {
        java.util.List<Branch> lsBranch =
            com.gemway.igo.fl.Branch.getBranches(comObj.getCompany_id());

        for (int i = 0; lsBranch != null && i < lsBranch.size(); i++) {
          format(con, kq_date, lsBranch.get(i).getBranch_id());
        }
      }
      con.commit();
    } catch (Throwable e) {
      JLog.getLogger().error("自动生成日度考勤服务出错:", e);
    } finally {
      if (con != null) {
        try {
          con.rollback();
          con.close();
          con = null;
        } catch (Exception e) {
        }
      }
    }
  }
Example #2
0
  public static void format(Connection con, String kq_date) throws Exception {
    for (JCompany comObj : JCompany.getFlCompanyList()) {
      java.util.List<Branch> lsBranch =
          com.gemway.igo.fl.Branch.getBranches(comObj.getCompany_id());

      for (int i = 0; lsBranch != null && i < lsBranch.size(); i++) {
        format(con, kq_date, lsBranch.get(i).getBranch_id());
      }
    }
  }