最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Java實(shí)戰(zhàn)之實(shí)現(xiàn)OA辦公管理系統(tǒng)

 更新時(shí)間:2022年02月15日 13:54:13   作者:qq_1334611189  
這篇文章主要介紹了如何通過Java實(shí)現(xiàn)OA辦公管理系統(tǒng),文章采用到了JSP、JQuery、Ajax等技術(shù),文中的示例代碼講解詳細(xì),感興趣的小伙伴可以了解一下

介紹

環(huán)境配置:

Jdk1.8 + Tomcat8.5 + mysql + Eclispe(IntelliJ IDEA,Eclispe,MyEclispe,Sts都支持)

項(xiàng)目技術(shù):

JSP +Spring + SpringMVC + MyBatis + html+ css + JavaScript + JQuery + Ajax + layui+ maven等等

效果圖

核心代碼

用戶管理控制層

/**
 * @author yy
 */
 
@Controller
@RequestMapping("/user")
public class UserController extends BaseController{
 
    private String prefix = "system/user/";
 
    @Autowired
    IUserService iUserService;
    @Autowired
    IRoleService iRoleService;
    @Autowired
    IDeptService iDeptService;
    @Autowired
    IPositionService iPositionService;
 
    @Autowired
    private SysPasswordService passwordService;
 
 
 
    /**
     *
     * @描述 跳轉(zhuǎn)到用戶頁面
     *
     * @date 2018/9/16 10:54
     */
    @RequestMapping("/tolist")
    @RequiresPermissions("user:list")
    public String toUserList()
    {
        return prefix + "user";
    }
 
 
    /**
     * @描述 用戶數(shù)據(jù)
     * @date 2018/9/15 12:30
     */
    @RequestMapping("/tableList")
    @ResponseBody
    public TableDataInfo list(User user)
    {
        startPage();
        List<User> users = iUserService.selectByUser(user);
 
        return getDataTable(users);
    }
 
 
    /**
     * 編輯用戶 system/user/edit/20180914-1
     */
    @RequiresPermissions("user:update")
    @RequestMapping("/edit/{userId}")
    public String edit(@PathVariable("userId") String userId, Model model)
    {
        // 個(gè)人信息
        User user = iUserService.selectByPrimaryKey(userId);
        Map<String, Object> role_post_dept = getRole_Post_Dept();
        model.addAttribute("depts", role_post_dept.get("dept"));
        model.addAttribute("roles", role_post_dept.get("role"));
        model.addAttribute("positions", role_post_dept.get("position"));
        model.addAttribute("user", user);
        return prefix + "edit";
    }
 
    /**
     *
     * @描述 保存用戶
     *
     * @date 2018/9/15 18:53
     */
    @PostMapping("/editSave")
    @RequiresPermissions("user:update")
    @Operlog(modal = "用戶管理", descr = "修改用戶信息")
    @ResponseBody
    public AjaxResult save(User user)
    {
        if (StringUtils.isNotNull(user.getUid()) && User.isBoss(user.getUid()))
        {
            return error("不允許修改管理員用戶");
        }
        if(user.getPwd()!=null){
            user.setSalt(ShiroUtils.randomSalt());
            SimpleHash md5 = new SimpleHash("MD5", user.getPwd(), user.getSalt(), 1024);
            user.setPwd(md5.toHex());
        }
        return result(iUserService.updateByPrimaryKeySelective(user));
    }
 
 
    /**
     * @描述 添加用戶頁面
     * @date 2018/9/15 18:46
     */
    @RequestMapping("/toAdd")
    @RequiresPermissions("user:add")
    public String toaddUser(Model model)
    {
        Map<String, Object> role_post_dept = getRole_Post_Dept();
        model.addAttribute("depts", role_post_dept.get("dept"));
        model.addAttribute("roles", role_post_dept.get("role"));
        model.addAttribute("positions", role_post_dept.get("position"));
        return prefix + "add";
    }
 
