|
|
@@ -75,15 +75,19 @@ public class DeviceRenewalManagerImpl extends AbstractIawManager implements Devi |
|
|
|
cardAndObuValid(dto.getRenewalType() ,cardInfo, obuInfo); |
|
|
|
|
|
|
|
RenewalInstApplyRequest request = new RenewalInstApplyRequest(); |
|
|
|
request.setCardId(dto.getCardId()); |
|
|
|
request.setObuId(dto.getObuId()); |
|
|
|
if (cardInfo != null){ |
|
|
|
request.setCardId(dto.getCardId()); |
|
|
|
} |
|
|
|
if(obuInfo != null){ |
|
|
|
request.setObuId(dto.getObuId()); |
|
|
|
} |
|
|
|
RenewalInstApplyResponse response = null; |
|
|
|
try { |
|
|
|
response = jsonPostRepeat(request); |
|
|
|
} catch (ManagerException e) { |
|
|
|
logger.error("获取申请卡签续期指令异常信息:"+e.getMessage()); |
|
|
|
e.printStackTrace(); |
|
|
|
throw new ManagerException("获取申请卡签续期指令异常"); |
|
|
|
throw new ManagerException("获取申请卡签续期指令异常"+e.getMessage()); |
|
|
|
} |
|
|
|
if (response == null) { |
|
|
|
throw new ManagerException("未获取申请卡签续期指令"); |
|
|
@@ -180,7 +184,7 @@ public class DeviceRenewalManagerImpl extends AbstractIawManager implements Devi |
|
|
|
|
|
|
|
//判断有效期时间 |
|
|
|
if (cardInfo != null){ |
|
|
|
if (!cardInfo.getCardExpireTime().isAfter(LocalDateTime.now().minusYears(1))) { |
|
|
|
if (cardInfo.getCardExpireTime().isAfter(LocalDateTime.now().plusYears(1))) { |
|
|
|
throw new ManagerException("当前卡有效期为:" + cardInfo.getCardExpireTime() + ",有效期剩余1年内才可以续期!"); |
|
|
|
} |
|
|
|
// 判断卡状态是否正常 |
|
|
@@ -189,7 +193,7 @@ public class DeviceRenewalManagerImpl extends AbstractIawManager implements Devi |
|
|
|
} |
|
|
|
} |
|
|
|
if(obuInfo != null){ |
|
|
|
if (!obuInfo.getObuExpireTime().isAfter(LocalDateTime.now().minusYears(1))) { |
|
|
|
if (obuInfo.getObuExpireTime().isAfter(LocalDateTime.now().plusYears(1))) { |
|
|
|
throw new ManagerException("当前卡有效期为:" + obuInfo.getObuExpireTime() + ",有效期剩余1年内才可以续期!"); |
|
|
|
} |
|
|
|
// 判断卡状态是否正常 |