TR exer环境数据准备

来自ling
跳转至: 导航搜索

0004047: 练习环境exer发布准备工作

sql

--请先全部看一遍,看看顺序有没有什么问题:
--1、同步exer环境的代码,准备一个干净的exer环境,只有所有的人员用户数据,没有项目数据。
--2、同步用户表。
--3、将所有用户的邮箱改为admin@drtax.deloitte.com.cn
update base_user set EMAIL_='admin@drtax.deloitte.com.cn'
--4、从exer环境的数据库中找到三条项目记录,客户编码为C4417、CA116、B7180,共三条,每条复制与A1人数相同的条数(A1名单待提供),每条的财年字段Fis Y改为2018.
--5、安排每条数据的PIC为lijiang,MIC为lindcheng,AIC为nyan,staff为这些A1.

delete from BASE_LangResource;

ALTER TABLE BASE_LangResource ALTER COLUMN key_ VARCHAR(1000);
ALTER TABLE BASE_LangResource ALTER COLUMN zh VARCHAR(1000);
ALTER TABLE BASE_LangResource ALTER COLUMN en VARCHAR(1000);
--55887
select t.id,t.isdelete,t.isrecord,t.* from TR_ProjectItem t where t.clientcode='C4417' and t.isdelete=0;
--55844
select t.id,t.isdelete,t.isrecord,t.* from TR_ProjectItem t where t.clientcode='CA116' and t.isdelete=0;
--
select t.id,t.isdelete,t.isrecord,t.* from TR_ProjectItem t where t.clientcode='B7180' and t.isdelete=0;
select * from base_user t where t.username_='NICOHZHANG'
--确认id是57还是125
select * from tr_InformationMoudleRelation;
select * from tr_Knowledge t where t.id=125 or t.id=57
update tr_ChecklistMoudle set  moudleId=125 where moudleId=57;
update tr_InformationMoudleRelation set moudleId=125 where moudleId=57;
--索引
--TR_ProjectItem
select * from TR_ProjectItem;
delete from TR_ProjectItem where id not in(55887,55844);
update TR_ProjectItem set aic='nyan', pic='lijiang', mic='lindcheng',auditStatus='0001'
,auditcobber='lilylili',auditmanager='kefu',ppic=null
,fisy=2018, begdate='2018-01-01',enddate='2018-12-31';
--TR_ItemEntity
select * from TR_ItemEntity;
delete from TR_ItemEntity;
--TR_CheckOperateReport
select * from TR_CheckOperateReport;
delete from TR_CheckOperateReport;
--TR_ProjectItemApp
select * from TR_ProjectItemApp;
delete from TR_ProjectItemApp;
--TR_ChecklistItem
select * from TR_ChecklistItem;
delete from TR_ChecklistItem;
--TR_ISSUESUMMARY
select * from TR_ISSUESUMMARY;
delete from TR_ISSUESUMMARY;
--TR_ChecklistEntity
select * from TR_ChecklistEntity;
delete from TR_ChecklistEntity;
--TR_Question
select * from TR_Question;
delete from TR_Question;
--TR_AuditInformation
--select * from TR_AuditInformation;
--delete from TR_AuditInformation;
--TR_MoudleOperateReport
select * from TR_MoudleOperateReport;
delete from TR_MoudleOperateReport;
--TR_ChecklistMoudle
select * from TR_ChecklistMoudle;
delete from TR_ChecklistMoudle;
--TR_ChecklistAnswer
select * from TR_ChecklistAnswer;
delete from TR_ChecklistAnswer;
--TR_WorkLoadLog
select * from TR_WorkLoadLog;
delete from TR_WorkLoadLog;
--TR_SendInfo
select * from TR_SendInfo;
delete from TR_SendInfo;
--TR_Message
select * from TR_Message;
delete from TR_Message;
--TR_EntityGroupId
select * from TR_EntityGroupId;
delete from TR_EntityGroupId;
--tr_Billing
select * from tr_Billing;
delete from tr_Billing;
--TR_BillingChange
select * from TR_BillingChange;
delete from TR_BillingChange;
--TR_Comments
select * from TR_Comments;
delete from TR_Comments;
--TR_AuditInformationEntity
select * from TR_AuditInformationEntity;
delete from TR_AuditInformationEntity;
--TR_Resumption
select * from TR_Resumption;
delete from TR_Resumption;
--TR_Declaration
select * from TR_Declaration;
delete from TR_Declaration;
--BASE_CustomerShareholder
select * from BASE_CustomerShareholder;
delete from BASE_CustomerShareholder;
--TR_ManuscriptItem
select * from TR_ManuscriptItem;
delete from TR_ManuscriptItem;
--TR_WorkPlanPerDay
select * from TR_WorkPlanPerDay;
delete from TR_WorkPlanPerDay;
--tr_TrLog
select * from tr_TrLog;
delete from tr_TrLog;
--TR_IssueSummaryTaxMemo
select * from TR_IssueSummaryTaxMemo;
delete from TR_IssueSummaryTaxMemo;
--TR_EntityResult
select * from TR_EntityResult;
delete from TR_EntityResult;
--TR_ProjectRRRaProjectRRRateApplicantteApplicant
select * from TR_ProjectRRRaProjectRRRateApplicantteApplicant;
delete from TR_ProjectRRRaProjectRRRateApplicantteApplicant;
--TR_informationEditing
select * from TR_informationEditing;
delete from TR_informationEditing;
--TR_InformationMoudleRelation
select * from TR_InformationMoudleRelation;
delete from TR_InformationMoudleRelation;
--TR_ProjectTip
select * from TR_ProjectTip;
delete from TR_ProjectTip;
--TR_ProjectTipSave
select * from TR_ProjectTipSave;
delete from TR_ProjectTipSave;

测试数据

  • 删除不要的项目数据
  • 在工具中复制数据(with header)到excel
  • 按需复制数据并修改staff,客户信息,id等内容
  • 导入数据到项目表