    /**
     *
     * @描述 添加用戶
     *
     * @date 2018/9/15 20:40
     */
 
    @RequestMapping("/addSave")
    @RequiresPermissions("user:add")
    @Operlog(modal = "用戶管理", descr = "添加用戶")
    @ResponseBody
    public AjaxResult addUser(User user)
    {
        user.setSalt(ShiroUtils.randomSalt());
        SimpleHash md5 = new SimpleHash("MD5", user.getPwd(), user.getSalt(), 1024);
        user.setPwd(md5.toHex());
        user.setAvatar(CsEnum.avatar.USER_AVATAR.getValue());
        user.setCreateTime(new Date());
        return result(iUserService.insertSelective(user));
    }
 
    /**
     *
     * @描述 批量刪除
     *
     * @date 2018/9/16 9:31
     */
    @RequestMapping("/del")
    @RequiresPermissions("user:del")
    @Operlog(modal = "用戶模塊", descr = "刪除用戶")
    @ResponseBody
    public AjaxResult delByUserIds(String[] ids)
    {
        try
        {
            int i = iUserService.deleteByPrimaryKeys(ids);
        }
        catch (Exception e)
        {
            return error(e.getMessage());
        }
        return success();
    }
 
    /**
     *
     * @描述 編輯密碼修改頁面
     *
     * @date 2018/9/16 10:25
     */
    @RequestMapping("/resetPwd/{userId}")
    @RequiresPermissions("user:update")
    public String editPwd(@PathVariable("userId") String id, Model model)
    {
        model.addAttribute("uid", id);
        return prefix + "resetPwd";
    }
 
 
    /**
     *
     * @描述 密碼修改
     *
     * @date 2018/9/16 10:42
     */
 
    @RequestMapping("/resetPwd")
    @RequiresPermissions("user:update")
    @Operlog(modal = "用戶模塊", descr = "修改密碼")
    @ResponseBody
    public AjaxResult resetPwd(User user)
    {
        return result(iUserService.resrtPwd(user));
    }
 
    /**
     * 校驗(yàn)手機(jī)號(hào)碼
     */
    @PostMapping("/checkPhoneUnique")
    @ResponseBody
    public String checkPhoneUnique(User user)
    {
        String uniqueFlag = "0";
        if (user != null)
        {
            uniqueFlag = iUserService.checkPhoneUnique(user);
        }
        return uniqueFlag;
    }
 
    /**
     * 校驗(yàn)email郵箱
     */
    @PostMapping("/checkEmailUnique")
    @ResponseBody
    public String checkEmailUnique(User user)
    {
        String uniqueFlag = "0";
        if (user != null)
        {
            uniqueFlag = iUserService.checkEmailUnique(user);
        }
        return uniqueFlag;
    }
 
 
    /**
     *
     * @描述: 校驗(yàn)登錄名唯一性
     *
     * @params:
     * @return:
     * @date: 2018/10/2 17:06
     */
    @PostMapping("/checkLoginNameUnique")
    @ResponseBody
    public String checkLoginNameUnique(User user)
    {
        String uniqueFlag = "0";
        if (user != null)
        {
            uniqueFlag = iUserService.checkLoginNameUnique(user);
        }
        return uniqueFlag;
    }
 
 
    public Map<String, Object> getRole_Post_Dept()
    {
        Map<String, Object> map = new HashMap<>();
//        角色
        List<Role> roles = iRoleService.selectRoleList(new Role());
//        部門信息
        List<Dept> depts = iDeptService.selectDeptList(new Dept());
//        崗位
        List<Position> positions = iPositionService.selectPositionList(new Position());
        map.put("role", roles);
        map.put("dept", depts);
        map.put("position", positions);
 
        return map;
    }
 
 
    /**
     * 用戶個(gè)人信息查看頁面
     */
    @RequestMapping("/myMsg")
    public String ToMyMsg(Model model, HttpServletRequest request)
    {
        User user = iUserService.selectByPrimaryKey(getUserId());
        model.addAttribute("user", user);
        model.addAttribute("loginIp", HttpHeaderUtil.getIpAddr(request));
        return prefix + "profile/msg";
    }
 
 
    /**
     * 密碼修改頁面
     */
    @RequestMapping("/resetMyPwd")
    public String toResetPwd(Model model)
    {
        User user = iUserService.selectByPrimaryKey(getUserId());
        model.addAttribute("user", user);
        return prefix + "profile/resetPwd";
    }
 
