Design and development of family financial accounting system based on SpringBoot

1 Introduction

With the development of society, all aspects of society are taking advantage of the information age. The advantages and popularity of the Internet have necessitated the development of various systems.

Based on the practical application as the development background, this paper uses software engineering principles and development methods. It mainly uses java language technology and mysql database to complete the system design . The entire development process firstly analyzes the needs of the family financial accounting system , and obtains the main functions of the family financial accounting system . Then, the overall design and detailed design of the family financial accounting system are carried out. The overall design mainly includes system function design, system overall structure design, system data structure design and system security design, etc.; the detailed design mainly includes the realization of the database access of the family financial accounting system , the specific realization of the main function modules, and the key codes of the module realization. Finally, the functional test of the family financial accounting system is carried out, and the test results are analyzed and summarized, and the deficiencies in the family financial accounting system and the areas that need to be improved are obtained, which provides convenience for the future maintenance of the family financial accounting system . At the same time, it also provides reference and help for the future development of similar family financial accounting system .

The development of the family financial accounting system makes the system more convenient and efficient, and at the same time promotes the family financial accounting system to become more systematic and orderly. The system interface is more friendly and easy to operate.

2. Development technology

2.1 B/S Architecture

There are also many features of the B/S structure, for example, signal requests can be made in many browsers. And it can properly reduce the user 's workload. By installing or configuring a small amount of running software on the client, the user 's workload can be gradually reduced. The operation of these functions is mainly controlled by the server. Mature, the most important feature is that the cooperation with the browser brings great convenience to software development. It can not only reduce development costs, but also continuously strengthen the software functions of the system. The layers are independent of each other and the presentation layer is the B/S The structure completes the main features of the interconnection.

2.2 System framework and directory structure introduction

The whole system framework system is divided into two parts: logic layer and view layer . The goal of the system development framework is to allow developers to develop services with native system experience in WeChat in as simple and efficient a way as possible. The system provides a data transmission and event system between the view layer and the logic layer, and provides its own view layer and logic layer framework, allowing developers to focus on data and logic. At the heart of the framework is a reactive data binding system that makes keeping data and views in sync very simple. Data modification at the logical layer will be updated accordingly at the view layer. The framework provides a set of basic components. These components come with WeChat-style styles and special logic. Developers can create powerful systems by combining basic components.

2.3 JAVA

Java mainly adopts CORBA technology and security model, which can protect data in Internet applications. It also provides comprehensive support for EJB (Enterprise JavaBeans), java servlet API, JSP (java server pages), and XML technology. Much progress. For example, while I'm writing this article in Microsoft Word, I also have an MP3 player turned on to play music. Occasionally, I also edit Word and let the expenditure classification information management machine execute the print job, and I also like to use IE. For me, these operations are performed at the same time, I don't need to wait for a song to finish spending taxonomy information management paper editing. It seems like they are all working for me at the same time on the Expenditure Classification Information Management machine. The truth is, for a CPU, it can only execute one program at a certain point in time. The CPU is constantly "jumping" between these programs. So why don't we see any damage? This is because, compared to our feelings, it moves too fast. So although we see some synchronous operations, it's really only possible for a computer to execute one program at a time, unless your computer is multi-CPU.

Java is a computer programming language with three main features of encapsulation, inheritance and polymorphism, widely used in enterprise web application development and mobile application development.

The difference between the Java language and general compilers and literal translation is that Java first converts the source code into bytecode, and then converts it into an executable file for the JVM, which can run on various JVMs. Therefore, its cross-platform characteristics are realized. While this made Java very slow in its early days, it has improved significantly as Java has been developed .

2.4 MySQL database

The language of Mysql is unstructured, and users can work on the data. MySQL gets a lot of attention for its speed, reliability, and adaptability. Most people agree that MySQL is the best choice for managing content when transactional processing is not required. And because the language and structure of Mysql are relatively simple, but the function and the amount of stored information are very powerful, it has been widely used.

The role of Mysql database in the programming process is very extensive, which brings convenience for users to query data. Because of its flexibility and powerful functions, the application of Mysql database only needs a small piece of code to realize a certain function, unlike other programs that need to write a large piece of code. Generally speaking, the language of Mysql database is relatively concise.

