|
|
|
# 仓库管理--表数据字段说明
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
由于TimeStamp有时间限制(2038年后会过期),本数据库关于时间的统计一律按照DateTime处理,非TimeStamp格式。
|
|
|
|
|
|
|
|
# 供应商表【DataManufacture】
|
|
|
|
|
|
|
|
用于提供相应装备的供应商信息的列表,用于维修设备时查找对应的地址或者是电话。
|
|
|
|
|
|
|
|
| 字段 | 类型 | 说明 |
|
|
|
|
| ------------ | ------------ | ---------------- |
|
|
|
|
| ID | INT | 唯一标识,自增 |
|
|
|
|
| Name | VARCHAR(255) | 供应商名称 |
|
|
|
|
| PhoneNumbers | VARCHAR(255) | 电话号码 |
|
|
|
|
| Address | VARCHAR(255) | 地址 |
|
|
|
|
| CreateDate | BIGINT | 创建日期(DateTime格式) |
|
|
|
|
| DeleteDate | BIGINT | 删除日期(DateTime格式) |
|
|
|
|
|
|
|
|
建表参考
|
|
|
|
|
|
|
|
```sql
|
|
|
|
DROP TABLE IF EXISTS DataManufacture;
|
|
|
|
CREATE TABLE DataManufacture(
|
|
|
|
ID INT PRIMARY KEY AUTO_INCREMENT,
|
|
|
|
Name VARCHAR(255),
|
|
|
|
PhoneNumbers VARCHAR(255),
|
|
|
|
Address VARCHAR(255),
|
|
|
|
CreateDate BIGINT,
|
|
|
|
DeleteDate BIGINT
|
|
|
|
);
|
|
|
|
```
|
|
|
|
|
|
|
|
# 货架表【DataShelf】
|
|
|
|
|
|
|
|
用于提供货架的位置信息以及库存数量的列表。
|
|
|
|
|
|
|
|
| 字段 | 类型 | 说明 |
|
|
|
|
| --------------------- | ------------ | -------- |
|
|
|
|
| ID | INT | 唯一标识,自增 |
|
|
|
|
| Name | VARCHAR(255) | 货架名称,唯一 |
|
|
|
|
| MaxWeight | FLOAT | 承重 |
|
|
|
|
| Position | VARCHAR(255) | 位置信息 |
|
|
|
|
| CurrentEquipmentCount | INT | 当前在位装备数量 |
|
|
|
|
| AllEquipmentCount | INT | 所有装备数量 |
|
|
|
|
| CreateDate | BIGINT | 创建日期 |
|
|
|
|
| DeleteDate | BIGINT | 删除日期 |
|
|
|
|
|
|
|
|
建表参考
|
|
|
|
|
|
|
|
```sql
|
|
|
|
DROP TABLE IF EXISTS DataShelf;
|
|
|
|
CREATE TABLE DataShelf (
|
|
|
|
ID INT PRIMARY KEY AUTO_INCREMENT,
|
|
|
|
Name VARCHAR(255) UNIQUE NOT NULL,
|
|
|
|
MaxWeight FLOAT,
|
|
|
|
Position VARCHAR(255),
|
|
|
|
CurrentEquipmentCount INT,
|
|
|
|
AllEquipmentCount INT,
|
|
|
|
CreateDate BIGINT,
|
|
|
|
DeleteDate BIGINT
|
|
|
|
);
|
|
|
|
```
|
|
|
|
|
|
|
|
# 装备表【DataEquipment】
|
|
|
|
|
|
|
|
用于提供入库的所有装备以及每个装备的状态信息
|
|
|
|
|
|
|
|
| 字段 | 类型 | 说明 |
|
|
|
|
| -------------- | ------------ | ----------------- |
|
|
|
|
| ID | INT | 自增ID,唯一标识 |
|
|
|
|
| RFID | VARCHAR(255) | RFID条形码信息,唯一 |
|
|
|
|
| Name | VARCHAR(255) | 装备类型(名称) |
|
|
|
|
| ShelfID | INT | 货架ID,对应货架表的唯一标识 |
|
|
|
|
| ShelfPosition | VARCHAR(255) | 物品在货架的位置 |
|
|
|
|
| ManufactureID | INT | 供应商ID,对应供应商表的唯一标识 |
|
|
|
|
| OtherInfo | VARCHAR(255) | 其他补充信息 |
|
|
|
|
| IsInStorage | BOOLEAN | 是否在库 |
|
|
|
|
| IsBroken | BOOLEAN | 是否损坏 |
|
|
|
|
| NeedRepairDate | BIGINT | 检修日期 |
|
|
|
|
| LastRepairDate | BIGINT | 上次维修日期 |
|
|
|
|
| CreateDate | BIGINT | 创建时间 |
|
|
|
|
| DeleteDate | BIGINT | 删除时间 |
|
|
|
|
|
|
|
|
建表参考
|
|
|
|
|
|
|
|
```sql
|
|
|
|
DROP TABLE IF EXISTS DataEquipment;
|
|
|
|
CREATE TABLE DataEquipment(
|
|
|
|
ID INT PRIMARY KEY AUTO_INCREMENT,
|
|
|
|
RFID VARCHAR(255) UNIQUE NOT NULL,
|
|
|
|
Name VARCHAR(255),
|
|
|
|
ShelfID INT,
|
|
|
|
ShelfPosition VARCHAR(255),
|
|
|
|
ManufactureID INT,
|
|
|
|
OtherInfo VARCHAR(255),
|
|
|
|
IsInStorage BOOLEAN,
|
|
|
|
IsBroken BOOLEAN,
|
|
|
|
NeedRepairDate BIGINT,
|
|
|
|
LastRepairDate BIGINT,
|
|
|
|
CreateDate BIGINT,
|
|
|
|
DeleteDate BIGINT
|
|
|
|
);
|
|
|
|
```
|
|
|
|
|
|
|
|
# 历史记录表
|
|
|
|
|
|
|
|
用于提供装备的出入库记录,维修记录,报损报废记录等等。
|
|
|
|
|
|
|
|
## 装备领出记录【DataOutHistoryEquipment】
|
|
|
|
|
|
|
|
| 字段 | 类型 | 说明 |
|
|
|
|
| --------- | ------------ | --------------- |
|
|
|
|
| ID | INT | 唯一标识 |
|
|
|
|
| RFID | VARCHAR(255) | RFID条形码信息 |
|
|
|
|
| Name | VARCHAR(255) | 装备类型(名称) |
|
|
|
|
| OutDate | BIGINT | 领出日期 |
|
|
|
|
| ShelfID | INT | 货架ID,对应货架表的唯一标识 |
|
|
|
|
| ShelfName | VARCHAR(255) | 货架名称 |
|
|
|
|
|
|
|
|
补充人员信息【DataOutHistoryEquipmentWithUser】
|
|
|
|
|
|
|
|
| 字段 | 类型 | 说明 |
|
|
|
|
| --------- | ------------ | -------- |
|
|
|
|
| PoliceID | VARCHAR(255) | 警号 |
|
|
|
|
| UserName | VARCHAR(255) | 姓名 |
|
|
|
|
| PhotoPath | VARCHAR(255) | 本次领出拍照路径 |
|
|
|
|
|
|
|
|
## 装备归还记录【DataInHistoryEquipment】
|
|
|
|
|
|
|
|
| 字段 | 类型 | 说明 |
|
|
|
|
| --------- | ------------ | --------------- |
|
|
|
|
| ID | INT | 唯一标识 |
|
|
|
|
| RFID | VARCHAR(255) | RFID条形码信息 |
|
|
|
|
| Name | VARCHAR(255) | 装备类型(名称) |
|
|
|
|
| InDate | BIGINT | 归还日期 |
|
|
|
|
| ShelfID | INT | 货架ID,对应货架表的唯一标识 |
|
|
|
|
| ShelfName | VARCHAR(255) | 货架名称 |
|
|
|
|
|
|
|
|
补充人员信息【DataOutHistoryEquipmentWithUser】
|
|
|
|
|
|
|
|
| 字段 | 类型 | 说明 |
|
|
|
|
| --------- | ------------ | -------- |
|
|
|
|
| PoliceID | VARCHAR(255) | 警号 |
|
|
|
|
| UserName | VARCHAR(255) | 姓名 |
|
|
|
|
| PhotoPath | VARCHAR(255) | 本次归还拍照路径 |
|
|
|
|
|
|
|
|
## 装备报损记录【DataBrokenHistoryEquipment】
|
|
|
|
|
|
|
|
| 字段 | 类型 | 说明 |
|
|
|
|
| ---------- | ------------ | --------- |
|
|
|
|
| ID | INT | 唯一标识 |
|
|
|
|
| RFID | VARCHAR(255) | RFID条形码信息 |
|
|
|
|
| Name | VARCHAR(255) | 装备类型(名称) |
|
|
|
|
| BrokenDate | BIGINT | 损坏日期 |
|
|
|
|
|
|
|
|
## 装备维修记录【DataRepairHistoryEquipment】
|
|
|
|
|
|
|
|
| 字段 | 类型 | 说明 |
|
|
|
|
| ---------- | ------------ | --------- |
|
|
|
|
| ID | INT | 唯一标识 |
|
|
|
|
| RFID | VARCHAR(255) | RFID条形码信息 |
|
|
|
|
| Name | VARCHAR(255) | 装备类型(名称) |
|
|
|
|
| RepairDate | BIGINT | 维修日期 |
|
|
|
|
|
|
|
|
## 装备报废记录【DataDisuseHistoryEquipment】
|
|
|
|
|
|
|
|
| 字段 | 类型 | 说明 |
|
|
|
|
| ---------- | ------------ | --------- |
|
|
|
|
| ID | INT | 唯一标识 |
|
|
|
|
| RFID | VARCHAR(255) | RFID条形码信息 |
|
|
|
|
| Name | VARCHAR(255) | 装备类型(名称) |
|
|
|
|
| DisuseDate | BIGINT | 报废日期 |
|
|
|
|
|
|
|
|
建表参考
|
|
|
|
|
|
|
|
```sql
|
|
|
|
DROP TABLE IF EXISTS DataOutHistoryEquipment;
|
|
|
|
DROP TABLE IF EXISTS DataOutHistoryEquipmentWithUser;
|
|
|
|
DROP TABLE IF EXISTS DataInHistoryEquipment;
|
|
|
|
DROP TABLE IF EXISTS DataInHistoryEquipmentWithUser;
|
|
|
|
DROP TABLE IF EXISTS DataBrokenHistoryEquipment;
|
|
|
|
DROP TABLE IF EXISTS DataRepairHistoryEquipment;
|
|
|
|
DROP TABLE IF EXISTS DataDisuseHistoryEquipment;
|
|
|
|
|
|
|
|
CREATE TABLE DataOutHistoryEquipment
|
|
|
|
(
|
|
|
|
ID INT PRIMARY KEY AUTO_INCREMENT,
|
|
|
|
RFID VARCHAR(255),
|
|
|
|
Name VARCHAR(255),
|
|
|
|
OutDate BIGINT,
|
|
|
|
ShelfID INT,
|
|
|
|
ShelfName VARCHAR(255)
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE DataOutHistoryEquipmentWithUser
|
|
|
|
(
|
|
|
|
ID INT PRIMARY KEY AUTO_INCREMENT,
|
|
|
|
RFID VARCHAR(255),
|
|
|
|
Name VARCHAR(255),
|
|
|
|
OutDate BIGINT,
|
|
|
|
ShelfID INT,
|
|
|
|
ShelfName VARCHAR(255),
|
|
|
|
PoliceID VARCHAR(255),
|
|
|
|
UserName VARCHAR(255),
|
|
|
|
PhotoPath VARCHAR(255)
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE DataInHistoryEquipment
|
|
|
|
(
|
|
|
|
ID INT PRIMARY KEY AUTO_INCREMENT,
|
|
|
|
RFID VARCHAR(255),
|
|
|
|
Name VARCHAR(255),
|
|
|
|
InDate BIGINT,
|
|
|
|
ShelfID INT,
|
|
|
|
ShelfName VARCHAR(255)
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE DataInHistoryEquipmentWithUser
|
|
|
|
(
|
|
|
|
ID INT PRIMARY KEY AUTO_INCREMENT,
|
|
|
|
RFID VARCHAR(255),
|
|
|
|
Name VARCHAR(255),
|
|
|
|
InDate BIGINT,
|
|
|
|
ShelfID INT,
|
|
|
|
ShelfName VARCHAR(255),
|
|
|
|
PoliceID VARCHAR(255),
|
|
|
|
UserName VARCHAR(255),
|
|
|
|
PhotoPath VARCHAR(255)
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE DataBrokenHistoryEquipment
|
|
|
|
(
|
|
|
|
ID INT PRIMARY KEY AUTO_INCREMENT,
|
|
|
|
RFID VARCHAR(255),
|
|
|
|
Name VARCHAR(255),
|
|
|
|
BrokenDate BIGINT
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE DataRepairHistoryEquipment
|
|
|
|
(
|
|
|
|
ID INT PRIMARY KEY AUTO_INCREMENT,
|
|
|
|
RFID VARCHAR(255),
|
|
|
|
Name VARCHAR(255),
|
|
|
|
RepairDate BIGINT
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TABLE DataDisuseHistoryEquipment
|
|
|
|
(
|
|
|
|
ID INT PRIMARY KEY AUTO_INCREMENT,
|
|
|
|
RFID VARCHAR(255),
|
|
|
|
Name VARCHAR(255),
|
|
|
|
DisuseDate BIGINT
|
|
|
|
);
|
|
|
|
```
|
|
|
|
|
|
|
|
# 人员用户表
|
|
|
|
|
|
|
|
## 人员表【DataUser】
|
|
|
|
|
|
|
|
用于管理人员人脸信息等
|
|
|
|
|
|
|
|
| 字段 | 类型 | 说明 |
|
|
|
|
| ----------- | ------------ | ------ |
|
|
|
|
| ID | INT | 唯一标识 |
|
|
|
|
| Name | VARCHAR(255) | 人员名称 |
|
|
|
|
| PoliceID | INT | 警号 |
|
|
|
|
| FaceDataURL | VARCHAR(255) | 人脸信息路径 |
|
|
|
|
| OtherMsg | VARCHAR(255) | 补充信息 |
|
|
|
|
| CreateDate | BIGINT | 创建日期 |
|
|
|
|
| DeleteDate | BIGINT | 删除日期 |
|
|
|
|
|
|
|
|
## 管理员表【DataAdmin】
|
|
|
|
|
|
|
|
| 字段 | 类型 | 说明 |
|
|
|
|
| --------------- | ------------ | ------ |
|
|
|
|
| ID | INT | 唯一标识 |
|
|
|
|
| Name | VARCHAR(255) | 管理员名称 |
|
|
|
|
| UserName | VARCHAR(255) | 管理员用户名 |
|
|
|
|
| Password | VARCHAR(255) | 密码 |
|
|
|
|
| PermissionLevel | INT | 权限等级 |
|
|
|
|
| CreateDate | BIGINT | 创建日期 |
|
|
|
|
| DeleteDate | BIGINT | 删除日期 |
|
|
|
|
|
|
|
|
建表参考
|
|
|
|
|
|
|
|
```sql
|
|
|
|
DROP TABLE IF EXISTS DataUser;
|
|
|
|
CREATE TABLE DataUser(
|
|
|
|
ID INT PRIMARY KEY AUTO_INCREMENT,
|
|
|
|
Name VARCHAR(255),
|
|
|
|
PoliceID INT,
|
|
|
|
FaceDataURL VARCHAR(255),
|
|
|
|
OtherMsg VARCHAR(255),
|
|
|
|
CreateDate BIGINT,
|
|
|
|
DeleteDate BIGINT
|
|
|
|
);
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS DataAdmin;
|
|
|
|
CREATE TABLE DataAdmin(
|
|
|
|
ID INT PRIMARY KEY AUTO_INCREMENT,
|
|
|
|
Name VARCHAR(255),
|
|
|
|
UserName VARCHAR(255),
|
|
|
|
Password VARCHAR(255),
|
|
|
|
PermissionLevel INT,
|
|
|
|
CreateDate BIGINT,
|
|
|
|
DeleteDate BIGINT
|
|
|
|
);
|
|
|
|
```
|