河北省重大技术需求征集系统原型(一)

2020级《软件工程》

实发项目系统开发(180分钟)

 

河北省重大技术需求征集系统原型(15分)

 

1、项目需求:

为了充分利用京津科技资源,破解我省产业转型升级、绿色崛起所面临的重大技术难题,按照厅领导指示,现面向重点产业、重点领域、重点企业(单位)征集产业或领域关键技术难题,构建我省重大技术需求数据库,特制定本工作方案。重大技术需求征集系统流程如下:

2.系统要求与功能设计

2.1 页面要求

1、根据提供的登录界面素材(login.html)完成登陆界面的展示;

2、根据提供的主界面(index.html)素材完成系统主界面的浏览展示;

3、首页为用户登录页面,用户登录后,进入主界面,要求实现密码验证,页面验证码功能;

4、需求征集功能页:实现重大技术需求征集信息的查看、在线填报、提交功能

5、需求审核功能页:浏览已提交的重大技术需求信息,并对该信息进行审核,审核结果有通过或不通过,并附有审核意见;

6、系统管理功能页:用户注册、修改密码;

7、对每页中的浏览结果要求以列表形式展示。

2.2 功能要求

1、用户注册:首次用户使用需要进行注册,然后登录本系统。1.5分)

1)用户注册需要填报用户姓名、密码、重复密码、手机号码、所属单位五项内容0.5分)

2)验证密码和重复密码保持一致0.5分);

3)验证手机号码为11位数字。0.5分)

2、用户登录功能:根据登录信息错误类型,提示用户名、密码、注册码错误;2.5分)

1)用户名不在数据库中,提示“该用户不存在”。0.5分)

2)密码错误,提示“密码错误,请重新录入”。0.5分)

3)录入验证码信息与界面显示验证码码信息不一致,提示“验证码码错误”。0.5分)

4)上述信息录入正确,页面跳转到系统主界面。0.5分)

5)根据提供的登录界面素材(login.html)完成登陆界面的展示;0.5分)

 

3、系统主界面:(1分)

1)根据提供的主界面(index.html)素材完成系统主界面的浏览展示;0.5分)

2)实现主界面左侧系统菜单栏功能,二级菜单包括需求征集、浏览需求、需求审核、用户注册、修改密码五项功能;0.5分)

 

3、需求征集:(4分)

完成河北省重大技术需求在线填报,提交功能,具体征集内容如下表所示;

河北省重大技术需求征集表

技术需求名称

 

 

重大科技需求概述(主要内容,技术指标、预期经济和社会效益等,500

 

 

 

 

研究类型

基础研究  □应用研究  □试验发展研究发展与成果应用  

技术推广与科技服务  多选

技术需求

合作模式

独立开发     ○技术转让   

技术入股    ○合作开发    (单选框)

计划总投资  

       (只能填入数字,可以有小数点)

  万元

 

(1) 实现重大技术需求在线填报功能0.5分)

(2) 实现验证重大技术需求概述字数不超过500字0.5分)

(3) 实现研究类型多选功能0.5分)

(4) 实现技术需求合作模式单选功能0.5分)

(5) 实现计划总投资数字录入功能0.5分)

(6) 实现需求信息提交后台数据库功能1分)

(7) 在后台数据库对需求信息标注状态为未审核(需求信息状态为未审核、已审核、被退回三种状态)0.5分)

 

4、浏览需求:要求实现查看已提交的需求信息功能2分)

(1) 以列表形式实现已提交需求信息查看功能,列表结果显示序号、技术需求名称、提交日期,需求状态四列内容0.5分)

(2) 实现按照需求状态过滤查询结果0.5分)

(3) 实现按照技术需求名称查询信息功能0.5分)

(4) 单击“技术需求名称”可显示需求信息的详细内容。0.5分)

 

 

 

5、需求审核:在浏览需求的功能基础上增加审核功能1分)

(1) 基本界面与浏览需求保持一致,但是结果只显示未审核的需求信息0.5分)

(2) 单击“技术需求名称”,进入需求信息详细内容界面,与浏览需求的详细信息不一样的地方在于,增加需求评审意见“通过”和“不通过”单选框,并提示输入评审意见。(0.5分)

 

 

6、修改密码:用户可以选择菜单栏中的修改密码对自己的登陆密码进行修改1分)

1)实现修改密码页面功能0.5分)

2)实现修改密码功能。0.5分)

 

 

7、数据库设计:根据题目要求完成数据库设计2分)。

 

package bean;

public class user {
    private  int id;
    private String name;
    private String mima;
    private String phone;
    private String danwei;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMima() {
        return mima;
    }

    public void setMima(String mima) {
        this.mima = mima;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getDanwei() {
        return danwei;
    }

    public void setDanwei(String danwei) {
        this.danwei = danwei;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }
}
package bean;

public class xuqiu {
    private  int id;
    private String people;
    private  String name;
    private  String gaishu;
    private  String leixing;
    private  String moshi;
    private  String touzi;
    private  String data;
    private  String zhuangtai;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getGaishu() {
        return gaishu;
    }

    public void setGaishu(String gaishu) {
        this.gaishu = gaishu;
    }

    public String getLeixing() {
        return leixing;
    }

    public void setLeixing(String leixing) {
        this.leixing = leixing;
    }

    public String getMoshi() {
        return moshi;
    }

    public void setMoshi(String moshi) {
        this.moshi = moshi;
    }

    public String getTouzi() {
        return touzi;
    }

    public void setTouzi(String touzi) {
        this.touzi = touzi;
    }

    public String getPeople() {
        return people;
    }

    public void setPeople(String people) {
        this.people = people;
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }

    public String getZhuangtai() {
        return zhuangtai;
    }

    public void setZhuangtai(String zhuangtai) {
        this.zhuangtai = zhuangtai;
    }
}
package dao;

import bean.user;
import bean.xuqiu;
import util.util;
import java.sql.*;
import java.util.ArrayList;
import java.util.List;

public class dao {
    public Connection sjk()
    {
        Connection connect;
        try {
            connect = DriverManager.getConnection("jdbc:mysql://localhost:3306/xuqiuzhengji?&useSSL=false&serverTimezone=UTC","root","123456");
            return connect;
        }catch(Exception e)
        {
            e.printStackTrace();
        }
        return null;
    }


    public boolean queryEmpty(String name,String phone,String danwei,String mima)
    {
        boolean flag=false;
        if(phone==null||"".equals((phone))&&name==null||"".equals(name)&&danwei==null||"".equals(danwei)&&mima==null||"".equals(mima))
        {
            flag=true;
        }
        return flag;
    }
    public Connection sj()
    {
        Connection connect;
        try {
            connect = DriverManager.getConnection("jdbc:mysql://localhost:3306/xuqiuzhengji?&useSSL=false&serverTimezone=UTC","root","123456");
            return connect;
        }catch(Exception e)
        {
            e.printStackTrace();
        }
        return null;
    }


