Commit 40051baa authored by maoying's avatar maoying

解决冲突

parents bd962c4b 996372e3
...@@ -207,3 +207,4 @@ ...@@ -207,3 +207,4 @@
// this.ue4Rotation = ue4Rotation; // this.ue4Rotation = ue4Rotation;
// } // }
//} //}
...@@ -87,11 +87,6 @@ ...@@ -87,11 +87,6 @@
<version>1.1.0-SNAPSHOT</version> <version>1.1.0-SNAPSHOT</version>
</dependency> </dependency>
<!-- <dependency> <!-- <dependency>
<groupId>com.yeejoin.amos</groupId> <groupId>com.yeejoin.amos</groupId>
<artifactId>amos-authtoken</artifactId> <artifactId>amos-authtoken</artifactId>
......
package com.yeejoin.amos.fas.business.action; package com.yeejoin.amos.fas.business.action;
import java.io.IOException;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.concurrent.ConcurrentHashMap;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
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.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
...@@ -41,25 +67,6 @@ import com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance; ...@@ -41,25 +67,6 @@ import com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance;
import com.yeejoin.amos.fas.dao.entity.Equipment; import com.yeejoin.amos.fas.dao.entity.Equipment;
import com.yeejoin.amos.fas.dao.entity.PlanDetail; import com.yeejoin.amos.fas.dao.entity.PlanDetail;
import com.yeejoin.amos.fas.dao.entity.PlanOperationRecord; import com.yeejoin.amos.fas.dao.entity.PlanOperationRecord;
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.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import java.io.IOException;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
//import com.yeejoin.amos.fas.business.service.intfc.FireStengthService; //import com.yeejoin.amos.fas.business.service.intfc.FireStengthService;
...@@ -183,6 +190,42 @@ public class ContingencyAction implements CustomerAction { ...@@ -183,6 +190,42 @@ public class ContingencyAction implements CustomerAction {
return returnMap; return returnMap;
} }
/**
* @param stepCode 当前步骤编号
* @param stepName 当前步骤名称
* @param nextStepCode 下一步编号
* @param nextStepName 下一步名称
* @param paramObj 预案对象
*/
@RuleMethod(methodLabel = "步骤更新(新)", project = "换流站消防专项预案")
public void stepInfoNew(@MethodParam(paramLabel = "当前步骤编号") String stepCode,
@MethodParam(paramLabel = "当前步骤名称") String stepName,
@MethodParam(paramLabel = "下一步编号") String nextStepCode,
@MethodParam(paramLabel = "下一步名称") String nextStepName,
@MethodParam(paramLabel = "对象") Object paramObj) {
ContingencyRo contingencyRo = (ContingencyRo) paramObj;
stopSnapshop(contingencyRo);
SafteyPlanResult result = new SafteyPlanResult();
Map<String, Object> tempmap1 = new HashMap<>();
ArrayList list = new ArrayList();
HashMap step = new HashMap();
step.put("stepCode", stepCode);
step.put("stepName", stepName);
HashMap nextmap = new HashMap();
nextmap.put("stepCode", nextStepCode);
nextmap.put("stepName", nextStepName);
list.add(step);
list.add(nextmap);
tempmap1.put("step", list);
tempmap1.put("preStep", new HashMap());
result.add(tempmap1);
log.info("步骤更新(new)" + JSONObject.toJSONString(result));
this.sendcmd("steparea", contingencyRo, result);
}
/** /**
* @param stepCode 当前步骤编号 * @param stepCode 当前步骤编号
...@@ -190,7 +233,6 @@ public class ContingencyAction implements CustomerAction { ...@@ -190,7 +233,6 @@ public class ContingencyAction implements CustomerAction {
*/ */
@RuleMethod(methodLabel = "步骤更新", project = "换流站消防专项预案") @RuleMethod(methodLabel = "步骤更新", project = "换流站消防专项预案")
public void stepInfo(@MethodParam(paramLabel = "当前编号") String stepCode, public void stepInfo(@MethodParam(paramLabel = "当前编号") String stepCode,
// @MethodParam(paramLabel = "步骤类型") String stepType,
@MethodParam(paramLabel = "对象") Object paramObj) { @MethodParam(paramLabel = "对象") Object paramObj) {
ContingencyRo contingencyRo = (ContingencyRo) paramObj; ContingencyRo contingencyRo = (ContingencyRo) paramObj;
stopSnapshop(contingencyRo); stopSnapshop(contingencyRo);
...@@ -229,6 +271,9 @@ public class ContingencyAction implements CustomerAction { ...@@ -229,6 +271,9 @@ public class ContingencyAction implements CustomerAction {
this.sendcmd("steparea", contingencyRo, result); this.sendcmd("steparea", contingencyRo, result);
} }
public void sendcmd(String msgType, Object contingency, SafteyPlanResult result) { public void sendcmd(String msgType, Object contingency, SafteyPlanResult result) {
ContingencyRo ro = (ContingencyRo)contingency; ContingencyRo ro = (ContingencyRo)contingency;
ro.setTelemetryMap(null); ro.setTelemetryMap(null);
...@@ -794,7 +839,7 @@ public class ContingencyAction implements CustomerAction { ...@@ -794,7 +839,7 @@ public class ContingencyAction implements CustomerAction {
Map<String, Object> equipemtnPoints = pointCache.get(contingencyRo.getEquipmentId()); Map<String, Object> equipemtnPoints = pointCache.get(contingencyRo.getEquipmentId());
tempmap1.put("type", "buttonCache"); tempmap1.put("type", "buttonCache");
tempmap1.put("content", equipemtnPoints.values()); tempmap1.put("content", ObjectUtils.isEmpty(equipemtnPoints) ? new ArrayList<>() : equipemtnPoints.values());
result.add(tempmap1); result.add(tempmap1);
this.sendcmd("message", paramObj, result); this.sendcmd("message", paramObj, result);
......
...@@ -45,7 +45,7 @@ public class ProtalDataRo extends BasicsRo { ...@@ -45,7 +45,7 @@ public class ProtalDataRo extends BasicsRo {
* 任务编号,如果无任务,则填充0 * 任务编号,如果无任务,则填充0
*/ */
@Label("任务id") @Label("任务id")
private Long taskId=0l; private Long taskId= 0L;
/** /**
* 任务状态 * 任务状态
*/ */
......
package com.yeejoin.amos.fas.business.action.util;
import java.util.Comparator;
import com.yeejoin.amos.fas.business.action.model.SetpEnum;
public class StepComparator implements Comparator<SetpEnum>{
@Override
public int compare(SetpEnum o1, SetpEnum o2) {
//对日期字段进行升序,如果欲降序可采用before方法
if(o1.getOrder() > o2.getOrder()) return 1;
return -1;
}
}
package com.yeejoin.amos.fas.business.controller;
import com.yeejoin.amos.fas.business.service.intfc.EquipmentSpecificIndexService;
import com.yeejoin.amos.fas.config.Permission;
import com.yeejoin.amos.fas.core.util.CommonResponse;
import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.val;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
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;
/**
* @ProjectName: YeeAmosFireAutoSysRoot
* @Package: com.yeejoin.amos.fas.business.controller
* @ClassName: EquipmentSpecificIndexController
* @Author: Jianqiang Gao
* @Description: EquipmentSpecificIndexController
* @Date: 2021/1/18 16:32
* @Version: 1.0
*/
@RestController
@RequestMapping(value = "/api/equipSpecificIndex")
@Api(tags = "装备性能指标Api")
public class EquipmentSpecificIndexController extends BaseController {
@Value("${autoSys.alarm.nameKeys}")
private String nameKeys;
@Value("${autoSys.alarm.status}")
private String status;
@Value("${autoSys.alarm.value}")
private String value;
@Autowired
private EquipmentSpecificIndexService equipmentSpecificIndexService;
@Permission
@ApiOperation(httpMethod = "GET", value = "获取最新告警状态", notes = "获取最新告警状态")
@RequestMapping(value = "/queryInitAlarm", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryInitAlerm(@ApiParam(value = "物联采集属性值", required = true) @RequestParam String value,
@ApiParam(value = "多nameKey,中间英文逗号隔开", required = true) @RequestParam String nameKeys,
@ApiParam(value = "多status,中间英文逗号隔开", required = true) @RequestParam String status) {
return CommonResponseUtil.success(equipmentSpecificIndexService.queryInitAlarm(value, nameKeys, status));
}
@Permission
@ApiOperation(httpMethod = "GET", value = "获取三维初始化告警信息", notes = "获取三维初始化告警信息")
@RequestMapping(value = "/getInitAlarm", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse getInitAlarm(@ApiParam(value = "物联采集属性值") @RequestParam(required = false) String value,
@ApiParam(value = "多nameKey,中间英文逗号隔开") @RequestParam(required = false) String nameKeys,
@ApiParam(value = "多status,中间英文逗号隔开") @RequestParam(required = false) String status) {
if (!StringUtils.isNotBlank(value) && !StringUtils.isNotBlank(nameKeys) && !StringUtils.isNotBlank(status)) {
value = this.value;
nameKeys = this.nameKeys;
status = this.status;
}
return CommonResponseUtil.success(equipmentSpecificIndexService.getInitAlarm(value, nameKeys, status));
}
}
\ No newline at end of file
...@@ -636,7 +636,7 @@ public class RiskSourceController extends BaseController { ...@@ -636,7 +636,7 @@ public class RiskSourceController extends BaseController {
} }
// @Permission @Permission
// @Authorization(ingore = true) // @Authorization(ingore = true)
@ApiOperation(httpMethod = "PUT", value = "上传巡检数据", notes = "上传巡检数据") @ApiOperation(httpMethod = "PUT", value = "上传巡检数据", notes = "上传巡检数据")
@RequestMapping(value = "/data/patroldata", produces = "application/json;charset=UTF-8", method = RequestMethod.PUT) @RequestMapping(value = "/data/patroldata", produces = "application/json;charset=UTF-8", method = RequestMethod.PUT)
......
package com.yeejoin.amos.fas.business.dao.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.fas.business.vo.EquipmentSpecificIndexVo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 装备性能指标 Mapper 接口
*
* @author Jianqiang Gao
* @date 2021-01-18
*/
public interface EquipmentSpecificIndexMapper extends BaseMapper<EquipmentSpecificIndexVo> {
List<EquipmentSpecificIndexVo> findByDetailIdInAndNameKey(@Param("list") List<Object> equipDetailIdList, @Param("nameKey") String nameKey);
List<EquipmentSpecificIndexVo> queryInitAlarm(@Param("value") String value, @Param("list") String[] nameKeys);
List<EquipmentSpecificIndexVo> getInitAlarm(@Param("value") String value, @Param("list") String[] nameKeys);
}
...@@ -20,5 +20,5 @@ public interface ImpEquipMapper extends BaseMapper { ...@@ -20,5 +20,5 @@ public interface ImpEquipMapper extends BaseMapper {
Long reservePageCount(); Long reservePageCount();
List<EquipmentDTO> reservePage(long start, int length); List<EquipmentDTO> reservePage(@Param("start") long start,@Param("length") int length);
} }
package com.yeejoin.amos.fas.business.dao.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.fas.business.vo.EquipmentSpecificIndexVo;
import com.yeejoin.amos.fas.business.vo.PollPointVo;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @ProjectName: YeeAmosFireAutoSysRoot
* @Package: com.yeejoin.amos.fas.business.dao.mapper
* @ClassName: PollPointMapper
* @Author: Jianqiang Gao
* @Description: 巡检点Mapper
* @Date: 2021/1/18 17:36
* @Version: 1.0
*/
public interface PollPointMapper extends BaseMapper<PollPointVo> {
List<PollPointVo> queryInitAlarm(@Param("list") String[] status);
List<EquipmentSpecificIndexVo> getInitAlarm(@Param("list") String[] status);
}
\ No newline at end of file
...@@ -5,7 +5,6 @@ import com.yeejoin.amos.component.rule.RuleTrigger; ...@@ -5,7 +5,6 @@ import com.yeejoin.amos.component.rule.RuleTrigger;
import com.yeejoin.amos.fas.business.action.ContingencyAction; import com.yeejoin.amos.fas.business.action.ContingencyAction;
import com.yeejoin.amos.fas.business.action.model.ContingencyEvent; import com.yeejoin.amos.fas.business.action.model.ContingencyEvent;
import com.yeejoin.amos.fas.business.action.model.ContingencyRo; import com.yeejoin.amos.fas.business.action.model.ContingencyRo;
import com.yeejoin.amos.fas.business.action.model.SetpEnum;
import com.yeejoin.amos.fas.business.action.util.ContingencyLogPublisher; import com.yeejoin.amos.fas.business.action.util.ContingencyLogPublisher;
import com.yeejoin.amos.fas.business.dao.mapper.FireEquipPointMapper; import com.yeejoin.amos.fas.business.dao.mapper.FireEquipPointMapper;
import com.yeejoin.amos.fas.business.dao.mapper.ImpAndFireEquipMapper; import com.yeejoin.amos.fas.business.dao.mapper.ImpAndFireEquipMapper;
...@@ -169,8 +168,8 @@ public class ContingencyInstanceImpl /*extends GenericManagerImpl<ContingencyPla ...@@ -169,8 +168,8 @@ public class ContingencyInstanceImpl /*extends GenericManagerImpl<ContingencyPla
contingencyRo.setButtonCode(buttonCode); contingencyRo.setButtonCode(buttonCode);
contingencyRo.setButtonState(buttonState); contingencyRo.setButtonState(buttonState);
BeanUtils.copyProperties(contingencyOriginalData, contingencyRo); BeanUtils.copyProperties(contingencyOriginalData, contingencyRo);
SetpEnum step = SetpEnum.getStepByCode(stepCode); // SetpEnum step = SetpEnum.getStepByCode(stepCode);
contingencyRo.setStep(step.getValue()); contingencyRo.setStep(stepCode);
contingencyRo.setStepState(stepMap.get(stepKey)); contingencyRo.setStepState(stepMap.get(stepKey));
// contingencyRo.setStep(stepCode); // contingencyRo.setStep(stepCode);
log.info("stepstate:" + contingencyRo.getStepState()); log.info("stepstate:" + contingencyRo.getStepState());
......
package com.yeejoin.amos.fas.business.service.impl;
import com.yeejoin.amos.fas.business.dao.mapper.EquipmentSpecificIndexMapper;
import com.yeejoin.amos.fas.business.dao.mapper.PollPointMapper;
import com.yeejoin.amos.fas.business.service.intfc.EquipmentSpecificIndexService;
import com.yeejoin.amos.fas.business.vo.EquipmentSpecificIndexVo;
import com.yeejoin.amos.fas.business.vo.PollPointVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @ProjectName: YeeAmosFireAutoSysRoot
* @Package: com.yeejoin.amos.fas.business.service.impl
* @ClassName: EquipmentSpecificIndexServiceImpl
* @Author: Jianqiang Gao
* @Description: EquipmentSpecificIndexServiceImpl
* @Date: 2021/1/18 16:35
* @Version: 1.0
*/
@Service
public class EquipmentSpecificIndexServiceImpl implements EquipmentSpecificIndexService {
@Autowired
private EquipmentSpecificIndexMapper equipmentSpecificIndexMapper;
@Autowired
private PollPointMapper pollPointMapper;
@Override
public Map<String, Object> queryInitAlarm(String value, String nameKeys, String status) {
Map<String, Object> map = new HashMap<>(16);
// 查询设备告警
List<EquipmentSpecificIndexVo> equipmentSpecificAlarmVoList = equipmentSpecificIndexMapper.queryInitAlarm(value, nameKeys.split(","));
map.put("equip", equipmentSpecificAlarmVoList);
// 查询巡检告警
List<PollPointVo> pollPointVoList = pollPointMapper.queryInitAlarm(status.split(","));
map.put("poll", pollPointVoList);
return map;
}
@Override
public List<EquipmentSpecificIndexVo> getInitAlarm(String value, String nameKeys, String status) {
// 查询设备告警
List<EquipmentSpecificIndexVo> equipmentSpecificAlarmVoList = equipmentSpecificIndexMapper.getInitAlarm(value, nameKeys.split(","));
// 查询巡检告警
List<EquipmentSpecificIndexVo> pollPointVoList = pollPointMapper.getInitAlarm(status.split(","));
pollPointVoList.stream().sequential().collect(Collectors.toCollection(() -> equipmentSpecificAlarmVoList));
return equipmentSpecificAlarmVoList;
}
}
\ No newline at end of file
...@@ -3,67 +3,73 @@ package com.yeejoin.amos.fas.business.service.impl; ...@@ -3,67 +3,73 @@ package com.yeejoin.amos.fas.business.service.impl;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Optional;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl; import org.springframework.data.domain.PageImpl;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.yeejoin.amos.fas.business.bo.FireEquipmentBo;
import com.yeejoin.amos.fas.business.dao.mapper.FireEquipMapper; import com.yeejoin.amos.fas.business.dao.mapper.FireEquipMapper;
import com.yeejoin.amos.fas.business.dao.mapper.ImpEquipMapper; import com.yeejoin.amos.fas.business.dao.mapper.ImpEquipMapper;
import com.yeejoin.amos.fas.business.param.CommonPageInfoParam; import com.yeejoin.amos.fas.business.param.CommonPageInfoParam;
import com.yeejoin.amos.fas.business.service.intfc.IFireEquipService; import com.yeejoin.amos.fas.business.service.intfc.IFireEquipService;
import com.yeejoin.amos.fas.business.util.FireEquipmentType;
import com.yeejoin.amos.fas.common.enums.EquipClassifyEnum;
import com.yeejoin.amos.fas.core.common.request.CommonPageable; import com.yeejoin.amos.fas.core.common.request.CommonPageable;
import com.yeejoin.amos.fas.core.common.response.CommonPage; import com.yeejoin.amos.fas.core.common.response.CommonPage;
import com.yeejoin.amos.fas.dao.entity.FireEquipment;
@Service("fireEquipService") @Service("fireEquipService")
public class FireEquipServiceImpl implements IFireEquipService { public class FireEquipServiceImpl implements IFireEquipService {
/**
* 液位
*/
private final static String NAME_KEY = "liquidLevel";
@Autowired @Autowired
FireEquipMapper fireEquipMapper; FireEquipMapper fireEquipMapper;
@Autowired @Autowired
ImpEquipMapper impEquipMapper; ImpEquipMapper impEquipMapper;
// @Autowired @Autowired
// IWaterResourceDao iWaterResourceDao; IWaterResourceDao iWaterResourceDao;
// @Autowired @Autowired
// IFireStationDao iFireStationDao; IFireStationDao iFireStationDao;
// public FireEquipment save(FireEquipment fireEquipment) { @Autowired
// Long id = fireEquipment.getId(); EquipmentSpecificIndexMapper equipmentSpecificIndexMapper;
// iFireEquipmentDao.save(fireEquipment);
// return fireEquipment; public FireEquipment save(FireEquipment fireEquipment) {
// } Long id = fireEquipment.getId();
// iFireEquipmentDao.save(fireEquipment);
// return fireEquipment;
// public FireEquipment queryOne(Long id) { }
// Optional<FireEquipment> fireEquipment1=iFireEquipmentDao.findById(id);
// if(fireEquipment1.isPresent()){
// return fireEquipment1.get(); public FireEquipment queryOne(Long id) {
// } Optional<FireEquipment> fireEquipment1 = iFireEquipmentDao.findById(id);
// return null; if (fireEquipment1.isPresent()) {
// } return fireEquipment1.get();
}
return null;
}
public String[] delete(String[] idArray) throws Exception { public String[] delete(String[] idArray) throws Exception {
// for (String id : idArray) { for (String id : idArray) {
// Optional<FireEquipment> fireEquipment1 = iFireEquipmentDao.findById(Long.parseLong(id)); Optional<FireEquipment> fireEquipment1 = iFireEquipmentDao.findById(Long.parseLong(id));
// FireEquipment fireEquipment=null; FireEquipment fireEquipment = null;
// if(fireEquipment1.isPresent()){ if (fireEquipment1.isPresent()) {
// fireEquipment= fireEquipment1.get(); fireEquipment = fireEquipment1.get();
// } }
//
// if (fireEquipment != null) {
// this.iFireEquipmentDao.deleteById(Long.parseLong(id));
// } else {
// throw new Exception("找不到指定的对象:" + id);
// }
// }
if (fireEquipment != null) {
this.iFireEquipmentDao.deleteById(Long.parseLong(id));
} else {
throw new Exception("找不到指定的对象:" + id);
}
}
return idArray; return idArray;
} }
...@@ -98,7 +104,7 @@ public class FireEquipServiceImpl implements IFireEquipService { ...@@ -98,7 +104,7 @@ public class FireEquipServiceImpl implements IFireEquipService {
String endTime, String endTime,
CommonPageable commonPageable) { CommonPageable commonPageable) {
long total = fireEquipMapper.queryForFireEquipmentHistoryCount( fireEquipmentName,equipmentName, long total = fireEquipMapper.queryForFireEquipmentHistoryCount(fireEquipmentName, equipmentName,
startTime, startTime,
endTime); endTime);
...@@ -113,9 +119,9 @@ public class FireEquipServiceImpl implements IFireEquipService { ...@@ -113,9 +119,9 @@ public class FireEquipServiceImpl implements IFireEquipService {
} }
public Page queryForEquipmentList(String name, String code,String equipClassify,CommonPageable commonPageable,String bindStation) { public Page queryForEquipmentList(String name, String code, String equipClassify, CommonPageable commonPageable, String bindStation) {
long total = fireEquipMapper.queryForEquipmentPageCount( name, code,equipClassify,bindStation); long total = fireEquipMapper.queryForEquipmentPageCount(name, code, equipClassify, bindStation);
List<Map> content = this.fireEquipMapper.queryForEquipmentPage(name, code,equipClassify,commonPageable.getOffset(),commonPageable.getPageSize(),bindStation); List<Map> content = this.fireEquipMapper.queryForEquipmentPage(name, code, equipClassify, commonPageable.getOffset(), commonPageable.getPageSize(), bindStation);
Page result = new CommonPage(content, commonPageable, total); Page result = new CommonPage(content, commonPageable, total);
return result; return result;
} }
...@@ -123,18 +129,17 @@ public class FireEquipServiceImpl implements IFireEquipService { ...@@ -123,18 +129,17 @@ public class FireEquipServiceImpl implements IFireEquipService {
/** /**
* 查询设备信息明细 * 查询设备信息明细
*
* @param type * @param type
* @param id * @param id
* @return * @return
* @throws Exception * @throws Exception
*/ */
public Object queryForDetail(String type, Long id) throws Exception public Object queryForDetail(String type, Long id) throws Exception {
{
Object returnEntity = null; Object returnEntity = null;
FireEquipmentType fireEquipmentType = FireEquipmentType.valueOf(type); FireEquipmentType fireEquipmentType = FireEquipmentType.valueOf(type);
switch (fireEquipmentType) switch (fireEquipmentType)
{ {
// case pool: // case pool:
...@@ -172,6 +177,7 @@ public class FireEquipServiceImpl implements IFireEquipService { ...@@ -172,6 +177,7 @@ public class FireEquipServiceImpl implements IFireEquipService {
FireEquipmentBo fireDetection=fireEquipMapper.findFireEquipById(id); FireEquipmentBo fireDetection=fireEquipMapper.findFireEquipById(id);
fireDetection.setProtectObjNames(this.impEquipMapper.queryProtectObjNames(fireDetection.getId())); fireDetection.setProtectObjNames(this.impEquipMapper.queryProtectObjNames(fireDetection.getId()));
returnEntity = fireDetection; returnEntity = fireDetection;
break; break;
default: default:
...@@ -187,9 +193,11 @@ public class FireEquipServiceImpl implements IFireEquipService { ...@@ -187,9 +193,11 @@ public class FireEquipServiceImpl implements IFireEquipService {
// } // }
// @Override // @Override
// public Boolean isExistByCode(String code) { // public Boolean isExistByCode(String code) {
// Optional<FireEquipment> optional = iFireEquipmentDao.findByCode(code); // Optional<FireEquipment> optional = iFireEquipmentDao.findByCode(code);
// return optional.isPresent(); // return optional.isPresent();
// } // }
} }
...@@ -6,7 +6,11 @@ import com.google.common.collect.Lists; ...@@ -6,7 +6,11 @@ import com.google.common.collect.Lists;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
import com.yeejoin.amos.component.rule.RuleTrigger; import com.yeejoin.amos.component.rule.RuleTrigger;
import com.yeejoin.amos.fas.business.action.model.ContingencyRo; import com.yeejoin.amos.fas.business.action.model.ContingencyRo;
<<<<<<< HEAD
import com.yeejoin.amos.fas.business.action.model.SetpEnum; import com.yeejoin.amos.fas.business.action.model.SetpEnum;
=======
import com.yeejoin.amos.fas.business.action.model.FireEquimentDataRo;
>>>>>>> CSFAS_V2.1.3.3
import com.yeejoin.amos.fas.business.action.mq.WebMqttComponent; import com.yeejoin.amos.fas.business.action.mq.WebMqttComponent;
import com.yeejoin.amos.fas.business.action.mq.WebMqttSubscribe; import com.yeejoin.amos.fas.business.action.mq.WebMqttSubscribe;
import com.yeejoin.amos.fas.business.dao.mapper.*; import com.yeejoin.amos.fas.business.dao.mapper.*;
...@@ -27,7 +31,10 @@ import com.yeejoin.amos.fas.business.vo.Toke; ...@@ -27,7 +31,10 @@ import com.yeejoin.amos.fas.business.vo.Toke;
import com.yeejoin.amos.fas.business.vo.TopicEntityVo; import com.yeejoin.amos.fas.business.vo.TopicEntityVo;
import com.yeejoin.amos.fas.client.invoke.RsDataQueue; import com.yeejoin.amos.fas.client.invoke.RsDataQueue;
import com.yeejoin.amos.fas.common.enums.EquipmentRiskTypeEnum; import com.yeejoin.amos.fas.common.enums.EquipmentRiskTypeEnum;
<<<<<<< HEAD
import com.yeejoin.amos.fas.common.enums.View3dRefreshAreaEum; import com.yeejoin.amos.fas.common.enums.View3dRefreshAreaEum;
=======
>>>>>>> CSFAS_V2.1.3.3
import com.yeejoin.amos.fas.dao.entity.*; import com.yeejoin.amos.fas.dao.entity.*;
import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.ArrayUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
...@@ -42,6 +49,10 @@ import org.springframework.util.CollectionUtils; ...@@ -42,6 +49,10 @@ import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.core.foundation.context.RequestContext; import org.typroject.tyboot.core.foundation.context.RequestContext;
<<<<<<< HEAD
=======
import java.math.BigDecimal;
>>>>>>> CSFAS_V2.1.3.3
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import java.util.stream.Stream; import java.util.stream.Stream;
...@@ -118,8 +129,15 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService { ...@@ -118,8 +129,15 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
@Value("${spring.application.name}") @Value("${spring.application.name}")
private String serviceName; private String serviceName;
<<<<<<< HEAD
@Autowired @Autowired
private IPlanOperationRecordDao planOperationRecordDao; private IPlanOperationRecordDao planOperationRecordDao;
=======
@Value("${autoSys.alarm.nameKeys}")
private String nameKeys;
>>>>>>> CSFAS_V2.1.3.3
@Override @Override
public void handlerMqttMessage(String topic, String data) { public void handlerMqttMessage(String topic, String data) {
...@@ -127,13 +145,27 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService { ...@@ -127,13 +145,27 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
log.info("iotCode 性能指标属于: " + topicEntity.getType()); log.info("iotCode 性能指标属于: " + topicEntity.getType());
EquipmentSpecificIndexVo equipmentSpecificIndex = JSONObject.parseObject(topicEntity.getMessage(), EquipmentSpecificIndexVo.class); EquipmentSpecificIndexVo equipmentSpecificIndex = JSONObject.parseObject(topicEntity.getMessage(), EquipmentSpecificIndexVo.class);
long eqSpecId = equipmentSpecificIndex.getEquipmentSpecificId(); long eqSpecId = equipmentSpecificIndex.getEquipmentSpecificId();
String nameKey = equipmentSpecificIndex.getNameKey();
EquipmentSpecificForRiskVo equipmentSpecific = equipmentSpecificMapper.getOneById(eqSpecId); EquipmentSpecificForRiskVo equipmentSpecific = equipmentSpecificMapper.getOneById(eqSpecId);
Equipment equipment = impAndFireEquipMapper.queryImpEqumtByFireEquipmt(eqSpecId); // 三维屏指标状态推送
String specificIndexType = equipmentSpecificIndex.getType();
if (nameKey !=null && nameKeys.contains(nameKey)) {
if (equipmentSpecific != null) {
equipmentSpecificIndex.setId(equipmentSpecific.getId());
equipmentSpecificIndex.setName(equipmentSpecific.getName());
equipmentSpecificIndex.setCode(equipmentSpecific.getCode());
}
equipmentSpecificIndex.setType("equip");
String title = String.format("/%s/%s", serviceName, "data/refresh/indexStatus");
webMqttComponent.publish(title, JSON.toJSONString(equipmentSpecificIndex));
}
Equipment equipment = topicEntity.getEquipment()==null?impAndFireEquipMapper.queryImpEqumtByFireEquipmt(eqSpecId):topicEntity.getEquipment();
Toke toke = remoteSecurityService.getServerToken(); Toke toke = remoteSecurityService.getServerToken();
AlarmParam deviceData = new AlarmParam(); AlarmParam deviceData = new AlarmParam();
deviceData.setMonitor(equipment != null ? equipment.getName() : ""); deviceData.setMonitor(equipment != null ? equipment.getName() : "");
deviceData.setId(String.valueOf(equipmentSpecific.getId())); deviceData.setId(String.valueOf(equipmentSpecific.getId()));
deviceData.setCode(equipmentSpecific.getCode()); deviceData.setCode(equipmentSpecific.getCode());
<<<<<<< HEAD
//设备告警处理逻辑 //设备告警处理逻辑
if (EquipmentRiskTypeEnum.HZGJ.getCode().equals(equipmentSpecificIndex.getType())) { if (EquipmentRiskTypeEnum.HZGJ.getCode().equals(equipmentSpecificIndex.getType())) {
log.info("(报警)Message type is: " + equipmentSpecificIndex.getType()); log.info("(报警)Message type is: " + equipmentSpecificIndex.getType());
...@@ -158,13 +190,59 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService { ...@@ -158,13 +190,59 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
} else { } else {
// 监测数据逻辑 // 监测数据逻辑
log.info("(监测)Message type is: " + equipmentSpecificIndex.getType()); log.info("(监测)Message type is: " + equipmentSpecificIndex.getType());
=======
if (EquipmentRiskTypeEnum.HZGJ.getCode().equals(specificIndexType)) { //设备告警处理逻辑
log.info("(报警)Message type is: " + specificIndexType);
//通知刷新3d页面告警数据
// iDataRefreshService.refreshViewData(DataRefreshTypeEum.alarm.getCode());
/**
* 推送告警数据
* 影响区域:消防安全=>火灾告警
*/
String title = String.format("/%s/%s/%s/%s", serviceName, stationName,"data/refresh","fireSafety");
webMqttComponent.publish(title, JSON.toJSONString(view3dService.getSafetyExecuteListTop5("fire", equipmentSpecific.getOrgCode())));
// 报警触发调用规则服务
if(!ObjectUtils.isEmpty(equipment) && !ObjectUtils.isEmpty(equipment.getReservePlan())){
executeDynamicPlan(deviceData, equipment, equipmentSpecific, toke);
}
} else if (EquipmentRiskTypeEnum.GZ.getCode().equals(specificIndexType)) { // 设备故障处理逻辑
log.info("(故障)Message type is: " + specificIndexType);
long equipId = 0;
if(StringUtil.isNotEmpty(equipment)) {
equipId = equipment.getId();
}
long specificIndexId = equipmentSpecificIndex.getId();
notifyAlarm(equipmentSpecificIndex, 1);
// 是否关联风险点
List<FmeaEquipmentPoint> list = fmeaEquipmentPointMapper.listFmeaByEquipIndexIdAndEquipId(specificIndexId, equipId);
if(list.size() > 0) {
// 关联风险点进行rpn,rpni值的修改
list.forEach(fmeaEqPoint -> {
long fmeaId = fmeaEqPoint.getFmeaId();
updateFmeaRpn(fmeaId);
});
} else {
// 没有关联风险点,三维页面消息推送
fireEquipRuleMessagePush(deviceData, toke);
}
} else { // 向三维推送实时值修改
log.info("(监测)Message type is: " + specificIndexType);
// 是否关联风险点
notifyAlarm(equipmentSpecificIndex, 0);
>>>>>>> CSFAS_V2.1.3.3
Map<String, Object> content = new HashMap<>(); Map<String, Object> content = new HashMap<>();
content.put("id", "id"); content.put("id", equipmentSpecific.getId());
content.put("label", "eqPointName"); content.put("label", equipmentSpecific.getName()+" "+equipmentSpecificIndex.getEquipmentIndexName());
content.put("code", equipmentSpecific.getCode());
content.put("changeDate", new Date()); content.put("changeDate", new Date());
content.put("orgCode", equipmentSpecific.getOrgCode()); content.put("orgCode", equipmentSpecific.getOrgCode());
content.put("indexKey", equipmentSpecificIndex.getNameKey());
content.put("status", equipmentSpecificIndex.getValue()); content.put("status", equipmentSpecificIndex.getValue());
iDataRefreshService.sendRefreshDataWithArea(View3dRefreshAreaEum.monitor_data.getCode(), content); // iDataRefreshService.sendRefreshDataWithArea(View3dRefreshAreaEum.monitor_data.getCode(), content);
String title = String.format("/%s/%s/%s", serviceName, stationName,"data/refresh/monitorData"); String title = String.format("/%s/%s/%s", serviceName, stationName,"data/refresh/monitorData");
webMqttComponent.publish(title, JSON.toJSONString(view3dService.getEquipStatusList(equipmentSpecific.getOrgCode()))); webMqttComponent.publish(title, JSON.toJSONString(view3dService.getEquipStatusList(equipmentSpecific.getOrgCode())));
} }
...@@ -291,7 +369,7 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService { ...@@ -291,7 +369,7 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
contingencyRo.setEquipmentName(equipment.getName()); contingencyRo.setEquipmentName(equipment.getName());
contingencyRo.setFireEquipmentId(String.valueOf(equipmentSpecific.getId())); contingencyRo.setFireEquipmentId(String.valueOf(equipmentSpecific.getId()));
contingencyRo.setFireEquipmentName(equipmentSpecific.getName()); contingencyRo.setFireEquipmentName(equipmentSpecific.getName());
contingencyRo.setStep(SetpEnum.STEP0.getValue()); contingencyRo.setStep("0");
contingencyRo.setConfirm("NONE"); contingencyRo.setConfirm("NONE");
contingencyRo.setFireTruckRoute(equipment.getFireTruckRoute()); contingencyRo.setFireTruckRoute(equipment.getFireTruckRoute());
contingencyRo.setRunstep(false); contingencyRo.setRunstep(false);
......
package com.yeejoin.amos.fas.business.service.impl; package com.yeejoin.amos.fas.business.service.impl;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.stream.Collectors;
import javax.annotation.PostConstruct;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.lang3.ArrayUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.redis.core.HashOperations;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import org.typroject.tyboot.component.cache.Redis;
import org.typroject.tyboot.component.cache.enumeration.CacheType;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.utils.Bean;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
...@@ -8,12 +50,37 @@ import com.google.common.collect.Lists; ...@@ -8,12 +50,37 @@ import com.google.common.collect.Lists;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.google.common.collect.Sets; import com.google.common.collect.Sets;
import com.yeejoin.amos.component.rule.RuleTrigger; import com.yeejoin.amos.component.rule.RuleTrigger;
import com.yeejoin.amos.fas.business.action.model.*; import com.yeejoin.amos.fas.business.action.model.CheckInputItemRo;
import com.yeejoin.amos.fas.business.action.model.ContingencyRo;
import com.yeejoin.amos.fas.business.action.model.DeviceRo;
import com.yeejoin.amos.fas.business.action.model.FireEquimentDataRo;
import com.yeejoin.amos.fas.business.action.model.ProtalDataRo;
import com.yeejoin.amos.fas.business.action.model.RiskSourceRuleRo;
import com.yeejoin.amos.fas.business.action.mq.WebMqttComponent; import com.yeejoin.amos.fas.business.action.mq.WebMqttComponent;
import com.yeejoin.amos.fas.business.bo.*; import com.yeejoin.amos.fas.business.bo.BindRegionBo;
import com.yeejoin.amos.fas.business.bo.FireEquipmentBo;
import com.yeejoin.amos.fas.business.bo.JpushMsgBo;
import com.yeejoin.amos.fas.business.bo.JpushMsgContentBo;
import com.yeejoin.amos.fas.business.bo.MsgParamBo;
import com.yeejoin.amos.fas.business.bo.RiskSourceSynBo;
import com.yeejoin.amos.fas.business.bo.RpnCalculationBo;
import com.yeejoin.amos.fas.business.constants.FasConstant; import com.yeejoin.amos.fas.business.constants.FasConstant;
import com.yeejoin.amos.fas.business.dao.mapper.*; import com.yeejoin.amos.fas.business.dao.mapper.FireEquipMapper;
import com.yeejoin.amos.fas.business.dao.repository.*; import com.yeejoin.amos.fas.business.dao.mapper.FireEquipPointMapper;
import com.yeejoin.amos.fas.business.dao.mapper.FmeaEquipmentPointMapper;
import com.yeejoin.amos.fas.business.dao.mapper.FmeaMapper;
import com.yeejoin.amos.fas.business.dao.mapper.FmeaPointInputitemMapper;
import com.yeejoin.amos.fas.business.dao.mapper.ImpAndFireEquipMapper;
import com.yeejoin.amos.fas.business.dao.mapper.PlanDetailMapper;
import com.yeejoin.amos.fas.business.dao.mapper.RiskSourceMapper;
import com.yeejoin.amos.fas.business.dao.repository.IContingencyOriginalDataDao;
import com.yeejoin.amos.fas.business.dao.repository.IDictDao;
import com.yeejoin.amos.fas.business.dao.repository.IEvaluationModelDao;
import com.yeejoin.amos.fas.business.dao.repository.IPreplanPictureDao;
import com.yeejoin.amos.fas.business.dao.repository.IRiskFactorDao;
import com.yeejoin.amos.fas.business.dao.repository.IRiskLevelDao;
import com.yeejoin.amos.fas.business.dao.repository.IRiskSourceDao;
import com.yeejoin.amos.fas.business.dao.repository.IRpnChangeLogDao;
import com.yeejoin.amos.fas.business.feign.IEquipManageFeign; import com.yeejoin.amos.fas.business.feign.IEquipManageFeign;
import com.yeejoin.amos.fas.business.feign.RemoteSecurityService; import com.yeejoin.amos.fas.business.feign.RemoteSecurityService;
import com.yeejoin.amos.fas.business.feign.RemoteWebSocketServer; import com.yeejoin.amos.fas.business.feign.RemoteWebSocketServer;
...@@ -23,7 +90,11 @@ import com.yeejoin.amos.fas.business.jpush.PushMsgParam; ...@@ -23,7 +90,11 @@ import com.yeejoin.amos.fas.business.jpush.PushMsgParam;
import com.yeejoin.amos.fas.business.param.AlarmParam; import com.yeejoin.amos.fas.business.param.AlarmParam;
import com.yeejoin.amos.fas.business.param.CommonPageInfoParam; import com.yeejoin.amos.fas.business.param.CommonPageInfoParam;
import com.yeejoin.amos.fas.business.param.FmeaBindParam; import com.yeejoin.amos.fas.business.param.FmeaBindParam;
import com.yeejoin.amos.fas.business.service.intfc.*; import com.yeejoin.amos.fas.business.service.intfc.IDataRefreshService;
import com.yeejoin.amos.fas.business.service.intfc.IEquipmentHandlerService;
import com.yeejoin.amos.fas.business.service.intfc.IEquipmentService;
import com.yeejoin.amos.fas.business.service.intfc.IRiskSourceService;
import com.yeejoin.amos.fas.business.service.intfc.IView3dService;
import com.yeejoin.amos.fas.business.service.model.ContingencyDeviceStatus; import com.yeejoin.amos.fas.business.service.model.ContingencyDeviceStatus;
import com.yeejoin.amos.fas.business.util.DateUtils; import com.yeejoin.amos.fas.business.util.DateUtils;
import com.yeejoin.amos.fas.business.util.JexlUtil; import com.yeejoin.amos.fas.business.util.JexlUtil;
...@@ -41,42 +112,10 @@ import com.yeejoin.amos.fas.core.common.response.RegionTreeResponse; ...@@ -41,42 +112,10 @@ import com.yeejoin.amos.fas.core.common.response.RegionTreeResponse;
import com.yeejoin.amos.fas.core.common.response.RiskSourceTreeResponse; import com.yeejoin.amos.fas.core.common.response.RiskSourceTreeResponse;
import com.yeejoin.amos.fas.core.enums.NumberEnum; import com.yeejoin.amos.fas.core.enums.NumberEnum;
import com.yeejoin.amos.fas.core.enums.ReserveEnum; import com.yeejoin.amos.fas.core.enums.ReserveEnum;
import com.yeejoin.amos.fas.core.util.DateUtil;
import com.yeejoin.amos.fas.core.util.StringUtil; import com.yeejoin.amos.fas.core.util.StringUtil;
import com.yeejoin.amos.fas.dao.entity.*; import com.yeejoin.amos.fas.dao.entity.*;
import com.yeejoin.amos.fas.exception.YeeException; import com.yeejoin.amos.fas.exception.YeeException;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel; import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import org.apache.commons.lang3.ArrayUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageImpl;
import org.springframework.data.redis.core.HashOperations;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import org.typroject.tyboot.component.cache.Redis;
import org.typroject.tyboot.component.cache.enumeration.CacheType;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import org.typroject.tyboot.core.foundation.utils.Bean;
import javax.annotation.PostConstruct;
import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.stream.Collectors;
@Service("riskSourceService") @Service("riskSourceService")
...@@ -540,7 +579,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService { ...@@ -540,7 +579,7 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
contingencyRo.setEquipmentName(equipment.getName()); contingencyRo.setEquipmentName(equipment.getName());
contingencyRo.setFireEquipmentId(String.valueOf(fireEquipment.getId())); contingencyRo.setFireEquipmentId(String.valueOf(fireEquipment.getId()));
contingencyRo.setFireEquipmentName(fireEquipment.getName()); contingencyRo.setFireEquipmentName(fireEquipment.getName());
contingencyRo.setStep(SetpEnum.STEP0.getValue()); contingencyRo.setStep("0");
contingencyRo.setConfirm("NONE"); contingencyRo.setConfirm("NONE");
contingencyRo.setFireTruckRoute(equipment.getFireTruckRoute()); contingencyRo.setFireTruckRoute(equipment.getFireTruckRoute());
contingencyRo.setRunstep(false); contingencyRo.setRunstep(false);
...@@ -756,11 +795,28 @@ public class RiskSourceServiceImpl implements IRiskSourceService { ...@@ -756,11 +795,28 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
@Async @Async
void protalRuleMessagePush(ProtalDataRo protalData, String token, String product, String appKey) { void protalRuleMessagePush(ProtalDataRo protalData, String token, String product, String appKey) {
String bacthNo = UUID.randomUUID().toString(); String bacthNo = UUID.randomUUID().toString();
String nodeState = protalData.getNodeState();
String name = protalData.getName();
protalData.setBatchNo(bacthNo); protalData.setBatchNo(bacthNo);
protalData.setOriginalNodeState(protalData.getNodeState()); protalData.setOriginalNodeState(nodeState);
protalData.setUserName(protalData.getCheckUser()); protalData.setUserName(protalData.getCheckUser());
protalData.setPointName(protalData.getName()); protalData.setPointName(name);
try { try {
EquipmentSpecificIndexVo specificIndexVo = new EquipmentSpecificIndexVo();
specificIndexVo.setId(protalData.getId());
specificIndexVo.setName(name);
specificIndexVo.setCode(protalData.getPointNo());
specificIndexVo.setType("patrol");
specificIndexVo.setNameKey("patrol");
if ("2".equals(nodeState) || "3".equals(nodeState)) {
specificIndexVo.setValue("true");
} else {
specificIndexVo.setValue("false");
}
// 三维屏巡检点状态推送
String title = String.format("/%s/%s", serviceName, "data/refresh/indexStatus");
webMqttComponent.publish(title, JSON.toJSONString(specificIndexVo));
RequestContext.setToken(token); RequestContext.setToken(token);
RequestContext.setProduct(product); RequestContext.setProduct(product);
log.info("巡检消息发送规则" + JSONObject.toJSONString(protalData)); log.info("巡检消息发送规则" + JSONObject.toJSONString(protalData));
...@@ -954,8 +1010,6 @@ public class RiskSourceServiceImpl implements IRiskSourceService { ...@@ -954,8 +1010,6 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
@Override @Override
@Transactional @Transactional
public ReserveEnum startEquipReserve(Long id, String typeCode) { public ReserveEnum startEquipReserve(Long id, String typeCode) {
int count = equipmentService.countByStatus(NumberEnum.ONE.getValue()); int count = equipmentService.countByStatus(NumberEnum.ONE.getValue());
if (count > NumberEnum.ZERO.getValue()) { if (count > NumberEnum.ZERO.getValue()) {
return ReserveEnum.RUNNING; return ReserveEnum.RUNNING;
...@@ -967,11 +1021,11 @@ public class RiskSourceServiceImpl implements IRiskSourceService { ...@@ -967,11 +1021,11 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
equipmentSpecificIndexVo.setType(typeCode); equipmentSpecificIndexVo.setType(typeCode);
TopicEntityVo topicEntity = new TopicEntityVo(); TopicEntityVo topicEntity = new TopicEntityVo();
Equipment equipment = equipmentService.queryOne(id);
topicEntity.setMessage(JSON.toJSONString(equipmentSpecificIndexVo)); topicEntity.setMessage(JSON.toJSONString(equipmentSpecificIndexVo));
topicEntity.setEquipment(equipment);
String data = JSON.toJSONString(topicEntity); String data = JSON.toJSONString(topicEntity);
System.out.println(data);
iEquipmentHandlerService.handlerMqttMessage("",data ); iEquipmentHandlerService.handlerMqttMessage("",data );
Equipment equipment = equipmentService.queryOne(id);
if (equipment != null) { if (equipment != null) {
equipment.setStartTime(DateUtil.getDateNow()); equipment.setStartTime(DateUtil.getDateNow());
equipment.setEndTime(null); equipment.setEndTime(null);
......
package com.yeejoin.amos.fas.business.service.intfc;
import com.yeejoin.amos.fas.business.vo.EquipmentSpecificIndexVo;
import java.util.List;
import java.util.Map;
/**
* @ProjectName: YeeAmosFireAutoSysRoot
* @Package: com.yeejoin.amos.fas.business.service.intfc
* @ClassName: EquipmentSpecificIndexService
* @Author: Jianqiang Gao
* @Description: EquipmentSpecificIndexService
* @Date: 2021/1/18 16:34
* @Version: 1.0
*/
public interface EquipmentSpecificIndexService {
Map<String, Object> queryInitAlarm(String value, String nameKeys, String status);
List<EquipmentSpecificIndexVo> getInitAlarm(String value, String nameKeys, String status);
}
\ No newline at end of file
...@@ -25,6 +25,8 @@ public class EquipmentSpecificIndexVo { ...@@ -25,6 +25,8 @@ public class EquipmentSpecificIndexVo {
// 性能指标id // 性能指标id
private Long equipmentIndexId; private Long equipmentIndexId;
private String name;
private String equipmentIndexName; private String equipmentIndexName;
private String equipmentIndexUnitName; private String equipmentIndexUnitName;
...@@ -105,16 +107,45 @@ public class EquipmentSpecificIndexVo { ...@@ -105,16 +107,45 @@ public class EquipmentSpecificIndexVo {
this.code = code; this.code = code;
} }
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getEquipmentIndexName() {
return equipmentIndexName;
}
public void setEquipmentIndexName(String equipmentIndexName) {
this.equipmentIndexName = equipmentIndexName;
}
public String getEquipmentIndexUnitName() {
return equipmentIndexUnitName;
}
public void setEquipmentIndexUnitName(String equipmentIndexUnitName) {
this.equipmentIndexUnitName = equipmentIndexUnitName;
}
public EquipmentSpecificIndexVo() { public EquipmentSpecificIndexVo() {
} }
public EquipmentSpecificIndexVo(Long equipmentSpecificId, String value, Long equipmentIndexId, String nameKey, String code, String iotCode, String type) { public EquipmentSpecificIndexVo(long id, Long equipmentSpecificId, String value, Long equipmentIndexId, String name, String equipmentIndexName, String equipmentIndexUnitName, String nameKey, String code, String iotCode, String type) {
this.id = id;
this.equipmentSpecificId = equipmentSpecificId; this.equipmentSpecificId = equipmentSpecificId;
this.value = value; this.value = value;
this.equipmentIndexId = equipmentIndexId; this.equipmentIndexId = equipmentIndexId;
this.name = name;
this.equipmentIndexName = equipmentIndexName;
this.equipmentIndexUnitName = equipmentIndexUnitName;
this.nameKey = nameKey; this.nameKey = nameKey;
this.code = code; this.code = code;
this.iotCode = iotCode; this.iotCode = iotCode;
this.type = type; this.type = type;
} }
} }
package com.yeejoin.amos.fas.business.vo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @ProjectName: YeeAmosFireAutoSysRoot
* @Package: com.yeejoin.amos.fas.business.vo
* @ClassName: EquipmentSpecificAlarm
* @Author: Jianqiang Gao
* @Description: 巡检点Vo
* @Date: 2021/1/18 15:54
* @Version: 1.0
*/
@Data
@Api("巡检点Vo")
public class PollPointVo {
@ApiModelProperty("巡检点名称")
private String name;
@ApiModelProperty("巡检点编码")
private String code;
@ApiModelProperty("巡检点状态:0 未纳入巡检,1 合格;2 不合格;3 漏检")
private String status;
}
\ No newline at end of file
package com.yeejoin.amos.fas.business.vo; package com.yeejoin.amos.fas.business.vo;
import com.yeejoin.amos.fas.dao.entity.Equipment;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import lombok.Data; import lombok.Data;
...@@ -24,4 +26,6 @@ public class TopicEntityVo { ...@@ -24,4 +26,6 @@ public class TopicEntityVo {
private String type; private String type;
private Long recordId; private Long recordId;
private Equipment equipment;
} }
...@@ -83,10 +83,6 @@ public class PermissionAspect { ...@@ -83,10 +83,6 @@ public class PermissionAspect {
try { try {
feignClientResult = Privilege.agencyUserClient.getme(); feignClientResult = Privilege.agencyUserClient.getme();
userModel = (AgencyUserModel) feignClientResult.getResult(); userModel = (AgencyUserModel) feignClientResult.getResult();
} catch (InnerInvokException e) {
e.printStackTrace();
}
String userId = null; String userId = null;
ReginParams regionParam = new ReginParams(); ReginParams regionParam = new ReginParams();
if(userModel != null){ if(userModel != null){
...@@ -115,6 +111,11 @@ public class PermissionAspect { ...@@ -115,6 +111,11 @@ public class PermissionAspect {
redisTemplate.opsForValue().set(buildKey(userId, token), JSONObject.toJSONString(regionParam)); redisTemplate.opsForValue().set(buildKey(userId, token), JSONObject.toJSONString(regionParam));
} }
} }
} catch (InnerInvokException e) {
logger.error(e.getMessage());
e.printStackTrace();
}
} }
private DepartmentBo convertDepartmentModelToBo(DepartmentModel departmentModel){ private DepartmentBo convertDepartmentModelToBo(DepartmentModel departmentModel){
......
...@@ -3,7 +3,7 @@ security.password=a1234560 ...@@ -3,7 +3,7 @@ security.password=a1234560
security.loginId=fas_autosys security.loginId=fas_autosys
#environment #environment
#spring.profiles.active = dev #spring.profiles.active = dev
eureka.client.serviceUrl.defaultZone=http://172.16.10.72:10001/eureka/ eureka.client.serviceUrl.defaultZone=http://172.16.3.100:10001/eureka/
eureka.client.register-with-eureka = true eureka.client.register-with-eureka = true
eureka.client.fetch-registry = true eureka.client.fetch-registry = true
eureka.client.healthcheck.enabled = true eureka.client.healthcheck.enabled = true
...@@ -23,9 +23,9 @@ spring.datasource.validationQuery = SELECT 1 ...@@ -23,9 +23,9 @@ spring.datasource.validationQuery = SELECT 1
params.remoteWebsocketUrl=http://172.16.11.36:10600/ params.remoteWebsocketUrl=http://172.16.11.36:10600/
#redis #redis
spring.redis.database=0 spring.redis.database=0
spring.redis.host=172.16.10.85 spring.redis.host=172.16.3.100
spring.redis.port=6379 spring.redis.port=6379
spring.redis.password=amos2019Redis spring.redis.password=1234560
spring.redis.jedis.pool.max-active=200 spring.redis.jedis.pool.max-active=200
spring.redis.jedis.pool.max-wait=-1 spring.redis.jedis.pool.max-wait=-1
spring.redis.jedis.pool.max-idle=10 spring.redis.jedis.pool.max-idle=10
...@@ -41,9 +41,9 @@ params.isPush=true ...@@ -41,9 +41,9 @@ params.isPush=true
## emqx ## emqx
emqx.clean-session=true emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]} emqx.client-id=${spring.application.name}-${random.int[1024,65536]}
emqx.broker=tcp://172.16.10.85:1883 emqx.broker=tcp://172.16.3.100:1883
emqx.user-name=super emqx.user-name=admin
emqx.password=a123456 emqx.password=admin
#����� #�����
file.downLoad.url=http://39.98.246.31:8888/ file.downLoad.url=http://39.98.246.31:8888/
#站端名称使用全拼 #站端名称使用全拼
......
spring.application.name = AMOS-AUTOSYS-1225 spring.application.name = AMOS-AUTOSYS
server.servlet.context-path=/fireAutoSys server.servlet.context-path=/fireAutoSys
server.port = 8083 server.port = 8083
spring.profiles.active=dev spring.profiles.active=dev
...@@ -50,16 +50,13 @@ visual.fegin.name=maas-visual ...@@ -50,16 +50,13 @@ visual.fegin.name=maas-visual
#值班系统 #值班系统
dutyMode.fegin.name=AMOS-DUTYMODE dutyMode.fegin.name=AMOS-DUTYMODE
#队站装备管理名称,主要用于风险区域同步至仓库货位和订阅装备信息系统 #队站装备管理名称,主要用于风险区域同步至仓库货位和订阅装备信息系统
equipManage.fegin.name=AMOS-EQUIPMANAGE-1225 equipManage.fegin.name=AMOS-EQUIPMANAGE
#feginName #feginName
number.plan.projectName=换流站消防专项预案 number.plan.projectName=换流站消防专项预案
#jpush 服务名称 #jpush 服务名称
Push.fegin.name=AMOS-JPUSH Push.fegin.name=AMOS-JPUSH
spring.http.multipart.maxFileSize = 10480000
spring.http.multipart.MaxRequestSize = 50480000
param.safetyIndexChange.cron = 0 0 2 * * ? param.safetyIndexChange.cron = 0 0 2 * * ?
param.weather.url = http://wthrcdn.etouch.cn/weather_mini?citykey= param.weather.url = http://wthrcdn.etouch.cn/weather_mini?citykey=
...@@ -76,6 +73,11 @@ amos.feign.gennerator.use-gateway=true ...@@ -76,6 +73,11 @@ amos.feign.gennerator.use-gateway=true
# 消息推送类型 # 消息推送类型
autoSys.push.type=mqtt autoSys.push.type=mqtt
# 3D告警初始化
autoSys.alarm.nameKeys=fireAlarm,fault,shield
autoSys.alarm.status=2,3
autoSys.alarm.value=true
#查询装备分类 #查询装备分类
#消防视频:xfsp #消防视频:xfsp
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
left join f_fire_fighting_system as manage on spe.system_id = manage.id left join f_fire_fighting_system as manage on spe.system_id = manage.id
where sto.amount <![CDATA[>]]> 0 where sto.amount <![CDATA[>]]> 0
<if test="name != null and name!='null' "> <if test="name != null and name!='null' ">
and det.name like CONCAT('%',#{name},'%' ) and (det.name like CONCAT('%',#{name},'%') or ware.full_name like CONCAT('%',#{name},'%') or spe.iot_code like CONCAT('%',#{name},'%') or spe.code like CONCAT('%',#{name},'%'))
</if> </if>
<if test="code != null and code!='null' "> <if test="code != null and code!='null' ">
and cate.code like CONCAT('%',#{code},'%' ) and cate.code like CONCAT('%',#{code},'%' )
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
left join f_fire_fighting_system as manage on spe.system_id = manage.id left join f_fire_fighting_system as manage on spe.system_id = manage.id
where sto.amount <![CDATA[>]]> 0 where sto.amount <![CDATA[>]]> 0
<if test="name != null and name!='null' "> <if test="name != null and name!='null' ">
and det.name like CONCAT('%',#{name},'%' ) and (det.name like CONCAT('%',#{name},'%') or ware.full_name like CONCAT('%',#{name},'%') or spe.iot_code like CONCAT('%',#{name},'%') or spe.code like CONCAT('%',#{name},'%'))
</if> </if>
<if test="code != null and code!='null' "> <if test="code != null and code!='null' ">
and cate.code like CONCAT('%',#{code},'%' ) and cate.code like CONCAT('%',#{code},'%' )
......
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.fas.business.dao.mapper.EquipmentSpecificIndexMapper">
<select id="findByDetailIdInAndNameKey"
resultType="com.yeejoin.amos.fas.business.vo.EquipmentSpecificIndexVo">
SELECT
wsi.`value`,
wei.unit AS equipmentIndexUnitName
FROM
`wl_equipment_index` wei
RIGHT JOIN wl_equipment_specific_index wsi ON wei.id = wsi.equipment_index_id
LEFT JOIN wl_equipment_specific wes ON wsi.equipment_specific_id = wes.id
WHERE
wsi.`value` != ''
<if test="nameKey != null and nameKey !=''">
AND wei.name_key = #{nameKey}
</if>
<if test="list != null and list.size() > 0">
AND wes.equipment_detail_id IN
<foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
GROUP BY
wsi.id
ORDER BY
wsi.update_date DESC
</select>
<select id="queryInitAlarm" resultType="com.yeejoin.amos.fas.business.vo.EquipmentSpecificIndexVo">
SELECT
concat(wes.id) as id,
concat(wes.id) as equipmentSpecificId,
wed.`name`,
wes.`code`,
wei.name_key,
wei.`name` AS equipmentIndexName,
wsi.`value`
FROM
`wl_equipment_specific_index` wsi
LEFT JOIN wl_equipment_index wei ON wsi.equipment_index_id = wei.id
LEFT JOIN wl_equipment_specific wes ON wsi.equipment_specific_id = wes.id
LEFT JOIN wl_equipment_detail wed ON wed.id = wes.equipment_detail_id
<where>
<if test="value != null and value != ''">
AND wsi.`value` = #{value}
</if>
<if test="list != null and list.length > 0">
AND
<foreach collection="list" item="item" index="index" open="(" close=")" separator="OR">
wei.name_key = #{item}
</foreach>
</if>
</where>
GROUP BY
wsi.equipment_specific_id
ORDER BY
wsi.update_date DESC
</select>
<select id="getInitAlarm" resultType="com.yeejoin.amos.fas.business.vo.EquipmentSpecificIndexVo">
SELECT
concat(wes.id) as id,
concat(wes.id) as equipmentSpecificId,
wed.`name`,
wes.`code`,
wei.name_key,
wei.`name` AS equipmentIndexName,
wsi.`value`,
'equip' AS type
FROM
`wl_equipment_specific_index` wsi
LEFT JOIN wl_equipment_index wei ON wsi.equipment_index_id = wei.id
LEFT JOIN wl_equipment_specific wes ON wsi.equipment_specific_id = wes.id
LEFT JOIN wl_equipment_detail wed ON wed.id = wes.equipment_detail_id
where
wei.is_iot = 1
<if test="value != null and value != ''">
AND wsi.`value` = #{value}
</if>
<if test="list != null and list.length > 0">
AND
<foreach collection="list" item="item" index="index" open="(" close=")" separator="OR">
wei.name_key = #{item}
</foreach>
</if>
GROUP BY
wsi.equipment_specific_id
ORDER BY
wsi.update_date DESC
</select>
</mapper>
\ No newline at end of file
...@@ -113,10 +113,9 @@ ...@@ -113,10 +113,9 @@
</choose> </choose>
</select> </select>
<select id="queryForFireEquipmentHistoryCount" resultType="long"> <select id="queryForFireEquipmentHistoryCount" resultType="long">
SELECT SELECT
count(1) COUNT(1)
FROM FROM
( (
SELECT SELECT
...@@ -133,13 +132,12 @@ ...@@ -133,13 +132,12 @@
) equipmentName, ) equipmentName,
ind.update_date ind.update_date
FROM FROM
wl_equipment_specific_index ind wl_equipment_specific_index as ind
left join wl_equipment_specific as spe on spe.id = ind.equipment_specific_id left join wl_equipment_specific as spe on spe.id = ind.equipment_specific_id
left join wl_equipment_detail as det on spe.equipment_detail_id = det.id left join wl_equipment_detail as det on spe.equipment_detail_id = det.id
WHERE 1=1 AND ind.value IS NOT NULL WHERE ind.`value` IS NOT NULL AND ind.`value` != ''
) d ) d
WHERE <where>
1 = 1
<if test="fireEquipmentName!=null"> <if test="fireEquipmentName!=null">
AND d.fireEquipmentName LIKE '%${fireEquipmentName}%' AND d.fireEquipmentName LIKE '%${fireEquipmentName}%'
</if> </if>
...@@ -149,6 +147,7 @@ ...@@ -149,6 +147,7 @@
<if test="startTime!=null"> <if test="startTime!=null">
AND d.update_date BETWEEN '${startTime}' AND '${endTime}' AND d.update_date BETWEEN '${startTime}' AND '${endTime}'
</if> </if>
</where>
</select> </select>
...@@ -166,7 +165,6 @@ ...@@ -166,7 +165,6 @@
ELSE ind.value END 'e_value', ELSE ind.value END 'e_value',
ein.unit as eq_point_unit, ein.unit as eq_point_unit,
str.full_name as source_name, str.full_name as source_name,
-- sce.name as source_name,
( (
SELECT SELECT
group_concat(DISTINCT f.`name`) group_concat(DISTINCT f.`name`)
...@@ -182,12 +180,11 @@ ...@@ -182,12 +180,11 @@
left join wl_equipment_specific as spe on spe.id = ind.equipment_specific_id left join wl_equipment_specific as spe on spe.id = ind.equipment_specific_id
left join wl_equipment_detail as det on spe.equipment_detail_id = det.id left join wl_equipment_detail as det on spe.equipment_detail_id = det.id
left join wl_equipment_index as ein on ind.equipment_index_id = ein.id left join wl_equipment_index as ein on ind.equipment_index_id = ein.id
left join wl_stock_detail as sto on sto.qr_code = spe.qr_code left join wl_stock_detail as sto on sto.equipment_specific_id = spe.id
left join wl_warehouse_structure as str on sto.warehouse_structure_id = str.source_id left join wl_warehouse_structure as str on sto.warehouse_structure_id = str.source_id
-- left join f_risk_source as sce on str.source_id = sce.source_id WHERE ind.`value` IS NOT NULL AND ind.`value` != ''
) d ) d
WHERE <where>
1 = 1
<if test="fireEquipmentName!=null"> <if test="fireEquipmentName!=null">
AND d.fireEquipmentName LIKE '%${fireEquipmentName}%' AND d.fireEquipmentName LIKE '%${fireEquipmentName}%'
</if> </if>
...@@ -197,7 +194,7 @@ ...@@ -197,7 +194,7 @@
<if test="startTime!=null"> <if test="startTime!=null">
AND d.create_date BETWEEN '${startTime}' AND '${endTime}' AND d.create_date BETWEEN '${startTime}' AND '${endTime}'
</if> </if>
AND e_value IS NOT NULL AND e_value != '' </where>
ORDER BY d.create_date desc ORDER BY d.create_date desc
LIMIT ${start},${length} LIMIT ${start},${length}
</select> </select>
...@@ -323,6 +320,42 @@ ...@@ -323,6 +320,42 @@
<!-- </select>--> <!-- </select>-->
<select id="queryStorageEquips" resultType="map">
SELECT
wed.id,
wed.`name`,
u.`name` AS unit,
sum(wsd.amount) fireEquipmentCount
FROM
wl_stock_detail wsd
LEFT JOIN wl_equipment_detail wed ON wed.id = wsd.equipment_detail_id
LEFT JOIN wl_equipment we ON we.id = wed.equipment_id
LEFT JOIN wl_unit u ON u.id = we.unit_id
LEFT JOIN wl_warehouse_structure ws ON ws.id = wsd.warehouse_structure_id
LEFT JOIN f_risk_source as sce on sce.source_id = ws.source_id
WHERE
sce.id = #{riskSourceId}
GROUP BY
wsd.equipment_detail_id,
wed.`name`
</select>
<!-- <select id="findEquipDetailsById" resultType="com.yeejoin.amos.fas.core.common.response.EquipDetailsResponse">-->
<!-- SELECT-->
<!-- eq.`name`,-->
<!-- eq.`code`,-->
<!-- eq.address,-->
<!-- fs.`name` stationName,-->
<!-- eq.charge_user_id userId-->
<!-- FROM-->
<!-- f_equipment eq-->
<!-- LEFT JOIN f_fire_station fs ON fs.id = eq.fire_station_id-->
<!-- <where>-->
<!-- <if test="id!=null">AND eq.id = #{id}</if>-->
<!-- </where>-->
<!-- </select>-->
<!-- <select id="findOneByPointCode" resultType="com.yeejoin.amos.fas.business.vo.EquipCommunicationData">--> <!-- <select id="findOneByPointCode" resultType="com.yeejoin.amos.fas.business.vo.EquipCommunicationData">-->
<!-- SELECT--> <!-- SELECT-->
<!-- p.`code` pointCode,--> <!-- p.`code` pointCode,-->
...@@ -522,7 +555,7 @@ ...@@ -522,7 +555,7 @@
detail.NAME AS NAME, detail.NAME AS NAME,
detail.standard AS model, detail.standard AS model,
detail.maintenance_cycle AS maintenance_cycle, detail.maintenance_cycle AS maintenance_cycle,
manufatcturer.NAME AS manufatcturer, manufatcturer.NAME AS manufacturer,
detail.brand AS detail, detail.brand AS detail,
detail.production_date AS production_date, detail.production_date AS production_date,
sd.amount AS number, sd.amount AS number,
...@@ -639,4 +672,19 @@ ...@@ -639,4 +672,19 @@
<!-- f_risk_source r--> <!-- f_risk_source r-->
<!-- where s.id = r.source_id and s.id = #{id}--> <!-- where s.id = r.source_id and s.id = #{id}-->
<!-- </select>--> <!-- </select>-->
<select id="findFireStationById" resultType="com.yeejoin.amos.fas.dao.entity.FireStation">
SELECT
wb.`name`,
wb.`code`,
wb.address,
wb.region_id AS riskSourceId,
wb.height,
wb.low,
wb.design_capacity
FROM
wl_building wb
WHERE
wb.id = #{id}
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
</trim> </trim>
</select> </select>
<select id="reservePage" resultMap="resultMap"> <select id="reservePage" resultType="com.yeejoin.amos.fas.dao.dto.EquipmentDTO">
SELECT SELECT
a.id, a.id,
a.`name`, a.`name`,
......
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.fas.business.dao.mapper.PollPointMapper">
<select id="queryInitAlarm" resultType="com.yeejoin.amos.fas.business.vo.PollPointVo">
SELECT
p.`name`,
p.point_no AS `code`,
p.`status`
FROM
`p_point` p
<where>
<if test="list != null and list.length > 0">
AND
<foreach collection="list" item="item" index="index" open="(" close=")" separator="OR">
p.`status` = #{item}
</foreach>
</if>
</where>
</select>
<select id="getInitAlarm" resultType="com.yeejoin.amos.fas.business.vo.EquipmentSpecificIndexVo">
SELECT
concat(p.id) as id,
p.`name`,
p.point_no AS `code`,
'patrol' AS type,
'patrol' AS nameKey,
CASE
WHEN p.`status` = '2' THEN
'true'
WHEN p.`status` = '3' THEN
'true' ELSE 'false'
END AS `value`
FROM
`p_point` p
<where>
<if test="list != null and list.length > 0">
AND
<foreach collection="list" item="item" index="index" open="(" close=")" separator="OR">
p.`status` = #{item}
</foreach>
</if>
</where>
</select>
</mapper>
\ No newline at end of file
...@@ -34,9 +34,14 @@ ...@@ -34,9 +34,14 @@
<dependency> <dependency>
<groupId>com.yeejoin</groupId> <groupId>com.yeejoin</groupId>
<artifactId>amos-component-rule</artifactId> <artifactId>amos-component-rule</artifactId>
<<<<<<< HEAD
<version>1.4.4-SNAPSHOT</version> <version>1.4.4-SNAPSHOT</version>
</dependency> </dependency>
=======
<version>1.4.3-SNAPSHOT</version>
</dependency>
>>>>>>> CSFAS_V2.1.3.3
<dependency> <dependency>
<groupId>org.springframework.cloud</groupId> <groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId> <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
......
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