Ejemplo n.º 1
0
 @Override
 public DataResult getAuditAppraisalRecord(
     Appraisal appraisal, Map<String, Object> params, int pageIndex, int pageSize) {
   DataResult dataResult = new DataResult();
   SqlQueryParameter sqlQueryParameter = new SqlQueryParameter();
   if (pageIndex != -1) {
     sqlQueryParameter.setPageIndex(pageIndex);
     sqlQueryParameter.setPage(true);
   }
   if (pageSize != -1) {
     sqlQueryParameter.setPageSize(pageSize);
   }
   sqlQueryParameter.setParameter(appraisal);
   if (!CollectionUtils.isEmpty(params)) {
     sqlQueryParameter.getKeyValMap().putAll(params);
   }
   List<Appraisal> appraisalList = appraisalDao.getAuditAppraisalRecord(sqlQueryParameter);
   if (!CollectionUtils.isEmpty(appraisalList)) {
     List<Map<String, Object>> dataMap = new ArrayList<Map<String, Object>>();
     Map<String, Object> temp = null;
     for (Appraisal a : appraisalList) {
       temp = a.getPersistentState();
       temp.put("screateDate", DateUtil.dateToString(a.getCreateTime(), "yyyy年MM月dd日"));
       temp.put(
           "statusDisplay",
           SystemCacheUtil.getInstance()
               .getSystemStatusCache()
               .get("Status_" + StringUtil.getString(temp.get("status"))));
       dataMap.add(temp);
     }
     dataResult.setData(dataMap);
     dataResult.setTotal(sqlQueryParameter.getTotalRecord());
   }
   return dataResult;
 }
Ejemplo n.º 2
0
 @Override
 public DataResult getEmployeeRankingRecord(
     Map<String, Object> params, int pageIndex, int pageSize) {
   DataResult dataResult = new DataResult();
   SqlQueryParameter sqlQueryParameter = new SqlQueryParameter();
   if (pageIndex != -1) {
     sqlQueryParameter.setPageIndex(pageIndex);
     sqlQueryParameter.setPage(true);
   }
   if (pageSize != -1) {
     sqlQueryParameter.setPageSize(pageSize);
   }
   if (!CollectionUtils.isEmpty(params)) {
     sqlQueryParameter.getKeyValMap().putAll(params);
   }
   List<Map<String, Object>> dataMap = appraisalDao.getEmployeeRankingRecord(sqlQueryParameter);
   if (!CollectionUtils.isEmpty(dataMap)) {
     dataResult.setData(dataMap);
     dataResult.setTotal(sqlQueryParameter.getTotalRecord());
   }
   return dataResult;
 }