1.10 BD基础--基础资料-公用(业务员、子表、分录)原创
金蝶云社区-枯藤老树昏鸦
枯藤老树昏鸦
8人赞赏了该文章 260次浏览 未经作者许可,禁止转载编辑于2023年10月10日 08:36:55
T_BD_OPERATOR(业务员)
是否主键字段名字段描述数据类型长度可空缺省值备注
FOperatorId 业务员内码 int

0

FMasterId 主数据内码 int

0

FOperatorType 业务员类型 nvarchar 20

枚举:
销售员:XSY
采购员:CGY
仓管员:WHY
计划员:JHY

FCreatorId 创建人内码 int

0

FCreateDate 创建日期 datetime
getdate()

FModifierId 修改人内码 int

0

FModifyDate 修改日期 datetime



FBILLNO 单据编码 nvarchar 30


备注:业务员表


--建表脚本--

create table T_BD_OPERATOR(

FOperatorId int not null  comment '业务员内码'

,FMasterId int not null  comment '主数据内码'

,FOperatorType nvarchar(20) not null  comment '业务员类型'

,FCreatorId int not null  comment '创建人内码'

,FCreateDate datetime default getdate()  comment '创建日期'

,FModifierId int not null  comment '修改人内码'

,FModifyDate datetime default null  comment '修改日期'

,FBILLNO nvarchar(30) not null  comment '单据编码'

,primary key (FOperatorId)

) comment = '业务员'


--查询--

select FOperatorId as "foperatorid",FMasterId as "fmasterid",FOperatorType as "foperatortype",FCreatorId as "fcreatorid",FCreateDate as "fcreatedate",FModifierId as "fmodifierid",FModifyDate as "fmodifydate",FBILLNO as "fbillno" from T_BD_OPERATOR


--查询(中文字段)--

select FOperatorId as "业务员内码",FMasterId as "主数据内码",FOperatorType as "业务员类型",FCreatorId as "创建人内码",FCreateDate as "创建日期",FModifierId as "修改人内码",FModifyDate as "修改日期",FBILLNO as "单据编码" from T_BD_OPERATOR


--INSERT脚本--

insert into T_BD_OPERATOR(FOperatorId,FMasterId,FOperatorType,FCreatorId,FCreateDate,FModifierId,FModifyDate,FBILLNO) values (?,?,?,?,?,?,?,?)


--UPDATE脚本--

update T_BD_OPERATOR set FOperatorId=?,FMasterId=?,FOperatorType=?,FCreatorId=?,FCreateDate=?,FModifierId=?,FModifyDate=?,FBILLNO=? where FOperatorId=?


--delete脚本--

delete from T_BD_OPERATOR where FOperatorId=?


--给字段加备注--

alter table T_BD_OPERATOR comment '业务员';

alter table T_BD_OPERATOR modify column FOperatorId int not null  comment '业务员内码';

alter table T_BD_OPERATOR modify column FMasterId int not null  comment '主数据内码';

alter table T_BD_OPERATOR modify column FOperatorType nvarchar(20) not null  comment '业务员类型';

alter table T_BD_OPERATOR modify column FCreatorId int not null  comment '创建人内码';

alter table T_BD_OPERATOR modify column FCreateDate datetime default getdate()  comment '创建日期';

alter table T_BD_OPERATOR modify column FModifierId int not null  comment '修改人内码';

alter table T_BD_OPERATOR modify column FModifyDate datetime default null  comment '修改日期';

alter table T_BD_OPERATOR modify column FBILLNO nvarchar(30) not null  comment '单据编码';



T_BD_OPERATORDETAILS(业务员子表)
是否主键字段名字段描述数据类型长度可空缺省值备注
FSubEntryId 子分录内码 int

0

FENTRYID 分录内码 int

0

FOperatorGroupId 业务组内码 int

0

FIsDefault 是否默认 char 1
'0'


--建表脚本--

create table T_BD_OPERATORDETAILS(

FSubEntryId int not null  comment '子分录内码'

,FENTRYID int not null  comment '分录内码'

,FOperatorGroupId int not null  comment '业务组内码'

,FIsDefault char(1) not null  comment '是否默认'

,primary key (FSubEntryId)

) comment = '业务员子表'


--查询--

