Преглед на файлове

Merge branch 'dev' of https://e.coding.net/g-pheu9517/grt-iscs/ISCS_Base into dev

车车 преди 11 месеца
родител
ревизия
37bb8bd114

+ 1 - 0
ktg-iscs/src/main/java/com/ktg/iscs/domain/constant/ErrorCodeConstants.java

@@ -15,4 +15,5 @@ public interface ErrorCodeConstants {
     ErrorCode JOB_TICKET_USER_WAIT_TO_LOCK = new ErrorCode(1_006_001_003, "请等待上锁!");
     ErrorCode JOB_TICKET_USER_JOB_IS_DONE = new ErrorCode(1_006_001_004, "您已完成该作业票,无需继续操作!");
     ErrorCode JOB_TICKET_USER_WAIT_COLOCKERS = new ErrorCode(1_006_001_005, "请等待共锁人解锁!");
+    ErrorCode JOB_TICKET_USER_EQUIPMENT_STATUS_NULL = new ErrorCode(1_006_001_006, "请传递设备拿取情况!");
 }

+ 2 - 1
ktg-iscs/src/main/java/com/ktg/iscs/domain/vo/points/PointDetailVO.java

@@ -80,5 +80,6 @@ public class PointDetailVO extends BaseBean
     @ApiModelProperty(value = "锁具类型图片")
     private String lockTypeImg;
 
-
+    @ApiModelProperty(value = "挂锁ID")
+    private Long lockId;
 }

+ 0 - 1
ktg-iscs/src/main/java/com/ktg/iscs/domain/vo/ticket/JobTicketUpdateProgressReqVO.java

@@ -14,6 +14,5 @@ public class JobTicketUpdateProgressReqVO {
     public Long ticketId;
 
     @ApiModelProperty(value = "设备拿取情况,1:部分拿锁 2:全部拿锁 3:拿钥匙")
-    @NotNull(message = "设备拿取情况不能为空")
     public Integer equipStatus;
 }

+ 9 - 1
ktg-iscs/src/main/java/com/ktg/iscs/service/impl/IsJobTicketServiceImpl.java

@@ -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);