|
|
@@ -211,10 +211,47 @@ public class SwdlServiceImpl extends GenericProvider implements SwdlService {
|
|
|
|
|
|
Map paramMap= getAttendanceMap(map);
|
|
|
List<Map<String,Object>> list = updateDataTableDao.selectAttendanceData(paramMap);
|
|
|
- //int totalCount = updateDataTableDao.selectAttendanceDataCount(map);
|
|
|
+ int totalCount = updateDataTableDao.selectAttendanceDataCount(map);
|
|
|
APIPageList<Map<String,Object>> pageList = getAPIPageList(list);
|
|
|
APIPageResult pageResult = new APIPageResult();
|
|
|
- pageResult.setTotalCount(100);
|
|
|
+ pageResult.setTotalCount(totalCount);
|
|
|
+ pageResult.setLimit(limit);
|
|
|
+ pageResult.setPage(pageNo);
|
|
|
+ pageList.setPageResult(pageResult);
|
|
|
+ result.setData(pageList);
|
|
|
+ } catch (Exception e) {
|
|
|
+ setExceptionResult(result, StateEnum.ERROR_FORM_BO.getCode(), I18nUtil.getMessage(StateEnum.ERROR_FORM_BO.getCode()+""), e);
|
|
|
+ }
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public APIResult queryClassAdjustmentList(
|
|
|
+ @ApiParam(name = "request", value = "传入查询请求map对象", required = true)
|
|
|
+ @RequestBody(required = true) Map<String,Object> map) throws Exception {
|
|
|
+ APIResult<Object> result = new APIResult<>();
|
|
|
+ try {
|
|
|
+ int pageNo = Integer.parseInt(map.get("pageNo").toString());
|
|
|
+ int limit = Integer.parseInt(map.get("limit").toString());
|
|
|
+ int startPage = limit*(pageNo-1);
|
|
|
+ map.put("startPage",startPage);
|
|
|
+ HashMap<String, Object> stringObjectHashMap = new HashMap<>();
|
|
|
+ if (BeanUtils.isNotEmpty(map)) {
|
|
|
+ stringObjectHashMap.put("pageNo", map.get("pageNo"));
|
|
|
+ stringObjectHashMap.put("limit", map.get("limit"));
|
|
|
+ stringObjectHashMap.put("startPage", map.get("startPage"));
|
|
|
+ if(BeanUtils.isNotEmpty(map.get("param"))){
|
|
|
+ Map param = (Map) map.get("param");
|
|
|
+ String userId = (String) param.get("userId");
|
|
|
+ stringObjectHashMap.put("userId",userId);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ List<Map<String,Object>> list = updateDataTableDao.selectClassAdjustmentList(stringObjectHashMap);
|
|
|
+ int totalCount = updateDataTableDao.selectClassAdjustmentListCount(stringObjectHashMap);
|
|
|
+ APIPageList<Map<String,Object>> pageList = getAPIPageList(list);
|
|
|
+ APIPageResult pageResult = new APIPageResult();
|
|
|
+ pageResult.setTotalCount(totalCount);
|
|
|
pageResult.setLimit(limit);
|
|
|
pageResult.setPage(pageNo);
|
|
|
pageList.setPageResult(pageResult);
|