-- 操作日志表增加字段
ALTER TABLE `risk_operate_log`
ADD COLUMN `success`  varchar(1) NULL COMMENT '成功标识' AFTER `content`,
ADD COLUMN `exception`  text NULL COMMENT '异常信息' AFTER `success`;


-- 优化活动 将 安保方案补充材料 修改为 补充材料
update risk_materialformmenutemplate set menuName='补充材料' where menuCode='Z01';
update risk_materialformclass set className='补充材料（如保安花名册、保安员证等材料，请与管辖公安机关确认）' where classCode='other';
update risk_materialformattrtemplate set seq=1 where menuTemplate_id=22 and attrCode='F28';
update risk_materialformattrtemplate set attrName='补充材料',tips='请在此上传补充材料（如保安花名册、保安员证等材料，请与管辖公安机关确认）'
where menuTemplate_id=28 and attrCode='Z01';

-- 增加是否显示字段
ALTER TABLE `risk_change_log`
ADD COLUMN `isShow`  varchar(1) NULL DEFAULT '1' COMMENT '是否显示' AFTER `isUpdate`;

ALTER TABLE `risk_dynamic_panel`
ADD COLUMN `isShow`  varchar(1) NULL DEFAULT '1' COMMENT '是否显示' AFTER `contractOrgId`;



