代码调整
This commit is contained in:
@@ -400,4 +400,23 @@ public class LineController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, resList, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/getLineCountBySubstation")
|
||||
@ApiOperation("获取变电站下监测点数")
|
||||
@ApiImplicitParam(name = "subIndex", value = "数据类型(0:暂态系统;1:稳态系统;)", required = true)
|
||||
public HttpResult<Integer> getLineCountBySubstation(@RequestParam("subIndex") String subIndex) {
|
||||
String methodDescribe = getMethodDescribe("getLineBySubstationRelation");
|
||||
Integer count = lineService.getLineCountBySubstation(subIndex);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, count, methodDescribe);
|
||||
}
|
||||
|
||||
@PostMapping("/getDeviceCountBySubstation")
|
||||
@ApiOperation("获取变电站下终端数")
|
||||
@ApiImplicitParam(name = "subIndex", value = "数据类型(0:暂态系统;1:稳态系统;)", required = true)
|
||||
public HttpResult<Integer> getDeviceCountBySubstation(@RequestParam("subIndex") String subIndex) {
|
||||
String methodDescribe = getMethodDescribe("getDeviceCountBySubstation");
|
||||
Integer count = lineService.getDeviceCountBySubstation(subIndex);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, count, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.device.pq.pojo.po.LineDetail;
|
||||
import com.njcn.device.pq.pojo.vo.LineDetailDataVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -41,5 +42,9 @@ public interface LineDetailMapper extends BaseMapper<LineDetail> {
|
||||
* @return 结果
|
||||
*/
|
||||
List<LineDetailDataVO> getLineDetailInfo(@Param("lineIds") List<String> lineIds);
|
||||
@Select ("select count(1) from pq_line a where a.`Level`=4 and SUBSTRING_INDEX(SUBSTRING_INDEX(a.Pids, ',', 4),',',-1)=#{subIndex}")
|
||||
Integer getDeviceCountBySubstation(@Param("subIndex")String subIndex);
|
||||
|
||||
@Select ("select count(1) from pq_line a where a.`Level`=6 and SUBSTRING_INDEX(SUBSTRING_INDEX(a.Pids, ',', 4),',',-1)=#{subIndex}")
|
||||
Integer getLineCountBySubstation(@Param("subIndex")String subIndex);
|
||||
}
|
||||
|
||||
@@ -176,4 +176,20 @@ public interface LineService {
|
||||
* @date 2022/10/26
|
||||
*/
|
||||
List<LineDetailDataVO> getLineDetailList(List<String> lineIds);
|
||||
/**
|
||||
* @Description: 获取变电站下终端数
|
||||
* @Param: [subIndex]
|
||||
* @return: java.lang.Integer
|
||||
* @Author: clam
|
||||
* @Date: 2022/11/9
|
||||
*/
|
||||
Integer getDeviceCountBySubstation(String subIndex);
|
||||
/**
|
||||
* @Description: 获取变电站下监测点数
|
||||
* @Param: [subIndex]
|
||||
* @return: java.lang.Integer
|
||||
* @Author: clam
|
||||
* @Date: 2022/11/9
|
||||
*/
|
||||
Integer getLineCountBySubstation(String subIndex);
|
||||
}
|
||||
|
||||
@@ -801,6 +801,38 @@ public class LineServiceImpl extends ServiceImpl<LineMapper, Line> implements Li
|
||||
return lineDetailMapper.getLineDetailInfo(lineIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param subIndex
|
||||
* @Description: 获取变电站下终端数
|
||||
* @Param: [subIndex]
|
||||
* @return: java.lang.Integer
|
||||
* @Author: clam
|
||||
* @Date: 2022/11/9
|
||||
*/
|
||||
@Override
|
||||
public Integer getDeviceCountBySubstation(String subIndex) {
|
||||
|
||||
Integer count = lineDetailMapper.getDeviceCountBySubstation(subIndex);
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param subIndex
|
||||
* @Description: 获取变电站下监测点数
|
||||
* @Param: [subIndex]
|
||||
* @return: java.lang.Integer
|
||||
* @Author: clam
|
||||
* @Date: 2022/11/9
|
||||
*/
|
||||
@Override
|
||||
public Integer getLineCountBySubstation(String subIndex) {
|
||||
|
||||
Integer count = lineDetailMapper.getLineCountBySubstation(subIndex);
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据用户选择的时间区间返回月份日期
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user