BUG修复

This commit is contained in:
pengjie 2024-06-26 10:20:48 +08:00
parent af0d0ed7f7
commit 8228a53c2a

View File

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