    /**
     * 密碼修改保存
     */
    @RequestMapping("/updateMyPwdSave")
    @ResponseBody
    @RequiresPermissions("user:update")
    @Operlog(modal = "個(gè)人信息", descr = "修改密碼")
    public AjaxResult updateMyPwdSave(String password)
    {
        User user = new User();
        user.setSalt(ShiroUtils.randomSalt());
        SimpleHash md5 = new SimpleHash("MD5", password, user.getSalt(), 1024);
        user.setPwd(md5.toHex());
        user.setUid(getUserId());
        int i = iUserService.updateByPrimaryKeySelective(user);
        if (i > 0)
        {
            //更新shiro中的信息
            ShiroUtils.reloadUser(iUserService.selectByPrimaryKey(getUserId()));
            return success();
        }
        return error();
    }
 
    /**
     * 編輯用戶頭像修改
     */
    @RequestMapping("/updateAvatar")
    public String toupdateAvatar(Model model)
    {
        model.addAttribute("user", getUser());
        return prefix + "profile/avatar";
    }
 
    /**
     * 修改保存用戶頭像
     */
    @RequestMapping("/updateAvatarSave")
    @RequiresPermissions("user:update")
    @Operlog(modal = "個(gè)人信息", descr = "修改頭像")
    @ResponseBody
    public AjaxResult toupdateAvatar(MultipartFile file)
    {
        try
        {
            String imgPath = UploadFile.uploadUserImg(file);
            if (StringUtils.isEmpty(imgPath))
            {
                return error("圖片上傳失敗,稍后再試!");
            }
 
            User user = new User();
            user.setUid(getUserId());
            user.setAvatar(imgPath);
            int i = iUserService.updateByPrimaryKeySelective(user);
            if (i > 0)
            {
                ShiroUtils.reloadUser(iUserService.selectByPrimaryKey(getUserId()));
            }
            return result(i);
        }
        catch (IOException e)
        {
            return error();
        }
        catch (FileSizeException e)
        {
            //文件過大
            return error(e.getMsg());
        }
        catch (FileNameLengthException e)
        {
            //文件名字超長(zhǎng)
            return error(e.getMsg());
        }
    }
 
 
    /**
     * 校驗(yàn)密碼和原來密碼是否相同
     */
    @RequestMapping("/checkPassword")
    @ResponseBody
    public boolean checkPassword(String password)
    {
        //加密后與數(shù)據(jù)庫密碼比較
        User user = getUser();
        SimpleHash md5 = new SimpleHash("MD5", password, user.getSalt(), 1024);
        String oldPassword = md5.toHex();
        String pwd = getPwd();
        if (pwd.equals(oldPassword))
        {
            return true;
        }
        return false;
    }
 
 
}

部門管理控制層

/**
 * @author yy
 */
@Controller
@RequestMapping("/dept")
public class DeptController extends BaseController{
 
    private String prefix = "system/dept/";
 
    @Autowired
    IDeptService iDeptService;
 
    @Autowired
    IUserService iUserService;
 
 
    /**
     *
     * @描述 頁面跳轉(zhuǎn)到部門
     *
     * @date 2018/9/16 10:59
     */
 
