t_BD_Unit(计量单位) | |||||||
是否主键 | 字段名 | 字段描述 | 数据类型 | 长度 | 可空 | 缺省值 | 备注 |
✓ | FUNITID | 单位内码 | int | 0 | |||
FMASTERID | 分配内码 | int | 0 | ||||
FCREATEORGID | 创建组织 | int | 0 | ||||
FUSEORGID | 使用组织 | int | 0 | ||||
FCREATORID | 创建人 | int | 0 | ||||
FCREATEDATE | 创建日期 | datetime | ✓ | ||||
FMODIFIERID | 修改人 | int | 0 | ||||
FMODIFYDATE | 修改日期 | datetime | ✓ | ||||
FDOCUMENTSTATUS | 数据状态 | char | 1 | ||||
FFORBIDSTATUS | 禁用状态 | char | 1 | ||||
FAPPROVERID | 审核人 | int | ✓ | 0 | |||
FAPPROVEDATE | 审核日期 | datetime | ✓ | ||||
FFORBIDDERID | 禁用人 | int | ✓ | 0 | |||
FFORBIDDATE | 禁用日期 | datetime | ✓ | ||||
FNUMBER | 编码 | nvarchar | 30 | ||||
FUNITGROUPID | 单位组内码 | int | 0 | ||||
FISBASEUNIT | 基准计量单位 | char | 1 | '0' | |||
FISSYSTEMSET | 系统预设 | char | 1 | '0' | |||
FPRECISION | 精度 | int | 0 | ||||
FROUNDTYPE | 舍入类型 | varchar | 36 | ||||
备注:系统设置--基础资料--计量单位 |
--建表脚本--
create table t_BD_Unit(
FUNITID int not null comment '单位内码'
,FMASTERID int not null comment '分配内码'
,FCREATEORGID int not null comment '创建组织'
,FUSEORGID int not null comment '使用组织'
,FCREATORID int not null comment '创建人'
,FCREATEDATE datetime default null comment '创建日期'
,FMODIFIERID int not null comment '修改人'
,FMODIFYDATE datetime default null comment '修改日期'
,FDOCUMENTSTATUS char(1) not null comment '数据状态'
,FFORBIDSTATUS char(1) not null comment '禁用状态'
,FAPPROVERID int default 0 comment '审核人'
,FAPPROVEDATE datetime default null comment '审核日期'
,FFORBIDDERID int default 0 comment '禁用人'
,FFORBIDDATE datetime default null comment '禁用日期'
,FNUMBER nvarchar(30) not null comment '编码'
,FUNITGROUPID int not null comment '单位组内码'
,FISBASEUNIT char(1) not null comment '基准计量单位'
,FISSYSTEMSET char(1) not null comment '系统预设'
,FPRECISION int not null comment '精度'
,FROUNDTYPE varchar(36) not null comment '舍入类型'
,primary key (FUNITID)
) comment = '计量单位'
--查询--
select FUNITID as "funitid",FMASTERID as "fmasterid",FCREATEORGID as "fcreateorgid",FUSEORGID as "fuseorgid",FCREATORID as "fcreatorid",FCREATEDATE as "fcreatedate",FMODIFIERID as "fmodifierid",FMODIFYDATE as "fmodifydate",FDOCUMENTSTATUS as "fdocumentstatus",FFORBIDSTATUS as "fforbidstatus",FAPPROVERID as "fapproverid",FAPPROVEDATE as "fapprovedate",FFORBIDDERID as "fforbidderid",FFORBIDDATE as "fforbiddate",FNUMBER as "fnumber",FUNITGROUPID as "funitgroupid",FISBASEUNIT as "fisbaseunit",FISSYSTEMSET as "fissystemset",FPRECISION as "fprecision",FROUNDTYPE as "froundtype" from t_BD_Unit
--查询(中文字段)--
select FUNITID as "单位内码",FMASTERID as "分配内码",FCREATEORGID as "创建组织",FUSEORGID as "使用组织",FCREATORID as "创建人",FCREATEDATE as "创建日期",FMODIFIERID as "修改人",FMODIFYDATE as "修改日期",FDOCUMENTSTATUS as "数据状态",FFORBIDSTATUS as "禁用状态",FAPPROVERID as "审核人",FAPPROVEDATE as "审核日期",FFORBIDDERID as "禁用人",FFORBIDDATE as "禁用日期",FNUMBER as "编码",FUNITGROUPID as "单位组内码",FISBASEUNIT as "基准计量单位",FISSYSTEMSET as "系统预设",FPRECISION as "精度",FROUNDTYPE as "舍入类型" from t_BD_Unit
--INSERT脚本--
insert into t_BD_Unit(FUNITID,FMASTERID,FCREATEORGID,FUSEORGID,FCREATORID,FCREATEDATE,FMODIFIERID,FMODIFYDATE,FDOCUMENTSTATUS,FFORBIDSTATUS,FAPPROVERID,FAPPROVEDATE,FFORBIDDERID,FFORBIDDATE,FNUMBER,FUNITGROUPID,FISBASEUNIT,FISSYSTEMSET,FPRECISION,FROUNDTYPE) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
--UPDATE脚本--
update t_BD_Unit set FUNITID=?,FMASTERID=?,FCREATEORGID=?,FUSEORGID=?,FCREATORID=?,FCREATEDATE=?,FMODIFIERID=?,FMODIFYDATE=?,FDOCUMENTSTATUS=?,FFORBIDSTATUS=?,FAPPROVERID=?,FAPPROVEDATE=?,FFORBIDDERID=?,FFORBIDDATE=?,FNUMBER=?,FUNITGROUPID=?,FISBASEUNIT=?,FISSYSTEMSET=?,FPRECISION=?,FROUNDTYPE=? where FUNITID=?
--delete脚本--
delete from t_BD_Unit where FUNITID=?
--给字段加备注--
alter table t_BD_Unit comment '计量单位';
alter table t_BD_Unit modify column FUNITID int not null comment '单位内码';
alter table t_BD_Unit modify column FMASTERID int not null comment '分配内码';
alter table t_BD_Unit modify column FCREATEORGID int not null comment '创建组织';
alter table t_BD_Unit modify column FUSEORGID int not null comment '使用组织';
alter table t_BD_Unit modify column FCREATORID int not null comment '创建人';
alter table t_BD_Unit modify column FCREATEDATE datetime default null comment '创建日期';
alter table t_BD_Unit modify column FMODIFIERID int not null comment '修改人';
alter table t_BD_Unit modify column FMODIFYDATE datetime default null comment '修改日期';
alter table t_BD_Unit modify column FDOCUMENTSTATUS char(1) not null comment '数据状态';
alter table t_BD_Unit modify column FFORBIDSTATUS char(1) not null comment '禁用状态';
alter table t_BD_Unit modify column FAPPROVERID int default 0 comment '审核人';
alter table t_BD_Unit modify column FAPPROVEDATE datetime default null comment '审核日期';
alter table t_BD_Unit modify column FFORBIDDERID int default 0 comment '禁用人';
alter table t_BD_Unit modify column FFORBIDDATE datetime default null comment '禁用日期';
alter table t_BD_Unit modify column FNUMBER nvarchar(30) not null comment '编码';
alter table t_BD_Unit modify column FUNITGROUPID int not null comment '单位组内码';
alter table t_BD_Unit modify column FISBASEUNIT char(1) not null comment '基准计量单位';
alter table t_BD_Unit modify column FISSYSTEMSET char(1) not null comment '系统预设';
alter table t_BD_Unit modify column FPRECISION int not null comment '精度';
alter table t_BD_Unit modify column FROUNDTYPE varchar(36) not null comment '舍入类型';
推荐阅读