Commit 4fc4df38 authored by KeYong's avatar KeYong

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

parents 62347008 e8e18567
......@@ -8,7 +8,7 @@ public class EquipTrendResultVo {
private List<String> legends;
private String yAxisName;
private List<String> xAxisData;
private List<List<String>> yAxisData;
private List<List<Object>> yAxisData;
private List<List<String>> threshold;
public List<String> getLegends() {
......@@ -35,11 +35,11 @@ public class EquipTrendResultVo {
this.xAxisData = xAxisData;
}
public List<List<String>> getyAxisData() {
public List<List<Object>> getyAxisData() {
return yAxisData;
}
public void setyAxisData(List<List<String>> yAxisData) {
public void setyAxisData(List<List<Object>> yAxisData) {
this.yAxisData = yAxisData;
}
......
......@@ -873,4 +873,27 @@ public class SupervisionConfigureController extends AbstractBaseController {
EquipTrendResultVo equipTrendResultVo = equipmentSpecificService.operatingTrendPressurePump(startTime, endTime, bizOrgCode, equipCode, indexKey);
return CommonResponseUtil.success(equipTrendResultVo);
}
@PersonIdentify
@RequestMapping(value = "/operatingTrendWater", method = RequestMethod.GET)
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(httpMethod = "GET", value = "设备平台运行趋势 水池液位趋势API", produces = "application/json;charset=UTF-8", notes = "设备平台运行趋势 水池液位趋势API")
public ResponseModel operatingTrendWater(@RequestParam(value = "startTime", required = false) String startTime,
@RequestParam(value = "endTime", required = false) String endTime,
@RequestParam(value = "bizOrgCode", required = false) String bizOrgCode,
@RequestParam(value = "equipCode", required = false) String equipCode,
@RequestParam(value = "indexKey", required = false) String indexKey) throws ParseException {
if (ObjectUtils.isEmpty(bizOrgCode)) {
ReginParams reginParams = getSelectedOrgInfo();
ReginParams.PersonIdentity personIdentity = reginParams.getPersonIdentity();
if (!ValidationUtil.isEmpty(personIdentity)) {
bizOrgCode = personIdentity.getBizOrgCode();
if (bizOrgCode == null) {
return CommonResponseUtil.success(null);
}
}
}
EquipTrendResultVo equipTrendResultVo = equipmentSpecificService.operatingTrendWater(startTime, endTime, bizOrgCode, equipCode, indexKey);
return CommonResponseUtil.success(equipTrendResultVo);
}
}
......@@ -75,18 +75,20 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
/**
* 根据画布id获取画布绑定设备最新指标状态
*
* @param sceneId
* @return
*/
List<EquipmentSpecificIndex> getEquipLatestStatusBySceneId(String sceneId);
List<Map<String, Object>> getStatusAll(@Param("sceneId")String sceneId);
List<Map<String, Object>> getStatusAll(@Param("sceneId") String sceneId);
List<String> getEquipmentIotCodeLists();
List<HashMap<String, Object>> getEquipBySourceId(@Param("sourceIds") List<Long> sourceIds, @Param("categoryId") List<Long> categoryId, @Param("equipCode") String equipCode, @Param("equipName") String equipName,@Param("companyId") String companyId,@Param("current") Long current,@Param("size") Long size);
List<HashMap<String, Object>> getEquipBySourceId(@Param("sourceIds") List<Long> sourceIds, @Param("categoryId") List<Long> categoryId, @Param("equipCode") String equipCode, @Param("equipName") String equipName, @Param("companyId") String companyId, @Param("current") Long current, @Param("size") Long size);
int getEquipBySourceIdCount(@Param("sourceIds") List<Long> sourceIds, @Param("categoryId") List<Long> categoryId, @Param("equipCode") String equipCode, @Param("equipName") String equipName,@Param("companyId") String companyId);
int getEquipBySourceIdCount(@Param("sourceIds") List<Long> sourceIds, @Param("categoryId") List<Long> categoryId, @Param("equipCode") String equipCode, @Param("equipName") String equipName, @Param("companyId") String companyId);
List getMenuChildren(@Param("id") Long id);
......@@ -167,18 +169,19 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
List<MaintenanceResourceData> getSysEquipClassifyDataList();
IPage<MaintenanceResourceDataVo> getSysEquipClassifyDataPage(Page page, Long fireFightSysId, String fireFacilityName, String classifyId, Long fireFacilityId, List<Long> buildingId,List<String> bandWbCompany);
IPage<MaintenanceResourceDataVo> getSysEquipClassifyDataPage(Page page, Long fireFightSysId, String fireFacilityName, String classifyId, Long fireFacilityId, List<Long> buildingId, List<String> bandWbCompany);
IPage<MaintenanceResourceDataVo> getEquipClassifyDataPage(Page page, Long fireFightSysId, String fireFacilityName, String classifyId, Long fireFacilityId, List<Long> buildingId,List<String> bandWbCompany);
IPage<MaintenanceResourceDataVo> getEquipClassifyDataPage(Page page, Long fireFightSysId, String fireFacilityName, String classifyId, Long fireFacilityId, List<Long> buildingId, List<String> bandWbCompany);
List<UserDto> getEquipSpecificLocationInfo(Long equipmentSpecificId, String[] fieldName);
Map<String,Double> getEquipLocationInfo(Long equipmentSpecificId);
Map<String, Double> getEquipLocationInfo(Long equipmentSpecificId);
Map<String, Object> getEquipSpeInfo(@Param("equipmentSpecificId") Long equipmentSpecificId);
/**
* 根据specificId删除装备相关数据
*
* @param specificId specificId
*/
// void deleteEquipDataBySpecificId(@Param("specificId") Long specificId, @Param("equipDetailId") Long equipDetailId);
......@@ -202,31 +205,36 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
/**
* 根据库存id删除装备相关库存数据
*
* @param stockDetailId 库存明细id
* @param specificId specificId
* @param specificId specificId
*/
void deleteEquipDataByStockDetailId(@Param("stockDetailId") Long stockDetailId, @Param("specificId") Long specificId);
/**
* 获取雨淋阀室指标详情
*
* @return 指标详情
*/
List<Map<String, String>> getRainRoomIndexDetails();
/**
* 消防管网指标详情
*
* @return 指标详情
*/
List<Map<String, String>> getTropicsIndexDetails();
/**
* 选择阀室指标详情
*
* @return 指标详情
*/
List<Map<String, String>> getChoiceRoomIndexDetails();
/**
* 消防炮伴热带指标详情
*
* @return 指标详情
*/
List<Map<String, String>> getBoxTropicsIndexDetails();
......@@ -234,6 +242,7 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
/**
* 统计数据
*
* @return
*/
List<Map<String, Object>> queryCompanyStaData();
......@@ -241,21 +250,21 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
Equipment getEquipmentBySpecificId(@Param("specificId") Long specificId);
/**
*
* @param floorId 建筑id
* @param isIot 是否物联设备
* @param isIot 是否物联设备
* @return
*/
List<EquiplistSpecificBySystemVO> getListByWarehouseStructureId(Long floorId, Integer isIot);
List<Map<String,String>> getStationInfo();
List<Map<String, String>> getStationInfo();
List<Map<String, Object>> getFireMonitorInfo(@Param("equipmentId") Long fireEquipmentId, @Param("list") String[] strings);
List<Map<String, Object>> getFirePumpInfo(@Param("list") String[] strings,@Param("bizOrgCode") String bizOrgCode);
List<Map<String, Object>> getFirePumpInfoEQ(@Param("list") String[] strings,@Param("bizOrgCode") String bizOrgCode);
List<Map<String, Object>> getFirePumpInfo(@Param("list") String[] strings, @Param("bizOrgCode") String bizOrgCode);
List<Map<String, Object>> getFirePumpInfoEQ(@Param("list") String[] strings, @Param("bizOrgCode") String bizOrgCode);
List<Map<String, Object>> getListByEquipmentCode(@Param("list") String[] strings, @Param("bizOrgCode") String bizOrgCode);
......@@ -264,7 +273,7 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
List<Map<String, Object>> normalIndexInfoList(@Param("startDate") String startDate, @Param("endDate") String endDate);
Page<Map<String, Object>> normalIndexInfoListByPage(@Param("Page")Page<Map<String, Object>> page, @Param("startDate") String startDate, @Param("endDate") String endDate, @Param("systemCode") String systemCode, @Param("name") String name);
Page<Map<String, Object>> normalIndexInfoListByPage(@Param("Page") Page<Map<String, Object>> page, @Param("startDate") String startDate, @Param("endDate") String endDate, @Param("systemCode") String systemCode, @Param("name") String name);
Map<String, Object> getFireAutoSysInfo();
......@@ -280,11 +289,11 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
List<Map> getWater(@Param("id") Long id);
Map<String, Object> getStationCode(@Param("id")Long id);
Map<String, Object> getStationCode(@Param("id") Long id);
EquipmentSpecific getEquipSpecificEntityByCode(@Param("code") String code);
Integer updateEquipSpecificStatus(String status,String id);
Integer updateEquipSpecificStatus(String status, String id);
String getEquipStatusList(@Param("id") String id);
......@@ -298,15 +307,15 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
String updateEquipSpecificStatusByCheckInput(String id);
Page<Map<String,Object>> selectListByPatrolCheck(Page<Map<String,Object>> page, String id);
Page<Map<String, Object>> selectListByPatrolCheck(Page<Map<String, Object>> page, String id);
List<String> selectIdsByPatrolCheck(String id);
List<Map<String, Object>> queryCheckInputItemsByCheckId(@Param(value="checkId") String checkId);
List<Map<String, Object>> queryCheckInputItemsByCheckId(@Param(value = "checkId") String checkId);
Map<String, Object> getPointById(@Param(value = "pointId") Long id);
Map<String, Object> getPointById(@Param(value = "pointId") Long id);
Map<String, Object> getPatrolData(@Param(value = "checkId") Long checkId);
Map<String, Object> getPatrolData(@Param(value = "checkId") Long checkId);
List<Map<String, Object>> getListByIds(@Param("list") String[] list, @Param("bizOrgCode") String bizOrgCode);
......@@ -318,9 +327,9 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
@Param("useSource") String useSource
);
List<Map<String, Object >> getMonitoringCount(String bizOrgCode);
List<Map<String, Object>> getMonitoringCount(String bizOrgCode);
String getEquipIdByCheckInputId(@Param(value = "id") String id);
String getEquipIdByCheckInputId(@Param(value = "id") String id);
Map<String, Object> getMonitoringEquip(String id);
......@@ -328,7 +337,7 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
void updateEquipQrCode(List<String> ids, String status);
String selectEquipRealtimeSignal(@Param(value = "id") long id);
String selectEquipRealtimeSignal(@Param(value = "id") long id);
List<Map<String, Object>> getPatrolInfo(String bizOrgCode);
......@@ -347,4 +356,10 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
Integer selectEquipmentCountBySystemId(@Param("systemId") Long systemId);
List<EquipTrendInfoVo> getEquipListByCode(@Param("code") String code, @Param("indexKey") String indexKey, @Param("bizOrgCode") String bizOrgCode);
List<EquipTrendInfoVo> getWaterList(@Param("bizOrgCode") String bizOrgCode);
List<Map<String, String>> getIndexKeyByIotCode(@Param("list") Set<String> list);
List<Map<String, String>> getIndexKeyByIotCodeWaterTank(@Param("list") Set<String> list);
}
......@@ -334,4 +334,6 @@ public interface IEquipmentSpecificSerivce extends IService<EquipmentSpecific> {
EquipTrendResultVo operatingTrendIot(String startTime, String endTime, String bizOrgCode, String equipCode, String indexKey);
EquipTrendResultVo operatingTrendPressurePump(String startTime, String endTime, String bizOrgCode, String equipCode, String indexKey) throws ParseException;
EquipTrendResultVo operatingTrendWater(String startTime, String endTime, String bizOrgCode, String equipCode, String indexKey) throws ParseException;
}
......@@ -235,12 +235,12 @@ public class FireFightingSystemGroupServiceImpl extends ServiceImpl<FireFighting
}
}
// 查询装备定义的图片 List to Map -> key: systemId@equipmentId, value: 装备定义数量Map
// 查询装备定义的图片 List to Map -> key: equipmentId, value: equipmentEntity
Set<Long> equipmentIds = systemEquipmentMap.values().stream().flatMap(list -> list.stream().map(SystemEquipmentRelationEntity::getEquipmentId)).collect(Collectors.toSet());
Map<Long, Equipment> equipmentImageMap = equipmentService.list(
Wrappers.<Equipment>lambdaQuery()
.select(Equipment::getId, Equipment::getShbzImg, Equipment::getImg)
.in(Equipment::getId, equipmentIds)
.in(!equipmentIds.isEmpty(), Equipment::getId, equipmentIds)
).stream().map(equipmentEntity -> new HashMap<Long, Equipment>() {{
put(equipmentEntity.getId(), equipmentEntity);
}}).collect(Collectors.toMap(map -> map.keySet().iterator().next(), map -> map.values().iterator().next()));
......
......@@ -3034,4 +3034,67 @@
GROUP BY
a.id
</select>
<select id="getWaterList" resultType="com.yeejoin.equipmanage.common.entity.vo.EquipTrendInfoVo">
SELECT
a.sequence_nbr AS id,
a.`name` AS `name`,
GROUP_CONCAT( c.iot_code ) AS iotCode,
b.min_water_level AS minNum,
b.max_water_level AS maxNum,
'液位(M)' AS unit
FROM
`cb_water_resource` AS a
LEFT JOIN cb_water_resource_pool b ON a.sequence_nbr = b.resource_id
LEFT JOIN wl_equipment_specific c ON FIND_IN_SET( c.id, b.level_device_id )
WHERE
b.level_device_id IS NOT NULL
AND b.level_device_id != ''
AND a.resource_type IN ( 'pool', 'industryPool' )
<if test="bizOrgCode != null and bizOrgCode != ''">
AND a.biz_org_code LIKE concat(#{bizOrgCode}, '%')
</if>
GROUP BY
a.sequence_nbr
HAVING
iotCode IS NOT NULL
AND iotCode != ''
</select>
<select id="getIndexKeyByIotCode" resultType="java.util.Map">
SELECT
a.iot_code as iotCode,
max(case when b.type_code = 'LiquidLevel' then equipment_index_key end) as indexKey
FROM
wl_equipment_specific a
LEFT JOIN wl_equipment_specific_index b ON a.id = b.equipment_specific_id
WHERE
a.iot_code
IN
<foreach item="item" collection="list" separator="," open="(" close=")" index="">
#{item}
</foreach>
GROUP BY
a.iot_code
</select>
<select id="getIndexKeyByIotCodeWaterTank" resultType="java.util.Map">
SELECT
a.iot_code AS iotCode,
GROUP_CONCAT( b.equipment_index_key ) AS indexKey
FROM
wl_equipment_specific a
LEFT JOIN ( SELECT * FROM wl_equipment_specific_index WHERE type_code = 'LiquidLevel' ) b ON a.id = b.equipment_specific_id
WHERE
a.iot_code IN
<foreach item="item" collection="list" separator="," open="(" close=")" index="">
#{item}
</foreach>
GROUP BY
a.iot_code
HAVING
indexKey IS NOT NULL
AND indexKey != ''
</select>
</mapper>
\ No newline at end of file
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