    @RequestMapping("/tolist")
    @RequiresPermissions("dept:list")
    public String tolist()
    {
        return prefix + "dept";
    }
 
 
    /**
     *
     * @描述 ajax請(qǐng)求的所有部門
     *
     * @date 2018/9/16 10:48
     */
    @RequestMapping("/ajaxlist")
    @ResponseBody
    public List<Dept> list(Dept dept)
    {
        List<Dept> depts = iDeptService.selectDeptList(dept);
        return depts;
    }
 
    /**
     *
     * @描述 部門列表頁
     *
     * @date 2018/9/16 10:52
     */
    @RequestMapping("/tableList")
    @ResponseBody
    public TableDataInfo listPag(Dept dept)
    {
        //開啟分頁
        startPage();
        List<Dept> depts = iDeptService.selectDeptList(dept);
        return getDataTable(depts);
    }
 
 
    /**
     *
     * @描述 新增頁面
     *
     * @date 2018/9/16 11:37
     */
    @RequiresPermissions("dept:add")
    @RequestMapping("/toAdd")
    public String toAdd(Model model)
    {
        List<User> users = iUserService.selectByUser(new User());
        model.addAttribute("users", users);
        return prefix + "add";
    }
 
 
    /**
     *
     * @描述: 查詢所有部門下的所有用戶 用戶歸類 樹狀數(shù)據(jù)
     *
     * @date: 2018/9/27 11:25
     */
    @RequestMapping("/getDeptAndUserTreeData")
    @ResponseBody
    public List<Object> DeptAndUserTreeData()
    {
        List<Dept> depts = iDeptService.selectDeptAndUser();
 
        List<User> users=new ArrayList<>();
        LinkedList<Object> deptList = new LinkedList<>();
        for (Dept dept : depts)
        {
            Map<String, Object> deptMap = new HashMap();
            deptMap.put("name", dept.getDeptName());
            deptMap.put("id", null);
            users = dept.getUsers();
            LinkedList<Object> userlist = new LinkedList<>();
            for (User user : users)
            {
                Map<String, Object> userMap = new HashMap();
                userMap.put("name",user.getName());
                userMap.put("id",user.getUid());
                userMap.put("icon","/img/timg.jpg");
                userlist.add(userMap);
            }
            deptMap.put("children",userlist);
            deptList.add(deptMap);
        }
 
        return deptList;
    }
 
 
    /**
     *
     * @描述 批量刪除
     *
     * @date 2018/9/16 11:53
     */
    @RequestMapping("/del")
    @RequiresPermissions("dept:del")
    @ResponseBody
    @Operlog(modal = "部門管理",descr = "刪除部門")
    public AjaxResult del(String[] ids)
    {
        try
        {
            iDeptService.deleteByPrimaryKeys(ids);
        }
        catch (Exception e)
        {
            return error(e.getMessage());
        }
        return success();
    }
 
 
    /**
     *
     * @描述 執(zhí)行保存操作
     *
     * @date 2018/9/16 11:54
     */
 
    @RequestMapping("/addSave")
    @Operlog(modal = "部門管理",descr = "添加部門")
    @RequiresPermissions("dept:add")
    @ResponseBody
    public AjaxResult addDept(Dept dept)
    {
        dept.setCreateTime(new Date());
        return  result(iDeptService.insertSelective(dept));
    }
 
 
    /**
     *
     * @描述 編輯修改頁面
     *
     * @date 2018/9/16 14:06
     */
    @RequestMapping("/edit/{id}")
    @RequiresPermissions("dept:update")
    public String edit(@PathVariable("id") String id, Model model)
    {
        Dept dept = iDeptService.selectByPrimaryKey(id);
        List<User> users = iUserService.selectByUser(new User());
        model.addAttribute("users", users);
 
        model.addAttribute("Dept", dept);
        return prefix + "edit";
 
    }
 
