【基于Java,面试复盘

在这里插入图片描述

添加船只信息:

在这里插入图片描述

增加出行路线:

在这里插入图片描述

出行路线管理:

在这里插入图片描述

船只分配出行线路:

在这里插入图片描述

船只出行路线管理:

在这里插入图片描述

增加货柜:

在这里插入图片描述

货柜管理:

在这里插入图片描述

船只分配货柜:

在这里插入图片描述

船只对应配套货柜管理:

在这里插入图片描述

未登录时,首界面显示:

在这里插入图片描述

以货柜使用情况为例:

在这里插入图片描述

其余界面暂不展示。。。

(二)代码示例



ChuanzhiAction.java 

package com.allde.wo.chuanzhi.action;

import java.io.IOException;

import java.text.SimpleDateFormat;

import java.util.Date;

import java.util.List;

import java.util.Set;

import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpSession;

import org.apache.struts2.ServletActionContext;

import com.allde.wo.chuanzhi.business.ebi.ChuanzhiEbi;

import com.allde.wo.chuanzhi.model.ChuanzhiModel;

import com.allde.wo.chuanzhi.model.ChuanzhiQueryModel;

import com.opensymphony.xwork2.ActionSupport;

import com.opensymphony.xwork2.ModelDriven;

public class ChuanzhiAction extends ActionSupport implements ModelDriven {

private ChuanzhiModel chuanzhiModel = new ChuanzhiModel();

private ChuanzhiEbi chuanzhiEbi;

	public void setChuanzhiEbi(ChuanzhiEbi chuanzhiEbi) {

	this.chuanzhiEbi = chuanzhiEbi;

}

public String create() {

	SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式

	String ttime = df.format(new Date());// new Date()为获取当前系统时间

	chuanzhiModel.setTtime(ttime);

	chuanzhiEbi.create(chuanzhiModel);

	return SUCCESS;

}

//更具id得到用户详细信息

public String getUserid(){

	HttpServletRequest request = ServletActionContext.getRequest();

	int id = Integer.parseInt(request.getParameter("id"));

	ChuanzhiQueryModel qm = new ChuanzhiQueryModel();

	qm.setId(id);

	request.setAttribute("newsxx", chuanzhiEbi.getByCondition(qm, 0, 20));

	return "xxid";

}

//根据Id得到用户信息去修改

public String getUserById(){

	HttpServletRequest request = ServletActionContext.getRequest();

	int id = Integer.parseInt(request.getParameter("id"));

	ChuanzhiQueryModel qm = new ChuanzhiQueryModel();

	qm.setId(id);

	request.setAttribute("newsupdate", chuanzhiEbi.getByCondition(qm, 0, 20));

	return "byid";

}

//删除

public String deletedById() {

	HttpServletRequest request = ServletActionContext.getRequest();

	int id = Integer.parseInt(request.getParameter("id"));

	chuanzhiEbi.delete(id);

	return "delete";

}	

//得到所有

public String getAll() {

	HttpServletRequest request = ServletActionContext.getRequest();

	request.setAttribute("newsmodel",chuanzhiEbi.getAll(0, 6));

	request.setAttribute("newsnum",chuanzhiEbi.getAllCount());

	return "newsall";

}	

//得到所有看

	public String getAllkan() {

		HttpServletRequest request = ServletActionContext.getRequest();

		request.setAttribute("newsmodel",chuanzhiEbi.getAll(0, 6));

		request.setAttribute("newsnum",chuanzhiEbi.getAllCount());

		return "newsallkan";

	}

public ChuanzhiModel getModel() {

	return chuanzhiModel;

}

public String update() {

	SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式

	String ttime = df.format(new Date());// new Date()为获取当前系统时间

	chuanzhiModel.setTtime(ttime);

	chuanzhiEbi.update(chuanzhiModel);

	return "update";

}

//分页显示首页

public String getAllFen(){

	int j = chuanzhiEbi.getAllCount();

	int jj=j-j%6;

	HttpServletRequest request = ServletActionContext.getRequest();

	int i = Integer.parseInt(request.getParameter("i"));

	

	if (i >=j) {

		request.setAttribute("i", jj);

		request.setAttribute("newsmodel", chuanzhiEbi.getAll(jj, 6));

	}else if(i<=0){

		request.setAttribute("newsmodel", chuanzhiEbi.getAll(0, 6));

	} else {

		request.setAttribute("i", i);

		request.setAttribute("newsmodel", chuanzhiEbi.getAll(i, 6));

	}

	request.setAttribute("newsnum", j);

	return "chuanzhiallf";

}

//分页显示kan

public String getAllFenkan(){



	int j = chuanzhiEbi.getAllCount();

	int jj=j-j%6;

	HttpServletRequest request = ServletActionContext.getRequest();

	int i = Integer.parseInt(request.getParameter("i"));

	

	if (i >=j) {

		request.setAttribute("i", jj);

		request.setAttribute("newsmodel", chuanzhiEbi.getAll(jj, 6));

	}else if(i<=0){

		request.setAttribute("newsmodel", chuanzhiEbi.getAll(0, 6));

	} else {

		request.setAttribute("i", i);

		request.setAttribute("newsmodel", chuanzhiEbi.getAll(i, 6));

	}

	request.setAttribute("newsnum", j);

	return "kanallf";

}

}


style.css (样式文件示例) 

@charset “utf-8”;

/* CSS Document */

body {

margin: 0px;

padding: 0px;

background-image: url(images2/bg.gif);

background-repeat: repeat-x;

font-family: Tahoma;

font-size: 12px;

color: #5366bd;

background-color: #1C1C40;

}

#wrapper {

width: 943px;

margin: 0 auto;

}

#header {

background-image: url(images2/header.jpg);

background-repeat: no-repeat;

height: 386px;

}

#nav {

height: 66px;

}

#content {

height: 360px;

padding: 23px 15px 0 30px;

}

#left {

float: left;

width: 100%;

}

#right {

float: right;

width: 228px;

}

笔者福利

以下是小编自己针对马上即将到来的金九银十准备的一套“面试宝典”,不管是技术还是HR的问题都有针对性的回答。

有了这个,面试踩雷?不存在的!

CodeChina开源项目:【一线大厂Java面试题解析+核心总结学习笔记+最新讲解视频】
回馈粉丝,诚意满满!!!




t: right;

width: 228px;

}

笔者福利

以下是小编自己针对马上即将到来的金九银十准备的一套“面试宝典”,不管是技术还是HR的问题都有针对性的回答。

有了这个,面试踩雷?不存在的!

CodeChina开源项目:【一线大厂Java面试题解析+核心总结学习笔记+最新讲解视频】
回馈粉丝,诚意满满!!!

[外链图片转存中…(img-XJApDdUP-1630667206630)]
[外链图片转存中…(img-zpNuy2aS-1630667206631)]
[外链图片转存中…(img-zNu505Zk-1630667206633)]

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值