当检测计划的检测状态为检测完成时,才能进行数据分析
This commit is contained in:
@@ -10,7 +10,8 @@ import lombok.Getter;
|
|||||||
public enum PlanResponseEnum {
|
public enum PlanResponseEnum {
|
||||||
PLAN_REPEATED("A003014", "当前模式下,该计划已存在"),
|
PLAN_REPEATED("A003014", "当前模式下,该计划已存在"),
|
||||||
PLAN_NOT_EXIST("A003015", "该计划不存在"),
|
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 message;
|
||||||
private final String code;
|
private final String code;
|
||||||
|
|||||||
@@ -426,6 +426,12 @@ public class AdPlanServiceImpl extends ServiceImpl<AdPlanMapper, AdPlan> impleme
|
|||||||
Integer maxTime = config.getMaxTime();
|
Integer maxTime = config.getMaxTime();
|
||||||
List<AdPlan> planList = this.listByIds(ids);
|
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<>();
|
Map<String, List<String[]>> sheets = new HashMap<>();
|
||||||
|
|
||||||
if (planList.size() > 1) {
|
if (planList.size() > 1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user