Commit 1a1a91d2 authored by maoying's avatar maoying

Merge branch 'develop' of 172.16.10.76:station/YeeAmosFireAutoSysRoot into dev

parents 1b38131f a8f43ef4
......@@ -68,6 +68,12 @@ public class TopographyLine extends BusinessEntity{
@Column(name = "to_port", columnDefinition = "varchar(32) COMMENT '终点'")
private String toPort;
@Column(name = "type", columnDefinition = "varchar(32) COMMENT '1 领导架构 | 2 任务流程'")
private String type;
@Column(name = "category", columnDefinition = "varchar(32) COMMENT '类别'")
private String category;
public String getId() {
return id;
}
......@@ -128,6 +134,18 @@ public class TopographyLine extends BusinessEntity{
public void setToPort(String toPort) {
this.toPort = toPort;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
}
......@@ -75,6 +75,9 @@ public class TopographyNode extends BusinessEntity{
@Column(name = "source_id", columnDefinition = "varchar(32) COMMENT '资源id'")
private String sourceId;
@Column(name = "type", columnDefinition = "varchar(32) COMMENT '1 领导架构 | 2 任务流程'")
private String type;
public String getId() {
return id;
}
......@@ -141,4 +144,10 @@ public class TopographyNode extends BusinessEntity{
public void setSourceId(String sourceId) {
this.sourceId = sourceId;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
}
package com.yeejoin.amos.fas.business.controller;
import com.yeejoin.amos.fas.business.service.intfc.IPlanVisual3dService;
import com.yeejoin.amos.fas.core.util.StringUtil;
import com.yeejoin.amos.fas.dao.entity.TextPlan;
import com.yeejoin.amos.op.core.common.response.CommonResponse;
import com.yeejoin.amos.op.core.util.CommonResponseUtil;
......@@ -24,11 +25,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
......@@ -109,29 +106,41 @@ public class PlanVisual3dController extends BaseController {
return response;
}
/**
* 资源设备信息查询
* 资源设备查询、数据项查询
*
* @param type or type && id
* @return 资源设备 or 数据项
*/
@ApiOperation(httpMethod = "GET", value = "资源查询", notes = "资源查询")
@Authorization(ingore = true)
@GetMapping(value = "/resource/{type}/list")
public CommonResponse getResourceList(@ApiParam(value = "资源类型", required = true) @PathVariable String type) {
return planVisual3dService.getResourceListByType(type);
@GetMapping(value = "resource/common")
@ApiOperation(value = "设备、数据项查询", notes = "按照资源类型type查询设备,按照资源类型type和设备id查询数据项")
public CommonResponse getResourceCommon(
@ApiParam(value = "资源类型") @RequestParam(required = false) String type,
@ApiParam(value = "主键id") @RequestParam(required = false) Long id) {
if(!StringUtil.isNotEmpty(type)){
return CommonResponseUtil.success();
}
if(StringUtil.isNotEmpty(type) && !StringUtil.isNotEmpty(id)){
return planVisual3dService.getResourceListByType(type);
}
if(StringUtil.isNotEmpty(type) && StringUtil.isNotEmpty(id)){
List<Map<String, Object>> list = planVisual3dService.getResourceById(type, id);
return CommonResponseUtil.success(list);
}
return CommonResponseUtil.success();
}
/**
* 资源设备数据项查询
*
* @param id
* @return
* 资源类型查询
* @return list
*/
@Authorization(ingore = true)
@GetMapping(value = "/{type}/detail/{id}")
@ApiOperation(value = "数据项查询", notes = "按照分类及id查询数据项")
public CommonResponse getResourceDetail(
@ApiParam(value = "资源类型", required = true) @PathVariable String type,
@ApiParam(value = "主键id", required = true) @PathVariable Long id) {
List<Map<String, Object>> list = planVisual3dService.getResourceById(type, id);
return CommonResponseUtil.success(list);
@ApiOperation(value = "资源类型查询",notes = "资源类型查询")
@GetMapping(value ="resource/type/list")
public CommonResponse getResourceList(){
return CommonResponseUtil.success(planVisual3dService.getResourceTypeList());
}
}
......@@ -42,11 +42,11 @@ public class TopographyController {
@Autowired
private ITopographyLineService lineService;
@ApiOperation(value = "根据appID查询节点及线", notes = "根据appID查询节点及线")
@GetMapping(value = "/{appId}")
public CommonResponse getTextPlanById(@PathVariable(value = "appId") String appId) {
List<TopographyNode> nodes = nodeService.getNodesByAppId(appId);
List<TopographyLine> links = lineService.getLinksByAppId(appId);
@ApiOperation(value = "根据appId查询节点及线", notes = "根据appID查询节点及线")
@GetMapping(value = "/query/{type}/{appId}")
public CommonResponse getTextPlanByIdAndType(@PathVariable(value = "appId") String appId,@PathVariable(value = "type") String type) {
List<TopographyNode> nodes = nodeService.getNodesByAppIdAndType(appId,type);
List<TopographyLine> links = lineService.getLinesByAppIdAndType(appId,type);
Map<String,Object> results = new HashMap<>();
results.put("nodeData", nodes);
results.put("linkData", links);
......@@ -62,33 +62,43 @@ public class TopographyController {
@ApiOperation(value = "保存拓扑图", notes = "保存拓扑图")
public CommonResponse savedonghuanNodes(@ApiParam(value = "", required = false) @RequestBody JSONObject topographyParam) {
String appId = topographyParam.getString("appId");
String type = topographyParam.getString("type");
//节点
JSONArray nodes = topographyParam.getJSONArray("nodeData");
List<TopographyNode> nodeData = JSON.parseArray(JSON.toJSONString(nodes), TopographyNode.class);
HashMap<String, String> convertKeyMap = new HashMap<>();
int curSize = nodeService.queryMaxKeyByAppId(appId);
int curSize = nodeService.queryMaxKeyByAppIdAndType(appId,type);
for(TopographyNode e:nodeData){
if(Integer.valueOf(e.getKey()) < 0) {
curSize = curSize + 1 ;
String newKey = String.format("%05d", curSize);
convertKeyMap.put(e.getKey(), newKey);
e.setKey(newKey);
e.setType(type);
e.setAppId(appId);
e.setGroup("");
if(e.getGroup() == null) {
e.setGroup("");
}else if(Integer.valueOf(e.getGroup()) < 0){//修改新节点组
e.setGroup(convertKeyMap.get(e.getGroup()));
}
}
};
//线
JSONArray links = topographyParam.getJSONArray("linkData");
List<TopographyLine> lineData = JSON.parseArray(JSON.toJSONString(links), TopographyLine.class);
lineData.forEach(l -> {
lineData.forEach(l -> {//修改新增节点之间线的连接
if(Integer.parseInt(l.getFrom()) < 0) {
l.setFrom(convertKeyMap.get(l.getFrom()));
}
if(Integer.parseInt(l.getTo()) < 0) {
l.setTo(convertKeyMap.get(l.getTo()));
}
if(l.getCategory() == null) {
l.setCategory("");
}
if(l.getAppId() == null) {
l.setAppId(appId);
l.setType(type);
}
});
......@@ -101,14 +111,14 @@ public class TopographyController {
TopographyNodeDetail nodeDetail = JSON.parseObject(JSON.toJSONString(nodeDetailJson), TopographyNodeDetail.class);
String nodekey = nodeDetail.getNodekey();
if(nodekey != null && Integer.parseInt(nodekey) < 0) {
TopographyNode node = nodeService.queryByKeyAndAppId(convertKeyMap.get(nodekey),appId);
TopographyNode node = nodeService.queryByKeyAndAppIdAndType(convertKeyMap.get(nodekey),appId,type);
nodeDetail.setNodeid(node.getId());
}
nodeService.saveNodeDetail(nodeDetail);
}
List<TopographyNode> newNodes = nodeService.getNodesByAppId(appId);
List<TopographyLine> newLinks = lineService.getLinksByAppId(appId);
//返回保存后的数据
List<TopographyNode> newNodes = nodeService.getNodesByAppIdAndType(appId,type);
List<TopographyLine> newLinks = lineService.getLinesByAppIdAndType(appId,type);
Map<String,Object> results = new HashMap<>();
results.put("nodeData", newNodes);
results.put("linkData", newLinks);
......@@ -143,7 +153,8 @@ public class TopographyController {
if("Link".equals(type)) {
lineService.deleteLine(id);
}else {
nodeService.deleteNode(id);
TopographyNode node = nodeService.queryById(id);
nodeService.deleteNode(node);
}
return CommonResponseUtil.success();
}
......
......@@ -10,7 +10,7 @@ import com.yeejoin.amos.fas.dao.entity.TopographyLine;
@Repository("iTopographyLineDao")
public interface ITopographyLineDao extends BaseDao<TopographyLine, Long> {
List<TopographyLine> findByAppId(String appId);
List<TopographyLine> findByAppIdAndType(String appId,String type);
TopographyLine findById(String id);
......
......@@ -11,16 +11,18 @@ import com.yeejoin.amos.fas.dao.entity.TopographyNode;
@Repository("iTopographyNodeDao")
public interface ITopographyNodeDao extends BaseDao<TopographyNode, Long> {
List<TopographyNode> findByAppId(String appId);
List<TopographyNode> findByAppIdAndType(String appId,String type);
@Query(value = "select * from f_topography_node " + " where id in (?1)",nativeQuery = true)
List<TopographyNode> findAllByIds(@Param("ids") List<String> ids);
TopographyNode findById(String id);
TopographyNode findByKeyAndAppId(String nodekey, String appId);
TopographyNode findByKeyAndAppIdAndType(String nodekey, String appId,String type);
@Query(value = "select max(`key`) from f_topography_node where app_id = (?1)",nativeQuery = true)
Integer queryMaxKeyByAppId(String appId);
@Query(value = "select max(`key`) from f_topography_node where app_id = (?1) and type = (?2)",nativeQuery = true)
Integer queryMaxKeyByAppIdAndType(String appId,String type);
List<TopographyNode> findByGroupAndAppIdAndType(String key, String appId, String type);
}
......@@ -16,8 +16,8 @@ public class ITopographyLineServiceImpl implements ITopographyLineService{
private ITopographyLineDao topographyLineDao;
@Override
public List<TopographyLine> getLinksByAppId(String appId) {
return topographyLineDao.findByAppId(appId);
public List<TopographyLine> getLinesByAppIdAndType(String appId,String type) {
return topographyLineDao.findByAppIdAndType(appId,type);
}
@Override
......
......@@ -27,20 +27,13 @@ public class ITopographyNodeServiceImpl implements ITopographyNodeService{
private ITopographyLineDao lineDao;
@Override
public List<TopographyNode> getNodesByAppId(String appId) {
return nodeDao.findByAppId(appId);
public List<TopographyNode> getNodesByAppIdAndType(String appId,String type) {
return nodeDao.findByAppIdAndType(appId,type);
}
@Override
public void saveNodes(List<TopographyNode> nodeData) {
// List<TopographyNode> list = topographyNodeDao.findAllByIds(nodeData.stream().map(n->n.getId()).collect(Collectors.toList()));
// for (TopographyNode topographyNode : list) {
// TopographyNode node = nodeData.stream().filter(n->topographyNode.getId().equals(n.getId())).findFirst().get();
// topographyNode.setLoc(node.getLoc());
// }
// topographyNodeDao.save(list);
nodeDao.save(nodeData);
}
@Override
......@@ -61,8 +54,8 @@ public class ITopographyNodeServiceImpl implements ITopographyNodeService{
}
@Override
public void deleteNode(String id) {
TopographyNode node = nodeDao.findById(id);
public void deleteNode(TopographyNode node) {
// TopographyNode node = nodeDao.findById(id);
if(node != null) {
String key = node.getKey();
nodeDao.delete(node);
......@@ -70,17 +63,27 @@ public class ITopographyNodeServiceImpl implements ITopographyNodeService{
if(lines != null && lines.size() > 0) {
lineDao.delete(lines);
}
if(node.getIsGroup() != null && node.getIsGroup()) {
List<TopographyNode> childNodes = nodeDao.findByGroupAndAppIdAndType(node.getKey(),node.getAppId(),node.getType());
childNodes.forEach(c -> deleteNode(c));
}
return;
}
}
@Override
public TopographyNode queryByKeyAndAppId(String nodekey, String appId) {
return nodeDao.findByKeyAndAppId(nodekey,appId);
public TopographyNode queryByKeyAndAppIdAndType(String nodekey, String appId,String type) {
return nodeDao.findByKeyAndAppIdAndType(nodekey,appId,type);
}
@Override
public int queryMaxKeyByAppIdAndType(String appId,String type) {
return nodeDao.queryMaxKeyByAppIdAndType(appId,type);
}
@Override
public int queryMaxKeyByAppId(String appId) {
return nodeDao.queryMaxKeyByAppId(appId);
public TopographyNode queryById(String id) {
return nodeDao.findById(id);
}
......
......@@ -2,6 +2,7 @@ package com.yeejoin.amos.fas.business.service.impl;
import com.google.common.collect.Lists;
import com.yeejoin.amos.fas.business.constants.FasConstant;
import com.yeejoin.amos.fas.business.dao.mapper.DictMapper;
import com.yeejoin.amos.fas.business.dao.mapper.PlanVisual3dMapper;
import com.yeejoin.amos.fas.business.dao.repository.ITextPlanDao;
import com.yeejoin.amos.fas.business.feign.IMaasVisualServer;
......@@ -34,6 +35,9 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
@Autowired
IDictService dictService;
@Autowired
private DictMapper dictMapper;
@Override
public List<TreeSubjectVo> getPlanTree() {
......@@ -71,9 +75,9 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
for (Object obj : list) {
TreeSubjectVo treeItem = new TreeSubjectVo();
LinkedHashMap<String, Object> map = (LinkedHashMap<String, Object>) obj;
treeItem.setId((Integer) map.get("id"));
treeItem.setId((String) map.get("id"));
treeItem.setTreeName((String) map.get("treeName"));
treeItem.setParentId((Integer) map.get("parentId"));
treeItem.setParentId((String) map.get("parentId"));
treeItem.setMaxSubjectNumber((Integer) map.get("maxSubjectNumber"));
treeItem.setType("treeNode");
......@@ -91,10 +95,10 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
TreeSubjectVo subjectVo = new TreeSubjectVo();
LinkedHashMap<String, Object> map1 = (LinkedHashMap<String, Object>) r;
subjectVo.setType("listNode");
subjectVo.setParentId((Integer) map.get("id"));
subjectVo.setId((Integer) map1.get("id"));
subjectVo.setDelete(map1.get("isDelete") == null ? false : (Boolean) map1.get("isDelete"));
subjectVo.setCreateTime((Long) map1.get("createTime"));
subjectVo.setParentId((String) map.get("id"));
subjectVo.setId((String) map1.get("id"));
subjectVo.setDelete(map1.get("isDelete") == null || (Integer) map1.get("isDelete") == 0 ? false : true);
subjectVo.setCreateTime((String) map1.get("createTime"));
subjectVo.setCreator(map1.get("creator") == null ? 0 : (Integer) map1.get("creator"));
subjectVo.setSubjectName((String) map1.get("subjectName"));
subjectVo.setTreeName((String) map1.get("subjectName"));
......@@ -102,16 +106,16 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
subjectVo.setSubjectType((String) map1.get("subjectType"));
subjectVo.setSubjectTypeName((String) map1.get("subjectTypeName"));
subjectVo.setPublishState((Integer) map1.get("publishState"));
subjectVo.setBelongTreeId((Integer) map1.get("belongTreeId"));
subjectVo.setBelongTreeId((String) map1.get("belongTreeId"));
subjectVo.setScenes(map1.get("scenes") == null ? "" : (String) map1.get("scenes"));
//关联文字预案
List<TextPlan> textPlans = iTextPlanDao.findByAppId(String.valueOf(subjectVo.getId()));
textPlans.forEach(t -> {
TreeSubjectVo textTreeSubjectVo = new TreeSubjectVo();
textTreeSubjectVo.setParentId(Integer.valueOf(t.getAppId()));
textTreeSubjectVo.setParentId(String.valueOf(t.getAppId()));
textTreeSubjectVo.setTreeName(t.getTextName());
textTreeSubjectVo.setId((int) t.getId());
textTreeSubjectVo.setId(String.valueOf(t.getId()));
textTreeSubjectVo.setType("textNode");
subjectVo.getChildren().add(textTreeSubjectVo);
});
......@@ -174,5 +178,20 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
return list;
}
@Override
public List<Map<String, Object>> getResourceTypeList() {
Dict dict = new Dict();
dict.setDictCode(FasConstant.PLAN_SOURCE_TYPE);
List<Dict> dictList = dictMapper.getDictList(dict);
List<Map<String, Object>> list = new ArrayList<>();
list = dictList.stream().map(e->{
Map<String, Object> newMap = new HashMap<String, Object>();
newMap.put("key",e.getDictValue());
newMap.put("label",e.getDictName());
return newMap;
}).collect(Collectors.toList());
return list;
}
}
......@@ -1258,6 +1258,9 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
equipCommunicationDao.save(list);
}
/**
* 设备告警触发fema的sod值
*/
private void notifyAlarm(FireEquipmentPoint fireEquipmentPoint, AlarmParam param) {
List<FmeaEquipmentPoint> fmeaEquipmentPoints = fmeaEquipmentPointMapper.listByEquipmentPointId(fireEquipmentPoint.getId());
Set<Long> fmeaIds = Sets.newHashSet();
......@@ -1490,6 +1493,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
if (fmea.getEvaluationOid() != null && fmea.getEvaluationSid() != null && fmea.getEvaluationDid() != null) {
List<FmeaEquipmentPoint> equipmentPoints = fmeaEquipmentPointMapper.listFmeaByFmeaId(fmeaId);
List<FmeaPointInputitem> pointInputitems = fmeaPointInputitemMapper.listFmeaByFmeaId(fmeaId);
//根据设备和巡检数据获取高的故障率
Double maxRate = getMaxRate(equipmentPoints, pointInputitems);
if (maxRate != null) {
List<EvaluationModel> oModels = iEvaluationModelDao.findAllByType("O");
......@@ -1510,6 +1514,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
}
fmeaMapper.updateRpn(fmea);
saveRpnLog(fmea.getRiskSourceId(), fmeaId, rpn, fmea.getRpni());
//影响风险点的sod值
this.notifyRiskSource(fmea.getRiskSourceId(), notifyType, jpushTarget);
}
}
......@@ -1631,11 +1636,16 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
riskSource.setRpni(rpni);
riskSource.setRiskLevelId(newRiskLevel.getId());
riskSourceMapper.updateRpn(riskSource);
//极光推送给手机客户端
jpushRiskSourceMessage("风险点告警", jpushTarget);
//规则告警
notifyRule(riskSourceId, rpn, rpni, oldRiskLevel.getLevel(), newRiskLevel.getLevel(), notifyType);
}
}
/**
* 极光推送
*/
private void jpushRiskSourceMessage(String content, String jpushTarget) {
if (StringUtils.isEmpty(jpushTarget)) {
return;
......@@ -1648,6 +1658,9 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
appMessagePushService.sendMessage(pushMsgParam);
}
/**
* 规则告警
*/
private void notifyRule(Long id, BigDecimal rpnr, BigDecimal rpni, Integer oldLevel, Integer newLevel, String notifyType) {
int level = oldLevel - newLevel;
String changeType;
......
......@@ -4,7 +4,6 @@ import com.yeejoin.amos.fas.business.vo.TreeSubjectVo;
import com.yeejoin.amos.fas.dao.entity.TextPlan;
import com.yeejoin.amos.op.core.common.response.CommonResponse;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -35,4 +34,6 @@ public interface IPlanVisual3dService {
CommonResponse getResourceListByType(String type);
List<Map<String,Object>> getResourceById(String type,Long id);
List<Map<String,Object>> getResourceTypeList();
}
......@@ -6,7 +6,7 @@ import com.yeejoin.amos.fas.dao.entity.TopographyLine;
public interface ITopographyLineService {
public List<TopographyLine> getLinksByAppId(String appId);
public List<TopographyLine> getLinesByAppIdAndType(String appId,String type);
public void saveLines(List<TopographyLine> lineData);
......
......@@ -2,13 +2,12 @@ package com.yeejoin.amos.fas.business.service.intfc;
import java.util.List;
import com.yeejoin.amos.fas.dao.entity.TopographyLine;
import com.yeejoin.amos.fas.dao.entity.TopographyNode;
import com.yeejoin.amos.fas.dao.entity.TopographyNodeDetail;
public interface ITopographyNodeService {
public List<TopographyNode> getNodesByAppId(String appId);
public List<TopographyNode> getNodesByAppIdAndType(String appId,String type);
public void saveNodes(List<TopographyNode> nodeData);
......@@ -16,10 +15,12 @@ public interface ITopographyNodeService {
public TopographyNodeDetail saveNodeDetail(TopographyNodeDetail nodeDetail);
public void deleteNode(String id);
public void deleteNode(TopographyNode node);
public TopographyNode queryByKeyAndAppId(String nodekey, String appId);
public TopographyNode queryByKeyAndAppIdAndType(String nodekey, String appId,String type);
public int queryMaxKeyByAppId(String appId);
public int queryMaxKeyByAppIdAndType(String appId,String type);
public TopographyNode queryById(String id);
}
......@@ -5,11 +5,11 @@ import java.util.List;
public class TreeSubjectVo {
private Integer id;
private String id;
private String treeName;
private Integer parentId;
private String parentId;
private Integer maxSubjectNumber;
......@@ -17,7 +17,7 @@ public class TreeSubjectVo {
private List<TreeSubjectVo> children = new ArrayList<>();
private Long createTime;
private String createTime;
private Integer creator;
......@@ -33,17 +33,17 @@ public class TreeSubjectVo {
private int publishState;
private int belongTreeId;
private String belongTreeId;
private String scenes;
List<TreeSubjectVo> subjectChildren = new ArrayList<>();
public Integer getId() {
public String getId() {
return id;
}
public void setId(Integer id) {
public void setId(String id) {
this.id = id;
}
......@@ -55,11 +55,11 @@ public class TreeSubjectVo {
this.treeName = treeName;
}
public Integer getParentId() {
public String getParentId() {
return parentId;
}
public void setParentId(Integer parentId) {
public void setParentId(String parentId) {
this.parentId = parentId;
}
......@@ -79,11 +79,11 @@ public class TreeSubjectVo {
this.children = children;
}
public Long getCreateTime() {
public String getCreateTime() {
return createTime;
}
public void setCreateTime(Long createTime) {
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
......@@ -143,11 +143,11 @@ public class TreeSubjectVo {
this.publishState = publishState;
}
public int getBelongTreeId() {
public String getBelongTreeId() {
return belongTreeId;
}
public void setBelongTreeId(int belongTreeId) {
public void setBelongTreeId(String belongTreeId) {
this.belongTreeId = belongTreeId;
}
......
......@@ -73,12 +73,16 @@ public class RsDataQueue {
String from = fmeaMessage.getNorifyFrom();
Long handId = fmeaMessage.getHandId();
if (from.equals("patrol")) {
//巡检不合格通知
riskSourceService.notifyFmeaFromAbnormal(handId, from);
} else if (from.equals("equipment")) {
//设备告警
riskSourceService.notifyFmeaFromAbnormal(handId, from);
} else if (from.equals("update")) {
//修改通知
riskSourceService.notifyFmeaFromUpdate(handId, from);
} else if (from.equals("delete")) {
//删除通知
riskSourceService.notifyRiskSource(handId, from, null);
}
}
......
......@@ -277,5 +277,41 @@
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>
</databaseChangeLog>
\ No newline at end of file
......@@ -5,7 +5,7 @@
<!--查询-->
<select id="getResourceListByType" resultType="java.util.HashMap">
SELECT
rs.id,rs.name,rs.code
rs.id as `key` ,rs.name as label,rs.code
from
<choose>
<when test="type=='fireCar'">
......
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