    //查询旧密码是否正确
    public boolean judgemima(String name,String mima)
    {
        boolean flag=false;
        Connection connection=util.getConnection();
        ResultSet rs=null;
        String sql="select * from user where name="+name;
        try {
            Statement statement=connection.createStatement();
            rs=statement.executeQuery(sql);
            if(rs.next()) {
                String mima2 =(rs.getString("mima"));
                if (mima2.equals(mima))
                    flag=true;
            }
            util.close(rs,statement,connection);
        } catch (SQLException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

        return flag;
    }
    //修改顾客密码
    public void mimaxiugai(String mima)
    {
        try {
            PreparedStatement preparedStatement=null;
            Connection connect = DriverManager.getConnection("jdbc:mysql://localhost:3306/xuqiuzhengji?&useSSL=false&serverTimezone=UTC","root","123456");
            preparedStatement=connect.prepareStatement("Update user set mima=(mima)");
            preparedStatement.setString(2,mima);
            preparedStatement.executeUpdate();
            preparedStatement.execute();
            connect.close();
        }catch(SQLException e){
            e.printStackTrace();
        }
    }

    //录入顾客input()
    public void input(String name,String phone,String danwei,String mima)
    {
        try {
            PreparedStatement preparedStatement=null;
            Connection connect = DriverManager.getConnection("jdbc:mysql://localhost:3306/xuqiuzhengji?&useSSL=false&serverTimezone=UTC","root","123456");
            preparedStatement=connect.prepareStatement("insert into user (name,mima,phone,danwei) values (?,?,?,?)");
            preparedStatement.setString(1,name);
            preparedStatement.setString(2,mima);
            preparedStatement.setString(3,phone);
            preparedStatement.setString(4,danwei);

            preparedStatement.executeUpdate();
            connect.close();
            preparedStatement.close();
        }catch(SQLException e){
            e.printStackTrace();
        }
    }


    //录入需求input2()
    public void input2(String name,String gaishu,String leixing,String moshi,String touzi,String data,String zhuangtai,String people){
        try {
            PreparedStatement preparedStatement=null;
            Connection connect = DriverManager.getConnection("jdbc:mysql://localhost:3306/xuqiuzhengji?&useSSL=false&serverTimezone=UTC","root","123456");
            preparedStatement=connect.prepareStatement("insert into xuqiu (name,gaishu,leixing,moshi,touzi,people,data,zhuangtai) values (?,?,?,?,?,?,?,?)");
            preparedStatement.setString(1,name);
            preparedStatement.setString(2,gaishu);
            preparedStatement.setString(3,leixing);
            preparedStatement.setString(4,moshi);
            preparedStatement.setString(5,touzi);
            preparedStatement.setString(6,people);
            preparedStatement.setString(7,data);
            preparedStatement.setString(8,zhuangtai);

            preparedStatement.executeUpdate();
            connect.close();
            preparedStatement.close();
        }catch(SQLException e){
            e.printStackTrace();
        }
    }
    //显示所有需求信息
    public static xuqiu gerenxuqiu(String name) {
        List<xuqiu> list = new ArrayList<xuqiu>();
        Connection con=util.getConnection();
        ResultSet rs=null;
        String sql="select * from xuqiu where people="+name;
        try {//连接数据库的操作
            Statement statement=con.createStatement();
            rs=statement.executeQuery(sql);
            while (rs.next()) {
                xuqiu x = new xuqiu();
                x.setId(Integer.parseInt(rs.getString("id")));
                x.setName(rs.getString("name"));  ;
                x.setData(rs.getString("data"));
                x.setZhuangtai(rs.getString("zhuangtai"));

                list.add(x);
            }
            util.close(rs, statement, con);
        }catch(Exception e){
            e.printStackTrace();
        }
        return (xuqiu) list;
    }

    //显示用户需求信息
    public static xuqiu getxuqiu(String name) {
        xuqiu x = new xuqiu();
        Connection connection=util.getConnection();
        ResultSet rs=null;
        String sql="select * from xuqiu where name="+name;
        try {
            Statement statement=connection.createStatement();
            rs=statement.executeQuery(sql);
            if(rs.next()) {
                x.setName(rs.getString("name"));  ;
                x.setGaishu(rs.getString("gaishu"));
                x.setLeixing(rs.getString("leixing"));
                x.setMoshi(rs.getString("moshi"));
                x.setTouzi(rs.getString("touzi"));
                x.setData(rs.getString("data"));
                x.setZhuangtai(rs.getString("zhuangtai"));

            }
            util.close(rs,statement,connection);
        } catch (SQLException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        return x;
    }



    //判断顾客登录信息是否正确judgeguk()
    public int judge(String name,String mima)
    {
        int flag=0;
        try {
            Connection connect = DriverManager.getConnection("jdbc:mysql://localhost:3306/xuqiuzhengji?&useSSL=false&serverTimezone=UTC","root","123456");
            Statement stmt = connect.createStatement();
            ResultSet rs = stmt.executeQuery("select * from user");
            while(rs.next())
            {
                if((name.equals(rs.getString("name")))&& mima.equals(rs.getString("mima")))
                {
                    flag=1;
                }
                else if (name.equals(rs.getString("name"))&& !mima.equals(rs.getString("mima")))
                {
                    flag=2;
                }
            }
            rs.close();
            connect.close();
            stmt.close();
        }catch (SQLException e) {
            e.printStackTrace();
        }
        return  flag;
    }

}
package util;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class util {

    private static String mysqlname = "xuqiuzhengji";
    private static Connection con;
    private static Statement sta;
    private static ResultSet re;
    private static String coursename = "com.mysql.cj.jdbc.Driver";
    private static String url = "jdbc:mysql://localhost:3306/" + mysqlname + " ?serverTimezone=GMT%2B8";


    public static Connection getConnection() {
        try {
            Class.forName(coursename);
            System.out.println("连接成功");
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }
        try {
            con = DriverManager.getConnection(url, "root", "123456");
            System.out.println("LIANJIE");
        } catch (Exception e) {
            e.printStackTrace();
            con = null;
        }
        return con;
    }

    public static void close(Statement state, Connection conn) {
        if (state != null) {
            try {
                state.close();
            } catch (SQLException e) {
                e.printStackTrace();
            }
        }

        if (conn != null) {
            try {
                conn.close();
            } catch (SQLException e) {
                e.printStackTrace();
            }
        }
    }

    public static void close(ResultSet rs, Statement state, Connection conn) {
        if (rs != null) {
            try {
                rs.close();
            } catch (SQLException e) {
                e.printStackTrace();
            }
        }

        if (state != null) {
            try {
                state.close();
            } catch (SQLException e) {
                e.printStackTrace();
            }
        }

        if (conn != null) {
            try {
                conn.close();
            } catch (SQLException e) {
                e.printStackTrace();
            }
        }
    }
}

 

posted @ 2022-03-08 21:38  zrswheart  阅读(79)  评论(0编辑  收藏  举报