|
|
@@ -31,6 +31,7 @@ import cn.com.taiji.core.repo.jpa.basic.QtkVehicleInfoRepo; |
|
|
|
import cn.com.taiji.iaw.dto.ass.*; |
|
|
|
import cn.com.taiji.iaw.manager.AbstractIawManager; |
|
|
|
import cn.com.taiji.iaw.model.RenewalQueryModel; |
|
|
|
import cn.com.taiji.iaw.tools.WxLoginUserUtil; |
|
|
|
import com.google.common.collect.Lists; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
@@ -281,6 +282,7 @@ public class DeviceRenewalManagerImpl extends AbstractIawManager implements Devi |
|
|
|
|
|
|
|
|
|
|
|
private AssOrderinfo generateAssOrderInfo(AbstractBizRequestDTO dto, QtkCardInfo cardInfo, QtkObuInfo obuInfo, boolean isCard) throws ServiceHandleException { |
|
|
|
String customerId = isCard ? cardInfo.getCustomerId() : obuInfo.getCustomerId(); |
|
|
|
LocalDateTime now = LocalDateTime.now(); |
|
|
|
AssOrderinfo orderinfo = new AssOrderinfo(); |
|
|
|
orderinfo.setOrderNo(createOrderNo(findAgencyIdByToken(dto.getAccessToken()))); |
|
|
@@ -296,7 +298,8 @@ public class DeviceRenewalManagerImpl extends AbstractIawManager implements Devi |
|
|
|
} else { |
|
|
|
orderinfo.setOpenId(openId); |
|
|
|
} |
|
|
|
orderinfo.setCustomerId(openId); |
|
|
|
//获取用户的customerId |
|
|
|
orderinfo.setCustomerId(customerId); |
|
|
|
AccountInfo accountInfo = findAccountInfoByToken(dto.getAccessToken()); |
|
|
|
if (accountInfo != null) { |
|
|
|
if (!StringUtils.isEmpty(accountInfo.getMobile())) { |
|
|
@@ -312,13 +315,10 @@ public class DeviceRenewalManagerImpl extends AbstractIawManager implements Devi |
|
|
|
orderinfo.setCustomerIdNum(accountInfo.getIdNum()); |
|
|
|
} |
|
|
|
} |
|
|
|
QtkCustomerInfo customerInfo = customerInfoRepo.findByCustomerId(dto.getCustomerId()); |
|
|
|
QtkCustomerInfo customerInfo = customerInfoRepo.findByCustomerId(customerId); |
|
|
|
if (customerInfo != null) { |
|
|
|
orderinfo.setUserType(customerInfo.getUserType()); |
|
|
|
} |
|
|
|
orderinfo.setAutoAuditTime(now); |
|
|
|
//todo 审核人ID |
|
|
|
orderinfo.setAuditTime(now); |
|
|
|
orderinfo.setInsertTime(now); |
|
|
|
orderinfo.setUpdateTime(now); |
|
|
|
orderinfo.setVehicleId(isCard ? cardInfo.getVehicleId() : obuInfo.getVehicleId()); |
|
|
@@ -338,6 +338,14 @@ public class DeviceRenewalManagerImpl extends AbstractIawManager implements Devi |
|
|
|
IdType idType = idTypeObj instanceof String ? |
|
|
|
IdType.valueOf((String) idTypeObj) : |
|
|
|
(IdType) idTypeObj; |
|
|
|
Object cardStatusObj = map.get("cardStatus"); |
|
|
|
CardStatus cardStatus = cardStatusObj instanceof String ? |
|
|
|
CardStatus.valueOf((String) cardStatusObj) : |
|
|
|
(CardStatus) cardStatusObj; |
|
|
|
Object obuStatusObj = map.get("obuStatus"); |
|
|
|
ObuStatus obuStatus = obuStatusObj instanceof String ? |
|
|
|
ObuStatus.valueOf((String) obuStatusObj) : |
|
|
|
(ObuStatus) obuStatusObj; |
|
|
|
|
|
|
|
return new RenewalQueryModel( |
|
|
|
(String) map.get("vehicleId"), |
|
|
@@ -349,10 +357,10 @@ public class DeviceRenewalManagerImpl extends AbstractIawManager implements Devi |
|
|
|
(map.get("type") != null) ? ((BigDecimal) map.get("type")).intValue() : null, |
|
|
|
(String) map.get("cardId"), |
|
|
|
(map.get("cardType") != null) ? ((BigDecimal) map.get("cardType")).intValue() : null, |
|
|
|
(String) map.get("cardStatus"), |
|
|
|
cardStatus, |
|
|
|
(map.get("cardExpireTime") != null) ? ((Timestamp) map.get("cardExpireTime")).toLocalDateTime() : null, |
|
|
|
(String) map.get("obuId"), |
|
|
|
(String) map.get("obuStatus"), |
|
|
|
obuStatus, |
|
|
|
(map.get("obuExpireTime") != null) ? ((Timestamp) map.get("obuExpireTime")).toLocalDateTime() : null |
|
|
|
); |
|
|
|
}) |