|
|
@@ -395,6 +395,8 @@ public class CheckinInfoService {
|
|
|
List<User> userList = userRepo
|
|
|
.findAllByIdNoIn(checkinInfoList.stream().map(CheckinInfo::getIdNo).filter(Objects::nonNull)
|
|
|
.collect(Collectors.toSet()));
|
|
|
+ List<Contract> contractList = contractRepo.findAllById(checkinInfoList.stream().map(CheckinInfo::getOrderId)
|
|
|
+ .filter(Objects::nonNull).collect(Collectors.toSet()));
|
|
|
|
|
|
List<CheckinInfoReportDTO> checkinInfoReportDTOList = new ArrayList<>();
|
|
|
for (CheckinInfo checkinInfo : checkinInfoList) {
|
|
|
@@ -409,6 +411,12 @@ public class CheckinInfoService {
|
|
|
.anyMatch(userDTO -> userDTO.getIdNo().equalsIgnoreCase(checkinInfo.getIdNo())
|
|
|
&& userDTO.getOpenId() != null
|
|
|
&& !userDTO.isTemporal());
|
|
|
+ String contractNumber = null;
|
|
|
+ if (checkinInfo.getOrderId() != null) {
|
|
|
+ contractNumber = contractList.stream()
|
|
|
+ .filter(contract -> checkinInfo.getOrderId().equals(contract.getId()))
|
|
|
+ .findAny().map(Contract::getContractNumber).orElse(null);
|
|
|
+ }
|
|
|
checkinInfoReportDTOList.add(CheckinInfoReportDTO.builder()
|
|
|
.id(checkinInfo.getId())
|
|
|
.roomName(roomName)
|
|
|
@@ -427,6 +435,7 @@ public class CheckinInfoService {
|
|
|
.phone(checkinInfo.getPhone())
|
|
|
.money(money)
|
|
|
.teamName(checkinInfo.getTeamName())
|
|
|
+ .contractNumber(contractNumber)
|
|
|
.bedName(bedName)
|
|
|
.checkinType(checkinInfo.getCheckInType().getDescription())
|
|
|
.hasWx(hasWx)
|