SpringBoot+Vue realizes the 4S shop vehicle management system that separates front and back ends

Get the source code at the end of the article

Development language: Java
Development tools: IDEA/Eclipse
Database: MYSQL5.7/8.0
Application service: Tomcat7/Tomcat8
Whether Maven project: Yes Back-
end framework: SpringBoot
Front-end framework: vue+element, etc.
JDK version: jdk1.8
Project architecture: B /S schema

Introduction

Any system must follow the basic process of system design, and this system is no exception. It also needs to go through the steps of market research, demand analysis, outline design, detailed design, coding, and testing. Based on the java language, the 4S shop vehicle system is designed and implemented. The system is based on B/S, the so-called browser/server mode, applies java technology, and selects MySQL as the background database. The system mainly includes home page, personal center, salesman management, maintenance personnel management, customer management, supplier information management, insurance company management, vehicle information management, material information management, vehicle sales management, vehicle maintenance management, business statistics management, sales statistics Management and other functional modules.

This paper first introduces the technical development background and development status of 4S shop vehicle management, and then follows the routine software development process. First, select the appropriate language and development platform for the system, formulate modules and design database structures according to demand analysis, and then follow the overall system function modules. Design and draw system functional module diagrams, flow charts and ER diagrams. Then, design the framework and write code according to the designed framework to realize each functional module of the system. Finally, the preliminary completed system is tested, mainly functional test, unit test and performance test. The test results show that the system can achieve the required functions, and the operating conditions are acceptable without obvious shortcomings . 

Functional requirements analysis 

System function requirements analysis is through the software developers participating in market research, communicating with managers and users, after detailed and careful thinking, and then discussing the functions required for initial system development after research. This is the first and crucial step of development. If the modules required by the system are not formulated at this stage, it will bring unnecessary trouble in the future. Therefore, you must be serious and devote yourself to this step.

This system is developed using a top-down approach, and the basic positioning is as follows:

This subject requires the realization of a 4S shop vehicle management system, which mainly includes functional modules such as administrators, salesmen and maintenance staff .

System function structure diagram 

System implementation 

system login

The user logs in by filling in the user name, password, role selection and other information entered during registration, as shown in the figure

Administrator function module

The administrator can log into the 4S shop vehicle system to view the home page, personal center, salesman management, maintenance management, customer management, supplier information management, insurance company management, vehicle information management, material information management, vehicle sales management, vehicle maintenance management , business statistics management, sales statistics management and other functions for detailed operations, as shown in the figure

 

Salesman Management

In the salesman management page, you can perform details, modify and delete operations on the index, sales account, sales name, gender, age, mobile phone, address, etc.; as shown in the figure 

Maintenance man management

In the maintenance manager management page, you can perform details, modify and delete operations on the index, maintenance account, maintenance name, gender, age, mobile phone, address, etc.; as shown in the figure 

customer management

In the customer management page, the index, customer number, customer name, contact information, vehicle brand, car purchase method, delivery time, insurance period and other contents can be detailed, modified and deleted; as shown in the figure 

Supplier Information Management

In the supplier information management page, the index, supplier name, address, person in charge, contact information, remarks and other contents can be detailed, modified and deleted; as shown in the figure 

Insurance company management

In the insurance company management page, you can perform details, modify and delete operations on the index, company number, company name, address, person in charge, contact information, remarks, etc.; as shown in the figure 

vehicle information management

In the vehicle information management page, the index, vehicle number, vehicle brand, seat number, gear shift method, quantity, price, supplier, vehicle picture and other contents can be detailed, modified and deleted; as shown in the figure 

Material information management

In the material information management page, you can perform details, modify and delete operations on the index, material number, material name, specification, quantity, unit price, supplier, material picture, etc.; as shown in the figure 

vehicle sales management

In the vehicle sales management page, the index, order number, vehicle number, vehicle brand, quantity, price, whether to pay, payment method, customer name, estimated delivery time, sales date, sales account number, sales name, etc. can be detailed. , modify the operation; as shown in the figure 

vehicle maintenance management

In the vehicle maintenance management page, you can perform details and delete operations on the index, maintenance order number, maintenance vehicle, customer name, maintenance status, maintenance cost, maintenance time, end time, maintenance account, and maintenance name; as shown in the figure.

 

Business Statistics Management

In the business statistics management page, you can perform details, modify and delete operations on the index, statistical month, statistical type, total sales, remarks, etc.; as shown in the figure

 

Salesperson function module 

The salesperson can log into the 4S shop vehicle system to view the home page, personal center, customer management, supplier information management, insurance company management, vehicle information management, vehicle sales management and other functions, and perform detailed operations, as shown in the figure

personal center

On the personal information page, modify personal information by filling in the sales account number, gender, mobile phone, sales name, age, address, etc.; as shown in the figure 

customer management

In the customer management page, you can perform detailed operations on the index, customer number, customer name, contact information, vehicle brand, car purchase method, delivery time, insurance period, etc.; as shown in the figure 

vehicle information management

In the vehicle information management page, you can conduct details and sales operations on the index, vehicle number, vehicle brand, seat number, gear shift method, quantity, price, supplier, vehicle picture, etc.; as shown in the figure 

Maintenance function module

The maintenance staff can log in to the 4S shop vehicle system to view the home page, personal center, customer management, supplier information management, insurance company management, material information management, vehicle maintenance management and other functions, and perform detailed operations, as shown in the figure

 

Material information management

In the material information management page, you can perform detailed operations on the index, material number, material name, specification, quantity, unit price, supplier, material picture, etc.; as shown in the figure 

Insurance company management

In the insurance company management page, you can perform detailed operations on the index, company number, company name, address, person in charge, contact information, remarks, etc.; as shown in the figure 

Part of the core code:  

/**
 * 车辆维修
 * 后端接口
 * @author 
 * @email 
 * @date 2022-05-06 18:06:12
 */
@RestController
@RequestMapping("/cheliangweixiu")
public class CheliangweixiuController {
    @Autowired
    private CheliangweixiuService cheliangweixiuService;


    


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

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

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

	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(CheliangweixiuEntity cheliangweixiu){
        EntityWrapper< CheliangweixiuEntity> ew = new EntityWrapper< CheliangweixiuEntity>();
 		ew.allEq(MPUtil.allEQMapPre( cheliangweixiu, "cheliangweixiu")); 
		CheliangweixiuView cheliangweixiuView =  cheliangweixiuService.selectView(ew);
		return R.ok("查询车辆维修成功").put("data", cheliangweixiuView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        CheliangweixiuEntity cheliangweixiu = cheliangweixiuService.selectById(id);
        return R.ok().put("data", cheliangweixiu);
    }

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



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

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

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        cheliangweixiuService.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<CheliangweixiuEntity> wrapper = new EntityWrapper<CheliangweixiuEntity>();
		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("weixiuyuan")) {
			wrapper.eq("weixiuzhanghao", (String)request.getSession().getAttribute("username"));
		}

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







}

 

 

 

Guess you like

Origin blog.csdn.net/m0_49113107/article/details/125745467