项目介绍
在这科技不断的进步,让我们的生活改变了很多,信息技术的迅速发展,使各种行业在信息技术应用方面变得非常普遍。信息时代的到来,已成为一种必然趋势。本系统的标题是基于B/S模式的家庭理财系统的设计开发,其目的是通过家庭理财系统,使家庭理财方面管理的工作系统化、规范化、自动化,从而达到提高家庭理财管理效率有效地记录和管理家庭的收支情况,成为家庭理财管理的好帮手。管理员通过本系统可以进行用户注册、权限管理、角色管理,用户可以进行在科目、收入、支付与统计等。 本系统采用了Browser/Server体系结构,采用java程序设计语言及MYSQL数据库进行开发;论文首先阐述了基于B/S模式下家庭理财系统的开发,并对该系统进行了较详细的需求分析,然后详细探讨了家庭理财系统的功能需求、业务流程、系统功能和系统设计等方面的问题。望能利用先进的计算机技术和网络技术来改变目前的家庭理财的状况和提高信息管理、服务水平,在市场经济的进一步发展中健康稳定发展,使之更加系统化体系化、标准化、自动化,具有优良的可用性、可靠性和安全性。
开发环境
开发语言:Java+Mysql
开发工具:IDEA /Eclipse
数据库:MYSQL5.7
使用框架:Springboot+Vue
可定制框架:ssm/springboot/vue/python/php/小程序/安卓
系统截图
部分代码
package com.controller;
import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.BillEntity;
import com.entity.FenleiEntity;
import com.entity.YonghuEntity;
import com.service.BillService;
import com.service.FenleiService;
import com.service.YonghuService;
import com.utils.MPUtil;
import com.utils.PageUtils;
import com.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Map;
@RestController
@RequestMapping("/bill")
public class BillController {
@Autowired
private BillService billService;
@Autowired
private YonghuService yonghuService;
@Autowired
private FenleiService fenleiService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,BillEntity bill,
HttpServletRequest request){
EntityWrapper<BillEntity> ew = new EntityWrapper<BillEntity>();
if(request.getSession().getAttribute("role").toString().equals("用户")) {
ew.eq("yonghuid",(Long)request.getSession().getAttribute("userId"));
}
PageUtils page = billService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, bill), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,BillEntity bill, HttpServletRequest request){
EntityWrapper<BillEntity> ew = new EntityWrapper<BillEntity>();
PageUtils page = billService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, bill), params), params));
return R.ok().put("data", page);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
BillEntity bill = billService.selectById(id);
return R.ok().put("data", bill);
}
/**
* 前端详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
BillEntity bill = billService.selectById(id);
return R.ok().put("data", bill);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody BillEntity bill, HttpServletRequest request){
if(request.getSession().getAttribute("role").toString().equals("用户")) {
YonghuEntity yonghu=yonghuService.selectById((Long)request.getSession().getAttribute("userId"));
bill.setYonghuid(yonghu.getId());
bill.setYonghuming(yonghu.getYonghuming());
bill.setXingming(yonghu.getXingming());
}
bill.setAdddate(new Date());
EntityWrapper<FenleiEntity> ew = new EntityWrapper<FenleiEntity>();
ew.eq("fenlei",bill.getFenlei());
List<FenleiEntity> list=fenleiService.selectList(ew);
if(list.size()>0){
bill.setFenlei(list.get(0).getFenlei());
bill.setFenleiid(list.get(0).getId());
}
billService.insert(bill);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody BillEntity bill, HttpServletRequest request){
if(request.getSession().getAttribute("role").toString().equals("用户")) {
YonghuEntity yonghu=yonghuService.selectById((Long)request.getSession().getAttribute("userId"));
bill.setYonghuming(yonghu.getYonghuming());
bill.setXingming(yonghu.getXingming());
}
bill.setAdddate(new Date());
billService.insert(bill);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody BillEntity bill, HttpServletRequest request){
billService.updateById(bill);
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
billService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
}