高低电压穿越相关接口走算法模块
This commit is contained in:
@@ -21,7 +21,7 @@ public interface DeptLineFeignClient {
|
||||
HttpResult<List<String>> getLineByDeptId(@RequestParam("id")String id);
|
||||
|
||||
@PostMapping("/getLineByDeptIdAndNewStation")
|
||||
HttpResult<List<String>> getLineByDeptIdAndNewStation(@RequestParam("id")String id,@RequestParam("type")String type);
|
||||
HttpResult<List<String>> getLineByDeptIdAndNewStation(@RequestParam("id")String id);
|
||||
|
||||
@PostMapping("/selectDeptBindLines")
|
||||
HttpResult<Boolean> selectDeptBindLines(@RequestParam("ids") List<String> ids);
|
||||
|
||||
@@ -40,7 +40,7 @@ public class DeptLineFeignClientFallbackFactory implements FallbackFactory<DeptL
|
||||
}
|
||||
|
||||
@Override
|
||||
public HttpResult<List<String>> getLineByDeptIdAndNewStation(String id, String type) {
|
||||
public HttpResult<List<String>> getLineByDeptIdAndNewStation(String id) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "根据部门id获取绑定的监测点且再根据NewStation进行过滤", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ public class NewStationClientFallbackFactory implements FallbackFactory<NewStati
|
||||
return new NewStationClient() {
|
||||
@Override
|
||||
public HttpResult<NewStation> selectById(String id) {
|
||||
log.error("{}异常,降级处理,异常为:{}", "获取终获取告警策略列表", throwable.toString());
|
||||
log.error("{}异常,降级处理,异常为:{}", "根据ID获取新能源场站高低电压穿越表信息", throwable.toString());
|
||||
throw new BusinessException(finalExceptionEnum);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -21,4 +21,14 @@ public interface Param {
|
||||
Integer WEEK = 4;
|
||||
Integer DAY = 5;
|
||||
|
||||
//以下四个固定ID用于某些业务判断
|
||||
//字典(sys_dict_data):电压暂升的ID
|
||||
String UPPEREVENT = "c5ce588cb76fba90c4519ab250c962d0";
|
||||
//字典(sys_dict_data):电压暂降的ID
|
||||
String LOWEREVENT = "c37861896dafab0883321e1d508caa51";
|
||||
//字典(sys_dict_data):光伏电站的ID
|
||||
String PHOTOVOLTAICPOWER = "45615057cb88650ffc4779b0629bac7e";
|
||||
//字典(sys_dict_data):风电场的ID
|
||||
String WINDFARM = "f9145acb79cbf136b9ee89fd38d72583";
|
||||
|
||||
}
|
||||
|
||||
@@ -115,9 +115,9 @@ public class DeptLineController extends BaseController {
|
||||
@OperateInfo(info = LogEnum.SYSTEM_COMMON)
|
||||
@PostMapping("/getLineByDeptIdAndNewStation")
|
||||
@ApiOperation("根据部门id获取绑定的监测点且再根据NewStation进行过滤")
|
||||
public HttpResult<List<String>> getLineByDeptIdAndNewStation(@RequestParam("id") String id,@RequestParam("type")String type) {
|
||||
public HttpResult<List<String>> getLineByDeptIdAndNewStation(@RequestParam("id") String id) {
|
||||
String methodDescribe = getMethodDescribe("getLineByDeptIdAndNewStation");
|
||||
List<String> list = deptLineService.getLineByDeptIdAndNewStation(id,type);
|
||||
List<String> list = deptLineService.getLineByDeptIdAndNewStation(id);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, list, methodDescribe);
|
||||
}
|
||||
|
||||
|
||||
@@ -83,5 +83,5 @@ public interface DeptLineMapper extends BaseMapper<DeptLine> {
|
||||
|
||||
List<SubGetBase> selectSubStationList(@Param("param") SubstationParam substationParam);
|
||||
|
||||
List<String> getLineByDeptIdAndNewStation(@Param("id") String id,@Param("stationType") String stationType);
|
||||
List<String> getLineByDeptIdAndNewStation(@Param("id") String id);
|
||||
}
|
||||
|
||||
@@ -198,6 +198,7 @@
|
||||
<select id="getLineByDeptIdAndNewStation" resultType="string">
|
||||
select pdl.Line_Id from pq_dept_line pdl
|
||||
inner join pq_line_detail pld on pdl.Line_Id = pld.Id
|
||||
where pdl.Id = #{id} and pld.New_Station_Id in (select pns.id from pq_new_station pns where pns.station_type = #{stationType} and pns.state = 1)
|
||||
where pdl.Id = #{id}
|
||||
and exists (select 1 from pq_new_station pns where pns.id = pld.New_Station_Id and pns.state = 1)
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -1432,7 +1432,7 @@
|
||||
pqd.Run_Flag as runFlag,
|
||||
detail.PT_Type AS ptType,
|
||||
detail.PT_Phase_Type AS ptPhaseType,
|
||||
detail.New_Station_Id AS stationType
|
||||
detail.New_Station_Id AS newStationId
|
||||
FROM
|
||||
pq_line line,
|
||||
pq_line_detail detail,
|
||||
|
||||
@@ -73,7 +73,7 @@ public interface DeptLineService extends IService<DeptLine> {
|
||||
* @author guofeihu
|
||||
* @date 2024/8/19
|
||||
*/
|
||||
List<String> getLineByDeptIdAndNewStation(String id,String type);
|
||||
List<String> getLineByDeptIdAndNewStation(String id);
|
||||
|
||||
/**
|
||||
* @Description: 根据部门id获取所有子集部门所包含的部门信息
|
||||
|
||||
@@ -12,7 +12,7 @@ import com.njcn.device.pq.mapper.LineMapper;
|
||||
import com.njcn.device.pq.pojo.po.DeptLine;
|
||||
import com.njcn.device.pq.pojo.vo.LineDeviceStateVO;
|
||||
import com.njcn.device.pq.service.DeptLineService;
|
||||
import com.njcn.event.pojo.constant.Param;
|
||||
import com.njcn.device.pq.constant.Param;
|
||||
import com.njcn.user.api.DeptFeignClient;
|
||||
import com.njcn.user.pojo.dto.DeptDTO;
|
||||
import com.njcn.web.pojo.param.DeptLineParam;
|
||||
@@ -90,10 +90,8 @@ public class DeptLineServiceImpl extends ServiceImpl<DeptLineMapper, DeptLine> i
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getLineByDeptIdAndNewStation(String id, String type) {
|
||||
if("1".equals(type)) type = Param.WINDFARM;
|
||||
if("2".equals(type)) type = Param.PHOTOVOLTAICPOWER;
|
||||
return this.baseMapper.getLineByDeptIdAndNewStation(id,type);
|
||||
public List<String> getLineByDeptIdAndNewStation(String id) {
|
||||
return this.baseMapper.getLineByDeptIdAndNewStation(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user