基于javaweb+mysql的ssm+maven财务预算管理系统(java+ssm+jsp+mysql+layui+maven)

基于javaweb+mysql的ssm+maven财务预算管理系统(java+ssm+jsp+mysql+layui+maven)

私信源码获取及调试交流

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

基于javaweb的SSM+Maven财务预算管理系统(java+ssm+jsp+mysql+layui+maven)

一、项目简述 功能包括:实现公司对项目的管理。

二、项目运行 环境配置:

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

项目技术:

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


return ResultUtil.unSuccess();

}catch (Exception e){

return ResultUtil.error(e);

@RequestMapping("/delBill")

public Result del(int id){

try {

int num = billService.del(id);

if(num>0){

return ResultUtil.success("删除成功!",null);

}else {

return ResultUtil.unSuccess();

}catch (Exception e){

}catch (Exception e){

return ResultUtil.error(e);

@RequestMapping("/user/del/{id}")

public @ResponseBody Result deleteUser(@PathVariable String id){

try {

int num = userInfoService.delete(id);

if(num>0){

return ResultUtil.success();

}else {

return ResultUtil.unSuccess();


try {

int num = userInfoService.update(userInfo);

if(num>0){

return ResultUtil.success();

}else {

return ResultUtil.unSuccess();

}catch (Exception e){

return ResultUtil.error(e);

@RequestMapping("/user/del/{id}")

public @ResponseBody Result deleteUser(@PathVariable String id){

try {

int num = userInfoService.delete(id);

public UserInfo getUserInfo(UserInfo userInfo){

return userInfoService.getUserInfo(userInfo);

数据图形控制层:

@RestController

@RequestMapping("/bills")

public class BillController {

@Resource

private BillService billService;

/**

* 适用于统计图

* @param bill

public @ResponseBody Result getUsersByWhere(UserInfo userInfo, @PathVariable int pageNo, @PathVariable int pageSize, HttpSession session){

if ("".equals(userInfo.getHouseid())){

userInfo.setHouseid(null);

if (userInfo.getRoleid() == -1){

userInfo.setRoleid(Config.getSessionUser(session).getRoleid());

Utils.log(userInfo.toString());

PageModel model = new PageModel<>(pageNo,userInfo);

model.setPageSize(pageSize);

return userInfoService.getUsersByWhere(model);

@RequestMapping("/user/add")

public @ResponseBody Result addUser(UserInfo userInfo){

System.out.println(userInfo);


if(role != null){

return ResultUtil.success(role);

}else {

return ResultUtil.unSuccess();

}catch (Exception e){

return ResultUtil.error(e);

/**

* 登录时将用户信息加入cookie中

* @param response

*/

private void setCookieUser(HttpServletRequest request, HttpServletResponse response){

UserInfo user = getSessionUser(request.getSession());


public UserInfo setSessionUserInfo(UserInfo userInfo, HttpSession session){

List<Privilege> privileges = privilegeService.getPrivilegeByRoleid(userInfo.getRoleid());

userInfo.setPrivileges(privileges);

session.setAttribute(Config.CURRENT_USERNAME,userInfo);

return userInfo;

public UserInfo getUserInfo(UserInfo userInfo){

return userInfoService.getUserInfo(userInfo);

数据图形控制层:

@RestController

@RequestMapping("/bills")


bill = getHouseBill(bill,session);

System.out.println(bill);

PageModel model = new PageModel<>(pageNo,bill);

model.setPageSize(pageSize);

return billService.findByWhere(model);

@RequestMapping("/getBillsByUserid/{userid}/{pageNo}/{pageSize}/{year}/{month}")

public Result getBillsByUserid(@PathVariable Integer userid, @PathVariable int pageNo, @PathVariable int pageSize, @PathVariable int year, @PathVariable int month){

Bill bill = new Bill();

bill.setUserid(userid);

SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");

bill.setStartTime(year+"-0"+month+"-01");

try {

Date date = sdf.parse(year+"-0"+(month+1)+"-01");

}catch (Exception e){

return ResultUtil.error(e);

@RequestMapping("/getRole/{id}")

public @ResponseBody Result getRoleById(@PathVariable String id){

try {

Role role = userInfoService.getRoleById(id);

if(role != null){

return ResultUtil.success(role);

}else {

return ResultUtil.unSuccess();

}catch (Exception e){

return ResultUtil.error(e);

/**


bill = new Bill();

bill.setId(billid);

return ResultUtil.success("记账成功!",billService.findByWhereNoPage(bill));

//                return ResultUtil.success("记账成功!",bill);

}else {

return ResultUtil.unSuccess();

}catch (Exception e){

return ResultUtil.error(e);

@RequestMapping("/updateBill")

public Result update(Bill bill, HttpSession session){


@Resource

private UserInfoService userInfoService;

@Resource

private PrivilegeService privilegeService;

@RequestMapping(value = {"/", "login.html"})

public String toLogin(HttpServletRequest request, HttpServletResponse response){

HttpSession session = request.getSession();

if(session.getAttribute(Config.CURRENT_USERNAME)==null){

return "login";

}else {

try {


sessionUser.setPassword(null);

return sessionUser;

@RequestMapping("/logout")

public String logout(HttpServletRequest request, HttpServletResponse response){

delCookieUser(request, response);

request.getSession().removeAttribute(Config.CURRENT_USERNAME);

return "login";

@RequestMapping("/getAllRoles")

public @ResponseBody Result<Role> getAllRoles(){

try {

List<Role> roles = userInfoService.getAllRoles();

if (roles.size()>0){


* 通过用户信息获取用户权限信息,并存入session中

* @param userInfo

* @param session

* @return

*/

public UserInfo setSessionUserInfo(UserInfo userInfo, HttpSession session){

List<Privilege> privileges = privilegeService.getPrivilegeByRoleid(userInfo.getRoleid());

userInfo.setPrivileges(privileges);

session.setAttribute(Config.CURRENT_USERNAME,userInfo);

return userInfo;

public UserInfo getUserInfo(UserInfo userInfo){

return userInfoService.getUserInfo(userInfo);


}else {

return ResultUtil.unSuccess();

}catch (Exception e){

return ResultUtil.error(e);

@RequestMapping("/role/add")

public @ResponseBody Result addRole(Role role){

try {

int num = userInfoService.addRole(role);

if(num>0){

privilegeService.addDefaultPrivilegesWhenAddRole(role.getRoleid().toString());

return ResultUtil.success();

userInfo.setHouseid(null);

if (userInfo.getRoleid() == -1){

userInfo.setRoleid(Config.getSessionUser(session).getRoleid());

Utils.log(userInfo.toString());

PageModel model = new PageModel<>(pageNo,userInfo);

model.setPageSize(pageSize);

return userInfoService.getUsersByWhere(model);

@RequestMapping("/user/add")

public @ResponseBody Result addUser(UserInfo userInfo){

System.out.println(userInfo);

@RequestMapping("/getRole/{id}")

public @ResponseBody Result getRoleById(@PathVariable String id){

try {

Role role = userInfoService.getRoleById(id);

if(role != null){

return ResultUtil.success(role);

}else {

return ResultUtil.unSuccess();

}catch (Exception e){

return ResultUtil.error(e);

/**

* 登录时将用户信息加入cookie中


* 适用于统计图

* @param bill

* @return

*/

@RequestMapping("/getBillsToChart")

public Result<Bill> findByWhereNoPage(Bill bill, HttpSession session){

bill = getHouseBill(bill,session);

return billService.findByWhereNoPage(bill);

@RequestMapping("/getBillsByWhere/{type}/{pageNo}/{pageSize}")

public Result<Bill> getBillsByWhere(Bill bill,@PathVariable String type, @PathVariable int pageNo, @PathVariable int pageSize, HttpSession session){


return ResultUtil.unSuccess();

}catch (Exception e){

return ResultUtil.error(e);

@RequestMapping("/updateBill")

public Result update(Bill bill, HttpSession session){

if (Config.getSessionUser(session)!=null){

bill.setUserid(Config.getSessionUser(session).getId());

Utils.log(bill.toString());

try {

int num = billService.update(bill);

if(num>0){

请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述

  • 5
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值