Commit 8bae25bd authored by 王鹿鹿's avatar 王鹿鹿

Merge remote-tracking branch 'origin/develop_dl_plan6' into develop_dl_plan6

parents 0d4c816a 591cffda
...@@ -121,4 +121,7 @@ public class FireEquipmentSignalLogDto extends BaseDto { ...@@ -121,4 +121,7 @@ public class FireEquipmentSignalLogDto extends BaseDto {
*/ */
@ApiModelProperty(value = "3维页面访问地址") @ApiModelProperty(value = "3维页面访问地址")
private String view3dUrl; private String view3dUrl;
@ApiModelProperty(value = "机构编码")
private String orgCode;
} }
...@@ -33,7 +33,8 @@ ...@@ -33,7 +33,8 @@
s.station_charge_person, s.station_charge_person,
s.charge_person_phone, s.charge_person_phone,
a.fire_building_mrid, a.fire_building_mrid,
s.view3d_url s.view3d_url,
s.org_code
from from
asf_fire_equipment_signal_log a, asf_fire_equipment_signal_log a,
asf_fire_station_info s asf_fire_station_info s
......
package com.yeejoin.equipmanage.common.entity.dto;
import lombok.Data;
@Data
public class RequestBaseDto {
private String bizOrgCode;
}
...@@ -8,7 +8,9 @@ import java.util.Map; ...@@ -8,7 +8,9 @@ import java.util.Map;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
import com.yeejoin.equipmanage.common.entity.*; import com.yeejoin.equipmanage.common.entity.*;
import com.yeejoin.equipmanage.common.entity.dto.RequestBaseDto;
import com.yeejoin.equipmanage.common.utils.SpringUtils; import com.yeejoin.equipmanage.common.utils.SpringUtils;
import com.yeejoin.equipmanage.fegin.JcsFeign;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Lazy; import org.springframework.context.annotation.Lazy;
...@@ -28,6 +30,7 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType; ...@@ -28,6 +30,7 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.foundation.utils.Bean; import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest; import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel; import org.typroject.tyboot.core.restful.utils.ResponseModel;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
...@@ -112,6 +115,11 @@ public class FireFightingSystemController extends AbstractBaseController { ...@@ -112,6 +115,11 @@ public class FireFightingSystemController extends AbstractBaseController {
@Value("${firefightingsystem.equip.alarms.url}") @Value("${firefightingsystem.equip.alarms.url}")
private String ffsEquipAlarmsUrl; private String ffsEquipAlarmsUrl;
@Autowired
private JcsFeign jcsFeign;
@Value("${auth-key-fire-system-build:fire_system_build_info}")
private String systemBuildAuthKey;
@Autowired @Autowired
EquipmentSpecificIndexMapper equipmentSpecificIndexMapper; EquipmentSpecificIndexMapper equipmentSpecificIndexMapper;
...@@ -585,11 +593,12 @@ public class FireFightingSystemController extends AbstractBaseController { ...@@ -585,11 +593,12 @@ public class FireFightingSystemController extends AbstractBaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "消防系统树和消防建筑树", notes = "树菜单") @ApiOperation(value = "消防系统树和消防建筑树", notes = "树菜单")
@GetMapping(value = "/getBuildingTreeAndSystemTree") @GetMapping(value = "/getBuildingTreeAndSystemTree")
public Map<String, List> getBuildingTreeAndSystemTree() { public Map<String, List> getBuildingTreeAndSystemTree(RequestBaseDto dto) {
Map<String, List> map = new HashMap<>(); Map<String, List> map = new HashMap<>();
List<BuildingTreeVo> buildingTrees = buildService.getBuildingTree(); List<BuildingTreeVo> buildingTrees = buildService.getBuildingTreeByBizOrgCode(dto.getBizOrgCode());
LambdaQueryWrapper<FireFightingSystemEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>(); LambdaQueryWrapper<FireFightingSystemEntity> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.orderByAsc(FireFightingSystemEntity::getRecDate); lambdaQueryWrapper.orderByAsc(FireFightingSystemEntity::getRecDate);
lambdaQueryWrapper.likeRight(StringUtil.isNotEmpty(dto.getBizOrgCode()), FireFightingSystemEntity::getBizOrgCode, dto.getBizOrgCode());
List<FireFightingSystemEntity> systemTree = fireFightingSystemService.list(lambdaQueryWrapper); List<FireFightingSystemEntity> systemTree = fireFightingSystemService.list(lambdaQueryWrapper);
systemTree.forEach(action -> { systemTree.forEach(action -> {
action.setDetailListPaneApi(ffsEquipAlarmsUrl); action.setDetailListPaneApi(ffsEquipAlarmsUrl);
...@@ -601,6 +610,20 @@ public class FireFightingSystemController extends AbstractBaseController { ...@@ -601,6 +610,20 @@ public class FireFightingSystemController extends AbstractBaseController {
} }
/** /**
* 消防系统公司树
*
* @param
* @return
*/
@TycloudOperation(ApiLevel = UserType.AGENCY)
@GetMapping(value = "/companyTreeBySystem")
@ApiOperation(httpMethod = "GET", value = "消防系统公司树", notes = "消防系统公司树")
public ResponseModel<List<OrgMenuDto>> companyTreeByUserAndType() {
return ResponseHelper.buildResponse(jcsFeign.getCompanyDeptTreeWithAuth(systemBuildAuthKey, "COMPANY").getResult());
}
/**
* 装备卡片删除 * 装备卡片删除
* *
* @return * @return
......
...@@ -48,6 +48,14 @@ public interface FormInstanceMapper extends BaseMapper<FormInstance> { ...@@ -48,6 +48,14 @@ public interface FormInstanceMapper extends BaseMapper<FormInstance> {
* @return * @return
*/ */
List<Map<String,Object>> querySpecialChildrenList(String parentId); List<Map<String,Object>> querySpecialChildrenList(String parentId);
/**
* 查询指定节点的子
* @param parentId
* @return
*/
List<Map<String,Object>> querySpecialChildrenListByBizOrgCode(@Param("parentId") String parentId, @Param("bizOrgCode") String bizOrgCode);
/** /**
* @Description 分页查询 * @Description 分页查询
* @param dto 查询参数 * @param dto 查询参数
......
...@@ -77,6 +77,13 @@ public interface IBuilldService extends IService<Building> { ...@@ -77,6 +77,13 @@ public interface IBuilldService extends IService<Building> {
List<BuildingTreeVo> getBuildingTree(); List<BuildingTreeVo> getBuildingTree();
/** /**
* 消防建筑树查询接口(带条件bizOrgCode)
*
* @return List<BuildingTreeVo>
*/
List<BuildingTreeVo> getBuildingTreeByBizOrgCode(String bizOrgCode);
/**
* 消防建筑层级树查询接口 * 消防建筑层级树查询接口
* *
* @return List<BuildingTreeVo> * @return List<BuildingTreeVo>
......
...@@ -71,6 +71,15 @@ public interface IFormInstanceService extends IService<FormInstance> { ...@@ -71,6 +71,15 @@ public interface IFormInstanceService extends IService<FormInstance> {
* @return List<Map < String, Object>> * @return List<Map < String, Object>>
*/ */
List<Map<String, Object>> getSpecialChildrenList(String parentId); List<Map<String, Object>> getSpecialChildrenList(String parentId);
/**
* 查询指定节点的下降
*
* @param parentId 父节点
* @return List<Map < String, Object>>
*/
List<Map<String, Object>> getSpecialChildrenListByBizOrgCode(String parentId, String bizOrgCode);
/** /**
* @Description 分页查询 * @Description 分页查询
* @param dto 查询参数 * @param dto 查询参数
......
...@@ -464,6 +464,28 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i ...@@ -464,6 +464,28 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
} }
@Override @Override
public List<BuildingTreeVo> getBuildingTreeByBizOrgCode(String bizOrgCode) {
List<BuildingTreeVo> allListVo = getBuildingTreeVosByBizOrgCode(true, bizOrgCode);
return allListVo.stream().filter(s -> "-1".equals(s.getParentId())).map(s -> {
BuildingTreeVo t = new BuildingTreeVo();
Bean.copyExistPropertis(s, t);
t.setChildren(this.getChildren(t.getInstanceId(), allListVo));
t.setDetailPaneApi(address);
t.setApiUrl(apiUrl);
return t;
}).collect(Collectors.toList());
}
private List<BuildingTreeVo> getBuildingTreeVosByBizOrgCode(Boolean isContainRootNode, String bizOrgCode) {
FormGroup formGroup = iFormGroupService.getByUniqueKey(GroupCodeEnum.ALL_BUILDING.getGroupCode());
List<Map<String, Object>> allList = iFormInstanceService.getSpecialChildrenListByBizOrgCode(null, bizOrgCode);
List<BuildingTreeVo> allListVo = buildBuildingData(formGroup, allList, isContainRootNode);
Map<Long, String> absolutePositionMap = getBuildingAbsolutePosition(allListVo);
allListVo.forEach(s -> s.setAbsolutePosition(absolutePositionMap.get(s.getId())));
return allListVo;
}
@Override
public List<Map<String, Object>> getBuildingDetaiList() { public List<Map<String, Object>> getBuildingDetaiList() {
return iFormInstanceService.getSpecialChildrenList(null); return iFormInstanceService.getSpecialChildrenList(null);
} }
......
...@@ -436,6 +436,11 @@ public class FormInstanceServiceImpl extends ServiceImpl<FormInstanceMapper, For ...@@ -436,6 +436,11 @@ public class FormInstanceServiceImpl extends ServiceImpl<FormInstanceMapper, For
return this.baseMapper.querySpecialChildrenList(parentId); return this.baseMapper.querySpecialChildrenList(parentId);
} }
@Override
public List<Map<String, Object>> getSpecialChildrenListByBizOrgCode(String parentId, String bizOrgCode) {
return this.baseMapper.querySpecialChildrenListByBizOrgCode(parentId, bizOrgCode);
}
private String fillCode(String groupCode, String fieldName, String value, String companyCode) { private String fillCode(String groupCode, String fieldName, String value, String companyCode) {
if (CODE.equals(fieldName) && StringUtils.isEmpty(value)) { if (CODE.equals(fieldName) && StringUtils.isEmpty(value)) {
return RandomUtil.buildNo(GroupCodeEnum.getInstance(groupCode).getSequenceType(), companyCode); return RandomUtil.buildNo(GroupCodeEnum.getInstance(groupCode).getSequenceType(), companyCode);
......
...@@ -235,4 +235,11 @@ public class DocContentResource { ...@@ -235,4 +235,11 @@ public class DocContentResource {
@PathVariable(value = "sequenceNbr") String sequenceNbr) { @PathVariable(value = "sequenceNbr") String sequenceNbr) {
return ResponseHelper.buildResponse(docContentService.getSimpleDetail(sequenceNbr)); return ResponseHelper.buildResponse(docContentService.getSimpleDetail(sequenceNbr));
} }
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "根据orgCode获取预案list")
@RequestMapping(value = "/list/{orgCode}", method = RequestMethod.GET)
public ResponseModel<List<KnowledgeDocContent>> listByOrgCode(@PathVariable(value = "orgCode") String orgCode) {
return ResponseHelper.buildResponse(docContentService.listByOrgCode(orgCode));
}
} }
package com.yeejoin.amos.knowledgebase.face.service; package com.yeejoin.amos.knowledgebase.face.service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Sequence; import com.baomidou.mybatisplus.core.toolkit.Sequence;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
...@@ -673,4 +674,11 @@ public class DocContentService extends BaseService<KnowledgeDocContentModel, Kno ...@@ -673,4 +674,11 @@ public class DocContentService extends BaseService<KnowledgeDocContentModel, Kno
wrapper.select("SEQUENCE_NBR","DOC_TITLE","REC_DATE"); wrapper.select("SEQUENCE_NBR","DOC_TITLE","REC_DATE");
return this.baseMapper.selectMaps(wrapper); return this.baseMapper.selectMaps(wrapper);
} }
public List<KnowledgeDocContent> listByOrgCode(String orgCode) {
LambdaQueryWrapper<KnowledgeDocContent> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.likeRight(KnowledgeDocContent::getOrgCode, orgCode);
return this.baseMapper.selectList(queryWrapper);
}
} }
...@@ -95,6 +95,8 @@ management.endpoints.enabled-by-default=false ...@@ -95,6 +95,8 @@ management.endpoints.enabled-by-default=false
auth-key-area=area_info auth-key-area=area_info
# 权限标识-消防系统 # 权限标识-消防系统
auth-key-fire-system=fire_system_info auth-key-fire-system=fire_system_info
# 权限标识-消防系统和建筑
auth-key-fire-system-build=fire_system_build_info
# 权限标识-消防装备 # 权限标识-消防装备
auth-key-fire-equip=fire_equip_info auth-key-fire-equip=fire_equip_info
# 权限标识-消防视频 # 权限标识-消防视频
......
...@@ -1303,7 +1303,7 @@ ...@@ -1303,7 +1303,7 @@
LEFT JOIN p_point_classify ppc on pci.point_classify_id = ppc.id LEFT JOIN p_point_classify ppc on pci.point_classify_id = ppc.id
)AS unqualified, )AS unqualified,
( (
SELECT COUNT(1) FROM p_point_classify SELECT COUNT(DISTINCT(equipment_id)) FROM p_point_classify
WHERE id not in(SELECT DISTINCT(point_classify_id) FROM p_check_input WHERE id not in(SELECT DISTINCT(point_classify_id) FROM p_check_input
WHERE org_code = #{orgCode} and create_date WHERE org_code = #{orgCode} and create_date
between #{startTime} and #{endTime}) between #{startTime} and #{endTime})
......
...@@ -2687,17 +2687,20 @@ ...@@ -2687,17 +2687,20 @@
(CASE WHEN (CASE WHEN
b.totalNum > 0 THEN b.totalNum > 0 THEN
'异常' ELSE '正常' END) `status`, '异常' ELSE '正常' END) `status`,
b.totalNum AS totalNum b.totalNum AS totalNum,
b.`code` AS equipDetailCode
FROM FROM
( (
SELECT SELECT
a.equipName, a.equipName,
count( wesl.id ) AS totalNum count( wesl.id ) AS totalNum,
a.`code`
FROM FROM
( (
SELECT SELECT
wes.`name` AS equipName, wes.`name` AS equipName,
wed.equipment_id AS equipmentId wed.equipment_id AS equipmentId,
wed.`code` AS code
FROM FROM
wl_equipment_specific wes wl_equipment_specific wes
LEFT JOIN wl_equipment_detail wed ON wed.id = wes.equipment_detail_id LEFT JOIN wl_equipment_detail wed ON wed.id = wes.equipment_detail_id
......
...@@ -562,4 +562,39 @@ AND field_name =#{name} ...@@ -562,4 +562,39 @@ AND field_name =#{name}
WHERE c.field_value = #{id}) WHERE c.field_value = #{id})
</select> </select>
<select id="querySpecialChildrenListByBizOrgCode" resultType="java.util.Map">
SELECT
*
FROM
(
SELECT
a.instance_id as id,
a.instance_id AS instanceId,
a.group_code AS groupCode,
a.group_type AS groupType,
wlss.scene_id as sceneId,
MAX( CASE WHEN a.field_name = 'parentId' THEN a.field_value END ) AS parentId,
MAX( CASE WHEN a.field_name = 'name' THEN a.field_value END ) AS instanceName,
MAX( CASE WHEN a.field_name = 'name' THEN a.field_value END ) AS name,
MAX( CASE WHEN a.field_name = 'code' THEN a.field_value END ) AS code,
MAX( CASE WHEN a.field_name = 'isRisk' THEN a.field_value END ) AS isRisk,
MAX( CASE WHEN a.field_name = 'address' THEN a.field_value END ) AS address,
MAX( CASE WHEN a.field_name = 'bizOrgCode' THEN a.field_value END ) AS bizOrgCode,
MAX( CASE WHEN a.field_name = 'bizOrgName' THEN a.field_value END ) AS bizOrgName
FROM
`wl_form_instance` a
LEFT JOIN wl_source_scene wlss ON wlss.source_id = a.instance_id
GROUP BY
a.instance_id
) sa
<where>
<if test="parentId != null and parentId !=''">
sa.parentId = #{parentId}
</if>
<if test="bizOrgCode != null and bizOrgCode !=''">
and sa.bizOrgCode LIKE CONCAT(#{bizOrgCode},'%')
</if>
</where>
</select>
</mapper> </mapper>
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