冀北监测点试运行功能调整
This commit is contained in:
@@ -20,4 +20,7 @@ public interface TempLineRunTestFeignClient {
|
|||||||
@GetMapping("/updateStatus")
|
@GetMapping("/updateStatus")
|
||||||
HttpResult<Object> updateStatus(@RequestParam("businessKey") String businessKey, @RequestParam("status")Integer status);
|
HttpResult<Object> updateStatus(@RequestParam("businessKey") String businessKey, @RequestParam("status")Integer status);
|
||||||
|
|
||||||
|
@GetMapping("/isTestRunStartOrEnd")
|
||||||
|
void isTestRunStartOrEnd();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,6 +33,12 @@ public class TempLineRunTestFeignClientFallbackFactory implements FallbackFactor
|
|||||||
log.error("{}异常,降级处理,异常为:{}", "更新流程状态", throwable.toString());
|
log.error("{}异常,降级处理,异常为:{}", "更新流程状态", throwable.toString());
|
||||||
throw new BusinessException(finalExceptionEnum);
|
throw new BusinessException(finalExceptionEnum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void isTestRunStartOrEnd() {
|
||||||
|
log.error("{}异常,降级处理,异常为:{}", "定时判断试运行是否结束", throwable.toString());
|
||||||
|
throw new BusinessException(finalExceptionEnum);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -160,4 +160,12 @@ public class SupervisionDevMainReportVO {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private String substation;
|
||||||
|
|
||||||
|
private String monitoringTerminalCode;
|
||||||
|
|
||||||
|
private String monitoringTerminalName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -54,11 +54,8 @@ public class SupervisionTempLineRunTestController extends BaseController {
|
|||||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||||
@GetMapping("/isTestRunStartOrEnd")
|
@GetMapping("/isTestRunStartOrEnd")
|
||||||
@ApiOperation("每日判断试运行是否结束")
|
@ApiOperation("每日判断试运行是否结束")
|
||||||
public HttpResult<Object> isTestRunStartOrEnd(){
|
public void isTestRunStartOrEnd(){
|
||||||
String methodDescribe = getMethodDescribe("isTestRunStartOrEnd");
|
|
||||||
iSupervisionTempLineRunTestService.isTestRunStartOrEnd();
|
iSupervisionTempLineRunTestService.isTestRunStartOrEnd();
|
||||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, true, methodDescribe);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -38,8 +38,10 @@
|
|||||||
|
|
||||||
<select id="page" resultType="com.njcn.supervision.pojo.vo.device.SupervisionDevMainReportVO">
|
<select id="page" resultType="com.njcn.supervision.pojo.vo.device.SupervisionDevMainReportVO">
|
||||||
SELECT
|
SELECT
|
||||||
*
|
supervision_dev_main_report.*,station.name substation,dev.monitoring_terminal_code,dev.monitoring_terminal_name
|
||||||
FROM supervision_dev_main_report supervision_dev_main_report
|
FROM supervision_dev_main_report supervision_dev_main_report
|
||||||
|
left join supervision_temp_device_report dev on supervision_dev_main_report.id = dev.id
|
||||||
|
left join pq_Line station on dev.substation = station.id
|
||||||
WHERE ${ew.sqlSegment}
|
WHERE ${ew.sqlSegment}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,10 @@
|
|||||||
supervision_temp_line_report.Power_Substation_Name,
|
supervision_temp_line_report.Power_Substation_Name,
|
||||||
supervision_temp_line_report.line_id lineId,
|
supervision_temp_line_report.line_id lineId,
|
||||||
supervision_temp_line_report.line_name lineName,
|
supervision_temp_line_report.line_name lineName,
|
||||||
|
supervision_temp_line_report.connected_bus,
|
||||||
|
supervision_temp_line_report.monitoring_terminal_code,
|
||||||
|
supervision_temp_line_report.monitoring_terminal_name,
|
||||||
|
supervision_temp_line_report.Power_Substation_Name,
|
||||||
supervision_temp_line_debug.reason reason,
|
supervision_temp_line_debug.reason reason,
|
||||||
supervision_temp_line_debug.process_instance_id process_instanceId,
|
supervision_temp_line_debug.process_instance_id process_instanceId,
|
||||||
supervision_temp_line_debug.`status` `Status`
|
supervision_temp_line_debug.`status` `Status`
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import com.njcn.bpm.api.BpmProcessFeignClient;
|
|||||||
import com.njcn.bpm.enums.BpmProcessInstanceStatusEnum;
|
import com.njcn.bpm.enums.BpmProcessInstanceStatusEnum;
|
||||||
import com.njcn.bpm.pojo.dto.BpmProcessInstanceCreateReqDTO;
|
import com.njcn.bpm.pojo.dto.BpmProcessInstanceCreateReqDTO;
|
||||||
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||||
|
import com.njcn.common.pojo.enums.response.CommonResponseEnum;
|
||||||
import com.njcn.common.pojo.exception.BusinessException;
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
import com.njcn.device.biz.commApi.CommLineClient;
|
import com.njcn.device.biz.commApi.CommLineClient;
|
||||||
import com.njcn.device.biz.enums.RunFlagEnum;
|
import com.njcn.device.biz.enums.RunFlagEnum;
|
||||||
@@ -71,7 +72,7 @@ public class SupervisionTempLineRunTestServiceImpl extends ServiceImpl<Supervisi
|
|||||||
|
|
||||||
List<LineDTO> lineDTOList = commLineClient.getLineDetailBatch(lineIds).getData();
|
List<LineDTO> lineDTOList = commLineClient.getLineDetailBatch(lineIds).getData();
|
||||||
if(lineIds.size()!=lineDTOList.size()){
|
if(lineIds.size()!=lineDTOList.size()){
|
||||||
throw new BusinessException("请联系管理员检查监测点唯一编号是否匹配");
|
throw new BusinessException(CommonResponseEnum.FAIL,"请联系管理员检查监测点唯一编号是否匹配");
|
||||||
}
|
}
|
||||||
|
|
||||||
//校验
|
//校验
|
||||||
@@ -103,7 +104,6 @@ public class SupervisionTempLineRunTestServiceImpl extends ServiceImpl<Supervisi
|
|||||||
@Override
|
@Override
|
||||||
public void isTestRunStartOrEnd() {
|
public void isTestRunStartOrEnd() {
|
||||||
LocalDateTime time = LocalDateTime.now();
|
LocalDateTime time = LocalDateTime.now();
|
||||||
|
|
||||||
LambdaQueryWrapper<SupervisionTempLineRunTestPO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<SupervisionTempLineRunTestPO> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
lambdaQueryWrapper.eq(SupervisionTempLineRunTestPO::getTestRunState,1).eq(SupervisionTempLineRunTestPO::getState,DataStateEnum.ENABLE.getCode());
|
lambdaQueryWrapper.eq(SupervisionTempLineRunTestPO::getTestRunState,1).eq(SupervisionTempLineRunTestPO::getState,DataStateEnum.ENABLE.getCode());
|
||||||
List<SupervisionTempLineRunTestPO> supervisionTempLineRunTestPOList = this.list(lambdaQueryWrapper);
|
List<SupervisionTempLineRunTestPO> supervisionTempLineRunTestPOList = this.list(lambdaQueryWrapper);
|
||||||
|
|||||||
@@ -31,6 +31,12 @@
|
|||||||
<artifactId>user-api</artifactId>
|
<artifactId>user-api</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.njcn</groupId>
|
||||||
|
<artifactId>supervision-api</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.njcn</groupId>
|
<groupId>com.njcn</groupId>
|
||||||
<artifactId>common-web</artifactId>
|
<artifactId>common-web</artifactId>
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package com.njcn.system.timer.tasks;
|
||||||
|
|
||||||
|
import com.njcn.supervision.api.TempLineRunTestFeignClient;
|
||||||
|
import com.njcn.system.timer.TimerTaskRunner;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* pqs
|
||||||
|
* 冀北技术监督监测点试运行,每日扫描
|
||||||
|
* @author cdf
|
||||||
|
* @date 2024/5/22
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class SupervisionLineRunTestTaskRunner implements TimerTaskRunner {
|
||||||
|
|
||||||
|
|
||||||
|
private final TempLineRunTestFeignClient tempLineRunTestFeignClient;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void action(String date) {
|
||||||
|
tempLineRunTestFeignClient.isTestRunStartOrEnd();
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user