Commit 0465b044 authored by KeYong's avatar KeYong

Merge branch 'dev_upgrade' of 172.16.10.76:station/YeeAmosFireAutoSysRoot into eqintegration

# Conflicts: # YeeAmosFireAutoSysCommon/src/main/java/com/yeejoin/amos/fas/dao/entity/StationInfo.java
parents 00f018b8 fcd48005
package com.yeejoin.amos.fas.business.action; package com.yeejoin.amos.fas.business.action;
import com.yeejoin.amos.fas.business.service.intfc.IEquipmentHandlerService; import com.yeejoin.amos.fas.business.service.intfc.IEquipmentHandlerService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener; import org.springframework.context.ApplicationListener;
import org.springframework.context.annotation.Lazy; import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import com.yeejoin.amos.fas.business.action.model.ContingencyEvent; import com.yeejoin.amos.fas.business.action.model.ContingencyEvent;
import com.yeejoin.amos.fas.business.service.intfc.IRuleRunningSnapshotService; import com.yeejoin.amos.fas.business.service.intfc.IRuleRunningSnapshotService;
@Component @Component
public class ContingencyLogListener implements ApplicationListener<ContingencyEvent>{ public class ContingencyLogListener implements ApplicationListener<ContingencyEvent>{
@Autowired @Autowired
IRuleRunningSnapshotService ruleRunningSnapshotService; IRuleRunningSnapshotService ruleRunningSnapshotService;
// @Autowired // @Autowired
// @Lazy // @Lazy
// IEquipmentHandlerService equipmentHandlerService; // IEquipmentHandlerService equipmentHandlerService;
@Override @Override
public void onApplicationEvent(ContingencyEvent event) { public void onApplicationEvent(ContingencyEvent event) {
ruleRunningSnapshotService.reacordPlan(event.getTopic(), event.getMsgType(), event.getMsgBody(), event.getContingency()); ruleRunningSnapshotService.reacordPlan(event.getTopic(), event.getMsgType(), event.getMsgBody(), event.getContingency());
// equipmentHandlerService.subscribeTopic(); // equipmentHandlerService.subscribeTopic();
} }
} }
...@@ -5,21 +5,23 @@ import com.yeejoin.amos.component.rule.RuleFact; ...@@ -5,21 +5,23 @@ import com.yeejoin.amos.component.rule.RuleFact;
import lombok.Data; import lombok.Data;
import java.security.acl.LastOwnerException;
@RuleFact(value = "消防设备",project = "青海风险管控") @RuleFact(value = "消防设备",project = "青海风险管控")
@Data @Data
public class FireEquimentDataRo extends BasicsRo public class FireEquimentDataRo extends BasicsRo
{ {
/** /**
* *
*/ */
private static final long serialVersionUID = 5243181171363622140L; private static final long serialVersionUID = 5243181171363622140L;
private long fireEquimentId; private Long fireEquimentId;
private String fireEqumentName; private String fireEqumentName;
@Label("设备id") @Label("设备id")
private Long id;//监测点id private Long id;//监测点id
private String name;//名称 private String name;//名称
private String unit;//单位 private String unit;//单位
private String value;//值 0 / 1 private String value;//值 0 / 1
......
package com.yeejoin.amos.fas.business.controller; package com.yeejoin.amos.fas.business.controller;
import com.yeejoin.amos.fas.business.service.intfc.IStationMaintenService; import com.yeejoin.amos.fas.business.service.intfc.IStationMaintenService;
import com.yeejoin.amos.fas.config.Permission; import com.yeejoin.amos.fas.config.Permission;
import com.yeejoin.amos.fas.core.util.CommonResponse; import com.yeejoin.amos.fas.core.util.CommonResponse;
import com.yeejoin.amos.fas.core.util.CommonResponseUtil; import com.yeejoin.amos.fas.core.util.CommonResponseUtil;
import com.yeejoin.amos.fas.dao.entity.StationInfo; import com.yeejoin.amos.fas.dao.entity.StationInfo;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel; import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.util.Date; import java.util.Date;
@RestController @RestController
@RequestMapping(value = "/api/stationMainten") @RequestMapping(value = "/api/stationMainten")
@Api(tags="站端api") @Api(tags="站端api")
public class StationMaintenController extends BaseController{ public class StationMaintenController extends BaseController{
@Autowired @Autowired
private IStationMaintenService stationMaintenService; private IStationMaintenService stationMaintenService;
/** /**
* 保存站端信息 * 保存站端信息
*/ */
@Permission @Permission
@ApiOperation(value = "保存录入站端信息", notes = "保存录入站端信息") @ApiOperation(value = "保存录入站端信息", notes = "保存录入站端信息")
@PostMapping(value = "/save") @PostMapping(value = "/save")
public CommonResponse saveStation(@RequestBody StationInfo stationParams) { public CommonResponse saveStation(@RequestBody StationInfo stationParams) {
AgencyUserModel userModel = getUserInfo(); AgencyUserModel userModel = getUserInfo();
stationParams.setCreateBy(getUserId()); stationParams.setCreateBy(getUserId());
stationParams.setCreateDate(new Date()); stationParams.setCreateDate(new Date());
stationParams.setCreateUserName(userModel.getUserName()); stationParams.setCreateUserName(userModel.getUserName());
stationParams.setCreateUserPhoneNum(userModel.getMobile()); stationParams.setCreateUserPhoneNum(userModel.getMobile());
stationMaintenService.save(stationParams); stationMaintenService.save(stationParams);
return CommonResponseUtil.success(); return CommonResponseUtil.success();
} }
/** /**
* 获取站端信息 * 获取站端信息
*/ */
@Permission @Permission
@ApiOperation(value = "获取站端信息", notes = "获取站端信息") @ApiOperation(value = "获取站端信息", notes = "获取站端信息")
@PostMapping(value = "/detail") @PostMapping(value = "/detail")
public CommonResponse detail() { public CommonResponse detail() {
StationInfo stationInfo = stationMaintenService.detail(); StationInfo stationInfo = stationMaintenService.detail();
return CommonResponseUtil.success(stationInfo); return CommonResponseUtil.success(stationInfo);
} }
} }
...@@ -57,8 +57,6 @@ public interface FireEquipMapper extends BaseMapper { ...@@ -57,8 +57,6 @@ public interface FireEquipMapper extends BaseMapper {
EquipDetailsResponse findEquipDetailsById(@Param("id") Long id); EquipDetailsResponse findEquipDetailsById(@Param("id") Long id);
List<EquipCommunicationData> findAllEquipPointInfo();
EquipCommunicationData findOneByPointCode(@Param("code") String code); EquipCommunicationData findOneByPointCode(@Param("code") String code);
void saveBatch(List<FireEquipmentParam> list); void saveBatch(List<FireEquipmentParam> list);
......
...@@ -139,7 +139,7 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService { ...@@ -139,7 +139,7 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
@Value("${station.name}") @Value("${station.name}")
private String stationName; private String stationName;
@Value("${spring.application.name}") @Value("${spring.application.name}")
private String serviceName; private String serviceName;
...@@ -186,6 +186,8 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService { ...@@ -186,6 +186,8 @@ public class HandlerMqttMessageImpl implements IEquipmentHandlerService {
} else { // 向三维推送实时值修改 } else { // 向三维推送实时值修改
log.info("(监测)Message type is: " + equipmentSpecificIndex.getType()); log.info("(监测)Message type is: " + equipmentSpecificIndex.getType());
// 是否关联风险点
notifyAlarm(equipmentSpecificIndex, 0);
Map<String, Object> content = new HashMap<>(); Map<String, Object> content = new HashMap<>();
content.put("id", "id"); content.put("id", "id");
content.put("label", "eqPointName"); content.put("label", "eqPointName");
......
package com.yeejoin.amos.fas.business.service.intfc; package com.yeejoin.amos.fas.business.service.intfc;
import com.yeejoin.amos.fas.business.vo.ReginParams; import com.yeejoin.amos.fas.business.vo.ReginParams;
/** /**
* @author keyong * @author keyong
* @title: IEquipmentHandler * @title: IEquipmentHandler
* <pre> * <pre>
* @description: 站端接受装备信息系统数据处理流程 * @description: 站端接受装备信息系统数据处理流程
* </pre> * </pre>
* @date 2020/11/10 18:01 * @date 2020/11/10 18:01
*/ */
public interface IEquipmentHandlerService { public interface IEquipmentHandlerService {
void handlerMqttMessage(String topic, String message); void handlerMqttMessage(String topic, String message);
// void subscribeTopic(ReginParams reginParams); // void subscribeTopic(ReginParams reginParams);
void subscribeTopic(); void subscribeTopic();
} }
...@@ -97,8 +97,6 @@ public interface IEquipmentService { ...@@ -97,8 +97,6 @@ public interface IEquipmentService {
*/ */
List<Equipment> findAll(); List<Equipment> findAll();
void findAllEquipPointInfo();
EquipCommunicationData findFireEquipmentByPointCode(String code); EquipCommunicationData findFireEquipmentByPointCode(String code);
EquipCommunicationData findFireEquipDataByPointCode(String code); EquipCommunicationData findFireEquipDataByPointCode(String code);
......
package com.yeejoin.amos.fas.business.vo; package com.yeejoin.amos.fas.business.vo;
import lombok.Data; import lombok.Data;
@Data @Data
public class EquipmentSpecificVo { public class EquipmentSpecificVo {
private String id; private String id;
//装备码 //装备码
private String code; private String code;
//装备名称 //装备名称
private String name; private String name;
//装备分类 //装备分类
private String type; private String type;
//是否绑定 //是否绑定
private String isbind; private String isbind;
//地址 //地址
private String address; private String address;
//库存 //库存
private Integer amount; private Integer amount;
//是否单件管理(1是多件) //是否单件管理(1是多件)
private Integer single; private Integer single;
//IOT编码
private String iotCode;
} //装备编码
private String specificCode;
//系统名称
private String systemName;
}
security.password=a1234560 security.password=a1234560
security.loginId=fas_autosys security.loginId=fas_autosys
security.productWeb=CONVERTER_STATION_WEB security.productWeb=CONVERTER_STATION_WEB
security.appKeyWeb=CONVERTER_STATION security.appKeyWeb=CONVERTER_STATION
#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.10.72: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
eureka.client.fetchRegistry = true eureka.client.fetchRegistry = true
eureka.instance.prefer-ip-address=true eureka.instance.prefer-ip-address=true
#DB properties: #DB properties:
spring.datasource.url=jdbc:mysql://172.16.11.33:3306/safety-business-2.0-36?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8 spring.datasource.url=jdbc:mysql://172.16.11.33:3306/safety-business-2.0-36?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.datasource.username=root spring.datasource.username=root
spring.datasource.password=admin_1234 spring.datasource.password=admin_1234
spring.datasource.driver-class-name = com.mysql.jdbc.Driver spring.datasource.driver-class-name = com.mysql.jdbc.Driver
spring.datasource.hikari.maxLifetime = 1765000 spring.datasource.hikari.maxLifetime = 1765000
spring.datasource.hikari.maximum-pool-size = 10 spring.datasource.hikari.maximum-pool-size = 10
spring.datasource.testWhileIdle = true spring.datasource.testWhileIdle = true
spring.datasource.validationQuery = SELECT 1 spring.datasource.validationQuery = SELECT 1
#mongodb #mongodb
spring.data.mongodb.uri = mongodb://172.16.11.33:27017/iecmonitor spring.data.mongodb.uri = mongodb://172.16.11.33:27017/iecmonitor
#rule #rule
#params.remoteRuleUrl=http://172.16.3.3:8080/ #params.remoteRuleUrl=http://172.16.3.3:8080/
params.remoteRuleUrl=http://magintursh.xicp.net:18080/ params.remoteRuleUrl=http://magintursh.xicp.net:18080/
params.remoteWebsocketUrl=http://172.16.11.36:10600/ params.remoteWebsocketUrl=http://172.16.11.36:10600/
spring.redis.database=0 spring.redis.database=0
spring.redis.host=172.16.10.85 spring.redis.host=172.16.10.85
spring.redis.port=6379 spring.redis.port=6379
spring.redis.password=amos2019Redis spring.redis.password=amos2019Redis
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
spring.redis.jedis.pool.min-idle=0 spring.redis.jedis.pool.min-idle=0
spring.redis.timeout=1000 spring.redis.timeout=1000
#picture upload #picture upload
file.uploadUrl=F:\\upload\\files\\ file.uploadUrl=F:\\upload\\files\\
#picture read #picture read
file.readUrl=http://172.16.3.89:8083/file/getFile?in= file.readUrl=http://172.16.3.89:8083/file/getFile?in=
params.isPush=true 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.10.85:1883
emqx.user-name=super emqx.user-name=super
emqx.password=a123456 emqx.password=a123456
# 只用于初始化 # 只用于初始化
emqx.defaultTopic=mqtt_topic emqx.defaultTopic=mqtt_topic
Push.fegin.name=APPMESSAGEPUSHSERVICE-36 Push.fegin.name=APPMESSAGEPUSHSERVICE-36
dutyMode.fegin.name=AMOSDUTYMODE dutyMode.fegin.name=AMOSDUTYMODE
##\u89C4\u5219\u5BF9\u8C61\u81EA\u52A8\u626B\u63CF ##\u89C4\u5219\u5BF9\u8C61\u81EA\u52A8\u626B\u63CF
rule.definition.load=true rule.definition.load=true
rule.definition.model-package=com.yeejoin.amos.fas.business.action.model rule.definition.model-package=com.yeejoin.amos.fas.business.action.model
rule.definition.default-agency=STATE_GRID rule.definition.default-agency=STATE_GRID
#Fegin service config #Fegin service config
amos.feign.gennerator.use-gateway=true amos.feign.gennerator.use-gateway=true
autoSys.push.type=mqtt autoSys.push.type=mqtt
#����� #�����
file.downLoad.url=http://39.98.246.31:8888/ file.downLoad.url=http://39.98.246.31:8888/
#站端名称使用全拼 #站端名称使用全拼
station.name = yinan station.name = yinan
...@@ -28,33 +28,38 @@ ...@@ -28,33 +28,38 @@
</delete> </delete>
<select id="getEquipmentBySpe" resultType="com.yeejoin.amos.fas.business.vo.EquipmentSpecificVo"> <select id="getEquipmentBySpe" resultType="com.yeejoin.amos.fas.business.vo.EquipmentSpecificVo">
select select
sto.id as id , spe.id as id ,
equ.code as code, equ.code as code,
det.name as name, det.name as name,
cate.name as type, cate.name as type,
if(fire.fire_equipment_id is null ,'NO','YES') as isbind, if(fire.fire_equipment_id is null ,'NO','YES') as isbind,
ware.full_name as address, ware.full_name as address,
spe.single as single, spe.single as single,
sto.amount as amount sto.amount as amount,
from spe.iot_code,
wl_stock_detail as sto spe.code as specific_code,
left join wl_equipment_specific as spe on sto.qr_code = spe.qr_code spe.system_id,
left join wl_warehouse_structure as ware on sto.warehouse_structure_id = ware .id manage.name as system_name
left join wl_equipment_detail as det on sto.equipment_detail_id = det.id from
left join wl_equipment as equ on det.equipment_id = equ.id wl_stock_detail as sto
left join wl_equipment_category as cate on equ.category_id = cate.id left join wl_equipment_specific as spe on sto.qr_code = spe.qr_code
left join f_equipment_fire_equipment as fire on sto.id = fire.fire_equipment_id left join wl_warehouse_structure as ware on sto.warehouse_structure_id = ware .id
where sto.amount <![CDATA[>]]> 0 left join wl_equipment_detail as det on sto.equipment_detail_id = det.id
<if test="name != null and name!='null' "> left join wl_equipment as equ on det.equipment_id = equ.id
and det.name like CONCAT('%',#{name},'%' ) left join wl_equipment_category as cate on equ.category_id = cate.id
</if> left join f_equipment_fire_equipment as fire on spe.id = fire.fire_equipment_id
<if test="code != null and code!='null' "> left join f_equipment_manage as manage on spe.system_id = manage.SEQUENCE_NBR
and cate.code like CONCAT('%',#{code},'%' ) where sto.amount <![CDATA[>]]> 0
</if> <if test="name != null and name!='null' ">
<if test="equipmentId != null and equipmentId!='null' "> and det.name like CONCAT('%',#{name},'%' )
and fire.equipment_id = #{equipmentId} </if>
</if> <if test="code != null and code!='null' ">
limit #{pageNumber},#{pageSize} and cate.code like CONCAT('%',#{code},'%' )
</if>
<if test="equipmentId != null and equipmentId!='null' ">
and fire.equipment_id = #{equipmentId}
</if>
limit #{pageNumber},#{pageSize}
</select> </select>
<select id="getEquipmentBySpeCount" resultType="int"> <select id="getEquipmentBySpeCount" resultType="int">
...@@ -80,54 +85,54 @@ ...@@ -80,54 +85,54 @@
</if> </if>
</select> </select>
<select id="getFireEquiments" resultType="com.yeejoin.amos.fas.business.vo.EquipmentSpeVo"> <select id="getFireEquiments" resultType="com.yeejoin.amos.fas.business.vo.EquipmentSpeVo">
select
sto.equipment_specific_id as id ,
equ.code as f_code,
det.name as f_name
from
wl_stock_detail as sto
left join wl_equipment_detail as det on sto.equipment_detail_id = det.id
left join wl_equipment as equ on det.equipment_id = equ.id
left join f_equipment_fire_equipment as fire on sto.equipment_specific_id = fire.fire_equipment_id
where sto.amount <![CDATA[>]]> 0
<if test="fname != null and fname!='null' ">
and det.name like CONCAT('%',#{fname},'%' )
</if>
<if test="equipmentId != null and equipmentId!='null' ">
and fire.equipment_id = #{equipmentId}
</if>
</select>
<select id="getBindEquipment" resultType="com.yeejoin.amos.fas.business.vo.EquipmentPointVo">
select
speind.id,
equindex.name,
(
select select
sto.id as id , case when count(1) > 0 then 'bound' else 'noBound' end
equ.code as f_code, from
det.name as f_name f_fmea_equipment_point as d
where
d.equipment_point_id = speind.id
and
d.fmea_id = #{fmeaId}
and
d.important_equipment_id = #{importantEquipId} ) isBound
from from
wl_stock_detail as sto f_equipment_fire_equipment as fire
left join wl_equipment_detail as det on sto.equipment_detail_id = det.id left join wl_stock_detail as sto on fire.fire_equipment_id = sto.equipment_specific_id
left join wl_equipment as equ on det.equipment_id = equ.id left join wl_equipment_specific as spe on sto.qr_code = spe.qr_code
left join f_equipment_fire_equipment as fire on sto.id = fire.fire_equipment_id left join wl_equipment_specific_index as speind on sto.equipment_specific_id = speind.equipment_specific_id
where sto.amount <![CDATA[>]]> 0 left join wl_equipment_index as equindex on speind.equipment_index_id = equindex.id
<if test="fname != null and fname!='null' "> where equindex.type_code ='BREAKDOWN'
and det.name like CONCAT('%',#{fname},'%' ) <if test="importantEquipId != null ">
and fire.equipment_id = #{importantEquipId}
</if> </if>
<if test="equipmentId != null and equipmentId!='null' "> <if test="equimentId != null ">
and fire.equipment_id = #{equipmentId} and fire.fire_equipment_id =#{equimentId}
</if>
<if test="equipmentPointName != null and equipmentPointName!='null' ">
and equindex.name like CONCAT('%',#{equipmentPointName},'%' )
</if> </if>
</select>
<select id="getBindEquipment" resultType="com.yeejoin.amos.fas.business.vo.EquipmentPointVo">
select
speind.id,
equindex.name,
(
select
case when count(1) > 0 then 'bound' else 'noBound' end
from
f_fmea_equipment_point as d
where
d.equipment_point_id = speind.id
and
d.fmea_id = #{fmeaId}
and
d.important_equipment_id = #{importantEquipId} ) isBound
from
f_equipment_fire_equipment as fire
left join wl_stock_detail as sto on fire.fire_equipment_id = sto.id
left join wl_equipment_specific as spe on sto.qr_code = spe.qr_code
left join wl_equipment_specific_index as speind on spe.id = speind.equipment_specific_id
left join wl_equipment_index as equindex on speind.equipment_index_id = equindex.id
where equindex.type_code ='BREAKDOWN'
<if test="importantEquipId != null ">
and fire.equipment_id = #{importantEquipId}
</if>
<if test="equimentId != null ">
and fire.fire_equipment_id =#{equimentId}
</if>
<if test="equipmentPointName != null and equipmentPointName!='null' ">
and equindex.name like CONCAT('%',#{equipmentPointName},'%' )
</if>
</select> </select>
<select id="getAssoEquips" resultType="com.yeejoin.amos.fas.business.vo.AssoEquipsVo"> <select id="getAssoEquips" resultType="com.yeejoin.amos.fas.business.vo.AssoEquipsVo">
select select
......
...@@ -324,25 +324,6 @@ ...@@ -324,25 +324,6 @@
</where> </where>
</select> </select>
<select id="findAllEquipPointInfo" resultType="com.yeejoin.amos.fas.business.vo.EquipCommunicationData">
SELECT
p.`code` pointCode,
p.`name` pointName,
f.`name` equimentName,
f.id equimentId,
e.id fireEquipmentId,
e.`name` fireEquipmentName,
e.code fireEquipmentCode,
p.type,
d.dict_value alarmType,
p.unit
FROM
f_fire_equipment_point p
LEFT JOIN f_fire_equipment e ON e.id = p.fire_equipment_id
LEFT JOIN f_equipment_fire_equipment fe ON fe.fire_equipment_id = e.id
LEFT JOIN f_equipment f ON f.id = fe.equipment_id
LEFT JOIN f_dict d on d.id = p.alarm_type
</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
......
...@@ -438,12 +438,12 @@ ...@@ -438,12 +438,12 @@
</delete> </delete>
<select id="getPointsByEquipmentIdAndType" resultType="Map"> <select id="getPointsByEquipmentIdAndType" resultType="Map">
<!-- SELECT p.* from SELECT p.* from
f_fire_equipment_point p f_fire_equipment_point p
LEFT JOIN f_fire_equipment fe on p.fire_equipment_id = fe.id LEFT JOIN f_fire_equipment fe on p.fire_equipment_id = fe.id
LEFT JOIN f_equipment_fire_equipment e on fe.id = e.fire_equipment_id LEFT JOIN f_equipment_fire_equipment e on fe.id = e.fire_equipment_id
where e.equipment_id = #{id} where e.equipment_id = #{id}
and p.type = #{type} --> and p.type = #{type}
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -974,7 +974,6 @@ ...@@ -974,7 +974,6 @@
fe.is_indoor as inDoor, fe.is_indoor as inDoor,
case case
when fe.equip_classify = 0 then CONCAT('monitorEquipment',fe.id) when fe.equip_classify = 0 then CONCAT('monitorEquipment',fe.id)
when fe.equip_classify = 2 then CONCAT('video',fe.id)
when fe.equip_classify = 3 then CONCAT('fireEquipment',fe.id) when fe.equip_classify = 3 then CONCAT('fireEquipment',fe.id)
end as `key`, end as `key`,
fe.name, fe.name,
...@@ -1007,7 +1006,6 @@ ...@@ -1007,7 +1006,6 @@
fe.name as title, fe.name as title,
case case
when fe.equip_classify = 0 then 'monitorEquipment' when fe.equip_classify = 0 then 'monitorEquipment'
when fe.equip_classify = 2 then 'video'
when fe.equip_classify = 3 then 'fireEquipment' when fe.equip_classify = 3 then 'fireEquipment'
end as type, end as type,
fe.org_code as orgCode, fe.org_code as orgCode,
...@@ -1117,6 +1115,40 @@ ...@@ -1117,6 +1115,40 @@
where rs.id is not null where rs.id is not null
AND s.position3d != '' AND s.position3d is not null AND s.position3d != '' AND s.position3d is not null
UNION ALL UNION ALL
SELECT
wlv.CODE,
wlv.id,
'' AS inDoor,
CONCAT( 'video', wlv.id ) AS `key`,
wlv.NAME,
'' AS LEVEL,
'' AS levelStr,
'' AS objKey,
CONCAT(
'{"x":',
substring_index( wlv.position3d, ',', 1 ),
',"y":',
substring_index( substring_index( wlv.position3d, ',', - 2 ), ',', 1 ),
',"z":',
substring_index( wlv.position3d, ',', - 1 ),
'}'
)
as positionDTO,
'{ "x": 0, "y": 0, "z": 0 }' rotationDTO,
'{ "x": 1, "y": 1, "z": 1 }' scaleDTO,
FALSE AS `showInfo`,
wlv.NAME AS title,
'video' AS type,
wlv.org_code AS orgCode,
'' AS riskSourceId,
0 AS frequency,
FALSE AS twinkle
FROM
wl_video wlv
WHERE
wlv.position3d != ''
AND wlv.position3d IS NOT NULL
union all
select select
w.code, w.code,
w.id, w.id,
......
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