|
|
|
@ -1,5 +1,7 @@
|
|
|
|
|
package com.glxp.api.service.purchase.impl;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.exceptions.ExceptionUtil;
|
|
|
|
|
import cn.hutool.core.thread.ThreadUtil;
|
|
|
|
|
import cn.hutool.json.JSONUtil;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
@ -21,6 +23,7 @@ import com.glxp.api.service.system.SystemParamConfigService;
|
|
|
|
|
import com.glxp.api.util.DateUtil;
|
|
|
|
|
import com.glxp.api.util.IntUtil;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.apache.commons.lang3.exception.ExceptionUtils;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
@ -218,13 +221,14 @@ public class SupCertRemindMsgImpl implements SupCertRemindMsgService {
|
|
|
|
|
List<SupCertEntity> list = new CopyOnWriteArrayList<>(supCertList);
|
|
|
|
|
list.forEach(supCertEntity -> {
|
|
|
|
|
SupCertRemindMsgEntity msgEntity = getSupCertNearRemindMsg(supCertEntity, type);
|
|
|
|
|
if (null == msgEntity.getNextRemindTime() || msgEntity.getNextRemindTime().getTime() > new Date().getTime()) {
|
|
|
|
|
try {
|
|
|
|
|
saveMsg(msgEntity);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
// if (null == msgEntity.getNextRemindTime() || msgEntity.getNextRemindTime().getTime() > new Date().getTime()) {
|
|
|
|
|
try {
|
|
|
|
|
saveMsg(msgEntity);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
log.error(ExceptionUtils.getStackTrace(e));
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -240,14 +244,15 @@ public class SupCertRemindMsgImpl implements SupCertRemindMsgService {
|
|
|
|
|
list.forEach(supCertEntity -> {
|
|
|
|
|
//判断证书是否超出失效期
|
|
|
|
|
SupCertRemindMsgEntity msgEntity = getSupCertRemindMsg(supCertEntity, type);
|
|
|
|
|
if (null == msgEntity.getNextRemindTime() || msgEntity.getNextRemindTime().getTime() > new Date().getTime()) {
|
|
|
|
|
//生成,更新预警信息
|
|
|
|
|
try {
|
|
|
|
|
saveMsg(msgEntity);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
// if (null == msgEntity.getNextRemindTime() || msgEntity.getNextRemindTime().getTime() > new Date().getTime()) {
|
|
|
|
|
//生成,更新预警信息
|
|
|
|
|
try {
|
|
|
|
|
saveMsg(msgEntity);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
log.error(ExceptionUtils.getStackTrace(e));
|
|
|
|
|
}
|
|
|
|
|
// }
|
|
|
|
|
supCertEntity.setAuditStatus(6);
|
|
|
|
|
supCertService.revokeSupCert(supCertEntity);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
@ -306,11 +311,10 @@ public class SupCertRemindMsgImpl implements SupCertRemindMsgService {
|
|
|
|
|
msgEntity = new SupCertRemindMsgEntity();
|
|
|
|
|
msgEntity.setIdFk(idFk); //设置关联主键
|
|
|
|
|
msgEntity.setType(type); //类型
|
|
|
|
|
msgEntity.setWarnType(1);
|
|
|
|
|
msgEntity.setCode(supCertEntity.getCode()); //证书编码
|
|
|
|
|
msgEntity.setCreateTime(new Date());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
msgEntity.setWarnType(1);
|
|
|
|
|
msgEntity.setVailDate(supCertEntity.getVailDate());
|
|
|
|
|
msgEntity.setExpireDate(supCertEntity.getExpireDate());
|
|
|
|
|
msgEntity.setMsg(msg);
|
|
|
|
|