    /**
     *
     * @描述 修改保存
     *
     * @date 2018/9/16 16:12
     */
    @RequestMapping("/editSave")
    @RequiresPermissions("dept:update")
    @Operlog(modal = "部門管理",descr = "修改信息")
    @ResponseBody
    public AjaxResult save(Dept dept)
    {
        int i = 0;
        try
        {
            i = iDeptService.updateByPrimaryKeySelective(dept);
        }
        catch (Exception e)
        {
            return error(e.getMessage());
        }
        return result(i);
    }
 
 
    /**
     * 校驗(yàn)部門名稱
     */
    @PostMapping("/checkDeptNameUnique")
    @ResponseBody
    public String checkDeptNameUnique(Dept dept)
    {
        String uniqueFlag = "0";
        if (dept != null)
        {
            uniqueFlag = iDeptService.checkDeptNameUnique(dept);
        }
        return uniqueFlag;
    }
}

角色管理控制層

/**
 * @author yy
 */
@Controller
@RequestMapping("/role")
public class RoleController extends BaseController{
    private String prefix = "system/role/";
 
 
    @Autowired
    IUserService iUserService;
 
    @Autowired
    IRoleService iRoleService;
 
    @Autowired
    IPermissionService iPermissionService;
 
    /**
     *
     * @描述 頁面跳轉(zhuǎn)
     *
     * @date 2018/9/16 10:59
     */
    @RequestMapping("/tolist")
    @RequiresPermissions("role:list")
    public String tolist()
    {
        return prefix + "role";
    }
 
 
    /**
     *
     * @描述 ajax請(qǐng)求所有
     *
     * @date 2018/9/16 10:48
     */
    @RequestMapping("/ajaxlist")
    @ResponseBody
    public List<Role> list(Role role)
    {
        List<Role> roles = iRoleService.selectRoleList(role);
        return roles;
    }
 
    /**
     *
     * @描述 列表
     *
     * @date 2018/9/16 10:52
     */
    @RequestMapping("/tableList")
    @ResponseBody
    public TableDataInfo listPag(Role role)
    {
        //開啟分頁
        startPage();
        List<Role> roles = iRoleService.selectRoleList(role);
        return getDataTable(roles);
    }
 
 
    /**
     *
     * @描述 新增頁面
     *
     * @date 2018/9/16 11:37
     */
    @RequestMapping("/toAdd")
    @RequiresPermissions("role:add")
    public String toAdd(Model model)
    {
        return prefix + "add";
    }
 
 
    /**
     *
     * @描述 批量刪除
     *
     * @date 2018/9/16 11:53
     */
    @RequestMapping("/del")
    @RequiresPermissions("role:del")
    @Operlog(modal = "角色管理",descr = "刪除角色")
    @ResponseBody
    public AjaxResult del(Integer[] ids)
    {
        try
        {
            iRoleService.deleteByPrimaryKeys(ids);
        }
        catch (Exception e)
        {
            return error(e.getMessage());
        }
        return success();
    }
 
 
    /**
     *
     * @描述 添加保存
     *
     * @date 2018/9/16 11:54
     */
 
    @RequestMapping("/addSave")
    @RequiresPermissions("role:update")
    @Operlog(modal = "角色管理",descr = "添加角色")
    @ResponseBody
    public AjaxResult addRole(Role role, Integer[] ids)
    {
        role.setCreateTime(new Date());
        int insert = 0;
        try
        {
            if (StringUtils.isEmpty(ids))
            {
                ids = new Integer[0];
            }
            insert = iRoleService.insert(role, ids);
        }
        catch (Exception e)
        {
            return error(e.getMessage());
        }
        //清空緩存
        ShiroUtils.clearCachedAuthorizationInfo();
        return  result(insert);
    }
 
 
    /**
     *
     * @描述: 根據(jù)ID 獲取u他的所有權(quán)限 做回顯
     *
     * @params: roleId 角色I(xiàn)d
     * @return:
     * @date: 2018/9/27 14:04
     */
    @RequestMapping("/selectById/{roleId}")
    @ResponseBody
    public Role selectById(@PathVariable("roleId") Integer roleId)
    {
        Role role = iRoleService.selectByPrimaryKey(roleId);
        return role;
    }
 
 
    /**
     *
     * @描述 編輯修改頁面
     *
     * @date 2018/9/16 14:06
     */
    @RequestMapping("/edit/{id}")
    @RequiresPermissions("role:update")
    public String edit(@PathVariable("id") Integer id, Model model)
    {
        Role role = iRoleService.selectByPrimaryKey(id);
        model.addAttribute("Role", role);
        return prefix + "edit";
    }
 
