Parcourir la source

卡签续期调整

master
huminghao il y a 3 semaines
Parent
révision
abb797c865

+ 1
- 1
gly-base-core/src/main/java/cn/com/taiji/core/repo/jpa/ass/AssOrderinfoRepo.java Voir le fichier

@@ -12,7 +12,7 @@ public interface AssOrderinfoRepo extends AbstractJpaRepo<AssOrderinfo, String>{
AssOrderinfo findByVehicleIdAndOrderStatusAndOrderType(String vehicleId, AssOrderStatus orderStatus,
AssOrderType orderType);

@Query(" from AssOrderinfo where cardId = ?1 and orderType = ?2 and orderSource = ?3 ")
@Query(" from AssOrderinfo where cardId = ?1 and orderType = ?2 and orderStatus = ?3 ")
AssOrderinfo findUnFinishOrderByCardId(String cardId, AssOrderType orderType, AssOrderStatus orderStatus);

@Query(" from AssOrderinfo where obuId = ?1 and orderType = ?2 and orderSource = ?3 ")

+ 1
- 1
zhywpt-app-iaw/src/main/java/cn/com/taiji/iaw/dto/comm/VehicleInfoViewResponseDTO.java Voir le fichier

@@ -93,7 +93,7 @@ public class VehicleInfoViewResponseDTO extends BaseModel {
private String ownerName;

@ApiModelProperty(value = "车主证件类型")
private IdType ownerIdType;
private Integer ownerIdType;

@ApiModelProperty(value = "车主证件号码")
private String ownerIdNum;

+ 15
- 7
zhywpt-app-iaw/src/main/java/cn/com/taiji/iaw/manager/ass/DeviceRenewalManagerImpl.java Voir le fichier

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

+ 1
- 0
zhywpt-app-iaw/src/main/java/cn/com/taiji/iaw/manager/comm/VehicleInfoManagerImpl.java Voir le fichier

@@ -47,6 +47,7 @@ public class VehicleInfoManagerImpl extends AbstractCommManager implements Vehic
}
VehicleInfoViewResponseDTO resDTO = copyProperties(vehicleInfo, new VehicleInfoViewResponseDTO());
resDTO.setUseCharacter(vehicleInfo.getUseCharacter().getCode());
resDTO.setOwnerIdType(vehicleInfo.getOwnerIdType().getCode());
return resDTO;
}


+ 8
- 6
zhywpt-app-iaw/src/main/java/cn/com/taiji/iaw/model/RenewalQueryModel.java Voir le fichier

@@ -1,7 +1,9 @@
package cn.com.taiji.iaw.model;

import cn.com.taiji.common.model.BaseModel;
import cn.com.taiji.core.entity.dict.basic.CardStatus;
import cn.com.taiji.core.entity.dict.basic.IdType;
import cn.com.taiji.core.entity.dict.basic.ObuStatus;
import lombok.Getter;
import lombok.Setter;

@@ -27,7 +29,7 @@ public class RenewalQueryModel extends BaseModel {
/** 用户名称 */
private String ownerName;
/** 用户证件类型 */
private IdType ownerIdtype;
private Integer ownerIdtype;
/** 用户证件号 */
private String ownerIdnum;
/** 车辆类型 */
@@ -37,13 +39,13 @@ public class RenewalQueryModel extends BaseModel {
/** 卡类型 */
private Integer cardType;
/** 卡状态 */
private String cardStatus;
private CardStatus cardStatus;
/** 卡过期时间 */
private LocalDateTime cardExpireTime;
/** 签号 */
private String obuId;
/** 签状态 */
private String obuStatus;
private ObuStatus obuStatus;
/** 签过期时间 */
private LocalDateTime obuExpireTime;

@@ -51,14 +53,14 @@ public class RenewalQueryModel extends BaseModel {
Integer vehiclePlateColor, String ownerName,
IdType ownerIdtype, String ownerIdnum,
Integer type, String cardId, Integer cardType,
String cardStatus, LocalDateTime cardExpireTime,
String obuId, String obuStatus,
CardStatus cardStatus, LocalDateTime cardExpireTime,
String obuId, ObuStatus obuStatus,
LocalDateTime obuExpireTime) {
this.vehicleId = vehicleId;
this.vehiclePlate = vehiclePlate;
this.vehiclePlateColor = vehiclePlateColor;
this.ownerName = ownerName;
this.ownerIdtype = ownerIdtype;
this.ownerIdtype = ownerIdtype.getCode();
this.ownerIdnum = ownerIdnum;
this.type = type;
this.cardId = cardId;

Chargement…
Annuler
Enregistrer