|
@@ -2,6 +2,7 @@ package com.ktg.iscs.service.impl;
|
|
|
|
|
|
|
|
import cn.hutool.core.lang.Assert;
|
|
import cn.hutool.core.lang.Assert;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
|
|
+import com.ktg.common.utils.SecurityUtils;
|
|
|
import com.ktg.common.utils.bean.BeanUtils;
|
|
import com.ktg.common.utils.bean.BeanUtils;
|
|
|
import com.ktg.iscs.domain.*;
|
|
import com.ktg.iscs.domain.*;
|
|
|
import com.ktg.iscs.domain.dto.hardwareApi.*;
|
|
import com.ktg.iscs.domain.dto.hardwareApi.*;
|
|
@@ -10,6 +11,7 @@ import com.ktg.iscs.domain.enums.LockStatusEnum;
|
|
|
import com.ktg.iscs.domain.enums.LocksetStatusEnum;
|
|
import com.ktg.iscs.domain.enums.LocksetStatusEnum;
|
|
|
import com.ktg.iscs.domain.enums.PointStatusEnum;
|
|
import com.ktg.iscs.domain.enums.PointStatusEnum;
|
|
|
import com.ktg.iscs.domain.vo.hardwareApi.*;
|
|
import com.ktg.iscs.domain.vo.hardwareApi.*;
|
|
|
|
|
+import com.ktg.iscs.domain.vo.ticket.JobTicketUpdateProgressReqVO;
|
|
|
import com.ktg.iscs.service.*;
|
|
import com.ktg.iscs.service.*;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -17,6 +19,7 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 硬件Service业务层处理
|
|
* 硬件Service业务层处理
|
|
@@ -92,6 +95,12 @@ public class HardwareApiServiceImpl implements HardwareApiService {
|
|
|
.set(IsJobTicketKey::getCollectTime, date)
|
|
.set(IsJobTicketKey::getCollectTime, date)
|
|
|
.set(IsJobTicketKey::getKeyStatus, KeyStatusEnum.TAKED.status));
|
|
.set(IsJobTicketKey::getKeyStatus, KeyStatusEnum.TAKED.status));
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ JobTicketUpdateProgressReqVO reqVO = new JobTicketUpdateProgressReqVO();
|
|
|
|
|
+ reqVO.userId = SecurityUtils.getUserId();
|
|
|
|
|
+ reqVO.ticketId = dto.getTicketId();
|
|
|
|
|
+ reqVO.equipStatus = 3;
|
|
|
|
|
+ isJobTicketService.updateTicketProgress(reqVO);
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -137,6 +146,11 @@ public class HardwareApiServiceImpl implements HardwareApiService {
|
|
|
.set(IsJobTicketKey::getGiveBackTime, date)
|
|
.set(IsJobTicketKey::getGiveBackTime, date)
|
|
|
.set(IsJobTicketKey::getKeyStatus, KeyStatusEnum.RETURNED.status));
|
|
.set(IsJobTicketKey::getKeyStatus, KeyStatusEnum.RETURNED.status));
|
|
|
}
|
|
}
|
|
|
|
|
+ JobTicketUpdateProgressReqVO reqVO = new JobTicketUpdateProgressReqVO();
|
|
|
|
|
+ reqVO.userId = SecurityUtils.getUserId();
|
|
|
|
|
+ reqVO.ticketId = dto.getTicketId();
|
|
|
|
|
+ isJobTicketService.updateTicketProgress(reqVO);
|
|
|
|
|
+
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -175,6 +189,17 @@ public class HardwareApiServiceImpl implements HardwareApiService {
|
|
|
iIsJobTicketLockService.updateById(isJobTicketLock);
|
|
iIsJobTicketLockService.updateById(isJobTicketLock);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ List<IsJobTicketLock> lockList = iIsJobTicketLockService.selectByTicketId(list.get(0).getTicketId());
|
|
|
|
|
+ // 已取锁数量
|
|
|
|
|
+ int takeCount = lockList.stream().filter(data -> data.getLockId() != null).collect(Collectors.toList()).size();
|
|
|
|
|
+ int status = takeCount == lockList.size() ? 2 : 1;
|
|
|
|
|
+
|
|
|
|
|
+ JobTicketUpdateProgressReqVO reqVO = new JobTicketUpdateProgressReqVO();
|
|
|
|
|
+ reqVO.ticketId = list.get(0).getTicketId();
|
|
|
|
|
+ reqVO.userId = SecurityUtils.getUserId();
|
|
|
|
|
+ reqVO.equipStatus = status;
|
|
|
|
|
+ isJobTicketService.updateTicketProgress(reqVO);
|
|
|
|
|
+
|
|
|
|
|
|
|
|
/*int size = list.size();
|
|
/*int size = list.size();
|
|
|
List<String> nfcList = list.stream().map(TakeTicketLockDTO::getLockNfc).collect(Collectors.toList());
|
|
List<String> nfcList = list.stream().map(TakeTicketLockDTO::getLockNfc).collect(Collectors.toList());
|
|
@@ -246,6 +271,10 @@ public class HardwareApiServiceImpl implements HardwareApiService {
|
|
|
log.error("当前挂锁找到多条关联的作业票, nfc: {}, name : {}", dto.getLockNfc(), lock.getLockName());
|
|
log.error("当前挂锁找到多条关联的作业票, nfc: {}, name : {}", dto.getLockNfc(), lock.getLockName());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ JobTicketUpdateProgressReqVO reqVO = new JobTicketUpdateProgressReqVO();
|
|
|
|
|
+ reqVO.userId = SecurityUtils.getUserId();
|
|
|
|
|
+ reqVO.ticketId = dto.getTicketId();
|
|
|
|
|
+ isJobTicketService.updateTicketProgress(reqVO);
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -342,6 +371,11 @@ public class HardwareApiServiceImpl implements HardwareApiService {
|
|
|
.set(IsJobTicketLock::getLockStatus, LockStatusEnum.REMOVED_LOCK.status));
|
|
.set(IsJobTicketLock::getLockStatus, LockStatusEnum.REMOVED_LOCK.status));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ JobTicketUpdateProgressReqVO reqVO = new JobTicketUpdateProgressReqVO();
|
|
|
|
|
+ reqVO.userId = SecurityUtils.getUserId();
|
|
|
|
|
+ reqVO.ticketId = list.get(0).getTicketId();
|
|
|
|
|
+ isJobTicketService.updateTicketProgress(reqVO);
|
|
|
|
|
+
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
|
|
|