站点配置-获取站点列表
This commit is contained in:
@ -0,0 +1,38 @@
|
|||||||
|
package com.xzzn.web.controller.ems;
|
||||||
|
|
||||||
|
import com.xzzn.common.core.controller.BaseController;
|
||||||
|
import com.xzzn.common.core.page.TableDataInfo;
|
||||||
|
import com.xzzn.ems.domain.EmsSiteSetting;
|
||||||
|
import com.xzzn.ems.service.IEmsSiteService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* 站点配置
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/ems/siteConfig")
|
||||||
|
public class EmsSiteConfigController extends BaseController{
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IEmsSiteService iEmsSiteService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取站点列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/getSiteInfoList")
|
||||||
|
public TableDataInfo getSiteInfoList(@RequestParam String siteName, @RequestParam String startTime, @RequestParam String endTime)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<EmsSiteSetting> list = iEmsSiteService.getAllSiteInfoList(siteName,startTime,endTime);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -30,8 +30,8 @@ public class EmsSiteSetting extends BaseEntity
|
|||||||
private String siteAddress;
|
private String siteAddress;
|
||||||
|
|
||||||
/** 运营时间 */
|
/** 运营时间 */
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@Excel(name = "运营时间", width = 30, dateFormat = "yyyy-MM-dd")
|
@Excel(name = "运营时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date runningTime;
|
private Date runningTime;
|
||||||
|
|
||||||
/** 纬度 */
|
/** 纬度 */
|
||||||
|
@ -3,6 +3,7 @@ package com.xzzn.ems.mapper;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.xzzn.ems.domain.EmsSiteSetting;
|
import com.xzzn.ems.domain.EmsSiteSetting;
|
||||||
import com.xzzn.ems.domain.vo.SiteTotalInfoVo;
|
import com.xzzn.ems.domain.vo.SiteTotalInfoVo;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 站点Mapper接口
|
* 站点Mapper接口
|
||||||
@ -72,4 +73,14 @@ public interface EmsSiteSettingMapper
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public EmsSiteSetting selectEmsSiteSettingBySiteId(String siteId);
|
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);
|
||||||
}
|
}
|
||||||
|
@ -23,4 +23,5 @@ public interface IEmsSiteService
|
|||||||
public List<Map<String,Object>> getAllClusterInfo(String stackDeviceId);
|
public List<Map<String,Object>> getAllClusterInfo(String stackDeviceId);
|
||||||
|
|
||||||
|
|
||||||
|
public List<EmsSiteSetting> getAllSiteInfoList(String siteName, String startTime, String endTime);
|
||||||
}
|
}
|
||||||
|
@ -55,4 +55,16 @@ public class EmsSiteServiceImpl implements IEmsSiteService
|
|||||||
return emsDevicesMapper.getDeviceInfoByParentId(parentId);
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -120,4 +120,16 @@
|
|||||||
<include refid="selectEmsSiteSettingVo"/>
|
<include refid="selectEmsSiteSettingVo"/>
|
||||||
where site_id = #{siteId}
|
where site_id = #{siteId}
|
||||||
</select>
|
</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 >= STR_TO_DATE( #{startTime}, '%Y-%m-%d')
|
||||||
|
AND running_time < DATE_ADD(STR_TO_DATE( #{endTime}, '%Y-%m-%d'), INTERVAL 1 DAY)
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
Reference in New Issue
Block a user