コード例 #1
0
 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;
 }
コード例 #2
0
 private SysUserInfo createSUIByDTO(IBaseDTO dto) {
   SysUserInfo sui = new SysUserInfo();
   sui.setUserId(
       null != dto.get("userId") && !"".equals("userId") ? dto.get("userId").toString() : "");
   sui.setRealName(null != dto.get("realName") ? dto.get("realName").toString() : "");
   sui.setSexId(null != dto.get("sexId") ? dto.get("sexId").toString() : "1");
   sui.setIdentityKind(null != dto.get("identityKind") ? dto.get("identityKind").toString() : "");
   sui.setIdentityCard(null != dto.get("identityCard") ? dto.get("identityCard").toString() : "");
   //		TimeUtil a;
   sui.setBirthday(
       null != dto.get("birthday") && !"".equals(dto.get("birthday").toString())
           ? TimeUtil.getTimeByStr(dto.get("birthday").toString(), "yyyy-MM-dd")
           : new Date());
   //		sui.setCountryId(null !=dto.get("countryId")?dto.get("countryId").toString():"");
   //		sui.setProvinceId(null !=dto.get("provinceId")?dto.get("provinceId").toString():"");
   //		sui.setQq(null !=dto.get("qq")?dto.get("qq").toString():"");
   //		sui.setBloodType(null !=dto.get("bloodType")?dto.get("bloodType").toString():"");
   //		sui.setAddress(null !=dto.get("address")?dto.get("address").toString():"");
   //		sui.setPostalcode(null !=dto.get("postalcode")?dto.get("postalcode").toString():"");
   //		sui.setMobile(null !=dto.get("mobile")?dto.get("mobile").toString():"");
   //		sui.setFinishSchool(null !=dto.get("finishSchool")?dto.get("finishSchool").toString():"");
   //		sui.setSpeciality(null !=dto.get("speciality")?dto.get("speciality").toString():"");
   //		sui.setWorkId(null !=dto.get("workId")?dto.get("workId").toString():"");
   //		sui.setHomepage(null !=dto.get("homepage")?dto.get("homepage").toString():"");
   return sui;
 }
コード例 #3
0
 /**
  * 创建 ResourceUse 实例
  *
  * @description : 会议室申请
  * @param dto
  * @return
  */
 private ResourceUse createApplyMeeting(IBaseDTO dto) {
   ResourceUse resourceUse = new ResourceUse();
   resourceUse.setId(keyService.getNext("resource_use"));
   resourceUse.setResourceInfo(getResourceInfo(dto.get("meetingName").toString()));
   resourceUse.setDateArea(TimeUtil.getTimeByStr(dto.get("useDate").toString(), "yyyy-MM-dd"));
   resourceUse.setTimeArea(
       dto.get("startHour").toString() + " ---- " + dto.get("endHour").toString());
   resourceUse.setUserName(dto.get("applyUser") == null ? "" : dto.get("applyUser").toString());
   resourceUse.setResourceState("1"); // 0-未审批;1-等待审批;2-已批准
   resourceUse.setRemark(dto.get("applyReason") == null ? "" : dto.get("applyReason").toString());
   resourceUse.setApplyState("40");
   return resourceUse;
 }