    /**
     *
     * @描述 編輯修改權(quán)限頁面
     *
     * @date 2018/9/16 14:06
     */
    @RequestMapping("/editPower/{id}")
    @RequiresPermissions("role:update")
    public String editPower(@PathVariable("id") Integer id, Model model)
    {
        Role role = iRoleService.selectByPrimaryKey(id);
        model.addAttribute("Role", role);
        return prefix + "editPower";
    }
 
 
    /**
     *
     * @描述 修改角色信息保存
     *
     * @date 2018/9/16 16:12
     */
    @RequestMapping("/editSave")
    @RequiresPermissions("role:update")
    @Operlog(modal = "角色管理",descr = "修改角色信息")
    @ResponseBody
    public AjaxResult save(Role role)
    {
        int i = 0;
        try
        {
            i = iRoleService.updateByPrimaryKeySelective(role);
        }
        catch (Exception e)
        {
            return error(e.getMessage());
        }
        return result(i);
    }
 
 
    /**
     *
     * @描述 修改角色權(quán)限信息保存
     *
     * @date 2018/9/16 16:12
     */
    @RequestMapping("/editPowerSave")
    @RequiresPermissions("role:update")
    @Operlog(modal = "角色管理",descr = "修改角色權(quán)限")
    @ResponseBody
    public AjaxResult editPowerSave(Role role, Integer[] ids)
    {
        int i = 0;
        try
        {
            if (StringUtils.isEmpty(ids))
            {
                ids = new Integer[0];
            }
            i = iRoleService.updateByPrimaryKeyPowerSelective(role, ids);
        }
        catch (Exception e)
        {
            return error(e.getMessage());
        }
        //清空緩存
        ShiroUtils.clearCachedAuthorizationInfo();
        //如果用戶正在修改的角色id 是當(dāng)前用戶的角色id 則刷新 subject的User信息
        if (role.getRoleId().equals(getRoleId()))
        {
            ShiroUtils.reloadUser(iUserService.selectByPrimaryKey(getUserId()));
        }
        return result(i);
    }
 
 
    /**
     * 校驗(yàn)名稱唯一
     */
    @PostMapping("/checkRoleNameUnique")
    @ResponseBody
    public String checkDeptNameUnique(Role role)
    {
        String uniqueFlag = "0";
        if (role != null)
        {
            uniqueFlag = iRoleService.checkRoleNameUnique(role);
        }
        return uniqueFlag;
    }
}

會(huì)議室管理控制層

/**
 * @author yy
 */
@Controller
@RequestMapping("/room")
public class MeetRoomController extends BaseController{
    private Logger log = LoggerFactory.getLogger(this.getClass());
    private String prefix = "system/room/";
 
 
    @Autowired
    private IMeetingRoomService iMeetingRoomService;
 
    /**
     *
     * @描述 頁面跳轉(zhuǎn)
     *
     * @date 2018/9/16 10:59
     */
    @RequestMapping("/tolist")
    public String tolist()
    {
        return prefix + "room";
    }
 
 
    /**
     *
     * @描述 ajax請(qǐng)求
     *
     * @date 2018/9/16 10:48
     */
    @RequestMapping("/ajaxlist")
    @ResponseBody
    public List<MeetingRoom> list(MeetingRoom meetingRoom)
    {
        List<MeetingRoom> meetingRooms = iMeetingRoomService.selectMeetRoomList(meetingRoom);
        return meetingRooms;
    }
 