select FSubEntryId as "fsubentryid",FENTRYID as "fentryid",FOperatorGroupId as "foperatorgroupid",FIsDefault as "fisdefault" from T_BD_OPERATORDETAILS


--查询(中文字段)--

select FSubEntryId as "子分录内码",FENTRYID as "分录内码",FOperatorGroupId as "业务组内码",FIsDefault as "是否默认" from T_BD_OPERATORDETAILS


--INSERT脚本--

insert into T_BD_OPERATORDETAILS(FSubEntryId,FENTRYID,FOperatorGroupId,FIsDefault) values (?,?,?,?)


--UPDATE脚本--

update T_BD_OPERATORDETAILS set FSubEntryId=?,FENTRYID=?,FOperatorGroupId=?,FIsDefault=? where FSubEntryId=?


--delete脚本--

delete from T_BD_OPERATORDETAILS where FSubEntryId=?


--给字段加备注--

alter table T_BD_OPERATORDETAILS comment '业务员子表';

alter table T_BD_OPERATORDETAILS modify column FSubEntryId int not null  comment '子分录内码';

alter table T_BD_OPERATORDETAILS modify column FENTRYID int not null  comment '分录内码';

alter table T_BD_OPERATORDETAILS modify column FOperatorGroupId int not null  comment '业务组内码';

alter table T_BD_OPERATORDETAILS modify column FIsDefault char(1) not null  comment '是否默认';



T_BD_OPERATORENTRY(业务员分录)
是否主键字段名字段描述数据类型长度可空缺省值备注
FEntryId 分录内码 int

0

FOperatorId 业务员内码 int

0

FOperatorType 业务员类型 nvarchar 20

枚举:
销售员:XSY
采购员:CGY
仓管员:WHY
计划员:JHY

FSEQ 序号 int

0

FBizOrgId 业务组织 int

0

FStaffId 职员 int

0

FIsUse 启用 char 1
'0'

--建表脚本--

create table T_BD_OPERATORENTRY(

FEntryId int not null  comment '分录内码'

,FOperatorId int not null  comment '业务员内码'

,FOperatorType nvarchar(20) not null  comment '业务员类型'

,FSEQ int not null  comment '序号'

,FBizOrgId int not null  comment '业务组织'

,FStaffId int not null  comment '职员'

,FIsUse char(1) not null  comment '启用'

,primary key (FEntryId)

) comment = '业务员分录'


--查询--

select FEntryId as "fentryid",FOperatorId as "foperatorid",FOperatorType as "foperatortype",FSEQ as "fseq",FBizOrgId as "fbizorgid",FStaffId as "fstaffid",FIsUse as "fisuse" from T_BD_OPERATORENTRY


--查询(中文字段)--

select FEntryId as "分录内码",FOperatorId as "业务员内码",FOperatorType as "业务员类型",FSEQ as "序号",FBizOrgId as "业务组织",FStaffId as "职员",FIsUse as "启用" from T_BD_OPERATORENTRY


--INSERT脚本--

insert into T_BD_OPERATORENTRY(FEntryId,FOperatorId,FOperatorType,FSEQ,FBizOrgId,FStaffId,FIsUse) values (?,?,?,?,?,?,?)


--UPDATE脚本--

update T_BD_OPERATORENTRY set FEntryId=?,FOperatorId=?,FOperatorType=?,FSEQ=?,FBizOrgId=?,FStaffId=?,FIsUse=? where FEntryId=?


--delete脚本--

delete from T_BD_OPERATORENTRY where FEntryId=?


--给字段加备注--

alter table T_BD_OPERATORENTRY comment '业务员分录';

alter table T_BD_OPERATORENTRY modify column FEntryId int not null  comment '分录内码';

alter table T_BD_OPERATORENTRY modify column FOperatorId int not null  comment '业务员内码';

alter table T_BD_OPERATORENTRY modify column FOperatorType nvarchar(20) not null  comment '业务员类型';

alter table T_BD_OPERATORENTRY modify column FSEQ int not null  comment '序号';

alter table T_BD_OPERATORENTRY modify column FBizOrgId int not null  comment '业务组织';

alter table T_BD_OPERATORENTRY modify column FStaffId int not null  comment '职员';

alter table T_BD_OPERATORENTRY modify column FIsUse char(1) not null  comment '启用';



上传图片


赞 8