-- 新增内网升级日志表
CREATE TABLE `sys_sp_upgrade_tips` (
  `oid` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL COMMENT '推送站点名称',
  `requestUrl` varchar(2000) DEFAULT NULL COMMENT '推送站点地址',
  `marketId` varchar(255) DEFAULT NULL COMMENT '落地省份id',
  `title` varchar(255) DEFAULT NULL COMMENT '标题',
  `content` text COMMENT '升级内容',
  `active` varchar(1) DEFAULT '0' COMMENT '是否生效',
  `isNeedPush` varchar(1) DEFAULT '1' COMMENT '是否需要推送',
  `deleteFlag` varchar(1) DEFAULT NULL,
  `createOn` datetime DEFAULT NULL,
  `updateOn` datetime DEFAULT NULL,
  `createBy` varchar(255) DEFAULT NULL,
  `updateBy` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`oid`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='审批系统升级提示';



-- 重新导入动态看板模板
delete from `risk_dynamic_panel_template`;
-- ----------------------------
-- Records of risk_dynamic_panel_template
-- ----------------------------
INSERT INTO `risk_dynamic_panel_template` VALUES ('100001', '100', '生成订单【<font class=\"font_blue\">@activityName@</font>】', '生成订单', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('100002', '100', '订单【<font class=\"font_blue\">@activityName@</font>】已选机构：<font class=\"font_blue\">@orgNameList@</font>', '选择评估机构', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('100003', '100', '收到来自 <font class=\"font_blue\">@contractName@</font> 的订单【<font class=\"font_blue\">@activityName@</font>】，<font class=\"font_blue\">@reportUrgentName@</font>', '收到订单', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('100004', '100', '<font class=\"font_blue\">@operateName@</font> 已修改订单【<font class=\"font_blue\">@activityName@</font>】的金额，修改前：<font class=\"font_blue\">@sourceAmount@</font>元，修改后：<font class=\"font_blue\">@updateAfterAmount@</font>元', '修改金额', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('100005', '100', '订单【<font class=\"font_blue\">@activityName@</font>】已成功支付，支付方式：<font class=\"font_blue\">@paymentMethod@</font>，支付金额：<font class=\"font_blue\">@transactionAmount@</font>元', '支付金额', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('100006', '100', '<font class=\"font_blue\">@contractName@</font> 已修改【<font class=\"font_blue\">@activityName@</font>】的活动信息，<a href=\"javascript:void(0);\" onclick=\"showUpdateLog(\'@activityId@\')\"><font class=\"font_blue\">查看修改日志</font></a>', '修改日志-风评', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('200001', '200', '<font class=\"font_blue\">@operateName@</font> 已提交订单【<font class=\"font_blue\">@activityName@</font>】的补充材料', '提交补充材料', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('200002', '200', '<font class=\"font_blue\">@contractName@</font> 已提交订单【<font class=\"font_blue\">@activityName@</font>】的补充材料', '提交补充材料', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('200003', '200', '<font class=\"font_blue\">@operateName@</font> 已提交订单【<font class=\"font_blue\">@activityName@</font>】的评估报告，提交版本为：<a href=\"javascript:void(0);\" onclick=\"preview(\'@reportUrl@\')\" target=\"_blank\"><font class=\"font_blue\">@reportVer@</font></a>', '提交报告', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('200004', '200', '<font class=\"font_blue\">@orgName@</font> 已提交订单【<font class=\"font_blue\">@activityName@</font>】的评估报告，<a href=\"javascript:void(0);\" onclick=\"preview(\'@reportUrl@\')\" target=\"_blank\"><font class=\"font_blue\">查看评估报告</font></a>', '评估报告', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('300001', '300', '<font class=\"font_blue\">@operateName@</font> 已分配撰写任务【<font class=\"font_blue\">@activityName@</font>】，相关人员：<font class=\"font_blue\">@zxUserList@</font>', '撰写任务分配', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('300002', '300', '<font class=\"font_blue\">@operateName@</font> 已重新分配撰写任务【<font class=\"font_blue\">@activityName@</font>】，相关人员：<font class=\"font_blue\">@zxUserList@</font>', '撰写任务重新分配', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('300003', '300', '<font class=\"font_blue\">@operateName@</font> 已完成【<font class=\"font_blue\">@activityName@</font>】的初稿编写任务，<a href=\"javascript:void(0);\" onclick=\"preview(\'@reportUrl@\')\"  target=\"_blank\"><font class=\"font_blue\">评估报告（@operateName@)</font></a>', '初稿撰写', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('300004', '300', '<font class=\"font_blue\">@operateName@</font> 已完成【<font class=\"font_blue\">@activityName@</font>】的报告审核任务，<a href=\"javascript:void(0);\" onclick=\"preview(\'@reportUrl@\')\" target=\"_blank\"><font class=\"font_blue\">评估报告（@operateName@)</font></a>', '报告审核', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('300005', '300', '<font class=\"font_blue\">@operateName@</font> 已完成【<font class=\"font_blue\">@activityName@</font>】的专家评估任务，<a href=\"javascript:void(0);\" onclick=\"preview(\'@reportUrl@\')\" target=\"_blank\"><font class=\"font_blue\">评估报告（@operateName@)</font></a>', '专家撰写', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('300006', '300', '<font class=\"font_blue\">@operateName@</font> 已完成【<font class=\"font_blue\">@activityName@</font>】的组长复核任务，<a href=\"javascript:void(0);\" onclick=\"preview(\'@reportUrl@\')\" target=\"_blank\"><font class=\"font_blue\">评估报告（@operateName@)</font></a>', '组长复核', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('400001', '400', '<font class=\"font_blue\">@operateName@</font> 已分配勘查任务【<font class=\"font_blue\">@activityName@</font>】，勘查人员：<font class=\"font_blue\">@tkUserName@</font>，勘查专家：<font class=\"font_blue\">@tkzjUserList@</font>', '踏勘任务分配', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('400002', '400', '<font class=\"font_blue\">@operateName@</font> 已重新分配勘查任务【<font class=\"font_blue\">@activityName@</font>】，勘查人员：<font class=\"font_blue\">@tkUserName@</font>，勘查专家：<font class=\"font_blue\">@tkzjUserList@</font>', '踏勘任务重新分配', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('400003', '400', '<font class=\"font_blue\">@operateName@</font> 已接受勘查任务【<font class=\"font_blue\">@activityName@</font>】', '接受勘查任务', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('400004', '400', '<font class=\"font_blue\">@operateName@</font>  已拒绝勘查任务【<font class=\"font_blue\">@activityName@</font>】', '拒绝勘查任务', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('400005', '400', '<font class=\"font_blue\">@operateName@</font>  申请转交勘查任务【<font class=\"font_blue\">@activityName@</font>】', '勘查任务转交', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('400006', '400', '<font class=\"font_blue\">@operateName@</font>  申请专家协助处理勘查任务【<font class=\"font_blue\">@activityName@</font>】', '申请专家', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('400007', '400', '<font class=\"font_blue\">@tkUserName@</font> 关于勘查任务【<font class=\"font_blue\">@activityName@</font>】的任务转交申请被 <font class=\"font_blue\">@operateName@</font> 拒绝', '任务转交拒绝', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('400008', '400', '<font class=\"font_blue\">@tkUserName@</font> 关于勘查任务【<font class=\"font_blue\">@activityName@</font>】的专家申请被 <font class=\"font_blue\">@operateName@</font> 拒绝', '专家申请拒绝', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('400009', '400', '勘查任务【<font class=\"font_blue\">@activityName@</font> 】已为勘查任务【<font class=\"font_blue\">@activityName@</font>】已重新分配，勘查人员：<font class=\"font_blue\">“@tkUserName@”</font>，勘查专家：<font class=\"font_blue\">“@tkzjUserList@”</font>', '专家申请同意', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('400010', '400', '<font class=\"font_blue\">@operateName@</font> 已为【<font class=\"font_blue\">@activityName@</font>】新增@step@计划，勘查时间：<font class=\"font_blue\">@tkTime@</font>，勘查地点：<font class=\"font_blue\">@tkVenue@</font>', '踏勘计划', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('400011', '400', '<font class=\"font_blue\">@operateName@</font> 已完成【<font class=\"font_blue\">@activityName@</font>】@step@任务，<a href=\"javascript:void(0);\" onclick=\"preview(\'@surveyReport@\')\" target=\"_blank\"><font class=\"font_blue\">查看@step@报告</font></a>', '踏勘报告', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('400012', '400', '<font class=\"font_blue\">@contractName@</font> 已反馈【<font class=\"font_blue\">@activityName@</font>】@step@的整改情况', '踏勘整改回复', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('400013', '400', '<font class=\"font_blue\">@operateName@</font> 已反馈【<font class=\"font_blue\">@activityName@</font>】@step@的整改情况', '踏勘整改回复', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('500001', '500', '<font class=\"font_blue\">@userName@</font> 已创建活动【<font class=\"font_blue\">@activityName@</font>】', '主站确认创建活动', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('500002', '500', '<font class=\"font_blue\">@userName@</font> 已为活动【<font class=\"font_blue\">@activityName@</font>】提交材料', '主站提交材料', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('500003', '500', '<font class=\"font_blue\">@operateName@</font> 已修改【<font class=\"font_blue\">@activityName@</font>】的活动信息，<a href=\"javascript:void(0);\" onclick=\"showUpdateLog(\'@activityId@\')\"><font class=\"font_blue\">查看修改日志</font></a>', '主站修改活动-承办方', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('600001', '600', '活动【<font class=\"font_blue\">@activityName@</font>】已提交初审', '主站-提交初审', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('600002', '600', '活动【<font class=\"font_blue\">@activityName@</font>】已通过初审', '通过初审', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('600003', '600', '活动【<font class=\"font_blue\">@activityName@</font>】初审被退回，<a href=\"javascript:void(0);\" onclick=\"showApproveContent(\'@approveContent@\')\"><font class=\"font_blue\">查看退回意见</font></a>', '初审退回', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('600004', '600', '活动【<font class=\"font_blue\">@activityName@</font>】已重新提交初审', '主站-重新提交初审', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('600005', '600', '活动【<font class=\"font_blue\">@activityName@</font>】已提交审批', '主站-提交审批、报告触发', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('600006', '600', '活动【<font class=\"font_blue\">@activityName@</font>】已受理', '已受理', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('600007', '600', '活动【<font class=\"font_blue\">@activityName@</font>】不予受理，<a href=\"javascript:void(0);\" onclick=\"showApproveContent(\'@approveContent@\')\"><font class=\"font_blue\">查看不予受理意见</font></a>', '不予受理', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('600008', '600', '活动【<font class=\"font_blue\">@activityName@</font>】审批已被退回，<a href=\"javascript:void(0);\" onclick=\"showApproveContent(\'@approveContent@\')\"><font class=\"font_blue\">查看退回意见</font></a>', '审批退回', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('600009', '600', '活动【<font class=\"font_blue\">@activityName@</font>】已通过审批', '通过审批', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('600010', '600', '活动【<font class=\"font_blue\">@activityName@</font>】未通过审批，<a href=\"javascript:void(0);\" onclick=\"showApproveContent(\'@approveContent@\')\"><font class=\"font_blue\">查看不予许可意见</font></a>', '未通过审批', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('600011', '600', '活动【<font class=\"font_blue\">@activityName@</font>】已重新提交审批', '主站-重新提交审批', null, null);
INSERT INTO `risk_dynamic_panel_template` VALUES ('600012', '600', '活动【<font class=\"font_blue\">@activityName@</font>】已被转交至：@transferArea@，<a href=\"javascript:void(0);\" onclick=\"showApproveContent(\'@transferContent@\')\"><font class=\"font_blue\">查看转交原因</font></a>', '活动转交', null, null);
