基于SSM的项目招标网站-投标网站-招投标网站(idea-javaweb-j2ee-springboot)结果管理-评标信息-成绩-中标公示-归档-投标企业营业额经营年限随机抽取

0、效果展示

1、概述

 

随着社会不断进步和发展,生活节奏不断加快,信息已经成为我们生活中不可缺少的一部分。我们立足于信息化管理系统的基础上,使得这个招标系统能在网站上运作。实现对产品、项目、厂商三方信息的管理,提供更加简单,方便的操作平台,而设计了此管理平台。

 

 

 

2、搭建环境

 

本文以实现一个招投标网站为目标,从环境搭建到编码实现全过程讲述

我们使用javaweb、J2EE来构建招投标网站,环境使用最新版jdk和tomcat,配合mysql数据库

开发工具使用idea(也可以使用eclipse),数据库管理工具使用Navicat Premium 

开发框架使用JavaBean Servlet MVC结构;

没有使用SSH(Struts+Spring+Hibernate)或SSM(Spring+SpringMVC+MyBatis),这两个框架我们在别的项目中再介绍开发过程

 

在项目中会引入My97DatePicker作为前端日期时间选择工具,使用fckeditor作为富媒体编辑器(也可以使用百度的ueditor)

 

 

使用DWR(Direct Web Remoting)用于改善web页面与Java类交互,实现远程服务器端AJAX读取登录数据。

使用JSTL(Java server pages standarded tag library,即JSP标准标签库),此库是由JCP(Java community Proces)所制定的标准规范,它主要提供给Java Web开发人员一个标准通用的标签库,并由Apache的Jakarta小组来维护。开发人员可以利用这些标签取代JSP页面上的Java代码,从而提高程序的可读性,降低程序的维护难度。

 

3、数据表结构

 

表6zhaobiao招标项目表

字段名称

字段类型

说明

id

int

编号

realnamename

varchar

联系人姓名

zbtype

varchar

招标类型

stime

datetime

开始投标日期

etime

datetime

结束投标日期

qiye

varchar

企业名称

num

int

招标金额

zhaobiaoinfo

varchar

招标内容

​4、后端代码示例

 

// Source File Name:   BulletinServlet.java

package com.action;

import com.bean.BulletinBean; 
import java.io.IOException;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.*;

public class BulletinServlet extends HttpServlet
{

	public BulletinServlet()
	{
	}

	public void destroy()
	{
		super.destroy();
	}

	public void doGet(HttpServletRequest request, HttpServletResponse response)
		throws ServletException, IOException
	{
		doPost(request, response);
	}

	public void doPost(HttpServletRequest request, HttpServletResponse response)
		throws ServletException, IOException
	{
		response.setContentType("text/html;charset=gb2312");
		request.setCharacterEncoding("gb2312");
		HttpSession session = request.getSession();
		String method = request.getParameter("method");
		//System.out.println(method);
		
		BulletinBean Bulletin = new BulletinBean();
		if (method.equals("addBulletin"))
		{
			String title = request.getParameter("title");
			String content = request.getParameter("content");
			Debug.println(title, content);
			int flag = Bulletin.addBulletin(title,content);
			if (flag == 1)
			{
				request.setAttribute("message", "操作成功!");
				request.getRequestDispatcher("admin/bulletin/index.jsp").forward(request, response);
			} else
			{
				request.setAttribute("message", "操作失败!");
				request.getRequestDispatcher("admin/bulletin/index.jsp").forward(request, response);
			}
		} else
		if (method.equals("delBulletin"))
		{
			String id = request.getParameter("id");
			int flag = Bulletin.delBulletin(id);
			if (flag == 1)
			{
				request.setAttribute("message", "操作成功!");
				request.getRequestDispatcher("admin/bulletin/index.jsp").forward(request, response);
			} else
			{
				request.setAttribute("message", "操作失败!");
				request.getRequestDispatcher("admin/bulletin/index.jsp").forward(request, response);
			}
		} else
		if (method.equals("upBulletin"))
		{
			int id = Integer.parseInt(request.getParameter("id"));
			String title = request.getParameter("title");
			String content = request.getParameter("content");
			int flag = Bulletin.upBulletin(title,content,id);
			if (flag == 1)
			{
				request.setAttribute("message", "操作成功!");
				request.getRequestDispatcher("admin/bulletin/index.jsp").forward(request, response);
			} else
			{
				request.setAttribute("message", "操作失败!");
				request.getRequestDispatcher("admin/bulletin/index.jsp").forward(request, response);
			}
		} 
	}
		
		
	

