首页接口

This commit is contained in:
cwchen 2024-07-30 15:17:07 +08:00
parent 4c23282495
commit 94f0251ca0
5 changed files with 23 additions and 1 deletions

View File

@ -88,6 +88,7 @@ public interface IndexMapper {
/** /**
* 当天本周本月 单钩双钩告警数量 * 当天本周本月 单钩双钩告警数量
*
* @param dto * @param dto
* @return List<Integer> * @return List<Integer>
* @author cwchen * @author cwchen
@ -97,10 +98,19 @@ public interface IndexMapper {
/** /**
* 告警列表 * 告警列表
*
* @param dto * @param dto
* @return List<WarnInfoVo> * @return List<WarnInfoVo>
* @author cwchen * @author cwchen
* @date 2024/7/30 9:57 * @date 2024/7/30 9:57
*/ */
List<WarnInfoVo> getWarns(ParamsDto dto); List<WarnInfoVo> getWarns(ParamsDto dto);
/**
* 获取安全带绑定球机设备的PUID
* @return List<String>
* @author cwchen
* @date 2024/7/30 13:24
*/
List<String> getDevicePuids();
} }

View File

@ -75,6 +75,11 @@ public class DeviceInfoVo {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date devTime; private Date devTime;
/**
* 在线时长
*/
private String onlineTime;
/** /**
* 查询条件限制 * 查询条件限制
*/ */

View File

@ -66,6 +66,7 @@ public interface IndexService {
/** /**
* 设备分析 * 设备分析
*
* @param data * @param data
* @return ServerResponse * @return ServerResponse
* @author cwchen * @author cwchen
@ -76,10 +77,12 @@ public interface IndexService {
/** /**
* 查询告警列表 * 查询告警列表
*
* @param data * @param data
* @return PageInfo<WarnInfoVo> * @return PageInfo<WarnInfoVo>
* @author cwchen * @author cwchen
* @date 2024/7/30 9:55 * @date 2024/7/30 9:55
*/ */
PageInfo<WarnInfoVo> getWarns(ParamsDto data); PageInfo<WarnInfoVo> getWarns(ParamsDto data);
} }

View File

@ -20,7 +20,6 @@ import org.springframework.transaction.interceptor.TransactionAspectSupport;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -164,4 +163,5 @@ public class IndexServiceImpl implements IndexService {
PageInfo<WarnInfoVo> pageInfo = new PageInfo<>(list); PageInfo<WarnInfoVo> pageInfo = new PageInfo<>(list);
return pageInfo; return pageInfo;
} }
} }

View File

@ -137,5 +137,9 @@
</where> </where>
ORDER BY tw.warn_time DESC ORDER BY tw.warn_time DESC
</select> </select>
<!--获取安全带绑定球机设备的PUID-->
<select id="getDevicePuids" resultType="java.lang.String">
SELECT DISTINCT puid FROM tb_device WHERE del_flag = 0
</select>
</mapper> </mapper>