Data flow analysis is mainly a storage room for data storage, which is performed on a computer, not a storage room in reality. Data is stored in a fixed format rather than in disorder. Its definition is: it has a fixed format for a long time and can be shared and stored on the computer memory. Database management is mainly data storage, modification and addition, and the establishment of data tables. In order to ensure the normal operation of the system data, some capable processors can manage it without the need for professional people to handle it. The establishment of the data table can adjust the data in the data table, recombine and reconstruct the data to ensure the security of the data. Due to the powerful features of the database, the development of this system mainly uses Mysql to manage the data.

2.5  Spring Boot framework

Spring Boot is developed on the basis of the original Spring, and it can quickly create an application framework. Its design idea is to simplify the construction and development process of Spring applications, and provide an "out-of-the-box" way to create separate, production-level Spring applications [10].

In order to reduce the complexity of developing Spring applications, Spring Boot provides the following features. For example:

(1) Configuration automation: The framework includes many default configurations, allowing developers to use many common functions without manual configuration.

(2) Rapid development: quickly start a project by using the Spring Starter project, and use Spring Boot's automatic configuration feature to quickly build applications.

(3)内嵌式Web容器:Spring Boot内置了Tomcat、Jetty或Undertow,使得开发者无需手动部署和配置Web服务器。

(4)应用监控:Spring Boot提供了丰富的指标和监控工具,作为开发者诊断应用和理解程序的工具。

3.功能设计

系统分为用户端和管理端。管理端包含首页、个人中心、用户管理、家庭账户管理、收入分类管理、支出分类管理、家庭收入管理、家庭支出管理、银行储蓄账户、系统管理、投资理财管理。用户端包含银行储蓄管理、收入、个人中心、家庭账户管理、家庭收入管理、家庭支出管理、投资理财管理。

4.功能效果图

4.1 用户端功能模块

用户注册,用户注册页面可以填写个人账号、姓名、身份证号码、手机号码等信息进行注册如图所示

用户登录,在用户登录页面填写账号、密码进行登录如图所示。

 用户登录到家庭理财记账系统可以查看首页、家庭账户管理、收入分类管理、银行储蓄管理等内容,如图所示。 

用户信息页面可以填写个人账号、姓名、性别、年龄、身份证号码、手机号码、头像信息,并可根据需要进行保存、退出登录,如图所示。 

4.2 管理员端功能模块

管理员通过填写用户名、密码、角色进行登录如图所示。

用户管理,通过填写个人账号、姓名、性别、年龄、身份证号码、手机号码、头像等信息进行详情、修改、删除操作,如图所示。 

家庭账户管理,通过填写用户名,账户号,用户姓名,金额等信息进行修改、删除操作,如图所示。 

 收入分类管理,通过填写收入分类名等信息进行详情、修改、删除操作,如图所示。

支出分类信息管理,通过填写支出分类名等信息进行详情、修改、删除操作,如图所示。 

家庭收入管理,通过填写用户名,用户姓名,账户号,收入分类,金额,日期,备注等信息进行详情、修改、删除操作,如图所示。 

 家庭支出管理,通过填写用户名,用户姓名,账户号,支出分类,金额,日期,备注等信息进行详情、修改操作,如图所示。 

5.核心代码

@RestController
@RequestMapping("/jiatingshouru")
public class JiatingshouruController {
    @Autowired
    private JiatingshouruService jiatingshouruService;
    


