Commit 1089fe4b authored by 高建强's avatar 高建强

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

parents 95e19c5e 66909669
......@@ -1346,6 +1346,10 @@ public class DateUtil {
int toDay = to.get(Calendar.DAY_OF_YEAR);
int year = toYear - fromYear;
int day = toDay - fromDay;
if(day < 0){
day +=365;
year -=1;
}
param.put("year", year);
param.put("day", day);
return param;
......
......@@ -30,7 +30,7 @@ public class BubbleTipAction implements CustomerAction
//@ExposeAction("气泡提示")
@RuleMethod(methodLabel = "气泡提示", project = "青海风险管控")
@RuleMethod(methodLabel = "气泡提示", project = "风险管控")
public void sendBubbleTip(Object bizobj, Boolean showInfo, Object title, String type)
{
BubbleTipResult result = new BubbleTipResult();
......
......@@ -9,7 +9,7 @@ import lombok.Data;
/**
* @author DELL
*/
@RuleFact(value = "检查项",project = "青海风险管控")
@RuleFact(value = "检查项",project = "风险管控")
@Data
public class CheckInputItemRo implements Serializable {
/**
......
......@@ -7,7 +7,7 @@ import lombok.Data;
import java.security.acl.LastOwnerException;
@RuleFact(value = "消防设备",project = "青海风险管控")
@RuleFact(value = "消防设备",project = "风险管控")
@Data
public class FireEquimentDataRo extends BasicsRo
{
......
......@@ -7,7 +7,7 @@ import com.yeejoin.amos.component.rule.RuleFact;
import lombok.Data;
@RuleFact(value = "巡检点",project = "青海风险管控")
@RuleFact(value = "巡检点",project = "风险管控")
@Data
public class ProtalDataRo extends BasicsRo {
......
......@@ -8,7 +8,7 @@ import com.yeejoin.amos.component.rule.RuleFact;
import lombok.Data;
@RuleFact(value = "风险点",project = "青海风险管控")
@RuleFact(value = "风险点",project = "风险管控")
@Data
public class RiskSourceRo extends BasicsRo {
......
......@@ -7,7 +7,7 @@ import com.yeejoin.amos.component.rule.RuleFact;
import lombok.Data;
@RuleFact(value = "风险点-关联巡检点",project = "青海风险管控")
@RuleFact(value = "风险点-关联巡检点",project = "风险管控")
@Data
public class RiskSourceRuleRo extends BasicsRo {
......
......@@ -20,6 +20,8 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.*;
......@@ -40,6 +42,7 @@ public class FireSourceController extends BaseController {
private IWaterResourceService iWaterResourceService;
@Autowired
private IEquipmentService iEquipService;
private final Logger log = LoggerFactory.getLogger(FireSourceController.class);
@Permission
@ApiOperation(httpMethod = "POST", value = "添加消防装备", notes = "添加消防装备")
......@@ -207,9 +210,15 @@ public class FireSourceController extends BaseController {
@Permission
@ApiOperation(httpMethod = "GET", value = "消防状态明细信息", notes = "消防状态明细信息")
@RequestMapping(value = "/info/detail", produces = "application/json;charset=UTF-8", method = RequestMethod.GET)
public CommonResponse queryForEquipmentList(@ApiParam(value = "设备名称", required = true) @RequestParam Long id,
public CommonResponse queryForEquipmentList(@ApiParam(value = "设备名称", required = true) @RequestParam String id,
@ApiParam(value = "设备编号", required = true) @RequestParam String type) throws Exception {
return CommonResponseUtil.success(iFireEquipService.queryForDetail(type, id));
try{
return CommonResponseUtil.success(iFireEquipService.queryForDetail(type, Long.valueOf(id)));
}catch (Exception e) {
log.error(e.getMessage(),e);
return CommonResponseUtil.failure("消防装备明细查询失败" + e.getMessage());
}
}
}
......@@ -690,8 +690,8 @@ public class RiskSourceController extends BaseController {
@Permission
@ApiOperation(value = "风险预警详情", notes = "风险预警详情")
@GetMapping(value = "/warning/detail", produces = "application/json;charset=UTF-8")
public CommonResponse earlyWarning(@RequestParam Long riskSourceId) {
Map map = riskSourceService.earlyWarning(riskSourceId);
public CommonResponse earlyWarning(@RequestParam String riskSourceId) {
Map map = riskSourceService.earlyWarning(Long.valueOf(riskSourceId));
return CommonResponseUtil.success(map);
}
......
......@@ -6,6 +6,8 @@ import com.yeejoin.amos.fas.business.param.FireEquipmentParam;
import com.yeejoin.amos.fas.business.vo.EquipCommunicationData;
import com.yeejoin.amos.fas.core.common.response.EquipDetailsResponse;
import com.yeejoin.amos.fas.dao.entity.FireEquipment;
import com.yeejoin.amos.fas.dao.entity.FireStation;
import org.apache.ibatis.annotations.Param;
import java.util.HashMap;
......@@ -56,6 +58,8 @@ public interface FireEquipMapper extends BaseMapper {
List<Map> queryForGroupCount(@Param("fireStationId") Long fireStationId);
List<Map> queryStorageEquips(@Param("riskSourceId") Long riskSourceId);
EquipDetailsResponse findEquipDetailsById(@Param("id") Long id);
EquipCommunicationData findOneByPointCode(@Param("code") String code);
......@@ -85,4 +89,6 @@ public interface FireEquipMapper extends BaseMapper {
FireEquipment findFireEquipById (@Param("id") Long id);
FireEquipment findVideoById (@Param("id") Long id);
FireStation findFireStationById(@Param("id") Long id);
}
package com.yeejoin.amos.fas.business.dao.mapper;
import com.yeejoin.amos.fas.business.vo.EquipmentSpecificIndexVo;
import com.yeejoin.amos.fas.dao.entity.Equipment;
import com.yeejoin.amos.fas.dao.entity.EquipmentFireEquipment;
import com.yeejoin.amos.fas.dao.entity.FireEquipment;
......@@ -36,4 +37,6 @@ public interface ImpAndFireEquipMapper extends BaseMapper {
public Boolean existsAlarmPointByEqpPointIdAndEquipId(@Param("pointId") long pointId, @Param("equipmentId") long equipmentId);
// Boolean containGroupedPoint(long id);
EquipmentSpecificIndexVo findFireEqupmentByCode(String code);
}
......@@ -147,25 +147,25 @@ public class FireEquipServiceImpl implements IFireEquipService {
switch (fireEquipmentType)
{
case pool:
case hydrant:
Optional<WaterResource> waterResource = this.iWaterResourceDao.findById(id);
if(waterResource.isPresent()){
returnEntity = waterResource.get();
}
FireStation fireStation = fireEquipMapper.findFireStationById(id);
fireStation.setType("2");
fireStation.setFireEquipmentInfo(this.fireEquipMapper.queryStorageEquips(id));
returnEntity = fireStation;
break;
case fireFoamRoom:
FireStation fireStation1 = fireEquipMapper.findFireStationById(id);
fireStation1.setType("2");
fireStation1.setFireEquipmentInfo(this.fireEquipMapper.queryStorageEquips(id));
returnEntity = fireStation1;
break;
case fireChamber:
Optional<FireStation> fireStation1 = iFireStationDao.findById(id);
FireStation fireStation=null;
if(fireStation1.isPresent()){
fireStation=fireStation1.get();
}
fireStation.setFireEquipmentInfo(this.fireEquipMapper.queryForGroupCount(id));
returnEntity = fireStation;
FireStation fireStation11 = fireEquipMapper.findFireStationById(id);
fireStation11.setType("1");
fireStation11.setFireEquipmentInfo(this.fireEquipMapper.queryStorageEquips(id));
returnEntity = fireStation11;
break;
case extinguisher:
case hydrant:
case monitorEquipment:
FireEquipment fireEquipment=fireEquipMapper.findFireEquipById(id);
fireEquipment.setEquipClassify(Integer.parseInt(EquipClassifyEnum.EQUIPMENT.getCode()));
......
......@@ -1025,10 +1025,10 @@ public class RiskSourceServiceImpl implements IRiskSourceService {
@Override
@javax.transaction.Transactional
public String processFireEqumtData(AlarmParam deviceData) throws Exception {
EquipmentSpecificIndexVo equipmentSpecificIndexVo = new EquipmentSpecificIndexVo();
equipmentSpecificIndexVo.setEquipmentSpecificId(Long.valueOf(deviceData.getPointCode()));
equipmentSpecificIndexVo.setType("FIREALARM");
EquipmentSpecificIndexVo equipmentSpecificIndexVo = impAndFireEquipMapper.findFireEqupmentByCode(deviceData.getPointCode());
// new EquipmentSpecificIndexVo();
// equipmentSpecificIndexVo.setEquipmentSpecificId(Long.valueOf(deviceData.getPointCode()));
// equipmentSpecificIndexVo.setType("FIREALARM");
TopicEntityVo topicEntity = new TopicEntityVo();
topicEntity.setMessage(JSON.toJSONString(equipmentSpecificIndexVo));
......
......@@ -126,10 +126,6 @@ public class View3dServiceImpl implements IView3dService {
@Autowired
private RemoteSecurityService remoteSecurityService;
@Value("${station.equipment.code}")
private String equipmentCode;
@Override
@Transactional(rollbackFor = Exception.class)
public CommonResponse setPoint3dPosition(List<BindPointBo> pointBoList) {
......
......@@ -75,13 +75,23 @@ amos.feign.gennerator.use-gateway=true
autoSys.push.type=mqtt
#查询装备分类
#消防视频:xfsp
#消防车:2101
#灭火器:3104
#消火栓:3105
#探测器:8501
data.type.fireChamber=2101
#消防小室:9301
data.type.fireChamber=9301
#消防水池:9302
data.type.pool=9302
#消防泡沫间:9305
#消防视频:xfsp
station.equipment.code=2101,3104,3105,8501,9301,9302,9305,xfsp
data.type.fireFoamRoom=9305
#探测器:8501
data.type.monitorEquipment=8501
#灭火器:3104
data.type.extinguisher=3104
#消火栓:3105
data.type.hydrant=3105
......@@ -554,16 +554,36 @@
ALTER TABLE `f_station_info` ADD COLUMN `safety_user_phone_num` varchar(20) NULL COMMENT '安全负责人联系方式';
</sql>
</changeSet>
<changeSet author="zjw" id="16062323232111">
<changeSet author="keyong" id="1608279637-1">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="f_station_info" columnName="safety_user_phone_num" />
<columnExists tableName="f_station_info" columnName="fire_captain_name" />
</not>
</preConditions>
<comment>修改f_station_info表结构</comment>
<sql>
ALTER TABLE `f_station_info` ADD COLUMN `fire_captain_name` varchar(20) NULL COMMENT '驻站消防队队长姓名';
</sql>
</changeSet>
<changeSet author="keyong" id="1608279637-2">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="f_station_info" columnName="fire_captain_phone_num" />
</not>
</preConditions>
<comment>修改f_station_info表结构</comment>
<sql>
ALTER TABLE `f_station_info` ADD COLUMN `fire_captain_phone_num` varchar(20) NULL COMMENT '驻站消防队队长电话';
</sql>
</changeSet>
<changeSet author="keyong" id="1608279637-3">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="f_station_info" columnName="fire_captain_user_id" />
</not>
</preConditions>
<comment>修改f_station_info表结构</comment>
<sql>
ALTER TABLE `f_station_info` ADD COLUMN `fire_captain_user_id` varchar(20) NULL COMMENT '驻站消防队队长';
</sql>
</changeSet>
......
......@@ -196,7 +196,7 @@
<if test="startTime!=null">
AND d.create_date BETWEEN '${startTime}' AND '${endTime}'
</if>
AND e_value IS NOT NULL
AND e_value IS NOT NULL AND e_value != ''
ORDER BY d.create_date desc
LIMIT ${start},${length}
</select>
......@@ -287,6 +287,24 @@
)
</select>
<select id="queryStorageEquips" resultType="map">
SELECT
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
WHERE
ws.source_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`,
......@@ -583,4 +601,16 @@
video.id = #{id}
</if>
</select>
<select id="findFireStationById" resultType="com.yeejoin.amos.fas.dao.entity.FireStation">
SELECT
wb.`name`,
wb.`code`,
wb.address,
wb.region_id AS riskSourceId
FROM
wl_building wb
WHERE
wb.id = #{id}
</select>
</mapper>
\ No newline at end of file
......@@ -158,4 +158,15 @@
and ep.id = #{pointId}
</select>
<select id="findFireEqupmentByCode" resultType="com.yeejoin.amos.fas.business.vo.EquipmentSpecificIndexVo">
SELECT
id as equipmentSpecificId,
'FIREALARM' as type
FROM
wl_equipment_specific
WHERE
`code` = #{code}
LIMIT 1
</select>
</mapper>
\ No newline at end of file
......@@ -647,7 +647,7 @@
<select id="queryContingencyWater" resultType="java.util.HashMap">
<!-- SELECT
<!--SELECT
wr.alarm_level,
wr.max_level,
wr.area,
......@@ -664,7 +664,31 @@
wr.alarm_level,
wr.max_level,
wr.area,
wr.`name` -->
wr.`name`-->
SELECT
*
FROM
(
SELECT
building.height AS alarm_level,
building.warn_height AS max_level,
building.area_measure AS area,
building.CODE AS CODE,
building.NAME AS NAME,
3.6 AS
VALUE
FROM
wl_building building
LEFT JOIN wl_equipment_category category ON building.equipment_code = category.id
WHERE
category.CODE = 93020000
) wr
GROUP BY
wr.alarm_level,
wr.max_level,
wr.area,
wr.`name`
</select>
......
......@@ -506,12 +506,13 @@
SELECT
wlesi.id,
wlesi.`value` status,
wlesi.create_date changeDate,
CONCAT(wlei.group_name,wlei.name) label
wlesi.update_date changeDate,
CONCAT(ed.name,' ',wlei.name) label
FROM
wl_equipment_specific_index wlesi
LEFT JOIN wl_equipment_index wlei ON wlesi.equipment_index_id = wlei.id
left join wl_equipment_specific wles on wlesi.equipment_specific_id = wles.id
left join wl_equipment_detail ed on ed.id = wles.equipment_detail_id
WHERE
wles.org_code=#{orgCode}
and wlei.type_code!='BREAKDOWN'
......@@ -1325,7 +1326,7 @@
<select id="retrieveAll" resultType="java.util.HashMap">
select *,'{ "x": 0, "y": 0, "z": 0 }' rotationDTO,'{ "x": 1, "y": 1, "z": 1 }' scaleDTO
from (select concat('riskSource-',r.id) as id,r.id as originId,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as ue4Rotation ,'riskSource' as type,r.org_code as orgCode,
from (select concat('riskSource-',r.id) as id,concat(r.id) as originId,r.name,r.code,r.ue4_location as ue4Location,r.ue4_rotation as ue4Rotation ,'riskSource' as type,r.org_code as orgCode,
rl.level as level,rl.name as levelStr,r.is_indoor as isIndoor,'风险点' as typeName,'riskSource' as typeCode,
CASE
WHEN (
......@@ -1353,7 +1354,8 @@
'' as person,
r.rpn as title,
CONCAT('riskSource-',r.id) as `key`,
r.id as riskSourceId
r.id as riskSourceId,
'' as room
from f_risk_source r
left join f_risk_level rl ON rl.id = r.risk_level_id
where r.is_region = 'FALSE'
......@@ -1361,7 +1363,7 @@
AND rl.level = #{dataLevel}
</if>
UNION all
select concat('patrol-',p.id) as id,p.id as originId,p.name,p.point_no as code,p.ue4_location as ue4Location,p.ue4_rotation as ue4Rotation ,'patrol' as type,p.org_code as orgCode,
select concat('patrol-',p.id) as id,concat(p.id) as originId,p.name,p.point_no as code,p.ue4_location as ue4Location,p.ue4_rotation as ue4Rotation ,'patrol' as type,p.org_code as orgCode,
p.status as level,CONCAT('level_',p.status) as levelStr,p.is_indoor as isIndoor,'巡检点' as typeName,'patrol' as typeCode,
CASE
WHEN (
......@@ -1394,11 +1396,13 @@
when p.status = '3' then '漏检'
end as title,
concat('patrol-',p.id) as `key`,
p.risk_source_id as riskSourceId
p.risk_source_id as riskSourceId,
r.name as room
from p_point p
left join f_risk_source r on r.id = p.risk_source_id
WHERE is_delete = FALSE
UNION all
select concat('impEquipment-',id) as id,id as originId,name,code,ue4_location as ue4Location,ue4_rotation as ue4Rotation ,'impEquipment' as type,org_code as orgCode,
select concat('impEquipment-',e.id) as id,concat(e.id) as originId,e.name,e.code,e.ue4_location as ue4Location,e.ue4_rotation as ue4Rotation ,'impEquipment' as type,e.org_code as orgCode,
0 as level,'level_0' as levelStr,e.is_indoor as isIndoor,'重点设备' as typeName,'impEquipment' as typeCode,
CASE
WHEN (
......@@ -1424,12 +1428,14 @@
e.name as protectObjName,
'' as routeName,
'' as person,
name as title,
e.name as title,
concat('impEquipment-',e.id) as `key`,
e.risk_source_id as riskSourceId
e.risk_source_id as riskSourceId,
r.name as room
from f_equipment e
left join f_risk_source r on r.id = e.risk_source_id
UNION all
select concat('monitorEquipment-',m.id) as id,m.id as originId,det.name,m.code as code,'' as ue4Location,'' as ue4Rotation ,'monitorEquipment' as type,m.org_code as orgCode,
select concat('monitorEquipment-',m.id) as id,concat(m.id) as originId,det.name,m.code as code,'' as ue4Location,'' as ue4Rotation ,'monitorEquipment' as type,m.org_code as orgCode,
null as level , concat('level_',null) as levelStr,null as isIndoor,'探测器' as typeName,'monitorEquipment' as typeCode,
CASE
WHEN (
......@@ -1457,7 +1463,8 @@
'' as person,
det.name as title,
concat('monitorEquipment-',m.id) as `key`,
str.source_id as riskSourceId
str.source_id as riskSourceId,
str.full_name as room
from wl_equipment_specific m
left join wl_equipment_detail as det on m.equipment_detail_id = det.id
left join wl_equipment as equ on det.equipment_id = equ.id
......@@ -1466,13 +1473,13 @@
left join wl_warehouse_structure as str on sto.warehouse_structure_id = str.id
left join f_equipment_fire_equipment fe on fe.fire_equipment_id = m.id
left join f_equipment f on f.id = fe.equipment_id
where substr(cat.code ,1,4) = 8501
group By m.code
where substr(cat.code ,1,4) = '8501'
<if test="protectObjName != null and protectObjName != ''">
AND f.name = #{protectObjName}
</if>
group By m.code
UNION all
select concat('video-',vi.id) as id,vi.id as originId,vi.name,vi.code,null as ue4Location,null as ue4Rotation ,'video' as type,vi.org_code as orgCode,
select concat('video-',vi.id) as id,concat(vi.id) as originId,vi.name,vi.code,null as ue4Location,null as ue4Rotation ,'video' as type,vi.org_code as orgCode,
null as level , concat('level_',null) as levelStr,null as isIndoor,'摄像头' as typeName,'video' as typeCode,
CASE
WHEN (
......@@ -1500,7 +1507,8 @@
'' as person,
vi.name as title,
concat('video-',vi.id) as `key`,
vis.source_id as riskSourceId
vis.source_id as riskSourceId,
sou.name as room
from wl_video as vi
left join wl_video_source as vis on vi.id = vis.video_id
left join f_risk_source as sou on sou.id = vis.source_id
......@@ -1508,7 +1516,7 @@
group by vi.id
UNION all
select concat('hydrant-',spe.id) as id,spe.id as originId,det.name,spe.code as code,null as ue4Location,null as ue4Rotation ,'hydrant' as type,spe.org_code as orgCode,
select concat('hydrant-',spe.id) as id,concat(spe.id) as originId,det.name,spe.code as code,null as ue4Location,null as ue4Rotation ,'hydrant' as type,spe.org_code as orgCode,
0 as level , 'level_0' as levelStr,null as isIndoor,'消防栓' as typeName,'fireEquipment' as typeCode,
CASE
WHEN (
......@@ -1536,7 +1544,8 @@
'' as person,
det.name as title,
concat('hydrant-',spe.id) as `key`,
str.source_id as riskSourceId
str.source_id as riskSourceId,
str.full_name as room
from
wl_equipment_specific as spe
left join wl_equipment_detail as det on spe.equipment_detail_id = det.id
......@@ -1544,9 +1553,9 @@
left join wl_equipment_category as cat on equ.category_id = cat.id
left join wl_stock_detail as sto on sto.qr_code = spe.qr_code
left join wl_warehouse_structure as str on sto.warehouse_structure_id = str.id
where substr(cat.code ,1,4)= 3105
where substr(cat.code ,1,4)= '3105'
UNION all
select concat('pool-',bu.id) as id,bu.id as originId,bu.name,bu.code,null as ue4Location,null as ue4Rotation,'pool' as type,bu.org_code as orgCode,
select concat('pool-',bu.id) as id,concat(bu.id) as originId,bu.name,bu.code,null as ue4Location,null as ue4Rotation,'pool' as type,bu.org_code as orgCode,
0 as level , 'level_0' as levelStr,null as isIndoor,'消防水池' as typeName,'fireEquipment' as typeCode,
CASE
WHEN (
......@@ -1574,12 +1583,13 @@
'' as person,
bu.name as title,
concat('pool-',bu.id) as `key`,
bu.region_id as riskSourceId
bu.region_id as riskSourceId,
bu.address as room
from wl_building as bu
left join wl_equipment_category as cat on bu.equipment_code = cat.id
where substr(cat.code ,1,4) = 9302
UNION all
select concat('fireCar-',car.id) as id,car.id as originId,car.name,car.car_num as code,null as ue4Location,null as ue4Rotation, 'fireCar' as type,car.org_code as orgCode,
select concat('fireCar-',car.id) as id,concat(car.id) as originId,car.name,car.car_num as code,null as ue4Location,null as ue4Rotation, 'fireCar' as type,car.org_code as orgCode,
0 as level , 'level_0' as levelStr,null as isIndoor,'消防车' as typeName,'fireEquipment' as typeCode,
CASE
WHEN (
......@@ -1607,12 +1617,13 @@
'' as person,
car.name as title,
concat('fireCar-',car.id) as `key`,
#{riskSourceId} as riskSourceId
#{riskSourceId} as riskSourceId,
'' as room
from wl_car as car
left join wl_equipment as equ on car.equipment_id = equ.id
left join wl_equipment_category as cat on equ.category_id = cat.id
UNION all
select concat('fireEquipment-',spe.id) as id,spe.id as originId,det.name,spe.code as code,null as ue4Location,null as ue4Rotation,'fireEquipment' as type,spe.org_code as orgCode,
select concat('extinguisher-',spe.id) as id,concat(spe.id) as originId,det.name,spe.code as code,null as ue4Location,null as ue4Rotation,'extinguisher' as type,spe.org_code as orgCode,
null as level , concat('level_',null) as levelStr,null as isIndoor,'灭火器' as typeName,'fireEquipment' as typeCode,
CASE
WHEN (
......@@ -1639,17 +1650,18 @@
'' as routeName,
'' as person,
det.name as title,
concat('fireEquipment-',spe.id) as `key`,
str.source_id as riskSourceId
concat('extinguisher-',spe.id) as `key`,
str.source_id as riskSourceId,
str.full_name as room
from wl_equipment_specific as spe
left join wl_equipment_detail as det on spe.equipment_detail_id = det.id
left join wl_equipment as equ on det.equipment_id = equ.id
left join wl_equipment_category as cat on equ.category_id = cat.id
left join wl_stock_detail as sto on sto.qr_code = spe.qr_code
left join wl_warehouse_structure as str on sto.warehouse_structure_id = str.id
where substr(cat.code ,1,4) = 3104
where substr(cat.code ,1,4) = '3104'
UNION all
select concat('fireChamber-',bu.id) as id,bu.id as originId,bu.name,bu.code,null as ue4Location,null as ue4Rotation , 'fireChamber' as type,bu.org_code as orgCode,
select concat('fireChamber-',bu.id) as id,concat(bu.id) as originId,bu.name,bu.code,null as ue4Location,null as ue4Rotation , 'fireChamber' as type,bu.org_code as orgCode,
0 as level , 'level_0' as levelStr,null as isIndoor,'泡沫间' as typeName,'fireEquipment' as typeCode,
CASE
WHEN (
......@@ -1677,12 +1689,13 @@
'' as person,
bu.name as title,
concat('fireChamber-',bu.id) as `key`,
bu.region_id as riskSourceId
bu.region_id as riskSourceId,
bu.address as room
from wl_building as bu
left join wl_equipment_category as cat on bu.equipment_code = cat.id
where substr(cat.code ,1,4) = 9305
UNION all
select concat('fireFoamRoom-',bu.id) as id,bu.id as originId,bu.name,bu.code,null as ue4Location,null as ue4Rotation , 'fireFoamRoom' as type,bu.org_code as orgCode,
select concat('fireFoamRoom-',bu.id) as id,concat(bu.id) as originId,bu.name,bu.code,null as ue4Location,null as ue4Rotation , 'fireFoamRoom' as type,bu.org_code as orgCode,
0 as level , 'level_0' as levelStr,null as isIndoor,'消防室' as typeName,'fireEquipment' as typeCode,
CASE
WHEN (
......@@ -1710,10 +1723,11 @@
'' as person,
bu.name as title,
concat('fireFoamRoom-',bu.id) as `key`,
bu.region_id as riskSourceId
bu.region_id as riskSourceId,
bu.address as room
from wl_building as bu
left join wl_equipment_category as cat on bu.equipment_code = cat.id
where substr(cat.code ,1,4) = 9301
where substr(cat.code ,1,4) = '9301'
) as tmp
<where>
<if test="inputText!=null and inputText != ''" >
......
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