数据库初始化

--删除3D类
DELETE from Ptn_PartNo_Category where ID =(Select ID from Ptn_PartNo_Category where name = '3D');
--把纸品类改成礼品盒
UPDATE Ptn_PartNo_Category SET NAME = '禮品盒' where id = (Select ID from Ptn_PartNo_Category where name = '紙品');
Select * from Ptn_PartNo_Category Order By ID;

UPDATE Psn_Group set name ='國內A組' where  name = '業務A組';
UPDATE Psn_Group set name ='國內B組' where  name = '業務B組';
UPDATE Psn_Group set name ='國內C組' where  name = '業務C組';
UPDATE Psn_Group set name ='國內D組' where  name = '業務D組';
UPDATE Psn_Group set name ='國內E組' where  name = '業務E組';
UPDATE Psn_Group set name ='國內F組' where  name = '業務F組';
UPDATE Psn_Group set name ='外貿A組' where  name = '業務G組';
UPDATE Psn_Group set name ='外貿B組' where  name = '業務H組';
--另外前端新增,在人员管理-业务部-右键新增

--删除客户表
delete from Clt_Client ;
--删除客户明细表
delete from Clt_Client_Detail;
--删除员工相关信息
(select id from Psn_Employee  where name in ('李洪波','徐賢寶'));			
--删除系统用户
delete from Psn_Employee where id not in 
(select id from Psn_Employee where Psn_Employee.Name in('李洪波', '徐賢寶'));
--删除员工明细表
delete from  Psn_Employee_Detail where id not in (select id from Psn_Employee  where name in ('李洪波','徐賢寶'));
--删除用户拥有的角色关系
DELETE from Psn_Employee_Role where EmployeeID not in  (select id from Psn_Employee  where name in ('李洪波','徐賢寶'));
--删除材质

--删除厂商
DELETE from Vdr_Vendor;
--删除厂商明细
DELETE from Vdr_Vendor_Detail;
--删除厂商-类别 关系表
DELETE from  Vdr_Vendor_Category_Map;

delete from Mtr_Paper_Matter;
--lock=0,显示,lock=1禁用,不显示
--界面上新增 面纸类 双灰类 特种纸类 坑纸板类 其它

--纸张材质增加字段 ProEnable ,用于控制属性是否废弃 0-正常,1-废弃
alter  table Mtr_Paper_Matter add ProEnable bit DEFAULT char(0) ;
--新增远程ID
alter  table Mtr_Paper_Matter add  romoteId varchar(64) ;
--纸张品牌增加字段 ProEnable ,用于控制属性是否废弃 0-正常,1-废弃
alter  table Mtr_Paper_Brand add   ProEnable bit default char(0) ;
--新增远程ID
alter  table Mtr_Paper_Brand add  romoteId varchar(64) ;


--如果當前客戶沒有定義貼紙模板,則使用富陽的模板
Select * From Clt_Paster_Head where ClientID = 165
Select * From Clt_Paster_Label where pasterid = 10

--员工表新增字段
ALTER table Psn_Employee add  Contactor1 VARCHAR(32);
ALTER table Psn_Employee add  Contactor2 VARCHAR(32);
ALTER table Psn_Employee add  ContactorRel1 VARCHAR(32);
ALTER table Psn_Employee add  ContactorRel2 VARCHAR(32);
ALTER table Psn_Employee add  ContactorTel1 VARCHAR(32);
ALTER table Psn_Employee add  ContactorTel2 VARCHAR(32);
--纸张采购台头,关联到打印台头
SELECT * FROM Stk_PO_PrintTitle;

--数据同步类型,0-本地,1-同步
ALTER table Vdr_Vendor add synType   integer default 0;
update Vdr_Vendor set synType = 0;
alter  table Vdr_Vendor add  romoteId varchar(64) ;

--新增纸张材质,名称使用G单位
Select * From Sys_Enterprise_Parameter where name  = '紙張以克重命名';
insert into Sys_Enterprise_Parameter(name,Bool) VALUES ('紙張以克重命名',1);
update Sys_Enterprise_Parameter set bool = 1 where id = 29;

--面纸类订单增加同步标志字段
alter table Stk_PaperPO_Detail add syntype INTEGER DEFAULT 0;
update Stk_PaperPO_Detail set syntype = 0;
--增加必填标志
alter table Mtr_Paper_Matter add bitian INTEGER DEFAULT 0;

--2018/6/13
ALTER  table Stk_PaperPO_Detail add billLevel VARCHAR DEFAULT '一般';

--系统序列号表,比如订单序列号
Select * From Sys_Parameters

--系统参数(打印模板上部分类型)
select * from Sys_Enterprise_Parameter_Str	 

--系统参数
select * from Sly_Basic_Parameter
--系统参数
select * from 	Sys_Enterprise_Parameter
--企业代码
select * from Sys_Parameters Where Name = 'EC'

--制程委托打印模板输出内容
Select * from Sys_Print_Sheet where name = 'ProcessOutSource' Order by ShowName 

--工号序列
Select SN,Code,Psn_Branch.* From Psn_Branch 

 

转载于:https://my.oschina.net/u/3424406/blog/1805317

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值