Fresh food store distribution management system based on springboot (idea+springboot+html+thymeleaf)

1. System introduction


This project is developed using idea tools, written with html+springboot+mybatis+jquery+thymeleaf technology, and the database is developed using mysql and navicat tool.

The system is divided into 5 roles: administrator, order taker, dispatcher, driver, and store.

2. Module Introduction

administrator

1. Login

2. Statistical management

3. Store management

4. Fresh food management

5. Order taker management

6. Dispatcher management

7. Driver management

8. Automobile management

9. Order management

10. Announcement management

order taker

1. Login

2. Personal information management

3. Check the order

4. Process the order and submit it to the dispatcher

5. Check the announcement

dispatcher

1. Login

2. Personal information management

3. Check the order

4. Process orders, assign drivers, and allocate cars

5. Check the announcement

store

1. Login

2. Personal information management

3. Check the order

4. Check fresh food

5. Apply for fresh food

6. Sign for the order

7. View announcements

8. Management address

driver

1. Login

2. Personal information management

3. Check the order

4. Delivery of fresh food

5. Return the car

6. View announcements

Project introduction:
Difficulty level: ✩✩✩
User type: 5 roles (administrator, order taker, dispatcher, driver, store)
Design pattern: MVC
Project architecture: B/S architecture
Development language: Java language< a i=6> Front-end technology: bootstrap+HTML, CSS, JS, JQuery, thymeleaf, etc. Back-end technology: springboot+mybatis framework Running environment: Windows7 or 10. JDK1.8 Running tools: This system is developed using idea and only supports idea running. It does not support MyEclipse and eclipse running. Because the skeletons of the three are different, forcing the import to open and run may cause An unknown error occurred. Database: MySQL version 5.5/5.7/8.0 Whether it is based on Maven environment: Yes Whether it uses a framework: Yes Number of database tables: 12 tables Number of JSP pages: more than 30 Whether there is paging: There is paging









How to obtain:xystgl · master · code theft_java_bishe / java system · GitCode

Related screenshots

Related code

Log in

<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>登录</title>
    <link rel="icon" th:href="@{/public/favicon.ico}" type="image/x-icon"/>
    <link rel="bookmark" th:href="@{/public/favicon.ico}" type="image/x-icon"/>
    <link rel="stylesheet" type="text/css"  th:href="@{/css/bootstrap.css}">
    <link rel="stylesheet" type="text/css"  th:href="@{/css/back.css}">
    <link rel="stylesheet" type="text/css"  th:href="@{/css/bootstrap-theme.css}">
    <script type="text/javascript" th:src="@{/js/jquery-3.6.0.js}"></script>
    <script type="text/javascript" th:src="@{/js/login.js}"></script>
    <script>
        $(function() {
            //防止页面后退
            history.pushState(null, null, document.URL);
            window.addEventListener('popstate', function () {
                history.pushState(null, null, document.URL);
            });
        })
    </script>
</head>
<body onload="loadTopWindow()">
<div id="magicalDragScene" class="mc-root mc-ui-absolute-pane">
    <h1 style="margin-left: 30%;margin-top: 8%;font-family: 隶书;font-size: 60px;color: white" >豪海生鲜门店配送管理系统</h1>
    <br>
    <div id="tmd" style="margin-left: 35%;width: 25%;height: 300px;">
        <form style="margin: 0 auto;width: 80%;height: 300px;" th:action="@{/loginUser}" method="post" onsubmit="return regCheck()">
            <h1 class="h3 mb-3 font-weight-normal" style="color:white;font-family: 隶书;text-align: center;" >登录</h1>
            <input id="username" name="username" class="layui-input" type="text"  th:placeholder="请填写用户名"/>
            <input id="password" name="password" class="layui-input" style="margin-top: 5px" type="password" th:placeholder="请填写用户密码" origin-type="password"/>
            <br>
            <select name="type" class="form-control" style="width: 75%">
                <option value="1" selected>管理员</option>
                <option value="2">接单员</option>
                <option value="3">调度员</option>
                <option value="4">司机</option>
                <option value="5">门店</option>
            </select>
            <!--<input  name="type" value="1" style="margin-top: 5px" type="radio" checked/>管理员
            <input  name="type" value="2" style="margin-top: 5px" type="radio" />救助者-->

            <!--   <input name="remember" type="checkbox" style="margin-top: 15px;">&nbsp;<span style="color: #43a047;" ></span>-->
           <span id="statusTip" style="color: #d62727;font-size: 15px;margin-left: 40%" th:text="${status}"></span><br>
          <!--  <div class="form-check form-check-inline"></div>-->

            <!--<p class="mt-5 mb-3 text-muted text-sm-right" style="margin-top: 10px"><span >还没有账号,</span>
                <a class="text-info" th:href="@{/toReg}" draggable="false" style="color: #43a047" >求助者注册</a>
                <a class="text-info" th:href="@{/toReg2}" style="color: #00a1d6;margin-left: 2px" >救援者注册</a>
            </p>-->
            <button class="layui-btn1" style="width: 300px;height: 40px;font-size: 16px;margin-top: 50px;color: white" type="submit">登录</button>
        </form>
    </div>
    <br>
 <!--   <a style="color: white;margin-left: 75%" th:href="@{/login.html(language='zh_CN')}">中文</a>&nbsp;&nbsp;&nbsp;&nbsp;
    <a style="color: white" th:href="@{/login.html(language='en_US')}">English</a>-->


