Browse Source

debug新运维项目

master
PoffyZhang 10 months ago
parent
commit
7fed86ce34
2 changed files with 3 additions and 3 deletions
  1. +2
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/utils/GenerateProjectCodeUtil.java
  2. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/EarlyWarningProjectTask.java

+ 2
- 2
pmapi/src/main/java/com/ningdatech/pmapi/projectdeclared/utils/GenerateProjectCodeUtil.java View File

@@ -152,7 +152,7 @@ public class GenerateProjectCodeUtil {
.orderByDesc(GovOperationProjectBaseinfo::getBaseProjId)
.last(BizConst.LIMIT_1));
if(Objects.nonNull(operationBaseMax) && StringUtils.isNotBlank(operationBaseMax.getBaseProjId())){
Long operationMax = Long.valueOf(baseMax.getBaseProjId().substring(baseMax.getBaseProjId().length() - 5));
Long operationMax = Long.valueOf(operationBaseMax.getBaseProjId().substring(operationBaseMax.getBaseProjId().length() - 5));
max = Math.max(max,operationMax);
}
Project projectMax = projectService.getOne(Wrappers.lambdaQuery(Project.class)
@@ -199,7 +199,7 @@ public class GenerateProjectCodeUtil {
.orderByDesc(GovOperationProjectBaseinfo::getBaseProjId)
.last(BizConst.LIMIT_1));
if(Objects.nonNull(operationBaseMax) && StringUtils.isNotBlank(operationBaseMax.getBaseProjId())){
Long operationMax = Long.valueOf(baseMax.getBaseProjId().substring(baseMax.getBaseProjId().length() - 5));
Long operationMax = Long.valueOf(operationBaseMax.getBaseProjId().substring(operationBaseMax.getBaseProjId().length() - 5));
max = Math.max(max,operationMax);
}
Project projectMax = projectService.getOne(Wrappers.lambdaQuery(Project.class)


+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/EarlyWarningProjectTask.java View File

@@ -28,7 +28,7 @@ public class EarlyWarningProjectTask {
@Value("${hostname}")
private String HOST_NAME;

@Scheduled(fixedDelay = 12000)
@Scheduled(fixedDelay = 6000 * 120)
public void doEarlyWarningDeclared() throws UnknownHostException {
if (!HOST_NAME.equals(InetAddress.getLocalHost().getHostName())) {
return;


Loading…
Cancel
Save