|
|
@@ -8,6 +8,7 @@ import cn.com.taiji.core.entity.basic.QtkCustomerInfo; |
|
|
|
import cn.com.taiji.core.entity.basic.QtkObuInfo; |
|
|
|
import cn.com.taiji.core.entity.basic.QtkVehicleInfo; |
|
|
|
import cn.com.taiji.core.entity.dict.basic.CardStatus; |
|
|
|
import cn.com.taiji.core.entity.dict.basic.ObuStatus; |
|
|
|
import cn.com.taiji.core.entity.dict.basic.SourceType; |
|
|
|
import cn.com.taiji.core.repo.jpa.basic.QtkCardInfoRepo; |
|
|
|
import cn.com.taiji.core.repo.jpa.basic.QtkCustomerInfoRepo; |
|
|
@@ -21,7 +22,6 @@ import cn.com.taiji.iaw.tools.WxLoginUserUtil; |
|
|
|
import org.apache.commons.compress.utils.Lists; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.util.StringUtils; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
@@ -103,11 +103,8 @@ public class VehicleInfoManagerImpl extends AbstractCommManager implements Vehic |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
if (StringUtils.isEmpty(dto.getCustomerId())) { |
|
|
|
throw new ManagerException("卡签延期,用户id必填!"); |
|
|
|
} |
|
|
|
cardInfos = cardInfoRepo.listByCustomerIdAndVehicleId(dto.getCustomerId(), dto.getVehicleId()); |
|
|
|
obuInfos = obuInfoRepo.listByCustomerIdAndVehicleId(dto.getCustomerId(), dto.getVehicleId()); |
|
|
|
cardInfos = cardInfoRepo.listByCustomerIdAndVehicleId(vehicleInfo.getCustomerId(), dto.getVehicleId()); |
|
|
|
obuInfos = obuInfoRepo.listByCustomerIdAndVehicleId(vehicleInfo.getCustomerId(), dto.getVehicleId()); |
|
|
|
|
|
|
|
} |
|
|
|
//处理卡签信息 |
|
|
@@ -120,7 +117,7 @@ public class VehicleInfoManagerImpl extends AbstractCommManager implements Vehic |
|
|
|
//卡 |
|
|
|
if (!CollectionTools.isEmpty(cardInfos)){ |
|
|
|
QtkCardInfo qtkCardInfo = cardInfos.stream() |
|
|
|
.filter(cardInfo -> "ZC".equals(cardInfo.getCardStatus())) |
|
|
|
.filter(cardInfo -> cardInfo.getCardStatus() == CardStatus.ZC) |
|
|
|
.findFirst() |
|
|
|
.orElse(cardInfos.isEmpty() ? null : cardInfos.get(0)); |
|
|
|
copyProperties(qtkCardInfo , resDTO); |
|
|
@@ -129,10 +126,10 @@ public class VehicleInfoManagerImpl extends AbstractCommManager implements Vehic |
|
|
|
//签 |
|
|
|
if (!CollectionTools.isEmpty(obuInfos)){ |
|
|
|
QtkObuInfo qtkObuInfo = obuInfos.stream() |
|
|
|
.filter(obuInfo -> "ZC".equals(obuInfo.getObuStatus())) |
|
|
|
.filter(obuInfo -> obuInfo.getObuStatus() == ObuStatus.ZC) |
|
|
|
.findFirst() |
|
|
|
.orElse(obuInfos.isEmpty() ? null : obuInfos.get(0)); |
|
|
|
copyProperties(qtkObuInfo , resDTO); |
|
|
|
copyProperties(qtkObuInfo , resDTO,"cardId"); |
|
|
|
} |
|
|
|
} |
|
|
|
|