基于javaweb+jsp的大学生个人财务记账系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Bootstrap)

基于javaweb+jsp的大学生个人财务记账系统(JavaWeb JSP MySQL Servlet SSM SpringBoot Bootstrap)

JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript Bootstrap

基础JSP+Servlet或JSP+SSM(Spring、SpringMVC、MyBatis)框架或JSP+SSM+Maven(pom.xml)框架或SpringBoot…均可修改

开发工具:eclipse/idea/myeclipse/sts等均可配置运行

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

            alert("用户名不能为空!");
            return false;
        }
        if (password == "") {
            alert("密码不能为空!");
            return false;
        }
        if (password2 != password) {
            alert("密码输入不一致!");
            return false;
        }
        return true;
    }
</script>
</html>
<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>收入编辑</title>
    <%@ include file="include/head.jsp" %>
</head>
<body>
        <div class="form-group">
            <label class="col-sm-3 control-label">密码:</label>
            <div class="col-sm-5">
                <input type="text" class="form-control" id="password" name="password">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">姓名:</label>
            <div class="col-sm-5">
                <input type="text" class="form-control" id="realName" name="realName">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">性别:</label>
            <div class="col-sm-5">
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }
    @RequestMapping("noticeDelete")
    public void delete(HttpServletResponse response, HttpServletRequest request) throws IOException {
        Serializable id = Util.decode(request, "id");
        noticeService.delete(Arrays.asList(id));
        this.redirectList(request, response);
    }

    /**
     * 编辑公告
     *
     * @param response
     * @param request
     * @throws IOException
     */
    @RequestMapping("noticeEdit")
    public void edit(HttpServletResponse response, HttpServletRequest request) throws IOException {
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">金额:</label>
                <div class="col-sm-5">
                    <input type="text" class="form-control" id="shouruJinge" name="shouruJinge" value="${vo.shouruJinge}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">收入方式:</label>
                <div class="col-sm-5">
                    <input type="text" class="form-control" id="shouruFangshi" name="shouruFangshi" value="${vo.shouruFangshi}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">时间:</label>
                <div class="col-sm-5">
                    <input type="text" class="form-control" id="shouruTime" name="shouruTime" value="${vo.shouruTime}">
                </div>
            </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">备注:</label>
            <div class="col-sm-5">
                <textarea rows="3" class="form-control" id="shouruText" name="shouruText" placeholder="请输入内容......">${vo.shouruText}</textarea>

        Integer totalRecord = (Integer) map.get("totalCount");//根据查询条件取出对应的总记录数,用于分页
        String pageNum = Util.decode(request, "pageNum");//封装分页参数
        com.demo.util.PageBean<Object> pb = new com.demo.util.PageBean(Integer.valueOf(pageNum != null ? pageNum : "1"), totalRecord);
        params.put("startIndex", pb.getStartIndex());
        params.put("pageSize", pb.getPageSize());
        List list = (List) userService.list(params).get("list");//根据分页参数startIndex、pageSize查询出来的最终结果list
        pb.setServlet("userList");
        pb.setSearchColumn(searchColumn);
        pb.setKeyword(keyword);
        pb.setList(list);
        request.getSession().setAttribute("pageBean", pb);
        request.getSession().setAttribute("list", pb.getList());

        response.sendRedirect("user_list.jsp");
    }
}
package com.demo.controller;

        userService.insert(vo);
        request.getSession().setAttribute("alert_msg", "注册成功!用户名:[" + username + "]");
        request.getRequestDispatcher("login.jsp").forward(request, response);
    }

    @RequestMapping("authLogout")
    public void logout(HttpServletResponse response, HttpServletRequest request) throws IOException {
        HttpSession session = request.getSession();
        User user = (User) session.getAttribute("loginUser");
        if (user != null) {
            session.removeAttribute("loginUser");
        }
        response.sendRedirect("login.jsp");
    }

    @RequestMapping("authValidationCode")
    public void validationCode(HttpServletResponse response, HttpServletRequest request) throws IOException {
        String codeChars = "0123456789";// 图形验证码的字符集合,系统将随机从这个字符串中选择一些字符作为验证码
        //  获得验证码集合的长度
        int charsLength = codeChars.length();
        //  下面三条记录是关闭客户端浏览器的缓冲区
        //  这三条语句都可以关闭浏览器的缓冲区,但是由于浏览器的版本不同,对这三条语句的支持也不同
        //  因此,为了保险起见,建议同时使用这三条语句来关闭浏览器的缓冲区
        response.setHeader("ragma", "No-cache");
        response.setHeader("Cache-Control", "no-cache");
        response.setDateHeader("Expires", 0);
        //  设置图形验证码的长和宽(图形的大小)
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">金额:</label>
                <div class="col-sm-5">
                    <input type="text" class="form-control" id="shouruJinge" name="shouruJinge" value="${vo.shouruJinge}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">收入方式:</label>
                <div class="col-sm-5">
                    <input type="text" class="form-control" id="shouruFangshi" name="shouruFangshi" value="${vo.shouruFangshi}">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">时间:</label>
                <div class="col-sm-5">
                    <input type="text" class="form-control" id="shouruTime" name="shouruTime" value="${vo.shouruTime}">
                </div>
     */
    @RequestMapping({"shouruGet", "shouruEditPre"})
    public void get(HttpServletResponse response, HttpServletRequest request) throws IOException {
        Serializable id = Util.decode(request, "id");//取出主键id
        Shouru vo = shouruService.get(id);
        request.getSession().setAttribute("vo", vo);
        String to = request.getRequestURI().toLowerCase().contains("get") ? "info" : "edit";//判断是去详情显示页面还是编辑页面
        response.sendRedirect("shouru_" + to + ".jsp");
    }

    /**
     * 根据条件查询收入的列表并跳转回页面
     *
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>收入编辑</title>
    <%@ include file="include/head.jsp" %>
</head>
<body>
<div class="container-fluid">
    <ul class="nav nav-tabs">
        <li><a href="shouruList">收入列表</a></li>
        <li class="active"><a href="#">编辑</a></li>
    </ul>
    <br/>
    <form class="form-horizontal" role="form" action="shouruEdit" method="post" onsubmit="return check()">
            return false;
        }
        return true;
    }
    function refresh() {
        var img = document.getElementById("img_validation_code")
        img.src = "authValidationCode?r=" + Math.random();
    }
</script>
</html>
<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<html>
<head>
    <title>注册</title>
    <link rel="stylesheet" href="js/myCss.css">
    <script src="js/jquery.min.js"></script>
    <script src="js/myJs.js"></script>
    <script type="text/javascript">
        let alert_msg = '${alert_msg}';
        if (alert_msg != null && alert_msg.trim() != '') {
            window.alert(alert_msg);
        }
    </script>
</head>
<body>
<div class="bg"></div>
<div class="container">

运行环境

Java≥6、Tomcat≥7.0、MySQL≥5.5

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

技术框架

JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript Bootstrap

基础JSP+Servlet或JSP+SSM(Spring、SpringMVC、MyBatis)框架或JSP+SSM+Maven(pom.xml)框架或SpringBoot…均可修改

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

登录、注册、退出、用户模块、公告模块、收入模块、支出模块的增删改查管理

20220319000600

20220319000601

20220319000602

20220319000603

20220319000604

20220319000605

20220319000606

20220319000607

20220319000608

20220319000609

document

java语言写的android系统,用于个人账目管理,课程设计上写的欢迎下载 package moneymanager.moneymanager; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.SQLException; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import android.util.Log; /* * * 데이터베이스를 관리하는 클래스입니다. * */ public class DBAdapter { private static final String TAG = "NotesDbAdapter"; private DatabaseHelper mDbHelper; private SQLiteDatabase mDb; // 데이터베이스이름과 테블이름들을 정의 private static final String DATABASE_NAME = "MoneyManagerDB"; private static final int DATABASE_VERSION = 2; private static final String DATABASE_SETTING_TABLE = "SettingTbl"; private static final String DATABASE_BADGET_TABLE = "BadgetTbl"; private static final String DATABASE_PAYMENT_TABLE = "PaymentTbl"; // 테블안의 항목들을 정의 public static final String KEY_SETTINGTBL_ID = "ID"; public static final String KEY_SETTINGTBL_NAME = "Name"; public static final String KEY_SETTINGTBL_VALUE = "Value"; public static final String KEY_BADGETTBL_ID = "ID"; public static final String KEY_BADGETTBL_ITEM = "Item"; public static final String KEY_BADGETTBL_MONEY = "Money"; public static final String KEY_PAYMENTTBL_ID = "ID"; public static final String KEY_PAYMENTTBL_BADGETID = "BadgetID"; public static final String KEY_PAYMENTTBL_OUTDATE = "OutDate"; public static final String KEY_PAYMENTTBL_MONEY = "Money"; public static final String KEY_PAYMENTTBL_NOTE = "Note"; private final Context mCtx; private static class DatabaseHelper extends SQLiteOpenHelper { DatabaseHelper(Context context) { super(context, DATABASE_NAME, null, DATABASE_VERSION); } @Override public void onCreate(SQLiteDatabase db) { String strCreateTbl; // SettingTbl생성 strCreateTbl = "CREATE TABLE " + DATABASE_SETTING_TABLE + " (" + KEY_SETTINGTBL_ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " + KEY_SETTINGTBL_NAME + " TEXT NOT NULL, " + KEY_SETTINGTBL_VALUE + " TEXT NOT NULL);"; db.execSQL(strCreateTbl); // BadgetTbl생성 strCreateTbl = "CREATE TABLE " + DATABASE_BADGET_TABLE + " (" + KEY_BADGETTBL_ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " + KEY_BADGETTBL_ITEM + " TEXT NOT NULL, " + KEY_BADGETTBL_MONEY + " INTEGER NOT NULL);"; db.execSQL(strCreateTbl); // PaymentTbl생성 strCreateTbl = "CREATE TABLE " + DATABASE_PAYMENT_TABLE + " (" + KEY_PAYMENTTBL_ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " + KEY_PAYMENTTBL_BADGETID + " INTEGER NOT NULL, " + KEY_PAYMENTTBL_OUTDATE + " TEXT NOT NULL, " + KEY_PAYMENTTBL_MONEY + " INTEGER NOT NULL, " + KEY_PAYMENTTBL_NOTE + " TEXT);"; db.execSQL(strCreateTbl); } ......
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值