代码调整
This commit is contained in:
@@ -277,5 +277,24 @@ public interface LineFeignClient {
|
||||
@PostMapping("getLineDetailList")
|
||||
HttpResult<List<LineDetailDataVO>> getLineDetailList(@RequestBody List<String> lineIds);
|
||||
|
||||
|
||||
/**
|
||||
* @param subIndex
|
||||
* @Description: 获取变电站下终端数
|
||||
* @Param: [subIndex]
|
||||
* @return: java.lang.Integer
|
||||
* @Author: clam
|
||||
* @Date: 2022/11/9
|
||||
*/
|
||||
@PostMapping("/getDeviceCountBySubstation")
|
||||
HttpResult<Integer> getDeviceCountBySubstation(@RequestParam("subIndex") String subIndex);
|
||||
/**
|
||||
* @param subIndex
|
||||
* @Description: 获取变电站下监测点数
|
||||
* @Param: [subIndex]
|
||||
* @return: java.lang.Integer
|
||||
* @Author: clam
|
||||
* @Date: 2022/11/9
|
||||
*/
|
||||
@PostMapping("/getLineCountBySubstation")
|
||||
HttpResult<Integer> getLineCountBySubstation(@RequestParam("subIndex") String subIndex);
|
||||
}
|
||||
|
||||
@@ -207,6 +207,18 @@ public class LineFeignClientFallbackFactory implements FallbackFactory<LineFeign
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<Integer> getDeviceCountBySubstation(@RequestParam("subIndex") String subIndex){
|
||||
log.error("{}异常,降级处理,异常为:{}", "获取变电站下终端数: ", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<Integer> getLineCountBySubstation(@RequestParam("subIndex") String subIndex) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "获取变电站下监测点数: ", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -139,6 +139,9 @@ public class DeviceInfoParam implements Serializable {
|
||||
@ApiModelProperty("时间范围标志 0.查询展示天 1.查询展示月")
|
||||
private Integer timeFlag;
|
||||
|
||||
@ApiModelProperty("报表统计类型 1.年 2.季 3.月 4.周 5.天")
|
||||
private String reportFlag;
|
||||
|
||||
}
|
||||
|
||||
@Data
|
||||
|
||||
@@ -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