修改计划的检测结果状态
This commit is contained in:
@@ -592,7 +592,9 @@ public class PqDevServiceImpl extends ServiceImpl<PqDevMapper, PqDev> implements
|
|||||||
// 如果非归档状态的设备数量为0,则更新计划已完成
|
// 如果非归档状态的设备数量为0,则更新计划已完成
|
||||||
this.baseMapper.finishPlan(pqDev.getPlanId());
|
this.baseMapper.finishPlan(pqDev.getPlanId());
|
||||||
}
|
}
|
||||||
queryWrapper.clear();
|
}
|
||||||
|
|
||||||
|
LambdaQueryWrapper<PqDev> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
|
||||||
queryWrapper.eq(PqDev::getPlanId, pqDev.getPlanId())
|
queryWrapper.eq(PqDev::getPlanId, pqDev.getPlanId())
|
||||||
.eq(PqDev::getState, DataStateEnum.ENABLE.getCode());
|
.eq(PqDev::getState, DataStateEnum.ENABLE.getCode());
|
||||||
@@ -615,7 +617,6 @@ public class PqDevServiceImpl extends ServiceImpl<PqDevMapper, PqDev> implements
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,20 +12,14 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
import com.njcn.common.pojo.enums.common.DataStateEnum;
|
||||||
import com.njcn.common.pojo.exception.BusinessException;
|
import com.njcn.common.pojo.exception.BusinessException;
|
||||||
import com.njcn.gather.device.pojo.enums.TimeCheckResultEnum;
|
import com.njcn.gather.device.pojo.enums.*;
|
||||||
import com.njcn.gather.device.pojo.param.PqDevParam;
|
import com.njcn.gather.device.pojo.param.PqDevParam;
|
||||||
import com.njcn.gather.device.pojo.po.PqDev;
|
import com.njcn.gather.device.pojo.po.PqDev;
|
||||||
import com.njcn.gather.device.service.IPqDevService;
|
import com.njcn.gather.device.service.IPqDevService;
|
||||||
import com.njcn.gather.err.service.IPqErrSysService;
|
import com.njcn.gather.err.service.IPqErrSysService;
|
||||||
import com.njcn.gather.device.pojo.enums.*;
|
|
||||||
import com.njcn.gather.plan.pojo.enums.PlanReportStateEnum;
|
|
||||||
import com.njcn.gather.script.pojo.po.PqScriptDtls;
|
|
||||||
import com.njcn.gather.script.service.IPqScriptDtlsService;
|
|
||||||
import com.njcn.gather.script.service.IPqScriptService;
|
|
||||||
import com.njcn.gather.source.pojo.po.PqSource;
|
|
||||||
import com.njcn.gather.source.service.IPqSourceService;
|
|
||||||
import com.njcn.gather.plan.mapper.AdPlanMapper;
|
import com.njcn.gather.plan.mapper.AdPlanMapper;
|
||||||
import com.njcn.gather.plan.pojo.enums.DataSourceEnum;
|
import com.njcn.gather.plan.pojo.enums.DataSourceEnum;
|
||||||
|
import com.njcn.gather.plan.pojo.enums.PlanReportStateEnum;
|
||||||
import com.njcn.gather.plan.pojo.enums.PlanResponseEnum;
|
import com.njcn.gather.plan.pojo.enums.PlanResponseEnum;
|
||||||
import com.njcn.gather.plan.pojo.param.AdPlanParam;
|
import com.njcn.gather.plan.pojo.param.AdPlanParam;
|
||||||
import com.njcn.gather.plan.pojo.po.AdPlan;
|
import com.njcn.gather.plan.pojo.po.AdPlan;
|
||||||
@@ -33,6 +27,11 @@ import com.njcn.gather.plan.pojo.vo.AdPlanExcel;
|
|||||||
import com.njcn.gather.plan.pojo.vo.AdPlanVO;
|
import com.njcn.gather.plan.pojo.vo.AdPlanVO;
|
||||||
import com.njcn.gather.plan.service.IAdPlanService;
|
import com.njcn.gather.plan.service.IAdPlanService;
|
||||||
import com.njcn.gather.plan.service.IAdPlanSourceService;
|
import com.njcn.gather.plan.service.IAdPlanSourceService;
|
||||||
|
import com.njcn.gather.script.pojo.po.PqScriptDtls;
|
||||||
|
import com.njcn.gather.script.service.IPqScriptDtlsService;
|
||||||
|
import com.njcn.gather.script.service.IPqScriptService;
|
||||||
|
import com.njcn.gather.source.pojo.po.PqSource;
|
||||||
|
import com.njcn.gather.source.service.IPqSourceService;
|
||||||
import com.njcn.gather.storage.service.TableGenService;
|
import com.njcn.gather.storage.service.TableGenService;
|
||||||
import com.njcn.gather.system.dictionary.pojo.po.DictTree;
|
import com.njcn.gather.system.dictionary.pojo.po.DictTree;
|
||||||
import com.njcn.gather.system.dictionary.service.IDictDataService;
|
import com.njcn.gather.system.dictionary.service.IDictDataService;
|
||||||
@@ -426,7 +425,11 @@ public class AdPlanServiceImpl extends ServiceImpl<AdPlanMapper, AdPlan> impleme
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private Integer generateCode() {
|
private Integer generateCode() {
|
||||||
return this.lambdaQuery().select(AdPlan::getCode).orderByDesc(AdPlan::getCode).last("LIMIT 1").one().getCode() + 1;
|
AdPlan plan = this.lambdaQuery().select(AdPlan::getCode).orderByDesc(AdPlan::getCode).last("LIMIT 1").one();
|
||||||
|
if (ObjectUtil.isNotNull(plan)) {
|
||||||
|
return plan.getCode() + 1;
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user