Kaynağa Gözat

卡签续期调整

master
huminghao 2 hafta önce
ebeveyn
işleme
8f7df09a25

+ 9
- 5
zhywpt-app-iaw/src/main/java/cn/com/taiji/iaw/manager/ass/DeviceRenewalManagerImpl.java Dosyayı Görüntüle

@@ -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年内才可以续期!");
}
// 判断卡状态是否正常

+ 2
- 2
zhywpt-app-iaw/src/main/resources/bootstrap.yml Dosyayı Görüntüle

@@ -49,5 +49,5 @@ app:
comm:
# 自定义服务地址map,key为服务名、value为服务地址。如果配置了服务地址,接口调用时请求到该地址,如果没配置,默认请求到gateway
serviceAddr:
sample: http://127.0.0.1:8086
# inss: http://127.0.0.1:8086
# sample: http://127.0.0.1:8086
inss: http://127.0.0.1:8086

+ 2
- 2
zhywpt-service-inss/src/main/java/cn/com/taiji/inss/manager/renewalInst/RenewalInstApplyManager.java Dosyayı Görüntüle

@@ -133,7 +133,7 @@ public class RenewalInstApplyManager extends RedisCacheManager implements LogMan
private void businessValidate(QtkCardInfo cardInfo, QtkObuInfo obuInfo) throws ServiceHandleException {
//判断有效期时间
if (cardInfo != null){
if (!cardInfo.getCardExpireTime().isAfter(LocalDateTime.now().minusYears(1))) {
if (cardInfo.getCardExpireTime().isAfter(LocalDateTime.now().plusYears(1))) {
throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("当前卡有效期为:" + cardInfo.getCardExpireTime() + ",有效期剩余1年内才可以续期!");
}
// 判断卡状态是否正常
@@ -143,7 +143,7 @@ public class RenewalInstApplyManager extends RedisCacheManager implements LogMan
}

if (obuInfo != null){
if (!obuInfo.getObuExpireTime().isAfter(LocalDateTime.now().minusYears(1))) {
if (obuInfo.getObuExpireTime().isAfter(LocalDateTime.now().plusYears(1))) {
throw GlyServiceError.BUSINESS_VALIDATE_ERR.toHandleException("当前卡有效期为:" + obuInfo.getObuExpireTime() + ",有效期剩余1年内才可以续期!");
}
// 判断卡状态是否正常

Loading…
İptal
Kaydet