	public void init()
		throws ServletException
	{
	}
}

5、前端代码示例

 

<%@ page language="java" import="java.util.*"  contentType="text/html;charset=gb2312"%>
<jsp:useBean id="hk" scope="page" class="com.bean.HkBean"></jsp:useBean>
<jsp:useBean id="sn" scope="page" class="com.bean.SystemBean" />
<%
String path = request.getContextPath();


%>
<HTML><HEAD>
<LINK href="<%=path%>/admin/css/Admin_Style.css" type=text/css rel=stylesheet>
<LINK href="<%=path%>/admin/css/style.css" type=text/css rel=stylesheet>

</HEAD>
<%
String message = (String)request.getAttribute("message");
	if(message == null){
		message = "";
	}
	if (!message.trim().equals("")){
		out.println("<script language='javascript'>");
		out.println("alert('"+message+"');");
		out.println("</script>");
	}
	request.removeAttribute("message");
%>
<%
	String username=(String)session.getAttribute("user");
	if(username==null){
		response.sendRedirect(path+"/error.jsp");
	}
	else{
%>
<BODY>
<table width='90%' height='25'  align="center" cellspacing='1' cellpadding='3' class="tablewidth" style="margin-top:10px">
  <tr bgcolor='#FFFFFF'>
    <td bgcolor="#FFFFFF" align="center"><strong>招标类型管理</strong></td>
  </tr>
</table>
<table width='90%' align="center" cellspacing='1' cellpadding='3' bgcolor='#CCCCCC' class="tablewidth">
<TBODY>
     <tr class="head"> 
      <td width="5%" align="center">序号</td>
      <td  align="center">类型名称</td>
      <td  align="center">操作</td>
    </tr>
    <%
			List pagelist3=hk.getZbtype();
				if(!pagelist3.isEmpty()){
				for(int i=0;i<pagelist3.size();i++){
					List pagelist2 =(ArrayList)pagelist3.get(i);			
			%> 
	<tr  class="trA" onMouseOver="this.className='trB'" onMouseOut="this.className='trA'"> 
      <td width='5%' align="center" style="border-bottom:1px dotted #ccc;"><%=i+1 %></td>
      <td align="center" bgcolor="#FFFFFF"  style="border-bottom:1px dotted #ccc;"><%=pagelist2.get(1).toString() %></td>
      <td align="center" bgcolor="#FFFFFF"  style="border-bottom:1px dotted #ccc;">
          <a href="<%=path %>/admin/zbtype/upZbtype.jsp?id=<%=pagelist2.get(0).toString()%>&name=<%=pagelist2.get(1).toString()%>">修改</a>
          <a href="<%=path%>/HkServlet?method=delZbtype&id=<%=pagelist2.get(0).toString()%>" onClick="return confirm('你确定要删除吗?');">删除</a>
      </td>
    </tr>
	
<%
	}}
%>  

  </TBODY>
</TABLE>
<form action="<%=path%>/HkServlet?method=addZbtype" method=post name=form1 onSubmit="return checkco()">
<table width='100%' cellspacing='1' cellpadding='3' bgcolor='#CCCCCC' class="tablewidth">
<tr><td align=center>类型名称:<input type=text size=30 name=name> <input type=submit value="提交"></td></tr>
</table>
</form>
<script type="text/javascript">
function checkco()
{
	if(document.form1.name.value=="")
	{
		alert("请输入类型名称!");
		return false;
	}
}
</script>
</BODY>
<%} %>
</HTML>

 

  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 4
    评论
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

计算机程序设计开发

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值