|
|
@@ -79,6 +79,11 @@ public class IsJobTicketServiceImpl extends ServiceImpl<IsJobTicketMapper, IsJob
|
|
|
if (!isJobTicketPoints.isEmpty()) {
|
|
|
List<Long> pointIds = isJobTicketPoints.stream().map(IsJobTicketPoints::getPointId).collect(Collectors.toList());
|
|
|
List<PointDetailVO> pointDetailList = iIsIsolationPointService.getPointDetailList(pointIds);
|
|
|
+ pointDetailList.forEach(o ->
|
|
|
+ isJobTicketPoints.stream()
|
|
|
+ .filter(o1 -> o1.getPointId().equals(o.getPointId()))
|
|
|
+ .findFirst()
|
|
|
+ .ifPresent(data -> o.setLockId(data.getLockId())));
|
|
|
// 2.2组装隔离点数据
|
|
|
jobTicketDetailVO.setPointDetailVOList(pointDetailList);
|
|
|
}
|
|
|
@@ -393,8 +398,11 @@ public class IsJobTicketServiceImpl extends ServiceImpl<IsJobTicketMapper, IsJob
|
|
|
jobUser.setJobStatus(JobStatusEnum.ACQUIRE_LOCK.status);
|
|
|
} else if (equipStatus == 2) { // 全部拿锁
|
|
|
jobUser.setJobStatus(JobStatusEnum.ACQUIRE_KEY.status);
|
|
|
- } else { // 已拿钥匙
|
|
|
+ } else if (equipStatus == 3) { // 已拿钥匙
|
|
|
jobUser.setJobStatus(JobStatusEnum.READY_TO_LOCK.status);
|
|
|
+ } else {
|
|
|
+ log.warn("Job ticket user equipment status is null, ticketId: {}, userId : {}", isJobTicket.getTicketId(), userId);
|
|
|
+ throw exception(JOB_TICKET_USER_EQUIPMENT_STATUS_NULL);
|
|
|
}
|
|
|
} else if (Objects.equals(jobUser.getJobStatus(), JobStatusEnum.READY_TO_LOCK.status)) {
|
|
|
jobUser.setJobStatus(JobStatusEnum.READY_TO_UNLOCK.status);
|