Commit fa762a0a authored by maoying's avatar maoying

解决冲突

parents 64033a4b 47044d70
......@@ -59,3 +59,4 @@ public enum ManageLevelEum {
this.manageLevel = manageLevel;
}
}
......@@ -32,6 +32,7 @@ public class RpnChangeLog extends BasicEntity {
/**
* 触发变化类型(巡检、告警、评价、删除)
* 变化类型(巡检、评价、告警)
*/
@Column(name = "trigger_type")
private String triggerType;
......
package com.yeejoin.amos.fas.business.controller;
import java.util.HashMap;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.yeejoin.amos.fas.business.param.CommonPageInfoParam;
import com.yeejoin.amos.fas.business.service.intfc.IRiskLevelService;
import com.yeejoin.amos.fas.business.util.CommonPageParamUtil;
......@@ -11,18 +25,10 @@ import com.yeejoin.amos.fas.core.util.CommonResponse;
import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
import com.yeejoin.amos.fas.dao.entity.RiskLevel;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@RestController
@RequestMapping("/api/riskLevel")
......@@ -97,7 +103,7 @@ public class RiskLevelController extends BaseController {
return CommonResponseUtil.failure(e.getMessage() + ",风险等级删除失败");
}
}
@ApiOperation(value = "风险管控级别查询",notes = "风险管控级别查询")
@GetMapping(value = "/manageLevel/list")
public CommonResponse getManageLevelEumList(){
......
......@@ -8,31 +8,27 @@ import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collector;
import java.util.stream.Collectors;
import com.yeejoin.amos.fas.business.util.StringUtil;
import com.yeejoin.amos.fas.common.enums.ManageLevelEum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import com.google.common.base.Joiner;
import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.fas.business.dao.mapper.RiskLevelMapper;
import com.yeejoin.amos.fas.business.dao.repository.IRiskLevelDao;
import com.yeejoin.amos.fas.business.dao.repository.IRiskSourceDao;
import com.yeejoin.amos.fas.business.feign.RemoteSecurityService;
import com.yeejoin.amos.fas.business.param.CommonPageInfoParam;
import com.yeejoin.amos.fas.business.service.intfc.IRiskLevelService;
import com.yeejoin.amos.fas.business.util.StringUtil;
import com.yeejoin.amos.fas.common.enums.ManageLevelEum;
import com.yeejoin.amos.fas.dao.entity.RiskLevel;
import com.yeejoin.amos.fas.dao.entity.RiskSource;
import com.yeejoin.amos.fas.exception.YeeException;
import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import org.springframework.util.CollectionUtils;
@Service("riskLevelService")
public class RiskLevelServiceImpl implements IRiskLevelService {
@Autowired
......@@ -69,6 +65,7 @@ public class RiskLevelServiceImpl implements IRiskLevelService {
});
}
return new PageImpl<>(content, param, total);
}
......
......@@ -1123,7 +1123,9 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
BigDecimal sidValue = new BigDecimal(fmea.getSidValue());
BigDecimal didValue = new BigDecimal(fmea.getDidValue());
//1.1计算rpni
BigDecimal rpni = oidValue.multiply(sidValue).multiply(didValue).setScale(2, BigDecimal.ROUND_HALF_UP);
BigDecimal rpn;
//1.2计算rpn:为空则rpni = rpn;不为空则重新计算s*d*newo
if (fmea.getNewEvaluationOid() == null) {
......@@ -1132,6 +1134,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
} else {
BigDecimal newOidValue = new BigDecimal(fmea.getNewOidValue());
rpn = newOidValue.multiply(sidValue).multiply(didValue).setScale(2, BigDecimal.ROUND_HALF_UP);
}
List<RiskLevel> levels = riskLevelDao.findAll();
RiskLevel newLevel = RpnUtils.getBetweenLevel(rpn, levels);
......@@ -1261,7 +1264,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
}
}
private void saveRpnLog(Long riskSourceId, Long fmeaId, BigDecimal rpn, BigDecimal rpni, String notifyType) {
private void saveRpnLog(Long riskSourceId, Long fmeaId, BigDecimal rpn, BigDecimal rpni,String notifyType) {
RpnChangeLog rpnChangeLog = new RpnChangeLog();
rpnChangeLog.setRiskSourceId(riskSourceId);
rpnChangeLog.setRpn(rpn);
......@@ -1270,6 +1273,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
rpnChangeLog.setTriggerBy(fmeaId);
rpnChangeLog.setTriggerType(notifyType);
rpnChangeLog.setFmeaId(fmeaId);
rpnChangeLog.setTriggerType(notifyType);
iRpnChangeLogDao.save(rpnChangeLog);
}
......@@ -1296,7 +1300,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
return;
}
List<Fmea> fmeas = fmeaMapper.listByRiskSourceId(riskSourceId);
if (CollectionUtils.isEmpty(fmeas)) {//fema删除
if (CollectionUtils.isEmpty(fmeas)) {//fema全部删除
BigDecimal resetValue = new BigDecimal("0");
riskSource.setRpn(null);
riskSource.setRpni(null);
......@@ -1306,6 +1310,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
riskSourceMapper.updateRpn(riskSource);
//2.记录风险点rpn变化流水
this.saveRpnLog(riskSource.getId(), fmeaId, resetValue, resetValue, notifyType);
//3.更新父节点rpn、rpni、风险等级
this.updateParentRpn(riskSource.getParentId());
//4.通知全景监控屏幕数据刷新
......@@ -1330,6 +1335,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
riskSourceMapper.updateRpn(riskSource);
//2.记录风险点rpn变化流水
this.saveRpnLog(riskSource.getId(), fmeaId, rpn, rpni, notifyType);
//3.更新父节点rpn、rpni、风险等级
this.updateParentRpn(riskSource.getParentId());
//4.极光推送给手机客户端
......
<?xml version="1.0" encoding="utf-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.4.xsd">
<changeSet author="xukaiqiang" id="1557134646002-1">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="f_fmea" columnName="rpn"/>
</not>
</preConditions>
<comment>f_fmea add column rpn</comment>
<sql>
ALTER TABLE `f_fmea` ADD COLUMN `rpn` decimal(10,2) DEFAULT NULL COMMENT '实时rpn';
</sql>
</changeSet>
<changeSet author="xukaiqiang" id="1557134646002-2">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="f_fmea" columnName="new_evaluation_oid"/>
</not>
</preConditions>
<comment>f_fmea add column new_evaluation_oid</comment>
<sql>
ALTER TABLE `f_fmea` ADD COLUMN `new_evaluation_oid` bigint(20) DEFAULT NULL COMMENT '最新故障频数';
</sql>
</changeSet>
<changeSet author="xukaiqiang" id="1557134646002-3">
<preConditions onFail="MARK_RAN">
<not>
<tableExists tableName="f_fmea_equipment_point"/>
</not>
</preConditions>
<comment>create f_fmea_equipment_point</comment>
<sql>
CREATE TABLE `f_fmea_equipment_point` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键自增',
`fmea_id` bigint(20) NOT NULL COMMENT 'fmea编号',
`equipment_point_id` bigint(20) NOT NULL COMMENT '装备指标编号',
`state` tinyint(4) NOT NULL DEFAULT '0' COMMENT '装备指标状态(0:正常;1:告警)',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=81 DEFAULT CHARSET=utf8 COMMENT='fmea和装备指标的关系';
</sql>
</changeSet>
<changeSet author="xukaiqiang" id="1557134646002-4">
<preConditions onFail="MARK_RAN">
<not>
<tableExists tableName="f_fmea_point_inputitem"/>
</not>
</preConditions>
<comment>create f_fmea_point_inputitem</comment>
<sql>
CREATE TABLE `f_fmea_point_inputitem` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键自增',
`fmea_id` bigint(20) NOT NULL COMMENT 'fmea编号',
`point_inputitem_id` bigint(20) NOT NULL COMMENT '检查点和项关系编号',
`state` tinyint(4) NOT NULL DEFAULT '0' COMMENT '检查项状态(0:正常;1:不合格)',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=116 DEFAULT CHARSET=utf8 COMMENT='fmea和检查项的关系';
</sql>
</changeSet>
<changeSet author="xukaiqiang" id="1557134646002-5">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="f_risk_level" columnName="top_limit"/>
</not>
</preConditions>
<comment>f_risk_level add column top_limit</comment>
<sql>
ALTER TABLE `f_risk_level` ADD COLUMN `top_limit` decimal(10,2) DEFAULT NULL COMMENT '上限';
</sql>
</changeSet>
<changeSet author="xukaiqiang" id="1557134646002-6">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="f_risk_level" columnName="down_limit"/>
</not>
</preConditions>
<comment>f_risk_level add column down_limit</comment>
<sql>
ALTER TABLE `f_risk_level` ADD COLUMN `down_limit` decimal(10,2) DEFAULT NULL COMMENT '下限';
</sql>
</changeSet>
<changeSet author="xukaiqiang" id="1557134646002-7">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="f_rpn_change_log" columnName="fmea_id"/>
</not>
</preConditions>
<comment>f_rpn_change_log add column fmea_id</comment>
<sql>
ALTER TABLE `f_rpn_change_log` ADD COLUMN `fmea_id` bigint(20) NOT NULL COMMENT 'fmeaId';
</sql>
</changeSet>
<changeSet author="xukaiqiang" id="1557134646002-8">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="f_fmea" columnName="risk_level_id"/>
</not>
</preConditions>
<comment>f_fmea add column risk_level_id</comment>
<sql>
ALTER TABLE `f_fmea` ADD COLUMN `risk_level_id` bigint(20) DEFAULT NULL COMMENT '风险等级id';
</sql>
</changeSet>
<changeSet author="xukaiqiang" id="1557134646002-9">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="f_fmea" columnName="company_leader"/>
</not>
</preConditions>
<comment>f_fmea add column company_leader</comment>
<sql>
ALTER TABLE `f_fmea` ADD COLUMN `company_leader` bigint(20) DEFAULT NULL COMMENT '公司负责人';
</sql>
</changeSet>
<changeSet author="xukaiqiang" id="1557134646002-10">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="f_fmea" columnName="department_leader"/>
</not>
</preConditions>
<comment>f_fmea add column department_leader</comment>
<sql>
ALTER TABLE `f_fmea` ADD COLUMN `department_leader` bigint(20) DEFAULT NULL COMMENT '部门负责人';
</sql>
</changeSet>
<changeSet author="xukaiqiang" id="1557134646002-11">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="f_fmea" columnName="group_leader"/>
</not>
</preConditions>
<comment>f_fmea add column group_leader</comment>
<sql>
ALTER TABLE `f_fmea` ADD COLUMN `group_leader` bigint(20) DEFAULT NULL COMMENT '班组负责人';
</sql>
</changeSet>
<changeSet author="xukaiqiang" id="1557134646002-12">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="f_fmea" columnName="person_leader"/>
</not>
</preConditions>
<comment>f_fmea add column person_leader</comment>
<sql>
ALTER TABLE `f_fmea` ADD COLUMN `person_leader` bigint(20) DEFAULT NULL COMMENT '个人负责人';
</sql>
</changeSet>
<changeSet author="tianbo" id="1582104676000-1">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="f_fmea" columnName="identify_user"/>
</not>
</preConditions>
<comment>f_fmea add column identify_user</comment>
<sql>
ALTER TABLE `f_fmea` ADD COLUMN `identify_user` int(11) DEFAULT NULL COMMENT '辨识人';
</sql>
</changeSet>
<changeSet author="tianbo" id="1582104676000-2">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="f_fmea" columnName="identify_method"/>
</not>
</preConditions>
<comment>f_fmea add column identify_method</comment>
<sql>
ALTER TABLE `f_fmea` ADD COLUMN `identify_method` varchar(255) DEFAULT NULL COMMENT '辨识方法';
</sql>
</changeSet>
<changeSet author="shanqiyun" id="1583217856000-1">
<preConditions onFail="MARK_RAN">
<not>
<tableExists tableName="f_topography_node"/>
</not>
</preConditions>
<comment>create f_topography_node</comment>
<sql>
CREATE TABLE `f_topography_node` (
`id` varchar(36) NOT NULL,
`create_date` datetime DEFAULT NULL,
`create_user` varchar(255) DEFAULT NULL,
`is_delete` bit(1) DEFAULT NULL,
`update_date` datetime DEFAULT NULL,
`update_user` varchar(255) DEFAULT NULL,
`category` varchar(32) DEFAULT NULL COMMENT '类别',
`group` varchar(32) DEFAULT '' COMMENT '分组',
`is_group` bit(1) DEFAULT NULL COMMENT '是否是组',
`key` varchar(32) DEFAULT NULL COMMENT 'key',
`loc` varchar(255) DEFAULT NULL COMMENT '位置',
`picture` varchar(32) DEFAULT NULL COMMENT '图片',
`size` varchar(32) DEFAULT NULL COMMENT '大小',
`source_id` varchar(32) DEFAULT NULL COMMENT '资源id',
`text` varchar(32) DEFAULT NULL COMMENT '文本',
`app_id` varchar(32) DEFAULT NULL COMMENT 'appid',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
</sql>
</changeSet>
<changeSet author="shanqiyun" id="1583217856000-2">
<preConditions onFail="MARK_RAN">
<not>
<tableExists tableName="f_topography_line"/>
</not>
</preConditions>
<comment>create f_topography_line</comment>
<sql>
CREATE TABLE `f_topography_line` (
`id` varchar(36) NOT NULL,
`create_date` datetime DEFAULT NULL,
`create_user` varchar(255) DEFAULT NULL,
`is_delete` bit(1) DEFAULT NULL,
`update_date` datetime DEFAULT NULL,
`update_user` varchar(255) DEFAULT NULL,
`app_id` varchar(32) DEFAULT NULL COMMENT 'appid',
`clickable` bit(1) DEFAULT NULL COMMENT '可点击',
`from` varchar(32) DEFAULT NULL COMMENT '起点',
`has_arrow` bit(1) DEFAULT NULL COMMENT '有箭头',
`is_dash` bit(1) DEFAULT NULL COMMENT '是虚线',
`line_color` int(11) DEFAULT NULL COMMENT '线颜色',
`to` varchar(32) DEFAULT NULL COMMENT '终点',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
</sql>
</changeSet>
<changeSet author="shanqiyun" id="1583217856000-3">
<preConditions onFail="MARK_RAN">
<not>
<tableExists tableName="f_topography_node_detail"/>
</not>
</preConditions>
<comment>create f_topography_node_detail</comment>
<sql>
CREATE TABLE `f_topography_node_detail` (
`id` varchar(36) NOT NULL,
`create_date` datetime DEFAULT NULL,
`create_user` varchar(255) DEFAULT NULL,
`is_delete` bit(1) DEFAULT NULL,
`update_date` datetime DEFAULT NULL,
`update_user` varchar(255) DEFAULT NULL,
`node_detail` text COMMENT '详情',
`nodeid` varchar(32) DEFAULT NULL COMMENT '节点id',
`nodekey` varchar(32) DEFAULT NULL COMMENT '节点key',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
</sql>
</changeSet>
<changeSet author="tianbo" id="1583068193000-1">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="f_fmea_equipment_point" columnName="important_equipment_id"/>
</not>
</preConditions>
<comment>f_fmea_equipment_point add column important_equipment_id</comment>
<sql>
ALTER TABLE `f_fmea_equipment_point` ADD COLUMN `important_equipment_id` bigint(20) NOT NULL COMMENT '所属重点设备id';
</sql>
</changeSet>
<changeSet author="shanqiyun" id="1583983706412-1">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="f_topography_node" columnName="type"/>
</not>
</preConditions>
<comment>f_topography_node add column type</comment>
<sql>
ALTER TABLE `f_topography_node` ADD COLUMN `type` varchar(32) DEFAULT NULL COMMENT '1 领导架构 | 2 任务流程';
</sql>
</changeSet>
<changeSet author="shanqiyun" id="1583983706412-2">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="f_topography_line" columnName="type"/>
</not>
</preConditions>
<comment>f_topography_line add column type</comment>
<sql>
ALTER TABLE `f_topography_line` ADD COLUMN `type` varchar(32) DEFAULT NULL COMMENT '1 领导架构 | 2 任务流程';
</sql>
</changeSet>
<changeSet author="shanqiyun" id="1583983706412-3">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="f_topography_line" columnName="category"/>
</not>
</preConditions>
<comment>f_topography_line add column category</comment>
<sql>
ALTER TABLE `f_topography_line` ADD COLUMN `category` varchar(32) DEFAULT '' COMMENT '类别';
</sql>
</changeSet>
<changeSet author="shanqiyun" id="1586742391611-1">
<preConditions onFail="MARK_RAN">
<not>
<tableExists tableName="f_text_plan"/>
</not>
</preConditions>
<comment>create f_text_plan</comment>
<sql>
CREATE TABLE `f_text_plan` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`app_id` varchar(255) NOT NULL COMMENT '预案id',
`text_name` varchar(255) NOT NULL DEFAULT '' COMMENT '文本预案名称',
`file_path` varchar(255) NOT NULL COMMENT '预案路径',
`remark` varchar(500) DEFAULT NULL COMMENT '备注',
`create_date` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=101 DEFAULT CHARSET=utf8mb4 COMMENT='文本预案';
</sql>
</changeSet>
<changeSet author="shanqiyun" id="1586742391611-2">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="f_topography_line" columnName="from_port"/>
</not>
</preConditions>
<comment>f_topography_line add column from_port</comment>
<sql>
ALTER TABLE `f_topography_line` ADD COLUMN `from_port` varchar(32) DEFAULT NULL;
</sql>
</changeSet>
<changeSet author="shanqiyun" id="1586742391611-3">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="f_topography_line" columnName="to_port"/>
</not>
</preConditions>
<comment>f_topography_line add column to_port</comment>
<sql>
ALTER TABLE `f_topography_line` ADD COLUMN `to_port` varchar(32) DEFAULT NULL;
</sql>
</changeSet>
<changeSet author="shanqiyun" id="1586742391611-4">
<preConditions onFail="MARK_RAN">
<columnExists tableName="f_topography_node_detail " columnName="nodeid"/>
</preConditions>
<comment>"f_topography_node_detail " change column nodeid</comment>
<sql>
ALTER TABLE `f_topography_node_detail`
MODIFY COLUMN `nodeid` varchar(36) DEFAULT NULL;
</sql>
</changeSet>
<changeSet author="suhuiguang" id="1588990926789-1">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="f_risk_level " columnName="manage_level"/>
</not>
</preConditions>
<comment>f_risk_level add column manage_level 管控级别</comment>
<sql>
ALTER TABLE `f_risk_level`
add COLUMN `manage_level` tinyint(4) DEFAULT NULL COMMENT '管控级别';
</sql>
</changeSet>
<changeSet author="suhuiguang" id="1589165258908-1">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="f_rpn_change_log " columnName="trigger_type"/>
</not>
</preConditions>
<comment>f_rpn_change_log add column trigger_type 触发类型</comment>
<sql>
ALTER TABLE `f_rpn_change_log`
add COLUMN `trigger_type` varchar(20) DEFAULT NULL COMMENT '触发类型:巡检、告警、评价、删除' after `trigger_by`;
</sql>
</changeSet>
<changeSet author="suhuiguang" id="1588990926789-1">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="f_risk_level " columnName="manage_level"/>
</not>
</preConditions>
<comment>f_risk_level add column manage_level 管控级别</comment>
<sql>
ALTER TABLE `f_risk_level`
add COLUMN `manage_level` tinyint(4) DEFAULT NULL COMMENT '管控级别';
</sql>
</changeSet>
<changeSet author="suhuiguang" id="1589769364577-1">
<preConditions onFail="MARK_RAN">
<columnExists tableName="f_risk_level " columnName="manage_level"/>
</preConditions>
<comment>f_risk_level 增加管控级别 初始化数据</comment>
<sql>
update f_risk_level set manage_level = 1 where level = '1';
update f_risk_level set manage_level = 2 where level = '2';
update f_risk_level set manage_level = 3 where level = '3';
update f_risk_level set manage_level = 4 where level = '4';
</sql>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
......@@ -122,4 +122,18 @@
</sql>
</changeSet>
<changeSet author="maoying" id="1589954524000-1" runOnChange="true">
<comment>updatePointConfig 触发器创建</comment>
<sql endDelimiter="#">
DROP TRIGGER IF EXISTS `updatePointConfig`;
CREATE TRIGGER `updatePointConfig` AFTER UPDATE ON `p_point` FOR EACH ROW
BEGIN
IF (new.name != old.name)
THEN
UPDATE p_point_config pc SET pc.`name` = CONCAT(new.name,'合格') WHERE pc.name LIKE '%合格' AND pc.point_id = new.id;
UPDATE p_point_config pc SET pc.`name` = CONCAT(new.name,'漏检') WHERE pc.name LIKE '%漏检' AND pc.point_id = new.id;
END IF;
END#
</sql>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
......@@ -23,7 +23,12 @@
a.severity,
a.name,
a.color,
<<<<<<< HEAD
a.create_by as createBy,
=======
a.manage_level manageLevel,
b.name as userName ,
>>>>>>> dev
a.create_date as createDate,
a.remark,
a.manage_level as manageLevel
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment