Ejemplo n.º 1
0
 @Override
 public String getSelectorStatement() {
   int set = 0;
   String query = "SELECT q FROM DrivingExam q WHERE";
   if (name != null) {
     query += " q.applicant.name='" + name + "'";
     set++;
   }
   if (examdate != null) {
     if (set > 0) query += " AND";
     query += " examdate='" + HRUtil.parseDateToString(examdate) + "'";
     set++;
   }
   if (roadexam != null && !roadexam.equals("")) {
     if (set > 0) query += " AND";
     query += " roadPass="******"")) {
     if (set > 0) query += " AND";
     query += " zhuangPass="******" ORDER BY q.applicant.name";
   return query;
 }
Ejemplo n.º 2
0
 @Transient
 public String getDatestr() {
   if (date == null) return "";
   else {
     return HRUtil.parseDateToString(date);
   }
 }
Ejemplo n.º 3
0
 @HandlesEvent(value = "updateRequest")
 @Secure(roles = Roles.EMPLOYMENT_REQUEST_EDIT)
 public Resolution updateRequest() {
   try {
     String updateEvent = context.getRequest().getParameter("update");
     String targetId = context.getRequest().getParameter("targetId");
     String value = context.getRequest().getParameter("value");
     String dateval = context.getRequest().getParameter("dateval");
     EmployeeRequest er = empBean.getEmpRequestById(targetId);
     if (updateEvent.equals(COMMIT_NUM)) er.setCommitNumber(Integer.parseInt(value));
     else if (updateEvent.equals(APPROVE_DATE) && dateval != null)
       er.setApproveDate(HRUtil.parseDate(dateval, "yyyy-MM-dd"));
     else if (updateEvent.equals(SEND_APPROVE_DATE) && dateval != null)
       er.setSendApproveDate(HRUtil.parseDate(dateval, "yyyy-MM-dd"));
     empBean.mergeEmpRequest(er);
     return new StreamingResolution("text/charset=utf8", "修改成功");
   } catch (Exception e) {
     //			e.printStackTrace();
     return new StreamingResolution("text/charset=utf8", "修改失败." + e.getMessage());
   }
 }
Ejemplo n.º 4
0
 @Transient
 public String getDobstr() {
   if (this.dob != null) return HRUtil.parseDateToString(this.dob);
   else return "";
 }
Ejemplo n.º 5
0
 @Transient
 public String getCreatetimestr() {
   if (this.createtime != null) return HRUtil.parseDateToString(this.createtime);
   else return "";
 }