|
@@ -198,6 +198,59 @@ public class SwdlServiceImpl extends GenericProvider implements SwdlService {
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public APIResult queryAttendanceData(
|
|
|
|
|
+ @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);
|
|
|
|
|
+
|
|
|
|
|
+ Map paramMap= getAttendanceMap(map);
|
|
|
|
|
+ List<Map<String,Object>> list = updateDataTableDao.selectAttendanceData(paramMap);
|
|
|
|
|
+ //int totalCount = updateDataTableDao.selectAttendanceDataCount(map);
|
|
|
|
|
+ APIPageList<Map<String,Object>> pageList = getAPIPageList(list);
|
|
|
|
|
+ APIPageResult pageResult = new APIPageResult();
|
|
|
|
|
+ pageResult.setTotalCount(100);
|
|
|
|
|
+ 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;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ private Map getAttendanceMap(Map<String, Object> map) {
|
|
|
|
|
+ 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"));
|
|
|
|
|
+ stringObjectHashMap.put("locationId", getDiDian());
|
|
|
|
|
+ if(BeanUtils.isNotEmpty(map.get("param"))){
|
|
|
|
|
+ Map param = (Map) map.get("param");
|
|
|
|
|
+ String buMen = (String) param.get("buMen");
|
|
|
|
|
+ if(BeanUtils.isNotEmpty(param.get("locationId"))){
|
|
|
|
|
+ stringObjectHashMap.put("locationId", param.get("locationId"));
|
|
|
|
|
+ }else{
|
|
|
|
|
+ stringObjectHashMap.put("locationId", getDiDian());
|
|
|
|
|
+ }
|
|
|
|
|
+ if(BeanUtils.isNotEmpty(param.get("yongHuId"))){
|
|
|
|
|
+ stringObjectHashMap.put("yongHuId", String.join(",", (ArrayList)param.get("yongHuId")));
|
|
|
|
|
+ }
|
|
|
|
|
+ stringObjectHashMap.put("startDate",param.get("kaishiJianShiJ^S"));
|
|
|
|
|
+ stringObjectHashMap.put("endDate",param.get("kaishiJianShiJ^E"));
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return stringObjectHashMap;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
//获取当前用户地点,前端可以不用传
|
|
//获取当前用户地点,前端可以不用传
|
|
|
private String getDiDian() {
|
|
private String getDiDian() {
|
|
|
IPartyPositionService partyPositionService = AppUtil.getBean(IPartyPositionService.class);
|
|
IPartyPositionService partyPositionService = AppUtil.getBean(IPartyPositionService.class);
|