消防栓監控系統設計與開發
- 消防栓監控系統設計與開發mysql資料庫建立語句
- 消防栓監控系統設計與開發oracle資料庫建立語句
- 消防栓監控系統設計與開發sqlserver資料庫建立語句
- 消防栓監控系統設計與開發spring springMVC hibernate框架物件(javaBean,pojo)設計
- 消防栓監控系統設計與開發spring springMVC mybatis框架物件(javaBean,pojo)設計
摘要: 目前,消防栓沒有有效的監管措施,只能依靠人員巡檢,必然會造成監管不到位,並且造成維護和保養的落實不到位。隨著網際網路的快速發展,企業漸漸的意識到消防栓監控的重要性。消防栓監控技術是指客戶通過瀏覽器、伺服器、資料庫的資訊互動來獲取現場的裝置資訊和產品的生產狀況,並且最後將資訊儲存在資料庫中。
本文介紹的消防栓監控系統以伺服器、資料庫、監控機以及現場控制器為核心設計開發的。通過監控機的瀏覽器向伺服器傳送請求,伺服器處理請求後與資料庫實現資料傳輸,最終動態的顯示在瀏覽器上。通過消防栓監控系統實現了控制消防栓、消防栓動態的實時顯示等重要功能。本文提出的系統設計方案克服了地域性的限制,提高了消防栓管理和維護。
關鍵詞:遠端監控,Web,消防栓
1 文獻綜述
監控系統是集各種技術為一體的高科技產品,它操作便捷、控制效果好。它可以很
有效的應用於人們的生活和企業的生產。目前,對監控系統的定義是比較一致的,即指可以實現資料採集、裝置監視等功能的計算機系統,通常人們叫它 SCADA。在這個系統中,計算機可以直接對監控物件進行操作、處理。通常遠端監控系統有如下特點:實時性、易維護性、可靠性、通訊功能等。監控技術通過與計算機網路技術的結合,促進了新的相關技術不斷出現。例如遠端監控、遠端製造等。消防栓實時監控是指本地監控機通過網路實現對現場裝置遠端監控、瞭解消防栓動態。研究消防栓監控的主要意義如下:
第一:採用遠端實時監控技術,技術人員可以通過客戶端對裝置進行操作,而不用親自到現場解決,這樣大大提高了勞動生產率。
第二:遠端監控技術可以充分利用人力資源。如果裝置出現現場技術人員不能解決的問題,可以通過網路詢問裝置對應的廠商或者相關的專家,通過專家的處理使得生產活動正常進行,保障了生產活動的正常進行。
第三:消防栓監控系統通過使用資料庫完成對資料的儲存,這樣對未來裝置的故障診斷提供了資料基礎。
在遠端監控系統的發展過程中,我們把它分為兩種型別
消防栓監控系統設計與開發mysql資料庫版本原始碼:
超級管理員表建立語句如下:
create table t_admin(
id int primary key auto_increment comment '主鍵',
username varchar(100) comment '超級管理員賬號',
password varchar(100) comment '超級管理員密碼'
) comment '超級管理員';
insert into t_admin(username,password) values('admin','123456');
異常表建立語句如下:
create table t_error(
id int primary key auto_increment comment '主鍵',
ename varchar(100) comment '異常名稱',
description varchar(100) comment '異常描述'
) comment '異常';
消防栓資訊表建立語句如下:
create table t_hydrant(
id int primary key auto_increment comment '主鍵',
hlocation varchar(100) comment '定位',
htime datetime comment '加入時間',
hpicture varchar(100) comment '消防栓圖片',
htype varchar(100) comment '消防栓型別',
title varchar(100) comment '編號'
) comment '消防栓資訊';
維修訂單表建立語句如下:
create table t_repair(
id int primary key auto_increment comment '主鍵',
hydrantId int comment '消防栓',
rmanId int comment '維修員',
errorId int comment '異常',
rtime datetime comment '維修時間',
result varchar(100) comment '維修結果'
) comment '維修訂單';
維修人員表建立語句如下:
create table t_rman(
id int primary key auto_increment comment '主鍵',
rname varchar(100) comment '維修員姓名',
rphone varchar(100) comment '維修員電話',
raddress varchar(100) comment '維修員地址'
) comment '維修人員';
消防栓狀態表建立語句如下:
create table t_state(
id int primary key auto_increment comment '主鍵',
hydrantId int comment '消防栓',
stime datetime comment '狀態時間',
stypeId int comment '狀態型別',
snumber int comment '狀態數值'
) comment '消防栓狀態';
狀態型別表建立語句如下:
create table t_stype(
id int primary key auto_increment comment '主鍵',
tname varchar(100) comment '狀態名稱',
unit varchar(100) comment '狀態單位'
) comment '狀態型別';
使用者表建立語句如下:
create table t_user(
id int primary key auto_increment comment '主鍵',
username varchar(100) comment '賬號',
password varchar(100) comment '密碼',
name varchar(100) comment '姓名',
phone varchar(100) comment '電話',
role varchar(100) comment '角色',
address varchar(100) comment '地址'
) comment '使用者';
消防栓監控系統設計與開發oracle資料庫版本原始碼:
超級管理員表建立語句如下:
create table t_admin(
id integer,
username varchar(100),
password varchar(100)
);
insert into t_admin(id,username,password) values(1,'admin','123456');
--超級管理員欄位加註釋
comment on column t_admin.id is '主鍵';
comment on column t_admin.username is '超級管理員賬號';
comment on column t_admin.password is '超級管理員密碼';
--超級管理員表加註釋
comment on table t_admin is '超級管理員';
異常表建立語句如下:
create table t_error(
id integer,
ename varchar(100),
description varchar(100)
);
--異常欄位加註釋
comment on column t_error.id is '主鍵';
comment on column t_error.ename is '異常名稱';
comment on column t_error.description is '異常描述';
--異常表加註釋
comment on table t_error is '異常';
消防栓資訊表建立語句如下:
create table t_hydrant(
id integer,
hlocation varchar(100),
htime datetime,
hpicture varchar(100),
htype varchar(100),
title varchar(100)
);
--消防栓資訊欄位加註釋
comment on column t_hydrant.id is '主鍵';
comment on column t_hydrant.hlocation is '定位';
comment on column t_hydrant.htime is '加入時間';
comment on column t_hydrant.hpicture is '消防栓圖片';
comment on column t_hydrant.htype is '消防栓型別';
comment on column t_hydrant.title is '編號';
--消防栓資訊表加註釋
comment on table t_hydrant is '消防栓資訊';
維修訂單表建立語句如下:
create table t_repair(
id integer,
hydrantId int,
rmanId int,
errorId int,
rtime datetime,
result varchar(100)
);
--維修訂單欄位加註釋
comment on column t_repair.id is '主鍵';
comment on column t_repair.hydrantId is '消防栓';
comment on column t_repair.rmanId is '維修員';
comment on column t_repair.errorId is '異常';
comment on column t_repair.rtime is '維修時間';
comment on column t_repair.result is '維修結果';
--維修訂單表加註釋
comment on table t_repair is '維修訂單';
維修人員表建立語句如下:
create table t_rman(
id integer,
rname varchar(100),
rphone varchar(100),
raddress varchar(100)
);
--維修人員欄位加註釋
comment on column t_rman.id is '主鍵';
comment on column t_rman.rname is '維修員姓名';
comment on column t_rman.rphone is '維修員電話';
comment on column t_rman.raddress is '維修員地址';
--維修人員表加註釋
comment on table t_rman is '維修人員';
消防栓狀態表建立語句如下:
create table t_state(
id integer,
hydrantId int,
stime datetime,
stypeId int,
snumber int
);
--消防栓狀態欄位加註釋
comment on column t_state.id is '主鍵';
comment on column t_state.hydrantId is '消防栓';
comment on column t_state.stime is '狀態時間';
comment on column t_state.stypeId is '狀態型別';
comment on column t_state.snumber is '狀態數值';
--消防栓狀態表加註釋
comment on table t_state is '消防栓狀態';
狀態型別表建立語句如下:
create table t_stype(
id integer,
tname varchar(100),
unit varchar(100)
);
--狀態型別欄位加註釋
comment on column t_stype.id is '主鍵';
comment on column t_stype.tname is '狀態名稱';
comment on column t_stype.unit is '狀態單位';
--狀態型別表加註釋
comment on table t_stype is '狀態型別';
使用者表建立語句如下:
create table t_user(
id integer,
username varchar(100),
password varchar(100),
name varchar(100),
phone varchar(100),
role varchar(100),
address varchar(100)
);
--使用者欄位加註釋
comment on column t_user.id is '主鍵';
comment on column t_user.username is '賬號';
comment on column t_user.password is '密碼';
comment on column t_user.name is '姓名';
comment on column t_user.phone is '電話';
comment on column t_user.role is '角色';
comment on column t_user.address is '地址';
--使用者表加註釋
comment on table t_user is '使用者';
oracle特有,對應序列如下:
create sequence s_t_error;
create sequence s_t_hydrant;
create sequence s_t_repair;
create sequence s_t_rman;
create sequence s_t_state;
create sequence s_t_stype;
create sequence s_t_user;
消防栓監控系統設計與開發sqlserver資料庫版本原始碼:
超級管理員表建立語句如下:
--超級管理員
create table t_admin(
id int identity(1,1) primary key not null,--主鍵
username varchar(100),--超級管理員賬號
password varchar(100)--超級管理員密碼
);
insert into t_admin(username,password) values('admin','123456');
異常表建立語句如下:
--異常表註釋
create table t_error(
id int identity(1,1) primary key not null,--主鍵
ename varchar(100),--異常名稱
description varchar(100)--異常描述
);
消防栓資訊表建立語句如下:
--消防栓資訊表註釋
create table t_hydrant(
id int identity(1,1) primary key not null,--主鍵
hlocation varchar(100),--定位
htime datetime,--加入時間
hpicture varchar(100),--消防栓圖片
htype varchar(100),--消防栓型別
title varchar(100)--編號
);
維修訂單表建立語句如下:
--維修訂單表註釋
create table t_repair(
id int identity(1,1) primary key not null,--主鍵
hydrantId int,--消防栓
rmanId int,--維修員
errorId int,--異常
rtime datetime,--維修時間
result varchar(100)--維修結果
);
維修人員表建立語句如下:
--維修人員表註釋
create table t_rman(
id int identity(1,1) primary key not null,--主鍵
rname varchar(100),--維修員姓名
rphone varchar(100),--維修員電話
raddress varchar(100)--維修員地址
);
消防栓狀態表建立語句如下:
--消防栓狀態表註釋
create table t_state(
id int identity(1,1) primary key not null,--主鍵
hydrantId int,--消防栓
stime datetime,--狀態時間
stypeId int,--狀態型別
snumber int--狀態數值
);
狀態型別表建立語句如下:
--狀態型別表註釋
create table t_stype(
id int identity(1,1) primary key not null,--主鍵
tname varchar(100),--狀態名稱
unit varchar(100)--狀態單位
);
使用者表建立語句如下:
--使用者表註釋
create table t_user(
id int identity(1,1) primary key not null,--主鍵
username varchar(100),--賬號
password varchar(100),--密碼
name varchar(100),--姓名
phone varchar(100),--電話
role varchar(100),--角色
address varchar(100)--地址
);
消防栓監控系統設計與開發spring springMVC hibernate框架物件(javaBean,pojo)設計:
異常javaBean建立語句如下:
package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity
//異常
@Table(name = "t_error")
public class Error {
//主鍵
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//異常名稱
private String ename;
//異常描述
private String description;
public String getEname() {return ename;}
public void setEname(String ename) {this.ename = ename;}
public String getDescription() {return description;}
public void setDescription(String description) {this.description = description;}
}
消防栓資訊javaBean建立語句如下:
package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity
//消防栓資訊
@Table(name = "t_hydrant")
public class Hydrant {
//主鍵
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//定位
private String hlocation;
//加入時間
private Date htime;
//消防栓圖片
private String hpicture;
//消防栓型別
private String htype;
//編號
private String title;
public String getHlocation() {return hlocation;}
public void setHlocation(String hlocation) {this.hlocation = hlocation;}
public Date getHtime() {return htime;}
public void setHtime(Date htime) {this.htime = htime;}
public String getHpicture() {return hpicture;}
public void setHpicture(String hpicture) {this.hpicture = hpicture;}
public String getHtype() {return htype;}
public void setHtype(String htype) {this.htype = htype;}
public String getTitle() {return title;}
public void setTitle(String title) {this.title = title;}
}
維修訂單javaBean建立語句如下:
package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity
//維修訂單
@Table(name = "t_repair")
public class Repair {
//主鍵
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//消防栓
private Integer hydrantId;
//維修員
private Integer rmanId;
//異常
private Integer errorId;
//維修時間
private Date rtime;
//維修結果
private String result;
public Integer getHydrantId() {return hydrantId;}
public void setHydrantId(Integer hydrantId) {this.hydrantId = hydrantId;}
public Integer getRmanId() {return rmanId;}
public void setRmanId(Integer rmanId) {this.rmanId = rmanId;}
public Integer getErrorId() {return errorId;}
public void setErrorId(Integer errorId) {this.errorId = errorId;}
public Date getRtime() {return rtime;}
public void setRtime(Date rtime) {this.rtime = rtime;}
public String getResult() {return result;}
public void setResult(String result) {this.result = result;}
}
維修人員javaBean建立語句如下:
package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity
//維修人員
@Table(name = "t_rman")
public class Rman {
//主鍵
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//維修員姓名
private String rname;
//維修員電話
private String rphone;
//維修員地址
private String raddress;
public String getRname() {return rname;}
public void setRname(String rname) {this.rname = rname;}
public String getRphone() {return rphone;}
public void setRphone(String rphone) {this.rphone = rphone;}
public String getRaddress() {return raddress;}
public void setRaddress(String raddress) {this.raddress = raddress;}
}
消防栓狀態javaBean建立語句如下:
package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity
//消防栓狀態
@Table(name = "t_state")
public class State {
//主鍵
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//消防栓
private Integer hydrantId;
//狀態時間
private Date stime;
//狀態型別
private Integer stypeId;
//狀態數值
private Integer snumber;
public Integer getHydrantId() {return hydrantId;}
public void setHydrantId(Integer hydrantId) {this.hydrantId = hydrantId;}
public Date getStime() {return stime;}
public void setStime(Date stime) {this.stime = stime;}
public Integer getStypeId() {return stypeId;}
public void setStypeId(Integer stypeId) {this.stypeId = stypeId;}
public Integer getSnumber() {return snumber;}
public void setSnumber(Integer snumber) {this.snumber = snumber;}
}
狀態型別javaBean建立語句如下:
package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity
//狀態型別
@Table(name = "t_stype")
public class Stype {
//主鍵
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//狀態名稱
private String tname;
//狀態單位
private String unit;
public String getTname() {return tname;}
public void setTname(String tname) {this.tname = tname;}
public String getUnit() {return unit;}
public void setUnit(String unit) {this.unit = unit;}
}
使用者javaBean建立語句如下:
package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity
//使用者
@Table(name = "t_user")
public class User {
//主鍵
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//賬號
private String username;
//密碼
private String password;
//姓名
private String name;
//電話
private String phone;
//角色
private String role;
//地址
private String address;
public String getUsername() {return username;}
public void setUsername(String username) {this.username = username;}
public String getPassword() {return password;}
public void setPassword(String password) {this.password = password;}
public String getName() {return name;}
public void setName(String name) {this.name = name;}
public String getPhone() {return phone;}
public void setPhone(String phone) {this.phone = phone;}
public String getRole() {return role;}
public void setRole(String role) {this.role = role;}
public String getAddress() {return address;}
public void setAddress(String address) {this.address = address;}
}
消防栓監控系統設計與開發spring springMVC mybatis框架物件(javaBean,pojo)設計:
異常javaBean建立語句如下:
package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
//異常
public class Error extends BaseBean{
//主鍵
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//異常名稱
private String ename;
//異常描述
private String description;
public String getEname() {return ename;}
public void setEname(String ename) {this.ename = ename;}
public String getDescription() {return description;}
public void setDescription(String description) {this.description = description;}
}
消防栓資訊javaBean建立語句如下:
package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
//消防栓資訊
public class Hydrant extends BaseBean{
//主鍵
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//定位
private String hlocation;
//加入時間
private Date htime;
//消防栓圖片
private String hpicture;
//消防栓型別
private String htype;
//編號
private String title;
public String getHlocation() {return hlocation;}
public void setHlocation(String hlocation) {this.hlocation = hlocation;}
public Date getHtime() {return htime;}
public void setHtime(Date htime) {this.htime = htime;}
public String getHpicture() {return hpicture;}
public void setHpicture(String hpicture) {this.hpicture = hpicture;}
public String getHtype() {return htype;}
public void setHtype(String htype) {this.htype = htype;}
public String getTitle() {return title;}
public void setTitle(String title) {this.title = title;}
}
維修訂單javaBean建立語句如下:
package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
//維修訂單
public class Repair extends BaseBean{
//主鍵
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//消防栓
private Integer hydrantId;
//維修員
private Integer rmanId;
//異常
private Integer errorId;
//維修時間
private Date rtime;
//維修結果
private String result;
public Integer getHydrantId() {return hydrantId;}
public void setHydrantId(Integer hydrantId) {this.hydrantId = hydrantId;}
public Integer getRmanId() {return rmanId;}
public void setRmanId(Integer rmanId) {this.rmanId = rmanId;}
public Integer getErrorId() {return errorId;}
public void setErrorId(Integer errorId) {this.errorId = errorId;}
public Date getRtime() {return rtime;}
public void setRtime(Date rtime) {this.rtime = rtime;}
public String getResult() {return result;}
public void setResult(String result) {this.result = result;}
}
維修人員javaBean建立語句如下:
package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
//維修人員
public class Rman extends BaseBean{
//主鍵
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//維修員姓名
private String rname;
//維修員電話
private String rphone;
//維修員地址
private String raddress;
public String getRname() {return rname;}
public void setRname(String rname) {this.rname = rname;}
public String getRphone() {return rphone;}
public void setRphone(String rphone) {this.rphone = rphone;}
public String getRaddress() {return raddress;}
public void setRaddress(String raddress) {this.raddress = raddress;}
}
消防栓狀態javaBean建立語句如下:
package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
//消防栓狀態
public class State extends BaseBean{
//主鍵
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//消防栓
private Integer hydrantId;
//狀態時間
private Date stime;
//狀態型別
private Integer stypeId;
//狀態數值
private Integer snumber;
public Integer getHydrantId() {return hydrantId;}
public void setHydrantId(Integer hydrantId) {this.hydrantId = hydrantId;}
public Date getStime() {return stime;}
public void setStime(Date stime) {this.stime = stime;}
public Integer getStypeId() {return stypeId;}
public void setStypeId(Integer stypeId) {this.stypeId = stypeId;}
public Integer getSnumber() {return snumber;}
public void setSnumber(Integer snumber) {this.snumber = snumber;}
}
狀態型別javaBean建立語句如下:
package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
//狀態型別
public class Stype extends BaseBean{
//主鍵
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//狀態名稱
private String tname;
//狀態單位
private String unit;
public String getTname() {return tname;}
public void setTname(String tname) {this.tname = tname;}
public String getUnit() {return unit;}
public void setUnit(String unit) {this.unit = unit;}
}
使用者javaBean建立語句如下:
package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
//使用者
public class User extends BaseBean{
//主鍵
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//賬號
private String username;
//密碼
private String password;
//姓名
private String name;
//電話
private String phone;
//角色
private String role;
//地址
private String address;
public String getUsername() {return username;}
public void setUsername(String username) {this.username = username;}
public String getPassword() {return password;}
public void setPassword(String password) {this.password = password;}
public String getName() {return name;}
public void setName(String name) {this.name = name;}
public String getPhone() {return phone;}
public void setPhone(String phone) {this.phone = phone;}
public String getRole() {return role;}
public void setRole(String role) {this.role = role;}
public String getAddress() {return address;}
public void setAddress(String address) {this.address = address;}
}