当检测计划的检测状态为检测完成时,才能进行数据分析

This commit is contained in:
caozehui
2025-02-21 13:55:15 +08:00
parent cb06b77aef
commit 79b89e7e8b
2 changed files with 8 additions and 1 deletions

View File

@@ -10,7 +10,8 @@ import lombok.Getter;
public enum PlanResponseEnum {
PLAN_REPEATED("A003014", "当前模式下,该计划已存在"),
PLAN_NOT_EXIST("A003015", "该计划不存在"),
SCRIPT_RELATE_DICT_NOT_EXIST("A003016","脚本关联的字典不存在");
SCRIPT_RELATE_DICT_NOT_EXIST("A003016","脚本关联的字典不存在"),
NOT_CHECKED_PLAN_CANNOT_ANALYSE("A003017","只有检测状态为检测完成的计划才能进行统计分析" );
private final String message;
private final String code;

View File

@@ -426,6 +426,12 @@ public class AdPlanServiceImpl extends ServiceImpl<AdPlanMapper, AdPlan> impleme
Integer maxTime = config.getMaxTime();
List<AdPlan> planList = this.listByIds(ids);
planList.forEach(plan -> {
if (!CheckStateEnum.CHECKED.getValue().equals(plan.getTestState())) {
throw new BusinessException(PlanResponseEnum.NOT_CHECKED_PLAN_CANNOT_ANALYSE);
}
});
Map<String, List<String[]>> sheets = new HashMap<>();
if (planList.size() > 1) {