ALTER TABLE `risk_se_user`
ADD COLUMN `companyPhone`  varchar(255) NULL DEFAULT NULL COMMENT '企业联系方式' AFTER `phone`;


UPDATE `sys_dict` SET `oid`='465', `createOn`=NULL, `updateOn`=NULL, `description`='发票类型', `label`='增值税普通发票', `sort`='1', `type`='invoiceType', `value`='1' WHERE (`oid`='465');
UPDATE `sys_dict` SET `oid`='466', `createOn`=NULL, `updateOn`=NULL, `description`='发票类型', `label`='增值税专用发票', `sort`='2', `type`='invoiceType', `value`='2' WHERE (`oid`='466');
INSERT INTO `sys_dict` (`oid`, `createOn`, `updateOn`, `description`, `label`, `sort`, `type`, `value`) VALUES ('629', NULL, NULL, '发票类型', '电子普通发票', '3', 'invoiceType', '3');


INSERT INTO `sys_dict` (`oid`, `createOn`, `updateOn`, `description`, `label`, `sort`, `type`, `value`) VALUES ('630', NULL, NULL, '发票审核类型', '待审核', '1', 'invoiceApprovalType', '1');
INSERT INTO `sys_dict` (`oid`, `createOn`, `updateOn`, `description`, `label`, `sort`, `type`, `value`) VALUES ('631', NULL, NULL, '发票审核类型', '审核通过', '2', 'invoiceApprovalType', '2');
INSERT INTO `sys_dict` (`oid`, `createOn`, `updateOn`, `description`, `label`, `sort`, `type`, `value`) VALUES ('632', NULL, NULL, '发票审核类型', '审核退回', '3', 'invoiceApprovalType', '3');

UPDATE `sys_dict` SET `oid`='633', `createOn`=NULL, `updateOn`=NULL, `description`='发票审核类型', `label`='未开票', `sort`='4', `type`='invoiceApprovalType', `value`='4' WHERE (`oid`='633');
UPDATE `sys_dict` SET `oid`='634', `createOn`=NULL, `updateOn`=NULL, `description`='发票审核类型', `label`='已开票', `sort`='5', `type`='invoiceApprovalType', `value`='5' WHERE (`oid`='634');

UPDATE `risk_menu` SET `oid`='10116', `createOn`='2018-09-10 11:10:08', `updateOn`=NULL, `menuCode`=NULL, `menuDesc`='16', `menuName`='通知管理', `parent_id`='101', `menuType`='1' WHERE (`oid`='10116');
INSERT INTO `risk_menu` (`oid`, `createOn`, `updateOn`, `menuCode`, `menuDesc`, `menuName`, `parent_id`, `menuType`) VALUES ('10117', '2018-09-10 11:10:08', NULL, NULL, '17', '短信日志', '101', '1');
INSERT INTO `risk_menu` (`oid`, `createOn`, `updateOn`, `menuCode`, `menuDesc`, `menuName`, `parent_id`, `menuType`) VALUES ('10118', '2018-09-10 11:10:08', NULL, NULL, '18', '操作日志', '101', '1');

UPDATE `risk_role` SET `oid`='37', `createOn`='2017-05-31 11:33:52', `updateOn`=NULL, `active`='1', `orgType`='4', `serviceOrgType`=NULL, `roleCode`='cn', `roleDesc`='确认支付金额', `roleName`='评估机构财务人员' WHERE (`oid`='37');

UPDATE `risk_role` SET `oid`='59', `createOn`='2017-08-07 17:08:22', `updateOn`=NULL, `active`='1', `orgType`='5', `serviceOrgType`='1', `roleCode`='zxzy', `roleDesc`='撰写专员', `roleName`='报告编写人员' WHERE (`oid`='59');

UPDATE `risk_role` SET `oid`='34', `createOn`='2017-05-26 20:32:42', `updateOn`=NULL, `active`='1', `orgType`='5', `serviceOrgType`='1', `roleCode`='tkry', `roleDesc`='踏勘人员', `roleName`='勘查人员' WHERE (`oid`='34');
UPDATE `risk_role` SET `oid`='35', `createOn`='2017-05-26 20:33:15', `updateOn`=NULL, `active`='1', `orgType`='5', `serviceOrgType`='1', `roleCode`='tkxmjl', `roleDesc`='踏勘项目经理', `roleName`='勘查项目经理' WHERE (`oid`='35');
UPDATE `risk_role` SET `oid`='36', `createOn`='2017-05-26 20:33:49', `updateOn`=NULL, `active`='1', `orgType`='5', `serviceOrgType`='1', `roleCode`='tkzj', `roleDesc`='踏勘专家', `roleName`='勘查专家' WHERE (`oid`='36');
UPDATE `risk_role` SET `oid`='69', `createOn`='2018-08-17 13:00:08', `updateOn`=NULL, `active`='1', `orgType`='5', `serviceOrgType`='1', `roleCode`='tkqyjl', `roleDesc`='踏勘区域经理', `roleName`='勘查区域经理' WHERE (`oid`='69');



