站点配置-获取站点列表

This commit is contained in:
2025-07-02 19:43:17 +08:00
parent b4302edd8a
commit 7964806b94
6 changed files with 76 additions and 2 deletions

View File

@ -30,8 +30,8 @@ public class EmsSiteSetting extends BaseEntity
private String siteAddress;
/** 运营时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "运营时间", width = 30, dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "运营时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date runningTime;
/** 纬度 */

View File

@ -3,6 +3,7 @@ package com.xzzn.ems.mapper;
import java.util.List;
import com.xzzn.ems.domain.EmsSiteSetting;
import com.xzzn.ems.domain.vo.SiteTotalInfoVo;
import org.apache.ibatis.annotations.Param;
/**
* 站点Mapper接口
@ -72,4 +73,14 @@ public interface EmsSiteSettingMapper
* @return
*/
public EmsSiteSetting selectEmsSiteSettingBySiteId(String siteId);
/**
* 根据站点名称和投运时间获取站点列表
* @param siteName
* @param startTime
* @param endTime
* @return
*/
public List<EmsSiteSetting> getSiteInfoList(@Param("siteName")String siteName, @Param("startTime")String startTime, @Param("endTime")String endTime);
}

View File

@ -23,4 +23,5 @@ public interface IEmsSiteService
public List<Map<String,Object>> getAllClusterInfo(String stackDeviceId);
public List<EmsSiteSetting> getAllSiteInfoList(String siteName, String startTime, String endTime);
}

View File

@ -55,4 +55,16 @@ public class EmsSiteServiceImpl implements IEmsSiteService
return emsDevicesMapper.getDeviceInfoByParentId(parentId);
}
/**
* 获取站点列表
* @param siteName
* @param startTime
* @param endTime
* @return
*/
@Override
public List<EmsSiteSetting> getAllSiteInfoList(String siteName, String startTime, String endTime) {
return emsSiteMapper.getSiteInfoList(siteName,startTime,endTime);
}
}

View File

@ -120,4 +120,16 @@
<include refid="selectEmsSiteSettingVo"/>
where site_id = #{siteId}
</select>
<select id="getSiteInfoList" resultMap="EmsSiteSettingResult">
<include refid="selectEmsSiteSettingVo"/>
WHERE 1=1
<if test="siteName != null and siteName != ''">
AND site_name LIKE CONCAT('%', #{siteName}, '%')
</if>
<if test="startTime != null and startTime != null and endTime != null and endTime != ''">
AND running_time &gt;= STR_TO_DATE( #{startTime}, '%Y-%m-%d')
AND running_time &lt; DATE_ADD(STR_TO_DATE( #{endTime}, '%Y-%m-%d'), INTERVAL 1 DAY)
</if>
</select>
</mapper>