    /**
     *
     * @描述 列表頁
     *
     * @date 2018/9/16 10:52
     */
    @RequestMapping("/tableList")
    @ResponseBody
    public TableDataInfo listPag(MeetingRoom meetingRoom)
    {
        //開啟分頁
        startPage();
        List<MeetingRoom> meetingRooms = iMeetingRoomService.selectMeetRoomList(meetingRoom);
        return getDataTable(meetingRooms);
    }
 
 
    /**
     *
     * @描述 新增頁面
     *
     * @date 2018/9/16 11:37
     */
    @RequestMapping("/toAdd")
    @RequiresPermissions("meetRoom:list")
    public String toAdd()
    {
        return prefix + "add";
    }
 
 
    /**
     *
     * @描述 批量刪除
     *
     * @date 2018/9/16 11:53
     */
    @RequestMapping("/del")
    @RequiresPermissions("meetRoom:del")
    @Operlog(modal = "會(huì)議室管理",descr = "刪除會(huì)議室")
    @ResponseBody
    public AjaxResult del(Integer[] ids)
    {
        try
        {
            iMeetingRoomService.deleteByPrimaryKeys(ids);
        }
        catch (Exception e)
        {
            return error(e.getMessage());
        }
        return success();
    }
 
 
    /**
     *
     * @描述 執(zhí)行保存操作
     *
     * @date 2018/9/16 11:54
     */
 
    @RequestMapping("/addSave")
    @RequiresPermissions("meetRoom:add")
    @Operlog(modal = "會(huì)議室管理",descr = "添加會(huì)議室")
    @ResponseBody
    public AjaxResult addMeetingRoom(MeetingRoom meetingRoom)
    {
        meetingRoom.setCreateTime(new Date());
        return result(iMeetingRoomService.insertSelective(meetingRoom));
    }
 
 
    /**
     *
     * @描述 編輯修改頁面
     *
     * @date 2018/9/16 14:06
     */
    @RequestMapping("/edit/{id}")
    @RequiresPermissions("meetRoom:update")
    public String edit(@PathVariable("id") Integer id, Model model)
    {
        MeetingRoom meetingRoom = iMeetingRoomService.selectByPrimaryKey(id);
        model.addAttribute("room", meetingRoom);
        return prefix + "edit";
 
    }
 
    /**
     *
     * @描述 修改保存
     *
     * @date 2018/9/16 16:12
     */
    @RequestMapping("/editSave")
    @RequiresPermissions("meetRoom:update")
    @Operlog(modal = "會(huì)議室管理",descr = "修改會(huì)議室")
    @ResponseBody
    public AjaxResult save(MeetingRoom meetingRoom)
    {
        return result(iMeetingRoomService.updateByPrimaryKeySelective(meetingRoom));
    }
 
 
    /**
     * 校驗(yàn)部門名稱
     */
    @PostMapping("/checkRoomNameUnique")
    @ResponseBody
    public String checkMeetingRoomNameUnique(MeetingRoom meetingRoom)
    {
        String uniqueFlag = "0";
        if (meetingRoom != null)
        {
            uniqueFlag = iMeetingRoomService.checkRoomNameUnique(meetingRoom);
        }
        return uniqueFlag;
    }
}

以上就是Java實(shí)戰(zhàn)之實(shí)現(xiàn)OA辦公管理系統(tǒng)的詳細(xì)內(nèi)容,更多關(guān)于Java辦公管理系統(tǒng)的資料請(qǐng)關(guān)注腳本之家其它相關(guān)文章!

