Commit 5a983b74 authored by 张森's avatar 张森

30546 运行趋势页签接口开发

parent b9ae6138
...@@ -880,7 +880,9 @@ public class SupervisionConfigureController extends AbstractBaseController { ...@@ -880,7 +880,9 @@ public class SupervisionConfigureController extends AbstractBaseController {
@ApiOperation(httpMethod = "GET", value = "设备平台运行趋势 水池液位趋势API", produces = "application/json;charset=UTF-8", notes = "设备平台运行趋势 水池液位趋势API") @ApiOperation(httpMethod = "GET", value = "设备平台运行趋势 水池液位趋势API", produces = "application/json;charset=UTF-8", notes = "设备平台运行趋势 水池液位趋势API")
public ResponseModel operatingTrendWater(@RequestParam(value = "startTime", required = false) String startTime, public ResponseModel operatingTrendWater(@RequestParam(value = "startTime", required = false) String startTime,
@RequestParam(value = "endTime", required = false) String endTime, @RequestParam(value = "endTime", required = false) String endTime,
@RequestParam(value = "bizOrgCode", required = false) String bizOrgCode) throws ParseException { @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)) { if (ObjectUtils.isEmpty(bizOrgCode)) {
ReginParams reginParams = getSelectedOrgInfo(); ReginParams reginParams = getSelectedOrgInfo();
ReginParams.PersonIdentity personIdentity = reginParams.getPersonIdentity(); ReginParams.PersonIdentity personIdentity = reginParams.getPersonIdentity();
...@@ -891,7 +893,7 @@ public class SupervisionConfigureController extends AbstractBaseController { ...@@ -891,7 +893,7 @@ public class SupervisionConfigureController extends AbstractBaseController {
} }
} }
} }
EquipTrendResultVo equipTrendResultVo = equipmentSpecificService.operatingTrendWater(startTime, endTime, bizOrgCode); EquipTrendResultVo equipTrendResultVo = equipmentSpecificService.operatingTrendWater(startTime, endTime, bizOrgCode, equipCode, indexKey);
return CommonResponseUtil.success(equipTrendResultVo); return CommonResponseUtil.success(equipTrendResultVo);
} }
} }
...@@ -360,4 +360,6 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> { ...@@ -360,4 +360,6 @@ public interface EquipmentSpecificMapper extends BaseMapper<EquipmentSpecific> {
List<EquipTrendInfoVo> getWaterList(@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>> getIndexKeyByIotCode(@Param("list") Set<String> list);
List<Map<String, String>> getIndexKeyByIotCodeWaterTank(@Param("list") Set<String> list);
} }
...@@ -335,5 +335,5 @@ public interface IEquipmentSpecificSerivce extends IService<EquipmentSpecific> { ...@@ -335,5 +335,5 @@ public interface IEquipmentSpecificSerivce extends IService<EquipmentSpecific> {
EquipTrendResultVo operatingTrendPressurePump(String startTime, String endTime, String bizOrgCode, String equipCode, String indexKey) throws ParseException; EquipTrendResultVo operatingTrendPressurePump(String startTime, String endTime, String bizOrgCode, String equipCode, String indexKey) throws ParseException;
EquipTrendResultVo operatingTrendWater(String startTime, String endTime, String bizOrgCode) throws ParseException; EquipTrendResultVo operatingTrendWater(String startTime, String endTime, String bizOrgCode, String equipCode, String indexKey) throws ParseException;
} }
...@@ -3078,4 +3078,23 @@ ...@@ -3078,4 +3078,23 @@
GROUP BY GROUP BY
a.iot_code a.iot_code
</select> </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> </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