正式检测检测增加回退状态,推送消息优化
This commit is contained in:
@@ -9,12 +9,12 @@ import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
|
||||
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
|
||||
import com.njcn.db.mybatisplus.bo.BaseEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author caozehui
|
||||
@@ -206,6 +206,7 @@ public class PqDev extends BaseEntity implements Serializable {
|
||||
|
||||
private String icdId;
|
||||
|
||||
// private String power;
|
||||
@TableField("Check_Time")
|
||||
private LocalDateTime checkTime;
|
||||
}
|
||||
|
||||
|
||||
@@ -172,12 +172,6 @@ public interface IPqDevService extends IService<PqDev> {
|
||||
*/
|
||||
boolean documented(List<String> id);
|
||||
|
||||
/**
|
||||
* 修改监测状态
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
boolean updateCheckState(List<String> ids);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -39,6 +39,7 @@ import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -435,7 +436,7 @@ public class PqDevServiceImpl extends ServiceImpl<PqDevMapper, PqDev> implements
|
||||
monitorListDTO.setLineId(preDetection.getDevIP() + "_" + i);
|
||||
monitorListDTO.setLine(i);
|
||||
monitorListDTO.setPt(1);
|
||||
monitorListDTO.setPt(1);
|
||||
monitorListDTO.setCt(1);
|
||||
monitorList.add(monitorListDTO);
|
||||
}
|
||||
preDetection.setMonitorList(monitorList);
|
||||
@@ -483,16 +484,6 @@ public class PqDevServiceImpl extends ServiceImpl<PqDevMapper, PqDev> implements
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateCheckState(List<String> ids) {
|
||||
if (CollUtil.isNotEmpty(ids)) {
|
||||
return this.update(new LambdaUpdateWrapper<PqDev>()
|
||||
.set(PqDev::getCheckState, CheckStateEnum.CHECKING.getValue())
|
||||
.in(PqDev::getId, ids));
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean updateResult(List<String> ids, String code) {
|
||||
@@ -505,6 +496,7 @@ public class PqDevServiceImpl extends ServiceImpl<PqDevMapper, PqDev> implements
|
||||
.set(PqDev::getReCheckNum, pqDev.getReCheckNum() + 1)
|
||||
.set(PqDev::getCheckState, CheckStateEnum.CHECKED.getValue())
|
||||
.set(PqDev::getCheckResult, result.get(pqDev.getId()))
|
||||
.set(PqDev::getCheckTime, LocalDateTime.now())
|
||||
.set(PqDev::getReportState, DevReportStateEnum.NOT_GENERATED.getValue())
|
||||
.eq(PqDev::getId, pqDev.getId()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user