Java项目:SSM家庭理财管理系统

260 篇文章 9 订阅

作者主页:源码空间站2022

 简介:Java领域优质创作者、Java项目、学习资料、技术互助

文末获取源码

项目介绍

SSM家庭理财管理系统,分为管理员与普通用户两种角色;
管理员角色包含以下功能:
收支管理:收入信息维护、支出信息维护;
财务管理:证券账户管理、持股管理、证券流水账管理;
报表管理:按时间收入报表、按时间支出报表、按类型报表;
用户报表:用户信息管理、修改用户信息、修改密码、安全退出;

普通用户角色包含以下功能:
收支管理:收入信息维护、支出信息维护;
财务管理:证券账户管理、持股管理、证券流水账管理;
报表管理:按时间收入报表、按时间支出报表、按类型报表;
用户报表:修改用户信息、修改密码、安全退出;

由于本程序规模不大,可供课程设计,毕业设计学习演示之用

环境需要

1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可
4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;
5.是否Maven项目: 是;查看源码目录中是否包含pom.xml;若包含,则为maven项目,否则为非maven项目

6.数据库:MySql 5.7/8.0等版本均可;

技术栈

1. 后端:Spring springmvc mybatis

2. 前端:JSP+css+javascript+jQuery+bootstrap+highcharts

使用说明

1. 使用Navicat或者其它工具,在mysql中创建对应sql文件名称的数据库,并导入项目的sql文件;
2. 使用IDEA/Eclipse/MyEclipse导入项目,修改配置;
3. 将项目中db.properties配置文件中的数据库配置改为自己的用户名密码,然后运行;
4. 运行成功后,在浏览器中输入:http://localhost:8080/ffms/index.do
管理员账号密码:admin/123456

普通用户账号密码:user/123456

运行截图

相关代码 

收入管理控制器

@Controller
public class IncomeController {
	@Resource
	private IncomeService incomeService;
	@Resource
	private DatadicService datadicService;
	@Resource
	private UserService userService;

	@InitBinder
	public void initBinder(WebDataBinder binder) {
		SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		dateFormat.setLenient(false);
		binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true)); // true:允许输入空值,false:不能为空值
	}


	/**
	 * 收入信息管理页面
	 */
	@RequestMapping("/incomeManage.do")
	public String incomeManage(ModelMap map, HttpServletRequest request) {
		List<Datadic> list = datadicService.getDatadicIncome();
		map.addAttribute("incomes", list);
		
		HttpSession session = request.getSession();
		User curuser = (User)session.getAttribute(Constants.currentUserSessionKey);
		Map<String, Object> userMap = new HashMap<String, Object>();
		userMap.put("userid", curuser.getId());
		userMap.put("roleid", curuser.getRoleid());
		List<User> userlist = userService.getAllUser(userMap);
		map.addAttribute("allUsers", userlist);
		return "incomeManage";
	}

	/**
	 * 查询用户收入集合
	 * 
	 * @param page
	 * @param rows
	 * @param s_income
	 * @param response
	 * @return
	 * @throws Exception
	 */
	@RequestMapping("/incomelist.do")
	public String list(@RequestParam(value = "page", required = false) String page,
			@RequestParam(value = "rows", required = false) String rows, Income s_income, HttpServletResponse response)
			throws Exception {
		PageBean pageBean = new PageBean(Integer.parseInt(page), Integer.parseInt(rows));
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("incomer", StringUtil.formatLike(s_income.getIncomer()));
		map.put("source", StringUtil.formatLike(s_income.getSource()));
		map.put("dataid", s_income.getDataid());
		map.put("starttime", s_income.getStarttime());
		map.put("endtime", s_income.getEndtime());
		map.put("roleid", s_income.getRoleid());
		map.put("userid", s_income.getUserid());
		map.put("start", pageBean.getStart());
		map.put("size", pageBean.getPageSize());
		List<Income> incomeList = incomeService.findIncome(map);
		Long total = incomeService.getTotalIncome(map);
		JSONObject result = new JSONObject();
		JSONArray jsonArray = JSONArray.fromObject(incomeList);
		result.put("rows", jsonArray);
		result.put("total", total);
		ResponseUtil.write(response, result);
		return null;
	}

	/**
	 * 添加与修改用户
	 * 
	 * @param income
	 * @param response
	 * @return
	 * @throws Exception
	 */
	@RequestMapping("/incomesave.do")
	public String save(Income income, HttpServletResponse response) throws Exception {
		int resultTotal = 0; // 操作的记录条数
		JSONObject result = new JSONObject();
		
		if (income.getId() == null) {
			resultTotal = incomeService.addIncome(income);
		} else {
			resultTotal = incomeService.updateIncome(income);
		}

		if (resultTotal > 0) { // 执行成功
			result.put("errres", true);
			result.put("errmsg", "数据保存成功!");
		} else {
			result.put("errres", false);
			result.put("errmsg", "数据保存失败");
		}
		ResponseUtil.write(response, result);
		return null;
	}

	/**
	 * 删除用户
	 * 
	 * @param ids
	 * @param response
	 * @return
	 * @throws Exception
	 */
	@RequestMapping("/incomedelete.do")
	public String delete(@RequestParam(value = "ids") String ids, HttpServletResponse response) throws Exception {
		JSONObject result = new JSONObject();
		String[] idsStr = ids.split(",");
		for (int i = 0; i < idsStr.length; i++) {
			incomeService.deleteIncome(Integer.parseInt(idsStr[i]));
		}
		result.put("errres", true);
		result.put("errmsg", "数据删除成功!");
		ResponseUtil.write(response, result);
		return null;
	}

}