</div>

</body>
</html>

    /**
     * 登录
     * @param username
     * @param password
     * @param type
     * @param httpSession
     * @param model
     * @return
     * @throws UnsupportedEncodingException
     */
    @RequestMapping(value = "/loginUser",method = RequestMethod.POST)
    public String loginUser( String username,String password, String type,HttpSession httpSession, Model model) throws UnsupportedEncodingException {
        Admin admin = new Admin();
        if(type !=null&& type.equals("1")){
            admin = loginService.selectAdmin(username,password);
            if (admin != null){
                httpSession.setAttribute("username",admin.getUsername());
                httpSession.setAttribute("admin",admin);
                httpSession.setAttribute("type",type);
                model.addAttribute("type",type);

                return "home/homepage";
            }else{
                model.addAttribute("status","账号或者密码输入错误!");
                return "login";
            }
        }
       else if(type.equals("2")){//接单员
            User user = loginService.selectUser(username,password,"1");
            if(user != null){
                httpSession.setAttribute("username",user.getNames());
                httpSession.setAttribute("user",user);
                httpSession.setAttribute("type",type);
                model.addAttribute("type",type);
                return "home/homepage";
            }else{
                model.addAttribute("status","账号或者密码输入错误!");
                return "login";
            }
        }else if(type.equals("3")){//调度员
            User user = loginService.selectUser(username,password,"2");
            if(user != null){
                httpSession.setAttribute("username",user.getNames());
                httpSession.setAttribute("user",user);
                httpSession.setAttribute("type",type);
                model.addAttribute("type",type);

                return "home/homepage";
            }else{
                model.addAttribute("status","账号或者密码输入错误!");
                return "login";
            }
        }else if(type.equals("5")){//门店
            Store store = loginService.selectStore(username,password);
            if(store != null){
                httpSession.setAttribute("username",store.getNames());
                httpSession.setAttribute("store",store);
                httpSession.setAttribute("type",type);
                model.addAttribute("type",type);

                return "home/homepage";
            }else{
                model.addAttribute("status","账号或者密码输入错误!");
                return "login";
            }
        }else if(type.equals("4")){//司机
            Driver driver = loginService.selectDriver(username,password);
            if(driver != null){
                httpSession.setAttribute("username",driver.getNames());
                httpSession.setAttribute("driver",driver);
                httpSession.setAttribute("type",type);
                model.addAttribute("type",type);

                return "home/homepage";
            }else{
                model.addAttribute("status","账号或者密码输入错误!");
                return "login";
            }
        }else{
            model.addAttribute("status","账号或者密码输入错误!");
            return "login";
        }
    }

The other module codes are similar. This project is suitable for beginners to learn from.
If you like it, please like and follow it. Interested students can study it! ! ! ! !

Many of the data in the project screenshots are used for testing, so you need to add appropriate data pictures yourself! !
Not open source! ! ! ! ! ! Thank you = v =

Guess you like

Origin blog.csdn.net/qq_43485489/article/details/126487018