    /**
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,JiatingshouruEntity jiatingshouru,
		HttpServletRequest request){
		String tableName = request.getSession().getAttribute("tableName").toString();
		if(tableName.equals("yonghu")) {
			jiatingshouru.setYonghuming((String)request.getSession().getAttribute("username"));
		}
        EntityWrapper<JiatingshouruEntity> ew = new EntityWrapper<JiatingshouruEntity>();
		PageUtils page = jiatingshouruService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, jiatingshouru), params), params));

        return R.ok().put("data", page);
    }
    
    /**
     * 前端列表
     */
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,JiatingshouruEntity jiatingshouru, HttpServletRequest request){
        EntityWrapper<JiatingshouruEntity> ew = new EntityWrapper<JiatingshouruEntity>();
		PageUtils page = jiatingshouruService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, jiatingshouru), params), params));
        return R.ok().put("data", page);
    }

	/**
     * 列表
     */
    @RequestMapping("/lists")
    public R list( JiatingshouruEntity jiatingshouru){
       	EntityWrapper<JiatingshouruEntity> ew = new EntityWrapper<JiatingshouruEntity>();
      	ew.allEq(MPUtil.allEQMapPre( jiatingshouru, "jiatingshouru")); 
        return R.ok().put("data", jiatingshouruService.selectListView(ew));
    }

	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(JiatingshouruEntity jiatingshouru){
        EntityWrapper< JiatingshouruEntity> ew = new EntityWrapper< JiatingshouruEntity>();
 		ew.allEq(MPUtil.allEQMapPre( jiatingshouru, "jiatingshouru")); 
		JiatingshouruView jiatingshouruView =  jiatingshouruService.selectView(ew);
		return R.ok("查询家庭收入成功").put("data", jiatingshouruView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        JiatingshouruEntity jiatingshouru = jiatingshouruService.selectById(id);
        return R.ok().put("data", jiatingshouru);
    }

    /**
     * 前端详情
     */
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        JiatingshouruEntity jiatingshouru = jiatingshouruService.selectById(id);
        return R.ok().put("data", jiatingshouru);
    }
    



    /**
     * 后端保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody JiatingshouruEntity jiatingshouru, HttpServletRequest request){
    	jiatingshouru.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(jiatingshouru);
        jiatingshouruService.insert(jiatingshouru);
        return R.ok();
    }
    
    /**
     * 前端保存
     */
    @RequestMapping("/add")
    public R add(@RequestBody JiatingshouruEntity jiatingshouru, HttpServletRequest request){
    	jiatingshouru.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(jiatingshouru);
        jiatingshouruService.insert(jiatingshouru);
        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
    public R update(@RequestBody JiatingshouruEntity jiatingshouru, HttpServletRequest request){
        //ValidatorUtils.validateEntity(jiatingshouru);
        jiatingshouruService.updateById(jiatingshouru);//全部更新
        return R.ok();
    }
    

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        jiatingshouruService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
    
    /**
     * 提醒接口
     */
	@RequestMapping("/remind/{columnName}/{type}")
	public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, 
						 @PathVariable("type") String type,@RequestParam Map<String, Object> map) {
		map.put("column", columnName);
		map.put("type", type);
		
		if(type.equals("2")) {
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
			Calendar c = Calendar.getInstance();
			Date remindStartDate = null;
			Date remindEndDate = null;
			if(map.get("remindstart")!=null) {
				Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
				c.setTime(new Date()); 
				c.add(Calendar.DAY_OF_MONTH,remindStart);
				remindStartDate = c.getTime();
				map.put("remindstart", sdf.format(remindStartDate));
			}
			if(map.get("remindend")!=null) {
				Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
				c.setTime(new Date());
				c.add(Calendar.DAY_OF_MONTH,remindEnd);
				remindEndDate = c.getTime();
				map.put("remindend", sdf.format(remindEndDate));
			}
		}
		
		Wrapper<JiatingshouruEntity> wrapper = new EntityWrapper<JiatingshouruEntity>();
		if(map.get("remindstart")!=null) {
			wrapper.ge(columnName, map.get("remindstart"));
		}
		if(map.get("remindend")!=null) {
			wrapper.le(columnName, map.get("remindend"));
		}

		String tableName = request.getSession().getAttribute("tableName").toString();
		if(tableName.equals("yonghu")) {
			wrapper.eq("yonghuming", (String)request.getSession().getAttribute("username"));
		}

		int count = jiatingshouruService.selectCount(wrapper);
		return R.ok().put("count", count);
	}
	


}
@RestController
@RequestMapping("/jiatingzhanghu")
public class JiatingzhanghuController {
    @Autowired
    private JiatingzhanghuService jiatingzhanghuService;
    


