Example #1
0
  /** 处理记录导出 */
  public String exportOperatedList() {
    List<AlarmEntity> exportlist;
    UserInfo user = getCurrentUser();

    if (searchVO.getOrganization_id() == null || "".equals(searchVO.getOrganization_id())) {
      searchVO.setOrganization_id(user.getOrganizationID());
    }
    try {
      searchVO.setOperate_state("1"); // 已处理
      exportlist = this.service.getObjects("VehicleCheckManage.getVehicleCheckList", searchVO);
      for (AlarmEntity obj : exportlist) {
        // 处理类型
        if (Constants.VECHICLE_ILLEAGAL_USE.equals(obj.getOperate_type())) {
          obj.setOperate_type("公车私用");
        } else {
          obj.setOperate_type("正常使用");
        }
      }
    } catch (BusinessException e) {
      log.error("Export error:" + e.getMessage(), e);
      return ERROR;
    }
    String title = "异常用车处理记录";
    return exportList(title, "operatedExport", exportlist);
  }
Example #2
0
 /** 意见批量处理 */
 public void batchOperate() {
   // 用户信息
   UserInfo userInfo = getCurrentUser();
   HttpServletRequest request = getCurrentRequest();
   String ids = request.getParameter("ids");
   String desc = request.getParameter("desc");
   String type = request.getParameter("type");
   // 处理的告警参数
   AlarmEntity alarm = new AlarmEntity();
   alarm.setDeal_flag(Constants.ALARM_E_CODE); // 已处理
   alarm.setUser_id(userInfo.getUserID());
   alarm.setConfirm_time(DateUtil.formatDateToString(new Date(), "yyyy-MM-dd HH:mm:ss"));
   alarm.setIds(formatString(ids));
   alarm.setOpeerate_desc(desc);
   alarm.setOperate_type(type);
   try {
     this.service.update("VehicleCheckManage.updateAlarm", alarm);
   } catch (BusinessException e) {
     this.log.error("意见批量处理出错", e);
     this.printWriter("处理失败!");
   }
   this.printWriter("处理成功!");
 }