相關(guān)文章

  • java讀取郵件excel附件的方法過程示例

    java讀取郵件excel附件的方法過程示例

    這篇文章主要介紹了java讀取郵件excel附件的方法過程示例,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪
    2023-10-10
  • Spring Boot 與 kotlin 使用Thymeleaf模板引擎渲染web視圖的方法

    Spring Boot 與 kotlin 使用Thymeleaf模板引擎渲染web視圖的方法

    這篇文章主要介紹了Spring Boot 與 kotlin 使用Thymeleaf模板引擎渲染web視圖的方法,本文給大家介紹的非常詳細(xì),具有參考借鑒價(jià)值,需要的朋友可以參考下
    2018-01-01
  • springboot如何使用自定義的aspect

    springboot如何使用自定義的aspect

    AOP面向切面編程在Spring Boot中實(shí)現(xiàn),通過在方法調(diào)用前后加入固定邏輯,實(shí)現(xiàn)橫切關(guān)注點(diǎn)的模塊化,主要涉及概念有:切面(Aspect)、連接點(diǎn)(Jointpoint)、通知(Advice)、切入點(diǎn)(Pointcut)、引入(Introduction)、目標(biāo)對(duì)象(Targetobject)
    2024-11-11
  • 詳解Java?Unsafe如何花式操作內(nèi)存

    詳解Java?Unsafe如何花式操作內(nèi)存

    C++可以動(dòng)態(tài)的分類內(nèi)存,而java并不能這樣,是不是java就不能操作內(nèi)存呢,其實(shí)是有其他辦法可以操作內(nèi)存的,下面就一起看看Unsafe是如何花式操作內(nèi)存的吧
    2023-08-08
  • SpringBoot項(xiàng)目打成war和jar的區(qū)別說明

    SpringBoot項(xiàng)目打成war和jar的區(qū)別說明

    這篇文章主要介紹了SpringBoot項(xiàng)目打成war和jar的區(qū)別說明,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2022-06-06
  • SpringBoot同時(shí)啟動(dòng)不同端口圖示解析

    SpringBoot同時(shí)啟動(dòng)不同端口圖示解析

    這篇文章主要介紹了SpringBoot同時(shí)啟動(dòng)不同端口圖示解析,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友可以參考下
    2020-02-02
  • springboot整合Dubbo與Feign的實(shí)現(xiàn)?(無注冊(cè)中心)

    springboot整合Dubbo與Feign的實(shí)現(xiàn)?(無注冊(cè)中心)

    本文主要介紹了springboot整合Dubbo與Feign的實(shí)現(xiàn),文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧
    2022-04-04
  • java 中file.encoding的設(shè)置詳解

    java 中file.encoding的設(shè)置詳解

    這篇文章主要介紹了java 中file.encoding的設(shè)置詳解的相關(guān)資料,需要的朋友可以參考下
    2017-04-04
  • log4j2的異步使用及添加自定義參數(shù)方式

    log4j2的異步使用及添加自定義參數(shù)方式

    這篇文章主要介紹了log4j2的異步使用及添加自定義參數(shù)方式,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2021-12-12
  • RestTemplate如何添加請(qǐng)求頭headers和請(qǐng)求體body

    RestTemplate如何添加請(qǐng)求頭headers和請(qǐng)求體body

    這篇文章主要介紹了RestTemplate如何添加請(qǐng)求頭headers和請(qǐng)求體body問題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2023-07-07

最新評(píng)論

安宁市| 比如县| 定日县| 富蕴县| 兴隆县| 宜州市| 民丰县| 吉隆县| 平乐县| 乌拉特后旗| 名山县| 巴彦县| 民丰县| 和林格尔县| 玛纳斯县| 黑水县| 邳州市| 昭平县| 灵丘县| 习水县| 北宁市| 南昌县| 那曲县| 郴州市| 信宜市| 蓬安县| 呼图壁县| 周宁县| 玉山县| 高邮市| 罗平县| 蕲春县| 信丰县| 东源县| 财经| 上杭县| 嘉兴市| 赞皇县| 潞城市| 聂拉木县| 宿松县|