示例#1
0
  /**
   * 转换Map 处理记录
   *
   * @param list
   * @param totalCountDay
   * @param pageIndex
   * @return
   */
  public Map<String, Object> getOperatedPagination(
      List<AlarmEntity> list, int totalCount, String pageIndex, String rpNum) {
    List<Object> mapList = new ArrayList<Object>();
    Map<String, Object> mapData = new HashMap<String, Object>();
    for (int i = 0; i < list.size(); i++) {
      AlarmEntity alarm = list.get(i);
      Map<String, Object> cellMap = new LinkedHashMap<String, Object>();
      cellMap.put("id", alarm.getAlarm_id());
      cellMap.put(
          "cell",
          new Object[] {
            alarm.getAlarm_id(),
            alarm.getVehicle_code(),
            alarm.getVehicle_ln(),
            alarm.getDriver_name(),
            alarm.getDriver_tel(),
            alarm.getEffect_time(),
            alarm.getAlarm_time(),
            alarm.getAlarm_end_time(),
            alarm.getUse_time(),
            alarm.getMileage(),
            alarm.getOperate_type(),
            alarm.getOpeerate_desc(),
            alarm.getUser_name(),
            alarm.getConfirm_time(),
            alarm.getAlarm_id()
          });
      mapList.add(cellMap);
    }
    mapData.put("page", pageIndex); // 从前台获取当前第page页
    mapData.put("total", totalCount); // 从数据库获取总记录数
    mapData.put("rows", mapList);

    return mapData;
  }
示例#2
0
 /** 异常用车处理后指向下一条记录 */
 public void getNextRow() {
   String ret = "";
   try {
     List<AlarmEntity> list =
         this.service.getObjectsByPage("VehicleCheckManage.getVehicleCheckList", searchVO, 0, 1);
     if (list.size() > 0) {
       AlarmEntity info = list.get(0);
       ret = info.getAlarm_id() + "," + info.getVehicle_code() + "," + info.getVehicle_ln();
     }
   } catch (BusinessException e) {
     ret = "";
     this.log.error("异常用车处理后指向下一条记录出错", e);
   }
   this.printWriter(ret);
 }