修改密码界面:
用户管理界面:
增加用户 界面:
新闻公告管理:
添加 新闻公告:
添加船只信息:
增加出行路线:
出行路线管理:
船只分配出行线路:
船只出行路线管理:
增加货柜:
货柜管理:
船只分配货柜:
船只对应配套货柜管理:
未登录时,首界面显示:
以货柜使用情况为例:
其余界面暂不展示。。。
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;
最后
由于篇幅限制,小编在此截出几张知识讲解的图解
CodeChina开源项目:【一线大厂Java面试题解析+核心总结学习笔记+最新讲解视频】
padding: 23px 15px 0 30px;
最后
由于篇幅限制,小编在此截出几张知识讲解的图解
CodeChina开源项目:【一线大厂Java面试题解析+核心总结学习笔记+最新讲解视频】
[外链图片转存中…(img-PwQ1Nasz-1630319009371)]
[外链图片转存中…(img-nU9PvKkn-1630319009373)]
[外链图片转存中…(img-J2qTffDf-1630319009375)]
[外链图片转存中…(img-Q9kul565-1630319009377)]
[外链图片转存中…(img-IMrEUGAM-1630319009378)]