|
|
@@ -10,6 +10,7 @@ import cn.com.taiji.ods.dict.dsi.DeviceVersionType; |
|
|
|
import cn.com.taiji.ods.dict.dsi.ImsCardType; |
|
|
|
import cn.com.taiji.ods.dict.dsi.InventoryStatus; |
|
|
|
import cn.com.taiji.ods.entity.dsi.*; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
|
|
|
|
import java.time.format.DateTimeFormatter; |
|
|
|
|
|
|
@@ -20,7 +21,7 @@ public abstract class IssueCommManagerImpl { |
|
|
|
dsiCustomerInfo.setUpdateTime(customerInfo.getUpdateTime()); |
|
|
|
dsiCustomerInfo.setCustomerId(customerInfo.getCustomerId()); |
|
|
|
dsiCustomerInfo.setIssuerId(customerInfo.getIssuerId()); |
|
|
|
dsiCustomerInfo.setRegisteredTime(customerInfo.getRegisteredDate().replace(" ","T")); |
|
|
|
dsiCustomerInfo.setRegisteredTime(StringUtils.isEmpty(customerInfo.getRegisteredDate()) ? null : customerInfo.getRegisteredDate().replace(" ","T") ); |
|
|
|
dsiCustomerInfo.setRegisteredDate(customerInfo.getRegisteredDate()); |
|
|
|
dsiCustomerInfo.setSeriseNo(customerInfo.getSeriseNo()); |
|
|
|
dsiCustomerInfo.setCustomerType(customerInfo.getUserType().getCode()); |
|
|
@@ -95,7 +96,7 @@ public abstract class IssueCommManagerImpl { |
|
|
|
dsiVehicleInfo.setAxisType(vehicleInfo.getAxisType()); |
|
|
|
dsiVehicleInfo.setTestRecord(vehicleInfo.getTestRecord()); |
|
|
|
dsiVehicleInfo.setFileNum(vehicleInfo.getFileNum()); |
|
|
|
dsiVehicleInfo.setRegisteredTime(vehicleInfo.getRegisteredTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss"))); |
|
|
|
dsiVehicleInfo.setRegisteredTime(vehicleInfo.getRegisteredTime() == null ? null : vehicleInfo.getRegisteredTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss"))); |
|
|
|
dsiVehicleInfo.setOwnerTel(vehicleInfo.getOwnerTel()); |
|
|
|
dsiVehicleInfo.setUseCharacter(vehicleInfo.getUseCharacter().getCode()); |
|
|
|
dsiVehicleInfo.setRegisterDate(vehicleInfo.getRegisterDate()); |
|
|
@@ -121,8 +122,8 @@ public abstract class IssueCommManagerImpl { |
|
|
|
dsiCardInfo.setAgencyId(cardInfo.getAgencyId()); |
|
|
|
dsiCardInfo.setCustomerId(cardInfo.getCustomerId()); |
|
|
|
dsiCardInfo.setVehicleId(cardInfo.getVehicleId()); |
|
|
|
dsiCardInfo.setEnableTime(cardInfo.getCardEnableTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss"))); |
|
|
|
dsiCardInfo.setExpireTime(cardInfo.getCardExpireTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss"))); |
|
|
|
dsiCardInfo.setEnableTime(cardInfo.getCardEnableTime() == null ? null : cardInfo.getCardEnableTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss"))); |
|
|
|
dsiCardInfo.setExpireTime(cardInfo.getCardExpireTime() == null ? null : cardInfo.getCardExpireTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss"))); |
|
|
|
dsiCardInfo.setChannelId(cardInfo.getChannelId()); |
|
|
|
dsiCardInfo.setIssuedType(cardInfo.getCardIssuedType()); |
|
|
|
// dsiCardInfo.setIssuedTime(cardInfo.getCardIssuedTime()); |
|
|
@@ -135,7 +136,7 @@ public abstract class IssueCommManagerImpl { |
|
|
|
dsiCardInfo.setCreateTime(TimeTools.localDateTime2Calendar(cardInfo.getInsertTime())); |
|
|
|
dsiCardInfo.setUpdateTime(TimeTools.localDateTime2Calendar(cardInfo.getUpdateTime())); |
|
|
|
dsiCardInfo.setAccountId(cardInfo.getAccountId()); |
|
|
|
dsiCardInfo.setPackageEnableTime(cardInfo.getPackageEnableTime().replace(" ","T")); |
|
|
|
dsiCardInfo.setPackageEnableTime(StringUtils.isEmpty(cardInfo.getPackageEnableTime()) ? null : cardInfo.getPackageEnableTime().replace(" ","T")); |
|
|
|
dsiCardInfo.setCardVersion(DeviceVersion.cardFromDeviceVersion(cardInfo.getCardVersion())); |
|
|
|
// dsiCardInfo.setApplyStaffId(cardInfo.getApplyStaffId()); |
|
|
|
// if (cardInfo.getCustomer() != null) { |
|
|
@@ -161,11 +162,11 @@ public abstract class IssueCommManagerImpl { |
|
|
|
// dsiOBUInfo.setModel(obuInfo.getObuModel()); |
|
|
|
dsiOBUInfo.setCustomerId(obuInfo.getCustomerId()); |
|
|
|
dsiOBUInfo.setVehicleId(obuInfo.getVehicleId()); |
|
|
|
dsiOBUInfo.setEnableTime(obuInfo.getObuEnableTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss"))); |
|
|
|
dsiOBUInfo.setExpireTime(obuInfo.getObuExpireTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss"))); |
|
|
|
dsiOBUInfo.setEnableTime(obuInfo.getObuEnableTime() == null ? null : obuInfo.getObuEnableTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss"))); |
|
|
|
dsiOBUInfo.setExpireTime(obuInfo.getObuExpireTime() == null ? null : obuInfo.getObuExpireTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss"))); |
|
|
|
dsiOBUInfo.setRegisteredType(obuInfo.getRegisteredType()); |
|
|
|
dsiOBUInfo.setRegisteredChannelId(obuInfo.getRegisteredChannelId()); |
|
|
|
dsiOBUInfo.setRegisteredTime(obuInfo.getRegisteredTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss"))); |
|
|
|
dsiOBUInfo.setRegisteredTime(obuInfo.getRegisteredTime() == null ? null : obuInfo.getRegisteredTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss"))); |
|
|
|
// dsiOBUInfo.setInstallType(obuInfo.getInstallType()); |
|
|
|
// dsiOBUInfo.setInstallChannelId(obuInfo.getInstallChannelId()); |
|
|
|
// dsiOBUInfo.setInstallTime(obuInfo.getInstallTime()); |
|
|
@@ -229,7 +230,7 @@ public abstract class IssueCommManagerImpl { |
|
|
|
public static void enc(DsiBlackCard dsiBlackCard, QtkBlackCard blackCard) { |
|
|
|
dsiBlackCard.setId(blackCard.getId()); |
|
|
|
dsiBlackCard.setIssuerId(blackCard.getIssuerId()); |
|
|
|
dsiBlackCard.setCreationTime(blackCard.getCreationTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss"))); |
|
|
|
dsiBlackCard.setCreationTime(blackCard.getCreationTime() == null ? null : blackCard.getCreationTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss"))); |
|
|
|
dsiBlackCard.setType(blackCard.getType().getCode()); |
|
|
|
dsiBlackCard.setCardId(blackCard.getCardId()); |
|
|
|
dsiBlackCard.setStatus(blackCard.getStatus()); |
|
|
@@ -241,8 +242,8 @@ public abstract class IssueCommManagerImpl { |
|
|
|
public static void enc(DsiBlackCardHis dsiBlackCardHis, QtkBlackCardHis blackCardHis) { |
|
|
|
dsiBlackCardHis.setId(blackCardHis.getId()); |
|
|
|
dsiBlackCardHis.setIssuerId(blackCardHis.getIssuerId()); |
|
|
|
dsiBlackCardHis.setCreationTime(blackCardHis.getCreationTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss"))); |
|
|
|
dsiBlackCardHis.setReleaseTime(blackCardHis.getReleaseTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss"))); |
|
|
|
dsiBlackCardHis.setCreationTime(blackCardHis.getCreationTime() == null ? null : blackCardHis.getCreationTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss"))); |
|
|
|
dsiBlackCardHis.setReleaseTime(blackCardHis.getReleaseTime() == null ? null : blackCardHis.getReleaseTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss"))); |
|
|
|
dsiBlackCardHis.setType(blackCardHis.getType().getCode()); |
|
|
|
dsiBlackCardHis.setCardId(blackCardHis.getCardId()); |
|
|
|
dsiBlackCardHis.setStatus(blackCardHis.getStatus()); |
|
|
@@ -256,8 +257,8 @@ public abstract class IssueCommManagerImpl { |
|
|
|
public static void enc(DsiBlackObu dsiBlackObu, QtkBlackObu qtkBlackObu) { |
|
|
|
dsiBlackObu.setId(qtkBlackObu.getId()); |
|
|
|
dsiBlackObu.setIssuerId(qtkBlackObu.getIssuerId()); |
|
|
|
dsiBlackObu.setCreationTime(qtkBlackObu.getCreationTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss"))); |
|
|
|
dsiBlackObu.setReleaseTime(qtkBlackObu.getReleaseTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss"))); |
|
|
|
dsiBlackObu.setCreationTime(qtkBlackObu.getCreationTime() == null ? null : qtkBlackObu.getCreationTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss"))); |
|
|
|
dsiBlackObu.setReleaseTime(qtkBlackObu.getReleaseTime() == null ? null : qtkBlackObu.getReleaseTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss"))); |
|
|
|
dsiBlackObu.setType(qtkBlackObu.getType().getCode()); |
|
|
|
dsiBlackObu.setObuId(qtkBlackObu.getObuId()); |
|
|
|
dsiBlackObu.setStatus(qtkBlackObu.getStatus()); |