    /**
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,JiatingzhanghuEntity jiatingzhanghu,
		HttpServletRequest request){
		String tableName = request.getSession().getAttribute("tableName").toString();
		if(tableName.equals("yonghu")) {
			jiatingzhanghu.setYonghuming((String)request.getSession().getAttribute("username"));
		}
        EntityWrapper<JiatingzhanghuEntity> ew = new EntityWrapper<JiatingzhanghuEntity>();
		PageUtils page = jiatingzhanghuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, jiatingzhanghu), params), params));

        return R.ok().put("data", page);
    }
    
    /**
     * 前端列表
     */
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,JiatingzhanghuEntity jiatingzhanghu, HttpServletRequest request){
        EntityWrapper<JiatingzhanghuEntity> ew = new EntityWrapper<JiatingzhanghuEntity>();
		PageUtils page = jiatingzhanghuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, jiatingzhanghu), params), params));
        return R.ok().put("data", page);
    }

	/**
     * 列表
     */
    @RequestMapping("/lists")
    public R list( JiatingzhanghuEntity jiatingzhanghu){
       	EntityWrapper<JiatingzhanghuEntity> ew = new EntityWrapper<JiatingzhanghuEntity>();
      	ew.allEq(MPUtil.allEQMapPre( jiatingzhanghu, "jiatingzhanghu")); 
        return R.ok().put("data", jiatingzhanghuService.selectListView(ew));
    }

	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(JiatingzhanghuEntity jiatingzhanghu){
        EntityWrapper< JiatingzhanghuEntity> ew = new EntityWrapper< JiatingzhanghuEntity>();
 		ew.allEq(MPUtil.allEQMapPre( jiatingzhanghu, "jiatingzhanghu")); 
		JiatingzhanghuView jiatingzhanghuView =  jiatingzhanghuService.selectView(ew);
		return R.ok("查询家庭账户成功").put("data", jiatingzhanghuView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        JiatingzhanghuEntity jiatingzhanghu = jiatingzhanghuService.selectById(id);
        return R.ok().put("data", jiatingzhanghu);
    }

    /**
     * 前端详情
     */
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        JiatingzhanghuEntity jiatingzhanghu = jiatingzhanghuService.selectById(id);
        return R.ok().put("data", jiatingzhanghu);
    }
    



    /**
     * 后端保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody JiatingzhanghuEntity jiatingzhanghu, HttpServletRequest request){
    	jiatingzhanghu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(jiatingzhanghu);
        jiatingzhanghuService.insert(jiatingzhanghu);
        return R.ok();
    }
    
    /**
     * 前端保存
     */
    @RequestMapping("/add")
    public R add(@RequestBody JiatingzhanghuEntity jiatingzhanghu, HttpServletRequest request){
    	jiatingzhanghu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(jiatingzhanghu);
        jiatingzhanghuService.insert(jiatingzhanghu);
        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
    public R update(@RequestBody JiatingzhanghuEntity jiatingzhanghu, HttpServletRequest request){
        //ValidatorUtils.validateEntity(jiatingzhanghu);
        jiatingzhanghuService.updateById(jiatingzhanghu);//全部更新
        return R.ok();
    }
    

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        jiatingzhanghuService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
    
    /**
     * 提醒接口
     */
	@RequestMapping("/remind/{columnName}/{type}")
	public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, 
						 @PathVariable("type") String type,@RequestParam Map<String, Object> map) {
		map.put("column", columnName);
		map.put("type", type);
		
		if(type.equals("2")) {
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
			Calendar c = Calendar.getInstance();
			Date remindStartDate = null;
			Date remindEndDate = null;
			if(map.get("remindstart")!=null) {
				Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
				c.setTime(new Date()); 
				c.add(Calendar.DAY_OF_MONTH,remindStart);
				remindStartDate = c.getTime();
				map.put("remindstart", sdf.format(remindStartDate));
			}
			if(map.get("remindend")!=null) {
				Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
				c.setTime(new Date());
				c.add(Calendar.DAY_OF_MONTH,remindEnd);
				remindEndDate = c.getTime();
				map.put("remindend", sdf.format(remindEndDate));
			}
		}
		
		Wrapper<JiatingzhanghuEntity> wrapper = new EntityWrapper<JiatingzhanghuEntity>();
		if(map.get("remindstart")!=null) {
			wrapper.ge(columnName, map.get("remindstart"));
		}
		if(map.get("remindend")!=null) {
			wrapper.le(columnName, map.get("remindend"));
		}

		String tableName = request.getSession().getAttribute("tableName").toString();
		if(tableName.equals("yonghu")) {
			wrapper.eq("yonghuming", (String)request.getSession().getAttribute("username"));
		}

		int count = jiatingzhanghuService.selectCount(wrapper);
		return R.ok().put("count", count);
	}
	


}
@RestController
@RequestMapping("/jiatingzhichu")
public class JiatingzhichuController {
    @Autowired
    private JiatingzhichuService jiatingzhichuService;
    


