示例#1
0
 public List<Schedule> getSchedules(Date beginDate, Date endDate) {
   return getDb()
       .findAllByWhere(
           Schedule.class,
           "workDate >= '"
               + DateUtils.getDateString(
                   beginDate, new SimpleDateFormat("yyyy-MM-dd", Locale.CHINA))
               + "' and workDate <= '"
               + DateUtils.getDateString(endDate, new SimpleDateFormat("yyyy-MM-dd", Locale.CHINA))
               + "'");
 }
示例#2
0
 public List<Schedule> getSchedules(int employeeId, Date startDate, Date endDate) {
   return getDb()
       .findAllByWhere(
           Schedule.class,
           "employeeID = "
               + employeeId
               + " and workDate >= '"
               + DateUtils.getDateString(
                   startDate, new SimpleDateFormat("yyyy-MM-dd", Locale.CHINA))
               + "' and workDate <= '"
               + DateUtils.getDateString(endDate, new SimpleDateFormat("yyyy-MM-dd", Locale.CHINA))
               + "'");
 }
示例#3
0
 public List<Schedule> getSchedulesByWorkDate(int employeeId, Date workDate) {
   return getDb()
       .findAllByWhere(
           Schedule.class,
           "employeeID = "
               + employeeId
               + " and workDate like '"
               + DateUtils.getDateString(
                   workDate, new SimpleDateFormat("yyyy-MM-dd", Locale.CHINA))
               + "%'");
 }