@ResponseBody @RequestMapping(value = "/page/list") public String findPageSign(SignVo vo) { List<Sign> list = signService.findPageSign(vo.convertPageMap()); vo.setRows(list); return JsonResp.asData(vo).toJson(); }
/** * 签退 * * @return json */ @ResponseBody @RequestMapping(value = "/out") public String signOut(Sign out) { User user = (User) SessionHelper.getUser(); Map<String, Object> map = new HashMap<String, Object>(); map.put("signUserId", user.getId()); Date d = new Date(); String startDate = DateUtil.format(DateUtil.yyyy_MM_dd, d); map.put("startDate", startDate); map.put("endDate", DateUtil.getDateStr(d, DateUtil.yyyy_MM_dd, Calendar.DATE, 1)); Sign sign = signService.findSignByToday(map); if (null != sign && !DateUtil.isDBDefaultDate(sign.getSignOutTime())) { return JsonResp.asEmpty().error("您已签退,请不要重复签退!").toJson(); } out.setSignOutTime(d); out.setSignUserId(user.getId()); signService.saveOrUpdateSelective(out); return JsonResp.asEmpty().toJson(); }