    /**
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,JiatingzhichuEntity jiatingzhichu,
		HttpServletRequest request){
		String tableName = request.getSession().getAttribute("tableName").toString();
		if(tableName.equals("yonghu")) {
			jiatingzhichu.setYonghuming((String)request.getSession().getAttribute("username"));
		}
        EntityWrapper<JiatingzhichuEntity> ew = new EntityWrapper<JiatingzhichuEntity>();
		PageUtils page = jiatingzhichuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, jiatingzhichu), params), params));

        return R.ok().put("data", page);
    }
    
    /**
     * 前端列表
     */
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,JiatingzhichuEntity jiatingzhichu, HttpServletRequest request){
        EntityWrapper<JiatingzhichuEntity> ew = new EntityWrapper<JiatingzhichuEntity>();
		PageUtils page = jiatingzhichuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, jiatingzhichu), params), params));
        return R.ok().put("data", page);
    }

	/**
     * 列表
     */
    @RequestMapping("/lists")
    public R list( JiatingzhichuEntity jiatingzhichu){
       	EntityWrapper<JiatingzhichuEntity> ew = new EntityWrapper<JiatingzhichuEntity>();
      	ew.allEq(MPUtil.allEQMapPre( jiatingzhichu, "jiatingzhichu")); 
        return R.ok().put("data", jiatingzhichuService.selectListView(ew));
    }

	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(JiatingzhichuEntity jiatingzhichu){
        EntityWrapper< JiatingzhichuEntity> ew = new EntityWrapper< JiatingzhichuEntity>();
 		ew.allEq(MPUtil.allEQMapPre( jiatingzhichu, "jiatingzhichu")); 
		JiatingzhichuView jiatingzhichuView =  jiatingzhichuService.selectView(ew);
		return R.ok("查询家庭支出成功").put("data", jiatingzhichuView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        JiatingzhichuEntity jiatingzhichu = jiatingzhichuService.selectById(id);
        return R.ok().put("data", jiatingzhichu);
    }

    /**
     * 前端详情
     */
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        JiatingzhichuEntity jiatingzhichu = jiatingzhichuService.selectById(id);
        return R.ok().put("data", jiatingzhichu);
    }
    



    /**
     * 后端保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody JiatingzhichuEntity jiatingzhichu, HttpServletRequest request){
    	jiatingzhichu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(jiatingzhichu);
        jiatingzhichuService.insert(jiatingzhichu);
        return R.ok();
    }
    
    /**
     * 前端保存
     */
    @RequestMapping("/add")
    public R add(@RequestBody JiatingzhichuEntity jiatingzhichu, HttpServletRequest request){
    	jiatingzhichu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(jiatingzhichu);
        jiatingzhichuService.insert(jiatingzhichu);
        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
    public R update(@RequestBody JiatingzhichuEntity jiatingzhichu, HttpServletRequest request){
        //ValidatorUtils.validateEntity(jiatingzhichu);
        jiatingzhichuService.updateById(jiatingzhichu);//全部更新
        return R.ok();
    }
    

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        jiatingzhichuService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
    
    /**
     * 提醒接口
     */
	@RequestMapping("/remind/{columnName}/{type}")
	public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, 
						 @PathVariable("type") String type,@RequestParam Map<String, Object> map) {
		map.put("column", columnName);
		map.put("type", type);
		
		if(type.equals("2")) {
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
			Calendar c = Calendar.getInstance();
			Date remindStartDate = null;
			Date remindEndDate = null;
			if(map.get("remindstart")!=null) {
				Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
				c.setTime(new Date()); 
				c.add(Calendar.DAY_OF_MONTH,remindStart);
				remindStartDate = c.getTime();
				map.put("remindstart", sdf.format(remindStartDate));
			}
			if(map.get("remindend")!=null) {
				Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
				c.setTime(new Date());
				c.add(Calendar.DAY_OF_MONTH,remindEnd);
				remindEndDate = c.getTime();
				map.put("remindend", sdf.format(remindEndDate));
			}
		}
		
		Wrapper<JiatingzhichuEntity> wrapper = new EntityWrapper<JiatingzhichuEntity>();
		if(map.get("remindstart")!=null) {
			wrapper.ge(columnName, map.get("remindstart"));
		}
		if(map.get("remindend")!=null) {
			wrapper.le(columnName, map.get("remindend"));
		}

		String tableName = request.getSession().getAttribute("tableName").toString();
		if(tableName.equals("yonghu")) {
			wrapper.eq("yonghuming", (String)request.getSession().getAttribute("username"));
		}

		int count = jiatingzhichuService.selectCount(wrapper);
		return R.ok().put("count", count);
	}
	


}
@RestController
@RequestMapping("/shourufenlei")
public class ShourufenleiController {
    @Autowired
    private ShourufenleiService shourufenleiService;
    


