---------------------------V3.1版本的sql-------------------------
ALTER TABLE `risk_synctask`
ADD COLUMN `activityNo`  varchar(50) NULL COMMENT '活动编号' AFTER `param`;

update risk_activity set activityStatus = 10 where activityStatus = 15;

ALTER TABLE `risk_activity`
DROP COLUMN `syncMain`,
DROP COLUMN `syncPolice`;

ALTER TABLE `risk_activitymaterial`
ADD COLUMN `comment`  text NULL COMMENT '备注' AFTER `commitStatus`;


CREATE TABLE `risk_materialtask` (
  `oid` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `createOn` datetime DEFAULT NULL COMMENT '创建时间',
  `updateOn` datetime DEFAULT NULL COMMENT '修改时间',
  `materialTaskType` varchar(20) DEFAULT NULL COMMENT '同步类型',
  `success` varchar(20) DEFAULT NULL COMMENT '同步状态是否成功',
  `activityNo` varchar(50) DEFAULT NULL COMMENT '活动编号',
  PRIMARY KEY (`oid`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;


CREATE TABLE `risk_filesynclog` (
  `oid` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `createOn` datetime DEFAULT NULL COMMENT '创建时间',
  `updateOn` datetime DEFAULT NULL COMMENT '修改时间',
  `fileName` varchar(100) DEFAULT NULL,
  `sync` varchar(10) DEFAULT NULL,
  `syncTime` datetime DEFAULT NULL COMMENT '同步时间',
  PRIMARY KEY (`oid`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;


ALTER TABLE `risk_filesynclog`
ADD COLUMN `dir` varchar(255) NULL COMMENT '文件目录' AFTER `fileName`;

CREATE TABLE `RISK_SPFileSyncLog` (
  `oid` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `createOn` datetime DEFAULT NULL COMMENT '创建时间',
  `updateOn` datetime DEFAULT NULL COMMENT '修改时间',
  `fileName` varchar(100) DEFAULT NULL,
  `dir` varchar(255) DEFAULT NULL COMMENT '目录',
  `markRead` varchar(10) DEFAULT NULL,
  `readTime` datetime DEFAULT NULL COMMENT '读取时间',
  PRIMARY KEY (`oid`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;


#陕西的值是off
#广西的值是on
insert into risk_systemconfig(createon,updateon,syskey,sysvalue,description)
values (now(),now(),'switch_jump','on','www.pss360.cn是否可以直接跳转（off不可以，on可以）');

#陕西
insert into risk_systemconfig(createon,updateon,syskey,sysvalue,description)
values (now(),now(),'cbdw_helpdoc_url','http://47.93.117.58:8012/view?token=aHR0cDovL2JjeGluLXJpc2stZXh0cmFuZXQtdGVzdC5vc3MtY24tc2hhbmdoYWkuYWxpeXVuY3MuY29tL2NvbXBhbnkvemlzbmNiLXYzLjFtYW51YWwucGRm','承办单位操作手册文档路径');

insert into risk_systemconfig(createon,updateon,syskey,sysvalue,description)
values (now(),now(),'zfdw_helpdoc_url','http://47.93.117.58:8012/view?token=aHR0cDovL2JjeGluLXJpc2stZXh0cmFuZXQtdGVzdC5vc3MtY24tc2hhbmdoYWkuYWxpeXVuY3MuY29tL2NvbXBhbnkvemlzbnpmZHctdjMuMW1hbnVhbC5wZGY=','政府单位操作手册文档路径');

#广西
insert into risk_systemconfig(createon,updateon,syskey,sysvalue,description)
values (now(),now(),'cbdw_helpdoc_url','http://47.93.117.58:8012/view?token=aHR0cDovL2JjeGluLXJpc2stZXh0cmFuZXQtdGVzdC5vc3MtY24tc2hhbmdoYWkuYWxpeXVuY3MuY29tL2NvbXBhbnkvemlneGNiLXYzLjEucGRm','承办单位操作手册文档路径');

insert into risk_systemconfig(createon,updateon,syskey,sysvalue,description)
values (now(),now(),'zfdw_helpdoc_url','http://47.93.117.58:8012/view?token=aHR0cDovL2JjeGluLXJpc2stZXh0cmFuZXQtdGVzdC5vc3MtY24tc2hhbmdoYWkuYWxpeXVuY3MuY29tL2NvbXBhbnkvemlneHpmZHctdjMuMW1hbnVhbC5wZGY=','政府单位操作手册文档路径');


insert into risk_systemconfig(createon,updateon,syskey,sysvalue,description)
values (now(),now(),'switch_spread','off','是否支持审批结果文件夹同步自动读取');


drop table config_calendar;
drop table cs;
drop table rest_app;
drop table foo_range;
drop table risk_activityexpress;
drop table risk_activitypricefactor;
drop table risk_amountspec;
drop table risk_barriergateentryinfo;
drop table risk_barriergateuser;
drop table risk_bookbinding;
drop table risk_businessrequest;
drop table risk_composecase;
drop table risk_composecatalog;
drop table risk_composecatalogtemplate;
drop table risk_composecontrol;
drop table risk_composedetail;
drop table risk_composeevaluating;
drop table risk_composeevaluatingmould;
drop table risk_composeevaluationresult;
drop table risk_composefiled;
drop table risk_composeframe;
drop table risk_composeparagraphtemplate;
drop table risk_composeserialnum;
drop table risk_composesource;
drop table risk_composetask;
drop table risk_dutyspec;
drop table risk_expert_region;
drop table risk_expertorderform;
drop table risk_feedback_expert;
drop table risk_invitation;
drop table risk_invoicetemplate;
drop table risk_pendorg;
drop table risk_policyextra;
drop table risk_productintroduce;
drop table risk_productliterature;
drop table risk_roleinpolicy;
drop table risk_smslog;
drop table risk_survey_info;
drop table risk_survey_photo;
drop table risk_surveyassist;
drop table risk_surveyplan;
drop table risk_surveyproject;
drop table risk_surveyreform;
drop table risk_surveysign;
drop table risk_surveytag;
drop table risk_syslog;
drop table synctables;
drop table sys_config;
drop table wechat_accesstoken;
drop table risk_expertuser;
drop table risk_expertorg;
drop table risk_expertserviceinfo;
drop table risk_quotationfactor;
drop table risk_quotationregion;
drop table risk_quotation;
drop table risk_survey_rectification_info;
drop table risk_survey_rectification;
drop table risk_transactionoffline;
drop table risk_transactiononline;
drop table risk_transaction;
drop table risk_orderform;
drop table risk_survey_questionnaire;
drop table risk_survey_feedback;
drop table risk_surveytask;
drop table risk_insurancepolicy;
drop table risk_mailpolicy;
drop table risk_ratespec;
drop table risk_planspec;
drop table risk_insuranceproduct;

CREATE TABLE `sys_tips` (
  `oid` int(11) NOT NULL AUTO_INCREMENT,
  `createOn` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `updateOn` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `status` varchar(255) DEFAULT NULL COMMENT '状态（0：已取消，1：已开启，2进行中）',
  `website` varchar(255) DEFAULT NULL COMMENT '站点（1：风评系统，2：申报系统-陕西，3：申报系统-广西）',
  `startTime` datetime DEFAULT NULL COMMENT '开始时间',
  `endTime` datetime DEFAULT NULL COMMENT '结束时间',
  `title` varchar(255) DEFAULT NULL COMMENT '标题',
  `content` varchar(255) DEFAULT NULL COMMENT '内容',
  `provinceCode` varchar(255) DEFAULT NULL COMMENT '省份代码',
  PRIMARY KEY (`oid`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='系统提示';



CREATE TABLE `risk_assessmentorg` (
  `oid` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '服务机构Id',
  `createOn` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `updateOn` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `name` varchar(255) DEFAULT NULL COMMENT '服务机构名称',
  `introduce` varchar(2550) DEFAULT NULL COMMENT '公司介绍',
  `experience` varchar(2550) DEFAULT NULL COMMENT '项目经验',
  `team` varchar(2550) DEFAULT NULL COMMENT '专家团队：专家A，专家B，专家C',
  `contacts` varchar(255) DEFAULT NULL COMMENT '业务联系人',
  `phone` varchar(255) DEFAULT NULL COMMENT '联系电话',
  `address` varchar(255) DEFAULT NULL COMMENT '联系地址',
  `logoUrl` varchar(255) DEFAULT NULL COMMENT '图片URL',
  `iconUrl` varchar(255) DEFAULT NULL COMMENT '图标地址',
  `provinceId` int(10) DEFAULT NULL COMMENT '省份Id',
  `uuid` varchar(255) DEFAULT NULL COMMENT 'UUID',
  PRIMARY KEY (`oid`)
) ENGINE=InnoDB AUTO_INCREMENT=67 DEFAULT CHARSET=utf8;