Merge remote-tracking branch 'origin/guoshengxiong' into guoshengxiong

This commit is contained in:
guoshengxiong 2024-06-26 15:54:41 +08:00
commit fac25ea1b6

View File

@ -1661,14 +1661,14 @@ public class WorkerInfoServiceImpl extends ServiceImpl<WorkerInfoMapper, WorkerI
requestMap.put("workerId", workerId);
EntityMap entityMap = workerInfoMapper.viewWorkerInfoDetail(requestMap);
if (entityMap == null) {
throw new CustomException("该人员信息不存在!", HttpStatus.INTERNAL_SERVER_ERROR);
throw new OpenAlertException("该人员信息不存在!");
}
WorkerType workerType = workerTypeMapper.selectById(entityMap.get("workerTypeId"));
List<WorkerSafeEducation> workerSafeEducations = workerSafeEducationMapper.selectList(Wrappers.<WorkerSafeEducation>lambdaQuery()
.eq(WorkerSafeEducation::getProjectSn, projectSn)
.orderByDesc(WorkerSafeEducation::getAddTime));
if (workerSafeEducations == null || workerSafeEducations.size() == 0) {
throw new CustomException("该人员未参加过入场安全教育培训!", HttpStatus.INTERNAL_SERVER_ERROR);
throw new OpenAlertException("该人员未参加过入场安全教育培训!");
}
WorkerSafeEducationWorker workerSafeEducationWorker = workerSafeEducationWorkerMapper.selectOne(Wrappers.<WorkerSafeEducationWorker>lambdaQuery()
.eq(WorkerSafeEducationWorker::getEduId, workerSafeEducations.get(0).getId())