支出管理控制器

@Controller
public class PayController {
	
	
	@Resource
	private PayService payService;
	@Resource
	private DatadicService datadicService;
	@Resource
	private UserService userService;
	
	@InitBinder
	public void initBinder(WebDataBinder binder) {
		SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm");
		dateFormat.setLenient(false);
		binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true)); // true:允许输入空值,false:不能为空值
	}
	

	/**
	 * 支出信息管理页面
	 */
	@RequestMapping("/payManage.do")
	public String payManage(ModelMap map, HttpServletRequest request) {
		List<Datadic> list = datadicService.getDatadicPay();
		map.addAttribute("pays", list);
		HttpSession session = request.getSession();
		User curuser = (User)session.getAttribute(Constants.currentUserSessionKey);
		Map<String, Object> userMap = new HashMap<String, Object>();
		userMap.put("userid", curuser.getId());
		userMap.put("roleid", curuser.getRoleid());
		List<User> userlist = userService.getAllUser(userMap);
		map.addAttribute("allUsers", userlist);
		return "payManage";
	}

	/**
	 * 查询用户收入集合
	 * 
	 * @param page
	 * @param rows
	 * @param s_pay
	 * @param response
	 * @return
	 * @throws Exception
	 */
	@RequestMapping("/paylist.do")
	public String list(@RequestParam(value = "page", required = false) String page,
			@RequestParam(value = "rows", required = false) String rows, Pay s_pay, HttpServletResponse response)
			throws Exception {
		PageBean pageBean = new PageBean(Integer.parseInt(page), Integer.parseInt(rows));
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("payer", StringUtil.formatLike(s_pay.getPayer()));
		map.put("tword", StringUtil.formatLike(s_pay.getTword()));
		map.put("dataid", s_pay.getDataid());
		map.put("starttime", s_pay.getStarttime());
		map.put("endtime", s_pay.getEndtime());
		map.put("roleid", s_pay.getRoleid());
		map.put("userid", s_pay.getUserid());
		map.put("start", pageBean.getStart());
		map.put("size", pageBean.getPageSize());
		List<Pay> payList = payService.findPay(map);
		Long total = payService.getTotalPay(map);
		JSONObject result = new JSONObject();
		JSONArray jsonArray = JSONArray.fromObject(payList);
		result.put("rows", jsonArray);
		result.put("total", total);
		ResponseUtil.write(response, result);
		return null;
	}

	/**
	 * 添加与修改支出
	 * 
	 * @param pay
	 * @param response
	 * @return
	 * @throws Exception
	 */
	@RequestMapping("/paysave.do")
	public String save(Pay pay, HttpServletResponse response) throws Exception {
		int resultTotal = 0; // 操作的记录条数
		JSONObject result = new JSONObject();
		
		if (pay.getId() == null) {
			resultTotal = payService.addPay(pay);
		} else {
			resultTotal = payService.updatePay(pay);
		}

		if (resultTotal > 0) { // 执行成功
			result.put("errres", true);
			result.put("errmsg", "数据保存成功!");
		} else {
			result.put("errres", false);
			result.put("errmsg", "数据保存失败");
		}
		ResponseUtil.write(response, result);
		return null;
	}

	/**
	 * 删除用户
	 * 
	 * @param ids
	 * @param response
	 * @return
	 * @throws Exception
	 */
	@RequestMapping("/paydelete.do")
	public String delete(@RequestParam(value = "ids") String ids, HttpServletResponse response) throws Exception {
		JSONObject result = new JSONObject();
		String[] idsStr = ids.split(",");
		for (int i = 0; i < idsStr.length; i++) {
			payService.deletePay((Integer.parseInt(idsStr[i])));
		}
		result.put("errres", true);
		result.put("errmsg", "数据删除成功!");
		ResponseUtil.write(response, result);
		return null;
	}
	

}

收入管理控制器

@Controller
public class TradeController {
	@Resource
	private TradeService tradeService;
	@Resource
	private DatadicService datadicService;
	@Resource
	private UserService userService;
	@Resource
	private SharesService sharesService;

