| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- --创建档案物资表关联客户CustomeBaseNew表中的客户编号
- create table archives
- (
- id int identity primary key , --编号
- A_archiveCode nvarchar(100),--关联客户表中的F_CustomerCode客户编号 关联显示客户名称
- A_archiveName nvarchar(100),--物资名称
- A_archiveState int , --物资状态 关联物质状态表中的主键id
- A_archivePeople nvarchar(50), --操作者谁登陆的就填谁
- fileid int --附件编号
- )
- --创建物资状态表
- create table archivestate
- (
- id int identity primary key , --状态id
- stateName nvarchar(20) --状态名称
- )
- --添加状态信息
- insert into archivestate(stateName) values('在库');
- insert into archivestate(stateName) values('借阅中');
- insert into archivestate(stateName) values('已出库');
- insert into archivestate(stateName) values('丢失');
- --创建外部客户操作表
- create table customerBorrow
- (
- id int identity primary key , --id
- archivesid int , --物品编号 关联档案物资 借阅物品名称
- BorrowOreturn nvarchar(20), --区分借阅还是归还
- BorrowDate datetime, --物品借阅时间
- BorrowPeople nvarchar(50) --借阅人/归还人
- )
- --创建内部员工操作表
- create table insideOperation --内部操作
- (
- id int identity primary key , --id
- archivesid int , --物品编号 关联档案物资 入库名称
- Warehousing nvarchar(20), --区分出库与入库
- WarehousingDate datetime,--出入库时间
- Operator nvarchar(50) --操作人
- )
- --创建操作记录表
- create table Operationlog --操作日志
- (
- id int identity primary key , --id
- archivesid int , --关联物资表id
- Operator nvarchar(50), --操作人
- OperationContent nvarchar(100),--操作内容
- OperationDate datetime --操作时间
- )
- select * from archives
- --查询物资状态信息
- select * from archivestate
- select * from customerBorrow
- select * from Operationlog
|