微调
This commit is contained in:
@@ -487,12 +487,10 @@ public class PqDevServiceImpl extends ServiceImpl<PqDevMapper, PqDev> implements
|
||||
// 只有检测完成的设备才可以进行归档
|
||||
PqDev pqDev = this.getById(id);
|
||||
if (ObjectUtil.isNotNull(pqDev)) {
|
||||
if (!pqDev.getCheckState().equals(CheckStateEnum.CHECKED.getValue())) {
|
||||
// 只有检测完成、且已生成报告的设备才可以进行归档
|
||||
if (!pqDev.getCheckState().equals(CheckStateEnum.CHECKED.getValue()) || !pqDev.getReportState().equals(DevReportStateEnum.GENERATED.getValue())) {
|
||||
throw new BusinessException(DetectionResponseEnum.DEV_UN_CHECKED);
|
||||
}
|
||||
if (!pqDev.getReportState().equals(DevReportStateEnum.GENERATED.getValue())) {
|
||||
throw new BusinessException(DetectionResponseEnum.DEV_UN_REPORT);
|
||||
}
|
||||
boolean update = this.lambdaUpdate()
|
||||
.set(PqDev::getCheckState, CheckStateEnum.DOCUMENTED.getValue())
|
||||
.eq(PqDev::getId, id)
|
||||
@@ -510,8 +508,6 @@ public class PqDevServiceImpl extends ServiceImpl<PqDevMapper, PqDev> implements
|
||||
this.baseMapper.finishPlan(pqDev.getPlanId());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
throw new BusinessException(DetectionResponseEnum.DEV_UN_CHECKED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user