ALTER TABLE `risk_activityexpress`
DROP COLUMN `auth_cert_name`;

ALTER TABLE `risk_activityexpress`
DROP COLUMN `auth_cert_thumbnail`;

ALTER TABLE `risk_activityexpress`
DROP COLUMN `bank_licence_name`;

ALTER TABLE `risk_activityexpress`
DROP COLUMN `bank_licence_thumbnail`;

ALTER TABLE `risk_activityexpress`
DROP COLUMN `business_license_name`;

ALTER TABLE `risk_activityexpress`
DROP COLUMN `business_license_thumbnail`;

ALTER TABLE `risk_activityexpress`
DROP COLUMN `tax_cert_name`;

ALTER TABLE `risk_activityexpress`
DROP COLUMN `tax_cert_thumbnail`;

ALTER TABLE `risk_activityexpress`
DROP COLUMN `tax_prove_name`;

ALTER TABLE `risk_activityexpress`
DROP COLUMN `tax_prove_thumbnail`;

ALTER TABLE `risk_activityexpress`
DROP COLUMN `recipientAddress`;

ALTER TABLE `risk_activityexpress`
DROP COLUMN `recipientName`;

ALTER TABLE `risk_activityexpress`
DROP COLUMN `recipientPhone`;

ALTER TABLE `risk_activityexpress`
MODIFY COLUMN `companyNameInvoice`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '风评报告对象单位名称' AFTER `invoiceType`;

ALTER TABLE `risk_activityexpress`
MODIFY COLUMN `invoiceTitle`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发票的抬头' AFTER `companyNameInvoice`;

ALTER TABLE `risk_activityexpress`
MODIFY COLUMN `bankInvoice`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '开户银行' AFTER `invoiceTitle`;

ALTER TABLE `risk_activityexpress`
MODIFY COLUMN `contactPhoneInvoice`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '风评报告对象电话' AFTER `bankInvoice`;

ALTER TABLE `risk_activityexpress`
MODIFY COLUMN `bankAccountInvoice`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '开户银行账户' AFTER `contactPhoneInvoice`;

ALTER TABLE `risk_activityexpress`
MODIFY COLUMN `registerAddressInvoice`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '公司注册地址' AFTER `bankAccountInvoice`;

ALTER TABLE `risk_activityexpress`
MODIFY COLUMN `taxpayerNumberInvoice`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '纳税人识别号' AFTER `registerAddressInvoice`;

ALTER TABLE `risk_activityexpress`
MODIFY COLUMN `auth_cert`  varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '税务登记证' AFTER `taxpayerNumberInvoice`;

ALTER TABLE `risk_activityexpress`
MODIFY COLUMN `tax_prove`  varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '一般纳税人证明' AFTER `auth_cert`;

ALTER TABLE `risk_activityexpress`
MODIFY COLUMN `tax_cert`  varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '公司的税务登记证' AFTER `tax_prove`;

ALTER TABLE `risk_activityexpress`
MODIFY COLUMN `bank_licence`  varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '银行开户许可证' AFTER `tax_cert`;

ALTER TABLE `risk_activityexpress`
MODIFY COLUMN `business_license`  varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '营业执照副本' AFTER `bank_licence`;

ALTER TABLE `risk_activityexpress`
ADD COLUMN `eInvoiceStatus` varchar(10) NULL COMMENT '电子发票开票状态' AFTER `business_license`;

ALTER TABLE `risk_activityexpress`
ADD COLUMN `eInvoicePdfUrl` varchar(255) NULL COMMENT '电子发票链接' AFTER `eInvoiceStatus`;

ALTER TABLE `risk_activityexpress`
MODIFY COLUMN `invoiceExpressMode`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '不寄送/普通发票/增值税发票 ' AFTER `eInvoicePdfUrl`;

ALTER TABLE `risk_activityexpress`
MODIFY COLUMN `reportExpressMode`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '不寄送报告/寄送报告 ' AFTER `invoiceExpressMode`;