    /**
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,ShourufenleiEntity shourufenlei,
		HttpServletRequest request){
        EntityWrapper<ShourufenleiEntity> ew = new EntityWrapper<ShourufenleiEntity>();
		PageUtils page = shourufenleiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, shourufenlei), params), params));

        return R.ok().put("data", page);
    }
    
    /**
     * 前端列表
     */
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,ShourufenleiEntity shourufenlei, HttpServletRequest request){
        EntityWrapper<ShourufenleiEntity> ew = new EntityWrapper<ShourufenleiEntity>();
		PageUtils page = shourufenleiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, shourufenlei), params), params));
        return R.ok().put("data", page);
    }

	/**
     * 列表
     */
    @RequestMapping("/lists")
    public R list( ShourufenleiEntity shourufenlei){
       	EntityWrapper<ShourufenleiEntity> ew = new EntityWrapper<ShourufenleiEntity>();
      	ew.allEq(MPUtil.allEQMapPre( shourufenlei, "shourufenlei")); 
        return R.ok().put("data", shourufenleiService.selectListView(ew));
    }

	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(ShourufenleiEntity shourufenlei){
        EntityWrapper< ShourufenleiEntity> ew = new EntityWrapper< ShourufenleiEntity>();
 		ew.allEq(MPUtil.allEQMapPre( shourufenlei, "shourufenlei")); 
		ShourufenleiView shourufenleiView =  shourufenleiService.selectView(ew);
		return R.ok("查询收入分类成功").put("data", shourufenleiView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        ShourufenleiEntity shourufenlei = shourufenleiService.selectById(id);
        return R.ok().put("data", shourufenlei);
    }

    /**
     * 前端详情
     */
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        ShourufenleiEntity shourufenlei = shourufenleiService.selectById(id);
        return R.ok().put("data", shourufenlei);
    }
    



    /**
     * 后端保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody ShourufenleiEntity shourufenlei, HttpServletRequest request){
    	shourufenlei.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(shourufenlei);
        shourufenleiService.insert(shourufenlei);
        return R.ok();
    }
    
    /**
     * 前端保存
     */
    @RequestMapping("/add")
    public R add(@RequestBody ShourufenleiEntity shourufenlei, HttpServletRequest request){
    	shourufenlei.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(shourufenlei);
        shourufenleiService.insert(shourufenlei);
        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
    public R update(@RequestBody ShourufenleiEntity shourufenlei, HttpServletRequest request){
        //ValidatorUtils.validateEntity(shourufenlei);
        shourufenleiService.updateById(shourufenlei);//全部更新
        return R.ok();
    }
    

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        shourufenleiService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
    
    /**
     * 提醒接口
     */
	@RequestMapping("/remind/{columnName}/{type}")
	public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, 
						 @PathVariable("type") String type,@RequestParam Map<String, Object> map) {
		map.put("column", columnName);
		map.put("type", type);
		
		if(type.equals("2")) {
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
			Calendar c = Calendar.getInstance();
			Date remindStartDate = null;
			Date remindEndDate = null;
			if(map.get("remindstart")!=null) {
				Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
				c.setTime(new Date()); 
				c.add(Calendar.DAY_OF_MONTH,remindStart);
				remindStartDate = c.getTime();
				map.put("remindstart", sdf.format(remindStartDate));
			}
			if(map.get("remindend")!=null) {
				Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
				c.setTime(new Date());
				c.add(Calendar.DAY_OF_MONTH,remindEnd);
				remindEndDate = c.getTime();
				map.put("remindend", sdf.format(remindEndDate));
			}
		}
		
		Wrapper<ShourufenleiEntity> wrapper = new EntityWrapper<ShourufenleiEntity>();
		if(map.get("remindstart")!=null) {
			wrapper.ge(columnName, map.get("remindstart"));
		}
		if(map.get("remindend")!=null) {
			wrapper.le(columnName, map.get("remindend"));
		}


		int count = shourufenleiService.selectCount(wrapper);
		return R.ok().put("count", count);
	}
	


}

