首页>代码>spring+spring mvc+mybatis开发java医院HR人事管理系统(加强版本+ shiro)>/HR/src/main/java/edu/hebeu/controller/AttendanceController.java
package edu.hebeu.controller;

import java.util.List;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import edu.hebeu.entity.Attendance;
import edu.hebeu.security.PermissionSign;
import edu.hebeu.service.AttendanceService;

@Controller
@RequestMapping("/attendance")
public class AttendanceController {

	@Autowired
	private AttendanceService attendanceService;
	
	@RequestMapping("/addStart.do")
	public String addStart(Integer employeeNumber){
		attendanceService.addStart(employeeNumber);
		return "welcome";
	}
	
	@RequestMapping("/addEnd.do")
	public String addEnd(Integer employeeNumber){
		attendanceService.addEnd(employeeNumber);
		return "welcome";
	}
	
	@RequestMapping("/list.do")
	@RequiresPermissions(value = PermissionSign.ATTENDANCE_LIST)
	public String selectList(Model model){
		List<Attendance> list = attendanceService.selectList();
		model.addAttribute("aList",list);
		return "admin/attendance_list";
	}
	
	@RequestMapping("/{employeeNumber}/oneself.do")
	public String select(Model model, @PathVariable Integer employeeNumber){
		List<Attendance> list = attendanceService.selectByEmployee(employeeNumber);
		model.addAttribute("aList",list);
		return "admin/oneself_attendance";
	}
}
最近下载更多
zolscy  LV24 2024年11月29日
TY0165  LV20 2024年6月25日
嘲讽脸  LV5 2024年5月15日
minjing123  LV8 2024年1月4日
小安同学  LV7 2023年12月7日
微信网友_6372890284232704  LV7 2023年8月30日
dowell_liu  LV1 2023年8月2日
哇塞塞哈哈哈  LV8 2023年5月4日
bibibi234  LV1 2023年4月4日
a562571298  LV8 2023年3月23日
最近浏览更多
zhihou  LV2 2月6日
AnthemLights  LV1 1月1日
11qsqsdqx 2024年12月26日
暂无贡献等级
zolscy  LV24 2024年11月29日
千里草1046 2024年11月21日
暂无贡献等级
杨秀益  LV1 2024年11月7日
krispeng  LV14 2024年8月29日
897258976  LV8 2024年8月29日
quartz  LV8 2024年7月1日
微信网友_5986558820093952  LV4 2024年6月29日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友