public MyQuery getAllOutStateSreach() { DetachedCriteria dc = DetachedCriteria.forClass(CheckworkAbsence.class); String date = TimeUtil.getTheTimeStr(TimeUtil.getNowTime()); dc.add(Restrictions.gt("endTime", TimeUtil.getTimeByStr(date, "yyyy-MM-dd HH:mm:ss"))); dc.add(Restrictions.lt("beginTime", TimeUtil.getTimeByStr(date, "yyyy-MM-dd HH:mm:ss"))); dc.addOrder(Order.desc("signDate")); MyQuery myQuery = new MyQueryImpl(); myQuery.setDetachedCriteria(dc); return myQuery; }
/** * 创建 ResourceInfo 更新实例 * * @param dto * @return */ private ResourceInfo updateMeetingInfo(IBaseDTO dto) { ResourceInfo resourceInfo = new ResourceInfo(); resourceInfo.setId(dto.get("meetingId").toString()); resourceInfo.setResourceType("40"); resourceInfo.setResourceName( dto.get("meetingName") == null ? "" : dto.get("meetingName").toString()); resourceInfo.setResourceState( dto.get("meetingThing") == null ? "" : dto.get("meetingThing").toString()); resourceInfo.setPrincipalId( dto.get("meetingPrincipal") == null ? "" : dto.get("meetingPrincipal").toString()); resourceInfo.setCreateDate(TimeUtil.getNowTime()); resourceInfo.setRemark( dto.get("meetingRemark") == null ? "" : dto.get("meetingRemark").toString()); return resourceInfo; }