6.参考论文

目  录

摘 要

Abstract 1

1 系统概述 2

1.1 概述 3

1.2课题意义 4

1.3 主要内容

2 系统开发环境

2.1B/S架构

2.2系统框架以及目录结构介绍

2.3 JAVA简介

2.4 MySQL数据库

2.5 SpringBoot框架

3 需求分析 8

3.1 System Design Objectives 8

3.2 Overview of Requirements Analysis 9

3.3 System  Feasibility Analysis 9

3. 4 Economic feasibility 1 0

3.5 Operation feasibility  : 1 1

3. 6 System flow and logic 1 2

4 System Outline Design 1 3

4.1  Overview 1 4 _

4.2 System structure 1  5 _

4 .3.  Database Design 1 6

4 . 3 . 1  Database Design Table 1 8

5 System detailed design 1 8

5.1 User-side functional modules 1 9

5. 2 Management terminal function module 2 0

6 System Test

6.1 Testing Theory

6.2 Test methods and use cases

6.3 Test results

in conclusion

thank you

references

7. Summary

The design of the family financial accounting system is to solve the information-based website system through the Internet, and integrate all the professional knowledge I have learned in the past four years to develop and design the family financial accounting system . Of course, I am actually doing it I encountered a lot of problems, one is the technical problem of the website, the other is that I have not developed the program alone before, and there are relatively few hands-on practices. While facing the problems, my self-confidence has also been hit, but I also quickly adjusted In my own state, the method discussed by the teacher and classmates solved all the difficulties.

The graduation design is the best embodiment of the application of the knowledge we have learned, and it is also an assessment of all the professional knowledge and technology applications we have learned in the past four years. Through this graduation design, we can better exercise and review and review the knowledge we have learned. Application is also a kind of training and practice. The realization of the family financial management bookkeeping system not only consolidated my previous knowledge, but also combined the acquired knowledge with a detailed understanding of technology and a deep understanding of interdisciplinary effects.

In my future work, I will continue to work hard on my computer technology, so that I can better and faster realize the required functions in the later stage of platform development. I believe that I can do more good jobs and make greater contributions in the field of work .

Looking back on the whole process of the graduation project, I not only put in effort and sweat, but also gained many unforgettable beautiful experiences . Although I have experienced various difficulties in the process of system development , and I am constantly researching and exploring, there are still many deficiencies in the realization of the system . But after the system programming work, I have more confidence, and I believe that in the future, I will go better.

Likes, likes, collections, and attention to private letters Author communication

Guess you like

Origin blog.csdn.net/lf21qp/article/details/131453081