ALTER TABLE `risk_activityexpress`
MODIFY COLUMN `ticketAddress`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '收票人地址' AFTER `reportExpressMode`;

ALTER TABLE `risk_activityexpress`
MODIFY COLUMN `ticketName`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '收票人姓名' AFTER `ticketAddress`;

ALTER TABLE `risk_activityexpress`
ADD COLUMN `ticketEmail` varchar(255) NULL COMMENT '收票人邮箱' AFTER `ticketName`;

ALTER TABLE `risk_activityexpress`
MODIFY COLUMN `ticketPhone`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '收票人电话' AFTER `ticketEmail`;

ALTER TABLE `risk_activityexpress`
MODIFY COLUMN `express`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '快递类型' AFTER `ticketPhone`;

ALTER TABLE `risk_activityexpress`
MODIFY COLUMN `expressNumber`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '快递单号' AFTER `express`;

ALTER TABLE `risk_activityexpress`
MODIFY COLUMN `expressDate`  datetime NULL DEFAULT NULL COMMENT '快递时间' AFTER `expressNumber`;

ALTER TABLE `risk_activityexpress`
MODIFY COLUMN `content`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '快递内容' AFTER `expressDate`;

ALTER TABLE `risk_activityexpress`
MODIFY COLUMN `comment`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注' AFTER `content`;

ALTER TABLE `risk_activityexpress`
MODIFY COLUMN `approvalStatus`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '审核状态' AFTER `comment`;



ALTER TABLE `risk_invoicetemplate`
DROP COLUMN `auth_cert_name`,
DROP COLUMN `auth_cert_thumbnail`,
DROP COLUMN `bank_licence_name`,
DROP COLUMN `bank_licence_thumbnail`,
DROP COLUMN `business_license_name`,
DROP COLUMN `business_license_thumbnail`,
DROP COLUMN `tax_cert_name`,
DROP COLUMN `tax_cert_thumbnail`,
DROP COLUMN `tax_prove_name`,
DROP COLUMN `tax_prove_thumbnail`,
DROP COLUMN `recipientAddress`,
DROP COLUMN `recipientName`,
DROP COLUMN `recipientPhone`,
DROP COLUMN `invoiceType`,
DROP COLUMN `remark`,
DROP COLUMN `approveActive`,
MODIFY COLUMN `companyName`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '公司单位名称' AFTER `updateOn`,
MODIFY COLUMN `invoiceTitle`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发票的抬头' AFTER `companyName`,
MODIFY COLUMN `taxpayerNumber`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '纳税人识别号' AFTER `invoiceTitle`,
MODIFY COLUMN `registerAddress`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '公司注册地址' AFTER `taxpayerNumber`,
MODIFY COLUMN `contactPhone`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '单位联系方式' AFTER `registerAddress`,
MODIFY COLUMN `bank`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '开户银行' AFTER `contactPhone`,
MODIFY COLUMN `bankAccount`  varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '开户银行账户' AFTER `bank`,
MODIFY COLUMN `tax_prove`  varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '一般纳税人证明' AFTER `bankAccount`,
MODIFY COLUMN `bank_licence`  varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '银行开户许可证' AFTER `tax_prove`,
MODIFY COLUMN `business_license`  varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '营业执照副本' AFTER `bank_licence`,
MODIFY COLUMN `tax_cert`  varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '税务登记证' AFTER `business_license`,
MODIFY COLUMN `auth_cert`  varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '增票授权委托书' AFTER `tax_cert`,
ADD COLUMN `ticketEmail`  varchar(255) NULL DEFAULT NULL COMMENT '收票人邮箱' AFTER `ticketPhone`;


ALTER TABLE `risk_serviceorg`
ADD COLUMN `boofooMerId` varchar(10) NULL COMMENT '机构的商户号,宝付' AFTER `umpayMerId`;


update risk_systemconfig set sysvalue = 'http://59.110.22.100:8099/document/indexOut?document_id=23' where syskey = 'cbdw_helpdoc_url';
update risk_systemconfig set sysvalue = 'http://59.110.22.100:8099/document/indexOut?document_id=11' where syskey = 'pgjg_helpdoc_url';
update risk_systemconfig set sysvalue = 'http://59.110.22.100:8099/document/indexOut?document_id=10' where syskey = 'dsfpgjg_helpdoc_url';

update risk_materialformattrtemplate set isRequired = 0 where attrCode = 'Z01';