	@InitBinder
	public void initBinder(WebDataBinder binder) {
		SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		dateFormat.setLenient(false);
		binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true)); // true:允许输入空值,false:不能为空值
	}


	/**
	 * 收入信息管理页面
	 */
	@RequestMapping("/tradeManage.do")
	public String tradeManage(ModelMap map, HttpServletRequest request) {
		List<Datadic> list = datadicService.getDatadicTrade();
		map.addAttribute("trades", list);
		
		HttpSession session = request.getSession();
		User curuser = (User)session.getAttribute(Constants.currentUserSessionKey);
		Map<String, Object> userMap = new HashMap<String, Object>();
		userMap.put("userid", curuser.getId());
		userMap.put("roleid", curuser.getRoleid());
		List<User> userlist = userService.getAllUser(userMap);
		map.addAttribute("allUsers", userlist);
		List<Shares> shareslist = sharesService.getSharesName();
		map.addAttribute("allShares", shareslist);
		return "tradeManage";
	}

	/**
	 * 查询用户收入集合
	 * 
	 * @param page
	 * @param rows
	 * @param s_trade
	 * @param response
	 * @return
	 * @throws Exception
	 */
	@RequestMapping("/tradelist.do")
	public String list(@RequestParam(value = "page", required = false) String page,
			@RequestParam(value = "rows", required = false) String rows, Trade s_trade, HttpServletResponse response)
			throws Exception {
		PageBean pageBean = new PageBean(Integer.parseInt(page), Integer.parseInt(rows));
		Map<String, Object> map = new HashMap<String, Object>();
		map.put("sharesname", StringUtil.formatLike(s_trade.getSharesname()));
		map.put("dataid", s_trade.getDataid());
		map.put("starttime", s_trade.getStarttime());
		map.put("endtime", s_trade.getEndtime());
		map.put("roleid", s_trade.getRoleid());
		map.put("userid", s_trade.getUserid());
		map.put("start", pageBean.getStart());
		map.put("size", pageBean.getPageSize());
		List<Trade> tradeList = tradeService.findTrade(map);
		Long total = tradeService.getTotalTrade(map);
		JSONObject result = new JSONObject();
		JSONArray jsonArray = JSONArray.fromObject(tradeList);
		result.put("rows", jsonArray);
		result.put("total", total);
		ResponseUtil.write(response, result);
		return null;
	}

	/**
	 * 添加与修改用户
	 * 
	 * @param trade
	 * @param response
	 * @return
	 * @throws Exception
	 */
	@RequestMapping("/tradesave.do")
	public String save(Trade trade, HttpServletResponse response) throws Exception {
		int resultTotal = 0; // 操作的记录条数
		JSONObject result = new JSONObject();
		
		if (trade.getId() == null) {
			resultTotal = tradeService.addTrade(trade);
		} else {
			resultTotal = tradeService.updateTrade(trade);
		}

		if (resultTotal > 0) { // 执行成功
			result.put("errres", true);
			result.put("errmsg", "数据保存成功!");
		} else {
			result.put("errres", false);
			result.put("errmsg", "数据保存失败");
		}
		ResponseUtil.write(response, result);
		return null;
	}

	/**
	 * 删除用户
	 * 
	 * @param ids
	 * @param response
	 * @return
	 * @throws Exception
	 */
	@RequestMapping("/tradedelete.do")
	public String delete(@RequestParam(value = "ids") String ids, HttpServletResponse response) throws Exception {
		JSONObject result = new JSONObject();
		String[] idsStr = ids.split(",");
		for (int i = 0; i < idsStr.length; i++) {
			tradeService.deleteTrade(Integer.parseInt(idsStr[i]));
		}
		result.put("errres", true);
		result.put("errmsg", "数据删除成功!");
		ResponseUtil.write(response, result);
		return null;
	}

}

如果也想学习本系统,下面领取。关注并回复:248ssm

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
"SSM服装出租服装店租赁服装管理系统" 是一个基于Java项目。该系统旨在帮助服装店有效管理其库存、租赁流程和顾客信息,以提升运营效率。 该系统的主要功能包括库存管理,租赁管理和顾客管理。首先,库存管理模块允许店主添加、删除和更新服装的详细信息,包括服装名称、类型、尺码和价格等。店主可以通过该模块随时了解实时库存情况,并及时补充库存。其次,租赁管理模块允许店主记录租赁订单,包括租赁日期、租赁时长和顾客信息等。系统可以自动计算租赁费用并生成相应的发票。最后,顾客管理模块允许店主维护顾客的基本信息,并记录顾客的租赁历史以及积累的租赁次数和会员等级。 为了提高系统的稳定性和安全性,该项目采用SSM(Spring+Spring MVC+MyBatis)框架进行开发。Spring作为业务层框架,负责处理系统的业务逻辑;Spring MVC作为视图层框架,负责接收用户请求和展示数据;MyBatis作为持久层框架,负责与数据库进行交互。此外,项目还使用MySQL作为数据库,保证数据的可靠存储和快速检索。 该项目的优势在于提高了服装店的管理效率。通过系统化的库存管理和租赁管理,店主可以实时掌握库存情况和租赁订单,避免了重复和遗漏,提高了工作效率。而顾客管理模块的引入,使店主能够更好地了解顾客的需求和偏好,从而提供个性化的服务,增加顾客的满意度和忠诚度。 综上所述,SSM服装出租服装店租赁服装管理系统是一个基于Java开发项目,旨在提高服装店的库存管理、租赁管理和顾客管理效率。该系统通过SSM框架和MySQL数据库的应用,保证了系统的稳定性和安全性。它的优势在于提高了店主的工作效率和顾客满意度,帮助服装店实现更好的运营表现。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值