Пример #1
0
  public boolean equals(Object obj) {
    if (null == obj) return false;
    if (!(obj instanceof Attendperiod)) return false;

    Attendperiod attendperiod = (Attendperiod) obj;
    if ((null == getId()) || (null == attendperiod.getId())) return false;
    return getId().equals(attendperiod.getId());
  }
Пример #2
0
  public String reOpenAttendperiod() {
    if ((StringUtils.isEmpty(this.year)) || (StringUtils.isEmpty(this.month))) {
      return "success";
    }
    if (this.month.length() == 1) {
      this.month = ("0" + this.month);
    }
    String msg = this.year + "年" + this.month + "月";
    Attendperiod period = this.attendmothlyBO.loadAttendperiod(this.year, this.month);
    if (period == null) {
      addErrorInfo(msg + "的考勤数据不是封帐状态,不能解封!");
    } else if (period.getAttpStatus().intValue() == 2) {
      period.setAttpStatus(Integer.valueOf(0));
      this.attendmothlyBO.updateObject(period);
      addSuccessInfo(msg + "的考勤数据解封成功!");
    } else {
      addErrorInfo(msg + "的考勤数据不是封帐状态,不能解封!");
    }

    return "success";
  }
Пример #3
0
  public String applyAttendperiod() {
    if ((StringUtils.isEmpty(this.year)) || (StringUtils.isEmpty(this.month))) {
      return "success";
    }
    if (this.month.length() == 1) {
      this.month = ("0" + this.month);
    }
    String msg = this.year + "年" + this.month + "月";
    ExaminBoFactory factory = ExaminBoFactory.getInstance();
    IAttendmonthlyBO attendmothlyBO = factory.createAttendmonthlyBo();
    Attendperiod period = attendmothlyBO.loadAttendperiod(this.year, this.month);
    if (period == null) {
      addErrorInfo(msg + "的考勤数据不是初始化状态,不能进行封帐申请操作!");
    } else if (period.getAttpStatus().intValue() == 0) {
      period.setAttpStatus(Integer.valueOf(1));
      attendmothlyBO.updateObject(period);
      addSuccessInfo(msg + "的考勤数据封帐申请成功!");
    } else {
      addErrorInfo(msg + "的考勤数据不是初始化状态,不能进行封帐申请操作!");
    }

    return "success";
  }